openc3-cosmos-tool-admin 7.1.0 → 7.2.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-D1PArcGr-3885b67514afe732ba36.js +2 -0
- data/tools/admin/{ArrayplotWidget-DGJEXAY0-5973f039c77b3ba446cb.js → ArrayplotWidget-DPUPy0qM-b6a1c019189be84e4589.js} +1 -1
- data/tools/admin/{BarColumn-DwZmAe8g-6d02376174a6e02ab869.js → BarColumn-BpdscDQf-e551f56c95340d26cda4.js} +1 -1
- data/tools/admin/{BlockWidget-BHtugveV-1cab136df7dbe1306618.js → BlockWidget-_VUsK5T9-59058beda215f65a7b09.js} +2 -2
- data/tools/admin/ButtonWidget-DE41o-cg-d0d862704f2cedf509f5.js +2 -0
- data/tools/admin/CanvasWidget-BEi8h3Mq-e74743c293400ba5a929.js +1 -0
- data/tools/admin/CanvasdotWidget-eZuMgkhL-069ce51cfaf9b6705d69.js +1 -0
- data/tools/admin/{CanvasimageWidget-BpM05v_m-3e2ced79b65869951a35.js → CanvasimageWidget-COv_Qnc8-0a502afa265efe2f25ad.js} +1 -1
- data/tools/admin/{CanvasimagevalueWidget-E6G93iGc-a1517cc5078a6195d110.js → CanvasimagevalueWidget-BhuUqLOo-53322c8fb2f548104d57.js} +1 -1
- data/tools/admin/CanvaslabelWidget-DtvbgeYH-0bb6f6c1d49c8d123129.js +1 -0
- data/tools/admin/{CanvaslabelvalueWidget-B0nJeS4X-998aa3aefcc9a53fdb57.js → CanvaslabelvalueWidget-C_FRIeNb-3b5c9903ad9d379fc52a.js} +1 -1
- data/tools/admin/CanvaslineWidget-D1K_6mAY-986d4445d6db8f24c1b0.js +1 -0
- data/tools/admin/{CanvaslinevalueWidget-BwfFyCwH-78ca2cef2a5352724add.js → CanvaslinevalueWidget-D4eaxWhR-443b0d3f93af5d0faf5a.js} +1 -1
- data/tools/admin/CheckbuttonWidget-ByxMDkiS-6939f416d1a7977f37fb.js +1 -0
- data/tools/admin/ComboboxWidget-CAGxGv2r-28b0f6b63d807a2f3217.js +1 -0
- data/tools/admin/{DateWidget-CAiG2FIl-e83f3c8fa86a4cb63c08.js → DateWidget-DkNWx28s-bb439088467e3b1af3aa.js} +1 -1
- data/tools/admin/{DetailsDialog-q5SDzw3R-b82562d2d6d57a3000a4.js → DetailsDialog-F4KgYM6m-8435a552f5c10d2191bc.js} +1 -1
- data/tools/admin/{DynamicWidget-BuSbQVhf-3a901a22b32b0908e511.js → DynamicWidget-BuSbQVhf-6a5228328dcebb177ef8.js} +1 -1
- data/tools/admin/{FilechecksumWidget-DeW9wy5d-ad4a15110a5eb00418bc.js → FilechecksumWidget-DSfNEnDJ-531bbb7d456d380a62d9.js} +1 -1
- data/tools/admin/{FiledisplayWidget-C_zPFu2E-58a35735cd3b6d9bb251.js → FiledisplayWidget-D2cxMmrP-812eb21e2f71f0bd32d6.js} +1 -1
- data/tools/admin/{FormatvalueWidget-BrvPWwfN-40beb2cd8bc9081eb881.js → FormatvalueWidget-6-bj_PJO-4c9daa001cba89fb9103.js} +1 -1
- data/tools/admin/Graph-Cz0Ns1FD-9251aa7b63944e24104e.js +1 -0
- data/tools/admin/{GraphWidget-QS-VJoes-467c19e767fd433b801a.js → GraphWidget-COXK3Dab-18ccb71d08b630c3446f.js} +1 -1
- data/tools/admin/HorizontalWidget-C9UFBPsk-91bd1e11d87736b8c758.js +1 -0
- data/tools/admin/HorizontalboxWidget-CWLfmRtr-13d452adc9e1100f23c4.js +1 -0
- data/tools/admin/HorizontallineWidget-DeFkOaYO-816f7a06f03f7222e67e.js +1 -0
- data/tools/admin/{IframeWidget-CITX8Es1-d2843bef19564e161e74.js → IframeWidget-Bn9eGzrq-d71752e23ce712e81e26.js} +1 -1
- data/tools/admin/{ImageLoader-DQV_11Vd-5875217783363452070c.js → ImageLoader-_gAudhVo-23300d0d0133307fb169.js} +1 -1
- data/tools/admin/{ImageviewerWidget-BIsSA7KD-fb7deb592ddaf77428d9.js → ImageviewerWidget-BUWhF32Z-0799a243569a53e640e9.js} +1 -1
- data/tools/admin/InterfacesTab-CZsnR6xB-abec32626a92ea91aa87.js +1 -0
- data/tools/admin/{LabelWidget-FQI-cH_A-8f8bc1c1f7df473ba1c7.js → LabelWidget-BhzkN06D-2d7a7f95582b783e18d0.js} +1 -1
- data/tools/admin/{LabelledWidget-KGXtQ4Zb-ac56cd3791054c971526.js → LabelledWidget-vx8NvW1b-0d3f99aa750f0631fdc2.js} +1 -1
- data/tools/admin/LabelprogressbarWidget-t5PvKuS4-18438f7d1f021d5247e5.js +1 -0
- data/tools/admin/LabelsparklineWidget-CebbEH-j-9c683841d069f9e5b25c.js +1 -0
- data/tools/admin/LabelvalueWidget-Cbs1DBK2-8bc763b903941db678a2.js +1 -0
- data/tools/admin/{LabelvaluedescWidget-BppM5vGp-60d49f07e899e6190fc8.js → LabelvaluedescWidget-B7OIOGc0-21ac0d9663cf49396a58.js} +1 -1
- data/tools/admin/LabelvaluelimitsbarWidget-C57kf-oQ-8929b2b56023fd39369a.js +1 -0
- data/tools/admin/LabelvaluelimitscolumnWidget-BRlNDEqp-d0a4f3d8ee015080c0a8.js +1 -0
- data/tools/admin/{LabelvaluerangebarWidget-BT0BcOoK-c8faf743155ec6a952be.js → LabelvaluerangebarWidget-Pt_evm3v-2f296e2b660ae23cd7e2.js} +1 -1
- data/tools/admin/{Layout-d-vb0okO-b4be0ec1ccd5aba1a394.js → Layout-CKmC50QZ-a4e41facce8302b08009.js} +1 -1
- data/tools/admin/{LedWidget-Cmr6eVG2-0629e1460c7ccffb594b.js → LedWidget-D1lmNXpi-c70ab085a7e75d99db2a.js} +1 -1
- data/tools/admin/{LimitsBar-qMynDHYT-7d05a8affa8547333479.js → LimitsBar-D5IZu7eX-eed22332c6603ee4301a.js} +1 -1
- data/tools/admin/{LimitsbarWidget-CMvcwa-m-0713ea3e20a6e70ea995.js → LimitsbarWidget-VpxQXE-e-48cfee552a9c695bf8f1.js} +1 -1
- data/tools/admin/{LimitscolorWidget-CZ9wMtcI-b6559956fcf07908552b.js → LimitscolorWidget-79P41CX7-f2eea333aec5c48967e0.js} +1 -1
- data/tools/admin/{LimitscolumnWidget-r84KJGU--ad41610e4bf266f348a5.js → LimitscolumnWidget-BFDXhJeZ-4eba19b9d6c713c13db1.js} +1 -1
- data/tools/admin/LinegraphWidget-VqkpOlws-f72604545ff9d950311b.js +1 -0
- data/tools/admin/{MatrixbycolumnsWidget-Dx2iz0YF-6f5b9d26b3678f3200c4.js → MatrixbycolumnsWidget--ihvirDP-0c6d1476cb4af73ce4ec.js} +1 -1
- data/tools/admin/{MicroservicesTab-Bhsf1soi-1ae5a6c0aa51b620f298.js → MicroservicesTab-CQPpb7j1-7daf01af280d2c44c370.js} +2 -2
- data/tools/admin/OpenC3TimePicker-B0lAIU91-6e7843b535d6cb333926.js +1 -0
- data/tools/admin/{OutputDialog-D0ifesTw-d1fc2b4d8d09af22765e.js → OutputDialog-DtrpwjGL-73ebd3c55e7ffbc15652.js} +1 -1
- data/tools/admin/PackagesTab-DQ5s3nfh-dfdd8bd24af88c946d9d.js +1 -0
- data/tools/admin/{PluginsTab-nWngR5kY-fb723f730cae605368ca.js → PluginsTab-1tlTx4k1-496335d424694bd25d9a.js} +2 -2
- data/tools/admin/{ProgressbarWidget-DPbAVjdC-fe70c4f878b34c21a297.js → ProgressbarWidget-BIB3r9SL-2b2e5705da4fe267fc08.js} +1 -1
- data/tools/admin/RadiobuttonWidget-C5rxLM7K-9bdffd0ee597d4386ad7.js +1 -0
- data/tools/admin/RadiogroupWidget-CciTCv1U-f9b9584110d84fad120b.js +1 -0
- data/tools/admin/{RangebarWidget-DJXGUHAc-22969b9af0d9fc81fb0a.js → RangebarWidget-MPQYi2Km-b85a235f8e43da24f3ae.js} +1 -1
- data/tools/admin/{RedisTab-BZtfqEcP-26828a24578c54ad2bd1.js → RedisTab-DAeGow_e-aad9acabdf7d1943559b.js} +1 -1
- data/tools/admin/{RollupWidget-BbWLSsTT-3ff00735fdd5975e73d6.js → RollupWidget-CfjGAhzg-f9d66fe1e702f376333e.js} +1 -1
- data/tools/admin/{RoutersTab-CLKIJ5cm-192f71834ece51ffdb96.js → RoutersTab-G4WKtUOo-8f69fb20843fdf62fa85.js} +1 -1
- data/tools/admin/ScrollwindowWidget-CupaygNN-a397b20ae8a40b64a487.js +1 -0
- data/tools/admin/{SecretsTab-BoBmTh63-0b1ebb50cbbbcd22ea0e.js → SecretsTab-C9xAxuwO-89d69d126612c7b64f6d.js} +1 -1
- data/tools/admin/SettingsTab-BUdeAh4o-f1b85c2ee59d2f206af1.js +5 -0
- data/tools/admin/{SignalWidget-65q0tiuo-449ea3f3201cd3be57fc.js → SignalWidget-C-qecoTO-c71ca67fb48f421af75e.js} +1 -1
- data/tools/admin/{SimpleTextDialog-ChmFtdVw-e4bf5579c3f6df974472.js → SimpleTextDialog-C-0ZC2bs-48d950cb04fe0c899bab.js} +1 -1
- data/tools/admin/{SpacerWidget-DFzbojmX-b949b9bd454547dd5c32.js → SpacerWidget-VVkOCb6N-356dcf21185ada59e84f.js} +1 -1
- data/tools/admin/SparklineWidget-Dsmn38z_-2bd86ac75cf900848cd0.js +1 -0
- data/tools/admin/{TabbookWidget-CELMWyx7-389bde713eda9ce6ec21.js → TabbookWidget-CXklff-l-46b8ed5b3d3fc3f6ff22.js} +1 -1
- data/tools/admin/{TargetsTab-BJZEtKY4-eb3c520d9f8896dc52e2.js → TargetsTab-Ci4cOsIa-d2957154b9bf46fa9617.js} +1 -1
- data/tools/admin/TextboxWidget-CHs2VYIv-55be6bce7cab19177b56.js +1 -0
- data/tools/admin/TextfieldWidget-CdANAW-6-82179a958f191dffd85c.js +1 -0
- data/tools/admin/TimeWidget-D0xT1wXR-52493dd27717545a87bd.js +1 -0
- data/tools/admin/TitleWidget-68NWCcXB-218c5743097602c7a5d8.js +1 -0
- data/tools/admin/{ToolsTab-VSCWDywf-8a291cbe6cc534d27ddf.js → ToolsTab-BCvmMDIZ-4b33c7b7aab46b7d4119.js} +1 -1
- data/tools/admin/{TsdbTab-Cv8GjpoJ-4fc1c6979b74d5408ab1.js → TsdbTab-BytqwnkN-ddc61c1fffc41912b8cb.js} +2 -2
- data/tools/admin/{VWidget-BDy0211S-dcdd3ef3630006403c5a.js → VWidget-oMbywhLA-ae9ee9bde0636cb9c9e1.js} +1 -1
- data/tools/admin/ValueWidget-B1aGUBP7-320f2f1feb3886640deb.js +1 -0
- data/tools/admin/ValuelimitsbarWidget-B7KcRjLS-70f46b11dcb2a83a3562.js +1 -0
- data/tools/admin/{ValuelimitscolumnWidget-7DXCsVW_-54ad4c81e5c324d8a098.js → ValuelimitscolumnWidget-BVt6nLXq-08cf4c90f589d1d23b70.js} +1 -1
- data/tools/admin/ValuerangebarWidget-uVZEI32U-ded0715685adaffdaca5.js +1 -0
- data/tools/admin/VerticalWidget-DlftYBjH-ae7352937173846f56d9.js +1 -0
- data/tools/admin/VerticalboxWidget-C7RrkfY0-a5135be854d46c8d2871.js +1 -0
- data/tools/admin/{Widget-BDsgRxuV-a44a345d561e48ac8b60.js → Widget-D_HaosJK-c49796f3af3288426d03.js} +1 -1
- data/tools/admin/main-320f7a52ead0c027f3e7.js +1502 -0
- data/tools/admin/main.js +1 -1
- data/tools/admin/{settings-Dvmurty6-94679bb52b0b8e46bc5c.js → settings-DZ910lLo-06b2e35cd3b4b6b6686c.js} +1 -1
- metadata +85 -85
- data/tools/admin/ArrayWidget-CcQFJGCA-c1e313dd26dacdcca369.js +0 -2
- data/tools/admin/ButtonWidget-Cc9cYsg8-76799976508952c2794c.js +0 -2
- data/tools/admin/CanvasWidget-Bn70gBcc-1f45b874237dce369747.js +0 -1
- data/tools/admin/CanvasdotWidget-CMROfW3O-0d78913e6b2e8de60b20.js +0 -1
- data/tools/admin/CanvaslabelWidget-C074R2Fy-ba9bf286d8c1c178d2e9.js +0 -1
- data/tools/admin/CanvaslineWidget-CxnNAqOX-b28d8c979cff5863f6f9.js +0 -1
- data/tools/admin/CheckbuttonWidget-yAm10oX0-3b8cd481bd50c23db7ea.js +0 -1
- data/tools/admin/ComboboxWidget-BnWksnnp-e0acb306b760add01fd9.js +0 -1
- data/tools/admin/Graph-BCvaO4yI-41ca366ad5307cf72d8e.js +0 -1
- data/tools/admin/HorizontalWidget-cFSsdChw-9e8be5a4c341c9e2a48d.js +0 -1
- data/tools/admin/HorizontalboxWidget-CKA7rLGd-3f41a44400ea46dcf39e.js +0 -1
- data/tools/admin/HorizontallineWidget-BqbLK0zc-5f28e518ef775ecc7983.js +0 -1
- data/tools/admin/InterfacesTab-twne_Qp4-7a5803ca2d2e183ea27f.js +0 -1
- data/tools/admin/LabelprogressbarWidget-72WyzD_Q-d713e91f3bc4d5e9bb86.js +0 -1
- data/tools/admin/LabelsparklineWidget-DtWNf4mK-e571c4c30dd5e6600e2d.js +0 -1
- data/tools/admin/LabelvalueWidget-D_JLdY7r-d8b0113b840e1d424218.js +0 -1
- data/tools/admin/LabelvaluelimitsbarWidget-B69ogLif-1b72fbb67e4bbf4e944c.js +0 -1
- data/tools/admin/LabelvaluelimitscolumnWidget-DPYwFdgq-39778adddee40bf5323b.js +0 -1
- data/tools/admin/LinegraphWidget-COGBGOjF-cc12f6b529350d7e1e43.js +0 -1
- data/tools/admin/OpenC3TimePicker-C3vCnk72-c5a6f456100da4e3fb0e.js +0 -1
- data/tools/admin/PackagesTab-Bb221-aM-f1e26eed5c8756e90bf0.js +0 -1
- data/tools/admin/RadiobuttonWidget-iXI9yCDk-b46058fb3a6703e141c3.js +0 -1
- data/tools/admin/RadiogroupWidget-CMM_p1eA-ab34167d8d07579889eb.js +0 -1
- data/tools/admin/ScrollwindowWidget-Dxhp7yKn-212c665370260983c033.js +0 -1
- data/tools/admin/SettingsTab-BL7gkaO9-1451155a58c685c1b589.js +0 -2
- data/tools/admin/SparklineWidget-Bu4I8zY0-bd2a64c423f945d2b719.js +0 -1
- data/tools/admin/TextboxWidget-DYsqXntS-b8ed82dfb3407b1b3ded.js +0 -1
- data/tools/admin/TextfieldWidget-BIUgV9Q4-c9b84219519a6b225ba9.js +0 -1
- data/tools/admin/TimeWidget-BPXcY1Wy-ba8743a763af51255bd9.js +0 -1
- data/tools/admin/TitleWidget-DJ9mHRLE-7e3251bb102d37f0fc2d.js +0 -1
- data/tools/admin/ValueWidget-DzOSy7lp-e35ee45ffa2bd853bbcb.js +0 -1
- data/tools/admin/ValuelimitsbarWidget-D5dSlW6D-8d8036cefd6d2b014d73.js +0 -1
- data/tools/admin/ValuerangebarWidget-BWjnpmyy-2e43d6b213fdd9d6500d.js +0 -1
- data/tools/admin/VerticalWidget-BOtXAhxt-f42425fb37f426b0e3b7.js +0 -1
- data/tools/admin/VerticalboxWidget-RAsXfGdI-99f7d03eb06c4352f752.js +0 -1
- data/tools/admin/main-e92ddf337a561fec8f7b.js +0 -1501
|
@@ -0,0 +1,1502 @@
|
|
|
1
|
+
System.register(["vue","vue-router","pinia","single-spa","vuetify"],(function(Mn,et){"use strict";var Ue,rt,Bt,ze,We,on,Jn,Xp,Jp,Zp,yn,si,vo,Qp,Nt,Va,Tu,gs,Gr,ea,Bl,ta,eg,tg,ng,rg,Iu,ig,og,sg,ag,lg,Lu,cg,ug,hg,dg,fg,pg,Mu,gg;return{setters:[At=>{Ue=At.resolveComponent,rt=At.openBlock,Bt=At.createBlock,ze=At.withCtx,We=At.createVNode,on=At.createElementBlock,Jn=At.createElementVNode,Xp=At.useCssVars,Jp=At.defineAsyncComponent,Zp=At.Teleport,yn=At.toDisplayString,si=At.Fragment,vo=At.renderList,Qp=At.ref,Nt=At.createTextVNode,Va=At.mergeProps,Tu=At.createSlots,gs=At.normalizeStyle,Gr=At.createCommentVNode,ea=At.h,Bl=At.withKeys,ta=At.withModifiers,eg=At.toRaw,tg=At.defineComponent,ng=At.warn,rg=At.inject,Iu=At.computed,ig=At.shallowRef,og=At.watchEffect,sg=At.normalizeClass,ag=At.getCurrentInstance,lg=At.provide,Lu=At.createApp,cg=At.withDirectives,ug=At.vShow},At=>{hg=At.createRouter,dg=At.createWebHistory},At=>{fg=At.defineStore,pg=At.createPinia},At=>{Mu=At.getMountedApps},At=>{gg=At.createVuetify}],execute:(function(){Mn({B:Kr,D:ah,F:Om,G:yo,J:oh,L:Dm,M:Nm,U:nl,V:sa,b:Em,k:$m,n:Y0,o:Or,v:aa,z:Sm});var At=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function mg(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(d){return Object.getOwnPropertyDescriptor(n,d).enumerable}))),e.push.apply(e,r)}return e}function ms(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?mg(Object(e),!0).forEach((function(r){Yx(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):mg(Object(e)).forEach((function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))}))}return n}function Yx(n,t,e){return(t=(function(r){var d=(function(h,f){if(vs(h)!=="object"||h===null)return h;var v=h[Symbol.toPrimitive];if(v!==void 0){var o=v.call(h,f);if(vs(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(f==="string"?String:Number)(h)})(r,"string");return vs(d)==="symbol"?d:String(d)})(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function vs(n){return vs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vs(n)}(function(n){if(n.CSS&&n.CSS.escape)return n.CSS.escape;var t=function(e){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,d=String(e),h=d.length,f=-1,v="",o=d.charCodeAt(0);++f<h;)(r=d.charCodeAt(f))!=0?v+=r>=1&&r<=31||r==127||f==0&&r>=48&&r<=57||f==1&&r>=48&&r<=57&&o==45?"\\"+r.toString(16)+" ":f==0&&h==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+d.charAt(f):d.charAt(f):v+="�";return v};n.CSS||(n.CSS={}),n.CSS.escape=t})(At);var Xx={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function Jx(n){if(vs(n)!=="object")throw new Error("single-spa-vue requires a configuration object");var t=ms(ms({},Xx),n);if(!t.Vue&&!t.createApp)throw Error("single-spa-vue must be passed opts.Vue or opts.createApp");if(!t.appOptions)throw Error("single-spa-vue must be passed opts.appOptions");if(t.appOptions.el&&typeof t.appOptions.el!="string"&&!(t.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(vs(t.appOptions.el)));t.createApp=t.createApp||t.Vue&&t.Vue.createApp;var e={};return{bootstrap:Zx.bind(null,t,e),mount:Qx.bind(null,t,e),unmount:tC.bind(null,t,e),update:eC.bind(null,t,e)}}function Zx(n){return n.loadRootComponent?n.loadRootComponent().then((function(t){return n.rootComponent=t})):Promise.resolve()}function Qx(n,t,e){var r={};return Promise.resolve().then((function(){return(function(d,h){return typeof d.appOptions=="function"?d.appOptions(h):Promise.resolve(ms({},d.appOptions))})(n,e).then((function(d){var h;if(e.domElement&&!d.el&&(d.el=e.domElement),d.el)if(typeof d.el=="string"){if(!(h=document.querySelector(d.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(d.el))}else(h=d.el).id||(h.id="single-spa-application:".concat(e.name)),d.el="#".concat(CSS.escape(h.id));else{var f="single-spa-application:".concat(e.name);d.el="#".concat(CSS.escape(f)),(h=document.getElementById(f))||((h=document.createElement("div")).id=f,document.body.appendChild(h))}if(!n.replaceMode&&(d.el=d.el+" .single-spa-container",!h.querySelector(".single-spa-container"))){var v=document.createElement("div");v.className="single-spa-container",h.appendChild(v)}r.domEl=h,d.render||d.template||!n.rootComponent||(d.render=function(p){return p(n.rootComponent)}),d.data||(d.data={});var o=d.data;if(d.data=function(){return ms(ms({},typeof o=="function"?o.call(this,this):o),e)},n.createApp){if(r.vueInstance=n.createApp(d),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,e)).then((function(){return r.root=r.vueInstance.mount(d.el),t[e.name]=r,r.vueInstance}));r.root=r.vueInstance.mount(d.el)}else if(r.vueInstance=new n.Vue(d),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,e)).then((function(){return t[e.name]=r,r.vueInstance}));return t[e.name]=r,r.vueInstance}))}))}function eC(n,t,e){return Promise.resolve().then((function(){var r=t[e.name],d=ms(ms({},n.appOptions.data||{}),e),h=r.root||r.vueInstance;for(var f in d)h[f]=d[f]}))}function tC(n,t,e){return Promise.resolve().then((function(){var r=t[e.name];n.createApp?r.vueInstance.unmount(r.domEl):(r.vueInstance.$destroy(),r.vueInstance.$el.innerHTML=""),delete r.vueInstance,r.domEl&&(r.domEl.innerHTML="",delete r.domEl)}))}const nC=(n,t)=>{const e=n.__vccOpts||n;for(const[r,d]of t)e[r]=d;return e},rC={};function iC(n,t){const e=Ue("router-view"),r=Ue("v-app");return rt(),Bt(r,{id:"innerapp"},{default:ze(()=>[We(e)]),_:1})}const oC=nC(rC,[["render",iC]]),vg=function(n){!n.name!=="NotFound"&&(n.path=`/tools/admin/${n.path.replace(/^\//,"")}`),n.children?.forEach(vg)},Wz="modulepreload",Hz=function(n){return"/"+n},Uz={},tt=function(t,e,r){let d=Promise.resolve();function h(f){const v=new Event("vite:preloadError",{cancelable:!0});if(v.payload=f,window.dispatchEvent(v),!v.defaultPrevented)throw f}return d.then(f=>{for(const v of f||[])v.status==="rejected"&&h(v.reason);return t().catch(h)})},Xi=Mn("f",(n,t)=>{const e=n.__vccOpts||n;for(const[r,d]of t)e[r]=d;return e}),sC="/icons/customIcons.svg",Ou={props:{icon:{type:String,default:null},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return sC+"#"+this.icon}}},yg=()=>{Xp(n=>({v4ccb3d08:n.color}))},bg=Ou.setup;Ou.setup=bg?(n,t)=>(yg(),bg(n,t)):yg;const aC={class:"cosmos-custom-icon"},lC={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},cC=["href"];function uC(n,t,e,r,d,h){return rt(),on("span",aC,[(rt(),on("svg",lC,[Jn("use",{href:h.iconSrc},null,8,cC)]))])}const hC=Xi(Ou,[["render",uC],["__scopeId","data-v-54b83b01"]]);function wg(n,t){return function(){return n.apply(t,arguments)}}const{toString:dC}=Object.prototype,{getPrototypeOf:jl}=Object,{iterator:Wl,toStringTag:xg}=Symbol,Hl=(n=>t=>{const e=dC.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ji=n=>(n=n.toLowerCase(),t=>Hl(t)===n),Ul=n=>t=>typeof t===n,{isArray:na}=Array,ra=Ul("undefined");function Ga(n){return n!==null&&!ra(n)&&n.constructor!==null&&!ra(n.constructor)&&ai(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Cg=Ji("ArrayBuffer");function fC(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Cg(n.buffer),t}const pC=Ul("string"),ai=Ul("function"),Ag=Ul("number"),qa=n=>n!==null&&typeof n=="object",gC=n=>n===!0||n===!1,Vl=n=>{if(Hl(n)!=="object")return!1;const t=jl(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(xg in n)&&!(Wl in n)},mC=n=>{if(!qa(n)||Ga(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},vC=Ji("Date"),yC=Ji("File"),bC=n=>!!(n&&typeof n.uri<"u"),wC=n=>n&&typeof n.getParts<"u",xC=Ji("Blob"),CC=Ji("FileList"),AC=n=>qa(n)&&ai(n.pipe);function _C(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const _g=_C(),kg=typeof _g.FormData<"u"?_g.FormData:void 0,kC=n=>{if(!n)return!1;if(kg&&n instanceof kg)return!0;const t=jl(n);if(!t||t===Object.prototype||!ai(n.append))return!1;const e=Hl(n);return e==="formdata"||e==="object"&&ai(n.toString)&&n.toString()==="[object FormData]"},SC=Ji("URLSearchParams"),[$C,EC,RC,TC]=["ReadableStream","Request","Response","Headers"].map(Ji),IC=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ka(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,d;if(typeof n!="object"&&(n=[n]),na(n))for(r=0,d=n.length;r<d;r++)t.call(null,n[r],r,n);else{if(Ga(n))return;const h=e?Object.getOwnPropertyNames(n):Object.keys(n),f=h.length;let v;for(r=0;r<f;r++)v=h[r],t.call(null,n[v],v,n)}}function Sg(n,t){if(Ga(n))return null;t=t.toLowerCase();const e=Object.keys(n);let r=e.length,d;for(;r-- >0;)if(d=e[r],t===d.toLowerCase())return d;return null}const ys=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$g=n=>!ra(n)&&n!==ys;function Nu(...n){const{caseless:t,skipUndefined:e}=$g(this)&&this||{},r={},d=(h,f)=>{if(f==="__proto__"||f==="constructor"||f==="prototype")return;const v=t&&Sg(r,f)||f,o=Du(r,v)?r[v]:void 0;Vl(o)&&Vl(h)?r[v]=Nu(o,h):Vl(h)?r[v]=Nu({},h):na(h)?r[v]=h.slice():(!e||!ra(h))&&(r[v]=h)};for(let h=0,f=n.length;h<f;h++)n[h]&&Ka(n[h],d);return r}const LC=(n,t,e,{allOwnKeys:r}={})=>(Ka(t,(d,h)=>{e&&ai(d)?Object.defineProperty(n,h,{__proto__:null,value:wg(d,e),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,h,{__proto__:null,value:d,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),n),MC=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),OC=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),e&&Object.assign(n.prototype,e)},NC=(n,t,e,r)=>{let d,h,f;const v={};if(t=t||{},n==null)return t;do{for(d=Object.getOwnPropertyNames(n),h=d.length;h-- >0;)f=d[h],(!r||r(f,n,t))&&!v[f]&&(t[f]=n[f],v[f]=!0);n=e!==!1&&jl(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},DC=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},PC=n=>{if(!n)return null;if(na(n))return n;let t=n.length;if(!Ag(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},FC=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&jl(Uint8Array)),zC=(n,t)=>{const e=(n&&n[Wl]).call(n);let r;for(;(r=e.next())&&!r.done;){const d=r.value;t.call(n,d[0],d[1])}},BC=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},jC=Ji("HTMLFormElement"),WC=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),Du=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),HC=Ji("RegExp"),Eg=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};Ka(e,(d,h)=>{let f;(f=t(d,h,n))!==!1&&(r[h]=f||d)}),Object.defineProperties(n,r)},UC=n=>{Eg(n,(t,e)=>{if(ai(n)&&["arguments","caller","callee"].includes(e))return!1;const r=n[e];if(ai(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},VC=(n,t)=>{const e={},r=d=>{d.forEach(h=>{e[h]=!0})};return na(n)?r(n):r(String(n).split(t)),e},GC=()=>{},qC=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function KC(n){return!!(n&&ai(n.append)&&n[xg]==="FormData"&&n[Wl])}const YC=n=>{const t=new WeakSet,e=r=>{if(qa(r)){if(t.has(r))return;if(Ga(r))return r;if(!("toJSON"in r)){t.add(r);const d=na(r)?[]:{};return Ka(r,(h,f)=>{const v=e(h);!ra(v)&&(d[f]=v)}),t.delete(r),d}}return r};return e(n)},XC=Ji("AsyncFunction"),JC=n=>n&&(qa(n)||ai(n))&&ai(n.then)&&ai(n.catch),Rg=((n,t)=>n?setImmediate:t?((e,r)=>(ys.addEventListener("message",({source:d,data:h})=>{d===ys&&h===e&&r.length&&r.shift()()},!1),d=>{r.push(d),ys.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",ai(ys.postMessage)),ZC=typeof queueMicrotask<"u"?queueMicrotask.bind(ys):typeof process<"u"&&process.nextTick||Rg,QC=n=>n!=null&&ai(n[Wl]),xe={isArray:na,isArrayBuffer:Cg,isBuffer:Ga,isFormData:kC,isArrayBufferView:fC,isString:pC,isNumber:Ag,isBoolean:gC,isObject:qa,isPlainObject:Vl,isEmptyObject:mC,isReadableStream:$C,isRequest:EC,isResponse:RC,isHeaders:TC,isUndefined:ra,isDate:vC,isFile:yC,isReactNativeBlob:bC,isReactNative:wC,isBlob:xC,isRegExp:HC,isFunction:ai,isStream:AC,isURLSearchParams:SC,isTypedArray:FC,isFileList:CC,forEach:Ka,merge:Nu,extend:LC,trim:IC,stripBOM:MC,inherits:OC,toFlatObject:NC,kindOf:Hl,kindOfTest:Ji,endsWith:DC,toArray:PC,forEachEntry:zC,matchAll:BC,isHTMLForm:jC,hasOwnProperty:Du,hasOwnProp:Du,reduceDescriptors:Eg,freezeMethods:UC,toObjectSet:VC,toCamelCase:WC,noop:GC,toFiniteNumber:qC,findKey:Sg,global:ys,isContextDefined:$g,isSpecCompliantForm:KC,toJSONObject:YC,isAsyncFn:XC,isThenable:JC,setImmediate:Rg,asap:ZC,isIterable:QC},eA=xe.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"]),tA=n=>{const t={};let e,r,d;return n&&n.split(`
|
|
2
|
+
`).forEach(function(h){d=h.indexOf(":"),e=h.substring(0,d).trim().toLowerCase(),r=h.substring(d+1).trim(),!(!e||t[e]&&eA[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t};function nA(n){let t=0,e=n.length;for(;t<e;){const r=n.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;e>t;){const r=n.charCodeAt(e-1);if(r!==9&&r!==32)break;e-=1}return t===0&&e===n.length?n:n.slice(t,e)}const rA=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),iA=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Pu(n,t){return xe.isArray(n)?n.map(e=>Pu(e,t)):nA(String(n).replace(t,""))}const oA=n=>Pu(n,rA),sA=n=>Pu(n,iA);function Tg(n){const t=Object.create(null);return xe.forEach(n.toJSON(),(e,r)=>{t[r]=sA(e)}),t}const Ig=Symbol("internals");function Ya(n){return n&&String(n).trim().toLowerCase()}function Gl(n){return n===!1||n==null?n:xe.isArray(n)?n.map(Gl):oA(String(n))}function aA(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(n);)t[r[1]]=r[2];return t}const lA=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Fu(n,t,e,r,d){if(xe.isFunction(r))return r.call(this,t,e);if(d&&(t=e),!!xe.isString(t)){if(xe.isString(r))return t.indexOf(r)!==-1;if(xe.isRegExp(r))return r.test(t)}}function cA(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function uA(n,t){const e=xe.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{__proto__:null,value:function(d,h,f){return this[r].call(this,t,d,h,f)},configurable:!0})})}let qr=class{constructor(t){t&&this.set(t)}set(t,e,r){const d=this;function h(v,o,p){const i=Ya(o);if(!i)throw new Error("header name must be a non-empty string");const a=xe.findKey(d,i);(!a||d[a]===void 0||p===!0||p===void 0&&d[a]!==!1)&&(d[a||o]=Gl(v))}const f=(v,o)=>xe.forEach(v,(p,i)=>h(p,i,o));if(xe.isPlainObject(t)||t instanceof this.constructor)f(t,e);else if(xe.isString(t)&&(t=t.trim())&&!lA(t))f(tA(t),e);else if(xe.isObject(t)&&xe.isIterable(t)){let v={},o,p;for(const i of t){if(!xe.isArray(i))throw TypeError("Object iterator must return a key-value pair");v[p=i[0]]=(o=v[p])?xe.isArray(o)?[...o,i[1]]:[o,i[1]]:i[1]}f(v,e)}else t!=null&&h(e,t,r);return this}get(t,e){if(t=Ya(t),t){const r=xe.findKey(this,t);if(r){const d=this[r];if(!e)return d;if(e===!0)return aA(d);if(xe.isFunction(e))return e.call(this,d,r);if(xe.isRegExp(e))return e.exec(d);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Ya(t),t){const r=xe.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||Fu(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let d=!1;function h(f){if(f=Ya(f),f){const v=xe.findKey(r,f);v&&(!e||Fu(r,r[v],v,e))&&(delete r[v],d=!0)}}return xe.isArray(t)?t.forEach(h):h(t),d}clear(t){const e=Object.keys(this);let r=e.length,d=!1;for(;r--;){const h=e[r];(!t||Fu(this,this[h],h,t,!0))&&(delete this[h],d=!0)}return d}normalize(t){const e=this,r={};return xe.forEach(this,(d,h)=>{const f=xe.findKey(r,h);if(f){e[f]=Gl(d),delete e[h];return}const v=t?cA(h):String(h).trim();v!==h&&delete e[h],e[v]=Gl(d),r[v]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return xe.forEach(this,(r,d)=>{r!=null&&r!==!1&&(e[d]=t&&xe.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
|
3
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(d=>r.set(d)),r}static accessor(t){const e=(this[Ig]=this[Ig]={accessors:{}}).accessors,r=this.prototype;function d(h){const f=Ya(h);e[f]||(uA(r,h),e[f]=!0)}return xe.isArray(t)?t.forEach(d):d(t),this}};qr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),xe.reduceDescriptors(qr.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),xe.freezeMethods(qr);const hA="[REDACTED ****]";function dA(n){if(xe.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(xe.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function fA(n,t){const e=new Set(t.map(h=>String(h).toLowerCase())),r=[],d=h=>{if(h===null||typeof h!="object"||xe.isBuffer(h))return h;if(r.indexOf(h)!==-1)return;h instanceof qr&&(h=h.toJSON()),r.push(h);let f;if(xe.isArray(h))f=[],h.forEach((v,o)=>{const p=d(v);xe.isUndefined(p)||(f[o]=p)});else{if(!xe.isPlainObject(h)&&dA(h))return r.pop(),h;f=Object.create(null);for(const[v,o]of Object.entries(h)){const p=e.has(v.toLowerCase())?hA:d(o);xe.isUndefined(p)||(f[v]=p)}}return r.pop(),f};return d(n)}let at=class Vx extends Error{static from(t,e,r,d,h,f){const v=new Vx(t.message,e||t.code,r,d,h);return v.cause=t,v.name=t.name,t.status!=null&&v.status==null&&(v.status=t.status),f&&Object.assign(v,f),v}constructor(t,e,r,d,h){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),r&&(this.config=r),d&&(this.request=d),h&&(this.response=h,this.status=h.status)}toJSON(){const t=this.config,e=t&&xe.hasOwnProp(t,"redact")?t.redact:void 0,r=xe.isArray(e)&&e.length>0?fA(t,e):xe.toJSONObject(t);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:r,code:this.code,status:this.status}}};at.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",at.ERR_BAD_OPTION="ERR_BAD_OPTION",at.ECONNABORTED="ECONNABORTED",at.ETIMEDOUT="ETIMEDOUT",at.ECONNREFUSED="ECONNREFUSED",at.ERR_NETWORK="ERR_NETWORK",at.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",at.ERR_DEPRECATED="ERR_DEPRECATED",at.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",at.ERR_BAD_REQUEST="ERR_BAD_REQUEST",at.ERR_CANCELED="ERR_CANCELED",at.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",at.ERR_INVALID_URL="ERR_INVALID_URL",at.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const pA=null;function zu(n){return xe.isPlainObject(n)||xe.isArray(n)}function Lg(n){return xe.endsWith(n,"[]")?n.slice(0,-2):n}function Bu(n,t,e){return n?n.concat(t).map(function(r,d){return r=Lg(r),!e&&d?"["+r+"]":r}).join(e?".":""):t}function gA(n){return xe.isArray(n)&&!n.some(zu)}const mA=xe.toFlatObject(xe,{},null,function(n){return/^is[A-Z]/.test(n)});function ql(n,t,e){if(!xe.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=xe.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(c,m){return!xe.isUndefined(m[c])});const r=e.metaTokens,d=e.visitor||a,h=e.dots,f=e.indexes,v=e.Blob||typeof Blob<"u"&&Blob,o=e.maxDepth===void 0?100:e.maxDepth,p=v&&xe.isSpecCompliantForm(t);if(!xe.isFunction(d))throw new TypeError("visitor must be a function");function i(c){if(c===null)return"";if(xe.isDate(c))return c.toISOString();if(xe.isBoolean(c))return c.toString();if(!p&&xe.isBlob(c))throw new at("Blob is not supported. Use a Buffer instead.");return xe.isArrayBuffer(c)||xe.isTypedArray(c)?p&&typeof Blob=="function"?new Blob([c]):Buffer.from(c):c}function a(c,m,w){let x=c;if(xe.isReactNative(t)&&xe.isReactNativeBlob(c))return t.append(Bu(w,m,h),i(c)),!1;if(c&&!w&&typeof c=="object"){if(xe.endsWith(m,"{}"))m=r?m:m.slice(0,-2),c=JSON.stringify(c);else if(xe.isArray(c)&&gA(c)||(xe.isFileList(c)||xe.endsWith(m,"[]"))&&(x=xe.toArray(c)))return m=Lg(m),x.forEach(function(R,S){!(xe.isUndefined(R)||R===null)&&t.append(f===!0?Bu([m],S,h):f===null?m:m+"[]",i(R))}),!1}return zu(c)?!0:(t.append(Bu(w,m,h),i(c)),!1)}const u=[],g=Object.assign(mA,{defaultVisitor:a,convertValue:i,isVisitable:zu});function s(c,m,w=0){if(!xe.isUndefined(c)){if(w>o)throw new at("Object is too deeply nested ("+w+" levels). Max depth: "+o,at.ERR_FORM_DATA_DEPTH_EXCEEDED);if(u.indexOf(c)!==-1)throw Error("Circular reference detected in "+m.join("."));u.push(c),xe.forEach(c,function(x,R){(!(xe.isUndefined(x)||x===null)&&d.call(t,x,xe.isString(R)?R.trim():R,m,g))===!0&&s(x,m?m.concat(R):[R],w+1)}),u.pop()}}if(!xe.isObject(n))throw new TypeError("data must be an object");return s(n),t}function Mg(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(e){return t[e]})}function ju(n,t){this._pairs=[],n&&ql(n,this,t)}const Og=ju.prototype;Og.append=function(n,t){this._pairs.push([n,t])},Og.toString=function(n){const t=n?function(e){return n.call(this,e,Mg)}:Mg;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function vA(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ng(n,t,e){if(!t)return n;const r=e&&e.encode||vA,d=xe.isFunction(e)?{serialize:e}:e,h=d&&d.serialize;let f;if(h?f=h(t,d):f=xe.isURLSearchParams(t)?t.toString():new ju(t,d).toString(r),f){const v=n.indexOf("#");v!==-1&&(n=n.slice(0,v)),n+=(n.indexOf("?")===-1?"?":"&")+f}return n}let Dg=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){xe.forEach(this.handlers,function(e){e!==null&&t(e)})}};const Wu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},yA=typeof URLSearchParams<"u"?URLSearchParams:ju,bA=typeof FormData<"u"?FormData:null,wA=typeof Blob<"u"?Blob:null,xA={isBrowser:!0,classes:{URLSearchParams:yA,FormData:bA,Blob:wA},protocols:["http","https","file","blob","url","data"]},Hu=typeof window<"u"&&typeof document<"u",Uu=typeof navigator=="object"&&navigator||void 0,CA=Hu&&(!Uu||["ReactNative","NativeScript","NS"].indexOf(Uu.product)<0),AA=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_A=Hu&&window.location.href||"http://localhost",kA=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Hu,hasStandardBrowserEnv:CA,hasStandardBrowserWebWorkerEnv:AA,navigator:Uu,origin:_A},Symbol.toStringTag,{value:"Module"})),Mr={...kA,...xA};function SA(n,t){return ql(n,new Mr.classes.URLSearchParams,{visitor:function(e,r,d,h){return Mr.isNode&&xe.isBuffer(e)?(this.append(r,e.toString("base64")),!1):h.defaultVisitor.apply(this,arguments)},...t})}function $A(n){return xe.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function EA(n){const t={},e=Object.keys(n);let r;const d=e.length;let h;for(r=0;r<d;r++)h=e[r],t[h]=n[h];return t}function Pg(n){function t(e,r,d,h){let f=e[h++];if(f==="__proto__")return!0;const v=Number.isFinite(+f),o=h>=e.length;return f=!f&&xe.isArray(d)?d.length:f,o?(xe.hasOwnProp(d,f)?d[f]=xe.isArray(d[f])?d[f].concat(r):[d[f],r]:d[f]=r,!v):((!xe.hasOwnProp(d,f)||!xe.isObject(d[f]))&&(d[f]=[]),t(e,r,d[f],h)&&xe.isArray(d[f])&&(d[f]=EA(d[f])),!v)}if(xe.isFormData(n)&&xe.isFunction(n.entries)){const e={};return xe.forEachEntry(n,(r,d)=>{t($A(r),d,e,0)}),e}return null}const ia=(n,t)=>n!=null&&xe.hasOwnProp(n,t)?n[t]:void 0;function RA(n,t,e){if(xe.isString(n))try{return(t||JSON.parse)(n),xe.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const Xa={transitional:Wu,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,d=xe.isObject(n);if(d&&xe.isHTMLForm(n)&&(n=new FormData(n)),xe.isFormData(n))return r?JSON.stringify(Pg(n)):n;if(xe.isArrayBuffer(n)||xe.isBuffer(n)||xe.isStream(n)||xe.isFile(n)||xe.isBlob(n)||xe.isReadableStream(n))return n;if(xe.isArrayBufferView(n))return n.buffer;if(xe.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let h;if(d){const f=ia(this,"formSerializer");if(e.indexOf("application/x-www-form-urlencoded")>-1)return SA(n,f).toString();if((h=xe.isFileList(n))||e.indexOf("multipart/form-data")>-1){const v=ia(this,"env"),o=v&&v.FormData;return ql(h?{"files[]":n}:n,o&&new o,f)}}return d||r?(t.setContentType("application/json",!1),RA(n)):n}],transformResponse:[function(n){const t=ia(this,"transitional")||Xa.transitional,e=t&&t.forcedJSONParsing,r=ia(this,"responseType"),d=r==="json";if(xe.isResponse(n)||xe.isReadableStream(n))return n;if(n&&xe.isString(n)&&(e&&!r||d)){const h=!(t&&t.silentJSONParsing)&&d;try{return JSON.parse(n,ia(this,"parseReviver"))}catch(f){if(h)throw f.name==="SyntaxError"?at.from(f,at.ERR_BAD_RESPONSE,this,null,ia(this,"response")):f}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mr.classes.FormData,Blob:Mr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};xe.forEach(["delete","get","head","post","put","patch","query"],n=>{Xa.headers[n]={}});function Vu(n,t){const e=this||Xa,r=t||e,d=qr.from(r.headers);let h=r.data;return xe.forEach(n,function(f){h=f.call(e,h,d.normalize(),t?t.status:void 0)}),d.normalize(),h}function Fg(n){return!!(n&&n.__CANCEL__)}let Ja=class extends at{constructor(t,e,r){super(t??"canceled",at.ERR_CANCELED,e,r),this.name="CanceledError",this.__CANCEL__=!0}};function zg(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new at("Request failed with status code "+e.status,e.status>=400&&e.status<500?at.ERR_BAD_REQUEST:at.ERR_BAD_RESPONSE,e.config,e.request,e))}function TA(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function IA(n,t){n=n||10;const e=new Array(n),r=new Array(n);let d=0,h=0,f;return t=t!==void 0?t:1e3,function(v){const o=Date.now(),p=r[h];f||(f=o),e[d]=v,r[d]=o;let i=h,a=0;for(;i!==d;)a+=e[i++],i=i%n;if(d=(d+1)%n,d===h&&(h=(h+1)%n),o-f<t)return;const u=p&&o-p;return u?Math.round(a*1e3/u):void 0}}function LA(n,t){let e=0,r=1e3/t,d,h;const f=(v,o=Date.now())=>{e=o,d=null,h&&(clearTimeout(h),h=null),n(...v)};return[(...v)=>{const o=Date.now(),p=o-e;p>=r?f(v,o):(d=v,h||(h=setTimeout(()=>{h=null,f(d)},r-p)))},()=>d&&f(d)]}const Kl=(n,t,e=3)=>{let r=0;const d=IA(50,250);return LA(h=>{if(!h||typeof h.loaded!="number")return;const f=h.loaded,v=h.lengthComputable?h.total:void 0,o=v!=null?Math.min(f,v):f,p=Math.max(0,o-r),i=d(p);r=Math.max(r,o);const a={loaded:o,total:v,progress:v?o/v:void 0,bytes:p,rate:i||void 0,estimated:i&&v?(v-o)/i:void 0,event:h,lengthComputable:v!=null,[t?"download":"upload"]:!0};n(a)},e)},Bg=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},jg=n=>(...t)=>xe.asap(()=>n(...t)),MA=Mr.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,Mr.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(Mr.origin),Mr.navigator&&/(msie|trident)/i.test(Mr.navigator.userAgent)):()=>!0,OA=Mr.hasStandardBrowserEnv?{write(n,t,e,r,d,h,f){if(typeof document>"u")return;const v=[`${n}=${encodeURIComponent(t)}`];xe.isNumber(e)&&v.push(`expires=${new Date(e).toUTCString()}`),xe.isString(r)&&v.push(`path=${r}`),xe.isString(d)&&v.push(`domain=${d}`),h===!0&&v.push("secure"),xe.isString(f)&&v.push(`SameSite=${f}`),document.cookie=v.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let e=0;e<t.length;e++){const r=t[e].replace(/^\s+/,""),d=r.indexOf("=");if(d!==-1&&r.slice(0,d)===n)return decodeURIComponent(r.slice(d+1))}return null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function NA(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function DA(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function Wg(n,t,e){let r=!NA(t);return n&&(r||e===!1)?DA(n,t):t}const Hg=n=>n instanceof qr?{...n}:n;function bs(n,t){t=t||{};const e=Object.create(null);Object.defineProperty(e,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,i,a,u){return xe.isPlainObject(p)&&xe.isPlainObject(i)?xe.merge.call({caseless:u},p,i):xe.isPlainObject(i)?xe.merge({},i):xe.isArray(i)?i.slice():i}function d(p,i,a,u){if(xe.isUndefined(i)){if(!xe.isUndefined(p))return r(void 0,p,a,u)}else return r(p,i,a,u)}function h(p,i){if(!xe.isUndefined(i))return r(void 0,i)}function f(p,i){if(xe.isUndefined(i)){if(!xe.isUndefined(p))return r(void 0,p)}else return r(void 0,i)}function v(p,i,a){if(xe.hasOwnProp(t,a))return r(p,i);if(xe.hasOwnProp(n,a))return r(void 0,p)}const o={url:h,method:h,data:h,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,withXSRFToken:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,allowedSocketPaths:f,responseEncoding:f,validateStatus:v,headers:(p,i,a)=>d(Hg(p),Hg(i),a,!0)};return xe.forEach(Object.keys({...n,...t}),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const i=xe.hasOwnProp(o,p)?o[p]:d,a=xe.hasOwnProp(n,p)?n[p]:void 0,u=xe.hasOwnProp(t,p)?t[p]:void 0,g=i(a,u,p);xe.isUndefined(g)&&i!==v||(e[p]=g)}),e}const PA=["content-type","content-length"];function FA(n,t,e){if(e!=="content-only"){n.set(t);return}Object.entries(t).forEach(([r,d])=>{PA.includes(r.toLowerCase())&&n.set(r,d)})}const zA=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,e)=>String.fromCharCode(parseInt(e,16))),Ug=n=>{const t=bs({},n),e=u=>xe.hasOwnProp(t,u)?t[u]:void 0,r=e("data");let d=e("withXSRFToken");const h=e("xsrfHeaderName"),f=e("xsrfCookieName");let v=e("headers");const o=e("auth"),p=e("baseURL"),i=e("allowAbsoluteUrls"),a=e("url");if(t.headers=v=qr.from(v),t.url=Ng(Wg(p,a,i),n.params,n.paramsSerializer),o&&v.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?zA(o.password):""))),xe.isFormData(r)&&(Mr.hasStandardBrowserEnv||Mr.hasStandardBrowserWebWorkerEnv?v.setContentType(void 0):xe.isFunction(r.getHeaders)&&FA(v,r.getHeaders(),e("formDataHeaderPolicy"))),Mr.hasStandardBrowserEnv&&(xe.isFunction(d)&&(d=d(t)),d===!0||d==null&&MA(t.url))){const u=h&&f&&OA.read(f);u&&v.set(h,u)}return t},BA=typeof XMLHttpRequest<"u",jA=BA&&function(n){return new Promise(function(t,e){const r=Ug(n);let d=r.data;const h=qr.from(r.headers).normalize();let{responseType:f,onUploadProgress:v,onDownloadProgress:o}=r,p,i,a,u,g;function s(){u&&u(),g&&g(),r.cancelToken&&r.cancelToken.unsubscribe(p),r.signal&&r.signal.removeEventListener("abort",p)}let c=new XMLHttpRequest;c.open(r.method.toUpperCase(),r.url,!0),c.timeout=r.timeout;function m(){if(!c)return;const x=qr.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),R={data:!f||f==="text"||f==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:x,config:n,request:c};zg(function(S){t(S),s()},function(S){e(S),s()},R),c=null}"onloadend"in c?c.onloadend=m:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.startsWith("file:"))||setTimeout(m)},c.onabort=function(){c&&(e(new at("Request aborted",at.ECONNABORTED,n,c)),s(),c=null)},c.onerror=function(x){const R=x&&x.message?x.message:"Network Error",S=new at(R,at.ERR_NETWORK,n,c);S.event=x||null,e(S),s(),c=null},c.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const R=r.transitional||Wu;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),e(new at(x,R.clarifyTimeoutError?at.ETIMEDOUT:at.ECONNABORTED,n,c)),s(),c=null},d===void 0&&h.setContentType(null),"setRequestHeader"in c&&xe.forEach(Tg(h),function(x,R){c.setRequestHeader(R,x)}),xe.isUndefined(r.withCredentials)||(c.withCredentials=!!r.withCredentials),f&&f!=="json"&&(c.responseType=r.responseType),o&&([a,g]=Kl(o,!0),c.addEventListener("progress",a)),v&&c.upload&&([i,u]=Kl(v),c.upload.addEventListener("progress",i),c.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(p=x=>{c&&(e(!x||x.type?new Ja(null,n,c):x),c.abort(),s(),c=null)},r.cancelToken&&r.cancelToken.subscribe(p),r.signal&&(r.signal.aborted?p():r.signal.addEventListener("abort",p)));const w=TA(r.url);if(w&&!Mr.protocols.includes(w)){e(new at("Unsupported protocol "+w+":",at.ERR_BAD_REQUEST,n));return}c.send(d||null)})},WA=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;const e=new AbortController;let r=!1;const d=function(o){if(!r){r=!0,f();const p=o instanceof Error?o:this.reason;e.abort(p instanceof at?p:new Ja(p instanceof Error?p.message:p))}};let h=t&&setTimeout(()=>{h=null,d(new at(`timeout of ${t}ms exceeded`,at.ETIMEDOUT))},t);const f=()=>{n&&(h&&clearTimeout(h),h=null,n.forEach(o=>{o.unsubscribe?o.unsubscribe(d):o.removeEventListener("abort",d)}),n=null)};n.forEach(o=>o.addEventListener("abort",d));const{signal:v}=e;return v.unsubscribe=()=>xe.asap(f),v},HA=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let r=0,d;for(;r<e;)d=r+t,yield n.slice(r,d),r=d},UA=async function*(n,t){for await(const e of VA(n))yield*HA(e,t)},VA=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},Vg=(n,t,e,r)=>{const d=UA(n,t);let h=0,f,v=o=>{f||(f=!0,r&&r(o))};return new ReadableStream({async pull(o){try{const{done:p,value:i}=await d.next();if(p){v(),o.close();return}let a=i.byteLength;if(e){let u=h+=a;e(u)}o.enqueue(new Uint8Array(i))}catch(p){throw v(p),p}},cancel(o){return v(o),d.return()}},{highWaterMark:2})};function GA(n){if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;const t=n.indexOf(",");if(t<0)return 0;const e=n.slice(5,t),r=n.slice(t+1);if(/;base64/i.test(e)){let h=r.length;const f=r.length;for(let a=0;a<f;a++)if(r.charCodeAt(a)===37&&a+2<f){const u=r.charCodeAt(a+1),g=r.charCodeAt(a+2);(u>=48&&u<=57||u>=65&&u<=70||u>=97&&u<=102)&&(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102)&&(h-=2,a+=2)}let v=0,o=f-1;const p=a=>a>=2&&r.charCodeAt(a-2)===37&&r.charCodeAt(a-1)===51&&(r.charCodeAt(a)===68||r.charCodeAt(a)===100);o>=0&&(r.charCodeAt(o)===61?(v++,o--):p(o)&&(v++,o-=3)),v===1&&o>=0&&(r.charCodeAt(o)===61||p(o))&&v++;const i=Math.floor(h/4)*3-(v||0);return i>0?i:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let d=0;for(let h=0,f=r.length;h<f;h++){const v=r.charCodeAt(h);if(v<128)d+=1;else if(v<2048)d+=2;else if(v>=55296&&v<=56319&&h+1<f){const o=r.charCodeAt(h+1);o>=56320&&o<=57343?(d+=4,h++):d+=3}else d+=3}return d}const Gu="1.16.1",Gg=64*1024,{isFunction:Yl}=xe,qg=(n,...t)=>{try{return!!n(...t)}catch{return!1}},qA=n=>{const t=xe.global!==void 0&&xe.global!==null?xe.global:globalThis,{ReadableStream:e,TextEncoder:r}=t;n=xe.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:d,Request:h,Response:f}=n,v=d?Yl(d):typeof fetch=="function",o=Yl(h),p=Yl(f);if(!v)return!1;const i=v&&Yl(e),a=v&&(typeof r=="function"?(w=>x=>w.encode(x))(new r):async w=>new Uint8Array(await new h(w).arrayBuffer())),u=o&&i&&qg(()=>{let w=!1;const x=new h(Mr.origin,{body:new e,method:"POST",get duplex(){return w=!0,"half"}}),R=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),w&&!R}),g=p&&i&&qg(()=>xe.isReadableStream(new f("").body)),s={stream:g&&(w=>w.body)};v&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!s[w]&&(s[w]=(x,R)=>{let S=x&&x[w];if(S)return S.call(x);throw new at(`Response type '${w}' is not supported`,at.ERR_NOT_SUPPORT,R)})});const c=async w=>{if(w==null)return 0;if(xe.isBlob(w))return w.size;if(xe.isSpecCompliantForm(w))return(await new h(Mr.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(xe.isArrayBufferView(w)||xe.isArrayBuffer(w))return w.byteLength;if(xe.isURLSearchParams(w)&&(w=w+""),xe.isString(w))return(await a(w)).byteLength},m=async(w,x)=>xe.toFiniteNumber(w.getContentLength())??c(x);return async w=>{let{url:x,method:R,data:S,signal:A,cancelToken:C,timeout:O,onDownloadProgress:N,onUploadProgress:M,responseType:L,headers:j,withCredentials:F="same-origin",fetchOptions:D,maxContentLength:$,maxBodyLength:_}=Ug(w);const I=xe.isNumber($)&&$>-1,z=xe.isNumber(_)&&_>-1;let U=d||fetch;L=L?(L+"").toLowerCase():"text";let V=WA([A,C&&C.toAbortSignal()],O),K=null;const Z=V&&V.unsubscribe&&(()=>{V.unsubscribe()});let oe;try{if(I&&typeof x=="string"&&x.startsWith("data:")&&GA(x)>$)throw new at("maxContentLength size of "+$+" exceeded",at.ERR_BAD_RESPONSE,w,K);if(z&&R!=="get"&&R!=="head"){const pe=await m(j,S);if(typeof pe=="number"&&isFinite(pe)&&pe>_)throw new at("Request body larger than maxBodyLength limit",at.ERR_BAD_REQUEST,w,K)}if(M&&u&&R!=="get"&&R!=="head"&&(oe=await m(j,S))!==0){let pe=new h(x,{method:"POST",body:S,duplex:"half"}),$e;if(xe.isFormData(S)&&($e=pe.headers.get("content-type"))&&j.setContentType($e),pe.body){const[Re,Ge]=Bg(oe,Kl(jg(M)));S=Vg(pe.body,Gg,Re,Ge)}}xe.isString(F)||(F=F?"include":"omit");const ee=o&&"credentials"in h.prototype;if(xe.isFormData(S)){const pe=j.getContentType();pe&&/^multipart\/form-data/i.test(pe)&&!/boundary=/i.test(pe)&&j.delete("content-type")}j.set("User-Agent","axios/"+Gu,!1);const re={...D,signal:V,method:R.toUpperCase(),headers:Tg(j.normalize()),body:S,duplex:"half",credentials:ee?F:void 0};K=o&&new h(x,re);let ce=await(o?U(K,D):U(x,re));if(I){const pe=xe.toFiniteNumber(ce.headers.get("content-length"));if(pe!=null&&pe>$)throw new at("maxContentLength size of "+$+" exceeded",at.ERR_BAD_RESPONSE,w,K)}const ie=g&&(L==="stream"||L==="response");if(g&&ce.body&&(N||I||ie&&Z)){const pe={};["status","statusText","headers"].forEach(ot=>{pe[ot]=ce[ot]});const $e=xe.toFiniteNumber(ce.headers.get("content-length")),[Re,Ge]=N&&Bg($e,Kl(jg(N),!0))||[];let qe=0;const ct=ot=>{if(I&&(qe=ot,qe>$))throw new at("maxContentLength size of "+$+" exceeded",at.ERR_BAD_RESPONSE,w,K);Re&&Re(ot)};ce=new f(Vg(ce.body,Gg,ct,()=>{Ge&&Ge(),Z&&Z()}),pe)}L=L||"text";let fe=await s[xe.findKey(s,L)||"text"](ce,w);if(I&&!g&&!ie){let pe;if(fe!=null&&(typeof fe.byteLength=="number"?pe=fe.byteLength:typeof fe.size=="number"?pe=fe.size:typeof fe=="string"&&(pe=typeof r=="function"?new r().encode(fe).byteLength:fe.length)),typeof pe=="number"&&pe>$)throw new at("maxContentLength size of "+$+" exceeded",at.ERR_BAD_RESPONSE,w,K)}return!ie&&Z&&Z(),await new Promise((pe,$e)=>{zg(pe,$e,{data:fe,headers:qr.from(ce.headers),status:ce.status,statusText:ce.statusText,config:w,request:K})})}catch(ee){if(Z&&Z(),V&&V.aborted&&V.reason instanceof at){const re=V.reason;throw re.config=w,K&&(re.request=K),ee!==re&&(re.cause=ee),re}throw ee&&ee.name==="TypeError"&&/Load failed|fetch/i.test(ee.message)?Object.assign(new at("Network Error",at.ERR_NETWORK,w,K,ee&&ee.response),{cause:ee.cause||ee}):at.from(ee,ee&&ee.code,w,K,ee&&ee.response)}}},KA=new Map,Kg=n=>{let t=n&&n.env||{};const{fetch:e,Request:r,Response:d}=t,h=[r,d,e];let f=h.length,v=f,o,p,i=KA;for(;v--;)o=h[v],p=i.get(o),p===void 0&&i.set(o,p=v?new Map:qA(t)),i=p;return p};Kg();const qu={http:pA,xhr:jA,fetch:{get:Kg}};xe.forEach(qu,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const Yg=n=>`- ${n}`,YA=n=>xe.isFunction(n)||n===null||n===!1;function XA(n,t){n=xe.isArray(n)?n:[n];const{length:e}=n;let r,d;const h={};for(let f=0;f<e;f++){r=n[f];let v;if(d=r,!YA(r)&&(d=qu[(v=String(r)).toLowerCase()],d===void 0))throw new at(`Unknown adapter '${v}'`);if(d&&(xe.isFunction(d)||(d=d.get(t))))break;h[v||"#"+f]=d}if(!d){const f=Object.entries(h).map(([o,p])=>`adapter ${o} `+(p===!1?"is not supported by the environment":"is not available in the build"));let v=e?f.length>1?`since :
|
|
4
|
+
`+f.map(Yg).join(`
|
|
5
|
+
`):" "+Yg(f[0]):"as no adapter specified";throw new at("There is no suitable adapter to dispatch the request "+v,"ERR_NOT_SUPPORT")}return d}const Xg={getAdapter:XA,adapters:qu};function Ku(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Ja(null,n)}function Jg(n){return Ku(n),n.headers=qr.from(n.headers),n.data=Vu.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Xg.getAdapter(n.adapter||Xa.adapter,n)(n).then(function(t){Ku(n),n.response=t;try{t.data=Vu.call(n,n.transformResponse,t)}finally{delete n.response}return t.headers=qr.from(t.headers),t},function(t){if(!Fg(t)&&(Ku(n),t&&t.response)){n.response=t.response;try{t.response.data=Vu.call(n,n.transformResponse,t.response)}finally{delete n.response}t.response.headers=qr.from(t.response.headers)}return Promise.reject(t)})}const Xl={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Xl[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const Zg={};Xl.transitional=function(n,t,e){function r(d,h){return"[Axios v"+Gu+"] Transitional option '"+d+"'"+h+(e?". "+e:"")}return(d,h,f)=>{if(n===!1)throw new at(r(h," has been removed"+(t?" in "+t:"")),at.ERR_DEPRECATED);return t&&!Zg[h]&&(Zg[h]=!0,console.warn(r(h," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(d,h,f):!0}},Xl.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function JA(n,t,e){if(typeof n!="object")throw new at("options must be an object",at.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let d=r.length;for(;d-- >0;){const h=r[d],f=Object.prototype.hasOwnProperty.call(t,h)?t[h]:void 0;if(f){const v=n[h],o=v===void 0||f(v,h,n);if(o!==!0)throw new at("option "+h+" must be "+o,at.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new at("Unknown option "+h,at.ERR_BAD_OPTION)}}const Jl={assertOptions:JA,validators:Xl},Oi=Jl.validators;let ws=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Dg,response:new Dg}}async request(t,e){try{return await this._request(t,e)}catch(r){if(r instanceof Error){let d={};Error.captureStackTrace?Error.captureStackTrace(d):d=new Error;const h=(()=>{if(!d.stack)return"";const f=d.stack.indexOf(`
|
|
6
|
+
`);return f===-1?"":d.stack.slice(f+1)})();try{if(!r.stack)r.stack=h;else if(h){const f=h.indexOf(`
|
|
7
|
+
`),v=f===-1?-1:h.indexOf(`
|
|
8
|
+
`,f+1),o=v===-1?"":h.slice(v+1);String(r.stack).endsWith(o)||(r.stack+=`
|
|
9
|
+
`+h)}}catch{}}throw r}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=bs(this.defaults,e);const{transitional:r,paramsSerializer:d,headers:h}=e;r!==void 0&&Jl.assertOptions(r,{silentJSONParsing:Oi.transitional(Oi.boolean),forcedJSONParsing:Oi.transitional(Oi.boolean),clarifyTimeoutError:Oi.transitional(Oi.boolean),legacyInterceptorReqResOrdering:Oi.transitional(Oi.boolean)},!1),d!=null&&(xe.isFunction(d)?e.paramsSerializer={serialize:d}:Jl.assertOptions(d,{encode:Oi.function,serialize:Oi.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Jl.assertOptions(e,{baseUrl:Oi.spelling("baseURL"),withXsrfToken:Oi.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let f=h&&xe.merge(h.common,h[e.method]);h&&xe.forEach(["delete","get","head","post","put","patch","query","common"],s=>{delete h[s]}),e.headers=qr.concat(f,h);const v=[];let o=!0;this.interceptors.request.forEach(function(s){if(typeof s.runWhen=="function"&&s.runWhen(e)===!1)return;o=o&&s.synchronous;const c=e.transitional||Wu;c&&c.legacyInterceptorReqResOrdering?v.unshift(s.fulfilled,s.rejected):v.push(s.fulfilled,s.rejected)});const p=[];this.interceptors.response.forEach(function(s){p.push(s.fulfilled,s.rejected)});let i,a=0,u;if(!o){const s=[Jg.bind(this),void 0];for(s.unshift(...v),s.push(...p),u=s.length,i=Promise.resolve(e);a<u;)i=i.then(s[a++],s[a++]);return i}u=v.length;let g=e;for(;a<u;){const s=v[a++],c=v[a++];try{g=s(g)}catch(m){c.call(this,m);break}}try{i=Jg.call(this,g)}catch(s){return Promise.reject(s)}for(a=0,u=p.length;a<u;)i=i.then(p[a++],p[a++]);return i}getUri(t){t=bs(this.defaults,t);const e=Wg(t.baseURL,t.url,t.allowAbsoluteUrls);return Ng(e,t.params,t.paramsSerializer)}};xe.forEach(["delete","get","head","options"],function(n){ws.prototype[n]=function(t,e){return this.request(bs(e||{},{method:n,url:t,data:(e||{}).data}))}}),xe.forEach(["post","put","patch","query"],function(n){function t(e){return function(r,d,h){return this.request(bs(h||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:d}))}}ws.prototype[n]=t(),n!=="query"&&(ws.prototype[n+"Form"]=t(!0))});let ZA=class Gx{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(d){e=d});const r=this;this.promise.then(d=>{if(!r._listeners)return;let h=r._listeners.length;for(;h-- >0;)r._listeners[h](d);r._listeners=null}),this.promise.then=d=>{let h;const f=new Promise(v=>{r.subscribe(v),h=v}).then(d);return f.cancel=function(){r.unsubscribe(h)},f},t(function(d,h,f){r.reason||(r.reason=new Ja(d,h,f),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=r=>{t.abort(r)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new Gx(function(e){t=e}),cancel:t}}};function QA(n){return function(t){return n.apply(null,t)}}function e_(n){return xe.isObject(n)&&n.isAxiosError===!0}const Yu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Yu).forEach(([n,t])=>{Yu[t]=n});function Qg(n){const t=new ws(n),e=wg(ws.prototype.request,t);return xe.extend(e,ws.prototype,t,{allOwnKeys:!0}),xe.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Qg(bs(n,r))},e}const Zn=Qg(Xa);Zn.Axios=ws,Zn.CanceledError=Ja,Zn.CancelToken=ZA,Zn.isCancel=Fg,Zn.VERSION=Gu,Zn.toFormData=ql,Zn.AxiosError=at,Zn.Cancel=Zn.CanceledError,Zn.all=function(n){return Promise.all(n)},Zn.spread=QA,Zn.isAxiosError=e_,Zn.mergeConfig=bs,Zn.AxiosHeaders=qr,Zn.formToJSON=n=>Pg(xe.isHTMLForm(n)?new FormData(n):n),Zn.getAdapter=Xg.getAdapter,Zn.HttpStatusCode=Yu,Zn.default=Zn;const{Axios:Vz,AxiosError:Gz,CanceledError:qz,isCancel:Kz,CancelToken:Yz,VERSION:Xz,all:Jz,Cancel:Zz,isAxiosError:Qz,spread:eB,toFormData:tB,AxiosHeaders:nB,HttpStatusCode:rB,formToJSON:iB,getAdapter:oB,mergeConfig:sB,create:aB}=Zn,Xu=Zn.create({baseURL:location.origin,timeout:6e4,params:{}});Xu.interceptors.response.use(n=>n,n=>{if(n.response){if(n.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(r){r&&OpenC3Auth.setTokens()}),n.response.config.headers["Ignore-Errors"]&&n.response.config.headers["Ignore-Errors"].includes(n.response.status.toString()))return Promise.reject(n);let t=`HTTP ${n.response.status} - `;n.response?.statusText&&(t+=`${n.response.statusText} `),n.response?.config?.data&&(t+=`${n.response.config.data} `),n.response?.data?.message?t+=`${n.response.data.message}`:n.response?.data?.exception?t+=`${n.response.data.exception}`:n.response?.data?.error?.message?(n.response.data.error.class&&(t+=`${n.response.data.error.class} `),t+=`${n.response.data.error.message}`):t+=`${n.response?.data}`;const{$cosmosNotify:e}=window;throw e&&e.serious({title:"Network error",body:t}),n}else throw n});const Zl=async function(n,t,{data:e,params:r={},headers:d,noAuth:h=!1,noScope:f=!1,onUploadProgress:v=!1}={}){if(!h){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}d.Authorization=localStorage.openc3Token}return d.manual=!0,!f&&!r.scope&&(r.scope=window.openc3Scope),Xu({method:n,url:t,data:e,params:r,headers:d,onUploadProgress:v})},Ju={Accept:"application/json"},em={...Ju,"Content-Type":"application/json"},tm=Mn("u",{get:function(n,{params:t,headers:e=Ju,noScope:r,noAuth:d,onUploadProgress:h}={}){return Zl("get",n,{params:t,headers:e,noScope:r,noAuth:d,onUploadProgress:h})},put:function(n,{data:t,params:e,headers:r=em,noScope:d,noAuth:h,onUploadProgress:f}={}){return Zl("put",n,{data:t,params:e,headers:r,noScope:d,noAuth:h,onUploadProgress:f})},post:function(n,{data:t,params:e,headers:r=em,noScope:d,noAuth:h,onUploadProgress:f}={}){return Zl("post",n,{data:t,params:e,headers:r,noScope:d,noAuth:h,onUploadProgress:f})},delete:function(n,{params:t,headers:e=Ju,noScope:r,noAuth:d,onUploadProgress:h}={}){return Zl("delete",n,{params:t,headers:e,noScope:r,noAuth:d,onUploadProgress:h})}});let Ql=()=>({emit(n,...t){for(let e=this.events[n]||[],r=0,d=e.length;r<d;r++)e[r](...t)},events:{},on(n,t){return(this.events[n]||=[]).push(t),()=>{this.events[n]=this.events[n]?.filter(e=>t!==e)}}}),Za=class extends Error{constructor(t,e){t instanceof Error?(super(t.message),this.cause=t):super(t),this.reason=e,this.name="ReasonError"}},Zu=class extends Za{constructor(t){super("Rejected",t),this.name="SubscriptionRejectedError"}};class t_ extends Za{constructor(t){super(t||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}let Zi=class extends Za{constructor(t,e){e?super(t,e):super("Disconnected",t),this.name="DisconnectedError"}};class n_ extends Zi{constructor(t){super(t,"stale_connection"),this.name="StaleConnectionError"}}function nm(n){return n?`{${Object.keys(n).sort().filter(t=>n[t]!==void 0).map(t=>{let e=JSON.stringify(n[t]);return`${JSON.stringify(t)}:${e}`}).join(",")}}`:""}let r_=class{constructor(t){this.channel=t,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",t=>{if(t.type==="info"){this._state||(this._state=this.stateFromInfo(t));return}this._state&&(t.type==="join"?this._state[t.id]=t.info:t.type==="leave"&&delete this._state[t.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(t=>t()),this.listeners.length=0}async join(t,e){if(!this._info)return this._info={id:String(t),info:e},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let t=await this.channel.perform("$presence:leave");return delete this._info,t}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let t=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(t),this._state}finally{delete this._promise}}stateFromInfo(t){return t.records.reduce((e,{id:r,info:d})=>(e[r]=d,e),{})}};const xs=Symbol("state");let rm=class{constructor(t={}){this.emitter=Ql(),this.params=Object.freeze(t),this.presence=new r_(this),this.initialConnect=!0,this[xs]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=nm({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[xs]}attached(t){if(this.receiver){if(this.receiver!==t)throw Error("Already connected to a different receiver");return!1}return this.receiver=t,!0}connecting(){this[xs]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[xs]="connected";let t=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(){if(this.state==="connected")throw Error("Already connected");this[xs]="connected";let t=!0,e=!0;this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:t})}disconnected(t){this.state==="disconnected"||this.state==="closed"||(this[xs]="disconnected",this.presence.reset(),this.emit("disconnect",t))}closed(t){this.state!=="closed"&&(this[xs]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",t))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(t,e){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,t,e)}async send(t){return this.perform(void 0,t)}async whisper(t){try{await this.perform("$whisper",t)}catch(e){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",e)}}receive(t,e){this.emit("message",t,e)}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...d)=>{r(),e(...d)});return r}emit(t,...e){return this.emitter.emit(t,...e)}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((t,e)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(d=>d()),t()})),r.push(this.on("close",d=>{r.forEach(h=>h()),e(d||new Za("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}},i_=class{constructor(t){this.id=t,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(t){this.channels.includes(t)||this.channels.push(t)}remove(t){let e=this.channels.indexOf(t);e>-1&&this.channels.splice(e,1)}notify(t,...e){this.state=t==="restored"?"connected":t,e.length===1?this.channels.forEach(r=>r[t](e[0])):this.channels.forEach(r=>r[t]())}pending(t){this._checkIntent(t);let e=this._pendings[0];return!e||e.intent!==t?Promise.resolve():e.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(t){this._checkIntent(t);let e,r={promise:new Promise(h=>{e=h}),intent:t,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),e(r)},canceled:!1,acquired:!1},d=this._pendingTop;return this._pendings.push(r),d&&await d.promise,this.gvl&&await this.gvl.acquire(r,t),r.acquired=!0,r}close(t){this.disposed=!0,this.intent=void 0,this.notify("closed",t)}_checkIntent(t){if(!(t==="unsubscribed"||t==="subscribed"))throw Error(`Unknown subscription intent: ${t}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(t){let e=this._pendingTop;return!e||e.acquired||e.intent!==t?!1:(this._pendings.pop(),e.canceled=!0,!0)}};class o_{constructor(){this.queue=[]}async acquire(t,e){e==="subscribed"&&(this.queue.push(t.promise.then(()=>{this.queue.splice(this.queue.indexOf(t),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class s_{constructor(t){t.concurrentSubscribes===!1&&(this.glv=new o_),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(t){return this._subscriptions[t]}create(t,{subscribe:e,unsubscribe:r}){let d=this._subscriptions[t]=new i_(t);return d.remoteId=this._localToRemote[t],d.subscriber=e,d.unsubscriber=r,d.gvl=this.glv,d}remove(t){delete this._subscriptions[t],delete this._localToRemote[t]}storeRemoteId(t,e){this._localToRemote[t]=e;let r=this.get(t);r&&(r.remoteId=e)}}class a_{constructor(t={}){this.subscriptions=new s_(t),this._pendingMessages=[],this._remoteToLocal={}}subscribe(t,e){this._remoteToLocal[e]=t,this.subscriptions.storeRemoteId(t,e),this.flush(e)}unsubscribe(t){let e=this.subscriptions.get(t);if(!e)return;let r=e.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(t)}transmit(t,e,r){let d=this._remoteToLocal[t];if(!d){this._pendingMessages.push([t,e,r]);return}let h=this.subscriptions.get(d);h&&h.channels.forEach(f=>{f.receive(e,r)})}notify(t,e,r){let d=this._remoteToLocal[t];if(!d)return;let h=this.subscriptions.get(d);h&&h.channels.forEach(f=>f.emit(e,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(t=>t.channels)}flush(t){let e=[];for(let r of this._pendingMessages)r[0]===t?this.transmit(r[0],r[1],r[2]):e.push(r);this._pendingMessages=e}}const im={debug:0,info:1,warn:2,error:3};let om=class{constructor(t){this.level=t||"warn"}log(t,e,r){im[t]<im[this.level]||this.writeLogEntry(t,e,r)}writeLogEntry(){throw Error("Not implemented")}debug(t,e){this.log("debug",t,e)}info(t,e){this.log("info",t,e)}warn(t,e){this.log("warn",t,e)}error(t,e){this.log("error",t,e)}},Qa=class extends om{writeLogEntry(){}};class l_{encode(t){return JSON.stringify(t)}decode(t){try{return JSON.parse(t)}catch{}}}let c_=0,sm=class{constructor(t={}){let{logger:e}=t;this.logger=e||new Qa,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=t.subscribeCooldownInterval||250,this.subscribeRetryInterval=t.subscribeRetryInterval||5e3}attached(t){this.cable=t}subscribe(t,e){let r={channel:t};e&&Object.assign(r,e);let d=nm(r);if(this.pendingUnsubscriptions[d]){let f=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${f}`,d),new Promise(v=>{setTimeout(()=>{v(this.subscribe(t,e))},f)})}if(this.pendingSubscriptions[d])return this.logger.warn("subscription is already pending, skipping",d),Promise.reject(Error("Already subscribing"));let h=this.subscribeRetryInterval;return new Promise((f,v)=>{let o=++c_;this.pendingSubscriptions[d]={resolve:f,reject:v,id:o},this.cable.send(this.buildSubscribeRequest(d)),this.maybeRetrySubscribe(o,d,h)})}buildSubscribeRequest(t){return{command:"subscribe",identifier:t}}maybeRetrySubscribe(t,e,r){setTimeout(()=>{let d=this.pendingSubscriptions[e];d&&d.id===t&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,e),this.cable.send(this.buildSubscribeRequest(e)),this.maybeExpireSubscribe(t,e,r))},r)}maybeExpireSubscribe(t,e,r){setTimeout(()=>{let d=this.pendingSubscriptions[e];d&&d.id===t&&(delete this.pendingSubscriptions[e],d.reject(new t_(`Haven't received subscription ack in ${r*2}ms for ${e}`)))},r)}unsubscribe(t){return this.cable.send({command:"unsubscribe",identifier:t}),this.pendingUnsubscriptions[t]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[t]},this.subscribeCooldownInterval),Promise.resolve()}perform(t,e,r){return e==="$whisper"?this.whisper(t,r):(r||(r={}),r.action||=e,this.cable.send({command:"message",identifier:t,data:JSON.stringify(r)}),Promise.resolve())}whisper(t,e){return this.cable.send({command:"whisper",identifier:t,data:e}),Promise.resolve()}receive(t){if(typeof t!="object"){this.logger.error("unsupported message format",{message:t});return}let{type:e,identifier:r,message:d,reason:h,reconnect:f}=t;if(e==="ping")return this.cable.keepalive(t.message);if(this.cable.keepalive(),e==="welcome"){let v=t.sid;return v&&this.cable.setSessionId(v),this.cable.connected()}if(e==="disconnect"){let v=new Zi(h);this.reset(v),f===!1?this.cable.closed(v):this.cable.disconnected(v);return}if(e==="confirm_subscription"){let v=this.pendingSubscriptions[r];if(!v){this.logger.error("subscription not found, unsubscribing",{type:e,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],v.resolve(r)}if(e==="reject_subscription"){let v=this.pendingSubscriptions[r];return v?(delete this.pendingSubscriptions[r],v.reject(new Zu)):this.logger.error("subscription not found",{type:e,identifier:r})}if(d)return{identifier:r,message:d};this.logger.warn(`unknown message type: ${e}`,{message:t})}reset(t){for(let e in this.pendingSubscriptions)this.pendingSubscriptions[e].reject(t);this.pendingSubscriptions={}}recoverableClosure(){return!1}};const am=()=>Date.now()/1e3|0;class u_ extends sm{constructor(t={}){super(t),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=t.historyTimestamp,this.disableSessionRecovery=t.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=am()),this.sessionId=void 0,this.sendPongs=t.pongs}reset(t){for(let e in this.pendingPresence)this.pendingPresence[e].reject(t);return this.pendingPresence={},super.reset()}receive(t){if(typeof t!="object"){this.logger.error("unsupported message format",{message:t});return}let{type:e,identifier:r,message:d}=t;if(e==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(t);if(e==="reject_subscription")return super.receive(t);if(e==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(t);if(e==="ping")return this.restoreSince&&(this.restoreSince=am()),this.sendPongs&&this.sendPong(),this.cable.keepalive(t.message);if(this.cable.keepalive(),e==="confirm_history"){this.logger.debug("history result received",t),this.cable.notify("history_received",r);return}if(e==="reject_history"){this.logger.warn("failed to retrieve history",t),this.cable.notify("history_not_found",r);return}if(e==="welcome"){if(this.disableSessionRecovery||(this.sessionId=t.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),t.restored){let h=t.restored_ids||Object.keys(this.subscriptionStreams);for(let f of h)this.cable.send({identifier:f,command:"history",history:this.historyRequestFor(f)}),this.presenceInfo[f]&&this.cable.send({identifier:f,command:"join",presence:this.presenceInfo[f]});return this.cable.restored(h)}return this.cable.connected(this.sessionId)}if(e==="presence"){let h=d.type;if(h==="info"){let f=this.pendingPresence[r];f&&(delete this.pendingPresence[r],f.resolve(d))}else if(h==="error"){let f=this.pendingPresence[r];f&&(delete this.pendingPresence[r],f.reject(new Error("failed to retrieve presence")))}return{type:e,identifier:r,message:d}}if(d){let h=this.trackStreamPosition(r,t.stream_id,t.epoch,t.offset);return{identifier:r,message:d,meta:h}}this.logger.warn(`unknown message type: ${e}`,{message:t})}perform(t,e,r){switch(e){case"$presence:join":return this.join(t,r);case"$presence:leave":return this.leave(t,r);case"$presence:info":return this.presence(t,r)}return super.perform(t,e,r)}unsubscribe(t){return delete this.presenceInfo[t],super.unsubscribe(t)}buildSubscribeRequest(t){let e=super.buildSubscribeRequest(t),r=this.historyRequestFor(t);r&&(e.history=r,this.pendingHistory[t]=!0);let d=this.presenceInfo[t];return d&&(e.presence=d),e}recoverableClosure(){return!!this.sessionId}historyRequestFor(t){let e={},r=!1;if(this.subscriptionStreams[t])for(let d of this.subscriptionStreams[t]){let h=this.streamsPositions[d];h&&(r=!0,e[d]=h)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:e}}trackStreamPosition(t,e,r,d){if(!(!e||!r))return this.subscriptionStreams[t]||(this.subscriptionStreams[t]=new Set),this.subscriptionStreams[t].add(e),this.streamsPositions[e]={epoch:r,offset:d},{stream:e,epoch:r,offset:d}}async sendPong(){await new Promise(t=>setTimeout(t,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(t,e){return this.presenceInfo[t]=e,this.cable.send({command:"join",identifier:t,presence:e}),Promise.resolve()}async leave(t,e){return delete this.presenceInfo[t],this.cable.send({command:"leave",identifier:t,presence:e}),Promise.resolve()}presence(t,e){return this.pendingPresence[t]?(this.logger.warn("presence is already pending, skipping",t),Promise.reject(Error("presence request is already pending"))):new Promise((r,d)=>{this.pendingPresence[t]={resolve:r,reject:d},this.cable.send({command:"presence",identifier:t,data:e})})}}let h_=class extends Za{constructor(){super("No connection","closed"),this.name="NoConnectionError"}},lm=class extends rm{static identifier="__ghost__";constructor(t,e){super(e),this.channelId=t}set channelId(t){this._channelId=t}get channelId(){return this._channelId}};const d_="$pubsub";let cm=class extends rm{static identifier=d_;async perform(t,e){if(t.startsWith("$"))return super.perform(t,e);throw Error("not implemented")}};const Cs=Symbol("state");let f_=class{constructor({transport:n,protocol:t,encoder:e,logger:r,lazy:d,hubOptions:h,performFailures:f,transportConfigurator:v}){this.emitter=Ql(),this.transport=n,this.encoder=e,this.logger=r||new Qa,this.protocol=t,this.performFailures=f||"throw",this.protocol.attached(this),this.hub=new a_(h||{}),this[Cs]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=v,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,d===!1&&this.connect().catch(()=>{})}get state(){return this[Cs]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let n=this.state==="idle";this[Cs]="connecting";let t=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:n}),await this.transport.open()}catch(e){this.handleClose(e)}return t}setSessionId(n){this.sessionId=n,this.transport.setParam("sid",n)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[Cs]="connected",this.recovering&&this.hub.subscriptions.all().forEach(t=>t.notify("disconnected",new Zi("recovery_failed"))),this.hub.subscriptions.all().forEach(t=>this._resubscribe(t));let n=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:n})):this.emit("connect",{reconnect:!0,restored:n})}restored(n){this.logger.info("connection recovered",{remoteIds:n}),this[Cs]="connected",this.hub.subscriptions.all().forEach(r=>{n&&r.remoteId&&n.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new Zi("recovery_failed")),this._resubscribe(r))});let t=!this.initialConnect,e=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:t,restored:e})}notify(n,t,e){t&&typeof t!="string"&&(e=t,t=void 0),t?this.hub.notify(t,"info",{type:n,data:e}):this.emit("info",{type:n,data:e})}handleClose(n){this.logger.debug("transport closed",{error:n}),this.disconnected(new Zi(n,"transport_closed"))}disconnected(n){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:n}),this[Cs]="disconnected",this.recovering=this.protocol.recoverableClosure(n),this.recovering?this.hub.subscriptions.all().forEach(t=>t.notify("connecting")):this.hub.subscriptions.all().forEach(t=>{t.notify("disconnected",n)}),this.protocol.reset(n),this.hub.close(),this.transport.close(),this.emit("disconnect",n))}closed(n){if(this.state==="closed"||this.state==="idle")return;let t;n&&(t=n instanceof Zi?n:new Zi(n,void 0)),this.logger.info("closed",{reason:n||"user"}),this[Cs]="closed";let e=t||new Zi("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",e)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",t)}disconnect(){this.closed()}handleIncoming(n){if(this.state==="closed"||this.state==="idle")return;let t=this.encoder.decode(n);if(t===void 0){this.logger.error("failed to decode message",{message:n});return}this.logger.debug("incoming data",t);let e=this.protocol.receive(t);if(e){this.logger.debug("processed incoming message",e);let{type:r,identifier:d,message:h,meta:f}=e;r?this.hub.notify(d,r,h):this.hub.transmit(d,h,f)}}send(n){if(this.state==="closed")throw Error("Cable is closed");let t=this.encoder.encode(n);if(t===void 0){this.logger.error("failed to encode message",{message:n});return}this.logger.debug("outgoing message",n),this.transport.send(t)}keepalive(n){this.emit("keepalive",n)}streamFrom(n){let t=new cm({stream_name:n});return this.subscribe(t)}streamFromSigned(n){let t=new cm({signed_stream_name:n});return this.subscribe(t)}subscribeTo(n,t){let e,r;return typeof n=="string"&&(r=n,n=lm),e=r?new n(r,t):new n(t),this.subscribe(e)}subscribe(n){if(!n.attached(this))return n;let t=n.identifier;n.connecting();let e=this.hub.subscriptions.get(t)||this.hub.subscriptions.create(t,{subscribe:r=>this._subscribe(r,n.channelId,n.params),unsubscribe:r=>this._unsubscribe(r)});return e.add(n),e.intent==="subscribed"&&e.state==="connected"&&n.connected(),e.ensureSubscribed(),n}async _resubscribe(n){n.intent!=="subscribed"||!n.channels[0]||(n.notify("connecting"),n.ensureResubscribed())}async _subscribe(n,t,e){let r=n.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let d=await n.acquire("subscribed");if(d.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),d.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),n.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),d.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),d.release();return}if(n.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),n.notify("connected"),d.release();return}let h={identifier:t,params:e};this.logger.debug("subscribing",h);try{let f=await this.protocol.subscribe(t,e);this.hub.subscribe(r,f),this.logger.debug("subscribed",{...h,remoteId:f}),n.notify("connected")}catch(f){if(f){if(f instanceof Zu&&this.logger.warn("rejected",h),f instanceof Zi){this.logger.debug("disconnected during subscription; will retry on connect",h),d.release();return}this.logger.error("failed to subscribe",{error:f,...h})}n.close(f),this.hub.unsubscribe(r)}d.release()}unsubscribe(n){let t=n.identifier,e=this.hub.subscriptions.get(t);if(!e)throw Error(`Subscription not found: ${t}`);e.remove(n),n.closed(),e.maybeUnsubscribe()}async _unsubscribe(n){let t=n.id;this.logger.debug("acquiring unsubscribe lock",{identifier:t});let e=await n.acquire("unsubscribed");if(e.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:t}),e.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:t}),n.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:t,intent:n.intent}),e.release();return}if(n.state==="disconnected"||n.state==="closed"){this.logger.debug(`already ${n.state} connected, skip unsubscribe command`,{identifier:t}),e.release();return}let r=n.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:t}),n.close(),this.hub.unsubscribe(t),e.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:t})}catch(d){d&&(d instanceof Zi?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:t,error:d}):this.logger.error("unsubscribe failed",{id:t,error:d}))}n.intent==="unsubscribed"?(n.close(),this.hub.unsubscribe(t)):n.state="closed",e.release()}async perform(n,t,e){if(this.performFailures==="throw")return this._perform(n,t,e);try{return await this._perform(n,t,e)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(n,t,e){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new h_;let r=this.hub.subscriptions.get(n);if(!r)throw Error(`Subscription not found: ${n}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${n}`);let d=r.remoteId,h={id:d,action:t,payload:e};this.logger.debug("perform",h);try{let f=await this.protocol.perform(d,t,e);return f&&this.logger.debug("perform result",{message:f,request:h}),f}catch(f){throw this.logger.error("perform failed",{error:f,request:h}),f}}on(n,t){return this.emitter.on(n,t)}once(n,t){let e=this.emitter.on(n,(...r)=>{e(),t(...r)});return e}emit(n,...t){return this.emitter.emit(n,...t)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((n,t)=>{let e=[()=>delete this._pendingConnect];e.push(this.on("connect",()=>{e.forEach(r=>r()),n()})),e.push(this.on("close",r=>{e.forEach(d=>d()),t(r)})),e.push(this.on("disconnect",r=>{e.forEach(d=>d()),t(r)}))}),this._pendingConnect)}};const p_={maxMissingPings:2,maxReconnectAttempts:1/0},oa=()=>Date.now(),um=(n,t)=>{t=t||{};let{backoffRate:e,jitterRatio:r,maxInterval:d}=t;return e=e||2,r===void 0&&(r=.5),h=>{let f=n*e**h,v=f*e,o=f+(v-f)*Math.random(),p=2*(Math.random()-.5)*r;return o=o*(1+p),d&&d<o&&(o=d),o}};let hm=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},p_,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 Qa,this.state="pending_connect",this.attempts=0,this.disconnectedAt=oa()}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=oa(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=oa(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=oa(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=oa()})),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=oa()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new n_))}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)}},g_=class{constructor(t,e={}){this.transports=t,this.transport=null,this.emitter=Ql(),this.unbind=[],this.logger=e.logger||new Qa}displayName(){return"fallbacked transport"}async open(){for(let t=0;t<this.transports.length;t++){let e=this.transports[t];try{this.transport=e,this.resetListeners(),this.logger.debug(`Trying to connect via ${e.displayName()}`),await e.open(),this.logger.debug(`Connected via ${e.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${e.displayName()}: ${r.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(t){if(!this.transport)throw new Error("No transport is open");this.transport.send(t)}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(t,e){this.transports.forEach(r=>{r.setParam(t,e)})}setToken(t,e){this.transports.forEach(r=>{r.setToken(t,e)})}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...d)=>{r(),e(...d)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(t=>t()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",t=>{this.emitter.emit("data",t)}),this.transport.on("close",t=>{this.emitter.emit("close",t)}),this.transport.on("error",t=>{this.emitter.emit("error",t)}))}};class m_{constructor(t,e={}){this.url=t;let r=e.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=Ql();let{format:d,subprotocol:h,authStrategy:f}=e;this.format=d||"text",this.connectionOptions=e.websocketOptions,this.authStrategy=f||"param",this.authProtocol="",this.subprotocol=h}displayName(){return"WebSocket("+this.url+")"}open(){let t=this.subprotocol;return this.authStrategy==="sub-protocol"&&(t=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,t,this.connectionOptions):this.ws=new this.Impl(this.url,t),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((e,r)=>{let d=[];d.push(this.once("open",()=>{d.forEach(h=>h()),e()})),d.push(this.once("close",()=>{d.forEach(h=>h()),r(Error("WS connection closed"))}))})}setURL(t){this.url=t}setParam(t,e){let r=new URL(this.url);r.searchParams.set(t,e);let d=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(d)}setToken(t,e="jid"){if(this.authStrategy==="param")this.setParam(e,t);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${e}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(d=>d.toLowerCase()===r)||r,this.connectionOptions.headers[r]=t}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${t}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(t){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(t)}close(){this.ws?this.onclose():this.connected=!1}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...d)=>{r(),e(...d)});return r}initListeners(){this.ws.onerror=t=>{this.connected&&this.emitter.emit("error",t.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=t=>{let e=t.data;this.format==="binary"&&(e=new Uint8Array(e)),this.emitter.emit("data",e)},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")}}class v_{constructor(t){this.channel=t}notify(t,...e){typeof this[t]=="function"&&this[t](...e)}perform(t,e={}){this.channel.perform(t,e)}send(t){this.channel.send(t)}whisper(t){return this.channel.whisper(t)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class y_ extends lm{constructor(t,e,r){super(t,e),this.subscription=new v_(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:d})=>this.subscription.notify("connected",{reconnected:d})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",d=>this.subscription.notify("received",d)),this.on("close",d=>{d&&d instanceof Zu?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class b_{constructor(t){this.cable=t}create(t,e){let r,d;typeof t=="object"?(r=t.channel,delete t.channel,d=t):(r=t,d={});let h=new y_(r,d,e);return h.subscription.notify("initialized"),this.cable.subscribe(h),h.subscription}findAll(t){return this.cable.hub.channels.filter(e=>e.identifier===t).map(e=>e.subscription)}}class w_{constructor(t){this.cable=t,this.subscriptions=new b_(t)}send(t){return this.cable.send(t)}connect(){return this.cable.connect()}disconnect(){return this.cable.disconnect()}ensureActiveConnection(){return this.cable.connect()}}const dm={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function x_(n,t){if(typeof n=="object"&&typeof t>"u"&&(t=n,n=void 0),t=t||{},!n&&!t.transport)throw Error("URL or transport must be specified");t=Object.assign({},dm,t);let{protocol:e,websocketImplementation:r,websocketFormat:d,websocketOptions:h,websocketAuthStrategy:f,fallbacks:v,logLevel:o,logger:p,transport:i,encoder:a,lazy:u,monitor:g,pingInterval:s,reconnectStrategy:c,maxMissingPings:m,maxReconnectAttempts:w,subprotocol:x,tokenRefresher:R,historyTimestamp:S,protocolOptions:A,concurrentSubscribes:C,performFailures:O,transportConfigurator:N,auth:M}=t;if(p=p||new Qa(o),typeof e=="string"){x=x||e;let F=e.substring(0,e.lastIndexOf("-")),D=e.substring(e.lastIndexOf("-")+1);if(A=A||{},F==="actioncable-v1")e=new sm({logger:p,...A});else if(F==="actioncable-v1-ext")e=new u_({logger:p,historyTimestamp:S,...A});else throw Error(`Protocol is not supported yet: ${e}`);if(D==="json")a=a||new l_,d=d||"text";else if(D==="msgpack"){if(d="binary",!a)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(D==="protobuf"){if(d=d||"binary",!a)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${e}`)}if(!e)throw Error("Protocol must be specified");i=i||new m_(n,{websocketImplementation:r,websocketOptions:h,subprotocol:x,authStrategy:f,format:d}),v&&(i=new g_([i,...v],{logger:p})),M&&M.token&&i.setToken(M.token,M.param||"jid"),c=c||um(s),g!==!1&&(g=g||new hm({pingInterval:s,reconnectStrategy:c,maxMissingPings:m,maxReconnectAttempts:w,logger:p}));let L={concurrentSubscribes:C},j=new f_({protocol:e,transport:i,encoder:a,logger:p,lazy:u,hubOptions:L,performFailures:O,transportConfigurator:N});return g&&(g.watch(j),j.monitor=g),R&&C_(j,async()=>{try{await R(i)}catch(F){return p.error("Failed to refresh authentication token: "+F),!1}return j.connect().catch(()=>{}),!0}),j}function C_(n,t){let e=!1;n.on("connect",()=>e=!1),n.on("close",async r=>{if(r){if(e){n.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(e=!0,await t())}})}class A_ extends om{writeLogEntry(t,e,r){r?console[t](e,r):console[t](e)}}class __ extends hm{watch(t){super.watch(t),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let t=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},e=d=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:d})},r=()=>this.disconnect(new Zi("page_frozen"));document.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",e,!1),window.addEventListener("online",e,!1),window.addEventListener("resume",e,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",t,!1),window.removeEventListener("focus",e,!1),window.removeEventListener("online",e,!1),window.removeEventListener("resume",e,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(t){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:t.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(t))}}const k_=["cable","action-cable"],S_="/cable",ec=(n,t)=>{for(let e of k_){let r=n.head.querySelector(`meta[name='${e}-${t}']`);if(r)return r.getAttribute("content")}},fm=n=>n.match(/wss?:\/\//)?n:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${n}`:n,$_=()=>{if(typeof document<"u"&&document.head){let n=ec(document,"url");if(n)return fm(n)}return fm(S_)},E_=()=>{if(typeof document<"u"&&document.head){let n=ec(document,"history-timestamp");if(n)return n|0}},R_=()=>{if(typeof document<"u"&&document.head)return ec(document,"token")},T_=()=>{if(typeof document<"u"&&document.head)return ec(document,"token-param")};function I_(n,t){typeof n=="object"&&typeof t>"u"&&(t=n,n=void 0),n=n||$_(),t=t||{},t.historyTimestamp||=E_();let e=R_();if(e){let p=T_();t.auth=Object.assign({token:e,param:p},t.auth||{})}t=Object.assign({},dm,t);let{logLevel:r,logger:d,pingInterval:h,reconnectStrategy:f,maxMissingPings:v,maxReconnectAttempts:o}=t;return d=t.logger=t.logger||new A_(r),f=t.reconnectStrategy=t.reconnectStrategy||um(h),t.monitor!==!1&&(t.monitor=t.monitor||new __({pingInterval:h,reconnectStrategy:f,maxMissingPings:v,maxReconnectAttempts:o,logger:d})),x_(n,t)}function L_(n,t){let e=I_(n,t);return new w_(e)}class M_{constructor(t="/openc3-api/cable"){this._cable=null,this._url=t}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(t,e,r={},d={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(h=>{if(h&&OpenC3Auth.setTokens(),this._cable==null){const f=new URL(this._url,document.baseURI);f.searchParams.set("scope",e),this._cable=L_(f.href)}return this._cable.subscriptions.create({channel:t,token:localStorage.openc3Token,...d},r)})}recordPing(){}}Mn("l",M_),Mn("q",class{constructor(t,e,r="",d=""){this.keyword=t.keyword,this.parameters=t.parameters,this.filename=t.filename,this.line=t.line,this.lineNumber=t.lineNumber,this.message=e,this.usage=r,this.url=d}});function el(n){return O_.test(n)}const O_=/^-?[0-9]+$/;function pm(n){return N_.test(n)}const N_=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function gm(n,t){if(el(n))return Number.isSafeInteger(Number.parseInt(n,10));const e=Number.parseFloat(n),r=String(e);if(n===r)return!0;const d=mm(n),h=mm(r);return!!(d===h||t?.approx===!0&&!el(n)&&h.length>=14&&d.startsWith(h.substring(0,14)))}let tl=(function(n){return n.underflow="underflow",n.overflow="overflow",n.truncate_integer="truncate_integer",n.truncate_float="truncate_float",n})({});function D_(n){if(gm(n,{approx:!1}))return;if(el(n))return tl.truncate_integer;const t=Number.parseFloat(n);return Number.isFinite(t)?t===0?tl.underflow:tl.truncate_float:tl.overflow}function mm(n){const{start:t,end:e}=P_(n),r=n.substring(t,e),d=r.indexOf(".");return d===-1?r:r.substring(0,d)+r.substring(d+1)}function P_(n){let t=0;for(n[0]==="-"&&t++;n[t]==="0"||n[t]===".";)t++;let e=n.lastIndexOf("e");for(e===-1&&(e=n.lastIndexOf("E")),e===-1&&(e=n.length);(n[e-1]==="0"||n[e-1]===".")&&e>t;)e--;return{start:t,end:e}}let F_=class{isLosslessNumber=!0;constructor(t){if(!pm(t))throw new Error(`Invalid number (value: "${t}")`);this.value=t}valueOf(){const t=D_(this.value);if(t===void 0||t===tl.truncate_float)return Number.parseFloat(this.value);if(el(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${t} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}};function z_(n){return n&&typeof n=="object"&&n.isLosslessNumber||!1}function B_(n){return new F_(n)}function j_(n,t){return Qu({"":n},"",n,t)}function Qu(n,t,e,r){return Array.isArray(e)?r.call(n,t,H_(e,r)):e&&typeof e=="object"&&!z_(e)?r.call(n,t,W_(e,r)):r.call(n,t,e)}function W_(n,t){for(const e of Object.keys(n)){const r=Qu(n,e,n[e],t);r!==void 0?n[e]=r:delete n[e]}return n}function H_(n,t){for(let e=0;e<n.length;e++)n[e]=Qu(n,String(e),n[e],t);return n}function U_(n,t,e){const r=typeof e=="function"?{parseNumber:e}:e,d=r?.parseNumber??B_,h=r?.onDuplicateKey??O;let f=0;const v=i();return w(v),R(),t?j_(v,t):v;function o(){if(n.charCodeAt(f)===X_){f++,u();const z={};let U=!0;for(;f<n.length&&n.charCodeAt(f)!==ym;){U?U=!1:(c(),u());const V=f,K=g();if(K===void 0){C();return}u(),m();const Z=i();if(Z===void 0){F();return}if(Object.prototype.hasOwnProperty.call(z,K)&&!eh(Z,z[K])){const oe=h({key:K,position:V+1,oldValue:z[K],newValue:Z});oe!==void 0&&(z[K]=oe)}else z[K]=Z}return n.charCodeAt(f)!==ym&&N(),f++,z}}function p(){if(n.charCodeAt(f)===J_){f++,u();const z=[];let U=!0;for(;f<n.length&&n.charCodeAt(f)!==bm;){U?U=!1:c();const V=i();x(V),z.push(V)}return n.charCodeAt(f)!==bm&&M(),f++,z}}function i(){u();const z=g()??s()??o()??p()??a("true",!0)??a("false",!1)??a("null",null);return u(),z}function a(z,U){if(n.slice(f,f+z.length)===z)return f+=z.length,U}function u(){for(;V_(n.charCodeAt(f));)f++}function g(){if(n.charCodeAt(f)===th){f++;let z="";for(;f<n.length&&n.charCodeAt(f)!==th;){if(n.charCodeAt(f)===Y_){const U=n[f+1],V=K_[U];V!==void 0?(z+=V,f++):U==="u"?tc(n.charCodeAt(f+2))&&tc(n.charCodeAt(f+3))&&tc(n.charCodeAt(f+4))&&tc(n.charCodeAt(f+5))?(z+=String.fromCharCode(Number.parseInt(n.slice(f+2,f+6),16)),f+=5):D(f):j(f)}else q_(n.charCodeAt(f))?z+=n[f]:L(n[f]);f++}return A(),f++,z}}function s(){const z=f;if(n.charCodeAt(f)===wm&&(f++,S(z)),n.charCodeAt(f)===nh)f++;else if(G_(n.charCodeAt(f)))for(f++;nc(n.charCodeAt(f));)f++;if(n.charCodeAt(f)===ok)for(f++,S(z);nc(n.charCodeAt(f));)f++;if(n.charCodeAt(f)===uk||n.charCodeAt(f)===ck)for(f++,(n.charCodeAt(f)===wm||n.charCodeAt(f)===nk)&&f++,S(z);nc(n.charCodeAt(f));)f++;if(f>z)return d(n.slice(z,f))}function c(){if(n.charCodeAt(f)!==ik)throw new SyntaxError(`Comma ',' expected after value ${I()}`);f++}function m(){if(n.charCodeAt(f)!==sk)throw new SyntaxError(`Colon ':' expected after property name ${I()}`);f++}function w(z){if(z===void 0)throw new SyntaxError(`JSON value expected ${I()}`)}function x(z){if(z===void 0)throw new SyntaxError(`Array item expected ${I()}`)}function R(){if(f<n.length)throw new SyntaxError(`Expected end of input ${I()}`)}function S(z){if(!nc(n.charCodeAt(f))){const U=n.slice(z,f);throw new SyntaxError(`Invalid number '${U}', expecting a digit ${I()}`)}}function A(){if(n.charCodeAt(f)!==th)throw new SyntaxError(`End of string '"' expected ${I()}`)}function C(){throw new SyntaxError(`Quoted object key expected ${I()}`)}function O(z){let{key:U,position:V}=z;throw new SyntaxError(`Duplicate key '${U}' encountered at position ${V}`)}function N(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${I()}`)}function M(){throw new SyntaxError(`Array item or end of array ']' expected ${I()}`)}function L(z){throw new SyntaxError(`Invalid character '${z}' ${$()}`)}function j(z){const U=n.slice(z,z+2);throw new SyntaxError(`Invalid escape character '${U}' ${$()}`)}function F(){throw new SyntaxError(`Object value expected after ':' ${$()}`)}function D(z){const U=n.slice(z,z+6);throw new SyntaxError(`Invalid unicode character '${U}' ${$()}`)}function $(){return`at position ${f}`}function _(){return f<n.length?`but got '${n[f]}'`:"but reached end of input"}function I(){return`${_()} ${$()}`}}function V_(n){return n===Z_||n===Q_||n===ek||n===tk}function tc(n){return n>=nh&&n<=rh||n>=ak&&n<=hk||n>=lk&&n<=dk}function nc(n){return n>=nh&&n<=rh}function G_(n){return n>=rk&&n<=rh}function q_(n){return n>=32&&n<=1114111}function eh(n,t){return n===t?!0:Array.isArray(n)&&Array.isArray(t)?n.length===t.length&&n.every((e,r)=>eh(e,t[r])):vm(n)&&vm(t)?[...new Set([...Object.keys(n),...Object.keys(t)])].every(e=>eh(n[e],t[e])):!1}function vm(n){return typeof n=="object"&&n!==null}const K_={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
10
|
+
`,r:"\r",t:" "},Y_=92,X_=123,ym=125,J_=91,bm=93,Z_=32,Q_=10,ek=9,tk=13,th=34,nk=43,wm=45,nh=48,rk=49,rh=57,ik=44,ok=46,sk=58,ak=65,lk=97,ck=69,uk=101,hk=70,dk=102;function xm(n,t,e,r){return d(n);function d(o,p){if(Array.isArray(r)){const i=r.find(a=>a.test(o));if(i){const a=i.stringify(o);if(typeof a!="string"||!pm(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 o=="boolean"||typeof o=="number"||typeof o=="string"||o===null||o instanceof Date||o instanceof Boolean||o instanceof Number||o instanceof String)return JSON.stringify(o);if(o?.isLosslessNumber||typeof o=="bigint")return o.toString();if(Array.isArray(o))return h(o);if(o&&typeof o=="object")return f(o)}function h(o,p){if(o.length===0)return"[]";let i="[";for(let a=0;a<o.length;a++){const u=o[a];typeof u<"u"&&typeof u!="function"?i+=d(u):i+="null",a<o.length-1&&(i+=",")}return i+="]",i}function f(o,p){if(typeof o.toJSON=="function")return xm(o.toJSON(),t,e,void 0);const i=Array.isArray(t)?t.map(String):Object.keys(o);if(i.length===0)return"{}";let a=!0,u="{";for(const g of i){const s=o[g];if(v(g,s)){a?a=!1:u+=",";const c=JSON.stringify(g);u+=`${c}:`,u+=d(s)}}return u+="}",u}function v(o,p){return typeof p<"u"&&typeof p!="function"&&typeof p!="symbol"}}function fk(n){return el(n)&&!gm(n)?BigInt(n):parseFloat(n)}class pk{id=1;constructor(){}async exec(t,e,r={},d={},h=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,d.manual=!0,(await Xu.post("/openc3-api/api",{jsonrpc:"2.0",method:t,params:e,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...d},timeout:h,transformRequest:[(f,v)=>xm(f)],transformResponse:[f=>{try{return U_(f,void 0,fk)}catch{const v=typeof f=="string"?f.substring(0,200):String(f),o=new Error(`Server returned non-JSON response: ${v}`);throw o.name="ServerError",o}}]})).data.result}catch(f){let v=new Error;throw f.response?(v.name=f.response.data.error.data.class,v.message=f.response.data.error.data.message,v.object=f.response.data.error):f.request?(v.name="Request error",v.message="Request error, no response received"):v=f,v}}decode_openc3_type(t){if(t!==null&&typeof t=="object"&&t.json_class=="Float"&&t.raw){if(t.raw=="NaN")return NaN;if(t.raw=="Infinity")return 1/0;if(t.raw=="-Infinity")return-1/0}return null}encode_openc3_type(t){return Number.isNaN(t)?{json_class:"Float",raw:"NaN"}:t==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:t==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(t=>{t&&(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(t){return this.exec("set_offline_access",[t])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(t,e,r,d,h){return this.exec("map_target_to_interface",[t,e],{cmd_only:r,tlm_only:d,unmap_old:h})}unmap_target_from_interface(t,e,r,d){return this.exec("unmap_target_from_interface",[t,e],{cmd_only:r,tlm_only:d})}connect_interface(t,...e){return e.length>0?this.exec("connect_interface",[t,...e]):this.exec("connect_interface",[t])}disconnect_interface(t){return this.exec("disconnect_interface",[t])}interface_cmd(t,e,...r){return this.exec("interface_cmd",[t,e,...r])}interface_target_enable(t,e,r=!1,d=!1){return this.exec("interface_target_enable",[t,e],{cmd_only:r,tlm_only:d})}interface_target_disable(t,e,r=!1,d=!1){return this.exec("interface_target_disable",[t,e],{cmd_only:r,tlm_only:d})}interface_details(t){return this.exec("interface_details",[t])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(t,e,r,d,h){return this.exec("map_target_to_router",[t,e],{cmd_only:r,tlm_only:d,unmap_old:h})}unmap_target_from_router(t,e,r,d){return this.exec("unmap_target_from_router",[t,e],{cmd_only:r,tlm_only:d})}connect_router(t){return this.exec("connect_router",[t])}disconnect_router(t){return this.exec("disconnect_router",[t])}router_target_enable(t,e,r=!1,d=!1){return this.exec("router_target_enable",[t,e],{cmd_only:r,tlm_only:d})}router_target_disable(t,e,r=!1,d=!1){return this.exec("router_target_disable",[t,e],{cmd_only:r,tlm_only:d})}router_details(t){return this.exec("router_details",[t])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(t){return this.exec("get_tlm_cnts",[t])}get_item(t,e,r){return this.exec("get_item",[t,e,r])}get_param(t,e,r){return this.exec("get_param",[t,e,r])}get_parameter(t,e,r){return this.exec("get_param",[t,e,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(t){return this.exec("set_limits_set",[t])}get_target(t){return this.exec("get_target",[t])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(t,e){return this.exec("get_tlm",[t,e])}get_telemetry(t,e){return this.exec("get_tlm",[t,e])}get_all_tlm(t){return this.exec("get_all_tlm",[t])}get_all_telemetry(t){return this.exec("get_all_tlm",[t])}get_all_tlm_names(t,e=!1){return this.exec("get_all_tlm_names",[t],{hidden:e})}get_all_telemetry_names(t){return this.exec("get_all_tlm_names",[t])}get_all_tlm_item_names(t){return this.exec("get_all_tlm_item_names",[t])}async get_tlm_packet(t,e,r,d=30){const h=await this.exec("get_tlm_packet",[t,e],{type:r,stale_time:d});if(h!=null){let f=h.length,v=null;for(let o=0;o<f;o++)v=this.decode_openc3_type(h[o][1]),v!==null&&(h[o][1]=v)}return h}get_packet_derived_items(t,e){return this.exec("get_packet_derived_items",[t,e])}get_tlm_buffer(t,e){return this.exec("get_tlm_buffer",[t,e])}get_tlm_available(t){return this.exec("get_tlm_available",[t])}async get_tlm_values(t,e=30,r=null,d=null,h=null){let f={stale_time:e};r!==null&&(f.cache_timeout=r),d!==null&&(f.start_time=d.toISOString()),h!==null&&(f.end_time=h.toISOString());const v=await this.exec("get_tlm_values",[t],f,{},1e4);if(v&&v.length>0){let o=v.length,p=null;for(let i=0;i<o;i++)p=this.decode_openc3_type(v[i][0]),p!==null&&(v[i][0]=p)}return v}get_limits(t,e,r){return this.exec("get_limits",[t,e,r])}async tlm(t,e,r,d="CONVERTED"){let h=null;if(e===void 0)h=await this.exec("tlm",[t]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED"].includes(e))h=await this.exec("tlm",[t],{type:e});else{let v=new Error;throw v.name="TypeError",v.message=`Invalid data type ${e}. Valid options are RAW, CONVERTED or FORMATTED.`,v}else h=await this.exec("tlm",[t,e,r],{type:d});let f=this.decode_openc3_type(h);return f!==null&&(h=f),h}async inject_tlm(t,e,r=null,d="CONVERTED",h=!1){await this.exec("inject_tlm",[t,e,r],{type:d,stored:h})}set_tlm(t,e,r,d){return this.exec("set_tlm",[t,e,r],{type:d})}override_tlm(t,e,r,d){return this.exec("override_tlm",[t,e,r],{type:d})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(t,e,r,d){return this.exec("normalize_tlm",[t,e,r],{type:d})}get_all_cmds(t){return this.exec("get_all_cmds",[t])}get_all_commands(t){return this.exec("get_all_cmds",[t])}get_all_cmd_names(t,e=!1){return this.exec("get_all_cmd_names",[t],{hidden:e})}get_all_command_names(t){return this.exec("get_all_cmd_names",[t])}get_cmd(t,e){return this.exec("get_cmd",[t,e])}get_command(t,e){return this.exec("get_cmd",[t,e])}get_cmd_cnts(t){return this.exec("get_cmd_cnts",[t])}get_cmd_value(t,e,r,d="CONVERTED"){return this.exec("get_cmd_value",[t,e,r,d])}get_cmd_buffer(t,e){return this.exec("get_cmd_buffer",[t,e])}_cmd(t,e,r,d,h,f={}){let v=null;for(let o in d)Object.prototype.hasOwnProperty.call(d,o)&&(v=this.encode_openc3_type(d[o]),v!==null&&(d[o]=v));return this.exec(t,[e,r,d],f,h)}get_cmd_hazardous(t,e,r,d={}){return e===void 0?this.exec("get_cmd_hazardous",t,{},d):this._cmd("get_cmd_hazardous",t,e,r,d)}cmd(t,e,r,d={},h={}){return e===void 0?this.exec("cmd",t,h,d):this._cmd("cmd",t,e,r,d,h)}cmd_no_range_check(t,e,r,d={},h={}){return e===void 0?this.exec("cmd_no_range_check",t,h,d):this._cmd("cmd_no_range_check",t,e,r,d,h)}cmd_raw(t,e,r,d={},h={}){return e===void 0?this.exec("cmd_raw",t,h,d):this._cmd("cmd_raw",t,e,r,d,h)}cmd_raw_no_range_check(t,e,r,d={},h={}){return e===void 0?this.exec("cmd_raw_no_range_check",t,h,d):this._cmd("cmd_raw_no_range_check",t,e,r,d,h)}cmd_no_hazardous_check(t,e,r,d={},h={}){return e===void 0?this.exec("cmd_no_hazardous_check",t,h,d):this._cmd("cmd_no_hazardous_check",t,e,r,d,h)}cmd_no_checks(t,e,r,d={},h={}){return e===void 0?this.exec("cmd_no_checks",t,h,d):this._cmd("cmd_no_checks",t,e,r,d,h)}cmd_raw_no_hazardous_check(t,e,r,d={},h={}){return e===void 0?this.exec("cmd_raw_no_hazardous_check",t,h,d):this._cmd("cmd_raw_no_hazardous_check",t,e,r,d,h)}cmd_raw_no_checks(t,e,r,d={},h={}){return e===void 0?this.exec("cmd_raw_no_checks",t,h,d):this._cmd("cmd_raw_no_checks",t,e,r,d,h)}build_cmd(t,e,r,d={},h={}){return e===void 0?this.exec("build_cmd",t,h,d):this._cmd("build_cmd",t,e,r,d,h)}build_command(t,e,r,d={},h={}){return e===void 0?this.exec("build_cmd",t,h,d):this._cmd("build_cmd",t,e,r,d,h)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(t,e){return this.exec("send_raw",[t,e])}list_configs(t){return this.exec("list_configs",[t])}load_config(t,e){return this.exec("load_config",[t,e])}save_config(t,e,r){return this.exec("save_config",[t,e,r])}delete_config(t,e){return this.exec("delete_config",[t,e])}enable_limits(t,e,r){return this.exec("enable_limits",[t,e,r])}disable_limits(t,e,r){return this.exec("disable_limits",[t,e,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(t){return this.exec("get_overall_limits_state",[t])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(t,e){return this.exec("get_setting",[t],e)}get_settings(t,e){return this.exec("get_settings",t,e)}set_setting(t,e){return this.exec("set_setting",[t,e])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(t,e){return this.exec("set_setting",[t,e])}get_metrics(){return this.exec("get_metrics",[])}open_tab(t){window.open(t,"_blank")}async hashString(t){if(window.isSecureContext){const e=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",e),d=new Uint8Array(r);return Array.from(d).map(h=>h.toString(16).padStart(2,"0")).join("")}}}Mn("g",pk);const Cm=6048e5,gk=864e5,rc=6e4,ih=36e5,mk=1e3,Am=Symbol.for("constructDateFrom");Mn({h:rc,i:ih,p:mk});function yo(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&Am in n?n[Am](t):n instanceof Date?new n.constructor(t):new Date(t)}function Kr(n,t){return yo(t||n,n)}let vk={};function sa(){return vk}function aa(n,t){const e=sa(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??e.weekStartsOn??e.locale?.options?.weekStartsOn??0,d=Kr(n,t?.in),h=d.getDay(),f=(h<r?7:0)+h-r;return d.setDate(d.getDate()-f),d.setHours(0,0,0,0),d}function nl(n,t){return aa(n,{...t,weekStartsOn:1})}function _m(n,t){const e=Kr(n,t?.in),r=e.getFullYear(),d=yo(e,0);d.setFullYear(r+1,0,4),d.setHours(0,0,0,0);const h=nl(d),f=yo(e,0);f.setFullYear(r,0,4),f.setHours(0,0,0,0);const v=nl(f);return e.getTime()>=h.getTime()?r+1:e.getTime()>=v.getTime()?r:r-1}function oh(n){const t=Kr(n),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+n-+e}function yk(n,...t){const e=yo.bind(null,t.find(r=>typeof r=="object"));return t.map(e)}function km(n,t){const e=Kr(n,t?.in);return e.setHours(0,0,0,0),e}function bk(n,t,e){const[r,d]=yk(e?.in,n,t),h=km(r),f=km(d),v=+h-oh(h),o=+f-oh(f);return Math.round((v-o)/gk)}function wk(n,t){const e=_m(n,t),r=yo(n,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),nl(r)}function xk(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Sm(n){return!(!xk(n)&&typeof n!="number"||isNaN(+Kr(n)))}function Ck(n,t){const e=Kr(n,t?.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const Ak={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"}},_k=(n,t,e)=>{let r;const d=Ak[n];return typeof d=="string"?r=d:t===1?r=d.one:r=d.other.replace("{{count}}",t.toString()),e?.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function sh(n){return(t={})=>{const e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const kk={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Sk={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$k={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ek={date:sh({formats:kk,defaultWidth:"full"}),time:sh({formats:Sk,defaultWidth:"full"}),dateTime:sh({formats:$k,defaultWidth:"full"})},Rk={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Tk=(n,t,e,r)=>Rk[n];function rl(n){return(t,e)=>{const r=e?.context?String(e.context):"standalone";let d;if(r==="formatting"&&n.formattingValues){const f=n.defaultFormattingWidth||n.defaultWidth,v=e?.width?String(e.width):f;d=n.formattingValues[v]||n.formattingValues[f]}else{const f=n.defaultWidth,v=e?.width?String(e.width):n.defaultWidth;d=n.values[v]||n.values[f]}const h=n.argumentCallback?n.argumentCallback(t):t;return d[h]}}const Ik={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Lk={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Mk={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"]},Ok={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"]},Nk={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"}},Dk={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"}},Pk=(n,t)=>{const e=Number(n),r=e%100;if(r>20||r<10)switch(r%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},Fk={ordinalNumber:Pk,era:rl({values:Ik,defaultWidth:"wide"}),quarter:rl({values:Lk,defaultWidth:"wide",argumentCallback:n=>n-1}),month:rl({values:Mk,defaultWidth:"wide"}),day:rl({values:Ok,defaultWidth:"wide"}),dayPeriod:rl({values:Nk,defaultWidth:"wide",formattingValues:Dk,defaultFormattingWidth:"wide"})};function il(n){return(t,e={})=>{const r=e.width,d=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],h=t.match(d);if(!h)return null;const f=h[0],v=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],o=Array.isArray(v)?Bk(v,a=>a.test(f)):zk(v,a=>a.test(f));let p;p=n.valueCallback?n.valueCallback(o):o,p=e.valueCallback?e.valueCallback(p):p;const i=t.slice(f.length);return{value:p,rest:i}}}function zk(n,t){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function Bk(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return e}function jk(n){return(t,e={})=>{const r=t.match(n.matchPattern);if(!r)return null;const d=r[0],h=t.match(n.parsePattern);if(!h)return null;let f=n.valueCallback?n.valueCallback(h[0]):h[0];f=e.valueCallback?e.valueCallback(f):f;const v=t.slice(d.length);return{value:f,rest:v}}}const Wk=/^(\d+)(th|st|nd|rd)?/i,Hk=/\d+/i,Uk={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},Vk={any:[/^b/i,/^(a|c)/i]},Gk={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},qk={any:[/1/i,/2/i,/3/i,/4/i]},Kk={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},Yk={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]},Xk={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},Jk={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]},Zk={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},Qk={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}},eS={ordinalNumber:jk({matchPattern:Wk,parsePattern:Hk,valueCallback:n=>parseInt(n,10)}),era:il({matchPatterns:Uk,defaultMatchWidth:"wide",parsePatterns:Vk,defaultParseWidth:"any"}),quarter:il({matchPatterns:Gk,defaultMatchWidth:"wide",parsePatterns:qk,defaultParseWidth:"any",valueCallback:n=>n+1}),month:il({matchPatterns:Kk,defaultMatchWidth:"wide",parsePatterns:Yk,defaultParseWidth:"any"}),day:il({matchPatterns:Xk,defaultMatchWidth:"wide",parsePatterns:Jk,defaultParseWidth:"any"}),dayPeriod:il({matchPatterns:Zk,defaultMatchWidth:"any",parsePatterns:Qk,defaultParseWidth:"any"})},tS=Mn("a",{code:"en-US",formatDistance:_k,formatLong:Ek,formatRelative:Tk,localize:Fk,match:eS,options:{weekStartsOn:0,firstWeekContainsDate:1}});function nS(n,t){const e=Kr(n,t?.in);return bk(e,Ck(e))+1}function $m(n,t){const e=Kr(n,t?.in),r=+nl(e)-+wk(e);return Math.round(r/Cm)+1}function ah(n,t){const e=Kr(n,t?.in),r=e.getFullYear(),d=sa(),h=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??d.firstWeekContainsDate??d.locale?.options?.firstWeekContainsDate??1,f=yo(t?.in||n,0);f.setFullYear(r+1,0,h),f.setHours(0,0,0,0);const v=aa(f,t),o=yo(t?.in||n,0);o.setFullYear(r,0,h),o.setHours(0,0,0,0);const p=aa(o,t);return+e>=+v?r+1:+e>=+p?r:r-1}function rS(n,t){const e=sa(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??e.firstWeekContainsDate??e.locale?.options?.firstWeekContainsDate??1,d=ah(n,t),h=yo(t?.in||n,0);return h.setFullYear(d,0,r),h.setHours(0,0,0,0),aa(h,t)}function Em(n,t){const e=Kr(n,t?.in),r=+aa(e,t)-+rS(e,t);return Math.round(r/Cm)+1}function fn(n,t){const e=n<0?"-":"",r=Math.abs(n).toString().padStart(t,"0");return e+r}const Jo={y(n,t){const e=n.getFullYear(),r=e>0?e:1-e;return fn(t==="yy"?r%100:r,t.length)},M(n,t){const e=n.getMonth();return t==="M"?String(e+1):fn(e+1,2)},d(n,t){return fn(n.getDate(),t.length)},a(n,t){const e=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];default:return e==="am"?"a.m.":"p.m."}},h(n,t){return fn(n.getHours()%12||12,t.length)},H(n,t){return fn(n.getHours(),t.length)},m(n,t){return fn(n.getMinutes(),t.length)},s(n,t){return fn(n.getSeconds(),t.length)},S(n,t){const e=t.length,r=n.getMilliseconds(),d=Math.trunc(r*Math.pow(10,e-3));return fn(d,t.length)}},la={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Rm={G:function(n,t,e){const r=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});default:return e.era(r,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){const r=n.getFullYear(),d=r>0?r:1-r;return e.ordinalNumber(d,{unit:"year"})}return Jo.y(n,t)},Y:function(n,t,e,r){const d=ah(n,r),h=d>0?d:1-d;if(t==="YY"){const f=h%100;return fn(f,2)}return t==="Yo"?e.ordinalNumber(h,{unit:"year"}):fn(h,t.length)},R:function(n,t){const e=_m(n);return fn(e,t.length)},u:function(n,t){const e=n.getFullYear();return fn(e,t.length)},Q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return fn(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return fn(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,t,e){const r=n.getMonth();switch(t){case"M":case"MM":return Jo.M(n,t);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(n,t,e){const r=n.getMonth();switch(t){case"L":return String(r+1);case"LL":return fn(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(n,t,e,r){const d=Em(n,r);return t==="wo"?e.ordinalNumber(d,{unit:"week"}):fn(d,t.length)},I:function(n,t,e){const r=$m(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):fn(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):Jo.d(n,t)},D:function(n,t,e){const r=nS(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):fn(r,t.length)},E:function(n,t,e){const r=n.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(n,t,e,r){const d=n.getDay(),h=(d-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(h);case"ee":return fn(h,2);case"eo":return e.ordinalNumber(h,{unit:"day"});case"eee":return e.day(d,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(d,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(d,{width:"short",context:"formatting"});default:return e.day(d,{width:"wide",context:"formatting"})}},c:function(n,t,e,r){const d=n.getDay(),h=(d-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(h);case"cc":return fn(h,t.length);case"co":return e.ordinalNumber(h,{unit:"day"});case"ccc":return e.day(d,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(d,{width:"narrow",context:"standalone"});case"cccccc":return e.day(d,{width:"short",context:"standalone"});default:return e.day(d,{width:"wide",context:"standalone"})}},i:function(n,t,e){const r=n.getDay(),d=r===0?7:r;switch(t){case"i":return String(d);case"ii":return fn(d,t.length);case"io":return e.ordinalNumber(d,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(n,t,e){const r=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(r,{width:"narrow",context:"formatting"});default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(n,t,e){const r=n.getHours();let d;switch(r===12?d=la.noon:r===0?d=la.midnight:d=r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(d,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(d,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(d,{width:"narrow",context:"formatting"});default:return e.dayPeriod(d,{width:"wide",context:"formatting"})}},B:function(n,t,e){const r=n.getHours();let d;switch(r>=17?d=la.evening:r>=12?d=la.afternoon:r>=4?d=la.morning:d=la.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(d,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(d,{width:"narrow",context:"formatting"});default:return e.dayPeriod(d,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let r=n.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return Jo.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):Jo.H(n,t)},K:function(n,t,e){const r=n.getHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):fn(r,t.length)},k:function(n,t,e){let r=n.getHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):fn(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):Jo.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):Jo.s(n,t)},S:function(n,t){return Jo.S(n,t)},X:function(n,t,e){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Im(r);case"XXXX":case"XX":return As(r);default:return As(r,":")}},x:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"x":return Im(r);case"xxxx":case"xx":return As(r);default:return As(r,":")}},O:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Tm(r,":");default:return"GMT"+As(r,":")}},z:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Tm(r,":");default:return"GMT"+As(r,":")}},t:function(n,t,e){const r=Math.trunc(+n/1e3);return fn(r,t.length)},T:function(n,t,e){return fn(+n,t.length)}};function Tm(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),d=Math.trunc(r/60),h=r%60;return h===0?e+String(d):e+String(d)+t+fn(h,2)}function Im(n,t){return n%60===0?(n>0?"-":"+")+fn(Math.abs(n)/60,2):As(n,t)}function As(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),d=fn(Math.trunc(r/60),2),h=fn(r%60,2);return e+d+t+h}const Lm=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Mm=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},iS=(n,t)=>{const e=n.match(/(P+)(p+)?/)||[],r=e[1],d=e[2];if(!d)return Lm(n,t);let h;switch(r){case"P":h=t.dateTime({width:"short"});break;case"PP":h=t.dateTime({width:"medium"});break;case"PPP":h=t.dateTime({width:"long"});break;default:h=t.dateTime({width:"full"});break}return h.replace("{{date}}",Lm(r,t)).replace("{{time}}",Mm(d,t))},oS=Mn("N",{p:Mm,P:iS}),sS=/^D+$/,aS=/^Y+$/,lS=["D","DD","YY","YYYY"];function Om(n){return sS.test(n)}function Nm(n){return aS.test(n)}function Dm(n,t,e){const r=cS(n,t,e);if(console.warn(r),lS.includes(n))throw new RangeError(r)}function cS(n,t,e){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const uS=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,hS=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,dS=/^'([^]*?)'?$/,fS=/''/g,pS=/[a-zA-Z]/;function _s(n,t,e){const r=sa(),d=e?.locale??r.locale??tS,h=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,f=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,v=Kr(n,e?.in);if(!Sm(v))throw new RangeError("Invalid time value");let o=t.match(hS).map(i=>{const a=i[0];if(a==="p"||a==="P"){const u=oS[a];return u(i,d.formatLong)}return i}).join("").match(uS).map(i=>{if(i==="''")return{isToken:!1,value:"'"};const a=i[0];if(a==="'")return{isToken:!1,value:gS(i)};if(Rm[a])return{isToken:!0,value:i};if(a.match(pS))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return{isToken:!1,value:i}});d.localize.preprocessor&&(o=d.localize.preprocessor(v,o));const p={firstWeekContainsDate:h,weekStartsOn:f,locale:d};return o.map(i=>{if(!i.isToken)return i.value;const a=i.value;(!e?.useAdditionalWeekYearTokens&&Nm(a)||!e?.useAdditionalDayOfYearTokens&&Om(a))&&Dm(a,t,String(n));const u=Rm[a[0]];return u(v,a,d.localize,p)}).join("")}function gS(n){const t=n.match(dS);return t?t[1].replace(fS,"'"):n}var Zo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ic(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Pm={exports:{}},Fm;function mS(){return Fm||(Fm=1,(function(n,t){(function(){var e="ace",r=(function(){return this})();!r&&typeof window<"u"&&(r=window);var d=function(i,a,u){if(typeof i!="string"){d.original?d.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(u=a),d.modules[i]||(d.payloads[i]=u,d.modules[i]=null)};d.modules={},d.payloads={};var h=function(i,a,u){if(typeof a=="string"){var g=o(i,a);if(g!=null)return u&&u(),g}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var s=[],c=0,m=a.length;c<m;++c){var w=o(i,a[c]);if(w==null&&f.original)return;s.push(w)}return u&&u.apply(null,s)||!0}},f=function(i,a){var u=h("",i,a);return u==null&&f.original?f.original.apply(this,arguments):u},v=function(i,a){if(a.indexOf("!")!==-1){var u=a.split("!");return v(i,u[0])+"!"+v(i,u[1])}if(a.charAt(0)=="."){var g=i.split("/").slice(0,-1).join("/");for(a=g+"/"+a;a.indexOf(".")!==-1&&s!=a;){var s=a;a=a.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return a},o=function(i,a){a=v(i,a);var u=d.modules[a];if(!u){if(u=d.payloads[a],typeof u=="function"){var g={},s={id:a,uri:"",exports:g,packaged:!0},c=function(w,x){return h(a,w,x)},m=u(c,g,s);g=m||s.exports,d.modules[a]=g,delete d.payloads[a]}u=d.modules[a]=g||u}return u};function p(i){var a=r;r[i]||(r[i]={}),a=r[i],(!a.define||!a.define.packaged)&&(d.original=a.define,a.define=d,a.define.packaged=!0),(!a.require||!a.require.packaged)&&(f.original=a.require,a.require=f,a.require.packaged=!0)}p(e)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,r,d){function h(f,v,o){Object.defineProperty(f,v,{value:o,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||h(String.prototype,"startsWith",function(f,v){return v=v||0,this.lastIndexOf(f,v)===v}),String.prototype.endsWith||h(String.prototype,"endsWith",function(f,v){var o=this;(v===void 0||v>o.length)&&(v=o.length),v-=f.length;var p=o.indexOf(f,v);return p!==-1&&p===v}),String.prototype.repeat||h(String.prototype,"repeat",function(f){for(var v="",o=this;f>0;)f&1&&(v+=o),(f>>=1)&&(o+=o);return v}),String.prototype.includes||h(String.prototype,"includes",function(f,v){return this.indexOf(f,v)!=-1}),Object.assign||(Object.assign=function(f){if(f==null)throw new TypeError("Cannot convert undefined or null to object");for(var v=Object(f),o=1;o<arguments.length;o++){var p=arguments[o];p!=null&&Object.keys(p).forEach(function(i){v[i]=p[i]})}return v}),Object.values||(Object.values=function(f){return Object.keys(f).map(function(v){return f[v]})}),Array.prototype.find||h(Array.prototype,"find",function(f){for(var v=this.length,o=arguments[1],p=0;p<v;p++){var i=this[p];if(f.call(o,i,p,this))return i}}),Array.prototype.findIndex||h(Array.prototype,"findIndex",function(f){for(var v=this.length,o=arguments[1],p=0;p<v;p++){var i=this[p];if(f.call(o,i,p,this))return p}}),Array.prototype.includes||h(Array.prototype,"includes",function(f,v){return this.indexOf(f,v)!=-1}),Array.prototype.fill||h(Array.prototype,"fill",function(f){for(var v=this,o=v.length>>>0,p=arguments[1],i=p>>0,a=i<0?Math.max(o+i,0):Math.min(i,o),u=arguments[2],g=u===void 0?o:u>>0,s=g<0?Math.max(o+g,0):Math.min(g,o);a<s;)v[a]=f,a++;return v}),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(e,r,d){e("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(e,r,d){r.deepCopy=function h(f){if(typeof f!="object"||!f)return f;var v;if(Array.isArray(f)){v=[];for(var o=0;o<f.length;o++)v[o]=h(f[o]);return v}if(Object.prototype.toString.call(f)!=="[object Object]")return f;v={};for(var o in f)v[o]=h(f[o]);return v}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(e,r,d){r.last=function(v){return v[v.length-1]},r.stringReverse=function(v){return v.split("").reverse().join("")},r.stringRepeat=function(v,o){for(var p="";o>0;)o&1&&(p+=v),(o>>=1)&&(v+=v);return p};var h=/^\s\s*/,f=/\s\s*$/;r.stringTrimLeft=function(v){return v.replace(h,"")},r.stringTrimRight=function(v){return v.replace(f,"")},r.copyObject=function(v){var o={};for(var p in v)o[p]=v[p];return o},r.copyArray=function(v){for(var o=[],p=0,i=v.length;p<i;p++)v[p]&&typeof v[p]=="object"?o[p]=this.copyObject(v[p]):o[p]=v[p];return o},r.deepCopy=e("./deep_copy").deepCopy,r.arrayToMap=function(v){for(var o={},p=0;p<v.length;p++)o[v[p]]=1;return o},r.createMap=function(v){var o=Object.create(null);for(var p in v)o[p]=v[p];return o},r.arrayRemove=function(v,o){for(var p=0;p<=v.length;p++)o===v[p]&&v.splice(p,1)},r.escapeRegExp=function(v){return v.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(v){return(""+v).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},r.getMatchOffsets=function(v,o){var p=[];return v.replace(o,function(i){p.push({offset:arguments[arguments.length-2],length:i.length})}),p},r.deferredCall=function(v){var o=null,p=function(){o=null,v()},i=function(a){return i.cancel(),o=setTimeout(p,a||0),i};return i.schedule=i,i.call=function(){return this.cancel(),v(),i},i.cancel=function(){return clearTimeout(o),o=null,i},i.isPending=function(){return o},i},r.delayedCall=function(v,o){var p=null,i=function(){p=null,v()},a=function(u){p==null&&(p=setTimeout(i,u||o))};return a.delay=function(u){p&&clearTimeout(p),p=setTimeout(i,u||o)},a.schedule=a,a.call=function(){this.cancel(),v()},a.cancel=function(){p&&clearTimeout(p),p=null},a.isPending=function(){return p},a},r.sleep=function(v){return new Promise(function(o){setTimeout(o,v)})},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(v,o,p){return p&&v.codePointAt(o)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,r,d){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var h=typeof navigator=="object"?navigator:{},f=(/mac|win|linux/i.exec(h.platform)||["other"])[0].toLowerCase(),v=h.userAgent||"",o=h.appName||"";r.isWin=f=="win",r.isMac=f=="mac",r.isLinux=f=="linux",r.isIE=o=="Microsoft Internet Explorer"||o.indexOf("MSAppHost")>=0?parseFloat((v.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((v.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=v.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(v.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(v.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(v.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(v.split(" Edge/")[1])||void 0,r.isAIR=v.indexOf("AdobeAIR")>=0,r.isAndroid=v.indexOf("Android")>=0,r.isChromeOS=v.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(v)&&!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(e,r,d){var h=e("./useragent"),f="http://www.w3.org/1999/xhtml";r.buildDom=function u(g,s,c){if(typeof g=="string"&&g){var m=document.createTextNode(g);return s&&s.appendChild(m),m}if(!Array.isArray(g))return g&&g.appendChild&&s&&s.appendChild(g),g;if(typeof g[0]!="string"||!g[0]){for(var w=[],x=0;x<g.length;x++){var R=u(g[x],s,c);R&&w.push(R)}return w}var S=document.createElement(g[0]),A=g[1],C=1;A&&typeof A=="object"&&!Array.isArray(A)&&(C=2);for(var x=C;x<g.length;x++)u(g[x],S,c);return C==2&&Object.keys(A).forEach(function(O){var N=A[O];O==="class"?S.className=Array.isArray(N)?N.join(" "):N:typeof N=="function"||O=="value"||O[0]=="$"?S[O]=N:O==="ref"?c&&(c[N]=S):O==="style"?typeof N=="string"&&(S.style.cssText=N):N!=null&&S.setAttribute(O,N)}),s&&s.appendChild(S),S},r.getDocumentHead=function(u){return u||(u=document),u.head||u.getElementsByTagName("head")[0]||u.documentElement},r.createElement=function(u,g){return document.createElementNS?document.createElementNS(g||f,u):document.createElement(u)},r.removeChildren=function(u){u.innerHTML=""},r.createTextNode=function(u,g){var s=g?g.ownerDocument:document;return s.createTextNode(u)},r.createFragment=function(u){var g=u?u.ownerDocument:document;return g.createDocumentFragment()},r.hasCssClass=function(u,g){var s=(u.className+"").split(/\s+/g);return s.indexOf(g)!==-1},r.addCssClass=function(u,g){r.hasCssClass(u,g)||(u.className+=" "+g)},r.removeCssClass=function(u,g){for(var s=u.className.split(/\s+/g);;){var c=s.indexOf(g);if(c==-1)break;s.splice(c,1)}u.className=s.join(" ")},r.toggleCssClass=function(u,g){for(var s=u.className.split(/\s+/g),c=!0;;){var m=s.indexOf(g);if(m==-1)break;c=!1,s.splice(m,1)}return c&&s.push(g),u.className=s.join(" "),c},r.setCssClass=function(u,g,s){s?r.addCssClass(u,g):r.removeCssClass(u,g)},r.hasCssString=function(u,g){var s=0,c;if(g=g||document,c=g.querySelectorAll("style")){for(;s<c.length;)if(c[s++].id===u)return!0}},r.removeElementById=function(u,g){g=g||document,g.getElementById(u)&&g.getElementById(u).remove()};var v,o=[];r.useStrictCSP=function(u){v=u,u==!1?p():o||(o=[])};function p(){var u=o;o=null,u&&u.forEach(function(g){i(g[0],g[1])})}function i(u,g,s){if(!(typeof document>"u")){if(o){if(s)p();else if(s===!1)return o.push([u,g])}if(!v){var c=s;!s||!s.getRootNode?c=document:(c=s.getRootNode(),(!c||c==s)&&(c=document));var m=c.ownerDocument||c;if(g&&r.hasCssString(g,c))return null;g&&(u+=`
|
|
11
|
+
/*# sourceURL=ace/css/`+g+" */");var w=r.createElement("style");w.appendChild(m.createTextNode(u)),g&&(w.id=g),c==m&&(c=r.getDocumentHead(m)),c.insertBefore(w,c.firstChild)}}}if(r.importCssString=i,r.importCssStylsheet=function(u,g){r.buildDom(["link",{rel:"stylesheet",href:u}],r.getDocumentHead(g))},r.$fixPositionBug=function(u){var g=u.getBoundingClientRect();if(u.style.left){var s=parseFloat(u.style.left),c=+g.left;Math.abs(s-c)>1&&(u.style.left=2*s-c+"px")}if(u.style.right){var s=parseFloat(u.style.right),c=window.innerWidth-g.right;Math.abs(s-c)>1&&(u.style.right=2*s-c+"px")}if(u.style.top){var s=parseFloat(u.style.top),c=+g.top;Math.abs(s-c)>1&&(u.style.top=2*s-c+"px")}if(u.style.bottom){var s=parseFloat(u.style.bottom),c=window.innerHeight-g.bottom;Math.abs(s-c)>1&&(u.style.bottom=2*s-c+"px")}},r.scrollbarWidth=function(u){var g=r.createElement("ace_inner");g.style.width="100%",g.style.minWidth="0px",g.style.height="200px",g.style.display="block";var s=r.createElement("ace_outer"),c=s.style;c.position="absolute",c.left="-10000px",c.overflow="hidden",c.width="200px",c.minWidth="0px",c.height="150px",c.display="block",s.appendChild(g);var m=u&&u.documentElement||document&&document.documentElement;if(!m)return 0;m.appendChild(s);var w=g.offsetWidth;c.overflow="scroll";var x=g.offsetWidth;return w===x&&(x=s.clientWidth),m.removeChild(s),w-x},r.computedStyle=function(u,g){return window.getComputedStyle(u,"")||{}},r.setStyle=function(u,g,s){u[g]!==s&&(u[g]=s)},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(u,g,s){u.style.transform="translate("+Math.round(g)+"px, "+Math.round(s)+"px)"}:r.translate=function(u,g,s){u.style.top=Math.round(s)+"px",u.style.left=Math.round(g)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,r,d){var h=e("./dom");r.get=function(f,v){var o=new XMLHttpRequest;o.open("GET",f,!0),o.onreadystatechange=function(){o.readyState===4&&v(o.responseText)},o.send(null)},r.loadScript=function(f,v){var o=h.getDocumentHead(),p=document.createElement("script");p.src=f,o.appendChild(p),p.onload=p.onreadystatechange=function(i,a){(a||!p.readyState||p.readyState=="loaded"||p.readyState=="complete")&&(p=p.onload=p.onreadystatechange=null,a||v())}},r.qualifyURL=function(f){var v=document.createElement("a");return v.href=f,v.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,r,d){r.inherits=function(h,f){h.super_=f,h.prototype=Object.create(f.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(h,f){for(var v in f)h[v]=f[v];return h},r.implement=function(h,f){r.mixin(h,f)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,r,d){var h={},f=function(){this.propagationStopped=!0},v=function(){this.defaultPrevented=!0};h._emit=h._dispatchEvent=function(o,p){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[o]||[],a=this._defaultHandlers[o];if(!(!i.length&&!a)){(typeof p!="object"||!p)&&(p={}),p.type||(p.type=o),p.stopPropagation||(p.stopPropagation=f),p.preventDefault||(p.preventDefault=v),i=i.slice();for(var u=0;u<i.length&&(i[u](p,this),!p.propagationStopped);u++);if(a&&!p.defaultPrevented)return a(p,this)}},h._signal=function(o,p){var i=(this._eventRegistry||{})[o];if(i){i=i.slice();for(var a=0;a<i.length;a++)i[a](p,this)}},h.once=function(o,p){var i=this;if(this.on(o,function a(){i.off(o,a),p.apply(null,arguments)}),!p)return new Promise(function(a){p=a})},h.setDefaultHandler=function(o,p){var i=this._defaultHandlers;if(i||(i=this._defaultHandlers={_disabled_:{}}),i[o]){var a=i[o],u=i._disabled_[o];u||(i._disabled_[o]=u=[]),u.push(a);var g=u.indexOf(p);g!=-1&&u.splice(g,1)}i[o]=p},h.removeDefaultHandler=function(o,p){var i=this._defaultHandlers;if(i){var a=i._disabled_[o];if(i[o]==p)a&&this.setDefaultHandler(o,a.pop());else if(a){var u=a.indexOf(p);u!=-1&&a.splice(u,1)}}},h.on=h.addEventListener=function(o,p,i){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[o];return a||(a=this._eventRegistry[o]=[]),a.indexOf(p)==-1&&a[i?"unshift":"push"](p),p},h.off=h.removeListener=h.removeEventListener=function(o,p){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[o];if(i){var a=i.indexOf(p);a!==-1&&i.splice(a,1)}},h.removeAllListeners=function(o){o||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[o]=void 0),this._defaultHandlers&&(this._defaultHandlers[o]=void 0)},r.EventEmitter=h}),ace.define("ace/lib/report_error",["require","exports","module"],function(e,r,d){r.reportError=function(h,f){var v=new Error(h);v.data=f,typeof console=="object"&&console.error&&console.error(v),setTimeout(function(){throw v})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(e,r,d){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(e,r,d){"no use strict";var h=e("./oop"),f=e("./event_emitter").EventEmitter,v=e("./report_error").reportError,o=e("./default_english_messages").defaultEnglishMessages,p={setOptions:function(s){Object.keys(s).forEach(function(c){this.setOption(c,s[c])},this)},getOptions:function(s){var c={};if(s)Array.isArray(s)||(s=Object.keys(s));else{var m=this.$options;s=Object.keys(m).filter(function(w){return!m[w].hidden})}return s.forEach(function(w){c[w]=this.getOption(w)},this),c},setOption:function(s,c){if(this["$"+s]!==c){var m=this.$options[s];if(!m)return i('misspelled option "'+s+'"');if(m.forwardTo)return this[m.forwardTo]&&this[m.forwardTo].setOption(s,c);m.handlesSet||(this["$"+s]=c),m&&m.set&&m.set.call(this,c)}},getOption:function(s){var c=this.$options[s];return c?c.forwardTo?this[c.forwardTo]&&this[c.forwardTo].getOption(s):c&&c.get?c.get.call(this):this["$"+s]:i('misspelled option "'+s+'"')}};function i(s){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var a,u,g=(function(){function s(){this.$defaultOptions={},a=o,u="dollarSigns"}return s.prototype.defineOptions=function(c,m,w){return c.$options||(this.$defaultOptions[m]=c.$options={}),Object.keys(w).forEach(function(x){var R=w[x];typeof R=="string"&&(R={forwardTo:R}),R.name||(R.name=x),c.$options[R.name]=R,"initialValue"in R&&(c["$"+R.name]=R.initialValue)}),h.implement(c,p),this},s.prototype.resetOptions=function(c){Object.keys(c.$options).forEach(function(m){var w=c.$options[m];"value"in w&&c.setOption(m,w.value)})},s.prototype.setDefaultValue=function(c,m,w){if(!c){for(c in this.$defaultOptions)if(this.$defaultOptions[c][m])break;if(!this.$defaultOptions[c][m])return!1}var x=this.$defaultOptions[c]||(this.$defaultOptions[c]={});x[m]&&(x.forwardTo?this.setDefaultValue(x.forwardTo,m,w):x[m].value=w)},s.prototype.setDefaultValues=function(c,m){Object.keys(m).forEach(function(w){this.setDefaultValue(c,w,m[w])},this)},s.prototype.setMessages=function(c,m){a=c,m&&m.placeholders&&(u=m.placeholders)},s.prototype.nls=function(c,m,w){a[c]||(i("No message found for the key '"+c+"' in messages with id "+a.$id+", trying to find a translation for the default string '"+m+"'."),a[m]||i("No message found for the default string '"+m+"' in the provided messages. Falling back to the default English message."));var x=a[c]||a[m]||m;return w&&(u==="dollarSigns"&&(x=x.replace(/\$(\$|[\d]+)/g,function(R,S){return S=="$"?"$":w[S]})),u==="curlyBrackets"&&(x=x.replace(/\{([^\}]+)\}/g,function(R,S){return w[S]}))),x},s})();g.prototype.warn=i,g.prototype.reportError=v,h.implement(g.prototype,f),r.AppConfig=g}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(e,r,d){d.exports=`.ace-tm .ace_gutter {
|
|
12
|
+
background: #f0f0f0;
|
|
13
|
+
color: #333;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ace-tm .ace_print-margin {
|
|
17
|
+
width: 1px;
|
|
18
|
+
background: #e8e8e8;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.ace-tm .ace_fold {
|
|
22
|
+
background-color: #6B72E6;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ace-tm {
|
|
26
|
+
background-color: #FFFFFF;
|
|
27
|
+
color: black;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ace-tm .ace_cursor {
|
|
31
|
+
color: black;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.ace-tm .ace_invisible {
|
|
35
|
+
color: rgb(191, 191, 191);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ace-tm .ace_storage,
|
|
39
|
+
.ace-tm .ace_keyword {
|
|
40
|
+
color: blue;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ace-tm .ace_constant {
|
|
44
|
+
color: rgb(197, 6, 11);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.ace-tm .ace_constant.ace_buildin {
|
|
48
|
+
color: rgb(88, 72, 246);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.ace-tm .ace_constant.ace_language {
|
|
52
|
+
color: rgb(88, 92, 246);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ace-tm .ace_constant.ace_library {
|
|
56
|
+
color: rgb(6, 150, 14);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.ace-tm .ace_invalid {
|
|
60
|
+
background-color: rgba(255, 0, 0, 0.1);
|
|
61
|
+
color: red;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.ace-tm .ace_support.ace_function {
|
|
65
|
+
color: rgb(60, 76, 114);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.ace-tm .ace_support.ace_constant {
|
|
69
|
+
color: rgb(6, 150, 14);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.ace-tm .ace_support.ace_type,
|
|
73
|
+
.ace-tm .ace_support.ace_class {
|
|
74
|
+
color: rgb(109, 121, 222);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.ace-tm .ace_keyword.ace_operator {
|
|
78
|
+
color: rgb(104, 118, 135);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.ace-tm .ace_string {
|
|
82
|
+
color: rgb(3, 106, 7);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.ace-tm .ace_comment {
|
|
86
|
+
color: rgb(76, 136, 107);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.ace-tm .ace_comment.ace_doc {
|
|
90
|
+
color: rgb(0, 102, 255);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.ace-tm .ace_comment.ace_doc.ace_tag {
|
|
94
|
+
color: rgb(128, 159, 191);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.ace-tm .ace_constant.ace_numeric {
|
|
98
|
+
color: rgb(0, 0, 205);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.ace-tm .ace_variable {
|
|
102
|
+
color: rgb(49, 132, 149);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.ace-tm .ace_xml-pe {
|
|
106
|
+
color: rgb(104, 104, 91);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.ace-tm .ace_entity.ace_name.ace_function {
|
|
110
|
+
color: #0000A2;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
.ace-tm .ace_heading {
|
|
115
|
+
color: rgb(12, 7, 255);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.ace-tm .ace_list {
|
|
119
|
+
color:rgb(185, 6, 144);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.ace-tm .ace_meta.ace_tag {
|
|
123
|
+
color:rgb(0, 22, 142);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.ace-tm .ace_string.ace_regex {
|
|
127
|
+
color: rgb(255, 0, 0)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.ace-tm .ace_marker-layer .ace_selection {
|
|
131
|
+
background: rgb(181, 213, 255);
|
|
132
|
+
}
|
|
133
|
+
.ace-tm.ace_multiselect .ace_selection.ace_start {
|
|
134
|
+
box-shadow: 0 0 3px 0px white;
|
|
135
|
+
}
|
|
136
|
+
.ace-tm .ace_marker-layer .ace_step {
|
|
137
|
+
background: rgb(252, 255, 0);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.ace-tm .ace_marker-layer .ace_stack {
|
|
141
|
+
background: rgb(164, 229, 101);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.ace-tm .ace_marker-layer .ace_bracket {
|
|
145
|
+
margin: -1px 0 0 -1px;
|
|
146
|
+
border: 1px solid rgb(192, 192, 192);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.ace-tm .ace_marker-layer .ace_active-line {
|
|
150
|
+
background: rgba(0, 0, 0, 0.07);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.ace-tm .ace_gutter-active-line {
|
|
154
|
+
background-color : #dcdcdc;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.ace-tm .ace_marker-layer .ace_selected-word {
|
|
158
|
+
background: rgb(250, 250, 255);
|
|
159
|
+
border: 1px solid rgb(200, 200, 250);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.ace-tm .ace_indent-guide {
|
|
163
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.ace-tm .ace_indent-guide-active {
|
|
167
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
|
168
|
+
}
|
|
169
|
+
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(e,r,d){r.isDark=!1,r.cssClass="ace-tm",r.cssText=e("./textmate-css"),r.$id="ace/theme/textmate";var h=e("../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(e,r,d){"no use strict";var h=e("./lib/lang"),f=e("./lib/net"),v=e("./lib/dom"),o=e("./lib/app_config").AppConfig;d.exports=r=new o;var p={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(g){if(!p.hasOwnProperty(g))throw new Error("Unknown config key: "+g);return p[g]},r.set=function(g,s){if(p.hasOwnProperty(g))p[g]=s;else if(this.setDefaultValue("",g,s)==!1)throw new Error("Unknown config key: "+g);g=="useStrictCSP"&&v.useStrictCSP(s)},r.all=function(){return h.copyObject(p)},r.$modes={},r.moduleUrl=function(g,s){if(p.$moduleUrls[g])return p.$moduleUrls[g];var c=g.split("/");s=s||c[c.length-2]||"";var m=s=="snippets"?"/":"-",w=c[c.length-1];if(s=="worker"&&m=="-"){var x=new RegExp("^"+s+"[\\-_]|[\\-_]"+s+"$","g");w=w.replace(x,"")}(!w||w==s)&&c.length>1&&(w=c[c.length-2]);var R=p[s+"Path"];return R==null?R=p.basePath:m=="/"&&(s=m=""),R&&R.slice(-1)!="/"&&(R+="/"),R+s+m+w+this.get("suffix")},r.setModuleUrl=function(g,s){return p.$moduleUrls[g]=s};var i=function(g,s){if(g==="ace/theme/textmate"||g==="./theme/textmate")return s(null,e("./theme/textmate"));if(a)return a(g,s);console.error("loader is not configured")},a;r.setLoader=function(g){a=g},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(g,s){var c;if(Array.isArray(g))var m=g[0],w=g[1];else if(typeof g=="string")var w=g;var x=function(R){if(R&&!r.$loading[w])return s&&s(R);if(r.$loading[w]||(r.$loading[w]=[]),r.$loading[w].push(s),!(r.$loading[w].length>1)){var S=function(){i(w,function(A,C){C&&(r.$loaded[w]=C),r._emit("load.module",{name:w,module:C});var O=r.$loading[w];r.$loading[w]=null,O.forEach(function(N){N&&N(C)})})};if(!r.get("packaged"))return S();f.loadScript(r.moduleUrl(w,m),S),u()}};if(r.dynamicModules[w])r.dynamicModules[w]().then(function(R){R.default?x(R.default):x(R)});else{try{c=this.$require(w)}catch{}x(c||r.$loaded[w])}},r.$require=function(g){if(typeof d.require=="function"){var s="require";return d[s](g)}},r.setModuleLoader=function(g,s){r.dynamicModules[g]=s};var u=function(){!p.basePath&&!p.workerPath&&!p.modePath&&!p.themePath&&!Object.keys(p.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),u=function(){})};r.version="1.44.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,r,d){e("./lib/fixoldbrowsers");var h=e("./config");h.setLoader(function(p,i){e([p],function(a){i(null,a)})});var f=(function(){return this||typeof window<"u"&&window})();d.exports=function(p){h.init=v,h.$require=e,p.require=e},v(!0);function v(p){if(!(!f||!f.document)){h.set("packaged",p||e.packaged||d.packaged||f.define&&(void 0).packaged);var i={},a="",u=document.currentScript||document._currentScript,g=u&&u.ownerDocument||document;u&&u.src&&(a=u.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var s=g.getElementsByTagName("script"),c=0;c<s.length;c++){var m=s[c],w=m.src||m.getAttribute("src");if(w){for(var x=m.attributes,R=0,S=x.length;R<S;R++){var A=x[R];A.name.indexOf("data-ace-")===0&&(i[o(A.name.replace(/^data-ace-/,""))]=A.value)}var C=w.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);C&&(a=C[1])}}a&&(i.base=i.base||a,i.packaged=!0),i.basePath=i.base,i.workerPath=i.workerPath||i.base,i.modePath=i.modePath||i.base,i.themePath=i.themePath||i.base,delete i.base;for(var O in i)typeof i[O]<"u"&&h.set(O,i[O])}}function o(p){return p.replace(/-(.)/g,function(i,a){return a.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(e,r,d){var h=(function(){function f(v,o,p,i){this.start={row:v,column:o},this.end={row:p,column:i}}return f.prototype.isEqual=function(v){return this.start.row===v.start.row&&this.end.row===v.end.row&&this.start.column===v.start.column&&this.end.column===v.end.column},f.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},f.prototype.contains=function(v,o){return this.compare(v,o)==0},f.prototype.compareRange=function(v){var o,p=v.end,i=v.start;return o=this.compare(p.row,p.column),o==1?(o=this.compare(i.row,i.column),o==1?2:o==0?1:0):o==-1?-2:(o=this.compare(i.row,i.column),o==-1?-1:o==1?42:0)},f.prototype.comparePoint=function(v){return this.compare(v.row,v.column)},f.prototype.containsRange=function(v){return this.comparePoint(v.start)==0&&this.comparePoint(v.end)==0},f.prototype.intersects=function(v){var o=this.compareRange(v);return o==-1||o==0||o==1},f.prototype.isEnd=function(v,o){return this.end.row==v&&this.end.column==o},f.prototype.isStart=function(v,o){return this.start.row==v&&this.start.column==o},f.prototype.setStart=function(v,o){typeof v=="object"?(this.start.column=v.column,this.start.row=v.row):(this.start.row=v,this.start.column=o)},f.prototype.setEnd=function(v,o){typeof v=="object"?(this.end.column=v.column,this.end.row=v.row):(this.end.row=v,this.end.column=o)},f.prototype.inside=function(v,o){return this.compare(v,o)==0?!(this.isEnd(v,o)||this.isStart(v,o)):!1},f.prototype.insideStart=function(v,o){return this.compare(v,o)==0?!this.isEnd(v,o):!1},f.prototype.insideEnd=function(v,o){return this.compare(v,o)==0?!this.isStart(v,o):!1},f.prototype.compare=function(v,o){return!this.isMultiLine()&&v===this.start.row?o<this.start.column?-1:o>this.end.column?1:0:v<this.start.row?-1:v>this.end.row?1:this.start.row===v?o>=this.start.column?0:-1:this.end.row===v?o<=this.end.column?0:1:0},f.prototype.compareStart=function(v,o){return this.start.row==v&&this.start.column==o?-1:this.compare(v,o)},f.prototype.compareEnd=function(v,o){return this.end.row==v&&this.end.column==o?1:this.compare(v,o)},f.prototype.compareInside=function(v,o){return this.end.row==v&&this.end.column==o?1:this.start.row==v&&this.start.column==o?-1:this.compare(v,o)},f.prototype.clipRows=function(v,o){if(this.end.row>o)var p={row:o+1,column:0};else if(this.end.row<v)var p={row:v,column:0};if(this.start.row>o)var i={row:o+1,column:0};else if(this.start.row<v)var i={row:v,column:0};return f.fromPoints(i||this.start,p||this.end)},f.prototype.extend=function(v,o){var p=this.compare(v,o);if(p==0)return this;if(p==-1)var i={row:v,column:o};else var a={row:v,column:o};return f.fromPoints(i||this.start,a||this.end)},f.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},f.prototype.isMultiLine=function(){return this.start.row!==this.end.row},f.prototype.clone=function(){return f.fromPoints(this.start,this.end)},f.prototype.collapseRows=function(){return this.end.column==0?new f(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new f(this.start.row,0,this.end.row,0)},f.prototype.toScreenRange=function(v){var o=v.documentToScreenPosition(this.start),p=v.documentToScreenPosition(this.end);return new f(o.row,o.column,p.row,p.column)},f.prototype.moveBy=function(v,o){this.start.row+=v,this.start.column+=o,this.end.row+=v,this.end.column+=o},f})();h.fromPoints=function(f,v){return new h(f.row,f.column,v.row,v.column)},h.comparePoints=function(f,v){return f.row-v.row||f.column-v.column},r.Range=h}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,r,d){for(var h=e("./oop"),f={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:"*"}},v={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},o=0;o<10;o++)v["Digit"+o]=48+o,v["Numpad"+o]=96+o,f.PRINTABLE_KEYS[48+o]=""+o,f.FUNCTION_KEYS[96+o]="Numpad"+o;for(var o=65;o<91;o++){var p=String.fromCharCode(o+32);v["Key"+p.toUpperCase()]=o,f.PRINTABLE_KEYS[o]=p}for(var o=1;o<13;o++)v["F"+o]=111+o,f.FUNCTION_KEYS[111+o]="F"+o;var i={Shift:16,Control:17,Alt:18,Meta:224};for(var a in i)v[a]=v[a+"Left"]=v[a+"Right"]=i[a];r.$codeToKeyCode=v,f.PRINTABLE_KEYS[173]="-";for(var u in f.FUNCTION_KEYS){var g=f.FUNCTION_KEYS[u].toLowerCase();f[g]=parseInt(u,10)}for(var u in f.PRINTABLE_KEYS){var g=f.PRINTABLE_KEYS[u].toLowerCase();f[g]=parseInt(u,10)}h.mixin(f,f.MODIFIER_KEYS),h.mixin(f,f.PRINTABLE_KEYS),h.mixin(f,f.FUNCTION_KEYS),f.enter=f.return,f.escape=f.esc,f.del=f.delete,(function(){for(var s=["cmd","ctrl","alt","shift"],c=Math.pow(2,s.length);c--;)f.KEY_MODS[c]=s.filter(function(m){return c&f.KEY_MODS[m]}).join("-")+"-"})(),f.KEY_MODS[0]="",f.KEY_MODS[-1]="input-",h.mixin(r,f),r.default=r,r.keyCodeToString=function(s){var c=f[s];return typeof c!="string"&&(c=String.fromCharCode(s)),c.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,d){var h=e("./keys"),f=e("./useragent"),v=null,o=0,p;function i(){p=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return p={passive:!1},!0}})}catch{}}function a(){return p==null&&i(),p}function u(R,S,A){this.elem=R,this.type=S,this.callback=A}u.prototype.destroy=function(){s(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var g=r.addListener=function(R,S,A,C){R.addEventListener(S,A,a()),C&&C.$toDestroy.push(new u(R,S,A))},s=r.removeListener=function(R,S,A){R.removeEventListener(S,A,a())};r.stopEvent=function(R){return r.stopPropagation(R),r.preventDefault(R),!1},r.stopPropagation=function(R){R.stopPropagation&&R.stopPropagation()},r.preventDefault=function(R){R.preventDefault&&R.preventDefault()},r.getButton=function(R){return R.type=="dblclick"?0:R.type=="contextmenu"||f.isMac&&R.ctrlKey&&!R.altKey&&!R.shiftKey?2:R.button},r.capture=function(R,S,A){var C=R&&R.ownerDocument||document;function O(N){S&&S(N),A&&A(N),s(C,"mousemove",S),s(C,"mouseup",O),s(C,"dragstart",O)}return g(C,"mousemove",S),g(C,"mouseup",O),g(C,"dragstart",O),O},r.addMouseWheelListener=function(R,S,A){g(R,"wheel",function(C){var O=.15,N=C.deltaX||0,M=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=N*O,C.wheelY=M*O;break;case C.DOM_DELTA_LINE:var L=15;C.wheelX=N*L,C.wheelY=M*L;break;case C.DOM_DELTA_PAGE:var j=150;C.wheelX=N*j,C.wheelY=M*j;break}S(C)},A)},r.addMultiMouseDownListener=function(R,S,A,C,O){var N=0,M,L,j,F={2:"dblclick",3:"tripleclick",4:"quadclick"};function D($){if(r.getButton($)!==0?N=0:$.detail>1?(N++,N>4&&(N=1)):N=1,f.isIE){var _=Math.abs($.clientX-M)>5||Math.abs($.clientY-L)>5;(!j||_)&&(N=1),j&&clearTimeout(j),j=setTimeout(function(){j=null},S[N-1]||600),N==1&&(M=$.clientX,L=$.clientY)}if($._clicks=N,A[C]("mousedown",$),N>4)N=0;else if(N>1)return A[C](F[N],$)}Array.isArray(R)||(R=[R]),R.forEach(function($){g($,"mousedown",D,O)})};function c(R){return 0|(R.ctrlKey?1:0)|(R.altKey?2:0)|(R.shiftKey?4:0)|(R.metaKey?8:0)}r.getModifierString=function(R){return h.KEY_MODS[c(R)]};function m(R,S,A){var C=c(S);if(!A&&S.code&&(A=h.$codeToKeyCode[S.code]||A),!f.isMac&&v){if(S.getModifierState&&(S.getModifierState("OS")||S.getModifierState("Win"))&&(C|=8),v.altGr)if((3&C)!=3)v.altGr=0;else return;if(A===18||A===17){var O=S.location;if(A===17&&O===1)v[A]==1&&(o=S.timeStamp);else if(A===18&&C===3&&O===2){var N=S.timeStamp-o;N<50&&(v.altGr=!0)}}}if(A in h.MODIFIER_KEYS&&(A=-1),!(!C&&A===13&&S.location===3&&(R(S,C,-A),S.defaultPrevented))){if(f.isChromeOS&&C&8){if(R(S,C,A),S.defaultPrevented)return;C&=-9}return!C&&!(A in h.FUNCTION_KEYS)&&!(A in h.PRINTABLE_KEYS)?!1:R(S,C,A)}}r.addCommandKeyListener=function(R,S,A){var C=null;g(R,"keydown",function(O){v[O.keyCode]=(v[O.keyCode]||0)+1;var N=m(S,O,O.keyCode);return C=O.defaultPrevented,N},A),g(R,"keypress",function(O){C&&(O.ctrlKey||O.altKey||O.shiftKey||O.metaKey)&&(r.stopEvent(O),C=null)},A),g(R,"keyup",function(O){v[O.keyCode]=null},A),v||(w(),g(window,"focus",w))};function w(){v=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!f.isOldIE){var x=1;r.nextTick=function(R,S){S=S||window;var A="zero-timeout-message-"+x++,C=function(O){O.data==A&&(r.stopPropagation(O),s(S,"message",C),R())};g(S,"message",C),S.postMessage(A,"*")}}r.$idleBlocked=!1,r.onIdle=function(R,S){return setTimeout(function A(){r.$idleBlocked?setTimeout(A,100):R()},S)},r.$idleBlockId=null,r.blockIdle=function(R){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},R||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(R){setTimeout(R,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,r,d){var h;d.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(e,r,d){var h=e("../lib/event"),f=e("../config").nls,v=e("../lib/useragent"),o=e("../lib/dom"),p=e("../lib/lang"),i=e("../clipboard"),a=v.isChrome<18,u=v.isIE,g=v.isChrome>63,s=400,c=e("../lib/keys"),m=c.KEY_MODS,w=v.isIOS,x=w?/\s/:/\n/,R=v.isMobile,S=(function(){function A(C,O){var N=this;this.host=O,this.text=o.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",C.insertBefore(this.text,C.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",R||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),h.addListener(this.text,"blur",function(M){N.ignoreFocusEvents||(O.onBlur(M),N.$isFocused=!1)},O),h.addListener(this.text,"focus",function(M){if(!N.ignoreFocusEvents){if(N.$isFocused=!0,v.isEdge)try{if(!document.hasFocus())return}catch{}O.onFocus(M),v.isEdge?setTimeout(N.resetSelection.bind(N)):N.resetSelection()}},O),this.$focusScroll=!1,O.on("beforeEndOperation",function(){var M=O.curOp,L=M&&M.command&&M.command.name;if(L!="insertstring"){var j=L&&(M.docChanged||M.selectionChanged);N.inComposition&&j&&(N.lastValue=N.text.value="",N.onCompositionEnd()),N.resetSelection()}}),O.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=w?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&O.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,h.addCommandKeyListener(this.text,function(M,L,j){if(!N.inComposition)return O.onCommandKey(M,L,j)},O),h.addListener(this.text,"select",this.onSelect.bind(this),O),h.addListener(this.text,"input",this.onInput.bind(this),O),h.addListener(this.text,"cut",this.onCut.bind(this),O),h.addListener(this.text,"copy",this.onCopy.bind(this),O),h.addListener(this.text,"paste",this.onPaste.bind(this),O),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&h.addListener(C,"keydown",function(M){if(!(v.isMac&&!M.metaKey||!M.ctrlKey))switch(M.keyCode){case 67:N.onCopy(M);break;case 86:N.onPaste(M);break;case 88:N.onCut(M);break}},O),this.syncComposition=p.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),h.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),O),h.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),O),h.addListener(this.text,"keyup",this.onKeyup.bind(this),O),h.addListener(this.text,"keydown",this.syncComposition.bind(this),O),h.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),O),this.closeTimeout,h.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),O),h.addListener(this.text,"mousedown",function(M){M.preventDefault(),N.onContextMenuClose()},O),h.addListener(O.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),O),h.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),O),w&&this.addIosSelectionHandler(C,O,this.text)}return A.prototype.addIosSelectionHandler=function(C,O,N){var M=this,L=null,j=!1;N.addEventListener("keydown",function(D){L&&clearTimeout(L),j=!0},!0),N.addEventListener("keyup",function(D){L=setTimeout(function(){j=!1},100)},!0);var F=function(D){if(document.activeElement===N&&!(j||M.inComposition||O.$mouseHandler.isMousePressed)&&!M.copied){var $=N.selectionStart,_=N.selectionEnd,I=null,z=0;if($==0?I=c.up:$==1?I=c.home:_>M.lastSelectionEnd&&M.lastValue[_]==`
|
|
170
|
+
`?I=c.end:$<M.lastSelectionStart&&M.lastValue[$-1]==" "?(I=c.left,z=m.option):$<M.lastSelectionStart||$==M.lastSelectionStart&&M.lastSelectionEnd!=M.lastSelectionStart&&$==_?I=c.left:_>M.lastSelectionEnd&&M.lastValue.slice(0,_).split(`
|
|
171
|
+
`).length>2?I=c.down:_>M.lastSelectionEnd&&M.lastValue[_-1]==" "?(I=c.right,z=m.option):(_>M.lastSelectionEnd||_==M.lastSelectionEnd&&M.lastSelectionEnd!=M.lastSelectionStart&&$==_)&&(I=c.right),$!==_&&(z|=m.shift),I){var U=O.onCommandKey({},z,I);if(!U&&O.commands){I=c.keyCodeToString(I);var V=O.commands.findKeyCommand(z,I);V&&O.execCommand(V)}M.lastSelectionStart=$,M.lastSelectionEnd=_,M.resetSelection("")}}};document.addEventListener("selectionchange",F),O.on("destroy",function(){document.removeEventListener("selectionchange",F)})},A.prototype.onContextMenuClose=function(){var C=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){C.tempStyle&&(C.text.style.cssText=C.tempStyle,C.tempStyle=""),C.host.renderer.$isMousePressed=!1,C.host.renderer.$keepTextAreaAtCursor&&C.host.renderer.$moveTextAreaToCursor()},0)},A.prototype.$onContextMenu=function(C){this.host.textInput.onContextMenu(C),this.onContextMenuClose()},A.prototype.onKeyup=function(C){C.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},A.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},A.prototype.onCompositionStart=function(C){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){C.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var O=this.host.getSelectionRange();O.end.row=O.start.row,O.end.column=O.start.column,this.inComposition.markerRange=O,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},A.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var C=this.text.value;this.sendText(C),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},A.prototype.onCompositionEnd=function(C){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),C&&this.onInput())},A.prototype.onCut=function(C){this.doCopy(C,!0)},A.prototype.onCopy=function(C){this.doCopy(C,!1)},A.prototype.onPaste=function(C){var O=this.handleClipboardData(C);i.pasteCancelled()||(typeof O=="string"?(O&&this.host.onPaste(O,C),v.isIE&&setTimeout(this.resetSelection),h.preventDefault(C)):(this.text.value="",this.pasted=!0))},A.prototype.doCopy=function(C,O){var N=this,M=this.host.getCopyText();if(!M)return h.preventDefault(C);this.handleClipboardData(C,M)?(w&&(this.resetSelection(M),this.copied=M,setTimeout(function(){N.copied=!1},10)),O?this.host.onCut():this.host.onCopy(),h.preventDefault(C)):(this.copied=!0,this.text.value=M,this.text.select(),setTimeout(function(){N.copied=!1,N.resetSelection(),O?N.host.onCut():N.host.onCopy()}))},A.prototype.handleClipboardData=function(C,O,N){var M=C.clipboardData||window.clipboardData;if(!(!M||a)){var L=u||N?"Text":"text/plain";try{return O?M.setData(L,O)!==!1:M.getData(L)}catch(j){if(!N)return this.handleClipboardData(j,O,!0)}}},A.prototype.onInput=function(C){if(this.inComposition)return this.onCompositionUpdate();if(C&&C.inputType){if(C.inputType=="historyUndo")return this.host.execCommand("undo");if(C.inputType=="historyRedo")return this.host.execCommand("redo")}var O=this.text.value,N=this.sendText(O,!0);(O.length>s+100||x.test(N)||R&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},A.prototype.sendText=function(C,O){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),C&&this.host.onPaste(C),this.pasted=!1,"";for(var N=this.text.selectionStart,M=this.text.selectionEnd,L=this.lastSelectionStart,j=this.lastValue.length-this.lastSelectionEnd,F=C,D=C.length-N,$=C.length-M,_=0;L>0&&this.lastValue[_]==C[_];)_++,L--;for(F=F.slice(_),_=1;j>0&&this.lastValue.length-_>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-_]==C[C.length-_];)_++,j--;D-=_-1,$-=_-1;var I=F.length-_+1;if(I<0&&(L=-I,I=0),F=F.slice(0,I),!O&&!F&&!D&&!L&&!j&&!$)return"";this.sendingText=!0;var z=!1;return v.isAndroid&&F==". "&&(F=" ",z=!0),F&&!L&&!j&&!D&&!$||this.commandMode?this.host.onTextInput(F):this.host.onTextInput(F,{extendLeft:L,extendRight:j,restoreStart:D,restoreEnd:$}),this.sendingText=!1,this.lastValue=C,this.lastSelectionStart=N,this.lastSelectionEnd=M,this.lastRestoreEnd=$,z?`
|
|
172
|
+
`:F},A.prototype.onSelect=function(C){var O=this;if(!this.inComposition){var N=function(M){return M.selectionStart===0&&M.selectionEnd>=O.lastValue.length&&M.value===O.lastValue&&O.lastValue&&M.selectionEnd!==O.lastSelectionEnd};this.copied?this.copied=!1:N(this.text)?(this.host.selectAll(),this.resetSelection()):R&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},A.prototype.$resetSelectionIOS=function(C){if(!(!this.$isFocused||this.copied&&!C||this.sendingText)){C||(C="");var O=`
|
|
173
|
+
ab`+C+`cde fg
|
|
174
|
+
`;O!=this.text.value&&(this.text.value=this.lastValue=O);var N=4,M=4+(C.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=N||this.lastSelectionEnd!=M)&&this.text.setSelectionRange(N,M),this.lastSelectionStart=N,this.lastSelectionEnd=M}},A.prototype.$resetSelection=function(){var C=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var O=0,N=0,M="",L=function(V,K){for(var Z=K,oe=1;oe<=V-C.rowStart&&oe<2*C.numberOfExtraLines+1;oe++)Z+=C.host.session.getLine(V-oe).length+1;return Z};if(this.host.session){var j=this.host.selection,F=j.getRange(),D=j.cursor.row;D===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):D===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(D<this.rowStart-1||D>this.rowEnd+1)&&(this.rowStart=D>this.numberOfExtraLines?D-this.numberOfExtraLines:0,this.rowEnd=D>this.numberOfExtraLines?D+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var $=[],_=this.rowStart;_<=this.rowEnd;_++)$.push(this.host.session.getLine(_));if(M=$.join(`
|
|
175
|
+
`),O=L(F.start.row,F.start.column),N=L(F.end.row,F.end.column),F.start.row<this.rowStart){var I=this.host.session.getLine(this.rowStart-1);O=F.start.row<this.rowStart-1?0:O,N+=I.length+1,M=I+`
|
|
176
|
+
`+M}else if(F.end.row>this.rowEnd){var z=this.host.session.getLine(this.rowEnd+1);N=F.end.row>this.rowEnd+1?z.length:F.end.column,N+=M.length+1,M=M+`
|
|
177
|
+
`+z}else R&&D>0&&(M=`
|
|
178
|
+
`+M,N+=1,O+=1);M.length>s&&(O<s&&N<s?M=M.slice(0,s):(M=`
|
|
179
|
+
`,O==N?O=N=0:(O=0,N=1)));var U=M+`
|
|
180
|
+
|
|
181
|
+
`;U!=this.lastValue&&(this.text.value=this.lastValue=U,this.lastSelectionStart=this.lastSelectionEnd=U.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=N||this.lastSelectionStart!=O||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(O,N),this.lastSelectionStart=O,this.lastSelectionEnd=N}catch{}this.inComposition=!1}},A.prototype.setHost=function(C){this.host=C},A.prototype.setNumberOfExtraLines=function(C){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,C<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=C},A.prototype.setAriaLabel=function(){var C="";if(this.host.$textInputAriaLabel&&(C+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var O=this.host.session.selection.cursor.row;C+=f("text-input.aria-label","Cursor at row $0",[O+1])}this.text.setAttribute("aria-label",C)},A.prototype.setAriaOptions=function(C){C.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",C.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",C.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),C.role&&this.text.setAttribute("role",C.role),C.setLabel&&(this.text.setAttribute("aria-roledescription",f("text-input.aria-roledescription","editor")),this.setAriaLabel())},A.prototype.focus=function(){var C=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||g||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var O=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var N=this.text.getBoundingClientRect().top!=0}catch{return}var M=[];if(N)for(var L=this.text.parentElement;L&&L.nodeType==1;)M.push(L),L.setAttribute("ace_nocontext","true"),!L.parentElement&&L.getRootNode?L=L.getRootNode().host:L=L.parentElement;this.text.focus({preventScroll:!0}),N&&M.forEach(function(j){j.removeAttribute("ace_nocontext")}),setTimeout(function(){C.text.style.position="",C.text.style.top=="0px"&&(C.text.style.top=O)},0)},A.prototype.blur=function(){this.text.blur()},A.prototype.isFocused=function(){return this.$isFocused},A.prototype.setInputHandler=function(C){this.inputHandler=C},A.prototype.getInputHandler=function(){return this.inputHandler},A.prototype.getElement=function(){return this.text},A.prototype.setCommandMode=function(C){this.commandMode=C,this.text.readOnly=!1},A.prototype.setReadOnly=function(C){this.commandMode||(this.text.readOnly=C)},A.prototype.setCopyWithEmptySelection=function(C){},A.prototype.onContextMenu=function(C){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:C}),this.moveToMouse(C,!0)},A.prototype.moveToMouse=function(C,O){var N=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(O?"z-index:100000;":"")+(v.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var M=this.host.container.getBoundingClientRect(),L=o.computedStyle(this.host.container),j=M.top+(parseInt(L.borderTopWidth)||0),F=M.left+(parseInt(L.borderLeftWidth)||0),D=M.bottom-j-this.text.clientHeight-2,$=function(_){o.translate(N.text,_.clientX-F-2,Math.min(_.clientY-j-2,D))};$(C),C.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),v.isWin&&h.capture(this.host.container,$,this.onContextMenuClose.bind(this)))},A.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},A})();r.TextInput=S,r.$setUserAgentForTests=function(A,C){R=A,w=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,r,d){var h=e("../lib/useragent"),f=0,v=550,o=(function(){function a(u){u.$clickSelection=null;var g=u.editor;g.setDefaultHandler("mousedown",this.onMouseDown.bind(u)),g.setDefaultHandler("dblclick",this.onDoubleClick.bind(u)),g.setDefaultHandler("tripleclick",this.onTripleClick.bind(u)),g.setDefaultHandler("quadclick",this.onQuadClick.bind(u)),g.setDefaultHandler("mousewheel",this.onMouseWheel.bind(u));var s=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];s.forEach(function(c){u[c]=this[c]},this),u.selectByLines=this.extendSelectionBy.bind(u,"getLineRange"),u.selectByWords=this.extendSelectionBy.bind(u,"getWordRange")}return a.prototype.onMouseDown=function(u){var g=u.inSelection(),s=u.getDocumentPosition();this.mousedownEvent=u;var c=this.editor,m=u.getButton();if(m!==0){var w=c.getSelectionRange(),x=w.isEmpty();(x||m==1)&&c.selection.moveToPosition(s),m==2&&(c.textInput.onContextMenu(u.domEvent),h.isMozilla||u.preventDefault());return}if(this.mousedownEvent.time=Date.now(),g&&!c.isFocused()&&(c.focus(),this.$focusTimeout&&!this.$clickSelection&&!c.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(u);return}return this.captureMouse(u),this.startSelect(s,u.domEvent._clicks>1),u.preventDefault()},a.prototype.startSelect=function(u,g){u=u||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var s=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?s.selection.selectToPosition(u):g||s.selection.moveToPosition(u),g||this.select(),s.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var u,g=this.editor,s=g.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var c=this.$clickSelection.comparePoint(s);if(c==-1)u=this.$clickSelection.end;else if(c==1)u=this.$clickSelection.start;else{var m=i(this.$clickSelection,s,g.session);s=m.cursor,u=m.anchor}g.selection.setSelectionAnchor(u.row,u.column)}g.selection.selectToPosition(s),g.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(u){var g,s=this.editor,c=s.renderer.screenToTextCoordinates(this.x,this.y),m=s.selection[u](c.row,c.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(m.start),x=this.$clickSelection.comparePoint(m.end);if(w==-1&&x<=0)g=this.$clickSelection.end,(m.end.row!=c.row||m.end.column!=c.column)&&(c=m.start);else if(x==1&&w>=0)g=this.$clickSelection.start,(m.start.row!=c.row||m.start.column!=c.column)&&(c=m.end);else if(w==-1&&x==1)c=m.end,g=m.start;else{var R=i(this.$clickSelection,c,s.session);c=R.cursor,g=R.anchor}s.selection.setSelectionAnchor(g.row,g.column)}s.selection.selectToPosition(c),s.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var u=p(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),g=Date.now();(u>f||g-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(u){var g=u.getDocumentPosition(),s=this.editor,c=s.session,m=c.getBracketRange(g);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=s.selection.getWordRange(g.row,g.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},a.prototype.onTripleClick=function(u){var g=u.getDocumentPosition(),s=this.editor;this.setState("selectByLines");var c=s.getSelectionRange();c.isMultiLine()&&c.contains(g.row,g.column)?(this.$clickSelection=s.selection.getLineRange(c.start.row),this.$clickSelection.end=s.selection.getLineRange(c.end.row).end):this.$clickSelection=s.selection.getLineRange(g.row),this.select()},a.prototype.onQuadClick=function(u){var g=this.editor;g.selectAll(),this.$clickSelection=g.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(u){if(!u.getAccelKey()){u.getShiftKey()&&u.wheelY&&!u.wheelX&&(u.wheelX=u.wheelY,u.wheelY=0);var g=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var s=this.$lastScroll,c=u.domEvent.timeStamp,m=c-s.t,w=m?u.wheelX/m:s.vx,x=m?u.wheelY/m:s.vy;m<v&&(w=(w+s.vx)/2,x=(x+s.vy)/2);var R=Math.abs(w/x),S=!1;if(R>=1&&g.renderer.isScrollableBy(u.wheelX*u.speed,0)&&(S=!0),R<=1&&g.renderer.isScrollableBy(0,u.wheelY*u.speed)&&(S=!0),S)s.allowed=c;else if(c-s.allowed<v){var A=Math.abs(w)<=1.5*Math.abs(s.vx)&&Math.abs(x)<=1.5*Math.abs(s.vy);A?(S=!0,s.allowed=c):s.allowed=0}if(s.t=c,s.vx=w,s.vy=x,S)return g.renderer.scrollBy(u.wheelX*u.speed,u.wheelY*u.speed),u.stop()}},a})();o.prototype.selectEnd=o.prototype.selectByLinesEnd,o.prototype.selectAllEnd=o.prototype.selectByLinesEnd,o.prototype.selectByWordsEnd=o.prototype.selectByLinesEnd,r.DefaultHandlers=o;function p(a,u,g,s){return Math.sqrt(Math.pow(g-a,2)+Math.pow(s-u,2))}function i(a,u,g){if(a.start.row==a.end.row)var s=2*u.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var s=3*u.column-2*g.getLine(a.start.row).length;else var s=2*u.row-a.start.row-a.end.row;return s<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,d){var h=e("../lib/event"),f=e("../lib/useragent"),v=(function(){function o(p,i){this.speed,this.wheelX,this.wheelY,this.domEvent=p,this.editor=i,this.x=this.clientX=p.clientX,this.y=this.clientY=p.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return o.prototype.stopPropagation=function(){h.stopPropagation(this.domEvent),this.propagationStopped=!0},o.prototype.preventDefault=function(){h.preventDefault(this.domEvent),this.defaultPrevented=!0},o.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},o.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},o.prototype.getGutterRow=function(){var p=this.getDocumentPosition().row,i=this.editor.session.documentToScreenRow(p,0),a=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return i-a},o.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var p=this.editor,i=p.getSelectionRange();if(i.isEmpty())this.$inSelection=!1;else{var a=this.getDocumentPosition();this.$inSelection=i.contains(a.row,a.column)}return this.$inSelection},o.prototype.getButton=function(){return h.getButton(this.domEvent)},o.prototype.getShiftKey=function(){return this.domEvent.shiftKey},o.prototype.getAccelKey=function(){return f.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},o})();r.MouseEvent=v}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,r,d){r.preventParentScroll=function(h){h.stopPropagation();var f=h.currentTarget,v=f.scrollHeight>f.clientHeight;v||h.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,r,d){var h=this&&this.__extends||(function(){var c=function(m,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,R){x.__proto__=R}||function(x,R){for(var S in R)Object.prototype.hasOwnProperty.call(R,S)&&(x[S]=R[S])},c(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");c(m,w);function x(){this.constructor=m}m.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}})(),f=this&&this.__values||function(c){var m=typeof Symbol=="function"&&Symbol.iterator,w=m&&c[m],x=0;if(w)return w.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&x>=c.length&&(c=void 0),{value:c&&c[x++],done:!c}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},v=e("./lib/dom");e("./lib/event");var o=e("./range").Range,p=e("./lib/scroll").preventParentScroll,i="ace_tooltip",a=(function(){function c(m){this.isOpen=!1,this.$element=null,this.$parentNode=m}return c.prototype.$init=function(){return this.$element=v.createElement("div"),this.$element.className=i,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},c.prototype.getElement=function(){return this.$element||this.$init()},c.prototype.setText=function(m){this.getElement().textContent=m},c.prototype.setHtml=function(m){this.getElement().innerHTML=m},c.prototype.setPosition=function(m,w){this.getElement().style.left=m+"px",this.getElement().style.top=w+"px"},c.prototype.setClassName=function(m){v.addCssClass(this.getElement(),m)},c.prototype.setTheme=function(m){this.theme&&(this.theme.isDark&&v.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&v.removeCssClass(this.getElement(),this.theme.cssClass)),m.isDark&&v.addCssClass(this.getElement(),"ace_dark"),m.cssClass&&v.addCssClass(this.getElement(),m.cssClass),this.theme={isDark:m.isDark,cssClass:m.cssClass}},c.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)},c.prototype.hide=function(m){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=i,this.isOpen=!1)},c.prototype.getHeight=function(){return this.getElement().offsetHeight},c.prototype.getWidth=function(){return this.getElement().offsetWidth},c.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},c})(),u=(function(){function c(){this.popups=[]}return c.prototype.addPopup=function(m){this.popups.push(m),this.updatePopups()},c.prototype.removePopup=function(m){var w=this.popups.indexOf(m);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},c.prototype.updatePopups=function(){var m,w,x,R;this.popups.sort(function(F,D){return D.priority-F.priority});var S=[];try{for(var A=f(this.popups),C=A.next();!C.done;C=A.next()){var O=C.value,N=!0;try{for(var M=(x=void 0,f(S)),L=M.next();!L.done;L=M.next()){var j=L.value;if(this.doPopupsOverlap(j,O)){N=!1;break}}}catch(F){x={error:F}}finally{try{L&&!L.done&&(R=M.return)&&R.call(M)}finally{if(x)throw x.error}}N?S.push(O):O.hide()}}catch(F){m={error:F}}finally{try{C&&!C.done&&(w=A.return)&&w.call(A)}finally{if(m)throw m.error}}},c.prototype.doPopupsOverlap=function(m,w){var x=m.getElement().getBoundingClientRect(),R=w.getElement().getBoundingClientRect();return x.left<R.right&&x.right>R.left&&x.top<R.bottom&&x.bottom>R.top},c})(),g=new u;r.popupManager=g,r.Tooltip=a;var s=(function(c){h(m,c);function m(w){w===void 0&&(w=document.body);var x=c.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 R=x.getElement();return R.style.whiteSpace="pre-wrap",R.style.pointerEvents="auto",R.addEventListener("mouseout",x.onMouseOut),R.tabIndex=-1,R.addEventListener("blur",(function(){R.contains(document.activeElement)||this.hide()}).bind(x)),R.addEventListener("wheel",p),x}return m.prototype.addToEditor=function(w){w.on("mousemove",this.onMouseMove),w.on("mousedown",this.hide);var x=w.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.addEventListener("mouseout",this.onMouseOut,!0)},m.prototype.removeFromEditor=function(w){w.off("mousemove",this.onMouseMove),w.off("mousedown",this.hide);var x=w.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},m.prototype.onMouseMove=function(w,x){this.lastEvent=w,this.lastT=Date.now();var R=x.$mouseHandler.isMousePressed;if(this.isOpen){var S=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(S.row,S.column)||R||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||R||(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,R=w.getDocumentPosition(),S=x.session.getLine(R.row);if(R.column==S.length){var A=x.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),C=x.session.documentToScreenPosition(R.row,R.column);if(C.column!=A.column||C.row!=A.row)return!0}return!1},m.prototype.setDataProvider=function(w){this.$gatherData=w},m.prototype.showForRange=function(w,x,R,S){if(!(S&&S!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var A=w.renderer;this.isOpen||(g.addPopup(this),this.$registerCloseEvents(),this.setTheme(A.theme)),this.isOpen=!0,this.range=o.fromPoints(x.start,x.end);var C=A.textToScreenCoordinates(x.start.row,x.start.column),O=A.scroller.getBoundingClientRect();C.pageX<O.left&&(C.pageX=O.left);var N=this.getElement();N.innerHTML="",N.appendChild(R),N.style.maxHeight="",N.style.display="block",this.$setPosition(w,C,!0,x),v.$fixPositionBug(N)}},m.prototype.$setPosition=function(w,x,R,S){var A=10;R&&this.addMarker(S,w.session);var C=w.renderer,O=this.getElement(),N=O.offsetHeight,M=O.offsetWidth,L=x.pageY,j=x.pageX,F=window.innerHeight-L-C.lineHeight,D=this.$shouldPlaceAbove(N,L,F-A);O.style.maxHeight=(D?L:F)-A+"px",O.style.top=D?"":L+C.lineHeight+"px",O.style.bottom=D?window.innerHeight-L+"px":"",O.style.left=Math.min(j,window.innerWidth-M-A)+"px"},m.prototype.$shouldPlaceAbove=function(w,x,R){return!(x-w<0&&x<R)},m.prototype.addMarker=function(w,x){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=x,this.marker=x&&x.addMarker(w,"ace_highlight-marker","text")},m.prototype.hide=function(w){w&&this.$fromKeyboard&&w.type=="keydown"&&w.code=="Escape"||!w&&document.activeElement==this.getElement()||w&&w.target&&(w.type!="keydown"||w.ctrlKey||w.metaKey)&&this.$element.contains(w.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,g.removePopup(this)))},m.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},m.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},m.prototype.onMouseOut=function(w){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||w.relatedTarget.classList.contains("ace_content")||this.hide())},m})(a);r.HoverTooltip=s}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(e,r,d){var h=this&&this.__extends||(function(){var s=function(c,m){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var R in x)Object.prototype.hasOwnProperty.call(x,R)&&(w[R]=x[R])},s(c,m)};return function(c,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");s(c,m);function w(){this.constructor=c}c.prototype=m===null?Object.create(m):(w.prototype=m.prototype,new w)}})(),f=this&&this.__values||function(s){var c=typeof Symbol=="function"&&Symbol.iterator,m=c&&s[c],w=0;if(m)return m.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&w>=s.length&&(s=void 0),{value:s&&s[w++],done:!s}}};throw new TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.")},v=e("../lib/dom"),o=e("./mouse_event").MouseEvent,p=e("../tooltip").HoverTooltip,i=e("../config").nls,a=e("../range").Range;function u(s){var c=s.editor,m=c.renderer.$gutterLayer;s.$tooltip=new g(c),s.$tooltip.addToEditor(c),s.$tooltip.setDataProvider(function(w,x){var R=w.getDocumentPosition().row;s.$tooltip.showTooltip(R)}),s.editor.setDefaultHandler("guttermousedown",function(w){if(!(!c.isFocused()||w.getButton()!=0)){var x=m.getRegion(w);if(x!="foldWidgets"){var R=w.getDocumentPosition().row,S=c.session.selection;if(w.getShiftKey())S.selectTo(R,0);else{if(w.domEvent.detail==2)return c.selectAll(),w.preventDefault();s.$clickSelection=c.selection.getLineRange(R)}return s.setState("selectByLines"),s.captureMouse(w),w.preventDefault()}}})}r.GutterHandler=u;var g=(function(s){h(c,s);function c(m){var w=s.call(this,m.container)||this;w.id="gt"+ ++c.$uid,w.editor=m,w.visibleTooltipRow;var x=w.getElement();return x.setAttribute("role","tooltip"),x.setAttribute("id",w.id),x.style.pointerEvents="auto",w.idleTime=50,w.onDomMouseMove=w.onDomMouseMove.bind(w),w.onDomMouseOut=w.onDomMouseOut.bind(w),w.setClassName("ace_gutter-tooltip"),w}return c.prototype.onDomMouseMove=function(m){var w=new o(m,this.editor);this.onMouseMove(w,this.editor)},c.prototype.onDomMouseOut=function(m){var w=new o(m,this.editor);this.onMouseOut(w)},c.prototype.addToEditor=function(m){var w=m.renderer.$gutter;w.addEventListener("mousemove",this.onDomMouseMove),w.addEventListener("mouseout",this.onDomMouseOut),s.prototype.addToEditor.call(this,m)},c.prototype.removeFromEditor=function(m){var w=m.renderer.$gutter;w.removeEventListener("mousemove",this.onDomMouseMove),w.removeEventListener("mouseout",this.onDomMouseOut),s.prototype.removeFromEditor.call(this,m)},c.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),s.prototype.destroy.call(this)},Object.defineProperty(c,"annotationLabels",{get:function(){return{error:{singular:i("gutter-tooltip.aria-label.error.singular","error"),plural:i("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:i("gutter-tooltip.aria-label.security.singular","security finding"),plural:i("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:i("gutter-tooltip.aria-label.warning.singular","warning"),plural:i("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:i("gutter-tooltip.aria-label.info.singular","information message"),plural:i("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:i("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:i("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),c.prototype.showTooltip=function(m){var w,x=this.editor.renderer.$gutterLayer,R=x.$annotations[m],S;R?S={displayText:Array.from(R.displayText),type:Array.from(R.type)}:S={displayText:[],type:[]};var A=x.session.getFoldLine(m);if(A&&x.$showFoldedAnnotations){for(var C={error:[],security:[],warning:[],info:[],hint:[]},O={error:1,security:2,warning:3,info:4,hint:5},N,M=m+1;M<=A.end.row;M++)if(x.$annotations[M])for(var L=0;L<x.$annotations[M].text.length;L++){var j=x.$annotations[M].type[L];C[j].push(x.$annotations[M].text[L]),(!N||O[j]<O[N])&&(N=j)}if(["error","security","warning"].includes(N)){var F="".concat(c.annotationsToSummaryString(C)," in folded code.");S.displayText.push(F),S.type.push(N+"_fold")}}if(S.displayText.length===0)return this.hide();for(var D={error:[],security:[],warning:[],info:[],hint:[]},$=x.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",M=0;M<S.displayText.length;M++){var _=v.createElement("span"),I=v.createElement("span");(w=I.classList).add.apply(w,["ace_".concat(S.type[M]),$]),I.setAttribute("aria-label","".concat(c.annotationLabels[S.type[M].replace("_fold","")].singular)),I.setAttribute("role","img"),I.appendChild(v.createTextNode(" ")),_.appendChild(I),_.appendChild(v.createTextNode(S.displayText[M])),_.appendChild(v.createElement("br")),D[S.type[M].replace("_fold","")].push(_)}var z=v.createElement("span");D.error.forEach(function(K){return z.appendChild(K)}),D.security.forEach(function(K){return z.appendChild(K)}),D.warning.forEach(function(K){return z.appendChild(K)}),D.info.forEach(function(K){return z.appendChild(K)}),D.hint.forEach(function(K){return z.appendChild(K)}),z.setAttribute("aria-live","polite");var U=this.$findLinkedAnnotationNode(m);U&&U.setAttribute("aria-describedby",this.id);var V=a.fromPoints({row:m,column:0},{row:m,column:0});this.showForRange(this.editor,V,z),this.visibleTooltipRow=m,this.editor._signal("showGutterTooltip",this)},c.prototype.$setPosition=function(m,w,x,R){var S=this.$findCellByRow(R.start.row);if(S){var A=S&&S.element,C=A&&A.querySelector(".ace_gutter_annotation");if(C){var O=C.getBoundingClientRect();if(O){var N={pageX:O.right,pageY:O.top};return s.prototype.$setPosition.call(this,m,N,!1,R)}}}},c.prototype.$shouldPlaceAbove=function(m,w,x){return x<m},c.prototype.$findLinkedAnnotationNode=function(m){var w=this.$findCellByRow(m);if(w){var x=w.element;if(x.childNodes.length>2)return x.childNodes[2]}},c.prototype.$findCellByRow=function(m){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(w){return w.row===m})},c.prototype.hide=function(m){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var w=this.$findLinkedAnnotationNode(this.visibleTooltipRow);w&&w.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),s.prototype.hide.call(this,m)}},c.annotationsToSummaryString=function(m){var w,x,R=[],S=["error","security","warning","info","hint"];try{for(var A=f(S),C=A.next();!C.done;C=A.next()){var O=C.value;if(m[O].length){var N=m[O].length===1?c.annotationLabels[O].singular:c.annotationLabels[O].plural;R.push("".concat(m[O].length," ").concat(N))}}}catch(M){w={error:M}}finally{try{C&&!C.done&&(x=A.return)&&x.call(A)}finally{if(w)throw w.error}}return R.join(", ")},c.prototype.isOutsideOfText=function(m){var w=m.editor,x=w.renderer.$gutter.getBoundingClientRect();return!(m.clientX>=x.left&&m.clientX<=x.right&&m.clientY>=x.top&&m.clientY<=x.bottom)},c})(p);g.$uid=0,r.GutterTooltip=g}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,r,d){var h=e("../lib/dom"),f=e("../lib/event"),v=e("../lib/useragent"),o=200,p=200,i=5;function a(g){var s=g.editor,c=h.createElement("div");c.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",c.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(ee){g[ee]=this[ee]},this),s.on("mousedown",this.onMouseDown.bind(g));var w=s.container,x,R,S,A,C,O,N=0,M,L,j,F,D;this.onDragStart=function(ee){if(this.cancelDrag||!w.draggable){var re=this;return setTimeout(function(){re.startSelect(),re.captureMouse(ee)},0),ee.preventDefault()}C=s.getSelectionRange();var ce=ee.dataTransfer;ce.effectAllowed=s.getReadOnly()?"copy":"copyMove",s.container.appendChild(c),ce.setDragImage&&ce.setDragImage(c,0,0),setTimeout(function(){s.container.removeChild(c)}),ce.clearData(),ce.setData("Text",s.session.getTextRange()),L=!0,this.setState("drag")},this.onDragEnd=function(ee){if(w.draggable=!1,L=!1,this.setState(null),!s.getReadOnly()){var re=ee.dataTransfer.dropEffect;!M&&re=="move"&&s.session.remove(s.getSelectionRange()),s.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ee){if(!(s.getReadOnly()||!Z(ee.dataTransfer)))return R=ee.clientX,S=ee.clientY,x||z(),N++,ee.dataTransfer.dropEffect=M=oe(ee),f.preventDefault(ee)},this.onDragOver=function(ee){if(!(s.getReadOnly()||!Z(ee.dataTransfer)))return R=ee.clientX,S=ee.clientY,x||(z(),N++),V!==null&&(V=null),ee.dataTransfer.dropEffect=M=oe(ee),f.preventDefault(ee)},this.onDragLeave=function(ee){if(N--,N<=0&&x)return U(),M=null,f.preventDefault(ee)},this.onDrop=function(ee){if(O){var re=ee.dataTransfer;if(L)switch(M){case"move":C.contains(O.row,O.column)?C={start:O,end:O}:C=s.moveText(C,O);break;case"copy":C=s.moveText(C,O,!0);break}else{var ce=re.getData("Text");C={start:O,end:s.session.insert(O,ce)},s.focus(),M=null}return U(),f.preventDefault(ee)}},f.addListener(w,"dragstart",this.onDragStart.bind(g),s),f.addListener(w,"dragend",this.onDragEnd.bind(g),s),f.addListener(w,"dragenter",this.onDragEnter.bind(g),s),f.addListener(w,"dragover",this.onDragOver.bind(g),s),f.addListener(w,"dragleave",this.onDragLeave.bind(g),s),f.addListener(w,"drop",this.onDrop.bind(g),s);function $(ee,re){var ce=Date.now(),ie=!re||ee.row!=re.row,fe=!re||ee.column!=re.column;if(!F||ie||fe)s.moveCursorToPosition(ee),F=ce,D={x:R,y:S};else{var pe=u(D.x,D.y,R,S);pe>i?F=null:ce-F>=p&&(s.renderer.scrollCursorIntoView(),F=null)}}function _(ee,re){var ce=Date.now(),ie=s.renderer.layerConfig.lineHeight,fe=s.renderer.layerConfig.characterWidth,pe=s.renderer.scroller.getBoundingClientRect(),$e={x:{left:R-pe.left,right:pe.right-R},y:{top:S-pe.top,bottom:pe.bottom-S}},Re=Math.min($e.x.left,$e.x.right),Ge=Math.min($e.y.top,$e.y.bottom),qe={row:ee.row,column:ee.column};Re/fe<=2&&(qe.column+=$e.x.left<$e.x.right?-3:2),Ge/ie<=1&&(qe.row+=$e.y.top<$e.y.bottom?-1:1);var ct=ee.row!=qe.row,ot=ee.column!=qe.column,dt=!re||ee.row!=re.row;ct||ot&&!dt?j?ce-j>=o&&s.renderer.scrollCursorIntoView(qe):j=ce:j=null}function I(){var ee=O;O=s.renderer.screenToTextCoordinates(R,S),$(O,ee),_(O,ee)}function z(){C=s.selection.toOrientedRange(),x=s.session.addMarker(C,"ace_selection",s.getSelectionStyle()),s.clearSelection(),s.isFocused()&&s.renderer.$cursorLayer.setBlinking(!1),clearInterval(A),I(),A=setInterval(I,20),N=0,f.addListener(document,"mousemove",K)}function U(){clearInterval(A),s.session.removeMarker(x),x=null,s.selection.fromOrientedRange(C),s.isFocused()&&!L&&s.$resetCursorStyle(),C=null,O=null,N=0,j=null,F=null,f.removeListener(document,"mousemove",K)}var V=null;function K(){V==null&&(V=setTimeout(function(){V!=null&&x&&U()},20))}function Z(ee){var re=ee.types;return!re||Array.prototype.some.call(re,function(ce){return ce=="text/plain"||ce=="Text"})}function oe(ee){var re=["copy","copymove","all","uninitialized"],ce=["move","copymove","linkmove","all","uninitialized"],ie=v.isMac?ee.altKey:ee.ctrlKey,fe="uninitialized";try{fe=ee.dataTransfer.effectAllowed.toLowerCase()}catch{}var pe="none";return ie&&re.indexOf(fe)>=0?pe="copy":ce.indexOf(fe)>=0?pe="move":re.indexOf(fe)>=0&&(pe="copy"),pe}}(function(){this.dragWait=function(){var g=Date.now()-this.mousedownEvent.time;g>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var g=this.editor.container;g.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(g){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var g=this.editor,s=g.container;s.draggable=!0,g.renderer.$cursorLayer.setBlinking(!1),g.setStyle("ace_dragging");var c=v.isWin?"default":"move";g.renderer.setCursorStyle(c),this.setState("dragReady")},this.onMouseDrag=function(g){var s=this.editor.container;if(v.isIE&&this.state=="dragReady"){var c=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>3&&s.dragDrop()}if(this.state==="dragWait"){var c=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>0&&(s.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(g){if(this.$dragEnabled){this.mousedownEvent=g;var s=this.editor,c=g.inSelection(),m=g.getButton(),w=g.domEvent.detail||1;if(w===1&&m===0&&c){if(g.editor.inMultiSelectMode&&(g.getAccelKey()||g.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=g.domEvent.target||g.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),s.getDragDelay()){if(v.isWebKit){this.cancelDrag=!0;var R=s.container;R.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(g,this.onMouseDrag.bind(this)),g.defaultPrevented=!0}}}}).call(a.prototype);function u(g,s,c,m){return Math.sqrt(Math.pow(c-g,2)+Math.pow(m-s,2))}r.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,r,d){var h=e("./mouse_event").MouseEvent,f=e("../lib/event"),v=e("../lib/dom");r.addTouchListeners=function(o,p){var i="scroll",a,u,g,s,c,m,w=0,x,R=0,S=0,A=0,C,O;function N(){var $=window.navigator&&window.navigator.clipboard,_=!1,I=function(){var V=p.getCopyText(),K=p.session.getUndoManager().hasUndo();O.replaceChild(v.buildDom(_?["span",!V&&z("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],V&&z("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],V&&z("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],$&&z("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],K&&z("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],z("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],z("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),O.firstChild)},z=function(V){return p.commands.canExecute(V,p)},U=function(V){var K=V.target.getAttribute("action");if(K=="more"||!_)return _=!_,I();K=="paste"?$.readText().then(function(Z){p.execCommand(K,Z)}):K&&((K=="cut"||K=="copy")&&($?$.writeText(p.getCopyText()):document.execCommand("copy")),p.execCommand(K)),O.firstChild.style.display="none",_=!1,K!="openCommandPalette"&&p.focus()};O=v.buildDom(["div",{class:"ace_mobile-menu",onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],p.container),O.addEventListener("touchstart",function(V){i="menu",V.stopPropagation(),V.preventDefault(),p.textInput.focus()}),O.addEventListener("touchend",function(V){V.stopPropagation(),V.preventDefault(),U(V)})}function M(){if(!p.getOption("enableMobileMenu")){O&&L();return}O||N();var $=p.selection.cursor,_=p.renderer.textToScreenCoordinates($.row,$.column),I=p.renderer.textToScreenCoordinates(0,0).pageX,z=p.renderer.scrollLeft,U=p.container.getBoundingClientRect();O.style.top=_.pageY-U.top-3+"px",_.pageX-U.left<U.width-70?(O.style.left="",O.style.right="10px"):(O.style.right="",O.style.left=I+z-U.left+"px"),O.style.display="",O.firstChild.style.display="none",p.on("input",L)}function L($){O&&(O.style.display="none"),p.off("input",L)}function j(){c=null,clearTimeout(c);var $=p.selection.getRange(),_=$.contains(x.row,x.column);($.isEmpty()||!_)&&(p.selection.moveToPosition(x),p.selection.selectWord()),i="wait",M()}function F(){c=null,clearTimeout(c),p.selection.moveToPosition(x);var $=R>=2?p.selection.getLineRange(x.row):p.session.getBracketRange(x);$&&!$.isEmpty()?p.selection.setRange($):p.selection.selectWord(),i="wait"}f.addListener(o,"contextmenu",function($){if(C){var _=p.textInput.getElement();_.focus()}},p),f.addListener(o,"touchstart",function($){var _=$.touches;if(c||_.length>1){clearTimeout(c),c=null,g=-1,i="zoom";return}C=p.$mouseHandler.isMousePressed=!0;var I=p.renderer.layerConfig.lineHeight,z=p.renderer.layerConfig.lineHeight,U=$.timeStamp;s=U;var V=_[0],K=V.clientX,Z=V.clientY;Math.abs(a-K)+Math.abs(u-Z)>I&&(g=-1),a=$.clientX=K,u=$.clientY=Z,S=A=0;var oe=new h($,p);if(x=oe.getDocumentPosition(),U-g<500&&_.length==1&&!w)R++,$.preventDefault(),$.button=0,F();else{R=0;var ee=p.selection.cursor,re=p.selection.isEmpty()?ee:p.selection.anchor,ce=p.renderer.$cursorLayer.getPixelPosition(ee,!0),ie=p.renderer.$cursorLayer.getPixelPosition(re,!0),fe=p.renderer.scroller.getBoundingClientRect(),pe=p.renderer.layerConfig.offset,$e=p.renderer.scrollLeft,Re=function(ct,ot){return ct=ct/z,ot=ot/I-.75,ct*ct+ot*ot};if($.clientX<fe.left){i="zoom";return}var Ge=Re($.clientX-fe.left-ce.left+$e,$.clientY-fe.top-ce.top+pe),qe=Re($.clientX-fe.left-ie.left+$e,$.clientY-fe.top-ie.top+pe);Ge<3.5&&qe<3.5&&(i=Ge>qe?"cursor":"anchor"),qe<3.5?i="anchor":Ge<3.5?i="cursor":i="scroll",c=setTimeout(j,450)}g=U},p),f.addListener(o,"touchend",function($){C=p.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),i=="zoom"?(i="",w=0):c?(p.selection.moveToPosition(x),w=0,M()):i=="scroll"?(D(),L()):M(),clearTimeout(c),c=null},p),f.addListener(o,"touchmove",function($){c&&(clearTimeout(c),c=null);var _=$.touches;if(!(_.length>1||i=="zoom")){var I=_[0],z=a-I.clientX,U=u-I.clientY;if(i=="wait")if(z*z+U*U>4)i="cursor";else return $.preventDefault();a=I.clientX,u=I.clientY,$.clientX=I.clientX,$.clientY=I.clientY;var V=$.timeStamp,K=V-s;if(s=V,i=="scroll"){var Z=new h($,p);Z.speed=1,Z.wheelX=z,Z.wheelY=U,10*Math.abs(z)<Math.abs(U)&&(z=0),10*Math.abs(U)<Math.abs(z)&&(U=0),K!=0&&(S=z/K,A=U/K),p._emit("mousewheel",Z),Z.propagationStopped||(S=A=0)}else{var oe=new h($,p),ee=oe.getDocumentPosition();i=="cursor"?p.selection.moveCursorToPosition(ee):i=="anchor"&&p.selection.setSelectionAnchor(ee.row,ee.column),p.renderer.scrollCursorIntoView(ee),$.preventDefault()}}},p);function D(){w+=60,m=setInterval(function(){w--<=0&&(clearInterval(m),m=null),Math.abs(S)<.01&&(S=0),Math.abs(A)<.01&&(A=0),w<20&&(S=.9*S),w<20&&(A=.9*A);var $=p.session.getScrollTop();p.renderer.scrollBy(10*S,10*A),$==p.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(e,r,d){var h=e("../lib/event"),f=e("../lib/useragent"),v=e("./default_handlers").DefaultHandlers,o=e("./default_gutter_handler").GutterHandler,p=e("./mouse_event").MouseEvent,i=e("./dragdrop_handler").DragdropHandler,a=e("./touch_handler").addTouchListeners,u=e("../config"),g=(function(){function s(c){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var m=this;this.editor=c,new v(this),new o(this),new i(this);var w=function(S){var A=!document.hasFocus||!document.hasFocus()||!c.isFocused()&&document.activeElement==(c.textInput&&c.textInput.getElement());A&&window.focus(),c.focus(),setTimeout(function(){c.isFocused()||c.focus()})},x=c.renderer.getMouseEventTarget();h.addListener(x,"click",this.onMouseEvent.bind(this,"click"),c),h.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),c),h.addMultiMouseDownListener([x,c.renderer.scrollBarV&&c.renderer.scrollBarV.inner,c.renderer.scrollBarH&&c.renderer.scrollBarH.inner,c.textInput&&c.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",c),h.addMouseWheelListener(c.container,this.onMouseWheel.bind(this,"mousewheel"),c),a(c.container,c);var R=c.renderer.$gutter;h.addListener(R,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),c),h.addListener(R,"click",this.onMouseEvent.bind(this,"gutterclick"),c),h.addListener(R,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),c),h.addListener(R,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),c),h.addListener(x,"mousedown",w,c),h.addListener(R,"mousedown",w,c),f.isIE&&c.renderer.scrollBarV&&(h.addListener(c.renderer.scrollBarV.element,"mousedown",w,c),h.addListener(c.renderer.scrollBarH.element,"mousedown",w,c)),c.on("mousemove",function(S){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var A=c.renderer.screenToTextCoordinates(S.x,S.y),C=c.session.selection.getRange(),O=c.renderer;!C.isEmpty()&&C.insideStart(A.row,A.column)?O.setCursorStyle("default"):O.setCursorStyle("")}},c)}return s.prototype.onMouseEvent=function(c,m){this.editor.session&&this.editor._emit(c,new p(m,this.editor))},s.prototype.onMouseMove=function(c,m){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(c,new p(m,this.editor))},s.prototype.onMouseWheel=function(c,m){var w=new p(m,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=m.wheelX,w.wheelY=m.wheelY,this.editor._emit(c,w)},s.prototype.setState=function(c){this.state=c},s.prototype.captureMouse=function(c,m){this.x=c.x,this.y=c.y,this.isMousePressed=!0;var w=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var R=this,S=!0,A=function(L){if(L){if(f.isWebKit&&!L.which&&R.releaseMouse)return R.releaseMouse();R.x=L.clientX,R.y=L.clientY,m&&m(L),R.mouseEvent=new p(L,R.editor),R.$mouseMoved=!0}},C=function(L){w.off("beforeEndOperation",M),S=!1,w.session&&O(),R[R.state+"End"]&&R[R.state+"End"](L),R.state="",R.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),R.$onCaptureMouseMove=R.releaseMouse=null,L&&R.onMouseEvent("mouseup",L),w.endOperation()},O=function(){R[R.state]&&R[R.state](),R.$mouseMoved=!1},N=function(){S&&(O(),h.nextFrame(N))};if(f.isOldIE&&c.domEvent.type=="dblclick")return setTimeout(function(){C(c)});var M=function(L){R.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(R[R.state+"End"]&&R[R.state+"End"](),R.state="",R.releaseMouse())};w.on("beforeEndOperation",M),w.startOperation({command:{name:"mouse"}}),R.$onCaptureMouseMove=A,R.releaseMouse=h.capture(this.editor.container,A,C),N()},s.prototype.cancelContextMenu=function(){var c=(function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",c),m&&m.domEvent&&h.stopEvent(m.domEvent))}).bind(this);setTimeout(c,10),this.editor.on("nativecontextmenu",c)},s.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},s})();g.prototype.releaseMouse=null,u.defineOptions(g.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:f.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),r.MouseHandler=g}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,r,d){var h=e("../lib/dom"),f=(function(){function v(o){o.on("click",function(p){var i=p.getDocumentPosition(),a=o.session,u=a.getFoldAt(i.row,i.column,1);u&&(p.getAccelKey()?a.removeFold(u):a.expandFold(u),p.stop());var g=p.domEvent&&p.domEvent.target;g&&h.hasCssClass(g,"ace_inline_button")&&h.hasCssClass(g,"ace_toggle_wrap")&&(a.setOption("wrap",!a.getUseWrapMode()),o.renderer.scrollCursorIntoView())}),o.on("gutterclick",function(p){var i=o.renderer.$gutterLayer.getRegion(p);if(i=="foldWidgets"){var a=p.getDocumentPosition().row,u=o.session;u.foldWidgets&&u.foldWidgets[a]&&o.session.onFoldWidgetClick(a,p),o.isFocused()||o.focus(),p.stop()}}),o.on("gutterdblclick",function(p){var i=o.renderer.$gutterLayer.getRegion(p);if(i=="foldWidgets"){var a=p.getDocumentPosition().row,u=o.session,g=u.getParentFoldRangeData(a,!0),s=g.range||g.firstRange;if(s){a=s.start.row;var c=u.getFoldAt(a,u.getLine(a).length,1);c?u.removeFold(c):(u.addFold("...",s),o.renderer.scrollCursorIntoView({row:s.start.row,column:0}))}p.stop()}})}return v})();r.FoldHandler=f}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,r,d){var h=e("../lib/keys"),f=e("../lib/event"),v=(function(){function o(p){this.$editor=p,this.$data={editor:p},this.$handlers=[],this.setDefaultHandler(p.commands)}return o.prototype.setDefaultHandler=function(p){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=p,this.addKeyboardHandler(p,0)},o.prototype.setKeyboardHandler=function(p){var i=this.$handlers;if(i[i.length-1]!=p){for(;i[i.length-1]&&i[i.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(i[i.length-1]);this.addKeyboardHandler(p,1)}},o.prototype.addKeyboardHandler=function(p,i){if(p){typeof p=="function"&&!p.handleKeyboard&&(p.handleKeyboard=p);var a=this.$handlers.indexOf(p);a!=-1&&this.$handlers.splice(a,1),i==null?this.$handlers.push(p):this.$handlers.splice(i,0,p),a==-1&&p.attach&&p.attach(this.$editor)}},o.prototype.removeKeyboardHandler=function(p){var i=this.$handlers.indexOf(p);return i==-1?!1:(this.$handlers.splice(i,1),p.detach&&p.detach(this.$editor),!0)},o.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},o.prototype.getStatusText=function(){var p=this.$data,i=p.editor;return this.$handlers.map(function(a){return a.getStatusText&&a.getStatusText(i,p)||""}).filter(Boolean).join(" ")},o.prototype.$callKeyboardHandlers=function(p,i,a,u){for(var g,s=!1,c=this.$editor.commands,m=this.$handlers.length;m--&&(g=this.$handlers[m].handleKeyboard(this.$data,p,i,a,u),!(!(!g||!g.command)&&(g.command=="null"?s=!0:s=c.exec(g.command,this.$editor,g.args,u),s&&u&&p!=-1&&g.passEvent!=!0&&g.command.passEvent!=!0&&f.stopEvent(u),s))););return!s&&p==-1&&(g={command:"insertstring"},s=c.exec("insertstring",this.$editor,i)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",g),s},o.prototype.onCommandKey=function(p,i,a){var u=h.keyCodeToString(a);return this.$callKeyboardHandlers(i,u,a,p)},o.prototype.onTextInput=function(p){return this.$callKeyboardHandlers(-1,p)},o})();r.KeyBinding=v}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,r,d){var h=0,f=0,v=!1,o=!1,p=!1,i=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],a=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=0,g=1,s=0,c=1,m=2,w=3,x=4,R=5,S=6,A=7,C=8,O=9,N=10,M=11,L=12,j=13,F=14,D=15,$=16,_=17,I=18,z=[I,I,I,I,I,I,I,I,I,S,R,S,C,R,I,I,I,I,I,I,I,I,I,I,I,I,I,I,R,R,R,S,C,x,x,M,M,M,x,x,x,x,x,N,O,N,O,O,m,m,m,m,m,m,m,m,m,m,O,x,x,x,x,x,x,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,x,x,x,x,x,x,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,x,x,x,x,I,I,I,I,I,I,R,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,O,x,M,M,M,M,x,x,x,x,s,x,x,I,x,x,M,M,m,m,x,s,x,x,x,m,s,x,x,x,x,x],U=[C,C,C,C,C,C,C,C,C,C,C,I,I,I,s,c,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,R,j,F,D,$,_,O,M,M,M,M,M,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,O,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 V(ee,re,ce,ie){var fe=h?a:i,pe=null,$e=null,Re=null,Ge=0,qe=null,ct=null,ot=-1,dt=null,Lt=null,gr=[];if(!ie)for(dt=0,ie=[];dt<ce;dt++)ie[dt]=oe(ee[dt]);for(f=h,v=!1,o=!1,p=!1,Lt=0;Lt<ce;Lt++){if(pe=Ge,gr[Lt]=$e=Z(ee,ie,gr,Lt),Ge=fe[pe][$e],qe=Ge&240,Ge&=15,re[Lt]=Re=fe[Ge][5],qe>0)if(qe==16){for(dt=ot;dt<Lt;dt++)re[dt]=1;ot=-1}else ot=-1;if(ct=fe[Ge][6],ct)ot==-1&&(ot=Lt);else if(ot>-1){for(dt=ot;dt<Lt;dt++)re[dt]=Re;ot=-1}ie[Lt]==R&&(re[Lt]=0),f|=Re}if(p){for(dt=0;dt<ce;dt++)if(ie[dt]==S){re[dt]=h;for(var $t=dt-1;$t>=0&&ie[$t]==C;$t--)re[$t]=h}}}function K(ee,re,ce){if(!(f<ee)){if(ee==1&&h==g&&!o){ce.reverse();return}for(var ie=ce.length,fe=0,pe,$e,Re,Ge;fe<ie;){if(re[fe]>=ee){for(pe=fe+1;pe<ie&&re[pe]>=ee;)pe++;for($e=fe,Re=pe-1;$e<Re;$e++,Re--)Ge=ce[$e],ce[$e]=ce[Re],ce[Re]=Ge;fe=pe}fe++}}}function Z(ee,re,ce,ie){var fe=re[ie],pe,$e,Re,Ge;switch(fe){case s:case c:v=!1;case x:case w:return fe;case m:return v?w:m;case A:return v=!0,c;case C:return x;case O:return ie<1||ie+1>=re.length||(pe=ce[ie-1])!=m&&pe!=w||($e=re[ie+1])!=m&&$e!=w?x:(v&&($e=w),$e==pe?$e:x);case N:return pe=ie>0?ce[ie-1]:R,pe==m&&ie+1<re.length&&re[ie+1]==m?m:x;case M:if(ie>0&&ce[ie-1]==m)return m;if(v)return x;for(Ge=ie+1,Re=re.length;Ge<Re&&re[Ge]==M;)Ge++;return Ge<Re&&re[Ge]==m?m:x;case L:for(Re=re.length,Ge=ie+1;Ge<Re&&re[Ge]==L;)Ge++;if(Ge<Re){var qe=ee[ie],ct=qe>=1425&&qe<=2303||qe==64286;if(pe=re[Ge],ct&&(pe==c||pe==A))return c}return ie<1||(pe=re[ie-1])==R?x:ce[ie-1];case R:return v=!1,o=!0,h;case S:return p=!0,x;case j:case F:case $:case _:case D:v=!1;case I:return x}}function oe(ee){var re=ee.charCodeAt(0),ce=re>>8;return ce==0?re>191?s:z[re]:ce==5?/[\u0591-\u05f4]/.test(ee)?c:s:ce==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ee)?L:/[\u0660-\u0669\u066b-\u066c]/.test(ee)?w:re==1642?M:/[\u06f0-\u06f9]/.test(ee)?m:A:ce==32&&re<=8287?U[re&255]:ce==254&&re>=65136?A:x}r.L=s,r.R=c,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(ee,re,ce){if(ee.length<2)return{};var ie=ee.split(""),fe=new Array(ie.length),pe=new Array(ie.length),$e=[];h=ce?g:u,V(ie,$e,ie.length,re);for(var Re=0;Re<fe.length;fe[Re]=Re,Re++);K(2,$e,fe),K(1,$e,fe);for(var Re=0;Re<fe.length-1;Re++)re[Re]===w?$e[Re]=r.AN:$e[Re]===c&&(re[Re]>A&&re[Re]<j||re[Re]===x||re[Re]===I)?$e[Re]=r.ON_R:Re>0&&ie[Re-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ie[Re])&&($e[Re-1]=$e[Re]=r.R_H,Re++);ie[ie.length-1]===r.DOT&&($e[ie.length-1]=r.B),ie[0]===""&&($e[0]=r.RLE);for(var Re=0;Re<fe.length;Re++)pe[Re]=$e[fe[Re]];return{logicalFromVisual:fe,bidiLevels:pe}},r.hasBidiCharacters=function(ee,re){for(var ce=!1,ie=0;ie<ee.length;ie++)re[ie]=oe(ee.charAt(ie)),!ce&&(re[ie]==c||re[ie]==A||re[ie]==w)&&(ce=!0);return ce},r.getVisualFromLogicalIdx=function(ee,re){for(var ce=0;ce<re.logicalFromVisual.length;ce++)if(re.logicalFromVisual[ce]==ee)return ce;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,r,d){var h=e("./lib/bidiutil"),f=e("./lib/lang"),v=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,o=(function(){function p(i){this.session=i,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=v.test(i.getValue())}return p.prototype.isBidiRow=function(i,a,u){return this.seenBidi?(i!==this.currentRow&&(this.currentRow=i,this.updateRowLine(a,u),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},p.prototype.onChange=function(i){this.seenBidi?this.currentRow=null:i.action=="insert"&&v.test(i.lines.join(`
|
|
182
|
+
`))&&(this.seenBidi=!0,this.currentRow=null)},p.prototype.getDocumentRow=function(){var i=0,a=this.session.$screenRowCache;if(a.length){var u=this.session.$getRowCacheIndex(a,this.currentRow);u>=0&&(i=this.session.$docRowCache[u])}return i},p.prototype.getSplitIndex=function(){var i=0,a=this.session.$screenRowCache;if(a.length)for(var u,g=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-i>0&&(u=this.session.$getRowCacheIndex(a,this.currentRow-i-1),u===g);)g=u,i++;else i=this.currentRow;return i},p.prototype.updateRowLine=function(i,a){i===void 0&&(i=this.getDocumentRow());var u=i===this.session.getLength()-1,g=u?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(i),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var s=this.session.$wrapData[i];s&&(a===void 0&&(a=this.getSplitIndex()),a>0&&s.length?(this.wrapIndent=s.indent,this.wrapOffset=this.wrapIndent*this.charWidths[h.L],this.line=a<s.length?this.line.substring(s[a-1],s[a]):this.line.substring(s[s.length-1])):this.line=this.line.substring(0,s[a]),a==s.length&&(this.line+=this.showInvisibles?g:h.DOT))}else this.line+=this.showInvisibles?g:h.DOT;var c=this.session,m=0,w;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(x,R){return x===" "||c.isFullWidth(x.charCodeAt(0))?(w=x===" "?c.getScreenTabSize(R+m):2,m+=w-1,f.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)},p.prototype.updateBidiMap=function(){var i=[];h.hasBidiCharacters(this.line,i)||this.isRtlDir?this.bidiMap=h.doBidiReorder(this.line,i,this.isRtlDir):this.bidiMap={}},p.prototype.markAsDirty=function(){this.currentRow=null},p.prototype.updateCharacterWidths=function(i){if(this.characterWidth!==i.$characterSize.width){this.fontMetrics=i;var a=this.characterWidth=i.$characterSize.width,u=i.$measureCharWidth("ה");this.charWidths[h.L]=this.charWidths[h.EN]=this.charWidths[h.ON_R]=a,this.charWidths[h.R]=this.charWidths[h.AN]=u,this.charWidths[h.R_H]=u*.45,this.charWidths[h.B]=this.charWidths[h.RLE]=0,this.currentRow=null}},p.prototype.setShowInvisibles=function(i){this.showInvisibles=i,this.currentRow=null},p.prototype.setEolChar=function(i){this.EOL=i},p.prototype.setContentWidth=function(i){this.contentWidth=i},p.prototype.isRtlLine=function(i){return this.$isRtl?!0:i!=null?this.session.getLine(i).charAt(0)==this.RLE:this.isRtlDir},p.prototype.setRtlDirection=function(i,a){for(var u=i.getCursorPosition(),g=i.selection.getSelectionAnchor().row;g<=u.row;g++)!a&&i.session.getLine(g).charAt(0)===i.session.$bidiHandler.RLE?i.session.doc.removeInLine(g,0,1):a&&i.session.getLine(g).charAt(0)!==i.session.$bidiHandler.RLE&&i.session.doc.insert({column:0,row:g},i.session.$bidiHandler.RLE)},p.prototype.getPosLeft=function(i){i-=this.wrapIndent;var a=this.line.charAt(0)===this.RLE?1:0,u=i>a?this.session.getOverwrite()?i:i-1:a,g=h.getVisualFromLogicalIdx(u,this.bidiMap),s=this.bidiMap.bidiLevels,c=0;!this.session.getOverwrite()&&i<=a&&s[g]%2!==0&&g++;for(var m=0;m<g;m++)c+=this.charWidths[s[m]];return!this.session.getOverwrite()&&i>a&&s[g]%2===0&&(c+=this.charWidths[s[g]]),this.wrapIndent&&(c+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(c+=this.rtlLineOffset),c},p.prototype.getSelections=function(i,a){var u=this.bidiMap,g=u.bidiLevels,s,c=[],m=0,w=Math.min(i,a)-this.wrapIndent,x=Math.max(i,a)-this.wrapIndent,R=!1,S=!1,A=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,O=0;O<g.length;O++)C=u.logicalFromVisual[O],s=g[O],R=C>=w&&C<x,R&&!S?A=m:!R&&S&&c.push({left:A,width:m-A}),m+=this.charWidths[s],S=R;if(R&&O===g.length&&c.push({left:A,width:m-A}),this.isRtlDir)for(var N=0;N<c.length;N++)c[N].left+=this.rtlLineOffset;return c},p.prototype.offsetToCol=function(u){this.isRtlDir&&(u-=this.rtlLineOffset);var a=0,u=Math.max(u,0),g=0,s=0,c=this.bidiMap.bidiLevels,m=this.charWidths[c[s]];for(this.wrapIndent&&(u-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);u>g+m/2;){if(g+=m,s===c.length-1){m=0;break}m=this.charWidths[c[++s]]}return s>0&&c[s-1]%2!==0&&c[s]%2===0?(u<g&&s--,a=this.bidiMap.logicalFromVisual[s]):s>0&&c[s-1]%2===0&&c[s]%2!==0?a=1+(u>g?this.bidiMap.logicalFromVisual[s]:this.bidiMap.logicalFromVisual[s-1]):this.isRtlDir&&s===c.length-1&&m===0&&c[s-1]%2===0||!this.isRtlDir&&s===0&&c[s]%2!==0?a=1+this.bidiMap.logicalFromVisual[s]:(s>0&&c[s-1]%2!==0&&m!==0&&s--,a=this.bidiMap.logicalFromVisual[s]),a===0&&this.isRtlDir&&a++,a+this.wrapIndent},p})();r.BidiHandler=o}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,r,d){var h=e("./lib/oop"),f=e("./lib/lang"),v=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,p=(function(){function i(a){this.session=a,this.doc=a.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var u=this;this.cursor.on("change",function(g){u.$cursorChanged=!0,u.$silent||u._emit("changeCursor"),!u.$isEmpty&&!u.$silent&&u._emit("changeSelection"),!u.$keepDesiredColumnOnChange&&g.old.column!=g.value.column&&(u.$desiredColumn=null)}),this.anchor.on("change",function(){u.$anchorChanged=!0,!u.$isEmpty&&!u.$silent&&u._emit("changeSelection")})}return i.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},i.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},i.prototype.getCursor=function(){return this.lead.getPosition()},i.prototype.setAnchor=function(a,u){this.$isEmpty=!1,this.anchor.setPosition(a,u)},i.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},i.prototype.getSelectionLead=function(){return this.lead.getPosition()},i.prototype.isBackwards=function(){var a=this.anchor,u=this.lead;return a.row>u.row||a.row==u.row&&a.column>u.column},i.prototype.getRange=function(){var a=this.anchor,u=this.lead;return this.$isEmpty?o.fromPoints(u,u):this.isBackwards()?o.fromPoints(u,a):o.fromPoints(a,u)},i.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},i.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},i.prototype.setRange=function(a,u){var g=u?a.end:a.start,s=u?a.start:a.end;this.$setSelection(g.row,g.column,s.row,s.column)},i.prototype.$setSelection=function(a,u,g,s){if(!this.$silent){var c=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,u),this.cursor.setPosition(g,s),this.$isEmpty=!o.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||c!=this.$isEmpty||m)&&this._emit("changeSelection")}},i.prototype.$moveSelection=function(a){var u=this.lead;this.$isEmpty&&this.setSelectionAnchor(u.row,u.column),a.call(this)},i.prototype.selectTo=function(a,u){this.$moveSelection(function(){this.moveCursorTo(a,u)})},i.prototype.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},i.prototype.moveTo=function(a,u){this.clearSelection(),this.moveCursorTo(a,u)},i.prototype.moveToPosition=function(a){this.clearSelection(),this.moveCursorToPosition(a)},i.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},i.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},i.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},i.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},i.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},i.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},i.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},i.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},i.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},i.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},i.prototype.getWordRange=function(a,u){if(typeof u>"u"){var g=a||this.lead;a=g.row,u=g.column}return this.session.getWordRange(a,u)},i.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},i.prototype.selectAWord=function(){var a=this.getCursor(),u=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(u)},i.prototype.getLineRange=function(a,u){var g=typeof a=="number"?a:this.lead.row,s,c=this.session.getFoldLine(g);return c?(g=c.start.row,s=c.end.row):s=g,u===!0?new o(g,0,s,this.session.getLine(s).length):new o(g,0,s+1,0)},i.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},i.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},i.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},i.prototype.wouldMoveIntoSoftTab=function(a,u,g){var s=a.column,c=a.column+u;return g<0&&(s=a.column-u,c=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(s,c).split(" ").length-1==u},i.prototype.moveCursorLeft=function(){var a=this.lead.getPosition(),u;if(u=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(u.start.row,u.start.column);else if(a.column===0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var g=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,g,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-g):this.moveCursorBy(0,-1)}},i.prototype.moveCursorRight=function(){var a=this.lead.getPosition(),u;if(u=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(u.end.row,u.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var g=this.session.getTabSize(),a=this.lead;this.wouldMoveIntoSoftTab(a,g,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,g):this.moveCursorBy(0,1)}},i.prototype.moveCursorLineStart=function(){var a=this.lead.row,u=this.lead.column,g=this.session.documentToScreenRow(a,u),s=this.session.screenToDocumentPosition(g,0),c=this.session.getDisplayLine(a,null,s.row,s.column),m=c.match(/^\s*/);m[0].length!=u&&!this.session.$useEmacsStyleLineStart&&(s.column+=m[0].length),this.moveCursorToPosition(s)},i.prototype.moveCursorLineEnd=function(){var a=this.lead,u=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==u.column){var g=this.session.getLine(u.row);if(u.column==g.length){var s=g.search(/\s+$/);s>0&&(u.column=s)}}this.moveCursorTo(u.row,u.column)},i.prototype.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,u=this.doc.getLine(a).length;this.moveCursorTo(a,u)},i.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},i.prototype.moveCursorLongWordRight=function(){var a=this.lead.row,u=this.lead.column,g=this.doc.getLine(a),s=g.substring(u);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var c=this.session.getFoldAt(a,u,1);if(c){this.moveCursorTo(c.end.row,c.end.column);return}if(this.session.nonTokenRe.exec(s)&&(u+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,s=g.substring(u)),u>=g.length){this.moveCursorTo(a,g.length),this.moveCursorRight(),a<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(s)&&(u+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,u)},i.prototype.moveCursorLongWordLeft=function(){var a=this.lead.row,u=this.lead.column,g;if(g=this.session.getFoldAt(a,u,-1)){this.moveCursorTo(g.start.row,g.start.column);return}var s=this.session.getFoldStringAt(a,u,-1);s==null&&(s=this.doc.getLine(a).substring(0,u));var c=f.stringReverse(s);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(c)&&(u-=this.session.nonTokenRe.lastIndex,c=c.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),u<=0){this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(c)&&(u-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,u)},i.prototype.$shortWordEndIndex=function(a){var u=0,g,s=/\s/,c=this.session.tokenRe;if(c.lastIndex=0,this.session.tokenRe.exec(a))u=this.session.tokenRe.lastIndex;else{for(;(g=a[u])&&s.test(g);)u++;if(u<1){for(c.lastIndex=0;(g=a[u])&&!c.test(g);)if(c.lastIndex=0,u++,s.test(g))if(u>2){u--;break}else{for(;(g=a[u])&&s.test(g);)u++;if(u>2)break}}}return c.lastIndex=0,u},i.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,u=this.lead.column,g=this.doc.getLine(a),s=g.substring(u),c=this.session.getFoldAt(a,u,1);if(c)return this.moveCursorTo(c.end.row,c.end.column);if(u==g.length){var m=this.doc.getLength();do a++,s=this.doc.getLine(a);while(a<m&&/^\s*$/.test(s));/^\s+/.test(s)||(s=""),u=0}var w=this.$shortWordEndIndex(s);this.moveCursorTo(a,u+w)},i.prototype.moveCursorShortWordLeft=function(){var a=this.lead.row,u=this.lead.column,g;if(g=this.session.getFoldAt(a,u,-1))return this.moveCursorTo(g.start.row,g.start.column);var s=this.session.getLine(a).substring(0,u);if(u===0){do a--,s=this.doc.getLine(a);while(a>0&&/^\s*$/.test(s));u=s.length,/\s+$/.test(s)||(s="")}var c=f.stringReverse(s),m=this.$shortWordEndIndex(c);return this.moveCursorTo(a,u-m)},i.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},i.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},i.prototype.moveCursorBy=function(a,u){var g=this.session.documentToScreenPosition(this.lead.row,this.lead.column),s;if(u===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(g.row,this.lead.row)?(s=this.session.$bidiHandler.getPosLeft(g.column),g.column=Math.round(s/this.session.$bidiHandler.charWidths[0])):s=g.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?g.column=this.$desiredColumn:this.$desiredColumn=g.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var c=this.session.lineWidgets[this.lead.row];a<0?a-=c.rowsAbove||0:a>0&&(a+=c.rowCount-(c.rowsAbove||0))}var m=this.session.screenToDocumentPosition(g.row+a,g.column,s);a!==0&&u===0&&m.row===this.lead.row&&(m.column,this.lead.column),this.moveCursorTo(m.row,m.column+u,u===0)},i.prototype.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},i.prototype.moveCursorTo=function(a,u,g){var s=this.session.getFoldAt(a,u,1);s&&(a=s.start.row,u=s.start.column),this.$keepDesiredColumnOnChange=!0;var c=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(c.charAt(u))&&c.charAt(u-1)&&(this.lead.row==a&&this.lead.column==u+1?u=u-1:u=u+1),this.lead.setPosition(a,u),this.$keepDesiredColumnOnChange=!1,g||(this.$desiredColumn=null)},i.prototype.moveCursorToScreen=function(a,u,g){var s=this.session.screenToDocumentPosition(a,u);this.moveCursorTo(s.row,s.column,g)},i.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},i.prototype.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},i.prototype.toOrientedRange=function(a){var u=this.getRange();return a?(a.start.column=u.start.column,a.start.row=u.start.row,a.end.column=u.end.column,a.end.row=u.end.row):a=u,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},i.prototype.getRangeOfMovements=function(a){var u=this.getCursor();try{a(this);var g=this.getCursor();return o.fromPoints(u,g)}catch{return o.fromPoints(u,u)}finally{this.moveCursorToPosition(u)}},i.prototype.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(u){var g=u.clone();return g.isBackwards=u.cursor==u.start,g});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},i.prototype.fromJSON=function(a){if(a.start==null)if(this.rangeList&&a.length>1){this.toSingleRange(a[0]);for(var u=a.length;u--;){var g=o.fromPoints(a[u].start,a[u].end);a[u].isBackwards&&(g.cursor=g.start),this.addRange(g,!0)}return}else a=a[0];this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},i.prototype.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var u=this.ranges.length;u--;)if(!this.ranges[u].isEqual(a[u]))return!1;return!0},i})();p.prototype.setSelectionAnchor=p.prototype.setAnchor,p.prototype.getSelectionAnchor=p.prototype.getAnchor,p.prototype.setSelectionRange=p.prototype.setRange,h.implement(p.prototype,v),r.Selection=p}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,r,d){var h=e("./lib/report_error").reportError,f=2e3,v=(function(){function o(p){this.splitRegex,this.states=p,this.regExps={},this.matchMappings={};for(var i in this.states){for(var a=this.states[i],u=[],g=0,s=this.matchMappings[i]={defaultToken:"text"},c="g",m=[],w=0;w<a.length;w++){var x=a[w];if(x.defaultToken&&(s.defaultToken=x.defaultToken),x.caseInsensitive&&c.indexOf("i")===-1&&(c+="i"),x.unicode&&c.indexOf("u")===-1&&(c+="u"),x.regex!=null){x.regex instanceof RegExp&&(x.regex=x.regex.toString().slice(1,-1));var R=x.regex,S=new RegExp("(?:("+R+")|(.))").exec("a").length-2;Array.isArray(x.token)?x.token.length==1||S==1?x.token=x.token[0]:S-1!=x.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:x,groupCount:S-1}),x.token=x.token[0]):(x.tokenArray=x.token,x.token=null,x.onMatch=this.$arrayTokens):typeof x.token=="function"&&!x.onMatch&&(S>1?x.onMatch=this.$applyToken:x.onMatch=x.token),S>1&&(/\\\d/.test(x.regex)?R=x.regex.replace(/\\([0-9]+)/g,function(A,C){return"\\"+(parseInt(C,10)+g+1)}):(S=1,R=this.removeCapturingGroups(x.regex)),!x.splitRegex&&typeof x.token!="string"&&m.push(x)),s[g]=w,g+=S,u.push(R),x.onMatch||(x.onMatch=null)}}u.length||(s[0]=0,u.push("$")),m.forEach(function(A){A.splitRegex=this.createSplitterRegexp(A.regex,c)},this),this.regExps[i]=new RegExp("("+u.join(")|(")+")|($)",c)}}return o.prototype.$setMaxTokenCount=function(p){f=p|0},o.prototype.$applyToken=function(p){var i=this.splitRegex.exec(p).slice(1),a=this.token.apply(this,i);if(typeof a=="string")return[{type:a,value:p}];for(var u=[],g=0,s=a.length;g<s;g++)i[g]&&(u[u.length]={type:a[g],value:i[g]});return u},o.prototype.$arrayTokens=function(p){if(!p)return[];var i=this.splitRegex.exec(p);if(!i)return"text";for(var a=[],u=this.tokenArray,g=0,s=u.length;g<s;g++)i[g+1]&&(a[a.length]={type:u[g],value:i[g+1]});return a},o.prototype.removeCapturingGroups=function(p){var i=p.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(a,u){return u?"(?:":a});return i},o.prototype.createSplitterRegexp=function(p,i){if(p.indexOf("(?=")!=-1){var a=0,u=!1,g={};p.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(s,c,m,w,x,R){return u?u=x!="]":x?u=!0:w?(a==g.stack&&(g.end=R+1,g.stack=-1),a--):m&&(a++,m.length!=1&&(g.stack=a,g.start=R)),s}),g.end!=null&&/^\)*$/.test(p.substr(g.end))&&(p=p.substring(0,g.start)+p.substr(g.end))}return p.charAt(0)!="^"&&(p="^"+p),p.charAt(p.length-1)!="$"&&(p+="$"),new RegExp(p,(i||"").replace("g",""))},o.prototype.getLineTokens=function(p,i){if(i&&typeof i!="string"){var a=i.slice(0);i=a[0],i==="#tmp"&&(a.shift(),i=a.shift())}else var a=[];var u=i||"start",g=this.states[u];g||(u="start",g=this.states[u]);var s=this.matchMappings[u],c=this.regExps[u];c.lastIndex=0;for(var m,w=[],x=0,R=0,S={type:null,value:""};m=c.exec(p);){var A=s.defaultToken,C=null,O=m[0],N=c.lastIndex;if(N-O.length>x){var M=p.substring(x,N-O.length);S.type==A?S.value+=M:(S.type&&w.push(S),S={type:A,value:M})}for(var L=0;L<m.length-2;L++)if(m[L+1]!==void 0){C=g[s[L]],C.onMatch?A=C.onMatch(O,u,a,p):A=C.token,C.next&&(typeof C.next=="string"?u=C.next:u=C.next(u,a),g=this.states[u],g||(this.reportError("state doesn't exist",u),u="start",g=this.states[u]),s=this.matchMappings[u],x=N,c=this.regExps[u],c.lastIndex=N),C.consumeLineEnd&&(x=N);break}if(O){if(typeof A=="string")(!C||C.merge!==!1)&&S.type===A?S.value+=O:(S.type&&w.push(S),S={type:A,value:O});else if(A){S.type&&w.push(S),S={type:null,value:""};for(var L=0;L<A.length;L++)w.push(A[L])}}if(x==p.length)break;if(x=N,R++>f){for(R>2*p.length&&this.reportError("infinite loop with in ace tokenizer",{startState:i,line:p});x<p.length;)S.type&&w.push(S),S={value:p.substring(x,x+=500),type:"overflow"};u="start",a=[];break}}return S.type&&w.push(S),a.length>1&&a[0]!==u&&a.unshift("#tmp",u),{tokens:w,state:a.length?a:u}},o})();v.prototype.reportError=h,r.Tokenizer=v}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,r,d){var h=e("../lib/deep_copy").deepCopy,f;f=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(p,i){if(!i){for(var a in p)this.$rules[a]=p[a];return}for(var a in p){for(var u=p[a],g=0;g<u.length;g++){var s=u[g];(s.next||s.onMatch)&&(typeof s.next=="string"&&s.next.indexOf(i)!==0&&(s.next=i+s.next),s.nextState&&s.nextState.indexOf(i)!==0&&(s.nextState=i+s.nextState))}this.$rules[i+a]=u}},this.getRules=function(){return this.$rules},this.embedRules=function(p,i,a,u,g){var s=typeof p=="function"?new p().getRules():p;if(u)for(var c=0;c<u.length;c++)u[c]=i+u[c];else{u=[];for(var m in s)u.push(i+m)}if(this.addRules(s,i),a)for(var w=Array.prototype[g?"push":"unshift"],c=0;c<u.length;c++)w.apply(this.$rules[u[c]],h(a));this.$embeds||(this.$embeds=[]),this.$embeds.push(i)},this.getEmbeds=function(){return this.$embeds};var v=function(p,i){return(p!="start"||i.length)&&i.unshift(this.nextState,p),this.nextState},o=function(p,i){return i.shift(),i.shift()||"start"};this.normalizeRules=function(){var p=0,i=this.$rules;function a(u){var g=i[u];g.processed=!0;for(var s=0;s<g.length;s++){var c=g[s],m=null;Array.isArray(c)&&(m=c,c={}),!c.regex&&c.start&&(c.regex=c.start,c.next||(c.next=[]),c.next.push({defaultToken:c.token},{token:c.token+".end",regex:c.end||c.start,next:"pop"}),c.token=c.token+".start",c.push=!0);var w=c.next||c.push;if(w&&Array.isArray(w)){var x=c.stateName;x||(x=c.token,typeof x!="string"&&(x=x[0]||""),i[x]&&(x+=p++)),i[x]=w,c.next=x,a(x)}else w=="pop"&&(c.next=o);if(c.push&&(c.nextState=c.next||c.push,c.next=v,delete c.push),c.rules)for(var R in c.rules)i[R]?i[R].push&&i[R].push.apply(i[R],c.rules[R]):i[R]=c.rules[R];var S=typeof c=="string"?c:c.include;if(S&&(S==="$self"&&(S="start"),Array.isArray(S)?m=S.map(function(C){return i[C]}):m=i[S]),m){var A=[s,1].concat(m);c.noEscape&&(A=A.filter(function(C){return!C.next})),g.splice.apply(g,A),s--}c.keywordMap&&(c.token=this.createKeywordMapper(c.keywordMap,c.defaultToken||"text",c.caseInsensitive),delete c.defaultToken)}}Object.keys(i).forEach(a,this)},this.createKeywordMapper=function(p,i,a,u){var g=Object.create(null);return this.$keywordList=[],Object.keys(p).forEach(function(s){for(var c=p[s],m=c.split(u||"|"),w=m.length;w--;){var x=m[w];this.$keywordList.push(x),a&&(x=x.toLowerCase()),g[x]=s}},this),p=null,a?function(s){return g[s.toLowerCase()]||i}:function(s){return g[s]||i}},this.getKeywords=function(){return this.$keywords}}).call(f.prototype),r.TextHighlightRules=f}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,r,d){var h;h=function(){this.$behaviours={}},(function(){this.add=function(f,v,o){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[f]:this.$behaviours[f]={}}this.$behaviours[f][v]=o},this.addBehaviours=function(f){for(var v in f)for(var o in f[v])this.add(v,o,f[v][o])},this.remove=function(f){this.$behaviours&&this.$behaviours[f]&&delete this.$behaviours[f]},this.inherit=function(f,v){if(typeof f=="function")var o=new f().getBehaviours(v);else var o=f.getBehaviours(v);this.addBehaviours(o)},this.getBehaviours=function(f){if(f){for(var v={},o=0;o<f.length;o++)this.$behaviours[f[o]]&&(v[f[o]]=this.$behaviours[f[o]]);return v}else return this.$behaviours}}).call(h.prototype),r.Behaviour=h}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,r,d){var h=e("./range").Range,f=(function(){function v(o,p,i){this.$session=o,this.$row=p,this.$rowTokens=o.getTokens(p);var a=o.getTokenAt(p,i);this.$tokenIndex=a?a.index:-1}return v.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]},v.prototype.stepForward=function(){this.$tokenIndex+=1;for(var o;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,o||(o=this.$session.getLength()),this.$row>=o)return this.$row=o-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},v.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},v.prototype.getCurrentTokenRow=function(){return this.$row},v.prototype.getCurrentTokenColumn=function(){var o=this.$rowTokens,p=this.$tokenIndex,i=o[p].start;if(i!==void 0)return i;for(i=0;p>0;)p-=1,i+=o[p].value.length;return i},v.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},v.prototype.getCurrentTokenRange=function(){var o=this.$rowTokens[this.$tokenIndex],p=this.getCurrentTokenColumn();return new h(this.$row,p,this.$row,p+o.value.length)},v})();r.TokenIterator=f}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,r,d){var h=e("../../lib/oop"),f=e("../behaviour").Behaviour,v=e("../../token_iterator").TokenIterator,o=e("../../lib/lang"),p=["text","paren.rparen","rparen","paren","punctuation.operator"],i=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,u={},g={'"':'"',"'":"'"},s=function(w){var x=-1;if(w.multiSelect&&(x=w.selection.index,u.rangeCount!=w.multiSelect.rangeCount&&(u={rangeCount:w.multiSelect.rangeCount})),u[x])return a=u[x];a=u[x]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},c=function(w,x,R,S){var A=w.end.row-w.start.row;return{text:R+x+S,selection:[0,w.start.column+1,A,w.end.column+(A?0:1)]}},m;m=function(w){w=w||{},this.add("braces","insertion",function(x,R,S,A,C){var O=S.getCursorPosition(),N=A.doc.getLine(O.row);if(C=="{"){s(S);var M=S.getSelectionRange(),L=A.doc.getTextRange(M),j=A.getTokenAt(O.row,O.column);if(L!==""&&L!=="{"&&S.getWrapBehavioursEnabled())return c(M,L,"{","}");if(j&&/(?:string)\.quasi|\.xml/.test(j.type)){var F=[/tag\-(?:open|name)/,/attribute\-name/];return F.some(function(V){return V.test(j.type)})||/(string)\.quasi/.test(j.type)&&j.value[O.column-j.start-1]!=="$"?void 0:(m.recordAutoInsert(S,A,"}"),{text:"{}",selection:[1,1]})}else if(m.isSaneInsertion(S,A))return/[\]\}\)]/.test(N[O.column])||S.inMultiSelectMode||w.braces?(m.recordAutoInsert(S,A,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(S,A,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){s(S);var D=N.substring(O.column,O.column+1);if(D=="}"){var $=A.$findOpeningBracket("}",{column:O.column+1,row:O.row});if($!==null&&m.isAutoInsertedClosing(O,N,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
|
|
183
|
+
`||C==`\r
|
|
184
|
+
`){s(S);var _="";m.isMaybeInsertedClosing(O,N)&&(_=o.stringRepeat("}",a.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var D=N.substring(O.column,O.column+1);if(D==="}"){var I=A.findMatchingBracket({row:O.row,column:O.column+1},"}");if(!I)return null;var z=this.$getIndent(A.getLine(I.row))}else if(_)var z=this.$getIndent(N);else{m.clearMaybeInsertedClosing();return}var U=z+A.getTabString();return{text:`
|
|
185
|
+
`+U+`
|
|
186
|
+
`+z+_,selection:[1,U.length,1,U.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(x,R,S,A,C){var O=A.doc.getTextRange(C);if(!C.isMultiLine()&&O=="{"){s(S);var N=A.doc.getLine(C.start.row),M=N.substring(C.end.column,C.end.column+1);if(M=="}")return C.end.column++,C;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(x,R,S,A,C){if(C=="("){s(S);var O=S.getSelectionRange(),N=A.doc.getTextRange(O);if(N!==""&&S.getWrapBehavioursEnabled())return c(O,N,"(",")");if(m.isSaneInsertion(S,A))return m.recordAutoInsert(S,A,")"),{text:"()",selection:[1,1]}}else if(C==")"){s(S);var M=S.getCursorPosition(),L=A.doc.getLine(M.row),j=L.substring(M.column,M.column+1);if(j==")"){var F=A.$findOpeningBracket(")",{column:M.column+1,row:M.row});if(F!==null&&m.isAutoInsertedClosing(M,L,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(x,R,S,A,C){var O=A.doc.getTextRange(C);if(!C.isMultiLine()&&O=="("){s(S);var N=A.doc.getLine(C.start.row),M=N.substring(C.start.column+1,C.start.column+2);if(M==")")return C.end.column++,C}}),this.add("brackets","insertion",function(x,R,S,A,C){if(C=="["){s(S);var O=S.getSelectionRange(),N=A.doc.getTextRange(O);if(N!==""&&S.getWrapBehavioursEnabled())return c(O,N,"[","]");if(m.isSaneInsertion(S,A))return m.recordAutoInsert(S,A,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){s(S);var M=S.getCursorPosition(),L=A.doc.getLine(M.row),j=L.substring(M.column,M.column+1);if(j=="]"){var F=A.$findOpeningBracket("]",{column:M.column+1,row:M.row});if(F!==null&&m.isAutoInsertedClosing(M,L,C))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(x,R,S,A,C){var O=A.doc.getTextRange(C);if(!C.isMultiLine()&&O=="["){s(S);var N=A.doc.getLine(C.start.row),M=N.substring(C.start.column+1,C.start.column+2);if(M=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(x,R,S,A,C){var O=A.$mode.$quotes||g;if(C.length==1&&O[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;s(S);var N=C,M=S.getSelectionRange(),L=A.doc.getTextRange(M);if(L!==""&&(L.length!=1||!O[L])&&S.getWrapBehavioursEnabled())return c(M,L,N,N);if(!L){var j=S.getCursorPosition(),F=A.doc.getLine(j.row),D=F.substring(j.column-1,j.column),$=F.substring(j.column,j.column+1),_=A.getTokenAt(j.row,j.column),I=A.getTokenAt(j.row,j.column+1);if(D=="\\"&&_&&/escape/.test(_.type))return null;var z=_&&/string|escape/.test(_.type),U=!I||/string|escape/.test(I.type),V;if($==N)V=z!==U,V&&/string\.end/.test(I.type)&&(V=!1);else{if(z&&!U||z&&U)return null;var K=A.$mode.tokenRe;K.lastIndex=0;var Z=K.test(D);K.lastIndex=0;var oe=K.test($),ee=A.$mode.$pairQuotesAfter,re=ee&&ee[N]&&ee[N].test(D);if(!re&&Z||oe||$&&!/[\s;,.})\]\\]/.test($))return null;var ce=F[j.column-2];if(D==N&&(ce==N||K.test(ce)))return null;V=!0}return{text:V?N+N:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(x,R,S,A,C){var O=A.$mode.$quotes||g,N=A.doc.getTextRange(C);if(!C.isMultiLine()&&O.hasOwnProperty(N)){s(S);var M=A.doc.getLine(C.start.row),L=M.substring(C.start.column+1,C.start.column+2);if(L==N)return C.end.column++,C}}),w.closeDocComment!==!1&&this.add("doc comment end","insertion",function(x,R,S,A,C){if(x==="doc-start"&&(C===`
|
|
187
|
+
`||C===`\r
|
|
188
|
+
`)&&S.selection.isEmpty()){var O=S.getCursorPosition();if(O.column===0)return;for(var N=A.doc.getLine(O.row),M=A.doc.getLine(O.row+1),L=A.getTokens(O.row),j=0,F=0;F<L.length;F++){j+=L[F].value.length;var D=L[F];if(j>=O.column){if(j===O.column){if(!/\.doc/.test(D.type))return;if(/\*\//.test(D.value)){var $=L[F+1];if(!$||!/\.doc/.test($.type))return}}var _=O.column-(j-D.value.length),I=D.value.indexOf("*/"),z=D.value.indexOf("/**",I>-1?I+2:0);if(z!==-1&&_>z&&_<z+3||I!==-1&&z!==-1&&_>=I&&_<=z||!/\.doc/.test(D.type))return;break}}var U=this.$getIndent(N);if(/\s*\*/.test(M))return/^\s*\*/.test(N)?{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(N.substring(0,O.column)))return{text:C+U+" * "+C+" "+U+"*/",selection:[1,4+U.length,1,4+U.length]}}})},m.isSaneInsertion=function(w,x){var R=w.getCursorPosition(),S=new v(x,R.row,R.column);if(!this.$matchTokenType(S.getCurrentToken()||"text",p)){if(/[)}\]]/.test(w.session.getLine(R.row)[R.column]))return!0;var A=new v(x,R.row,R.column+1);if(!this.$matchTokenType(A.getCurrentToken()||"text",p))return!1}return S.stepForward(),S.getCurrentTokenRow()!==R.row||this.$matchTokenType(S.getCurrentToken()||"text",i)},m.$matchTokenType=function(w,x){return x.indexOf(w.type||w)>-1},m.recordAutoInsert=function(w,x,R){var S=w.getCursorPosition(),A=x.doc.getLine(S.row);this.isAutoInsertedClosing(S,A,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=S.row,a.autoInsertedLineEnd=R+A.substr(S.column),a.autoInsertedBrackets++},m.recordMaybeInsert=function(w,x,R){var S=w.getCursorPosition(),A=x.doc.getLine(S.row);this.isMaybeInsertedClosing(S,A)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=S.row,a.maybeInsertedLineStart=A.substr(0,S.column)+R,a.maybeInsertedLineEnd=A.substr(S.column),a.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(w,x,R){return a.autoInsertedBrackets>0&&w.row===a.autoInsertedRow&&R===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,f),r.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(e,r,d){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],f=0,v=[],o=0;o<h.length;o+=2)v.push(f+=h[o]),h[o+1]&&v.push(45,f+=h[o+1]);r.wordChars=String.fromCharCode.apply(null,v)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,r,d){var h=e("../config"),f=e("../tokenizer").Tokenizer,v=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour/cstyle").CstyleBehaviour,p=e("../unicode"),i=e("../lib/lang"),a=e("../token_iterator").TokenIterator,u=e("../range").Range,g;g=function(){this.HighlightRules=v},(function(){this.$defaultBehaviour=new o,this.tokenRe=new RegExp("^["+p.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+p.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new f(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(s,c,m,w){var x=c.doc,R=!0,S=!0,A=1/0,C=c.getTabSize(),O=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var N=this.lineCommentStart.map(i.escapeRegExp).join("|"),M=this.lineCommentStart[0];else var N=i.escapeRegExp(this.lineCommentStart),M=this.lineCommentStart;N=new RegExp("^(\\s*)(?:"+N+") ?"),O=c.getUseSoftTabs();var L=function(V,K){var Z=V.match(N);if(Z){var oe=Z[1].length,ee=Z[0].length;!$(V,oe,ee)&&Z[0][ee-1]==" "&&ee--,x.removeInLine(K,oe,ee)}},j=M+" ",F=function(V,K){(!R||/\S/.test(V))&&($(V,A,A)?x.insertInLine({row:K,column:A},j):x.insertInLine({row:K,column:A},M))},D=function(V,K){return N.test(V)},$=function(V,K,Z){for(var oe=0;K--&&V.charAt(K)==" ";)oe++;if(oe%C!=0)return!1;for(var oe=0;V.charAt(Z++)==" ";)oe++;return C>2?oe%C!=C-1:oe%C==0}}else{if(!this.blockComment)return!1;var M=this.blockComment.start,_=this.blockComment.end,N=new RegExp("^(\\s*)(?:"+i.escapeRegExp(M)+")"),I=new RegExp("(?:"+i.escapeRegExp(_)+")\\s*$"),F=function(re,ce){D(re,ce)||(!R||/\S/.test(re))&&(x.insertInLine({row:ce,column:re.length},_),x.insertInLine({row:ce,column:A},M))},L=function(re,ce){var ie;(ie=re.match(I))&&x.removeInLine(ce,re.length-ie[0].length,re.length),(ie=re.match(N))&&x.removeInLine(ce,ie[1].length,ie[0].length)},D=function(re,ce){if(N.test(re))return!0;for(var ie=c.getTokens(ce),fe=0;fe<ie.length;fe++)if(ie[fe].type==="comment")return!0}}function z(V){for(var K=m;K<=w;K++)V(x.getLine(K),K)}var U=1/0;z(function(V,K){var Z=V.search(/\S/);Z!==-1?(Z<A&&(A=Z),S&&!D(V,K)&&(S=!1)):U>V.length&&(U=V.length)}),A==1/0&&(A=U,R=!1,S=!1),O&&A%C!=0&&(A=Math.floor(A/C)*C),z(S?L:F)},this.toggleBlockComment=function(s,c,m,w){var x=this.blockComment;if(x){!x.start&&x[0]&&(x=x[0]);var R=new a(c,w.row,w.column),S=R.getCurrentToken();c.selection;var A=c.selection.toOrientedRange(),C,O;if(S&&/comment/.test(S.type)){for(var N,M;S&&/comment/.test(S.type);){var L=S.value.indexOf(x.start);if(L!=-1){var j=R.getCurrentTokenRow(),F=R.getCurrentTokenColumn()+L;N=new u(j,F,j,F+x.start.length);break}S=R.stepBackward()}for(var R=new a(c,w.row,w.column),S=R.getCurrentToken();S&&/comment/.test(S.type);){var L=S.value.indexOf(x.end);if(L!=-1){var j=R.getCurrentTokenRow(),F=R.getCurrentTokenColumn()+L;M=new u(j,F,j,F+x.end.length);break}S=R.stepForward()}M&&c.remove(M),N&&(c.remove(N),C=N.start.row,O=-x.start.length)}else O=x.start.length,C=m.start.row,c.insert(m.end,x.end),c.insert(m.start,x.start);A.start.row==C&&(A.start.column+=O),A.end.row==C&&(A.end.column+=O),c.selection.fromOrientedRange(A)}},this.getNextLineIndent=function(s,c,m){return this.$getIndent(c)},this.checkOutdent=function(s,c,m){return!1},this.autoOutdent=function(s,c,m){},this.$getIndent=function(s){return s.match(/^\s*/)[0]},this.createWorker=function(s){return null},this.createModeDelegates=function(s){this.$embeds=[],this.$modes={};for(var c in s)if(s[c]){var m=s[c],w=m.prototype.$id,x=h.$modes[w];x||(h.$modes[w]=x=new m),h.$modes[c]||(h.$modes[c]=x),this.$embeds.push(c),this.$modes[c]=x}for(var R=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],S=function(O){(function(N){var M=R[O],L=N[M];N[R[O]]=function(){return this.$delegator(M,arguments,L)}})(A)},A=this,c=0;c<R.length;c++)S(c)},this.$delegator=function(s,c,m){var w=c[0]||"start";if(typeof w!="string"){if(Array.isArray(w[2])){var x=w[2][w[2].length-1],R=this.$modes[x];if(R)return R[s].apply(R,[w[1]].concat([].slice.call(c,1)))}w=w[0]||"start"}for(var S=0;S<this.$embeds.length;S++)if(this.$modes[this.$embeds[S]]){var A=w.split(this.$embeds[S]);if(!A[0]&&A[1]){c[0]=A[1];var R=this.$modes[this.$embeds[S]];return R[s].apply(R,c)}}var C=m.apply(this,c);return m?C:void 0},this.transformAction=function(s,c,m,w,x){if(this.$behaviour){var R=this.$behaviour.getBehaviours();for(var S in R)if(R[S][c]){var A=R[S][c].apply(this,arguments);if(A)return A}}},this.getKeywords=function(s){if(!this.completionKeywords){var c=this.$tokenizer.rules,m=[];for(var w in c)for(var x=c[w],R=0,S=x.length;R<S;R++)if(typeof x[R].token=="string")/keyword|support|storage/.test(x[R].token)&&m.push(x[R].regex);else if(typeof x[R].token=="object"){for(var A=0,C=x[R].token.length;A<C;A++)if(/keyword|support|storage/.test(x[R].token[A])){var w=x[R].regex.match(/\(.+?\)/g)[A];m.push(w.substr(1,w.length-2))}}this.completionKeywords=m}return s?m.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(s,c,m,w){var x=this.$keywordList||this.$createKeywordList();return x.map(function(R){return{name:R,value:R,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(g.prototype),r.Mode=g}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,r,d){var h=e("./lib/dom"),f=(function(){function v(o){this.session=o,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 v.prototype.getRowLength=function(o){var p;return this.lineWidgets?p=this.lineWidgets[o]&&this.lineWidgets[o].rowCount||0:p=0,!this.$useWrapMode||!this.$wrapData[o]?1+p:this.$wrapData[o].length+1+p},v.prototype.$getWidgetScreenLength=function(){var o=0;return this.lineWidgets.forEach(function(p){p&&p.rowCount&&!p.hidden&&(o+=p.rowCount)}),o},v.prototype.$onChangeEditor=function(o){this.attach(o.editor)},v.prototype.attach=function(o){o&&o.widgetManager&&o.widgetManager!=this&&o.widgetManager.detach(),this.editor!=o&&(this.detach(),this.editor=o,o&&(o.widgetManager=this,o.renderer.on("beforeRender",this.measureWidgets),o.renderer.on("afterRender",this.renderWidgets)))},v.prototype.detach=function(o){var p=this.editor;if(p){this.editor=null,p.widgetManager=null,p.renderer.off("beforeRender",this.measureWidgets),p.renderer.off("afterRender",this.renderWidgets);var i=this.session.lineWidgets;i&&i.forEach(function(a){a&&a.el&&a.el.parentNode&&(a._inDocument=!1,a.el.parentNode.removeChild(a.el))})}},v.prototype.updateOnFold=function(o,p){var i=p.lineWidgets;if(!(!i||!o.action)){for(var a=o.data,u=a.start.row,g=a.end.row,s=o.action=="add",c=u+1;c<g;c++)i[c]&&(i[c].hidden=s);i[g]&&(s?i[u]?i[g].hidden=s:i[u]=i[g]:(i[u]==i[g]&&(i[u]=void 0),i[g].hidden=s))}},v.prototype.updateOnChange=function(o){var p=this.session.lineWidgets;if(p){var i=o.start.row,a=o.end.row-i;if(a!==0)if(o.action=="remove"){var u=p.splice(i+1,a);!p[i]&&u[u.length-1]&&(p[i]=u.pop()),u.forEach(function(s){s&&this.removeLineWidget(s)},this),this.$updateRows()}else{var g=new Array(a);p[i]&&p[i].column!=null&&o.start.column>p[i].column&&i++,g.unshift(i,0),p.splice.apply(p,g),this.$updateRows()}}},v.prototype.$updateRows=function(){var o=this.session.lineWidgets;if(o){var p=!0;o.forEach(function(i,a){if(i)for(p=!1,i.row=a;i.$oldWidget;)i.$oldWidget.row=a,i=i.$oldWidget}),p&&(this.session.lineWidgets=null)}},v.prototype.$registerLineWidget=function(o){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var p=this.session.lineWidgets[o.row];return p&&(o.$oldWidget=p,p.el&&p.el.parentNode&&(p.el.parentNode.removeChild(p.el),p._inDocument=!1)),this.session.lineWidgets[o.row]=o,o},v.prototype.addLineWidget=function(o){if(this.$registerLineWidget(o),o.session=this.session,!this.editor)return o;var p=this.editor.renderer;o.html&&!o.el&&(o.el=h.createElement("div"),o.el.innerHTML=o.html),o.text&&!o.el&&(o.el=h.createElement("div"),o.el.textContent=o.text),o.el&&(h.addCssClass(o.el,"ace_lineWidgetContainer"),o.className&&h.addCssClass(o.el,o.className),o.el.style.position="absolute",o.el.style.zIndex="5",p.container.appendChild(o.el),o._inDocument=!0,o.coverGutter||(o.el.style.zIndex="3"),o.pixelHeight==null&&(o.pixelHeight=o.el.offsetHeight)),o.rowCount==null&&(o.rowCount=o.pixelHeight/p.layerConfig.lineHeight);var i=this.session.getFoldAt(o.row,0);if(o.$fold=i,i){var a=this.session.lineWidgets;o.row==i.end.row&&!a[i.start.row]?a[i.start.row]=o:o.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:o.row}}}),this.$updateRows(),this.renderWidgets(null,p),this.onWidgetChanged(o),o},v.prototype.removeLineWidget=function(o){if(o._inDocument=!1,o.session=null,o.el&&o.el.parentNode&&o.el.parentNode.removeChild(o.el),o.editor&&o.editor.destroy)try{o.editor.destroy()}catch{}if(this.session.lineWidgets){var p=this.session.lineWidgets[o.row];if(p==o)this.session.lineWidgets[o.row]=o.$oldWidget,o.$oldWidget&&this.onWidgetChanged(o.$oldWidget);else for(;p;){if(p.$oldWidget==o){p.$oldWidget=o.$oldWidget;break}p=p.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:o.row}}}),this.$updateRows()},v.prototype.getWidgetsAtRow=function(o){for(var p=this.session.lineWidgets,i=p&&p[o],a=[];i;)a.push(i),i=i.$oldWidget;return a},v.prototype.onWidgetChanged=function(o){this.session._changedWidgets.push(o),this.editor&&this.editor.renderer.updateFull()},v.prototype.measureWidgets=function(o,p){var i=this.session._changedWidgets,a=p.layerConfig;if(!(!i||!i.length)){for(var u=1/0,g=0;g<i.length;g++){var s=i[g];if(!(!s||!s.el)&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,p.container.appendChild(s.el)}s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/a.characterWidth));var c=s.h/a.lineHeight;s.coverLine&&(c-=this.session.getRowLineCount(s.row),c<0&&(c=0)),s.rowCount!=c&&(s.rowCount=c,s.row<u&&(u=s.row))}}u!=1/0&&(this.session._emit("changeFold",{data:{start:{row:u}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},v.prototype.renderWidgets=function(o,p){var i=p.layerConfig,a=this.session.lineWidgets;if(a){for(var u=Math.min(this.firstRow,i.firstRow),g=Math.max(this.lastRow,i.lastRow,a.length);u>0&&!a[u];)u--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,p.$cursorLayer.config=i;for(var s=u;s<=g;s++){var c=a[s];if(!(!c||!c.el)){if(c.hidden){c.el.style.top=-100-(c.pixelHeight||0)+"px";continue}c._inDocument||(c._inDocument=!0,p.container.appendChild(c.el));var m=p.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;c.coverLine||(m+=i.lineHeight*this.session.getRowLineCount(c.row)),c.el.style.top=m-i.offset+"px";var w=c.coverGutter?0:p.gutterWidth;c.fixedWidth||(w-=p.scrollLeft),c.el.style.left=w+"px",c.fullWidth&&c.screenWidth&&(c.el.style.minWidth=i.width+2*i.padding+"px"),c.fixedWidth?c.el.style.right=p.scrollBar.getWidth()+"px":c.el.style.right=""}}}},v})();r.LineWidgets=f}),ace.define("ace/apply_delta",["require","exports","module"],function(e,r,d){r.applyDelta=function(h,f,v){var o=f.start.row,p=f.start.column,i=h[o]||"";switch(f.action){case"insert":var a=f.lines;if(a.length===1)h[o]=i.substring(0,p)+f.lines[0]+i.substring(p);else{var u=[o,1].concat(f.lines);h.splice.apply(h,u),h[o]=i.substring(0,p)+h[o],h[o+f.lines.length-1]+=i.substring(p)}break;case"remove":var g=f.end.column,s=f.end.row;o===s?h[o]=i.substring(0,p)+i.substring(g):h.splice(o,s-o+1,i.substring(0,p)+h[s].substring(g));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,d){var h=e("./lib/oop"),f=e("./lib/event_emitter").EventEmitter,v=(function(){function i(a,u,g){this.$onChange=this.onChange.bind(this),this.attach(a),typeof u!="number"?this.setPosition(u.row,u.column):this.setPosition(u,g)}return i.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},i.prototype.getDocument=function(){return this.document},i.prototype.onChange=function(a){if(!(a.start.row==a.end.row&&a.start.row!=this.row)&&!(a.start.row>this.row)){var u=p(a,{row:this.row,column:this.column},this.$insertRight);this.setPosition(u.row,u.column,!0)}},i.prototype.setPosition=function(a,u,g){var s;if(g?s={row:a,column:u}:s=this.$clipPositionToDocument(a,u),!(this.row==s.row&&this.column==s.column)){var c={row:this.row,column:this.column};this.row=s.row,this.column=s.column,this._signal("change",{old:c,value:s})}},i.prototype.detach=function(){this.document.off("change",this.$onChange)},i.prototype.attach=function(a){this.document=a||this.document,this.document.on("change",this.$onChange)},i.prototype.$clipPositionToDocument=function(a,u){var g={};return a>=this.document.getLength()?(g.row=Math.max(0,this.document.getLength()-1),g.column=this.document.getLine(g.row).length):a<0?(g.row=0,g.column=0):(g.row=a,g.column=Math.min(this.document.getLine(g.row).length,Math.max(0,u))),u<0&&(g.column=0),g},i})();v.prototype.$insertRight=!1,h.implement(v.prototype,f);function o(i,a,u){var g=u?i.column<=a.column:i.column<a.column;return i.row<a.row||i.row==a.row&&g}function p(i,a,u){var g=i.action=="insert",s=(g?1:-1)*(i.end.row-i.start.row),c=(g?1:-1)*(i.end.column-i.start.column),m=i.start,w=g?m:i.end;return o(a,m,u)?{row:a.row,column:a.column}:o(w,a,!u)?{row:a.row+s,column:a.column+(a.row==w.row?c:0)}:{row:m.row,column:m.column}}r.Anchor=v}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,r,d){var h=e("./lib/oop"),f=e("./apply_delta").applyDelta,v=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,p=e("./anchor").Anchor,i=(function(){function a(u){this.$lines=[""],u.length===0?this.$lines=[""]:Array.isArray(u)?this.insertMergedLines({row:0,column:0},u):this.insert({row:0,column:0},u)}return a.prototype.setValue=function(u){var g=this.getLength()-1;this.remove(new o(0,0,g,this.getLine(g).length)),this.insert({row:0,column:0},u||"")},a.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},a.prototype.createAnchor=function(u,g){return new p(this,u,g)},a.prototype.$detectNewLine=function(u){var g=u.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=g?g[1]:`
|
|
189
|
+
`,this._signal("changeNewLineMode")},a.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
|
190
|
+
`;case"unix":return`
|
|
191
|
+
`;default:return this.$autoNewLine||`
|
|
192
|
+
`}},a.prototype.setNewLineMode=function(u){this.$newLineMode!==u&&(this.$newLineMode=u,this._signal("changeNewLineMode"))},a.prototype.getNewLineMode=function(){return this.$newLineMode},a.prototype.isNewLine=function(u){return u==`\r
|
|
193
|
+
`||u=="\r"||u==`
|
|
194
|
+
`},a.prototype.getLine=function(u){return this.$lines[u]||""},a.prototype.getLines=function(u,g){return this.$lines.slice(u,g+1)},a.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},a.prototype.getLength=function(){return this.$lines.length},a.prototype.getTextRange=function(u){return this.getLinesForRange(u).join(this.getNewLineCharacter())},a.prototype.getLinesForRange=function(u){var g;if(u.start.row===u.end.row)g=[this.getLine(u.start.row).substring(u.start.column,u.end.column)];else{g=this.getLines(u.start.row,u.end.row),g[0]=(g[0]||"").substring(u.start.column);var s=g.length-1;u.end.row-u.start.row==s&&(g[s]=g[s].substring(0,u.end.column))}return g},a.prototype.insertLines=function(u,g){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(u,g)},a.prototype.removeLines=function(u,g){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(u,g)},a.prototype.insertNewLine=function(u){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(u,["",""])},a.prototype.insert=function(u,g){return this.getLength()<=1&&this.$detectNewLine(g),this.insertMergedLines(u,this.$split(g))},a.prototype.insertInLine=function(u,g){var s=this.clippedPos(u.row,u.column),c=this.pos(u.row,u.column+g.length);return this.applyDelta({start:s,end:c,action:"insert",lines:[g]},!0),this.clonePos(c)},a.prototype.clippedPos=function(u,g){var s=this.getLength();u===void 0?u=s:u<0?u=0:u>=s&&(u=s-1,g=void 0);var c=this.getLine(u);return g==null&&(g=c.length),g=Math.min(Math.max(g,0),c.length),{row:u,column:g}},a.prototype.clonePos=function(u){return{row:u.row,column:u.column}},a.prototype.pos=function(u,g){return{row:u,column:g}},a.prototype.$clipPosition=function(u){var g=this.getLength();return u.row>=g?(u.row=Math.max(0,g-1),u.column=this.getLine(g-1).length):(u.row=Math.max(0,u.row),u.column=Math.min(Math.max(u.column,0),this.getLine(u.row).length)),u},a.prototype.insertFullLines=function(u,g){u=Math.min(Math.max(u,0),this.getLength());var s=0;u<this.getLength()?(g=g.concat([""]),s=0):(g=[""].concat(g),u--,s=this.$lines[u].length),this.insertMergedLines({row:u,column:s},g)},a.prototype.insertMergedLines=function(u,g){var s=this.clippedPos(u.row,u.column),c={row:s.row+g.length-1,column:(g.length==1?s.column:0)+g[g.length-1].length};return this.applyDelta({start:s,end:c,action:"insert",lines:g}),this.clonePos(c)},a.prototype.remove=function(u){var g=this.clippedPos(u.start.row,u.start.column),s=this.clippedPos(u.end.row,u.end.column);return this.applyDelta({start:g,end:s,action:"remove",lines:this.getLinesForRange({start:g,end:s})}),this.clonePos(g)},a.prototype.removeInLine=function(u,g,s){var c=this.clippedPos(u,g),m=this.clippedPos(u,s);return this.applyDelta({start:c,end:m,action:"remove",lines:this.getLinesForRange({start:c,end:m})},!0),this.clonePos(c)},a.prototype.removeFullLines=function(u,g){u=Math.min(Math.max(0,u),this.getLength()-1),g=Math.min(Math.max(0,g),this.getLength()-1);var s=g==this.getLength()-1&&u>0,c=g<this.getLength()-1,m=s?u-1:u,w=s?this.getLine(m).length:0,x=c?g+1:g,R=c?0:this.getLine(x).length,S=new o(m,w,x,R),A=this.$lines.slice(u,g+1);return this.applyDelta({start:S.start,end:S.end,action:"remove",lines:this.getLinesForRange(S)}),A},a.prototype.removeNewLine=function(u){u<this.getLength()-1&&u>=0&&this.applyDelta({start:this.pos(u,this.getLine(u).length),end:this.pos(u+1,0),action:"remove",lines:["",""]})},a.prototype.replace=function(u,g){if(u instanceof o||(u=o.fromPoints(u.start,u.end)),g.length===0&&u.isEmpty())return u.start;if(g==this.getTextRange(u))return u.end;this.remove(u);var s;return g?s=this.insert(u.start,g):s=u.start,s},a.prototype.applyDeltas=function(u){for(var g=0;g<u.length;g++)this.applyDelta(u[g])},a.prototype.revertDeltas=function(u){for(var g=u.length-1;g>=0;g--)this.revertDelta(u[g])},a.prototype.applyDelta=function(u,g){var s=u.action=="insert";(s?u.lines.length<=1&&!u.lines[0]:!o.comparePoints(u.start,u.end))||(s&&u.lines.length>2e4?this.$splitAndapplyLargeDelta(u,2e4):(f(this.$lines,u,g),this._signal("change",u)))},a.prototype.$safeApplyDelta=function(u){var g=this.$lines.length;(u.action=="remove"&&u.start.row<g&&u.end.row<g||u.action=="insert"&&u.start.row<=g)&&this.applyDelta(u)},a.prototype.$splitAndapplyLargeDelta=function(u,g){for(var s=u.lines,c=s.length-g+1,m=u.start.row,w=u.start.column,x=0,R=0;x<c;x=R){R+=g-1;var S=s.slice(x,R);S.push(""),this.applyDelta({start:this.pos(m+x,w),end:this.pos(m+R,w=0),action:u.action,lines:S},!0)}u.lines=s.slice(x),u.start.row=m+x,u.start.column=w,this.applyDelta(u,!0)},a.prototype.revertDelta=function(u){this.$safeApplyDelta({start:this.clonePos(u.start),end:this.clonePos(u.end),action:u.action=="insert"?"remove":"insert",lines:u.lines.slice()})},a.prototype.indexToPosition=function(u,g){for(var s=this.$lines||this.getAllLines(),c=this.getNewLineCharacter().length,m=g||0,w=s.length;m<w;m++)if(u-=s[m].length+c,u<0)return{row:m,column:u+s[m].length+c};return{row:w-1,column:u+s[w-1].length+c}},a.prototype.positionToIndex=function(u,g){for(var s=this.$lines||this.getAllLines(),c=this.getNewLineCharacter().length,m=0,w=Math.min(u.row,s.length),x=g||0;x<w;++x)m+=s[x].length+c;return m+u.column},a.prototype.$split=function(u){return u.split(/\r\n|\r|\n/)},a})();i.prototype.$autoNewLine="",i.prototype.$newLineMode="auto",h.implement(i.prototype,v),r.Document=i}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,d){var h=e("./lib/oop"),f=e("./lib/event_emitter").EventEmitter,v=(function(){function o(p,i){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=p;var a=this;this.$worker=function(){if(a.running){for(var u=new Date,g=a.currentLine,s=-1,c=a.doc,m=g;a.lines[g];)g++;var w=c.getLength(),x=0;for(a.running=!1;g<w;){a.$tokenizeRow(g),s=g;do g++;while(a.lines[g]);if(x++,x%5===0&&new Date-u>20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=g,s==-1&&(s=g),m<=s&&a.fireUpdateEvent(m,s)}}}return o.prototype.setTokenizer=function(p){this.tokenizer=p,this.lines=[],this.states=[],this.start(0)},o.prototype.setDocument=function(p){this.doc=p,this.lines=[],this.states=[],this.stop()},o.prototype.fireUpdateEvent=function(p,i){var a={first:p,last:i};this._signal("update",{data:a})},o.prototype.start=function(p){this.currentLine=Math.min(p||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)},o.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},o.prototype.$updateOnChange=function(p){var i=p.start.row,a=p.end.row-i;if(a===0)this.lines[i]=null;else if(p.action=="remove")this.lines.splice(i,a+1,null),this.states.splice(i,a+1,null);else{var u=Array(a+1);u.unshift(i,1),this.lines.splice.apply(this.lines,u),this.states.splice.apply(this.states,u)}this.currentLine=Math.min(i,this.currentLine,this.doc.getLength()),this.stop()},o.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},o.prototype.getTokens=function(p){return this.lines[p]||this.$tokenizeRow(p)},o.prototype.getState=function(p){return this.currentLine==p&&this.$tokenizeRow(p),this.states[p]||"start"},o.prototype.$tokenizeRow=function(p){var i=this.doc.getLine(p),a=this.states[p-1],u=this.tokenizer.getLineTokens(i,a,p);return this.states[p]+""!=u.state+""?(this.states[p]=u.state,this.lines[p+1]=null,this.currentLine>p+1&&(this.currentLine=p+1)):this.currentLine==p&&(this.currentLine=p+1),this.lines[p]=u.tokens},o.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},o})();h.implement(v.prototype,f),r.BackgroundTokenizer=v}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,r,d){var h=e("./lib/lang"),f=e("./range").Range,v=(function(){function o(p,i,a){a===void 0&&(a="text"),this.setRegexp(p),this.clazz=i,this.type=a,this.docLen=0}return o.prototype.setRegexp=function(p){this.regExp+""!=p+""&&(this.regExp=p,this.cache=[])},o.prototype.update=function(p,i,a,u){if(this.regExp){for(var g=u.firstRow,s=u.lastRow,c={},m=a.$editor&&a.$editor.$search,w=m&&m.$isMultilineSearch(a.$editor.getLastSearchOptions()),x=g;x<=s;x++){var R=this.cache[x];if(R==null||a.getValue().length!=this.docLen){if(w){R=[];var S=m.$multiLineForward(a,this.regExp,x,s);if(S){var A=S.endRow<=s?S.endRow-1:s;A>x&&(x=A),R.push(new f(S.startRow,S.startCol,S.endRow,S.endCol))}R.length>this.MAX_RANGES&&(R=R.slice(0,this.MAX_RANGES))}else R=h.getMatchOffsets(a.getLine(x),this.regExp),R.length>this.MAX_RANGES&&(R=R.slice(0,this.MAX_RANGES)),R=R.map(function(M){return new f(x,M.offset,x,M.offset+M.length)});this.cache[x]=R.length?R:""}if(R.length!==0)for(var C=R.length;C--;){var O=R[C].toScreenRange(a),N=O.toString();c[N]||(c[N]=!0,i.drawSingleLineMarker(p,O,this.clazz,u))}}this.docLen=a.getValue().length}},o})();v.prototype.MAX_RANGES=500,r.SearchHighlight=v}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,r,d){var h=(function(){function A(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return A.prototype.addSession=function(C){this.$session=C},A.prototype.add=function(C,O,N){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),O===!1||!this.lastDeltas){this.lastDeltas=[];var M=this.$undoStack.length;M>this.$undoDepth-1&&this.$undoStack.splice(0,M-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)}},A.prototype.addSelection=function(C,O){this.selections.push({value:C,rev:O||this.$rev})},A.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},A.prototype.markIgnored=function(C,O){O==null&&(O=this.$rev+1);for(var N=this.$undoStack,M=N.length;M--;){var L=N[M][0];if(L.id<=C)break;L.id<O&&(L.ignore=!0)}this.lastDeltas=null},A.prototype.getSelection=function(C,O){for(var N=this.selections,M=N.length;M--;){var L=N[M];if(L.rev<C)return O&&(L=N[M+1]),L}},A.prototype.getRevision=function(){return this.$rev},A.prototype.getDeltas=function(C,O){O==null&&(O=this.$rev+1);for(var N=this.$undoStack,M=null,L=0,j=N.length;j--;){var F=N[j][0];if(F.id<O&&!M&&(M=j+1),F.id<=C){L=j+1;break}}return N.slice(L,M)},A.prototype.getChangedRanges=function(C,O){O==null&&(O=this.$rev+1)},A.prototype.getChangedLines=function(C,O){O==null&&(O=this.$rev+1)},A.prototype.undo=function(C,O){this.lastDeltas=null;var N=this.$undoStack;if(f(N,N.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var M=N.pop(),L=null;return M&&(L=C.undoChanges(M,O),this.$redoStack.push(M),this.$syncRev()),this.$fromUndo=!1,L}},A.prototype.redo=function(C,O){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var N=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);S(this.$redoStack,N),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(j){j[0].id=++this.$maxRev},this)}var M=this.$redoStack.pop(),L=null;return M&&(L=C.redoChanges(M,O),this.$undoStack.push(M),this.$syncRev()),this.$fromUndo=!1,L},A.prototype.$syncRev=function(){var C=this.$undoStack,O=C[C.length-1],N=O&&O[0].id||0;this.$redoStackBaseRev=N,this.$rev=N},A.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=[]},A.prototype.canUndo=function(){return this.$undoStack.length>0},A.prototype.canRedo=function(){return this.$redoStack.length>0},A.prototype.bookmark=function(C){C==null&&(C=this.$rev),this.mark=C},A.prototype.isAtBookmark=function(){return this.$rev===this.mark},A.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},A.prototype.fromJSON=function(C){this.reset(),this.$undoStack=C.$undoStack,this.$redoStack=C.$redoStack},A.prototype.$prettyPrint=function(C){return C?a(C):a(this.$undoStack)+`
|
|
195
|
+
---
|
|
196
|
+
`+a(this.$redoStack)},A})();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 f(A,C){for(var O=C;O--;){var N=A[O];if(N&&!N[0].ignore){for(;O<C-1;){var M=s(A[O],A[O+1]);A[O]=M[0],A[O+1]=M[1],O++}return!0}}}var v=e("./range").Range,o=v.comparePoints;v.comparePoints;function p(A){return{row:A.row,column:A.column}}function i(A){return{start:p(A.start),end:p(A.end),action:A.action,lines:A.lines.slice()}}function a(A){if(A=A||this,Array.isArray(A))return A.map(a).join(`
|
|
197
|
+
`);var C="";return A.action?(C=A.action=="insert"?"+":"-",C+="["+A.lines+"]"):A.value&&(Array.isArray(A.value)?C=A.value.map(u).join(`
|
|
198
|
+
`):C=u(A.value)),A.start&&(C+=u(A)),(A.id||A.rev)&&(C+=" ("+(A.id||A.rev)+")"),C}function u(A){return A.start.row+":"+A.start.column+"=>"+A.end.row+":"+A.end.column}function g(A,C){var O=A.action=="insert",N=C.action=="insert";if(O&&N)if(o(C.start,A.end)>=0)m(C,A,-1);else if(o(C.start,A.start)<=0)m(A,C,1);else return null;else if(O&&!N)if(o(C.start,A.end)>=0)m(C,A,-1);else if(o(C.end,A.start)<=0)m(A,C,-1);else return null;else if(!O&&N)if(o(C.start,A.start)>=0)m(C,A,1);else if(o(C.start,A.start)<=0)m(A,C,1);else return null;else if(!O&&!N)if(o(C.start,A.start)>=0)m(C,A,1);else if(o(C.end,A.start)<=0)m(A,C,-1);else return null;return[C,A]}function s(A,C){for(var O=A.length;O--;)for(var N=0;N<C.length;N++)if(!g(A[O],C[N])){for(;O<A.length;){for(;N--;)g(C[N],A[O]);N=C.length,O++}return[A,C]}return A.selectionBefore=C.selectionBefore=A.selectionAfter=C.selectionAfter=null,[C,A]}function c(A,C){var O=A.action=="insert",N=C.action=="insert";if(O&&N)o(A.start,C.start)<0?m(C,A,1):m(A,C,1);else if(O&&!N)o(A.start,C.end)>=0?m(A,C,-1):(o(A.start,C.start)<=0||m(A,v.fromPoints(C.start,A.start),-1),m(C,A,1));else if(!O&&N)o(C.start,A.end)>=0?m(C,A,-1):(o(C.start,A.start)<=0||m(C,v.fromPoints(A.start,C.start),-1),m(A,C,1));else if(!O&&!N)if(o(C.start,A.end)>=0)m(C,A,-1);else if(o(C.end,A.start)<=0)m(A,C,-1);else{var M,L;return o(A.start,C.start)<0&&(M=A,A=x(A,C.start)),o(A.end,C.end)>0&&(L=x(A,C.end)),w(C.end,A.start,A.end,-1),L&&!M&&(A.lines=L.lines,A.start=L.start,A.end=L.end,L=A),[C,M,L].filter(Boolean)}return[C,A]}function m(A,C,O){w(A.start,C.start,C.end,O),w(A.end,C.start,C.end,O)}function w(A,C,O,N){A.row==(N==1?C:O).row&&(A.column+=N*(O.column-C.column)),A.row+=N*(O.row-C.row)}function x(A,C){var O=A.lines,N=A.end;A.end=p(C);var M=A.end.row-A.start.row,L=O.splice(M,O.length),j=M?C.column:C.column-A.start.column;O.push(L[0].substring(0,j)),L[0]=L[0].substr(j);var F={start:p(C),end:N,lines:L,action:A.action};return F}function R(A,C){C=i(C);for(var O=A.length;O--;){for(var N=A[O],M=0;M<N.length;M++){var L=N[M],j=c(L,C);C=j[0],j.length!=2&&(j[2]?(N.splice(M+1,1,j[1],j[2]),M++):j[1]||(N.splice(M,1),M--))}N.length||A.splice(O,1)}return A}function S(A,C){for(var O=0;O<C.length;O++)for(var N=C[O],M=0;M<N.length;M++)R(A,N[M])}r.UndoManager=h}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,r,d){var h=e("../range").Range,f=(function(){function v(o,p){this.foldData=o,Array.isArray(p)?this.folds=p:p=this.folds=[p];var i=p[p.length-1];this.range=new h(p[0].start.row,p[0].start.column,i.end.row,i.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(a){a.setFoldLine(this)},this)}return v.prototype.shiftRow=function(o){this.start.row+=o,this.end.row+=o,this.folds.forEach(function(p){p.start.row+=o,p.end.row+=o})},v.prototype.addFold=function(o){if(o.sameRow){if(o.start.row<this.startRow||o.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(o),this.folds.sort(function(p,i){return-p.range.compareEnd(i.start.row,i.start.column)}),this.range.compareEnd(o.start.row,o.start.column)>0?(this.end.row=o.end.row,this.end.column=o.end.column):this.range.compareStart(o.end.row,o.end.column)<0&&(this.start.row=o.start.row,this.start.column=o.start.column)}else if(o.start.row==this.end.row)this.folds.push(o),this.end.row=o.end.row,this.end.column=o.end.column;else if(o.end.row==this.start.row)this.folds.unshift(o),this.start.row=o.start.row,this.start.column=o.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");o.foldLine=this},v.prototype.containsRow=function(o){return o>=this.start.row&&o<=this.end.row},v.prototype.walk=function(o,p,i){var a=0,u=this.folds,g,s,c,m=!0;p==null&&(p=this.end.row,i=this.end.column);for(var w=0;w<u.length;w++){if(g=u[w],s=g.range.compareStart(p,i),s==-1){o(null,p,i,a,m);return}if(c=o(null,g.start.row,g.start.column,a,m),c=!c&&o(g.placeholder,g.start.row,g.start.column,a),c||s===0)return;m=!g.sameRow,a=g.end.column}o(null,p,i,a,m)},v.prototype.getNextFoldTo=function(o,p){for(var i,a,u=0;u<this.folds.length;u++){if(i=this.folds[u],a=i.range.compareEnd(o,p),a==-1)return{fold:i,kind:"after"};if(a===0)return{fold:i,kind:"inside"}}return null},v.prototype.addRemoveChars=function(o,p,i){var a=this.getNextFoldTo(o,p),u,g;if(a){if(u=a.fold,a.kind=="inside"&&u.start.column!=p&&u.start.row!=o)window.console&&window.console.log(o,p,u);else if(u.start.row==o){g=this.folds;var s=g.indexOf(u);for(s===0&&(this.start.column+=i),s;s<g.length;s++){if(u=g[s],u.start.column+=i,!u.sameRow)return;u.end.column+=i}this.end.column+=i}}},v.prototype.split=function(o,p){var i=this.getNextFoldTo(o,p);if(!i||i.kind=="inside")return null;var a=i.fold,u=this.folds,g=this.foldData,s=u.indexOf(a),c=u[s-1];this.end.row=c.end.row,this.end.column=c.end.column,u=u.splice(s,u.length-s);var m=new v(g,u);return g.splice(g.indexOf(this)+1,0,m),m},v.prototype.merge=function(o){for(var p=o.folds,i=0;i<p.length;i++)this.addFold(p[i]);var a=this.foldData;a.splice(a.indexOf(o),1)},v.prototype.toString=function(){var o=[this.range.toString()+": ["];return this.folds.forEach(function(p){o.push(" "+p.toString())}),o.push("]"),o.join(`
|
|
199
|
+
`)},v.prototype.idxToPosition=function(o){for(var p=0,i=0;i<this.folds.length;i++){var a=this.folds[i];if(o-=a.start.column-p,o<0)return{row:a.start.row,column:a.start.column+o};if(o-=a.placeholder.length,o<0)return a.start;p=a.end.column}return{row:this.end.row,column:this.end.column+o}},v})();r.FoldLine=f}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,r,d){var h=e("./range").Range,f=h.comparePoints,v=(function(){function o(){this.ranges=[],this.$bias=1}return o.prototype.pointIndex=function(p,i,a){for(var u=this.ranges,g=a||0;g<u.length;g++){var s=u[g],c=f(p,s.end);if(!(c>0)){var m=f(p,s.start);return c===0?i&&m!==0?-g-2:g:m>0||m===0&&!i?g:-g-1}}return-g-1},o.prototype.add=function(p){var i=!p.isEmpty(),a=this.pointIndex(p.start,i);a<0&&(a=-a-1);var u=this.pointIndex(p.end,i,a);return u<0?u=-u-1:u++,this.ranges.splice(a,u-a,p)},o.prototype.addList=function(p){for(var i=[],a=p.length;a--;)i.push.apply(i,this.add(p[a]));return i},o.prototype.substractPoint=function(p){var i=this.pointIndex(p);if(i>=0)return this.ranges.splice(i,1)},o.prototype.merge=function(){var p=[],i=this.ranges;i=i.sort(function(c,m){return f(c.start,m.start)});for(var a=i[0],u,g=1;g<i.length;g++){u=a,a=i[g];var s=f(u.end,a.start);s<0||s==0&&!u.isEmpty()&&!a.isEmpty()||(f(u.end,a.end)<0&&(u.end.row=a.end.row,u.end.column=a.end.column),i.splice(g,1),p.push(a),a=u,g--)}return this.ranges=i,p},o.prototype.contains=function(p,i){return this.pointIndex({row:p,column:i})>=0},o.prototype.containsPoint=function(p){return this.pointIndex(p)>=0},o.prototype.rangeAtPoint=function(p){var i=this.pointIndex(p);if(i>=0)return this.ranges[i]},o.prototype.clipRows=function(p,i){var a=this.ranges;if(a[0].start.row>i||a[a.length-1].start.row<p)return[];var u=this.pointIndex({row:p,column:0});u<0&&(u=-u-1);var g=this.pointIndex({row:i,column:0},u);g<0&&(g=-g-1);for(var s=[],c=u;c<g;c++)s.push(a[c]);return s},o.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},o.prototype.attach=function(p){this.session&&this.detach(),this.session=p,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},o.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},o.prototype.$onChange=function(p){for(var i=p.start,a=p.end,u=i.row,g=a.row,s=this.ranges,c=0,m=s.length;c<m;c++){var w=s[c];if(w.end.row>=u)break}if(p.action=="insert")for(var x=g-u,R=-i.column+a.column;c<m;c++){var w=s[c];if(w.start.row>u)break;if(w.start.row==u&&w.start.column>=i.column&&(w.start.column==i.column&&this.$bias<=0||(w.start.column+=R,w.start.row+=x)),w.end.row==u&&w.end.column>=i.column){if(w.end.column==i.column&&this.$bias<0)continue;w.end.column==i.column&&R>0&&c<m-1&&w.end.column>w.start.column&&w.end.column==s[c+1].start.column&&(w.end.column-=R),w.end.column+=R,w.end.row+=x}}else for(var x=u-g,R=i.column-a.column;c<m;c++){var w=s[c];if(w.start.row>g)break;w.end.row<g&&(u<w.end.row||u==w.end.row&&i.column<w.end.column)?(w.end.row=u,w.end.column=i.column):w.end.row==g?w.end.column<=a.column?(x||w.end.column>i.column)&&(w.end.column=i.column,w.end.row=i.row):(w.end.column+=R,w.end.row+=x):w.end.row>g&&(w.end.row+=x),w.start.row<g&&(u<w.start.row||u==w.start.row&&i.column<w.start.column)?(w.start.row=u,w.start.column=i.column):w.start.row==g?w.start.column<=a.column?(x||w.start.column>i.column)&&(w.start.column=i.column,w.start.row=i.row):(w.start.column+=R,w.start.row+=x):w.start.row>g&&(w.start.row+=x)}if(x!=0&&c<m)for(;c<m;c++){var w=s[c];w.start.row+=x,w.end.row+=x}},o})();v.prototype.comparePoints=f,r.RangeList=v}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(e,r,d){var h=this&&this.__extends||(function(){var u=function(g,s){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,m){c.__proto__=m}||function(c,m){for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(c[w]=m[w])},u(g,s)};return function(g,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");u(g,s);function c(){this.constructor=g}g.prototype=s===null?Object.create(s):(c.prototype=s.prototype,new c)}})(),f=e("../range_list").RangeList,v=(function(u){h(g,u);function g(s,c){var m=u.call(this)||this;return m.foldLine=null,m.placeholder=c,m.range=s,m.start=s.start,m.end=s.end,m.sameRow=s.start.row==s.end.row,m.subFolds=m.ranges=[],m}return g.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},g.prototype.setFoldLine=function(s){this.foldLine=s,this.subFolds.forEach(function(c){c.setFoldLine(s)})},g.prototype.clone=function(){var s=this.range.clone(),c=new g(s,this.placeholder);return this.subFolds.forEach(function(m){c.subFolds.push(m.clone())}),c.collapseChildren=this.collapseChildren,c},g.prototype.addSubFold=function(s){if(!this.range.isEqual(s)){p(s,this.start);for(var c=s.start.row,m=s.start.column,w=0,x=-1;w<this.subFolds.length&&(x=this.subFolds[w].range.compare(c,m),x==1);w++);var R=this.subFolds[w],S=0;if(x==0){if(R.range.containsRange(s))return R.addSubFold(s);S=1}for(var c=s.range.end.row,m=s.range.end.column,A=w,x=-1;A<this.subFolds.length&&(x=this.subFolds[A].range.compare(c,m),x==1);A++);x==0&&A++;for(var C=this.subFolds.splice(w,A-w,s),O=x==0?C.length-1:C.length,N=S;N<O;N++)s.addSubFold(C[N]);return s.setFoldLine(this.foldLine),s}},g.prototype.restoreRange=function(s){return a(s,this.start)},g})(f);function o(u,g){u.row-=g.row,u.row==0&&(u.column-=g.column)}function p(u,g){o(u.start,g),o(u.end,g)}function i(u,g){u.row==0&&(u.column+=g.column),u.row+=g.row}function a(u,g){i(u.start,g),i(u.end,g)}r.Fold=v}),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(e,r,d){var h=e("../range").Range,f=e("./fold_line").FoldLine,v=e("./fold").Fold,o=e("../token_iterator").TokenIterator,p=e("../mouse/mouse_event").MouseEvent;function i(){this.getFoldAt=function(a,u,g){var s=this.getFoldLine(a);if(!s)return null;for(var c=s.folds,m=0;m<c.length;m++){var w=c[m].range;if(w.contains(a,u)){if(g==1&&w.isEnd(a,u)&&!w.isEmpty()||g==-1&&w.isStart(a,u)&&!w.isEmpty())continue;return c[m]}}},this.getFoldsInRange=function(a){var u=a.start,g=a.end,s=this.$foldData,c=[];u.column+=1,g.column-=1;for(var m=0;m<s.length;m++){var w=s[m].range.compareRange(a);if(w!=2){if(w==-2)break;for(var x=s[m].folds,R=0;R<x.length;R++){var S=x[R];if(w=S.range.compareRange(a),w==-2)break;if(w!=2){if(w==42)break;c.push(S)}}}}return u.column-=1,g.column+=1,c},this.getFoldsInRangeList=function(a){if(Array.isArray(a)){var u=[];a.forEach(function(s){u=u.concat(this.getFoldsInRange(s))},this)}else var u=this.getFoldsInRange(a);return u},this.getAllFolds=function(){for(var a=[],u=this.$foldData,g=0;g<u.length;g++)for(var s=0;s<u[g].folds.length;s++)a.push(u[g].folds[s]);return a},this.getFoldStringAt=function(a,u,g,s){if(s=s||this.getFoldLine(a),!s)return null;for(var c={end:{column:0}},m,w,x=0;x<s.folds.length;x++){w=s.folds[x];var R=w.range.compareEnd(a,u);if(R==-1){m=this.getLine(w.start.row).substring(c.end.column,w.start.column);break}else if(R===0)return null;c=w}return m||(m=this.getLine(w.start.row).substring(c.end.column)),g==-1?m.substring(0,u-c.end.column):g==1?m.substring(u-c.end.column):m},this.getFoldLine=function(a,u){var g=this.$foldData,s=0;for(u&&(s=g.indexOf(u)),s==-1&&(s=0),s;s<g.length;s++){var c=g[s];if(c.start.row<=a&&c.end.row>=a)return c;if(c.end.row>a)return null}return null},this.getNextFoldLine=function(a,u){var g=this.$foldData,s=0;for(u&&(s=g.indexOf(u)),s==-1&&(s=0),s;s<g.length;s++){var c=g[s];if(c.end.row>=a)return c}return null},this.getFoldedRowCount=function(a,u){for(var g=this.$foldData,s=u-a+1,c=0;c<g.length;c++){var m=g[c],w=m.end.row,x=m.start.row;if(w>=u){x<u&&(x>=a?s-=u-x:s=0);break}else w>=a&&(x>=a?s-=w-x:s-=w-a+1)}return s},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(u,g){return u.start.row-g.start.row}),a},this.addFold=function(a,u){var g=this.$foldData,s=!1,c;a instanceof v?c=a:(c=new v(u,a),c.collapseChildren=u.collapseChildren),this.$clipRangeToDocument(c.range);var m=c.start.row,w=c.start.column,x=c.end.row,R=c.end.column,S=this.getFoldAt(m,w,1),A=this.getFoldAt(x,R,-1);if(S&&A==S)return S.addSubFold(c);S&&!S.range.isStart(m,w)&&this.removeFold(S),A&&!A.range.isEnd(x,R)&&this.removeFold(A);var C=this.getFoldsInRange(c.range);C.length>0&&(this.removeFolds(C),c.collapseChildren||C.forEach(function(L){c.addSubFold(L)}));for(var O=0;O<g.length;O++){var N=g[O];if(x==N.start.row){N.addFold(c),s=!0;break}else if(m==N.end.row){if(N.addFold(c),s=!0,!c.sameRow){var M=g[O+1];if(M&&M.start.row==x){N.merge(M);break}}break}else if(x<=N.start.row)break}return s||(N=this.$addFoldLine(new f(this.$foldData,c))),this.$useWrapMode?this.$updateWrapData(N.start.row,N.start.row):this.$updateRowLengthCache(N.start.row,N.start.row),this.$modified=!0,this._signal("changeFold",{data:c,action:"add"}),c},this.addFolds=function(a){a.forEach(function(u){this.addFold(u)},this)},this.removeFold=function(a){var u=a.foldLine,g=u.start.row,s=u.end.row,c=this.$foldData,m=u.folds;if(m.length==1)c.splice(c.indexOf(u),1);else if(u.range.isEnd(a.end.row,a.end.column))m.pop(),u.end.row=m[m.length-1].end.row,u.end.column=m[m.length-1].end.column;else if(u.range.isStart(a.start.row,a.start.column))m.shift(),u.start.row=m[0].start.row,u.start.column=m[0].start.column;else if(a.sameRow)m.splice(m.indexOf(a),1);else{var w=u.split(a.start.row,a.start.column);m=w.folds,m.shift(),w.start.row=m[0].start.row,w.start.column=m[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(g,s):this.$updateRowLengthCache(g,s)),this.$modified=!0,this._signal("changeFold",{data:a,action:"remove"})},this.removeFolds=function(a){for(var u=[],g=0;g<a.length;g++)u.push(a[g]);u.forEach(function(s){this.removeFold(s)},this),this.$modified=!0},this.expandFold=function(a){this.removeFold(a),a.subFolds.forEach(function(u){a.restoreRange(u),this.addFold(u)},this),a.collapseChildren>0&&this.foldAll(a.start.row+1,a.end.row,a.collapseChildren-1),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(u){this.expandFold(u)},this)},this.unfold=function(a,u){var g,s;if(a==null)g=new h(0,0,this.getLength(),0),u==null&&(u=!0);else if(typeof a=="number")g=new h(a,0,a,this.getLine(a).length);else if("row"in a)g=h.fromPoints(a,a);else{if(Array.isArray(a))return s=[],a.forEach(function(m){s=s.concat(this.unfold(m))},this),s;g=a}s=this.getFoldsInRangeList(g);for(var c=s;s.length==1&&h.comparePoints(s[0].start,g.start)<0&&h.comparePoints(s[0].end,g.end)>0;)this.expandFolds(s),s=this.getFoldsInRangeList(g);if(u!=!1?this.removeFolds(s):this.expandFolds(s),c.length)return c},this.isRowFolded=function(a,u){return!!this.getFoldLine(a,u)},this.getRowFoldEnd=function(a,u){var g=this.getFoldLine(a,u);return g?g.end.row:a},this.getRowFoldStart=function(a,u){var g=this.getFoldLine(a,u);return g?g.start.row:a},this.getFoldDisplayLine=function(a,u,g,s,c){s==null&&(s=a.start.row),c==null&&(c=0),u==null&&(u=a.end.row),g==null&&(g=this.getLine(u).length);var m=this.doc,w="";return a.walk(function(x,R,S,A){if(!(R<s)){if(R==s){if(S<c)return;A=Math.max(c,A)}x!=null?w+=x:w+=m.getLine(R).substring(A,S)}},u,g),w},this.getDisplayLine=function(a,u,g,s){var c=this.getFoldLine(a);if(c)return this.getFoldDisplayLine(c,a,u,g,s);var m;return m=this.doc.getLine(a),m.substring(s||0,u||m.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(u){var g=u.folds.map(function(s){return s.clone()});return new f(a,g)}),a},this.toggleFold=function(a){var u=this.selection,g=u.getRange(),s,c;if(g.isEmpty()){var m=g.start;if(s=this.getFoldAt(m.row,m.column),s){this.expandFold(s);return}else if(a){var w=this.getFoldLine(m.row);w&&this.expandFolds(w.folds);return}else(c=this.findMatchingBracket(m))?g.comparePoint(c)==1?g.end=c:(g.start=c,g.start.column++,g.end.column--):(c=this.findMatchingBracket({row:m.row,column:m.column+1}))?(g.comparePoint(c)==1?g.end=c:g.start=c,g.start.column++):g=this.getCommentFoldRange(m.row,m.column)||g}else{var x=this.getFoldsInRange(g);if(a&&x.length){this.expandFolds(x);return}else x.length==1&&(s=x[0])}if(s||(s=this.getFoldAt(g.start.row,g.start.column)),s&&s.range.toString()==g.toString()){this.expandFold(s);return}var R="...";if(!g.isMultiLine()){if(R=this.getTextRange(g),R.length<4)return;R=R.trim().substring(0,2)+".."}this.addFold(R,g)},this.getCommentFoldRange=function(a,u,g){var s=new o(this,a,u),c=s.getCurrentToken(),m=c&&c.type;if(c&&/^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(g!=1){do c=s.stepBackward();while(c&&w.test(c.type));c=s.stepForward()}x.start.row=s.getCurrentTokenRow(),x.start.column=s.getCurrentTokenColumn()+c.value.length,s=new o(this,a,u);var R=this.getState(s.$row);if(g!=-1){var S=-1;do if(c=s.stepForward(),S==-1){var A=this.getState(s.$row);R.toString()!==A.toString()&&(S=s.$row)}else if(s.$row>S)break;while(c&&w.test(c.type));c=s.stepBackward()}else c=s.getCurrentToken();return x.end.row=s.getCurrentTokenRow(),x.end.column=s.getCurrentTokenColumn(),x.start.row==x.end.row&&x.start.column>x.end.column?void 0:x}},this.foldAll=function(a,u,g,s){g==null&&(g=1e5);var c=this.foldWidgets;if(c){u=u||this.getLength(),a=a||0;for(var m=a;m<u;m++)if(c[m]==null&&(c[m]=this.getFoldWidget(m)),c[m]=="start"&&!(s&&!s(m))){var w=this.getFoldWidgetRange(m);w&&w.isMultiLine()&&w.end.row<=u&&w.start.row>=a&&(m=w.end.row,w.collapseChildren=g,this.addFold("...",w))}}},this.foldToLevel=function(a){for(this.foldAll();a-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var a=this;this.foldAll(null,null,null,function(u){for(var g=a.getTokens(u),s=0;s<g.length;s++){var c=g[s];if(!(c.type=="text"&&/^\s+$/.test(c.value)))return!!/comment/.test(c.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(a){if(!this.$foldStyles[a])throw new Error("invalid fold style: "+a+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=a){this.$foldStyle=a,a=="manual"&&this.unfold();var u=this.$foldMode;this.$setFolding(null),this.$setFolding(u)}},this.$setFolding=function(a){if(this.$foldMode!=a){if(this.$foldMode=a,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!a||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=a.getFoldWidget.bind(a,this,this.$foldStyle),this.getFoldWidgetRange=a.getFoldWidgetRange.bind(a,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(a,u){var g=this.foldWidgets;if(!g||u&&g[a])return{};for(var s=a-1,c;s>=0;){var m=g[s];if(m==null&&(m=g[s]=this.getFoldWidget(s)),m=="start"){var w=this.getFoldWidgetRange(s);if(c||(c=w),w&&w.end.row>=a)break}s--}return{range:s!==-1&&w,firstRange:c}},this.onFoldWidgetClick=function(a,u){u instanceof p&&(u=u.domEvent);var g={children:u.shiftKey,all:u.ctrlKey||u.metaKey,siblings:u.altKey},s=this.$toggleFoldWidget(a,g);if(!s){var c=u.target||u.srcElement;c&&/ace_fold-widget/.test(c.className)&&(c.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,u){if(this.getFoldWidget){var g=this.getFoldWidget(a),s=this.getLine(a),c=g==="end"?-1:1,m=this.getFoldAt(a,c===-1?0:s.length,c);if(m)return u.children||u.all?this.removeFold(m):this.expandFold(m),m;var w=this.getFoldWidgetRange(a,!0);if(w&&!w.isMultiLine()&&(m=this.getFoldAt(w.start.row,w.start.column,1),m&&w.isEqual(m.range)))return this.removeFold(m),m;if(u.siblings){var x=this.getParentFoldRangeData(a);if(x.range)var R=x.range.start.row+1,S=x.range.end.row;this.foldAll(R,S,u.all?1e4:0)}else u.children?(S=w?w.end.row:this.getLength(),this.foldAll(a+1,S,u.all?1e4:0)):w&&(u.all&&(w.collapseChildren=1e4),this.addFold("...",w));return w}},this.toggleFoldWidget=function(a){var u=this.selection.getCursor().row;u=this.getRowFoldStart(u);var g=this.$toggleFoldWidget(u,{});if(!g){var s=this.getParentFoldRangeData(u,!0);if(g=s.range||s.firstRange,g){u=g.start.row;var c=this.getFoldAt(u,this.getLine(u).length,1);c?this.removeFold(c):this.addFold("...",g)}}},this.updateFoldWidgets=function(a){var u=a.start.row,g=a.end.row-u;if(g===0)this.foldWidgets[u]=null;else if(a.action=="remove")this.foldWidgets.splice(u,g+1,null);else{var s=Array(g+1);s.unshift(u,1),this.foldWidgets.splice.apply(this.foldWidgets,s)}},this.tokenizerUpdateFoldWidgets=function(a){var u=a.data;u.first!=u.last&&this.foldWidgets.length>u.first&&this.foldWidgets.splice(u.first,this.foldWidgets.length)}}r.Folding=i}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,r,d){var h=e("../token_iterator").TokenIterator,f=e("../range").Range;function v(){this.findMatchingBracket=function(o,p){if(o.column==0)return null;var i=p||this.getLine(o.row).charAt(o.column-1);if(i=="")return null;var a=i.match(/([\(\[\{])|([\)\]\}])/);return a?a[1]?this.$findClosingBracket(a[1],o):this.$findOpeningBracket(a[2],o):null},this.getBracketRange=function(o){var p=this.getLine(o.row),i=!0,a,u=p.charAt(o.column-1),g=u&&u.match(/([\(\[\{])|([\)\]\}])/);if(g||(u=p.charAt(o.column),o={row:o.row,column:o.column+1},g=u&&u.match(/([\(\[\{])|([\)\]\}])/),i=!1),!g)return null;if(g[1]){var s=this.$findClosingBracket(g[1],o);if(!s)return null;a=f.fromPoints(o,s),i||(a.end.column++,a.start.column--),a.cursor=a.end}else{var s=this.$findOpeningBracket(g[2],o);if(!s)return null;a=f.fromPoints(s,o),i||(a.start.column++,a.end.column--),a.cursor=a.start}return a},this.getMatchingBracketRanges=function(o,p){var i=this.getLine(o.row),a=/([\(\[\{])|([\)\]\}])/,u=!p&&i.charAt(o.column-1),g=u&&u.match(a);if(g||(u=(p===void 0||p)&&i.charAt(o.column),o={row:o.row,column:o.column+1},g=u&&u.match(a)),!g)return null;var s=new f(o.row,o.column-1,o.row,o.column),c=g[1]?this.$findClosingBracket(g[1],o):this.$findOpeningBracket(g[2],o);if(!c)return[s];var m=new f(c.row,c.column,c.row,c.column+1);return[s,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(o,p,i){var a=this.$brackets[o],u=1,g=new h(this,p.row,p.column),s=g.getCurrentToken();if(s||(s=g.stepForward()),!!s){i||(i=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var c=p.column-g.getCurrentTokenColumn()-2,m=s.value;;){for(;c>=0;){var w=m.charAt(c);if(w==a){if(u-=1,u==0)return{row:g.getCurrentTokenRow(),column:c+g.getCurrentTokenColumn()}}else w==o&&(u+=1);c-=1}do s=g.stepBackward();while(s&&!i.test(s.type));if(s==null)break;m=s.value,c=m.length-1}return null}},this.$findClosingBracket=function(o,p,i){var a=this.$brackets[o],u=1,g=new h(this,p.row,p.column),s=g.getCurrentToken();if(s||(s=g.stepForward()),!!s){i||(i=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var c=p.column-g.getCurrentTokenColumn();;){for(var m=s.value,w=m.length;c<w;){var x=m.charAt(c);if(x==a){if(u-=1,u==0)return{row:g.getCurrentTokenRow(),column:c+g.getCurrentTokenColumn()}}else x==o&&(u+=1);c+=1}do s=g.stepForward();while(s&&!i.test(s.type));if(s==null)break;c=0}return null}},this.getMatchingTags=function(o){var p=new h(this,o.row,o.column),i=this.$findTagName(p);if(i){var a=p.stepBackward();return a.value==="<"?this.$findClosingTag(p,i):this.$findOpeningTag(p,i)}},this.$findTagName=function(o){var p=o.getCurrentToken(),i=!1,a=!1;if(p&&p.type.indexOf("tag-name")===-1)do a?p=o.stepBackward():p=o.stepForward(),p&&(p.value==="/>"?a=!0:p.type.indexOf("tag-name")!==-1&&(i=!0));while(p&&!i);return p},this.$findClosingTag=function(o,p){var i,a=p.value,u=p.value,g=0,s=new f(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);p=o.stepForward();var c=new f(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+p.value.length),m=!1;do{if(i=p,i.type.indexOf("tag-close")!==-1&&!m){var w=new f(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);m=!0}if(p=o.stepForward(),p){if(p.value===">"&&!m){var w=new f(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);m=!0}if(p.type.indexOf("tag-name")!==-1){if(a=p.value,u===a){if(i.value==="<")g++;else if(i.value==="</"&&(g--,g<0)){o.stepBackward();var x=new f(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+2);p=o.stepForward();var R=new f(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+p.value.length);if(p.type.indexOf("tag-close")===-1&&(p=o.stepForward()),p&&p.value===">")var S=new f(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);else return}}}else if(u===a&&p.value==="/>"&&(g--,g<0))var x=new f(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+2),R=x,S=R,w=new f(c.end.row,c.end.column,c.end.row,c.end.column+1)}}while(p&&g>=0);if(s&&w&&x&&S&&c&&R)return{openTag:new f(s.start.row,s.start.column,w.end.row,w.end.column),closeTag:new f(x.start.row,x.start.column,S.end.row,S.end.column),openTagName:c,closeTagName:R}},this.$findOpeningTag=function(o,p){var i=o.getCurrentToken(),a=p.value,u=0,g=o.getCurrentTokenRow(),s=o.getCurrentTokenColumn(),c=s+2,m=new f(g,s,g,c);o.stepForward();var w=new f(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+p.value.length);if(p.type.indexOf("tag-close")===-1&&(p=o.stepForward()),!(!p||p.value!==">")){var x=new f(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);o.stepBackward(),o.stepBackward();do if(p=i,g=o.getCurrentTokenRow(),s=o.getCurrentTokenColumn(),c=s+p.value.length,i=o.stepBackward(),p){if(p.type.indexOf("tag-name")!==-1){if(a===p.value)if(i.value==="<"){if(u++,u>0){var R=new f(g,s,g,c),S=new f(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);do p=o.stepForward();while(p&&p.value!==">");var A=new f(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1)}}else i.value==="</"&&u--}else if(p.value==="/>"){for(var C=0,O=i;O;){if(O.type.indexOf("tag-name")!==-1&&O.value===a){u--;break}else if(O.value==="<")break;O=o.stepBackward(),C++}for(var N=0;N<C;N++)o.stepForward()}}while(i&&u<=0);if(S&&A&&m&&x&&R&&w)return{openTag:new f(S.start.row,S.start.column,A.end.row,A.end.column),closeTag:new f(m.start.row,m.start.column,x.end.row,x.end.column),openTagName:R,closeTagName:w}}}}r.BracketMatch=v}),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(e,r,d){var h=e("./lib/oop"),f=e("./lib/lang"),v=e("./bidihandler").BidiHandler,o=e("./config"),p=e("./lib/event_emitter").EventEmitter,i=e("./selection").Selection,a=e("./mode/text").Mode,u=e("./range").Range,g=e("./line_widgets").LineWidgets,s=e("./document").Document,c=e("./background_tokenizer").BackgroundTokenizer,m=e("./search_highlight").SearchHighlight,w=e("./undomanager").UndoManager,x=(function(){function F(D,$){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"+ ++F.$uid,this.$foldData.toString=function(){return this.join(`
|
|
200
|
+
`)},this.$gutterCustomWidgets={},this.bgTokenizer=new c(new a().getTokenizer(),this);var _=this;this.bgTokenizer.on("update",function(I){_._signal("tokenizerUpdate",I)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof D!="object"||!D.getLine)&&(D=new s(D)),this.setDocument(D),this.selection=new i(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new v(this),o.resetOptions(this),this.setMode($),o._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return F.prototype.$initOperationListeners=function(){var D=this;this.curOp=null,this.on("change",function(){D.curOp||(D.startOperation(),D.curOp.selectionBefore=D.$lastSel),D.curOp.docChanged=!0},!0),this.on("changeSelection",function(){D.curOp||(D.startOperation(),D.curOp.selectionBefore=D.$lastSel),D.curOp.selectionChanged=!0},!0),this.$operationResetTimer=f.delayedCall(this.endOperation.bind(this,!0))},F.prototype.startOperation=function(D){if(this.curOp){if(!D||this.curOp.command)return;this.prevOp=this.curOp}D||(D={}),this.$operationResetTimer.schedule(),this.curOp={command:D.command||{},args:D.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",D)},F.prototype.endOperation=function(D){if(this.curOp){if(D&&D.returnValue===!1){this.curOp=null,this._signal("endOperation",D);return}if(D==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var $=this.selection.toJSON();this.curOp.selectionAfter=$,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection($),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",D)}},F.prototype.setDocument=function(D){this.doc&&this.doc.off("change",this.$onChange),this.doc=D,D.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},F.prototype.getDocument=function(){return this.doc},Object.defineProperty(F.prototype,"widgetManager",{get:function(){var D=new g(this);return this.widgetManager=D,this.$editor&&D.attach(this.$editor),D},set:function(D){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:D})},enumerable:!1,configurable:!0}),F.prototype.$resetRowCache=function(D){if(!D){this.$docRowCache=[],this.$screenRowCache=[];return}var $=this.$docRowCache.length,_=this.$getRowCacheIndex(this.$docRowCache,D)+1;$>_&&(this.$docRowCache.splice(_,$),this.$screenRowCache.splice(_,$))},F.prototype.$getRowCacheIndex=function(D,$){for(var _=0,I=D.length-1;_<=I;){var z=_+I>>1,U=D[z];if($>U)_=z+1;else if($<U)I=z-1;else return z}return _-1},F.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},F.prototype.onChangeFold=function(D){var $=D.data;this.$resetRowCache($.start.row)},F.prototype.onChange=function(D){this.$modified=!0,this.$bidiHandler.onChange(D),this.$resetRowCache(D.start.row);var $=this.$updateInternalDataOnChange(D);!this.$fromUndo&&this.$undoManager&&($&&$.length&&(this.$undoManager.add({action:"removeFolds",folds:$},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(D,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(D),this._signal("change",D)},F.prototype.onSelectionChange=function(){this._signal("changeSelection")},F.prototype.setValue=function(D){this.doc.setValue(D),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},F.fromJSON=function(D){typeof D=="string"&&(D=JSON.parse(D));var $=new w;$.$undoStack=D.history.$undoStack,$.$redoStack=D.history.$redoStack,$.mark=D.history.mark,$.$rev=D.history.rev;var _=new F(D.value);return D.folds.forEach(function(I){_.addFold("...",u.fromPoints(I.start,I.end))}),_.setAnnotations(D.annotations),_.setBreakpoints(D.breakpoints),_.setMode(D.mode),_.setScrollLeft(D.scrollLeft),_.setScrollTop(D.scrollTop),_.setUndoManager($),_.selection.fromJSON(D.selection),_},F.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(D){return D.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},F.prototype.toString=function(){return this.doc.getValue()},F.prototype.getSelection=function(){return this.selection},F.prototype.getState=function(D){return this.bgTokenizer.getState(D)},F.prototype.getTokens=function(D){return this.bgTokenizer.getTokens(D)},F.prototype.getTokenAt=function(D,$){var _=this.bgTokenizer.getTokens(D),I,z=0;if($==null){var U=_.length-1;z=this.getLine(D).length}else for(var U=0;U<_.length&&(z+=_[U].value.length,!(z>=$));U++);return I=_[U],I?(I.index=U,I.start=z-I.value.length,I):null},F.prototype.setUndoManager=function(D){if(this.$undoManager=D,this.$informUndoManager&&this.$informUndoManager.cancel(),D){var $=this;D.addSession(this),this.$syncInformUndoManager=function(){$.$informUndoManager.cancel(),$.mergeUndoDeltas=!1},this.$informUndoManager=f.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},F.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},F.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},F.prototype.getTabString=function(){return this.getUseSoftTabs()?f.stringRepeat(" ",this.getTabSize()):" "},F.prototype.setUseSoftTabs=function(D){this.setOption("useSoftTabs",D)},F.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},F.prototype.setTabSize=function(D){this.setOption("tabSize",D)},F.prototype.getTabSize=function(){return this.$tabSize},F.prototype.isTabStop=function(D){return this.$useSoftTabs&&D.column%this.$tabSize===0},F.prototype.setNavigateWithinSoftTabs=function(D){this.setOption("navigateWithinSoftTabs",D)},F.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},F.prototype.setOverwrite=function(D){this.setOption("overwrite",D)},F.prototype.getOverwrite=function(){return this.$overwrite},F.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},F.prototype.addGutterDecoration=function(D,$){this.$decorations[D]||(this.$decorations[D]=""),this.$decorations[D]+=" "+$,this._signal("changeBreakpoint",{})},F.prototype.removeGutterCustomWidget=function(D){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(D)},F.prototype.addGutterCustomWidget=function(D,$){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(D,$)},F.prototype.removeGutterDecoration=function(D,$){this.$decorations[D]=(this.$decorations[D]||"").replace(" "+$,""),this._signal("changeBreakpoint",{})},F.prototype.getBreakpoints=function(){return this.$breakpoints},F.prototype.setBreakpoints=function(D){this.$breakpoints=[];for(var $=0;$<D.length;$++)this.$breakpoints[D[$]]="ace_breakpoint";this._signal("changeBreakpoint",{})},F.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},F.prototype.setBreakpoint=function(D,$){$===void 0&&($="ace_breakpoint"),$?this.$breakpoints[D]=$:delete this.$breakpoints[D],this._signal("changeBreakpoint",{})},F.prototype.clearBreakpoint=function(D){delete this.$breakpoints[D],this._signal("changeBreakpoint",{})},F.prototype.addMarker=function(D,$,_,I){var z=this.$markerId++,U={range:D,type:_||"line",renderer:typeof _=="function"?_:null,clazz:$,inFront:!!I,id:z};return I?(this.$frontMarkers[z]=U,this._signal("changeFrontMarker")):(this.$backMarkers[z]=U,this._signal("changeBackMarker")),z},F.prototype.addDynamicMarker=function(D,$){if(D.update){var _=this.$markerId++;return D.id=_,D.inFront=!!$,$?(this.$frontMarkers[_]=D,this._signal("changeFrontMarker")):(this.$backMarkers[_]=D,this._signal("changeBackMarker")),D}},F.prototype.removeMarker=function(D){var $=this.$frontMarkers[D]||this.$backMarkers[D];if($){var _=$.inFront?this.$frontMarkers:this.$backMarkers;delete _[D],this._signal($.inFront?"changeFrontMarker":"changeBackMarker")}},F.prototype.getMarkers=function(D){return D?this.$frontMarkers:this.$backMarkers},F.prototype.highlight=function(D){if(!this.$searchHighlight){var $=new m(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker($)}this.$searchHighlight.setRegexp(D)},F.prototype.highlightLines=function(D,$,_,I){typeof $!="number"&&(_=$,$=D),_||(_="ace_step");var z=new u(D,0,$,1/0);return z.id=this.addMarker(z,_,"fullLine",I),z},F.prototype.setAnnotations=function(D){this.$annotations=D,this._signal("changeAnnotation",{})},F.prototype.getAnnotations=function(){return this.$annotations||[]},F.prototype.clearAnnotations=function(){this.setAnnotations([])},F.prototype.$detectNewLine=function(D){var $=D.match(/^.*?(\r?\n)/m);$?this.$autoNewLine=$[1]:this.$autoNewLine=`
|
|
201
|
+
`},F.prototype.getWordRange=function(D,$){var _=this.getLine(D),I=!1;if($>0&&(I=!!_.charAt($-1).match(this.tokenRe)),I||(I=!!_.charAt($).match(this.tokenRe)),I)var z=this.tokenRe;else if(/^\s+$/.test(_.slice($-1,$+1)))var z=/\s/;else var z=this.nonTokenRe;var U=$;if(U>0){do U--;while(U>=0&&_.charAt(U).match(z));U++}for(var V=$;V<_.length&&_.charAt(V).match(z);)V++;return new u(D,U,D,V)},F.prototype.getAWordRange=function(D,$){for(var _=this.getWordRange(D,$),I=this.getLine(_.end.row);I.charAt(_.end.column).match(/[ \t]/);)_.end.column+=1;return _},F.prototype.setNewLineMode=function(D){this.doc.setNewLineMode(D)},F.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},F.prototype.setUseWorker=function(D){this.setOption("useWorker",D)},F.prototype.getUseWorker=function(){return this.$useWorker},F.prototype.onReloadTokenizer=function(D){var $=D.data;this.bgTokenizer.start($.first),this._signal("tokenizerUpdate",D)},F.prototype.setMode=function(D,$){if(D&&typeof D=="object"){if(D.getTokenizer)return this.$onChangeMode(D);var _=D,I=_.path}else I=D||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a),this.$modes[I]&&!_){this.$onChangeMode(this.$modes[I]),$&&$();return}this.$modeId=I,o.loadModule(["mode",I],(function(z){if(!this.destroyed){if(this.$modeId!==I)return $&&$();this.$modes[I]&&!_?this.$onChangeMode(this.$modes[I]):z&&z.Mode&&(z=new z.Mode(_),_||(this.$modes[I]=z,z.$id=I),this.$onChangeMode(z)),$&&$()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},F.prototype.$onChangeMode=function(D,$){if($||(this.$modeId=D.$id),this.$mode!==D){var _=this.$mode;this.$mode=D,this.$stopWorker(),this.$useWorker&&this.$startWorker();var I=D.getTokenizer();if(I.on!==void 0){var z=this.onReloadTokenizer.bind(this);I.on("update",z)}this.bgTokenizer.setTokenizer(I),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=D.tokenRe,this.nonTokenRe=D.nonTokenRe,$||(D.attachToSession&&D.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(D.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:_,mode:D}))}},F.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},F.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(D){o.warn("Could not load worker",D),this.$worker=null}},F.prototype.getMode=function(){return this.$mode},F.prototype.setScrollTop=function(D){this.$scrollTop===D||isNaN(D)||(this.$scrollTop=D,this._signal("changeScrollTop",D))},F.prototype.getScrollTop=function(){return this.$scrollTop},F.prototype.setScrollLeft=function(D){this.$scrollLeft===D||isNaN(D)||(this.$scrollLeft=D,this._signal("changeScrollLeft",D))},F.prototype.getScrollLeft=function(){return this.$scrollLeft},F.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},F.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var D=0;return this.lineWidgets.forEach(function($){$&&$.screenWidth>D&&(D=$.screenWidth)}),this.lineWidgetWidth=D},F.prototype.$computeWidth=function(D){if(this.$modified||D){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var $=this.doc.getAllLines(),_=this.$rowLengthCache,I=0,z=0,U=this.$foldData[z],V=U?U.start.row:1/0,K=$.length,Z=0;Z<K;Z++){if(Z>V){if(Z=U.end.row+1,Z>=K)break;U=this.$foldData[z++],V=U?U.start.row:1/0}_[Z]==null&&(_[Z]=this.$getStringScreenWidth($[Z])[0]),_[Z]>I&&(I=_[Z])}this.screenWidth=I}},F.prototype.getLine=function(D){return this.doc.getLine(D)},F.prototype.getLines=function(D,$){return this.doc.getLines(D,$)},F.prototype.getLength=function(){return this.doc.getLength()},F.prototype.getTextRange=function(D){return this.doc.getTextRange(D||this.selection.getRange())},F.prototype.insert=function(D,$){return this.doc.insert(D,$)},F.prototype.remove=function(D){return this.doc.remove(D)},F.prototype.removeFullLines=function(D,$){return this.doc.removeFullLines(D,$)},F.prototype.undoChanges=function(D,$){if(D.length){this.$fromUndo=!0;for(var _=D.length-1;_!=-1;_--){var I=D[_];I.action=="insert"||I.action=="remove"?this.doc.revertDelta(I):I.folds&&this.addFolds(I.folds)}!$&&this.$undoSelect&&(D.selectionBefore?this.selection.fromJSON(D.selectionBefore):this.selection.setRange(this.$getUndoSelection(D,!0))),this.$fromUndo=!1}},F.prototype.redoChanges=function(D,$){if(D.length){this.$fromUndo=!0;for(var _=0;_<D.length;_++){var I=D[_];(I.action=="insert"||I.action=="remove")&&this.doc.$safeApplyDelta(I)}!$&&this.$undoSelect&&(D.selectionAfter?this.selection.fromJSON(D.selectionAfter):this.selection.setRange(this.$getUndoSelection(D,!1))),this.$fromUndo=!1}},F.prototype.setUndoSelect=function(D){this.$undoSelect=D},F.prototype.$getUndoSelection=function(D,$){function _(K){return $?K.action!=="insert":K.action==="insert"}for(var I,z,U=0;U<D.length;U++){var V=D[U];if(V.start){if(!I){_(V)?I=u.fromPoints(V.start,V.end):I=u.fromPoints(V.start,V.start);continue}_(V)?(z=V.start,I.compare(z.row,z.column)==-1&&I.setStart(z),z=V.end,I.compare(z.row,z.column)==1&&I.setEnd(z)):(z=V.start,I.compare(z.row,z.column)==-1&&(I=u.fromPoints(V.start,V.start)))}}return I},F.prototype.replace=function(D,$){return this.doc.replace(D,$)},F.prototype.moveText=function(D,$,_){var I=this.getTextRange(D),z=this.getFoldsInRange(D),U=u.fromPoints($,$);if(!_){this.remove(D);var V=D.start.row-D.end.row,K=V?-D.end.column:D.start.column-D.end.column;K&&(U.start.row==D.end.row&&U.start.column>D.end.column&&(U.start.column+=K),U.end.row==D.end.row&&U.end.column>D.end.column&&(U.end.column+=K)),V&&U.start.row>=D.end.row&&(U.start.row+=V,U.end.row+=V)}if(U.end=this.insert(U.start,I),z.length){var Z=D.start,oe=U.start,V=oe.row-Z.row,K=oe.column-Z.column;this.addFolds(z.map(function(ce){return ce=ce.clone(),ce.start.row==Z.row&&(ce.start.column+=K),ce.end.row==Z.row&&(ce.end.column+=K),ce.start.row+=V,ce.end.row+=V,ce}))}return U},F.prototype.indentRows=function(D,$,_){_=_.replace(/\t/g,this.getTabString());for(var I=D;I<=$;I++)this.doc.insertInLine({row:I,column:0},_)},F.prototype.outdentRows=function(D){for(var $=D.collapseRows(),_=new u(0,0,0,0),I=this.getTabSize(),z=$.start.row;z<=$.end.row;++z){var U=this.getLine(z);_.start.row=z,_.end.row=z;for(var V=0;V<I&&U.charAt(V)==" ";++V);V<I&&U.charAt(V)==" "?(_.start.column=V,_.end.column=V+1):(_.start.column=0,_.end.column=V),this.remove(_)}},F.prototype.$moveLines=function(D,$,_){if(D=this.getRowFoldStart(D),$=this.getRowFoldEnd($),_<0){var I=this.getRowFoldStart(D+_);if(I<0)return 0;var z=I-D}else if(_>0){var I=this.getRowFoldEnd($+_);if(I>this.doc.getLength()-1)return 0;var z=I-$}else{D=this.$clipRowToDocument(D),$=this.$clipRowToDocument($);var z=$-D+1}var U=new u(D,0,$,Number.MAX_VALUE),V=this.getFoldsInRange(U).map(function(Z){return Z=Z.clone(),Z.start.row+=z,Z.end.row+=z,Z}),K=_==0?this.doc.getLines(D,$):this.doc.removeFullLines(D,$);return this.doc.insertFullLines(D+z,K),V.length&&this.addFolds(V),z},F.prototype.moveLinesUp=function(D,$){return this.$moveLines(D,$,-1)},F.prototype.moveLinesDown=function(D,$){return this.$moveLines(D,$,1)},F.prototype.duplicateLines=function(D,$){return this.$moveLines(D,$,0)},F.prototype.$clipRowToDocument=function(D){return Math.max(0,Math.min(D,this.doc.getLength()-1))},F.prototype.$clipColumnToRow=function(D,$){return $<0?0:Math.min(this.doc.getLine(D).length,$)},F.prototype.$clipPositionToDocument=function(D,$){if($=Math.max(0,$),D<0)D=0,$=0;else{var _=this.doc.getLength();D>=_?(D=_-1,$=this.doc.getLine(_-1).length):$=Math.min(this.doc.getLine(D).length,$)}return{row:D,column:$}},F.prototype.$clipRangeToDocument=function(D){D.start.row<0?(D.start.row=0,D.start.column=0):D.start.column=this.$clipColumnToRow(D.start.row,D.start.column);var $=this.doc.getLength()-1;return D.end.row>$?(D.end.row=$,D.end.column=this.doc.getLine($).length):D.end.column=this.$clipColumnToRow(D.end.row,D.end.column),D},F.prototype.setUseWrapMode=function(D){if(D!=this.$useWrapMode){if(this.$useWrapMode=D,this.$modified=!0,this.$resetRowCache(0),D){var $=this.getLength();this.$wrapData=Array($),this.$updateWrapData(0,$-1)}this._signal("changeWrapMode")}},F.prototype.getUseWrapMode=function(){return this.$useWrapMode},F.prototype.setWrapLimitRange=function(D,$){(this.$wrapLimitRange.min!==D||this.$wrapLimitRange.max!==$)&&(this.$wrapLimitRange={min:D,max:$},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},F.prototype.adjustWrapLimit=function(D,$){var _=this.$wrapLimitRange;_.max<0&&(_={min:$,max:$});var I=this.$constrainWrapLimit(D,_.min,_.max);return I!=this.$wrapLimit&&I>1?(this.$wrapLimit=I,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},F.prototype.$constrainWrapLimit=function(D,$,_){return $&&(D=Math.max($,D)),_&&(D=Math.min(_,D)),D},F.prototype.getWrapLimit=function(){return this.$wrapLimit},F.prototype.setWrapLimit=function(D){this.setWrapLimitRange(D,D)},F.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},F.prototype.$updateInternalDataOnChange=function(D){var $=this.$useWrapMode,_=D.action,I=D.start,z=D.end,U=I.row,V=z.row,K=V-U,Z=null;if(this.$updating=!0,K!=0)if(_==="remove"){this[$?"$wrapData":"$rowLengthCache"].splice(U,K);var oe=this.$foldData;Z=this.getFoldsInRange(D),this.removeFolds(Z);var ee=this.getFoldLine(z.row),re=0;if(ee){ee.addRemoveChars(z.row,z.column,I.column-z.column),ee.shiftRow(-K);var ce=this.getFoldLine(U);ce&&ce!==ee&&(ce.merge(ee),ee=ce),re=oe.indexOf(ee)+1}for(re;re<oe.length;re++){var ee=oe[re];ee.start.row>=z.row&&ee.shiftRow(-K)}V=U}else{var ie=Array(K);ie.unshift(U,0);var fe=$?this.$wrapData:this.$rowLengthCache;fe.splice.apply(fe,ie);var oe=this.$foldData,ee=this.getFoldLine(U),re=0;if(ee){var pe=ee.range.compareInside(I.row,I.column);pe==0?(ee=ee.split(I.row,I.column),ee&&(ee.shiftRow(K),ee.addRemoveChars(V,0,z.column-I.column))):pe==-1&&(ee.addRemoveChars(U,0,z.column-I.column),ee.shiftRow(K)),re=oe.indexOf(ee)+1}for(re;re<oe.length;re++){var ee=oe[re];ee.start.row>=U&&ee.shiftRow(K)}}else{K=Math.abs(D.start.column-D.end.column),_==="remove"&&(Z=this.getFoldsInRange(D),this.removeFolds(Z),K=-K);var ee=this.getFoldLine(U);ee&&ee.addRemoveChars(U,I.column,K)}return $&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,$?this.$updateWrapData(U,V):this.$updateRowLengthCache(U,V),Z},F.prototype.$updateRowLengthCache=function(D,$){this.$rowLengthCache[D]=null,this.$rowLengthCache[$]=null},F.prototype.$updateWrapData=function(D,$){var _=this.doc.getAllLines(),I=this.getTabSize(),z=this.$wrapData,U=this.$wrapLimit,V,K,Z=D;for($=Math.min($,_.length-1);Z<=$;)K=this.getFoldLine(Z,K),K?(V=[],K.walk((function(oe,ee,re,ce){var ie;if(oe!=null){ie=this.$getDisplayTokens(oe,V.length),ie[0]=A;for(var fe=1;fe<ie.length;fe++)ie[fe]=C}else ie=this.$getDisplayTokens(_[ee].substring(ce,re),V.length);V=V.concat(ie)}).bind(this),K.end.row,_[K.end.row].length+1),z[K.start.row]=this.$computeWrapSplits(V,U,I),Z=K.end.row+1):(V=this.$getDisplayTokens(_[Z]),z[Z]=this.$computeWrapSplits(V,U,I),Z++)},F.prototype.$computeWrapSplits=function(D,$,_){if(D.length==0)return[];var I=[],z=D.length,U=0,V=0,K=this.$wrapAsCode,Z=this.$indentedSoftWrap,oe=$<=Math.max(2*_,8)||Z===!1?0:Math.floor($/2);function ee(){var pe=0;if(oe===0)return pe;if(Z)for(var $e=0;$e<D.length;$e++){var Re=D[$e];if(Re==N)pe+=1;else if(Re==M)pe+=_;else{if(Re==L)continue;break}}return K&&Z!==!1&&(pe+=_),Math.min(pe,oe)}function re(pe){for(var $e=pe-U,Re=U;Re<pe;Re++){var Ge=D[Re];(Ge===12||Ge===2)&&($e-=1)}I.length||(ce=ee(),I.indent=ce),V+=$e,I.push(V),U=pe}for(var ce=0;z-U>$-ce;){var ie=U+$-ce;if(D[ie-1]>=N&&D[ie]>=N){re(ie);continue}if(D[ie]==A||D[ie]==C){for(ie;ie!=U-1&&D[ie]!=A;ie--);if(ie>U){re(ie);continue}for(ie=U+$,ie;ie<D.length&&D[ie]==C;ie++);if(ie==D.length)break;re(ie);continue}for(var fe=Math.max(ie-($-($>>2)),U-1);ie>fe&&D[ie]<A;)ie--;if(K){for(;ie>fe&&D[ie]<A;)ie--;for(;ie>fe&&D[ie]==O;)ie--}else for(;ie>fe&&D[ie]<N;)ie--;if(ie>fe){re(++ie);continue}ie=U+$,D[ie]==S&&ie--,re(ie-ce)}return I},F.prototype.$getDisplayTokens=function(D,$){var _=[],I;$=$||0;for(var z=0;z<D.length;z++){var U=D.charCodeAt(z);if(U==9){I=this.getScreenTabSize(_.length+$),_.push(M);for(var V=1;V<I;V++)_.push(L)}else U==32?_.push(N):U>39&&U<48||U>57&&U<64?_.push(O):U>=4352&&j(U)?_.push(R,S):_.push(R)}return _},F.prototype.$getStringScreenWidth=function(D,$,_){if($==0)return[0,0];$==null&&($=1/0),_=_||0;var I,z;for(z=0;z<D.length&&(I=D.charCodeAt(z),I==9?_+=this.getScreenTabSize(_):I>=4352&&j(I)?_+=2:_+=1,!(_>$));z++);return[_,z]},F.prototype.getRowLength=function(D){var $=1;return this.lineWidgets&&($+=this.lineWidgets[D]&&this.lineWidgets[D].rowCount||0),!this.$useWrapMode||!this.$wrapData[D]?$:this.$wrapData[D].length+$},F.prototype.getRowLineCount=function(D){return!this.$useWrapMode||!this.$wrapData[D]?1:this.$wrapData[D].length+1},F.prototype.getRowWrapIndent=function(D){if(this.$useWrapMode){var $=this.screenToDocumentPosition(D,Number.MAX_VALUE),_=this.$wrapData[$.row];return _.length&&_[0]<$.column?_.indent:0}else return 0},F.prototype.getScreenLastRowColumn=function(D){var $=this.screenToDocumentPosition(D,Number.MAX_VALUE);return this.documentToScreenColumn($.row,$.column)},F.prototype.getDocumentLastRowColumn=function(D,$){var _=this.documentToScreenRow(D,$);return this.getScreenLastRowColumn(_)},F.prototype.getDocumentLastRowColumnPosition=function(D,$){var _=this.documentToScreenRow(D,$);return this.screenToDocumentPosition(_,Number.MAX_VALUE/10)},F.prototype.getRowSplitData=function(D){if(this.$useWrapMode)return this.$wrapData[D]},F.prototype.getScreenTabSize=function(D){return this.$tabSize-(D%this.$tabSize|0)},F.prototype.screenToDocumentRow=function(D,$){return this.screenToDocumentPosition(D,$).row},F.prototype.screenToDocumentColumn=function(D,$){return this.screenToDocumentPosition(D,$).column},F.prototype.screenToDocumentPosition=function(D,$,_){if(D<0)return{row:0,column:0};var I,re=0,z=0,U,ee=0,V=0,K=this.$screenRowCache,Z=this.$getRowCacheIndex(K,D),oe=K.length;if(oe&&Z>=0)var ee=K[Z],re=this.$docRowCache[Z],ce=D>K[oe-1];else var ce=!oe;for(var ie=this.getLength()-1,fe=this.getNextFoldLine(re),pe=fe?fe.start.row:1/0;ee<=D&&(V=this.getRowLength(re),!(ee+V>D||re>=ie));)ee+=V,re++,re>pe&&(re=fe.end.row+1,fe=this.getNextFoldLine(re,fe),pe=fe?fe.start.row:1/0),ce&&(this.$docRowCache.push(re),this.$screenRowCache.push(ee));if(fe&&fe.start.row<=re)I=this.getFoldDisplayLine(fe),re=fe.start.row;else{if(ee+V<=D||re>ie)return{row:ie,column:this.getLine(ie).length};I=this.getLine(re),fe=null}var $e=0,Re=Math.floor(D-ee);if(this.$useWrapMode){var Ge=this.$wrapData[re];Ge&&(U=Ge[Re],Re>0&&Ge.length&&($e=Ge.indent,z=Ge[Re-1]||Ge[Ge.length-1],I=I.substring(z)))}return _!==void 0&&this.$bidiHandler.isBidiRow(ee+Re,re,Re)&&($=this.$bidiHandler.offsetToCol(_)),z+=this.$getStringScreenWidth(I,$-$e)[1],this.$useWrapMode&&z>=U&&(z=U-1),fe?fe.idxToPosition(z):{row:re,column:z}},F.prototype.documentToScreenPosition=function(D,$){if(typeof $>"u")var _=this.$clipPositionToDocument(D.row,D.column);else _=this.$clipPositionToDocument(D,$);D=_.row,$=_.column;var ee=0,I=null,z=null;z=this.getFoldAt(D,$,1),z&&(D=z.start.row,$=z.start.column);var U,oe=0,V=this.$docRowCache,K=this.$getRowCacheIndex(V,D),Z=V.length;if(Z&&K>=0)var oe=V[K],ee=this.$screenRowCache[K],re=D>V[Z-1];else var re=!Z;for(var ce=this.getNextFoldLine(oe),ie=ce?ce.start.row:1/0;oe<D;){if(oe>=ie){if(U=ce.end.row+1,U>D)break;ce=this.getNextFoldLine(U,ce),ie=ce?ce.start.row:1/0}else U=oe+1;ee+=this.getRowLength(oe),oe=U,re&&(this.$docRowCache.push(oe),this.$screenRowCache.push(ee))}var fe="";ce&&oe>=ie?(fe=this.getFoldDisplayLine(ce,D,$),I=ce.start.row):(fe=this.getLine(D).substring(0,$),I=D);var pe=0;if(this.$useWrapMode){var $e=this.$wrapData[I];if($e){for(var Re=0;fe.length>=$e[Re];)ee++,Re++;fe=fe.substring($e[Re-1]||0,fe.length),pe=Re>0?$e.indent:0}}return this.lineWidgets&&this.lineWidgets[oe]&&this.lineWidgets[oe].rowsAbove&&(ee+=this.lineWidgets[oe].rowsAbove),{row:ee,column:pe+this.$getStringScreenWidth(fe)[0]}},F.prototype.documentToScreenColumn=function(D,$){return this.documentToScreenPosition(D,$).column},F.prototype.documentToScreenRow=function(D,$){return this.documentToScreenPosition(D,$).row},F.prototype.getScreenLength=function(){var D=0,$=null;if(this.$useWrapMode)for(var _=this.$wrapData.length,I=0,z=0,$=this.$foldData[z++],U=$?$.start.row:1/0;I<_;){var V=this.$wrapData[I];D+=V?V.length+1:1,I++,I>U&&(I=$.end.row+1,$=this.$foldData[z++],U=$?$.start.row:1/0)}else{D=this.getLength();for(var K=this.$foldData,z=0;z<K.length;z++)$=K[z],D-=$.end.row-$.start.row}return this.lineWidgets&&(D+=this.$getWidgetScreenLength()),D},F.prototype.$setFontMetrics=function(D){this.$enableVarChar&&(this.$getStringScreenWidth=function($,_,I){if(_===0)return[0,0];_||(_=1/0),I=I||0;var z,U;for(U=0;U<$.length&&(z=$.charAt(U),z===" "?I+=this.getScreenTabSize(I):I+=D.getCharacterWidth(z),!(I>_));U++);return[I,U]})},F.prototype.getPrecedingCharacter=function(){var D=this.selection.getCursor();if(D.column===0)return D.row===0?"":this.doc.getNewLineCharacter();var $=this.getLine(D.row);return $[D.column-1]},F.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()},F})();x.$uid=0,x.prototype.$modes=o.$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=j,h.implement(x.prototype,p);var R=1,S=2,A=3,C=4,O=9,N=10,M=11,L=12;function j(F){return F<4352?!1:F>=4352&&F<=4447||F>=4515&&F<=4519||F>=4602&&F<=4607||F>=9001&&F<=9002||F>=11904&&F<=11929||F>=11931&&F<=12019||F>=12032&&F<=12245||F>=12272&&F<=12283||F>=12288&&F<=12350||F>=12353&&F<=12438||F>=12441&&F<=12543||F>=12549&&F<=12589||F>=12593&&F<=12686||F>=12688&&F<=12730||F>=12736&&F<=12771||F>=12784&&F<=12830||F>=12832&&F<=12871||F>=12880&&F<=13054||F>=13056&&F<=19903||F>=19968&&F<=42124||F>=42128&&F<=42182||F>=43360&&F<=43388||F>=44032&&F<=55203||F>=55216&&F<=55238||F>=55243&&F<=55291||F>=63744&&F<=64255||F>=65040&&F<=65049||F>=65072&&F<=65106||F>=65108&&F<=65126||F>=65128&&F<=65131||F>=65281&&F<=65376||F>=65504&&F<=65510}e("./edit_session/folding").Folding.call(x.prototype),e("./edit_session/bracket_match").BracketMatch.call(x.prototype),o.defineOptions(x.prototype,"session",{wrap:{set:function(F){if(!F||F=="off"?F=!1:F=="free"?F=!0:F=="printMargin"?F=-1:typeof F=="string"&&(F=parseInt(F,10)||!1),this.$wrap!=F)if(this.$wrap=F,!F)this.setUseWrapMode(!1);else{var D=typeof F=="number"?F:null;this.setWrapLimitRange(D,D),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(F){F=F=="auto"?this.$mode.type!="text":F!="text",F!=this.$wrapAsCode&&(this.$wrapAsCode=F,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(F){this.$useWorker=F,this.$stopWorker(),F&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(F){F=parseInt(F),F>0&&this.$tabSize!==F&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=F,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(F){this.setFoldStyle(F)},handlesSet:!0},overwrite:{set:function(F){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(F){this.doc.setNewLineMode(F)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(F){this.setMode(F)},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(e,r,d){var h=e("./lib/lang"),f=e("./lib/oop"),v=e("./range").Range,o=(function(){function u(){this.$options={}}return u.prototype.set=function(g){return f.mixin(this.$options,g),this},u.prototype.getOptions=function(){return h.copyObject(this.$options)},u.prototype.setOptions=function(g){this.$options=g},u.prototype.find=function(g){var s=this.$options,c=this.$matchIterator(g,s);if(!c)return!1;var m=null;return c.forEach(function(w,x,R,S){return m=new v(w,x,R,S),x==S&&s.start&&s.start.start&&s.skipCurrent!=!1&&m.isEqual(s.start)?(m=null,!1):!0}),m},u.prototype.findAll=function(g){var s=this.$options;if(!s.needle)return[];this.$assembleRegExp(s);var c=s.range,m=c?g.getLines(c.start.row,c.end.row):g.doc.getAllLines(),w=[],x=s.re;if(s.$isMultiLine){var R=x.length,S=m.length-R,A;e:for(var C=x.offset||0;C<=S;C++){for(var O=0;O<R;O++)if(m[C+O].search(x[O])==-1)continue e;var N=m[C],M=m[C+R-1],L=N.length-N.match(x[0])[0].length,j=M.match(x[R-1])[0].length;A&&A.end.row===C&&A.end.column>L||(w.push(A=new v(C,L,C+R-1,j)),R>2&&(C=C+R-2))}}else for(var F,D=0;D<m.length;D++)if(this.$isMultilineSearch(s)){var $=m.length-1;if(F=this.$multiLineForward(g,x,D,$),F){var _=F.endRow<=$?F.endRow-1:$;_>D&&(D=_),w.push(new v(F.startRow,F.startCol,F.endRow,F.endCol))}}else{F=h.getMatchOffsets(m[D],x);for(var O=0;O<F.length;O++){var I=F[O];w.push(new v(D,I.offset,D,I.offset+I.length))}}if(c){for(var z=c.start.column,U=c.end.column,D=0,O=w.length-1;D<O&&w[D].start.column<z&&w[D].start.row==0;)D++;for(var V=c.end.row-c.start.row;D<O&&w[O].end.column>U&&w[O].end.row==V;)O--;for(w=w.slice(D,O+1),D=0,O=w.length;D<O;D++)w[D].start.row+=c.start.row,w[D].end.row+=c.start.row}return w},u.prototype.parseReplaceString=function(g){for(var s={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},c="",m=0,w=g.length;m<w;m++){var x=g.charCodeAt(m);if(x===s.Backslash){if(m++,m>=w){c+="\\";break}var R=g.charCodeAt(m);switch(R){case s.Backslash:c+="\\";break;case s.n:c+=`
|
|
202
|
+
`;break;case s.t:c+=" ";break}continue}if(x===s.DollarSign){if(m++,m>=w){c+="$";break}var S=g.charCodeAt(m);if(S===s.DollarSign){c+="$$";continue}if(S===s.Digit0||S===s.Ampersand){c+="$&";continue}if(s.Digit1<=S&&S<=s.Digit9){c+="$"+g[m];continue}}c+=g[m]}return c||g},u.prototype.replace=function(g,s){var c=this.$options,m=this.$assembleRegExp(c);if(c.$isMultiLine)return s;if(m){var w=this.$isMultilineSearch(c);w&&(g=g.replace(/\r\n|\r|\n/g,`
|
|
203
|
+
`));var x=m.exec(g);if(!x||!w&&x[0].length!=g.length)return null;if(s=c.regExp?this.parseReplaceString(s):s.replace(/\$/g,"$$$$"),s=g.replace(m,s),c.preserveCase){s=s.split("");for(var R=Math.min(g.length,g.length);R--;){var S=g[R];S&&S.toLowerCase()!=S?s[R]=s[R].toUpperCase():s[R]=s[R].toLowerCase()}s=s.join("")}return s}},u.prototype.$assembleRegExp=function(g,s){if(g.needle instanceof RegExp)return g.re=g.needle;var c=g.needle;if(!g.needle)return g.re=!1;g.regExp||(c=h.escapeRegExp(c));var m=g.caseSensitive?"gm":"gmi";try{new RegExp(c,"u"),g.$supportsUnicodeFlag=!0,m+="u"}catch{g.$supportsUnicodeFlag=!1}if(g.wholeWord&&(c=p(c,g)),g.$isMultiLine=!s&&/[\n\r]/.test(c),g.$isMultiLine)return g.re=this.$assembleMultilineRegExp(c,m);try{var w=new RegExp(c,m)}catch{w=!1}return g.re=w},u.prototype.$assembleMultilineRegExp=function(g,s){for(var c=g.replace(/\r\n|\r|\n/g,`$
|
|
204
|
+
^`).split(`
|
|
205
|
+
`),m=[],w=0;w<c.length;w++)try{m.push(new RegExp(c[w],s))}catch{return!1}return m},u.prototype.$isMultilineSearch=function(g){return g.re&&/\\r\\n|\\r|\\n/.test(g.re.source)&&g.regExp&&!g.$isMultiLine},u.prototype.$multiLineForward=function(g,s,c,m){for(var w,x=a(g,c),R=c;R<=m;){for(var S=0;S<x&&!(R>m);S++){var A=g.getLine(R++);w=w==null?A:w+`
|
|
206
|
+
`+A}var C=s.exec(w);if(s.lastIndex=0,C){var O=w.slice(0,C.index).split(`
|
|
207
|
+
`),N=C[0].split(`
|
|
208
|
+
`),M=c+O.length-1,L=O[O.length-1].length,j=M+N.length-1,F=N.length==1?L+N[0].length:N[N.length-1].length;return{startRow:M,startCol:L,endRow:j,endCol:F}}}return null},u.prototype.$multiLineBackward=function(g,s,c,m,w){for(var x,R=a(g,m),S=g.getLine(m).length-c,A=m;A>=w;){for(var C=0;C<R&&A>=w;C++){var O=g.getLine(A--);x=x==null?O:O+`
|
|
209
|
+
`+x}var N=i(x,s,S);if(N){var M=x.slice(0,N.index).split(`
|
|
210
|
+
`),L=N[0].split(`
|
|
211
|
+
`),j=A+M.length,F=M[M.length-1].length,D=j+L.length-1,$=L.length==1?F+L[0].length:L[L.length-1].length;return{startRow:j,startCol:F,endRow:D,endCol:$}}}return null},u.prototype.$matchIterator=function(g,s){var c=this.$assembleRegExp(s);if(!c)return!1;var m=this.$isMultilineSearch(s),w=this.$multiLineForward,x=this.$multiLineBackward,R=s.backwards==!0,S=s.skipCurrent!=!1,A=c.unicode,C=s.range,O=s.start;O||(O=C?C[R?"end":"start"]:g.selection.getRange()),O.start&&(O=O[S!=R?"end":"start"]);var N=C?C.start.row:0,M=C?C.end.row:g.getLength()-1;if(R)var L=function(D){var $=O.row;if(!F($,O.column,D)){for($--;$>=N;$--)if(F($,Number.MAX_VALUE,D))return;if(s.wrap!=!1){for($=M,N=O.row;$>=N;$--)if(F($,Number.MAX_VALUE,D))return}}};else var L=function(D){var $=O.row;if(!F($,O.column,D)){for($=$+1;$<=M;$++)if(F($,0,D))return;if(s.wrap!=!1){for($=N,M=O.row;$<=M;$++)if(F($,0,D))return}}};if(s.$isMultiLine)var j=c.length,F=function(D,$,_){var I=R?D-j+1:D;if(!(I<0||I+j>g.getLength())){var z=g.getLine(I),U=z.search(c[0]);if(!(!R&&U<$||U===-1)){for(var V=1;V<j;V++)if(z=g.getLine(I+V),z.search(c[V])==-1)return;var K=z.match(c[j-1])[0].length;if(!(R&&K>$)&&_(I,U,I+j-1,K))return!0}}};else if(R)var F=function(D,$,_){if(m){var I=x(g,c,$,D,N);if(!I)return!1;if(_(I.startRow,I.startCol,I.endRow,I.endCol))return!0}else{var z=g.getLine(D),U=[],V,K=0;for(c.lastIndex=0;V=c.exec(z);){var Z=V[0].length;if(K=V.index,!Z){if(K>=z.length)break;c.lastIndex=K+=h.skipEmptyMatch(z,K,A)}if(V.index+Z>$)break;U.push(V.index,Z)}for(var oe=U.length-1;oe>=0;oe-=2){var ee=U[oe-1],Z=U[oe];if(_(D,ee,D,ee+Z))return!0}}};else var F=function(D,$,_){if(c.lastIndex=$,m){var I=w(g,c,D,M);if(I){var z=I.endRow<=M?I.endRow-1:M;z>D&&(D=z)}if(!I)return!1;if(_(I.startRow,I.startCol,I.endRow,I.endCol))return!0}else for(var U=g.getLine(D),V,K;K=c.exec(U);){var Z=K[0].length;if(V=K.index,_(D,V,D,V+Z))return!0;if(!Z&&(c.lastIndex=V+=h.skipEmptyMatch(U,V,A),V>=U.length))return!1}};return{forEach:L}},u})();function p(u,g){var s=h.supportsLookbehind();function c(R,S){S===void 0&&(S=!0);var A=s&&g.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return A.test(R)||g.regExp?s&&g.$supportsUnicodeFlag?S?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var m=Array.from(u),w=m[0],x=m[m.length-1];return c(w)+u+c(x,!1)}function i(u,g,s){for(var c=null,m=0;m<=u.length;){g.lastIndex=m;var w=g.exec(u);if(!w)break;var x=w.index+w[0].length;if(x>u.length-s)break;(!c||x>c.index+c[0].length)&&(c=w),m=w.index+1}return c}function a(u,g){var s=5e3,c={row:g,column:0},m=u.doc.positionToIndex(c),w=m+s,x=u.doc.indexToPosition(w),R=x.row;return R+1}r.Search=o}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,d){var h=this&&this.__extends||(function(){var u=function(g,s){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,m){c.__proto__=m}||function(c,m){for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(c[w]=m[w])},u(g,s)};return function(g,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");u(g,s);function c(){this.constructor=g}g.prototype=s===null?Object.create(s):(c.prototype=s.prototype,new c)}})(),f=e("../lib/keys"),v=e("../lib/useragent"),o=f.KEY_MODS,p=(function(){function u(g,s){this.$init(g,s,!1)}return u.prototype.$init=function(g,s,c){this.platform=s||(v.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(g),this.$singleCommand=c},u.prototype.addCommand=function(g){this.commands[g.name]&&this.removeCommand(g),this.commands[g.name]=g,g.bindKey&&this._buildKeyHash(g)},u.prototype.removeCommand=function(g,s){var c=g&&(typeof g=="string"?g:g.name);g=this.commands[c],s||delete this.commands[c];var m=this.commandKeyBinding;for(var w in m){var x=m[w];if(x==g)delete m[w];else if(Array.isArray(x)){var R=x.indexOf(g);R!=-1&&(x.splice(R,1),x.length==1&&(m[w]=x[0]))}}},u.prototype.bindKey=function(g,s,c){if(typeof g=="object"&&g&&(c==null&&(c=g.position),g=g[this.platform]),!!g){if(typeof s=="function")return this.addCommand({exec:s,bindKey:g,name:s.name||g});g.split("|").forEach(function(m){var w="";if(m.indexOf(" ")!=-1){var x=m.split(/\s+/);m=x.pop(),x.forEach(function(A){var C=this.parseKeys(A),O=o[C.hashId]+C.key;w+=(w?" ":"")+O,this._addCommandToBinding(w,"chainKeys")},this),w+=" "}var R=this.parseKeys(m),S=o[R.hashId]+R.key;this._addCommandToBinding(w+S,s,c)},this)}},u.prototype._addCommandToBinding=function(g,s,c){var m=this.commandKeyBinding,w;if(!s)delete m[g];else if(!m[g]||this.$singleCommand)m[g]=s;else{Array.isArray(m[g])?(w=m[g].indexOf(s))!=-1&&m[g].splice(w,1):m[g]=[m[g]],typeof c!="number"&&(c=i(s));var x=m[g];for(w=0;w<x.length;w++){var R=x[w],S=i(R);if(S>c)break}x.splice(w,0,s)}},u.prototype.addCommands=function(g){g&&Object.keys(g).forEach(function(s){var c=g[s];if(c){if(typeof c=="string")return this.bindKey(c,s);typeof c=="function"&&(c={exec:c}),typeof c=="object"&&(c.name||(c.name=s),this.addCommand(c))}},this)},u.prototype.removeCommands=function(g){Object.keys(g).forEach(function(s){this.removeCommand(g[s])},this)},u.prototype.bindKeys=function(g){Object.keys(g).forEach(function(s){this.bindKey(s,g[s])},this)},u.prototype._buildKeyHash=function(g){this.bindKey(g.bindKey,g)},u.prototype.parseKeys=function(g){var s=g.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(S){return S}),c=s.pop(),m=f[c];if(f.FUNCTION_KEYS[m])c=f.FUNCTION_KEYS[m].toLowerCase();else if(s.length){if(s.length==1&&s[0]=="shift")return{key:c.toUpperCase(),hashId:-1}}else return{key:c,hashId:-1};for(var w=0,x=s.length;x--;){var R=f.KEY_MODS[s[x]];if(R==null)return typeof console<"u"&&console.error("invalid modifier "+s[x]+" in "+g),!1;w|=R}return{key:c,hashId:w}},u.prototype.findKeyCommand=function(g,s){var c=o[g]+s;return this.commandKeyBinding[c]},u.prototype.handleKeyboard=function(g,s,c,m){if(!(m<0)){var w=o[s]+c,x=this.commandKeyBinding[w];return g.$keyChain&&(g.$keyChain+=" "+w,x=this.commandKeyBinding[g.$keyChain]||x),x&&(x=="chainKeys"||x[x.length-1]=="chainKeys")?(g.$keyChain=g.$keyChain||w,{command:"null"}):(g.$keyChain&&((!s||s==4)&&c.length==1?g.$keyChain=g.$keyChain.slice(0,-w.length-1):(s==-1||m>0)&&(g.$keyChain="")),{command:x})}},u.prototype.getStatusText=function(g,s){return s.$keyChain||""},u})();function i(u){return typeof u=="object"&&u.bindKey&&u.bindKey.position||(u.isDefault?-100:0)}var a=(function(u){h(g,u);function g(s,c){var m=u.call(this,s,c)||this;return m.$singleCommand=!0,m}return g})(p);a.call=function(u,g,s){p.prototype.$init.call(u,g,s,!0)},p.call=function(u,g,s){p.prototype.$init.call(u,g,s,!1)},r.HashHandler=a,r.MultiHashHandler=p}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,r,d){var h=this&&this.__extends||(function(){var i=function(a,u){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,s){g.__proto__=s}||function(g,s){for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(g[c]=s[c])},i(a,u)};return function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");i(a,u);function g(){this.constructor=a}a.prototype=u===null?Object.create(u):(g.prototype=u.prototype,new g)}})(),f=e("../lib/oop"),v=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,p=(function(i){h(a,i);function a(u,g){var s=i.call(this,g,u)||this;return s.byName=s.commands,s.setDefaultHandler("exec",function(c){return c.args?c.command.exec(c.editor,c.args,c.event,!1):c.command.exec(c.editor,{},c.event,!0)}),s}return a.prototype.exec=function(u,g,s){if(Array.isArray(u)){for(var c=u.length;c--;)if(this.exec(u[c],g,s))return!0;return!1}typeof u=="string"&&(u=this.commands[u]);var m={editor:g,command:u,args:s};return this.canExecute(u,g)?(m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1):(this._signal("commandUnavailable",m),!1)},a.prototype.canExecute=function(u,g){return typeof u=="string"&&(u=this.commands[u]),!(!u||g&&g.$readOnly&&!u.readOnly||this.$checkCommandState!=!1&&u.isAvailable&&!u.isAvailable(g))},a.prototype.toggleRecording=function(u){if(!this.$inReplay)return u&&u._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(g){this.macro.push([g.command,g.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},a.prototype.replay=function(u){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(u);try{this.$inReplay=!0,this.macro.forEach(function(g){typeof g=="string"?this.exec(g,u):this.exec(g[0],u,g[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function(u){return u.map(function(g){return typeof g[0]!="string"&&(g[0]=g[0].name),g[1]||(g=g[0]),g})},a})(v);f.implement(p.prototype,o),r.CommandManager=p}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,r,d){var h=e("../lib/lang"),f=e("../config"),v=e("../range").Range;function o(i,a){return{win:i,mac:a}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:o("Ctrl-,","Command-,"),exec:function(i){f.loadModule("ace/ext/settings_menu",function(a){a.init(i),i.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:o("Alt-E","F4"),exec:function(i){f.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(i,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:o("Alt-Shift-E","Shift-F4"),exec:function(i){f.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(i,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:o("Ctrl-A","Command-A"),exec:function(i){i.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:o(null,"Ctrl-L"),exec:function(i){i.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:o("Ctrl-L","Command-L"),exec:function(i,a){typeof a=="number"&&!isNaN(a)&&i.gotoLine(a),i.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:o("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(i){i.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:o("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(i){i.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:o("F2","F2"),exec:function(i){i.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:o("Alt-F2","Alt-F2"),exec:function(i){i.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(i){i.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(i){i.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:o("Alt-0","Command-Option-0"),exec:function(i){i.session.foldAll(),i.session.unfold(i.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:o("Alt-Shift-0","Command-Option-Shift-0"),exec:function(i){i.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:o("Ctrl-K","Command-G"),exec:function(i){i.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:o("Ctrl-Shift-K","Command-Shift-G"),exec:function(i){i.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:o("Alt-K","Ctrl-G"),exec:function(i){i.selection.isEmpty()?i.selection.selectWord():i.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:o("Alt-Shift-K","Ctrl-Shift-G"),exec:function(i){i.selection.isEmpty()?i.selection.selectWord():i.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:o("Ctrl-F","Command-F"),exec:function(i){f.loadModule("ace/ext/searchbox",function(a){a.Search(i)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(i){i.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:o("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(i){i.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:o("Ctrl-Home","Command-Home|Command-Up"),exec:function(i){i.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:o("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(i){i.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:o("Up","Up|Ctrl-P"),exec:function(i,a){i.navigateUp(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:o("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(i){i.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:o("Ctrl-End","Command-End|Command-Down"),exec:function(i){i.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:o("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(i){i.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:o("Down","Down|Ctrl-N"),exec:function(i,a){i.navigateDown(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:o("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(i){i.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:o("Ctrl-Left","Option-Left"),exec:function(i){i.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:o("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(i){i.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:o("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(i){i.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:o("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(i){i.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:o("Left","Left|Ctrl-B"),exec:function(i,a){i.navigateLeft(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:o("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(i){i.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:o("Ctrl-Right","Option-Right"),exec:function(i){i.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:o("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(i){i.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:o("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(i){i.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:o("Shift-Right","Shift-Right"),exec:function(i){i.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:o("Right","Right|Ctrl-F"),exec:function(i,a){i.navigateRight(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(i){i.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:o(null,"Option-PageDown"),exec:function(i){i.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:o("PageDown","PageDown|Ctrl-V"),exec:function(i){i.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(i){i.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:o(null,"Option-PageUp"),exec:function(i){i.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(i){i.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:o("Ctrl-Up",null),exec:function(i){i.renderer.scrollBy(0,-2*i.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:o("Ctrl-Down",null),exec:function(i){i.renderer.scrollBy(0,2*i.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(i){i.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(i){i.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:o("Ctrl-Alt-E","Command-Option-E"),exec:function(i){i.commands.toggleRecording(i)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:o("Ctrl-Shift-E","Command-Shift-E"),exec:function(i){i.commands.replay(i)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:o("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(i){i.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:o("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(i){i.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:o("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(i){i.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:o(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(i){},readOnly:!0},{name:"cut",description:"Cut",exec:function(i){var a=i.$copyWithEmptySelection&&i.selection.isEmpty(),u=a?i.selection.getLineRange():i.selection.getRange();i._emit("cut",u),u.isEmpty()||i.session.remove(u),i.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(i,a){i.$handlePaste(a)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:o("Ctrl-D","Command-D"),exec:function(i){i.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:o("Ctrl-Shift-D","Command-Shift-D"),exec:function(i){i.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:o("Ctrl-Alt-S","Command-Alt-S"),exec:function(i){i.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:o("Ctrl-/","Command-/"),exec:function(i){i.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:o("Ctrl-Shift-/","Command-Shift-/"),exec:function(i){i.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:o("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(i){i.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:o("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(i){i.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:o("Ctrl-H","Command-Option-F"),exec:function(i){f.loadModule("ace/ext/searchbox",function(a){a.Search(i,!0)})}},{name:"undo",description:"Undo",bindKey:o("Ctrl-Z","Command-Z"),exec:function(i){i.undo()}},{name:"redo",description:"Redo",bindKey:o("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(i){i.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:o("Alt-Shift-Up","Command-Option-Up"),exec:function(i){i.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:o("Alt-Up","Option-Up"),exec:function(i){i.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:o("Alt-Shift-Down","Command-Option-Down"),exec:function(i){i.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:o("Alt-Down","Option-Down"),exec:function(i){i.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:o("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(i){i.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:o("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(i){i.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:o("Shift-Delete",null),exec:function(i){if(i.selection.isEmpty())i.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:o("Alt-Backspace","Command-Backspace"),exec:function(i){i.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:o("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(i){i.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:o("Ctrl-Shift-Backspace",null),exec:function(i){var a=i.selection.getRange();a.start.column=0,i.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:o("Ctrl-Shift-Delete",null),exec:function(i){var a=i.selection.getRange();a.end.column=Number.MAX_VALUE,i.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:o("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(i){i.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:o("Ctrl-Delete","Alt-Delete"),exec:function(i){i.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:o("Shift-Tab","Shift-Tab"),exec:function(i){i.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:o("Tab","Tab"),exec:function(i){i.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:o("Ctrl-[","Ctrl-["),exec:function(i){i.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:o("Ctrl-]","Ctrl-]"),exec:function(i){i.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(i,a){i.insert(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(i,a){i.insert(h.stringRepeat(a.text||"",a.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:o(null,"Ctrl-O"),exec:function(i){i.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:o("Alt-Shift-X","Ctrl-T"),exec:function(i){i.transposeLetters()},multiSelectAction:function(i){i.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:o("Ctrl-U","Ctrl-U"),exec:function(i){i.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:o("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(i){i.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:o(null,null),exec:function(i){i.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:o("Ctrl-Shift-L","Command-Shift-L"),exec:function(i){var a=i.selection.getRange();a.start.column=a.end.column=0,a.end.row++,i.selection.setRange(a,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:o("Ctrl+F3","F3"),exec:function(i){i.openLink()}},{name:"joinlines",description:"Join lines",bindKey:o(null,null),exec:function(i){for(var a=i.selection.isBackwards(),u=a?i.selection.getSelectionLead():i.selection.getSelectionAnchor(),g=a?i.selection.getSelectionAnchor():i.selection.getSelectionLead(),s=i.session.doc.getLine(u.row).length,c=i.session.doc.getTextRange(i.selection.getRange()),m=c.replace(/\n\s*/," ").length,w=i.session.doc.getLine(u.row),x=u.row+1;x<=g.row+1;x++){var R=h.stringTrimLeft(h.stringTrimRight(i.session.doc.getLine(x)));R.length!==0&&(R=" "+R),w+=R}g.row+1<i.session.doc.getLength()-1&&(w+=i.session.doc.getNewLineCharacter()),i.clearSelection(),i.session.doc.replace(new v(u.row,0,g.row+2,0),w),m>0?(i.selection.moveCursorTo(u.row,u.column),i.selection.selectTo(u.row,u.column+m)):(s=i.session.doc.getLine(u.row).length>s?s+1:s,i.selection.moveCursorTo(u.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:o(null,null),exec:function(i){var a=i.session.doc.getLength()-1,u=i.session.doc.getLine(a).length,g=i.selection.rangeList.ranges,s=[];g.length<1&&(g=[i.selection.getRange()]);for(var c=0;c<g.length;c++)c==g.length-1&&(g[c].end.row===a&&g[c].end.column===u||s.push(new v(g[c].end.row,g[c].end.column,a,u))),c===0?g[c].start.row===0&&g[c].start.column===0||s.push(new v(0,0,g[c].start.row,g[c].start.column)):s.push(new v(g[c-1].end.row,g[c-1].end.column,g[c].start.row,g[c].start.column));i.exitMultiSelectMode(),i.clearSelection();for(var c=0;c<s.length;c++)i.selection.addRange(s[c],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(i){i.selection.clearSelection(),i.navigateLineEnd(),i.insert(`
|
|
212
|
+
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(i){i.selection.clearSelection();var a=i.getCursorPosition();i.selection.moveTo(a.row-1,Number.MAX_VALUE),i.insert(`
|
|
213
|
+
`),a.row===0&&i.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(i){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),i.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:o("F1","F1"),exec:function(i){i.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:o(null,null),exec:function(i){i.prompt({$type:"modes"})},readOnly:!0}];for(var p=1;p<9;p++)r.commands.push({name:"foldToLevel"+p,description:"Fold To Level "+p,level:p,exec:function(i){i.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(e,r,d){var h=e("../lib/keys"),f=(function(){function o(p){this.editor=p,this.gutterLayer=p.renderer.$gutterLayer,this.element=p.renderer.$gutter,this.lines=p.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return o.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))},o.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))},o.prototype.$onGutterKeyDown=function(p){if(this.annotationTooltip.isOpen){p.preventDefault(),p.keyCode===h.escape&&this.annotationTooltip.hide();return}if(p.target===this.element){if(p.keyCode!=h.enter)return;p.preventDefault();var i=this.editor.getCursorPosition().row;this.editor.isRowVisible(i)||this.editor.scrollToLine(i,!0,!0),setTimeout((function(){var a=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),u=this.$findNearestFoldLaneWidget(a),g=this.$findNearestAnnotation(a);if(!(u===null&&g===null)){var s=this.$findClosestNumber(u,g,a);if(s===u)if(this.activeLane="fold",this.activeRowIndex=u,this.$isCustomWidgetVisible(u)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=g,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(p),setTimeout((function(){this.editor._signal("gutterkeydown",new v(p,this))}).bind(this),10)},o.prototype.$handleGutterKeyboardInteraction=function(p){if(p.keyCode===h.tab){p.preventDefault();return}if(p.keyCode===h.escape){p.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(p.keyCode===h.up){switch(p.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(p.keyCode===h.down){switch(p.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(p.keyCode===h.left){p.preventDefault(),this.$switchLane("annotation");return}if(p.keyCode===h.right){p.preventDefault(),this.$switchLane("fold");return}if(p.keyCode===h.enter||p.keyCode===h.space){switch(p.preventDefault(),this.activeLane){case"fold":var i=this.$rowIndexToRow(this.activeRowIndex),a=this.editor.session.$gutterCustomWidgets[i];if(a)a.callbacks&&a.callbacks.onClick&&a.callbacks.onClick(p,i);else if(this.gutterLayer.session.foldWidgets[i]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),p),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==i&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(i),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex)),this.annotationTooltip.$fromKeyboard=!0;break}return}},o.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},o.prototype.$isFoldWidgetVisible=function(p){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(p)),a=this.$getFoldWidget(p).style.display!=="none";return i&&a},o.prototype.$isCustomWidgetVisible=function(p){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(p)),a=!!this.$getCustomWidget(p);return i&&a},o.prototype.$isAnnotationVisible=function(p){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(p)),a=this.$getAnnotation(p).style.display!=="none";return i&&a},o.prototype.$getFoldWidget=function(p){var i=this.lines.get(p),a=i.element;return a.childNodes[1]},o.prototype.$getCustomWidget=function(p){var i=this.lines.get(p),a=i.element;return a.childNodes[3]},o.prototype.$getAnnotation=function(p){var i=this.lines.get(p),a=i.element;return a.childNodes[2]},o.prototype.$findNearestFoldLaneWidget=function(p){if(this.$isCustomWidgetVisible(p)||this.$isFoldWidgetVisible(p))return p;for(var i=0;p-i>0||p+i<this.lines.getLength()-1;){if(i++,p-i>=0&&this.$isCustomWidgetVisible(p-i))return p-i;if(p+i<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(p+i))return p+i;if(p-i>=0&&this.$isFoldWidgetVisible(p-i))return p-i;if(p+i<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(p+i))return p+i}return null},o.prototype.$findNearestAnnotation=function(p){if(this.$isAnnotationVisible(p))return p;for(var i=0;p-i>0||p+i<this.lines.getLength()-1;){if(i++,p-i>=0&&this.$isAnnotationVisible(p-i))return p-i;if(p+i<=this.lines.getLength()-1&&this.$isAnnotationVisible(p+i))return p+i}return null},o.prototype.$focusFoldWidget=function(p){if(p!=null){var i=this.$getFoldWidget(p);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},o.prototype.$focusCustomWidget=function(p){if(p!=null){var i=this.$getCustomWidget(p);i&&(i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus())}},o.prototype.$focusAnnotation=function(p){if(p!=null){var i=this.$getAnnotation(p);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},o.prototype.$blurFoldWidget=function(p){var i=this.$getFoldWidget(p);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},o.prototype.$blurCustomWidget=function(p){var i=this.$getCustomWidget(p);i&&(i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur())},o.prototype.$blurAnnotation=function(p){var i=this.$getAnnotation(p);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},o.prototype.$moveFoldWidgetUp=function(){for(var p=this.activeRowIndex;p>0;)if(p--,this.$isFoldWidgetVisible(p)||this.$isCustomWidgetVisible(p)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=p,this.$isFoldWidgetVisible(p)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},o.prototype.$moveFoldWidgetDown=function(){for(var p=this.activeRowIndex;p<this.lines.getLength()-1;)if(p++,this.$isFoldWidgetVisible(p)||this.$isCustomWidgetVisible(p)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=p,this.$isFoldWidgetVisible(p)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},o.prototype.$moveAnnotationUp=function(){for(var p=this.activeRowIndex;p>0;)if(p--,this.$isAnnotationVisible(p)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=p,this.$focusAnnotation(this.activeRowIndex);return}},o.prototype.$moveAnnotationDown=function(){for(var p=this.activeRowIndex;p<this.lines.getLength()-1;)if(p++,this.$isAnnotationVisible(p)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=p,this.$focusAnnotation(this.activeRowIndex);return}},o.prototype.$findClosestNumber=function(p,i,a){return p===null?i:i===null||Math.abs(a-p)<=Math.abs(a-i)?p:i},o.prototype.$switchLane=function(p){switch(p){case"annotation":if(this.activeLane==="annotation")break;var i=this.$findNearestAnnotation(this.activeRowIndex);if(i==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=i,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var a=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(a===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=a,this.$isCustomWidgetVisible(a)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},o.prototype.$rowIndexToRow=function(p){var i=this.lines.get(p);return i?i.row:null},o.prototype.$rowToRowIndex=function(p){for(var i=0;i<this.lines.getLength();i++){var a=this.lines.get(i);if(a.row==p)return i}return null},o})();r.GutterKeyboardHandler=f;var v=(function(){function o(p,i){this.gutterKeyboardHandler=i,this.domEvent=p}return o.prototype.getKey=function(){return h.keyCodeToString(this.domEvent.keyCode)},o.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},o.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},o.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},o})();r.GutterKeyboardEvent=v}),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(e,r,d){var h=this&&this.__values||function($){var _=typeof Symbol=="function"&&Symbol.iterator,I=_&&$[_],z=0;if(I)return I.call($);if($&&typeof $.length=="number")return{next:function(){return $&&z>=$.length&&($=void 0),{value:$&&$[z++],done:!$}}};throw new TypeError(_?"Object is not iterable.":"Symbol.iterator is not defined.")},f=e("./lib/oop"),v=e("./lib/dom"),o=e("./lib/lang"),p=e("./lib/useragent"),i=e("./keyboard/textinput").TextInput,a=e("./mouse/mouse_handler").MouseHandler,u=e("./mouse/fold_handler").FoldHandler,g=e("./keyboard/keybinding").KeyBinding,s=e("./edit_session").EditSession,c=e("./search").Search,m=e("./range").Range,w=e("./lib/event_emitter").EventEmitter,x=e("./commands/command_manager").CommandManager,R=e("./commands/default_commands").commands,S=e("./config"),A=e("./token_iterator").TokenIterator,C=e("./keyboard/gutter_handler").GutterKeyboardHandler,O=e("./config").nls,N=e("./clipboard"),M=e("./lib/keys"),L=e("./lib/event"),j=e("./tooltip").HoverTooltip,F=(function(){function $(_,I,z){this.id="editor"+ ++$.$uid,this.session,this.$toDestroy=[];var U=_.getContainerElement();this.container=U,this.renderer=_,this.commands=new x(p.isMac?"mac":"win",R),typeof document=="object"&&(this.textInput=new i(_.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new u(this)),this.keyBinding=new g(this),this.$search=new c().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=o.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(V,K){K._$emitInputEvent.schedule(31)}),this.setSession(I||z&&z.session||new s("")),S.resetOptions(this),z&&this.setOptions(z),S._signal("editor",this)}return $.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},$.prototype.startOperation=function(_){this.session.startOperation(_)},$.prototype.endOperation=function(_){this.session.endOperation(_)},$.prototype.onStartOperation=function(_){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,_||(this.previousCommand=null)},$.prototype.onEndOperation=function(_){if(this.curOp&&this.session){if(_&&_.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var I=this.curOp.command,z=I&&I.scrollIntoView;if(z){switch(z){case"center-animate":z="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var U=this.selection.getRange(),V=this.renderer.layerConfig;(U.start.row>=V.lastRow||U.end.row<=V.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}z=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},$.prototype.$historyTracker=function(_){if(this.$mergeUndoDeltas){var I=this.prevOp,z=this.$mergeableCommands,U=I.command&&_.command.name==I.command.name;if(_.command.name=="insertstring"){var V=_.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),U=U&&this.mergeNextCommand&&(!/\s/.test(V)||/\s/.test(I.args)),this.mergeNextCommand=!0}else U=U&&z.indexOf(_.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(U=!1),U?this.session.mergeUndoDeltas=!0:z.indexOf(_.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},$.prototype.setKeyboardHandler=function(_,I){if(_&&typeof _=="string"&&_!="ace"){this.$keybindingId=_;var z=this;S.loadModule(["keybinding",_],function(U){z.$keybindingId==_&&z.keyBinding.setKeyboardHandler(U&&U.handler),I&&I()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(_),I&&I()},$.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},$.prototype.setSession=function(_){if(this.session!=_){this.curOp&&this.endOperation(),this.curOp={};var I=this.session;if(I){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 z=this.session.getSelection();z.off("changeCursor",this.$onCursorChange),z.off("changeSelection",this.$onSelectionChange)}this.session=_,_?(this.$onDocumentChange=this.onDocumentChange.bind(this),_.on("change",this.$onDocumentChange),this.renderer.setSession(_),this.$onChangeMode=this.onChangeMode.bind(this),_.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),_.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),_.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),_.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),_.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),_.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=_.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(_)),this._signal("changeSession",{session:_,oldSession:I}),this.curOp=null,I&&I._signal("changeEditor",{oldEditor:this}),I&&(I.$editor=null),_&&_._signal("changeEditor",{editor:this}),_&&(_.$editor=this),_&&!_.destroyed&&_.bgTokenizer.scheduleStart()}},$.prototype.getSession=function(){return this.session},$.prototype.setValue=function(_,I){return this.session.doc.setValue(_),I?I==1?this.navigateFileEnd():I==-1&&this.navigateFileStart():this.selectAll(),_},$.prototype.getValue=function(){return this.session.getValue()},$.prototype.getSelection=function(){return this.selection},$.prototype.resize=function(_){this.renderer.onResize(_)},$.prototype.setTheme=function(_,I){this.renderer.setTheme(_,I)},$.prototype.getTheme=function(){return this.renderer.getTheme()},$.prototype.setStyle=function(_,I){this.renderer.setStyle(_,I)},$.prototype.unsetStyle=function(_){this.renderer.unsetStyle(_)},$.prototype.getFontSize=function(){return this.getOption("fontSize")||v.computedStyle(this.container).fontSize},$.prototype.setFontSize=function(_){this.setOption("fontSize",_)},$.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var _=this;this.$highlightPending=!0,setTimeout(function(){_.$highlightPending=!1;var I=_.session;if(!(!I||I.destroyed)){I.$bracketHighlight&&(I.$bracketHighlight.markerIds.forEach(function(ce){I.removeMarker(ce)}),I.$bracketHighlight=null);var z=_.getCursorPosition(),U=_.getKeyboardHandler(),V=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(_),K=I.getMatchingBracketRanges(z,V);if(!K){var Z=new A(I,z.row,z.column),oe=Z.getCurrentToken();if(oe&&/\b(?:tag-open|tag-name)/.test(oe.type)){var ee=I.getMatchingTags(z);ee&&(K=[ee.openTagName.isEmpty()?ee.openTag:ee.openTagName,ee.closeTagName.isEmpty()?ee.closeTag:ee.closeTagName])}}if(!K&&I.$mode.getMatching&&(K=I.$mode.getMatching(_.session)),!K){_.getHighlightIndentGuides()&&_.renderer.$textLayer.$highlightIndentGuide();return}var re="ace_bracket";Array.isArray(K)?K.length==1&&(re="ace_error_bracket"):K=[K],K.length==2&&(m.comparePoints(K[0].end,K[1].start)==0?K=[m.fromPoints(K[0].start,K[1].end)]:m.comparePoints(K[0].start,K[1].end)==0&&(K=[m.fromPoints(K[1].start,K[0].end)])),I.$bracketHighlight={ranges:K,markerIds:K.map(function(ce){return I.addMarker(ce,re,"text")})},_.getHighlightIndentGuides()&&_.renderer.$textLayer.$highlightIndentGuide()}},50)}},$.prototype.focus=function(){this.textInput.focus()},$.prototype.isFocused=function(){return this.textInput.isFocused()},$.prototype.blur=function(){this.textInput.blur()},$.prototype.onFocus=function(_){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",_))},$.prototype.onBlur=function(_){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",_))},$.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},$.prototype.onDocumentChange=function(_){var I=this.session.$useWrapMode,z=_.start.row==_.end.row?_.end.row:1/0;this.renderer.updateLines(_.start.row,z,I),this._signal("change",_),this.$cursorChange()},$.prototype.onTokenizerUpdate=function(_){var I=_.data;this.renderer.updateLines(I.first,I.last)},$.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},$.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},$.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},$.prototype.$updateHighlightActiveLine=function(){var _=this.getSession(),I;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(I=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(I=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(I=!1)),_.$highlightLineMarker&&!I)_.removeMarker(_.$highlightLineMarker.id),_.$highlightLineMarker=null;else if(!_.$highlightLineMarker&&I){var z=new m(I.row,I.column,I.row,1/0);z.id=_.addMarker(z,"ace_active-line","screenLine"),_.$highlightLineMarker=z}else I&&(_.$highlightLineMarker.start.row=I.row,_.$highlightLineMarker.end.row=I.row,_.$highlightLineMarker.start.column=I.column,_._signal("changeBackMarker"))},$.prototype.onSelectionChange=function(_){var I=this.session;if(I.$selectionMarker&&I.removeMarker(I.$selectionMarker),I.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var z=this.selection.getRange(),U=this.getSelectionStyle();I.$selectionMarker=I.addMarker(z,"ace_selection",U)}var V=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(V),this._signal("changeSelection")},$.prototype.$getSelectionHighLightRegexp=function(){var _=this.session,I=this.getSelectionRange();if(!(I.isEmpty()||I.isMultiLine())){var z=I.start.column,U=I.end.column,V=_.getLine(I.start.row),K=V.substring(z,U);if(!(K.length>5e3||!/[\w\d]/.test(K))){var Z=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:K}),oe=V.substring(z-1,U+1);if(Z.test(oe))return Z}}},$.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},$.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},$.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},$.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},$.prototype.onChangeMode=function(_){this.renderer.updateText(),this._emit("changeMode",_)},$.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},$.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},$.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},$.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},$.prototype.getCopyText=function(){var _=this.getSelectedText(),I=this.session.doc.getNewLineCharacter(),z=!1;if(!_&&this.$copyWithEmptySelection){z=!0;for(var U=this.selection.getAllRanges(),V=0;V<U.length;V++){var K=U[V];V&&U[V-1].start.row==K.start.row||(_+=this.session.getLine(K.start.row)+I)}}var Z={text:_};return this._signal("copy",Z),N.lineMode=z?Z.text:!1,Z.text},$.prototype.onCopy=function(){this.commands.exec("copy",this)},$.prototype.onCut=function(){this.commands.exec("cut",this)},$.prototype.onPaste=function(_,I){var z={text:_,event:I};this.commands.exec("paste",this,z)},$.prototype.$handlePaste=function(_){typeof _=="string"&&(_={text:_}),this._signal("paste",_);var I=_.text,z=I===N.lineMode,U=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)z?U.insert({row:this.selection.lead.row,column:0},I):this.insert(I);else if(z)this.selection.rangeList.ranges.forEach(function(re){U.insert({row:re.start.row,column:0},I)});else{var V=I.split(/\r\n|\r|\n/),K=this.selection.rangeList.ranges,Z=V.length==2&&(!V[0]||!V[1]);if(V.length!=K.length||Z)return this.commands.exec("insertstring",this,I);for(var oe=K.length;oe--;){var ee=K[oe];ee.isEmpty()||U.remove(ee),U.insert(ee.start,V[oe])}}},$.prototype.execCommand=function(_,I){return this.commands.exec(_,this,I)},$.prototype.insert=function(_,I){var z=this.session,U=z.getMode(),V=this.getCursorPosition();if(this.getBehavioursEnabled()&&!I){var K=U.transformAction(z.getState(V.row),"insertion",this,z,_);K&&(_!==K.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),_=K.text)}if(_==" "&&(_=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&_.indexOf(`
|
|
214
|
+
`)==-1){var Z=m.fromPoints(V,V);Z.end.column+=_.length,this.session.remove(Z)}}else{var Z=this.getSelectionRange();V=this.session.remove(Z),this.clearSelection()}if(_==`
|
|
215
|
+
`||_==`\r
|
|
216
|
+
`){var ce=z.getLine(V.row);if(V.column>ce.search(/\S|$/)){var oe=ce.substr(V.column).search(/\S|$/);z.doc.removeInLine(V.row,V.column,V.column+oe)}}this.clearSelection();var ee=V.column,re=z.getState(V.row),ce=z.getLine(V.row),ie=U.checkOutdent(re,ce,_);if(z.insert(V,_),K&&K.selection&&(K.selection.length==2?this.selection.setSelectionRange(new m(V.row,ee+K.selection[0],V.row,ee+K.selection[1])):this.selection.setSelectionRange(new m(V.row+K.selection[0],K.selection[1],V.row+K.selection[2],K.selection[3]))),this.$enableAutoIndent){if(z.getDocument().isNewLine(_)){var fe=U.getNextLineIndent(re,ce.slice(0,V.column),z.getTabString());z.insert({row:V.row+1,column:0},fe)}ie&&U.autoOutdent(re,z,V.row)}},$.prototype.autoIndent=function(){for(var _=this.session,I=_.getMode(),z=this.selection.isEmpty()?[new m(0,0,_.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",V="",K="",Z=_.getTabString(),oe=0;oe<z.length;oe++)for(var ee=z[oe].start.row,re=z[oe].end.row,ce=ee;ce<=re;ce++){ce>0&&(U=_.getState(ce-1),V=_.getLine(ce-1),K=I.getNextLineIndent(U,V,Z));var ie=_.getLine(ce),fe=I.$getIndent(ie);if(K!==fe){if(fe.length>0){var pe=new m(ce,0,ce,fe.length);_.remove(pe)}K.length>0&&_.insert({row:ce,column:0},K)}I.autoOutdent(U,_,ce)}},$.prototype.onTextInput=function(_,I){if(!I)return this.keyBinding.onTextInput(_);this.startOperation({command:{name:"insertstring"}});var z=this.applyComposition.bind(this,_,I);this.selection.rangeCount?this.forEachSelection(z):z(),this.endOperation()},$.prototype.applyComposition=function(_,I){if(I.extendLeft||I.extendRight){var z=this.selection.getRange();z.start.column-=I.extendLeft,z.end.column+=I.extendRight,z.start.column<0&&(z.start.row--,z.start.column+=this.session.getLine(z.start.row).length+1),this.selection.setRange(z),!_&&!z.isEmpty()&&this.remove()}if((_||!this.selection.isEmpty())&&this.insert(_,!0),I.restoreStart||I.restoreEnd){var z=this.selection.getRange();z.start.column-=I.restoreStart,z.end.column-=I.restoreEnd,this.selection.setRange(z)}},$.prototype.onCommandKey=function(_,I,z){return this.keyBinding.onCommandKey(_,I,z)},$.prototype.setOverwrite=function(_){this.session.setOverwrite(_)},$.prototype.getOverwrite=function(){return this.session.getOverwrite()},$.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},$.prototype.setScrollSpeed=function(_){this.setOption("scrollSpeed",_)},$.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},$.prototype.setDragDelay=function(_){this.setOption("dragDelay",_)},$.prototype.getDragDelay=function(){return this.getOption("dragDelay")},$.prototype.setSelectionStyle=function(_){this.setOption("selectionStyle",_)},$.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},$.prototype.setHighlightActiveLine=function(_){this.setOption("highlightActiveLine",_)},$.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},$.prototype.setHighlightGutterLine=function(_){this.setOption("highlightGutterLine",_)},$.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},$.prototype.setHighlightSelectedWord=function(_){this.setOption("highlightSelectedWord",_)},$.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},$.prototype.setAnimatedScroll=function(_){this.renderer.setAnimatedScroll(_)},$.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},$.prototype.setShowInvisibles=function(_){this.renderer.setShowInvisibles(_)},$.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},$.prototype.setDisplayIndentGuides=function(_){this.renderer.setDisplayIndentGuides(_)},$.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},$.prototype.setHighlightIndentGuides=function(_){this.renderer.setHighlightIndentGuides(_)},$.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},$.prototype.setShowPrintMargin=function(_){this.renderer.setShowPrintMargin(_)},$.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},$.prototype.setPrintMarginColumn=function(_){this.renderer.setPrintMarginColumn(_)},$.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},$.prototype.setReadOnly=function(_){this.setOption("readOnly",_)},$.prototype.getReadOnly=function(){return this.getOption("readOnly")},$.prototype.setBehavioursEnabled=function(_){this.setOption("behavioursEnabled",_)},$.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},$.prototype.setWrapBehavioursEnabled=function(_){this.setOption("wrapBehavioursEnabled",_)},$.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},$.prototype.setShowFoldWidgets=function(_){this.setOption("showFoldWidgets",_)},$.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},$.prototype.setFadeFoldWidgets=function(_){this.setOption("fadeFoldWidgets",_)},$.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},$.prototype.remove=function(_){this.selection.isEmpty()&&(_=="left"?this.selection.selectLeft():this.selection.selectRight());var I=this.getSelectionRange();if(this.getBehavioursEnabled()){var z=this.session,U=z.getState(I.start.row),V=z.getMode().transformAction(U,"deletion",this,z,I);if(I.end.column===0){var K=z.getTextRange(I);if(K[K.length-1]==`
|
|
217
|
+
`){var Z=z.getLine(I.end.row);/^\s+$/.test(Z)&&(I.end.column=Z.length)}}V&&(I=V)}this.session.remove(I),this.clearSelection()},$.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},$.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},$.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},$.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var _=this.getSelectionRange();_.start.column==_.end.column&&_.start.row==_.end.row&&(_.end.column=0,_.end.row++),this.session.remove(_),this.clearSelection()},$.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var _=this.getCursorPosition();this.insert(`
|
|
218
|
+
`),this.moveCursorToPosition(_)},$.prototype.setGhostText=function(_,I){this.renderer.setGhostText(_,I)},$.prototype.removeGhostText=function(){this.renderer.removeGhostText()},$.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var _=this.getCursorPosition(),I=_.column;if(I!==0){var z=this.session.getLine(_.row),U,V;I<z.length?(U=z.charAt(I)+z.charAt(I-1),V=new m(_.row,I-1,_.row,I+1)):(U=z.charAt(I-1)+z.charAt(I-2),V=new m(_.row,I-2,_.row,I)),this.session.replace(V,U),this.session.selection.moveToPosition(V.end)}}},$.prototype.toLowerCase=function(){var _=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var I=this.getSelectionRange(),z=this.session.getTextRange(I);this.session.replace(I,z.toLowerCase()),this.selection.setSelectionRange(_)},$.prototype.toUpperCase=function(){var _=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var I=this.getSelectionRange(),z=this.session.getTextRange(I);this.session.replace(I,z.toUpperCase()),this.selection.setSelectionRange(_)},$.prototype.indent=function(){var _=this.session,I=this.getSelectionRange();if(I.start.row<I.end.row){var z=this.$getSelectedRows();_.indentRows(z.first,z.last," ");return}else if(I.start.column<I.end.column){var U=_.getTextRange(I);if(!/^\s+$/.test(U)){var z=this.$getSelectedRows();_.indentRows(z.first,z.last," ");return}}var V=_.getLine(I.start.row),K=I.start,Z=_.getTabSize(),oe=_.documentToScreenColumn(K.row,K.column);if(this.session.getUseSoftTabs())var ee=Z-oe%Z,re=o.stringRepeat(" ",ee);else{for(var ee=oe%Z;V[I.start.column-1]==" "&ⅇ)I.start.column--,ee--;this.selection.setSelectionRange(I),re=" "}return this.insert(re)},$.prototype.blockIndent=function(){var _=this.$getSelectedRows();this.session.indentRows(_.first,_.last," ")},$.prototype.blockOutdent=function(){var _=this.session.getSelection();this.session.outdentRows(_.getRange())},$.prototype.sortLines=function(){for(var _=this.$getSelectedRows(),I=this.session,z=[],U=_.first;U<=_.last;U++)z.push(I.getLine(U));z.sort(function(Z,oe){return Z.toLowerCase()<oe.toLowerCase()?-1:Z.toLowerCase()>oe.toLowerCase()?1:0});for(var V=new m(0,0,0,0),U=_.first;U<=_.last;U++){var K=I.getLine(U);V.start.row=U,V.end.row=U,V.end.column=K.length,I.replace(V,z[U-_.first])}},$.prototype.toggleCommentLines=function(){var _=this.session.getState(this.getCursorPosition().row),I=this.$getSelectedRows();this.session.getMode().toggleCommentLines(_,this.session,I.first,I.last)},$.prototype.toggleBlockComment=function(){var _=this.getCursorPosition(),I=this.session.getState(_.row),z=this.getSelectionRange();this.session.getMode().toggleBlockComment(I,this.session,z,_)},$.prototype.getNumberAt=function(_,I){var z=/[\-]?[0-9]+(?:\.[0-9]+)?/g;z.lastIndex=0;for(var U=this.session.getLine(_);z.lastIndex<I;){var V=z.exec(U);if(V.index<=I&&V.index+V[0].length>=I){var K={value:V[0],start:V.index,end:V.index+V[0].length};return K}}return null},$.prototype.modifyNumber=function(_){var I=this.selection.getCursor().row,z=this.selection.getCursor().column,U=new m(I,z-1,I,z),V=this.session.getTextRange(U);if(!isNaN(parseFloat(V))&&isFinite(V)){var K=this.getNumberAt(I,z);if(K){var Z=K.value.indexOf(".")>=0?K.start+K.value.indexOf(".")+1:K.end,oe=K.start+K.value.length-Z,ee=parseFloat(K.value);ee*=Math.pow(10,oe),Z!==K.end&&z<Z?_*=Math.pow(10,K.end-z-1):_*=Math.pow(10,K.end-z),ee+=_,ee/=Math.pow(10,oe);var re=ee.toFixed(oe),ce=new m(I,K.start,I,K.end);this.session.replace(ce,re),this.moveCursorTo(I,Math.max(K.start+1,z+re.length-K.value.length))}}else this.toggleWord()},$.prototype.toggleWord=function(){var _=this.selection.getCursor().row,I=this.selection.getCursor().column;this.selection.selectWord();var z=this.getSelectedText(),U=this.selection.getWordRange().start.column,V=z.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),K=I-U-1;K<0&&(K=0);var Z=0,oe=0,ee=this;z.match(/[A-Za-z0-9_]+/)&&V.forEach(function(qe,ct){oe=Z+qe.length,K>=Z&&K<=oe&&(z=qe,ee.selection.clearSelection(),ee.moveCursorTo(_,Z+U),ee.selection.selectTo(_,oe+U)),Z=oe});for(var re=this.$toggleWordPairs,ce,ie=0;ie<re.length;ie++)for(var fe=re[ie],pe=0;pe<=1;pe++){var $e=+!pe,Re=z.match(new RegExp("^\\s?_?("+o.escapeRegExp(fe[pe])+")\\s?$","i"));if(Re){var Ge=z.match(new RegExp("([_]|^|\\s)("+o.escapeRegExp(Re[1])+")($|\\s)","g"));Ge&&(ce=z.replace(new RegExp(o.escapeRegExp(fe[pe]),"i"),function(qe){var ct=fe[$e];return qe.toUpperCase()==qe?ct=ct.toUpperCase():qe.charAt(0).toUpperCase()==qe.charAt(0)&&(ct=ct.substr(0,0)+fe[$e].charAt(0).toUpperCase()+ct.substr(1)),ct}),this.insert(ce),ce="")}}},$.prototype.findLinkAt=function(_,I){var z,U,V=this.session.getLine(_),K=V.split(/((?:https?|ftp):\/\/[\S]+)/),Z=I;Z<0&&(Z=0);var oe=0,ee=0,re;try{for(var ce=h(K),ie=ce.next();!ie.done;ie=ce.next()){var fe=ie.value;if(ee=oe+fe.length,Z>=oe&&Z<=ee&&fe.match(/((?:https?|ftp):\/\/[\S]+)/)){re=fe.replace(/[\s:.,'";}\]]+$/,"");break}oe=ee}}catch(pe){z={error:pe}}finally{try{ie&&!ie.done&&(U=ce.return)&&U.call(ce)}finally{if(z)throw z.error}}return re},$.prototype.openLink=function(){var _=this.selection.getCursor(),I=this.findLinkAt(_.row,_.column);return I&&window.open(I,"_blank"),I!=null},$.prototype.removeLines=function(){var _=this.$getSelectedRows();this.session.removeFullLines(_.first,_.last),this.clearSelection()},$.prototype.duplicateSelection=function(){var _=this.selection,I=this.session,z=_.getRange(),U=_.isBackwards();if(z.isEmpty()){var V=z.start.row;I.duplicateLines(V,V)}else{var K=U?z.start:z.end,Z=I.insert(K,I.getTextRange(z));z.start=K,z.end=Z,_.setSelectionRange(z,U)}},$.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},$.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},$.prototype.moveText=function(_,I,z){return this.session.moveText(_,I,z)},$.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},$.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},$.prototype.$moveLines=function(_,I){var z,U,V=this.selection;if(!V.inMultiSelectMode||this.inVirtualSelectionMode){var K=V.toOrientedRange();z=this.$getSelectedRows(K),U=this.session.$moveLines(z.first,z.last,I?0:_),I&&_==-1&&(U=0),K.moveBy(U,0),V.fromOrientedRange(K)}else{var Z=V.rangeList.ranges;V.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var oe=0,ee=0,re=Z.length,ce=0;ce<re;ce++){var ie=ce;Z[ce].moveBy(oe,0),z=this.$getSelectedRows(Z[ce]);for(var fe=z.first,pe=z.last;++ce<re;){ee&&Z[ce].moveBy(ee,0);var $e=this.$getSelectedRows(Z[ce]);if(I&&$e.first!=pe||!I&&$e.first>pe+1)break;pe=$e.last}for(ce--,oe=this.session.$moveLines(fe,pe,I?0:_),I&&_==-1&&(ie=ce+1);ie<=ce;)Z[ie].moveBy(oe,0),ie++;I||(oe=0),ee+=oe}V.fromOrientedRange(V.ranges[0]),V.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},$.prototype.$getSelectedRows=function(_){return _=(_||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(_.start.row),last:this.session.getRowFoldEnd(_.end.row)}},$.prototype.onCompositionStart=function(_){this.renderer.showComposition(_)},$.prototype.onCompositionUpdate=function(_){this.renderer.setCompositionText(_)},$.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},$.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},$.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},$.prototype.isRowVisible=function(_){return _>=this.getFirstVisibleRow()&&_<=this.getLastVisibleRow()},$.prototype.isRowFullyVisible=function(_){return _>=this.renderer.getFirstFullyVisibleRow()&&_<=this.renderer.getLastFullyVisibleRow()},$.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},$.prototype.$moveByPage=function(_,I){var z=this.renderer,U=this.renderer.layerConfig,V=_*Math.floor(U.height/U.lineHeight);I===!0?this.selection.$moveSelection(function(){this.moveCursorBy(V,0)}):I===!1&&(this.selection.moveCursorBy(V,0),this.selection.clearSelection());var K=z.scrollTop;z.scrollBy(0,V*U.lineHeight),I!=null&&z.scrollCursorIntoView(null,.5),z.animateScrolling(K)},$.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},$.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},$.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},$.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},$.prototype.scrollPageDown=function(){this.$moveByPage(1)},$.prototype.scrollPageUp=function(){this.$moveByPage(-1)},$.prototype.scrollToRow=function(_){this.renderer.scrollToRow(_)},$.prototype.scrollToLine=function(_,I,z,U){this.renderer.scrollToLine(_,I,z,U)},$.prototype.centerSelection=function(){var _=this.getSelectionRange(),I={row:Math.floor(_.start.row+(_.end.row-_.start.row)/2),column:Math.floor(_.start.column+(_.end.column-_.start.column)/2)};this.renderer.alignCursor(I,.5)},$.prototype.getCursorPosition=function(){return this.selection.getCursor()},$.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},$.prototype.getSelectionRange=function(){return this.selection.getRange()},$.prototype.selectAll=function(){this.selection.selectAll()},$.prototype.clearSelection=function(){this.selection.clearSelection()},$.prototype.moveCursorTo=function(_,I){this.selection.moveCursorTo(_,I)},$.prototype.moveCursorToPosition=function(_){this.selection.moveCursorToPosition(_)},$.prototype.jumpToMatching=function(_,I){var z=this.getCursorPosition(),U=new A(this.session,z.row,z.column),V=U.getCurrentToken(),K=0;V&&V.type.indexOf("tag-name")!==-1&&(V=U.stepBackward());var Z=V||U.stepForward();if(Z){var oe,ee=!1,re={},ce=z.column-Z.start,ie,fe={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(Z.value.match(/[{}()\[\]]/g)){for(;ce<Z.value.length&&!ee;ce++)if(fe[Z.value[ce]])switch(ie=fe[Z.value[ce]]+"."+Z.type.replace("rparen","lparen"),isNaN(re[ie])&&(re[ie]=0),Z.value[ce]){case"(":case"[":case"{":re[ie]++;break;case")":case"]":case"}":re[ie]--,re[ie]===-1&&(oe="bracket",ee=!0);break}}else Z.type.indexOf("tag-name")!==-1&&(isNaN(re[Z.value])&&(re[Z.value]=0),V.value==="<"&&K>1?re[Z.value]++:V.value==="</"&&re[Z.value]--,re[Z.value]===-1&&(oe="tag",ee=!0));ee||(V=Z,K++,Z=U.stepForward(),ce=0)}while(Z&&!ee);if(oe){var pe,$e;if(oe==="bracket")pe=this.session.getBracketRange(z),pe||(pe=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ce-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ce-1),$e=pe.start,(I||$e.row===z.row&&Math.abs($e.column-z.column)<2)&&(pe=this.session.getBracketRange($e)));else if(oe==="tag"){if(!Z||Z.type.indexOf("tag-name")===-1)return;if(pe=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2,U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2),pe.compare(z.row,z.column)===0){var Re=this.session.getMatchingTags(z);Re&&(Re.openTag.contains(z.row,z.column)?(pe=Re.closeTag,$e=pe.start):(pe=Re.openTag,Re.closeTag.start.row===z.row&&Re.closeTag.start.column===z.column?$e=pe.end:$e=pe.start))}$e=$e||pe.start}$e=pe&&pe.cursor||$e,$e&&(_?pe&&I?this.selection.setRange(pe):pe&&pe.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo($e.row,$e.column):this.selection.moveTo($e.row,$e.column))}}},$.prototype.gotoLine=function(_,I,z){this.selection.clearSelection(),this.session.unfold({row:_-1,column:I||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(_-1,I||0),this.isRowFullyVisible(_-1)||this.scrollToLine(_-1,!0,z)},$.prototype.navigateTo=function(_,I){this.selection.moveTo(_,I)},$.prototype.navigateUp=function(_){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var I=this.selection.anchor.getPosition();return this.moveCursorToPosition(I)}this.selection.clearSelection(),this.selection.moveCursorBy(-_||-1,0)},$.prototype.navigateDown=function(_){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var I=this.selection.anchor.getPosition();return this.moveCursorToPosition(I)}this.selection.clearSelection(),this.selection.moveCursorBy(_||1,0)},$.prototype.navigateLeft=function(_){if(this.selection.isEmpty())for(_=_||1;_--;)this.selection.moveCursorLeft();else{var I=this.getSelectionRange().start;this.moveCursorToPosition(I)}this.clearSelection()},$.prototype.navigateRight=function(_){if(this.selection.isEmpty())for(_=_||1;_--;)this.selection.moveCursorRight();else{var I=this.getSelectionRange().end;this.moveCursorToPosition(I)}this.clearSelection()},$.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},$.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},$.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},$.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},$.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},$.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},$.prototype.replace=function(_,I){I&&this.$search.set(I);var z=this.$search.find(this.session),U=0;return z&&(this.$tryReplace(z,_)&&(U=1),this.selection.setSelectionRange(z),this.renderer.scrollSelectionIntoView(z.start,z.end)),U},$.prototype.replaceAll=function(_,I){I&&this.$search.set(I);var z=this.$search.findAll(this.session),U=0;if(!z.length)return U;var V=this.getSelectionRange();this.selection.moveTo(0,0);for(var K=z.length-1;K>=0;--K)this.$tryReplace(z[K],_)&&U++;return this.selection.setSelectionRange(V),U},$.prototype.$tryReplace=function(_,I){var z=this.session.getTextRange(_);return I=this.$search.replace(z,I),I!==null?(_.end=this.session.replace(_,I),_):null},$.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},$.prototype.find=function(_,I,z){I||(I={}),typeof _=="string"||_ instanceof RegExp?I.needle=_:typeof _=="object"&&f.mixin(I,_);var U=this.selection.getRange();I.needle==null&&(_=this.session.getTextRange(U)||this.$search.$options.needle,_||(U=this.session.getWordRange(U.start.row,U.start.column),_=this.session.getTextRange(U)),this.$search.set({needle:_})),this.$search.set(I),I.start||this.$search.set({start:U});var V=this.$search.find(this.session);if(I.preventScroll)return V;if(V)return this.revealRange(V,z),V;I.backwards?U.start=U.end:U.end=U.start,this.selection.setRange(U)},$.prototype.findNext=function(_,I){this.find({skipCurrent:!0,backwards:!1},_,I)},$.prototype.findPrevious=function(_,I){this.find(_,{skipCurrent:!0,backwards:!0},I)},$.prototype.revealRange=function(_,I){this.session.unfold(_),this.selection.setSelectionRange(_);var z=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(_.start,_.end,.5),I!==!1&&this.renderer.animateScrolling(z)},$.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},$.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},$.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(_){_.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},$.prototype.setAutoScrollEditorIntoView=function(_){if(_){var I,z=this,U=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var V=this.$scrollAnchor;V.style.cssText="position:absolute",this.container.insertBefore(V,this.container.firstChild);var K=this.on("changeSelection",function(){U=!0}),Z=this.renderer.on("beforeRender",function(){U&&(I=z.renderer.container.getBoundingClientRect())}),oe=this.renderer.on("afterRender",function(){if(U&&I&&(z.isFocused()||z.searchBox&&z.searchBox.isFocused())){var ee=z.renderer,re=ee.$cursorLayer.$pixelPos,ce=ee.layerConfig,ie=re.top-ce.offset;re.top>=0&&ie+I.top<0?U=!0:re.top<ce.height&&re.top+I.top+ce.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(V.style.top=ie+"px",V.style.left=re.left+"px",V.style.height=ce.lineHeight+"px",V.scrollIntoView(U)),U=I=null}});this.setAutoScrollEditorIntoView=function(ee){ee||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",K),this.renderer.off("afterRender",oe),this.renderer.off("beforeRender",Z))}}},$.prototype.$resetCursorStyle=function(){var _=this.$cursorStyle||"ace",I=this.renderer.$cursorLayer;I&&(I.setSmoothBlinking(/smooth/.test(_)),I.isBlinking=!this.$readOnly&&_!="wide",v.setCssClass(I.element,"ace_slim-cursors",/slim/.test(_)))},$.prototype.prompt=function(_,I,z){var U=this;S.loadModule("ace/ext/prompt",function(V){V.prompt(U,_,I,z)})},Object.defineProperty($.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||(this.$hoverTooltip=new j(this.container))},set:function(_){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=_},enumerable:!1,configurable:!0}),$})();F.$uid=0,F.prototype.curOp=null,F.prototype.prevOp={},F.prototype.$mergeableCommands=["backspace","del","insertstring"],F.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"],["&&","||"],["==","!="]],f.implement(F.prototype,w),S.defineOptions(F.prototype,"editor",{selectionStyle:{set:function($){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:$})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function($){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function($){var _=this;if(this.textInput.setReadOnly($),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(z){var U=!1;if(z&&z.type=="keydown"){if(z&&z.key&&!z.ctrlKey&&!z.metaKey&&(z.key==" "&&z.preventDefault(),U=z.key.length==1),!U)return}else z&&z.type!=="exec"&&(U=!0);if(U){var V=v.createElement("div");V.textContent=O("editor.tooltip.disable-editing","Editing is disabled"),_.hoverTooltip.isOpen||_.hoverTooltip.showForRange(_,_.getSelectionRange(),V)}else _.hoverTooltip&&_.hoverTooltip.isOpen&&_.hoverTooltip.hide()});var I=this.textInput.getElement();$?(L.addListener(I,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(L.removeListener(I,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function($){this.textInput.setCopyWithEmptySelection($)},initialValue:!1},cursorStyle:{set:function($){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function($){this.setAutoScrollEditorIntoView($)}},keyboardHandler:{set:function($){this.setKeyboardHandler($)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function($){this.session.setValue($)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function($){this.setSession($)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function($){this.renderer.$gutterLayer.setShowLineNumbers($),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),$&&this.$relativeLineNumbers?D.attach(this):D.detach(this)},initialValue:!0},relativeLineNumbers:{set:function($){this.$showLineNumbers&&$?D.attach(this):D.detach(this)}},placeholder:{set:function($){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var _=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(_&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),v.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!_&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),v.addCssClass(this.container,"ace_hasPlaceholder");var I=v.createElement("div");I.className="ace_placeholder",I.textContent=this.$placeholder||"",this.renderer.placeholderNode=I,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!_&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function($){var _={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(U){U.blur(),U.renderer.scroller.focus()},readOnly:!0},I=function(U){if(U.target==this.renderer.scroller&&U.keyCode===M.enter){U.preventDefault();var V=this.getCursorPosition().row;this.isRowVisible(V)||this.scrollToLine(V,!0,!0),this.focus()}},z;$?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(p.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",O("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",O("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",I.bind(this)),this.commands.addCommand(_),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",O("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",O("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),z||(z=new C(this)),z.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",I.bind(this)),this.commands.removeCommand(_),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),z&&z.removeListener())},initialValue:!1},textInputAriaLabel:{set:function($){this.$textInputAriaLabel=$},initialValue:""},enableMobileMenu:{set:function($){this.$enableMobileMenu=$},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var D={getText:function($,_){return(Math.abs($.selection.lead.row-_)||_+1+(_<9?"·":""))+""},getWidth:function($,_,I){return Math.max(_.toString().length,(I.lastRow+1).toString().length,2)*I.characterWidth},update:function($,_){_.renderer.$loop.schedule(_.renderer.CHANGE_GUTTER)},attach:function($){$.renderer.$gutterLayer.$renderer=this,$.on("changeSelection",this.update),this.update(null,$)},detach:function($){$.renderer.$gutterLayer.$renderer==this&&($.renderer.$gutterLayer.$renderer=null),$.off("changeSelection",this.update),this.update(null,$)}};r.Editor=F}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,r,d){var h=e("../lib/dom"),f=(function(){function v(o,p){this.element=o,this.canvasHeight=p||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return v.prototype.moveContainer=function(o){h.translate(this.element,0,-(o.firstRowScreen*o.lineHeight%this.canvasHeight)-o.offset*this.$offsetCoefficient)},v.prototype.pageChanged=function(o,p){return Math.floor(o.firstRowScreen*o.lineHeight/this.canvasHeight)!==Math.floor(p.firstRowScreen*p.lineHeight/this.canvasHeight)},v.prototype.computeLineTop=function(o,p,i){var a=p.firstRowScreen*p.lineHeight,u=Math.floor(a/this.canvasHeight),g=i.documentToScreenRow(o,0)*p.lineHeight;return g-u*this.canvasHeight},v.prototype.computeLineHeight=function(o,p,i){return p.lineHeight*i.getRowLineCount(o)},v.prototype.getLength=function(){return this.cells.length},v.prototype.get=function(o){return this.cells[o]},v.prototype.shift=function(){this.$cacheCell(this.cells.shift())},v.prototype.pop=function(){this.$cacheCell(this.cells.pop())},v.prototype.push=function(o){if(Array.isArray(o)){this.cells.push.apply(this.cells,o);for(var p=h.createFragment(this.element),i=0;i<o.length;i++)p.appendChild(o[i].element);this.element.appendChild(p)}else this.cells.push(o),this.element.appendChild(o.element)},v.prototype.unshift=function(o){if(Array.isArray(o)){this.cells.unshift.apply(this.cells,o);for(var p=h.createFragment(this.element),i=0;i<o.length;i++)p.appendChild(o[i].element);this.element.firstChild?this.element.insertBefore(p,this.element.firstChild):this.element.appendChild(p)}else this.cells.unshift(o),this.element.insertAdjacentElement("afterbegin",o.element)},v.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},v.prototype.$cacheCell=function(o){o&&(o.element.remove(),this.cellCache.push(o))},v.prototype.createCell=function(o,p,i,a){var u=this.cellCache.pop();if(!u){var g=h.createElement("div");a&&a(g),this.element.appendChild(g),u={element:g,text:"",row:o}}return u.row=o,u},v})();r.Lines=f}),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(e,r,d){var h=e("../lib/dom"),f=e("../lib/oop"),v=e("../lib/lang"),o=e("../lib/event_emitter").EventEmitter,p=e("./lines").Lines,i=e("../config").nls,a=(function(){function g(s){this.$showCursorMarker=null,this.element=h.createElement("div"),this.element.className="ace_layer ace_gutter-layer",s.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new p(this.element),this.$lines.$offsetCoefficient=1}return g.prototype.setSession=function(s){this.session&&this.session.off("change",this.$updateAnnotations),this.session=s,s&&s.on("change",this.$updateAnnotations)},g.prototype.addGutterDecoration=function(s,c){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(s,c)},g.prototype.removeGutterDecoration=function(s,c){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(s,c)},g.prototype.setAnnotations=function(s){this.$annotations=[];for(var c=0;c<s.length;c++){var m=s[c],w=m.row,x=this.$annotations[w];x||(x=this.$annotations[w]={text:[],type:[],displayText:[]});var R=m.text,S=m.text,A=m.type;R=R?v.escapeHTML(R):m.html||"",S=S||m.html||"",x.text.indexOf(R)===-1&&(x.text.push(R),x.type.push(A),x.displayText.push(S));var C=m.className;C?x.className=C:A==="error"?x.className=" ace_error":A==="security"&&!/\bace_error\b/.test(x.className)?x.className=" ace_security":A==="warning"&&!/\bace_(error|security)\b/.test(x.className)?x.className=" ace_warning":A==="info"&&!x.className?x.className=" ace_info":A==="hint"&&!x.className&&(x.className=" ace_hint")}},g.prototype.$updateAnnotations=function(s){if(this.$annotations.length){var c=s.start.row,m=s.end.row-c;if(m!==0)if(s.action=="remove")this.$annotations.splice(c,m+1,null);else{var w=new Array(m+1);w.unshift(c,1),this.$annotations.splice.apply(this.$annotations,w)}}},g.prototype.update=function(s){this.config=s;var c=this.session,m=s.firstRow,w=Math.min(s.lastRow+s.gutterOffset,c.getLength()-1);this.oldLastRow=w,this.config=s,this.$lines.moveContainer(s),this.$updateCursorRow();for(var x=c.getNextFoldLine(m),R=x?x.start.row:1/0,S=null,A=-1,C=m;;){if(C>R&&(C=x.end.row+1,x=c.getNextFoldLine(C,x),R=x?x.start.row:1/0),C>w){for(;this.$lines.getLength()>A+1;)this.$lines.pop();break}S=this.$lines.get(++A),S?S.row=C:(S=this.$lines.createCell(C,s,this.session,u),this.$lines.push(S)),this.$renderCell(S,s,x,C),C++}this._signal("afterRender"),this.$updateGutterWidth(s),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},g.prototype.$updateGutterWidth=function(s){var c=this.session,m=c.gutterRenderer||this.$renderer,w=c.$firstLineNumber,x=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||c.$useWrapMode)&&(x=c.getLength()+w-1);var R=m?m.getWidth(c,x,s):x.toString().length*s.characterWidth,S=this.$padding||this.$computePadding();R+=S.left+S.right,R!==this.gutterWidth&&!isNaN(R)&&(this.gutterWidth=R,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",R))},g.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var s=this.session.selection.getCursor();this.$cursorRow!==s.row&&(this.$cursorRow=s.row)}},g.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var s=this.session.selection.cursor.row;if(this.$cursorRow=s,!(this.$cursorCell&&this.$cursorCell.row==s)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var c=this.$lines.cells;this.$cursorCell=null;for(var m=0;m<c.length;m++){var w=c[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==c[m-1].row)w=c[m-1];else break}w.element.className="ace_gutter-active-line "+w.element.className,this.$cursorCell=w;break}}}}},g.prototype.$updateCursorMarker=function(){if(this.session){var s=this.session;this.$highlightElement||(this.$highlightElement=h.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var c=s.selection.cursor,m=this.config,w=this.$lines,x=m.firstRowScreen*m.lineHeight,R=Math.floor(x/w.canvasHeight),S=s.documentToScreenRow(c)*m.lineHeight,A=S-R*w.canvasHeight;h.setStyle(this.$highlightElement.style,"height",m.lineHeight+"px"),h.setStyle(this.$highlightElement.style,"top",A+"px")}},g.prototype.scrollLines=function(s){var c=this.config;if(this.config=s,this.$updateCursorRow(),this.$lines.pageChanged(c,s))return this.update(s);this.$lines.moveContainer(s);var m=Math.min(s.lastRow+s.gutterOffset,this.session.getLength()-1),w=this.oldLastRow;if(this.oldLastRow=m,!c||w<s.firstRow)return this.update(s);if(m<c.firstRow)return this.update(s);if(c.firstRow<s.firstRow)for(var x=this.session.getFoldedRowCount(c.firstRow,s.firstRow-1);x>0;x--)this.$lines.shift();if(w>m)for(var x=this.session.getFoldedRowCount(m+1,w);x>0;x--)this.$lines.pop();s.firstRow<c.firstRow&&this.$lines.unshift(this.$renderLines(s,s.firstRow,c.firstRow-1)),m>w&&this.$lines.push(this.$renderLines(s,w+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(s)},g.prototype.$renderLines=function(s,c,m){for(var w=[],x=c,R=this.session.getNextFoldLine(x),S=R?R.start.row:1/0;x>S&&(x=R.end.row+1,R=this.session.getNextFoldLine(x,R),S=R?R.start.row:1/0),!(x>m);){var A=this.$lines.createCell(x,s,this.session,u);this.$renderCell(A,s,R,x),w.push(A),x++}return w},g.prototype.$renderCell=function(s,c,m,w){var x=s.element,R=this.session,S=x.childNodes[0],A=x.childNodes[1],C=x.childNodes[2],O=x.childNodes[3],N=C.firstChild,M=R.$firstLineNumber,L=R.$breakpoints,j=R.$decorations,F=R.gutterRenderer||this.$renderer,D=this.$showFoldWidgets&&R.foldWidgets,$=m?m.start.row:Number.MAX_VALUE,_=c.lineHeight+"px",I=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",z=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",U=(F?F.getText(R,w):w+M).toString();if(this.$highlightGutterLine&&(w==this.$cursorRow||m&&w<this.$cursorRow&&w>=$&&this.$cursorRow<=m.end.row)&&(I+="ace_gutter-active-line ",this.$cursorCell!=s&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=s)),L[w]&&(I+=L[w]),j[w]&&(I+=j[w]),this.$annotations[w]&&w!==$&&(I+=this.$annotations[w].className),D){var V=D[w];V==null&&(V=D[w]=R.getFoldWidget(w))}if(V){var K="ace_fold-widget ace_"+V,Z=V=="start"&&w==$&&w<m.end.row;if(Z){K+=" ace_closed";for(var oe="",ee=!1,re=w+1;re<=m.end.row;re++)if(this.$annotations[re]){if(this.$annotations[re].className===" ace_error"){ee=!0,oe=" ace_error_fold";break}this.$annotations[re].className===" ace_security"?(ee=!0,oe=" ace_security_fold"):this.$annotations[re].className===" ace_warning"&&oe!==" ace_security_fold"&&(ee=!0,oe=" ace_warning_fold")}I+=oe}else K+=" ace_open";A.className!=K&&(A.className=K),h.setStyle(A.style,"height",_),h.setStyle(A.style,"display","inline-block"),A.setAttribute("role","button"),A.setAttribute("tabindex","-1");var ce=R.getFoldWidgetRange(w);ce?A.setAttribute("aria-label",i("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[ce.start.row+1,ce.end.row+1])):m?A.setAttribute("aria-label",i("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[m.start.row+1,m.end.row+1])):A.setAttribute("aria-label",i("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[w+1])),Z?(A.setAttribute("aria-expanded","false"),A.setAttribute("title",i("gutter.code-folding.closed.title","Unfold code"))):(A.setAttribute("aria-expanded","true"),A.setAttribute("title",i("gutter.code-folding.open.title","Fold code")))}else A&&(h.setStyle(A.style,"display","none"),A.setAttribute("tabindex","0"),A.removeAttribute("role"),A.removeAttribute("aria-label"));var ie=this.session.$gutterCustomWidgets[w];if(ie?this.$addCustomWidget(w,ie,s):O&&this.$removeCustomWidget(w,s),ee&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",N.className=z,N.className+=oe,h.setStyle(N.style,"height",_),h.setStyle(C.style,"display","block"),h.setStyle(C.style,"height",_);var fe;switch(oe){case" ace_error_fold":fe=i("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security_fold":fe=i("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning_fold":fe=i("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break}C.setAttribute("aria-label",fe),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else if(this.$annotations[w]){C.className="ace_gutter_annotation",N.className=z,this.$useSvgGutterIcons?N.className+=this.$annotations[w].className:x.classList.add(this.$annotations[w].className.replace(" ","")),h.setStyle(N.style,"height",_),h.setStyle(C.style,"display","block"),h.setStyle(C.style,"height",_);var fe;switch(this.$annotations[w].className){case" ace_error":fe=i("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security":fe=i("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning":fe=i("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break;case" ace_info":fe=i("gutter.annotation.aria-label.info","Info, read annotations row $0",[U]);break;case" ace_hint":fe=i("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[U]);break}C.setAttribute("aria-label",fe),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else h.setStyle(C.style,"display","none"),C.removeAttribute("aria-label"),C.removeAttribute("role"),C.setAttribute("tabindex","0");return U!==S.data&&(S.data=U),x.className!=I&&(x.className=I),h.setStyle(s.element.style,"height",this.$lines.computeLineHeight(w,c,R)+"px"),h.setStyle(s.element.style,"top",this.$lines.computeLineTop(w,c,R)+"px"),s.text=U,C.style.display==="none"&&A.style.display==="none"&&!ie?s.element.setAttribute("aria-hidden",!0):s.element.setAttribute("aria-hidden",!1),s},g.prototype.setHighlightGutterLine=function(s){this.$highlightGutterLine=s,!s&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},g.prototype.setShowLineNumbers=function(s){this.$renderer=!s&&{getWidth:function(){return 0},getText:function(){return""}}},g.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},g.prototype.setShowFoldWidgets=function(s){s?h.addCssClass(this.element,"ace_folding-enabled"):h.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=s,this.$padding=null},g.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},g.prototype.$hideFoldWidget=function(s,c){var m=c||this.$getGutterCell(s);if(m&&m.element){var w=m.element.childNodes[1];w&&h.setStyle(w.style,"display","none")}},g.prototype.$showFoldWidget=function(s,c){var m=c||this.$getGutterCell(s);if(m&&m.element){var w=m.element.childNodes[1];w&&this.session.foldWidgets&&this.session.foldWidgets[m.row]&&h.setStyle(w.style,"display","inline-block")}},g.prototype.$getGutterCell=function(s){var c=this.$lines.cells,m=0,w=c.length-1;if(!(s<c[0].row||s>c[w].row)){for(;m<=w;){var x=Math.floor((m+w)/2),R=c[x];if(R.row>s)w=x-1;else if(R.row<s)m=x+1;else return R}return R}},g.prototype.$addCustomWidget=function(s,c,m){var w=c.className,x=c.label,R=c.title,S=c.callbacks;this.session.$gutterCustomWidgets[s]={className:w,label:x,title:R,callbacks:S},this.$hideFoldWidget(s,m);var A=m||this.$getGutterCell(s);if(A&&A.element){var C=A.element.querySelector(".ace_custom-widget");C&&C.remove(),C=h.createElement("span"),C.className="ace_custom-widget ".concat(w),C.setAttribute("tabindex","-1"),C.setAttribute("role","button"),C.setAttribute("aria-label",x),C.setAttribute("title",R),h.setStyle(C.style,"display","inline-block"),h.setStyle(C.style,"height","inherit"),S&&S.onClick&&C.addEventListener("click",function(O){S.onClick(O,s),O.stopPropagation()}),A.element.appendChild(C)}},g.prototype.$removeCustomWidget=function(s,c){delete this.session.$gutterCustomWidgets[s],this.$showFoldWidget(s,c);var m=c||this.$getGutterCell(s);if(m&&m.element){var w=m.element.querySelector(".ace_custom-widget");w&&m.element.removeChild(w)}},g.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var s=h.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(s.borderLeftWidth)||0)+(parseInt(s.paddingLeft)||0)+1,this.$padding.right=(parseInt(s.borderRightWidth)||0)+(parseInt(s.paddingRight)||0),this.$padding},g.prototype.getRegion=function(s){var c=this.$padding||this.$computePadding(),m=this.element.getBoundingClientRect();if(s.x<c.left+m.left)return"markers";if(this.$showFoldWidgets&&s.x>m.right-c.right)return"foldWidgets"},g})();a.prototype.$fixedWidth=!1,a.prototype.$highlightGutterLine=!0,a.prototype.$renderer=void 0,a.prototype.$showLineNumbers=!0,a.prototype.$showFoldWidgets=!0,f.implement(a.prototype,o);function u(g){var s=document.createTextNode("");g.appendChild(s);var c=h.createElement("span");g.appendChild(c);var m=h.createElement("span");g.appendChild(m);var w=h.createElement("span");return m.appendChild(w),g}r.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,r,d){var h=e("../range").Range,f=e("../lib/dom"),v=(function(){function p(i){this.element=f.createElement("div"),this.element.className="ace_layer ace_marker-layer",i.appendChild(this.element)}return p.prototype.setPadding=function(i){this.$padding=i},p.prototype.setSession=function(i){this.session=i},p.prototype.setMarkers=function(i){this.markers=i},p.prototype.elt=function(i,a){var u=this.i!=-1&&this.element.childNodes[this.i];u?this.i++:(u=document.createElement("div"),this.element.appendChild(u),this.i=-1),u.style.cssText=a,u.className=i},p.prototype.update=function(i){if(i){this.config=i,this.i=0;var a;for(var u in this.markers){var g=this.markers[u];if(!g.range){g.update(a,this,this.session,i);continue}var s=g.range.clipRows(i.firstRow,i.lastRow);if(!s.isEmpty())if(s=s.toScreenRange(this.session),g.renderer){var c=this.$getTop(s.start.row,i),m=this.$padding+s.start.column*i.characterWidth;g.renderer(a,s,m,c,i)}else g.type=="fullLine"?this.drawFullLineMarker(a,s,g.clazz,i):g.type=="screenLine"?this.drawScreenLineMarker(a,s,g.clazz,i):s.isMultiLine()?g.type=="text"?this.drawTextMarker(a,s,g.clazz,i):this.drawMultiLineMarker(a,s,g.clazz,i):this.drawSingleLineMarker(a,s,g.clazz+" ace_start ace_br15",i)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},p.prototype.$getTop=function(i,a){return(i-a.firstRowScreen)*a.lineHeight},p.prototype.drawTextMarker=function(i,a,u,g,s){for(var c=this.session,m=a.start.row,w=a.end.row,x=m,R=0,S=0,A=c.getScreenLastRowColumn(x),C=new h(x,a.start.column,x,S);x<=w;x++)C.start.row=C.end.row=x,C.start.column=x==m?a.start.column:c.getRowWrapIndent(x),C.end.column=A,R=S,S=A,A=x+1<w?c.getScreenLastRowColumn(x+1):x==w?0:a.end.column,this.drawSingleLineMarker(i,C,u+(x==m?" ace_start":"")+" ace_br"+o(x==m||x==m+1&&a.start.column,R<S,S>A,x==w),g,x==w?0:1,s)},p.prototype.drawMultiLineMarker=function(i,a,u,g,s){var c=this.$padding,m=g.lineHeight,w=this.$getTop(a.start.row,g),x=c+a.start.column*g.characterWidth;if(s=s||"",this.session.$bidiHandler.isBidiRow(a.start.row)){var R=a.clone();R.end.row=R.start.row,R.end.column=this.session.getLine(R.start.row).length,this.drawBidiSingleLineMarker(i,R,u+" ace_br1 ace_start",g,null,s)}else this.elt(u+" ace_br1 ace_start","height:"+m+"px;right:"+c+"px;top:"+w+"px;left:"+x+"px;"+(s||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var R=a.clone();R.start.row=R.end.row,R.start.column=0,this.drawBidiSingleLineMarker(i,R,u+" ace_br12",g,null,s)}else{w=this.$getTop(a.end.row,g);var S=a.end.column*g.characterWidth;this.elt(u+" ace_br12","height:"+m+"px;width:"+S+"px;top:"+w+"px;left:"+c+"px;"+(s||""))}if(m=(a.end.row-a.start.row-1)*g.lineHeight,!(m<=0)){w=this.$getTop(a.start.row+1,g);var A=(a.start.column?1:0)|(a.end.column?0:8);this.elt(u+(A?" ace_br"+A:""),"height:"+m+"px;right:"+c+"px;top:"+w+"px;left:"+c+"px;"+(s||""))}},p.prototype.drawSingleLineMarker=function(i,a,u,g,s,c){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(i,a,u,g,s,c);var m=g.lineHeight,w=(a.end.column+(s||0)-a.start.column)*g.characterWidth,x=this.$getTop(a.start.row,g),R=this.$padding+a.start.column*g.characterWidth;this.elt(u,"height:"+m+"px;width:"+w+"px;top:"+x+"px;left:"+R+"px;"+(c||""))},p.prototype.drawBidiSingleLineMarker=function(i,a,u,g,s,c){var m=g.lineHeight,w=this.$getTop(a.start.row,g),x=this.$padding,R=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);R.forEach(function(S){this.elt(u,"height:"+m+"px;width:"+(S.width+(s||0))+"px;top:"+w+"px;left:"+(x+S.left)+"px;"+(c||""))},this)},p.prototype.drawFullLineMarker=function(i,a,u,g,s){var c=this.$getTop(a.start.row,g),m=g.lineHeight;a.start.row!=a.end.row&&(m+=this.$getTop(a.end.row,g)-c),this.elt(u,"height:"+m+"px;top:"+c+"px;left:0;right:0;"+(s||""))},p.prototype.drawScreenLineMarker=function(i,a,u,g,s){var c=this.$getTop(a.start.row,g),m=g.lineHeight;this.elt(u,"height:"+m+"px;top:"+c+"px;left:0;right:0;"+(s||""))},p})();v.prototype.$padding=0;function o(p,i,a,u){return(p?1:0)|(i?2:0)|(a?4:0)|(u?8:0)}r.Marker=v}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,r,d){var h=new Set(["text","rparen","lparen"]);r.isTextToken=function(f){return h.has(f)}}),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(e,r,d){var h=e("../lib/oop"),f=e("../lib/dom"),v=e("../lib/lang"),o=e("./lines").Lines,p=e("../lib/event_emitter").EventEmitter,i=e("../config").nls,a=e("./text_util").isTextToken,u=(function(){function g(s){this.dom=f,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",s.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new o(this.element)}return g.prototype.$updateEolChar=function(){var s=this.session.doc,c=s.getNewLineCharacter()==`
|
|
219
|
+
`&&s.getNewLineMode()!="windows",m=c?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=m)return this.EOL_CHAR=m,!0},g.prototype.setPadding=function(s){this.$padding=s,this.element.style.margin="0 "+s+"px"},g.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},g.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},g.prototype.$setFontMetrics=function(s){this.$fontMetrics=s,this.$fontMetrics.on("changeCharacterSize",(function(c){this._signal("changeCharacterSize",c)}).bind(this)),this.$pollSizeChanges()},g.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},g.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},g.prototype.setSession=function(s){this.session=s,s&&this.$computeTabString()},g.prototype.setShowInvisibles=function(s){return this.showInvisibles==s?!1:(this.showInvisibles=s,typeof s=="string"?(this.showSpaces=/tab/i.test(s),this.showTabs=/space/i.test(s),this.showEOL=/eol/i.test(s)):this.showSpaces=this.showTabs=this.showEOL=s,this.$computeTabString(),!0)},g.prototype.setDisplayIndentGuides=function(s){return this.displayIndentGuides==s?!1:(this.displayIndentGuides=s,this.$computeTabString(),!0)},g.prototype.setHighlightIndentGuides=function(s){return this.$highlightIndentGuides===s?!1:(this.$highlightIndentGuides=s,s)},g.prototype.$computeTabString=function(){var s=this.session.getTabSize();this.tabSize=s;for(var c=this.$tabStrings=[0],m=1;m<s+1;m++)if(this.showTabs){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_tab",w.textContent=v.stringRepeat(this.TAB_CHAR,m),c.push(w)}else c.push(this.dom.createTextNode(v.stringRepeat(" ",m),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var x="ace_indent-guide",R=this.showSpaces?" ace_invisible ace_invisible_space":"",S=this.showSpaces?v.stringRepeat(this.SPACE_CHAR,this.tabSize):v.stringRepeat(" ",this.tabSize),A=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?v.stringRepeat(this.TAB_CHAR,this.tabSize):S,w=this.dom.createElement("span");w.className=x+R,w.textContent=S,this.$tabStrings[" "]=w;var w=this.dom.createElement("span");w.className=x+A,w.textContent=C,this.$tabStrings[" "]=w}},g.prototype.updateLines=function(s,c,m){if(this.config.lastRow!=s.lastRow||this.config.firstRow!=s.firstRow)return this.update(s);this.config=s;for(var w=Math.max(c,s.firstRow),x=Math.min(m,s.lastRow),R=this.element.childNodes,S=0,A=s.firstRow;A<w;A++){var C=this.session.getFoldLine(A);if(C)if(C.containsRow(w)){w=C.start.row;break}else A=C.end.row;S++}for(var O=!1,A=w,C=this.session.getNextFoldLine(A),N=C?C.start.row:1/0;A>N&&(A=C.end.row+1,C=this.session.getNextFoldLine(A,C),N=C?C.start.row:1/0),!(A>x);){var M=R[S++];if(M){this.dom.removeChildren(M),this.$renderLine(M,A,A==N?C:!1),O&&(M.style.top=this.$lines.computeLineTop(A,s,this.session)+"px");var L=s.lineHeight*this.session.getRowLength(A)+"px";M.style.height!=L&&(O=!0,M.style.height=L)}A++}if(O)for(;S<this.$lines.cells.length;){var j=this.$lines.cells[S++];j.element.style.top=this.$lines.computeLineTop(j.row,s,this.session)+"px"}},g.prototype.scrollLines=function(s){var c=this.config;if(this.config=s,this.$lines.pageChanged(c,s))return this.update(s);this.$lines.moveContainer(s);var m=s.lastRow,w=c?c.lastRow:-1;if(!c||w<s.firstRow)return this.update(s);if(m<c.firstRow)return this.update(s);if(!c||c.lastRow<s.firstRow)return this.update(s);if(s.lastRow<c.firstRow)return this.update(s);if(c.firstRow<s.firstRow)for(var x=this.session.getFoldedRowCount(c.firstRow,s.firstRow-1);x>0;x--)this.$lines.shift();if(c.lastRow>s.lastRow)for(var x=this.session.getFoldedRowCount(s.lastRow+1,c.lastRow);x>0;x--)this.$lines.pop();s.firstRow<c.firstRow&&this.$lines.unshift(this.$renderLinesFragment(s,s.firstRow,c.firstRow-1)),s.lastRow>c.lastRow&&this.$lines.push(this.$renderLinesFragment(s,c.lastRow+1,s.lastRow)),this.$highlightIndentGuide()},g.prototype.$renderLinesFragment=function(s,c,m){for(var w=[],x=c,R=this.session.getNextFoldLine(x),S=R?R.start.row:1/0;x>S&&(x=R.end.row+1,R=this.session.getNextFoldLine(x,R),S=R?R.start.row:1/0),!(x>m);){var A=this.$lines.createCell(x,s,this.session),C=A.element;this.dom.removeChildren(C),f.setStyle(C.style,"height",this.$lines.computeLineHeight(x,s,this.session)+"px"),f.setStyle(C.style,"top",this.$lines.computeLineTop(x,s,this.session)+"px"),this.$renderLine(C,x,x==S?R:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",w.push(A),x++}return w},g.prototype.update=function(s){this.$lines.moveContainer(s),this.config=s;for(var c=s.firstRow,m=s.lastRow,w=this.$lines;w.getLength();)w.pop();w.push(this.$renderLinesFragment(s,c,m))},g.prototype.$renderToken=function(s,c,m,w){for(var x=this,R=/(\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,S=this.dom.createFragment(this.element),A,C=0;A=R.exec(w);){var O=A[1],N=A[2],M=A[3],L=A[4],j=A[5];if(!(!x.showSpaces&&N)){var F=C!=A.index?w.slice(C,A.index):"";if(C=A.index+A[0].length,F&&S.appendChild(this.dom.createTextNode(F,this.element)),O){var D=x.session.getScreenTabSize(c+A.index),$=x.$tabStrings[D].cloneNode(!0);$.charCount=1,S.appendChild($),c+=D-1}else if(N)if(x.showSpaces){var _=this.dom.createElement("span");_.className="ace_invisible ace_invisible_space",_.textContent=v.stringRepeat(x.SPACE_CHAR,N.length),S.appendChild(_)}else S.appendChild(this.dom.createTextNode(N,this.element));else if(M){var _=this.dom.createElement("span");_.className="ace_invisible ace_invisible_space ace_invalid",_.textContent=v.stringRepeat(x.SPACE_CHAR,M.length),S.appendChild(_)}else if(L){c+=1;var _=this.dom.createElement("span");_.style.width=x.config.characterWidth*2+"px",_.className=x.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",_.textContent=x.showSpaces?x.SPACE_CHAR:L,S.appendChild(_)}else if(j){c+=1;var _=this.dom.createElement("span");_.style.width=x.config.characterWidth*2+"px",_.className="ace_cjk",_.textContent=j,S.appendChild(_)}}}if(S.appendChild(this.dom.createTextNode(C?w.slice(C):w,this.element)),a(m.type))s.appendChild(S);else{var I="ace_"+m.type.replace(/\./g," ace_"),_=this.dom.createElement("span");m.type=="fold"&&(_.style.width=m.value.length*this.config.characterWidth+"px",_.setAttribute("title",i("inline-fold.closed.title","Unfold code"))),_.className=I,_.appendChild(S),s.appendChild(_)}return c+w.length},g.prototype.renderIndentGuide=function(s,c,m){var w=c.search(this.$indentGuideRe);if(w<=0||w>=m)return c;if(c[0]==" "){w-=w%this.tabSize;for(var x=w/this.tabSize,R=0;R<x;R++)s.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),c.substr(w)}else if(c[0]==" "){for(var R=0;R<w;R++){var S=this.$tabStrings[" "].cloneNode(!0);S.charCount=1,s.appendChild(S)}return this.$highlightIndentGuide(),c.substr(w)}return this.$highlightIndentGuide(),c},g.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var s=this.session.doc.$lines;if(s){var c=this.session.selection.getCursor(),m=/^\s*/.exec(this.session.doc.getLine(c.row))[0].length,w=Math.floor(m/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:w,start:c.row};var x=this.session.$bracketHighlight;if(x){for(var R=this.session.$bracketHighlight.ranges,S=0;S<R.length;S++)if(c.row!==R[S].start.row){this.$highlightIndentGuideMarker.end=R[S].start.row+1,c.row>R[S].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&s[c.row]!==""&&c.column===s[c.row].length){this.$highlightIndentGuideMarker.dir=1;for(var S=c.row+1;S<s.length;S++){var A=s[S],C=/^\s*/.exec(A)[0].length;if(A!==""&&(this.$highlightIndentGuideMarker.end=S,C<=m))break}}this.$renderHighlightIndentGuide()}}},g.prototype.$clearActiveIndentGuide=function(){for(var s=this.element.querySelectorAll(".ace_indent-guide-active"),c=0;c<s.length;c++)s[c].classList.remove("ace_indent-guide-active")},g.prototype.$setIndentGuideActive=function(s,c){var m=this.session.doc.getLine(s.row);if(m!==""){var w=s.element;if(s.element.classList&&s.element.classList.contains("ace_line_group"))if(s.element.childNodes.length>0)w=s.element.childNodes[0];else return;var x=w.childNodes;if(x){var R=x[c-1];R&&R.classList&&R.classList.contains("ace_indent-guide")&&R.classList.add("ace_indent-guide-active")}}},g.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var s=this.$lines.cells;this.$clearActiveIndentGuide();var c=this.$highlightIndentGuideMarker.indentLevel;if(c!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var m=0;m<s.length;m++){var w=s[m];if(this.$highlightIndentGuideMarker.end&&w.row>=this.$highlightIndentGuideMarker.start+1){if(w.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,c)}}else for(var m=s.length-1;m>=0;m--){var w=s[m];if(this.$highlightIndentGuideMarker.end&&w.row<this.$highlightIndentGuideMarker.start){if(w.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,c)}}}},g.prototype.$createLineElement=function(s){var c=this.dom.createElement("div");return c.className="ace_line",c.style.height=this.config.lineHeight+"px",c},g.prototype.$renderWrappedLine=function(s,c,m){var w=0,x=0,R=m[0],S=0,A=this.$createLineElement();s.appendChild(A);for(var C=0;C<c.length;C++){var O=c[C],N=O.value;if(C==0&&this.displayIndentGuides){if(w=N.length,N=this.renderIndentGuide(A,N,R),!N)continue;w-=N.length}if(w+N.length<R)S=this.$renderToken(A,S,O,N),w+=N.length;else{for(;w+N.length>=R;){S=this.$renderToken(A,S,O,N.substring(0,R-w)),N=N.substring(R-w),w=R,A=this.$createLineElement(),s.appendChild(A);var M=this.dom.createTextNode(v.stringRepeat(" ",m.indent),this.element);M.charCount=0,A.appendChild(M),x++,S=0,R=m[x]||Number.MAX_VALUE}N.length!=0&&(w+=N.length,S=this.$renderToken(A,S,O,N))}}m[m.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(A,S,null,"",!0)},g.prototype.$renderSimpleLine=function(s,c){for(var m=0,w=0;w<c.length;w++){var x=c[w],R=x.value;if(!(w==0&&this.displayIndentGuides&&(R=this.renderIndentGuide(s,R),!R))){if(m+R.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(s,m,x,R);m=this.$renderToken(s,m,x,R)}}},g.prototype.$renderOverflowMessage=function(s,c,m,w,x){m&&this.$renderToken(s,c,m,w.slice(0,this.MAX_LINE_LENGTH-c));var R=this.dom.createElement("span");R.className="ace_inline_button ace_keyword ace_toggle_wrap",R.textContent=x?"<hide>":"<click to see more...>",s.appendChild(R)},g.prototype.$renderLine=function(s,c,m){if(!m&&m!=!1&&(m=this.session.getFoldLine(c)),m)var w=this.$getFoldLineTokens(c,m);else var w=this.session.getTokens(c);var x=s;if(w.length){var R=this.session.getRowSplitData(c);if(R&&R.length){this.$renderWrappedLine(s,w,R);var x=s.lastChild}else{var x=s;this.$useLineGroups()&&(x=this.$createLineElement(),s.appendChild(x)),this.$renderSimpleLine(x,w)}}else this.$useLineGroups()&&(x=this.$createLineElement(),s.appendChild(x));if(this.showEOL&&x){m&&(c=m.end.row);var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_eol",S.textContent=c==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,x.appendChild(S)}},g.prototype.$getFoldLineTokens=function(s,c){var m=this.session,w=[];function x(S,A,C){for(var O=0,N=0;N+S[O].value.length<A;)if(N+=S[O].value.length,O++,O==S.length)return;if(N!=A){var M=S[O].value.substring(A-N);M.length>C-A&&(M=M.substring(0,C-A)),w.push({type:S[O].type,value:M}),N=A+M.length,O+=1}for(;N<C&&O<S.length;){var M=S[O].value;M.length+N>C?w.push({type:S[O].type,value:M.substring(0,C-N)}):w.push(S[O]),N+=M.length,O+=1}}var R=m.getTokens(s);return c.walk(function(S,A,C,O,N){S!=null?w.push({type:"fold",value:S}):(N&&(R=m.getTokens(A)),R.length&&x(R,O,C))},c.end.row,this.session.getLine(c.end.row).length),w},g.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},g})();u.prototype.EOF_CHAR="¶",u.prototype.EOL_CHAR_LF="¬",u.prototype.EOL_CHAR_CRLF="¤",u.prototype.EOL_CHAR=u.prototype.EOL_CHAR_LF,u.prototype.TAB_CHAR="—",u.prototype.SPACE_CHAR="·",u.prototype.$padding=0,u.prototype.MAX_LINE_LENGTH=1e4,u.prototype.showInvisibles=!1,u.prototype.showSpaces=!1,u.prototype.showTabs=!1,u.prototype.showEOL=!1,u.prototype.displayIndentGuides=!0,u.prototype.$highlightIndentGuides=!0,u.prototype.$tabStrings=[],u.prototype.destroy={},u.prototype.onChangeTabSize=u.prototype.$computeTabString,h.implement(u.prototype,p),r.Text=u}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,r,d){var h=e("../lib/dom"),f=(function(){function v(o){this.element=h.createElement("div"),this.element.className="ace_layer ace_cursor-layer",o.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 v.prototype.$updateOpacity=function(o){for(var p=this.cursors,i=p.length;i--;)h.setStyle(p[i].style,"opacity",o?"":"0")},v.prototype.$startCssAnimation=function(){for(var o=this.cursors,p=o.length;p--;)o[p].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&h.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},v.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,h.removeCssClass(this.element,"ace_animate-blinking")},v.prototype.setPadding=function(o){this.$padding=o},v.prototype.setSession=function(o){this.session=o},v.prototype.setBlinking=function(o){o!=this.isBlinking&&(this.isBlinking=o,this.restartTimer())},v.prototype.setBlinkInterval=function(o){o!=this.blinkInterval&&(this.blinkInterval=o,this.restartTimer())},v.prototype.setSmoothBlinking=function(o){o!=this.smoothBlinking&&(this.smoothBlinking=o,h.setCssClass(this.element,"ace_smooth-blinking",o),this.$updateCursors(!0),this.restartTimer())},v.prototype.addCursor=function(){var o=h.createElement("div");return o.className="ace_cursor",this.element.appendChild(o),this.cursors.push(o),o},v.prototype.removeCursor=function(){if(this.cursors.length>1){var o=this.cursors.pop();return o.parentNode.removeChild(o),o}},v.prototype.hideCursor=function(){this.isVisible=!1,h.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},v.prototype.showCursor=function(){this.isVisible=!0,h.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},v.prototype.restartTimer=function(){var o=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,h.removeCssClass(this.element,"ace_smooth-blinking")),o(!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 p=(function(){this.timeoutId=setTimeout(function(){o(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){o(!0),p()},this.blinkInterval),p()}},v.prototype.getPixelPosition=function(o,p){if(!this.config||!this.session)return{left:0,top:0};o||(o=this.session.selection.getCursor());var i=this.session.documentToScreenPosition(o),a=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,o.row)?this.session.$bidiHandler.getPosLeft(i.column):i.column*this.config.characterWidth),u=(i.row-(p?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:a,top:u}},v.prototype.isCursorInView=function(o,p){return o.top>=0&&o.top<p.maxHeight},v.prototype.update=function(o){this.config=o;var p=this.session.$selectionMarkers,i=0,a=0;(p===void 0||p.length===0)&&(p=[{cursor:null}]);for(var i=0,u=p.length;i<u;i++){var g=this.getPixelPosition(p[i].cursor,!0);if(!((g.top>o.height+o.offset||g.top<0)&&i>1)){var s=this.cursors[a++]||this.addCursor(),c=s.style;this.drawCursor?this.drawCursor(s,g,o,p[i],this.session):this.isCursorInView(g,o)?(h.setStyle(c,"display","block"),h.translate(s,g.left,g.top),h.setStyle(c,"width",Math.round(o.characterWidth)+"px"),h.setStyle(c,"height",o.lineHeight+"px")):h.setStyle(c,"display","none")}}for(;this.cursors.length>a;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=g,this.restartTimer()},v.prototype.$setOverwrite=function(o){o!=this.overwrite&&(this.overwrite=o,o?h.addCssClass(this.element,"ace_overwrite-cursors"):h.removeCssClass(this.element,"ace_overwrite-cursors"))},v.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},v})();f.prototype.$padding=0,f.prototype.drawCursor=null,r.Cursor=f}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,d){var h=this&&this.__extends||(function(){var s=function(c,m){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var R in x)Object.prototype.hasOwnProperty.call(x,R)&&(w[R]=x[R])},s(c,m)};return function(c,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");s(c,m);function w(){this.constructor=c}c.prototype=m===null?Object.create(m):(w.prototype=m.prototype,new w)}})(),f=e("./lib/oop"),v=e("./lib/dom"),o=e("./lib/event"),p=e("./lib/event_emitter").EventEmitter,i=32768,a=(function(){function s(c,m){this.element=v.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+m,this.element.tabIndex=-1,this.inner=v.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),c.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)}return s.prototype.setVisible=function(c){this.element.style.display=c?"":"none",this.isVisible=c,this.coeff=1},s})();f.implement(a.prototype,p);var u=(function(s){h(c,s);function c(m,w){var x=s.call(this,m,"-v")||this;return x.scrollTop=0,x.scrollHeight=0,w.$scrollbarWidth=x.width=v.scrollbarWidth(m.ownerDocument),x.inner.style.width=x.element.style.width=(x.width||15)+5+"px",x.$minWidth=0,x}return c.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},c.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},c.prototype.setHeight=function(m){this.element.style.height=m+"px"},c.prototype.setScrollHeight=function(m){this.scrollHeight=m,m>i?(this.coeff=i/m,m=i):this.coeff!=1&&(this.coeff=1),this.inner.style.height=m+"px"},c.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},c})(a);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var g=(function(s){h(c,s);function c(m,w){var x=s.call(this,m,"-h")||this;return x.scrollLeft=0,x.height=w.$scrollbarWidth,x.inner.style.height=x.element.style.height=(x.height||15)+5+"px",x}return c.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},c.prototype.getHeight=function(){return this.isVisible?this.height:0},c.prototype.setWidth=function(m){this.element.style.width=m+"px"},c.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},c.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},c.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},c})(a);r.ScrollBar=u,r.ScrollBarV=u,r.ScrollBarH=g,r.VScrollBar=u,r.HScrollBar=g}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,d){var h=this&&this.__extends||(function(){var g=function(s,c){return g=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])},g(s,c)};return function(s,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");g(s,c);function m(){this.constructor=s}s.prototype=c===null?Object.create(c):(m.prototype=c.prototype,new m)}})(),f=e("./lib/oop"),v=e("./lib/dom"),o=e("./lib/event"),p=e("./lib/event_emitter").EventEmitter;v.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
|
|
220
|
+
position: absolute;
|
|
221
|
+
background: rgba(128, 128, 128, 0.6);
|
|
222
|
+
-moz-box-sizing: border-box;
|
|
223
|
+
box-sizing: border-box;
|
|
224
|
+
border: 1px solid #bbb;
|
|
225
|
+
border-radius: 2px;
|
|
226
|
+
z-index: 8;
|
|
227
|
+
}
|
|
228
|
+
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
|
|
229
|
+
position: absolute;
|
|
230
|
+
z-index: 6;
|
|
231
|
+
background: none;
|
|
232
|
+
overflow: hidden!important;
|
|
233
|
+
}
|
|
234
|
+
.ace_editor>.ace_sb-v {
|
|
235
|
+
z-index: 6;
|
|
236
|
+
right: 0;
|
|
237
|
+
top: 0;
|
|
238
|
+
width: 12px;
|
|
239
|
+
}
|
|
240
|
+
.ace_editor>.ace_sb-v div {
|
|
241
|
+
z-index: 8;
|
|
242
|
+
right: 0;
|
|
243
|
+
width: 100%;
|
|
244
|
+
}
|
|
245
|
+
.ace_editor>.ace_sb-h {
|
|
246
|
+
bottom: 0;
|
|
247
|
+
left: 0;
|
|
248
|
+
height: 12px;
|
|
249
|
+
}
|
|
250
|
+
.ace_editor>.ace_sb-h div {
|
|
251
|
+
bottom: 0;
|
|
252
|
+
height: 100%;
|
|
253
|
+
}
|
|
254
|
+
.ace_editor>.ace_sb_grabbed {
|
|
255
|
+
z-index: 8;
|
|
256
|
+
background: #000;
|
|
257
|
+
}`,"ace_scrollbar.css",!1);var i=(function(){function g(s,c){this.element=v.createElement("div"),this.element.className="ace_sb"+c,this.inner=v.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,s.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return g.prototype.setVisible=function(s){this.element.style.display=s?"":"none",this.isVisible=s,this.coeff=1},g})();f.implement(i.prototype,p);var a=(function(g){h(s,g);function s(c,m){var w=g.call(this,c,"-v")||this;return w.scrollTop=0,w.scrollHeight=0,w.parent=c,w.width=w.VScrollWidth,w.renderer=m,w.inner.style.width=w.element.style.width=(w.width||15)+"px",w.$minWidth=0,w}return s.prototype.onMouseDown=function(c,m){if(c==="mousedown"&&!(o.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var w=this,x=m.clientY,R=function(L){x=L.clientY},S=function(){clearInterval(N)},A=m.clientY,C=this.thumbTop,O=function(){if(x!==void 0){var L=w.scrollTopFromThumbTop(C+x-A);L!==w.scrollTop&&w._emit("scroll",{data:L})}};o.capture(this.inner,R,S);var N=setInterval(O,20);return o.preventDefault(m)}var M=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(M)}),o.preventDefault(m)}},s.prototype.getHeight=function(){return this.height},s.prototype.scrollTopFromThumbTop=function(c){var m=c*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return m=m>>0,m<0?m=0:m>this.pageHeight-this.viewHeight&&(m=this.pageHeight-this.viewHeight),m},s.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},s.prototype.setHeight=function(c){this.height=Math.max(0,c),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},s.prototype.setScrollHeight=function(c,m){this.pageHeight===c&&!m||(this.pageHeight=c,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},s.prototype.setScrollTop=function(c){this.scrollTop=c,c<0&&(c=0),this.thumbTop=c*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},s})(i);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var u=(function(g){h(s,g);function s(c,m){var w=g.call(this,c,"-h")||this;return w.scrollLeft=0,w.scrollWidth=0,w.height=w.HScrollHeight,w.inner.style.height=w.element.style.height=(w.height||12)+"px",w.renderer=m,w}return s.prototype.onMouseDown=function(c,m){if(c==="mousedown"&&!(o.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var w=this,x=m.clientX,R=function(L){x=L.clientX},S=function(){clearInterval(N)},A=m.clientX,C=this.thumbLeft,O=function(){if(x!==void 0){var L=w.scrollLeftFromThumbLeft(C+x-A);L!==w.scrollLeft&&w._emit("scroll",{data:L})}};o.capture(this.inner,R,S);var N=setInterval(O,20);return o.preventDefault(m)}var M=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(M)}),o.preventDefault(m)}},s.prototype.getHeight=function(){return this.isVisible?this.height:0},s.prototype.scrollLeftFromThumbLeft=function(c){var m=c*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return m=m>>0,m<0?m=0:m>this.pageWidth-this.viewWidth&&(m=this.pageWidth-this.viewWidth),m},s.prototype.setWidth=function(c){this.width=Math.max(0,c),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},s.prototype.setScrollWidth=function(c,m){this.pageWidth===c&&!m||(this.pageWidth=c,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},s.prototype.setScrollLeft=function(c){this.scrollLeft=c,c<0&&(c=0),this.thumbLeft=c*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},s})(i);u.prototype.setInnerWidth=u.prototype.setScrollWidth,r.ScrollBar=a,r.ScrollBarV=a,r.ScrollBarH=u,r.VScrollBar=a,r.HScrollBar=u}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,r,d){var h=e("./lib/event"),f=(function(){function v(o,p){this.onRender=o,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=p||window;var i=this;this._flush=function(a){i.pending=!1;var u=i.changes;if(u&&(h.blockIdle(100),i.changes=0,i.onRender(u)),i.changes){if(i.$recursionLimit--<0)return;i.schedule()}else i.$recursionLimit=2}}return v.prototype.schedule=function(o){this.changes=this.changes|o,this.changes&&!this.pending&&(h.nextFrame(this._flush),this.pending=!0)},v.prototype.clear=function(o){var p=this.changes;return this.changes=0,p},v})();r.RenderLoop=f}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(e,r,d){var h=e("../lib/oop"),f=e("../lib/dom"),v=e("../lib/lang"),o=e("../lib/event"),p=e("../lib/useragent"),i=e("../lib/event_emitter").EventEmitter,a=512,u=typeof ResizeObserver=="function",g=200,s=(function(){function c(m){this.el=f.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=f.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=f.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),m.appendChild(this.el),this.$measureNode.textContent=v.stringRepeat("X",a),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()}return c.prototype.$setMeasureNodeStyles=function(m,w){m.width=m.height="auto",m.left=m.top="0px",m.visibility="hidden",m.position="absolute",m.whiteSpace="pre",p.isIE<8?m["font-family"]="inherit":m.font="inherit",m.overflow=w?"hidden":"visible"},c.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})}},c.prototype.$addObserver=function(){var m=this;this.$observer=new window.ResizeObserver(function(w){m.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},c.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var m=this;return this.$pollSizeChangesTimer=o.onIdle(function w(){m.checkForSizeChanges(),o.onIdle(w,500)},500)},c.prototype.setPolling=function(m){m?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},c.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},c.prototype.$measureCharWidth=function(m){this.$main.textContent=v.stringRepeat(m,a);var w=this.$main.getBoundingClientRect();return w.width/a},c.prototype.getCharacterWidth=function(m){var w=this.charSizes[m];return w===void 0&&(w=this.charSizes[m]=this.$measureCharWidth(m)/this.$characterSize.width),w},c.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},c.prototype.$getZoom=function(m){return!m||!m.parentElement?1:(Number(window.getComputedStyle(m).zoom)||1)*this.$getZoom(m.parentElement)},c.prototype.$initTransformMeasureNodes=function(){var m=function(w,x){return["div",{style:"position: absolute;top:"+w+"px;left:"+x+"px;"}]};this.els=f.buildDom([m(0,0),m(g,0),m(0,g),m(g,g)],this.el)},c.prototype.transformCoordinates=function(m,w){if(m){var x=this.$getZoom(this.el);m=C(1/x,m)}function R(K,Z,oe){var ee=K[1]*Z[0]-K[0]*Z[1];return[(-Z[1]*oe[0]+Z[0]*oe[1])/ee,(+K[1]*oe[0]-K[0]*oe[1])/ee]}function S(K,Z){return[K[0]-Z[0],K[1]-Z[1]]}function A(K,Z){return[K[0]+Z[0],K[1]+Z[1]]}function C(K,Z){return[K*Z[0],K*Z[1]]}this.els||this.$initTransformMeasureNodes();function O(K){var Z=K.getBoundingClientRect();return[Z.left,Z.top]}var N=O(this.els[0]),M=O(this.els[1]),L=O(this.els[2]),j=O(this.els[3]),F=R(S(j,M),S(j,L),S(A(M,L),A(j,N))),D=C(1+F[0],S(M,N)),$=C(1+F[1],S(L,N));if(w){var _=w,I=F[0]*_[0]/g+F[1]*_[1]/g+1,z=A(C(_[0],D),C(_[1],$));return A(C(1/I/g,z),N)}var U=S(m,N),V=R(S(D,C(F[0],U)),S($,C(F[1],U)),U);return C(g,V)},c})();s.prototype.$characterSize={width:0,height:0},h.implement(s.prototype,i),r.FontMetrics=s}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,r,d){d.exports=`
|
|
258
|
+
.ace_br1 {border-top-left-radius : 3px;}
|
|
259
|
+
.ace_br2 {border-top-right-radius : 3px;}
|
|
260
|
+
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
|
|
261
|
+
.ace_br4 {border-bottom-right-radius: 3px;}
|
|
262
|
+
.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
|
|
263
|
+
.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
|
|
264
|
+
.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
|
|
265
|
+
.ace_br8 {border-bottom-left-radius : 3px;}
|
|
266
|
+
.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
|
|
267
|
+
.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
|
|
268
|
+
.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
269
|
+
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
270
|
+
.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
271
|
+
.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
272
|
+
.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
.ace_editor {
|
|
276
|
+
position: relative;
|
|
277
|
+
overflow: hidden;
|
|
278
|
+
padding: 0;
|
|
279
|
+
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
|
|
280
|
+
direction: ltr;
|
|
281
|
+
text-align: left;
|
|
282
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
283
|
+
forced-color-adjust: none;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.ace_scroller {
|
|
287
|
+
position: absolute;
|
|
288
|
+
overflow: hidden;
|
|
289
|
+
top: 0;
|
|
290
|
+
bottom: 0;
|
|
291
|
+
background-color: inherit;
|
|
292
|
+
-ms-user-select: none;
|
|
293
|
+
-moz-user-select: none;
|
|
294
|
+
-webkit-user-select: none;
|
|
295
|
+
user-select: none;
|
|
296
|
+
cursor: text;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.ace_content {
|
|
300
|
+
position: absolute;
|
|
301
|
+
box-sizing: border-box;
|
|
302
|
+
min-width: 100%;
|
|
303
|
+
contain: style size layout;
|
|
304
|
+
font-variant-ligatures: no-common-ligatures;
|
|
305
|
+
}
|
|
306
|
+
.ace_invisible {
|
|
307
|
+
font-variant-ligatures: none;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.ace_keyboard-focus:focus {
|
|
311
|
+
box-shadow: inset 0 0 0 2px #5E9ED6;
|
|
312
|
+
outline: none;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.ace_dragging .ace_scroller:before{
|
|
316
|
+
position: absolute;
|
|
317
|
+
top: 0;
|
|
318
|
+
left: 0;
|
|
319
|
+
right: 0;
|
|
320
|
+
bottom: 0;
|
|
321
|
+
content: '';
|
|
322
|
+
background: rgba(250, 250, 250, 0.01);
|
|
323
|
+
z-index: 1000;
|
|
324
|
+
}
|
|
325
|
+
.ace_dragging.ace_dark .ace_scroller:before{
|
|
326
|
+
background: rgba(0, 0, 0, 0.01);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.ace_gutter {
|
|
330
|
+
position: absolute;
|
|
331
|
+
overflow : hidden;
|
|
332
|
+
width: auto;
|
|
333
|
+
top: 0;
|
|
334
|
+
bottom: 0;
|
|
335
|
+
left: 0;
|
|
336
|
+
cursor: default;
|
|
337
|
+
z-index: 4;
|
|
338
|
+
-ms-user-select: none;
|
|
339
|
+
-moz-user-select: none;
|
|
340
|
+
-webkit-user-select: none;
|
|
341
|
+
user-select: none;
|
|
342
|
+
contain: style size layout;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.ace_gutter-active-line {
|
|
346
|
+
position: absolute;
|
|
347
|
+
left: 0;
|
|
348
|
+
right: 0;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.ace_scroller.ace_scroll-left:after {
|
|
352
|
+
content: "";
|
|
353
|
+
position: absolute;
|
|
354
|
+
top: 0;
|
|
355
|
+
right: 0;
|
|
356
|
+
bottom: 0;
|
|
357
|
+
left: 0;
|
|
358
|
+
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
|
|
359
|
+
pointer-events: none;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.ace_gutter-cell, .ace_gutter-cell_svg-icons {
|
|
363
|
+
position: absolute;
|
|
364
|
+
top: 0;
|
|
365
|
+
left: 0;
|
|
366
|
+
right: 0;
|
|
367
|
+
padding-left: 19px;
|
|
368
|
+
padding-right: 6px;
|
|
369
|
+
background-repeat: no-repeat;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.ace_gutter-cell_svg-icons .ace_gutter_annotation {
|
|
373
|
+
margin-left: -14px;
|
|
374
|
+
float: left;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.ace_gutter-cell .ace_gutter_annotation {
|
|
378
|
+
margin-left: -19px;
|
|
379
|
+
float: left;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.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 {
|
|
383
|
+
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==");
|
|
384
|
+
background-repeat: no-repeat;
|
|
385
|
+
background-position: 2px center;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
|
|
389
|
+
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==");
|
|
390
|
+
background-repeat: no-repeat;
|
|
391
|
+
background-position: 2px center;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
|
|
395
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
|
|
396
|
+
background-repeat: no-repeat;
|
|
397
|
+
background-position: 2px center;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.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 {
|
|
401
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.ace_icon_svg.ace_error {
|
|
405
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
|
|
406
|
+
background-color: crimson;
|
|
407
|
+
}
|
|
408
|
+
.ace_icon_svg.ace_security {
|
|
409
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
|
|
410
|
+
background-color: crimson;
|
|
411
|
+
}
|
|
412
|
+
.ace_icon_svg.ace_warning {
|
|
413
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
|
|
414
|
+
background-color: darkorange;
|
|
415
|
+
}
|
|
416
|
+
.ace_icon_svg.ace_info {
|
|
417
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
|
|
418
|
+
background-color: royalblue;
|
|
419
|
+
}
|
|
420
|
+
.ace_icon_svg.ace_hint {
|
|
421
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
|
|
422
|
+
background-color: silver;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.ace_icon_svg.ace_error_fold {
|
|
426
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
|
427
|
+
background-color: crimson;
|
|
428
|
+
}
|
|
429
|
+
.ace_icon_svg.ace_security_fold {
|
|
430
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
|
431
|
+
background-color: crimson;
|
|
432
|
+
}
|
|
433
|
+
.ace_icon_svg.ace_warning_fold {
|
|
434
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
|
|
435
|
+
background-color: darkorange;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.ace_scrollbar {
|
|
439
|
+
contain: strict;
|
|
440
|
+
position: absolute;
|
|
441
|
+
right: 0;
|
|
442
|
+
bottom: 0;
|
|
443
|
+
z-index: 6;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.ace_scrollbar-inner {
|
|
447
|
+
position: absolute;
|
|
448
|
+
cursor: text;
|
|
449
|
+
left: 0;
|
|
450
|
+
top: 0;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.ace_scrollbar-v{
|
|
454
|
+
overflow-x: hidden;
|
|
455
|
+
overflow-y: scroll;
|
|
456
|
+
top: 0;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.ace_scrollbar-h {
|
|
460
|
+
overflow-x: scroll;
|
|
461
|
+
overflow-y: hidden;
|
|
462
|
+
left: 0;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.ace_print-margin {
|
|
466
|
+
position: absolute;
|
|
467
|
+
height: 100%;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.ace_text-input {
|
|
471
|
+
position: absolute;
|
|
472
|
+
z-index: 0;
|
|
473
|
+
width: 0.5em;
|
|
474
|
+
height: 1em;
|
|
475
|
+
opacity: 0;
|
|
476
|
+
background: transparent;
|
|
477
|
+
-moz-appearance: none;
|
|
478
|
+
appearance: none;
|
|
479
|
+
border: none;
|
|
480
|
+
resize: none;
|
|
481
|
+
outline: none;
|
|
482
|
+
overflow: hidden;
|
|
483
|
+
font: inherit;
|
|
484
|
+
padding: 0 1px;
|
|
485
|
+
margin: 0 -1px;
|
|
486
|
+
contain: strict;
|
|
487
|
+
-ms-user-select: text;
|
|
488
|
+
-moz-user-select: text;
|
|
489
|
+
-webkit-user-select: text;
|
|
490
|
+
user-select: text;
|
|
491
|
+
/*with \`pre-line\` chrome inserts instead of space*/
|
|
492
|
+
white-space: pre!important;
|
|
493
|
+
}
|
|
494
|
+
.ace_text-input.ace_composition {
|
|
495
|
+
background: transparent;
|
|
496
|
+
color: inherit;
|
|
497
|
+
z-index: 1000;
|
|
498
|
+
opacity: 1;
|
|
499
|
+
}
|
|
500
|
+
.ace_composition_placeholder { color: transparent }
|
|
501
|
+
.ace_composition_marker {
|
|
502
|
+
border-bottom: 1px solid;
|
|
503
|
+
position: absolute;
|
|
504
|
+
border-radius: 0;
|
|
505
|
+
margin-top: 1px;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
[ace_nocontext=true] {
|
|
509
|
+
transform: none!important;
|
|
510
|
+
filter: none!important;
|
|
511
|
+
clip-path: none!important;
|
|
512
|
+
mask : none!important;
|
|
513
|
+
contain: none!important;
|
|
514
|
+
perspective: none!important;
|
|
515
|
+
mix-blend-mode: initial!important;
|
|
516
|
+
z-index: auto;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.ace_layer {
|
|
520
|
+
z-index: 1;
|
|
521
|
+
position: absolute;
|
|
522
|
+
overflow: hidden;
|
|
523
|
+
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
|
|
524
|
+
word-wrap: normal;
|
|
525
|
+
white-space: pre;
|
|
526
|
+
height: 100%;
|
|
527
|
+
width: 100%;
|
|
528
|
+
box-sizing: border-box;
|
|
529
|
+
/* setting pointer-events: auto; on node under the mouse, which changes
|
|
530
|
+
during scroll, will break mouse wheel scrolling in Safari */
|
|
531
|
+
pointer-events: none;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.ace_gutter-layer {
|
|
535
|
+
position: relative;
|
|
536
|
+
width: auto;
|
|
537
|
+
text-align: right;
|
|
538
|
+
pointer-events: auto;
|
|
539
|
+
height: 1000000px;
|
|
540
|
+
contain: style size layout;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.ace_text-layer {
|
|
544
|
+
font: inherit !important;
|
|
545
|
+
position: absolute;
|
|
546
|
+
height: 1000000px;
|
|
547
|
+
width: 1000000px;
|
|
548
|
+
contain: style size layout;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
|
|
552
|
+
contain: style size layout;
|
|
553
|
+
position: absolute;
|
|
554
|
+
top: 0;
|
|
555
|
+
left: 0;
|
|
556
|
+
right: 0;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.ace_hidpi .ace_text-layer,
|
|
560
|
+
.ace_hidpi .ace_gutter-layer,
|
|
561
|
+
.ace_hidpi .ace_content,
|
|
562
|
+
.ace_hidpi .ace_gutter {
|
|
563
|
+
contain: strict;
|
|
564
|
+
}
|
|
565
|
+
.ace_hidpi .ace_text-layer > .ace_line,
|
|
566
|
+
.ace_hidpi .ace_text-layer > .ace_line_group {
|
|
567
|
+
contain: strict;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.ace_cjk {
|
|
571
|
+
display: inline-block;
|
|
572
|
+
text-align: center;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
.ace_cursor-layer {
|
|
576
|
+
z-index: 4;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
.ace_cursor {
|
|
580
|
+
z-index: 4;
|
|
581
|
+
position: absolute;
|
|
582
|
+
box-sizing: border-box;
|
|
583
|
+
border-left: 2px solid;
|
|
584
|
+
/* workaround for smooth cursor repaintng whole screen in chrome */
|
|
585
|
+
transform: translatez(0);
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
.ace_multiselect .ace_cursor {
|
|
589
|
+
border-left-width: 1px;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
.ace_slim-cursors .ace_cursor {
|
|
593
|
+
border-left-width: 1px;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
.ace_overwrite-cursors .ace_cursor {
|
|
597
|
+
border-left-width: 0;
|
|
598
|
+
border-bottom: 1px solid;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
.ace_hidden-cursors .ace_cursor {
|
|
602
|
+
opacity: 0.2;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
|
|
606
|
+
opacity: 0;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
.ace_smooth-blinking .ace_cursor {
|
|
610
|
+
transition: opacity 0.18s;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
.ace_animate-blinking .ace_cursor {
|
|
614
|
+
animation-duration: 1000ms;
|
|
615
|
+
animation-timing-function: step-end;
|
|
616
|
+
animation-name: blink-ace-animate;
|
|
617
|
+
animation-iteration-count: infinite;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
|
|
621
|
+
animation-duration: 1000ms;
|
|
622
|
+
animation-timing-function: ease-in-out;
|
|
623
|
+
animation-name: blink-ace-animate-smooth;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
@keyframes blink-ace-animate {
|
|
627
|
+
from, to { opacity: 1; }
|
|
628
|
+
60% { opacity: 0; }
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
@keyframes blink-ace-animate-smooth {
|
|
632
|
+
from, to { opacity: 1; }
|
|
633
|
+
45% { opacity: 1; }
|
|
634
|
+
60% { opacity: 0; }
|
|
635
|
+
85% { opacity: 0; }
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
|
|
639
|
+
position: absolute;
|
|
640
|
+
z-index: 3;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
.ace_marker-layer .ace_selection {
|
|
644
|
+
position: absolute;
|
|
645
|
+
z-index: 5;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
.ace_marker-layer .ace_bracket {
|
|
649
|
+
position: absolute;
|
|
650
|
+
z-index: 6;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
.ace_marker-layer .ace_error_bracket {
|
|
654
|
+
position: absolute;
|
|
655
|
+
border-bottom: 1px solid #DE5555;
|
|
656
|
+
border-radius: 0;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
.ace_marker-layer .ace_active-line {
|
|
660
|
+
position: absolute;
|
|
661
|
+
z-index: 2;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
.ace_marker-layer .ace_selected-word {
|
|
665
|
+
position: absolute;
|
|
666
|
+
z-index: 4;
|
|
667
|
+
box-sizing: border-box;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
.ace_line .ace_fold {
|
|
671
|
+
box-sizing: border-box;
|
|
672
|
+
|
|
673
|
+
display: inline-block;
|
|
674
|
+
height: 11px;
|
|
675
|
+
margin-top: -2px;
|
|
676
|
+
vertical-align: middle;
|
|
677
|
+
|
|
678
|
+
background-image:
|
|
679
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
|
680
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
|
|
681
|
+
background-repeat: no-repeat, repeat-x;
|
|
682
|
+
background-position: center center, top left;
|
|
683
|
+
color: transparent;
|
|
684
|
+
|
|
685
|
+
border: 1px solid black;
|
|
686
|
+
border-radius: 2px;
|
|
687
|
+
|
|
688
|
+
cursor: pointer;
|
|
689
|
+
pointer-events: auto;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
.ace_dark .ace_fold {
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
.ace_fold:hover{
|
|
696
|
+
background-image:
|
|
697
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
|
698
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
.ace_tooltip {
|
|
702
|
+
background-color: #f5f5f5;
|
|
703
|
+
border: 1px solid gray;
|
|
704
|
+
border-radius: 1px;
|
|
705
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
706
|
+
color: black;
|
|
707
|
+
padding: 3px 4px;
|
|
708
|
+
position: fixed;
|
|
709
|
+
z-index: 999999;
|
|
710
|
+
box-sizing: border-box;
|
|
711
|
+
cursor: default;
|
|
712
|
+
white-space: pre-wrap;
|
|
713
|
+
word-wrap: break-word;
|
|
714
|
+
line-height: normal;
|
|
715
|
+
font-style: normal;
|
|
716
|
+
font-weight: normal;
|
|
717
|
+
letter-spacing: normal;
|
|
718
|
+
pointer-events: none;
|
|
719
|
+
overflow: auto;
|
|
720
|
+
max-width: min(33em, 66vw);
|
|
721
|
+
overscroll-behavior: contain;
|
|
722
|
+
}
|
|
723
|
+
.ace_tooltip pre {
|
|
724
|
+
white-space: pre-wrap;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
.ace_tooltip.ace_dark {
|
|
728
|
+
background-color: #636363;
|
|
729
|
+
color: #fff;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
.ace_tooltip:focus {
|
|
733
|
+
outline: 1px solid #5E9ED6;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
.ace_icon {
|
|
737
|
+
display: inline-block;
|
|
738
|
+
width: 18px;
|
|
739
|
+
vertical-align: top;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
.ace_icon_svg {
|
|
743
|
+
display: inline-block;
|
|
744
|
+
width: 12px;
|
|
745
|
+
vertical-align: top;
|
|
746
|
+
-webkit-mask-repeat: no-repeat;
|
|
747
|
+
-webkit-mask-size: 12px;
|
|
748
|
+
-webkit-mask-position: center;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
|
|
752
|
+
padding-right: 13px;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
.ace_fold-widget, .ace_custom-widget {
|
|
756
|
+
box-sizing: border-box;
|
|
757
|
+
|
|
758
|
+
margin: 0 -12px 0 1px;
|
|
759
|
+
display: none;
|
|
760
|
+
width: 11px;
|
|
761
|
+
vertical-align: top;
|
|
762
|
+
|
|
763
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
|
|
764
|
+
background-repeat: no-repeat;
|
|
765
|
+
background-position: center;
|
|
766
|
+
|
|
767
|
+
border-radius: 3px;
|
|
768
|
+
|
|
769
|
+
border: 1px solid transparent;
|
|
770
|
+
cursor: pointer;
|
|
771
|
+
pointer-events: auto;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
.ace_custom-widget {
|
|
775
|
+
background: none;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
.ace_folding-enabled .ace_fold-widget {
|
|
779
|
+
display: inline-block;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
.ace_fold-widget.ace_end {
|
|
783
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
.ace_fold-widget.ace_closed {
|
|
787
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
.ace_fold-widget:hover {
|
|
791
|
+
border: 1px solid rgba(0, 0, 0, 0.3);
|
|
792
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
793
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
.ace_fold-widget:active {
|
|
797
|
+
border: 1px solid rgba(0, 0, 0, 0.4);
|
|
798
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
799
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
|
800
|
+
}
|
|
801
|
+
/**
|
|
802
|
+
* Dark version for fold widgets
|
|
803
|
+
*/
|
|
804
|
+
.ace_dark .ace_fold-widget {
|
|
805
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
|
806
|
+
}
|
|
807
|
+
.ace_dark .ace_fold-widget.ace_end {
|
|
808
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
|
809
|
+
}
|
|
810
|
+
.ace_dark .ace_fold-widget.ace_closed {
|
|
811
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
|
812
|
+
}
|
|
813
|
+
.ace_dark .ace_fold-widget:hover {
|
|
814
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
|
815
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
816
|
+
}
|
|
817
|
+
.ace_dark .ace_fold-widget:active {
|
|
818
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
.ace_inline_button {
|
|
822
|
+
border: 1px solid lightgray;
|
|
823
|
+
display: inline-block;
|
|
824
|
+
margin: -1px 8px;
|
|
825
|
+
padding: 0 5px;
|
|
826
|
+
pointer-events: auto;
|
|
827
|
+
cursor: pointer;
|
|
828
|
+
}
|
|
829
|
+
.ace_inline_button:hover {
|
|
830
|
+
border-color: gray;
|
|
831
|
+
background: rgba(200,200,200,0.2);
|
|
832
|
+
display: inline-block;
|
|
833
|
+
pointer-events: auto;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
.ace_fold-widget.ace_invalid {
|
|
837
|
+
background-color: #FFB4B4;
|
|
838
|
+
border-color: #DE5555;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
.ace_fade-fold-widgets .ace_fold-widget {
|
|
842
|
+
transition: opacity 0.4s ease 0.05s;
|
|
843
|
+
opacity: 0;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
|
847
|
+
transition: opacity 0.05s ease 0.05s;
|
|
848
|
+
opacity:1;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
.ace_underline {
|
|
852
|
+
text-decoration: underline;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
.ace_bold {
|
|
856
|
+
font-weight: bold;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
.ace_nobold .ace_bold {
|
|
860
|
+
font-weight: normal;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
.ace_italic {
|
|
864
|
+
font-style: italic;
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
|
|
868
|
+
.ace_error-marker {
|
|
869
|
+
background-color: rgba(255, 0, 0,0.2);
|
|
870
|
+
position: absolute;
|
|
871
|
+
z-index: 9;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
.ace_highlight-marker {
|
|
875
|
+
background-color: rgba(255, 255, 0,0.2);
|
|
876
|
+
position: absolute;
|
|
877
|
+
z-index: 8;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
.ace_mobile-menu {
|
|
881
|
+
position: absolute;
|
|
882
|
+
line-height: 1.5;
|
|
883
|
+
border-radius: 4px;
|
|
884
|
+
-ms-user-select: none;
|
|
885
|
+
-moz-user-select: none;
|
|
886
|
+
-webkit-user-select: none;
|
|
887
|
+
user-select: none;
|
|
888
|
+
background: white;
|
|
889
|
+
box-shadow: 1px 3px 2px grey;
|
|
890
|
+
border: 1px solid #dcdcdc;
|
|
891
|
+
color: black;
|
|
892
|
+
}
|
|
893
|
+
.ace_dark > .ace_mobile-menu {
|
|
894
|
+
background: #333;
|
|
895
|
+
color: #ccc;
|
|
896
|
+
box-shadow: 1px 3px 2px grey;
|
|
897
|
+
border: 1px solid #444;
|
|
898
|
+
|
|
899
|
+
}
|
|
900
|
+
.ace_mobile-button {
|
|
901
|
+
padding: 2px;
|
|
902
|
+
cursor: pointer;
|
|
903
|
+
overflow: hidden;
|
|
904
|
+
}
|
|
905
|
+
.ace_mobile-button:hover {
|
|
906
|
+
background-color: #eee;
|
|
907
|
+
opacity:1;
|
|
908
|
+
}
|
|
909
|
+
.ace_mobile-button:active {
|
|
910
|
+
background-color: #ddd;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
.ace_placeholder {
|
|
914
|
+
position: relative;
|
|
915
|
+
font-family: arial;
|
|
916
|
+
transform: scale(0.9);
|
|
917
|
+
transform-origin: left;
|
|
918
|
+
white-space: pre;
|
|
919
|
+
opacity: 0.7;
|
|
920
|
+
margin: 0 10px;
|
|
921
|
+
z-index: 1;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
.ace_ghost_text {
|
|
925
|
+
opacity: 0.5;
|
|
926
|
+
font-style: italic;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
.ace_ghost_text_container > div {
|
|
930
|
+
white-space: pre;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
.ghost_text_line_wrapped::after {
|
|
934
|
+
content: "↩";
|
|
935
|
+
position: absolute;
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
.ace_lineWidgetContainer.ace_ghost_text {
|
|
939
|
+
margin: 0px 4px
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
.ace_screenreader-only {
|
|
943
|
+
position:absolute;
|
|
944
|
+
left:-10000px;
|
|
945
|
+
top:auto;
|
|
946
|
+
width:1px;
|
|
947
|
+
height:1px;
|
|
948
|
+
overflow:hidden;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
.ace_hidden_token {
|
|
952
|
+
display: none;
|
|
953
|
+
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,r,d){var h=e("../lib/dom"),f=e("../lib/oop"),v=e("../lib/event_emitter").EventEmitter,o=(function(){function p(i,a){this.renderer=a,this.pixelRatio=1,this.maxHeight=a.layerConfig.maxHeight,this.lineHeight=a.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(i)}return p.prototype.$createCanvas=function(){this.canvas=h.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},p.prototype.setScrollBarV=function(i){this.$createCanvas(),this.scrollbarV=i,i.element.appendChild(this.canvas),this.setDimensions()},p.prototype.$updateDecorators=function(i){if(typeof this.canvas.getContext!="function")return;var a=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(i);var u=this.canvas.getContext("2d");function g(D,$){return D.priority<$.priority?-1:D.priority>$.priority?1:0}var s=this.renderer.session.$annotations;if(u.clearRect(0,0,this.canvas.width,this.canvas.height),s){var c={info:1,warning:2,error:3};s.forEach(function(D){D.priority=c[D.type]||null}),s=s.sort(g);for(var m=0;m<s.length;m++){var w=s[m].row,x=this.getVerticalOffsetForRow(w),R=x+this.lineHeight,S=Math.round(this.heightRatio*x),A=Math.round(this.heightRatio*R),C=Math.round((S+A)/2),O=A-C;O<this.halfMinDecorationHeight&&(O=this.halfMinDecorationHeight),C-O<0&&(C=O),C+O>this.canvasHeight&&(C=this.canvasHeight-O);var N=C-O,M=C+O,L=M-N;u.fillStyle=a[s[m].type]||null,u.fillRect(0,N,Math.round(this.oneZoneWidth-1),L)}}var j=this.renderer.session.selection.getCursor();if(j){var F=Math.round(this.getVerticalOffsetForRow(j.row)*this.heightRatio);u.fillStyle="rgba(0, 0, 0, 0.5)",u.fillRect(0,F,this.canvasWidth,2)}},p.prototype.getVerticalOffsetForRow=function(i){i=i|0;var a=this.renderer.session.documentToScreenRow(i,0)*this.lineHeight;return a},p.prototype.setDimensions=function(i){i=i||this.renderer.layerConfig,this.maxHeight=i.maxHeight,this.lineHeight=i.lineHeight,this.canvasHeight=i.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},p.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},p.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},p})();f.implement(o.prototype,v),r.Decorator=o}),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(e,r,d){var h=e("./lib/oop"),f=e("./lib/dom"),v=e("./lib/lang"),o=e("./config"),p=e("./layer/gutter").Gutter,i=e("./layer/marker").Marker,a=e("./layer/text").Text,u=e("./layer/cursor").Cursor,g=e("./scrollbar").HScrollBar,s=e("./scrollbar").VScrollBar,c=e("./scrollbar_custom").HScrollBar,m=e("./scrollbar_custom").VScrollBar,w=e("./renderloop").RenderLoop,x=e("./layer/font_metrics").FontMetrics,R=e("./lib/event_emitter").EventEmitter,S=e("./css/editor-css"),A=e("./layer/decorators").Decorator,C=e("./lib/useragent"),O=e("./layer/text_util").isTextToken;f.importCssString(S,"ace_editor.css",!1);var N=(function(){function M(L,j){var F=this;this.container=L||f.createElement("div"),f.addCssClass(this.container,"ace_editor"),f.HI_DPI&&f.addCssClass(this.container,"ace_hidpi"),this.setTheme(j),o.get("useStrictCSP")==null&&o.set("useStrictCSP",!1),this.$gutter=f.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=f.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=f.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new p(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new i(this.content);var D=this.$textLayer=new a(this.content);this.canvas=D.element,this.$markerFront=new i(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new s(this.container,this),this.scrollBarH=new g(this.container,this),this.scrollBarV.on("scroll",function($){F.$scrollAnimation||F.session.setScrollTop($.data-F.scrollMargin.top)}),this.scrollBarH.on("scroll",function($){F.$scrollAnimation||F.session.setScrollLeft($.data-F.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($){F.updateCharacterSize(),F.onResize(!0,F.gutterWidth,F.$size.width,F.$size.height),F._signal("changeCharacterSize",$)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!C.isIOS,this.$loop=new w(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),o.resetOptions(this),o._signal("renderer",this)}return M.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(),f.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},M.prototype.setSession=function(L){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=L,L&&this.scrollMargin.top&&L.getScrollTop()<=0&&L.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(L),this.$markerBack.setSession(L),this.$markerFront.setSession(L),this.$gutterLayer.setSession(L),this.$textLayer.setSession(L),L&&(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))},M.prototype.updateLines=function(L,j,F){if(j===void 0&&(j=1/0),this.$changedLines?(this.$changedLines.firstRow>L&&(this.$changedLines.firstRow=L),this.$changedLines.lastRow<j&&(this.$changedLines.lastRow=j)):this.$changedLines={firstRow:L,lastRow:j},this.$changedLines.lastRow<this.layerConfig.firstRow)if(F)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},M.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},M.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},M.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},M.prototype.updateFull=function(L){L?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},M.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},M.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},M.prototype.onResize=function(L,j,F,D){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=L?1:0;var $=this.container;D||(D=$.clientHeight||$.scrollHeight),!D&&this.$maxLines&&this.lineHeight>1&&(!$.style.height||$.style.height=="0px")&&($.style.height="1px",D=$.clientHeight||$.scrollHeight),F||(F=$.clientWidth||$.scrollWidth);var _=this.$updateCachedSize(L,j,F,D);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!F&&!D)return this.resizing=0;L&&(this.$gutterLayer.$padding=null),L?this.$renderChanges(_|this.$changes,!0):this.$loop.schedule(_|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},M.prototype.$updateCachedSize=function(L,j,F,D){D-=this.$extraHeight||0;var $=0,_=this.$size,I={width:_.width,height:_.height,scrollerHeight:_.scrollerHeight,scrollerWidth:_.scrollerWidth};if(D&&(L||_.height!=D)&&(_.height=D,$|=this.CHANGE_SIZE,_.scrollerHeight=_.height,this.$horizScroll&&(_.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(_.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",$=$|this.CHANGE_SCROLL),F&&(L||_.width!=F)){$|=this.CHANGE_SIZE,_.width=F,j==null&&(j=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=j,f.setStyle(this.scrollBarH.element.style,"left",j+"px"),f.setStyle(this.scroller.style,"left",j+this.margin.left+"px"),_.scrollerWidth=Math.max(0,F-j-this.scrollBarV.getWidth()-this.margin.h),f.setStyle(this.$gutter.style,"left",this.margin.left+"px");var z=this.scrollBarV.getWidth()+"px";f.setStyle(this.scrollBarH.element.style,"right",z),f.setStyle(this.scroller.style,"right",z),f.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(_.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||L)&&($|=this.CHANGE_FULL)}return _.$dirty=!F||!D,$&&this._signal("resize",I),$},M.prototype.onGutterResize=function(L){var j=this.$showGutter?L:0;j!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,j,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()},M.prototype.adjustWrapLimit=function(){var L=this.$size.scrollerWidth-this.$padding*2,j=Math.floor(L/this.characterWidth);return this.session.adjustWrapLimit(j,this.$showPrintMargin&&this.$printMarginColumn)},M.prototype.setAnimatedScroll=function(L){this.setOption("animatedScroll",L)},M.prototype.getAnimatedScroll=function(){return this.$animatedScroll},M.prototype.setShowInvisibles=function(L){this.setOption("showInvisibles",L),this.session.$bidiHandler.setShowInvisibles(L)},M.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},M.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},M.prototype.setDisplayIndentGuides=function(L){this.setOption("displayIndentGuides",L)},M.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},M.prototype.setHighlightIndentGuides=function(L){this.setOption("highlightIndentGuides",L)},M.prototype.setShowPrintMargin=function(L){this.setOption("showPrintMargin",L)},M.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},M.prototype.setPrintMarginColumn=function(L){this.setOption("printMarginColumn",L)},M.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},M.prototype.getShowGutter=function(){return this.getOption("showGutter")},M.prototype.setShowGutter=function(L){return this.setOption("showGutter",L)},M.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},M.prototype.setFadeFoldWidgets=function(L){this.setOption("fadeFoldWidgets",L)},M.prototype.setHighlightGutterLine=function(L){this.setOption("highlightGutterLine",L)},M.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},M.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var L=f.createElement("div");L.className="ace_layer ace_print-margin-layer",this.$printMarginEl=f.createElement("div"),this.$printMarginEl.className="ace_print-margin",L.appendChild(this.$printMarginEl),this.content.insertBefore(L,this.content.firstChild)}var j=this.$printMarginEl.style;j.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",j.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},M.prototype.getContainerElement=function(){return this.container},M.prototype.getMouseEventTarget=function(){return this.scroller},M.prototype.getTextAreaContainer=function(){return this.container},M.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var L=this.textarea.style,j=this.$composition;if(!this.$keepTextAreaAtCursor&&!j){f.translate(this.textarea,-100,0);return}var F=this.$cursorLayer.$pixelPos;if(F){j&&j.markerRange&&(F=this.$cursorLayer.getPixelPosition(j.markerRange.start,!0));var D=this.layerConfig,$=F.top,_=F.left;$-=D.offset;var I=j&&j.useTextareaForIME||C.isMobile?this.lineHeight:1;if($<0||$>D.height-I){f.translate(this.textarea,0,0);return}var z=1,U=this.$size.height-I;if(!j)$+=this.lineHeight;else if(j.useTextareaForIME){var V=this.textarea.value;z=this.characterWidth*this.session.$getStringScreenWidth(V)[0]}else $+=this.lineHeight+2;_-=this.scrollLeft,_>this.$size.scrollerWidth-z&&(_=this.$size.scrollerWidth-z),_+=this.gutterWidth+this.margin.left,f.setStyle(L,"height",I+"px"),f.setStyle(L,"width",z+"px"),f.translate(this.textarea,Math.min(_,this.$size.scrollerWidth-z),Math.min($,U))}}},M.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},M.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},M.prototype.getLastFullyVisibleRow=function(){var L=this.layerConfig,j=L.lastRow,F=this.session.documentToScreenRow(j,0)*L.lineHeight;return F-this.session.getScrollTop()>L.height-L.lineHeight?j-1:j},M.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},M.prototype.setPadding=function(L){this.$padding=L,this.$textLayer.setPadding(L),this.$cursorLayer.setPadding(L),this.$markerFront.setPadding(L),this.$markerBack.setPadding(L),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},M.prototype.setScrollMargin=function(L,j,F,D){var $=this.scrollMargin;$.top=L|0,$.bottom=j|0,$.right=D|0,$.left=F|0,$.v=$.top+$.bottom,$.h=$.left+$.right,$.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-$.top),this.updateFull()},M.prototype.setMargin=function(L,j,F,D){var $=this.margin;$.top=L|0,$.bottom=j|0,$.right=D|0,$.left=F|0,$.v=$.top+$.bottom,$.h=$.left+$.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},M.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},M.prototype.setHScrollBarAlwaysVisible=function(L){this.setOption("hScrollBarAlwaysVisible",L)},M.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},M.prototype.setVScrollBarAlwaysVisible=function(L){this.setOption("vScrollBarAlwaysVisible",L)},M.prototype.$updateScrollBarV=function(){var L=this.layerConfig.maxHeight,j=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(L-=(j-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>L-j&&(L=this.scrollTop+j,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(L+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},M.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},M.prototype.freeze=function(){this.$frozen=!0},M.prototype.unfreeze=function(){this.$frozen=!1},M.prototype.$renderChanges=function(L,j){if(this.$changes&&(L|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!L&&!j){this.$changes|=L;return}if(this.$size.$dirty)return this.$changes|=L,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",L),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var F=this.layerConfig;if(L&this.CHANGE_FULL||L&this.CHANGE_SIZE||L&this.CHANGE_TEXT||L&this.CHANGE_LINES||L&this.CHANGE_SCROLL||L&this.CHANGE_H_SCROLL){if(L|=this.$computeLayerConfig()|this.$loop.clear(),F.firstRow!=this.layerConfig.firstRow&&F.firstRowScreen==this.layerConfig.firstRowScreen){var D=this.scrollTop+(F.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;D>0&&(this.scrollTop=D,L=L|this.CHANGE_SCROLL,L|=this.$computeLayerConfig()|this.$loop.clear())}F=this.layerConfig,this.$updateScrollBarV(),L&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),f.translate(this.content,-this.scrollLeft,-F.offset);var $=F.width+2*this.$padding+"px",_=F.minHeight+"px";f.setStyle(this.content.style,"width",$),f.setStyle(this.content.style,"height",_)}if(L&this.CHANGE_H_SCROLL&&(f.translate(this.content,-this.scrollLeft,-F.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),L&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F),this.$markerBack.update(F),this.$markerFront.update(F),this.$cursorLayer.update(F),this.$moveTextAreaToCursor(),this._signal("afterRender",L);return}if(L&this.CHANGE_SCROLL){this.$changedLines=null,L&this.CHANGE_TEXT||L&this.CHANGE_LINES?this.$textLayer.update(F):this.$textLayer.scrollLines(F),this.$showGutter&&(L&this.CHANGE_GUTTER||L&this.CHANGE_LINES?this.$gutterLayer.update(F):this.$gutterLayer.scrollLines(F)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F),this.$markerBack.update(F),this.$markerFront.update(F),this.$cursorLayer.update(F),this.$moveTextAreaToCursor(),this._signal("afterRender",L);return}L&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):L&this.CHANGE_LINES?((this.$updateLines()||L&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):L&this.CHANGE_TEXT||L&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):L&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)),L&this.CHANGE_CURSOR&&(this.$cursorLayer.update(F),this.$moveTextAreaToCursor()),L&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(F),L&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(F),this._signal("afterRender",L)},M.prototype.$autosize=function(){var L=this.session.getScreenLength()*this.lineHeight,j=this.$maxLines*this.lineHeight,F=Math.min(j,Math.max((this.$minLines||1)*this.lineHeight,L))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(F+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&F>this.$maxPixelHeight&&(F=this.$maxPixelHeight);var D=F<=2*this.lineHeight,$=!D&&L>j;if(F!=this.desiredHeight||this.$size.height!=this.desiredHeight||$!=this.$vScroll){$!=this.$vScroll&&(this.$vScroll=$,this.scrollBarV.setVisible($));var _=this.container.clientWidth;this.container.style.height=F+"px",this.$updateCachedSize(!0,this.$gutterWidth,_,F),this.desiredHeight=F,this._signal("autosize")}},M.prototype.$computeLayerConfig=function(){var L=this.session,j=this.$size,F=j.height<=2*this.lineHeight,D=this.session.getScreenLength(),$=D*this.lineHeight,_=this.$getLongestLine(),I=!F&&(this.$hScrollBarAlwaysVisible||j.scrollerWidth-_-2*this.$padding<0),z=this.$horizScroll!==I;z&&(this.$horizScroll=I,this.scrollBarH.setVisible(I));var U=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),F=j.height<=2*this.lineHeight);var V=j.scrollerHeight+this.lineHeight,K=!this.$maxLines&&this.$scrollPastEnd?(j.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;$+=K;var Z=this.scrollMargin;this.session.setScrollTop(Math.max(-Z.top,Math.min(this.scrollTop,$-j.scrollerHeight+Z.bottom))),this.session.setScrollLeft(Math.max(-Z.left,Math.min(this.scrollLeft,_+2*this.$padding-j.scrollerWidth+Z.right)));var oe=!F&&(this.$vScrollBarAlwaysVisible||j.scrollerHeight-$+K<0||this.scrollTop>Z.top),ee=U!==oe;ee&&(this.$vScroll=oe,this.scrollBarV.setVisible(oe));var re=this.scrollTop%this.lineHeight,ce=Math.ceil(V/this.lineHeight)-1,ie=Math.max(0,Math.round((this.scrollTop-re)/this.lineHeight)),fe=ie+ce,pe,$e,Re=this.lineHeight;ie=L.screenToDocumentRow(ie,0);var Ge=L.getFoldLine(ie);Ge&&(ie=Ge.start.row),pe=L.documentToScreenRow(ie,0),$e=L.getRowLength(ie)*Re,fe=Math.min(L.screenToDocumentRow(fe,0),L.getLength()-1),V=j.scrollerHeight+L.getRowLength(fe)*Re+$e,re=this.scrollTop-pe*Re,re<0&&pe>0&&(pe=Math.max(0,pe+Math.floor(re/Re)),re=this.scrollTop-pe*Re);var qe=0;return(this.layerConfig.width!=_||z)&&(qe=this.CHANGE_H_SCROLL),(z||ee)&&(qe|=this.$updateCachedSize(!0,this.gutterWidth,j.width,j.height),this._signal("scrollbarVisibilityChanged"),ee&&(_=this.$getLongestLine())),this.layerConfig={width:_,padding:this.$padding,firstRow:ie,firstRowScreen:pe,lastRow:fe,lineHeight:Re,characterWidth:this.characterWidth,minHeight:V,maxHeight:$,offset:re,gutterOffset:Re?Math.max(0,Math.ceil((re+j.height-j.scrollerHeight)/Re)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(_-this.$padding),qe},M.prototype.$updateLines=function(){if(this.$changedLines){var L=this.$changedLines.firstRow,j=this.$changedLines.lastRow;this.$changedLines=null;var F=this.layerConfig;if(!(L>F.lastRow+1)&&!(j<F.firstRow)){if(j===1/0){this.$showGutter&&this.$gutterLayer.update(F),this.$textLayer.update(F);return}return this.$textLayer.updateLines(F,L,j),!0}}},M.prototype.$getLongestLine=function(){var L=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(L+=1),this.$textLayer&&L>this.$textLayer.MAX_LINE_LENGTH&&(L=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(L*this.characterWidth))},M.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},M.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},M.prototype.addGutterDecoration=function(L,j){this.$gutterLayer.addGutterDecoration(L,j)},M.prototype.removeGutterDecoration=function(L,j){this.$gutterLayer.removeGutterDecoration(L,j)},M.prototype.updateBreakpoints=function(L){this._rows=L,this.$loop.schedule(this.CHANGE_GUTTER)},M.prototype.setAnnotations=function(L){this.$gutterLayer.setAnnotations(L),this.$loop.schedule(this.CHANGE_GUTTER)},M.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},M.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},M.prototype.showCursor=function(){this.$cursorLayer.showCursor()},M.prototype.scrollSelectionIntoView=function(L,j,F){this.scrollCursorIntoView(L,F),this.scrollCursorIntoView(j,F)},M.prototype.scrollCursorIntoView=function(L,j,F){if(this.$size.scrollerHeight!==0){var D=this.$cursorLayer.getPixelPosition(L),$=D.left,_=D.top,I=F&&F.top||0,z=F&&F.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var U=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;U+I>_?(j&&U+I>_+this.lineHeight&&(_-=j*this.$size.scrollerHeight),_===0&&(_=-this.scrollMargin.top),this.session.setScrollTop(_)):U+this.$size.scrollerHeight-z<_+this.lineHeight&&(j&&U+this.$size.scrollerHeight-z<_-this.lineHeight&&(_+=j*this.$size.scrollerHeight),this.session.setScrollTop(_+this.lineHeight+z-this.$size.scrollerHeight));var V=this.scrollLeft,K=2*this.layerConfig.characterWidth;$-K<V?($-=K,$<this.$padding+K&&($=-this.scrollMargin.left),this.session.setScrollLeft($)):($+=K,V+this.$size.scrollerWidth<$+this.characterWidth?this.session.setScrollLeft(Math.round($+this.characterWidth-this.$size.scrollerWidth)):V<=this.$padding&&$-V<this.characterWidth&&this.session.setScrollLeft(0))}},M.prototype.getScrollTop=function(){return this.session.getScrollTop()},M.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},M.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},M.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},M.prototype.scrollToRow=function(L){this.session.setScrollTop(L*this.lineHeight)},M.prototype.alignCursor=function(L,j){typeof L=="number"&&(L={row:L,column:0});var F=this.$cursorLayer.getPixelPosition(L),D=this.$size.scrollerHeight-this.lineHeight,$=F.top-D*(j||0);return this.session.setScrollTop($),$},M.prototype.$calcSteps=function(L,j){var F=0,D=this.STEPS,$=[],_=function(I,z,U){return U*(Math.pow(I-1,3)+1)+z};for(F=0;F<D;++F)$.push(_(F/this.STEPS,L,j-L));return $},M.prototype.scrollToLine=function(L,j,F,D){var $=this.$cursorLayer.getPixelPosition({row:L,column:0}),_=$.top;j&&(_-=this.$size.scrollerHeight/2);var I=this.scrollTop;this.session.setScrollTop(_),F!==!1&&this.animateScrolling(I,D)},M.prototype.animateScrolling=function(L,j){var F=this.scrollTop;if(!this.$animatedScroll)return;var D=this;if(L==F)return;if(this.$scrollAnimation){var $=this.$scrollAnimation.steps;if($.length&&(L=$[0],L==F))return}var _=D.$calcSteps(L,F);this.$scrollAnimation={from:L,to:F,steps:_},clearInterval(this.$timer),D.session.setScrollTop(_.shift()),D.session.$scrollTop=F;function I(){D.$timer=clearInterval(D.$timer),D.$scrollAnimation=null,D.$stopAnimation=!1,j&&j()}this.$timer=setInterval(function(){if(D.$stopAnimation){I();return}if(!D.session)return clearInterval(D.$timer);_.length?(D.session.setScrollTop(_.shift()),D.session.$scrollTop=F):F!=null?(D.session.$scrollTop=-1,D.session.setScrollTop(F),F=null):I()},10)},M.prototype.scrollToY=function(L){this.scrollTop!==L&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=L)},M.prototype.scrollToX=function(L){this.scrollLeft!==L&&(this.scrollLeft=L),this.$loop.schedule(this.CHANGE_H_SCROLL)},M.prototype.scrollTo=function(L,j){this.session.setScrollTop(j),this.session.setScrollLeft(L)},M.prototype.scrollBy=function(L,j){j&&this.session.setScrollTop(this.session.getScrollTop()+j),L&&this.session.setScrollLeft(this.session.getScrollLeft()+L)},M.prototype.isScrollableBy=function(L,j){if(j<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||j>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||L<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||L>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},M.prototype.pixelToScreenCoordinates=function(L,j){var F;if(this.$hasCssTransforms){F={top:0,left:0};var D=this.$fontMetrics.transformCoordinates([L,j]);L=D[1]-this.gutterWidth-this.margin.left,j=D[0]}else F=this.scroller.getBoundingClientRect();var $=L+this.scrollLeft-F.left-this.$padding,_=$/this.characterWidth,I=Math.floor((j+this.scrollTop-F.top)/this.lineHeight),z=this.$blockCursor?Math.floor(_):Math.round(_);return{row:I,column:z,side:_-z>0?1:-1,offsetX:$}},M.prototype.screenToTextCoordinates=function(L,j){var F;if(this.$hasCssTransforms){F={top:0,left:0};var D=this.$fontMetrics.transformCoordinates([L,j]);L=D[1]-this.gutterWidth-this.margin.left,j=D[0]}else F=this.scroller.getBoundingClientRect();var $=L+this.scrollLeft-F.left-this.$padding,_=$/this.characterWidth,I=this.$blockCursor?Math.floor(_):Math.round(_),z=(j+this.scrollTop-F.top)/this.lineHeight;return this.session.screenToDocumentPosition(z,Math.max(I,0),$)},M.prototype.textToScreenCoordinates=function(L,j){var F=this.scroller.getBoundingClientRect(),D=this.session.documentToScreenPosition(L,j),$=this.$padding+(this.session.$bidiHandler.isBidiRow(D.row,L)?this.session.$bidiHandler.getPosLeft(D.column):Math.round(D.column*this.characterWidth)),_=D.row*this.lineHeight;return{pageX:F.left+$-this.scrollLeft,pageY:F.top+_-this.scrollTop}},M.prototype.visualizeFocus=function(){f.addCssClass(this.container,"ace_focus")},M.prototype.visualizeBlur=function(){f.removeCssClass(this.container,"ace_focus")},M.prototype.showComposition=function(L){this.$composition=L,L.cssText||(L.cssText=this.textarea.style.cssText),L.useTextareaForIME==null&&(L.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(f.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):L.markerId=this.session.addMarker(L.markerRange,"ace_composition_marker","text")},M.prototype.setCompositionText=function(L){var j=this.session.selection.cursor;this.addToken(L,"composition_placeholder",j.row,j.column),this.$moveTextAreaToCursor()},M.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),f.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var L=this.session.selection.cursor;this.removeExtraToken(L.row,L.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},M.prototype.setGhostText=function(L,j){var F=this.session.selection.cursor,D=j||{row:F.row,column:F.column};this.removeGhostText();var $=this.$calculateWrappedTextChunks(L,D);this.addToken($[0].text,"ghost_text",D.row,D.column),this.$ghostText={text:L,position:{row:D.row,column:D.column}};var _=f.createElement("div");if($.length>1){var I=this.hideTokensAfterPosition(D.row,D.column),z;$.slice(1).forEach(function(ee){var re=f.createElement("div"),ce=f.createElement("span");ce.className="ace_ghost_text",ee.wrapped&&(re.className="ghost_text_line_wrapped"),ee.text.length===0&&(ee.text=" "),ce.appendChild(f.createTextNode(ee.text)),re.appendChild(ce),_.appendChild(re),z=re}),I.forEach(function(ee){var re=f.createElement("span");O(ee.type)||(re.className="ace_"+ee.type.replace(/\./g," ace_")),re.appendChild(f.createTextNode(ee.value)),z.appendChild(re)}),this.$ghostTextWidget={el:_,row:D.row,column:D.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var U=this.$cursorLayer.getPixelPosition(D,!0),V=this.container,K=V.getBoundingClientRect().height,Z=$.length*this.lineHeight,oe=Z<K-U.top;if(oe)return;Z<K?this.scrollBy(0,($.length-1)*this.lineHeight):this.scrollToRow(D.row)}},M.prototype.$calculateWrappedTextChunks=function(L,j){var F=this.$size.scrollerWidth-this.$padding*2,D=Math.floor(F/this.characterWidth)-2;D=D<=0?60:D;for(var $=L.split(/\r?\n/),_=[],I=0;I<$.length;I++){var z=this.session.$getDisplayTokens($[I],j.column),U=this.session.$computeWrapSplits(z,D,this.session.$tabSize);if(U.length>0){var V=0;U.push($[I].length);for(var K=0;K<U.length;K++){var Z=$[I].slice(V,U[K]);_.push({text:Z,wrapped:!0}),V=U[K]}}else _.push({text:$[I],wrapped:!1})}return _},M.prototype.removeGhostText=function(){if(this.$ghostText){var L=this.$ghostText.position;this.removeExtraToken(L.row,L.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},M.prototype.addToken=function(L,j,F,D){var $=this.session;$.bgTokenizer.lines[F]=null;var _={type:j,value:L},I=$.getTokens(F);if(D==null||!I.length)I.push(_);else for(var z=0,U=0;U<I.length;U++){var V=I[U];if(z+=V.value.length,D<=z){var K=V.value.length-(z-D),Z=V.value.slice(0,K),oe=V.value.slice(K);I.splice(U,1,{type:V.type,value:Z},_,{type:V.type,value:oe});break}}this.updateLines(F,F)},M.prototype.hideTokensAfterPosition=function(L,j){for(var F=this.session.getTokens(L),D=0,$=!1,_=[],I=0;I<F.length;I++){var z=F[I];if(D+=z.value.length,z.type!=="ghost_text"){if($){_.push({type:z.type,value:z.value}),z.type="hidden_token";continue}D===j&&($=!0)}}return this.updateLines(L,L),_},M.prototype.removeExtraToken=function(L,j){this.session.bgTokenizer.lines[L]=null,this.updateLines(L,L)},M.prototype.setTheme=function(L,j){var F=this;if(this.$themeId=L,F._dispatchEvent("themeChange",{theme:L}),!L||typeof L=="string"){var D=L||this.$options.theme.initialValue;o.loadModule(["theme",D],$)}else $(L);function $(_){if(F.$themeId!=L)return j&&j();if(!_||!_.cssClass)throw new Error("couldn't load module "+L+" or it didn't call define");_.$id&&(F.$themeId=_.$id),f.importCssString(_.cssText,_.cssClass,F.container),F.theme&&f.removeCssClass(F.container,F.theme.cssClass);var I="padding"in _?_.padding:"padding"in(F.theme||{})?4:F.$padding;if(F.$padding&&I!=F.$padding&&F.setPadding(I),F.$gutterLayer){var z=_.$showGutterCursorMarker;z&&!F.$gutterLayer.$showCursorMarker?F.$gutterLayer.$showCursorMarker="theme":!z&&F.$gutterLayer.$showCursorMarker=="theme"&&(F.$gutterLayer.$showCursorMarker=null)}F.$theme=_.cssClass,F.theme=_,f.addCssClass(F.container,_.cssClass),f.setCssClass(F.container,"ace_dark",_.isDark),F.$size&&(F.$size.width=0,F.$updateSizeAsync()),F._dispatchEvent("themeLoaded",{theme:_}),j&&j(),C.isSafari&&F.scroller&&(F.scroller.style.background="red",F.scroller.style.background="")}},M.prototype.getTheme=function(){return this.$themeId},M.prototype.setStyle=function(L,j){f.setCssClass(this.container,L,j!==!1)},M.prototype.unsetStyle=function(L){f.removeCssClass(this.container,L)},M.prototype.setCursorStyle=function(L){f.setStyle(this.scroller.style,"cursor",L)},M.prototype.setMouseCursor=function(L){f.setStyle(this.scroller.style,"cursor",L)},M.prototype.attachToShadowRoot=function(){f.importCssString(S,"ace_editor.css",this.container)},M.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},M.prototype.$updateCustomScrollbar=function(L){var j=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),L===!0?(this.scrollBarV=new m(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(F){j.$scrollAnimation||j.session.setScrollTop(F.data-j.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(F){j.$scrollAnimation||j.session.setScrollLeft(F.data-j.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new A(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new s(this.container,this),this.scrollBarH=new g(this.container,this),this.scrollBarV.addEventListener("scroll",function(F){j.$scrollAnimation||j.session.setScrollTop(F.data-j.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(F){j.$scrollAnimation||j.session.setScrollLeft(F.data-j.scrollMargin.left)}))},M.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var L=this;this.$resizeTimer=v.delayedCall(function(){L.destroyed||L.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(j){var F=j[0].contentRect.width,D=j[0].contentRect.height;Math.abs(L.$size.width-F)>1||Math.abs(L.$size.height-D)>1?L.$resizeTimer.delay():L.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},M})();N.prototype.CHANGE_CURSOR=1,N.prototype.CHANGE_MARKER=2,N.prototype.CHANGE_GUTTER=4,N.prototype.CHANGE_SCROLL=8,N.prototype.CHANGE_LINES=16,N.prototype.CHANGE_TEXT=32,N.prototype.CHANGE_SIZE=64,N.prototype.CHANGE_MARKER_BACK=128,N.prototype.CHANGE_MARKER_FRONT=256,N.prototype.CHANGE_FULL=512,N.prototype.CHANGE_H_SCROLL=1024,N.prototype.$changes=0,N.prototype.$padding=null,N.prototype.$frozen=!1,N.prototype.STEPS=8,h.implement(N.prototype,R),o.defineOptions(N.prototype,"renderer",{useResizeObserver:{set:function(M){!M&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):M&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(M){this.$textLayer.setShowInvisibles(M)&&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(M){typeof M=="number"&&(this.$printMarginColumn=M),this.$showPrintMargin=!!M,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(M){this.$gutter.style.display=M?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(M){this.$gutterLayer.$useSvgGutterIcons=M},initialValue:!1},showFoldedAnnotations:{set:function(M){this.$gutterLayer.$showFoldedAnnotations=M},initialValue:!1},fadeFoldWidgets:{set:function(M){f.setCssClass(this.$gutter,"ace_fade-fold-widgets",M)},initialValue:!1},showFoldWidgets:{set:function(M){this.$gutterLayer.setShowFoldWidgets(M),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(M){this.$textLayer.setDisplayIndentGuides(M)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(M){this.$textLayer.setHighlightIndentGuides(M)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(M){this.$gutterLayer.setHighlightGutterLine(M),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(M){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(M){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(M){typeof M=="number"&&(M=M+"px"),this.container.style.fontSize=M,this.updateFontSize()},initialValue:12},fontFamily:{set:function(M){this.container.style.fontFamily=M,this.updateFontSize()}},maxLines:{set:function(M){this.updateFull()}},minLines:{set:function(M){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(M){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(M){M=+M||0,this.$scrollPastEnd!=M&&(this.$scrollPastEnd=M,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(M){this.$gutterLayer.$fixedWidth=!!M,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(M){this.$updateCustomScrollbar(M)},initialValue:!1},theme:{set:function(M){this.setTheme(M)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!C.isMobile&&!C.isIE}}),r.VirtualRenderer=N}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,r,d){var h=e("../lib/oop"),f=e("../lib/net"),v=e("../lib/event_emitter").EventEmitter,o=e("../config");function p(g){var s="importScripts('"+f.qualifyURL(g)+"');";try{return new Blob([s],{type:"application/javascript"})}catch{var c=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new c;return m.append(s),m.getBlob("application/javascript")}}function i(g){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(o.get("loadWorkerFromBlob")){var s=p(g),c=window.URL||window.webkitURL,m=c.createObjectURL(s);return new Worker(m)}return new Worker(g)}var a=function(g){g.postMessage||(g=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=g,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,v),this.$createWorkerFromOldConfig=function(g,s,c,m,w){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),o.get("packaged")||!e.toUrl)m=m||o.moduleUrl(s,"worker");else{var x=this.$normalizePath;m=m||x(e.toUrl("ace/worker/worker.js",null,"_"));var R={};g.forEach(function(S){R[S]=x(e.toUrl(S,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=i(m),w&&this.send("importScripts",w),this.$worker.postMessage({init:!0,tlns:R,module:s,classname:c}),this.$worker},this.onMessage=function(g){var s=g.data;switch(s.type){case"event":this._signal(s.name,{data:s.data});break;case"call":var c=this.callbacks[s.id];c&&(c(s.data),delete this.callbacks[s.id]);break;case"error":this.reportError(s.data);break;case"log":window.console&&console.log&&console.log.apply(console,s.data);break}},this.reportError=function(g){window.console&&console.error&&console.error(g)},this.$normalizePath=function(g){return f.qualifyURL(g)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(g){g.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(g,s){this.$worker.postMessage({command:g,args:s})},this.call=function(g,s,c){if(c){var m=this.callbackId++;this.callbacks[m]=c,s.push(m)}this.send(g,s)},this.emit=function(g,s){try{s.data&&s.data.err&&(s.data.err={message:s.data.err.message,stack:s.data.err.stack,code:s.data.err.code}),this.$worker&&this.$worker.postMessage({event:g,data:{data:s.data}})}catch(c){console.error(c.stack)}},this.attachToDocument=function(g){this.$doc&&this.terminate(),this.$doc=g,this.call("setValue",[g.getValue()]),g.on("change",this.changeListener,!0)},this.changeListener=function(g){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),g.action=="insert"?this.deltaQueue.push(g.start,g.lines):this.deltaQueue.push(g.start,g.end)},this.$sendDeltaQueue=function(){var g=this.deltaQueue;g&&(this.deltaQueue=null,g.length>50&&g.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:g}))}}).call(a.prototype);var u=function(g,s,c){var m=null,w=!1,x=Object.create(v),R=[],S=new a({messageBuffer:R,terminate:function(){},postMessage:function(C){R.push(C),m&&(w?setTimeout(A):A())}});S.setEmitSync=function(C){w=C};var A=function(){var C=R.shift();C.command?m[C.command].apply(m,C.args):C.event&&x._signal(C.event,C.data)};return x.postMessage=function(C){S.onMessage({data:C})},x.callback=function(C,O){this.postMessage({type:"call",id:O,data:C})},x.emit=function(C,O){this.postMessage({type:"event",name:C,data:O})},o.loadModule(["worker",s],function(C){for(m=new C[c](x);R.length;)A()}),S};r.UIWorkerClient=u,r.WorkerClient=a,r.createWorker=i}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,r,d){var h=e("./range").Range,f=e("./lib/event_emitter").EventEmitter,v=e("./lib/oop"),o=(function(){function p(i,a,u,g,s,c){var m=this;this.length=a,this.session=i,this.doc=i.getDocument(),this.mainClass=s,this.othersClass=c,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=g,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=u;var w=i.getUndoManager().$undoStack||i.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=w.length,this.setup(),i.selection.on("changeCursor",this.$onCursorChange)}return p.prototype.setup=function(){var i=this,a=this.doc,u=this.session;this.selectionBefore=u.selection.toJSON(),u.selection.inMultiSelectMode&&u.selection.toSingleRange(),this.pos=a.createAnchor(this.$pos.row,this.$pos.column);var g=this.pos;g.$insertRight=!0,g.detach(),g.markerId=u.addMarker(new h(g.row,g.column,g.row,g.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(s){var c=a.createAnchor(s.row,s.column);c.$insertRight=!0,c.detach(),i.others.push(c)}),u.setUndoSelect(!1)},p.prototype.showOtherMarkers=function(){if(!this.othersActive){var i=this.session,a=this;this.othersActive=!0,this.others.forEach(function(u){u.markerId=i.addMarker(new h(u.row,u.column,u.row,u.column+a.length),a.othersClass,null,!1)})}},p.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var i=0;i<this.others.length;i++)this.session.removeMarker(this.others[i].markerId)}},p.prototype.onUpdate=function(i){if(this.$updating)return this.updateAnchors(i);var a=i;if(a.start.row===a.end.row&&a.start.row===this.pos.row){this.$updating=!0;var u=i.action==="insert"?a.end.column-a.start.column:a.start.column-a.end.column,g=a.start.column>=this.pos.column&&a.start.column<=this.pos.column+this.length+1,s=a.start.column-this.pos.column;if(this.updateAnchors(i),g&&(this.length+=u),g&&!this.session.$fromUndo){if(i.action==="insert")for(var c=this.others.length-1;c>=0;c--){var m=this.others[c],w={row:m.row,column:m.column+s};this.doc.insertMergedLines(w,i.lines)}else if(i.action==="remove")for(var c=this.others.length-1;c>=0;c--){var m=this.others[c],w={row:m.row,column:m.column+s};this.doc.remove(new h(w.row,w.column,w.row,w.column-u))}}this.$updating=!1,this.updateMarkers()}},p.prototype.updateAnchors=function(i){this.pos.onChange(i);for(var a=this.others.length;a--;)this.others[a].onChange(i);this.updateMarkers()},p.prototype.updateMarkers=function(){if(!this.$updating){var i=this,a=this.session,u=function(s,c){a.removeMarker(s.markerId),s.markerId=a.addMarker(new h(s.row,s.column,s.row,s.column+i.length),c,null,!1)};u(this.pos,this.mainClass);for(var g=this.others.length;g--;)u(this.others[g],this.othersClass)}},p.prototype.onCursorChange=function(i){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",i)):(this.hideOtherMarkers(),this._emit("cursorLeave",i))}},p.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},p.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var i=this.session.getUndoManager(),a=(i.$undoStack||i.$undostack).length-this.$undoStackDepth,u=0;u<a;u++)i.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},p})();v.implement(o.prototype,f),r.PlaceHolder=o}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,d){var h=e("../lib/event"),f=e("../lib/useragent");function v(p,i){return p.row==i.row&&p.column==i.column}function o(p){var i=p.domEvent,a=i.altKey,u=i.shiftKey,g=i.ctrlKey,s=p.getAccelKey(),c=p.getButton();if(g&&f.isMac&&(c=i.button),p.editor.inMultiSelectMode&&c==2){p.editor.textInput.onContextMenu(p.domEvent);return}if(!g&&!a&&!s){c===0&&p.editor.inMultiSelectMode&&p.editor.exitMultiSelectMode();return}if(c===0){var m=p.editor,w=m.selection,x=m.inMultiSelectMode,R=p.getDocumentPosition(),S=w.getCursor(),A=p.inSelection()||w.isEmpty()&&v(R,S),C=p.x,O=p.y,N=function(Z){C=Z.clientX,O=Z.clientY},M=m.session,L=m.renderer.pixelToScreenCoordinates(C,O),j=L,F;if(m.$mouseHandler.$enableJumpToDef)g&&a||s&&a?F=u?"block":"add":a&&m.$blockSelectEnabled&&(F="block");else if(s&&!a){if(F="add",!x&&u)return}else a&&m.$blockSelectEnabled&&(F="block");if(F&&f.isMac&&i.ctrlKey&&m.$mouseHandler.cancelContextMenu(),F=="add"){if(!x&&A)return;if(!x){var D=w.toOrientedRange();m.addSelectionMarker(D)}var $=w.rangeList.rangeAtPoint(R);m.inVirtualSelectionMode=!0,u&&($=null,D=w.ranges[0]||D,m.removeSelectionMarker(D)),m.once("mouseup",function(){var Z=w.toOrientedRange();$&&Z.isEmpty()&&v($.cursor,Z.cursor)?w.substractPoint(Z.cursor):(u?w.substractPoint(D.cursor):D&&(m.removeSelectionMarker(D),w.addRange(D)),w.addRange(Z)),m.inVirtualSelectionMode=!1})}else if(F=="block"){p.stop(),m.inVirtualSelectionMode=!0;var _,I=[],z=function(){var Z=m.renderer.pixelToScreenCoordinates(C,O),oe=M.screenToDocumentPosition(Z.row,Z.column,Z.offsetX);v(j,Z)&&v(oe,w.lead)||(j=Z,m.selection.moveToPosition(oe),m.renderer.scrollCursorIntoView(),m.removeSelectionMarkers(I),I=w.rectangularRangeBlock(j,L),m.$mouseHandler.$clickSelection&&I.length==1&&I[0].isEmpty()&&(I[0]=m.$mouseHandler.$clickSelection.clone()),I.forEach(m.addSelectionMarker,m),m.updateSelectionMarkers())};x&&!s?w.toSingleRange():!x&&s&&(_=w.toOrientedRange(),m.addSelectionMarker(_)),u?L=M.documentToScreenPosition(w.lead):w.moveToPosition(R),j={row:-1,column:-1};var U=function(Z){z(),clearInterval(K),m.removeSelectionMarkers(I),I.length||(I=[w.toOrientedRange()]),_&&(m.removeSelectionMarker(_),w.toSingleRange(_));for(var oe=0;oe<I.length;oe++)w.addRange(I[oe]);m.inVirtualSelectionMode=!1,m.$mouseHandler.$clickSelection=null},V=z;h.capture(m.container,N,U);var K=setInterval(function(){V()},20);return p.preventDefault()}}}r.onMouseDown=o}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,r,d){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(f){f.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(f){f.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(f){f.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(f){f.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(f){f.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(f){f.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(f){f.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(f){f.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(f){f.multiSelect.rangeCount>1?f.multiSelect.joinSelections():f.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(f){f.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(f){f.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(f){f.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(f){f.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(f){return f&&f.inMultiSelectMode}}];var h=e("../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(e,r,d){var h=e("./range_list").RangeList,f=e("./range").Range,v=e("./selection").Selection,o=e("./mouse/multi_select_handler").onMouseDown,p=e("./lib/event"),i=e("./lib/lang"),a=e("./commands/multi_select_commands");r.commands=a.defaultCommands.concat(a.multiSelectCommands);var u=e("./search").Search,g=new u;function s(S,A,C){return g.$options.wrap=!0,g.$options.needle=A,g.$options.backwards=C==-1,g.find(S)}var c=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(c.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(S,A){if(S){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add(S),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),A||this.fromOrientedRange(S);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}S.cursor||(S.cursor=S.end);var O=this.rangeList.add(S);return this.$onAddRange(S),O.length&&this.$onRemoveRange(O),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),A||this.fromOrientedRange(S)}},this.toSingleRange=function(S){S=S||this.ranges[0];var A=this.rangeList.removeAll();A.length&&this.$onRemoveRange(A),S&&this.fromOrientedRange(S)},this.substractPoint=function(S){var A=this.rangeList.substractPoint(S);if(A)return this.$onRemoveRange(A),A[0]},this.mergeOverlappingRanges=function(){var S=this.rangeList.merge();S.length&&this.$onRemoveRange(S)},this.$onAddRange=function(S){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(S),this._signal("addRange",{range:S})},this.$onRemoveRange=function(S){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var A=this.rangeList.ranges.pop();S.push(A),this.rangeCount=0}for(var C=S.length;C--;){var O=this.ranges.indexOf(S[C]);this.ranges.splice(O,1)}this._signal("removeRange",{ranges:S}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),A=A||this.ranges[0],A&&!A.isEqual(this.getRange())&&this.fromOrientedRange(A)},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 S=this.ranges.length?this.ranges:[this.getRange()],A=[],C=0;C<S.length;C++){var O=S[C],N=O.start.row,M=O.end.row;if(N===M)A.push(O.clone());else{for(A.push(new f(N,O.start.column,N,this.session.getLine(N).length));++N<M;)A.push(this.getLineRange(N,!0));A.push(new f(M,0,M,O.end.column))}C==0&&!this.isBackwards()&&(A=A.reverse())}this.toSingleRange();for(var C=A.length;C--;)this.addRange(A[C])},this.joinSelections=function(){var S=this.rangeList.ranges,A=S[S.length-1],C=f.fromPoints(S[0].start,A.end);this.toSingleRange(),this.setSelectionRange(C,A.cursor==A.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var S=this.rangeList.ranges,A=S[S.length-1],C=f.fromPoints(S[0].start,A.end);this.toSingleRange(),this.setSelectionRange(C,A.cursor==A.start)}else{var O=this.session.documentToScreenPosition(this.cursor),N=this.session.documentToScreenPosition(this.anchor),M=this.rectangularRangeBlock(O,N);M.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(S,A,C){var O=[],N=S.column<A.column;if(N)var M=S.column,L=A.column,j=S.offsetX,F=A.offsetX;else var M=A.column,L=S.column,j=A.offsetX,F=S.offsetX;var D=S.row<A.row;if(D)var $=S.row,_=A.row;else var $=A.row,_=S.row;M<0&&(M=0),$<0&&($=0),$==_&&(C=!0);for(var I,z=$;z<=_;z++){var U=f.fromPoints(this.session.screenToDocumentPosition(z,M,j),this.session.screenToDocumentPosition(z,L,F));if(U.isEmpty()){if(I&&w(U.end,I))break;I=U.end}U.cursor=N?U.start:U.end,O.push(U)}if(D&&O.reverse(),!C){for(var V=O.length-1;O[V].isEmpty()&&V>0;)V--;if(V>0)for(var K=0;O[K].isEmpty();)K++;for(var Z=V;Z>=K;Z--)O[Z].isEmpty()&&O.splice(Z,1)}return O}}).call(v.prototype);var m=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(S){S.cursor||(S.cursor=S.end);var A=this.getSelectionStyle();return S.marker=this.session.addMarker(S,"ace_selection",A),this.session.$selectionMarkers.push(S),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,S},this.removeSelectionMarker=function(S){if(S.marker){this.session.removeMarker(S.marker);var A=this.session.$selectionMarkers.indexOf(S);A!=-1&&this.session.$selectionMarkers.splice(A,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(S){for(var A=this.session.$selectionMarkers,C=S.length;C--;){var O=S[C];if(O.marker){this.session.removeMarker(O.marker);var N=A.indexOf(O);N!=-1&&A.splice(N,1)}}this.session.selectionMarkerCount=A.length},this.$onAddRange=function(S){this.addSelectionMarker(S.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(S){this.removeSelectionMarkers(S.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(S){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(S){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(S){var A=S.command,C=S.editor;if(C.multiSelect){if(A.multiSelectAction)A.multiSelectAction=="forEach"?O=C.forEachSelection(A,S.args):A.multiSelectAction=="forEachLine"?O=C.forEachSelection(A,S.args,!0):A.multiSelectAction=="single"?(C.exitMultiSelectMode(),O=A.exec(C,S.args||{})):O=A.multiSelectAction(C,S.args||{});else{var O=A.exec(C,S.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return O}},this.forEachSelection=function(S,A,C){if(!this.inVirtualSelectionMode){var O=C&&C.keepOrder,N=C==!0||C&&C.$byLines,M=this.session,L=this.selection,j=L.rangeList,F=(O?L:j).ranges,D;if(!F.length)return S.exec?S.exec(this,A||{}):S(this,A||{});var $=L._eventRegistry;L._eventRegistry={};var _=new v(M);this.inVirtualSelectionMode=!0;for(var I=F.length;I--;){if(N)for(;I>0&&F[I].start.row==F[I-1].end.row;)I--;_.fromOrientedRange(F[I]),_.index=I,this.selection=M.selection=_;var z=S.exec?S.exec(this,A||{}):S(this,A||{});!D&&z!==void 0&&(D=z),_.toOrientedRange(F[I])}_.detach(),this.selection=M.selection=L,this.inVirtualSelectionMode=!1,L._eventRegistry=$,L.mergeOverlappingRanges(),L.ranges[0]&&L.fromOrientedRange(L.ranges[0]);var U=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),U&&U.from==U.to&&this.renderer.animateScrolling(U.from),D}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var S="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var A=this.multiSelect.rangeList.ranges,C=[],O=0;O<A.length;O++)C.push(this.session.getTextRange(A[O]));var N=this.session.getDocument().getNewLineCharacter();S=C.join(N),S.length==(C.length-1)*N.length&&(S="")}else this.selection.isEmpty()||(S=this.session.getTextRange(this.getSelectionRange()));return S},this.$checkMultiselectChange=function(S,A){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&A==this.multiSelect.anchor)return;var O=A==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;O.row!=A.row||this.session.$clipPositionToDocument(O.row,O.column).column!=A.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(S,A,C){if(A=A||{},A.needle=S||A.needle,A.needle==null){var O=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();A.needle=this.session.getTextRange(O)}this.$search.set(A);var N=this.$search.findAll(this.session);if(!N.length)return 0;var M=this.multiSelect;C||M.toSingleRange(N[0]);for(var L=N.length;L--;)M.addRange(N[L],!0);return O&&M.rangeList.rangeAtPoint(O.start)&&M.addRange(O,!0),N.length},this.selectMoreLines=function(S,A){var C=this.selection.toOrientedRange(),O=C.cursor==C.end,N=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(N.column=this.selection.$desiredColumn);var M=this.session.screenToDocumentPosition(N.row+S,N.column);if(C.isEmpty())var j=M;else var L=this.session.documentToScreenPosition(O?C.end:C.start),j=this.session.screenToDocumentPosition(L.row+S,L.column);if(O){var F=f.fromPoints(M,j);F.cursor=F.start}else{var F=f.fromPoints(j,M);F.cursor=F.end}if(F.desiredColumn=N.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(A)var D=C.cursor;this.selection.addRange(F),D&&this.selection.substractPoint(D)},this.transposeSelections=function(S){for(var A=this.session,C=A.multiSelect,O=C.ranges,N=O.length;N--;){var M=O[N];if(M.isEmpty()){var L=A.getWordRange(M.start.row,M.start.column);M.start.row=L.start.row,M.start.column=L.start.column,M.end.row=L.end.row,M.end.column=L.end.column}}C.mergeOverlappingRanges();for(var j=[],N=O.length;N--;){var M=O[N];j.unshift(A.getTextRange(M))}S<0?j.unshift(j.pop()):j.push(j.shift());for(var N=O.length;N--;){var M=O[N],F=M.clone();A.replace(M,j[N]),M.start.row=F.start.row,M.start.column=F.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function(S,A,C){var O=this.session,N=O.multiSelect,M=N.toOrientedRange();if(!(M.isEmpty()&&(M=O.getWordRange(M.start.row,M.start.column),M.cursor=S==-1?M.start:M.end,this.multiSelect.addRange(M),C))){var L=O.getTextRange(M),j=s(O,L,S);j&&(j.cursor=S==-1?j.start:j.end,this.session.unfold(j),this.multiSelect.addRange(j),this.renderer.scrollCursorIntoView(null,.5)),A&&this.multiSelect.substractPoint(M.cursor)}},this.alignCursors=function(){var S=this.session,A=S.multiSelect,C=A.ranges,O=-1,N=C.filter(function(V){if(V.cursor.row==O)return!0;O=V.cursor.row});if(!C.length||N.length==C.length-1){var M=this.selection.getRange(),L=M.start.row,j=M.end.row,F=L==j;if(F){var D=this.session.getLength(),$;do $=this.session.getLine(j);while(/[=:]/.test($)&&++j<D);do $=this.session.getLine(L);while(/[=:]/.test($)&&--L>0);L<0&&(L=0),j>=D&&(j=D-1)}var _=this.session.removeFullLines(L,j);_=this.$reAlignText(_,F),this.session.insert({row:L,column:0},_.join(`
|
|
954
|
+
`)+`
|
|
955
|
+
`),F||(M.start.column=0,M.end.column=_[_.length-1].length),this.selection.setRange(M)}else{N.forEach(function(V){A.substractPoint(V.cursor)});var I=0,z=1/0,U=C.map(function(V){var K=V.cursor,Z=S.getLine(K.row),oe=Z.substr(K.column).search(/\S/g);return oe==-1&&(oe=0),K.column>I&&(I=K.column),oe<z&&(z=oe),oe});C.forEach(function(V,K){var Z=V.cursor,oe=I-Z.column,ee=U[K]-z;oe>ee?S.insert(Z,i.stringRepeat(" ",oe-ee)):S.remove(new f(Z.row,Z.column,Z.row,Z.column-oe+ee)),V.start.column=V.end.column=I,V.start.row=V.end.row=Z.row,V.cursor=V.end}),A.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(S,A){var C=!0,O=!0,N,M,L;return S.map(function(_){var I=_.match(/(\s*)(.*?)(\s*)([=:].*)/);return I?N==null?(N=I[1].length,M=I[2].length,L=I[3].length,I):(N+M+L!=I[1].length+I[2].length+I[3].length&&(O=!1),N!=I[1].length&&(C=!1),N>I[1].length&&(N=I[1].length),M<I[2].length&&(M=I[2].length),L>I[3].length&&(L=I[3].length),I):[_]}).map(A?F:C?O?D:F:$);function j(_){return i.stringRepeat(" ",_)}function F(_){return _[2]?j(N)+_[2]+j(M-_[2].length+L)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}function D(_){return _[2]?j(N+M-_[2].length)+_[2]+j(L)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}function $(_){return _[2]?j(N)+_[2]+j(L)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}}}).call(m.prototype);function w(S,A){return S.row==A.row&&S.column==A.column}r.onSessionChange=function(S){var A=S.session;A&&!A.multiSelect&&(A.$selectionMarkers=[],A.selection.$initRangeList(),A.multiSelect=A.selection),this.multiSelect=A&&A.multiSelect;var C=S.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)),A&&(A.multiSelect.on("addRange",this.$onAddRange),A.multiSelect.on("removeRange",this.$onRemoveRange),A.multiSelect.on("multiSelect",this.$onMultiSelect),A.multiSelect.on("singleSelect",this.$onSingleSelect),A.multiSelect.lead.on("change",this.$checkMultiselectChange),A.multiSelect.anchor.on("change",this.$checkMultiselectChange)),A&&this.inMultiSelectMode!=A.selection.inMultiSelectMode&&(A.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function x(S){S.$multiselectOnSessionChange||(S.$onAddRange=S.$onAddRange.bind(S),S.$onRemoveRange=S.$onRemoveRange.bind(S),S.$onMultiSelect=S.$onMultiSelect.bind(S),S.$onSingleSelect=S.$onSingleSelect.bind(S),S.$multiselectOnSessionChange=r.onSessionChange.bind(S),S.$checkMultiselectChange=S.$checkMultiselectChange.bind(S),S.$multiselectOnSessionChange(S),S.on("changeSession",S.$multiselectOnSessionChange),S.on("mousedown",o),S.commands.addCommands(a.defaultCommands),R(S))}function R(S){if(!S.textInput)return;var A=S.textInput.getElement(),C=!1;p.addListener(A,"keydown",function(N){var M=N.keyCode==18&&!(N.ctrlKey||N.shiftKey||N.metaKey);S.$blockSelectEnabled&&M?C||(S.renderer.setMouseCursor("crosshair"),C=!0):C&&O()},S),p.addListener(A,"keyup",O,S),p.addListener(A,"blur",O,S);function O(N){C&&(S.renderer.setMouseCursor(""),C=!1)}}r.MultiSelect=x,e("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(S){x(this),S?this.on("mousedown",o):this.off("mousedown",o)},value:!0},enableBlockSelect:{set:function(S){this.$blockSelectEnabled=S},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,r,d){var h=e("../../range").Range,f=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(v,o,p){var i=v.getLine(p);return this.foldingStartMarker.test(i)?"start":o=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(v,o,p){return null},this.indentationBlock=function(v,o,p){var i=/\S/,a=v.getLine(o),u=a.search(i);if(u!=-1){for(var g=p||a.length,s=v.getLength(),c=o,m=o;++o<s;){var w=v.getLine(o).search(i);if(w!=-1){if(w<=u){var x=v.getTokenAt(o,0);if(!x||x.type!=="string")break}m=o}}if(m>c){var R=v.getLine(m).length;return new h(c,g,m,R)}}},this.openingBracketBlock=function(v,o,p,i,a){var u={row:p,column:i+1},g=v.$findClosingBracket(o,u,a);if(g){var s=v.foldWidgets[g.row];return s==null&&(s=v.getFoldWidget(g.row)),s=="start"&&g.row>u.row&&(g.row--,g.column=v.getLine(g.row).length),h.fromPoints(u,g)}},this.closingBracketBlock=function(v,o,p,i,a){var u={row:p,column:i},g=v.$findOpeningBracket(o,u);if(g)return g.column++,u.column--,h.fromPoints(g,u)}}).call(f.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,r,d){var h=e("../lib/dom"),f=e("../range").Range,v=e("../config").nls;function o(i,a,u){for(var g=0,s=i.length-1;g<=s;){var c=g+s>>1,m=u(a,i[c]);if(m>0)g=c+1;else if(m<0)s=c-1;else return c}return-(g+1)}function p(i,a,u){var g=i.getAnnotations().sort(f.comparePoints);if(g.length){var s=o(g,{row:a,column:-1},f.comparePoints);s<0&&(s=-s-1),s>=g.length?s=u>0?0:g.length-1:s===0&&u<0&&(s=g.length-1);var c=g[s];if(!(!c||!u)){if(c.row===a){do c=g[s+=u];while(c&&c.row===a);if(!c)return g.slice()}var m=[];a=c.row;do m[u<0?"unshift":"push"](c),c=g[s+=u];while(c&&c.row==a);return m.length&&m}}}r.showErrorMarker=function(i,a){var u=i.session,g=i.getCursorPosition(),s=g.row,c=u.widgetManager.getWidgetsAtRow(s).filter(function(N){return N.type=="errorMarker"})[0];c?c.destroy():s-=a;var m=p(u,s,a),w;if(m){var x=m[0];g.column=(x.pos&&typeof x.column!="number"?x.pos.sc:x.column)||0,g.row=x.row,w=i.renderer.$gutterLayer.$annotations[g.row]}else{if(c)return;w={displayText:[v("error-marker.good-state","Looks good!")],className:"ace_ok"}}i.session.unfold(g.row),i.selection.moveToPosition(g);var R={row:g.row,fixedWidth:!0,coverGutter:!0,el:h.createElement("div"),type:"errorMarker"},S=R.el.appendChild(h.createElement("div")),A=R.el.appendChild(h.createElement("div"));A.className="error_widget_arrow "+w.className;var C=i.renderer.$cursorLayer.getPixelPosition(g).left;A.style.left=C+i.renderer.gutterWidth-5+"px",R.el.className="error_widget_wrapper",S.className="error_widget "+w.className,w.displayText.forEach(function(N,M){S.appendChild(h.createTextNode(N)),M<w.displayText.length-1&&S.appendChild(h.createElement("br"))}),S.appendChild(h.createElement("div"));var O=function(N,M,L){if(M===0&&(L==="esc"||L==="return"))return R.destroy(),{command:"null"}};R.destroy=function(){i.$mouseHandler.isMousePressed||(i.keyBinding.removeKeyboardHandler(O),u.widgetManager.removeLineWidget(R),i.off("changeSelection",R.destroy),i.off("changeSession",R.destroy),i.off("mouseup",R.destroy),i.off("change",R.destroy))},i.keyBinding.addKeyboardHandler(O),i.on("changeSelection",R.destroy),i.on("changeSession",R.destroy),i.on("mouseup",R.destroy),i.on("change",R.destroy),i.session.widgetManager.addLineWidget(R),R.el.onmousedown=i.focus.bind(i),i.renderer.scrollCursorIntoView(null,.5,{bottom:R.el.offsetHeight})},h.importCssString(`
|
|
956
|
+
.error_widget_wrapper {
|
|
957
|
+
background: inherit;
|
|
958
|
+
color: inherit;
|
|
959
|
+
border:none
|
|
960
|
+
}
|
|
961
|
+
.error_widget {
|
|
962
|
+
border-top: solid 2px;
|
|
963
|
+
border-bottom: solid 2px;
|
|
964
|
+
margin: 5px 0;
|
|
965
|
+
padding: 10px 40px;
|
|
966
|
+
white-space: pre-wrap;
|
|
967
|
+
}
|
|
968
|
+
.error_widget.ace_error, .error_widget_arrow.ace_error{
|
|
969
|
+
border-color: #ff5a5a
|
|
970
|
+
}
|
|
971
|
+
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
|
|
972
|
+
border-color: #F1D817
|
|
973
|
+
}
|
|
974
|
+
.error_widget.ace_info, .error_widget_arrow.ace_info{
|
|
975
|
+
border-color: #5a5a5a
|
|
976
|
+
}
|
|
977
|
+
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
|
|
978
|
+
border-color: #5aaa5a
|
|
979
|
+
}
|
|
980
|
+
.error_widget_arrow {
|
|
981
|
+
position: absolute;
|
|
982
|
+
border: solid 5px;
|
|
983
|
+
border-top-color: transparent!important;
|
|
984
|
+
border-right-color: transparent!important;
|
|
985
|
+
border-left-color: transparent!important;
|
|
986
|
+
top: -5px;
|
|
987
|
+
}
|
|
988
|
+
`,"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(e,r,d){e("./loader_build")(r);var h=e("./lib/dom"),f=e("./range").Range,v=e("./editor").Editor,o=e("./edit_session").EditSession,p=e("./undomanager").UndoManager,i=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),r.config=e("./config"),r.edit=function(u,g){if(typeof u=="string"){var s=u;if(u=document.getElementById(s),!u)throw new Error("ace.edit can't find div #"+s)}if(u&&u.env&&u.env.editor instanceof v)return u.env.editor;var c="";if(u&&/input|textarea/i.test(u.tagName)){var m=u;c=m.value,u=h.createElement("pre"),m.parentNode.replaceChild(u,m)}else u&&(c=u.textContent,u.innerHTML="");var w=r.createEditSession(c),x=new v(new i(u),w,g),R={document:w,editor:x,onResize:x.resize.bind(x,null)};return m&&(R.textarea=m),x.on("destroy",function(){R.editor.container.env=null}),x.container.env=x.env=R,x},r.createEditSession=function(u,g){var s=new o(u,g);return s.setUndoManager(new p),s},r.Range=f,r.Editor=v,r.EditSession=o,r.UndoManager=p,r.VirtualRenderer=i;var a=r.config.version;r.version=a}),(function(){ace.require(["ace/ace"],function(e){e&&(e.config.init(!0),e.define=ace.define);var r=(function(){return this})();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=e);for(var d in e)e.hasOwnProperty(d)&&(r.ace[d]=e[d]);r.ace.default=r.ace,n&&(n.exports=r.ace)})})()})(Pm)),Pm.exports}var ks=Mn("m",mS()),zm={exports:{}},Bm;function vS(){return Bm||(Bm=1,(function(n,t){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,d){var h=e("../lib/oop"),f=e("./text_highlight_rules").TextHighlightRules,v=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 o=r.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},p=r.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},i=r.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},a=r.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},u=r.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},g=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},s=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},c=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",R="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",S="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",A=this.$keywords=this.createKeywordMapper({keyword:x,"constant.language":R,"variable.language":S,"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})*})`,O={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};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(N,M,L){L.length&&(L=[]);var j=N[N.length-1];return L.unshift(j,M),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(N,M,L){L.length&&(L=[]);var j=N[N.length-1];return L.unshift(j,M),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(N,M,L){L.length&&(L=[]);var j=N[N.length-1];return L.unshift(j,M),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(N,M,L){L.length&&(L=[]);var j=N[N.length-1];return L.unshift(j,M),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(N,M,L){L.length&&(L=[]);var j=N[N.length-1];return L.unshift(j,M),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},c,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+C+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},u,g,v,o,s,p,i,a,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:A,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(N,M,L){var j=N[2]=="-"||N[2]=="~"?"indentedHeredoc":"heredoc",F=N.split(this.splitRegex);return L.push(j,F[3]),[{type:"constant",value:F[1]},{type:"string",value:F[2]},{type:"support.class",value:F[3]},{type:"string",value:F[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(N,M,L){return N===L[1]?(L.shift(),L.shift(),this.next=L[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(N,M,L){return N===L[1]?(L.shift(),L.shift(),this.next=L[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(N,M){return M[0]==="heredoc"||M[0]==="indentedHeredoc"?M[0]:N}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(N,M,L){return this.next="",N=="}"&&L.length>1&&L[1]!="start"&&(L.shift(),this.next=L.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(N,M,L){return L.length&&N===L[0]?(L.unshift(N,M),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(N,M,L){return L.length&&N===O[L[0]]?(L.shift(),this.next=L.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(N,M,L){return L.length&&N===L[0]?(L.unshift(N,M),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(N,M,L){return L.length&&N===O[L[0]]?(L.shift(),this.next=L.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(N,M,L){return L.length&&N===L[0]?(L.unshift(N,M),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(N,M,L){return L.length&&N===O[L[0]]?(L.shift(),this.next=L.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(N,M,L){return L.length&&N===L[0]?(L.unshift(N,M),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(N,M,L){return L.length&&N===O[L[0]]?(L.shift(),this.next=L.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(N,M,L){return L.length&&N===L[0]?(L.unshift(N,M),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(N,M,L){return L.length&&N[0]===O[L[0]]?(L.shift(),this.next=L.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,f),r.RubyHighlightRules=m}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,d){var h=e("../range").Range,f=function(){};(function(){this.checkOutdent=function(v,o){return/^\s+$/.test(v)?/^\s*\}/.test(o):!1},this.autoOutdent=function(v,o){var p=v.getLine(o),i=p.match(/^(\s*\})/);if(!i)return 0;var a=i[1].length,u=v.findMatchingBracket({row:o,column:a});if(!u||u.row==o)return 0;var g=this.$getIndent(v.getLine(u.row));v.replace(new h(o,0,o,a-1),g)},this.$getIndent=function(v){return v.match(/^\s*/)[0]}}).call(f.prototype),r.MatchingBraceOutdent=f}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,r,d){var h=e("../../lib/oop"),f=e("./fold_mode").FoldMode,v=e("../../range").Range,o=e("../../token_iterator").TokenIterator,p=r.FoldMode=function(){};h.inherits(p,f),(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(i,a,u){var g=i.getLine(u),s=this.foldingStartMarker.test(g),c=this.foldingStopMarker.test(g);if(s&&!c){var m=g.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(g)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(g)===!1)||m[1]=="when"&&/\sthen\s/.test(g)===!0)return;if(i.getTokenAt(u,m.index+2).type==="keyword")return"start"}else if(!m[3]||i.getTokenAt(u,m.index+1).type==="comment.multiline")return"start"}if(a!="markbeginend"||!c||s&&c)return"";var m=g.match(this.foldingStopMarker);if(m[3]==="end"){if(i.getTokenAt(u,m.index+1).type==="keyword")return"end"}else if(!m[1]||i.getTokenAt(u,m.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(i,a,u){var g=i.doc.getLine(u),s=this.foldingStartMarker.exec(g);if(s)return s[1]||s[3]?this.rubyBlock(i,u,s.index+2):this.openingBracketBlock(i,"{",u,s.index);var s=this.foldingStopMarker.exec(g);if(s)return s[3]==="end"&&i.getTokenAt(u,s.index+1).type==="keyword"?this.rubyBlock(i,u,s.index+1):s[1]==="=end"&&i.getTokenAt(u,s.index+1).type==="comment.multiline"?this.rubyBlock(i,u,s.index+1):this.closingBracketBlock(i,"}",u,s.index+s[0].length)},this.rubyBlock=function(i,a,u,g){var s=new o(i,a,u),c=s.getCurrentToken();if(!(!c||c.type!="keyword"&&c.type!="comment.multiline")){var m=c.value,w=i.getLine(a);switch(c.value){case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+c.value);if(!x.test(w))return;var R=this.indentKeywords[m];break;case"when":if(/\sthen\s/.test(w))return;case"elsif":case"rescue":case"ensure":var R=1;break;case"else":var x=new RegExp("^\\s*"+c.value+"\\s*$");if(!x.test(w))return;var R=1;break;default:var R=this.indentKeywords[m]}var S=[m];if(R){var A=R===-1?i.getLine(a-1).length:i.getLine(a).length,C=a,O=[];if(O.push(s.getCurrentTokenRange()),s.step=R===-1?s.stepBackward:s.stepForward,c.type=="comment.multiline"){for(;c=s.step();)if(c.type==="comment.multiline"){if(R==1){if(A=6,c.value=="=end")break}else if(c.value=="=begin")break}}else for(;c=s.step();){var N=!1;if(c.type==="keyword"){var M=R*this.indentKeywords[c.value];switch(w=i.getLine(s.getCurrentTokenRow()),c.value){case"do":for(var L=s.$tokenIndex-1;L>=0;L--){var j=s.$rowTokens[L];if(j&&(j.value=="while"||j.value=="until"||j.value=="for")){M=0;break}}break;case"else":var x=new RegExp("^\\s*"+c.value+"\\s*$");(!x.test(w)||m=="case")&&(M=0,N=!0);break;case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+c.value);x.test(w)||(M=0,N=!0);break;case"when":(/\sthen\s/.test(w)||m=="case")&&(M=0,N=!0)}if(M>0)S.unshift(c.value);else if(M<=0&&N===!1){if(S.shift(),!S.length&&((m=="while"||m=="until"||m=="for")&&c.value!="do"||c.value=="do"&&R==-1&&M!=0||c.value!="do"))break;M===0&&S.unshift(c.value)}}}if(!c)return null;if(g)return O.push(s.getCurrentTokenRange()),O;var a=s.getCurrentTokenRow();if(R===-1){if(c.type==="comment.multiline")var F=6;else var F=i.getLine(a).length;return new v(a,F,C-1,A)}return new v(C,A,a-1,i.getLine(a-1).length)}}}}).call(p.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(e,r,d){var h=e("../lib/oop"),f=e("./text").Mode,v=e("./ruby_highlight_rules").RubyHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,p=e("../range").Range,i=e("./folding/ruby").FoldMode,a=function(){this.HighlightRules=v,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new i,this.indentKeywords=this.foldingRules.indentKeywords};h.inherits(a,f),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,g,s){var c=this.$getIndent(g),m=this.getTokenizer().getLineTokens(g,u),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return c;if(u=="start"){var x=g.match(/^.*[\{\(\[]\s*$/),R=g.match(/^\s*(class|def|module)\s.*$/),S=g.match(/.*do(\s*|\s+\|.*\|\s*)$/),A=g.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(x||R||S||A)&&(c+=s)}return c},this.checkOutdent=function(u,g,s){return/^\s+(end|else|rescue|ensure)$/.test(g+s)||this.$outdent.checkOutdent(g,s)},this.autoOutdent=function(u,g,s){var c=g.getLine(s);if(/}/.test(c))return this.$outdent.autoOutdent(g,s);var m=this.$getIndent(c),w=g.getLine(s-1),x=this.$getIndent(w),R=g.getTabString();x.length<=m.length&&m.slice(-R.length)==R&&g.remove(new p(s,m.length-R.length,s,m.length))},this.getMatching=function(u,g,s){if(g==null){var c=u.selection.lead;s=c.column,g=c.row}var m=u.getTokenAt(g,s);if(m&&m.value in this.indentKeywords)return this.foldingRules.rubyBlock(u,g,s,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/ruby"],function(e){n&&(n.exports=e)})})()})(zm)),zm.exports}vS();var jm={exports:{}},Wm;function yS(){return Wm||(Wm=1,(function(n,t){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,d){var h=e("../lib/oop"),f=e("./text_highlight_rules").TextHighlightRules,v=function(){var o="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",p="True|False|None|NotImplemented|Ellipsis|__debug__",i="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":i,"variable.language":"self|cls","constant.language":p,keyword:o},"identifier"),u="[uU]?",g="[rR]",s="[fF]",c="(?:[rR][fF]|[fF][rR])",m="(?:(?:[1-9]\\d*)|(?:0))",w="(?:0[oO]?[0-7]+)",x="(?:0[xX][\\dA-Fa-f]+)",R="(?:0[bB][01]+)",S="(?:"+m+"|"+w+"|"+x+"|"+R+")",A="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",O="(?:\\d+)",N="(?:(?:"+O+"?"+C+")|(?:"+O+"\\.))",M="(?:(?:"+N+"|"+O+")"+A+")",L="(?:"+M+"|"+N+")",j=`\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})`;this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:u+'"{3}',next:"qqstring3"},{token:"string",regex:u+'"(?=.)',next:"qqstring"},{token:"string",regex:u+"'{3}",next:"qstring3"},{token:"string",regex:u+"'(?=.)",next:"qstring"},{token:"string",regex:g+'"{3}',next:"rawqqstring3"},{token:"string",regex:g+'"(?=.)',next:"rawqqstring"},{token:"string",regex:g+"'{3}",next:"rawqstring3"},{token:"string",regex:g+"'(?=.)",next:"rawqstring"},{token:"string",regex:s+'"{3}',next:"fqqstring3"},{token:"string",regex:s+'"(?=.)',next:"fqqstring"},{token:"string",regex:s+"'{3}",next:"fqstring3"},{token:"string",regex:s+"'(?=.)",next:"fqstring"},{token:"string",regex:c+'"{3}',next:"rfqqstring3"},{token:"string",regex:c+'"(?=.)',next:"rfqqstring"},{token:"string",regex:c+"'{3}",next:"rfqstring3"},{token:"string",regex:c+"'(?=.)",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:j},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:j},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:j},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:j},{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:j},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:j},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:j},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:j},{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:"(?:"+L+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:L},{token:"constant.numeric",regex:S+"[lL]\\b"},{token:"constant.numeric",regex:S+"\\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(v,f),r.PythonHighlightRules=v}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,d){var h=e("../../lib/oop"),f=e("./fold_mode").FoldMode,v=r.FoldMode=function(o){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+o+")(?:\\s*)(?:#.*)?$")};h.inherits(v,f),(function(){this.getFoldWidgetRange=function(o,p,i){var a=o.getLine(i),u=a.match(this.foldingStartMarker);if(u)return u[1]?this.openingBracketBlock(o,u[1],i,u.index):u[2]?this.indentationBlock(o,i,u.index+u[2].length):this.indentationBlock(o,i)}}).call(v.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(e,r,d){var h=e("../lib/oop"),f=e("./text").Mode,v=e("./python_highlight_rules").PythonHighlightRules,o=e("./folding/pythonic").FoldMode,p=e("../range").Range,i=function(){this.HighlightRules=v,this.foldingRules=new o("\\:"),this.$behaviour=this.$defaultBehaviour};h.inherits(i,f),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(u,g,s){var c=this.$getIndent(g),m=this.getTokenizer().getLineTokens(g,u),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return c;if(u=="start"){var x=g.match(/^.*[\{\(\[:]\s*$/);x&&(c+=s)}return c};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,g,s){if(s!==`\r
|
|
989
|
+
`&&s!=="\r"&&s!==`
|
|
990
|
+
`)return!1;var c=this.getTokenizer().getLineTokens(g.trim(),u).tokens;if(!c)return!1;do var m=c.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&a[m.value]:!1},this.autoOutdent=function(u,g,s){s+=1;var c=this.$getIndent(g.getLine(s)),m=g.getTabString();c.slice(-m.length)==m&&g.remove(new p(s,c.length-m.length,s,c.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(i.prototype),r.Mode=i}),(function(){ace.require(["ace/mode/python"],function(e){n&&(n.exports=e)})})()})(jm)),jm.exports}yS();var Hm={exports:{}},Um;function bS(){return Um||(Um=1,(function(n,t){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,d){var h=e("../lib/oop"),f=e("./text_highlight_rules").TextHighlightRules,v=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(v,f),r.JsonHighlightRules=v}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,d){var h=e("../range").Range,f=function(){};(function(){this.checkOutdent=function(v,o){return/^\s+$/.test(v)?/^\s*\}/.test(o):!1},this.autoOutdent=function(v,o){var p=v.getLine(o),i=p.match(/^(\s*\})/);if(!i)return 0;var a=i[1].length,u=v.findMatchingBracket({row:o,column:a});if(!u||u.row==o)return 0;var g=this.$getIndent(v.getLine(u.row));v.replace(new h(o,0,o,a-1),g)},this.$getIndent=function(v){return v.match(/^\s*/)[0]}}).call(f.prototype),r.MatchingBraceOutdent=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,d){var h=e("../../lib/oop"),f=e("../../range").Range,v=e("./fold_mode").FoldMode,o=r.FoldMode=function(p){p&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+p.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+p.end)))};h.inherits(o,v),(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(p,i,a){var u=p.getLine(a);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var g=this._getFoldWidgetBase(p,i,a);return!g&&this.startRegionRe.test(u)?"start":g},this.getFoldWidgetRange=function(p,i,a,u){var g=p.getLine(a);if(this.startRegionRe.test(g))return this.getCommentRegionBlock(p,g,a);var s=g.match(this.foldingStartMarker);if(s){var c=s.index;if(s[1])return this.openingBracketBlock(p,s[1],a,c);var m=p.getCommentFoldRange(a,c+s[0].length,1);return m&&!m.isMultiLine()&&(u?m=this.getSectionRange(p,a):i!="all"&&(m=null)),m}if(i!=="markbegin"){var s=g.match(this.foldingStopMarker);if(s){var c=s.index+s[0].length;return s[1]?this.closingBracketBlock(p,s[1],a,c):p.getCommentFoldRange(a,c,-1)}}},this.getSectionRange=function(p,i){var a=p.getLine(i),u=a.search(/\S/),g=i,s=a.length;i+=1;for(var c=i,m=p.getLength();++i<m;){a=p.getLine(i);var w=a.search(/\S/);if(w!==-1){if(u>w)break;var x=this.getFoldWidgetRange(p,"all",i);if(x){if(x.start.row<=g)break;if(x.isMultiLine())i=x.end.row;else if(u==w)break}c=i}}return new f(g,s,c,p.getLine(c).length)},this.getCommentRegionBlock=function(p,i,a){for(var u=i.search(/\s*$/),g=p.getLength(),s=a,c=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++a<g;){i=p.getLine(a);var w=c.exec(i);if(w&&(w[1]?m--:m++,!m))break}var x=a;if(x>s)return new f(s,u,x,i.length)}}).call(o.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(e,r,d){var h=e("../lib/oop"),f=e("./text").Mode,v=e("./json_highlight_rules").JsonHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,p=e("./folding/cstyle").FoldMode,i=e("../worker/worker_client").WorkerClient,a=function(){this.HighlightRules=v,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new p};h.inherits(a,f),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(u,g,s){var c=this.$getIndent(g);if(u=="start"){var m=g.match(/^.*[\{\(\[]\s*$/);m&&(c+=s)}return c},this.checkOutdent=function(u,g,s){return this.$outdent.checkOutdent(g,s)},this.autoOutdent=function(u,g,s){this.$outdent.autoOutdent(g,s)},this.createWorker=function(u){var g=new i(["ace"],"ace/mode/json_worker","JsonWorker");return g.attachToDocument(u.getDocument()),g.on("annotate",function(s){u.setAnnotations(s.data)}),g.on("terminate",function(){u.clearAnnotations()}),g},this.$id="ace/mode/json"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/json"],function(e){n&&(n.exports=e)})})()})(Hm)),Hm.exports}bS();var Vm={exports:{}},Gm;function wS(){return Gm||(Gm=1,(function(n,t){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,r,d){var h=e("../lib/oop");e("../lib/lang");var f=e("./text_highlight_rules").TextHighlightRules,v=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",o=r.supportFunction="rgb|rgba|url|attr|counter|counters",p=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",i=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",a=r.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",u=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",g=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",s=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",c=function(){var m=this.createKeywordMapper({"support.function":o,"support.constant":p,"support.type":v,"support.constant.color":i,"support.constant.fonts":a},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:u},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+u+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:u},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:g},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:s},{include:"url"},{token:m,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};h.inherits(c,f),r.CssHighlightRules=c}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,d){var h=e("../lib/oop"),f=e("./text_highlight_rules").TextHighlightRules,v=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|$)"},v.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};h.inherits(v,f),v.getTagRule=function(o){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},v.getStartRule=function(o){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:o}},v.getEndRule=function(o){return{token:"comment.doc",regex:"\\*\\/",next:o}},r.JsDocCommentHighlightRules=v}),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(e,r,d){function h(){var u=i.replace("\\d","\\d\\-"),g={onMatch:function(c,m,w){var x=c.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:c.slice(0,x)},{type:"meta.tag.tag-name.xml",value:c.substr(x)}]},regex:"</?(?:"+u+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(g);var s={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[s,g,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(c,m,w){return m==w[0]&&w.shift(),c.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:c}]},nextState:"jsx"},s,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:u},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},g],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(u){return[{token:"comment",regex:/\/\*/,next:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[o.getTagRule(),{token:"comment",regex:"$|^",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var v=e("../lib/oop"),o=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,p=e("./text_highlight_rules").TextHighlightRules,i="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*",a=function(u){var g={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},s=this.createKeywordMapper(g,"identifier"),c="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(g).join("|")+"\\b)"+i+")(\\s*)(\\()"};this.$rules={no_regex:[o.getStartRule("doc-start"),f("no_regex"),x,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{include:"numeric_constants"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+i+")(\\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+))("+i+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+i+")(\\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:"(?:"+c+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:s,regex:i},{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:i},{regex:"",token:"empty",next:"no_regex"}],start:[o.getStartRule("doc-start"),f("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"},{include:"numeric_constants"},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:i},{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"}],numeric_constants:[{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F_]+|[oO][0-7_]+|[bB][01_]+)\b/},{token:"constant.numeric",regex:/(?:\d[\d_]*(?:\.[\d_]*)?|\.\d[\d_]*)(?:[eE][+-]?\d+\b)?/}]},(!u||!u.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(R,S,A){if(this.next=R=="{"?this.nextState:"",R=="{"&&A.length)A.unshift("start",S);else if(R=="}"&&A.length&&(A.shift(),this.next=A.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return R=="{"?"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:"("+i+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!u||u.jsx!=0)&&h.call(this)),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};v.inherits(a,p),r.JavaScriptHighlightRules=a}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,d){var h=e("../lib/oop"),f=e("./text_highlight_rules").TextHighlightRules,v=function(o){var p="[_: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:"(<\\?)("+p+")",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:p},{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:"(<\\!)("+p+")",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:"(?:(<)|(</))((?:"+p+":)?"+p+")",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:p},{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===v&&this.normalizeRules()};(function(){this.embedTagRules=function(o,p,i){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+i+".tag-name.xml"],regex:"(<)("+i+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:p+"start"}]}),this.$rules[i+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(a,u,g){return g.splice(0),this.token}}],this.embedRules(o,p,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+i+".tag-name.xml"],regex:"(</)("+i+"(?=\\s|>|$))",next:i+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(f.prototype),h.inherits(v,f),r.XmlHighlightRules=v}),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(e,r,d){var h=e("../lib/oop"),f=e("../lib/lang"),v=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,p=e("./xml_highlight_rules").XmlHighlightRules,i=f.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(){p.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(u,g){var s=i[g];return["meta.tag.punctuation."+(u=="<"?"":"end-")+"tag-open.xml","meta.tag"+(s?"."+s:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(v,"css-","style"),this.embedTagRules(new o({jsx:!1}).getRules(),"js-","script"),this.constructor===a&&this.normalizeRules()};h.inherits(a,p),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(e,r,d){var h=e("../config").$modes,f=e("../lib/oop"),v=e("../lib/lang"),o=e("./text_highlight_rules").TextHighlightRules,p=e("./html_highlight_rules").HtmlHighlightRules,i=function(u){return"(?:[^"+v.escapeRegExp(u)+"\\\\]|\\\\.)*"},a=function(){p.call(this);var u={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(s,c,m,w){var x=s.match(/^(\s*)([`~]+)(.*)/),R=/[\w-]+|$/.exec(x[3])[0];return h[R]||(R=""),m.unshift("githubblock",[],[x[1],x[2],R],c),this.token},next:"githubblock"},g=[{token:"support.function",regex:".*",onMatch:function(s,c,m,w){var x=m[1],R=m[2][0],S=m[2][1],A=m[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(s);if(C&&C[1].length<R.length+3&&C[2].length>=S.length&&C[2][0]==S[0])return m.splice(0,3),this.next=m.shift(),this.token;if(this.next="",A&&h[A]){var O=h[A].getTokenizer().getLineTokens(s,x.slice(0));return m[1]=O.state,O.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(s){return"markup.heading."+s.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},u,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+i("]")+")(\\]\\s*\\[)("+i("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+i("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+i('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},u,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:g}),this.normalizeRules()};f.inherits(a,o),r.MarkdownHighlightRules=a}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,r,d){var h=e("../../lib/oop"),f=e("./fold_mode").FoldMode,v=e("../../range").Range,o=r.FoldMode=function(){};h.inherits(o,f),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(p,i,a){var u=p.getLine(a);return this.foldingStartMarker.test(u)?u[0]=="`"&&p.bgTokenizer.getState(a)=="start"?"end":"start":""},this.getFoldWidgetRange=function(p,i,a){function u(N){return R=p.getTokens(N)[0],R&&R.type.lastIndexOf(S,0)===0}function g(){var N=R.value[0];return N=="="?6:N=="-"?5:7-R.value.search(/[^#]|$/)}var s=p.getLine(a),c=s.length,m=p.getLength(),w=a,x=a;if(s.match(this.foldingStartMarker)){if(s[0]=="`"){if(p.bgTokenizer.getState(a)!=="start"){for(;++a<m&&(s=p.getLine(a),!(s[0]=="`"&s.substring(0,3)=="```")););return new v(w,c,a,0)}for(;a-- >0&&(s=p.getLine(a),!(s[0]=="`"&s.substring(0,3)=="```")););return new v(a,s.length,w,0)}var R,S="markup.heading";if(u(a)){for(var A=g();++a<m;)if(u(a)){var C=g();if(C>=A)break}if(x=a-(!R||["=","-"].indexOf(R.value[0])==-1?1:2),x>w)for(;x>w&&/^\s*$/.test(p.getLine(x));)x--;if(x>w){var O=p.getLine(x).length;return new v(w,c,x,O)}}}}}).call(o.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,d){var h=e("../range").Range,f=function(){};(function(){this.checkOutdent=function(v,o){return/^\s+$/.test(v)?/^\s*\}/.test(o):!1},this.autoOutdent=function(v,o){var p=v.getLine(o),i=p.match(/^(\s*\})/);if(!i)return 0;var a=i[1].length,u=v.findMatchingBracket({row:o,column:a});if(!u||u.row==o)return 0;var g=this.$getIndent(v.getLine(u.row));v.replace(new h(o,0,o,a-1),g)},this.$getIndent=function(v){return v.match(/^\s*/)[0]}}).call(f.prototype),r.MatchingBraceOutdent=f}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,r,d){function h(i,a){return i&&i.type.lastIndexOf(a+".xml")>-1}var f=e("../../lib/oop"),v=e("../behaviour").Behaviour,o=e("../../token_iterator").TokenIterator,p=function(){this.add("string_dquotes","insertion",function(i,a,u,g,s){if(s=='"'||s=="'"){var c=s,m=g.doc.getTextRange(u.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&u.getWrapBehavioursEnabled())return{text:c+m+c,selection:!1};var w=u.getCursorPosition(),x=g.doc.getLine(w.row),R=x.substring(w.column,w.column+1),S=new o(g,w.row,w.column),A=S.getCurrentToken();if(R==c&&(h(A,"attribute-value")||h(A,"string")))return{text:"",selection:[1,1]};if(A||(A=S.stepBackward()),!A)return;for(;h(A,"tag-whitespace")||h(A,"whitespace");)A=S.stepBackward();var C=!R||R.match(/\s/);if(h(A,"attribute-equals")&&(C||R==">")||h(A,"decl-attribute-equals")&&(C||R=="?"))return{text:c+c,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(i,a,u,g,s){var c=g.doc.getTextRange(s);if(!s.isMultiLine()&&(c=='"'||c=="'")){var m=g.doc.getLine(s.start.row),w=m.substring(s.start.column+1,s.start.column+2);if(w==c)return s.end.column++,s}}),this.add("autoclosing","insertion",function(i,a,u,g,s){if(s==">"){var c=u.getSelectionRange().start,m=new o(g,c.row,c.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(c.column<x)return;if(c.column==x){var R=m.stepForward();if(R&&h(R,"attribute-value"))return;m.stepBackward()}}if(/^\s*>/.test(g.getLine(c.row).slice(c.column)))return;for(;!h(w,"tag-name");)if(w=m.stepBackward(),w.value=="<"){w=m.stepForward();break}var S=m.getCurrentTokenRow(),A=m.getCurrentTokenColumn();if(h(m.stepBackward(),"end-tag-open"))return;var C=w.value;return S==c.row&&(C=C.substring(0,c.column-A)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(i,a,u,g,s){if(s==`
|
|
991
|
+
`){var c=u.getCursorPosition(),m=g.getLine(c.row),w=new o(g,c.row,c.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 R=x.value,S=w.getCurrentTokenRow();if(x=w.stepBackward(),!x||x.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[R]||!this.voidElements){var A=g.getTokenAt(c.row,c.column+1),m=g.getLine(S),C=this.$getIndent(m),O=C+g.getTabString();return A&&A.value==="</"?{text:`
|
|
992
|
+
`+O+`
|
|
993
|
+
`+C,selection:[1,O.length,1,O.length]}:{text:`
|
|
994
|
+
`+O}}}}})};f.inherits(p,v),r.XmlBehaviour=p}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(e,r,d){var h=e("../../lib/oop"),f=e("../../token_iterator").TokenIterator,v=e("../behaviour/cstyle").CstyleBehaviour,o=e("../behaviour/xml").XmlBehaviour,p=function(){var i=new o({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(i),this.inherit(v),this.add("autoclosing-fragment","insertion",function(a,u,g,s,c){if(c==">"){var m=g.getSelectionRange().start,w=new f(s,m.row,m.column),x=w.getCurrentToken()||w.stepBackward();if(!x)return;if(x.value=="<")return{text:"></>",selection:[1,1]}}})};h.inherits(p,v),r.JavaScriptBehaviour=p}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,d){function h(a,u){return a&&a.type&&a.type.lastIndexOf(u+".xml")>-1}var f=e("../../lib/oop"),v=e("../../range").Range,o=e("./fold_mode").FoldMode,p=r.FoldMode=function(a,u){o.call(this),this.voidElements=a||{},this.optionalEndTags=f.mixin({},this.voidElements),u&&f.mixin(this.optionalEndTags,u)};f.inherits(p,o);var i=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(a,u,g){var s=this._getFirstTagInLine(a,g);return s?s.closing||!s.tagName&&s.selfClosing?u==="markbeginend"?"end":"":!s.tagName||s.selfClosing||this.voidElements.hasOwnProperty(s.tagName.toLowerCase())||this._findEndTagInLine(a,g,s.tagName,s.end.column)?"":"start":this.getCommentFoldWidget(a,g)},this.getCommentFoldWidget=function(a,u){return/comment/.test(a.getState(u))&&/<!-/.test(a.getLine(u))?"start":""},this._getFirstTagInLine=function(a,u){for(var g=a.getTokens(u),s=new i,c=0;c<g.length;c++){var m=g[c];if(h(m,"tag-open")){if(s.end.column=s.start.column+m.value.length,s.closing=h(m,"end-tag-open"),m=g[++c],!m)return null;if(s.tagName=m.value,m.value===""){if(m=g[++c],!m)return null;s.tagName=m.value}for(s.end.column+=m.value.length,c++;c<g.length;c++)if(m=g[c],s.end.column+=m.value.length,h(m,"tag-close")){s.selfClosing=m.value=="/>";break}return s}if(h(m,"tag-close"))return s.selfClosing=m.value=="/>",s;s.start.column+=m.value.length}return null},this._findEndTagInLine=function(a,u,g,s){for(var c=a.getTokens(u),m=0,w=0;w<c.length;w++){var x=c[w];if(m+=x.value.length,!(m<s-1)&&h(x,"end-tag-open")&&(x=c[w+1],h(x,"tag-name")&&x.value===""&&(x=c[w+2]),x&&x.value==g))return!0}return!1},this.getFoldWidgetRange=function(a,u,g){var s=this._getFirstTagInLine(a,g);if(!s)return this.getCommentFoldWidget(a,g)&&a.getCommentFoldRange(g,a.getLine(g).length);var c=a.getMatchingTags({row:g,column:0});if(c)return new v(c.openTag.end.row,c.openTag.end.column,c.closeTag.start.row,c.closeTag.start.column)}}).call(p.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,d){var h=e("../../lib/oop"),f=e("../../range").Range,v=e("./fold_mode").FoldMode,o=r.FoldMode=function(p){p&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+p.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+p.end)))};h.inherits(o,v),(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(p,i,a){var u=p.getLine(a);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var g=this._getFoldWidgetBase(p,i,a);return!g&&this.startRegionRe.test(u)?"start":g},this.getFoldWidgetRange=function(p,i,a,u){var g=p.getLine(a);if(this.startRegionRe.test(g))return this.getCommentRegionBlock(p,g,a);var s=g.match(this.foldingStartMarker);if(s){var c=s.index;if(s[1])return this.openingBracketBlock(p,s[1],a,c);var m=p.getCommentFoldRange(a,c+s[0].length,1);return m&&!m.isMultiLine()&&(u?m=this.getSectionRange(p,a):i!="all"&&(m=null)),m}if(i!=="markbegin"){var s=g.match(this.foldingStopMarker);if(s){var c=s.index+s[0].length;return s[1]?this.closingBracketBlock(p,s[1],a,c):p.getCommentFoldRange(a,c,-1)}}},this.getSectionRange=function(p,i){var a=p.getLine(i),u=a.search(/\S/),g=i,s=a.length;i+=1;for(var c=i,m=p.getLength();++i<m;){a=p.getLine(i);var w=a.search(/\S/);if(w!==-1){if(u>w)break;var x=this.getFoldWidgetRange(p,"all",i);if(x){if(x.start.row<=g)break;if(x.isMultiLine())i=x.end.row;else if(u==w)break}c=i}}return new f(g,s,c,p.getLine(c).length)},this.getCommentRegionBlock=function(p,i,a){for(var u=i.search(/\s*$/),g=p.getLength(),s=a,c=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++a<g;){i=p.getLine(a);var w=c.exec(i);if(w&&(w[1]?m--:m++,!m))break}var x=a;if(x>s)return new f(s,u,x,i.length)}}).call(o.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,r,d){var h=e("../../lib/oop"),f=e("./xml").FoldMode,v=e("./cstyle").FoldMode,o=r.FoldMode=function(p){p&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+p.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+p.end))),this.xmlFoldMode=new f};h.inherits(o,v),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(p,i,a){var u=this.getFoldWidgetBase(p,i,a);return u||this.xmlFoldMode.getFoldWidget(p,i,a)},this.getFoldWidgetRange=function(p,i,a,u){var g=this.getFoldWidgetRangeBase(p,i,a,u);return g||this.xmlFoldMode.getFoldWidgetRange(p,i,a)}}).call(o.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(e,r,d){var h=e("../lib/oop"),f=e("./text").Mode,v=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,p=e("../worker/worker_client").WorkerClient,i=e("./behaviour/javascript").JavaScriptBehaviour,a=e("./folding/javascript").FoldMode,u=function(){this.HighlightRules=v,this.$outdent=new o,this.$behaviour=new i,this.foldingRules=new a};h.inherits(u,f),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(g,s,c){var m=this.$getIndent(s),w=this.getTokenizer().getLineTokens(s,g),x=w.tokens,R=w.state;if(x.length&&x[x.length-1].type=="comment")return m;if(g=="start"||g=="no_regex"){var S=s.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);S&&(m+=c)}else if(g=="doc-start"&&(R=="start"||R=="no_regex"))return"";return m},this.checkOutdent=function(g,s,c){return this.$outdent.checkOutdent(s,c)},this.autoOutdent=function(g,s,c){this.$outdent.autoOutdent(s,c)},this.createWorker=function(g){var s=new p(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return s.attachToDocument(g.getDocument()),s.on("annotate",function(c){g.setAnnotations(c.data)}),s.on("terminate",function(){g.clearAnnotations()}),s},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(u.prototype),r.Mode=u}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,r,d){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}},f=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var v=document.createElement("c").style;for(var o in v)if(typeof v[o]=="string"){var p=o.replace(/[A-Z]/g,function(i){return"-"+i.toLowerCase()});h.hasOwnProperty(p)||(h[p]=1)}}this.completionsDefined=!0},this.getCompletions=function(v,o,p,i){if(this.completionsDefined||this.defineCompletions(),v==="ruleset"||o.$mode.$id=="ace/mode/scss"){var a=o.getLine(p.row).substr(0,p.column),u=/\([^)]*$/.test(a);return u&&(a=a.substr(a.lastIndexOf("(")+1)),/:[^;]+$/.test(a)?this.getPropertyValueCompletions(v,o,p,i):this.getPropertyCompletions(v,o,p,i,u)}return[]},this.getPropertyCompletions=function(v,o,p,i,a){a=a||!1;var u=Object.keys(h);return u.map(function(g){return{caption:g,snippet:g+": $0"+(a?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(v,o,p,i){var a=o.getLine(p.row).substr(0,p.column),u=(/([\w\-]+):[^:]*$/.exec(a)||{})[1];if(!u)return[];var g=[];return u in h&&typeof h[u]=="object"&&(g=Object.keys(h[u])),g.map(function(s){return{caption:s,snippet:s,meta:"property value",score:1e6}})}}).call(f.prototype),r.CssCompletions=f}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,r,d){var h=e("../../lib/oop");e("../behaviour").Behaviour;var f=e("./cstyle").CstyleBehaviour,v=e("../../token_iterator").TokenIterator,o=function(){this.inherit(f),this.add("colon","insertion",function(p,i,a,u,g){if(g===":"&&a.selection.isEmpty()){var s=a.getCursorPosition(),c=new v(u,s.row,s.column),m=c.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=c.stepBackward()),m&&m.type==="support.type"){var w=u.doc.getLine(s.row),x=w.substring(s.column,s.column+1);if(x===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(w.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(p,i,a,u,g){var s=u.doc.getTextRange(g);if(!g.isMultiLine()&&s===":"){var c=a.getCursorPosition(),m=new v(u,c.row,c.column),w=m.getCurrentToken();if(w&&w.value.match(/\s+/)&&(w=m.stepBackward()),w&&w.type==="support.type"){var x=u.doc.getLine(g.start.row),R=x.substring(g.end.column,g.end.column+1);if(R===";")return g.end.column++,g}}}),this.add("semicolon","insertion",function(p,i,a,u,g){if(g===";"&&a.selection.isEmpty()){var s=a.getCursorPosition(),c=u.doc.getLine(s.row),m=c.substring(s.column,s.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(p,i,a,u,g){if(g==="!"&&a.selection.isEmpty()){var s=a.getCursorPosition(),c=u.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(c.substring(s.column)))return{text:"!important",selection:[10,10]}}})};h.inherits(o,f),r.CssBehaviour=o}),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(e,r,d){var h=e("../lib/oop"),f=e("./text").Mode,v=e("./css_highlight_rules").CssHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,p=e("../worker/worker_client").WorkerClient,i=e("./css_completions").CssCompletions,a=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,g=function(){this.HighlightRules=v,this.$outdent=new o,this.$behaviour=new a,this.$completer=new i,this.foldingRules=new u};h.inherits(g,f),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(s,c,m){var w=this.$getIndent(c),x=this.getTokenizer().getLineTokens(c,s).tokens;if(x.length&&x[x.length-1].type=="comment")return w;var R=c.match(/^.*\{\s*$/);return R&&(w+=m),w},this.checkOutdent=function(s,c,m){return this.$outdent.checkOutdent(c,m)},this.autoOutdent=function(s,c,m){this.$outdent.autoOutdent(c,m)},this.getCompletions=function(s,c,m,w){return this.$completer.getCompletions(s,c,m,w)},this.createWorker=function(s){var c=new p(["ace"],"ace/mode/css_worker","Worker");return c.attachToDocument(s.getDocument()),c.on("annotate",function(m){s.setAnnotations(m.data)}),c.on("terminate",function(){s.clearAnnotations()}),c},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(g.prototype),r.Mode=g}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,d){var h=e("../../lib/oop"),f=e("./fold_mode").FoldMode,v=r.FoldMode=function(o,p){this.defaultMode=o,this.subModes=p};h.inherits(v,f),(function(){this.$getMode=function(o){typeof o!="string"&&(o=o[0]);for(var p in this.subModes)if(o.indexOf(p)===0)return this.subModes[p];return null},this.$tryMode=function(o,p,i,a){var u=this.$getMode(o);return u?u.getFoldWidget(p,i,a):""},this.getFoldWidget=function(o,p,i){return this.$tryMode(o.getState(i-1),o,p,i)||this.$tryMode(o.getState(i),o,p,i)||this.defaultMode.getFoldWidget(o,p,i)},this.getFoldWidgetRange=function(o,p,i){var a=this.$getMode(o.getState(i-1));return(!a||!a.getFoldWidget(o,p,i))&&(a=this.$getMode(o.getState(i))),(!a||!a.getFoldWidget(o,p,i))&&(a=this.defaultMode),a.getFoldWidgetRange(o,p,i)}}).call(v.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(e,r,d){var h=e("../../lib/oop"),f=e("./mixed").FoldMode,v=e("./xml").FoldMode,o=e("./cstyle").FoldMode,p=r.FoldMode=function(i,a){f.call(this,new v(i,a),{"js-":new o,"css-":new o})};h.inherits(p,f)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,r,d){function h(c,m){return c.type.lastIndexOf(m+".xml")>-1}function f(c,m){for(var w=new o(c,m.row,m.column),x=w.getCurrentToken();x&&!h(x,"tag-name");)x=w.stepBackward();if(x)return x.value}function v(c,m){for(var w=new o(c,m.row,m.column),x=w.getCurrentToken();x&&!h(x,"attribute-name");)x=w.stepBackward();if(x)return x.value}var o=e("../token_iterator").TokenIterator,p=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],i=["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=p.concat(i),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},g=Object.keys(u),s=function(){};(function(){this.getCompletions=function(c,m,w,x){var R=m.getTokenAt(w.row,w.column);if(!R)return[];if(h(R,"tag-name")||h(R,"tag-open")||h(R,"end-tag-open"))return this.getTagCompletions(c,m,w,x);if(h(R,"tag-whitespace")||h(R,"attribute-name"))return this.getAttributeCompletions(c,m,w,x);if(h(R,"attribute-value"))return this.getAttributeValueCompletions(c,m,w,x);var S=m.getLine(w.row).substr(0,w.column);return/&[a-z]*$/i.test(S)?this.getHTMLEntityCompletions(c,m,w,x):[]},this.getTagCompletions=function(c,m,w,x){return g.map(function(R){return{value:R,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(c,m,w,x){var R=f(m,w);if(!R)return[];var S=a;return R in u&&(S=S.concat(Object.keys(u[R]))),S.map(function(A){return{caption:A,snippet:A+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(c,m,w,x){var R=f(m,w),S=v(m,w);if(!R)return[];var A=[];return R in u&&S in u[R]&&typeof u[R][S]=="object"&&(A=Object.keys(u[R][S])),A.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(c,m,w,x){var R=["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 R.map(function(S){return{caption:S,snippet:S,meta:"html entity",score:1e6}})}}).call(s.prototype),r.HtmlCompletions=s}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,r,d){var h=e("../lib/oop"),f=e("../lib/lang"),v=e("./text").Mode,o=e("./javascript").Mode,p=e("./css").Mode,i=e("./html_highlight_rules").HtmlHighlightRules,a=e("./behaviour/xml").XmlBehaviour,u=e("./folding/html").FoldMode,g=e("./html_completions").HtmlCompletions,s=e("../worker/worker_client").WorkerClient,c=["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=i,this.$behaviour=new a,this.$completer=new g,this.createModeDelegates({"js-":o,"css-":p}),this.foldingRules=new u(this.voidElements,f.arrayToMap(m))};h.inherits(w,v),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=f.arrayToMap(c),this.getNextLineIndent=function(x,R,S){return this.$getIndent(R)},this.checkOutdent=function(x,R,S){return!1},this.getCompletions=function(x,R,S,A){return this.$completer.getCompletions(x,R,S,A)},this.createWorker=function(x){if(this.constructor==w){var R=new s(["ace"],"ace/mode/html_worker","Worker");return R.attachToDocument(x.getDocument()),this.fragmentContext&&R.call("setOptions",[{context:this.fragmentContext}]),R.on("error",function(S){x.setAnnotations(S.data)}),R.on("terminate",function(){x.clearAnnotations()}),R}},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(e,r,d){var h=e("../lib/oop"),f=e("./text_highlight_rules").TextHighlightRules,v=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",o=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",p=function(){var i=this.createKeywordMapper({keyword:v,"support.function.builtin":o,"invalid.deprecated":"debugger"},"identifier"),a="(?:(?:[1-9]\\d*)|(?:0))",u="(?:\\.\\d+)",g="(?:\\d+)",s="(?:(?:"+g+"?"+u+")|(?:"+g+"\\.))",c="(?:(?:"+s+"|"+g+"))",m="(?:"+c+"|"+s+")",w="(?:&"+g+")",x="[a-zA-Z_][a-zA-Z0-9_]*",R="(?:"+x+"(?==))",S="(?:\\$(?:SHLVL|\\$|\\!|\\?))",A="(?:"+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,O,N){var M=C[2]=="-"?"indentedHeredoc":"heredoc",L=C.split(this.splitRegex);return N.push(M,L[4]),[{type:"constant",value:L[1]},{type:"text",value:L[2]},{type:"string",value:L[3]},{type:"support.class",value:L[4]},{type:"string",value:L[5]}]},rules:{heredoc:[{onMatch:function(C,O,N){return C===N[1]?(N.shift(),N.shift(),this.next=N[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(C,O,N){return C===N[1]?(N.shift(),N.shift(),this.next=N[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(C,O){return O[0]==="heredoc"||O[0]==="indentedHeredoc"?O[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:S},{token:"variable",regex:R},{include:"variables"},{token:"support.function",regex:A},{token:"support.function",regex:w},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:m},{token:"constant.numeric",regex:a+"\\b"},{token:i,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(p,f),r.ShHighlightRules=p}),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(e,r,d){var h=e("../lib/oop"),f=e("./text").Mode,v=e("./sh_highlight_rules").ShHighlightRules,o=e("../range").Range,p=e("./folding/cstyle").FoldMode,i=function(){this.HighlightRules=v,this.foldingRules=new p,this.$behaviour=this.$defaultBehaviour};h.inherits(i,f),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,g,s){var c=this.$getIndent(g),m=this.getTokenizer().getLineTokens(g,u),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return c;if(u=="start"){var x=g.match(/^.*[\{\(\[:]\s*$/);x&&(c+=s)}return c};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,g,s){if(s!==`\r
|
|
995
|
+
`&&s!=="\r"&&s!==`
|
|
996
|
+
`)return!1;var c=this.getTokenizer().getLineTokens(g.trim(),u).tokens;if(!c)return!1;do var m=c.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&a[m.value]:!1},this.autoOutdent=function(u,g,s){s+=1;var c=this.$getIndent(g.getLine(s)),m=g.getTabString();c.slice(-m.length)==m&&g.remove(new o(s,c.length-m.length,s,c.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(i.prototype),r.Mode=i}),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(e,r,d){var h=e("../lib/oop"),f=e("../lib/lang"),v=e("./text").Mode,o=e("./xml_highlight_rules").XmlHighlightRules,p=e("./behaviour/xml").XmlBehaviour,i=e("./folding/xml").FoldMode,a=e("../worker/worker_client").WorkerClient,u=function(){this.HighlightRules=o,this.$behaviour=new p,this.foldingRules=new i};h.inherits(u,v),(function(){this.voidElements=f.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(g){var s=new a(["ace"],"ace/mode/xml_worker","Worker");return s.attachToDocument(g.getDocument()),s.on("error",function(c){g.setAnnotations(c.data)}),s.on("terminate",function(){g.clearAnnotations()}),s},this.$id="ace/mode/xml"}).call(u.prototype),r.Mode=u}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(e,r,d){var h=e("../lib/oop"),f=e("./behaviour/cstyle").CstyleBehaviour,v=e("./text").Mode,o=e("./markdown_highlight_rules").MarkdownHighlightRules,p=e("./folding/markdown").FoldMode,i=function(){this.HighlightRules=o,this.createModeDelegates({javascript:e("./javascript").Mode,html:e("./html").Mode,bash:e("./sh").Mode,sh:e("./sh").Mode,xml:e("./xml").Mode,css:e("./css").Mode}),this.foldingRules=new p,this.$behaviour=new f({braces:!0})};h.inherits(i,v),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(a,u,g){if(a=="listblock"){var s=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(u);if(!s)return"";var c=s[2];return c||(c=parseInt(s[3],10)+1+"."),s[1]+c+s[4]}return this.$getIndent(u)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(i.prototype),r.Mode=i}),(function(){ace.require(["ace/mode/markdown"],function(e){n&&(n.exports=e)})})()})(Vm)),Vm.exports}wS();var qm={exports:{}},Km;function xS(){return Km||(Km=1,(function(n,t){ace.define("ace/theme/twilight-css",["require","exports","module"],function(e,r,d){d.exports=`.ace-twilight .ace_gutter {
|
|
997
|
+
background: #232323;
|
|
998
|
+
color: #E2E2E2
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
.ace-twilight .ace_print-margin {
|
|
1002
|
+
width: 1px;
|
|
1003
|
+
background: #232323
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
.ace-twilight {
|
|
1007
|
+
background-color: #141414;
|
|
1008
|
+
color: #F8F8F8
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
.ace-twilight .ace_cursor {
|
|
1012
|
+
color: #A7A7A7
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
.ace-twilight .ace_marker-layer .ace_selection {
|
|
1016
|
+
background: rgba(221, 240, 255, 0.20)
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
.ace-twilight.ace_multiselect .ace_selection.ace_start {
|
|
1020
|
+
box-shadow: 0 0 3px 0px #141414;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
.ace-twilight .ace_marker-layer .ace_step {
|
|
1024
|
+
background: rgb(102, 82, 0)
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
.ace-twilight .ace_marker-layer .ace_bracket {
|
|
1028
|
+
margin: -1px 0 0 -1px;
|
|
1029
|
+
border: 1px solid rgba(255, 255, 255, 0.25)
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
.ace-twilight .ace_marker-layer .ace_active-line {
|
|
1033
|
+
background: rgba(255, 255, 255, 0.031)
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
.ace-twilight .ace_gutter-active-line {
|
|
1037
|
+
background-color: rgba(255, 255, 255, 0.031)
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
.ace-twilight .ace_marker-layer .ace_selected-word {
|
|
1041
|
+
border: 1px solid rgba(221, 240, 255, 0.20)
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
.ace-twilight .ace_invisible {
|
|
1045
|
+
color: rgba(255, 255, 255, 0.25)
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
.ace-twilight .ace_keyword,
|
|
1049
|
+
.ace-twilight .ace_meta {
|
|
1050
|
+
color: #CDA869
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
.ace-twilight .ace_constant,
|
|
1054
|
+
.ace-twilight .ace_constant.ace_character,
|
|
1055
|
+
.ace-twilight .ace_constant.ace_character.ace_escape,
|
|
1056
|
+
.ace-twilight .ace_constant.ace_other,
|
|
1057
|
+
.ace-twilight .ace_heading,
|
|
1058
|
+
.ace-twilight .ace_markup.ace_heading,
|
|
1059
|
+
.ace-twilight .ace_support.ace_constant {
|
|
1060
|
+
color: #CF6A4C
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
.ace-twilight .ace_invalid.ace_illegal {
|
|
1064
|
+
color: #F8F8F8;
|
|
1065
|
+
background-color: rgba(86, 45, 86, 0.75)
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
.ace-twilight .ace_invalid.ace_deprecated {
|
|
1069
|
+
text-decoration: underline;
|
|
1070
|
+
font-style: italic;
|
|
1071
|
+
color: #D2A8A1
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
.ace-twilight .ace_support {
|
|
1075
|
+
color: #9B859D
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
.ace-twilight .ace_fold {
|
|
1079
|
+
background-color: #AC885B;
|
|
1080
|
+
border-color: #F8F8F8
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
.ace-twilight .ace_support.ace_function {
|
|
1084
|
+
color: #DAD085
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
.ace-twilight .ace_list,
|
|
1088
|
+
.ace-twilight .ace_markup.ace_list,
|
|
1089
|
+
.ace-twilight .ace_storage {
|
|
1090
|
+
color: #F9EE98
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
.ace-twilight .ace_entity.ace_name.ace_function,
|
|
1094
|
+
.ace-twilight .ace_meta.ace_tag {
|
|
1095
|
+
color: #AC885B
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
.ace-twilight .ace_string {
|
|
1099
|
+
color: #8F9D6A
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
.ace-twilight .ace_string.ace_regexp {
|
|
1103
|
+
color: #E9C062
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
.ace-twilight .ace_comment {
|
|
1107
|
+
font-style: italic;
|
|
1108
|
+
color: #5F5A60
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
.ace-twilight .ace_variable {
|
|
1112
|
+
color: #7587A6
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
.ace-twilight .ace_xml-pe {
|
|
1116
|
+
color: #494949
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
.ace-twilight .ace_indent-guide {
|
|
1120
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
.ace-twilight .ace_indent-guide-active {
|
|
1124
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
|
|
1125
|
+
}
|
|
1126
|
+
`}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(e,r,d){r.isDark=!0,r.cssClass="ace-twilight",r.cssText=e("./twilight-css");var h=e("../lib/dom");h.importCssString(r.cssText,r.cssClass,!1)}),(function(){ace.require(["ace/theme/twilight"],function(e){n&&(n.exports=e)})})()})(qm)),qm.exports}xS();var Ym={exports:{}},Xm;function CS(){return Xm||(Xm=1,(function(n,t){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(e,r,d){function h(C){var O=new Date().toLocaleString("en-us",C);return O.length==1?"0"+O:O}var f=e("./lib/dom"),v=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,p=e("./lib/lang"),i=e("./range").Range,a=e("./range_list").RangeList,u=e("./keyboard/hash_handler").HashHandler,g=e("./tokenizer").Tokenizer,s=e("./clipboard"),c={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,O,N){var M=C.session.getTextRange();return N?M.replace(/\n\r?([ \t]*\S)/g,`
|
|
1127
|
+
`+N+"$1"):M},CURRENT_LINE:function(C){return C.session.getLine(C.getCursorPosition().row)},PREV_LINE:function(C){return C.session.getLine(C.getCursorPosition().row-1)},LINE_INDEX:function(C){return C.getCursorPosition().row},LINE_NUMBER:function(C){return C.getCursorPosition().row+1},SOFT_TABS:function(C){return C.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(C){return C.session.getTabSize()},CLIPBOARD:function(C){return s.getText&&s.getText()},FILENAME:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0]},FILENAME_BASE:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(C){return this.FILEPATH(C).replace(/[^/\\]*$/,"")},FILEPATH:function(C){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(C){var O=C.session.$mode||{};return O.blockComment&&O.blockComment.start||""},BLOCK_COMMENT_END:function(C){var O=C.session.$mode||{};return O.blockComment&&O.blockComment.end||""},LINE_COMMENT:function(C){var O=C.session.$mode||{};return O.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"})};c.SELECTED_TEXT=c.SELECTION;var m=(function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=c}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function O(L){return L=L.substr(1),/^\d+$/.test(L)?[{tabstopId:parseInt(L,10)}]:[{text:L}]}function N(L){return"(?:[^\\\\"+L+"]|\\\\.)"}var M={regex:"/("+N("/")+"+)/",onMatch:function(L,j,F){var D=F[0];return D.fmtString=!0,D.guard=L.slice(1,-1),D.flag="",""},next:"formatString"};return C.$tokenizer=new g({start:[{regex:/\\./,onMatch:function(L,j,F){var D=L[1];return(D=="}"&&F.length||"`$\\".indexOf(D)!=-1)&&(L=D),[L]}},{regex:/}/,onMatch:function(L,j,F){return[F.length?F.shift():L]}},{regex:/\$(?:\d+|\w+)/,onMatch:O},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(L,j,F){var D=O(L.substr(1));return F.unshift(D[0]),D},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+N("\\|")+"*\\|",onMatch:function(L,j,F){var D=L.slice(1,-1).replace(/\\[,|\\]|,/g,function($){return $.length==2?$[1]:"\0"}).split("\0").map(function($){return{value:$}});return F[0].choices=D,[D[0]]},next:"start"},M,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(L,j,F){return F.length&&F[0].expectElse?(F[0].expectElse=!1,F[0].ifEnd={elseEnd:F[0]},[F[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(L,j,F){var D=L[1];return D=="}"&&F.length||"`$\\".indexOf(D)!=-1?L=D:D=="n"?L=`
|
|
1128
|
+
`:D=="t"?L=" ":"ulULE".indexOf(D)!=-1&&(L={changeCase:D,local:D>"a"}),[L]}},{regex:"/\\w*}",onMatch:function(L,j,F){var D=F.shift();return D&&(D.flag=L.slice(1,-1)),this.next=D&&D.tabstopId?"start":"",[D||L]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(L,j,F){return[{text:L.slice(1)}]}},{regex:/\${\w+/,onMatch:function(L,j,F){var D={text:L.slice(2)};return F.unshift(D),[D]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(L,j,F){var D=F.shift();return this.next=D&&D.tabstopId?"start":"",[D||L]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(L,j,F){var D=F[0];return D.formatFunction=L.slice(2,-1),[F.shift()]},next:"formatString"},M,{regex:/:[\?\-+]?/,onMatch:function(L,j,F){L[1]=="+"&&(F[0].ifEnd=F[0]),L[1]=="?"&&(F[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),C.$tokenizer},C.prototype.tokenizeTmSnippet=function(O,N){return this.getTokenizer().getLineTokens(O,N).tokens.map(function(M){return M.value||M})},C.prototype.getVariableValue=function(O,N,M){if(/^\d+$/.test(N))return(this.variables.__||{})[N]||"";if(/^[A-Z]\d+$/.test(N))return(this.variables[N[0]+"__"]||{})[N.substr(1)]||"";if(N=N.replace(/^TM_/,""),!this.variables.hasOwnProperty(N))return"";var L=this.variables[N];return typeof L=="function"&&(L=this.variables[N](O,N,M)),L??""},C.prototype.tmStrFormat=function(O,N,M){if(!N.fmt)return O;var L=N.flag||"",j=N.guard;j=new RegExp(j,L.replace(/[^gim]/g,""));var F=typeof N.fmt=="string"?this.tokenizeTmSnippet(N.fmt,"formatString"):N.fmt,D=this,$=O.replace(j,function(){var _=D.variables.__;D.variables.__=[].slice.call(arguments);for(var I=D.resolveVariables(F,M),z="E",U=0;U<I.length;U++){var V=I[U];if(typeof V=="object")if(I[U]="",V.changeCase&&V.local){var K=I[U+1];K&&typeof K=="string"&&(V.changeCase=="u"?I[U]=K[0].toUpperCase():I[U]=K[0].toLowerCase(),I[U+1]=K.substr(1))}else V.changeCase&&(z=V.changeCase);else z=="U"?I[U]=V.toUpperCase():z=="L"&&(I[U]=V.toLowerCase())}return D.variables.__=_,I.join("")});return $},C.prototype.tmFormatFunction=function(O,N,M){return N.formatFunction=="upcase"?O.toUpperCase():N.formatFunction=="downcase"?O.toLowerCase():O},C.prototype.resolveVariables=function(O,N){function M(z){var U=O.indexOf(z,D+1);U!=-1&&(D=U)}for(var L=[],j="",F=!0,D=0;D<O.length;D++){var $=O[D];if(typeof $=="string"){L.push($),$==`
|
|
1129
|
+
`?(F=!0,j=""):F&&(j=/^\t*/.exec($)[0],F=/\S/.test($));continue}if($){if(F=!1,$.fmtString){var _=O.indexOf($,D+1);_==-1&&(_=O.length),$.fmt=O.slice(D+1,_),D=_}if($.text){var I=this.getVariableValue(N,$.text,j)+"";$.fmtString&&(I=this.tmStrFormat(I,$,N)),$.formatFunction&&(I=this.tmFormatFunction(I,$,N)),I&&!$.ifEnd?(L.push(I),M($)):!I&&$.ifEnd&&M($.ifEnd)}else $.elseEnd?M($.elseEnd):($.tabstopId!=null||$.changeCase!=null)&&L.push($)}}return L},C.prototype.getDisplayTextForSnippet=function(O,N){var M=w.call(this,O,N);return M.text},C.prototype.insertSnippetForSelection=function(O,N,M){M===void 0&&(M={});var L=w.call(this,O,N,M),j=O.getSelectionRange(),F=O.session.replace(j,L.text),D=new x(O),$=O.inVirtualSelectionMode&&O.selection.index;D.addTabstops(L.tabstops,j.start,F,$)},C.prototype.insertSnippet=function(O,N,M){M===void 0&&(M={});var L=this;if(O.inVirtualSelectionMode)return L.insertSnippetForSelection(O,N,M);O.forEachSelection(function(){L.insertSnippetForSelection(O,N,M)},null,{keepOrder:!0}),O.tabstopManager&&O.tabstopManager.tabNext()},C.prototype.$getScope=function(O){var N=O.session.$mode.$id||"";if(N=N.split("/").pop(),N==="html"||N==="php"){N==="php"&&!O.session.$mode.inlinePhp&&(N="html");var M=O.getCursorPosition(),L=O.session.getState(M.row);typeof L=="object"&&(L=L[0]),L.substring&&(L.substring(0,3)=="js-"?N="javascript":L.substring(0,4)=="css-"?N="css":L.substring(0,4)=="php-"&&(N="php"))}return N},C.prototype.getActiveScopes=function(O){var N=this.$getScope(O),M=[N],L=this.snippetMap;return L[N]&&L[N].includeScopes&&M.push.apply(M,L[N].includeScopes),M.push("_"),M},C.prototype.expandWithTab=function(O,N){var M=this,L=O.forEachSelection(function(){return M.expandSnippetForSelection(O,N)},null,{keepOrder:!0});return L&&O.tabstopManager&&O.tabstopManager.tabNext(),L},C.prototype.expandSnippetForSelection=function(O,N){var M=O.getCursorPosition(),L=O.session.getLine(M.row),j=L.substring(0,M.column),F=L.substr(M.column),D=this.snippetMap,$;return this.getActiveScopes(O).some(function(_){var I=D[_];return I&&($=this.findMatchingSnippet(I,j,F)),!!$},this),$?(N&&N.dryRun||(O.session.doc.removeInLine(M.row,M.column-$.replaceBefore.length,M.column+$.replaceAfter.length),this.variables.M__=$.matchBefore,this.variables.T__=$.matchAfter,this.insertSnippetForSelection(O,$.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(O,N,M){for(var L=O.length;L--;){var j=O[L];if(!(j.startRe&&!j.startRe.test(N))&&!(j.endRe&&!j.endRe.test(M))&&!(!j.startRe&&!j.endRe))return j.matchBefore=j.startRe?j.startRe.exec(N):[""],j.matchAfter=j.endRe?j.endRe.exec(M):[""],j.replaceBefore=j.triggerRe?j.triggerRe.exec(N)[0]:"",j.replaceAfter=j.endTriggerRe?j.endTriggerRe.exec(M)[0]:"",j}},C.prototype.register=function(O,N){function M(_){return _&&!/^\^?\(.*\)\$?$|^\\b$/.test(_)&&(_="(?:"+_+")"),_||""}function L(_,I,z){return _=M(_),I=M(I),_=I+_,_&&_[_.length-1]!="$"&&(_+="$"),new RegExp(_)}function j(_){_.scope||(_.scope=N||"_"),N=_.scope,F[N]||(F[N]=[],D[N]={});var I=D[N];if(_.name){var z=I[_.name];z&&$.unregister(z),I[_.name]=_}F[N].push(_),_.prefix&&(_.tabTrigger=_.prefix),!_.content&&_.body&&(_.content=Array.isArray(_.body)?_.body.join(`
|
|
1130
|
+
`):_.body),_.tabTrigger&&!_.trigger&&(!_.guard&&/^\w/.test(_.tabTrigger)&&(_.guard="\\b"),_.trigger=p.escapeRegExp(_.tabTrigger)),!(!_.trigger&&!_.guard&&!_.endTrigger&&!_.endGuard)&&(_.startRe=L(_.trigger,_.guard),_.triggerRe=new RegExp(_.trigger),_.endRe=L(_.endTrigger,_.endGuard),_.endTriggerRe=new RegExp(_.endTrigger))}var F=this.snippetMap,D=this.snippetNameMap,$=this;O||(O=[]),Array.isArray(O)?O.forEach(j):Object.keys(O).forEach(function(_){j(O[_])}),this._signal("registerSnippets",{scope:N})},C.prototype.unregister=function(O,N){function M(F){var D=j[F.scope||N];if(D&&D[F.name]){delete D[F.name];var $=L[F.scope||N],_=$&&$.indexOf(F);_>=0&&$.splice(_,1)}}var L=this.snippetMap,j=this.snippetNameMap;O.content?M(O):Array.isArray(O)&&O.forEach(M)},C.prototype.parseSnippetFile=function(O){O=O.replace(/\r/g,"");for(var N=[],M={},L=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,j;j=L.exec(O);){if(j[1])try{M=JSON.parse(j[1]),N.push(M)}catch{}if(j[4])M.content=j[4].replace(/^\t/gm,""),N.push(M),M={};else{var F=j[2],D=j[3];if(F=="regex"){var $=/\/((?:[^\/\\]|\\.)*)|$/g;M.guard=$.exec(D)[1],M.trigger=$.exec(D)[1],M.endTrigger=$.exec(D)[1],M.endGuard=$.exec(D)[1]}else F=="snippet"?(M.tabTrigger=D.match(/^\S*/)[0],M.name||(M.name=D)):F&&(M[F]=D)}}return N},C.prototype.getSnippetByName=function(O,N){var M=this.snippetNameMap,L;return this.getActiveScopes(N).some(function(j){var F=M[j];return F&&(L=F[O]),!!L},this),L},C})();v.implement(m.prototype,o);var w=function(C,O,N){function M(ie){for(var fe=[],pe=0;pe<ie.length;pe++){var $e=ie[pe];if(typeof $e=="object"){if(I[$e.tabstopId])continue;var Re=ie.lastIndexOf($e,pe-1);$e=fe[Re]||{tabstopId:$e.tabstopId}}fe[pe]=$e}return fe}N===void 0&&(N={});var L=C.getCursorPosition(),j=C.session.getLine(L.row),F=C.session.getTabString(),D=j.match(/^\s*/)[0];L.column<D.length&&(D=D.slice(0,L.column)),O=O.replace(/\r/g,"");var $=this.tokenizeTmSnippet(O);$=this.resolveVariables($,C),$=$.map(function(ie){return ie==`
|
|
1131
|
+
`&&!N.excludeExtraIndent?ie+D:typeof ie=="string"?ie.replace(/\t/g,F):ie});var _=[];$.forEach(function(ie,fe){if(typeof ie=="object"){var pe=ie.tabstopId,$e=_[pe];if($e||($e=_[pe]=[],$e.index=pe,$e.value="",$e.parents={}),$e.indexOf(ie)===-1){ie.choices&&!$e.choices&&($e.choices=ie.choices),$e.push(ie);var Re=$.indexOf(ie,fe+1);if(Re!==-1){var Ge=$.slice(fe+1,Re),qe=Ge.some(function(ct){return typeof ct=="object"});qe&&!$e.value?$e.value=Ge:Ge.length&&(!$e.value||typeof $e.value!="string")&&($e.value=Ge.join(""))}}}}),_.forEach(function(ie){ie.length=0});for(var I={},z=0;z<$.length;z++){var U=$[z];if(typeof U=="object"){var V=U.tabstopId,K=_[V],Z=$.indexOf(U,z+1);if(I[V]){I[V]===U&&(delete I[V],Object.keys(I).forEach(function(ie){K.parents[ie]=!0}));continue}I[V]=U;var oe=K.value;typeof oe!="string"?oe=M(oe):U.fmt&&(oe=this.tmStrFormat(oe,U,C)),$.splice.apply($,[z+1,Math.max(0,Z-z)].concat(oe,U)),K.indexOf(U)===-1&&K.push(U)}}var ee=0,re=0,ce="";return $.forEach(function(ie){if(typeof ie=="string"){var fe=ie.split(`
|
|
1132
|
+
`);fe.length>1?(re=fe[fe.length-1].length,ee+=fe.length-1):re+=ie.length,ce+=ie}else ie&&(ie.start?ie.end={row:ee,column:re}:ie.start={row:ee,column:re})}),{text:ce,tabstops:_,tokens:$}},x=(function(){function C(O){if(this.index=0,this.ranges=[],this.tabstops=[],O.tabstopManager)return O.tabstopManager;O.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=p.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(O)}return C.prototype.attach=function(O){this.$openTabstops=null,this.selectedTabstop=null,this.editor=O,this.session=O.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(O){for(var N=O.action[0]=="r",M=this.selectedTabstop||{},L=M.parents||{},j=this.tabstops.slice(),F=0;F<j.length;F++){var D=j[F],$=D==M||L[D.index];if(D.rangeList.$bias=$?0:1,O.action=="remove"&&D!==M){var _=D.parents&&D.parents[M.index],I=D.rangeList.pointIndex(O.start,_);I=I<0?-I-1:I+1;var z=D.rangeList.pointIndex(O.end,_);z=z<0?-z-1:z-1;for(var U=D.rangeList.ranges.slice(I,z),V=0;V<U.length;V++)this.removeRange(U[V])}D.rangeList.$onChange(O)}var K=this.session;!this.$inChange&&N&&K.getLength()==1&&!K.getValue()&&this.detach()},C.prototype.updateLinkedFields=function(){var O=this.selectedTabstop;if(!(!O||!O.hasLinkedRanges||!O.firstNonLinked)){this.$inChange=!0;for(var N=this.session,M=N.getTextRange(O.firstNonLinked),L=0;L<O.length;L++){var j=O[L];if(j.linked){var F=j.original,D=r.snippetManager.tmStrFormat(M,F,this.editor);N.replace(j,D)}}this.$inChange=!1}},C.prototype.onAfterExec=function(O){O.command&&!O.command.readOnly&&this.updateLinkedFields()},C.prototype.onChangeSelection=function(){if(this.editor){for(var O=this.editor.selection.lead,N=this.editor.selection.anchor,M=this.editor.selection.isEmpty(),L=0;L<this.ranges.length;L++)if(!this.ranges[L].linked){var j=this.ranges[L].contains(O.row,O.column),F=M||this.ranges[L].contains(N.row,N.column);if(j&&F)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(O){var N=this.tabstops.length,M=this.index+(O||1);M=Math.min(Math.max(M,1),N),M==N&&(M=0),this.selectTabstop(M),this.updateTabstopMarkers(),M===0&&this.detach()},C.prototype.selectTabstop=function(O){this.$openTabstops=null;var N=this.tabstops[this.index];if(N&&this.addTabstopMarkers(N),this.index=O,N=this.tabstops[this.index],!(!N||!N.length)){this.selectedTabstop=N;var M=N.firstNonLinked||N;if(N.choices&&(M.cursor=M.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(M);else{var L=this.editor.multiSelect;L.toSingleRange(M);for(var j=0;j<N.length;j++)N.hasLinkedRanges&&N[j].linked||L.addRange(N[j].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(O,N,M){var L=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!O[0]){var j=i.fromPoints(M,M);S(j.start,N),S(j.end,N),O[0]=[j],O[0].index=0}var F=this.index,D=[F+1,0],$=this.ranges,_=this.snippetId=(this.snippetId||0)+1;O.forEach(function(I,z){var U=this.$openTabstops[z]||I;U.snippetId=_;for(var V=0;V<I.length;V++){var K=I[V],Z=i.fromPoints(K.start,K.end||K.start);R(Z.start,N),R(Z.end,N),Z.original=K,Z.tabstop=U,$.push(Z),U!=I?U.unshift(Z):U[V]=Z,K.fmtString||U.firstNonLinked&&L?(Z.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=Z)}U.firstNonLinked||(U.hasLinkedRanges=!1),U===I&&(D.push(U),this.$openTabstops[z]=U),this.addTabstopMarkers(U),U.rangeList=U.rangeList||new a,U.rangeList.$bias=0,U.rangeList.addList(U)},this),D.length>2&&(this.tabstops.length&&D.push(D.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,D))},C.prototype.addTabstopMarkers=function(O){var N=this.session;O.forEach(function(M){M.markerId||(M.markerId=N.addMarker(M,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(O){var N=this.session;O.forEach(function(M){N.removeMarker(M.markerId),M.markerId=null})},C.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var O=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&O--,this.tabstops.forEach(function(N){N.snippetId===O?this.addTabstopMarkers(N):this.removeTabstopMarkers(N)},this)}},C.prototype.removeRange=function(O){var N=O.tabstop.indexOf(O);N!=-1&&O.tabstop.splice(N,1),N=this.ranges.indexOf(O),N!=-1&&this.ranges.splice(N,1),N=O.tabstop.rangeList.ranges.indexOf(O),N!=-1&&O.tabstop.splice(N,1),this.session.removeMarker(O.markerId),O.tabstop.length||(N=this.tabstops.indexOf(O.tabstop),N!=-1&&this.tabstops.splice(N,1),this.tabstops.length||this.detach())},C})();x.prototype.keyboardHandler=new u,x.prototype.keyboardHandler.bindKeys({Tab:function(C){r.snippetManager&&r.snippetManager.expandWithTab(C)||(C.tabstopManager.tabNext(1),C.renderer.scrollCursorIntoView())},"Shift-Tab":function(C){C.tabstopManager.tabNext(-1),C.renderer.scrollCursorIntoView()},Esc:function(C){C.tabstopManager.detach()}});var R=function(C,O){C.row==0&&(C.column+=O.column),C.row+=O.row},S=function(C,O){C.row==O.row&&(C.column-=O.column),C.row-=O.row};f.importCssString(`
|
|
1133
|
+
.ace_snippet-marker {
|
|
1134
|
+
-moz-box-sizing: border-box;
|
|
1135
|
+
box-sizing: border-box;
|
|
1136
|
+
background: rgba(194, 193, 208, 0.09);
|
|
1137
|
+
border: 1px dotted rgba(211, 208, 235, 0.62);
|
|
1138
|
+
position: absolute;
|
|
1139
|
+
}`,"snippets.css",!1),r.snippetManager=new m;var A=e("./editor").Editor;(function(){this.insertSnippet=function(C,O){return r.snippetManager.insertSnippet(this,C,O)},this.expandSnippet=function(C){return r.snippetManager.expandWithTab(this,C)}}).call(A.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(e,r,d){var h=e("../virtual_renderer").VirtualRenderer,f=e("../editor").Editor,v=e("../range").Range,o=e("../lib/event"),p=e("../lib/lang"),i=e("../lib/dom"),a=e("../config").nls,u=e("./../lib/useragent"),g=function(R){return"suggest-aria-id:".concat(R)},s=u.isSafari?"menu":"listbox",c=u.isSafari?"menuitem":"option",m=u.isSafari?"aria-current":"aria-selected",w=function(R){var S=new h(R);S.$maxLines=4;var A=new f(S);return A.setHighlightActiveLine(!1),A.setShowPrintMargin(!1),A.renderer.setShowGutter(!1),A.renderer.setHighlightGutterLine(!1),A.$mouseHandler.$focusTimeout=0,A.$highlightTagPending=!0,A},x=(function(){function R(S){var A=i.createElement("div"),C=w(A);S&&S.appendChild(A),A.style.display="none",C.renderer.content.style.cursor="default",C.renderer.setStyle("ace_autocomplete"),C.renderer.$textLayer.element.setAttribute("role",s),C.renderer.$textLayer.element.setAttribute("aria-roledescription",a("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),C.renderer.$textLayer.element.setAttribute("aria-label",a("autocomplete.popup.aria-label","Autocomplete suggestions")),C.renderer.textarea.setAttribute("aria-hidden","true"),C.setOption("displayIndentGuides",!1),C.setOption("dragDelay",150);var O=function(){};C.focus=O,C.$isFocused=!0,C.renderer.$cursorLayer.restartTimer=O,C.renderer.$cursorLayer.element.style.opacity="0",C.renderer.$maxLines=8,C.renderer.$keepTextAreaAtCursor=!1,C.setHighlightActiveLine(!1),C.session.highlight(""),C.session.$searchHighlight.clazz="ace_highlight-marker",C.on("mousedown",function($){var _=$.getDocumentPosition();C.selection.moveToPosition(_),L.start.row=L.end.row=_.row,$.stop()});var N,M=new v(-1,0,-1,1/0),L=new v(-1,0,-1,1/0);L.id=C.session.addMarker(L,"ace_active-line","fullLine"),C.setSelectOnHover=function($){$?M.id&&(C.session.removeMarker(M.id),M.id=null):M.id=C.session.addMarker(M,"ace_line-hover","fullLine")},C.setSelectOnHover(!1),C.on("mousemove",function($){if(!N){N=$;return}if(!(N.x==$.x&&N.y==$.y)){N=$,N.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var _=N.getDocumentPosition().row;M.start.row!=_&&(M.id||C.setRow(_),F(_))}}),C.renderer.on("beforeRender",function(){if(N&&M.start.row!=-1){N.$pos=null;var $=N.getDocumentPosition().row;M.id||C.setRow($),F($,!0)}}),C.renderer.on("afterRender",function(){for(var $=C.renderer.$textLayer,_=$.config.firstRow,I=$.config.lastRow;_<=I;_++){var z=$.element.childNodes[_-$.config.firstRow];z.setAttribute("role",c),z.setAttribute("aria-roledescription",a("autocomplete.popup.item.aria-roledescription","item")),z.setAttribute("aria-setsize",C.data.length),z.setAttribute("aria-describedby","doc-tooltip"),z.setAttribute("aria-posinset",_+1);var U=C.getData(_);if(U){var V="".concat(U.caption||U.value).concat(U.meta?", ".concat(U.meta):"");z.setAttribute("aria-label",V)}var K=z.querySelectorAll(".ace_completion-highlight");K.forEach(function(Z){Z.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var $=C.getRow(),_=C.renderer.$textLayer,I=_.element.childNodes[$-_.config.firstRow],z=document.activeElement;if(I!==C.selectedNode&&C.selectedNode&&(i.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(m),C.selectedNode.removeAttribute("id")),z.removeAttribute("aria-activedescendant"),C.selectedNode=I,I){var U=g($);i.addCssClass(I,"ace_selected"),I.id=U,_.element.setAttribute("aria-activedescendant",U),z.setAttribute("aria-activedescendant",U),I.setAttribute(m,"true")}});var j=function(){F(-1)},F=function($,_){$!==M.start.row&&(M.start.row=M.end.row=$,_||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return M.start.row},o.addListener(C.container,"mouseout",function(){C.isMouseOver=!1,j()}),C.on("hide",j),C.on("changeSelection",j),C.session.doc.getLength=function(){return C.data.length},C.session.doc.getLine=function($){var _=C.data[$];return typeof _=="string"?_:_&&_.value||""};var D=C.session.bgTokenizer;return D.$tokenizeRow=function($){function _(ie,fe){ie&&z.push({type:(I.className||"")+(fe||""),value:ie})}var I=C.data[$],z=[];if(!I)return z;typeof I=="string"&&(I={value:I});for(var U=I.caption||I.value||I.name,V=U.toLowerCase(),K=(C.filterText||"").toLowerCase(),Z=0,oe=0,ee=0;ee<=K.length;ee++)if(ee!=oe&&(I.matchMask&1<<ee||ee==K.length)){var re=K.slice(oe,ee);oe=ee;var ce=V.indexOf(re,Z);if(ce==-1)continue;_(U.slice(Z,ce),""),Z=ce+re.length,_(U.slice(ce,Z),"completion-highlight")}return _(U.slice(Z,U.length),""),z.push({type:"completion-spacer",value:" "}),I.meta&&z.push({type:"completion-meta",value:I.meta}),I.message&&z.push({type:"completion-message",value:I.message}),z},D.$updateOnChange=O,D.start=O,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($,_){C.filterText=_||"",C.setValue(p.stringRepeat(`
|
|
1140
|
+
`,$.length),-1),C.data=$||[],C.setRow(0)},C.getData=function($){return C.data[$]},C.getRow=function(){return L.start.row},C.setRow=function($){$=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,$)),L.start.row!=$&&(C.selection.clearSelection(),L.start.row=L.end.row=$||0,C.session._emit("changeBackMarker"),C.moveCursorTo($||0,0),C.isOpen&&C._signal("select"))},C.on("changeSelection",function(){C.isOpen&&C.setRow(C.selection.lead.row),C.renderer.scrollCursorIntoView()}),C.hide=function(){this.container.style.display="none",C.anchorPos=null,C.anchor=null,C.isOpen&&(C.isOpen=!1,this._signal("hide"))},C.tryShow=function($,_,I,z){if(!z&&C.isOpen&&C.anchorPos&&C.anchor&&C.anchorPos.top===$.top&&C.anchorPos.left===$.left&&C.anchor===I)return!0;var U=this.container,V=this.renderer.scrollBar.width||10,K=window.innerHeight-V,Z=window.innerWidth-V,oe=this.renderer,ee=oe.$maxLines*_*1.4,re={top:0,bottom:0},ce=K-$.top-3*this.$borderSize-_,ie=$.top-3*this.$borderSize;I||(ie<=ce||ce>=ee?I="bottom":I="top"),I==="top"?(re.bottom=$.top-this.$borderSize,re.top=re.bottom-ee):I==="bottom"&&(re.top=$.top+_+this.$borderSize,re.bottom=re.top+ee);var fe=re.top>=0&&re.bottom<=K;if(!z&&!fe)return!1;fe?oe.$maxPixelHeight=null:I==="top"?oe.$maxPixelHeight=ie:oe.$maxPixelHeight=ce,I==="top"?(U.style.top="",U.style.bottom=K+V-re.bottom+"px",C.isTopdown=!1):(U.style.top=re.top+"px",U.style.bottom="",C.isTopdown=!0),U.style.display="";var pe=$.left;return pe+U.offsetWidth>Z&&(pe=Z-U.offsetWidth),U.style.left=pe+"px",U.style.right="",i.$fixPositionBug(U),C.isOpen||(C.isOpen=!0,this._signal("show"),N=null),C.anchorPos=$,C.anchor=I,!0},C.show=function($,_,I){this.tryShow($,_,I?"bottom":void 0,!0)},C.goTo=function($){var _=this.getRow(),I=this.session.getLength()-1;switch($){case"up":_=_<=0?I:_-1;break;case"down":_=_>=I?-1:_+1;break;case"start":_=0;break;case"end":_=I}this.setRow(_)},C.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},C.$imageSize=0,C.$borderSize=1,C}return R})();i.importCssString(`
|
|
1141
|
+
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
|
1142
|
+
background-color: #CAD6FA;
|
|
1143
|
+
z-index: 1;
|
|
1144
|
+
}
|
|
1145
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
|
1146
|
+
background-color: #3a674e;
|
|
1147
|
+
}
|
|
1148
|
+
.ace_editor.ace_autocomplete .ace_line-hover {
|
|
1149
|
+
border: 1px solid #abbffe;
|
|
1150
|
+
margin-top: -1px;
|
|
1151
|
+
background: rgba(233,233,253,0.4);
|
|
1152
|
+
position: absolute;
|
|
1153
|
+
z-index: 2;
|
|
1154
|
+
}
|
|
1155
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
|
|
1156
|
+
border: 1px solid rgba(109, 150, 13, 0.8);
|
|
1157
|
+
background: rgba(58, 103, 78, 0.62);
|
|
1158
|
+
}
|
|
1159
|
+
.ace_completion-meta {
|
|
1160
|
+
opacity: 0.5;
|
|
1161
|
+
margin-left: 0.9em;
|
|
1162
|
+
}
|
|
1163
|
+
.ace_completion-message {
|
|
1164
|
+
margin-left: 0.9em;
|
|
1165
|
+
color: blue;
|
|
1166
|
+
}
|
|
1167
|
+
.ace_editor.ace_autocomplete .ace_completion-highlight{
|
|
1168
|
+
color: #2d69c7;
|
|
1169
|
+
}
|
|
1170
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
|
|
1171
|
+
color: #93ca12;
|
|
1172
|
+
}
|
|
1173
|
+
.ace_editor.ace_autocomplete {
|
|
1174
|
+
width: 300px;
|
|
1175
|
+
z-index: 200000;
|
|
1176
|
+
border: 1px lightgray solid;
|
|
1177
|
+
position: fixed;
|
|
1178
|
+
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
|
1179
|
+
line-height: 1.4;
|
|
1180
|
+
background: #fefefe;
|
|
1181
|
+
color: #111;
|
|
1182
|
+
}
|
|
1183
|
+
.ace_dark.ace_editor.ace_autocomplete {
|
|
1184
|
+
border: 1px #484747 solid;
|
|
1185
|
+
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
|
|
1186
|
+
line-height: 1.4;
|
|
1187
|
+
background: #25282c;
|
|
1188
|
+
color: #c1c1c1;
|
|
1189
|
+
}
|
|
1190
|
+
.ace_autocomplete .ace_text-layer {
|
|
1191
|
+
width: calc(100% - 8px);
|
|
1192
|
+
}
|
|
1193
|
+
.ace_autocomplete .ace_line {
|
|
1194
|
+
display: flex;
|
|
1195
|
+
align-items: center;
|
|
1196
|
+
}
|
|
1197
|
+
.ace_autocomplete .ace_line > * {
|
|
1198
|
+
min-width: 0;
|
|
1199
|
+
flex: 0 0 auto;
|
|
1200
|
+
}
|
|
1201
|
+
.ace_autocomplete .ace_line .ace_ {
|
|
1202
|
+
flex: 0 1 auto;
|
|
1203
|
+
overflow: hidden;
|
|
1204
|
+
text-overflow: ellipsis;
|
|
1205
|
+
}
|
|
1206
|
+
.ace_autocomplete .ace_completion-spacer {
|
|
1207
|
+
flex: 1;
|
|
1208
|
+
}
|
|
1209
|
+
.ace_autocomplete.ace_loading:after {
|
|
1210
|
+
content: "";
|
|
1211
|
+
position: absolute;
|
|
1212
|
+
top: 0px;
|
|
1213
|
+
height: 2px;
|
|
1214
|
+
width: 8%;
|
|
1215
|
+
background: blue;
|
|
1216
|
+
z-index: 100;
|
|
1217
|
+
animation: ace_progress 3s infinite linear;
|
|
1218
|
+
animation-delay: 300ms;
|
|
1219
|
+
transform: translateX(-100%) scaleX(1);
|
|
1220
|
+
}
|
|
1221
|
+
@keyframes ace_progress {
|
|
1222
|
+
0% { transform: translateX(-100%) scaleX(1) }
|
|
1223
|
+
50% { transform: translateX(625%) scaleX(2) }
|
|
1224
|
+
100% { transform: translateX(1500%) scaleX(3) }
|
|
1225
|
+
}
|
|
1226
|
+
@media (prefers-reduced-motion) {
|
|
1227
|
+
.ace_autocomplete.ace_loading:after {
|
|
1228
|
+
transform: translateX(625%) scaleX(2);
|
|
1229
|
+
animation: none;
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
`,"autocompletion.css",!1),r.AcePopup=x,r.$singleLineEditor=w,r.getAriaId=g}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,r,d){var h=(function(){function f(v){this.editor=v,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return f.prototype.setScreenReaderContent=function(v){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var p=this.popup.getRow(),i=this.popup.renderer.$textLayer,a=i.element.childNodes[p-i.config.firstRow];if(a){for(var u="doc-tooltip ",g=0;g<this._lines.length;g++)u+="ace-inline-screenreader-line-".concat(g," ");a.setAttribute("aria-describedby",u)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=v.split(/\r\n|\r|\n/);var o=this.createCodeBlock();this.screenReaderDiv.appendChild(o)},f.prototype.destroy=function(){this.screenReaderDiv.remove()},f.prototype.createCodeBlock=function(){var v=document.createElement("pre");v.setAttribute("id","ace-inline-screenreader");for(var o=0;o<this._lines.length;o++){var p=document.createElement("code");p.setAttribute("id","ace-inline-screenreader-line-".concat(o));var i=document.createTextNode(this._lines[o]);p.appendChild(i),v.appendChild(p)}return v},f})();r.AceInlineScreenReader=h}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(e,r,d){var h=e("../snippets").snippetManager,f=e("./inline_screenreader").AceInlineScreenReader,v=(function(){function o(){this.editor=null}return o.prototype.show=function(p,i,a){if(a=a||"",p&&this.editor&&this.editor!==p&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!p||!i)return!1;this.inlineScreenReader||(this.inlineScreenReader=new f(p));var u=i.snippet?h.getDisplayTextForSnippet(p,i.snippet):i.value;return i.hideInlinePreview||!u||!u.startsWith(a)?!1:(this.editor=p,this.inlineScreenReader.setScreenReaderContent(u),u=u.slice(a.length),u===""?p.removeGhostText():p.setGhostText(u),!0)},o.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},o.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},o.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},o})();r.AceInline=v}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,r,d){r.parForEach=function(f,v,o){var p=0,i=f.length;i===0&&o();for(var a=0;a<i;a++)v(f[a],function(u,g){p++,p===i&&o(u,g)})};var h=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(f,v,o){o=o||h;for(var p=[],i=v-1;i>=0&&o.test(f[i]);i--)p.push(f[i]);return p.reverse().join("")},r.retrieveFollowingIdentifier=function(f,v,o){o=o||h;for(var p=[],i=v;i<f.length&&o.test(f[i]);i++)p.push(f[i]);return p},r.getCompletionPrefix=function(f){var v=f.getCursorPosition(),o=f.session.getLine(v.row),p;return f.completers.forEach((function(i){i.identifierRegexps&&i.identifierRegexps.forEach((function(a){!p&&a&&(p=this.retrievePrecedingIdentifier(o,v.column,a))}).bind(this))}).bind(this)),p||this.retrievePrecedingIdentifier(o,v.column)},r.triggerAutocomplete=function(f,o){var o=o??f.session.getPrecedingCharacter();return f.completers.some(function(p){if(p.triggerCharacters&&Array.isArray(p.triggerCharacters))return p.triggerCharacters.includes(o)})}}),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(e,r,d){var h=e("./keyboard/hash_handler").HashHandler,f=e("./autocomplete/popup").AcePopup,v=e("./autocomplete/inline").AceInline,o=e("./autocomplete/popup").getAriaId,p=e("./autocomplete/util"),i=e("./lib/lang"),a=e("./lib/dom"),u=e("./snippets").snippetManager,g=e("./config"),s=e("./lib/event"),c=e("./lib/scroll").preventParentScroll,m=function(S,A){A.completer&&A.completer.destroy()},w=(function(){function S(){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=i.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=i.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=i.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=i.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=i.delayedCall((function(){var A=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!A||this.editor.completers.length===0||(this.completions=new R(S.completionsForLoading),this.openPopup(this.editor,A.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty(S,"completionsForLoading",{get:function(){return[{caption:g.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),S.prototype.$init=function(){return this.popup=new f(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(A){this.insertMatch(),A.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),s.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},S.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new v,this.inlineRenderer},S.prototype.getPopup=function(){return this.popup||this.$init()},S.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},S.prototype.$seen=function(A){!this.hasSeen.has(A)&&A&&A.completer&&A.completer.onSeen&&typeof A.completer.onSeen=="function"&&(A.completer.onSeen(this.editor,A),this.hasSeen.add(A))},S.prototype.$onPopupChange=function(A){if(this.inlineRenderer&&this.inlineEnabled){var C=A?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)},S.prototype.$updateGhostText=function(A){var C=this.base.row,O=this.base.column,N=this.editor.getCursorPosition().column,M=this.editor.session.getLine(C).slice(O,N);this.inlineRenderer.show(this.editor,A,M)?this.$seen(A):this.inlineRenderer.hide()},S.prototype.$onPopupRender=function(){var A=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 O=this.popup.getData(C);O&&(!A||O.hideInlinePreview)&&this.$seen(O)}},S.prototype.$onPopupShow=function(A){this.$onPopupChange(A),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},S.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var A=this.editor.container.parentNode,C=[];A;)C.push(A),A.addEventListener("scroll",this.onLayoutChange,{passive:!0}),A=A.parentNode;this.$elements=C}},S.prototype.unObserveLayoutChanges=function(){var A=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(C){C.removeEventListener("scroll",A.onLayoutChange,{passive:!0})}),this.$elements=null},S.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},S.prototype.$updatePopupPosition=function(){var A=this.editor,C=A.renderer,O=C.layerConfig.lineHeight,N=C.$cursorLayer.getPixelPosition(this.base,!0);N.left-=this.popup.getTextLeftOffset();var M=A.container.getBoundingClientRect();N.top+=M.top-C.layerConfig.offset,N.left+=M.left-A.renderer.scrollLeft,N.left+=C.gutterWidth;var L={top:N.top,left:N.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(L.top+=C.$ghostTextWidget.el.offsetHeight);var j=A.container.getBoundingClientRect().bottom-O,F=j<L.top?{top:j,left:L.left}:L;this.popup.tryShow(F,O,"bottom")||this.popup.tryShow(N,O,"top")||this.popup.show(N,O)},S.prototype.openPopup=function(A,C,O){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var N=this.popup.getRow(),M=this.popup.data[N];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:o(this.popup.getRow()),inline:this.inlineEnabled}),A.keyBinding.addKeyboardHandler(this.keyboardHandler);var L;this.stickySelection&&(L=this.popup.data.indexOf(M)),(!L||L===-1)&&(L=0),this.popup.setRow(this.autoSelect?L:-1),L===N&&M!==this.completions.filtered[L]&&this.$onPopupChange();var j=this.inlineRenderer&&this.inlineEnabled;if(L===N&&j){var F=this.popup.getData(this.popup.getRow());this.$updateGhostText(F)}O||(this.popup.setTheme(A.getTheme()),this.popup.setFontSize(A.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},S.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()},S.prototype.changeListener=function(A){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()},S.prototype.blurListener=function(A){var C=document.activeElement,O=this.editor.textInput.getElement(),N=A.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(A.relatedTarget),M=this.popup&&this.popup.container;C!=O&&C.parentNode!=M&&!N&&C!=this.tooltipNode&&A.relatedTarget!=O&&this.detach()},S.prototype.mousedownListener=function(A){this.detach()},S.prototype.mousewheelListener=function(A){this.popup&&!this.popup.isMouseOver&&this.detach()},S.prototype.mouseOutListener=function(A){this.popup.isOpen&&this.$updatePopupPosition()},S.prototype.goTo=function(A){this.popup.goTo(A)},S.prototype.insertMatch=function(A,C){if(A||(A=this.popup.getData(this.popup.getRow())),!A)return!1;if(A.value==="")return this.detach();var O=this.completions,N=this.getCompletionProvider().insertMatch(this.editor,A,O.filterText,C);return this.completions==O&&this.detach(),N},S.prototype.showPopup=function(A,C){this.editor&&this.detach(),this.activated=!0,this.editor=A,A.completer!=this&&(A.completer&&A.completer.detach(),A.completer=this),A.on("changeSelection",this.changeListener),A.on("blur",this.blurListener),A.on("mousedown",this.mousedownListener),A.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,C)},S.prototype.getCompletionProvider=function(A){return this.completionProvider||(this.completionProvider=new x(A)),this.completionProvider},S.prototype.gatherCompletions=function(A,C){return this.getCompletionProvider().gatherCompletions(A,C)},S.prototype.updateCompletions=function(A,C){if(A&&this.base&&this.completions){var N=this.editor.getCursorPosition(),M=this.editor.session.getTextRange({start:this.base,end:N});if(M==this.completions.filterText)return;if(this.completions.setFilter(M),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==M&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,M,A);return}if(C&&C.matches){var N=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(N.row,N.column),this.base.$insertRight=!0,this.completions=new R(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",A)}var O=this.editor.getSession(),N=this.editor.getCursorPosition(),M=p.getCompletionPrefix(this.editor);this.base=O.doc.createAnchor(N.row,N.column-M.length),this.base.$insertRight=!0;var L={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:M,pos:N}).provideCompletions(this.editor,L,(function(j,F,D){var $=F.filtered,_=p.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),D){if(!$.length){var I=!this.autoShown&&this.emptyMessage;if(typeof I=="function"&&(I=this.emptyMessage(_)),I){var z=[{caption:I,value:""}];this.completions=new R(z),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($.length==1&&$[0].value==_&&!$[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&$.length==1)return this.insertMatch($[0])}this.completions=!D&&this.showLoadingState?new R(S.completionsForLoading.concat($),F.filterText):F,this.openPopup(this.editor,_,A),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!D)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},S.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},S.prototype.updateDocTooltip=function(){var A=this.popup,C=this.completions&&this.completions.filtered,O=C&&(C[A.getHoveredRow()]||C[A.getRow()]),N=null;if(!O||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var M=this.editor.completers.length,L=0;L<M;L++){var j=this.editor.completers[L];if(j.getDocTooltip&&O.completerId===j.id){N=j.getDocTooltip(O);break}}if(!N&&typeof O!="string"&&(N=O),typeof N=="string"&&(N={docText:N}),!N||!N.docHTML&&!N.docText)return this.hideDocTooltip();this.showDocTooltip(N)},S.prototype.showDocTooltip=function(A){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",c));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var O=this.tooltipNode;A.docHTML?O.innerHTML=A.docHTML:A.docText&&(O.textContent=A.docText),O.parentNode||this.popup.container.appendChild(this.tooltipNode);var N=this.popup,M=N.container.getBoundingClientRect(),L=400,j=300,F=N.renderer.scrollBar.width||10,D=M.left,$=window.innerWidth-M.right-F,_=N.isTopdown?window.innerHeight-F-M.bottom:M.top,I=[Math.min($/L,1),Math.min(D/L,1),Math.min(_/j,1)*.9],z=Math.max.apply(Math,I),U=O.style;U.display="block",z==I[0]||I[0]>=1?(U.left=M.right+1+"px",U.right="",U.maxWidth=L*z+"px",U.top=M.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-F-M.top,j)+"px"):z==I[1]||I[1]>=1?(U.right=window.innerWidth-M.left+"px",U.left="",U.maxWidth=L*z+"px",U.top=M.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-F-M.top,j)+"px"):z==I[2]&&(U.left=M.left+"px",U.right="",U.maxWidth=Math.min(L,window.innerWidth-M.left)+"px",N.isTopdown?(U.top=M.bottom+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-F-M.bottom,j)+"px"):(U.top="",U.bottom=window.innerHeight-M.top+"px",U.maxHeight=Math.min(M.top,j)+"px")),a.$fixPositionBug(O)},S.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var A=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==A&&this.editor.focus(),this.tooltipNode=null,A.parentNode&&A.parentNode.removeChild(A)}},S.prototype.onTooltipClick=function(A){for(var C=A.target;C&&C!=this.tooltipNode;){if(C.nodeName=="A"&&C.href){C.rel="noreferrer",C.target="_blank";break}C=C.parentNode}},S.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var A=this.popup.container;A&&A.parentNode&&A.parentNode.removeChild(A)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",m),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},S.for=function(A){return A.completer instanceof S||(A.completer&&(A.completer.destroy(),A.completer=null),g.get("sharedPopups")?(S.$sharedInstance||(S.$sharedInstance=new S),A.completer=S.$sharedInstance):(A.completer=new S,A.once("destroy",m))),A.completer},S})();w.prototype.commands={Up:function(S){S.completer.goTo("up")},Down:function(S){S.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(S){S.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(S){S.completer.goTo("end")},Esc:function(S){S.completer.detach()},Return:function(S){return S.completer.insertMatch()},"Shift-Return":function(S){S.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(S){var A=S.completer.insertMatch();if(A||S.tabstopManager)return A;S.completer.goTo("down")},Backspace:function(S){S.execCommand("backspace");var A=p.getCompletionPrefix(S);!A&&S.completer&&S.completer.detach()},PageUp:function(S){S.completer.popup.gotoPageUp()},PageDown:function(S){S.completer.popup.gotoPageDown()}},w.startCommand={name:"startAutocomplete",exec:function(S,A){var C=w.for(S);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup(S,A),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var x=(function(){function S(A){this.initialPosition=A,this.active=!0}return S.prototype.insertByIndex=function(A,C,O){return!this.completions||!this.completions.filtered?!1:this.insertMatch(A,this.completions.filtered[C],O)},S.prototype.insertMatch=function(A,C,O){if(!C)return!1;if(A.startOperation({command:{name:"insertMatch"}}),C.completer&&C.completer.insertMatch)C.completer.insertMatch(A,C);else{if(!this.completions)return!1;var N=this.completions.filterText.length,M=0;if(C.range&&C.range.start.row===C.range.end.row&&(N-=this.initialPosition.prefix.length,N+=this.initialPosition.pos.column-C.range.start.column,M+=C.range.end.column-this.initialPosition.pos.column),N||M){var L;A.selection.getAllRanges?L=A.selection.getAllRanges():L=[A.getSelectionRange()];for(var j=0,F;F=L[j];j++)F.start.column-=N,F.end.column+=M,A.session.remove(F)}C.snippet?u.insertSnippet(A,C.snippet):this.$insertString(A,C),C.completer&&C.completer.onInsert&&typeof C.completer.onInsert=="function"&&C.completer.onInsert(A,C),C.command&&C.command==="startAutocomplete"&&A.execCommand(C.command)}return A.endOperation(),!0},S.prototype.$insertString=function(A,C){var O=C.value||C;A.execCommand("insertstring",O)},S.prototype.gatherCompletions=function(A,C){var O=A.getSession(),N=A.getCursorPosition(),M=p.getCompletionPrefix(A),L=[];this.completers=A.completers;var j=A.completers.length;return A.completers.forEach(function(F,D){F.getCompletions(A,O,N,M,function($,_){F.hideInlinePreview&&(_=_.map(function(I){return Object.assign(I,{hideInlinePreview:F.hideInlinePreview})})),!$&&_&&(L=L.concat(_)),C(null,{prefix:p.getCompletionPrefix(A),matches:L,finished:--j===0})})}),!0},S.prototype.provideCompletions=function(A,C,O){var N=(function(F){var D=F.prefix,$=F.matches;this.completions=new R($),C.exactMatch&&(this.completions.exactMatch=!0),C.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(D),(F.finished||this.completions.filtered.length)&&O(null,this.completions,F.finished)}).bind(this),M=!0,L=null;if(this.gatherCompletions(A,(function(F,D){if(this.active){F&&(O(F,[],!0),this.detach());var $=D.prefix;if($.indexOf(D.prefix)===0){if(M){L=D;return}N(D)}}}).bind(this)),M=!1,L){var j=L;L=null,N(j)}},S.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(A){typeof A.cancel=="function"&&A.cancel()})},S})(),R=(function(){function S(A,C){this.all=A,this.filtered=A,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return S.prototype.setFilter=function(A){if(A.length>this.filterText&&A.lastIndexOf(this.filterText,0)===0)var C=this.filtered;else var C=this.all;this.filterText=A,C=this.filterCompletions(C,this.filterText),C=C.sort(function(N,M){return M.exactMatch-N.exactMatch||M.$score-N.$score||(N.caption||N.value).localeCompare(M.caption||M.value)});var O=null;C=C.filter(function(N){var M=N.snippet||N.caption||N.value;return M===O?!1:(O=M,!0)}),this.filtered=C},S.prototype.filterCompletions=function(A,C){var O=[],N=C.toUpperCase(),M=C.toLowerCase();e:for(var L=0,j;j=A[L];L++){if(j.skipFilter){j.$score=j.score,O.push(j);continue}var F=!this.ignoreCaption&&j.caption||j.value||j.snippet;if(F){var D=-1,$=0,_=0,I,z;if(this.exactMatch){if(C!==F.substr(0,C.length))continue e}else{var U=F.toLowerCase().indexOf(M);if(U>-1)_=U;else for(var V=0;V<C.length;V++){var K=F.indexOf(M[V],D+1),Z=F.indexOf(N[V],D+1);if(I=K>=0&&(Z<0||K<Z)?K:Z,I<0)continue e;z=I-D-1,z>0&&(D===-1&&(_+=10),_+=z,$|=1<<V),D=I}}j.matchMask=$,j.exactMatch=_?0:1,j.$score=(j.score||0)-_,O.push(j)}}return O},S})();r.Autocomplete=w,r.CompletionProvider=x,r.FilteredList=R}),ace.define("ace/marker_group",["require","exports","module"],function(e,r,d){var h=(function(){function f(v,o){o&&(this.markerType=o.markerType),this.markers=[],this.session=v,v.addDynamicMarker(this)}return f.prototype.getMarkerAtPosition=function(v){return this.markers.find(function(o){return o.range.contains(v.row,v.column)})},f.prototype.markersComparator=function(v,o){return v.range.start.row-o.range.start.row},f.prototype.setMarkers=function(v){this.markers=v.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},f.prototype.update=function(v,o,p,i){if(!(!this.markers||!this.markers.length))for(var a=i.firstRow,u=i.lastRow,g,s=0,c=0,m=0;m<this.markers.length;m++){var w=this.markers[m];if(!(w.range.end.row<a)&&!(w.range.start.row>u)&&(w.range.start.row===c?s++:(c=w.range.start.row,s=0),!(s>200))){var x=w.range.clipRows(a,u);if(!(x.start.row===x.end.row&&x.start.column===x.end.column)){var R=x.toScreenRange(p);if(R.isEmpty()){g=p.getNextFoldLine(x.end.row,g),g&&g.end.row>x.end.row&&(a=g.end.row);continue}this.markerType==="fullLine"?o.drawFullLineMarker(v,R,w.className,i):R.isMultiLine()?this.markerType==="line"?o.drawMultiLineMarker(v,R,w.className,i):o.drawTextMarker(v,R,w.className,i):o.drawSingleLineMarker(v,R,w.className+" ace_br15",i)}}}},f})();h.prototype.MAX_MARKERS=1e4,r.MarkerGroup=h}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,r,d){function h(p,i){var a=p.getTextRange(v.fromPoints({row:0,column:0},i));return a.split(o).length-1}function f(p,i){var a=h(p,i),u=p.getValue().split(o),g=Object.create(null),s=u[a];return u.forEach(function(c,m){if(!(!c||c===s)){var w=Math.abs(a-m),x=u.length-w;g[c]?g[c]=Math.max(x,g[c]):g[c]=x}}),g}var v=e("../range").Range,o=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.id="textCompleter",r.getCompletions=function(p,i,a,u,g){var s=f(i,a),c=Object.keys(s);g(null,c.map(function(m){return{caption:m,value:m,score:s[m],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,r,d){var h=e("../snippets").snippetManager,f=e("../autocomplete").Autocomplete,v=e("../config"),o=e("../lib/lang"),p=e("../autocomplete/util"),i=e("../marker_group").MarkerGroup,a=e("../autocomplete/text_completer"),u={getCompletions:function(M,L,j,F,D){if(L.$mode.completer)return L.$mode.completer.getCompletions(M,L,j,F,D);var $=M.session.getState(j.row),_=L.$mode.getCompletions($,L,j,F);_=_.map(function(I){return I.completerId=u.id,I}),D(null,_)},id:"keywordCompleter"},g=function(M){var L={};return M.replace(/\${(\d+)(:(.*?))?}/g,function(j,F,D,$){return L[F]=$||""}).replace(/\$(\d+?)/g,function(j,F){return L[F]})},s={getCompletions:function(M,L,j,F,D){var $=[],_=L.getTokenAt(j.row,j.column);_&&_.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?$.push("html-tag"):$=h.getActiveScopes(M);var I=h.snippetMap,z=[];$.forEach(function(U){for(var V=I[U]||[],K=V.length;K--;){var Z=V[K],oe=Z.name||Z.tabTrigger;oe&&z.push({caption:oe,snippet:Z.content,meta:Z.tabTrigger&&!Z.name?Z.tabTrigger+"⇥ ":"snippet",completerId:s.id})}},this),D(null,z)},getDocTooltip:function(M){M.snippet&&!M.docHTML&&(M.docHTML=["<b>",o.escapeHTML(M.caption),"</b>","<hr></hr>",o.escapeHTML(g(M.snippet))].join(""))},id:"snippetCompleter"},c=[s,a,u];r.setCompleters=function(M){c.length=0,M&&c.push.apply(c,M)},r.addCompleter=function(M){c.push(M)},r.textCompleter=a,r.keyWordCompleter=u,r.snippetCompleter=s;var m={name:"expandSnippet",exec:function(M){return h.expandWithTab(M)},bindKey:"Tab"},w=function(M,L){x(L.session.$mode)},x=function(M){typeof M=="string"&&(M=v.$modes[M]),M&&(h.files||(h.files={}),R(M.$id,M.snippetFileId),M.modes&&M.modes.forEach(x))},R=function(M,L){!L||!M||h.files[M]||(h.files[M]={},v.loadModule(L,function(j){j&&(h.files[M]=j,!j.snippets&&j.snippetText&&(j.snippets=h.parseSnippetFile(j.snippetText)),h.register(j.snippets||[],j.scope),j.includeScopes&&(h.snippetMap[j.scope].includeScopes=j.includeScopes,j.includeScopes.forEach(function(F){x("ace/mode/"+F)})))}))},S=function(M){var L=M.editor,j=L.completer&&L.completer.activated;if(M.command.name==="backspace")j&&!p.getCompletionPrefix(L)&&L.completer.detach();else if(M.command.name==="insertstring"&&!j){A=M;var F=M.editor.$liveAutocompletionDelay;F?C.delay(F):O(M)}},A,C=o.delayedCall(function(){O(A)},0),O=function(M){var L=M.editor,j=p.getCompletionPrefix(L),F=M.args,D=p.triggerAutocomplete(L,F);if(j&&j.length>=L.$liveAutocompletionThreshold||D){var $=f.for(L);$.autoShown=!0,$.showPopup(L)}},N=e("../editor").Editor;e("../config").defineOptions(N.prototype,"editor",{enableBasicAutocompletion:{set:function(M){M?(f.for(this),this.completers||(this.completers=Array.isArray(M)?M:c),this.commands.addCommand(f.startCommand)):this.commands.removeCommand(f.startCommand)},value:!1},enableLiveAutocompletion:{set:function(M){M?(this.completers||(this.completers=Array.isArray(M)?M:c),this.commands.on("afterExec",S)):this.commands.off("afterExec",S)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(M){M?(this.commands.addCommand(m),this.on("changeMode",w),w(null,this)):(this.commands.removeCommand(m),this.off("changeMode",w))},value:!1}}),r.MarkerGroup=i}),(function(){ace.require(["ace/ext/language_tools"],function(e){n&&(n.exports=e)})})()})(Ym)),Ym.exports}CS();var Jm={exports:{}},Zm;function AS(){return Zm||(Zm=1,(function(n,t){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(e,r,d){d.exports=`
|
|
1233
|
+
|
|
1234
|
+
/* ------------------------------------------------------------------------------------------
|
|
1235
|
+
* Editor Search Form
|
|
1236
|
+
* --------------------------------------------------------------------------------------- */
|
|
1237
|
+
.ace_search {
|
|
1238
|
+
background-color: #ddd;
|
|
1239
|
+
color: #666;
|
|
1240
|
+
border: 1px solid #cbcbcb;
|
|
1241
|
+
border-top: 0 none;
|
|
1242
|
+
overflow: hidden;
|
|
1243
|
+
margin: 0;
|
|
1244
|
+
padding: 4px 6px 0 4px;
|
|
1245
|
+
position: absolute;
|
|
1246
|
+
top: 0;
|
|
1247
|
+
z-index: 99;
|
|
1248
|
+
white-space: normal;
|
|
1249
|
+
}
|
|
1250
|
+
.ace_search.left {
|
|
1251
|
+
border-left: 0 none;
|
|
1252
|
+
border-radius: 0px 0px 5px 0px;
|
|
1253
|
+
left: 0;
|
|
1254
|
+
}
|
|
1255
|
+
.ace_search.right {
|
|
1256
|
+
border-radius: 0px 0px 0px 5px;
|
|
1257
|
+
border-right: 0 none;
|
|
1258
|
+
right: 0;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
.ace_search_form, .ace_replace_form {
|
|
1262
|
+
margin: 0 20px 4px 0;
|
|
1263
|
+
overflow: hidden;
|
|
1264
|
+
line-height: 1.9;
|
|
1265
|
+
}
|
|
1266
|
+
.ace_replace_form {
|
|
1267
|
+
margin-right: 0;
|
|
1268
|
+
}
|
|
1269
|
+
.ace_search_form.ace_nomatch {
|
|
1270
|
+
outline: 1px solid red;
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
.ace_search_field {
|
|
1274
|
+
border-radius: 3px 0 0 3px;
|
|
1275
|
+
background-color: white;
|
|
1276
|
+
color: black;
|
|
1277
|
+
border: 1px solid #cbcbcb;
|
|
1278
|
+
border-right: 0 none;
|
|
1279
|
+
outline: 0;
|
|
1280
|
+
padding: 0;
|
|
1281
|
+
font-size: inherit;
|
|
1282
|
+
margin: 0;
|
|
1283
|
+
line-height: inherit;
|
|
1284
|
+
padding: 0 6px;
|
|
1285
|
+
min-width: 17em;
|
|
1286
|
+
vertical-align: top;
|
|
1287
|
+
min-height: 1.8em;
|
|
1288
|
+
box-sizing: content-box;
|
|
1289
|
+
}
|
|
1290
|
+
.ace_searchbtn {
|
|
1291
|
+
border: 1px solid #cbcbcb;
|
|
1292
|
+
line-height: inherit;
|
|
1293
|
+
display: inline-block;
|
|
1294
|
+
padding: 0 6px;
|
|
1295
|
+
background: #fff;
|
|
1296
|
+
border-right: 0 none;
|
|
1297
|
+
border-left: 1px solid #dcdcdc;
|
|
1298
|
+
cursor: pointer;
|
|
1299
|
+
margin: 0;
|
|
1300
|
+
position: relative;
|
|
1301
|
+
color: #666;
|
|
1302
|
+
}
|
|
1303
|
+
.ace_searchbtn:last-child {
|
|
1304
|
+
border-radius: 0 3px 3px 0;
|
|
1305
|
+
border-right: 1px solid #cbcbcb;
|
|
1306
|
+
}
|
|
1307
|
+
.ace_searchbtn:disabled {
|
|
1308
|
+
background: none;
|
|
1309
|
+
cursor: default;
|
|
1310
|
+
}
|
|
1311
|
+
.ace_searchbtn:hover {
|
|
1312
|
+
background-color: #eef1f6;
|
|
1313
|
+
}
|
|
1314
|
+
.ace_searchbtn.prev, .ace_searchbtn.next {
|
|
1315
|
+
padding: 0px 0.7em
|
|
1316
|
+
}
|
|
1317
|
+
.ace_searchbtn.prev:after, .ace_searchbtn.next:after {
|
|
1318
|
+
content: "";
|
|
1319
|
+
border: solid 2px #888;
|
|
1320
|
+
width: 0.5em;
|
|
1321
|
+
height: 0.5em;
|
|
1322
|
+
border-width: 2px 0 0 2px;
|
|
1323
|
+
display:inline-block;
|
|
1324
|
+
transform: rotate(-45deg);
|
|
1325
|
+
}
|
|
1326
|
+
.ace_searchbtn.next:after {
|
|
1327
|
+
border-width: 0 2px 2px 0 ;
|
|
1328
|
+
}
|
|
1329
|
+
.ace_searchbtn_close {
|
|
1330
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
|
|
1331
|
+
border-radius: 50%;
|
|
1332
|
+
border: 0 none;
|
|
1333
|
+
color: #656565;
|
|
1334
|
+
cursor: pointer;
|
|
1335
|
+
font: 16px/16px Arial;
|
|
1336
|
+
padding: 0;
|
|
1337
|
+
height: 14px;
|
|
1338
|
+
width: 14px;
|
|
1339
|
+
top: 9px;
|
|
1340
|
+
right: 7px;
|
|
1341
|
+
position: absolute;
|
|
1342
|
+
}
|
|
1343
|
+
.ace_searchbtn_close:hover {
|
|
1344
|
+
background-color: #656565;
|
|
1345
|
+
background-position: 50% 100%;
|
|
1346
|
+
color: white;
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
.ace_button {
|
|
1350
|
+
margin-left: 2px;
|
|
1351
|
+
cursor: pointer;
|
|
1352
|
+
-webkit-user-select: none;
|
|
1353
|
+
-moz-user-select: none;
|
|
1354
|
+
-o-user-select: none;
|
|
1355
|
+
-ms-user-select: none;
|
|
1356
|
+
user-select: none;
|
|
1357
|
+
overflow: hidden;
|
|
1358
|
+
opacity: 0.7;
|
|
1359
|
+
border: 1px solid rgba(100,100,100,0.23);
|
|
1360
|
+
padding: 1px;
|
|
1361
|
+
box-sizing: border-box!important;
|
|
1362
|
+
color: black;
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
.ace_button:hover {
|
|
1366
|
+
background-color: #eee;
|
|
1367
|
+
opacity:1;
|
|
1368
|
+
}
|
|
1369
|
+
.ace_button:active {
|
|
1370
|
+
background-color: #ddd;
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
.ace_button.checked {
|
|
1374
|
+
border-color: #3399ff;
|
|
1375
|
+
opacity:1;
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
.ace_search_options{
|
|
1379
|
+
margin-bottom: 3px;
|
|
1380
|
+
text-align: right;
|
|
1381
|
+
-webkit-user-select: none;
|
|
1382
|
+
-moz-user-select: none;
|
|
1383
|
+
-o-user-select: none;
|
|
1384
|
+
-ms-user-select: none;
|
|
1385
|
+
user-select: none;
|
|
1386
|
+
clear: both;
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
.ace_search_counter {
|
|
1390
|
+
float: left;
|
|
1391
|
+
font-family: arial;
|
|
1392
|
+
padding: 0 8px;
|
|
1393
|
+
}`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/ext/searchbox","ace/ext/searchbox","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(e,r,d){var h=e("../lib/dom"),f=e("../lib/lang"),v=e("../lib/event"),o=e("./searchbox-css"),p=e("../keyboard/hash_handler").HashHandler,i=e("../lib/keys"),a=e("../config").nls,u=999;h.importCssString(o,"ace_searchbox",!1);var g=(function(){function m(w,x,R){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(o,"ace_searchbox",w.container),v.addListener(this.element,"touchstart",function(S){S.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;v.addListener(w,"mousedown",function(R){setTimeout(function(){x.activeInput.focus()},0),v.stopPropagation(R)}),v.addListener(w,"click",function(R){var S=R.target||R.srcElement,A=S.getAttribute("action");A&&x[A]?x[A]():x.$searchBarKb.commands[A]&&x.$searchBarKb.commands[A].exec(x),v.stopPropagation(R)}),v.addCommandKeyListener(w,function(R,S,A){var C=i.keyCodeToString(A),O=x.$searchBarKb.findKeyCommand(S,C);O&&O.exec&&(O.exec(x),v.stopEvent(R))}),this.$onChange=f.delayedCall(function(){x.find(!1,!1)}),v.addListener(this.searchInput,"input",function(){x.$onChange.schedule(20)}),v.addListener(this.searchInput,"focus",function(){x.activeInput=x.searchInput,x.searchInput.value&&x.highlight()}),v.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,R){if(this.editor.session){var S=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:R,range:this.searchRange}),A=!S&&this.searchInput.value;h.setCssClass(this.searchBox,"ace_nomatch",A),this.editor._emit("findSearchBox",{match:!A}),this.highlight(),this.updateCounter()}},m.prototype.updateCounter=function(){var w=this.editor,x=w.$search.$options.re,R=x.unicode,S=0,A=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,`
|
|
1394
|
+
`),w.session.doc.$autoNewLine=`
|
|
1395
|
+
`);var O=w.session.doc.positionToIndex(w.selection.anchor);this.searchRange&&(O-=w.session.doc.positionToIndex(this.searchRange.start));for(var N=x.lastIndex=0,M;(M=x.exec(C))&&(S++,N=M.index,N<=O&&A++,!(S>u||!M[0]&&(x.lastIndex=N+=f.skipEmptyMatch(C,N,R),N>=C.length))););}this.searchCounter.textContent=a("search-box.search-counter","$0 of $1",[A,S>u?u+"+":S])},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=f.escapeRegExp(w)),w!=null&&(this.searchInput.value=w),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},m.prototype.isFocused=function(){var w=document.activeElement;return w==this.searchInput||w==this.replaceInput},m})(),s=new p;s.bindKeys({"Ctrl-f|Command-f":function(m){var w=m.isReplace=!m.isReplace;m.replaceBox.style.display=w?"":"none",m.replaceOption.checked=!1,m.$syncOptions(),m.searchInput.focus()},"Ctrl-H|Command-Option-F":function(m){m.editor.getReadOnly()||(m.replaceOption.checked=!0,m.$syncOptions(),m.replaceInput.focus())},"Ctrl-G|Command-G":function(m){m.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(m){m.findPrev()},esc:function(m){setTimeout(function(){m.hide()})},Return:function(m){m.activeInput==m.replaceInput&&m.replace(),m.findNext()},"Shift-Return":function(m){m.activeInput==m.replaceInput&&m.replace(),m.findPrev()},"Alt-Return":function(m){m.activeInput==m.replaceInput&&m.replaceAll(),m.findAll()},"Tab|Shift-Tab":function(m){(m.activeInput==m.replaceInput?m.searchInput:m.replaceInput).focus()}}),s.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(m){m.regExpOption.checked=!m.regExpOption.checked,m.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(m){m.caseSensitiveOption.checked=!m.caseSensitiveOption.checked,m.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(m){m.wholeWordOption.checked=!m.wholeWordOption.checked,m.$syncOptions()}},{name:"toggleReplace",exec:function(m){m.replaceOption.checked=!m.replaceOption.checked,m.$syncOptions()}},{name:"searchInSelection",exec:function(m){m.searchOption.checked=!m.searchRange,m.setSearchRange(m.searchOption.checked&&m.editor.getSelectionRange()),m.$syncOptions()}}]);var c=new p([{bindKey:"Esc",name:"closeSearchBar",exec:function(m){m.searchBox.hide()}}]);g.prototype.$searchBarKb=s,g.prototype.$closeSearchBarKb=c,r.SearchBox=g,r.Search=function(m,w){var x=m.searchBox||new g(m),R=m.session.selection.getRange(),S=R.isMultiLine()?"":m.session.getTextRange(R);x.show(S,w)}}),(function(){ace.require(["ace/ext/searchbox"],function(e){n&&(n.exports=e)})})()})(Jm)),Jm.exports}AS();var Qm={exports:{}},ev;function _S(){return ev||(ev=1,(function(n,t){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,r,d){function h(p,i){function a(M,L,j){if(!(M.length<L)){var F=M.slice(0,L),D=M.slice(L),$=/^(?:(\s+)|(\S+)(\s+))/.exec(D),_=/(?:(\s+)|(\s+)(\S+))$/.exec(F),I=0,z=0;if(_&&!_[2]&&(I=L-_[1].length,z=L),$&&!$[2]&&(I||(I=L),z=L+$[1].length),I)return{start:I,end:z};if(_&&_[2]&&_.index>j)return{start:_.index,end:_.index+_[2].length};if($&&$[2])return I=L+$[2].length,{start:I,end:I+$[3].length}}}for(var u=i.column||p.getOption("printMarginColumn"),g=i.allowMerge!=0,s=Math.min(i.startRow,i.endRow),c=Math.max(i.startRow,i.endRow),m=p.session;s<=c;){var w=m.getLine(s);if(w.length>u){var x=a(w,u,5);if(x){var R=/^\s*/.exec(w)[0];m.replace(new v(s,x.start,s,x.end),`
|
|
1396
|
+
`+R)}c++}else if(g&&/\S/.test(w)&&s!=c){var S=m.getLine(s+1);if(S&&/\S/.test(S)){var A=w.replace(/\s+$/,""),C=S.replace(/^\s+/,""),O=A+" "+C,x=a(O,u,5);if(x&&x.start>A.length||O.length<u){var N=new v(s,A.length,s+1,S.length-C.length);m.replace(N," "),s--,c--}else A.length<w.length&&m.remove(new v(s,A.length,s,w.length))}}s++}}function f(p){if(p.command.name=="insertstring"&&/\S/.test(p.args)){var i=p.editor,a=i.selection.cursor;if(a.column<=i.renderer.$printMarginColumn)return;var u=i.session.$undoManager.$lastDelta;h(i,{startRow:a.row,endRow:a.row,allowMerge:!1}),u!=i.session.$undoManager.$lastDelta&&i.session.markUndoGroup()}}var v=e("../range").Range,o=e("../editor").Editor;e("../config").defineOptions(o.prototype,"editor",{hardWrap:{set:function(p){p?this.commands.on("afterExec",f):this.commands.off("afterExec",f)},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(e,r,d){function h(b){return{row:b.line,column:b.ch}}function f(b){return new De(b.row,b.column)}function v(b,E,k){if(E.line===k.line&&E.ch>=k.ch-1){var P=b.getLine(E.line),B=P.charCodeAt(E.ch);55296<=B&&B<=55551&&(k.ch+=1)}return{start:E,end:k}}function o(b){b.setOption("disableInput",!0),b.setOption("showCursorWhenSelecting",!1),je.signal(b,"vim-mode-change",{mode:"normal"}),b.on("cursorActivity",_o),O(b),je.on(b.getInputField(),"paste",i(b))}function p(b){b.setOption("disableInput",!1),b.off("cursorActivity",_o),je.off(b.getInputField(),"paste",i(b)),b.state.vim=null,cn&&clearTimeout(cn)}function i(b){var E=b.state.vim;return E.onPasteFn||(E.onPasteFn=function(){E.insertMode||(b.setCursor(fe(b.getCursor(),0,1)),Yn.enterInsertMode(b,{},E))}),E.onPasteFn}function a(b,E){return E>=b.firstLine()&&E<=b.lastLine()}function u(b){return/^[a-z]$/.test(b)}function g(b){return"()[]{}".indexOf(b)!=-1}function s(b){return Na.test(b)}function c(b){return ft.test(b)}function m(b){return/^\s*$/.test(b)}function w(b){return".?!".indexOf(b)!=-1}function x(b,E){for(var k=0;k<E.length;k++)if(E[k]==b)return!0;return!1}function R(b,E,k,P,B){if(E===void 0&&!B)throw Error("defaultValue is required unless callback is provided");if(k||(k="string"),Yt[b]={type:k,defaultValue:E,callback:B},P)for(var W=0;W<P.length;W++)Yt[P[W]]=Yt[b];E&&S(b,E)}function S(b,E,k,P){var B=Yt[b];P=P||{};var W=P.scope;if(!B)return new Error("Unknown option: "+b);if(B.type=="boolean"){if(E&&E!==!0)return new Error("Invalid argument: "+b+"="+E);E!==!1&&(E=!0)}B.callback?(W!=="local"&&B.callback(E,void 0),W!=="global"&&k&&B.callback(E,k)):(W!=="local"&&(B.value=B.type=="boolean"?!!E:E),W!=="global"&&k&&(k.state.vim.options[b]={value:E}))}function A(b,E,k){var P=Yt[b];k=k||{};var B=k.scope;if(!P)return new Error("Unknown option: "+b);if(P.callback){var W=E&&P.callback(void 0,E);return B!=="global"&&W!==void 0?W:B!=="local"?P.callback():void 0}var W=B!=="global"&&E&&E.state.vim.options[b];return(W||B!=="local"&&P||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Kn()}function O(b){return b.state.vim||(b.state.vim={inputState:new $,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),b.state.vim}function N(){Ve={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:ji(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new V({}),searchHistoryController:new K,exCommandHistoryController:new K};for(var b in Yt){var E=Yt[b];E.value=E.defaultValue}}function M(b){function E(X){typeof X=="string"?Wt.value=X:Wt=null}if(b[0]=="<"){var k=b.toLowerCase().slice(1,-1),P=k.split("-");if(k=P.pop()||"",k=="lt")b="<";else if(k=="space")b=" ";else if(k=="cr")b=`
|
|
1397
|
+
`;else if(ho[k]){var B=Wt.value,W={key:ho[k],target:{value:B,selectionEnd:B.length,selectionStart:B.length}};Wt.onKeyDown&&Wt.onKeyDown(W,Wt.value,E),Wt&&Wt.onKeyUp&&Wt.onKeyUp(W,Wt.value,E);return}}if(b==`
|
|
1398
|
+
`){var q=Wt;Wt=null,q.onClose&&q.onClose(q.value)}else Wt.value=(Wt.value||"")+b}function L(b,E,k){var P=Wi;if(k){if(jr.indexOf(k)!=-1)return;jr.push(k),Wi=k.noremap!=0}try{for(var B=O(b),W=/<(?:[CSMA]-)*\w+>|./gi,q;q=W.exec(E);){var X=q[0],Q=B.insertMode;if(Wt){M(X);continue}var se=_t.handleKey(b,X,"mapping");if(!se&&Q&&B.insertMode){if(X[0]=="<"){var he=X.toLowerCase().slice(1,-1),be=he.split("-");if(he=be.pop()||"",he=="lt")X="<";else if(he=="space")X=" ";else if(he=="cr")X=`
|
|
1399
|
+
`;else{if(ho.hasOwnProperty(he)){X=ho[he],js(b,X);continue}X=X[0],W.lastIndex=q.index+1}}b.replaceSelection(X)}}}finally{if(jr.pop(),Wi=jr.length?P:!1,!jr.length&&Wt){var ke=Wt;Wt=null,_n(b,ke)}}}function j(b,E){var k=b.key;if(!cr[k]){k.length>1&&k[0]=="n"&&(k=k.replace("Numpad","")),k=Wr[k]||k;var P="";if(b.ctrlKey&&(P+="C-"),b.altKey&&(P+="A-"),b.metaKey&&(P+="M-"),je.isMac&&b.altKey&&!b.metaKey&&!b.ctrlKey&&(P=P.slice(2)),(P||k.length>1)&&b.shiftKey&&(P+="S-"),E&&!E.expectLiteralNext&&k.length==1){if(Wn.keymap&&k in Wn.keymap)(Wn.remapCtrl!=0||!P)&&(k=Wn.keymap[k]);else if(k.charCodeAt(0)>255){var B=b.code&&b.code.slice(-1)||"";b.shiftKey||(B=B.toLowerCase()),B&&(k=B)}}return P+=k,P.length>1&&(P="<"+P+">"),P}}function F(b,E){Wn.string!==b&&(Wn=D(b)),Wn.remapCtrl=E}function D(b){function E(P){return P.split(/\\?(.)/).filter(Boolean)}var k={};return b?(b.split(/((?:[^\\,]|\\.)+),/).map(function(P){if(P){var B=P.split(/((?:[^\\;]|\\.)+);/);if(B.length==3){var W=E(B[1]),q=E(B[2]);if(W.length!==q.length)return;for(var X=0;X<W.length;++X)k[W[X]]=q[X]}else if(B.length==1){var Q=E(P);if(Q.length%2!==0)return;for(var X=0;X<Q.length;X+=2)k[Q[X]]=Q[X+1]}}}),{keymap:k,string:b}):{keymap:k,string:""}}function $(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}function _(b,E){b.state.vim.inputState=new $,b.state.vim.expectLiteralNext=!1,je.signal(b,"vim-command-done",E)}function I(){this.removed=[],this.inserted=""}function z(b,E,k){this.clear(),this.keyBuffer=[b||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!E,this.blockwise=!!k}function U(b,E){var k=Ve.registerController.registers;if(!b||b.length!=1)throw Error("Register name must be 1 character");k[b]=E,Us.push(b)}function V(b){this.registers=b,this.unnamedRegister=b['"']=new z,b["."]=new z,b[":"]=new z,b["/"]=new z,b["+"]=new z}function K(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function Z(b,E){Pn[b]=E}function oe(b,E){for(var k=[],P=0;P<E;P++)k.push(b);return k}function ee(b,E){ls[b]=E}function re(b,E){Yn[b]=E}function ce(b,E,k){var P=b.state.vim,B=P.insertMode||P.visualMode,W=Math.min(Math.max(b.firstLine(),E.line),b.lastLine()),q=b.getLine(W),X=q.length-1+ +!!B,Q=Math.min(Math.max(0,E.ch),X),se=q.charCodeAt(Q);if(56320<=se&&se<=57343){var he=1;k&&k.line==W&&k.ch>Q&&(he=-1),Q+=he,Q>X&&(Q-=2)}return new De(W,Q)}function ie(b){var E={};for(var k in b)b.hasOwnProperty(k)&&(E[k]=b[k]);return E}function fe(b,E,k){return typeof E=="object"&&(k=E.ch,E=E.line),new De(b.line+E,b.ch+k)}function pe(b,E,k,P){P.operator&&(k="operatorPending");for(var B,W=[],q=[],X=Wi?E.length-Bo:0,Q=X;Q<E.length;Q++){var se=E[Q];k=="insert"&&se.context!="insert"||se.context&&se.context!=k||P.operator&&se.type=="action"||!(B=$e(b,se.keys))||(B=="partial"&&W.push(se),B=="full"&&q.push(se))}return{partial:W.length&&W,full:q.length&&q}}function $e(b,E){var k=E.slice(-11)=="<character>",P=E.slice(-10)=="<register>";if(k||P){var B=E.length-(k?11:10),W=b.slice(0,B),q=E.slice(0,B);return W==q&&b.length>B?"full":q.indexOf(W)==0?"partial":!1}return b==E?"full":E.indexOf(b)==0?"partial":!1}function Re(b){var E=/^.*(<[^>]+>)$/.exec(b),k=E?E[1]:b.slice(-1);if(k.length>1)switch(k){case"<CR>":k=`
|
|
1400
|
+
`;break;case"<Space>":k=" ";break;default:k=""}return k}function Ge(b,E,k){return function(){for(var P=0;P<k;P++)E(b)}}function qe(b){return new De(b.line,b.ch)}function ct(b,E){return b.ch==E.ch&&b.line==E.line}function ot(b,E){return b.line<E.line?!0:b.line==E.line&&b.ch<E.ch}function dt(b,E){return arguments.length>2&&(E=dt.apply(void 0,Array.prototype.slice.call(arguments,1))),ot(b,E)?b:E}function Lt(b,E){return arguments.length>2&&(E=Lt.apply(void 0,Array.prototype.slice.call(arguments,1))),ot(b,E)?E:b}function gr(b,E,k){var P=ot(b,E),B=ot(E,k);return P&&B}function $t(b,E){return b.getLine(E).length}function xr(b){return b.trim?b.trim():b.replace(/^\s+|\s+$/g,"")}function Bn(b){return b.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function er(b,E,k){var P=$t(b,E),B=new Array(k-P+1).join(" ");b.setCursor(new De(E,P)),b.replaceRange(B,b.getCursor())}function pn(b,E){var k=[],P=b.listSelections(),B=qe(b.clipPos(E)),W=!ct(E,B),q=b.getCursor("head"),X=yt(P,q),Q=ct(P[X].head,P[X].anchor),se=P.length-1,he=se-X>X?se:0,be=P[he].anchor,ke=Math.min(be.line,B.line),ye=Math.max(be.line,B.line),Ae=be.ch,Oe=B.ch,Le=P[he].head.ch-Ae,Xe=Oe-Ae;Le>0&&Xe<=0?(Ae++,W||Oe--):Le<0&&Xe>=0?(Ae--,Q||Oe++):Le<0&&Xe==-1&&(Ae--,Oe++);for(var pt=ke;pt<=ye;pt++){var nt={anchor:new De(pt,Ae),head:new De(pt,Oe)};k.push(nt)}return b.setSelections(k),E.ch=Oe,be.ch=Ae,be}function tr(b,E,k){for(var P=[],B=0;B<k;B++){var W=fe(E,B,0);P.push({anchor:W,head:W})}b.setSelections(P,0)}function yt(b,E,k){for(var P=0;P<b.length;P++){var B=ct(b[P].anchor,E),W=ct(b[P].head,E);if(B||W)return P}return-1}function Qe(b,E){var k=E.lastSelection,P=function(){var W=b.listSelections(),q=W[0],X=W[W.length-1],Q=ot(q.anchor,q.head)?q.anchor:q.head,se=ot(X.anchor,X.head)?X.head:X.anchor;return[Q,se]},B=function(){var W=b.getCursor(),q=b.getCursor(),X=k.visualBlock;if(X){var Q=X.width,se=X.height;q=new De(W.line+se,W.ch+Q);for(var he=[],be=W.line;be<q.line;be++){var ke=new De(be,W.ch),ye=new De(be,q.ch),Ae={anchor:ke,head:ye};he.push(Ae)}b.setSelections(he)}else{var Oe=k.anchorMark.find(),Le=k.headMark.find(),Xe=Le.line-Oe.line,pt=Le.ch-Oe.ch;q={line:q.line+Xe,ch:Xe?q.ch:pt+q.ch},k.visualLine&&(W=new De(W.line,0),q=new De(q.line,$t(b,q.line))),b.setSelection(W,q)}return[W,q]};return E.visualMode?P():B()}function jt(b,E){var k=E.sel.anchor,P=E.sel.head;E.lastPastedText&&(P=b.posFromIndex(b.indexFromPos(k)+E.lastPastedText.length),E.lastPastedText=null),E.lastSelection={anchorMark:b.setBookmark(k),headMark:b.setBookmark(P),anchor:qe(k),head:qe(P),visualMode:E.visualMode,visualLine:E.visualLine,visualBlock:E.visualBlock}}function En(b,E,k,P){var B=b.state.vim.sel,W=P?E:B.head,q=P?E:B.anchor,X;return ot(k,E)&&(X=k,k=E,E=X),ot(W,q)?(W=dt(E,W),q=Lt(q,k)):(q=dt(E,q),W=Lt(W,k),W=fe(W,0,-1),W.ch==-1&&W.line!=b.firstLine()&&(W=new De(W.line-1,$t(b,W.line-1)))),[q,W]}function Rn(b,E,B){var P=b.state.vim;E=E||P.sel;var B=B||P.visualLine?"line":P.visualBlock?"block":"char",W=Tn(b,E,B);b.setSelections(W.ranges,W.primary)}function Tn(b,E,k,P){var B=qe(E.head),W=qe(E.anchor);if(k=="char"){var q=!P&&!ot(E.head,E.anchor)?1:0,X=ot(E.head,E.anchor)?1:0;return B=fe(E.head,0,q),W=fe(E.anchor,0,X),{ranges:[{anchor:W,head:B}],primary:0}}if(k=="line"){if(ot(E.head,E.anchor))B.ch=0,W.ch=$t(b,W.line);else{W.ch=0;var Q=b.lastLine();B.line>Q&&(B.line=Q),B.ch=$t(b,B.line)}return{ranges:[{anchor:W,head:B}],primary:0}}if(k=="block"){var se=Math.min(W.line,B.line),he=W.ch,be=Math.max(W.line,B.line),ke=B.ch;he<ke?ke+=1:he+=1;for(var ye=be-se+1,Ae=B.line==se?0:ye-1,Oe=[],Le=0;Le<ye;Le++)Oe.push({anchor:new De(se+Le,he),head:new De(se+Le,ke)});return{ranges:Oe,primary:Ae}}}function xn(b){var E=b.getCursor("head");return b.getSelection().length==1&&(E=dt(E,b.getCursor("anchor"))),E}function Cn(b,E){var k=b.state.vim;E!==!1&&b.setCursor(ce(b,k.sel.head)),jt(b,k),k.visualMode=!1,k.visualLine=!1,k.visualBlock=!1,k.insertMode||je.signal(b,"vim-mode-change",{mode:"normal"})}function Vn(b,E,k){var P=b.getRange(E,k);if(/\n\s*$/.test(P)){var B=P.split(`
|
|
1401
|
+
`);B.pop();for(var W,W=B.pop();B.length>0&&W&&m(W);W=B.pop())k.line--,k.ch=0;W?(k.line--,k.ch=$t(b,k.line)):k.ch=0}}function nr(b,E,k){E.ch=0,k.ch=0,k.line++}function Qt(b){if(!b)return 0;var E=b.search(/\S/);return E==-1?b.length:E}function Gn(b,E,k){var P=E.inclusive,B=E.innerWord,W=E.bigWord,q=E.noSymbol,X=E.multiline,Q=k||xn(b),se=b.getLine(Q.line),he=se,be=Q.line,ke=be,ye=Q.ch,Ae,Oe=q?jo[0]:Bi[0];if(B&&/\s/.test(se.charAt(ye)))Oe=function(Ln){return/\s/.test(Ln)};else{for(;!Oe(se.charAt(ye));)if(ye++,ye>=se.length){if(!X)return null;ye--,Ae=Ai(b,Q,!0,W,!0);break}W?Oe=Bi[0]:(Oe=jo[0],Oe(se.charAt(ye))||(Oe=jo[1]))}for(var Le=ye,Xe=ye;Oe(se.charAt(Xe))&&Xe>=0;)Xe--;if(Xe++,Ae)Le=Ae.to,ke=Ae.line,he=b.getLine(ke),!he&&Le==0&&Le++;else for(;Oe(se.charAt(Le))&&Le<se.length;)Le++;if(P){var pt=Le,nt=Q.ch<=Xe&&/\s/.test(se.charAt(Q.ch));if(!nt)for(;/\s/.test(he.charAt(Le))&&Le<he.length;)Le++;if(pt==Le||nt){for(var st=Xe;/\s/.test(se.charAt(Xe-1))&&Xe>0;)Xe--;!Xe&&!nt&&(Xe=st)}}return{start:new De(be,Xe),end:new De(ke,Le)}}function ci(b,E,k){var P=E;if(!je.findMatchingTag||!je.findEnclosingTag)return{start:P,end:P};var B=je.findMatchingTag(b,E)||je.findEnclosingTag(b,E);return!B||!B.open||!B.close?{start:P,end:P}:k?{start:B.open.from,end:B.close.to}:{start:B.open.to,end:B.close.from}}function Fr(b,E,k){ct(E,k)||Ve.jumpList.add(b,E,k)}function On(b,E){Ve.lastCharacterSearch.increment=b,Ve.lastCharacterSearch.forward=E.forward,Ve.lastCharacterSearch.selectedCharacter=E.selectedCharacter}function Cr(b,E,k,P){var B=qe(b.getCursor()),W=k?1:-1,q=k?b.lineCount():-1,X=B.ch,Q=B.line,se=b.getLine(Q),he={lineText:se,nextCh:se.charAt(X),lastCh:null,index:X,symb:P,reverseSymb:(k?{")":"(","}":"{"}:{"(":")","{":"}"})[P],forward:k,depth:0,curMoveThrough:!1},be=Ei[P];if(!be)return B;var ke=Ri[be].init,ye=Ri[be].isComplete;for(ke&&ke(he);Q!==q&&E;){if(he.index+=W,he.nextCh=he.lineText.charAt(he.index),!he.nextCh){if(Q+=W,he.lineText=b.getLine(Q)||"",W>0)he.index=0;else{var Ae=he.lineText.length;he.index=Ae>0?Ae-1:0}he.nextCh=he.lineText.charAt(he.index)}ye(he)&&(B.line=Q,B.ch=he.index,E--)}return he.nextCh||he.curMoveThrough?new De(Q,he.index):B}function Ai(b,E,k,P,B){var W=E.line,q=E.ch,X=b.getLine(W),Q=k?1:-1,se=P?Bi:jo;if(B&&X==""){if(W+=Q,X=b.getLine(W),!a(b,W))return null;q=k?0:X.length}for(;;){if(B&&X=="")return{from:0,to:0,line:W};for(var he=Q>0?X.length:-1,be=he,ke=he;q!=he;){for(var ye=!1,Ae=0;Ae<se.length&&!ye;++Ae)if(se[Ae](X.charAt(q))){for(be=q;q!=he&&se[Ae](X.charAt(q));)q+=Q;if(ke=q,ye=be!=ke,be==E.ch&&W==E.line&&ke==be+Q)continue;return{from:Math.min(be,ke+1),to:Math.max(be,ke),line:W}}ye||(q+=Q)}if(W+=Q,!a(b,W))return null;X=b.getLine(W),q=Q>0?0:X.length}}function lr(b,E,k,P,B,W){var q=qe(E),X=[];(P&&!B||!P&&B)&&k++;for(var Q=!P||!B,se=0;se<k;se++){var he=Ai(b,E,P,W,Q);if(!he){var be=$t(b,b.lastLine());X.push(P?{line:b.lastLine(),from:be,to:be}:{line:0,from:0,to:0});break}X.push(he),E=new De(he.line,P?he.to-1:he.from)}var ke=X.length!=k,ye=X[0],Ae=X.pop();return P&&!B?(!ke&&(ye.from!=q.ch||ye.line!=q.line)&&(Ae=X.pop()),new De(Ae.line,Ae.from)):P&&B?new De(Ae.line,Ae.to-1):!P&&B?(!ke&&(ye.to!=q.ch||ye.line!=q.line)&&(Ae=X.pop()),new De(Ae.line,Ae.to)):new De(Ae.line,Ae.from)}function oo(b,E,k,P,B){var W=E,q=new De(W.line+k.repeat-1,1/0),X=b.clipPos(q);return X.ch--,B||(P.lastHPos=1/0,P.lastHSPos=b.charCoords(X,"div").left),q}function _i(b,E,k,P,B){for(var W=B||b.getCursor(),q=W.ch,X,Q=0;Q<E;Q++){var se=b.getLine(W.line);if(X=so(q,se,P,k),X==-1)return null;q=X}return new De(b.getCursor().line,X)}function No(b,E){var k=b.getCursor().line;return ce(b,new De(k,E-1))}function ei(b,E,k,P){!x(k,Eo)&&!an.test(k)||(E.marks[k]&&E.marks[k].clear(),E.marks[k]=b.setBookmark(P))}function so(b,E,k,P,B){var W;return P?(W=E.indexOf(k,b+1),W!=-1):(W=E.lastIndexOf(k,b-1),W!=-1),W}function ts(b,E,k,P,B){function W(Xe){return!/\S/.test(b.getLine(Xe))}function q(Xe,pt,nt){return nt?W(Xe)!=W(Xe+pt):!W(Xe)&&W(Xe+pt)}function X(Xe){P=P>0?1:-1;var pt=b.ace.session.getFoldLine(Xe);pt&&Xe+P>pt.start.row&&Xe+P<pt.end.row&&(P=(P>0?pt.end.row:pt.start.row)-Xe)}var Q=E.line,se=b.firstLine(),he=b.lastLine(),be,ke,ye=Q;if(P){for(;se<=ye&&ye<=he&&k>0;)X(ye),q(ye,P)&&k--,ye+=P;return new De(ye,0)}var Ae=b.state.vim;if(Ae.visualLine&&q(Q,1,!0)){var Oe=Ae.sel.anchor;q(Oe.line,-1,!0)&&(!B||Oe.line!=Q)&&(Q+=1)}var Le=W(Q);for(ye=Q;ye<=he&&k;ye++)q(ye,1,!0)&&(!B||W(ye)!=Le)&&k--;for(ke=new De(ye,0),ye>he&&!Le?Le=!0:B=!1,ye=Q;ye>se&&!((!B||W(ye)==Le||ye==Q)&&q(ye,-1,!0));ye--);return be=new De(ye,0),{start:be,end:ke}}function Do(b,E,k,P,B){function W(se){se.pos+se.dir<0||se.pos+se.dir>=se.line.length?se.line=null:se.pos+=se.dir}function q(se,he,be,ke){var ye=se.getLine(he),Ae={line:ye,ln:he,pos:be,dir:ke};if(Ae.line==="")return{ln:Ae.ln,pos:Ae.pos};var Oe=Ae.pos;for(W(Ae);Ae.line!==null;){if(Oe=Ae.pos,w(Ae.line[Ae.pos])){if(!B)return{ln:Ae.ln,pos:Ae.pos+1};for(W(Ae);Ae.line!==null&&m(Ae.line[Ae.pos]);)Oe=Ae.pos,W(Ae);return{ln:Ae.ln,pos:Oe+1}}W(Ae)}return{ln:Ae.ln,pos:Oe+1}}function X(se,he,be,ke){var ye=se.getLine(he),Ae={line:ye,ln:he,pos:be,dir:ke};if(Ae.line==="")return{ln:Ae.ln,pos:Ae.pos};var Oe=Ae.pos;for(W(Ae);Ae.line!==null;){if(!m(Ae.line[Ae.pos])&&!w(Ae.line[Ae.pos]))Oe=Ae.pos;else if(w(Ae.line[Ae.pos]))return B?m(Ae.line[Ae.pos+1])?{ln:Ae.ln,pos:Ae.pos+1}:{ln:Ae.ln,pos:Oe}:{ln:Ae.ln,pos:Oe};W(Ae)}return Ae.line=ye,B&&m(Ae.line[Ae.pos])?{ln:Ae.ln,pos:Ae.pos}:{ln:Ae.ln,pos:Oe}}for(var Q={ln:E.line,pos:E.ch};k>0;)P<0?Q=X(b,Q.ln,Q.pos,P):Q=q(b,Q.ln,Q.pos,P),k--;return new De(Q.ln,Q.pos)}function en(b,E,k,P){function B(Q,se){if(se.pos+se.dir<0||se.pos+se.dir>=se.line.length){if(se.ln+=se.dir,!a(Q,se.ln)){se.line=null,se.ln=null,se.pos=null;return}se.line=Q.getLine(se.ln),se.pos=se.dir>0?0:se.line.length-1}else se.pos+=se.dir}function W(Q,se,he,be){var Le=Q.getLine(se),ke=Le==="",ye={line:Le,ln:se,pos:he,dir:be},Ae={ln:ye.ln,pos:ye.pos},Oe=ye.line==="";for(B(Q,ye);ye.line!==null;){if(Ae.ln=ye.ln,Ae.pos=ye.pos,ye.line===""&&!Oe)return{ln:ye.ln,pos:ye.pos};if(ke&&ye.line!==""&&!m(ye.line[ye.pos]))return{ln:ye.ln,pos:ye.pos};w(ye.line[ye.pos])&&!ke&&(ye.pos===ye.line.length-1||m(ye.line[ye.pos+1]))&&(ke=!0),B(Q,ye)}var Le=Q.getLine(Ae.ln);Ae.pos=0;for(var Xe=Le.length-1;Xe>=0;--Xe)if(!m(Le[Xe])){Ae.pos=Xe;break}return Ae}function q(Q,se,he,be){var Oe=Q.getLine(se),ke={line:Oe,ln:se,pos:he,dir:be},ye={ln:ke.ln,pos:null},Ae=ke.line==="";for(B(Q,ke);ke.line!==null;){if(ke.line===""&&!Ae)return ye.pos!==null?ye:{ln:ke.ln,pos:ke.pos};if(!(!w(ke.line[ke.pos])||ye.pos===null||ke.ln===ye.ln&&ke.pos+1===ye.pos))return ye;ke.line!==""&&!m(ke.line[ke.pos])&&(Ae=!1,ye={ln:ke.ln,pos:ke.pos}),B(Q,ke)}var Oe=Q.getLine(ye.ln);ye.pos=0;for(var Le=0;Le<Oe.length;++Le)if(!m(Oe[Le])){ye.pos=Le;break}return ye}for(var X={ln:E.line,pos:E.ch};k>0;)P<0?X=q(b,X.ln,X.pos,P):X=W(b,X.ln,X.pos,P),k--;return new De(X.ln,X.pos)}function vn(b,E,k,P){var B=E,W,q,X={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[k],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[k],se=b.getLine(B.line).charAt(B.ch),he=se===Q?1:0;if(W=b.scanForBracket(new De(B.line,B.ch+he),-1,void 0,{bracketRegex:X}),q=b.scanForBracket(new De(B.line,B.ch+he),1,void 0,{bracketRegex:X}),!W||!q)return null;if(W=W.pos,q=q.pos,W.line==q.line&&W.ch>q.ch||W.line>q.line){var be=W;W=q,q=be}return P?q.ch+=1:W.ch+=1,{start:W,end:q}}function zr(b,E,k,P){var B=qe(E),W=b.getLine(B.line),q=W.split(""),X,Q,se,he,be=q.indexOf(k);if(B.ch<be)B.ch=be;else if(be<B.ch&&q[B.ch]==k){var ke=/string/.test(b.getTokenTypeAt(fe(E,0,1))),ye=/string/.test(b.getTokenTypeAt(E)),Ae=ke&&!ye;Ae||(Q=B.ch,--B.ch)}if(q[B.ch]==k&&!Q)X=B.ch+1;else for(se=B.ch;se>-1&&!X;se--)q[se]==k&&(X=se+1);if(X&&!Q)for(se=X,he=q.length;se<he&&!Q;se++)q[se]==k&&(Q=se);return!X||!Q?{start:B,end:B}:(P&&(--X,++Q),{start:new De(B.line,X),end:new De(B.line,Q)})}function Br(){}function In(b){var E=b.state.vim;return E.searchState_||(E.searchState_=new Br)}function rr(b){return Si(b,"/")}function ki(b){return ti(b,"/")}function Si(b,E){var k=ti(b,E)||[];if(!k.length)return[];var P=[];if(k[0]===0){for(var B=0;B<k.length;B++)typeof k[B]=="number"&&P.push(b.substring(k[B]+1,k[B+1]));return P}}function ti(b,E){E||(E="/");for(var k=!1,P=[],B=0;B<b.length;B++){var W=b.charAt(B);!k&&W==E&&P.push(B),k=!k&&W=="\\"}return P}function ui(b){for(var E="|(){",k="}",P=!1,B=[],W=-1;W<b.length;W++){var q=b.charAt(W)||"",X=b.charAt(W+1)||"",Q=X&&E.indexOf(X)!=-1;P?((q!=="\\"||!Q)&&B.push(q),P=!1):q==="\\"?(P=!0,X&&k.indexOf(X)!=-1&&(Q=!0),(!Q||X==="\\")&&B.push(q)):(B.push(q),Q&&X!=="\\"&&B.push("\\"))}return B.join("")}function ns(b){for(var E=!1,k=[],P=-1;P<b.length;P++){var B=b.charAt(P)||"",W=b.charAt(P+1)||"";Hi[B+W]?(k.push(Hi[B+W]),P++):E?(k.push(B),E=!1):B==="\\"?(E=!0,s(W)||W==="$"?k.push("$"):W!=="/"&&W!=="\\"&&k.push("\\")):(B==="$"&&k.push("$"),k.push(B),W==="/"&&k.push("\\"))}return k.join("")}function Po(b){for(var E=new je.StringStream(b),k=[];!E.eol();){for(;E.peek()&&E.peek()!="\\";)k.push(E.next());var P=!1;for(var B in Vs)if(E.match(B,!0)){P=!0,k.push(Vs[B]);break}P||k.push(E.next())}return k.join("")}function hi(b,E,k){var P=Ve.registerController.getRegister("/");if(P.setText(b),b instanceof RegExp)return b;var B=ki(b),W,q;if(!B.length)W=b;else{W=b.substring(0,B[0]);var X=b.substring(B[0]);q=X.indexOf("i")!=-1}if(!W)return null;A("pcre")||(W=ui(W)),k&&(E=/^[^A-Z]*$/.test(W));var Q=new RegExp(W,E||q?"im":"m");return Q}function Er(b){typeof b=="string"&&(b=document.createElement(b));for(var E,k=1;k<arguments.length;k++)if(E=arguments[k])if(typeof E!="object"&&(E=document.createTextNode(E)),E.nodeType)b.appendChild(E);else for(var P in E)Object.prototype.hasOwnProperty.call(E,P)&&(P[0]==="$"?b.style[P.slice(1)]=E[P]:b.setAttribute(P,E[P]));return b}function Tt(b,E){var k=Er("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},E);b.openNotification?b.openNotification(k,{bottom:!0,duration:5e3}):alert(k.innerText)}function ao(b,E){return Er("div",{$display:"flex"},Er("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},b,Er("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),E&&Er("span",{$color:"#888"},E))}function _n(b,E){if(jr.length){E.value||(E.value=""),Wt=E;return}var k=ao(E.prefix,E.desc);if(b.openDialog)b.openDialog(k,E.onClose,{onKeyDown:E.onKeyDown,onKeyUp:E.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:E.value});else{var P="";typeof E.prefix!="string"&&E.prefix&&(P+=E.prefix.textContent),E.desc&&(P+=" "+E.desc),E.onClose(prompt(P,""))}}function Nn(b,E){if(b instanceof RegExp&&E instanceof RegExp){for(var k=["global","multiline","ignoreCase","source"],P=0;P<k.length;P++){var B=k[P];if(b[B]!==E[B])return!1}return!0}return!1}function gn(b,E,k,P){if(E){var B=In(b),W=hi(E,!!k,!!P);if(W)return zi(b,W),Nn(W,B.getQuery())||B.setQuery(W),W}}function Dn(b){if(b.source.charAt(0)=="^")var E=!0;return{token:function(k){if(E&&!k.sol()){k.skipToEnd();return}var P=k.match(b,!1);if(P)return P[0].length==0?(k.next(),"searching"):!k.sol()&&(k.backUp(1),!b.exec(k.next()+P[0]))?(k.next(),null):(k.match(b),"searching");for(;!k.eol()&&(k.next(),!k.match(b,!1)););},query:b}}function zi(b,E){clearTimeout(cn);var k=In(b);k.highlightTimeout=cn,cn=setTimeout(function(){if(b.state.vim){var P=In(b);P.highlightTimeout=null;var B=P.getOverlay();(!B||E!=B.query)&&(B&&b.removeOverlay(B),B=Dn(E),b.addOverlay(B),b.showMatchesOnScrollbar&&(P.getScrollbarAnnotate()&&P.getScrollbarAnnotate().clear(),P.setScrollbarAnnotate(b.showMatchesOnScrollbar(E))),P.setOverlay(B))}},50)}function qn(b,E,k,P){return P===void 0&&(P=1),b.operation(function(){for(var B=b.getCursor(),W=b.getSearchCursor(k,B),q=0;q<P;q++){var X=W.find(E);if(q==0&&X&&ct(W.from(),B)){var Q=E?W.from():W.to();X=W.find(E),X&&!X[0]&&ct(W.from(),Q)&&b.getLine(Q.line).length==Q.ch&&(X=W.find(E))}if(!X&&(W=b.getSearchCursor(k,E?new De(b.lastLine()):new De(b.firstLine(),0)),!W.find(E)))return}return W.from()})}function di(b,E,k,P,B){return P===void 0&&(P=1),b.operation(function(){var W=b.getCursor(),q=b.getSearchCursor(k,W),X=q.find(!E);!B.visualMode&&X&&ct(q.from(),W)&&q.find(!E);for(var Q=0;Q<P;Q++)if(X=q.find(E),!X&&(q=b.getSearchCursor(k,E?new De(b.lastLine()):new De(b.firstLine(),0)),!q.find(E)))return;return[q.from(),q.to()]})}function Ar(b){var E=In(b);E.highlightTimeout&&(clearTimeout(E.highlightTimeout),E.highlightTimeout=null),b.removeOverlay(In(b).getOverlay()),E.setOverlay(null),E.getScrollbarAnnotate()&&(E.getScrollbarAnnotate().clear(),E.setScrollbarAnnotate(null))}function le(b,E,k){return typeof b!="number"&&(b=b.line),E instanceof Array?x(b,E):typeof k=="number"?b>=E&&b<=k:b==E}function Ne(b){var E=b.ace.renderer;return{top:E.getFirstFullyVisibleRow(),bottom:E.getLastFullyVisibleRow()}}function Be(b,E,k){if(k=="'"||k=="`")return Ve.jumpList.find(b,-1)||new De(0,0);if(k==".")return bt(b);var P=E.marks[k];return P&&P.find()}function bt(b){if(b.getLastEditEnd)return b.getLastEditEnd();for(var E=b.doc.history.done,k=E.length;k--;)if(E[k].changes)return qe(E[k].changes[0].to)}function Pt(b,E,k,P,B,W,q,X,Q){function se(){b.operation(function(){for(;!Oe;)he(),ke();ye()})}function he(){var nt=b.getRange(W.from(),W.to()),st=nt.replace(q,X),Ln=W.to().line;W.replace(st),Xe=W.to().line,B+=Xe-Ln,pt=Xe<Ln}function be(){var nt=Le&&qe(W.to()),st=W.findNext();return st&&!st[0]&&nt&&ct(W.from(),nt)&&(st=W.findNext()),st}function ke(){for(;be()&&le(W.from(),P,B);)if(!(!k&&W.from().line==Xe&&!pt)){b.scrollIntoView(W.from(),30),b.setSelection(W.from(),W.to()),Le=W.from(),Oe=!1;return}Oe=!0}function ye(nt){if(nt&&nt(),b.focus(),Le){b.setCursor(Le);var st=b.state.vim;st.exMode=!1,st.lastHPos=st.lastHSPos=Le.ch}Q&&Q()}function Ae(nt,st,Ln){je.e_stop(nt);var St=j(nt);switch(St){case"y":he(),ke();break;case"n":ke();break;case"a":var Zt=Q;Q=void 0,b.operation(se),Q=Zt;break;case"l":he();case"q":case"<Esc>":case"<C-c>":case"<C-[>":ye(Ln)}return Oe&&ye(Ln),!0}b.state.vim.exMode=!0;var Oe=!1,Le,Xe,pt;if(ke(),Oe){Tt(b,"No matches for "+q.source);return}if(!E){se(),Q&&Q();return}_n(b,{prefix:Er("span","replace with ",Er("strong",X)," (y/n/a/q/l)"),onKeyDown:Ae})}function Mt(b,E){var k=b.state.vim,P=Ve.macroModeState,B=Ve.registerController.getRegister("."),W=P.isPlaying,q=P.lastInsertModeChanges;W||(b.off("change",Ao),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=null,je.off(b.getInputField(),"keydown",Fo)),!W&&k.insertModeRepeat>1&&(Bs(b,k,k.insertModeRepeat-1,!0),k.lastEditInputState.repeatOverride=k.insertModeRepeat),delete k.insertModeRepeat,k.insertMode=!1,E||b.setCursor(b.getCursor().line,b.getCursor().ch-1),b.setOption("keyMap","vim"),b.setOption("disableInput",!0),b.toggleOverwrite(!1),B.setText(q.changes.join("")),je.signal(b,"vim-mode-change",{mode:"normal"}),P.isRecording&&Gt(P)}function _r(b){jn.unshift(b)}function kr(b,E,k,P,B){var W={keys:b,type:E};W[E]=k,W[E+"Args"]=P;for(var q in B)W[q]=B[q];_r(W)}function mr(b,E,k,P){var B=Ve.registerController.getRegister(P);if(P==":"){B.keyBuffer[0]&&Hr.processCommand(b,B.keyBuffer[0]),k.isPlaying=!1;return}var W=B.keyBuffer,q=0;k.isPlaying=!0,k.replaySearchQueries=B.searchQueries.slice(0);for(var X=0;X<W.length;X++)for(var Q=W[X],se,he;Q;)if(se=/<\w+-.+?>|<\w+>|./.exec(Q),he=se[0],Q=Q.substring(se.index+he.length),_t.handleKey(b,he,"macro"),E.insertMode){var be=B.insertModeChanges[q++].changes;Ve.macroModeState.lastInsertModeChanges.changes=be,is(b,be,1),Mt(b)}k.isPlaying=!1}function fi(b,E){if(!b.isPlaying){var k=b.latestRegister,P=Ve.registerController.getRegister(k);P&&P.pushText(E)}}function Gt(b){if(!b.isPlaying){var E=b.latestRegister,k=Ve.registerController.getRegister(E);k&&k.pushInsertModeChanges&&k.pushInsertModeChanges(b.lastInsertModeChanges)}}function Co(b,E){if(!b.isPlaying){var k=b.latestRegister,P=Ve.registerController.getRegister(k);P&&P.pushSearchQuery&&P.pushSearchQuery(E)}}function Ao(b,E){var k=Ve.macroModeState,P=k.lastInsertModeChanges;if(!k.isPlaying)for(var B=b.state.vim;E;){if(P.expectCursorActivityForChange=!0,P.ignoreCount>1)P.ignoreCount--;else if(E.origin=="+input"||E.origin=="paste"||E.origin===void 0){var W=b.listSelections().length;W>1&&(P.ignoreCount=W);var q=E.text.join(`
|
|
1402
|
+
`);if(P.maybeReset&&(P.changes=[],P.maybeReset=!1),q)if(b.state.overwrite&&!/\n/.test(q))P.changes.push([q]);else{if(q.length>1){var X=B&&B.insertEnd&&B.insertEnd.find(),Q=b.getCursor();if(X&&X.line==Q.line){var se=X.ch-Q.ch;se>0&&se<q.length&&(P.changes.push([q,se]),q="")}}q&&P.changes.push(q)}}E=E.next}}function _o(b){var E=b.state.vim;if(E.insertMode){var k=Ve.macroModeState;if(k.isPlaying)return;var P=k.lastInsertModeChanges;P.expectCursorActivityForChange?P.expectCursorActivityForChange=!1:(P.maybeReset=!0,E.insertEnd&&E.insertEnd.clear(),E.insertEnd=b.setBookmark(b.getCursor(),{insertLeft:!0}))}else b.curOp.isVimOp||zs(b,E)}function zs(b,E,k){var P=b.getCursor("anchor"),B=b.getCursor("head");if(E.visualMode&&!b.somethingSelected()?Cn(b,!1):!E.visualMode&&!E.insertMode&&b.somethingSelected()&&(E.visualMode=!0,E.visualLine=!1,je.signal(b,"vim-mode-change",{mode:"visual"})),E.visualMode){var W=ot(B,P)?0:-1,q=ot(B,P)?-1:0;B=fe(B,0,W),P=fe(P,0,q),E.sel={anchor:P,head:B},ei(b,E,"<",dt(B,P)),ei(b,E,">",Lt(B,P))}else!E.insertMode&&!k&&(E.lastHPos=b.getCursor().ch)}function rs(b,E){this.keyName=b,this.key=E.key,this.ctrlKey=E.ctrlKey,this.altKey=E.altKey,this.metaKey=E.metaKey,this.shiftKey=E.shiftKey}function Fo(b){var E=Ve.macroModeState,k=E.lastInsertModeChanges,P=je.keyName?je.keyName(b):b.key;P&&(P.indexOf("Delete")!=-1||P.indexOf("Backspace")!=-1)&&(k.maybeReset&&(k.changes=[],k.maybeReset=!1),k.changes.push(new rs(P,b)))}function Bs(b,E,k,P){function B(){X?$i.processAction(b,E,E.lastEditActionCommand):$i.evalInput(b,E)}function W(he){if(q.lastInsertModeChanges.changes.length>0){he=E.lastEditActionCommand?he:1;var be=q.lastInsertModeChanges;is(b,be.changes,he)}}var q=Ve.macroModeState;q.isPlaying=!0;var X=!!E.lastEditActionCommand,Q=E.inputState;if(E.inputState=E.lastEditInputState,X&&E.lastEditActionCommand.interlaceInsertRepeat)for(var se=0;se<k;se++)B(),W(1);else P||B(),W(k);E.inputState=Q,E.insertMode&&!P&&Mt(b),q.isPlaying=!1}function js(b,E){je.lookupKey(E,"vim-insert",function(k){return typeof k=="string"?je.commands[k](b):k(b),!0})}function is(b,E,k){var P=b.getCursor("head"),B=Ve.macroModeState.lastInsertModeChanges.visualBlock;B&&(tr(b,P,B+1),k=b.listSelections().length,b.setCursor(P));for(var W=0;W<k;W++){B&&b.setCursor(fe(P,W,0));for(var q=0;q<E.length;q++){var X=E[q];if(X instanceof rs)js(b,X.keyName);else if(typeof X=="string")b.replaceSelection(X);else{var Q=b.getCursor(),se=fe(Q,0,X[0].length-(X[1]||0));b.replaceRange(X[0],Q,X[1]?Q:se),b.setCursor(se)}}}B&&b.setCursor(fe(P,0,1))}function Ia(b,E,k,P){E.length>1&&E[0]=="n"&&(E=E.replace("numpad","")),E=Ro[E]||E;var B="";if(k.ctrlKey&&(B+="C-"),k.altKey&&(B+="A-"),(B||E.length>1)&&k.shiftKey&&(B+="S-"),P&&!P.expectLiteralNext&&E.length==1){if(Wn.keymap&&E in Wn.keymap)(Wn.remapCtrl!==!1||!B)&&(E=Wn.keymap[E]);else if(E.charCodeAt(0)>255){var W=k.code&&k.code.slice(-1)||"";k.shiftKey||(W=W.toLowerCase()),W&&(E=W)}}return B+=E,B.length>1&&(B="<"+B+">"),B}function ko(b){var E=new b.constructor;return Object.keys(b).forEach(function(k){if(k!="insertEnd"){var P=b[k];Array.isArray(P)?P=P.slice():P&&typeof P=="object"&&P.constructor!=Object&&(P=ko(P)),E[k]=P}}),b.sel&&(E.sel={head:b.sel.head&&qe(b.sel.head),anchor:b.sel.anchor&&qe(b.sel.anchor)}),E}function os(b,E,k){var P=!1,B=_t.maybeInitVimState_(b),W=B.visualBlock||B.wasInVisualBlock,q=b.ace.inMultiSelectMode;if(B.wasInVisualBlock&&!q?B.wasInVisualBlock=!1:q&&B.visualBlock&&(B.wasInVisualBlock=!0),E=="<Esc>"&&!B.insertMode&&!B.visualMode&&q)b.ace.exitMultiSelectMode();else if(W||!q||b.ace.inVirtualSelectionMode)P=_t.handleKey(b,E,k);else{var X=ko(B),Q=B.inputState.changeQueueList||[];b.operation(function(){b.curOp.isVimOp=!0;var se=0;b.ace.forEachSelection(function(){var he=b.ace.selection;b.state.vim.lastHPos=he.$desiredColumn==null?he.lead.column:he.$desiredColumn,b.state.vim.inputState.changeQueue=Q[se];var be=b.getCursor("head"),ke=b.getCursor("anchor"),ye=ot(be,ke)?0:-1,Ae=ot(be,ke)?-1:0;be=fe(be,0,ye),ke=fe(ke,0,Ae),b.state.vim.sel.head=be,b.state.vim.sel.anchor=ke,P=Rr(b,E,k),he.$desiredColumn=b.state.vim.lastHPos==-1?null:b.state.vim.lastHPos,b.ace.inVirtualSelectionMode&&(Q[se]=b.state.vim.inputState.changeQueue),b.virtualSelectionMode()&&(b.state.vim=ko(X)),se++}),b.curOp.cursorActivity&&!P&&(b.curOp.cursorActivity=!1),B.status=b.state.vim.status,b.state.vim=B,B.inputState.changeQueueList=Q,B.inputState.changeQueue=null},!0)}return P&&!B.visualMode&&!B.insert&&B.visualMode!=b.somethingSelected()&&zs(b,B,!0),P}function lo(b,E){E.off("beforeEndOperation",lo);var k=E.state.cm.vimCmd;k&&E.execCommand(k.exec?k:k.name,k.args),E.curOp=E.prevOp}var vr=e("../range").Range,Ws=e("../lib/event_emitter").EventEmitter,ni=e("../lib/dom"),La=e("../lib/oop"),Ma=e("../lib/keys"),ss=e("../lib/event"),co=e("../search").Search,zo=e("../lib/useragent"),as=e("../search_highlight").SearchHighlight,So=e("../commands/multi_select_commands"),Oa=e("../mode/text").Mode.prototype.tokenRe,$o=e("../ext/hardwrap").hardWrap;e("../multi_select");var je=function(b){this.ace=b,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(b,E){if(!(this instanceof De))return new De(b,E);this.line=b,this.ch=E},je.defineOption=function(b,E,k){},je.commands={redo:function(b){b.ace.redo()},undo:function(b){b.ace.undo()},newlineAndIndent:function(b){b.ace.insert(`
|
|
1403
|
+
`)},goLineLeft:function(b){b.ace.selection.moveCursorLineStart()},goLineRight:function(b){b.ace.selection.moveCursorLineEnd()}},je.keyMap={},je.addClass=je.rmClass=function(){},je.e_stop=je.e_preventDefault=ss.stopEvent,je.keyName=function(b){var E=Ma[b.keyCode]||b.key||"";return E.length==1&&(E=E.toUpperCase()),E=ss.getModifierString(b).replace(/(^|-)\w/g,function(k){return k.toUpperCase()})+E,E},je.keyMap.default=function(b){return function(E){var k=E.ace.commands.commandKeyBinding[b.toLowerCase()];return k&&E.ace.execCommand(k)!==!1}},je.lookupKey=function b(E,k,P){k||(k="default"),typeof k=="string"&&(k=je.keyMap[k]||je.keyMap.default);var B=typeof k=="function"?k(E):k[E];if(B===!1)return"nothing";if(B==="...")return"multi";if(B!=null&&P(B))return"handled";if(k.fallthrough){if(!Array.isArray(k.fallthrough))return b(E,k.fallthrough,P);for(var W=0;W<k.fallthrough.length;W++){var q=b(E,k.fallthrough[W],P);if(q)return q}}},je.findMatchingTag=function(b,E){return b.findMatchingTag(E)},je.findEnclosingTag=function(b,E){},je.signal=function(b,E,k){return b._signal(E,k)},je.on=ss.addListener,je.off=ss.removeListener,je.isWordChar=function(b){return b<""?/^\w$/.test(b):(Oa.lastIndex=0,Oa.test(b))},(function(){La.implement(je.prototype,Ws),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 P={text:k.action[0]=="i"?k.lines:[]},B=this.curOp=this.curOp||{};B.changeHandlers||(B.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),B.lastChange?B.lastChange.next=B.lastChange=P:B.lastChange=B.change=P,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(So.keyboardHandler)},this.operation=function(k,P){if(!P&&this.curOp||P&&this.curOp&&this.curOp.force)return k();if((P||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var B=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var W=this.curOp=this.curOp||{};this.curOp.force=P;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(),!W.cursorActivity&&!W.lastChange&&B&&(this.ace.prevOp=B)),(P||!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,P,B){var W=B?B[k+"Handlers"]:(this._eventRegistry||{})[k];if(W){W=W.slice();for(var q=0;q<W.length;q++)W[q](this,P)}},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,P){typeof k=="object"&&(P=k.ch,k=k.line);var B=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:k,column:P}),this.ace.selection.moveTo(k,P),B&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(k){var P=this.ace.selection,B=k=="anchor"?P.isEmpty()?P.lead:P.anchor:k=="head"||!k?P.lead:P.getRange()[k];return f(B)},this.listSelections=function(k){var P=this.ace.multiSelect.rangeList.ranges;return!P.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:P.map(function(B){return{anchor:this.clipPos(f(B.cursor==B.end?B.start:B.end)),head:this.clipPos(f(B.cursor))}},this)},this.setSelections=function(k,P){var B=this.ace.multiSelect,W=k.map(function(se){var he=h(se.anchor),be=h(se.head),ke=vr.comparePoints(he,be)<0?new vr.fromPoints(he,be):new vr.fromPoints(be,he);return ke.cursor=vr.comparePoints(ke.start,be)?ke.end:ke.start,ke});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(W[0]);return}P?W[P]&&W.push(W.splice(P,1)[0]):W=W.reverse(),B.toSingleRange(W[0].clone());for(var q=this.ace.session,X=0;X<W.length;X++){var Q=q.$clipRangeToDocument(W[X]);B.addRange(Q)}},this.setSelection=function(k,P,B){var W=this.ace.selection;W.moveTo(k.line,k.ch),W.selectTo(P.line,P.ch),B&&B.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(k){return!this.ace.selection.isEmpty()},this.clipPos=function(k){var P=this.ace.session.$clipPositionToDocument(k.line,k.ch);return f(P)},this.foldCode=function(k){this.ace.session.$toggleFoldWidget(k.line,{})},this.markText=function(k){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(k){var P=k.action=="insert",B=k.start,W=k.end,q=(W.row-B.row)*(P?1:-1),X=(W.column-B.column)*(P?1:-1);P&&(W=B);for(var Q in this.marks){var se=this.marks[Q],he=vr.comparePoints(se,B);if(!(he<0)){if(he===0&&P)if(!se.$insertRight)he=1;else{if(se.bias!=1){se.bias=-1;continue}he=1}var be=P?he:vr.comparePoints(se,W);if(be>0){se.row+=q,se.column+=se.row==W.row?X:0;continue}!P&&be<=0&&(se.row=B.row,se.column=B.column,be===0&&(se.bias=1))}}};var b=function(k,P,B,W){this.cm=k,this.id=P,this.row=B,this.column=W,k.marks[this.id]=this};b.prototype.clear=function(){delete this.cm.marks[this.id]},b.prototype.find=function(){return f(this)},this.setBookmark=function(k,P){var B=new b(this,this.$uid++,k.line,k.ch);return(!P||!P.insertLeft)&&(B.$insertRight=!0),this.marks[B.id]=B,B},this.moveH=function(k,P){if(P=="char"){var B=this.ace.selection;B.clearSelection(),B.moveCursorBy(0,k)}},this.findPosV=function(k,P,B,W){if(B=="page"){var q=this.ace.renderer,X=q.layerConfig;P*=Math.floor(X.height/X.lineHeight),B="line"}if(B=="line"){var Q=this.ace.session.documentToScreenPosition(k.line,k.ch);W!=null&&(Q.column=W),Q.row+=P,Q.row=Math.min(Math.max(0,Q.row),this.ace.session.getScreenLength()-1);var se=this.ace.session.screenToDocumentPosition(Q.row,Q.column);return f(se)}debugger},this.charCoords=function(k,P){if(P=="div"||!P){var B=this.ace.session.documentToScreenPosition(k.line,k.ch);return{left:B.column,top:B.row}}if(P=="local"){var W=this.ace.renderer,B=this.ace.session.documentToScreenPosition(k.line,k.ch),q=W.layerConfig.lineHeight,X=W.layerConfig.characterWidth,Q=q*B.row;return{left:B.column*X,top:Q,bottom:Q+q}}},this.coordsChar=function(k,P){var B=this.ace.renderer;if(P=="local"){var W=Math.max(0,Math.floor(k.top/B.lineHeight)),q=Math.max(0,Math.floor(k.left/B.characterWidth)),X=B.session.screenToDocumentPosition(W,q);return f(X)}if(P=="div")throw"not implemented"},this.getSearchCursor=function(k,P,B){var W=!1,q=!1;k instanceof RegExp&&!k.global&&(W=!k.ignoreCase,k=k.source,q=!0),k=="\\n"&&(k=`
|
|
1404
|
+
`,q=!1);var X=new co;P.ch==null&&(P.ch=Number.MAX_VALUE);var Q={row:P.line,column:P.ch},se=this,he=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(be){X.setOptions({needle:k,caseSensitive:W,wrap:!1,backwards:be,regExp:q,start:he||Q});var ke=X.find(se.ace.session);return he=ke,he&&[!he.isEmpty()]},from:function(){return he&&f(he.start)},to:function(){return he&&f(he.end)},replace:function(be){he&&(he.end=se.ace.session.doc.replace(he,be))}}},this.scrollTo=function(k,P){var B=this.ace.renderer,W=B.layerConfig,q=W.maxHeight;q-=(B.$size.scrollerHeight-B.lineHeight)*B.$scrollPastEnd,P!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(P,q))),k!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(k,W.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(k,P){if(k){var B=this.ace.renderer,W={top:0,bottom:P};B.scrollCursorIntoView(h(k),B.lineHeight*2/B.$size.scrollerHeight,W)}},this.getLine=function(k){return this.ace.session.getLine(k)},this.getRange=function(k,P){return this.ace.session.getTextRange(new vr(k.line,k.ch,P.line,P.ch))},this.replaceRange=function(k,P,B){B||(B=P);var W=new vr(P.line,P.ch,B.line,B.ch);return this.ace.session.$clipRangeToDocument(W),this.ace.session.replace(W,k)},this.replaceSelection=this.replaceSelections=function(k){var P=Array.isArray(k)&&k,B=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(B.getRange(),P?k[0]||"":k);return}B.inVirtualSelectionMode=!0;var W=B.rangeList.ranges;W.length||(W=[this.ace.multiSelect.getRange()]);for(var q=W.length;q--;)this.ace.session.replace(W[q],P?k[q]||"":k);B.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 E={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(k,P){switch(this.state[k]=P,k){case"indentWithTabs":k=E[k],P=!P;break;case"keyMap":this.state.$keyMap=P;return;default:k=E[k]}k&&this.ace.setOption(k,P)},this.getOption=function(k){var P,B=E[k];switch(B&&(P=this.ace.getOption(B)),k){case"indentWithTabs":return k=E[k],!P;case"keyMap":return this.state.$keyMap||"vim"}return B?P: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 P=new as(null,"ace_highlight-marker","text"),B=this.ace.session.addDynamicMarker(P);P.id=B.id,P.session=this.ace.session,P.destroy=function(q){P.session.off("change",P.updateOnChange),P.session.off("changeEditor",P.destroy),P.session.removeMarker(P.id),P.session=null},P.updateOnChange=function(q){var X=q.start.row;X==q.end.row?P.cache[X]=void 0:P.cache.splice(X,P.cache.length)},P.session.on("changeEditor",P.destroy),P.session.on("change",P.updateOnChange)}var W=new RegExp(k.query.source,"gmi");this.$searchHighlight=k.highlight=P,this.$searchHighlight.setRegexp(W),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(k){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var k=this.ace.renderer,P=k.layerConfig;return{left:k.scrollLeft,top:k.scrollTop,height:P.maxHeight,width:P.width,clientHeight:P.height,clientWidth:P.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(k){return this.ace.setValue(k,-1)},this.getTokenTypeAt=function(k){var P=this.ace.session.getTokenAt(k.line,k.ch);return P&&/comment|string/.test(P.type)?"string":""},this.findMatchingBracket=function(k){var P=this.ace.session.findMatchingBracket(h(k));return{to:P&&f(P)}},this.findMatchingTag=function(k){var P=this.ace.session.getMatchingTags(h(k));if(P)return{open:{from:f(P.openTag.start),to:f(P.openTag.end)},close:{from:f(P.closeTag.start),to:f(P.closeTag.end)}}},this.indentLine=function(k,P){P===!0?this.ace.session.indentRows(k,k," "):P===!1&&this.ace.session.outdentRows(new vr(k,0,k,0))},this.indexFromPos=function(k){return this.ace.session.doc.positionToIndex(h(k))},this.posFromIndex=function(k){return f(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,P,B,W){var q=W.bracketRegex.source,X=/paren|text|operator|tag/;if(P==1)var Q=this.ace.session.$findClosingBracket(q.slice(1,2),h(k),X);else{var Q=this.ace.session.$findOpeningBracket(q.slice(-2,-1),{row:k.line,column:k.ch+1},X);!Q&&W.bracketRegex&&W.bracketRegex.test(this.getLine(k.line)[k.ch-1])&&(Q={row:k.line,column:k.ch-1})}return Q&&{pos:f(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 P=this.$lineHandleChanges;if(!P)return null;for(var B=k.row,W=0;W<P.length;W++){var q=P[W];if(q.start.row!=q.end.row){if(q.action[0]=="i")q.start.row<B&&(B+=q.end.row-q.start.row);else if(q.start.row<B){if(B<q.end.row||B==q.end.row&&q.start.column>0)return null;B-=q.end.row-q.start.row}}}return B},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 f(k.$lastDelta.end)}}).call(je.prototype);var Hs=je.StringStream=function(b,E){this.pos=this.start=0,this.string=b,this.tabSize=E||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Hs.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(b){var E=this.string.charAt(this.pos);if(typeof b=="string")var k=E==b;else var k=E&&(b.test?b.test(E):b(E));if(k)return++this.pos,E},eatWhile:function(b){for(var E=this.pos;this.eat(b););return this.pos>E},eatSpace:function(){for(var b=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>b},skipToEnd:function(){this.pos=this.string.length},skipTo:function(b){var E=this.string.indexOf(b,this.pos);if(E>-1)return this.pos=E,!0},backUp:function(b){this.pos-=b},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(b,E,k){if(typeof b!="string"){var P=this.string.slice(this.pos).match(b);return P&&P.index>0?null:(P&&E!==!1&&(this.pos+=P[0].length),P)}var B=function(q){return k?q.toLowerCase():q},W=this.string.substr(this.pos,b.length);if(B(W)==B(b))return E!==!1&&(this.pos+=b.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(b,E){this.lineStart+=b;try{return E()}finally{this.lineStart-=b}}},je.defineExtension=function(b,E){je.prototype[b]=E},ni.importCssString(`.normal-mode .ace_cursor{
|
|
1405
|
+
border: none;
|
|
1406
|
+
background-color: rgba(255,0,0,0.5);
|
|
1407
|
+
}
|
|
1408
|
+
.normal-mode .ace_hidden-cursors .ace_cursor{
|
|
1409
|
+
background-color: transparent;
|
|
1410
|
+
border: 1px solid red;
|
|
1411
|
+
opacity: 0.7
|
|
1412
|
+
}
|
|
1413
|
+
.ace_dialog {
|
|
1414
|
+
position: absolute;
|
|
1415
|
+
left: 0; right: 0;
|
|
1416
|
+
background: inherit;
|
|
1417
|
+
z-index: 15;
|
|
1418
|
+
padding: .1em .8em;
|
|
1419
|
+
overflow: hidden;
|
|
1420
|
+
color: inherit;
|
|
1421
|
+
}
|
|
1422
|
+
.ace_dialog-top {
|
|
1423
|
+
border-bottom: 1px solid #444;
|
|
1424
|
+
top: 0;
|
|
1425
|
+
}
|
|
1426
|
+
.ace_dialog-bottom {
|
|
1427
|
+
border-top: 1px solid #444;
|
|
1428
|
+
bottom: 0;
|
|
1429
|
+
}
|
|
1430
|
+
.ace_dialog input {
|
|
1431
|
+
border: none;
|
|
1432
|
+
outline: none;
|
|
1433
|
+
background: transparent;
|
|
1434
|
+
width: 20em;
|
|
1435
|
+
color: inherit;
|
|
1436
|
+
font-family: monospace;
|
|
1437
|
+
}`,"vimMode",!1),(function(){function b(k,P,B){var W=k.ace.container,q;return q=W.appendChild(document.createElement("div")),B?q.className="ace_dialog ace_dialog-bottom":q.className="ace_dialog ace_dialog-top",typeof P=="string"?q.innerHTML=P:q.appendChild(P),q}function E(k,P){k.state.currentNotificationClose&&k.state.currentNotificationClose(),k.state.currentNotificationClose=P}je.defineExtension("openDialog",function(k,P,B){function W(be){if(typeof be=="string")se.value=be;else{if(X||be&&be.type=="blur"&&document.activeElement===se)return;Q.state.dialog==q&&(Q.state.dialog=null,Q.focus()),X=!0,q.remove(),B.onClose&&B.onClose(q);var ke=Q;ke.state.vim&&(ke.state.vim.status=null,ke.ace._signal("changeStatus"),ke.ace.renderer.$loop.schedule(ke.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){B||(B={}),E(this,null);var q=b(this,k,B.bottom),X=!1,Q=this;this.state.dialog=q;var se=q.getElementsByTagName("input")[0],he;return se?(B.value&&(se.value=B.value,B.selectValueOnOpen!==!1&&se.select()),B.onInput&&je.on(se,"input",function(be){B.onInput(be,se.value,W)}),B.onKeyUp&&je.on(se,"keyup",function(be){B.onKeyUp(be,se.value,W)}),je.on(se,"keydown",function(be){B&&B.onKeyDown&&B.onKeyDown(be,se.value,W)||(be.keyCode==13&&P(se.value),(be.keyCode==27||B.closeOnEnter!==!1&&be.keyCode==13)&&(je.e_stop(be),W()))}),B.closeOnBlur!==!1&&je.on(se,"blur",W),se.focus()):(he=q.getElementsByTagName("button")[0])&&(je.on(he,"click",function(){W(),Q.focus()}),B.closeOnBlur!==!1&&je.on(he,"blur",W),he.focus()),W}}),je.defineExtension("openNotification",function(k,P){function B(){q||(q=!0,clearTimeout(X),W.remove())}if(!this.virtualSelectionMode()){E(this,B);var W=b(this,k,P&&P.bottom),q=!1,X,Q=P&&typeof P.duration<"u"?P.duration:5e3;return je.on(W,"click",function(se){je.e_preventDefault(se),B()}),Q&&(X=setTimeout(B,Q)),B}})})();var De=je.Pos,jn=[{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"}],Bo=jn.length,uo=[{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"}],Wn=D(""),Na=/[\d]/,jo=[je.isWordChar,function(b){return b&&!je.isWordChar(b)&&!/\s/.test(b)}],Bi=[function(b){return/\S/.test(b)}],Eo=["<",">"],Us=["-",'"',".",":","_","/","+"],an=/^\w$/,ft;try{ft=new RegExp("^[\\p{Lu}]$","u")}catch{ft=/^[A-Z]$/}var Yt={};R("filetype",void 0,"string",["ft"],function(b,E){if(E!==void 0){if(b===void 0){var k=E.getOption("mode");return k=="null"?"":k}var k=b==""?"null":b;E.setOption("mode",k)}}),R("textwidth",80,"number",["tw"],function(b,E){if(E!==void 0){if(b===void 0){var k=E.getOption("textwidth");return k}var P=Math.round(b);P>1&&E.setOption("textwidth",P)}});var ji=function(){function b(Q,se,he){function be(Oe){var Le=++B%P,Xe=X[Le];Xe&&Xe.clear(),X[Le]=Q.setBookmark(Oe)}var ke=B%P,ye=X[ke];if(ye){var Ae=ye.find();Ae&&!ct(Ae,se)&&be(se)}else be(se);be(he),W=B,q=B-P+1,q<0&&(q=0)}function E(Q,se){B+=se,B>W?B=W:B<q&&(B=q);var he=X[(P+B)%P];if(he&&!he.find()){var be=se>0?1:-1,ke,ye=Q.getCursor();do if(B+=be,he=X[(P+B)%P],he&&(ke=he.find())&&!ct(ye,ke))break;while(B<W&&B>q)}return he}function k(Q,se){var he=B,be=E(Q,se);return B=he,be&&be.find()}var P=100,B=-1,W=0,q=0,X=new Array(P);return{cachedCursor:void 0,add:b,find:k,move:E}},Kn=function(b){return b?{changes:b.changes,expectCursorActivityForChange:b.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var b=Ve.macroModeState;b.onRecordingDone&&b.onRecordingDone(),b.onRecordingDone=void 0,b.isRecording=!1},enterMacroRecordMode:function(b,E){var k=Ve.registerController.getRegister(E);if(k){if(k.clear(),this.latestRegister=E,b.openDialog){var P=Er("span",{class:"cm-vim-message"},"recording @"+E);this.onRecordingDone=b.openDialog(P,null,{bottom:!0})}this.isRecording=!0}}};var Ve,kn,_t={enterVimMode:o,leaveVimMode:p,buildKeyMap:function(){},getRegisterController:function(){return Ve.registerController},resetVimGlobalState_:N,getVimGlobalState_:function(){return Ve},maybeInitVimState_:O,suppressErrorLogging:!1,InsertModeKey:rs,map:function(b,E,k){Hr.map(b,E,k)},unmap:function(b,E){return Hr.unmap(b,E)},noremap:function(b,E,k){Hr.map(b,E,k,!0)},mapclear:function(b){var E=jn.length,k=Bo,P=jn.slice(0,E-k);if(jn=jn.slice(E-k),b)for(var B=P.length-1;B>=0;B--){var W=P[B];if(b!==W.context)if(W.context)this._mapCommand(W);else{var q=["normal","insert","visual"];for(var X in q)if(q[X]!==b){var Q={};for(var se in W)Q[se]=W[se];Q.context=q[X],this._mapCommand(Q)}}}},langmap:F,vimKeyFromEvent:j,setOption:S,getOption:A,defineOption:R,defineEx:function(b,E,k){if(!E)E=b;else if(b.indexOf(E)!==0)throw new Error('(Vim.defineEx) "'+E+'" is not a prefix of "'+b+'", command not registered');yr[b]=k,Hr.commandMap_[E]={name:b,shortName:E,type:"api"}},handleKey:function(b,E,k){var P=this.findKey(b,E,k);if(typeof P=="function")return P()},multiSelectHandleKey:os,findKey:function(b,E,k){function P(){var se=Ve.macroModeState;if(se.isRecording){if(E=="q")return se.exitMacroRecordMode(),_(b),!0;k!="mapping"&&fi(se,E)}}function B(){if(E=="<Esc>"){if(X.visualMode)Cn(b);else{if(!X.insertMode)return;Mt(b)}return _(b),!0}}function W(){if(B())return!0;X.inputState.keyBuffer.push(E);var se=X.inputState.keyBuffer.join(""),he=E.length==1,be=$i.matchCommand(se,jn,X.inputState,"insert"),ke=X.inputState.changeQueue;if(be.type=="none")return _(b),!1;if(be.type=="partial"){if(be.expectLiteralNext&&(X.expectLiteralNext=!0),kn&&window.clearTimeout(kn),kn=he&&window.setTimeout(function(){X.insertMode&&X.inputState.keyBuffer.length&&_(b)},A("insertModeEscKeysTimeout")),he){var ye=b.listSelections();(!ke||ke.removed.length!=ye.length)&&(ke=X.inputState.changeQueue=new I),ke.inserted+=E;for(var Ae=0;Ae<ye.length;Ae++){var Oe=dt(ye[Ae].anchor,ye[Ae].head),Le=Lt(ye[Ae].anchor,ye[Ae].head),Xe=b.getRange(Oe,b.state.overwrite?fe(Le,0,1):Le);ke.removed[Ae]=(ke.removed[Ae]||"")+Xe}}return!he}if(X.expectLiteralNext=!1,kn&&window.clearTimeout(kn),be.command&&ke){for(var ye=b.listSelections(),Ae=0;Ae<ye.length;Ae++){var pt=ye[Ae].head;b.replaceRange(ke.removed[Ae]||"",fe(pt,0,-ke.inserted.length),pt,"+input")}Ve.macroModeState.lastInsertModeChanges.changes.pop()}return be.command||_(b),be.command}function q(){if(P()||B())return!0;X.inputState.keyBuffer.push(E);var se=X.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(se))return!0;var he=/^(\d*)(.*)$/.exec(se);if(!he)return _(b),!1;var be=X.visualMode?"visual":"normal",ke=he[2]||he[1];X.inputState.operatorShortcut&&X.inputState.operatorShortcut.slice(-1)==ke&&(ke=X.inputState.operatorShortcut);var ye=$i.matchCommand(ke,jn,X.inputState,be);return ye.type=="none"?(_(b),!1):ye.type=="partial"?(ye.expectLiteralNext&&(X.expectLiteralNext=!0),!0):ye.type=="clear"?(_(b),!0):(X.expectLiteralNext=!1,X.inputState.keyBuffer.length=0,he=/^(\d*)(.*)$/.exec(se),he[1]&&he[1]!="0"&&X.inputState.pushRepeatDigit(he[1]),ye.command)}var X=O(b),Q;return X.insertMode?Q=W():Q=q(),Q===!1?!X.insertMode&&E.length===1?function(){return!0}:void 0:Q===!0?function(){return!0}:function(){if(!((Q.operator||Q.isEdit)&&b.getOption("readOnly")))return b.operation(function(){b.curOp.isVimOp=!0;try{Q.type=="keyToKey"?L(b,Q.toKeys,Q):$i.processCommand(b,X,Q)}catch(se){throw b.state.vim=void 0,O(b),_t.suppressErrorLogging||console.log(se),se}return!0})}},handleEx:function(b,E){Hr.processCommand(b,E)},defineMotion:Z,defineAction:re,defineOperator:ee,mapCommand:kr,_mapCommand:_r,defineRegister:U,exitVisualMode:Cn,exitInsertMode:Mt},jr=[],Wi=!1,Wt,Wr={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},cr={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},ho={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(Wr)).forEach(function(b){ho[(Wr[b]||"").toLowerCase()]=ho[b.toLowerCase()]=b}),R("langmap",void 0,"string",["lmap"],function(b,E){if(b===void 0)return Wn.string;F(b)}),$.prototype.pushRepeatDigit=function(b){this.operator?this.motionRepeat=this.motionRepeat.concat(b):this.prefixRepeat=this.prefixRepeat.concat(b)},$.prototype.getRepeat=function(){var b=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(b=1,this.prefixRepeat.length>0&&(b*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(b*=parseInt(this.motionRepeat.join(""),10))),b},z.prototype={setText:function(b,E,k){this.keyBuffer=[b||""],this.linewise=!!E,this.blockwise=!!k},pushText:function(b,E){E&&(this.linewise||this.keyBuffer.push(`
|
|
1438
|
+
`),this.linewise=!0),this.keyBuffer.push(b)},pushInsertModeChanges:function(b){this.insertModeChanges.push(Kn(b))},pushSearchQuery:function(b){this.searchQueries.push(b)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},V.prototype={pushText:function(b,E,k,P,B){if(b!=="_"){P&&k.charAt(k.length-1)!==`
|
|
1439
|
+
`&&(k+=`
|
|
1440
|
+
`);var W=this.isValidRegister(b)?this.getRegister(b):null;if(!W){switch(E){case"yank":this.registers[0]=new z(k,P,B);break;case"delete":case"change":k.indexOf(`
|
|
1441
|
+
`)==-1?this.registers["-"]=new z(k,P):(this.shiftNumericRegisters_(),this.registers[1]=new z(k,P))}this.unnamedRegister.setText(k,P,B);return}var q=c(b);q?W.pushText(k,P):W.setText(k,P,B),b==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(k),this.unnamedRegister.setText(W.toString(),P)}},getRegister:function(b){return this.isValidRegister(b)?(b=b.toLowerCase(),this.registers[b]||(this.registers[b]=new z),this.registers[b]):this.unnamedRegister},isValidRegister:function(b){return b&&(x(b,Us)||an.test(b))},shiftNumericRegisters_:function(){for(var b=9;b>=2;b--)this.registers[b]=this.getRegister(""+(b-1))}},K.prototype={nextMatch:function(b,E){var k=this.historyBuffer,P=E?-1:1;this.initialPrefix===null&&(this.initialPrefix=b);for(var B=this.iterator+P;E?B>=0:B<k.length;B+=P)for(var W=k[B],q=0;q<=W.length;q++)if(this.initialPrefix==W.substring(0,q))return this.iterator=B,W;if(B>=k.length)return this.iterator=k.length,this.initialPrefix;if(B<0)return b},pushInput:function(b){var E=this.historyBuffer.indexOf(b);E>-1&&this.historyBuffer.splice(E,1),b.length&&this.historyBuffer.push(b)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var $i={matchCommand:function(b,E,k,P){var B=pe(b,E,P,k);if(!B.full&&!B.partial)return{type:"none"};if(!B.full&&B.partial)return{type:"partial",expectLiteralNext:B.partial.length==1&&B.partial[0].keys.slice(-11)=="<character>"};for(var W,q=0;q<B.full.length;q++){var X=B.full[q];W||(W=X)}if(W.keys.slice(-11)=="<character>"||W.keys.slice(-10)=="<register>"){var Q=Re(b);if(!Q||Q.length>1)return{type:"clear"};k.selectedCharacter=Q}return{type:"full",command:W}},processCommand:function(b,E,k){switch(E.inputState.repeatOverride=k.repeatOverride,k.type){case"motion":this.processMotion(b,E,k);break;case"operator":this.processOperator(b,E,k);break;case"operatorMotion":this.processOperatorMotion(b,E,k);break;case"action":this.processAction(b,E,k);break;case"search":this.processSearch(b,E,k);break;case"ex":case"keyToEx":this.processEx(b,E,k);break}},processMotion:function(b,E,k){E.inputState.motion=k.motion,E.inputState.motionArgs=ie(k.motionArgs),this.evalInput(b,E)},processOperator:function(b,E,k){var P=E.inputState;if(P.operator){if(P.operator==k.operator){P.motion="expandToLine",P.motionArgs={linewise:!0},this.evalInput(b,E);return}_(b)}P.operator=k.operator,P.operatorArgs=ie(k.operatorArgs),k.keys.length>1&&(P.operatorShortcut=k.keys),k.exitVisualBlock&&(E.visualBlock=!1,Rn(b)),E.visualMode&&this.evalInput(b,E)},processOperatorMotion:function(b,E,k){var P=E.visualMode,B=ie(k.operatorMotionArgs);B&&P&&B.visualLine&&(E.visualLine=!0),this.processOperator(b,E,k),P||this.processMotion(b,E,k)},processAction:function(b,E,k){var P=E.inputState,B=P.getRepeat(),W=!!B,q=ie(k.actionArgs)||{};P.selectedCharacter&&(q.selectedCharacter=P.selectedCharacter),k.operator&&this.processOperator(b,E,k),k.motion&&this.processMotion(b,E,k),(k.motion||k.operator)&&this.evalInput(b,E),q.repeat=B||1,q.repeatIsExplicit=W,q.registerName=P.registerName,_(b),E.lastMotion=null,k.isEdit&&this.recordLastEdit(E,P,k),Yn[k.action](b,q,E)},processSearch:function(b,E,k){function P(Le,Xe,pt){Ve.searchHistoryController.pushInput(Le),Ve.searchHistoryController.reset();try{gn(b,Le,Xe,pt)}catch{Tt(b,"Invalid regex: "+Le),_(b);return}$i.processMotion(b,E,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:k.searchArgs.toJumplist}})}function B(Le){P(Le,!0,!0);var Xe=Ve.macroModeState;Xe.isRecording&&Co(Xe,Le)}function W(Le,Xe,pt){var nt=j(Le),st,Ln;nt=="<Up>"||nt=="<Down>"?(st=nt=="<Up>",Ln=Le.target?Le.target.selectionEnd:0,Xe=Ve.searchHistoryController.nextMatch(Xe,st)||"",pt(Xe),Ln&&Le.target&&(Le.target.selectionEnd=Le.target.selectionStart=Math.min(Ln,Le.target.value.length))):nt&&nt!="<Left>"&&nt!="<Right>"&&Ve.searchHistoryController.reset();var St;try{St=gn(b,Xe,!0,!0)}catch{}St?b.scrollIntoView(qn(b,!X,St),30):(Ar(b),b.scrollTo(be.left,be.top))}function q(Le,Xe,pt){var nt=j(Le);nt=="<Esc>"||nt=="<C-c>"||nt=="<C-[>"||nt=="<BS>"&&Xe==""?(Ve.searchHistoryController.pushInput(Xe),Ve.searchHistoryController.reset(),gn(b,he),Ar(b),b.scrollTo(be.left,be.top),je.e_stop(Le),_(b),pt(),b.focus()):nt=="<Up>"||nt=="<Down>"?je.e_stop(Le):nt=="<C-u>"&&(je.e_stop(Le),pt(""))}if(b.getSearchCursor){var X=k.searchArgs.forward,Q=k.searchArgs.wholeWordOnly;In(b).setReversed(!X);var se=X?"/":"?",he=In(b).getQuery(),be=b.getScrollInfo();switch(k.searchArgs.querySrc){case"prompt":var ke=Ve.macroModeState;if(ke.isPlaying){var Oe=ke.replaySearchQueries.shift();P(Oe,!0,!1)}else _n(b,{onClose:B,prefix:se,desc:"(JavaScript regexp)",onKeyUp:W,onKeyDown:q});break;case"wordUnderCursor":var ye=Gn(b,{noSymbol:!0}),Ae=!0;if(ye||(ye=Gn(b,{noSymbol:!1}),Ae=!1),!ye){Tt(b,"No word under cursor"),_(b);return}var Oe=b.getLine(ye.start.line).substring(ye.start.ch,ye.end.ch);Ae&&Q?Oe="\\b"+Oe+"\\b":Oe=Bn(Oe),Ve.jumpList.cachedCursor=b.getCursor(),b.setCursor(ye.start),P(Oe,!0,!1)}}},processEx:function(b,E,k){function P(W){Ve.exCommandHistoryController.pushInput(W),Ve.exCommandHistoryController.reset(),Hr.processCommand(b,W),b.state.vim&&_(b)}function B(W,q,X){var Q=j(W),se,he;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&q=="")&&(Ve.exCommandHistoryController.pushInput(q),Ve.exCommandHistoryController.reset(),je.e_stop(W),_(b),X(),b.focus()),Q=="<Up>"||Q=="<Down>"?(je.e_stop(W),se=Q=="<Up>",he=W.target?W.target.selectionEnd:0,q=Ve.exCommandHistoryController.nextMatch(q,se)||"",X(q),he&&W.target&&(W.target.selectionEnd=W.target.selectionStart=Math.min(he,W.target.value.length))):Q=="<C-u>"?(je.e_stop(W),X("")):Q&&Q!="<Left>"&&Q!="<Right>"&&Ve.exCommandHistoryController.reset()}k.type=="keyToEx"?Hr.processCommand(b,k.exArgs.input):E.visualMode?_n(b,{onClose:P,prefix:":",value:"'<,'>",onKeyDown:B,selectValueOnOpen:!1}):_n(b,{onClose:P,prefix:":",onKeyDown:B})},evalInput:function(b,E){var k=E.inputState,P=k.motion,B=k.motionArgs||{},W=k.operator,q=k.operatorArgs||{},X=k.registerName,Q=E.sel,se=qe(E.visualMode?ce(b,Q.head):b.getCursor("head")),he=qe(E.visualMode?ce(b,Q.anchor):b.getCursor("anchor")),be=qe(se),ke=qe(he),ye,Ae,Oe;if(W&&this.recordLastEdit(E,k),k.repeatOverride!==void 0?Oe=k.repeatOverride:Oe=k.getRepeat(),Oe>0&&B.explicitRepeat?B.repeatIsExplicit=!0:(B.noRepeat||!B.explicitRepeat&&Oe===0)&&(Oe=1,B.repeatIsExplicit=!1),k.selectedCharacter&&(B.selectedCharacter=q.selectedCharacter=k.selectedCharacter),B.repeat=Oe,_(b),P){var Le=Pn[P](b,se,B,E,k);if(E.lastMotion=Pn[P],!Le)return;if(B.toJumplist){!W&&b.ace.curOp!=null&&(b.ace.curOp.command.scrollIntoView="center-animate");var Xe=Ve.jumpList,pt=Xe.cachedCursor;pt?(Fr(b,pt,Le),delete Xe.cachedCursor):Fr(b,se,Le)}Le instanceof Array?(Ae=Le[0],ye=Le[1]):ye=Le,ye||(ye=qe(se)),E.visualMode?((!E.visualBlock||ye.ch!==1/0)&&(ye=ce(b,ye,be)),Ae&&(Ae=ce(b,Ae)),Ae=Ae||ke,Q.anchor=Ae,Q.head=ye,Rn(b),ei(b,E,"<",ot(Ae,ye)?Ae:ye),ei(b,E,">",ot(Ae,ye)?ye:Ae)):W||(b.ace.curOp&&(b.ace.curOp.vimDialogScroll="center-animate"),ye=ce(b,ye,be),b.setCursor(ye.line,ye.ch))}if(W){if(q.lastSel){Ae=ke;var nt=q.lastSel,st=Math.abs(nt.head.line-nt.anchor.line),Ln=Math.abs(nt.head.ch-nt.anchor.ch);nt.visualLine?ye=new De(ke.line+st,ke.ch):nt.visualBlock?ye=new De(ke.line+st,ke.ch+Ln):nt.head.line==nt.anchor.line?ye=new De(ke.line,ke.ch+Ln):ye=new De(ke.line+st,ke.ch),E.visualMode=!0,E.visualLine=nt.visualLine,E.visualBlock=nt.visualBlock,Q=E.sel={anchor:Ae,head:ye},Rn(b)}else E.visualMode&&(q.lastSel={anchor:qe(Q.anchor),head:qe(Q.head),visualBlock:E.visualBlock,visualLine:E.visualLine});var St,Zt,Ot,Et,ur;if(E.visualMode){St=dt(Q.head,Q.anchor),Zt=Lt(Q.head,Q.anchor),Ot=E.visualLine||q.linewise,Et=E.visualBlock?"block":Ot?"line":"char";var br=v(b,St,Zt);if(ur=Tn(b,{anchor:br.start,head:br.end},Et),Ot){var Fn=ur.ranges;if(Et=="block")for(var G=0;G<Fn.length;G++)Fn[G].head.ch=$t(b,Fn[G].head.line);else Et=="line"&&(Fn[0].head=new De(Fn[0].head.line+1,0))}}else{if(St=qe(Ae||ke),Zt=qe(ye||be),ot(Zt,St)){var J=St;St=Zt,Zt=J}Ot=B.linewise||q.linewise,Ot?nr(b,St,Zt):B.forward&&Vn(b,St,Zt),Et="char";var ae=!B.inclusive||Ot,br=v(b,St,Zt);ur=Tn(b,{anchor:br.start,head:br.end},Et,ae)}b.setSelections(ur.ranges,ur.primary),E.lastMotion=null,q.repeat=Oe,q.registerName=X,q.linewise=Ot;var ue=ls[W](b,q,ur.ranges,ke,ye);E.visualMode&&Cn(b,ue!=null),ue&&b.setCursor(ue)}},recordLastEdit:function(b,E,k){var P=Ve.macroModeState;P.isPlaying||(b.lastEditInputState=E,b.lastEditActionCommand=k,P.lastInsertModeChanges.changes=[],P.lastInsertModeChanges.expectCursorActivityForChange=!1,P.lastInsertModeChanges.visualBlock=b.visualBlock?b.sel.head.line-b.sel.anchor.line:0)}},Pn={moveToTopLine:function(b,E,k){var P=Ne(b).top+k.repeat-1;return new De(P,Qt(b.getLine(P)))},moveToMiddleLine:function(b){var E=Ne(b),k=Math.floor((E.top+E.bottom)*.5);return new De(k,Qt(b.getLine(k)))},moveToBottomLine:function(b,E,k){var P=Ne(b).bottom-k.repeat+1;return new De(P,Qt(b.getLine(P)))},expandToLine:function(b,E,k){var P=E;return new De(P.line+k.repeat-1,1/0)},findNext:function(b,E,k){var P=In(b),B=P.getQuery();if(B){var W=!k.forward;return W=P.isReversed()?!W:W,zi(b,B),qn(b,W,B,k.repeat)}},findAndSelectNextInclusive:function(b,E,k,P,B){var W=In(b),q=W.getQuery();if(q){var X=!k.forward;X=W.isReversed()?!X:X;var Q=di(b,X,q,k.repeat,P);if(Q){if(B.operator)return Q;var se=Q[0],he=new De(Q[1].line,Q[1].ch-1);if(P.visualMode){(P.visualLine||P.visualBlock)&&(P.visualLine=!1,P.visualBlock=!1,je.signal(b,"vim-mode-change",{mode:"visual",subMode:""}));var be=P.sel.anchor;if(be)return W.isReversed()?k.forward?[be,se]:[be,he]:k.forward?[be,he]:[be,se]}else P.visualMode=!0,P.visualLine=!1,P.visualBlock=!1,je.signal(b,"vim-mode-change",{mode:"visual",subMode:""});return X?[he,se]:[se,he]}}},goToMark:function(b,E,k,P){var B=Be(b,P,k.selectedCharacter);return B?k.linewise?{line:B.line,ch:Qt(b.getLine(B.line))}:B:null},moveToOtherHighlightedEnd:function(b,E,k,P){if(P.visualBlock&&k.sameLine){var B=P.sel;return[ce(b,new De(B.anchor.line,B.head.ch)),ce(b,new De(B.head.line,B.anchor.ch))]}return[P.sel.head,P.sel.anchor]},jumpToMark:function(b,E,k,P){for(var B=E,W=0;W<k.repeat;W++){var q=B;for(var X in P.marks)if(u(X)){var Q=P.marks[X].find(),se=k.forward?ot(Q,q):ot(q,Q);if(!se&&!(k.linewise&&Q.line==q.line)){var he=ct(q,B),be=k.forward?gr(q,Q,B):gr(B,Q,q);(he||be)&&(B=Q)}}}return k.linewise&&(B=new De(B.line,Qt(b.getLine(B.line)))),B},moveByCharacters:function(b,E,k){var P=E,B=k.repeat,W=k.forward?P.ch+B:P.ch-B;return new De(P.line,W)},moveByLines:function(b,E,k,P){var B=E,W=B.ch;switch(P.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:W=P.lastHPos;break;default:P.lastHPos=W}var q=k.repeat+(k.repeatOffset||0),X=k.forward?B.line+q:B.line-q,Q=b.firstLine(),se=b.lastLine();if(X<Q&&B.line==Q)return this.moveToStartOfLine(b,E,k,P);if(X>se&&B.line==se)return oo(b,E,k,P,!0);var he=b.ace.session.getFoldLine(X);return he&&(k.forward?X>he.start.row&&(X=he.end.row+1):X=he.start.row),k.toFirstChar&&(W=Qt(b.getLine(X)),P.lastHPos=W),P.lastHSPos=b.charCoords(new De(X,W),"div").left,new De(X,W)},moveByDisplayLines:function(b,E,k,P){var B=E;switch(P.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:P.lastHSPos=b.charCoords(B,"div").left}var W=k.repeat,Q=b.findPosV(B,k.forward?W:-W,"line",P.lastHSPos);if(Q.hitSide)if(k.forward)var q=b.charCoords(Q,"div"),X={top:q.top+8,left:P.lastHSPos},Q=b.coordsChar(X,"div");else{var se=b.charCoords(new De(b.firstLine(),0),"div");se.left=P.lastHSPos,Q=b.coordsChar(se,"div")}return P.lastHPos=Q.ch,Q},moveByPage:function(b,E,k){var P=E,B=k.repeat;return b.findPosV(P,k.forward?B:-B,"page")},moveByParagraph:function(b,E,k){var P=k.forward?1:-1;return ts(b,E,k.repeat,P)},moveBySentence:function(b,E,k){var P=k.forward?1:-1;return en(b,E,k.repeat,P)},moveByScroll:function(b,E,k,P){var B=b.getScrollInfo(),W=null,q=k.repeat;q||(q=B.clientHeight/(2*b.defaultTextHeight()));var X=b.charCoords(E,"local");if(k.repeat=q,W=Pn.moveByDisplayLines(b,E,k,P),!W)return null;var Q=b.charCoords(W,"local");return b.scrollTo(null,B.top+Q.top-X.top),W},moveByWords:function(b,E,k){return lr(b,E,k.repeat,!!k.forward,!!k.wordEnd,!!k.bigWord)},moveTillCharacter:function(b,E,k){var P=k.repeat,B=_i(b,P,k.forward,k.selectedCharacter,E),W=k.forward?-1:1;return On(W,k),B?(B.ch+=W,B):null},moveToCharacter:function(b,E,k){var P=k.repeat;return On(0,k),_i(b,P,k.forward,k.selectedCharacter,E)||E},moveToSymbol:function(b,E,k){var P=k.repeat;return Cr(b,P,k.forward,k.selectedCharacter)||E},moveToColumn:function(b,E,k,P){var B=k.repeat;return P.lastHPos=B-1,P.lastHSPos=b.charCoords(E,"div").left,No(b,B)},moveToEol:function(b,E,k,P){return oo(b,E,k,P,!1)},moveToFirstNonWhiteSpaceCharacter:function(b,E){var k=E;return new De(k.line,Qt(b.getLine(k.line)))},moveToMatchedSymbol:function(b,E){for(var k=E,P=k.line,B=k.ch,W=b.getLine(P),q;B<W.length;B++)if(q=W.charAt(B),q&&g(q)){var X=b.getTokenTypeAt(new De(P,B+1));if(X!=="string"&&X!=="comment")break}if(B<W.length){var Q=/[<>]/.test(W[B])?/[(){}[\]<>]/:/[(){}[\]]/,se=b.findMatchingBracket(new De(P,B+1),{bracketRegex:Q});return se.to}return k},moveToStartOfLine:function(b,E){return new De(E.line,0)},moveToLineOrEdgeOfDocument:function(b,E,k){var P=k.forward?b.lastLine():b.firstLine();return k.repeatIsExplicit&&(P=k.repeat-b.getOption("firstLineNumber")),new De(P,Qt(b.getLine(P)))},moveToStartOfDisplayLine:function(b){return b.execCommand("goLineLeft"),b.getCursor()},moveToEndOfDisplayLine:function(b){b.execCommand("goLineRight");var E=b.getCursor();return E.sticky=="before"&&E.ch--,E},textObjectManipulation:function(b,E,k,P){var B={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},W={"'":!0,'"':!0,"`":!0},q=k.selectedCharacter;q=="b"?q="(":q=="B"&&(q="{");var X=!k.textObjectInner,Q,se;if(B[q]){if(se=!0,Q=vn(b,E,q,X),!Q){var he=b.getSearchCursor(new RegExp("\\"+q,"g"),E);he.find()&&(Q=vn(b,he.from(),q,X))}}else if(W[q])se=!0,Q=zr(b,E,q,X);else if(q==="W"||q==="w")for(var be=k.repeat||1;be-- >0;){var ke=Gn(b,{inclusive:X,innerWord:!X,bigWord:q==="W",noSymbol:q==="W",multiline:!0},Q&&Q.end);ke&&(Q||(Q=ke),Q.end=ke.end)}else if(q==="p")if(Q=ts(b,E,k.repeat,0,X),k.linewise=!0,P.visualMode)P.visualLine||(P.visualLine=!0);else{var ye=P.inputState.operatorArgs;ye&&(ye.linewise=!0),Q.end.line--}else if(q==="t")Q=ci(b,E,X);else if(q==="s"){var Ae=b.getLine(E.line);E.ch>0&&w(Ae[E.ch])&&(E.ch-=1);var Oe=Do(b,E,k.repeat,1,X),Le=Do(b,E,k.repeat,-1,X);m(b.getLine(Le.line)[Le.ch])&&m(b.getLine(Oe.line)[Oe.ch-1])&&(Le={line:Le.line,ch:Le.ch+1}),Q={start:Le,end:Oe}}return Q?b.state.vim.visualMode?En(b,Q.start,Q.end,se):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(b,E,k){var P=Ve.lastCharacterSearch,B=k.repeat,W=k.forward===P.forward,q=(P.increment?1:0)*(W?-1:1);b.moveH(-q,"char"),k.inclusive=!!W;var X=_i(b,B,W,P.selectedCharacter);return X?(X.ch+=q,X):(b.moveH(q,"char"),E)}},ls={change:function(b,E,k){var P,B,W=b.state.vim,q=k[0].anchor,X=k[0].head;if(W.visualMode)if(E.fullLine)X.ch=Number.MAX_VALUE,X.line--,b.setSelection(q,X),B=b.getSelection(),b.replaceSelection(""),P=q;else{B=b.getSelection();var Q=oe("",k.length);b.replaceSelections(Q),P=dt(k[0].head,k[0].anchor)}else{B=b.getRange(q,X);var se=W.lastEditInputState||{};if(se.motion=="moveByWords"&&!m(B)){var he=/\s+$/.exec(B);he&&se.motionArgs&&se.motionArgs.forward&&(X=fe(X,0,-he[0].length),B=B.slice(0,-he[0].length))}E.linewise&&(q=new De(q.line,Qt(b.getLine(q.line))),X.line>q.line&&(X=new De(X.line-1,Number.MAX_VALUE))),b.replaceRange("",q,X),P=q}Ve.registerController.pushText(E.registerName,"change",B,E.linewise,k.length>1),Yn.enterInsertMode(b,{head:P},b.state.vim)},delete:function(b,E,k){var P,B,W=b.state.vim;if(W.visualBlock){B=b.getSelection();var q=oe("",k.length);b.replaceSelections(q),P=dt(k[0].head,k[0].anchor)}else{var X=k[0].anchor,Q=k[0].head;E.linewise&&Q.line!=b.firstLine()&&X.line==b.lastLine()&&X.line==Q.line-1&&(X.line==b.firstLine()?X.ch=0:X=new De(X.line-1,$t(b,X.line-1))),B=b.getRange(X,Q),b.replaceRange("",X,Q),P=X,E.linewise&&(P=Pn.moveToFirstNonWhiteSpaceCharacter(b,X))}return Ve.registerController.pushText(E.registerName,"delete",B,E.linewise,W.visualBlock),ce(b,P)},indent:function(b,E,k){var P=b.state.vim,B=P.visualMode?E.repeat:1;if(P.visualBlock){for(var W=b.getOption("tabSize"),q=b.getOption("indentWithTabs")?" ":" ".repeat(W),X,Q=k.length-1;Q>=0;Q--)if(X=dt(k[Q].anchor,k[Q].head),E.indentRight)b.replaceRange(q.repeat(B),X,X);else{for(var se=b.getLine(X.line),he=0,be=0;be<B;be++){var ke=se[X.ch+he];if(ke==" ")he++;else{if(ke!=" ")break;he++;for(var ye=1;ye<q.length&&(ke=se[X.ch+he],ke===" ");ye++)he++}}b.replaceRange("",X,fe(X,0,he))}return X}if(b.indentMore)for(var be=0;be<B;be++)E.indentRight?b.indentMore():b.indentLess();else{var Ae=k[0].anchor.line,Oe=P.visualBlock?k[k.length-1].anchor.line:k[0].head.line;E.linewise&&Oe--;for(var Q=Ae;Q<=Oe;Q++)for(var be=0;be<B;be++)b.indentLine(Q,E.indentRight)}return Pn.moveToFirstNonWhiteSpaceCharacter(b,k[0].anchor)},indentAuto:function(b,E,k){return b.execCommand("indentAuto"),Pn.moveToFirstNonWhiteSpaceCharacter(b,k[0].anchor)},hardWrap:function(b,E,k,P,B){if(b.hardWrap){var W=k[0].anchor.line,q=k[0].head.line;E.linewise&&q--;var X=b.hardWrap({from:W,to:q});return X>W&&E.linewise&&X--,E.keepCursor?P:new De(X,0)}},changeCase:function(b,E,k,P,B){for(var W=b.getSelections(),q=[],X=E.toLower,Q=0;Q<W.length;Q++){var se=W[Q],he="";if(X===!0)he=se.toLowerCase();else if(X===!1)he=se.toUpperCase();else for(var be=0;be<se.length;be++){var ke=se.charAt(be);he+=c(ke)?ke.toLowerCase():ke.toUpperCase()}q.push(he)}return b.replaceSelections(q),E.shouldMoveCursor?B:!b.state.vim.visualMode&&E.linewise&&k[0].anchor.line+1==k[0].head.line?Pn.moveToFirstNonWhiteSpaceCharacter(b,P):E.linewise?P:dt(k[0].anchor,k[0].head)},yank:function(b,E,k,P){var B=b.state.vim,W=b.getSelection(),q=B.visualMode?dt(B.sel.anchor,B.sel.head,k[0].head,k[0].anchor):P;return Ve.registerController.pushText(E.registerName,"yank",W,E.linewise,B.visualBlock),q}},Yn={jumpListWalk:function(b,E,k){if(!k.visualMode){var P=E.repeat,B=E.forward,W=Ve.jumpList,q=W.move(b,B?P:-P),X=q?q.find():void 0;X=X||b.getCursor(),b.setCursor(X),b.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(b,E,k){if(!k.visualMode){var P=E.repeat||1,B=b.defaultTextHeight(),W=b.getScrollInfo().top,q=B*P,X=E.forward?W+q:W-q,Q=qe(b.getCursor()),se=b.charCoords(Q,"local");if(E.forward)X>se.top?(Q.line+=(X-se.top)/B,Q.line=Math.ceil(Q.line),b.setCursor(Q),se=b.charCoords(Q,"local"),b.scrollTo(null,se.top)):b.scrollTo(null,X);else{var he=X+b.getScrollInfo().clientHeight;he<se.bottom?(Q.line-=(se.bottom-he)/B,Q.line=Math.floor(Q.line),b.setCursor(Q),se=b.charCoords(Q,"local"),b.scrollTo(null,se.bottom-b.getScrollInfo().clientHeight)):b.scrollTo(null,X)}}},scrollToCursor:function(b,E){var k=b.getCursor().line,P=b.charCoords(new De(k,0),"local"),B=b.getScrollInfo().clientHeight,W=P.top;switch(E.position){case"center":W=P.bottom-B/2;break;case"bottom":var q=new De(k,b.getLine(k).length-1),X=b.charCoords(q,"local"),Q=X.bottom-W;W=W-B+Q}b.scrollTo(null,W)},replayMacro:function(b,E,k){var P=E.selectedCharacter,B=E.repeat,W=Ve.macroModeState;for(P=="@"?P=W.latestRegister:W.latestRegister=P;B--;)mr(b,k,W,P)},enterMacroRecordMode:function(b,E){var k=Ve.macroModeState,P=E.selectedCharacter;Ve.registerController.isValidRegister(P)&&k.enterMacroRecordMode(b,P)},toggleOverwrite:function(b){b.state.overwrite?(b.toggleOverwrite(!1),b.setOption("keyMap","vim-insert"),je.signal(b,"vim-mode-change",{mode:"insert"})):(b.toggleOverwrite(!0),b.setOption("keyMap","vim-replace"),je.signal(b,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(b,E,k){if(!b.getOption("readOnly")){k.insertMode=!0,k.insertModeRepeat=E&&E.repeat||1;var P=E?E.insertAt:null,B=k.sel,W=E.head||b.getCursor("head"),q=b.listSelections().length;if(P=="eol")W=new De(W.line,$t(b,W.line));else if(P=="bol")W=new De(W.line,0);else if(P=="charAfter"){var X=v(b,W,fe(W,0,1));W=X.end}else if(P=="firstNonBlank"){var X=v(b,W,Pn.moveToFirstNonWhiteSpaceCharacter(b,W));W=X.end}else if(P=="startOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(W=new De(Math.min(B.head.line,B.anchor.line),Math.min(B.head.ch,B.anchor.ch)),q=Math.abs(B.head.line-B.anchor.line)+1):B.head.line<B.anchor.line?W=B.head:W=new De(B.anchor.line,0)}else if(P=="endOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(W=new De(Math.min(B.head.line,B.anchor.line),Math.max(B.head.ch,B.anchor.ch)+1),q=Math.abs(B.head.line-B.anchor.line)+1):B.head.line>=B.anchor.line?W=fe(B.head,0,1):W=new De(B.anchor.line,0)}else if(P=="inplace"){if(k.visualMode)return}else P=="lastEdit"&&(W=bt(b)||W);b.setOption("disableInput",!1),E&&E.replace?(b.toggleOverwrite(!0),b.setOption("keyMap","vim-replace"),je.signal(b,"vim-mode-change",{mode:"replace"})):(b.toggleOverwrite(!1),b.setOption("keyMap","vim-insert"),je.signal(b,"vim-mode-change",{mode:"insert"})),Ve.macroModeState.isPlaying||(b.on("change",Ao),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=b.setBookmark(W,{insertLeft:!0}),je.on(b.getInputField(),"keydown",Fo)),k.visualMode&&Cn(b),tr(b,W,q)}},toggleVisualMode:function(b,E,k){var P=E.repeat,B=b.getCursor(),W;if(k.visualMode)k.visualLine^E.linewise||k.visualBlock^E.blockwise?(k.visualLine=!!E.linewise,k.visualBlock=!!E.blockwise,je.signal(b,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),Rn(b)):Cn(b);else{k.visualMode=!0,k.visualLine=!!E.linewise,k.visualBlock=!!E.blockwise,W=ce(b,new De(B.line,B.ch+P-1));var q=v(b,B,W);k.sel={anchor:q.start,head:q.end},je.signal(b,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),Rn(b),ei(b,k,"<",dt(B,W)),ei(b,k,">",Lt(B,W))}},reselectLastSelection:function(b,E,k){var P=k.lastSelection;if(k.visualMode&&jt(b,k),P){var B=P.anchorMark.find(),W=P.headMark.find();if(!B||!W)return;k.sel={anchor:B,head:W},k.visualMode=!0,k.visualLine=P.visualLine,k.visualBlock=P.visualBlock,Rn(b),ei(b,k,"<",dt(B,W)),ei(b,k,">",Lt(B,W)),je.signal(b,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""})}},joinLines:function(b,E,k){var P,B;if(k.visualMode){if(P=b.getCursor("anchor"),B=b.getCursor("head"),ot(B,P)){var W=B;B=P,P=W}B.ch=$t(b,B.line)-1}else{var q=Math.max(E.repeat,2);P=b.getCursor(),B=ce(b,new De(P.line+q-1,1/0))}for(var X=0,Q=P.line;Q<B.line;Q++){X=$t(b,P.line);var se="",he=0;if(!E.keepSpaces){var be=b.getLine(P.line+1);he=be.search(/\S/),he==-1?he=be.length:se=" "}b.replaceRange(se,new De(P.line,X),new De(P.line+1,he))}var ke=ce(b,new De(P.line,X));k.visualMode&&Cn(b,!1),b.setCursor(ke)},newLineAndEnterInsertMode:function(b,E,k){k.insertMode=!0;var P=qe(b.getCursor());if(P.line===b.firstLine()&&!E.after)b.replaceRange(`
|
|
1442
|
+
`,new De(b.firstLine(),0)),b.setCursor(b.firstLine(),0);else{P.line=E.after?P.line:P.line-1,P.ch=$t(b,P.line),b.setCursor(P);var B=je.commands.newlineAndIndentContinueComment||je.commands.newlineAndIndent;B(b)}this.enterInsertMode(b,{repeat:E.repeat},k)},paste:function(b,E,k){var P=this,B=Ve.registerController.getRegister(E.registerName),W=function(){var q=B.toString();P.continuePaste(b,E,k,q,B)};E.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(q){P.continuePaste(b,E,k,q,B)},function(){W()}):W()},continuePaste:function(b,E,k,P,B){var W=qe(b.getCursor());if(P){if(E.matchIndent){var q=b.getOption("tabSize"),X=function(Fn){var G=Fn.split(" ").length-1,J=Fn.split(" ").length-1;return G*q+J*1},Q=b.getLine(b.getCursor().line),se=X(Q.match(/^\s*/)[0]),he=P.replace(/\n$/,""),be=P!==he,ke=X(P.match(/^\s*/)[0]),P=he.replace(/^\s*/gm,function(Fn){var G=se+(X(Fn)-ke);if(G<0)return"";if(b.getOption("indentWithTabs")){var J=Math.floor(G/q);return Array(J+1).join(" ")}return Array(G+1).join(" ")});P+=be?`
|
|
1443
|
+
`:""}if(E.repeat>1)var P=Array(E.repeat+1).join(P);var ye=B.linewise,Ae=B.blockwise;if(Ae){P=P.split(`
|
|
1444
|
+
`),ye&&P.pop();for(var Oe=0;Oe<P.length;Oe++)P[Oe]=P[Oe]==""?" ":P[Oe];W.ch+=E.after?1:0,W.ch=Math.min($t(b,W.line),W.ch)}else ye?k.visualMode?P=k.visualLine?P.slice(0,-1):`
|
|
1445
|
+
`+P.slice(0,P.length-1)+`
|
|
1446
|
+
`:E.after?(P=`
|
|
1447
|
+
`+P.slice(0,P.length-1),W.ch=$t(b,W.line)):W.ch=0:W.ch+=E.after?1:0;var Le;if(k.visualMode){k.lastPastedText=P;var Xe,pt=Qe(b,k),nt=pt[0],st=pt[1],Ln=b.getSelection(),St=b.listSelections(),Zt=new Array(St.length).join("1").split("1");k.lastSelection&&(Xe=k.lastSelection.headMark.find()),Ve.registerController.unnamedRegister.setText(Ln),Ae?(b.replaceSelections(Zt),st=new De(nt.line+P.length-1,nt.ch),b.setCursor(nt),pn(b,st),b.replaceSelections(P),Le=nt):k.visualBlock?(b.replaceSelections(Zt),b.setCursor(nt),b.replaceRange(P,nt,nt),Le=nt):(b.replaceRange(P,nt,st),Le=b.posFromIndex(b.indexFromPos(nt)+P.length-1)),Xe&&(k.lastSelection.headMark=b.setBookmark(Xe)),ye&&(Le.ch=0)}else if(Ae){b.setCursor(W);for(var Oe=0;Oe<P.length;Oe++){var Ot=W.line+Oe;Ot>b.lastLine()&&b.replaceRange(`
|
|
1448
|
+
`,new De(Ot,0));var Et=$t(b,Ot);Et<W.ch&&er(b,Ot,W.ch)}b.setCursor(W),pn(b,new De(W.line+P.length-1,W.ch)),b.replaceSelections(P),Le=W}else if(b.replaceRange(P,W),ye){var Ot=E.after?W.line+1:W.line;Le=new De(Ot,Qt(b.getLine(Ot)))}else Le=qe(W),/\n/.test(P)||(Le.ch+=P.length-(E.after?1:0));k.visualMode&&Cn(b,!1),b.setCursor(Le)}},undo:function(b,E){b.operation(function(){Ge(b,je.commands.undo,E.repeat)(),b.setCursor(ce(b,b.getCursor("start")))})},redo:function(b,E){Ge(b,je.commands.redo,E.repeat)()},setRegister:function(b,E,k){k.inputState.registerName=E.selectedCharacter},insertRegister:function(b,E,k){var P=E.selectedCharacter,B=Ve.registerController.getRegister(P),W=B&&B.toString();W&&b.replaceSelection(W)},oneNormalCommand:function(b,E,k){Mt(b,!0),k.insertModeReturn=!0,je.on(b,"vim-command-done",function P(){k.visualMode||(k.insertModeReturn&&(k.insertModeReturn=!1,k.insertMode||Yn.enterInsertMode(b,{},k)),je.off(b,"vim-command-done",P))})},setMark:function(b,E,k){var P=E.selectedCharacter;ei(b,k,P,b.getCursor())},replace:function(b,E,k){var P=E.selectedCharacter,B=b.getCursor(),W,q,X=b.listSelections();if(k.visualMode)B=b.getCursor("start"),q=b.getCursor("end");else{var Q=b.getLine(B.line);W=B.ch+E.repeat,W>Q.length&&(W=Q.length),q=new De(B.line,W)}var se=v(b,B,q);if(B=se.start,q=se.end,P==`
|
|
1449
|
+
`)k.visualMode||b.replaceRange("",B,q),(je.commands.newlineAndIndentContinueComment||je.commands.newlineAndIndent)(b);else{var he=b.getRange(B,q);if(he=he.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),he=he.replace(/[^\n]/g,P),k.visualBlock){var be=new Array(b.getOption("tabSize")+1).join(" ");he=b.getSelection(),he=he.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),he=he.replace(/\t/g,be).replace(/[^\n]/g,P).split(`
|
|
1450
|
+
`),b.replaceSelections(he)}else b.replaceRange(he,B,q);k.visualMode?(B=ot(X[0].anchor,X[0].head)?X[0].anchor:X[0].head,b.setCursor(B),Cn(b,!1)):b.setCursor(fe(q,0,-1))}},incrementNumberToken:function(b,E){for(var k=b.getCursor(),P=b.getLine(k.line),B=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,W,q,X,Q;(W=B.exec(P))!==null&&(q=W.index,X=q+W[0].length,!(k.ch<X)););if(!(!E.backtrack&&X<=k.ch)&&W){var se=W[2]||W[4],he=W[3]||W[5],be=E.increase?1:-1,ke={"0b":2,0:8,"":10,"0x":16}[se.toLowerCase()],ye=parseInt(W[1]+he,ke)+be*E.repeat;Q=ye.toString(ke);var Ae=se?new Array(he.length-Q.length+1+W[1].length).join("0"):"";Q.charAt(0)==="-"?Q="-"+se+Ae+Q.substr(1):Q=se+Ae+Q;var Oe=new De(k.line,q),Le=new De(k.line,X);b.replaceRange(Q,Oe,Le),b.setCursor(new De(k.line,q+Q.length-1))}},repeatLastEdit:function(b,E,k){var P=k.lastEditInputState;if(P){var B=E.repeat;B&&E.repeatIsExplicit?k.lastEditInputState.repeatOverride=B:B=k.lastEditInputState.repeatOverride||B,Bs(b,k,B,!1)}},indent:function(b,E){b.indentLine(b.getCursor().line,E.indentRight)},exitInsertMode:Mt},Ei={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},Ri={bracket:{isComplete:function(b){if(b.nextCh===b.symb){if(b.depth++,b.depth>=1)return!0}else b.nextCh===b.reverseSymb&&b.depth--;return!1}},section:{init:function(b){b.curMoveThrough=!0,b.symb=(b.forward?"]":"[")===b.symb?"{":"}"},isComplete:function(b){return b.index===0&&b.nextCh===b.symb}},comment:{isComplete:function(b){var E=b.lastCh==="*"&&b.nextCh==="/";return b.lastCh=b.nextCh,E}},method:{init:function(b){b.symb=b.symb==="m"?"{":"}",b.reverseSymb=b.symb==="{"?"}":"{"},isComplete:function(b){return b.nextCh===b.symb}},preprocess:{init:function(b){b.index=0},isComplete:function(b){if(b.nextCh==="#"){var E=b.lineText.match(/^#(\w+)/)[1];if(E==="endif"){if(b.forward&&b.depth===0)return!0;b.depth++}else if(E==="if"){if(!b.forward&&b.depth===0)return!0;b.depth--}if(E==="else"&&b.depth===0)return!0}return!1}}};R("pcre",!0,"boolean"),Br.prototype={getQuery:function(){return Ve.query},setQuery:function(b){Ve.query=b},getOverlay:function(){return this.searchOverlay},setOverlay:function(b){this.searchOverlay=b},isReversed:function(){return Ve.isReversed},setReversed:function(b){Ve.isReversed=b},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(b){this.annotate=b}};var Hi={"\\n":`
|
|
1451
|
+
`,"\\r":"\r","\\t":" "},Vs={"\\/":"/","\\\\":"\\","\\n":`
|
|
1452
|
+
`,"\\r":"\r","\\t":" ","\\&":"&"},cn=0,Da=function(){this.buildCommandMap_()};Da.prototype={processCommand:function(b,E,k){var P=this;b.operation(function(){b.curOp.isVimOp=!0,P._processCommand(b,E,k)})},_processCommand:function(b,E,k){var P=b.state.vim,B=Ve.registerController.getRegister(":"),W=B.toString(),q=new je.StringStream(E);B.setText(E);var X=k||{};X.input=E;try{this.parseInput_(b,q,X)}catch(he){throw Tt(b,he.toString()),he}P.visualMode&&Cn(b);var Q,se;if(!X.commandName)X.line!==void 0&&(se="move");else if(Q=this.matchCommand_(X.commandName),Q){if(se=Q.name,Q.excludeFromCommandHistory&&B.setText(W),this.parseCommandArgs_(q,X,Q),Q.type=="exToKey"){L(b,Q.toKeys,Q);return}if(Q.type=="exToEx"){this.processCommand(b,Q.toInput);return}}if(!se){Tt(b,'Not an editor command ":'+E+'"');return}try{yr[se](b,X),(!Q||!Q.possiblyAsync)&&X.callback&&X.callback()}catch(he){throw Tt(b,he.toString()),he}},parseInput_:function(b,E,k){if(E.eatWhile(":"),E.eat("%")?(k.line=b.firstLine(),k.lineEnd=b.lastLine()):(k.line=this.parseLineSpec_(b,E),k.line!==void 0&&E.eat(",")&&(k.lineEnd=this.parseLineSpec_(b,E))),k.line==null)if(b.state.vim.visualMode){var P=Be(b,b.state.vim,"<");k.selectionLine=P&&P.line,P=Be(b,b.state.vim,">"),k.selectionLineEnd=P&&P.line}else k.selectionLine=b.getCursor().line;else k.selectionLine=k.line,k.selectionLineEnd=k.lineEnd;var B=E.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return B?k.commandName=B[1]:k.commandName=E.match(/.*/)[0],k},parseLineSpec_:function(b,E){var k=E.match(/^(\d+)/);if(k)return parseInt(k[1],10)-1;switch(E.next()){case".":return this.parseLineSpecOffset_(E,b.getCursor().line);case"$":return this.parseLineSpecOffset_(E,b.lastLine());case"'":var P=E.next(),B=Be(b,b.state.vim,P);if(!B)throw new Error("Mark not set");return this.parseLineSpecOffset_(E,B.line);case"-":case"+":return E.backUp(1),this.parseLineSpecOffset_(E,b.getCursor().line);default:return E.backUp(1),void 0}},parseLineSpecOffset_:function(b,E){var k=b.match(/^([+-])?(\d+)/);if(k){var P=parseInt(k[2],10);k[1]=="-"?E-=P:E+=P}return E},parseCommandArgs_:function(b,E,k){if(!b.eol()){E.argString=b.match(/.*/)[0];var P=k.argDelimiter||/\s+/,B=xr(E.argString).split(P);B.length&&B[0]&&(E.args=B)}},matchCommand_:function(b){for(var E=b.length;E>0;E--){var k=b.substring(0,E);if(this.commandMap_[k]){var P=this.commandMap_[k];if(P.name.indexOf(b)===0)return P}}return null},buildCommandMap_:function(){this.commandMap_={};for(var b=0;b<uo.length;b++){var E=uo[b],k=E.shortName||E.name;this.commandMap_[k]=E}},map:function(b,E,k,P){if(b!=":"&&b.charAt(0)==":"){if(k)throw Error("Mode not supported for ex mappings");var B=b.substring(1);E!=":"&&E.charAt(0)==":"?this.commandMap_[B]={name:B,type:"exToEx",toInput:E.substring(1),user:!0}:this.commandMap_[B]={name:B,type:"exToKey",toKeys:E,user:!0}}else{var W={keys:b,type:"keyToKey",toKeys:E,noremap:!!P};k&&(W.context=k),jn.unshift(W)}},unmap:function(b,E){if(b!=":"&&b.charAt(0)==":"){if(E)throw Error("Mode not supported for ex mappings");var k=b.substring(1);if(this.commandMap_[k]&&this.commandMap_[k].user)return delete this.commandMap_[k],!0}else for(var P=b,B=0;B<jn.length;B++)if(P==jn[B].keys&&jn[B].context===E)return jn.splice(B,1),!0}};var yr={colorscheme:function(b,E){if(!E.args||E.args.length<1){Tt(b,b.getOption("theme"));return}b.setOption("theme",E.args[0])},map:function(b,E,k,P){var B=E.args;if(!B||B.length<2){b&&Tt(b,"Invalid mapping: "+E.input);return}Hr.map(B[0],B[1],k,P)},imap:function(b,E){this.map(b,E,"insert")},nmap:function(b,E){this.map(b,E,"normal")},vmap:function(b,E){this.map(b,E,"visual")},omap:function(b,E){this.map(b,E,"operatorPending")},noremap:function(b,E){this.map(b,E,void 0,!0)},inoremap:function(b,E){this.map(b,E,"insert",!0)},nnoremap:function(b,E){this.map(b,E,"normal",!0)},vnoremap:function(b,E){this.map(b,E,"visual",!0)},onoremap:function(b,E){this.map(b,E,"operatorPending",!0)},unmap:function(b,E,k){var P=E.args;(!P||P.length<1||!Hr.unmap(P[0],k))&&b&&Tt(b,"No such mapping: "+E.input)},mapclear:function(b,E){_t.mapclear()},imapclear:function(b,E){_t.mapclear("insert")},nmapclear:function(b,E){_t.mapclear("normal")},vmapclear:function(b,E){_t.mapclear("visual")},omapclear:function(b,E){_t.mapclear("operatorPending")},move:function(b,E){$i.processCommand(b,b.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:E.line+1})},set:function(b,E){var k=E.args,P=E.setCfg||{};if(!k||k.length<1){b&&Tt(b,"Invalid mapping: "+E.input);return}var B=k[0].split("="),W=B[0],q=B[1],X=!1,Q=!1;if(W.charAt(W.length-1)=="?"){if(q)throw Error("Trailing characters: "+E.argString);W=W.substring(0,W.length-1),X=!0}else W.charAt(W.length-1)=="!"&&(W=W.substring(0,W.length-1),Q=!0);q===void 0&&W.substring(0,2)=="no"&&(W=W.substring(2),q=!1);var se=Yt[W]&&Yt[W].type=="boolean";if(se&&(Q?q=!A(W,b,P):q==null&&(q=!0)),!se&&q===void 0||X){var he=A(W,b,P);he instanceof Error?Tt(b,he.message):he===!0||he===!1?Tt(b," "+(he?"":"no")+W):Tt(b," "+W+"="+he)}else{var be=S(W,q,b,P);be instanceof Error&&Tt(b,be.message)}},setlocal:function(b,E){E.setCfg={scope:"local"},this.set(b,E)},setglobal:function(b,E){E.setCfg={scope:"global"},this.set(b,E)},registers:function(b,E){var k=E.args,P=Ve.registerController.registers,B=`----------Registers----------
|
|
1453
|
+
|
|
1454
|
+
`;if(k){var W;k=k.join("");for(var q=0;q<k.length;q++)if(W=k.charAt(q),!!Ve.registerController.isValidRegister(W)){var X=P[W]||new z;B+='"'+W+" "+X.toString()+`
|
|
1455
|
+
`}}else for(var W in P){var Q=P[W].toString();Q.length&&(B+='"'+W+" "+Q+`
|
|
1456
|
+
`)}Tt(b,B)},sort:function(b,E){function k(){if(E.argString){var Ot=new je.StringStream(E.argString);if(Ot.eat("!")&&(W=!0),Ot.eol())return;if(!Ot.eatSpace())return"Invalid arguments";var Et=Ot.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!Et&&!Ot.eol())return"Invalid arguments";if(Et[1]){q=Et[1].indexOf("i")!=-1,X=Et[1].indexOf("u")!=-1;var ur=Et[1].indexOf("d")!=-1||Et[1].indexOf("n")!=-1&&1,br=Et[1].indexOf("x")!=-1&&1,Fn=Et[1].indexOf("o")!=-1&&1;if(ur+br+Fn>1)return"Invalid arguments";Q=ur&&"decimal"||br&&"hex"||Fn&&"octal"}Et[2]&&(se=new RegExp(Et[2].substr(1,Et[2].length-2),q?"i":""))}}function P(Ot,Et){if(W){var ur;ur=Ot,Ot=Et,Et=ur}q&&(Ot=Ot.toLowerCase(),Et=Et.toLowerCase());var br=Q&&Le.exec(Ot),Fn=Q&&Le.exec(Et);return br?(br=parseInt((br[1]+br[2]).toLowerCase(),Xe),Fn=parseInt((Fn[1]+Fn[2]).toLowerCase(),Xe),br-Fn):Ot<Et?-1:1}function B(Ot,Et){if(W){var ur;ur=Ot,Ot=Et,Et=ur}return q&&(Ot[0]=Ot[0].toLowerCase(),Et[0]=Et[0].toLowerCase()),Ot[0]<Et[0]?-1:1}var W,q,X,Q,se,he=k();if(he){Tt(b,he+": "+E.argString);return}var be=E.line||b.firstLine(),ke=E.lineEnd||E.line||b.lastLine();if(be!=ke){var ye=new De(be,0),Ae=new De(ke,$t(b,ke)),Oe=b.getRange(ye,Ae).split(`
|
|
1457
|
+
`),Le=se||(Q=="decimal"?/(-?)([\d]+)/:Q=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Q=="octal"?/([0-7]+)/:null),Xe=Q=="decimal"?10:Q=="hex"?16:Q=="octal"?8:null,pt=[],nt=[];if(Q||se)for(var st=0;st<Oe.length;st++){var Ln=se?Oe[st].match(se):null;Ln&&Ln[0]!=""?pt.push(Ln):!se&&Le.exec(Oe[st])?pt.push(Oe[st]):nt.push(Oe[st])}else nt=Oe;if(pt.sort(se?B:P),se)for(var st=0;st<pt.length;st++)pt[st]=pt[st].input;else Q||nt.sort(P);if(Oe=W?pt.concat(nt):nt.concat(pt),X){var St=Oe,Zt;Oe=[];for(var st=0;st<St.length;st++)St[st]!=Zt&&Oe.push(St[st]),Zt=St[st]}b.replaceRange(Oe.join(`
|
|
1458
|
+
`),ye,Ae)}},vglobal:function(b,E){this.global(b,E)},normal:function(b,E){var k=E.argString;if(k&&k[0]=="!"&&(k=k.slice(1),Wi=!0),k=k.trimStart(),!k){Tt(b,"Argument is required.");return}var P=E.line;if(typeof P=="number")for(var B=isNaN(E.lineEnd)?P:E.lineEnd,W=P;W<=B;W++)b.setCursor(W,0),L(b,E.argString.trimStart()),b.state.vim.insertMode&&Mt(b,!0);else L(b,E.argString.trimStart()),b.state.vim.insertMode&&Mt(b,!0)},global:function(b,E){var k=E.argString;if(!k){Tt(b,"Regular Expression missing from global");return}var P=E.commandName[0]==="v";k[0]==="!"&&E.commandName[0]==="g"&&(P=!0,k=k.slice(1));var B=E.line!==void 0?E.line:b.firstLine(),W=E.lineEnd||E.line||b.lastLine(),q=rr(k),X=k,Q;if(q.length&&(X=q[0],Q=q.slice(1,q.length).join("/")),X)try{gn(b,X,!0,!0)}catch{Tt(b,"Invalid regex: "+X);return}for(var se=In(b).getQuery(),he=[],be=B;be<=W;be++){var ke=b.getLine(be),ye=se.test(ke);ye!==P&&he.push(Q?b.getLineHandle(be):ke)}if(!Q){Tt(b,he.join(`
|
|
1459
|
+
`));return}var Ae=0,Oe=function(){if(Ae<he.length){var Le=he[Ae++],Xe=b.getLineNumber(Le);if(Xe==null){Oe();return}var pt=Xe+1+Q;Hr.processCommand(b,pt,{callback:Oe})}else b.releaseLineHandles&&b.releaseLineHandles()};Oe()},substitute:function(b,E){if(!b.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var k=E.argString,P=k?Si(k,k[0]):[],B,W="",q,X,Q,se=!1,he=!1;if(P.length)B=P[0],A("pcre")&&B!==""&&(B=new RegExp(B).source),W=P[1],W!==void 0&&(A("pcre")?W=Po(W.replace(/([^\\])&/g,"$1$$&")):W=ns(W),Ve.lastSubstituteReplacePart=W),q=P[2]?P[2].split(" "):[];else if(k&&k.length){Tt(b,"Substitutions should be of the form :s/pattern/replace/");return}if(q&&(X=q[0],Q=parseInt(q[1]),X&&(X.indexOf("c")!=-1&&(se=!0),X.indexOf("g")!=-1&&(he=!0),A("pcre")?B=B+"/"+X:B=B.replace(/\//g,"\\/")+"/"+X)),B)try{gn(b,B,!0,!0)}catch{Tt(b,"Invalid regex: "+B);return}if(W=W||Ve.lastSubstituteReplacePart,W===void 0){Tt(b,"No previous substitute regular expression");return}var be=In(b),ke=be.getQuery(),ye=E.line!==void 0?E.line:b.getCursor().line,Ae=E.lineEnd||ye;ye==b.firstLine()&&Ae==b.lastLine()&&(Ae=1/0),Q&&(ye=Ae,Ae=ye+Q-1);var Oe=ce(b,new De(ye,0)),Le=b.getSearchCursor(ke,Oe);Pt(b,se,he,ye,Ae,Le,ke,W,E.callback)},startinsert:function(b,E){L(b,E.argString=="!"?"A":"i",{})},redo:je.commands.redo,undo:je.commands.undo,write:function(b){je.commands.save?je.commands.save(b):b.save&&b.save()},nohlsearch:function(b){Ar(b)},yank:function(b){var E=qe(b.getCursor()),k=E.line,P=b.getLine(k);Ve.registerController.pushText("0","yank",P,!0,!0)},delete:function(b,E){var k=E.selectionLine,P=isNaN(E.selectionLineEnd)?k:E.selectionLineEnd;ls.delete(b,{linewise:!0},[{anchor:new De(k,0),head:new De(P+1,0)}])},join:function(b,E){var k=E.selectionLine,P=isNaN(E.selectionLineEnd)?k:E.selectionLineEnd;b.setCursor(new De(k,0)),Yn.joinLines(b,{repeat:P-k},b.state.vim)},delmarks:function(b,E){if(!E.argString||!xr(E.argString)){Tt(b,"Argument required");return}for(var k=b.state.vim,P=new je.StringStream(xr(E.argString));!P.eol();){P.eatSpace();var B=P.pos;if(!P.match(/[a-zA-Z]/,!1)){Tt(b,"Invalid argument: "+E.argString.substring(B));return}var W=P.next();if(P.match("-",!0)){if(!P.match(/[a-zA-Z]/,!1)){Tt(b,"Invalid argument: "+E.argString.substring(B));return}var q=W,X=P.next();if(!(u(q)&&u(X)||c(q)&&c(X))){Tt(b,"Invalid argument: "+q+"-");return}var Q=q.charCodeAt(0),se=X.charCodeAt(0);if(Q>=se){Tt(b,"Invalid argument: "+E.argString.substring(B));return}for(var he=0;he<=se-Q;he++){var be=String.fromCharCode(Q+he);delete k.marks[be]}}else delete k.marks[W]}}},Hr=new Da;R("insertModeEscKeysTimeout",200,"number"),je.Vim=_t;var Ro={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"},Rr=_t.handleKey.bind(_t);_t.handleKey=function(b,E,k){return b.operation(function(){return Rr(b,E,k)},!0)},N(),r.CodeMirror=je;var pi=_t.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(b,E,k,P,B){var W=this.state.vim||{},q=k.characterWidth,X=k.lineHeight,Q=E.top,se=E.left;if(!W.insertMode){var he=P.cursor?vr.comparePoints(P.cursor,P.start)<=0:B.selection.isBackwards()||B.selection.isEmpty();!he&&se>q&&(se-=q)}!W.insertMode&&W.status&&(X/=2,Q+=X),ni.translate(b,se,Q),ni.setStyle(b.style,"width",q+"px"),ni.setStyle(b.style,"height",X+"px")},$getDirectionForHighlight:function(b){var E=b.state.cm,k=pi(E);if(!k.insertMode)return b.session.selection.isBackwards()||b.session.selection.isEmpty()},handleKeyboard:function(b,E,k,P,B){var W=b.editor,q=W.state.cm,X=pi(q);if(P!=-1){if(X.insertMode||(E==-1?(k.charCodeAt(0)>255&&b.inputKey&&(k=b.inputKey,k&&b.inputHash==4&&(k=k.toUpperCase())),b.inputChar=k):E==4||E==0?b.inputKey==k&&b.inputHash==E&&b.inputChar?(k=b.inputChar,E=-1):(b.inputChar=null,b.inputKey=k,b.inputHash=E):b.inputChar=b.inputKey=null),q.state.overwrite&&X.insertMode&&k=="backspace"&&E==0)return{command:"gotoleft"};if(k=="c"&&E==1&&!zo.isMac&&W.getCopyText())return W.once("copy",function(){X.insertMode?W.selection.clearSelection():q.operation(function(){Cn(q)})}),{command:"null",passEvent:!0};if(k=="esc"&&!X.insertMode&&!X.visualMode&&!q.ace.inMultiSelectMode){var Q=In(q),se=Q.getOverlay();se&&q.removeOverlay(se)}if(E==-1||E&1||E===0&&k.length>1){var he=X.insertMode,be=Ia(E,k,B||{},X);X.status==null&&(X.status="");var ke=os(q,be,"user");return X=pi(q),ke&&X.status!=null?X.status+=be:X.status==null&&(X.status=""),q._signal("changeStatus"),!ke&&(E!=-1||he)?void 0:{command:"null",passEvent:!ke}}}},attach:function(b){function E(){var P=pi(k).insertMode;k.ace.renderer.setStyle("normal-mode",!P),b.textInput.setCommandMode(!P),b.renderer.$keepTextAreaAtCursor=P,b.renderer.$blockCursor=!P}b.state||(b.state={});var k=new je(b);b.state.cm=k,b.$vimModeHandler=this,o(k),pi(k).status=null,k.on("vim-command-done",function(){k.virtualSelectionMode()||(pi(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()||(E(),k._signal("changeStatus"))}),E(),b.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(k)},detach:function(b){var E=b.state.cm;p(E),E.destroy(),b.state.cm=null,b.$vimModeHandler=null,b.renderer.$cursorLayer.drawCursor=null,b.renderer.setStyle("normal-mode",!1),b.textInput.setCommandMode(!1),b.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(b){var E=b.state.cm,k=pi(E);if(k.insertMode)return"INSERT";var P="";return k.visualMode&&(P+="VISUAL",k.visualLine&&(P+=" LINE"),k.visualBlock&&(P+=" BLOCK")),k.status&&(P+=(P?" ":"")+k.status),P}},_t.defineOption({name:"wrap",set:function(b,E){E&&E.ace.setOption("wrap",b)},type:"boolean"},!1),_t.defineEx("write","w",function(){console.log(":write is not implemented")}),jn.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"}}),jn.push({keys:"gq",type:"operator",operator:"hardWrap"}),_t.defineOperator("hardWrap",function(b,E,k,P,B){var W=k[0].anchor.line,q=k[0].head.line;return E.linewise&&q--,$o(b.ace,{startRow:W,endRow:q}),De(q,0)}),R("textwidth",void 0,"number",["tw"],function(b,E){if(E!==void 0){if(b===void 0){var k=E.ace.getOption("printMarginColumn");return k}var P=Math.round(b);P>1&&E.ace.setOption("printMarginColumn",P)}}),Yn.aceCommand=function(b,E,k){b.vimCmd=E,b.ace.inVirtualSelectionMode?b.ace.on("beforeEndOperation",lo):lo(null,b.ace)},Yn.fold=function(b,E,k){b.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(E.all?2:0)+(E.open?1:0)])},Bo=jn.length,r.handler.defaultKeymap=jn,r.handler.actions=Yn,r.Vim=_t}),(function(){ace.require(["ace/keyboard/vim"],function(e){n&&(n.exports=e)})})()})(Qm)),Qm.exports}_S();var tv={},nv;function kS(){return nv||(nv=1,(function(n){(function(){var t={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(v){return d(f(v),arguments)}function r(v,o){return e.apply(null,[v].concat(o||[]))}function d(v,o){var p=1,i=v.length,a,u="",g,s,c,m,w,x,R,S;for(g=0;g<i;g++)if(typeof v[g]=="string")u+=v[g];else if(typeof v[g]=="object"){if(c=v[g],c.keys)for(a=o[p],s=0;s<c.keys.length;s++){if(a==null)throw new Error(e('[sprintf] Cannot access property "%s" of undefined value "%s"',c.keys[s],c.keys[s-1]));a=a[c.keys[s]]}else c.param_no?a=o[c.param_no]:a=o[p++];if(t.not_type.test(c.type)&&t.not_primitive.test(c.type)&&a instanceof Function&&(a=a()),t.numeric_arg.test(c.type)&&typeof a!="number"&&isNaN(a))throw new TypeError(e("[sprintf] expecting number but found %T",a));switch(t.number.test(c.type)&&(R=a>=0),c.type){case"b":a=parseInt(a,10).toString(2);break;case"c":a=String.fromCharCode(parseInt(a,10));break;case"d":case"i":a=parseInt(a,10);break;case"j":a=JSON.stringify(a,null,c.width?parseInt(c.width):0);break;case"e":a=c.precision?parseFloat(a).toExponential(c.precision):parseFloat(a).toExponential();break;case"f":a=c.precision?parseFloat(a).toFixed(c.precision):parseFloat(a);break;case"g":a=c.precision?String(Number(a.toPrecision(c.precision))):parseFloat(a);break;case"o":a=(parseInt(a,10)>>>0).toString(8);break;case"s":a=String(a),a=c.precision?a.substring(0,c.precision):a;break;case"t":a=String(!!a),a=c.precision?a.substring(0,c.precision):a;break;case"T":a=Object.prototype.toString.call(a).slice(8,-1).toLowerCase(),a=c.precision?a.substring(0,c.precision):a;break;case"u":a=parseInt(a,10)>>>0;break;case"v":a=a.valueOf(),a=c.precision?a.substring(0,c.precision):a;break;case"x":a=(parseInt(a,10)>>>0).toString(16);break;case"X":a=(parseInt(a,10)>>>0).toString(16).toUpperCase();break}t.json.test(c.type)?u+=a:(t.number.test(c.type)&&(!R||c.sign)?(S=R?"+":"-",a=a.toString().replace(t.sign,"")):S="",w=c.pad_char?c.pad_char==="0"?"0":c.pad_char.charAt(1):" ",x=c.width-(S+a).length,m=c.width&&x>0?w.repeat(x):"",u+=c.align?S+a+m:w==="0"?S+m+a:m+S+a)}return u}var h=Object.create(null);function f(v){if(h[v])return h[v];for(var o=v,p,i=[],a=0;o;){if((p=t.text.exec(o))!==null)i.push(p[0]);else if((p=t.modulo.exec(o))!==null)i.push("%");else if((p=t.placeholder.exec(o))!==null){if(p[2]){a|=1;var u=[],g=p[2],s=[];if((s=t.key.exec(g))!==null)for(u.push(s[1]);(g=g.substring(s[0].length))!=="";)if((s=t.key_access.exec(g))!==null)u.push(s[1]);else if((s=t.index_access.exec(g))!==null)u.push(s[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");p[2]=u}else a|=2;if(a===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:p[0],param_no:p[1],keys:p[2],sign:p[3],pad_char:p[4],align:p[5],width:p[6],precision:p[7],type:p[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");o=o.substring(p[0].length)}return h[v]=i}n.sprintf=e,n.vsprintf=r,typeof window<"u"&&(window.sprintf=e,window.vsprintf=r)})()})(tv)),tv}kS();var oc={exports:{}},SS=oc.exports,rv;function $S(){return rv||(rv=1,(function(n,t){(function(){var e,r="4.18.1",d=200,h="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",f="Expected a function",v="Invalid `variable` option passed into `_.template`",o="Invalid `imports` option passed into `_.template`",p="__lodash_hash_undefined__",i=500,a="__lodash_placeholder__",u=1,g=2,s=4,c=1,m=2,w=1,x=2,R=4,S=8,A=16,C=32,O=64,N=128,M=256,L=512,j=30,F="...",D=800,$=16,_=1,I=2,z=3,U=1/0,V=9007199254740991,K=17976931348623157e292,Z=NaN,oe=4294967295,ee=oe-1,re=oe>>>1,ce=[["ary",N],["bind",w],["bindKey",x],["curry",S],["curryRight",A],["flip",L],["partial",C],["partialRight",O],["rearg",M]],ie="[object Arguments]",fe="[object Array]",pe="[object AsyncFunction]",$e="[object Boolean]",Re="[object Date]",Ge="[object DOMException]",qe="[object Error]",ct="[object Function]",ot="[object GeneratorFunction]",dt="[object Map]",Lt="[object Number]",gr="[object Null]",$t="[object Object]",xr="[object Promise]",Bn="[object Proxy]",er="[object RegExp]",pn="[object Set]",tr="[object String]",yt="[object Symbol]",Qe="[object Undefined]",jt="[object WeakMap]",En="[object WeakSet]",Rn="[object ArrayBuffer]",Tn="[object DataView]",xn="[object Float32Array]",Cn="[object Float64Array]",Vn="[object Int8Array]",nr="[object Int16Array]",Qt="[object Int32Array]",Gn="[object Uint8Array]",ci="[object Uint8ClampedArray]",Fr="[object Uint16Array]",On="[object Uint32Array]",Cr=/\b__p \+= '';/g,Ai=/\b(__p \+=) '' \+/g,lr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,oo=/&(?:amp|lt|gt|quot|#39);/g,_i=/[&<>"']/g,No=RegExp(oo.source),ei=RegExp(_i.source),so=/<%-([\s\S]+?)%>/g,ts=/<%([\s\S]+?)%>/g,Do=/<%=([\s\S]+?)%>/g,en=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vn=/^\w*$/,zr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Br=/[\\^$.*+?()[\]{}|]/g,In=RegExp(Br.source),rr=/^\s+/,ki=/\s/,Si=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ti=/\{\n\/\* \[wrapped with (.+)\] \*/,ui=/,? & /,ns=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Po=/[()=,{}\[\]\/\s]/,hi=/\\(\\)?/g,Er=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Tt=/\w*$/,ao=/^[-+]0x[0-9a-f]+$/i,_n=/^0b[01]+$/i,Nn=/^\[object .+?Constructor\]$/,gn=/^0o[0-7]+$/i,Dn=/^(?:0|[1-9]\d*)$/,zi=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,qn=/($^)/,di=/['\n\r\u2028\u2029\\]/g,Ar="\\ud800-\\udfff",le="\\u0300-\\u036f",Ne="\\ufe20-\\ufe2f",Be="\\u20d0-\\u20ff",bt=le+Ne+Be,Pt="\\u2700-\\u27bf",Mt="a-z\\xdf-\\xf6\\xf8-\\xff",_r="\\xac\\xb1\\xd7\\xf7",kr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",mr="\\u2000-\\u206f",fi=" \\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",Gt="A-Z\\xc0-\\xd6\\xd8-\\xde",Co="\\ufe0e\\ufe0f",Ao=_r+kr+mr+fi,_o="['’]",zs="["+Ar+"]",rs="["+Ao+"]",Fo="["+bt+"]",Bs="\\d+",js="["+Pt+"]",is="["+Mt+"]",Ia="[^"+Ar+Ao+Bs+Pt+Mt+Gt+"]",ko="\\ud83c[\\udffb-\\udfff]",os="(?:"+Fo+"|"+ko+")",lo="[^"+Ar+"]",vr="(?:\\ud83c[\\udde6-\\uddff]){2}",Ws="[\\ud800-\\udbff][\\udc00-\\udfff]",ni="["+Gt+"]",La="\\u200d",Ma="(?:"+is+"|"+Ia+")",ss="(?:"+ni+"|"+Ia+")",co="(?:"+_o+"(?:d|ll|m|re|s|t|ve))?",zo="(?:"+_o+"(?:D|LL|M|RE|S|T|VE))?",as=os+"?",So="["+Co+"]?",Oa="(?:"+La+"(?:"+[lo,vr,Ws].join("|")+")"+So+as+")*",$o="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",je="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Hs=So+as+Oa,De="(?:"+[js,vr,Ws].join("|")+")"+Hs,jn="(?:"+[lo+Fo+"?",Fo,vr,Ws,zs].join("|")+")",Bo=RegExp(_o,"g"),uo=RegExp(Fo,"g"),Wn=RegExp(ko+"(?="+ko+")|"+jn+Hs,"g"),Na=RegExp([ni+"?"+is+"+"+co+"(?="+[rs,ni,"$"].join("|")+")",ss+"+"+zo+"(?="+[rs,ni+Ma,"$"].join("|")+")",ni+"?"+Ma+"+"+co,ni+"+"+zo,je,$o,Bs,De].join("|"),"g"),jo=RegExp("["+La+Ar+bt+Co+"]"),Bi=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Eo=["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"],Us=-1,an={};an[xn]=an[Cn]=an[Vn]=an[nr]=an[Qt]=an[Gn]=an[ci]=an[Fr]=an[On]=!0,an[ie]=an[fe]=an[Rn]=an[$e]=an[Tn]=an[Re]=an[qe]=an[ct]=an[dt]=an[Lt]=an[$t]=an[er]=an[pn]=an[tr]=an[jt]=!1;var ft={};ft[ie]=ft[fe]=ft[Rn]=ft[Tn]=ft[$e]=ft[Re]=ft[xn]=ft[Cn]=ft[Vn]=ft[nr]=ft[Qt]=ft[dt]=ft[Lt]=ft[$t]=ft[er]=ft[pn]=ft[tr]=ft[yt]=ft[Gn]=ft[ci]=ft[Fr]=ft[On]=!0,ft[qe]=ft[ct]=ft[jt]=!1;var Yt={À:"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"},ji={"&":"&","<":"<",">":">",'"':""","'":"'"},Kn={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ve={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},kn=parseFloat,_t=parseInt,jr=typeof Zo=="object"&&Zo&&Zo.Object===Object&&Zo,Wi=typeof self=="object"&&self&&self.Object===Object&&self,Wt=jr||Wi||Function("return this")(),Wr=t&&!t.nodeType&&t,cr=Wr&&!0&&n&&!n.nodeType&&n,ho=cr&&cr.exports===Wr,$i=ho&&jr.process,Pn=(function(){try{var ve=cr&&cr.require&&cr.require("util").types;return ve||$i&&$i.binding&&$i.binding("util")}catch{}})(),ls=Pn&&Pn.isArrayBuffer,Yn=Pn&&Pn.isDate,Ei=Pn&&Pn.isMap,Ri=Pn&&Pn.isRegExp,Hi=Pn&&Pn.isSet,Vs=Pn&&Pn.isTypedArray;function cn(ve,Ee,Se){switch(Se.length){case 0:return ve.call(Ee);case 1:return ve.call(Ee,Se[0]);case 2:return ve.call(Ee,Se[0],Se[1]);case 3:return ve.call(Ee,Se[0],Se[1],Se[2])}return ve.apply(Ee,Se)}function Da(ve,Ee,Se,Ye){for(var gt=-1,Rt=ve==null?0:ve.length;++gt<Rt;){var rn=ve[gt];Ee(Ye,rn,Se(rn),ve)}return Ye}function yr(ve,Ee){for(var Se=-1,Ye=ve==null?0:ve.length;++Se<Ye&&Ee(ve[Se],Se,ve)!==!1;);return ve}function Hr(ve,Ee){for(var Se=ve==null?0:ve.length;Se--&&Ee(ve[Se],Se,ve)!==!1;);return ve}function Ro(ve,Ee){for(var Se=-1,Ye=ve==null?0:ve.length;++Se<Ye;)if(!Ee(ve[Se],Se,ve))return!1;return!0}function Rr(ve,Ee){for(var Se=-1,Ye=ve==null?0:ve.length,gt=0,Rt=[];++Se<Ye;){var rn=ve[Se];Ee(rn,Se,ve)&&(Rt[gt++]=rn)}return Rt}function pi(ve,Ee){var Se=ve==null?0:ve.length;return!!Se&&be(ve,Ee,0)>-1}function b(ve,Ee,Se){for(var Ye=-1,gt=ve==null?0:ve.length;++Ye<gt;)if(Se(Ee,ve[Ye]))return!0;return!1}function E(ve,Ee){for(var Se=-1,Ye=ve==null?0:ve.length,gt=Array(Ye);++Se<Ye;)gt[Se]=Ee(ve[Se],Se,ve);return gt}function k(ve,Ee){for(var Se=-1,Ye=Ee.length,gt=ve.length;++Se<Ye;)ve[gt+Se]=Ee[Se];return ve}function P(ve,Ee,Se,Ye){var gt=-1,Rt=ve==null?0:ve.length;for(Ye&&Rt&&(Se=ve[++gt]);++gt<Rt;)Se=Ee(Se,ve[gt],gt,ve);return Se}function B(ve,Ee,Se,Ye){var gt=ve==null?0:ve.length;for(Ye&>&&(Se=ve[--gt]);gt--;)Se=Ee(Se,ve[gt],gt,ve);return Se}function W(ve,Ee){for(var Se=-1,Ye=ve==null?0:ve.length;++Se<Ye;)if(Ee(ve[Se],Se,ve))return!0;return!1}var q=Oe("length");function X(ve){return ve.split("")}function Q(ve){return ve.match(ns)||[]}function se(ve,Ee,Se){var Ye;return Se(ve,function(gt,Rt,rn){if(Ee(gt,Rt,rn))return Ye=Rt,!1}),Ye}function he(ve,Ee,Se,Ye){for(var gt=ve.length,Rt=Se+(Ye?1:-1);Ye?Rt--:++Rt<gt;)if(Ee(ve[Rt],Rt,ve))return Rt;return-1}function be(ve,Ee,Se){return Ee===Ee?kt(ve,Ee,Se):he(ve,ye,Se)}function ke(ve,Ee,Se,Ye){for(var gt=Se-1,Rt=ve.length;++gt<Rt;)if(Ye(ve[gt],Ee))return gt;return-1}function ye(ve){return ve!==ve}function Ae(ve,Ee){var Se=ve==null?0:ve.length;return Se?nt(ve,Ee)/Se:Z}function Oe(ve){return function(Ee){return Ee==null?e:Ee[ve]}}function Le(ve){return function(Ee){return ve==null?e:ve[Ee]}}function Xe(ve,Ee,Se,Ye,gt){return gt(ve,function(Rt,rn,Ut){Se=Ye?(Ye=!1,Rt):Ee(Se,Rt,rn,Ut)}),Se}function pt(ve,Ee){var Se=ve.length;for(ve.sort(Ee);Se--;)ve[Se]=ve[Se].value;return ve}function nt(ve,Ee){for(var Se,Ye=-1,gt=ve.length;++Ye<gt;){var Rt=Ee(ve[Ye]);Rt!==e&&(Se=Se===e?Rt:Se+Rt)}return Se}function st(ve,Ee){for(var Se=-1,Ye=Array(ve);++Se<ve;)Ye[Se]=Ee(Se);return Ye}function Ln(ve,Ee){return E(Ee,function(Se){return[Se,ve[Se]]})}function St(ve){return ve&&ve.slice(0,mt(ve)+1).replace(rr,"")}function Zt(ve){return function(Ee){return ve(Ee)}}function Ot(ve,Ee){return E(Ee,function(Se){return ve[Se]})}function Et(ve,Ee){return ve.has(Ee)}function ur(ve,Ee){for(var Se=-1,Ye=ve.length;++Se<Ye&&be(Ee,ve[Se],0)>-1;);return Se}function br(ve,Ee){for(var Se=ve.length;Se--&&be(Ee,ve[Se],0)>-1;);return Se}function Fn(ve,Ee){for(var Se=ve.length,Ye=0;Se--;)ve[Se]===Ee&&++Ye;return Ye}var G=Le(Yt),J=Le(ji);function ae(ve){return"\\"+Ve[ve]}function ue(ve,Ee){return ve==null?e:ve[Ee]}function me(ve){return jo.test(ve)}function _e(ve){return Bi.test(ve)}function Te(ve){for(var Ee,Se=[];!(Ee=ve.next()).done;)Se.push(Ee.value);return Se}function Fe(ve){var Ee=-1,Se=Array(ve.size);return ve.forEach(function(Ye,gt){Se[++Ee]=[gt,Ye]}),Se}function He(ve,Ee){return function(Se){return ve(Ee(Se))}}function Ke(ve,Ee){for(var Se=-1,Ye=ve.length,gt=0,Rt=[];++Se<Ye;){var rn=ve[Se];(rn===Ee||rn===a)&&(ve[Se]=a,Rt[gt++]=Se)}return Rt}function Je(ve){var Ee=-1,Se=Array(ve.size);return ve.forEach(function(Ye){Se[++Ee]=Ye}),Se}function it(ve){var Ee=-1,Se=Array(ve.size);return ve.forEach(function(Ye){Se[++Ee]=[Ye,Ye]}),Se}function kt(ve,Ee,Se){for(var Ye=Se-1,gt=ve.length;++Ye<gt;)if(ve[Ye]===Ee)return Ye;return-1}function tn(ve,Ee,Se){for(var Ye=Se+1;Ye--;)if(ve[Ye]===Ee)return Ye;return Ye}function Ht(ve){return me(ve)?An(ve):q(ve)}function Ct(ve){return me(ve)?zn(ve):X(ve)}function mt(ve){for(var Ee=ve.length;Ee--&&ki.test(ve.charAt(Ee)););return Ee}var ht=Le(Kn);function An(ve){for(var Ee=Wn.lastIndex=0;Wn.test(ve);)++Ee;return Ee}function zn(ve){return ve.match(Wn)||[]}function hr(ve){return ve.match(Na)||[]}var un=(function ve(Ee){Ee=Ee==null?Wt:mn.defaults(Wt.Object(),Ee,mn.pick(Wt,Eo));var Se=Ee.Array,Ye=Ee.Date,gt=Ee.Error,Rt=Ee.Function,rn=Ee.Math,Ut=Ee.Object,gi=Ee.RegExp,Tr=Ee.String,Sn=Ee.TypeError,Ui=Se.prototype,Ir=Rt.prototype,Wo=Ut.prototype,Xc=Ee["__core-js_shared__"],Jc=Ir.toString,hn=Wo.hasOwnProperty,FO=0,t1=(function(){var l=/[^.]+$/.exec(Xc&&Xc.keys&&Xc.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),Zc=Wo.toString,zO=Jc.call(Ut),BO=Wt._,jO=gi("^"+Jc.call(hn).replace(Br,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Qc=ho?Ee.Buffer:e,cs=Ee.Symbol,eu=Ee.Uint8Array,n1=Qc?Qc.allocUnsafe:e,tu=He(Ut.getPrototypeOf,Ut),r1=Ut.create,i1=Wo.propertyIsEnumerable,nu=Ui.splice,o1=cs?cs.isConcatSpreadable:e,Sl=cs?cs.iterator:e,Gs=cs?cs.toStringTag:e,ru=(function(){try{var l=Js(Ut,"defineProperty");return l({},"",{}),l}catch{}})(),WO=Ee.clearTimeout!==Wt.clearTimeout&&Ee.clearTimeout,HO=Ye&&Ye.now!==Wt.Date.now&&Ye.now,UO=Ee.setTimeout!==Wt.setTimeout&&Ee.setTimeout,iu=rn.ceil,ou=rn.floor,np=Ut.getOwnPropertySymbols,VO=Qc?Qc.isBuffer:e,s1=Ee.isFinite,GO=Ui.join,qO=He(Ut.keys,Ut),wr=rn.max,Ur=rn.min,KO=Ye.now,YO=Ee.parseInt,a1=rn.random,XO=Ui.reverse,rp=Js(Ee,"DataView"),$l=Js(Ee,"Map"),ip=Js(Ee,"Promise"),Pa=Js(Ee,"Set"),El=Js(Ee,"WeakMap"),Rl=Js(Ut,"create"),su=El&&new El,Fa={},JO=Zs(rp),ZO=Zs($l),QO=Zs(ip),eN=Zs(Pa),tN=Zs(El),au=cs?cs.prototype:e,Tl=au?au.valueOf:e,l1=au?au.toString:e;function te(l){if(Xn(l)&&!It(l)&&!(l instanceof Xt)){if(l instanceof Vi)return l;if(hn.call(l,"__wrapped__"))return cx(l)}return new Vi(l)}var za=(function(){function l(){}return function(y){if(!Hn(y))return{};if(r1)return r1(y);l.prototype=y;var T=new l;return l.prototype=e,T}})();function lu(){}function Vi(l,y){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!y,this.__index__=0,this.__values__=e}te.templateSettings={escape:so,evaluate:ts,interpolate:Do,variable:"",imports:{_:te}},te.prototype=lu.prototype,te.prototype.constructor=te,Vi.prototype=za(lu.prototype),Vi.prototype.constructor=Vi;function Xt(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=oe,this.__views__=[]}function nN(){var l=new Xt(this.__wrapped__);return l.__actions__=mi(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=mi(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=mi(this.__views__),l}function rN(){if(this.__filtered__){var l=new Xt(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function iN(){var l=this.__wrapped__.value(),y=this.__dir__,T=It(l),H=y<0,Y=T?l.length:0,ne=m2(0,Y,this.__views__),de=ne.start,ge=ne.end,we=ge-de,Ie=H?ge:de-1,Me=this.__iteratees__,Pe=Me.length,Ze=0,ut=Ur(we,this.__takeCount__);if(!T||!H&&Y==we&&ut==we)return L1(l,this.__actions__);var xt=[];e:for(;we--&&Ze<ut;){Ie+=y;for(var zt=-1,vt=l[Ie];++zt<Pe;){var qt=Me[zt],Jt=qt.iteratee,Li=qt.type,oi=Jt(vt);if(Li==I)vt=oi;else if(!oi){if(Li==_)continue e;break e}}xt[Ze++]=vt}return xt}Xt.prototype=za(lu.prototype),Xt.prototype.constructor=Xt;function qs(l){var y=-1,T=l==null?0:l.length;for(this.clear();++y<T;){var H=l[y];this.set(H[0],H[1])}}function oN(){this.__data__=Rl?Rl(null):{},this.size=0}function sN(l){var y=this.has(l)&&delete this.__data__[l];return this.size-=y?1:0,y}function aN(l){var y=this.__data__;if(Rl){var T=y[l];return T===p?e:T}return hn.call(y,l)?y[l]:e}function lN(l){var y=this.__data__;return Rl?y[l]!==e:hn.call(y,l)}function cN(l,y){var T=this.__data__;return this.size+=this.has(l)?0:1,T[l]=Rl&&y===e?p:y,this}qs.prototype.clear=oN,qs.prototype.delete=sN,qs.prototype.get=aN,qs.prototype.has=lN,qs.prototype.set=cN;function Ho(l){var y=-1,T=l==null?0:l.length;for(this.clear();++y<T;){var H=l[y];this.set(H[0],H[1])}}function uN(){this.__data__=[],this.size=0}function hN(l){var y=this.__data__,T=cu(y,l);if(T<0)return!1;var H=y.length-1;return T==H?y.pop():nu.call(y,T,1),--this.size,!0}function dN(l){var y=this.__data__,T=cu(y,l);return T<0?e:y[T][1]}function fN(l){return cu(this.__data__,l)>-1}function pN(l,y){var T=this.__data__,H=cu(T,l);return H<0?(++this.size,T.push([l,y])):T[H][1]=y,this}Ho.prototype.clear=uN,Ho.prototype.delete=hN,Ho.prototype.get=dN,Ho.prototype.has=fN,Ho.prototype.set=pN;function Uo(l){var y=-1,T=l==null?0:l.length;for(this.clear();++y<T;){var H=l[y];this.set(H[0],H[1])}}function gN(){this.size=0,this.__data__={hash:new qs,map:new($l||Ho),string:new qs}}function mN(l){var y=xu(this,l).delete(l);return this.size-=y?1:0,y}function vN(l){return xu(this,l).get(l)}function yN(l){return xu(this,l).has(l)}function bN(l,y){var T=xu(this,l),H=T.size;return T.set(l,y),this.size+=T.size==H?0:1,this}Uo.prototype.clear=gN,Uo.prototype.delete=mN,Uo.prototype.get=vN,Uo.prototype.has=yN,Uo.prototype.set=bN;function Ks(l){var y=-1,T=l==null?0:l.length;for(this.__data__=new Uo;++y<T;)this.add(l[y])}function wN(l){return this.__data__.set(l,p),this}function xN(l){return this.__data__.has(l)}Ks.prototype.add=Ks.prototype.push=wN,Ks.prototype.has=xN;function fo(l){var y=this.__data__=new Ho(l);this.size=y.size}function CN(){this.__data__=new Ho,this.size=0}function AN(l){var y=this.__data__,T=y.delete(l);return this.size=y.size,T}function _N(l){return this.__data__.get(l)}function kN(l){return this.__data__.has(l)}function SN(l,y){var T=this.__data__;if(T instanceof Ho){var H=T.__data__;if(!$l||H.length<d-1)return H.push([l,y]),this.size=++T.size,this;T=this.__data__=new Uo(H)}return T.set(l,y),this.size=T.size,this}fo.prototype.clear=CN,fo.prototype.delete=AN,fo.prototype.get=_N,fo.prototype.has=kN,fo.prototype.set=SN;function c1(l,y){var T=It(l),H=!T&&Qs(l),Y=!T&&!H&&ps(l),ne=!T&&!H&&!Y&&Ha(l),de=T||H||Y||ne,ge=de?st(l.length,Tr):[],we=ge.length;for(var Ie in l)(y||hn.call(l,Ie))&&!(de&&(Ie=="length"||Y&&(Ie=="offset"||Ie=="parent")||ne&&(Ie=="buffer"||Ie=="byteLength"||Ie=="byteOffset")||qo(Ie,we)))&&ge.push(Ie);return ge}function u1(l){var y=l.length;return y?l[gp(0,y-1)]:e}function $N(l,y){return Cu(mi(l),Ys(y,0,l.length))}function EN(l){return Cu(mi(l))}function op(l,y,T){(T!==e&&!go(l[y],T)||T===e&&!(y in l))&&To(l,y,T)}function Il(l,y,T){var H=l[y];(!(hn.call(l,y)&&go(H,T))||T===e&&!(y in l))&&To(l,y,T)}function cu(l,y){for(var T=l.length;T--;)if(go(l[T][0],y))return T;return-1}function RN(l,y,T,H){return us(l,function(Y,ne,de){y(H,Y,T(Y),de)}),H}function h1(l,y){return l&&Lo(y,Sr(y),l)}function TN(l,y){return l&&Lo(y,yi(y),l)}function To(l,y,T){y=="__proto__"&&ru?ru(l,y,{configurable:!0,enumerable:!0,value:T,writable:!0}):l[y]=T}function sp(l,y){for(var T=-1,H=y.length,Y=Se(H),ne=l==null;++T<H;)Y[T]=ne?e:jp(l,y[T]);return Y}function Ys(l,y,T){return l===l&&(T!==e&&(l=l<=T?l:T),y!==e&&(l=l>=y?l:y)),l}function Gi(l,y,T,H,Y,ne){var de,ge=y&u,we=y&g,Ie=y&s;if(T&&(de=Y?T(l,H,Y,ne):T(l)),de!==e)return de;if(!Hn(l))return l;var Me=It(l);if(Me){if(de=y2(l),!ge)return mi(l,de)}else{var Pe=Vr(l),Ze=Pe==ct||Pe==ot;if(ps(l))return N1(l,ge);if(Pe==$t||Pe==ie||Ze&&!Y){if(de=we||Ze?{}:ex(l),!ge)return we?a2(l,TN(de,l)):s2(l,h1(de,l))}else{if(!ft[Pe])return Y?l:{};de=b2(l,Pe,ge)}}ne||(ne=new fo);var ut=ne.get(l);if(ut)return ut;ne.set(l,de),Rx(l)?l.forEach(function(vt){de.add(Gi(vt,y,T,vt,l,ne))}):$x(l)&&l.forEach(function(vt,qt){de.set(qt,Gi(vt,y,T,qt,l,ne))});var xt=Ie?we?Sp:kp:we?yi:Sr,zt=Me?e:xt(l);return yr(zt||l,function(vt,qt){zt&&(qt=vt,vt=l[qt]),Il(de,qt,Gi(vt,y,T,qt,l,ne))}),de}function IN(l){var y=Sr(l);return function(T){return d1(T,l,y)}}function d1(l,y,T){var H=T.length;if(l==null)return!H;for(l=Ut(l);H--;){var Y=T[H],ne=y[Y],de=l[Y];if(de===e&&!(Y in l)||!ne(de))return!1}return!0}function f1(l,y,T){if(typeof l!="function")throw new Sn(f);return Fl(function(){l.apply(e,T)},y)}function Ll(l,y,T,H){var Y=-1,ne=pi,de=!0,ge=l.length,we=[],Ie=y.length;if(!ge)return we;T&&(y=E(y,Zt(T))),H?(ne=b,de=!1):y.length>=d&&(ne=Et,de=!1,y=new Ks(y));e:for(;++Y<ge;){var Me=l[Y],Pe=T==null?Me:T(Me);if(Me=H||Me!==0?Me:0,de&&Pe===Pe){for(var Ze=Ie;Ze--;)if(y[Ze]===Pe)continue e;we.push(Me)}else ne(y,Pe,H)||we.push(Me)}return we}var us=B1(Io),p1=B1(lp,!0);function LN(l,y){var T=!0;return us(l,function(H,Y,ne){return T=!!y(H,Y,ne),T}),T}function uu(l,y,T){for(var H=-1,Y=l.length;++H<Y;){var ne=l[H],de=y(ne);if(de!=null&&(ge===e?de===de&&!Ii(de):T(de,ge)))var ge=de,we=ne}return we}function MN(l,y,T,H){var Y=l.length;for(T=Ft(T),T<0&&(T=-T>Y?0:Y+T),H=H===e||H>Y?Y:Ft(H),H<0&&(H+=Y),H=T>H?0:Ix(H);T<H;)l[T++]=y;return l}function g1(l,y){var T=[];return us(l,function(H,Y,ne){y(H,Y,ne)&&T.push(H)}),T}function Lr(l,y,T,H,Y){var ne=-1,de=l.length;for(T||(T=x2),Y||(Y=[]);++ne<de;){var ge=l[ne];y>0&&T(ge)?y>1?Lr(ge,y-1,T,H,Y):k(Y,ge):H||(Y[Y.length]=ge)}return Y}var ap=j1(),m1=j1(!0);function Io(l,y){return l&&ap(l,y,Sr)}function lp(l,y){return l&&m1(l,y,Sr)}function hu(l,y){return Rr(y,function(T){return Ko(l[T])})}function Xs(l,y){y=ds(y,l);for(var T=0,H=y.length;l!=null&&T<H;)l=l[po(y[T++])];return T&&T==H?l:e}function v1(l,y,T){var H=y(l);return It(l)?H:k(H,T(l))}function ri(l){return l==null?l===e?Qe:gr:Gs&&Gs in Ut(l)?g2(l):E2(l)}function cp(l,y){return l>y}function ON(l,y){return l!=null&&hn.call(l,y)}function NN(l,y){return l!=null&&y in Ut(l)}function DN(l,y,T){return l>=Ur(y,T)&&l<wr(y,T)}function up(l,y,T){for(var H=T?b:pi,Y=l[0].length,ne=l.length,de=ne,ge=Se(ne),we=1/0,Ie=[];de--;){var Me=l[de];de&&y&&(Me=E(Me,Zt(y))),we=Ur(Me.length,we),ge[de]=!T&&(y||Y>=120&&Me.length>=120)?new Ks(de&&Me):e}Me=l[0];var Pe=-1,Ze=ge[0];e:for(;++Pe<Y&&Ie.length<we;){var ut=Me[Pe],xt=y?y(ut):ut;if(ut=T||ut!==0?ut:0,!(Ze?Et(Ze,xt):H(Ie,xt,T))){for(de=ne;--de;){var zt=ge[de];if(!(zt?Et(zt,xt):H(l[de],xt,T)))continue e}Ze&&Ze.push(xt),Ie.push(ut)}}return Ie}function PN(l,y,T,H){return Io(l,function(Y,ne,de){y(H,T(Y),ne,de)}),H}function Ml(l,y,T){y=ds(y,l),l=ix(l,y);var H=l==null?l:l[po(Ki(y))];return H==null?e:cn(H,l,T)}function y1(l){return Xn(l)&&ri(l)==ie}function FN(l){return Xn(l)&&ri(l)==Rn}function zN(l){return Xn(l)&&ri(l)==Re}function Ol(l,y,T,H,Y){return l===y?!0:l==null||y==null||!Xn(l)&&!Xn(y)?l!==l&&y!==y:BN(l,y,T,H,Ol,Y)}function BN(l,y,T,H,Y,ne){var de=It(l),ge=It(y),we=de?fe:Vr(l),Ie=ge?fe:Vr(y);we=we==ie?$t:we,Ie=Ie==ie?$t:Ie;var Me=we==$t,Pe=Ie==$t,Ze=we==Ie;if(Ze&&ps(l)){if(!ps(y))return!1;de=!0,Me=!1}if(Ze&&!Me)return ne||(ne=new fo),de||Ha(l)?J1(l,y,T,H,Y,ne):f2(l,y,we,T,H,Y,ne);if(!(T&c)){var ut=Me&&hn.call(l,"__wrapped__"),xt=Pe&&hn.call(y,"__wrapped__");if(ut||xt){var zt=ut?l.value():l,vt=xt?y.value():y;return ne||(ne=new fo),Y(zt,vt,T,H,ne)}}return Ze?(ne||(ne=new fo),p2(l,y,T,H,Y,ne)):!1}function jN(l){return Xn(l)&&Vr(l)==dt}function hp(l,y,T,H){var Y=T.length,ne=Y,de=!H;if(l==null)return!ne;for(l=Ut(l);Y--;){var ge=T[Y];if(de&&ge[2]?ge[1]!==l[ge[0]]:!(ge[0]in l))return!1}for(;++Y<ne;){ge=T[Y];var we=ge[0],Ie=l[we],Me=ge[1];if(de&&ge[2]){if(Ie===e&&!(we in l))return!1}else{var Pe=new fo;if(H)var Ze=H(Ie,Me,we,l,y,Pe);if(!(Ze===e?Ol(Me,Ie,c|m,H,Pe):Ze))return!1}}return!0}function b1(l){if(!Hn(l)||A2(l))return!1;var y=Ko(l)?jO:Nn;return y.test(Zs(l))}function WN(l){return Xn(l)&&ri(l)==er}function HN(l){return Xn(l)&&Vr(l)==pn}function UN(l){return Xn(l)&&Eu(l.length)&&!!an[ri(l)]}function w1(l){return typeof l=="function"?l:l==null?bi:typeof l=="object"?It(l)?A1(l[0],l[1]):C1(l):Hx(l)}function dp(l){if(!Pl(l))return qO(l);var y=[];for(var T in Ut(l))hn.call(l,T)&&T!="constructor"&&y.push(T);return y}function VN(l){if(!Hn(l))return $2(l);var y=Pl(l),T=[];for(var H in l)H=="constructor"&&(y||!hn.call(l,H))||T.push(H);return T}function fp(l,y){return l<y}function x1(l,y){var T=-1,H=vi(l)?Se(l.length):[];return us(l,function(Y,ne,de){H[++T]=y(Y,ne,de)}),H}function C1(l){var y=Ep(l);return y.length==1&&y[0][2]?nx(y[0][0],y[0][1]):function(T){return T===l||hp(T,l,y)}}function A1(l,y){return Tp(l)&&tx(y)?nx(po(l),y):function(T){var H=jp(T,l);return H===e&&H===y?Wp(T,l):Ol(y,H,c|m)}}function du(l,y,T,H,Y){l!==y&&ap(y,function(ne,de){if(Y||(Y=new fo),Hn(ne))GN(l,y,de,T,du,H,Y);else{var ge=H?H(Lp(l,de),ne,de+"",l,y,Y):e;ge===e&&(ge=ne),op(l,de,ge)}},yi)}function GN(l,y,T,H,Y,ne,de){var ge=Lp(l,T),we=Lp(y,T),Ie=de.get(we);if(Ie){op(l,T,Ie);return}var Me=ne?ne(ge,we,T+"",l,y,de):e,Pe=Me===e;if(Pe){var Ze=It(we),ut=!Ze&&ps(we),xt=!Ze&&!ut&&Ha(we);Me=we,Ze||ut||xt?It(ge)?Me=ge:ir(ge)?Me=mi(ge):ut?(Pe=!1,Me=N1(we,!0)):xt?(Pe=!1,Me=D1(we,!0)):Me=[]:zl(we)||Qs(we)?(Me=ge,Qs(ge)?Me=Lx(ge):(!Hn(ge)||Ko(ge))&&(Me=ex(we))):Pe=!1}Pe&&(de.set(we,Me),Y(Me,we,H,ne,de),de.delete(we)),op(l,T,Me)}function _1(l,y){var T=l.length;if(T)return y+=y<0?T:0,qo(y,T)?l[y]:e}function k1(l,y,T){y.length?y=E(y,function(ne){return It(ne)?function(de){return Xs(de,ne.length===1?ne[0]:ne)}:ne}):y=[bi];var H=-1;y=E(y,Zt(wt()));var Y=x1(l,function(ne,de,ge){var we=E(y,function(Ie){return Ie(ne)});return{criteria:we,index:++H,value:ne}});return pt(Y,function(ne,de){return o2(ne,de,T)})}function qN(l,y){return S1(l,y,function(T,H){return Wp(l,H)})}function S1(l,y,T){for(var H=-1,Y=y.length,ne={};++H<Y;){var de=y[H],ge=Xs(l,de);T(ge,de)&&Nl(ne,ds(de,l),ge)}return ne}function KN(l){return function(y){return Xs(y,l)}}function pp(l,y,T,H){var Y=H?ke:be,ne=-1,de=y.length,ge=l;for(l===y&&(y=mi(y)),T&&(ge=E(l,Zt(T)));++ne<de;)for(var we=0,Ie=y[ne],Me=T?T(Ie):Ie;(we=Y(ge,Me,we,H))>-1;)ge!==l&&nu.call(ge,we,1),nu.call(l,we,1);return l}function $1(l,y){for(var T=l?y.length:0,H=T-1;T--;){var Y=y[T];if(T==H||Y!==ne){var ne=Y;qo(Y)?nu.call(l,Y,1):yp(l,Y)}}return l}function gp(l,y){return l+ou(a1()*(y-l+1))}function YN(l,y,T,H){for(var Y=-1,ne=wr(iu((y-l)/(T||1)),0),de=Se(ne);ne--;)de[H?ne:++Y]=l,l+=T;return de}function mp(l,y){var T="";if(!l||y<1||y>V)return T;do y%2&&(T+=l),y=ou(y/2),y&&(l+=l);while(y);return T}function Vt(l,y){return Mp(rx(l,y,bi),l+"")}function XN(l){return u1(Ua(l))}function JN(l,y){var T=Ua(l);return Cu(T,Ys(y,0,T.length))}function Nl(l,y,T,H){if(!Hn(l))return l;y=ds(y,l);for(var Y=-1,ne=y.length,de=ne-1,ge=l;ge!=null&&++Y<ne;){var we=po(y[Y]),Ie=T;if(we==="__proto__"||we==="constructor"||we==="prototype")return l;if(Y!=de){var Me=ge[we];Ie=H?H(Me,we,ge):e,Ie===e&&(Ie=Hn(Me)?Me:qo(y[Y+1])?[]:{})}Il(ge,we,Ie),ge=ge[we]}return l}var E1=su?function(l,y){return su.set(l,y),l}:bi,ZN=ru?function(l,y){return ru(l,"toString",{configurable:!0,enumerable:!1,value:Up(y),writable:!0})}:bi;function QN(l){return Cu(Ua(l))}function qi(l,y,T){var H=-1,Y=l.length;y<0&&(y=-y>Y?0:Y+y),T=T>Y?Y:T,T<0&&(T+=Y),Y=y>T?0:T-y>>>0,y>>>=0;for(var ne=Se(Y);++H<Y;)ne[H]=l[H+y];return ne}function e2(l,y){var T;return us(l,function(H,Y,ne){return T=y(H,Y,ne),!T}),!!T}function fu(l,y,T){var H=0,Y=l==null?H:l.length;if(typeof y=="number"&&y===y&&Y<=re){for(;H<Y;){var ne=H+Y>>>1,de=l[ne];de!==null&&!Ii(de)&&(T?de<=y:de<y)?H=ne+1:Y=ne}return Y}return vp(l,y,bi,T)}function vp(l,y,T,H){var Y=0,ne=l==null?0:l.length;if(ne===0)return 0;y=T(y);for(var de=y!==y,ge=y===null,we=Ii(y),Ie=y===e;Y<ne;){var Me=ou((Y+ne)/2),Pe=T(l[Me]),Ze=Pe!==e,ut=Pe===null,xt=Pe===Pe,zt=Ii(Pe);if(de)var vt=H||xt;else Ie?vt=xt&&(H||Ze):ge?vt=xt&&Ze&&(H||!ut):we?vt=xt&&Ze&&!ut&&(H||!zt):ut||zt?vt=!1:vt=H?Pe<=y:Pe<y;vt?Y=Me+1:ne=Me}return Ur(ne,ee)}function R1(l,y){for(var T=-1,H=l.length,Y=0,ne=[];++T<H;){var de=l[T],ge=y?y(de):de;if(!T||!go(ge,we)){var we=ge;ne[Y++]=de===0?0:de}}return ne}function T1(l){return typeof l=="number"?l:Ii(l)?Z:+l}function Ti(l){if(typeof l=="string")return l;if(It(l))return E(l,Ti)+"";if(Ii(l))return l1?l1.call(l):"";var y=l+"";return y=="0"&&1/l==-U?"-0":y}function hs(l,y,T){var H=-1,Y=pi,ne=l.length,de=!0,ge=[],we=ge;if(T)de=!1,Y=b;else if(ne>=d){var Ie=y?null:h2(l);if(Ie)return Je(Ie);de=!1,Y=Et,we=new Ks}else we=y?[]:ge;e:for(;++H<ne;){var Me=l[H],Pe=y?y(Me):Me;if(Me=T||Me!==0?Me:0,de&&Pe===Pe){for(var Ze=we.length;Ze--;)if(we[Ze]===Pe)continue e;y&&we.push(Pe),ge.push(Me)}else Y(we,Pe,T)||(we!==ge&&we.push(Pe),ge.push(Me))}return ge}function yp(l,y){y=ds(y,l);var T=-1,H=y.length;if(!H)return!0;for(;++T<H;){var Y=po(y[T]);if(Y==="__proto__"&&!hn.call(l,"__proto__")||(Y==="constructor"||Y==="prototype")&&T<H-1)return!1}var ne=ix(l,y);return ne==null||delete ne[po(Ki(y))]}function I1(l,y,T,H){return Nl(l,y,T(Xs(l,y)),H)}function pu(l,y,T,H){for(var Y=l.length,ne=H?Y:-1;(H?ne--:++ne<Y)&&y(l[ne],ne,l););return T?qi(l,H?0:ne,H?ne+1:Y):qi(l,H?ne+1:0,H?Y:ne)}function L1(l,y){var T=l;return T instanceof Xt&&(T=T.value()),P(y,function(H,Y){return Y.func.apply(Y.thisArg,k([H],Y.args))},T)}function bp(l,y,T){var H=l.length;if(H<2)return H?hs(l[0]):[];for(var Y=-1,ne=Se(H);++Y<H;)for(var de=l[Y],ge=-1;++ge<H;)ge!=Y&&(ne[Y]=Ll(ne[Y]||de,l[ge],y,T));return hs(Lr(ne,1),y,T)}function M1(l,y,T){for(var H=-1,Y=l.length,ne=y.length,de={};++H<Y;){var ge=H<ne?y[H]:e;T(de,l[H],ge)}return de}function wp(l){return ir(l)?l:[]}function xp(l){return typeof l=="function"?l:bi}function ds(l,y){return It(l)?l:Tp(l,y)?[l]:lx(dn(l))}var t2=Vt;function fs(l,y,T){var H=l.length;return T=T===e?H:T,!y&&T>=H?l:qi(l,y,T)}var O1=WO||function(l){return Wt.clearTimeout(l)};function N1(l,y){if(y)return l.slice();var T=l.length,H=n1?n1(T):new l.constructor(T);return l.copy(H),H}function Cp(l){var y=new l.constructor(l.byteLength);return new eu(y).set(new eu(l)),y}function n2(l,y){var T=y?Cp(l.buffer):l.buffer;return new l.constructor(T,l.byteOffset,l.byteLength)}function r2(l){var y=new l.constructor(l.source,Tt.exec(l));return y.lastIndex=l.lastIndex,y}function i2(l){return Tl?Ut(Tl.call(l)):{}}function D1(l,y){var T=y?Cp(l.buffer):l.buffer;return new l.constructor(T,l.byteOffset,l.length)}function P1(l,y){if(l!==y){var T=l!==e,H=l===null,Y=l===l,ne=Ii(l),de=y!==e,ge=y===null,we=y===y,Ie=Ii(y);if(!ge&&!Ie&&!ne&&l>y||ne&&de&&we&&!ge&&!Ie||H&&de&&we||!T&&we||!Y)return 1;if(!H&&!ne&&!Ie&&l<y||Ie&&T&&Y&&!H&&!ne||ge&&T&&Y||!de&&Y||!we)return-1}return 0}function o2(l,y,T){for(var H=-1,Y=l.criteria,ne=y.criteria,de=Y.length,ge=T.length;++H<de;){var we=P1(Y[H],ne[H]);if(we){if(H>=ge)return we;var Ie=T[H];return we*(Ie=="desc"?-1:1)}}return l.index-y.index}function F1(l,y,T,H){for(var Y=-1,ne=l.length,de=T.length,ge=-1,we=y.length,Ie=wr(ne-de,0),Me=Se(we+Ie),Pe=!H;++ge<we;)Me[ge]=y[ge];for(;++Y<de;)(Pe||Y<ne)&&(Me[T[Y]]=l[Y]);for(;Ie--;)Me[ge++]=l[Y++];return Me}function z1(l,y,T,H){for(var Y=-1,ne=l.length,de=-1,ge=T.length,we=-1,Ie=y.length,Me=wr(ne-ge,0),Pe=Se(Me+Ie),Ze=!H;++Y<Me;)Pe[Y]=l[Y];for(var ut=Y;++we<Ie;)Pe[ut+we]=y[we];for(;++de<ge;)(Ze||Y<ne)&&(Pe[ut+T[de]]=l[Y++]);return Pe}function mi(l,y){var T=-1,H=l.length;for(y||(y=Se(H));++T<H;)y[T]=l[T];return y}function Lo(l,y,T,H){var Y=!T;T||(T={});for(var ne=-1,de=y.length;++ne<de;){var ge=y[ne],we=H?H(T[ge],l[ge],ge,T,l):e;we===e&&(we=l[ge]),Y?To(T,ge,we):Il(T,ge,we)}return T}function s2(l,y){return Lo(l,Rp(l),y)}function a2(l,y){return Lo(l,Z1(l),y)}function gu(l,y){return function(T,H){var Y=It(T)?Da:RN,ne=y?y():{};return Y(T,l,wt(H,2),ne)}}function Ba(l){return Vt(function(y,T){var H=-1,Y=T.length,ne=Y>1?T[Y-1]:e,de=Y>2?T[2]:e;for(ne=l.length>3&&typeof ne=="function"?(Y--,ne):e,de&&ii(T[0],T[1],de)&&(ne=Y<3?e:ne,Y=1),y=Ut(y);++H<Y;){var ge=T[H];ge&&l(y,ge,H,ne)}return y})}function B1(l,y){return function(T,H){if(T==null)return T;if(!vi(T))return l(T,H);for(var Y=T.length,ne=y?Y:-1,de=Ut(T);(y?ne--:++ne<Y)&&H(de[ne],ne,de)!==!1;);return T}}function j1(l){return function(y,T,H){for(var Y=-1,ne=Ut(y),de=H(y),ge=de.length;ge--;){var we=de[l?ge:++Y];if(T(ne[we],we,ne)===!1)break}return y}}function l2(l,y,T){var H=y&w,Y=Dl(l);function ne(){var de=this&&this!==Wt&&this instanceof ne?Y:l;return de.apply(H?T:this,arguments)}return ne}function W1(l){return function(y){y=dn(y);var T=me(y)?Ct(y):e,H=T?T[0]:y.charAt(0),Y=T?fs(T,1).join(""):y.slice(1);return H[l]()+Y}}function ja(l){return function(y){return P(jx(Bx(y).replace(Bo,"")),l,"")}}function Dl(l){return function(){var y=arguments;switch(y.length){case 0:return new l;case 1:return new l(y[0]);case 2:return new l(y[0],y[1]);case 3:return new l(y[0],y[1],y[2]);case 4:return new l(y[0],y[1],y[2],y[3]);case 5:return new l(y[0],y[1],y[2],y[3],y[4]);case 6:return new l(y[0],y[1],y[2],y[3],y[4],y[5]);case 7:return new l(y[0],y[1],y[2],y[3],y[4],y[5],y[6])}var T=za(l.prototype),H=l.apply(T,y);return Hn(H)?H:T}}function c2(l,y,T){var H=Dl(l);function Y(){for(var ne=arguments.length,de=Se(ne),ge=ne,we=Wa(Y);ge--;)de[ge]=arguments[ge];var Ie=ne<3&&de[0]!==we&&de[ne-1]!==we?[]:Ke(de,we);if(ne-=Ie.length,ne<T)return q1(l,y,mu,Y.placeholder,e,de,Ie,e,e,T-ne);var Me=this&&this!==Wt&&this instanceof Y?H:l;return cn(Me,this,de)}return Y}function H1(l){return function(y,T,H){var Y=Ut(y);if(!vi(y)){var ne=wt(T,3);y=Sr(y),T=function(ge){return ne(Y[ge],ge,Y)}}var de=l(y,T,H);return de>-1?Y[ne?y[de]:de]:e}}function U1(l){return Go(function(y){var T=y.length,H=T,Y=Vi.prototype.thru;for(l&&y.reverse();H--;){var ne=y[H];if(typeof ne!="function")throw new Sn(f);if(Y&&!de&&wu(ne)=="wrapper")var de=new Vi([],!0)}for(H=de?H:T;++H<T;){ne=y[H];var ge=wu(ne),we=ge=="wrapper"?$p(ne):e;we&&Ip(we[0])&&we[1]==(N|S|C|M)&&!we[4].length&&we[9]==1?de=de[wu(we[0])].apply(de,we[3]):de=ne.length==1&&Ip(ne)?de[ge]():de.thru(ne)}return function(){var Ie=arguments,Me=Ie[0];if(de&&Ie.length==1&&It(Me))return de.plant(Me).value();for(var Pe=0,Ze=T?y[Pe].apply(this,Ie):Me;++Pe<T;)Ze=y[Pe].call(this,Ze);return Ze}})}function mu(l,y,T,H,Y,ne,de,ge,we,Ie){var Me=y&N,Pe=y&w,Ze=y&x,ut=y&(S|A),xt=y&L,zt=Ze?e:Dl(l);function vt(){for(var qt=arguments.length,Jt=Se(qt),Li=qt;Li--;)Jt[Li]=arguments[Li];if(ut)var oi=Wa(vt),Mi=Fn(Jt,oi);if(H&&(Jt=F1(Jt,H,Y,ut)),ne&&(Jt=z1(Jt,ne,de,ut)),qt-=Mi,ut&&qt<Ie){var or=Ke(Jt,oi);return q1(l,y,mu,vt.placeholder,T,Jt,or,ge,we,Ie-qt)}var mo=Pe?T:this,Xo=Ze?mo[l]:l;return qt=Jt.length,ge?Jt=R2(Jt,ge):xt&&qt>1&&Jt.reverse(),Me&&we<qt&&(Jt.length=we),this&&this!==Wt&&this instanceof vt&&(Xo=zt||Dl(Xo)),Xo.apply(mo,Jt)}return vt}function V1(l,y){return function(T,H){return PN(T,l,y(H),{})}}function vu(l,y){return function(T,H){var Y;if(T===e&&H===e)return y;if(T!==e&&(Y=T),H!==e){if(Y===e)return H;typeof T=="string"||typeof H=="string"?(T=Ti(T),H=Ti(H)):(T=T1(T),H=T1(H)),Y=l(T,H)}return Y}}function Ap(l){return Go(function(y){return y=E(y,Zt(wt())),Vt(function(T){var H=this;return l(y,function(Y){return cn(Y,H,T)})})})}function yu(l,y){y=y===e?" ":Ti(y);var T=y.length;if(T<2)return T?mp(y,l):y;var H=mp(y,iu(l/Ht(y)));return me(y)?fs(Ct(H),0,l).join(""):H.slice(0,l)}function u2(l,y,T,H){var Y=y&w,ne=Dl(l);function de(){for(var ge=-1,we=arguments.length,Ie=-1,Me=H.length,Pe=Se(Me+we),Ze=this&&this!==Wt&&this instanceof de?ne:l;++Ie<Me;)Pe[Ie]=H[Ie];for(;we--;)Pe[Ie++]=arguments[++ge];return cn(Ze,Y?T:this,Pe)}return de}function G1(l){return function(y,T,H){return H&&typeof H!="number"&&ii(y,T,H)&&(T=H=e),y=Yo(y),T===e?(T=y,y=0):T=Yo(T),H=H===e?y<T?1:-1:Yo(H),YN(y,T,H,l)}}function bu(l){return function(y,T){return typeof y=="string"&&typeof T=="string"||(y=Yi(y),T=Yi(T)),l(y,T)}}function q1(l,y,T,H,Y,ne,de,ge,we,Ie){var Me=y&S,Pe=Me?de:e,Ze=Me?e:de,ut=Me?ne:e,xt=Me?e:ne;y|=Me?C:O,y&=~(Me?O:C),y&R||(y&=-4);var zt=[l,y,Y,ut,Pe,xt,Ze,ge,we,Ie],vt=T.apply(e,zt);return Ip(l)&&ox(vt,zt),vt.placeholder=H,sx(vt,l,y)}function _p(l){var y=rn[l];return function(T,H){if(T=Yi(T),H=H==null?0:Ur(Ft(H),292),H&&s1(T)){var Y=(dn(T)+"e").split("e"),ne=y(Y[0]+"e"+(+Y[1]+H));return Y=(dn(ne)+"e").split("e"),+(Y[0]+"e"+(+Y[1]-H))}return y(T)}}var h2=Pa&&1/Je(new Pa([,-0]))[1]==U?function(l){return new Pa(l)}:qp;function K1(l){return function(y){var T=Vr(y);return T==dt?Fe(y):T==pn?it(y):Ln(y,l(y))}}function Vo(l,y,T,H,Y,ne,de,ge){var we=y&x;if(!we&&typeof l!="function")throw new Sn(f);var Ie=H?H.length:0;if(Ie||(y&=-97,H=Y=e),de=de===e?de:wr(Ft(de),0),ge=ge===e?ge:Ft(ge),Ie-=Y?Y.length:0,y&O){var Me=H,Pe=Y;H=Y=e}var Ze=we?e:$p(l),ut=[l,y,T,H,Y,Me,Pe,ne,de,ge];if(Ze&&S2(ut,Ze),l=ut[0],y=ut[1],T=ut[2],H=ut[3],Y=ut[4],ge=ut[9]=ut[9]===e?we?0:l.length:wr(ut[9]-Ie,0),!ge&&y&(S|A)&&(y&=-25),!y||y==w)var xt=l2(l,y,T);else y==S||y==A?xt=c2(l,y,ge):(y==C||y==(w|C))&&!Y.length?xt=u2(l,y,T,H):xt=mu.apply(e,ut);var zt=Ze?E1:ox;return sx(zt(xt,ut),l,y)}function Y1(l,y,T,H){return l===e||go(l,Wo[T])&&!hn.call(H,T)?y:l}function X1(l,y,T,H,Y,ne){return Hn(l)&&Hn(y)&&(ne.set(y,l),du(l,y,e,X1,ne),ne.delete(y)),l}function d2(l){return zl(l)?e:l}function J1(l,y,T,H,Y,ne){var de=T&c,ge=l.length,we=y.length;if(ge!=we&&!(de&&we>ge))return!1;var Ie=ne.get(l),Me=ne.get(y);if(Ie&&Me)return Ie==y&&Me==l;var Pe=-1,Ze=!0,ut=T&m?new Ks:e;for(ne.set(l,y),ne.set(y,l);++Pe<ge;){var xt=l[Pe],zt=y[Pe];if(H)var vt=de?H(zt,xt,Pe,y,l,ne):H(xt,zt,Pe,l,y,ne);if(vt!==e){if(vt)continue;Ze=!1;break}if(ut){if(!W(y,function(qt,Jt){if(!Et(ut,Jt)&&(xt===qt||Y(xt,qt,T,H,ne)))return ut.push(Jt)})){Ze=!1;break}}else if(!(xt===zt||Y(xt,zt,T,H,ne))){Ze=!1;break}}return ne.delete(l),ne.delete(y),Ze}function f2(l,y,T,H,Y,ne,de){switch(T){case Tn:if(l.byteLength!=y.byteLength||l.byteOffset!=y.byteOffset)return!1;l=l.buffer,y=y.buffer;case Rn:return!(l.byteLength!=y.byteLength||!ne(new eu(l),new eu(y)));case $e:case Re:case Lt:return go(+l,+y);case qe:return l.name==y.name&&l.message==y.message;case er:case tr:return l==y+"";case dt:var ge=Fe;case pn:var we=H&c;if(ge||(ge=Je),l.size!=y.size&&!we)return!1;var Ie=de.get(l);if(Ie)return Ie==y;H|=m,de.set(l,y);var Me=J1(ge(l),ge(y),H,Y,ne,de);return de.delete(l),Me;case yt:if(Tl)return Tl.call(l)==Tl.call(y)}return!1}function p2(l,y,T,H,Y,ne){var de=T&c,ge=kp(l),we=ge.length,Ie=kp(y),Me=Ie.length;if(we!=Me&&!de)return!1;for(var Pe=we;Pe--;){var Ze=ge[Pe];if(!(de?Ze in y:hn.call(y,Ze)))return!1}var ut=ne.get(l),xt=ne.get(y);if(ut&&xt)return ut==y&&xt==l;var zt=!0;ne.set(l,y),ne.set(y,l);for(var vt=de;++Pe<we;){Ze=ge[Pe];var qt=l[Ze],Jt=y[Ze];if(H)var Li=de?H(Jt,qt,Ze,y,l,ne):H(qt,Jt,Ze,l,y,ne);if(!(Li===e?qt===Jt||Y(qt,Jt,T,H,ne):Li)){zt=!1;break}vt||(vt=Ze=="constructor")}if(zt&&!vt){var oi=l.constructor,Mi=y.constructor;oi!=Mi&&"constructor"in l&&"constructor"in y&&!(typeof oi=="function"&&oi instanceof oi&&typeof Mi=="function"&&Mi instanceof Mi)&&(zt=!1)}return ne.delete(l),ne.delete(y),zt}function Go(l){return Mp(rx(l,e,dx),l+"")}function kp(l){return v1(l,Sr,Rp)}function Sp(l){return v1(l,yi,Z1)}var $p=su?function(l){return su.get(l)}:qp;function wu(l){for(var y=l.name+"",T=Fa[y],H=hn.call(Fa,y)?T.length:0;H--;){var Y=T[H],ne=Y.func;if(ne==null||ne==l)return Y.name}return y}function Wa(l){var y=hn.call(te,"placeholder")?te:l;return y.placeholder}function wt(){var l=te.iteratee||Vp;return l=l===Vp?w1:l,arguments.length?l(arguments[0],arguments[1]):l}function xu(l,y){var T=l.__data__;return C2(y)?T[typeof y=="string"?"string":"hash"]:T.map}function Ep(l){for(var y=Sr(l),T=y.length;T--;){var H=y[T],Y=l[H];y[T]=[H,Y,tx(Y)]}return y}function Js(l,y){var T=ue(l,y);return b1(T)?T:e}function g2(l){var y=hn.call(l,Gs),T=l[Gs];try{l[Gs]=e;var H=!0}catch{}var Y=Zc.call(l);return H&&(y?l[Gs]=T:delete l[Gs]),Y}var Rp=np?function(l){return l==null?[]:(l=Ut(l),Rr(np(l),function(y){return i1.call(l,y)}))}:Kp,Z1=np?function(l){for(var y=[];l;)k(y,Rp(l)),l=tu(l);return y}:Kp,Vr=ri;(rp&&Vr(new rp(new ArrayBuffer(1)))!=Tn||$l&&Vr(new $l)!=dt||ip&&Vr(ip.resolve())!=xr||Pa&&Vr(new Pa)!=pn||El&&Vr(new El)!=jt)&&(Vr=function(l){var y=ri(l),T=y==$t?l.constructor:e,H=T?Zs(T):"";if(H)switch(H){case JO:return Tn;case ZO:return dt;case QO:return xr;case eN:return pn;case tN:return jt}return y});function m2(l,y,T){for(var H=-1,Y=T.length;++H<Y;){var ne=T[H],de=ne.size;switch(ne.type){case"drop":l+=de;break;case"dropRight":y-=de;break;case"take":y=Ur(y,l+de);break;case"takeRight":l=wr(l,y-de);break}}return{start:l,end:y}}function v2(l){var y=l.match(ti);return y?y[1].split(ui):[]}function Q1(l,y,T){y=ds(y,l);for(var H=-1,Y=y.length,ne=!1;++H<Y;){var de=po(y[H]);if(!(ne=l!=null&&T(l,de)))break;l=l[de]}return ne||++H!=Y?ne:(Y=l==null?0:l.length,!!Y&&Eu(Y)&&qo(de,Y)&&(It(l)||Qs(l)))}function y2(l){var y=l.length,T=new l.constructor(y);return y&&typeof l[0]=="string"&&hn.call(l,"index")&&(T.index=l.index,T.input=l.input),T}function ex(l){return typeof l.constructor=="function"&&!Pl(l)?za(tu(l)):{}}function b2(l,y,T){var H=l.constructor;switch(y){case Rn:return Cp(l);case $e:case Re:return new H(+l);case Tn:return n2(l,T);case xn:case Cn:case Vn:case nr:case Qt:case Gn:case ci:case Fr:case On:return D1(l,T);case dt:return new H;case Lt:case tr:return new H(l);case er:return r2(l);case pn:return new H;case yt:return i2(l)}}function w2(l,y){var T=y.length;if(!T)return l;var H=T-1;return y[H]=(T>1?"& ":"")+y[H],y=y.join(T>2?", ":" "),l.replace(Si,`{
|
|
1460
|
+
/* [wrapped with `+y+`] */
|
|
1461
|
+
`)}function x2(l){return It(l)||Qs(l)||!!(o1&&l&&l[o1])}function qo(l,y){var T=typeof l;return y=y??V,!!y&&(T=="number"||T!="symbol"&&Dn.test(l))&&l>-1&&l%1==0&&l<y}function ii(l,y,T){if(!Hn(T))return!1;var H=typeof y;return(H=="number"?vi(T)&&qo(y,T.length):H=="string"&&y in T)?go(T[y],l):!1}function Tp(l,y){if(It(l))return!1;var T=typeof l;return T=="number"||T=="symbol"||T=="boolean"||l==null||Ii(l)?!0:vn.test(l)||!en.test(l)||y!=null&&l in Ut(y)}function C2(l){var y=typeof l;return y=="string"||y=="number"||y=="symbol"||y=="boolean"?l!=="__proto__":l===null}function Ip(l){var y=wu(l),T=te[y];if(typeof T!="function"||!(y in Xt.prototype))return!1;if(l===T)return!0;var H=$p(T);return!!H&&l===H[0]}function A2(l){return!!t1&&t1 in l}var _2=Xc?Ko:Yp;function Pl(l){var y=l&&l.constructor,T=typeof y=="function"&&y.prototype||Wo;return l===T}function tx(l){return l===l&&!Hn(l)}function nx(l,y){return function(T){return T==null?!1:T[l]===y&&(y!==e||l in Ut(T))}}function k2(l){var y=Su(l,function(H){return T.size===i&&T.clear(),H}),T=y.cache;return y}function S2(l,y){var T=l[1],H=y[1],Y=T|H,ne=Y<(w|x|N),de=H==N&&T==S||H==N&&T==M&&l[7].length<=y[8]||H==(N|M)&&y[7].length<=y[8]&&T==S;if(!(ne||de))return l;H&w&&(l[2]=y[2],Y|=T&w?0:R);var ge=y[3];if(ge){var we=l[3];l[3]=we?F1(we,ge,y[4]):ge,l[4]=we?Ke(l[3],a):y[4]}return ge=y[5],ge&&(we=l[5],l[5]=we?z1(we,ge,y[6]):ge,l[6]=we?Ke(l[5],a):y[6]),ge=y[7],ge&&(l[7]=ge),H&N&&(l[8]=l[8]==null?y[8]:Ur(l[8],y[8])),l[9]==null&&(l[9]=y[9]),l[0]=y[0],l[1]=Y,l}function $2(l){var y=[];if(l!=null)for(var T in Ut(l))y.push(T);return y}function E2(l){return Zc.call(l)}function rx(l,y,T){return y=wr(y===e?l.length-1:y,0),function(){for(var H=arguments,Y=-1,ne=wr(H.length-y,0),de=Se(ne);++Y<ne;)de[Y]=H[y+Y];Y=-1;for(var ge=Se(y+1);++Y<y;)ge[Y]=H[Y];return ge[y]=T(de),cn(l,this,ge)}}function ix(l,y){return y.length<2?l:Xs(l,qi(y,0,-1))}function R2(l,y){for(var T=l.length,H=Ur(y.length,T),Y=mi(l);H--;){var ne=y[H];l[H]=qo(ne,T)?Y[ne]:e}return l}function Lp(l,y){if(!(y==="constructor"&&typeof l[y]=="function")&&y!="__proto__")return l[y]}var ox=ax(E1),Fl=UO||function(l,y){return Wt.setTimeout(l,y)},Mp=ax(ZN);function sx(l,y,T){var H=y+"";return Mp(l,w2(H,T2(v2(H),T)))}function ax(l){var y=0,T=0;return function(){var H=KO(),Y=$-(H-T);if(T=H,Y>0){if(++y>=D)return arguments[0]}else y=0;return l.apply(e,arguments)}}function Cu(l,y){var T=-1,H=l.length,Y=H-1;for(y=y===e?H:y;++T<y;){var ne=gp(T,Y),de=l[ne];l[ne]=l[T],l[T]=de}return l.length=y,l}var lx=k2(function(l){var y=[];return l.charCodeAt(0)===46&&y.push(""),l.replace(zr,function(T,H,Y,ne){y.push(Y?ne.replace(hi,"$1"):H||T)}),y});function po(l){if(typeof l=="string"||Ii(l))return l;var y=l+"";return y=="0"&&1/l==-U?"-0":y}function Zs(l){if(l!=null){try{return Jc.call(l)}catch{}try{return l+""}catch{}}return""}function T2(l,y){return yr(ce,function(T){var H="_."+T[0];y&T[1]&&!pi(l,H)&&l.push(H)}),l.sort()}function cx(l){if(l instanceof Xt)return l.clone();var y=new Vi(l.__wrapped__,l.__chain__);return y.__actions__=mi(l.__actions__),y.__index__=l.__index__,y.__values__=l.__values__,y}function I2(l,y,T){(T?ii(l,y,T):y===e)?y=1:y=wr(Ft(y),0);var H=l==null?0:l.length;if(!H||y<1)return[];for(var Y=0,ne=0,de=Se(iu(H/y));Y<H;)de[ne++]=qi(l,Y,Y+=y);return de}function L2(l){for(var y=-1,T=l==null?0:l.length,H=0,Y=[];++y<T;){var ne=l[y];ne&&(Y[H++]=ne)}return Y}function M2(){var l=arguments.length;if(!l)return[];for(var y=Se(l-1),T=arguments[0],H=l;H--;)y[H-1]=arguments[H];return k(It(T)?mi(T):[T],Lr(y,1))}var O2=Vt(function(l,y){return ir(l)?Ll(l,Lr(y,1,ir,!0)):[]}),N2=Vt(function(l,y){var T=Ki(y);return ir(T)&&(T=e),ir(l)?Ll(l,Lr(y,1,ir,!0),wt(T,2)):[]}),D2=Vt(function(l,y){var T=Ki(y);return ir(T)&&(T=e),ir(l)?Ll(l,Lr(y,1,ir,!0),e,T):[]});function P2(l,y,T){var H=l==null?0:l.length;return H?(y=T||y===e?1:Ft(y),qi(l,y<0?0:y,H)):[]}function F2(l,y,T){var H=l==null?0:l.length;return H?(y=T||y===e?1:Ft(y),y=H-y,qi(l,0,y<0?0:y)):[]}function z2(l,y){return l&&l.length?pu(l,wt(y,3),!0,!0):[]}function B2(l,y){return l&&l.length?pu(l,wt(y,3),!0):[]}function j2(l,y,T,H){var Y=l==null?0:l.length;return Y?(T&&typeof T!="number"&&ii(l,y,T)&&(T=0,H=Y),MN(l,y,T,H)):[]}function ux(l,y,T){var H=l==null?0:l.length;if(!H)return-1;var Y=T==null?0:Ft(T);return Y<0&&(Y=wr(H+Y,0)),he(l,wt(y,3),Y)}function hx(l,y,T){var H=l==null?0:l.length;if(!H)return-1;var Y=H-1;return T!==e&&(Y=Ft(T),Y=T<0?wr(H+Y,0):Ur(Y,H-1)),he(l,wt(y,3),Y,!0)}function dx(l){var y=l==null?0:l.length;return y?Lr(l,1):[]}function W2(l){var y=l==null?0:l.length;return y?Lr(l,U):[]}function H2(l,y){var T=l==null?0:l.length;return T?(y=y===e?1:Ft(y),Lr(l,y)):[]}function U2(l){for(var y=-1,T=l==null?0:l.length,H={};++y<T;){var Y=l[y];To(H,Y[0],Y[1])}return H}function fx(l){return l&&l.length?l[0]:e}function V2(l,y,T){var H=l==null?0:l.length;if(!H)return-1;var Y=T==null?0:Ft(T);return Y<0&&(Y=wr(H+Y,0)),be(l,y,Y)}function G2(l){var y=l==null?0:l.length;return y?qi(l,0,-1):[]}var q2=Vt(function(l){var y=E(l,wp);return y.length&&y[0]===l[0]?up(y):[]}),K2=Vt(function(l){var y=Ki(l),T=E(l,wp);return y===Ki(T)?y=e:T.pop(),T.length&&T[0]===l[0]?up(T,wt(y,2)):[]}),Y2=Vt(function(l){var y=Ki(l),T=E(l,wp);return y=typeof y=="function"?y:e,y&&T.pop(),T.length&&T[0]===l[0]?up(T,e,y):[]});function X2(l,y){return l==null?"":GO.call(l,y)}function Ki(l){var y=l==null?0:l.length;return y?l[y-1]:e}function J2(l,y,T){var H=l==null?0:l.length;if(!H)return-1;var Y=H;return T!==e&&(Y=Ft(T),Y=Y<0?wr(H+Y,0):Ur(Y,H-1)),y===y?tn(l,y,Y):he(l,ye,Y,!0)}function Z2(l,y){return l&&l.length?_1(l,Ft(y)):e}var Q2=Vt(px);function px(l,y){return l&&l.length&&y&&y.length?pp(l,y):l}function eD(l,y,T){return l&&l.length&&y&&y.length?pp(l,y,wt(T,2)):l}function tD(l,y,T){return l&&l.length&&y&&y.length?pp(l,y,e,T):l}var nD=Go(function(l,y){var T=l==null?0:l.length,H=sp(l,y);return $1(l,E(y,function(Y){return qo(Y,T)?+Y:Y}).sort(P1)),H});function rD(l,y){var T=[];if(!(l&&l.length))return T;var H=-1,Y=[],ne=l.length;for(y=wt(y,3);++H<ne;){var de=l[H];y(de,H,l)&&(T.push(de),Y.push(H))}return $1(l,Y),T}function Op(l){return l==null?l:XO.call(l)}function iD(l,y,T){var H=l==null?0:l.length;return H?(T&&typeof T!="number"&&ii(l,y,T)?(y=0,T=H):(y=y==null?0:Ft(y),T=T===e?H:Ft(T)),qi(l,y,T)):[]}function oD(l,y){return fu(l,y)}function sD(l,y,T){return vp(l,y,wt(T,2))}function aD(l,y){var T=l==null?0:l.length;if(T){var H=fu(l,y);if(H<T&&go(l[H],y))return H}return-1}function lD(l,y){return fu(l,y,!0)}function cD(l,y,T){return vp(l,y,wt(T,2),!0)}function uD(l,y){var T=l==null?0:l.length;if(T){var H=fu(l,y,!0)-1;if(go(l[H],y))return H}return-1}function hD(l){return l&&l.length?R1(l):[]}function dD(l,y){return l&&l.length?R1(l,wt(y,2)):[]}function fD(l){var y=l==null?0:l.length;return y?qi(l,1,y):[]}function pD(l,y,T){return l&&l.length?(y=T||y===e?1:Ft(y),qi(l,0,y<0?0:y)):[]}function gD(l,y,T){var H=l==null?0:l.length;return H?(y=T||y===e?1:Ft(y),y=H-y,qi(l,y<0?0:y,H)):[]}function mD(l,y){return l&&l.length?pu(l,wt(y,3),!1,!0):[]}function vD(l,y){return l&&l.length?pu(l,wt(y,3)):[]}var yD=Vt(function(l){return hs(Lr(l,1,ir,!0))}),bD=Vt(function(l){var y=Ki(l);return ir(y)&&(y=e),hs(Lr(l,1,ir,!0),wt(y,2))}),wD=Vt(function(l){var y=Ki(l);return y=typeof y=="function"?y:e,hs(Lr(l,1,ir,!0),e,y)});function xD(l){return l&&l.length?hs(l):[]}function CD(l,y){return l&&l.length?hs(l,wt(y,2)):[]}function AD(l,y){return y=typeof y=="function"?y:e,l&&l.length?hs(l,e,y):[]}function Np(l){if(!(l&&l.length))return[];var y=0;return l=Rr(l,function(T){if(ir(T))return y=wr(T.length,y),!0}),st(y,function(T){return E(l,Oe(T))})}function gx(l,y){if(!(l&&l.length))return[];var T=Np(l);return y==null?T:E(T,function(H){return cn(y,e,H)})}var _D=Vt(function(l,y){return ir(l)?Ll(l,y):[]}),kD=Vt(function(l){return bp(Rr(l,ir))}),SD=Vt(function(l){var y=Ki(l);return ir(y)&&(y=e),bp(Rr(l,ir),wt(y,2))}),$D=Vt(function(l){var y=Ki(l);return y=typeof y=="function"?y:e,bp(Rr(l,ir),e,y)}),ED=Vt(Np);function RD(l,y){return M1(l||[],y||[],Il)}function TD(l,y){return M1(l||[],y||[],Nl)}var ID=Vt(function(l){var y=l.length,T=y>1?l[y-1]:e;return T=typeof T=="function"?(l.pop(),T):e,gx(l,T)});function mx(l){var y=te(l);return y.__chain__=!0,y}function LD(l,y){return y(l),l}function Au(l,y){return y(l)}var MD=Go(function(l){var y=l.length,T=y?l[0]:0,H=this.__wrapped__,Y=function(ne){return sp(ne,l)};return y>1||this.__actions__.length||!(H instanceof Xt)||!qo(T)?this.thru(Y):(H=H.slice(T,+T+(y?1:0)),H.__actions__.push({func:Au,args:[Y],thisArg:e}),new Vi(H,this.__chain__).thru(function(ne){return y&&!ne.length&&ne.push(e),ne}))});function OD(){return mx(this)}function ND(){return new Vi(this.value(),this.__chain__)}function DD(){this.__values__===e&&(this.__values__=Tx(this.value()));var l=this.__index__>=this.__values__.length,y=l?e:this.__values__[this.__index__++];return{done:l,value:y}}function PD(){return this}function FD(l){for(var y,T=this;T instanceof lu;){var H=cx(T);H.__index__=0,H.__values__=e,y?Y.__wrapped__=H:y=H;var Y=H;T=T.__wrapped__}return Y.__wrapped__=l,y}function zD(){var l=this.__wrapped__;if(l instanceof Xt){var y=l;return this.__actions__.length&&(y=new Xt(this)),y=y.reverse(),y.__actions__.push({func:Au,args:[Op],thisArg:e}),new Vi(y,this.__chain__)}return this.thru(Op)}function BD(){return L1(this.__wrapped__,this.__actions__)}var jD=gu(function(l,y,T){hn.call(l,T)?++l[T]:To(l,T,1)});function WD(l,y,T){var H=It(l)?Ro:LN;return T&&ii(l,y,T)&&(y=e),H(l,wt(y,3))}function HD(l,y){var T=It(l)?Rr:g1;return T(l,wt(y,3))}var UD=H1(ux),VD=H1(hx);function GD(l,y){return Lr(_u(l,y),1)}function qD(l,y){return Lr(_u(l,y),U)}function KD(l,y,T){return T=T===e?1:Ft(T),Lr(_u(l,y),T)}function vx(l,y){var T=It(l)?yr:us;return T(l,wt(y,3))}function yx(l,y){var T=It(l)?Hr:p1;return T(l,wt(y,3))}var YD=gu(function(l,y,T){hn.call(l,T)?l[T].push(y):To(l,T,[y])});function XD(l,y,T,H){l=vi(l)?l:Ua(l),T=T&&!H?Ft(T):0;var Y=l.length;return T<0&&(T=wr(Y+T,0)),Ru(l)?T<=Y&&l.indexOf(y,T)>-1:!!Y&&be(l,y,T)>-1}var JD=Vt(function(l,y,T){var H=-1,Y=typeof y=="function",ne=vi(l)?Se(l.length):[];return us(l,function(de){ne[++H]=Y?cn(y,de,T):Ml(de,y,T)}),ne}),ZD=gu(function(l,y,T){To(l,T,y)});function _u(l,y){var T=It(l)?E:x1;return T(l,wt(y,3))}function QD(l,y,T,H){return l==null?[]:(It(y)||(y=y==null?[]:[y]),T=H?e:T,It(T)||(T=T==null?[]:[T]),k1(l,y,T))}var eP=gu(function(l,y,T){l[T?0:1].push(y)},function(){return[[],[]]});function tP(l,y,T){var H=It(l)?P:Xe,Y=arguments.length<3;return H(l,wt(y,4),T,Y,us)}function nP(l,y,T){var H=It(l)?B:Xe,Y=arguments.length<3;return H(l,wt(y,4),T,Y,p1)}function rP(l,y){var T=It(l)?Rr:g1;return T(l,$u(wt(y,3)))}function iP(l){var y=It(l)?u1:XN;return y(l)}function oP(l,y,T){(T?ii(l,y,T):y===e)?y=1:y=Ft(y);var H=It(l)?$N:JN;return H(l,y)}function sP(l){var y=It(l)?EN:QN;return y(l)}function aP(l){if(l==null)return 0;if(vi(l))return Ru(l)?Ht(l):l.length;var y=Vr(l);return y==dt||y==pn?l.size:dp(l).length}function lP(l,y,T){var H=It(l)?W:e2;return T&&ii(l,y,T)&&(y=e),H(l,wt(y,3))}var cP=Vt(function(l,y){if(l==null)return[];var T=y.length;return T>1&&ii(l,y[0],y[1])?y=[]:T>2&&ii(y[0],y[1],y[2])&&(y=[y[0]]),k1(l,Lr(y,1),[])}),ku=HO||function(){return Wt.Date.now()};function uP(l,y){if(typeof y!="function")throw new Sn(f);return l=Ft(l),function(){if(--l<1)return y.apply(this,arguments)}}function bx(l,y,T){return y=T?e:y,y=l&&y==null?l.length:y,Vo(l,N,e,e,e,e,y)}function wx(l,y){var T;if(typeof y!="function")throw new Sn(f);return l=Ft(l),function(){return--l>0&&(T=y.apply(this,arguments)),l<=1&&(y=e),T}}var Dp=Vt(function(l,y,T){var H=w;if(T.length){var Y=Ke(T,Wa(Dp));H|=C}return Vo(l,H,y,T,Y)}),xx=Vt(function(l,y,T){var H=w|x;if(T.length){var Y=Ke(T,Wa(xx));H|=C}return Vo(y,H,l,T,Y)});function Cx(l,y,T){y=T?e:y;var H=Vo(l,S,e,e,e,e,e,y);return H.placeholder=Cx.placeholder,H}function Ax(l,y,T){y=T?e:y;var H=Vo(l,A,e,e,e,e,e,y);return H.placeholder=Ax.placeholder,H}function _x(l,y,T){var H,Y,ne,de,ge,we,Ie=0,Me=!1,Pe=!1,Ze=!0;if(typeof l!="function")throw new Sn(f);y=Yi(y)||0,Hn(T)&&(Me=!!T.leading,Pe="maxWait"in T,ne=Pe?wr(Yi(T.maxWait)||0,y):ne,Ze="trailing"in T?!!T.trailing:Ze);function ut(or){var mo=H,Xo=Y;return H=Y=e,Ie=or,de=l.apply(Xo,mo),de}function xt(or){return Ie=or,ge=Fl(qt,y),Me?ut(or):de}function zt(or){var mo=or-we,Xo=or-Ie,Ux=y-mo;return Pe?Ur(Ux,ne-Xo):Ux}function vt(or){var mo=or-we,Xo=or-Ie;return we===e||mo>=y||mo<0||Pe&&Xo>=ne}function qt(){var or=ku();if(vt(or))return Jt(or);ge=Fl(qt,zt(or))}function Jt(or){return ge=e,Ze&&H?ut(or):(H=Y=e,de)}function Li(){ge!==e&&O1(ge),Ie=0,H=we=Y=ge=e}function oi(){return ge===e?de:Jt(ku())}function Mi(){var or=ku(),mo=vt(or);if(H=arguments,Y=this,we=or,mo){if(ge===e)return xt(we);if(Pe)return O1(ge),ge=Fl(qt,y),ut(we)}return ge===e&&(ge=Fl(qt,y)),de}return Mi.cancel=Li,Mi.flush=oi,Mi}var hP=Vt(function(l,y){return f1(l,1,y)}),dP=Vt(function(l,y,T){return f1(l,Yi(y)||0,T)});function fP(l){return Vo(l,L)}function Su(l,y){if(typeof l!="function"||y!=null&&typeof y!="function")throw new Sn(f);var T=function(){var H=arguments,Y=y?y.apply(this,H):H[0],ne=T.cache;if(ne.has(Y))return ne.get(Y);var de=l.apply(this,H);return T.cache=ne.set(Y,de)||ne,de};return T.cache=new(Su.Cache||Uo),T}Su.Cache=Uo;function $u(l){if(typeof l!="function")throw new Sn(f);return function(){var y=arguments;switch(y.length){case 0:return!l.call(this);case 1:return!l.call(this,y[0]);case 2:return!l.call(this,y[0],y[1]);case 3:return!l.call(this,y[0],y[1],y[2])}return!l.apply(this,y)}}function pP(l){return wx(2,l)}var gP=t2(function(l,y){y=y.length==1&&It(y[0])?E(y[0],Zt(wt())):E(Lr(y,1),Zt(wt()));var T=y.length;return Vt(function(H){for(var Y=-1,ne=Ur(H.length,T);++Y<ne;)H[Y]=y[Y].call(this,H[Y]);return cn(l,this,H)})}),Pp=Vt(function(l,y){var T=Ke(y,Wa(Pp));return Vo(l,C,e,y,T)}),kx=Vt(function(l,y){var T=Ke(y,Wa(kx));return Vo(l,O,e,y,T)}),mP=Go(function(l,y){return Vo(l,M,e,e,e,y)});function vP(l,y){if(typeof l!="function")throw new Sn(f);return y=y===e?y:Ft(y),Vt(l,y)}function yP(l,y){if(typeof l!="function")throw new Sn(f);return y=y==null?0:wr(Ft(y),0),Vt(function(T){var H=T[y],Y=fs(T,0,y);return H&&k(Y,H),cn(l,this,Y)})}function bP(l,y,T){var H=!0,Y=!0;if(typeof l!="function")throw new Sn(f);return Hn(T)&&(H="leading"in T?!!T.leading:H,Y="trailing"in T?!!T.trailing:Y),_x(l,y,{leading:H,maxWait:y,trailing:Y})}function wP(l){return bx(l,1)}function xP(l,y){return Pp(xp(y),l)}function CP(){if(!arguments.length)return[];var l=arguments[0];return It(l)?l:[l]}function AP(l){return Gi(l,s)}function _P(l,y){return y=typeof y=="function"?y:e,Gi(l,s,y)}function kP(l){return Gi(l,u|s)}function SP(l,y){return y=typeof y=="function"?y:e,Gi(l,u|s,y)}function $P(l,y){return y==null||d1(l,y,Sr(y))}function go(l,y){return l===y||l!==l&&y!==y}var EP=bu(cp),RP=bu(function(l,y){return l>=y}),Qs=y1((function(){return arguments})())?y1:function(l){return Xn(l)&&hn.call(l,"callee")&&!i1.call(l,"callee")},It=Se.isArray,TP=ls?Zt(ls):FN;function vi(l){return l!=null&&Eu(l.length)&&!Ko(l)}function ir(l){return Xn(l)&&vi(l)}function IP(l){return l===!0||l===!1||Xn(l)&&ri(l)==$e}var ps=VO||Yp,LP=Yn?Zt(Yn):zN;function MP(l){return Xn(l)&&l.nodeType===1&&!zl(l)}function OP(l){if(l==null)return!0;if(vi(l)&&(It(l)||typeof l=="string"||typeof l.splice=="function"||ps(l)||Ha(l)||Qs(l)))return!l.length;var y=Vr(l);if(y==dt||y==pn)return!l.size;if(Pl(l))return!dp(l).length;for(var T in l)if(hn.call(l,T))return!1;return!0}function NP(l,y){return Ol(l,y)}function DP(l,y,T){T=typeof T=="function"?T:e;var H=T?T(l,y):e;return H===e?Ol(l,y,e,T):!!H}function Fp(l){if(!Xn(l))return!1;var y=ri(l);return y==qe||y==Ge||typeof l.message=="string"&&typeof l.name=="string"&&!zl(l)}function PP(l){return typeof l=="number"&&s1(l)}function Ko(l){if(!Hn(l))return!1;var y=ri(l);return y==ct||y==ot||y==pe||y==Bn}function Sx(l){return typeof l=="number"&&l==Ft(l)}function Eu(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=V}function Hn(l){var y=typeof l;return l!=null&&(y=="object"||y=="function")}function Xn(l){return l!=null&&typeof l=="object"}var $x=Ei?Zt(Ei):jN;function FP(l,y){return l===y||hp(l,y,Ep(y))}function zP(l,y,T){return T=typeof T=="function"?T:e,hp(l,y,Ep(y),T)}function BP(l){return Ex(l)&&l!=+l}function jP(l){if(_2(l))throw new gt(h);return b1(l)}function WP(l){return l===null}function HP(l){return l==null}function Ex(l){return typeof l=="number"||Xn(l)&&ri(l)==Lt}function zl(l){if(!Xn(l)||ri(l)!=$t)return!1;var y=tu(l);if(y===null)return!0;var T=hn.call(y,"constructor")&&y.constructor;return typeof T=="function"&&T instanceof T&&Jc.call(T)==zO}var zp=Ri?Zt(Ri):WN;function UP(l){return Sx(l)&&l>=-V&&l<=V}var Rx=Hi?Zt(Hi):HN;function Ru(l){return typeof l=="string"||!It(l)&&Xn(l)&&ri(l)==tr}function Ii(l){return typeof l=="symbol"||Xn(l)&&ri(l)==yt}var Ha=Vs?Zt(Vs):UN;function VP(l){return l===e}function GP(l){return Xn(l)&&Vr(l)==jt}function qP(l){return Xn(l)&&ri(l)==En}var KP=bu(fp),YP=bu(function(l,y){return l<=y});function Tx(l){if(!l)return[];if(vi(l))return Ru(l)?Ct(l):mi(l);if(Sl&&l[Sl])return Te(l[Sl]());var y=Vr(l),T=y==dt?Fe:y==pn?Je:Ua;return T(l)}function Yo(l){if(!l)return l===0?l:0;if(l=Yi(l),l===U||l===-U){var y=l<0?-1:1;return y*K}return l===l?l:0}function Ft(l){var y=Yo(l),T=y%1;return y===y?T?y-T:y:0}function Ix(l){return l?Ys(Ft(l),0,oe):0}function Yi(l){if(typeof l=="number")return l;if(Ii(l))return Z;if(Hn(l)){var y=typeof l.valueOf=="function"?l.valueOf():l;l=Hn(y)?y+"":y}if(typeof l!="string")return l===0?l:+l;l=St(l);var T=_n.test(l);return T||gn.test(l)?_t(l.slice(2),T?2:8):ao.test(l)?Z:+l}function Lx(l){return Lo(l,yi(l))}function XP(l){return l?Ys(Ft(l),-V,V):l===0?l:0}function dn(l){return l==null?"":Ti(l)}var JP=Ba(function(l,y){if(Pl(y)||vi(y)){Lo(y,Sr(y),l);return}for(var T in y)hn.call(y,T)&&Il(l,T,y[T])}),Mx=Ba(function(l,y){Lo(y,yi(y),l)}),Ox=Ba(function(l,y,T,H){Lo(y,yi(y),l,H)}),Bp=Ba(function(l,y,T,H){Lo(y,Sr(y),l,H)}),ZP=Go(sp);function QP(l,y){var T=za(l);return y==null?T:h1(T,y)}var eF=Vt(function(l,y){l=Ut(l);var T=-1,H=y.length,Y=H>2?y[2]:e;for(Y&&ii(y[0],y[1],Y)&&(H=1);++T<H;)for(var ne=y[T],de=yi(ne),ge=-1,we=de.length;++ge<we;){var Ie=de[ge],Me=l[Ie];(Me===e||go(Me,Wo[Ie])&&!hn.call(l,Ie))&&(l[Ie]=ne[Ie])}return l}),tF=Vt(function(l){return l.push(e,X1),cn(Nx,e,l)});function nF(l,y){return se(l,wt(y,3),Io)}function rF(l,y){return se(l,wt(y,3),lp)}function iF(l,y){return l==null?l:ap(l,wt(y,3),yi)}function oF(l,y){return l==null?l:m1(l,wt(y,3),yi)}function sF(l,y){return l&&Io(l,wt(y,3))}function aF(l,y){return l&&lp(l,wt(y,3))}function lF(l){return l==null?[]:hu(l,Sr(l))}function cF(l){return l==null?[]:hu(l,yi(l))}function jp(l,y,T){var H=l==null?e:Xs(l,y);return H===e?T:H}function uF(l,y){return l!=null&&Q1(l,y,ON)}function Wp(l,y){return l!=null&&Q1(l,y,NN)}var hF=V1(function(l,y,T){y!=null&&typeof y.toString!="function"&&(y=Zc.call(y)),l[y]=T},Up(bi)),dF=V1(function(l,y,T){y!=null&&typeof y.toString!="function"&&(y=Zc.call(y)),hn.call(l,y)?l[y].push(T):l[y]=[T]},wt),fF=Vt(Ml);function Sr(l){return vi(l)?c1(l):dp(l)}function yi(l){return vi(l)?c1(l,!0):VN(l)}function pF(l,y){var T={};return y=wt(y,3),Io(l,function(H,Y,ne){To(T,y(H,Y,ne),H)}),T}function gF(l,y){var T={};return y=wt(y,3),Io(l,function(H,Y,ne){To(T,Y,y(H,Y,ne))}),T}var mF=Ba(function(l,y,T){du(l,y,T)}),Nx=Ba(function(l,y,T,H){du(l,y,T,H)}),vF=Go(function(l,y){var T={};if(l==null)return T;var H=!1;y=E(y,function(ne){return ne=ds(ne,l),H||(H=ne.length>1),ne}),Lo(l,Sp(l),T),H&&(T=Gi(T,u|g|s,d2));for(var Y=y.length;Y--;)yp(T,y[Y]);return T});function yF(l,y){return Dx(l,$u(wt(y)))}var bF=Go(function(l,y){return l==null?{}:qN(l,y)});function Dx(l,y){if(l==null)return{};var T=E(Sp(l),function(H){return[H]});return y=wt(y),S1(l,T,function(H,Y){return y(H,Y[0])})}function wF(l,y,T){y=ds(y,l);var H=-1,Y=y.length;for(Y||(Y=1,l=e);++H<Y;){var ne=l==null?e:l[po(y[H])];ne===e&&(H=Y,ne=T),l=Ko(ne)?ne.call(l):ne}return l}function xF(l,y,T){return l==null?l:Nl(l,y,T)}function CF(l,y,T,H){return H=typeof H=="function"?H:e,l==null?l:Nl(l,y,T,H)}var Px=K1(Sr),Fx=K1(yi);function AF(l,y,T){var H=It(l),Y=H||ps(l)||Ha(l);if(y=wt(y,4),T==null){var ne=l&&l.constructor;Y?T=H?new ne:[]:Hn(l)?T=Ko(ne)?za(tu(l)):{}:T={}}return(Y?yr:Io)(l,function(de,ge,we){return y(T,de,ge,we)}),T}function _F(l,y){return l==null?!0:yp(l,y)}function kF(l,y,T){return l==null?l:I1(l,y,xp(T))}function SF(l,y,T,H){return H=typeof H=="function"?H:e,l==null?l:I1(l,y,xp(T),H)}function Ua(l){return l==null?[]:Ot(l,Sr(l))}function $F(l){return l==null?[]:Ot(l,yi(l))}function EF(l,y,T){return T===e&&(T=y,y=e),T!==e&&(T=Yi(T),T=T===T?T:0),y!==e&&(y=Yi(y),y=y===y?y:0),Ys(Yi(l),y,T)}function RF(l,y,T){return y=Yo(y),T===e?(T=y,y=0):T=Yo(T),l=Yi(l),DN(l,y,T)}function TF(l,y,T){if(T&&typeof T!="boolean"&&ii(l,y,T)&&(y=T=e),T===e&&(typeof y=="boolean"?(T=y,y=e):typeof l=="boolean"&&(T=l,l=e)),l===e&&y===e?(l=0,y=1):(l=Yo(l),y===e?(y=l,l=0):y=Yo(y)),l>y){var H=l;l=y,y=H}if(T||l%1||y%1){var Y=a1();return Ur(l+Y*(y-l+kn("1e-"+((Y+"").length-1))),y)}return gp(l,y)}var IF=ja(function(l,y,T){return y=y.toLowerCase(),l+(T?zx(y):y)});function zx(l){return Hp(dn(l).toLowerCase())}function Bx(l){return l=dn(l),l&&l.replace(zi,G).replace(uo,"")}function LF(l,y,T){l=dn(l),y=Ti(y);var H=l.length;T=T===e?H:Ys(Ft(T),0,H);var Y=T;return T-=y.length,T>=0&&l.slice(T,Y)==y}function MF(l){return l=dn(l),l&&ei.test(l)?l.replace(_i,J):l}function OF(l){return l=dn(l),l&&In.test(l)?l.replace(Br,"\\$&"):l}var NF=ja(function(l,y,T){return l+(T?"-":"")+y.toLowerCase()}),DF=ja(function(l,y,T){return l+(T?" ":"")+y.toLowerCase()}),PF=W1("toLowerCase");function FF(l,y,T){l=dn(l),y=Ft(y);var H=y?Ht(l):0;if(!y||H>=y)return l;var Y=(y-H)/2;return yu(ou(Y),T)+l+yu(iu(Y),T)}function zF(l,y,T){l=dn(l),y=Ft(y);var H=y?Ht(l):0;return y&&H<y?l+yu(y-H,T):l}function BF(l,y,T){l=dn(l),y=Ft(y);var H=y?Ht(l):0;return y&&H<y?yu(y-H,T)+l:l}function jF(l,y,T){return T||y==null?y=0:y&&(y=+y),YO(dn(l).replace(rr,""),y||0)}function WF(l,y,T){return(T?ii(l,y,T):y===e)?y=1:y=Ft(y),mp(dn(l),y)}function HF(){var l=arguments,y=dn(l[0]);return l.length<3?y:y.replace(l[1],l[2])}var UF=ja(function(l,y,T){return l+(T?"_":"")+y.toLowerCase()});function VF(l,y,T){return T&&typeof T!="number"&&ii(l,y,T)&&(y=T=e),T=T===e?oe:T>>>0,T?(l=dn(l),l&&(typeof y=="string"||y!=null&&!zp(y))&&(y=Ti(y),!y&&me(l))?fs(Ct(l),0,T):l.split(y,T)):[]}var GF=ja(function(l,y,T){return l+(T?" ":"")+Hp(y)});function qF(l,y,T){return l=dn(l),T=T==null?0:Ys(Ft(T),0,l.length),y=Ti(y),l.slice(T,T+y.length)==y}function KF(l,y,T){var H=te.templateSettings;T&&ii(l,y,T)&&(y=e),l=dn(l),y=Bp({},y,H,Y1);var Y=Bp({},y.imports,H.imports,Y1),ne=Sr(Y),de=Ot(Y,ne);yr(ne,function(vt){if(Po.test(vt))throw new gt(o)});var ge,we,Ie=0,Me=y.interpolate||qn,Pe="__p += '",Ze=gi((y.escape||qn).source+"|"+Me.source+"|"+(Me===Do?Er:qn).source+"|"+(y.evaluate||qn).source+"|$","g"),ut="//# sourceURL="+(hn.call(y,"sourceURL")?(y.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Us+"]")+`
|
|
1462
|
+
`;l.replace(Ze,function(vt,qt,Jt,Li,oi,Mi){return Jt||(Jt=Li),Pe+=l.slice(Ie,Mi).replace(di,ae),qt&&(ge=!0,Pe+=`' +
|
|
1463
|
+
__e(`+qt+`) +
|
|
1464
|
+
'`),oi&&(we=!0,Pe+=`';
|
|
1465
|
+
`+oi+`;
|
|
1466
|
+
__p += '`),Jt&&(Pe+=`' +
|
|
1467
|
+
((__t = (`+Jt+`)) == null ? '' : __t) +
|
|
1468
|
+
'`),Ie=Mi+vt.length,vt}),Pe+=`';
|
|
1469
|
+
`;var xt=hn.call(y,"variable")&&y.variable;if(!xt)Pe=`with (obj) {
|
|
1470
|
+
`+Pe+`
|
|
1471
|
+
}
|
|
1472
|
+
`;else if(Po.test(xt))throw new gt(v);Pe=(we?Pe.replace(Cr,""):Pe).replace(Ai,"$1").replace(lr,"$1;"),Pe="function("+(xt||"obj")+`) {
|
|
1473
|
+
`+(xt?"":`obj || (obj = {});
|
|
1474
|
+
`)+"var __t, __p = ''"+(ge?", __e = _.escape":"")+(we?`, __j = Array.prototype.join;
|
|
1475
|
+
function print() { __p += __j.call(arguments, '') }
|
|
1476
|
+
`:`;
|
|
1477
|
+
`)+Pe+`return __p
|
|
1478
|
+
}`;var zt=Wx(function(){return Rt(ne,ut+"return "+Pe).apply(e,de)});if(zt.source=Pe,Fp(zt))throw zt;return zt}function YF(l){return dn(l).toLowerCase()}function XF(l){return dn(l).toUpperCase()}function JF(l,y,T){if(l=dn(l),l&&(T||y===e))return St(l);if(!l||!(y=Ti(y)))return l;var H=Ct(l),Y=Ct(y),ne=ur(H,Y),de=br(H,Y)+1;return fs(H,ne,de).join("")}function ZF(l,y,T){if(l=dn(l),l&&(T||y===e))return l.slice(0,mt(l)+1);if(!l||!(y=Ti(y)))return l;var H=Ct(l),Y=br(H,Ct(y))+1;return fs(H,0,Y).join("")}function QF(l,y,T){if(l=dn(l),l&&(T||y===e))return l.replace(rr,"");if(!l||!(y=Ti(y)))return l;var H=Ct(l),Y=ur(H,Ct(y));return fs(H,Y).join("")}function ez(l,y){var T=j,H=F;if(Hn(y)){var Y="separator"in y?y.separator:Y;T="length"in y?Ft(y.length):T,H="omission"in y?Ti(y.omission):H}l=dn(l);var ne=l.length;if(me(l)){var de=Ct(l);ne=de.length}if(T>=ne)return l;var ge=T-Ht(H);if(ge<1)return H;var we=de?fs(de,0,ge).join(""):l.slice(0,ge);if(Y===e)return we+H;if(de&&(ge+=we.length-ge),zp(Y)){if(l.slice(ge).search(Y)){var Ie,Me=we;for(Y.global||(Y=gi(Y.source,dn(Tt.exec(Y))+"g")),Y.lastIndex=0;Ie=Y.exec(Me);)var Pe=Ie.index;we=we.slice(0,Pe===e?ge:Pe)}}else if(l.indexOf(Ti(Y),ge)!=ge){var Ze=we.lastIndexOf(Y);Ze>-1&&(we=we.slice(0,Ze))}return we+H}function tz(l){return l=dn(l),l&&No.test(l)?l.replace(oo,ht):l}var nz=ja(function(l,y,T){return l+(T?" ":"")+y.toUpperCase()}),Hp=W1("toUpperCase");function jx(l,y,T){return l=dn(l),y=T?e:y,y===e?_e(l)?hr(l):Q(l):l.match(y)||[]}var Wx=Vt(function(l,y){try{return cn(l,e,y)}catch(T){return Fp(T)?T:new gt(T)}}),rz=Go(function(l,y){return yr(y,function(T){T=po(T),To(l,T,Dp(l[T],l))}),l});function iz(l){var y=l==null?0:l.length,T=wt();return l=y?E(l,function(H){if(typeof H[1]!="function")throw new Sn(f);return[T(H[0]),H[1]]}):[],Vt(function(H){for(var Y=-1;++Y<y;){var ne=l[Y];if(cn(ne[0],this,H))return cn(ne[1],this,H)}})}function oz(l){return IN(Gi(l,u))}function Up(l){return function(){return l}}function sz(l,y){return l==null||l!==l?y:l}var az=U1(),lz=U1(!0);function bi(l){return l}function Vp(l){return w1(typeof l=="function"?l:Gi(l,u))}function cz(l){return C1(Gi(l,u))}function uz(l,y){return A1(l,Gi(y,u))}var hz=Vt(function(l,y){return function(T){return Ml(T,l,y)}}),dz=Vt(function(l,y){return function(T){return Ml(l,T,y)}});function Gp(l,y,T){var H=Sr(y),Y=hu(y,H);T==null&&!(Hn(y)&&(Y.length||!H.length))&&(T=y,y=l,l=this,Y=hu(y,Sr(y)));var ne=!(Hn(T)&&"chain"in T)||!!T.chain,de=Ko(l);return yr(Y,function(ge){var we=y[ge];l[ge]=we,de&&(l.prototype[ge]=function(){var Ie=this.__chain__;if(ne||Ie){var Me=l(this.__wrapped__),Pe=Me.__actions__=mi(this.__actions__);return Pe.push({func:we,args:arguments,thisArg:l}),Me.__chain__=Ie,Me}return we.apply(l,k([this.value()],arguments))})}),l}function fz(){return Wt._===this&&(Wt._=BO),this}function qp(){}function pz(l){return l=Ft(l),Vt(function(y){return _1(y,l)})}var gz=Ap(E),mz=Ap(Ro),vz=Ap(W);function Hx(l){return Tp(l)?Oe(po(l)):KN(l)}function yz(l){return function(y){return l==null?e:Xs(l,y)}}var bz=G1(),wz=G1(!0);function Kp(){return[]}function Yp(){return!1}function xz(){return{}}function Cz(){return""}function Az(){return!0}function _z(l,y){if(l=Ft(l),l<1||l>V)return[];var T=oe,H=Ur(l,oe);y=wt(y),l-=oe;for(var Y=st(H,y);++T<l;)y(T);return Y}function kz(l){return It(l)?E(l,po):Ii(l)?[l]:mi(lx(dn(l)))}function Sz(l){var y=++FO;return dn(l)+y}var $z=vu(function(l,y){return l+y},0),Ez=_p("ceil"),Rz=vu(function(l,y){return l/y},1),Tz=_p("floor");function Iz(l){return l&&l.length?uu(l,bi,cp):e}function Lz(l,y){return l&&l.length?uu(l,wt(y,2),cp):e}function Mz(l){return Ae(l,bi)}function Oz(l,y){return Ae(l,wt(y,2))}function Nz(l){return l&&l.length?uu(l,bi,fp):e}function Dz(l,y){return l&&l.length?uu(l,wt(y,2),fp):e}var Pz=vu(function(l,y){return l*y},1),Fz=_p("round"),zz=vu(function(l,y){return l-y},0);function Bz(l){return l&&l.length?nt(l,bi):0}function jz(l,y){return l&&l.length?nt(l,wt(y,2)):0}return te.after=uP,te.ary=bx,te.assign=JP,te.assignIn=Mx,te.assignInWith=Ox,te.assignWith=Bp,te.at=ZP,te.before=wx,te.bind=Dp,te.bindAll=rz,te.bindKey=xx,te.castArray=CP,te.chain=mx,te.chunk=I2,te.compact=L2,te.concat=M2,te.cond=iz,te.conforms=oz,te.constant=Up,te.countBy=jD,te.create=QP,te.curry=Cx,te.curryRight=Ax,te.debounce=_x,te.defaults=eF,te.defaultsDeep=tF,te.defer=hP,te.delay=dP,te.difference=O2,te.differenceBy=N2,te.differenceWith=D2,te.drop=P2,te.dropRight=F2,te.dropRightWhile=z2,te.dropWhile=B2,te.fill=j2,te.filter=HD,te.flatMap=GD,te.flatMapDeep=qD,te.flatMapDepth=KD,te.flatten=dx,te.flattenDeep=W2,te.flattenDepth=H2,te.flip=fP,te.flow=az,te.flowRight=lz,te.fromPairs=U2,te.functions=lF,te.functionsIn=cF,te.groupBy=YD,te.initial=G2,te.intersection=q2,te.intersectionBy=K2,te.intersectionWith=Y2,te.invert=hF,te.invertBy=dF,te.invokeMap=JD,te.iteratee=Vp,te.keyBy=ZD,te.keys=Sr,te.keysIn=yi,te.map=_u,te.mapKeys=pF,te.mapValues=gF,te.matches=cz,te.matchesProperty=uz,te.memoize=Su,te.merge=mF,te.mergeWith=Nx,te.method=hz,te.methodOf=dz,te.mixin=Gp,te.negate=$u,te.nthArg=pz,te.omit=vF,te.omitBy=yF,te.once=pP,te.orderBy=QD,te.over=gz,te.overArgs=gP,te.overEvery=mz,te.overSome=vz,te.partial=Pp,te.partialRight=kx,te.partition=eP,te.pick=bF,te.pickBy=Dx,te.property=Hx,te.propertyOf=yz,te.pull=Q2,te.pullAll=px,te.pullAllBy=eD,te.pullAllWith=tD,te.pullAt=nD,te.range=bz,te.rangeRight=wz,te.rearg=mP,te.reject=rP,te.remove=rD,te.rest=vP,te.reverse=Op,te.sampleSize=oP,te.set=xF,te.setWith=CF,te.shuffle=sP,te.slice=iD,te.sortBy=cP,te.sortedUniq=hD,te.sortedUniqBy=dD,te.split=VF,te.spread=yP,te.tail=fD,te.take=pD,te.takeRight=gD,te.takeRightWhile=mD,te.takeWhile=vD,te.tap=LD,te.throttle=bP,te.thru=Au,te.toArray=Tx,te.toPairs=Px,te.toPairsIn=Fx,te.toPath=kz,te.toPlainObject=Lx,te.transform=AF,te.unary=wP,te.union=yD,te.unionBy=bD,te.unionWith=wD,te.uniq=xD,te.uniqBy=CD,te.uniqWith=AD,te.unset=_F,te.unzip=Np,te.unzipWith=gx,te.update=kF,te.updateWith=SF,te.values=Ua,te.valuesIn=$F,te.without=_D,te.words=jx,te.wrap=xP,te.xor=kD,te.xorBy=SD,te.xorWith=$D,te.zip=ED,te.zipObject=RD,te.zipObjectDeep=TD,te.zipWith=ID,te.entries=Px,te.entriesIn=Fx,te.extend=Mx,te.extendWith=Ox,Gp(te,te),te.add=$z,te.attempt=Wx,te.camelCase=IF,te.capitalize=zx,te.ceil=Ez,te.clamp=EF,te.clone=AP,te.cloneDeep=kP,te.cloneDeepWith=SP,te.cloneWith=_P,te.conformsTo=$P,te.deburr=Bx,te.defaultTo=sz,te.divide=Rz,te.endsWith=LF,te.eq=go,te.escape=MF,te.escapeRegExp=OF,te.every=WD,te.find=UD,te.findIndex=ux,te.findKey=nF,te.findLast=VD,te.findLastIndex=hx,te.findLastKey=rF,te.floor=Tz,te.forEach=vx,te.forEachRight=yx,te.forIn=iF,te.forInRight=oF,te.forOwn=sF,te.forOwnRight=aF,te.get=jp,te.gt=EP,te.gte=RP,te.has=uF,te.hasIn=Wp,te.head=fx,te.identity=bi,te.includes=XD,te.indexOf=V2,te.inRange=RF,te.invoke=fF,te.isArguments=Qs,te.isArray=It,te.isArrayBuffer=TP,te.isArrayLike=vi,te.isArrayLikeObject=ir,te.isBoolean=IP,te.isBuffer=ps,te.isDate=LP,te.isElement=MP,te.isEmpty=OP,te.isEqual=NP,te.isEqualWith=DP,te.isError=Fp,te.isFinite=PP,te.isFunction=Ko,te.isInteger=Sx,te.isLength=Eu,te.isMap=$x,te.isMatch=FP,te.isMatchWith=zP,te.isNaN=BP,te.isNative=jP,te.isNil=HP,te.isNull=WP,te.isNumber=Ex,te.isObject=Hn,te.isObjectLike=Xn,te.isPlainObject=zl,te.isRegExp=zp,te.isSafeInteger=UP,te.isSet=Rx,te.isString=Ru,te.isSymbol=Ii,te.isTypedArray=Ha,te.isUndefined=VP,te.isWeakMap=GP,te.isWeakSet=qP,te.join=X2,te.kebabCase=NF,te.last=Ki,te.lastIndexOf=J2,te.lowerCase=DF,te.lowerFirst=PF,te.lt=KP,te.lte=YP,te.max=Iz,te.maxBy=Lz,te.mean=Mz,te.meanBy=Oz,te.min=Nz,te.minBy=Dz,te.stubArray=Kp,te.stubFalse=Yp,te.stubObject=xz,te.stubString=Cz,te.stubTrue=Az,te.multiply=Pz,te.nth=Z2,te.noConflict=fz,te.noop=qp,te.now=ku,te.pad=FF,te.padEnd=zF,te.padStart=BF,te.parseInt=jF,te.random=TF,te.reduce=tP,te.reduceRight=nP,te.repeat=WF,te.replace=HF,te.result=wF,te.round=Fz,te.runInContext=ve,te.sample=iP,te.size=aP,te.snakeCase=UF,te.some=lP,te.sortedIndex=oD,te.sortedIndexBy=sD,te.sortedIndexOf=aD,te.sortedLastIndex=lD,te.sortedLastIndexBy=cD,te.sortedLastIndexOf=uD,te.startCase=GF,te.startsWith=qF,te.subtract=zz,te.sum=Bz,te.sumBy=jz,te.template=KF,te.times=_z,te.toFinite=Yo,te.toInteger=Ft,te.toLength=Ix,te.toLower=YF,te.toNumber=Yi,te.toSafeInteger=XP,te.toString=dn,te.toUpper=XF,te.trim=JF,te.trimEnd=ZF,te.trimStart=QF,te.truncate=ez,te.unescape=tz,te.uniqueId=Sz,te.upperCase=nz,te.upperFirst=Hp,te.each=vx,te.eachRight=yx,te.first=fx,Gp(te,(function(){var l={};return Io(te,function(y,T){hn.call(te.prototype,T)||(l[T]=y)}),l})(),{chain:!1}),te.VERSION=r,yr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){te[l].placeholder=te}),yr(["drop","take"],function(l,y){Xt.prototype[l]=function(T){T=T===e?1:wr(Ft(T),0);var H=this.__filtered__&&!y?new Xt(this):this.clone();return H.__filtered__?H.__takeCount__=Ur(T,H.__takeCount__):H.__views__.push({size:Ur(T,oe),type:l+(H.__dir__<0?"Right":"")}),H},Xt.prototype[l+"Right"]=function(T){return this.reverse()[l](T).reverse()}}),yr(["filter","map","takeWhile"],function(l,y){var T=y+1,H=T==_||T==z;Xt.prototype[l]=function(Y){var ne=this.clone();return ne.__iteratees__.push({iteratee:wt(Y,3),type:T}),ne.__filtered__=ne.__filtered__||H,ne}}),yr(["head","last"],function(l,y){var T="take"+(y?"Right":"");Xt.prototype[l]=function(){return this[T](1).value()[0]}}),yr(["initial","tail"],function(l,y){var T="drop"+(y?"":"Right");Xt.prototype[l]=function(){return this.__filtered__?new Xt(this):this[T](1)}}),Xt.prototype.compact=function(){return this.filter(bi)},Xt.prototype.find=function(l){return this.filter(l).head()},Xt.prototype.findLast=function(l){return this.reverse().find(l)},Xt.prototype.invokeMap=Vt(function(l,y){return typeof l=="function"?new Xt(this):this.map(function(T){return Ml(T,l,y)})}),Xt.prototype.reject=function(l){return this.filter($u(wt(l)))},Xt.prototype.slice=function(l,y){l=Ft(l);var T=this;return T.__filtered__&&(l>0||y<0)?new Xt(T):(l<0?T=T.takeRight(-l):l&&(T=T.drop(l)),y!==e&&(y=Ft(y),T=y<0?T.dropRight(-y):T.take(y-l)),T)},Xt.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},Xt.prototype.toArray=function(){return this.take(oe)},Io(Xt.prototype,function(l,y){var T=/^(?:filter|find|map|reject)|While$/.test(y),H=/^(?:head|last)$/.test(y),Y=te[H?"take"+(y=="last"?"Right":""):y],ne=H||/^find/.test(y);Y&&(te.prototype[y]=function(){var de=this.__wrapped__,ge=H?[1]:arguments,we=de instanceof Xt,Ie=ge[0],Me=we||It(de),Pe=function(qt){var Jt=Y.apply(te,k([qt],ge));return H&&Ze?Jt[0]:Jt};Me&&T&&typeof Ie=="function"&&Ie.length!=1&&(we=Me=!1);var Ze=this.__chain__,ut=!!this.__actions__.length,xt=ne&&!Ze,zt=we&&!ut;if(!ne&&Me){de=zt?de:new Xt(this);var vt=l.apply(de,ge);return vt.__actions__.push({func:Au,args:[Pe],thisArg:e}),new Vi(vt,Ze)}return xt&&zt?l.apply(this,ge):(vt=this.thru(Pe),xt?H?vt.value()[0]:vt.value():vt)})}),yr(["pop","push","shift","sort","splice","unshift"],function(l){var y=Ui[l],T=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",H=/^(?:pop|shift)$/.test(l);te.prototype[l]=function(){var Y=arguments;if(H&&!this.__chain__){var ne=this.value();return y.apply(It(ne)?ne:[],Y)}return this[T](function(de){return y.apply(It(de)?de:[],Y)})}}),Io(Xt.prototype,function(l,y){var T=te[y];if(T){var H=T.name+"";hn.call(Fa,H)||(Fa[H]=[]),Fa[H].push({name:y,func:T})}}),Fa[mu(e,x).name]=[{name:"wrapper",func:e}],Xt.prototype.clone=nN,Xt.prototype.reverse=rN,Xt.prototype.value=iN,te.prototype.at=MD,te.prototype.chain=OD,te.prototype.commit=ND,te.prototype.next=DD,te.prototype.plant=FD,te.prototype.reverse=zD,te.prototype.toJSON=te.prototype.valueOf=te.prototype.value=BD,te.prototype.first=te.prototype.head,Sl&&(te.prototype[Sl]=PD),te}),mn=un();cr?((cr.exports=mn)._=mn,Wr._=mn):Wt._=mn}).call(SS)})(oc,oc.exports)),oc.exports}var ES=$S();Mn("T",ic(ES)).debounce(function(){this.rebuildDisplayText()},300);var iv={exports:{}},ov;function RS(){return ov||(ov=1,(function(n,t){(function(){ace.require(["ace/mode/text"],function(e){n&&(n.exports=e)})})()})(iv)),iv.exports}RS();const TS=!0,dr="u-",IS="uplot",LS=dr+"hz",MS=dr+"vt",OS=dr+"title",NS=dr+"wrap",DS=dr+"under",PS=dr+"over",FS=dr+"axis",Ss=dr+"off",zS=dr+"select",BS=dr+"cursor-x",jS=dr+"cursor-y",WS=dr+"cursor-pt",HS=dr+"legend",US=dr+"live",VS=dr+"inline",GS=dr+"series",qS=dr+"marker",sv=dr+"label",KS=dr+"value",ol="width",sl="height",al="top",av="bottom",ca="left",lh="right",ch="#000",lv=ch+"0",uh="mousemove",cv="mousedown",hh="mouseup",uv="mouseenter",hv="mouseleave",dv="dblclick",YS="resize",XS="scroll",fv="change",sc="dppxchange",dh="--",ua=typeof window<"u",fh=ua?document:null,ha=ua?window:null,JS=ua?navigator:null;let sn,ac;function ph(){let n=devicePixelRatio;sn!=n&&(sn=n,ac&&vh(fv,ac,ph),ac=matchMedia(`(min-resolution: ${sn-.001}dppx) and (max-resolution: ${sn+.001}dppx)`),$s(fv,ac,ph),ha.dispatchEvent(new CustomEvent(sc)))}function wi(n,t){if(t!=null){let e=n.classList;!e.contains(t)&&e.add(t)}}function gh(n,t){let e=n.classList;e.contains(t)&&e.remove(t)}function $n(n,t,e){n.style[t]=e+"px"}function Qi(n,t,e,r){let d=fh.createElement(n);return t!=null&&wi(d,t),e?.insertBefore(d,r),d}function Ni(n,t){return Qi("div",n,t)}const pv=new WeakMap;function bo(n,t,e,r,d){let h="translate("+t+"px,"+e+"px)",f=pv.get(n);h!=f&&(n.style.transform=h,pv.set(n,h),t<0||e<0||t>r||e>d?wi(n,Ss):gh(n,Ss))}const gv=new WeakMap;function mv(n,t,e){let r=t+e,d=gv.get(n);r!=d&&(gv.set(n,r),n.style.background=t,n.style.borderColor=e)}const vv=new WeakMap;function yv(n,t,e,r){let d=t+""+e,h=vv.get(n);d!=h&&(vv.set(n,d),n.style.height=e+"px",n.style.width=t+"px",n.style.marginLeft=r?-t/2+"px":0,n.style.marginTop=r?-e/2+"px":0)}const mh={passive:!0},ZS={...mh,capture:!0};function $s(n,t,e,r){t.addEventListener(n,e,r?ZS:mh)}function vh(n,t,e,r){t.removeEventListener(n,e,mh)}ua&&ph();function eo(n,t,e,r){let d;e=e||0,r=r||t.length-1;let h=r<=2147483647;for(;r-e>1;)d=h?e+r>>1:Ci((e+r)/2),t[d]<n?e=d:r=d;return n-t[e]<=t[r]-n?e:r}function bv(n){return(t,e,r)=>{let d=-1,h=-1;for(let f=e;f<=r;f++)if(n(t[f])){d=f;break}for(let f=r;f>=e;f--)if(n(t[f])){h=f;break}return[d,h]}}const wv=n=>n!=null,xv=n=>n!=null&&n>0,lc=bv(wv),QS=bv(xv);function e$(n,t,e,r=0,d=!1){let h=d?QS:lc,f=d?xv:wv;[t,e]=h(n,t,e);let v=n[t],o=n[t];if(t>-1)if(r==1)v=n[t],o=n[e];else if(r==-1)v=n[e],o=n[t];else for(let p=t;p<=e;p++){let i=n[p];f(i)&&(i<v?v=i:i>o&&(o=i))}return[v??bn,o??-bn]}function cc(n,t,e,r){let d=_v(n),h=_v(t);n==t&&(d==-1?(n*=e,t/=e):(n/=e,t*=e));let f=e==10?Mo:kv,v=d==1?Ci:Di,o=h==1?Di:Ci,p=v(f(fr(n))),i=o(f(fr(t))),a=da(e,p),u=da(e,i);return e==10&&(p<0&&(a=wn(a,-p)),i<0&&(u=wn(u,-i))),r||e==2?(n=a*d,t=u*h):(n=Lv(n,a),t=dc(t,u)),[n,t]}function yh(n,t,e,r){let d=cc(n,t,e,r);return n==0&&(d[0]=0),t==0&&(d[1]=0),d}const bh=.1,Cv={mode:3,pad:bh},ll={pad:0,soft:null,mode:0},t$={min:ll,max:ll};function uc(n,t,e,r){return fc(e)?Av(n,t,e):(ll.pad=e,ll.soft=r?0:null,ll.mode=r?3:0,Av(n,t,t$))}function nn(n,t){return n??t}function n$(n,t,e){for(t=nn(t,0),e=nn(e,n.length-1);t<=e;){if(n[t]!=null)return!0;t++}return!1}function Av(n,t,e){let r=e.min,d=e.max,h=nn(r.pad,0),f=nn(d.pad,0),v=nn(r.hard,-bn),o=nn(d.hard,bn),p=nn(r.soft,bn),i=nn(d.soft,-bn),a=nn(r.mode,0),u=nn(d.mode,0),g=t-n,s=Mo(g),c=Yr(fr(n),fr(t)),m=Mo(c),w=fr(m-s);(g<1e-24||w>10)&&(g=0,(n==0||t==0)&&(g=1e-24,a==2&&p!=bn&&(h=0),u==2&&i!=-bn&&(f=0)));let x=g||c||1e3,R=Mo(x),S=da(10,Ci(R)),A=x*(g==0?n==0?.1:1:h),C=wn(Lv(n-A,S/10),24),O=n>=p&&(a==1||a==3&&C<=p||a==2&&C>=p)?p:bn,N=Yr(v,C<O&&n>=O?O:to(O,C)),M=x*(g==0?t==0?.1:1:f),L=wn(dc(t+M,S/10),24),j=t<=i&&(u==1||u==3&&L>=i||u==2&&L<=i)?i:-bn,F=to(o,L>j&&t<=j?j:Yr(j,L));return N==F&&N==0&&(F=100),[N,F]}const r$=new Intl.NumberFormat(ua?JS.language:"en-US"),wh=n=>r$.format(n),xi=Math,hc=xi.PI,fr=xi.abs,Ci=xi.floor,pr=xi.round,Di=xi.ceil,to=xi.min,Yr=xi.max,da=xi.pow,_v=xi.sign,Mo=xi.log10,kv=xi.log2,i$=(n,t=1)=>xi.sinh(n)*t,xh=(n,t=1)=>xi.asinh(n/t),bn=1/0;function Sv(n){return(Mo((n^n>>31)-(n>>31))|0)+1}function Ch(n,t,e){return to(Yr(n,t),e)}function $v(n){return typeof n=="function"}function Kt(n){return $v(n)?n:()=>n}const o$=()=>{},Ev=n=>n,Rv=(n,t)=>t,s$=n=>null,Tv=n=>!0,Iv=(n,t)=>n==t,a$=/\.\d*?(?=9{6,}|0{6,})/gm,Es=n=>{if(Ov(n)||Qo.has(n))return n;const t=`${n}`,e=t.match(a$);if(e==null)return n;let r=e[0].length-1;if(t.indexOf("e-")!=-1){let[d,h]=t.split("e");return+`${Es(d)}e${h}`}return wn(n,r)};function Rs(n,t){return Es(wn(Es(n/t))*t)}function dc(n,t){return Es(Di(Es(n/t))*t)}function Lv(n,t){return Es(Ci(Es(n/t))*t)}function wn(n,t=0){if(Ov(n))return n;let e=10**t,r=n*e*(1+Number.EPSILON);return pr(r)/e}const Qo=new Map;function Mv(n){return((""+n).split(".")[1]||"").length}function cl(n,t,e,r){let d=[],h=r.map(Mv);for(let f=t;f<e;f++){let v=fr(f),o=wn(da(n,f),v);for(let p=0;p<r.length;p++){let i=n==10?+`${r[p]}e${f}`:r[p]*o,a=(f>=0?0:v)+(f>=h[p]?0:h[p]),u=n==10?i:wn(i,a);d.push(u),Qo.set(u,a)}}return d}const ul={},Ah=[],fa=[null,null],es=Array.isArray,Ov=Number.isInteger,l$=n=>n===void 0;function Nv(n){return typeof n=="string"}function fc(n){let t=!1;if(n!=null){let e=n.constructor;t=e==null||e==Object}return t}function c$(n){return n!=null&&typeof n=="object"}const u$=Object.getPrototypeOf(Uint8Array),Dv="__proto__";function pa(n,t=fc){let e;if(es(n)){let r=n.find(d=>d!=null);if(es(r)||t(r)){e=Array(n.length);for(let d=0;d<n.length;d++)e[d]=pa(n[d],t)}else e=n.slice()}else if(n instanceof u$)e=n.slice();else if(t(n)){e={};for(let r in n)r!=Dv&&(e[r]=pa(n[r],t))}else e=n;return e}function sr(n){let t=arguments;for(let e=1;e<t.length;e++){let r=t[e];for(let d in r)d!=Dv&&(fc(n[d])?sr(n[d],pa(r[d])):n[d]=pa(r[d]))}return n}const h$=0,d$=1,f$=2;function p$(n,t,e){for(let r=0,d,h=-1;r<t.length;r++){let f=t[r];if(f>h){for(d=f-1;d>=0&&n[d]==null;)n[d--]=null;for(d=f+1;d<e&&n[d]==null;)n[h=d++]=null}}}function g$(n,t){if(y$(n)){let f=n[0].slice();for(let v=1;v<n.length;v++)f.push(...n[v].slice(1));return b$(f[0])||(f=v$(f)),f}let e=new Set;for(let f=0;f<n.length;f++){let v=n[f][0],o=v.length;for(let p=0;p<o;p++)e.add(v[p])}let r=[Array.from(e).sort((f,v)=>f-v)],d=r[0].length,h=new Map;for(let f=0;f<d;f++)h.set(r[0][f],f);for(let f=0;f<n.length;f++){let v=n[f],o=v[0];for(let p=1;p<v.length;p++){let i=v[p],a=Array(d).fill(void 0),u=t?t[f][p]:d$,g=[];for(let s=0;s<i.length;s++){let c=i[s],m=h.get(o[s]);c===null?u!=h$&&(a[m]=c,u==f$&&g.push(m)):a[m]=c}p$(a,g,d),r.push(a)}}return r}const m$=typeof queueMicrotask>"u"?n=>Promise.resolve().then(n):queueMicrotask;function v$(n){let t=n[0],e=t.length,r=Array(e);for(let h=0;h<r.length;h++)r[h]=h;r.sort((h,f)=>t[h]-t[f]);let d=[];for(let h=0;h<n.length;h++){let f=n[h],v=Array(e);for(let o=0;o<e;o++)v[o]=f[r[o]];d.push(v)}return d}function y$(n){let t=n[0][0],e=t.length;for(let r=1;r<n.length;r++){let d=n[r][0];if(d.length!=e)return!1;if(d!=t){for(let h=0;h<e;h++)if(d[h]!=t[h])return!1}}return!0}function b$(n,t=100){const e=n.length;if(e<=1)return!0;let r=0,d=e-1;for(;r<=d&&n[r]==null;)r++;for(;d>=r&&n[d]==null;)d--;if(d<=r)return!0;const h=Yr(1,Ci((d-r+1)/t));for(let f=n[r],v=r+h;v<=d;v+=h){const o=n[v];if(o!=null){if(o<=f)return!1;f=o}}return!0}const Pv=["January","February","March","April","May","June","July","August","September","October","November","December"],Fv=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function zv(n){return n.slice(0,3)}const w$=Fv.map(zv),x$=Pv.map(zv),C$={MMMM:Pv,MMM:x$,WWWW:Fv,WWW:w$};function hl(n){return(n<10?"0":"")+n}function A$(n){return(n<10?"00":n<100?"0":"")+n}const _$={YYYY:n=>n.getFullYear(),YY:n=>(n.getFullYear()+"").slice(2),MMMM:(n,t)=>t.MMMM[n.getMonth()],MMM:(n,t)=>t.MMM[n.getMonth()],MM:n=>hl(n.getMonth()+1),M:n=>n.getMonth()+1,DD:n=>hl(n.getDate()),D:n=>n.getDate(),WWWW:(n,t)=>t.WWWW[n.getDay()],WWW:(n,t)=>t.WWW[n.getDay()],HH:n=>hl(n.getHours()),H:n=>n.getHours(),h:n=>{let t=n.getHours();return t==0?12:t>12?t-12:t},AA:n=>n.getHours()>=12?"PM":"AM",aa:n=>n.getHours()>=12?"pm":"am",a:n=>n.getHours()>=12?"p":"a",mm:n=>hl(n.getMinutes()),m:n=>n.getMinutes(),ss:n=>hl(n.getSeconds()),s:n=>n.getSeconds(),fff:n=>A$(n.getMilliseconds())};function _h(n,t){t=t||C$;let e=[],r=/\{([a-z]+)\}|[^{]+/gi,d;for(;d=r.exec(n);)e.push(d[0][0]=="{"?_$[d[1]]:d[0]);return h=>{let f="";for(let v=0;v<e.length;v++)f+=typeof e[v]=="string"?e[v]:e[v](h,t);return f}}const k$=new Intl.DateTimeFormat().resolvedOptions().timeZone;function S$(n,t){let e;return t=="UTC"||t=="Etc/UTC"?e=new Date(+n+n.getTimezoneOffset()*6e4):t==k$?e=n:(e=new Date(n.toLocaleString("en-US",{timeZone:t})),e.setMilliseconds(n.getMilliseconds())),e}const Bv=n=>n%1==0,pc=[1,2,2.5,5],$$=cl(10,-32,0,pc),jv=cl(10,0,32,pc),E$=jv.filter(Bv),Ts=$$.concat(jv),kh=`
|
|
1479
|
+
`,Wv="{YYYY}",Hv=kh+Wv,Uv="{M}/{D}",dl=kh+Uv,gc=dl+"/{YY}",Vv="{aa}",R$="{h}:{mm}",ga=R$+Vv,Gv=kh+ga,qv=":{ss}",ln=null;function Kv(n){let t=n*1e3,e=t*60,r=e*60,d=r*24,h=d*30,f=d*365,v=(n==1?cl(10,0,3,pc).filter(Bv):cl(10,-3,0,pc)).concat([t,t*5,t*10,t*15,t*30,e,e*5,e*10,e*15,e*30,r,r*2,r*3,r*4,r*6,r*8,r*12,d,d*2,d*3,d*4,d*5,d*6,d*7,d*8,d*9,d*10,d*15,h,h*2,h*3,h*4,h*6,f,f*2,f*5,f*10,f*25,f*50,f*100]);const o=[[f,Wv,ln,ln,ln,ln,ln,ln,1],[d*28,"{MMM}",Hv,ln,ln,ln,ln,ln,1],[d,Uv,Hv,ln,ln,ln,ln,ln,1],[r,"{h}"+Vv,gc,ln,dl,ln,ln,ln,1],[e,ga,gc,ln,dl,ln,ln,ln,1],[t,qv,gc+" "+ga,ln,dl+" "+ga,ln,Gv,ln,1],[n,qv+".{fff}",gc+" "+ga,ln,dl+" "+ga,ln,Gv,ln,1]];function p(i){return(a,u,g,s,c,m)=>{let w=[],x=c>=f,R=c>=h&&c<f,S=i(g),A=wn(S*n,3),C=Sh(S.getFullYear(),x?0:S.getMonth(),R||x?1:S.getDate()),O=wn(C*n,3);if(R||x){let N=R?c/h:0,M=x?c/f:0,L=A==O?A:wn(Sh(C.getFullYear()+M,C.getMonth()+N,1)*n,3),j=new Date(pr(L/n)),F=j.getFullYear(),D=j.getMonth();for(let $=0;L<=s;$++){let _=Sh(F+M*$,D+N*$,1),I=_-i(wn(_*n,3));L=wn((+_+I)*n,3),L<=s&&w.push(L)}}else{let N=c>=d?d:c,M=Ci(g)-Ci(A),L=O+M+dc(A-O,N);w.push(L);let j=i(L),F=j.getHours()+j.getMinutes()/e+j.getSeconds()/r,D=c/r,$=a.axes[u]._space,_=m/$;for(;L=wn(L+c,n==1?0:3),!(L>s);)if(D>1){let I=Ci(wn(F+D,6))%24,z=i(L).getHours()-I;z>1&&(z=-1),L-=z*r,F=(F+D)%24;let U=w[w.length-1];wn((L-U)/c,3)*_>=.7&&w.push(L)}else w.push(L)}return w}}return[v,o,p]}const[T$,I$,L$]=Kv(1),[M$,O$,N$]=Kv(.001);cl(2,-53,53,[1]);function Yv(n,t){return n.map(e=>e.map((r,d)=>d==0||d==8||r==null?r:t(d==1||e[8]==0?r:e[1]+r)))}function Xv(n,t){return(e,r,d,h,f)=>{let v=t.find(s=>f>=s[0])||t[t.length-1],o,p,i,a,u,g;return r.map(s=>{let c=n(s),m=c.getFullYear(),w=c.getMonth(),x=c.getDate(),R=c.getHours(),S=c.getMinutes(),A=c.getSeconds(),C=m!=o&&v[2]||w!=p&&v[3]||x!=i&&v[4]||R!=a&&v[5]||S!=u&&v[6]||A!=g&&v[7]||v[1];return o=m,p=w,i=x,a=R,u=S,g=A,C(c)})}}function D$(n,t){let e=_h(t);return(r,d,h,f,v)=>d.map(o=>e(n(o)))}function Sh(n,t,e){return new Date(n,t,e)}function Jv(n,t){return t(n)}const P$="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function Zv(n,t){return(e,r,d,h)=>h==null?dh:t(n(r))}function F$(n,t){let e=n.series[t];return e.width?e.stroke(n,t):e.points.width?e.points.stroke(n,t):null}function z$(n,t){return n.series[t].fill(n,t)}const B$={show:!0,live:!0,isolate:!1,mount:o$,markers:{show:!0,width:2,stroke:F$,fill:z$,dash:"solid"},idx:null,idxs:null,values:[]};function j$(n,t){let e=n.cursor.points,r=Ni(),d=e.size(n,t);$n(r,ol,d),$n(r,sl,d);let h=d/-2;$n(r,"marginLeft",h),$n(r,"marginTop",h);let f=e.width(n,t,d);return f&&$n(r,"borderWidth",f),r}function W$(n,t){let e=n.series[t].points;return e._fill||e._stroke}function H$(n,t){let e=n.series[t].points;return e._stroke||e._fill}function U$(n,t){return n.series[t].points.size}const $h=[0,0];function V$(n,t,e){return $h[0]=t,$h[1]=e,$h}function mc(n,t,e,r=!0){return d=>{d.button==0&&(!r||d.target==t)&&e(d)}}function Eh(n,t,e,r=!0){return d=>{(!r||d.target==t)&&e(d)}}const G$={show:!0,x:!0,y:!0,lock:!1,move:V$,points:{one:!1,show:j$,size:U$,width:0,stroke:H$,fill:W$},bind:{mousedown:mc,mouseup:mc,click:mc,dblclick:mc,mousemove:Eh,mouseleave:Eh,mouseenter:Eh},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(n,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(n,t,e,r,d)=>r-d,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},Qv={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Rh=sr({},Qv,{filter:Rv}),ey=sr({},Rh,{size:10}),ty=sr({},Qv,{show:!1}),Th='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"',ny="bold "+Th,ry=1.5,iy={show:!0,scale:"x",stroke:ch,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:ny,side:2,grid:Rh,ticks:ey,border:ty,font:Th,lineGap:ry,rotate:0},q$="Value",K$="Time",oy={show:!0,scale:"x",auto:!1,sorted:1,min:bn,max:-bn,idxs:[]};function Y$(n,t,e,r,d){return t.map(h=>h==null?"":wh(h))}function X$(n,t,e,r,d,h,f){let v=[],o=Qo.get(d)||0;e=f?e:wn(dc(e,d),o);for(let p=e;p<=r;p=wn(p+d,o))v.push(Object.is(p,-0)?0:p);return v}function Ih(n,t,e,r,d,h,f){const v=[],o=n.scales[n.axes[t].scale].log,p=o==10?Mo:kv,i=Ci(p(e));d=da(o,i),o==10&&(d=Ts[eo(d,Ts)]);let a=e,u=d*o;o==10&&(u=Ts[eo(u,Ts)]);do v.push(a),a=a+d,o==10&&!Qo.has(a)&&(a=wn(a,Qo.get(d))),a>=u&&(d=a,u=d*o,o==10&&(u=Ts[eo(u,Ts)]));while(a<=r);return v}function J$(n,t,e,r,d,h,f){let v=n.scales[n.axes[t].scale].asinh,o=r>v?Ih(n,t,Yr(v,e),r,d):[v],p=r>=0&&e<=0?[0]:[];return(e<-v?Ih(n,t,Yr(v,-r),-e,d):[v]).reverse().map(i=>-i).concat(p,o)}const sy=/./,Z$=/[12357]/,Q$=/[125]/,ay=/1/,Lh=(n,t,e,r)=>n.map((d,h)=>t==4&&d==0||h%r==0&&e.test(d.toExponential()[d<0?1:0])?d:null);function eE(n,t,e,r,d){let h=n.axes[e],f=h.scale,v=n.scales[f],o=n.valToPos,p=h._space,i=o(10,f),a=o(9,f)-i>=p?sy:o(7,f)-i>=p?Z$:o(5,f)-i>=p?Q$:ay;if(a==ay){let u=fr(o(1,f)-i);if(u<p)return Lh(t.slice().reverse(),v.distr,a,Di(p/u)).reverse()}return Lh(t,v.distr,a,1)}function tE(n,t,e,r,d){let h=n.axes[e],f=h.scale,v=h._space,o=n.valToPos,p=fr(o(1,f)-o(2,f));return p<v?Lh(t.slice().reverse(),3,sy,Di(v/p)).reverse():t}function nE(n,t,e,r){return r==null?dh:t==null?"":wh(t)}const ly={show:!0,scale:"y",stroke:ch,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:ny,side:3,grid:Rh,ticks:ey,border:ty,font:Th,lineGap:ry,rotate:0};function rE(n,t){let e=3+(n||1)*2;return wn(e*t,3)}function iE(n,t){let{scale:e,idxs:r}=n.series[0],d=n._data[0],h=n.valToPos(d[r[0]],e,!0),f=n.valToPos(d[r[1]],e,!0),v=fr(f-h),o=n.series[t],p=v/(o.points.space*sn);return r[1]-r[0]<=p}const cy={scale:null,auto:!0,sorted:0,min:bn,max:-bn},uy=(n,t,e,r,d)=>d,hy={show:!0,auto:!0,sorted:0,gaps:uy,alpha:1,facets:[sr({},cy,{scale:"x"}),sr({},cy,{scale:"y"})]},dy={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:uy,alpha:1,points:{show:iE,filter:null},values:null,min:bn,max:-bn,idxs:[],path:null,clip:null};function oE(n,t,e,r,d){return e/10}const fy={time:TS,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},sE=sr({},fy,{time:!1,ori:1}),py={};function gy(n,t){let e=py[n];return e||(e={key:n,plots:[],sub(r){e.plots.push(r)},unsub(r){e.plots=e.plots.filter(d=>d!=r)},pub(r,d,h,f,v,o,p){for(let i=0;i<e.plots.length;i++)e.plots[i]!=d&&e.plots[i].pub(r,d,h,f,v,o,p)}},n!=null&&(py[n]=e)),e}const ma=1,Mh=2;function Is(n,t,e){const r=n.mode,d=n.series[t],h=r==2?n._data[t]:n._data,f=n.scales,v=n.bbox;let o=h[0],p=r==2?h[1]:h[t],i=r==2?f[d.facets[0].scale]:f[n.series[0].scale],a=r==2?f[d.facets[1].scale]:f[d.scale],u=v.left,g=v.top,s=v.width,c=v.height,m=n.valToPosH,w=n.valToPosV;return i.ori==0?e(d,o,p,i,a,m,w,u,g,s,c,yc,va,wc,yy,wy):e(d,o,p,i,a,w,m,g,u,c,s,bc,ya,Dh,by,xy)}function Oh(n,t){let e=0,r=0,d=nn(n.bands,Ah);for(let h=0;h<d.length;h++){let f=d[h];f.series[0]==t?e=f.dir:f.series[1]==t&&(f.dir==1?r|=1:r|=2)}return[e,r==1?-1:r==2?1:r==3?2:0]}function aE(n,t,e,r,d){let h=n.mode,f=n.series[t],v=h==2?f.facets[1].scale:f.scale,o=n.scales[v];return d==-1?o.min:d==1?o.max:o.distr==3?o.dir==1?o.min:o.max:0}function Oo(n,t,e,r,d,h){return Is(n,t,(f,v,o,p,i,a,u,g,s,c,m)=>{let w=f.pxRound;const x=p.dir*(p.ori==0?1:-1),R=p.ori==0?va:ya;let S,A;x==1?(S=e,A=r):(S=r,A=e);let C=w(a(v[S],p,c,g)),O=w(u(o[S],i,m,s)),N=w(a(v[A],p,c,g)),M=w(u(h==1?i.max:i.min,i,m,s)),L=new Path2D(d);return R(L,N,M),R(L,C,M),R(L,C,O),L})}function vc(n,t,e,r,d,h){let f=null;if(n.length>0){f=new Path2D;const v=t==0?wc:Dh;let o=e;for(let a=0;a<n.length;a++){let u=n[a];if(u[1]>u[0]){let g=u[0]-o;g>0&&v(f,o,r,g,r+h),o=u[1]}}let p=e+d-o,i=10;p>0&&v(f,o,r-i/2,p,r+h+i)}return f}function lE(n,t,e){let r=n[n.length-1];r&&r[0]==t?r[1]=e:n.push([t,e])}function Nh(n,t,e,r,d,h,f){let v=[],o=n.length;for(let p=d==1?e:r;p>=e&&p<=r;p+=d)if(t[p]===null){let i=p,a=p;if(d==1)for(;++p<=r&&t[p]===null;)a=p;else for(;--p>=e&&t[p]===null;)a=p;let u=h(n[i]),g=a==i?u:h(n[a]),s=i-d;u=f<=0&&s>=0&&s<o?h(n[s]):u;let c=a+d;g=f>=0&&c>=0&&c<o?h(n[c]):g,g>=u&&v.push([u,g])}return v}function my(n){return n==0?Ev:n==1?pr:t=>Rs(t,n)}function vy(n){let t=n==0?yc:bc,e=n==0?(d,h,f,v,o,p)=>{d.arcTo(h,f,v,o,p)}:(d,h,f,v,o,p)=>{d.arcTo(f,h,o,v,p)},r=n==0?(d,h,f,v,o)=>{d.rect(h,f,v,o)}:(d,h,f,v,o)=>{d.rect(f,h,o,v)};return(d,h,f,v,o,p=0,i=0)=>{p==0&&i==0?r(d,h,f,v,o):(p=to(p,v/2,o/2),i=to(i,v/2,o/2),t(d,h+p,f),e(d,h+v,f,h+v,f+o,p),e(d,h+v,f+o,h,f+o,i),e(d,h,f+o,h,f,i),e(d,h,f,h+v,f,p),d.closePath())}}const yc=(n,t,e)=>{n.moveTo(t,e)},bc=(n,t,e)=>{n.moveTo(e,t)},va=(n,t,e)=>{n.lineTo(t,e)},ya=(n,t,e)=>{n.lineTo(e,t)},wc=vy(0),Dh=vy(1),yy=(n,t,e,r,d,h)=>{n.arc(t,e,r,d,h)},by=(n,t,e,r,d,h)=>{n.arc(e,t,r,d,h)},wy=(n,t,e,r,d,h,f)=>{n.bezierCurveTo(t,e,r,d,h,f)},xy=(n,t,e,r,d,h,f)=>{n.bezierCurveTo(e,t,d,r,f,h)};function Cy(n){return(t,e,r,d,h)=>Is(t,e,(f,v,o,p,i,a,u,g,s,c,m)=>{let{pxRound:w,points:x}=f,R,S;p.ori==0?(R=yc,S=yy):(R=bc,S=by);const A=wn(x.width*sn,3);let C=(x.size-x.width)/2*sn,O=wn(C*2,3),N=new Path2D,M=new Path2D,{left:L,top:j,width:F,height:D}=t.bbox;wc(M,L-O,j-O,F+O*2,D+O*2);const $=_=>{if(o[_]!=null){let I=w(a(v[_],p,c,g)),z=w(u(o[_],i,m,s));R(N,I+C,z),S(N,I,z,C,0,hc*2)}};if(h)h.forEach($);else for(let _=r;_<=d;_++)$(_);return{stroke:A>0?N:null,fill:N,clip:M,flags:ma|Mh}})}function Ay(n){return(t,e,r,d,h,f)=>{r!=d&&(h!=r&&f!=r&&n(t,e,r),h!=d&&f!=d&&n(t,e,d),n(t,e,f))}}const cE=Ay(va),uE=Ay(ya);function _y(n){const t=nn(n?.alignGaps,0);return(e,r,d,h)=>Is(e,r,(f,v,o,p,i,a,u,g,s,c,m)=>{[d,h]=lc(o,d,h);let w=f.pxRound,x=F=>w(a(F,p,c,g)),R=F=>w(u(F,i,m,s)),S,A;p.ori==0?(S=va,A=cE):(S=ya,A=uE);const C=p.dir*(p.ori==0?1:-1),O={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ma},N=O.stroke;let M=!1;if(h-d>=c*4){let F=oe=>e.posToVal(oe,p.key,!0),D=null,$=null,_,I,z,U=x(v[C==1?d:h]),V=x(v[d]),K=x(v[h]),Z=F(C==1?V+1:K-1);for(let oe=C==1?d:h;oe>=d&&oe<=h;oe+=C){let ee=v[oe],re=(C==1?ee<Z:ee>Z)?U:x(ee),ce=o[oe];re==U?ce!=null?(I=ce,D==null?(S(N,re,R(I)),_=D=$=I):I<D?D=I:I>$&&($=I)):ce===null&&(M=!0):(D!=null&&A(N,U,R(D),R($),R(_),R(I)),ce!=null?(I=ce,S(N,re,R(I)),D=$=_=I):(D=$=null,ce===null&&(M=!0)),U=re,Z=F(U+C))}D!=null&&D!=$&&z!=U&&A(N,U,R(D),R($),R(_),R(I))}else for(let F=C==1?d:h;F>=d&&F<=h;F+=C){let D=o[F];D===null?M=!0:D!=null&&S(N,x(v[F]),R(D))}let[L,j]=Oh(e,r);if(f.fill!=null||L!=0){let F=O.fill=new Path2D(N),D=f.fillTo(e,r,f.min,f.max,L),$=R(D),_=x(v[d]),I=x(v[h]);C==-1&&([I,_]=[_,I]),S(F,I,$),S(F,_,$)}if(!f.spanGaps){let F=[];M&&F.push(...Nh(v,o,d,h,C,x,t)),O.gaps=F=f.gaps(e,r,d,h,F),O.clip=vc(F,p.ori,g,s,c,m)}return j!=0&&(O.band=j==2?[Oo(e,r,d,h,N,-1),Oo(e,r,d,h,N,1)]:Oo(e,r,d,h,N,j)),O})}function hE(n){const t=nn(n.align,1),e=nn(n.ascDesc,!1),r=nn(n.alignGaps,0),d=nn(n.extend,!1);return(h,f,v,o)=>Is(h,f,(p,i,a,u,g,s,c,m,w,x,R)=>{[v,o]=lc(a,v,o);let S=p.pxRound,{left:A,width:C}=h.bbox,O=K=>S(s(K,u,x,m)),N=K=>S(c(K,g,R,w)),M=u.ori==0?va:ya;const L={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ma},j=L.stroke,F=u.dir*(u.ori==0?1:-1);let D=N(a[F==1?v:o]),$=O(i[F==1?v:o]),_=$,I=$;d&&t==-1&&(I=A,M(j,I,D)),M(j,$,D);for(let K=F==1?v:o;K>=v&&K<=o;K+=F){let Z=a[K];if(Z==null)continue;let oe=O(i[K]),ee=N(Z);t==1?M(j,oe,D):M(j,_,ee),M(j,oe,ee),D=ee,_=oe}let z=_;d&&t==1&&(z=A+C,M(j,z,D));let[U,V]=Oh(h,f);if(p.fill!=null||U!=0){let K=L.fill=new Path2D(j),Z=p.fillTo(h,f,p.min,p.max,U),oe=N(Z);M(K,z,oe),M(K,I,oe)}if(!p.spanGaps){let K=[];K.push(...Nh(i,a,v,o,F,O,r));let Z=p.width*sn/2,oe=e||t==1?Z:-Z,ee=e||t==-1?-Z:Z;K.forEach(re=>{re[0]+=oe,re[1]+=ee}),L.gaps=K=p.gaps(h,f,v,o,K),L.clip=vc(K,u.ori,m,w,x,R)}return V!=0&&(L.band=V==2?[Oo(h,f,v,o,j,-1),Oo(h,f,v,o,j,1)]:Oo(h,f,v,o,j,V)),L})}function ky(n,t,e,r,d,h,f=bn){if(n.length>1){let v=null;for(let o=0,p=1/0;o<n.length;o++)if(t[o]!==void 0){if(v!=null){let i=fr(n[o]-n[v]);i<p&&(p=i,f=fr(e(n[o],r,d,h)-e(n[v],r,d,h)))}v=o}}return f}function dE(n){n=n||ul;const t=nn(n.size,[.6,bn,1]),e=n.align||0,r=n.gap||0;let d=n.radius;d=d==null?[0,0]:typeof d=="number"?[d,0]:d;const h=Kt(d),f=1-t[0],v=nn(t[1],bn),o=nn(t[2],1),p=nn(n.disp,ul),i=nn(n.each,g=>{}),{fill:a,stroke:u}=p;return(g,s,c,m)=>Is(g,s,(w,x,R,S,A,C,O,N,M,L,j)=>{let F=w.pxRound,D=e,$=r*sn,_=v*sn,I=o*sn,z,U;S.ori==0?[z,U]=h(g,s):[U,z]=h(g,s);const V=S.dir*(S.ori==0?1:-1);let K=S.ori==0?wc:Dh,Z=S.ori==0?i:(Qe,jt,En,Rn,Tn,xn,Cn)=>{i(Qe,jt,En,Tn,Rn,Cn,xn)},oe=nn(g.bands,Ah).find(Qe=>Qe.series[0]==s),ee=oe!=null?oe.dir:0,re=w.fillTo(g,s,w.min,w.max,ee),ce=F(O(re,A,j,M)),ie,fe,pe,$e=L,Re=F(w.width*sn),Ge=!1,qe=null,ct=null,ot=null,dt=null;a!=null&&(Re==0||u!=null)&&(Ge=!0,qe=a.values(g,s,c,m),ct=new Map,new Set(qe).forEach(Qe=>{Qe!=null&&ct.set(Qe,new Path2D)}),Re>0&&(ot=u.values(g,s,c,m),dt=new Map,new Set(ot).forEach(Qe=>{Qe!=null&&dt.set(Qe,new Path2D)})));let{x0:Lt,size:gr}=p;if(Lt!=null&&gr!=null){D=1,x=Lt.values(g,s,c,m),Lt.unit==2&&(x=x.map(jt=>g.posToVal(N+jt*L,S.key,!0)));let Qe=gr.values(g,s,c,m);gr.unit==2?fe=Qe[0]*L:fe=C(Qe[0],S,L,N)-C(0,S,L,N),$e=ky(x,R,C,S,L,N,$e),pe=$e-fe+$}else $e=ky(x,R,C,S,L,N,$e),pe=$e*f+$,fe=$e-pe;pe<1&&(pe=0),Re>=fe/2&&(Re=0),pe<5&&(F=Ev);let $t=pe>0,xr=$e-pe-($t?Re:0);fe=F(Ch(xr,I,_)),ie=(D==0?fe/2:D==V?0:fe)-D*V*((D==0?$/2:0)+($t?Re/2:0));const Bn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},er=Ge?null:new Path2D;let pn=null;if(oe!=null)pn=g.data[oe.series[1]];else{let{y0:Qe,y1:jt}=p;Qe!=null&&jt!=null&&(R=jt.values(g,s,c,m),pn=Qe.values(g,s,c,m))}let tr=z*fe,yt=U*fe;for(let Qe=V==1?c:m;Qe>=c&&Qe<=m;Qe+=V){let jt=R[Qe];if(jt==null)continue;if(pn!=null){let Qt=pn[Qe]??0;if(jt-Qt==0)continue;ce=O(Qt,A,j,M)}let En=S.distr!=2||p!=null?x[Qe]:Qe,Rn=C(En,S,L,N),Tn=O(nn(jt,re),A,j,M),xn=F(Rn-ie),Cn=F(Yr(Tn,ce)),Vn=F(to(Tn,ce)),nr=Cn-Vn;if(jt!=null){let Qt=jt<0?yt:tr,Gn=jt<0?tr:yt;Ge?(Re>0&&ot[Qe]!=null&&K(dt.get(ot[Qe]),xn,Vn+Ci(Re/2),fe,Yr(0,nr-Re),Qt,Gn),qe[Qe]!=null&&K(ct.get(qe[Qe]),xn,Vn+Ci(Re/2),fe,Yr(0,nr-Re),Qt,Gn)):K(er,xn,Vn+Ci(Re/2),fe,Yr(0,nr-Re),Qt,Gn),Z(g,s,Qe,xn-Re/2,Vn,fe+Re,nr)}}return Re>0?Bn.stroke=Ge?dt:er:Ge||(Bn._fill=w.width==0?w._fill:w._stroke??w._fill,Bn.width=0),Bn.fill=Ge?ct:er,Bn})}function fE(n,t){const e=nn(t?.alignGaps,0);return(r,d,h,f)=>Is(r,d,(v,o,p,i,a,u,g,s,c,m,w)=>{[h,f]=lc(p,h,f);let x=v.pxRound,R=z=>x(u(z,i,m,s)),S=z=>x(g(z,a,w,c)),A,C,O;i.ori==0?(A=yc,O=va,C=wy):(A=bc,O=ya,C=xy);const N=i.dir*(i.ori==0?1:-1);let M=R(o[N==1?h:f]),L=M,j=[],F=[];for(let z=N==1?h:f;z>=h&&z<=f;z+=N)if(p[z]!=null){let U=o[z],V=R(U);j.push(L=V),F.push(S(p[z]))}const D={stroke:n(j,F,A,O,C,x),fill:null,clip:null,band:null,gaps:null,flags:ma},$=D.stroke;let[_,I]=Oh(r,d);if(v.fill!=null||_!=0){let z=D.fill=new Path2D($),U=v.fillTo(r,d,v.min,v.max,_),V=S(U);O(z,L,V),O(z,M,V)}if(!v.spanGaps){let z=[];z.push(...Nh(o,p,h,f,N,R,e)),D.gaps=z=v.gaps(r,d,h,f,z),D.clip=vc(z,i.ori,s,c,m,w)}return I!=0&&(D.band=I==2?[Oo(r,d,h,f,$,-1),Oo(r,d,h,f,$,1)]:Oo(r,d,h,f,$,I)),D})}function pE(n){return fE(gE,n)}function gE(n,t,e,r,d,h){const f=n.length;if(f<2)return null;const v=new Path2D;if(e(v,n[0],t[0]),f==2)r(v,n[1],t[1]);else{let o=Array(f),p=Array(f-1),i=Array(f-1),a=Array(f-1);for(let u=0;u<f-1;u++)i[u]=t[u+1]-t[u],a[u]=n[u+1]-n[u],p[u]=i[u]/a[u];o[0]=p[0];for(let u=1;u<f-1;u++)p[u]===0||p[u-1]===0||p[u-1]>0!=p[u]>0?o[u]=0:(o[u]=3*(a[u-1]+a[u])/((2*a[u]+a[u-1])/p[u-1]+(a[u]+2*a[u-1])/p[u]),isFinite(o[u])||(o[u]=0));o[f-1]=p[f-2];for(let u=0;u<f-1;u++)d(v,n[u]+a[u]/3,t[u]+o[u]*a[u]/3,n[u+1]-a[u]/3,t[u+1]-o[u+1]*a[u]/3,n[u+1],t[u+1])}return v}const Ph=new Set;function Sy(){for(let n of Ph)n.syncRect(!0)}ua&&($s(YS,ha,Sy),$s(XS,ha,Sy,!0),$s(sc,ha,()=>{Or.pxRatio=sn}));const mE=_y(),vE=Cy();function $y(n,t,e,r){return(r?[n[0],n[1]].concat(n.slice(2)):[n[0]].concat(n.slice(1))).map((d,h)=>Fh(d,h,t,e))}function yE(n,t){return n.map((e,r)=>r==0?{}:sr({},t,e))}function Fh(n,t,e,r){return sr({},t==0?e:r,n)}function Ey(n,t,e){return t==null?fa:[t,e]}const bE=Ey;function wE(n,t,e){return t==null?fa:uc(t,e,bh,!0)}function Ry(n,t,e,r){return t==null?fa:cc(t,e,n.scales[r].log,!1)}const xE=Ry;function Ty(n,t,e,r){return t==null?fa:yh(t,e,n.scales[r].log,!1)}const CE=Ty;function AE(n,t,e,r,d){let h=Yr(Sv(n),Sv(t)),f=t-n,v=eo(d/r*f,e);do{let o=e[v],p=r*o/f;if(p>=d&&h+(o<5?Qo.get(o):0)<=17)return[o,p]}while(++v<e.length);return[0,0]}function Iy(n){let t,e;return n=n.replace(/(\d+)px/,(r,d)=>(t=pr((e=+d)*sn))+"px"),[n,t,e]}function _E(n){n.show&&[n.font,n.labelFont].forEach(t=>{let e=wn(t[2]*sn,1);t[0]=t[0].replace(/[0-9.]+px/,e+"px"),t[1]=e})}function Or(n,t,e){const r={mode:nn(n.mode,1)},d=r.mode;function h(G,J,ae,ue){let me=J.valToPct(G);return ue+ae*(J.dir==-1?1-me:me)}function f(G,J,ae,ue){let me=J.valToPct(G);return ue+ae*(J.dir==-1?me:1-me)}function v(G,J,ae,ue){return J.ori==0?h(G,J,ae,ue):f(G,J,ae,ue)}r.valToPosH=h,r.valToPosV=f;let o=!1;r.status=0;const p=r.root=Ni(IS);if(n.id!=null&&(p.id=n.id),wi(p,n.class),n.title){let G=Ni(OS,p);G.textContent=n.title}const i=Qi("canvas"),a=r.ctx=i.getContext("2d"),u=Ni(NS,p);$s("click",u,G=>{G.target===s&&(ft!=Bi||Yt!=Eo)&&Kn.click(r,G)},!0);const g=r.under=Ni(DS,u);u.appendChild(i);const s=r.over=Ni(PS,u);n=pa(n);const c=+nn(n.pxAlign,1),m=my(c);(n.plugins||[]).forEach(G=>{G.opts&&(n=G.opts(r,n)||n)});const w=n.ms||.001,x=r.series=d==1?$y(n.series||[],oy,dy,!1):yE(n.series||[null],hy),R=r.axes=$y(n.axes||[],iy,ly,!0),S=r.scales={},A=r.bands=n.bands||[];A.forEach(G=>{G.fill=Kt(G.fill||null),G.dir=nn(G.dir,-1)});const C=d==2?x[1].facets[0].scale:x[0].scale,O={axes:ss,series:Bs},N=(n.drawOrder||["axes","series"]).map(G=>O[G]);function M(G){const J=G.distr==3?ae=>Mo(ae>0?ae:G.clamp(r,ae,G.min,G.max,G.key)):G.distr==4?ae=>xh(ae,G.asinh):G.distr==100?ae=>G.fwd(ae):ae=>ae;return ae=>{let ue=J(ae),{_min:me,_max:_e}=G,Te=_e-me;return(ue-me)/Te}}function L(G){let J=S[G];if(J==null){let ae=(n.scales||ul)[G]||ul;if(ae.from!=null){L(ae.from);let ue=sr({},S[ae.from],ae,{key:G});ue.valToPct=M(ue),S[G]=ue}else{J=S[G]=sr({},G==C?fy:sE,ae),J.key=G;let ue=J.time,me=J.range,_e=es(me);if((G!=C||d==2&&!ue)&&(_e&&(me[0]==null||me[1]==null)&&(me={min:me[0]==null?Cv:{mode:1,hard:me[0],soft:me[0]},max:me[1]==null?Cv:{mode:1,hard:me[1],soft:me[1]}},_e=!1),!_e&&fc(me))){let Te=me;me=(Fe,He,Ke)=>He==null?fa:uc(He,Ke,Te)}J.range=Kt(me||(ue?bE:G==C?J.distr==3?xE:J.distr==4?CE:Ey:J.distr==3?Ry:J.distr==4?Ty:wE)),J.auto=Kt(_e?!1:J.auto),J.clamp=Kt(J.clamp||oE),J._min=J._max=null,J.valToPct=M(J)}}}L("x"),L("y"),d==1&&x.forEach(G=>{L(G.scale)}),R.forEach(G=>{L(G.scale)});for(let G in n.scales)L(G);const j=S[C],F=j.distr;let D,$;j.ori==0?(wi(p,LS),D=h,$=f):(wi(p,MS),D=f,$=h);const _={};for(let G in S){let J=S[G];(J.min!=null||J.max!=null)&&(_[G]={min:J.min,max:J.max},J.min=J.max=null)}const I=n.tzDate||(G=>new Date(pr(G/w))),z=n.fmtDate||_h,U=w==1?L$(I):N$(I),V=Xv(I,Yv(w==1?I$:O$,z)),K=Zv(I,Jv(P$,z)),Z=[],oe=r.legend=sr({},B$,n.legend),ee=r.cursor=sr({},G$,{drag:{y:d==2}},n.cursor),re=oe.show,ce=ee.show,ie=oe.markers;oe.idxs=Z,ie.width=Kt(ie.width),ie.dash=Kt(ie.dash),ie.stroke=Kt(ie.stroke),ie.fill=Kt(ie.fill);let fe,pe,$e,Re=[],Ge=[],qe,ct=!1,ot={};if(oe.live){const G=x[1]?x[1].values:null;ct=G!=null,qe=ct?G(r,1,0):{_:0};for(let J in qe)ot[J]=dh}if(re)if(fe=Qi("table",HS,p),$e=Qi("tbody",null,fe),oe.mount(r,fe),ct){pe=Qi("thead",null,fe,$e);let G=Qi("tr",null,pe);Qi("th",null,G);for(var dt in qe)Qi("th",sv,G).textContent=dt}else wi(fe,VS),oe.live&&wi(fe,US);const Lt={show:!0},gr={show:!1};function $t(G,J){if(J==0&&(ct||!oe.live||d==2))return fa;let ae=[],ue=Qi("tr",GS,$e,$e.childNodes[J]);wi(ue,G.class),G.show||wi(ue,Ss);let me=Qi("th",null,ue);if(ie.show){let Fe=Ni(qS,me);if(J>0){let He=ie.width(r,J);He&&(Fe.style.border=He+"px "+ie.dash(r,J)+" "+ie.stroke(r,J)),Fe.style.background=ie.fill(r,J)}}let _e=Ni(sv,me);G.label instanceof HTMLElement?_e.appendChild(G.label):_e.textContent=G.label,J>0&&(ie.show||(_e.style.color=G.width>0?ie.stroke(r,J):ie.fill(r,J)),Bn("click",me,Fe=>{if(ee._lock)return;en(Fe);let He=x.indexOf(G);if((Fe.ctrlKey||Fe.metaKey)!=oe.isolate){let Ke=x.some((Je,it)=>it>0&&it!=He&&Je.show);x.forEach((Je,it)=>{it>0&&cr(it,Ke?it==He?Lt:gr:Lt,!0,St.setSeries)})}else cr(He,{show:!G.show},!0,St.setSeries)},!1),Br&&Bn(uv,me,Fe=>{ee._lock||(en(Fe),cr(x.indexOf(G),Hi,!0,St.setSeries))},!1));for(var Te in qe){let Fe=Qi("td",KS,ue);Fe.textContent="--",ae.push(Fe)}return[ue,ae]}const xr=new Map;function Bn(G,J,ae,ue=!0){const me=xr.get(J)||{},_e=ee.bind[G](r,J,ae,ue);_e&&($s(G,J,me[G]=_e),xr.set(J,me))}function er(G,J,ae){const ue=xr.get(J)||{};for(let me in ue)(G==null||me==G)&&(vh(me,J,ue[me]),delete ue[me]);G==null&&xr.delete(J)}let pn=0,tr=0,yt=0,Qe=0,jt=0,En=0,Rn=jt,Tn=En,xn=yt,Cn=Qe,Vn=0,nr=0,Qt=0,Gn=0;r.bbox={};let ci=!1,Fr=!1,On=!1,Cr=!1,Ai=!1,lr=!1;function oo(G,J,ae){(ae||G!=r.width||J!=r.height)&&_i(G,J),co(!1),On=!0,Fr=!0,$o()}function _i(G,J){r.width=pn=yt=G,r.height=tr=Qe=J,jt=En=0,ts(),Do();let ae=r.bbox;Vn=ae.left=Rs(jt*sn,.5),nr=ae.top=Rs(En*sn,.5),Qt=ae.width=Rs(yt*sn,.5),Gn=ae.height=Rs(Qe*sn,.5)}const No=3;function ei(){let G=!1,J=0;for(;!G;){J++;let ae=La(J),ue=Ma(J);G=J==No||ae&&ue,G||(_i(r.width,r.height),Fr=!0)}}function so({width:G,height:J}){oo(G,J)}r.setSize=so;function ts(){let G=!1,J=!1,ae=!1,ue=!1;R.forEach((me,_e)=>{if(me.show&&me._show){let{side:Te,_size:Fe}=me,He=Te%2,Ke=me.label!=null?me.labelSize:0,Je=Fe+Ke;Je>0&&(He?(yt-=Je,Te==3?(jt+=Je,ue=!0):ae=!0):(Qe-=Je,Te==0?(En+=Je,G=!0):J=!0))}}),hi[0]=G,hi[1]=ae,hi[2]=J,hi[3]=ue,yt-=_n[1]+_n[3],jt+=_n[3],Qe-=_n[2]+_n[0],En+=_n[0]}function Do(){let G=jt+yt,J=En+Qe,ae=jt,ue=En;function me(_e,Te){switch(_e){case 1:return G+=Te,G-Te;case 2:return J+=Te,J-Te;case 3:return ae-=Te,ae+Te;case 0:return ue-=Te,ue+Te}}R.forEach((_e,Te)=>{if(_e.show&&_e._show){let Fe=_e.side;_e._pos=me(Fe,_e._size),_e.label!=null&&(_e._lpos=me(Fe,_e.labelSize))}})}if(ee.dataIdx==null){let G=ee.hover,J=G.skip=new Set(G.skip??[]);J.add(void 0);let ae=G.prox=Kt(G.prox),ue=G.bias??=0;ee.dataIdx=(me,_e,Te,Fe)=>{if(_e==0)return Te;let He=Te,Ke=ae(me,_e,Te,Fe)??bn,Je=Ke>=0&&Ke<bn,it=j.ori==0?yt:Qe,kt=ee.left,tn=t[0],Ht=t[_e];if(J.has(Ht[Te])){He=null;let Ct=null,mt=null,ht;if(ue==0||ue==-1)for(ht=Te;Ct==null&&ht-- >0;)J.has(Ht[ht])||(Ct=ht);if(ue==0||ue==1)for(ht=Te;mt==null&&ht++<Ht.length;)J.has(Ht[ht])||(mt=ht);if(Ct!=null||mt!=null)if(Je){let An=Ct==null?-1/0:D(tn[Ct],j,it,0),zn=mt==null?1/0:D(tn[mt],j,it,0),hr=kt-An,un=zn-kt;hr<=un?hr<=Ke&&(He=Ct):un<=Ke&&(He=mt)}else He=mt==null?Ct:Ct==null?mt:Te-Ct<=mt-Te?Ct:mt}else Je&&fr(kt-D(tn[Te],j,it,0))>Ke&&(He=null);return He}}const en=G=>{ee.event=G};ee.idxs=Z,ee._lock=!1;let vn=ee.points;vn.show=Kt(vn.show),vn.size=Kt(vn.size),vn.stroke=Kt(vn.stroke),vn.width=Kt(vn.width),vn.fill=Kt(vn.fill);const zr=r.focus=sr({},n.focus||{alpha:.3},ee.focus),Br=zr.prox>=0,In=Br&&vn.one;let rr=[],ki=[],Si=[];function ti(G,J){let ae=vn.show(r,J);if(ae instanceof HTMLElement)return wi(ae,WS),wi(ae,G.class),bo(ae,-10,-10,yt,Qe),s.insertBefore(ae,rr[J]),ae}function ui(G,J){if(d==1||J>0){let ae=d==1&&S[G.scale].time,ue=G.value;G.value=ae?Nv(ue)?Zv(I,Jv(ue,z)):ue||K:ue||nE,G.label=G.label||(ae?K$:q$)}if(In||J>0){G.width=G.width==null?1:G.width,G.paths=G.paths||mE||s$,G.fillTo=Kt(G.fillTo||aE),G.pxAlign=+nn(G.pxAlign,c),G.pxRound=my(G.pxAlign),G.stroke=Kt(G.stroke||null),G.fill=Kt(G.fill||null),G._stroke=G._fill=G._paths=G._focus=null;let ae=rE(Yr(1,G.width),1),ue=G.points=sr({},{size:ae,width:Yr(1,ae*.2),stroke:G.stroke,space:ae*2,paths:vE,_stroke:null,_fill:null},G.points);ue.show=Kt(ue.show),ue.filter=Kt(ue.filter),ue.fill=Kt(ue.fill),ue.stroke=Kt(ue.stroke),ue.paths=Kt(ue.paths),ue.pxAlign=G.pxAlign}if(re){let ae=$t(G,J);Re.splice(J,0,ae[0]),Ge.splice(J,0,ae[1]),oe.values.push(null)}if(ce){Z.splice(J,0,null);let ae=null;In?J==0&&(ae=ti(G,J)):J>0&&(ae=ti(G,J)),rr.splice(J,0,ae),ki.splice(J,0,0),Si.splice(J,0,0)}st("addSeries",J)}function ns(G,J){J=J??x.length,G=d==1?Fh(G,J,oy,dy):Fh(G,J,{},hy),x.splice(J,0,G),ui(x[J],J)}r.addSeries=ns;function Po(G){if(x.splice(G,1),re){oe.values.splice(G,1),Ge.splice(G,1);let J=Re.splice(G,1)[0];er(null,J.firstChild),J.remove()}ce&&(Z.splice(G,1),rr.splice(G,1)[0].remove(),ki.splice(G,1),Si.splice(G,1)),st("delSeries",G)}r.delSeries=Po;const hi=[!1,!1,!1,!1];function Er(G,J){if(G._show=G.show,G.show){let ae=G.side%2,ue=S[G.scale];ue==null&&(G.scale=ae?x[1].scale:C,ue=S[G.scale]);let me=ue.time;G.size=Kt(G.size),G.space=Kt(G.space),G.rotate=Kt(G.rotate),es(G.incrs)&&G.incrs.forEach(Te=>{!Qo.has(Te)&&Qo.set(Te,Mv(Te))}),G.incrs=Kt(G.incrs||(ue.distr==2?E$:me?w==1?T$:M$:Ts)),G.splits=Kt(G.splits||(me&&ue.distr==1?U:ue.distr==3?Ih:ue.distr==4?J$:X$)),G.stroke=Kt(G.stroke),G.grid.stroke=Kt(G.grid.stroke),G.ticks.stroke=Kt(G.ticks.stroke),G.border.stroke=Kt(G.border.stroke);let _e=G.values;G.values=es(_e)&&!es(_e[0])?Kt(_e):me?es(_e)?Xv(I,Yv(_e,z)):Nv(_e)?D$(I,_e):_e||V:_e||Y$,G.filter=Kt(G.filter||(ue.distr>=3&&ue.log==10?eE:ue.distr==3&&ue.log==2?tE:Rv)),G.font=Iy(G.font),G.labelFont=Iy(G.labelFont),G._size=G.size(r,null,J,0),G._space=G._rotate=G._incrs=G._found=G._splits=G._values=null,G._size>0&&(hi[J]=!0,G._el=Ni(FS,u))}}function Tt(G,J,ae,ue){let[me,_e,Te,Fe]=ae,He=J%2,Ke=0;return He==0&&(Fe||_e)&&(Ke=J==0&&!me||J==2&&!Te?pr(iy.size/3):0),He==1&&(me||Te)&&(Ke=J==1&&!_e||J==3&&!Fe?pr(ly.size/2):0),Ke}const ao=r.padding=(n.padding||[Tt,Tt,Tt,Tt]).map(G=>Kt(nn(G,Tt))),_n=r._padding=ao.map((G,J)=>G(r,J,hi,0));let Nn,gn=null,Dn=null;const zi=d==1?x[0].idxs:null;let qn=null,di=!1;function Ar(G,J){if(t=G??[],r.data=r._data=t,d==2){Nn=0;for(let ae=1;ae<x.length;ae++)Nn+=t[ae][0].length}else{t.length==0&&(r.data=r._data=t=[[]]),qn=t[0],Nn=qn.length;let ae=t;if(F==2){ae=t.slice();let ue=ae[0]=Array(Nn);for(let me=0;me<Nn;me++)ue[me]=me}r._data=t=ae}if(co(!0),st("setData"),F==2&&(On=!0),J!==!1){let ae=j;ae.auto(r,di)?le():Wr(C,ae.min,ae.max),Cr=Cr||ee.left>=0,lr=!0,$o()}}r.setData=Ar;function le(){di=!0;let G,J;d==1&&(Nn>0?(gn=zi[0]=0,Dn=zi[1]=Nn-1,G=t[0][gn],J=t[0][Dn],F==2?(G=gn,J=Dn):G==J&&(F==3?[G,J]=cc(G,G,j.log,!1):F==4?[G,J]=yh(G,G,j.log,!1):j.time?J=G+pr(86400/w):[G,J]=uc(G,J,bh,!0))):(gn=zi[0]=G=null,Dn=zi[1]=J=null)),Wr(C,G,J)}let Ne,Be,bt,Pt,Mt,_r,kr,mr,fi,Gt;function Co(G,J,ae,ue,me,_e){G??=lv,ae??=Ah,ue??="butt",me??=lv,_e??="round",G!=Ne&&(a.strokeStyle=Ne=G),me!=Be&&(a.fillStyle=Be=me),J!=bt&&(a.lineWidth=bt=J),_e!=Mt&&(a.lineJoin=Mt=_e),ue!=_r&&(a.lineCap=_r=ue),ae!=Pt&&a.setLineDash(Pt=ae)}function Ao(G,J,ae,ue){J!=Be&&(a.fillStyle=Be=J),G!=kr&&(a.font=kr=G),ae!=mr&&(a.textAlign=mr=ae),ue!=fi&&(a.textBaseline=fi=ue)}function _o(G,J,ae,ue,me=0){if(ue.length>0&&G.auto(r,di)&&(J==null||J.min==null)){let _e=nn(gn,0),Te=nn(Dn,ue.length-1),Fe=ae.min==null?e$(ue,_e,Te,me,G.distr==3):[ae.min,ae.max];G.min=to(G.min,ae.min=Fe[0]),G.max=Yr(G.max,ae.max=Fe[1])}}const zs={min:null,max:null};function rs(){for(let ue in S){let me=S[ue];_[ue]==null&&(me.min==null||_[C]!=null&&me.auto(r,di))&&(_[ue]=zs)}for(let ue in S){let me=S[ue];_[ue]==null&&me.from!=null&&_[me.from]!=null&&(_[ue]=zs)}_[C]!=null&&co(!0);let G={};for(let ue in _){let me=_[ue];if(me!=null){let _e=G[ue]=pa(S[ue],c$);if(me.min!=null)sr(_e,me);else if(ue!=C||d==2)if(Nn==0&&_e.from==null){let Te=_e.range(r,null,null,ue);_e.min=Te[0],_e.max=Te[1]}else _e.min=bn,_e.max=-bn}}if(Nn>0){x.forEach((ue,me)=>{if(d==1){let _e=ue.scale,Te=_[_e];if(Te==null)return;let Fe=G[_e];if(me==0){let He=Fe.range(r,Fe.min,Fe.max,_e);Fe.min=He[0],Fe.max=He[1],gn=eo(Fe.min,t[0]),Dn=eo(Fe.max,t[0]),Dn-gn>1&&(t[0][gn]<Fe.min&&gn++,t[0][Dn]>Fe.max&&Dn--),ue.min=qn[gn],ue.max=qn[Dn]}else ue.show&&ue.auto&&_o(Fe,Te,ue,t[me],ue.sorted);ue.idxs[0]=gn,ue.idxs[1]=Dn}else if(me>0&&ue.show&&ue.auto){let[_e,Te]=ue.facets,Fe=_e.scale,He=Te.scale,[Ke,Je]=t[me],it=G[Fe],kt=G[He];it!=null&&_o(it,_[Fe],_e,Ke,_e.sorted),kt!=null&&_o(kt,_[He],Te,Je,Te.sorted),ue.min=Te.min,ue.max=Te.max}});for(let ue in G){let me=G[ue],_e=_[ue];if(me.from==null&&(_e==null||_e.min==null)){let Te=me.range(r,me.min==bn?null:me.min,me.max==-bn?null:me.max,ue);me.min=Te[0],me.max=Te[1]}}}for(let ue in G){let me=G[ue];if(me.from!=null){let _e=G[me.from];if(_e.min==null)me.min=me.max=null;else{let Te=me.range(r,_e.min,_e.max,ue);me.min=Te[0],me.max=Te[1]}}}let J={},ae=!1;for(let ue in G){let me=G[ue],_e=S[ue];if(_e.min!=me.min||_e.max!=me.max){_e.min=me.min,_e.max=me.max;let Te=_e.distr;_e._min=Te==3?Mo(_e.min):Te==4?xh(_e.min,_e.asinh):Te==100?_e.fwd(_e.min):_e.min,_e._max=Te==3?Mo(_e.max):Te==4?xh(_e.max,_e.asinh):Te==100?_e.fwd(_e.max):_e.max,J[ue]=ae=!0}}if(ae){x.forEach((ue,me)=>{d==2?me>0&&J.y&&(ue._paths=null):J[ue.scale]&&(ue._paths=null)});for(let ue in J)On=!0,st("setScale",ue);ce&&ee.left>=0&&(Cr=lr=!0)}for(let ue in _)_[ue]=null}function Fo(G){let J=Ch(gn-1,0,Nn-1),ae=Ch(Dn+1,0,Nn-1);for(;G[J]==null&&J>0;)J--;for(;G[ae]==null&&ae<Nn-1;)ae++;return[J,ae]}function Bs(){if(Nn>0){let G=x.some(J=>J._focus)&&Gt!=zr.alpha;G&&(a.globalAlpha=Gt=zr.alpha),x.forEach((J,ae)=>{if(ae>0&&J.show&&(js(ae,!1),js(ae,!0),J._paths==null)){let ue=Gt;Gt!=J.alpha&&(a.globalAlpha=Gt=J.alpha);let me=d==2?[0,t[ae][0].length-1]:Fo(t[ae]);J._paths=J.paths(r,ae,me[0],me[1]),Gt!=ue&&(a.globalAlpha=Gt=ue)}}),x.forEach((J,ae)=>{if(ae>0&&J.show){let ue=Gt;Gt!=J.alpha&&(a.globalAlpha=Gt=J.alpha),J._paths!=null&&is(ae,!1);{let me=J._paths!=null?J._paths.gaps:null,_e=J.points.show(r,ae,gn,Dn,me),Te=J.points.filter(r,ae,_e,me);(_e||Te)&&(J.points._paths=J.points.paths(r,ae,gn,Dn,Te),is(ae,!0))}Gt!=ue&&(a.globalAlpha=Gt=ue),st("drawSeries",ae)}}),G&&(a.globalAlpha=Gt=1)}}function js(G,J){let ae=J?x[G].points:x[G];ae._stroke=ae.stroke(r,G),ae._fill=ae.fill(r,G)}function is(G,J){let ae=J?x[G].points:x[G],{stroke:ue,fill:me,clip:_e,flags:Te,_stroke:Fe=ae._stroke,_fill:He=ae._fill,_width:Ke=ae.width}=ae._paths;Ke=wn(Ke*sn,3);let Je=null,it=Ke%2/2;J&&He==null&&(He=Ke>0?"#fff":Fe);let kt=ae.pxAlign==1&&it>0;if(kt&&a.translate(it,it),!J){let tn=Vn-Ke/2,Ht=nr-Ke/2,Ct=Qt+Ke,mt=Gn+Ke;Je=new Path2D,Je.rect(tn,Ht,Ct,mt)}J?os(Fe,Ke,ae.dash,ae.cap,He,ue,me,Te,_e):Ia(G,Fe,Ke,ae.dash,ae.cap,He,ue,me,Te,Je,_e),kt&&a.translate(-it,-it)}function Ia(G,J,ae,ue,me,_e,Te,Fe,He,Ke,Je){let it=!1;He!=0&&A.forEach((kt,tn)=>{if(kt.series[0]==G){let Ht=x[kt.series[1]],Ct=t[kt.series[1]],mt=(Ht._paths||ul).band;es(mt)&&(mt=kt.dir==1?mt[0]:mt[1]);let ht,An=null;Ht.show&&mt&&n$(Ct,gn,Dn)?(An=kt.fill(r,tn)||_e,ht=Ht._paths.clip):mt=null,os(J,ae,ue,me,An,Te,Fe,He,Ke,Je,ht,mt),it=!0}}),it||os(J,ae,ue,me,_e,Te,Fe,He,Ke,Je)}const ko=ma|Mh;function os(G,J,ae,ue,me,_e,Te,Fe,He,Ke,Je,it){Co(G,J,ae,ue,me),(He||Ke||it)&&(a.save(),He&&a.clip(He),Ke&&a.clip(Ke)),it?(Fe&ko)==ko?(a.clip(it),Je&&a.clip(Je),vr(me,Te),lo(G,_e,J)):Fe&Mh?(vr(me,Te),a.clip(it),lo(G,_e,J)):Fe&ma&&(a.save(),a.clip(it),Je&&a.clip(Je),vr(me,Te),a.restore(),lo(G,_e,J)):(vr(me,Te),lo(G,_e,J)),(He||Ke||it)&&a.restore()}function lo(G,J,ae){ae>0&&(J instanceof Map?J.forEach((ue,me)=>{a.strokeStyle=Ne=me,a.stroke(ue)}):J!=null&&G&&a.stroke(J))}function vr(G,J){J instanceof Map?J.forEach((ae,ue)=>{a.fillStyle=Be=ue,a.fill(ae)}):J!=null&&G&&a.fill(J)}function Ws(G,J,ae,ue){let me=R[G],_e;if(ue<=0)_e=[0,0];else{let Te=me._space=me.space(r,G,J,ae,ue),Fe=me._incrs=me.incrs(r,G,J,ae,ue,Te);_e=AE(J,ae,Fe,ue,Te)}return me._found=_e}function ni(G,J,ae,ue,me,_e,Te,Fe,He,Ke){let Je=Te%2/2;c==1&&a.translate(Je,Je),Co(Fe,Te,He,Ke,Fe),a.beginPath();let it,kt,tn,Ht,Ct=me+(ue==0||ue==3?-_e:_e);ae==0?(kt=me,Ht=Ct):(it=me,tn=Ct);for(let mt=0;mt<G.length;mt++)J[mt]!=null&&(ae==0?it=tn=G[mt]:kt=Ht=G[mt],a.moveTo(it,kt),a.lineTo(tn,Ht));a.stroke(),c==1&&a.translate(-Je,-Je)}function La(G){let J=!0;return R.forEach((ae,ue)=>{if(!ae.show)return;let me=S[ae.scale];if(me.min==null){ae._show&&(J=!1,ae._show=!1,co(!1));return}else ae._show||(J=!1,ae._show=!0,co(!1));let _e=ae.side,Te=_e%2,{min:Fe,max:He}=me,[Ke,Je]=Ws(ue,Fe,He,Te==0?yt:Qe);if(Je==0)return;let it=me.distr==2,kt=ae._splits=ae.splits(r,ue,Fe,He,Ke,Je,it),tn=me.distr==2?kt.map(ht=>qn[ht]):kt,Ht=me.distr==2?qn[kt[1]]-qn[kt[0]]:Ke,Ct=ae._values=ae.values(r,ae.filter(r,tn,ue,Je,Ht),ue,Je,Ht);ae._rotate=_e==2?ae.rotate(r,Ct,ue,Je):0;let mt=ae._size;ae._size=Di(ae.size(r,Ct,ue,G)),mt!=null&&ae._size!=mt&&(J=!1)}),J}function Ma(G){let J=!0;return ao.forEach((ae,ue)=>{let me=ae(r,ue,hi,G);me!=_n[ue]&&(J=!1),_n[ue]=me}),J}function ss(){for(let G=0;G<R.length;G++){let J=R[G];if(!J.show||!J._show)continue;let ae=J.side,ue=ae%2,me,_e,Te=J.stroke(r,G),Fe=ae==0||ae==3?-1:1,[He,Ke]=J._found;if(J.label!=null){let Tr=J.labelGap*Fe,Sn=pr((J._lpos+Tr)*sn);Ao(J.labelFont[0],Te,"center",ae==2?al:av),a.save(),ue==1?(me=_e=0,a.translate(Sn,pr(nr+Gn/2)),a.rotate((ae==3?-hc:hc)/2)):(me=pr(Vn+Qt/2),_e=Sn);let Ui=$v(J.label)?J.label(r,G,He,Ke):J.label;a.fillText(Ui,me,_e),a.restore()}if(Ke==0)continue;let Je=S[J.scale],it=ue==0?Qt:Gn,kt=ue==0?Vn:nr,tn=J._splits,Ht=Je.distr==2?tn.map(Tr=>qn[Tr]):tn,Ct=Je.distr==2?qn[tn[1]]-qn[tn[0]]:He,mt=J.ticks,ht=J.border,An=mt.show?mt.size:0,zn=pr(An*sn),hr=pr((J.alignTo==2?J._size-An-J.gap:J.gap)*sn),un=J._rotate*-hc/180,mn=m(J._pos*sn),ve=(zn+hr)*Fe,Ee=mn+ve;_e=ue==0?Ee:0,me=ue==1?Ee:0;let Se=J.font[0],Ye=J.align==1?ca:J.align==2?lh:un>0?ca:un<0?lh:ue==0?"center":ae==3?lh:ca,gt=un||ue==1?"middle":ae==2?al:av;Ao(Se,Te,Ye,gt);let Rt=J.font[1]*J.lineGap,rn=tn.map(Tr=>m(v(Tr,Je,it,kt))),Ut=J._values;for(let Tr=0;Tr<Ut.length;Tr++){let Sn=Ut[Tr];if(Sn!=null){ue==0?me=rn[Tr]:_e=rn[Tr],Sn=""+Sn;let Ui=Sn.indexOf(`
|
|
1480
|
+
`)==-1?[Sn]:Sn.split(/\n/gm);for(let Ir=0;Ir<Ui.length;Ir++){let Wo=Ui[Ir];un?(a.save(),a.translate(me,_e+Ir*Rt),a.rotate(un),a.fillText(Wo,0,0),a.restore()):a.fillText(Wo,me,_e+Ir*Rt)}}}mt.show&&ni(rn,mt.filter(r,Ht,G,Ke,Ct),ue,ae,mn,zn,wn(mt.width*sn,3),mt.stroke(r,G),mt.dash,mt.cap);let gi=J.grid;gi.show&&ni(rn,gi.filter(r,Ht,G,Ke,Ct),ue,ue==0?2:1,ue==0?nr:Vn,ue==0?Gn:Qt,wn(gi.width*sn,3),gi.stroke(r,G),gi.dash,gi.cap),ht.show&&ni([mn],[1],ue==0?1:0,ue==0?1:2,ue==1?nr:Vn,ue==1?Gn:Qt,wn(ht.width*sn,3),ht.stroke(r,G),ht.dash,ht.cap)}st("drawAxes")}function co(G){x.forEach((J,ae)=>{ae>0&&(J._paths=null,G&&(d==1?(J.min=null,J.max=null):J.facets.forEach(ue=>{ue.min=null,ue.max=null})))})}let zo=!1,as=!1,So=[];function Oa(){as=!1;for(let G=0;G<So.length;G++)st(...So[G]);So.length=0}function $o(){zo||(m$(Hs),zo=!0)}function je(G,J=!1){zo=!0,as=J,G(r),Hs(),J&&So.length>0&&queueMicrotask(Oa)}r.batch=je;function Hs(){if(ci&&(rs(),ci=!1),On&&(ei(),On=!1),Fr){if($n(g,ca,jt),$n(g,al,En),$n(g,ol,yt),$n(g,sl,Qe),$n(s,ca,jt),$n(s,al,En),$n(s,ol,yt),$n(s,sl,Qe),$n(u,ol,pn),$n(u,sl,tr),i.width=pr(pn*sn),i.height=pr(tr*sn),R.forEach(({_el:G,_show:J,_size:ae,_pos:ue,side:me})=>{if(G!=null)if(J){let _e=me===3||me===0?ae:0,Te=me%2==1;$n(G,Te?"left":"top",ue-_e),$n(G,Te?"width":"height",ae),$n(G,Te?"top":"left",Te?En:jt),$n(G,Te?"height":"width",Te?Qe:yt),gh(G,Ss)}else wi(G,Ss)}),Ne=Be=bt=Mt=_r=kr=mr=fi=Pt=null,Gt=1,B(!0),jt!=Rn||En!=Tn||yt!=xn||Qe!=Cn){co(!1);let G=yt/xn,J=Qe/Cn;if(ce&&!Cr&&ee.left>=0){ee.left*=G,ee.top*=J,uo&&bo(uo,pr(ee.left),0,yt,Qe),Wn&&bo(Wn,0,pr(ee.top),yt,Qe);for(let ae=0;ae<rr.length;ae++){let ue=rr[ae];ue!=null&&(ki[ae]*=G,Si[ae]*=J,bo(ue,Di(ki[ae]),Di(Si[ae]),yt,Qe))}}if(_t.show&&!Ai&&_t.left>=0&&_t.width>0){_t.left*=G,_t.width*=G,_t.top*=J,_t.height*=J;for(let ae in X)$n(jr,ae,_t[ae])}Rn=jt,Tn=En,xn=yt,Cn=Qe}st("setSize"),Fr=!1}pn>0&&tr>0&&(a.clearRect(0,0,i.width,i.height),st("drawClear"),N.forEach(G=>G()),st("draw")),_t.show&&Ai&&(Wi(_t),Ai=!1),ce&&Cr&&(k(null,!0,!1),Cr=!1),oe.show&&oe.live&&lr&&(b(),lr=!1),o||(o=!0,r.status=1,st("ready")),di=!1,zo=!1}r.redraw=(G,J)=>{On=J||!1,G!==!1?Wr(C,j.min,j.max):$o()};function De(G,J){let ae=S[G];if(ae.from==null){if(Nn==0){let ue=ae.range(r,J.min,J.max,G);J.min=ue[0],J.max=ue[1]}if(J.min>J.max){let ue=J.min;J.min=J.max,J.max=ue}if(Nn>1&&J.min!=null&&J.max!=null&&J.max-J.min<1e-16)return;G==C&&ae.distr==2&&Nn>0&&(J.min=eo(J.min,t[0]),J.max=eo(J.max,t[0]),J.min==J.max&&J.max++),_[G]=J,ci=!0,$o()}}r.setScale=De;let jn,Bo,uo,Wn,Na,jo,Bi,Eo,Us,an,ft,Yt,ji=!1;const Kn=ee.drag;let Ve=Kn.x,kn=Kn.y;ce&&(ee.x&&(jn=Ni(BS,s)),ee.y&&(Bo=Ni(jS,s)),j.ori==0?(uo=jn,Wn=Bo):(uo=Bo,Wn=jn),ft=ee.left,Yt=ee.top);const _t=r.select=sr({show:!0,over:!0,left:0,width:0,top:0,height:0},n.select),jr=_t.show?Ni(zS,_t.over?s:g):null;function Wi(G,J){if(_t.show){for(let ae in G)_t[ae]=G[ae],ae in X&&$n(jr,ae,G[ae]);J!==!1&&st("setSelect")}}r.setSelect=Wi;function Wt(G){if(x[G].show)re&&gh(Re[G],Ss);else if(re&&wi(Re[G],Ss),ce){let J=In?rr[0]:rr[G];J!=null&&bo(J,-10,-10,yt,Qe)}}function Wr(G,J,ae){De(G,{min:J,max:ae})}function cr(G,J,ae,ue){J.focus!=null&&Vs(G),J.show!=null&&x.forEach((me,_e)=>{_e>0&&(G==_e||G==null)&&(me.show=J.show,Wt(_e),d==2?(Wr(me.facets[0].scale,null,null),Wr(me.facets[1].scale,null,null)):Wr(me.scale,null,null),$o())}),ae!==!1&&st("setSeries",G,J),ue&&Et("setSeries",r,G,J)}r.setSeries=cr;function ho(G,J){sr(A[G],J)}function $i(G,J){G.fill=Kt(G.fill||null),G.dir=nn(G.dir,-1),J=J??A.length,A.splice(J,0,G)}function Pn(G){G==null?A.length=0:A.splice(G,1)}r.addBand=$i,r.setBand=ho,r.delBand=Pn;function ls(G,J){x[G].alpha=J,ce&&rr[G]!=null&&(rr[G].style.opacity=J),re&&Re[G]&&(Re[G].style.opacity=J)}let Yn,Ei,Ri;const Hi={focus:!0};function Vs(G){if(G!=Ri){let J=G==null,ae=zr.alpha!=1;x.forEach((ue,me)=>{if(d==1||me>0){let _e=J||me==0||me==G;ue._focus=J?null:_e,ae&&ls(me,_e?1:zr.alpha)}}),Ri=G,ae&&$o()}}re&&Br&&Bn(hv,fe,G=>{ee._lock||(en(G),Ri!=null&&cr(null,Hi,!0,St.setSeries))});function cn(G,J,ae){let ue=S[J];ae&&(G=G/sn-(ue.ori==1?En:jt));let me=yt;ue.ori==1&&(me=Qe,G=me-G),ue.dir==-1&&(G=me-G);let _e=ue._min,Te=ue._max,Fe=G/me,He=_e+(Te-_e)*Fe,Ke=ue.distr;return Ke==3?da(10,He):Ke==4?i$(He,ue.asinh):Ke==100?ue.bwd(He):He}function Da(G,J){let ae=cn(G,C,J);return eo(ae,t[0],gn,Dn)}r.valToIdx=G=>eo(G,t[0]),r.posToIdx=Da,r.posToVal=cn,r.valToPos=(G,J,ae)=>S[J].ori==0?h(G,S[J],ae?Qt:yt,ae?Vn:0):f(G,S[J],ae?Gn:Qe,ae?nr:0),r.setCursor=(G,J,ae)=>{ft=G.left,Yt=G.top,k(null,J,ae)};function yr(G,J){$n(jr,ca,_t.left=G),$n(jr,ol,_t.width=J)}function Hr(G,J){$n(jr,al,_t.top=G),$n(jr,sl,_t.height=J)}let Ro=j.ori==0?yr:Hr,Rr=j.ori==1?yr:Hr;function pi(){if(re&&oe.live)for(let G=d==2?1:0;G<x.length;G++){if(G==0&&ct)continue;let J=oe.values[G],ae=0;for(let ue in J)Ge[G][ae++].firstChild.nodeValue=J[ue]}}function b(G,J){if(G!=null&&(G.idxs?G.idxs.forEach((ae,ue)=>{Z[ue]=ae}):l$(G.idx)||Z.fill(G.idx),oe.idx=Z[0]),re&&oe.live){for(let ae=0;ae<x.length;ae++)(ae>0||d==1&&!ct)&&E(ae,Z[ae]);pi()}lr=!1,J!==!1&&st("setLegend")}r.setLegend=b;function E(G,J){let ae=x[G],ue=G==0&&F==2?qn:t[G],me;ct?me=ae.values(r,G,J)??ot:(me=ae.value(r,J==null?null:ue[J],G,J),me=me==null?ot:{_:me}),oe.values[G]=me}function k(G,J,ae){Us=ft,an=Yt,[ft,Yt]=ee.move(r,ft,Yt),ee.left=ft,ee.top=Yt,ce&&(uo&&bo(uo,pr(ft),0,yt,Qe),Wn&&bo(Wn,0,pr(Yt),yt,Qe));let ue,me=gn>Dn;Yn=bn,Ei=null;let _e=j.ori==0?yt:Qe,Te=j.ori==1?yt:Qe;if(ft<0||Nn==0||me){ue=ee.idx=null;for(let Fe=0;Fe<x.length;Fe++){let He=rr[Fe];He!=null&&bo(He,-10,-10,yt,Qe)}Br&&cr(null,Hi,!0,G==null&&St.setSeries),oe.live&&(Z.fill(ue),lr=!0)}else{let Fe,He,Ke;d==1&&(Fe=j.ori==0?ft:Yt,He=cn(Fe,C),ue=ee.idx=eo(He,t[0],gn,Dn),Ke=D(t[0][ue],j,_e,0));let Je=-10,it=-10,kt=0,tn=0,Ht=!0,Ct="",mt="";for(let ht=d==2?1:0;ht<x.length;ht++){let An=x[ht],zn=Z[ht],hr=zn==null?null:d==1?t[ht][zn]:t[ht][1][zn],un=ee.dataIdx(r,ht,ue,He),mn=un==null?null:d==1?t[ht][un]:t[ht][1][un];if(lr=lr||mn!=hr||un!=zn,Z[ht]=un,ht>0&&An.show){let ve=un==null?-10:un==ue?Ke:D(d==1?t[0][un]:t[ht][0][un],j,_e,0),Ee=mn==null?-10:$(mn,d==1?S[An.scale]:S[An.facets[1].scale],Te,0);if(Br&&mn!=null){let Se=j.ori==1?ft:Yt,Ye=fr(zr.dist(r,ht,un,Ee,Se));if(Ye<Yn){let gt=zr.bias;if(gt!=0){let Rt=cn(Se,An.scale),rn=mn>=0?1:-1,Ut=Rt>=0?1:-1;Ut==rn&&(Ut==1?gt==1?mn>=Rt:mn<=Rt:gt==1?mn<=Rt:mn>=Rt)&&(Yn=Ye,Ei=ht)}else Yn=Ye,Ei=ht}}if(lr||In){let Se,Ye;j.ori==0?(Se=ve,Ye=Ee):(Se=Ee,Ye=ve);let gt,Rt,rn,Ut,gi,Tr,Sn=!0,Ui=vn.bbox;if(Ui!=null){Sn=!1;let Ir=Ui(r,ht);rn=Ir.left,Ut=Ir.top,gt=Ir.width,Rt=Ir.height}else rn=Se,Ut=Ye,gt=Rt=vn.size(r,ht);if(Tr=vn.fill(r,ht),gi=vn.stroke(r,ht),In)ht==Ei&&Yn<=zr.prox&&(Je=rn,it=Ut,kt=gt,tn=Rt,Ht=Sn,Ct=Tr,mt=gi);else{let Ir=rr[ht];Ir!=null&&(ki[ht]=rn,Si[ht]=Ut,yv(Ir,gt,Rt,Sn),mv(Ir,Tr,gi),bo(Ir,Di(rn),Di(Ut),yt,Qe))}}}}if(In){let ht=zr.prox,An=Ri==null?Yn<=ht:Yn>ht||Ei!=Ri;if(lr||An){let zn=rr[0];zn!=null&&(ki[0]=Je,Si[0]=it,yv(zn,kt,tn,Ht),mv(zn,Ct,mt),bo(zn,Di(Je),Di(it),yt,Qe))}}}if(_t.show&&ji)if(G!=null){let[Fe,He]=St.scales,[Ke,Je]=St.match,[it,kt]=G.cursor.sync.scales,tn=G.cursor.drag;if(Ve=tn._x,kn=tn._y,Ve||kn){let{left:Ht,top:Ct,width:mt,height:ht}=G.select,An=G.scales[it].ori,zn=G.posToVal,hr,un,mn,ve,Ee,Se=Fe!=null&&Ke(Fe,it),Ye=He!=null&&Je(He,kt);Se&&Ve?(An==0?(hr=Ht,un=mt):(hr=Ct,un=ht),mn=S[Fe],ve=D(zn(hr,it),mn,_e,0),Ee=D(zn(hr+un,it),mn,_e,0),Ro(to(ve,Ee),fr(Ee-ve))):Ro(0,_e),Ye&&kn?(An==1?(hr=Ht,un=mt):(hr=Ct,un=ht),mn=S[He],ve=$(zn(hr,kt),mn,Te,0),Ee=$(zn(hr+un,kt),mn,Te,0),Rr(to(ve,Ee),fr(Ee-ve))):Rr(0,Te)}else Q()}else{let Fe=fr(Us-Na),He=fr(an-jo);if(j.ori==1){let kt=Fe;Fe=He,He=kt}Ve=Kn.x&&Fe>=Kn.dist,kn=Kn.y&&He>=Kn.dist;let Ke=Kn.uni;Ke!=null?Ve&&kn&&(Ve=Fe>=Ke,kn=He>=Ke,!Ve&&!kn&&(He>Fe?kn=!0:Ve=!0)):Kn.x&&Kn.y&&(Ve||kn)&&(Ve=kn=!0);let Je,it;Ve&&(j.ori==0?(Je=Bi,it=ft):(Je=Eo,it=Yt),Ro(to(Je,it),fr(it-Je)),kn||Rr(0,Te)),kn&&(j.ori==1?(Je=Bi,it=ft):(Je=Eo,it=Yt),Rr(to(Je,it),fr(it-Je)),Ve||Ro(0,_e)),!Ve&&!kn&&(Ro(0,0),Rr(0,0))}if(Kn._x=Ve,Kn._y=kn,G==null){if(ae){if(Zt!=null){let[Fe,He]=St.scales;St.values[0]=Fe!=null?cn(j.ori==0?ft:Yt,Fe):null,St.values[1]=He!=null?cn(j.ori==1?ft:Yt,He):null}Et(uh,r,ft,Yt,yt,Qe,ue)}if(Br){let Fe=ae&&St.setSeries,He=zr.prox;Ri==null?Yn<=He&&cr(Ei,Hi,!0,Fe):Yn>He?cr(null,Hi,!0,Fe):Ei!=Ri&&cr(Ei,Hi,!0,Fe)}}lr&&(oe.idx=ue,b()),J!==!1&&st("setCursor")}let P=null;Object.defineProperty(r,"rect",{get(){return P==null&&B(!1),P}});function B(G=!1){G?P=null:(P=s.getBoundingClientRect(),st("syncRect",P))}function W(G,J,ae,ue,me,_e,Te){ee._lock||ji&&G!=null&&G.movementX==0&&G.movementY==0||(q(G,J,ae,ue,me,_e,Te,!1,G!=null),G!=null?k(null,!0,!0):k(J,!0,!1))}function q(G,J,ae,ue,me,_e,Te,Fe,He){if(P==null&&B(!1),en(G),G!=null)ae=G.clientX-P.left,ue=G.clientY-P.top;else{if(ae<0||ue<0){ft=-10,Yt=-10;return}let[Ke,Je]=St.scales,it=J.cursor.sync,[kt,tn]=it.values,[Ht,Ct]=it.scales,[mt,ht]=St.match,An=J.axes[0].side%2==1,zn=j.ori==0?yt:Qe,hr=j.ori==1?yt:Qe,un=An?_e:me,mn=An?me:_e,ve=An?ue:ae,Ee=An?ae:ue;if(Ht!=null?ae=mt(Ke,Ht)?v(kt,S[Ke],zn,0):-10:ae=zn*(ve/un),Ct!=null?ue=ht(Je,Ct)?v(tn,S[Je],hr,0):-10:ue=hr*(Ee/mn),j.ori==1){let Se=ae;ae=ue,ue=Se}}He&&(J==null||J.cursor.event.type==uh)&&((ae<=1||ae>=yt-1)&&(ae=Rs(ae,yt)),(ue<=1||ue>=Qe-1)&&(ue=Rs(ue,Qe))),Fe?(Na=ae,jo=ue,[Bi,Eo]=ee.move(r,ae,ue)):(ft=ae,Yt=ue)}const X={width:0,height:0,left:0,top:0};function Q(){Wi(X,!1)}let se,he,be,ke;function ye(G,J,ae,ue,me,_e,Te){ji=!0,Ve=kn=Kn._x=Kn._y=!1,q(G,J,ae,ue,me,_e,Te,!0,!1),G!=null&&(Bn(hh,fh,Ae,!1),Et(cv,r,Bi,Eo,yt,Qe,null));let{left:Fe,top:He,width:Ke,height:Je}=_t;se=Fe,he=He,be=Ke,ke=Je}function Ae(G,J,ae,ue,me,_e,Te){ji=Kn._x=Kn._y=!1,q(G,J,ae,ue,me,_e,Te,!1,!0);let{left:Fe,top:He,width:Ke,height:Je}=_t,it=Ke>0||Je>0,kt=se!=Fe||he!=He||be!=Ke||ke!=Je;if(it&&kt&&Wi(_t),Kn.setScale&&it&&kt){let tn=Fe,Ht=Ke,Ct=He,mt=Je;if(j.ori==1&&(tn=He,Ht=Je,Ct=Fe,mt=Ke),Ve&&Wr(C,cn(tn,C),cn(tn+Ht,C)),kn)for(let ht in S){let An=S[ht];ht!=C&&An.from==null&&An.min!=bn&&Wr(ht,cn(Ct+mt,ht),cn(Ct,ht))}Q()}else ee.lock&&(ee._lock=!ee._lock,k(J,!0,G!=null));G!=null&&(er(hh,fh),Et(hh,r,ft,Yt,yt,Qe,null))}function Oe(G,J,ae,ue,me,_e,Te){if(ee._lock)return;en(G);let Fe=ji;if(ji){let He=!0,Ke=!0,Je=10,it,kt;j.ori==0?(it=Ve,kt=kn):(it=kn,kt=Ve),it&&kt&&(He=ft<=Je||ft>=yt-Je,Ke=Yt<=Je||Yt>=Qe-Je),it&&He&&(ft=ft<Bi?0:yt),kt&&Ke&&(Yt=Yt<Eo?0:Qe),k(null,!0,!0),ji=!1}ft=-10,Yt=-10,Z.fill(null),k(null,!0,!0),Fe&&(ji=Fe)}function Le(G,J,ae,ue,me,_e,Te){ee._lock||(en(G),le(),Q(),G!=null&&Et(dv,r,ft,Yt,yt,Qe,null))}function Xe(){R.forEach(_E),oo(r.width,r.height,!0)}$s(sc,ha,Xe);const pt={};pt.mousedown=ye,pt.mousemove=W,pt.mouseup=Ae,pt.dblclick=Le,pt.setSeries=(G,J,ae,ue)=>{let me=St.match[2];ae=me(r,J,ae),ae!=-1&&cr(ae,ue,!0,!1)},ce&&(Bn(cv,s,ye),Bn(uh,s,W),Bn(uv,s,G=>{en(G),B(!1)}),Bn(hv,s,Oe),Bn(dv,s,Le),Ph.add(r),r.syncRect=B);const nt=r.hooks=n.hooks||{};function st(G,J,ae){as?So.push([G,J,ae]):G in nt&&nt[G].forEach(ue=>{ue.call(null,r,J,ae)})}(n.plugins||[]).forEach(G=>{for(let J in G.hooks)nt[J]=(nt[J]||[]).concat(G.hooks[J])});const Ln=(G,J,ae)=>ae,St=sr({key:null,setSeries:!1,filters:{pub:Tv,sub:Tv},scales:[C,x[1]?x[1].scale:null],match:[Iv,Iv,Ln],values:[null,null]},ee.sync);St.match.length==2&&St.match.push(Ln),ee.sync=St;const Zt=St.key,Ot=gy(Zt);function Et(G,J,ae,ue,me,_e,Te){St.filters.pub(G,J,ae,ue,me,_e,Te)&&Ot.pub(G,J,ae,ue,me,_e,Te)}Ot.sub(r);function ur(G,J,ae,ue,me,_e,Te){St.filters.sub(G,J,ae,ue,me,_e,Te)&&pt[G](null,J,ae,ue,me,_e,Te)}r.pub=ur;function br(){Ot.unsub(r),Ph.delete(r),xr.clear(),vh(sc,ha,Xe),p.remove(),fe?.remove(),st("destroy")}r.destroy=br;function Fn(){st("init",n,t),Ar(t||n.data,!1),_[C]?De(C,_[C]):le(),Ai=_t.show&&(_t.width>0||_t.height>0),Cr=lr=!0,oo(n.width,n.height)}return x.forEach(ui),R.forEach(Er),e?e instanceof HTMLElement?(e.appendChild(p),Fn()):e(r,Fn):Fn(),r}Or.assign=sr,Or.fmtNum=wh,Or.rangeNum=uc,Or.rangeLog=cc,Or.rangeAsinh=yh,Or.orient=Is,Or.pxRatio=sn,Or.join=g$,Or.fmtDate=_h,Or.tzDate=S$,Or.sync=gy;{Or.addGap=lE,Or.clipGaps=vc;let n=Or.paths={points:Cy};n.linear=_y,n.stepped=hE,n.bars=dE,n.spline=pE}var Ly,My;function kE(){return My||(My=1,Ly=function(n,t,e,r,d){var h,f;if(r===void 0)r=0;else if(r=r|0,r<0||r>=n.length)throw new RangeError("invalid lower bound");if(d===void 0)d=n.length-1;else if(d=d|0,d<r||d>=n.length)throw new RangeError("invalid upper bound");for(;r<=d;)if(h=r+(d-r>>>1),f=+e(n[h],t,h,n),f<0)r=h+1;else if(f>0)d=h-1;else return h;return~r}),Ly}var SE=kE();const uB=Mn("y",ic(SE));var zh,Oy;function $E(){if(Oy)return zh;Oy=1;function n(t,e,r){var d=-1,h=t.length;e<0&&(e=-e>h?0:h+e),r=r>h?h:r,r<0&&(r+=h),h=e>r?0:r-e>>>0,e>>>=0;for(var f=Array(h);++d<h;)f[d]=t[d+e];return f}return zh=n,zh}var Bh,Ny;function EE(){if(Ny)return Bh;Ny=1;var n=$E();function t(e,r,d){var h=e.length;return d=d===void 0?h:d,!r&&d>=h?e:n(e,r,d)}return Bh=t,Bh}var jh,Dy;function Py(){if(Dy)return jh;Dy=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",d=t+e+r,h="\\ufe0e\\ufe0f",f="\\u200d",v=RegExp("["+f+n+d+h+"]");function o(p){return v.test(p)}return jh=o,jh}var Wh,Fy;function RE(){if(Fy)return Wh;Fy=1;function n(t){return t.split("")}return Wh=n,Wh}var Hh,zy;function TE(){if(zy)return Hh;zy=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",d=t+e+r,h="\\ufe0e\\ufe0f",f="["+n+"]",v="["+d+"]",o="\\ud83c[\\udffb-\\udfff]",p="(?:"+v+"|"+o+")",i="[^"+n+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",s=p+"?",c="["+h+"]?",m="(?:"+g+"(?:"+[i,a,u].join("|")+")"+c+s+")*",w=c+s+m,x="(?:"+[i+v+"?",v,a,u,f].join("|")+")",R=RegExp(o+"(?="+o+")|"+x+w,"g");function S(A){return A.match(R)||[]}return Hh=S,Hh}var Uh,By;function IE(){if(By)return Uh;By=1;var n=RE(),t=Py(),e=TE();function r(d){return t(d)?e(d):n(d)}return Uh=r,Uh}var Vh,jy;function LE(){if(jy)return Vh;jy=1;var n=typeof Zo=="object"&&Zo&&Zo.Object===Object&&Zo;return Vh=n,Vh}var Gh,Wy;function ME(){if(Wy)return Gh;Wy=1;var n=LE(),t=typeof self=="object"&&self&&self.Object===Object&&self,e=n||t||Function("return this")();return Gh=e,Gh}var qh,Hy;function Kh(){if(Hy)return qh;Hy=1;var n=ME(),t=n.Symbol;return qh=t,qh}var Yh,Uy;function OE(){if(Uy)return Yh;Uy=1;function n(t,e){for(var r=-1,d=t==null?0:t.length,h=Array(d);++r<d;)h[r]=e(t[r],r,t);return h}return Yh=n,Yh}var Xh,Vy;function NE(){if(Vy)return Xh;Vy=1;var n=Array.isArray;return Xh=n,Xh}var Jh,Gy;function DE(){if(Gy)return Jh;Gy=1;var n=Kh(),t=Object.prototype,e=t.hasOwnProperty,r=t.toString,d=n?n.toStringTag:void 0;function h(f){var v=e.call(f,d),o=f[d];try{f[d]=void 0;var p=!0}catch{}var i=r.call(f);return p&&(v?f[d]=o:delete f[d]),i}return Jh=h,Jh}var Zh,qy;function PE(){if(qy)return Zh;qy=1;var n=Object.prototype,t=n.toString;function e(r){return t.call(r)}return Zh=e,Zh}var Qh,Ky;function FE(){if(Ky)return Qh;Ky=1;var n=Kh(),t=DE(),e=PE(),r="[object Null]",d="[object Undefined]",h=n?n.toStringTag:void 0;function f(v){return v==null?v===void 0?d:r:h&&h in Object(v)?t(v):e(v)}return Qh=f,Qh}var ed,Yy;function zE(){if(Yy)return ed;Yy=1;function n(t){return t!=null&&typeof t=="object"}return ed=n,ed}var td,Xy;function BE(){if(Xy)return td;Xy=1;var n=FE(),t=zE(),e="[object Symbol]";function r(d){return typeof d=="symbol"||t(d)&&n(d)==e}return td=r,td}var nd,Jy;function jE(){if(Jy)return nd;Jy=1;var n=Kh(),t=OE(),e=NE(),r=BE(),d=n?n.prototype:void 0,h=d?d.toString:void 0;function f(v){if(typeof v=="string")return v;if(e(v))return t(v,f)+"";if(r(v))return h?h.call(v):"";var o=v+"";return o=="0"&&1/v==-1/0?"-0":o}return nd=f,nd}var rd,Zy;function xc(){if(Zy)return rd;Zy=1;var n=jE();function t(e){return e==null?"":n(e)}return rd=t,rd}var id,Qy;function WE(){if(Qy)return id;Qy=1;var n=EE(),t=Py(),e=IE(),r=xc();function d(h){return function(f){f=r(f);var v=t(f)?e(f):void 0,o=v?v[0]:f.charAt(0),p=v?n(v,1).join(""):f.slice(1);return o[h]()+p}}return id=d,id}var od,e0;function t0(){if(e0)return od;e0=1;var n=WE(),t=n("toUpperCase");return od=t,od}var HE=t0();const UE=ic(HE);var sd,n0;function VE(){if(n0)return sd;n0=1;var n=xc(),t=t0();function e(r){return t(n(r).toLowerCase())}return sd=e,sd}var ad,r0;function GE(){if(r0)return ad;r0=1;function n(t,e,r,d){var h=-1,f=t==null?0:t.length;for(d&&f&&(r=t[++h]);++h<f;)r=e(r,t[h],h,t);return r}return ad=n,ad}var ld,i0;function qE(){if(i0)return ld;i0=1;function n(t){return function(e){return t?.[e]}}return ld=n,ld}var cd,o0;function KE(){if(o0)return cd;o0=1;var n=qE(),t={À:"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"},e=n(t);return cd=e,cd}var ud,s0;function YE(){if(s0)return ud;s0=1;var n=KE(),t=xc(),e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",d="\\ufe20-\\ufe2f",h="\\u20d0-\\u20ff",f=r+d+h,v="["+f+"]",o=RegExp(v,"g");function p(i){return i=t(i),i&&i.replace(e,n).replace(o,"")}return ud=p,ud}var hd,a0;function XE(){if(a0)return hd;a0=1;var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function t(e){return e.match(n)||[]}return hd=t,hd}var dd,l0;function JE(){if(l0)return dd;l0=1;var n=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function t(e){return n.test(e)}return dd=t,dd}var fd,c0;function ZE(){if(c0)return fd;c0=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",d=t+e+r,h="\\u2700-\\u27bf",f="a-z\\xdf-\\xf6\\xf8-\\xff",v="\\xac\\xb1\\xd7\\xf7",o="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",p="\\u2000-\\u206f",i=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="A-Z\\xc0-\\xd6\\xd8-\\xde",u="\\ufe0e\\ufe0f",g=v+o+p+i,s="['’]",c="["+g+"]",m="["+d+"]",w="\\d+",x="["+h+"]",R="["+f+"]",S="[^"+n+g+w+h+f+a+"]",A="\\ud83c[\\udffb-\\udfff]",C="(?:"+m+"|"+A+")",O="[^"+n+"]",N="(?:\\ud83c[\\udde6-\\uddff]){2}",M="[\\ud800-\\udbff][\\udc00-\\udfff]",L="["+a+"]",j="\\u200d",F="(?:"+R+"|"+S+")",D="(?:"+L+"|"+S+")",$="(?:"+s+"(?:d|ll|m|re|s|t|ve))?",_="(?:"+s+"(?:D|LL|M|RE|S|T|VE))?",I=C+"?",z="["+u+"]?",U="(?:"+j+"(?:"+[O,N,M].join("|")+")"+z+I+")*",V="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",K="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Z=z+I+U,oe="(?:"+[x,N,M].join("|")+")"+Z,ee=RegExp([L+"?"+R+"+"+$+"(?="+[c,L,"$"].join("|")+")",D+"+"+_+"(?="+[c,L+F,"$"].join("|")+")",L+"?"+F+"+"+$,L+"+"+_,K,V,w,oe].join("|"),"g");function re(ce){return ce.match(ee)||[]}return fd=re,fd}var pd,u0;function QE(){if(u0)return pd;u0=1;var n=XE(),t=JE(),e=xc(),r=ZE();function d(h,f,v){return h=e(h),f=v?void 0:f,f===void 0?t(h)?r(h):n(h):h.match(f)||[]}return pd=d,pd}var gd,h0;function eR(){if(h0)return gd;h0=1;var n=GE(),t=YE(),e=QE(),r="['’]",d=RegExp(r,"g");function h(f){return function(v){return n(e(t(v).replace(d,"")),f,"")}}return gd=h,gd}var md,d0;function tR(){if(d0)return md;d0=1;var n=VE(),t=eR(),e=t(function(r,d,h){return d=d.toLowerCase(),r+(h?n(d):d)});return md=e,md}var nR=tR();const rR=ic(nR),iR=Object.assign({"./ArrayWidget.vue":()=>tt(()=>et.import("./ArrayWidget-D1PArcGr-3885b67514afe732ba36.js"),void 0),"./ArrayplotWidget.vue":()=>tt(()=>et.import("./ArrayplotWidget-DPUPy0qM-b6a1c019189be84e4589.js"),void 0),"./BlockWidget.vue":()=>tt(()=>et.import("./BlockWidget-_VUsK5T9-59058beda215f65a7b09.js"),void 0),"./ButtonWidget.vue":()=>tt(()=>et.import("./ButtonWidget-DE41o-cg-d0d862704f2cedf509f5.js"),void 0),"./CanvasWidget.vue":()=>tt(()=>et.import("./CanvasWidget-BEi8h3Mq-e74743c293400ba5a929.js"),void 0),"./CanvasdotWidget.vue":()=>tt(()=>et.import("./CanvasdotWidget-eZuMgkhL-069ce51cfaf9b6705d69.js"),void 0),"./CanvasimageWidget.vue":()=>tt(()=>et.import("./CanvasimageWidget-COv_Qnc8-0a502afa265efe2f25ad.js"),void 0),"./CanvasimagevalueWidget.vue":()=>tt(()=>et.import("./CanvasimagevalueWidget-BhuUqLOo-53322c8fb2f548104d57.js"),void 0),"./CanvaslabelWidget.vue":()=>tt(()=>et.import("./CanvaslabelWidget-DtvbgeYH-0bb6f6c1d49c8d123129.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>tt(()=>et.import("./CanvaslabelvalueWidget-C_FRIeNb-3b5c9903ad9d379fc52a.js"),void 0),"./CanvaslineWidget.vue":()=>tt(()=>et.import("./CanvaslineWidget-D1K_6mAY-986d4445d6db8f24c1b0.js"),void 0),"./CanvaslinevalueWidget.vue":()=>tt(()=>et.import("./CanvaslinevalueWidget-D4eaxWhR-443b0d3f93af5d0faf5a.js"),void 0),"./CheckbuttonWidget.vue":()=>tt(()=>et.import("./CheckbuttonWidget-ByxMDkiS-6939f416d1a7977f37fb.js"),void 0),"./ComboboxWidget.vue":()=>tt(()=>et.import("./ComboboxWidget-CAGxGv2r-28b0f6b63d807a2f3217.js"),void 0),"./DateWidget.vue":()=>tt(()=>et.import("./DateWidget-DkNWx28s-bb439088467e3b1af3aa.js"),void 0),"./DynamicWidget.vue":()=>tt(()=>et.import("./DynamicWidget-BuSbQVhf-6a5228328dcebb177ef8.js"),void 0),"./FilechecksumWidget.vue":()=>tt(()=>et.import("./FilechecksumWidget-DSfNEnDJ-531bbb7d456d380a62d9.js"),void 0),"./FiledisplayWidget.vue":()=>tt(()=>et.import("./FiledisplayWidget-D2cxMmrP-812eb21e2f71f0bd32d6.js"),void 0),"./FormatvalueWidget.vue":()=>tt(()=>et.import("./FormatvalueWidget-6-bj_PJO-4c9daa001cba89fb9103.js"),void 0),"./HorizontalWidget.vue":()=>tt(()=>et.import("./HorizontalWidget-C9UFBPsk-91bd1e11d87736b8c758.js"),void 0),"./HorizontalboxWidget.vue":()=>tt(()=>et.import("./HorizontalboxWidget-CWLfmRtr-13d452adc9e1100f23c4.js"),void 0),"./HorizontallineWidget.vue":()=>tt(()=>et.import("./HorizontallineWidget-DeFkOaYO-816f7a06f03f7222e67e.js"),void 0),"./IframeWidget.vue":()=>tt(()=>et.import("./IframeWidget-Bn9eGzrq-d71752e23ce712e81e26.js"),void 0),"./ImageviewerWidget.vue":()=>tt(()=>et.import("./ImageviewerWidget-BUWhF32Z-0799a243569a53e640e9.js"),void 0),"./LabelWidget.vue":()=>tt(()=>et.import("./LabelWidget-BhzkN06D-2d7a7f95582b783e18d0.js"),void 0),"./LabelledWidget.vue":()=>tt(()=>et.import("./LabelledWidget-vx8NvW1b-0d3f99aa750f0631fdc2.js"),void 0),"./LabelprogressbarWidget.vue":()=>tt(()=>et.import("./LabelprogressbarWidget-t5PvKuS4-18438f7d1f021d5247e5.js"),void 0),"./LabelsparklineWidget.vue":()=>tt(()=>et.import("./LabelsparklineWidget-CebbEH-j-9c683841d069f9e5b25c.js"),void 0),"./LabelvalueWidget.vue":()=>tt(()=>et.import("./LabelvalueWidget-Cbs1DBK2-8bc763b903941db678a2.js"),void 0),"./LabelvaluedescWidget.vue":()=>tt(()=>et.import("./LabelvaluedescWidget-B7OIOGc0-21ac0d9663cf49396a58.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>tt(()=>et.import("./LabelvaluelimitsbarWidget-C57kf-oQ-8929b2b56023fd39369a.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>tt(()=>et.import("./LabelvaluelimitscolumnWidget-BRlNDEqp-d0a4f3d8ee015080c0a8.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>tt(()=>et.import("./LabelvaluerangebarWidget-Pt_evm3v-2f296e2b660ae23cd7e2.js"),void 0),"./LedWidget.vue":()=>tt(()=>et.import("./LedWidget-D1lmNXpi-c70ab085a7e75d99db2a.js"),void 0),"./LimitsbarWidget.vue":()=>tt(()=>et.import("./LimitsbarWidget-VpxQXE-e-48cfee552a9c695bf8f1.js"),void 0),"./LimitscolorWidget.vue":()=>tt(()=>et.import("./LimitscolorWidget-79P41CX7-f2eea333aec5c48967e0.js"),void 0),"./LimitscolumnWidget.vue":()=>tt(()=>et.import("./LimitscolumnWidget-BFDXhJeZ-4eba19b9d6c713c13db1.js"),void 0),"./LinegraphWidget.vue":()=>tt(()=>et.import("./LinegraphWidget-VqkpOlws-f72604545ff9d950311b.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>tt(()=>et.import("./MatrixbycolumnsWidget--ihvirDP-0c6d1476cb4af73ce4ec.js"),void 0),"./ProgressbarWidget.vue":()=>tt(()=>et.import("./ProgressbarWidget-BIB3r9SL-2b2e5705da4fe267fc08.js"),void 0),"./RadiobuttonWidget.vue":()=>tt(()=>et.import("./RadiobuttonWidget-C5rxLM7K-9bdffd0ee597d4386ad7.js"),void 0),"./RadiogroupWidget.vue":()=>tt(()=>et.import("./RadiogroupWidget-CciTCv1U-f9b9584110d84fad120b.js"),void 0),"./RangebarWidget.vue":()=>tt(()=>et.import("./RangebarWidget-MPQYi2Km-b85a235f8e43da24f3ae.js"),void 0),"./RollupWidget.vue":()=>tt(()=>et.import("./RollupWidget-CfjGAhzg-f9d66fe1e702f376333e.js"),void 0),"./ScrollwindowWidget.vue":()=>tt(()=>et.import("./ScrollwindowWidget-CupaygNN-a397b20ae8a40b64a487.js"),void 0),"./SignalWidget.vue":()=>tt(()=>et.import("./SignalWidget-C-qecoTO-c71ca67fb48f421af75e.js"),void 0),"./SpacerWidget.vue":()=>tt(()=>et.import("./SpacerWidget-VVkOCb6N-356dcf21185ada59e84f.js"),void 0),"./SparklineWidget.vue":()=>tt(()=>et.import("./SparklineWidget-Dsmn38z_-2bd86ac75cf900848cd0.js"),void 0),"./TabbookWidget.vue":()=>tt(()=>et.import("./TabbookWidget-CXklff-l-46b8ed5b3d3fc3f6ff22.js"),void 0),"./TextboxWidget.vue":()=>tt(()=>et.import("./TextboxWidget-CHs2VYIv-55be6bce7cab19177b56.js"),void 0),"./TextfieldWidget.vue":()=>tt(()=>et.import("./TextfieldWidget-CdANAW-6-82179a958f191dffd85c.js"),void 0),"./TimeWidget.vue":()=>tt(()=>et.import("./TimeWidget-D0xT1wXR-52493dd27717545a87bd.js"),void 0),"./TitleWidget.vue":()=>tt(()=>et.import("./TitleWidget-68NWCcXB-218c5743097602c7a5d8.js"),void 0),"./ValueWidget.vue":()=>tt(()=>et.import("./ValueWidget-B1aGUBP7-320f2f1feb3886640deb.js"),void 0),"./ValuelimitsbarWidget.vue":()=>tt(()=>et.import("./ValuelimitsbarWidget-B7KcRjLS-70f46b11dcb2a83a3562.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>tt(()=>et.import("./ValuelimitscolumnWidget-BVt6nLXq-08cf4c90f589d1d23b70.js"),void 0),"./ValuerangebarWidget.vue":()=>tt(()=>et.import("./ValuerangebarWidget-uVZEI32U-ded0715685adaffdaca5.js"),void 0),"./VerticalWidget.vue":()=>tt(()=>et.import("./VerticalWidget-DlftYBjH-ae7352937173846f56d9.js"),void 0),"./VerticalboxWidget.vue":()=>tt(()=>et.import("./VerticalboxWidget-C7RrkfY0-a5135be854d46c8d2871.js"),void 0)}),oR=Object.entries(iR).reduce((n,[t,e])=>{t=t.split("/").pop();const r=UE(rR(t.replace(/\.\w+$/,"")));return{...n,[r]:Jp(e)}},{}),hB=Mn("w",{components:oR}),f0="openc3-ace-vim-mode-enabled",vd="ace/keyboard/vim",p0="openc3-ace-default-scripting-language",Cc=Mn("Z",{isVimModeEnabled(){return localStorage.getItem(f0)==="true"},setVimMode(n){localStorage.setItem(f0,JSON.stringify(!!n))},toggleVimMode(n){this.isVimModeEnabled()?(n.setKeyboardHandler(null),this.setVimMode(!1)):(n.setKeyboardHandler(vd),this.setVimMode(!0)),n.focus()},applyVimModeIfEnabled(n,{saveFn:t}={}){this.isVimModeEnabled()?(n.setKeyboardHandler(vd),ace.config.loadModule(vd,e=>{e.CodeMirror.Vim.defineEx("write","w",r=>{typeof t=="function"?t():r.ace.execCommand("save")})})):n.setKeyboardHandler(null)},getDefaultScriptingLanguage(){return localStorage.getItem(p0)||"python"},setDefaultScriptingLanguage(n){(n==="ruby"||n==="python")&&localStorage.setItem(p0,n)}}),sR={__name:"TopBarMenu",props:{menu:{type:Object,required:!0},title:{type:String,required:!0}},emits:["submenu-click"],setup(n,{emit:t}){const e=t,r=Qp(!1);function d(){r.value=!1}function h(f){return f.replaceAll(" ","-").toLowerCase()}return(f,v)=>{const o=Ue("v-icon"),p=Ue("v-btn"),i=Ue("v-divider"),a=Ue("v-list-item-title"),u=Ue("v-list-item"),g=Ue("v-list"),s=Ue("v-menu"),c=Ue("v-radio"),m=Ue("v-list-item-action"),w=Ue("v-radio-group"),x=Ue("v-checkbox");return rt(),Bt(s,{modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=R=>r.value=R),"close-on-content-click":!1},{activator:ze(({props:R})=>[We(p,Va(R,{variant:"outlined",class:"mx-1 menu-button",text:n.menu.label,"data-test":h(`${n.title} ${n.menu.label}`)}),{append:ze(()=>[We(o,{class:"menu-button-icon"},{default:ze(()=>[...v[1]||(v[1]=[Nt(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:ze(()=>[We(g,null,{default:ze(()=>[(rt(!0),on(si,null,vo(n.menu.items,(R,S)=>(rt(),on(si,null,[R.divider?(rt(),Bt(i,{key:S+"-divider"})):R.subMenu&&R.subMenu.length>0?(rt(),on("div",{key:S+"-submenu"},[(rt(),Bt(s,{key:S,"open-on-hover":"",location:"right"},{activator:ze(({props:A})=>[(rt(),Bt(u,Va({ref_for:!0},A,{key:S,disabled:R.disabled}),Tu({append:ze(()=>[We(o,null,{default:ze(()=>[...v[2]||(v[2]=[Nt(" mdi-chevron-right ",-1)])]),_:1})]),default:ze(()=>[!R.radio&&!R.checkbox?(rt(),Bt(a,{key:0,style:gs("cursor: pointer;"+(R.disabled?"opacity: 0.2":""))},{default:ze(()=>[Nt(yn(R.label),1)]),_:2},1032,["style"])):Gr("",!0)]),_:2},[R.icon?{name:"prepend",fn:ze(()=>[We(o,{disabled:R.disabled},{default:ze(()=>[Nt(yn(R.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:ze(()=>[We(g,null,{default:ze(()=>[(rt(!0),on(si,null,vo(R.subMenu,(A,C)=>(rt(),Bt(u,{key:C,"prepend-icon":A.icon,onClick:O=>e("submenu-click",A)},{default:ze(()=>[We(a,null,{default:ze(()=>[Nt(yn(A.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):R.radioGroup?(rt(),Bt(w,{key:S+"-radio-group",class:"ma-0 pa-0",density:"compact","hide-details":"","model-value":R.value,"onUpdate:modelValue":R.command},{default:ze(()=>[(rt(!0),on(si,null,vo(R.choices,(A,C)=>(rt(),Bt(u,{key:C+"-choice"},{default:ze(()=>[We(m,{class:"list-action"},{default:ze(()=>[We(c,{color:"secondary",label:A.label,value:A.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(rt(),Bt(u,{key:S+"-list",disabled:R.disabled,"data-test":h(`${n.title} ${n.menu.label} ${R.label}`),onClick:()=>{R.command(R),R.checkbox||d()}},Tu({default:ze(()=>[R.checkbox?(rt(),Bt(m,{key:0,class:"list-action"},{default:ze(()=>[We(x,{modelValue:R.checked,"onUpdate:modelValue":A=>R.checked=A,label:R.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):Gr("",!0),!R.radio&&!R.checkbox?(rt(),Bt(a,{key:1,style:gs("cursor: pointer;"+(R.disabled?"opacity: 0.2":""))},{default:ze(()=>[Nt(yn(R.label),1)]),_:2},1032,["style"])):Gr("",!0)]),_:2},[R.icon?{name:"prepend",fn:ze(()=>[We(o,{icon:R.icon,disabled:R.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["disabled","data-test","onClick"]))],64))),256))]),_:1})]),_:1},8,["modelValue"])}}},aR={components:{TopBarMenu:sR},props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},mounted(){document.title=this.title},methods:{subMenuClick(n){n.command(n),this.$refs.topmenu[0].isActive=!1}}},lR={class:"app-title mr-2"};function cR(n,t,e,r,d,h){const f=Ue("v-col"),v=Ue("v-row"),o=Ue("TopBarMenu");return rt(),Bt(Zp,{to:"#openc3-menu"},[We(v,{"no-gutters":""},{default:ze(()=>[We(f,{"align-self":"end"},{default:ze(()=>[Jn("span",lR,yn(e.title),1)]),_:1})]),_:1}),We(v,{dense:"",class:"flex-nowrap"},{default:ze(()=>[(rt(!0),on(si,null,vo(e.menus,(p,i)=>(rt(),Bt(o,{key:i+"-top-menu",ref_for:!0,ref:"topmenu",menu:p,title:e.title,onSubmenuClick:h.subMenuClick},null,8,["menu","title","onSubmenuClick"]))),128))]),_:1})])}const uR=Xi(aR,[["render",cR],["__scopeId","data-v-f4fb184e"]]);function g0(n,t){return function(){return n.apply(t,arguments)}}const{toString:hR}=Object.prototype,{getPrototypeOf:Ac}=Object,{iterator:_c,toStringTag:m0}=Symbol,kc=(n=>t=>{const e=hR.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),no=n=>(n=n.toLowerCase(),t=>kc(t)===n),Sc=n=>t=>typeof t===n,{isArray:ba}=Array,wa=Sc("undefined");function fl(n){return n!==null&&!wa(n)&&n.constructor!==null&&!wa(n.constructor)&&li(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const v0=no("ArrayBuffer");function dR(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&v0(n.buffer),t}const fR=Sc("string"),li=Sc("function"),y0=Sc("number"),pl=n=>n!==null&&typeof n=="object",pR=n=>n===!0||n===!1,$c=n=>{if(kc(n)!=="object")return!1;const t=Ac(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(m0 in n)&&!(_c in n)},gR=n=>{if(!pl(n)||fl(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},mR=no("Date"),vR=no("File"),yR=n=>!!(n&&typeof n.uri<"u"),bR=n=>n&&typeof n.getParts<"u",wR=no("Blob"),xR=no("FileList"),CR=n=>pl(n)&&li(n.pipe);function AR(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const b0=AR(),w0=typeof b0.FormData<"u"?b0.FormData:void 0,_R=n=>{if(!n)return!1;if(w0&&n instanceof w0)return!0;const t=Ac(n);if(!t||t===Object.prototype||!li(n.append))return!1;const e=kc(n);return e==="formdata"||e==="object"&&li(n.toString)&&n.toString()==="[object FormData]"},kR=no("URLSearchParams"),[SR,$R,ER,RR]=["ReadableStream","Request","Response","Headers"].map(no),TR=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function gl(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,d;if(typeof n!="object"&&(n=[n]),ba(n))for(r=0,d=n.length;r<d;r++)t.call(null,n[r],r,n);else{if(fl(n))return;const h=e?Object.getOwnPropertyNames(n):Object.keys(n),f=h.length;let v;for(r=0;r<f;r++)v=h[r],t.call(null,n[v],v,n)}}function x0(n,t){if(fl(n))return null;t=t.toLowerCase();const e=Object.keys(n);let r=e.length,d;for(;r-- >0;)if(d=e[r],t===d.toLowerCase())return d;return null}const Ls=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,C0=n=>!wa(n)&&n!==Ls;function yd(...n){const{caseless:t,skipUndefined:e}=C0(this)&&this||{},r={},d=(h,f)=>{if(f==="__proto__"||f==="constructor"||f==="prototype")return;const v=t&&x0(r,f)||f,o=bd(r,v)?r[v]:void 0;$c(o)&&$c(h)?r[v]=yd(o,h):$c(h)?r[v]=yd({},h):ba(h)?r[v]=h.slice():(!e||!wa(h))&&(r[v]=h)};for(let h=0,f=n.length;h<f;h++)n[h]&&gl(n[h],d);return r}const IR=(n,t,e,{allOwnKeys:r}={})=>(gl(t,(d,h)=>{e&&li(d)?Object.defineProperty(n,h,{__proto__:null,value:g0(d,e),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,h,{__proto__:null,value:d,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),n),LR=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),MR=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),e&&Object.assign(n.prototype,e)},OR=(n,t,e,r)=>{let d,h,f;const v={};if(t=t||{},n==null)return t;do{for(d=Object.getOwnPropertyNames(n),h=d.length;h-- >0;)f=d[h],(!r||r(f,n,t))&&!v[f]&&(t[f]=n[f],v[f]=!0);n=e!==!1&&Ac(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},NR=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},DR=n=>{if(!n)return null;if(ba(n))return n;let t=n.length;if(!y0(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},PR=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Ac(Uint8Array)),FR=(n,t)=>{const e=(n&&n[_c]).call(n);let r;for(;(r=e.next())&&!r.done;){const d=r.value;t.call(n,d[0],d[1])}},zR=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},BR=no("HTMLFormElement"),jR=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),bd=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),WR=no("RegExp"),A0=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};gl(e,(d,h)=>{let f;(f=t(d,h,n))!==!1&&(r[h]=f||d)}),Object.defineProperties(n,r)},HR=n=>{A0(n,(t,e)=>{if(li(n)&&["arguments","caller","callee"].includes(e))return!1;const r=n[e];if(li(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},UR=(n,t)=>{const e={},r=d=>{d.forEach(h=>{e[h]=!0})};return ba(n)?r(n):r(String(n).split(t)),e},VR=()=>{},GR=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function qR(n){return!!(n&&li(n.append)&&n[m0]==="FormData"&&n[_c])}const KR=n=>{const t=new WeakSet,e=r=>{if(pl(r)){if(t.has(r))return;if(fl(r))return r;if(!("toJSON"in r)){t.add(r);const d=ba(r)?[]:{};return gl(r,(h,f)=>{const v=e(h);!wa(v)&&(d[f]=v)}),t.delete(r),d}}return r};return e(n)},YR=no("AsyncFunction"),XR=n=>n&&(pl(n)||li(n))&&li(n.then)&&li(n.catch),_0=((n,t)=>n?setImmediate:t?((e,r)=>(Ls.addEventListener("message",({source:d,data:h})=>{d===Ls&&h===e&&r.length&&r.shift()()},!1),d=>{r.push(d),Ls.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",li(Ls.postMessage)),JR=typeof queueMicrotask<"u"?queueMicrotask.bind(Ls):typeof process<"u"&&process.nextTick||_0,ZR=n=>n!=null&&li(n[_c]),Ce={isArray:ba,isArrayBuffer:v0,isBuffer:fl,isFormData:_R,isArrayBufferView:dR,isString:fR,isNumber:y0,isBoolean:pR,isObject:pl,isPlainObject:$c,isEmptyObject:gR,isReadableStream:SR,isRequest:$R,isResponse:ER,isHeaders:RR,isUndefined:wa,isDate:mR,isFile:vR,isReactNativeBlob:yR,isReactNative:bR,isBlob:wR,isRegExp:WR,isFunction:li,isStream:CR,isURLSearchParams:kR,isTypedArray:PR,isFileList:xR,forEach:gl,merge:yd,extend:IR,trim:TR,stripBOM:LR,inherits:MR,toFlatObject:OR,kindOf:kc,kindOfTest:no,endsWith:NR,toArray:DR,forEachEntry:FR,matchAll:zR,isHTMLForm:BR,hasOwnProperty:bd,hasOwnProp:bd,reduceDescriptors:A0,freezeMethods:HR,toObjectSet:UR,toCamelCase:jR,noop:VR,toFiniteNumber:GR,findKey:x0,global:Ls,isContextDefined:C0,isSpecCompliantForm:qR,toJSONObject:KR,isAsyncFn:YR,isThenable:XR,setImmediate:_0,asap:JR,isIterable:ZR},QR=Ce.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"]),eT=n=>{const t={};let e,r,d;return n&&n.split(`
|
|
1481
|
+
`).forEach(function(h){d=h.indexOf(":"),e=h.substring(0,d).trim().toLowerCase(),r=h.substring(d+1).trim(),!(!e||t[e]&&QR[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t};function tT(n){let t=0,e=n.length;for(;t<e;){const r=n.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;e>t;){const r=n.charCodeAt(e-1);if(r!==9&&r!==32)break;e-=1}return t===0&&e===n.length?n:n.slice(t,e)}const nT=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),rT=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function wd(n,t){return Ce.isArray(n)?n.map(e=>wd(e,t)):tT(String(n).replace(t,""))}const iT=n=>wd(n,nT),oT=n=>wd(n,rT);function k0(n){const t=Object.create(null);return Ce.forEach(n.toJSON(),(e,r)=>{t[r]=oT(e)}),t}const S0=Symbol("internals");function ml(n){return n&&String(n).trim().toLowerCase()}function Ec(n){return n===!1||n==null?n:Ce.isArray(n)?n.map(Ec):iT(String(n))}function sT(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(n);)t[r[1]]=r[2];return t}const aT=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function xd(n,t,e,r,d){if(Ce.isFunction(r))return r.call(this,t,e);if(d&&(t=e),!!Ce.isString(t)){if(Ce.isString(r))return t.indexOf(r)!==-1;if(Ce.isRegExp(r))return r.test(t)}}function lT(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function cT(n,t){const e=Ce.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{__proto__:null,value:function(d,h,f){return this[r].call(this,t,d,h,f)},configurable:!0})})}let Xr=class{constructor(t){t&&this.set(t)}set(t,e,r){const d=this;function h(v,o,p){const i=ml(o);if(!i)throw new Error("header name must be a non-empty string");const a=Ce.findKey(d,i);(!a||d[a]===void 0||p===!0||p===void 0&&d[a]!==!1)&&(d[a||o]=Ec(v))}const f=(v,o)=>Ce.forEach(v,(p,i)=>h(p,i,o));if(Ce.isPlainObject(t)||t instanceof this.constructor)f(t,e);else if(Ce.isString(t)&&(t=t.trim())&&!aT(t))f(eT(t),e);else if(Ce.isObject(t)&&Ce.isIterable(t)){let v={},o,p;for(const i of t){if(!Ce.isArray(i))throw TypeError("Object iterator must return a key-value pair");v[p=i[0]]=(o=v[p])?Ce.isArray(o)?[...o,i[1]]:[o,i[1]]:i[1]}f(v,e)}else t!=null&&h(e,t,r);return this}get(t,e){if(t=ml(t),t){const r=Ce.findKey(this,t);if(r){const d=this[r];if(!e)return d;if(e===!0)return sT(d);if(Ce.isFunction(e))return e.call(this,d,r);if(Ce.isRegExp(e))return e.exec(d);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=ml(t),t){const r=Ce.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||xd(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let d=!1;function h(f){if(f=ml(f),f){const v=Ce.findKey(r,f);v&&(!e||xd(r,r[v],v,e))&&(delete r[v],d=!0)}}return Ce.isArray(t)?t.forEach(h):h(t),d}clear(t){const e=Object.keys(this);let r=e.length,d=!1;for(;r--;){const h=e[r];(!t||xd(this,this[h],h,t,!0))&&(delete this[h],d=!0)}return d}normalize(t){const e=this,r={};return Ce.forEach(this,(d,h)=>{const f=Ce.findKey(r,h);if(f){e[f]=Ec(d),delete e[h];return}const v=t?lT(h):String(h).trim();v!==h&&delete e[h],e[v]=Ec(d),r[v]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return Ce.forEach(this,(r,d)=>{r!=null&&r!==!1&&(e[d]=t&&Ce.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
|
1482
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(d=>r.set(d)),r}static accessor(t){const e=(this[S0]=this[S0]={accessors:{}}).accessors,r=this.prototype;function d(h){const f=ml(h);e[f]||(cT(r,h),e[f]=!0)}return Ce.isArray(t)?t.forEach(d):d(t),this}};Xr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ce.reduceDescriptors(Xr.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),Ce.freezeMethods(Xr);const uT="[REDACTED ****]";function hT(n){if(Ce.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(Ce.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function dT(n,t){const e=new Set(t.map(h=>String(h).toLowerCase())),r=[],d=h=>{if(h===null||typeof h!="object"||Ce.isBuffer(h))return h;if(r.indexOf(h)!==-1)return;h instanceof Xr&&(h=h.toJSON()),r.push(h);let f;if(Ce.isArray(h))f=[],h.forEach((v,o)=>{const p=d(v);Ce.isUndefined(p)||(f[o]=p)});else{if(!Ce.isPlainObject(h)&&hT(h))return r.pop(),h;f=Object.create(null);for(const[v,o]of Object.entries(h)){const p=e.has(v.toLowerCase())?uT:d(o);Ce.isUndefined(p)||(f[v]=p)}}return r.pop(),f};return d(n)}let lt=class qx extends Error{static from(t,e,r,d,h,f){const v=new qx(t.message,e||t.code,r,d,h);return v.cause=t,v.name=t.name,t.status!=null&&v.status==null&&(v.status=t.status),f&&Object.assign(v,f),v}constructor(t,e,r,d,h){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),r&&(this.config=r),d&&(this.request=d),h&&(this.response=h,this.status=h.status)}toJSON(){const t=this.config,e=t&&Ce.hasOwnProp(t,"redact")?t.redact:void 0,r=Ce.isArray(e)&&e.length>0?dT(t,e):Ce.toJSONObject(t);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:r,code:this.code,status:this.status}}};lt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",lt.ERR_BAD_OPTION="ERR_BAD_OPTION",lt.ECONNABORTED="ECONNABORTED",lt.ETIMEDOUT="ETIMEDOUT",lt.ECONNREFUSED="ECONNREFUSED",lt.ERR_NETWORK="ERR_NETWORK",lt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",lt.ERR_DEPRECATED="ERR_DEPRECATED",lt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",lt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",lt.ERR_CANCELED="ERR_CANCELED",lt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",lt.ERR_INVALID_URL="ERR_INVALID_URL",lt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const fT=null;function Cd(n){return Ce.isPlainObject(n)||Ce.isArray(n)}function $0(n){return Ce.endsWith(n,"[]")?n.slice(0,-2):n}function Ad(n,t,e){return n?n.concat(t).map(function(r,d){return r=$0(r),!e&&d?"["+r+"]":r}).join(e?".":""):t}function pT(n){return Ce.isArray(n)&&!n.some(Cd)}const gT=Ce.toFlatObject(Ce,{},null,function(n){return/^is[A-Z]/.test(n)});function Rc(n,t,e){if(!Ce.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=Ce.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(c,m){return!Ce.isUndefined(m[c])});const r=e.metaTokens,d=e.visitor||a,h=e.dots,f=e.indexes,v=e.Blob||typeof Blob<"u"&&Blob,o=e.maxDepth===void 0?100:e.maxDepth,p=v&&Ce.isSpecCompliantForm(t);if(!Ce.isFunction(d))throw new TypeError("visitor must be a function");function i(c){if(c===null)return"";if(Ce.isDate(c))return c.toISOString();if(Ce.isBoolean(c))return c.toString();if(!p&&Ce.isBlob(c))throw new lt("Blob is not supported. Use a Buffer instead.");return Ce.isArrayBuffer(c)||Ce.isTypedArray(c)?p&&typeof Blob=="function"?new Blob([c]):Buffer.from(c):c}function a(c,m,w){let x=c;if(Ce.isReactNative(t)&&Ce.isReactNativeBlob(c))return t.append(Ad(w,m,h),i(c)),!1;if(c&&!w&&typeof c=="object"){if(Ce.endsWith(m,"{}"))m=r?m:m.slice(0,-2),c=JSON.stringify(c);else if(Ce.isArray(c)&&pT(c)||(Ce.isFileList(c)||Ce.endsWith(m,"[]"))&&(x=Ce.toArray(c)))return m=$0(m),x.forEach(function(R,S){!(Ce.isUndefined(R)||R===null)&&t.append(f===!0?Ad([m],S,h):f===null?m:m+"[]",i(R))}),!1}return Cd(c)?!0:(t.append(Ad(w,m,h),i(c)),!1)}const u=[],g=Object.assign(gT,{defaultVisitor:a,convertValue:i,isVisitable:Cd});function s(c,m,w=0){if(!Ce.isUndefined(c)){if(w>o)throw new lt("Object is too deeply nested ("+w+" levels). Max depth: "+o,lt.ERR_FORM_DATA_DEPTH_EXCEEDED);if(u.indexOf(c)!==-1)throw Error("Circular reference detected in "+m.join("."));u.push(c),Ce.forEach(c,function(x,R){(!(Ce.isUndefined(x)||x===null)&&d.call(t,x,Ce.isString(R)?R.trim():R,m,g))===!0&&s(x,m?m.concat(R):[R],w+1)}),u.pop()}}if(!Ce.isObject(n))throw new TypeError("data must be an object");return s(n),t}function E0(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(e){return t[e]})}function _d(n,t){this._pairs=[],n&&Rc(n,this,t)}const R0=_d.prototype;R0.append=function(n,t){this._pairs.push([n,t])},R0.toString=function(n){const t=n?function(e){return n.call(this,e,E0)}:E0;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function mT(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function T0(n,t,e){if(!t)return n;const r=e&&e.encode||mT,d=Ce.isFunction(e)?{serialize:e}:e,h=d&&d.serialize;let f;if(h?f=h(t,d):f=Ce.isURLSearchParams(t)?t.toString():new _d(t,d).toString(r),f){const v=n.indexOf("#");v!==-1&&(n=n.slice(0,v)),n+=(n.indexOf("?")===-1?"?":"&")+f}return n}let I0=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Ce.forEach(this.handlers,function(e){e!==null&&t(e)})}};const kd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},vT=typeof URLSearchParams<"u"?URLSearchParams:_d,yT=typeof FormData<"u"?FormData:null,bT=typeof Blob<"u"?Blob:null,wT={isBrowser:!0,classes:{URLSearchParams:vT,FormData:yT,Blob:bT},protocols:["http","https","file","blob","url","data"]},Sd=typeof window<"u"&&typeof document<"u",$d=typeof navigator=="object"&&navigator||void 0,xT=Sd&&(!$d||["ReactNative","NativeScript","NS"].indexOf($d.product)<0),CT=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",AT=Sd&&window.location.href||"http://localhost",_T=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Sd,hasStandardBrowserEnv:xT,hasStandardBrowserWebWorkerEnv:CT,navigator:$d,origin:AT},Symbol.toStringTag,{value:"Module"})),Nr={..._T,...wT};function kT(n,t){return Rc(n,new Nr.classes.URLSearchParams,{visitor:function(e,r,d,h){return Nr.isNode&&Ce.isBuffer(e)?(this.append(r,e.toString("base64")),!1):h.defaultVisitor.apply(this,arguments)},...t})}function ST(n){return Ce.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function $T(n){const t={},e=Object.keys(n);let r;const d=e.length;let h;for(r=0;r<d;r++)h=e[r],t[h]=n[h];return t}function L0(n){function t(e,r,d,h){let f=e[h++];if(f==="__proto__")return!0;const v=Number.isFinite(+f),o=h>=e.length;return f=!f&&Ce.isArray(d)?d.length:f,o?(Ce.hasOwnProp(d,f)?d[f]=Ce.isArray(d[f])?d[f].concat(r):[d[f],r]:d[f]=r,!v):((!Ce.hasOwnProp(d,f)||!Ce.isObject(d[f]))&&(d[f]=[]),t(e,r,d[f],h)&&Ce.isArray(d[f])&&(d[f]=$T(d[f])),!v)}if(Ce.isFormData(n)&&Ce.isFunction(n.entries)){const e={};return Ce.forEachEntry(n,(r,d)=>{t(ST(r),d,e,0)}),e}return null}const xa=(n,t)=>n!=null&&Ce.hasOwnProp(n,t)?n[t]:void 0;function ET(n,t,e){if(Ce.isString(n))try{return(t||JSON.parse)(n),Ce.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const vl={transitional:kd,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,d=Ce.isObject(n);if(d&&Ce.isHTMLForm(n)&&(n=new FormData(n)),Ce.isFormData(n))return r?JSON.stringify(L0(n)):n;if(Ce.isArrayBuffer(n)||Ce.isBuffer(n)||Ce.isStream(n)||Ce.isFile(n)||Ce.isBlob(n)||Ce.isReadableStream(n))return n;if(Ce.isArrayBufferView(n))return n.buffer;if(Ce.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let h;if(d){const f=xa(this,"formSerializer");if(e.indexOf("application/x-www-form-urlencoded")>-1)return kT(n,f).toString();if((h=Ce.isFileList(n))||e.indexOf("multipart/form-data")>-1){const v=xa(this,"env"),o=v&&v.FormData;return Rc(h?{"files[]":n}:n,o&&new o,f)}}return d||r?(t.setContentType("application/json",!1),ET(n)):n}],transformResponse:[function(n){const t=xa(this,"transitional")||vl.transitional,e=t&&t.forcedJSONParsing,r=xa(this,"responseType"),d=r==="json";if(Ce.isResponse(n)||Ce.isReadableStream(n))return n;if(n&&Ce.isString(n)&&(e&&!r||d)){const h=!(t&&t.silentJSONParsing)&&d;try{return JSON.parse(n,xa(this,"parseReviver"))}catch(f){if(h)throw f.name==="SyntaxError"?lt.from(f,lt.ERR_BAD_RESPONSE,this,null,xa(this,"response")):f}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Nr.classes.FormData,Blob:Nr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ce.forEach(["delete","get","head","post","put","patch","query"],n=>{vl.headers[n]={}});function Ed(n,t){const e=this||vl,r=t||e,d=Xr.from(r.headers);let h=r.data;return Ce.forEach(n,function(f){h=f.call(e,h,d.normalize(),t?t.status:void 0)}),d.normalize(),h}function M0(n){return!!(n&&n.__CANCEL__)}let yl=class extends lt{constructor(t,e,r){super(t??"canceled",lt.ERR_CANCELED,e,r),this.name="CanceledError",this.__CANCEL__=!0}};function O0(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new lt("Request failed with status code "+e.status,e.status>=400&&e.status<500?lt.ERR_BAD_REQUEST:lt.ERR_BAD_RESPONSE,e.config,e.request,e))}function RT(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function TT(n,t){n=n||10;const e=new Array(n),r=new Array(n);let d=0,h=0,f;return t=t!==void 0?t:1e3,function(v){const o=Date.now(),p=r[h];f||(f=o),e[d]=v,r[d]=o;let i=h,a=0;for(;i!==d;)a+=e[i++],i=i%n;if(d=(d+1)%n,d===h&&(h=(h+1)%n),o-f<t)return;const u=p&&o-p;return u?Math.round(a*1e3/u):void 0}}function IT(n,t){let e=0,r=1e3/t,d,h;const f=(v,o=Date.now())=>{e=o,d=null,h&&(clearTimeout(h),h=null),n(...v)};return[(...v)=>{const o=Date.now(),p=o-e;p>=r?f(v,o):(d=v,h||(h=setTimeout(()=>{h=null,f(d)},r-p)))},()=>d&&f(d)]}const Tc=(n,t,e=3)=>{let r=0;const d=TT(50,250);return IT(h=>{if(!h||typeof h.loaded!="number")return;const f=h.loaded,v=h.lengthComputable?h.total:void 0,o=v!=null?Math.min(f,v):f,p=Math.max(0,o-r),i=d(p);r=Math.max(r,o);const a={loaded:o,total:v,progress:v?o/v:void 0,bytes:p,rate:i||void 0,estimated:i&&v?(v-o)/i:void 0,event:h,lengthComputable:v!=null,[t?"download":"upload"]:!0};n(a)},e)},N0=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},D0=n=>(...t)=>Ce.asap(()=>n(...t)),LT=Nr.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,Nr.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(Nr.origin),Nr.navigator&&/(msie|trident)/i.test(Nr.navigator.userAgent)):()=>!0,MT=Nr.hasStandardBrowserEnv?{write(n,t,e,r,d,h,f){if(typeof document>"u")return;const v=[`${n}=${encodeURIComponent(t)}`];Ce.isNumber(e)&&v.push(`expires=${new Date(e).toUTCString()}`),Ce.isString(r)&&v.push(`path=${r}`),Ce.isString(d)&&v.push(`domain=${d}`),h===!0&&v.push("secure"),Ce.isString(f)&&v.push(`SameSite=${f}`),document.cookie=v.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let e=0;e<t.length;e++){const r=t[e].replace(/^\s+/,""),d=r.indexOf("=");if(d!==-1&&r.slice(0,d)===n)return decodeURIComponent(r.slice(d+1))}return null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function OT(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function NT(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function P0(n,t,e){let r=!OT(t);return n&&(r||e===!1)?NT(n,t):t}const F0=n=>n instanceof Xr?{...n}:n;function Ms(n,t){t=t||{};const e=Object.create(null);Object.defineProperty(e,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,i,a,u){return Ce.isPlainObject(p)&&Ce.isPlainObject(i)?Ce.merge.call({caseless:u},p,i):Ce.isPlainObject(i)?Ce.merge({},i):Ce.isArray(i)?i.slice():i}function d(p,i,a,u){if(Ce.isUndefined(i)){if(!Ce.isUndefined(p))return r(void 0,p,a,u)}else return r(p,i,a,u)}function h(p,i){if(!Ce.isUndefined(i))return r(void 0,i)}function f(p,i){if(Ce.isUndefined(i)){if(!Ce.isUndefined(p))return r(void 0,p)}else return r(void 0,i)}function v(p,i,a){if(Ce.hasOwnProp(t,a))return r(p,i);if(Ce.hasOwnProp(n,a))return r(void 0,p)}const o={url:h,method:h,data:h,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,withXSRFToken:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,allowedSocketPaths:f,responseEncoding:f,validateStatus:v,headers:(p,i,a)=>d(F0(p),F0(i),a,!0)};return Ce.forEach(Object.keys({...n,...t}),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const i=Ce.hasOwnProp(o,p)?o[p]:d,a=Ce.hasOwnProp(n,p)?n[p]:void 0,u=Ce.hasOwnProp(t,p)?t[p]:void 0,g=i(a,u,p);Ce.isUndefined(g)&&i!==v||(e[p]=g)}),e}const DT=["content-type","content-length"];function PT(n,t,e){if(e!=="content-only"){n.set(t);return}Object.entries(t).forEach(([r,d])=>{DT.includes(r.toLowerCase())&&n.set(r,d)})}const FT=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,e)=>String.fromCharCode(parseInt(e,16))),z0=n=>{const t=Ms({},n),e=u=>Ce.hasOwnProp(t,u)?t[u]:void 0,r=e("data");let d=e("withXSRFToken");const h=e("xsrfHeaderName"),f=e("xsrfCookieName");let v=e("headers");const o=e("auth"),p=e("baseURL"),i=e("allowAbsoluteUrls"),a=e("url");if(t.headers=v=Xr.from(v),t.url=T0(P0(p,a,i),n.params,n.paramsSerializer),o&&v.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?FT(o.password):""))),Ce.isFormData(r)&&(Nr.hasStandardBrowserEnv||Nr.hasStandardBrowserWebWorkerEnv?v.setContentType(void 0):Ce.isFunction(r.getHeaders)&&PT(v,r.getHeaders(),e("formDataHeaderPolicy"))),Nr.hasStandardBrowserEnv&&(Ce.isFunction(d)&&(d=d(t)),d===!0||d==null&<(t.url))){const u=h&&f&&MT.read(f);u&&v.set(h,u)}return t},zT=typeof XMLHttpRequest<"u",BT=zT&&function(n){return new Promise(function(t,e){const r=z0(n);let d=r.data;const h=Xr.from(r.headers).normalize();let{responseType:f,onUploadProgress:v,onDownloadProgress:o}=r,p,i,a,u,g;function s(){u&&u(),g&&g(),r.cancelToken&&r.cancelToken.unsubscribe(p),r.signal&&r.signal.removeEventListener("abort",p)}let c=new XMLHttpRequest;c.open(r.method.toUpperCase(),r.url,!0),c.timeout=r.timeout;function m(){if(!c)return;const x=Xr.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),R={data:!f||f==="text"||f==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:x,config:n,request:c};O0(function(S){t(S),s()},function(S){e(S),s()},R),c=null}"onloadend"in c?c.onloadend=m:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.startsWith("file:"))||setTimeout(m)},c.onabort=function(){c&&(e(new lt("Request aborted",lt.ECONNABORTED,n,c)),s(),c=null)},c.onerror=function(x){const R=x&&x.message?x.message:"Network Error",S=new lt(R,lt.ERR_NETWORK,n,c);S.event=x||null,e(S),s(),c=null},c.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const R=r.transitional||kd;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),e(new lt(x,R.clarifyTimeoutError?lt.ETIMEDOUT:lt.ECONNABORTED,n,c)),s(),c=null},d===void 0&&h.setContentType(null),"setRequestHeader"in c&&Ce.forEach(k0(h),function(x,R){c.setRequestHeader(R,x)}),Ce.isUndefined(r.withCredentials)||(c.withCredentials=!!r.withCredentials),f&&f!=="json"&&(c.responseType=r.responseType),o&&([a,g]=Tc(o,!0),c.addEventListener("progress",a)),v&&c.upload&&([i,u]=Tc(v),c.upload.addEventListener("progress",i),c.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(p=x=>{c&&(e(!x||x.type?new yl(null,n,c):x),c.abort(),s(),c=null)},r.cancelToken&&r.cancelToken.subscribe(p),r.signal&&(r.signal.aborted?p():r.signal.addEventListener("abort",p)));const w=RT(r.url);if(w&&!Nr.protocols.includes(w)){e(new lt("Unsupported protocol "+w+":",lt.ERR_BAD_REQUEST,n));return}c.send(d||null)})},jT=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;const e=new AbortController;let r=!1;const d=function(o){if(!r){r=!0,f();const p=o instanceof Error?o:this.reason;e.abort(p instanceof lt?p:new yl(p instanceof Error?p.message:p))}};let h=t&&setTimeout(()=>{h=null,d(new lt(`timeout of ${t}ms exceeded`,lt.ETIMEDOUT))},t);const f=()=>{n&&(h&&clearTimeout(h),h=null,n.forEach(o=>{o.unsubscribe?o.unsubscribe(d):o.removeEventListener("abort",d)}),n=null)};n.forEach(o=>o.addEventListener("abort",d));const{signal:v}=e;return v.unsubscribe=()=>Ce.asap(f),v},WT=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let r=0,d;for(;r<e;)d=r+t,yield n.slice(r,d),r=d},HT=async function*(n,t){for await(const e of UT(n))yield*WT(e,t)},UT=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},B0=(n,t,e,r)=>{const d=HT(n,t);let h=0,f,v=o=>{f||(f=!0,r&&r(o))};return new ReadableStream({async pull(o){try{const{done:p,value:i}=await d.next();if(p){v(),o.close();return}let a=i.byteLength;if(e){let u=h+=a;e(u)}o.enqueue(new Uint8Array(i))}catch(p){throw v(p),p}},cancel(o){return v(o),d.return()}},{highWaterMark:2})};function VT(n){if(!n||typeof n!="string"||!n.startsWith("data:"))return 0;const t=n.indexOf(",");if(t<0)return 0;const e=n.slice(5,t),r=n.slice(t+1);if(/;base64/i.test(e)){let h=r.length;const f=r.length;for(let a=0;a<f;a++)if(r.charCodeAt(a)===37&&a+2<f){const u=r.charCodeAt(a+1),g=r.charCodeAt(a+2);(u>=48&&u<=57||u>=65&&u<=70||u>=97&&u<=102)&&(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102)&&(h-=2,a+=2)}let v=0,o=f-1;const p=a=>a>=2&&r.charCodeAt(a-2)===37&&r.charCodeAt(a-1)===51&&(r.charCodeAt(a)===68||r.charCodeAt(a)===100);o>=0&&(r.charCodeAt(o)===61?(v++,o--):p(o)&&(v++,o-=3)),v===1&&o>=0&&(r.charCodeAt(o)===61||p(o))&&v++;const i=Math.floor(h/4)*3-(v||0);return i>0?i:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let d=0;for(let h=0,f=r.length;h<f;h++){const v=r.charCodeAt(h);if(v<128)d+=1;else if(v<2048)d+=2;else if(v>=55296&&v<=56319&&h+1<f){const o=r.charCodeAt(h+1);o>=56320&&o<=57343?(d+=4,h++):d+=3}else d+=3}return d}const Rd="1.16.1",j0=64*1024,{isFunction:Ic}=Ce,W0=(n,...t)=>{try{return!!n(...t)}catch{return!1}},GT=n=>{const t=Ce.global!==void 0&&Ce.global!==null?Ce.global:globalThis,{ReadableStream:e,TextEncoder:r}=t;n=Ce.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:d,Request:h,Response:f}=n,v=d?Ic(d):typeof fetch=="function",o=Ic(h),p=Ic(f);if(!v)return!1;const i=v&&Ic(e),a=v&&(typeof r=="function"?(w=>x=>w.encode(x))(new r):async w=>new Uint8Array(await new h(w).arrayBuffer())),u=o&&i&&W0(()=>{let w=!1;const x=new h(Nr.origin,{body:new e,method:"POST",get duplex(){return w=!0,"half"}}),R=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),w&&!R}),g=p&&i&&W0(()=>Ce.isReadableStream(new f("").body)),s={stream:g&&(w=>w.body)};v&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!s[w]&&(s[w]=(x,R)=>{let S=x&&x[w];if(S)return S.call(x);throw new lt(`Response type '${w}' is not supported`,lt.ERR_NOT_SUPPORT,R)})});const c=async w=>{if(w==null)return 0;if(Ce.isBlob(w))return w.size;if(Ce.isSpecCompliantForm(w))return(await new h(Nr.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(Ce.isArrayBufferView(w)||Ce.isArrayBuffer(w))return w.byteLength;if(Ce.isURLSearchParams(w)&&(w=w+""),Ce.isString(w))return(await a(w)).byteLength},m=async(w,x)=>Ce.toFiniteNumber(w.getContentLength())??c(x);return async w=>{let{url:x,method:R,data:S,signal:A,cancelToken:C,timeout:O,onDownloadProgress:N,onUploadProgress:M,responseType:L,headers:j,withCredentials:F="same-origin",fetchOptions:D,maxContentLength:$,maxBodyLength:_}=z0(w);const I=Ce.isNumber($)&&$>-1,z=Ce.isNumber(_)&&_>-1;let U=d||fetch;L=L?(L+"").toLowerCase():"text";let V=jT([A,C&&C.toAbortSignal()],O),K=null;const Z=V&&V.unsubscribe&&(()=>{V.unsubscribe()});let oe;try{if(I&&typeof x=="string"&&x.startsWith("data:")&&VT(x)>$)throw new lt("maxContentLength size of "+$+" exceeded",lt.ERR_BAD_RESPONSE,w,K);if(z&&R!=="get"&&R!=="head"){const pe=await m(j,S);if(typeof pe=="number"&&isFinite(pe)&&pe>_)throw new lt("Request body larger than maxBodyLength limit",lt.ERR_BAD_REQUEST,w,K)}if(M&&u&&R!=="get"&&R!=="head"&&(oe=await m(j,S))!==0){let pe=new h(x,{method:"POST",body:S,duplex:"half"}),$e;if(Ce.isFormData(S)&&($e=pe.headers.get("content-type"))&&j.setContentType($e),pe.body){const[Re,Ge]=N0(oe,Tc(D0(M)));S=B0(pe.body,j0,Re,Ge)}}Ce.isString(F)||(F=F?"include":"omit");const ee=o&&"credentials"in h.prototype;if(Ce.isFormData(S)){const pe=j.getContentType();pe&&/^multipart\/form-data/i.test(pe)&&!/boundary=/i.test(pe)&&j.delete("content-type")}j.set("User-Agent","axios/"+Rd,!1);const re={...D,signal:V,method:R.toUpperCase(),headers:k0(j.normalize()),body:S,duplex:"half",credentials:ee?F:void 0};K=o&&new h(x,re);let ce=await(o?U(K,D):U(x,re));if(I){const pe=Ce.toFiniteNumber(ce.headers.get("content-length"));if(pe!=null&&pe>$)throw new lt("maxContentLength size of "+$+" exceeded",lt.ERR_BAD_RESPONSE,w,K)}const ie=g&&(L==="stream"||L==="response");if(g&&ce.body&&(N||I||ie&&Z)){const pe={};["status","statusText","headers"].forEach(ot=>{pe[ot]=ce[ot]});const $e=Ce.toFiniteNumber(ce.headers.get("content-length")),[Re,Ge]=N&&N0($e,Tc(D0(N),!0))||[];let qe=0;const ct=ot=>{if(I&&(qe=ot,qe>$))throw new lt("maxContentLength size of "+$+" exceeded",lt.ERR_BAD_RESPONSE,w,K);Re&&Re(ot)};ce=new f(B0(ce.body,j0,ct,()=>{Ge&&Ge(),Z&&Z()}),pe)}L=L||"text";let fe=await s[Ce.findKey(s,L)||"text"](ce,w);if(I&&!g&&!ie){let pe;if(fe!=null&&(typeof fe.byteLength=="number"?pe=fe.byteLength:typeof fe.size=="number"?pe=fe.size:typeof fe=="string"&&(pe=typeof r=="function"?new r().encode(fe).byteLength:fe.length)),typeof pe=="number"&&pe>$)throw new lt("maxContentLength size of "+$+" exceeded",lt.ERR_BAD_RESPONSE,w,K)}return!ie&&Z&&Z(),await new Promise((pe,$e)=>{O0(pe,$e,{data:fe,headers:Xr.from(ce.headers),status:ce.status,statusText:ce.statusText,config:w,request:K})})}catch(ee){if(Z&&Z(),V&&V.aborted&&V.reason instanceof lt){const re=V.reason;throw re.config=w,K&&(re.request=K),ee!==re&&(re.cause=ee),re}throw ee&&ee.name==="TypeError"&&/Load failed|fetch/i.test(ee.message)?Object.assign(new lt("Network Error",lt.ERR_NETWORK,w,K,ee&&ee.response),{cause:ee.cause||ee}):lt.from(ee,ee&&ee.code,w,K,ee&&ee.response)}}},qT=new Map,H0=n=>{let t=n&&n.env||{};const{fetch:e,Request:r,Response:d}=t,h=[r,d,e];let f=h.length,v=f,o,p,i=qT;for(;v--;)o=h[v],p=i.get(o),p===void 0&&i.set(o,p=v?new Map:GT(t)),i=p;return p};H0();const Td={http:fT,xhr:BT,fetch:{get:H0}};Ce.forEach(Td,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const U0=n=>`- ${n}`,KT=n=>Ce.isFunction(n)||n===null||n===!1;function YT(n,t){n=Ce.isArray(n)?n:[n];const{length:e}=n;let r,d;const h={};for(let f=0;f<e;f++){r=n[f];let v;if(d=r,!KT(r)&&(d=Td[(v=String(r)).toLowerCase()],d===void 0))throw new lt(`Unknown adapter '${v}'`);if(d&&(Ce.isFunction(d)||(d=d.get(t))))break;h[v||"#"+f]=d}if(!d){const f=Object.entries(h).map(([o,p])=>`adapter ${o} `+(p===!1?"is not supported by the environment":"is not available in the build"));let v=e?f.length>1?`since :
|
|
1483
|
+
`+f.map(U0).join(`
|
|
1484
|
+
`):" "+U0(f[0]):"as no adapter specified";throw new lt("There is no suitable adapter to dispatch the request "+v,"ERR_NOT_SUPPORT")}return d}const V0={getAdapter:YT,adapters:Td};function Id(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new yl(null,n)}function G0(n){return Id(n),n.headers=Xr.from(n.headers),n.data=Ed.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),V0.getAdapter(n.adapter||vl.adapter,n)(n).then(function(t){Id(n),n.response=t;try{t.data=Ed.call(n,n.transformResponse,t)}finally{delete n.response}return t.headers=Xr.from(t.headers),t},function(t){if(!M0(t)&&(Id(n),t&&t.response)){n.response=t.response;try{t.response.data=Ed.call(n,n.transformResponse,t.response)}finally{delete n.response}t.response.headers=Xr.from(t.response.headers)}return Promise.reject(t)})}const Lc={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Lc[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const q0={};Lc.transitional=function(n,t,e){function r(d,h){return"[Axios v"+Rd+"] Transitional option '"+d+"'"+h+(e?". "+e:"")}return(d,h,f)=>{if(n===!1)throw new lt(r(h," has been removed"+(t?" in "+t:"")),lt.ERR_DEPRECATED);return t&&!q0[h]&&(q0[h]=!0,console.warn(r(h," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(d,h,f):!0}},Lc.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function XT(n,t,e){if(typeof n!="object")throw new lt("options must be an object",lt.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let d=r.length;for(;d-- >0;){const h=r[d],f=Object.prototype.hasOwnProperty.call(t,h)?t[h]:void 0;if(f){const v=n[h],o=v===void 0||f(v,h,n);if(o!==!0)throw new lt("option "+h+" must be "+o,lt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new lt("Unknown option "+h,lt.ERR_BAD_OPTION)}}const Mc={assertOptions:XT,validators:Lc},Pi=Mc.validators;let Os=class{constructor(n){this.defaults=n||{},this.interceptors={request:new I0,response:new I0}}async request(n,t){try{return await this._request(n,t)}catch(e){if(e instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const d=(()=>{if(!r.stack)return"";const h=r.stack.indexOf(`
|
|
1485
|
+
`);return h===-1?"":r.stack.slice(h+1)})();try{if(!e.stack)e.stack=d;else if(d){const h=d.indexOf(`
|
|
1486
|
+
`),f=h===-1?-1:d.indexOf(`
|
|
1487
|
+
`,h+1),v=f===-1?"":d.slice(f+1);String(e.stack).endsWith(v)||(e.stack+=`
|
|
1488
|
+
`+d)}}catch{}}throw e}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=Ms(this.defaults,t);const{transitional:e,paramsSerializer:r,headers:d}=t;e!==void 0&&Mc.assertOptions(e,{silentJSONParsing:Pi.transitional(Pi.boolean),forcedJSONParsing:Pi.transitional(Pi.boolean),clarifyTimeoutError:Pi.transitional(Pi.boolean),legacyInterceptorReqResOrdering:Pi.transitional(Pi.boolean)},!1),r!=null&&(Ce.isFunction(r)?t.paramsSerializer={serialize:r}:Mc.assertOptions(r,{encode:Pi.function,serialize:Pi.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Mc.assertOptions(t,{baseUrl:Pi.spelling("baseURL"),withXsrfToken:Pi.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let h=d&&Ce.merge(d.common,d[t.method]);d&&Ce.forEach(["delete","get","head","post","put","patch","query","common"],g=>{delete d[g]}),t.headers=Xr.concat(h,d);const f=[];let v=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(t)===!1)return;v=v&&g.synchronous;const s=t.transitional||kd;s&&s.legacyInterceptorReqResOrdering?f.unshift(g.fulfilled,g.rejected):f.push(g.fulfilled,g.rejected)});const o=[];this.interceptors.response.forEach(function(g){o.push(g.fulfilled,g.rejected)});let p,i=0,a;if(!v){const g=[G0.bind(this),void 0];for(g.unshift(...f),g.push(...o),a=g.length,p=Promise.resolve(t);i<a;)p=p.then(g[i++],g[i++]);return p}a=f.length;let u=t;for(;i<a;){const g=f[i++],s=f[i++];try{u=g(u)}catch(c){s.call(this,c);break}}try{p=G0.call(this,u)}catch(g){return Promise.reject(g)}for(i=0,a=o.length;i<a;)p=p.then(o[i++],o[i++]);return p}getUri(n){n=Ms(this.defaults,n);const t=P0(n.baseURL,n.url,n.allowAbsoluteUrls);return T0(t,n.params,n.paramsSerializer)}};Ce.forEach(["delete","get","head","options"],function(n){Os.prototype[n]=function(t,e){return this.request(Ms(e||{},{method:n,url:t,data:(e||{}).data}))}}),Ce.forEach(["post","put","patch","query"],function(n){function t(e){return function(r,d,h){return this.request(Ms(h||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:d}))}}Os.prototype[n]=t(),n!=="query"&&(Os.prototype[n+"Form"]=t(!0))});let JT=class Kx{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(d){e=d});const r=this;this.promise.then(d=>{if(!r._listeners)return;let h=r._listeners.length;for(;h-- >0;)r._listeners[h](d);r._listeners=null}),this.promise.then=d=>{let h;const f=new Promise(v=>{r.subscribe(v),h=v}).then(d);return f.cancel=function(){r.unsubscribe(h)},f},t(function(d,h,f){r.reason||(r.reason=new yl(d,h,f),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=r=>{t.abort(r)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new Kx(function(e){t=e}),cancel:t}}};function ZT(n){return function(t){return n.apply(null,t)}}function QT(n){return Ce.isObject(n)&&n.isAxiosError===!0}const Ld={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ld).forEach(([n,t])=>{Ld[t]=n});function K0(n){const t=new Os(n),e=g0(Os.prototype.request,t);return Ce.extend(e,Os.prototype,t,{allOwnKeys:!0}),Ce.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return K0(Ms(n,r))},e}const Qn=Mn("A",K0(vl));Qn.Axios=Os,Qn.CanceledError=yl,Qn.CancelToken=JT,Qn.isCancel=M0,Qn.VERSION=Rd,Qn.toFormData=Rc,Qn.AxiosError=lt,Qn.Cancel=Qn.CanceledError,Qn.all=function(n){return Promise.all(n)},Qn.spread=ZT,Qn.isAxiosError=QT,Qn.mergeConfig=Ms,Qn.AxiosHeaders=Xr,Qn.formToJSON=n=>L0(Ce.isHTMLForm(n)?new FormData(n):n),Qn.getAdapter=V0.getAdapter,Qn.HttpStatusCode=Ld,Qn.default=Qn;const{Axios:dB,AxiosError:fB,CanceledError:pB,isCancel:gB,CancelToken:mB,VERSION:vB,all:yB,Cancel:bB,isAxiosError:wB,spread:xB,toFormData:CB,AxiosHeaders:AB,HttpStatusCode:_B,formToJSON:kB,getAdapter:SB,mergeConfig:$B,create:EB}=Qn;function Y0(){return Object.assign({},sa())}function eI(n,t,e){const r=Kr(n,e?.in);return r.setTime(r.getTime()+t*rc),r}function tI(n,t){const e=()=>yo(t?.in,NaN),r=oI(n);let d;if(r.date){const o=sI(r.date,2);d=aI(o.restDateString,o.year)}if(!d||isNaN(+d))return e();const h=+d;let f=0,v;if(r.time&&(f=lI(r.time),isNaN(f)))return e();if(r.timezone){if(v=cI(r.timezone),isNaN(v))return e()}else{const o=new Date(h+f),p=Kr(0,t?.in);return p.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),p.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),p}return Kr(h+f+v,t?.in)}const Oc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},nI=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,rI=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,iI=/^([+-])(\d{2})(?::?(\d{2}))?$/;function oI(n){const t={},e=n.split(Oc.dateTimeDelimiter);let r;if(e.length>2)return t;if(/:/.test(e[0])?r=e[0]:(t.date=e[0],r=e[1],Oc.timeZoneDelimiter.test(t.date)&&(t.date=n.split(Oc.timeZoneDelimiter)[0],r=n.substr(t.date.length,n.length))),r){const d=Oc.timezone.exec(r);d?(t.time=r.replace(d[1],""),t.timezone=d[1]):t.time=r}return t}function sI(n,t){const e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=n.match(e);if(!r)return{year:NaN,restDateString:""};const d=r[1]?parseInt(r[1]):null,h=r[2]?parseInt(r[2]):null;return{year:h===null?d:h*100,restDateString:n.slice((r[1]||r[2]).length)}}function aI(n,t){if(t===null)return new Date(NaN);const e=n.match(nI);if(!e)return new Date(NaN);const r=!!e[4],d=bl(e[1]),h=bl(e[2])-1,f=bl(e[3]),v=bl(e[4]),o=bl(e[5])-1;if(r)return pI(t,v,o)?uI(t,v,o):new Date(NaN);{const p=new Date(0);return!dI(t,h,f)||!fI(t,d)?new Date(NaN):(p.setUTCFullYear(t,h,Math.max(d,f)),p)}}function bl(n){return n?parseInt(n):1}function lI(n){const t=n.match(rI);if(!t)return NaN;const e=Md(t[1]),r=Md(t[2]),d=Md(t[3]);return gI(e,r,d)?e*ih+r*rc+d*1e3:NaN}function Md(n){return n&&parseFloat(n.replace(",","."))||0}function cI(n){if(n==="Z")return 0;const t=n.match(iI);if(!t)return 0;const e=t[1]==="+"?-1:1,r=parseInt(t[2]),d=t[3]&&parseInt(t[3])||0;return mI(r,d)?e*(r*ih+d*rc):NaN}function uI(n,t,e){const r=new Date(0);r.setUTCFullYear(n,0,4);const d=r.getUTCDay()||7,h=(t-1)*7+e+1-d;return r.setUTCDate(r.getUTCDate()+h),r}const hI=[31,null,31,30,31,30,31,31,30,31,30,31];function X0(n){return n%400===0||n%4===0&&n%100!==0}function dI(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(hI[t]||(X0(n)?29:28))}function fI(n,t){return t>=1&&t<=(X0(n)?366:365)}function pI(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function gI(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function mI(n,t){return t>=0&&t<=59}function vI(n,t,e){return eI(n,-t,e)}function J0(n,t,e){const r=Y0(),d=wI(n,e.timeZone,e.locale??r.locale);return"formatToParts"in d?yI(d,t):bI(d,t)}function yI(n,t){const e=n.formatToParts(t);for(let r=e.length-1;r>=0;--r)if(e[r].type==="timeZoneName")return e[r].value}function bI(n,t){const e=n.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(e);return r?r[0].substr(1):""}function wI(n,t,e){return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:t,timeZoneName:n})}function xI(n,t){const e=SI(t);return"formatToParts"in e?AI(e,n):_I(e,n)}const CI={year:0,month:1,day:2,hour:3,minute:4,second:5};function AI(n,t){try{const e=n.formatToParts(t),r=[];for(let d=0;d<e.length;d++){const h=CI[e[d].type];h!==void 0&&(r[h]=parseInt(e[d].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}function _I(n,t){const e=n.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e);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 Od={},Z0=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")),kI=Z0==="06/25/2014, 00:00:00"||Z0==="06/25/2014 00:00:00";function SI(n){return Od[n]||(Od[n]=kI?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Od[n]}function Q0(n,t,e,r,d,h,f){const v=new Date(0);return v.setUTCFullYear(n,t,e),v.setUTCHours(r,d,h,f),v}const eb=36e5,$I=6e4,Nd={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Dd(n,t,e){if(!n)return 0;let r=Nd.timezoneZ.exec(n);if(r)return 0;let d,h;if(r=Nd.timezoneHH.exec(n),r)return d=parseInt(r[1],10),tb(d)?-(d*eb):NaN;if(r=Nd.timezoneHHMM.exec(n),r){d=parseInt(r[2],10);const f=parseInt(r[3],10);return tb(d,f)?(h=Math.abs(d)*eb+f*$I,r[1]==="+"?-h:h):NaN}if(TI(n)){t=new Date(t||Date.now());const f=e?t:EI(t),v=Pd(f,n);return-(e?v:RI(t,v,n))}return NaN}function EI(n){return Q0(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function Pd(n,t){const e=xI(n,t),r=Q0(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime();let d=n.getTime();const h=d%1e3;return d-=h>=0?h:1e3+h,r-d}function RI(n,t,e){let r=n.getTime()-t;const d=Pd(new Date(r),e);if(t===d)return t;r-=d-t;const h=Pd(new Date(r),e);return d===h?d:Math.max(d,h)}function tb(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}const nb={};function TI(n){if(nb[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),nb[n]=!0,!0}catch{return!1}}const II=60*1e3,LI={X:function(n,t,e){const r=Fd(e.timeZone,n);if(r===0)return"Z";switch(t){case"X":return rb(r);case"XXXX":case"XX":return Ca(r);default:return Ca(r,":")}},x:function(n,t,e){const r=Fd(e.timeZone,n);switch(t){case"x":return rb(r);case"xxxx":case"xx":return Ca(r);default:return Ca(r,":")}},O:function(n,t,e){const r=Fd(e.timeZone,n);switch(t){case"O":case"OO":case"OOO":return"GMT"+MI(r,":");default:return"GMT"+Ca(r,":")}},z:function(n,t,e){switch(t){case"z":case"zz":case"zzz":return J0("short",n,e);default:return J0("long",n,e)}}};function Fd(n,t){const e=n?Dd(n,t,!0)/II:t?.getTimezoneOffset()??0;if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+n);return e}function Nc(n,t){const e=n<0?"-":"";let r=Math.abs(n).toString();for(;r.length<t;)r="0"+r;return e+r}function Ca(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),d=Nc(Math.floor(r/60),2),h=Nc(Math.floor(r%60),2);return e+d+t+h}function rb(n,t){return n%60===0?(n>0?"-":"+")+Nc(Math.abs(n)/60,2):Ca(n,t)}function MI(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),d=Math.floor(r/60),h=r%60;return h===0?e+String(d):e+String(d)+t+Nc(h,2)}function ib(n){const t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),+n-+t}const OI=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,zd=36e5,ob=6e4,NI=2,Jr={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:OI};function sb(n,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);const e=t.additionalDigits==null?NI:Number(t.additionalDigits);if(e!==2&&e!==1&&e!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(Object.prototype.toString.call(n)!=="[object String]")return new Date(NaN);const r=DI(n),{year:d,restDateString:h}=PI(r.date,e),f=FI(h,d);if(f===null||isNaN(f.getTime()))return new Date(NaN);if(f){const v=f.getTime();let o=0,p;if(r.time&&(o=zI(r.time),o===null||isNaN(o)))return new Date(NaN);if(r.timeZone||t.timeZone){if(p=Dd(r.timeZone||t.timeZone,new Date(v+o)),isNaN(p))return new Date(NaN)}else p=ib(new Date(v+o)),p=ib(new Date(v+o+p));return new Date(v+o+p)}else return new Date(NaN)}function DI(n){const t={};let e=Jr.dateTimePattern.exec(n),r;if(e?(t.date=e[1],r=e[3]):(e=Jr.datePattern.exec(n),e?(t.date=e[1],r=e[2]):(t.date=null,r=n)),r){const d=Jr.timeZone.exec(r);d?(t.time=r.replace(d[1],""),t.timeZone=d[1].trim()):t.time=r}return t}function PI(n,t){if(n){const e=Jr.YYY[t],r=Jr.YYYYY[t];let d=Jr.YYYY.exec(n)||r.exec(n);if(d){const h=d[1];return{year:parseInt(h,10),restDateString:n.slice(h.length)}}if(d=Jr.YY.exec(n)||e.exec(n),d){const h=d[1];return{year:parseInt(h,10)*100,restDateString:n.slice(h.length)}}}return{year:null}}function FI(n,t){if(t===null)return null;let e,r,d;if(!n||!n.length)return e=new Date(0),e.setUTCFullYear(t),e;let h=Jr.MM.exec(n);if(h)return e=new Date(0),r=parseInt(h[1],10)-1,cb(t,r)?(e.setUTCFullYear(t,r),e):new Date(NaN);if(h=Jr.DDD.exec(n),h){e=new Date(0);const f=parseInt(h[1],10);return WI(t,f)?(e.setUTCFullYear(t,0,f),e):new Date(NaN)}if(h=Jr.MMDD.exec(n),h){e=new Date(0),r=parseInt(h[1],10)-1;const f=parseInt(h[2],10);return cb(t,r,f)?(e.setUTCFullYear(t,r,f),e):new Date(NaN)}if(h=Jr.Www.exec(n),h)return d=parseInt(h[1],10)-1,ub(d)?ab(t,d):new Date(NaN);if(h=Jr.WwwD.exec(n),h){d=parseInt(h[1],10)-1;const f=parseInt(h[2],10)-1;return ub(d,f)?ab(t,d,f):new Date(NaN)}return null}function zI(n){let t,e,r=Jr.HH.exec(n);if(r)return t=parseFloat(r[1].replace(",",".")),Bd(t)?t%24*zd:NaN;if(r=Jr.HHMM.exec(n),r)return t=parseInt(r[1],10),e=parseFloat(r[2].replace(",",".")),Bd(t,e)?t%24*zd+e*ob:NaN;if(r=Jr.HHMMSS.exec(n),r){t=parseInt(r[1],10),e=parseInt(r[2],10);const d=parseFloat(r[3].replace(",","."));return Bd(t,e,d)?t%24*zd+e*ob+d*1e3:NaN}return null}function ab(n,t,e){t=t||0,e=e||0;const r=new Date(0);r.setUTCFullYear(n,0,4);const d=r.getUTCDay()||7,h=t*7+e+1-d;return r.setUTCDate(r.getUTCDate()+h),r}const BI=[31,28,31,30,31,30,31,31,30,31,30,31],jI=[31,29,31,30,31,30,31,31,30,31,30,31];function lb(n){return n%400===0||n%4===0&&n%100!==0}function cb(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;const r=lb(n);if(r&&e>jI[t]||!r&&e>BI[t])return!1}return!0}function WI(n,t){if(t<1)return!1;const e=lb(n);return!(e&&t>366||!e&&t>365)}function ub(n,t){return!(n<0||n>52||t!=null&&(t<0||t>6))}function Bd(n,t,e){return!(n<0||n>=25||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}const HI=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function UI(n,t,e={}){t=String(t);const r=t.match(HI);if(r){const d=sb(e.originalDate||n,e);t=r.reduce(function(h,f){if(f[0]==="'")return h;const v=h.indexOf(f),o=h[v-1]==="'",p=h.replace(f,"'"+LI[f[0]](d,f,e)+"'");return o?p.substring(0,v-1)+p.substring(v+1):p},t)}return _s(n,t,e)}function VI(n,t,e){n=sb(n,e);const r=Dd(t,n,!0),d=new Date(n.getTime()-r),h=new Date(0);return h.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),h.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),h}function Dc(n,t,e,r){return r={...r,timeZone:t,originalDate:n},UI(VI(n,t,{timeZone:r.timeZone}),e,r)}const Pc="yyyy-MM-dd",hb="HH:mm:ss.SSS",db="HH:mm:ss",Fc=`${Pc} ${hb}`,fb=`${Pc} ${db}`,RB=Mn("R",{methods:{parseDateTime(n,t){return n.includes(" ")&&(n=n.replace(" ","T")),t&&t==="UTC"&&(n+="Z"),Date.parse(n)},formatUtcToLocal(n,t){return _s(!t||t==="local"?vI(n,n.getTimezoneOffset()):n,Fc)},formatDateTime(n,t){return!t||t==="local"?_s(n,Fc):Dc(n,t,Fc)},formatDateTimeHMS(n,t){return!t||t==="local"?_s(n,fb):Dc(n,t,fb)},formatDate:function(n,t){return!t||t==="local"?_s(n,Pc):Dc(n,this.timeZone,Pc)},formatTime:function(n,t,e=hb){return!t||t==="local"?_s(n,e):Dc(n,this.timeZone,e)},formatTimeHMS:function(n,t){return this.formatTime(n,t,db)},formatTimestamp(n,t){return this.formatDateTime(tI(n),t)},formatSeconds(n,t){return this.formatDateTime(new Date(n*1e3),t)},formatNanoseconds(n,t){return this.formatDateTime(new Date(parseInt(n)/1e6),t)}}}),pb=100,gb=Mn("e",fg("app",{state:()=>({notifyHistory:[],namedWidgets:{},playback:{playbackMode:null,playbackDateTime:null,playbackStep:1,playbackLoading:0}}),getters:{namedWidget:n=>t=>n.namedWidgets[t]},actions:{notifyAddHistory(n){this.notifyHistory.length>=pb&&(this.notifyHistory.length=pb-1),this.notifyHistory.unshift(n)},notifyClearHistory(){this.notifyHistory=[]},setNamedWidget(n){Object.assign(this.namedWidgets,n)},clearNamedWidget(n){delete this.namedWidgets[n]},updatePlayback(n){Object.assign(this.playback,n)}}})),Aa=pg();Aa.use(({store:n})=>{n.commit=(t,e)=>{typeof n[t]=="function"&&n[t](e)},n.dispatch=(t,e)=>{if(typeof n[t]=="function")return n[t](e)}});const GI=Aa.install.bind(Aa);Aa.install=n=>{GI(n);const t=gb(Aa);n.config.globalProperties.$store={state:new Proxy({},{get(e,r){return t.$state}}),getters:new Proxy({},{get(e,r){if(r.includes("/")){const[,d]=r.split("/");return t[d]}return t[r]}}),commit(e,r){if(e.includes("/")){const[,d]=e.split("/");t[d]?.(r)}else t[e]?.(r)},dispatch(e,r){if(e.includes("/")){const[,d]=e.split("/");return t[d]?.(r)}else return t[e]?.(r)}}};const qI="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=",KI={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number,default:1}},computed:{icons:function(){return qI},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const n=tL.indexOf(mb[this.status]),t=1-(n-1)*.05,e=224*this.scaleFactor*t,r=32*this.scaleFactor*t,d=32*this.scaleFactor*t;return[`background-image: url(${this.icons});`,`background-position-x: -${n*d}px;`,`background-size: ${e}px ${r}px;`,`height: ${d}px;`,`width: ${d}px;`,`padding-top: ${n-1}px;`].join("")}}};function YI(n,t,e,r,d,h){return rt(),on("div",{style:gs(h.iconStyle)},null,4)}const XI=Xi(KI,[["render",YI]]),JI={props:{icon:{type:String,default:null},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function ZI(n,t,e,r,d,h){const f=Ue("rux-icon");return rt(),Bt(f,{size:e.size,icon:e.icon,style:gs(h.colorStyle)},null,8,["size","icon","style"])}const QI=Xi(JI,[["render",ZI],["__scopeId","data-v-bb4cd487"]]),mb={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"},jd={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},eL=function(n){const t="#000000",e="#ffffff",r=jd[mb[n]];if(r){const d=+`0x${r.slice(1,3)}`,h=+`0x${r.slice(3,5)}`,f=+`0x${r.slice(5,7)}`;if((d*299+h*587+f*114)/1e3>128)return t}return e},tL=Object.keys(jd),nL={astro:{component:n=>ea(QI,{...n})},"astro-status":{component:n=>ea(XI,{...n,status:n.icon})}},rL={extras:{component:n=>ea(hC,{...n})}},iL=50,oL=2e3,vb="single-spa:app-change",sL={data(){return{appsMounted:!1,show:!1,hideSpinner:!1,pollInterval:null}},computed:{showSpinner:function(){return!this.hideSpinner&&!this.show}},created(){window.addEventListener(vb,this.handleAppChange)},mounted(){this.pollForMountedApps(),setTimeout(()=>{this.appsMounted||(this.show=!0,this.pollInterval&&clearInterval(this.pollInterval))},oL)},unmounted(){window.removeEventListener(vb,this.handleAppChange),this.pollInterval&&clearInterval(this.pollInterval)},methods:{handleAppChange:function(n){this.show=!n.detail.appsByNewStatus.MOUNTED,this.hideSpinner=!0},pollForMountedApps:function(){this.pollInterval=setInterval(()=>{this.appsMounted=Mu().length>0,Mu().length>0&&(this.hideSpinner=!0,clearInterval(this.pollInterval))},iL)}}},aL={class:"mx-1"},lL={key:1,class:"d-flex justify-center align-center"};function cL(n,t,e,r,d,h){const f=Ue("v-card-title"),v=Ue("v-card-text"),o=Ue("v-card"),p=Ue("v-progress-circular");return rt(),on(si,null,[d.show?(rt(),Bt(o,{key:0},{default:ze(()=>[We(f,null,{default:ze(()=>[...t[0]||(t[0]=[Nt(" 404 Not Found ",-1)])]),_:1}),We(v,{class:"d-flex align-center mt-3"},{default:ze(()=>[t[1]||(t[1]=Nt(" The requested URL ",-1)),Jn("code",aL,yn(n.$route.fullPath),1),t[2]||(t[2]=Nt(" was not routable. ",-1)),t[3]||(t[3]=Jn("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):Gr("",!0),h.showSpinner?(rt(),on("div",lL,[We(p,{indeterminate:""})])):Gr("",!0)],64)}const uL=Xi(sL,[["render",cL]]);var Wd={};const hL={props:{modelValue:Boolean},emits:["update:modelValue"],data(){return{url:"",type:null,response:null,activeDownload:!1,disableSearch:!1,expanded:[]}},computed:{show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}},listData:function(){return this.response?this.type==="github"?this.parseGithub():this.parseRuby():[]}},methods:{parseGithub:function(){const n=/\w+.gem/;return this.response.tree.filter(t=>n.exec(t.path)).map(t=>({name:t.path,url:`https://raw.github.com/OpenC3/openc3-tools/main/${t.path}`}))},getResponse:function(){this.disableSearch=!0,Qn.get(this.url).then(n=>{this.response=n.data}),setTimeout(()=>{this.disableSearch=!1},1e4)},searchGithub:function(){this.type="github",this.url="https://api.github.com/repos/OpenC3/openc3-tools/git/trees/main?recursive=1",this.getResponse()},downloadGem:function(n){const t=document.createElement("a");t.href=n.url,t.setAttribute("download",n.name),t.click(),t.remove()}}},dL={class:"pa-3"},fL={class:"px-2"},pL={key:0,class:"mt-4"},gL={key:1,class:"mt-4"};function mL(n,t,e,r,d,h){const f=Ue("v-spacer"),v=Ue("v-toolbar"),o=Ue("v-row"),p=Ue("v-icon"),i=Ue("v-btn"),a=Ue("v-col"),u=Ue("v-list-item-title"),g=Ue("v-progress-circular"),s=Ue("v-list-item"),c=Ue("v-divider"),m=Ue("v-card-text"),w=Ue("v-card"),x=Ue("v-dialog");return rt(),Bt(x,{modelValue:h.show,"onUpdate:modelValue":t[0]||(t[0]=R=>h.show=R),width:"600"},{default:ze(()=>[We(w,null,{default:ze(()=>[We(v,{height:"24"},{default:ze(()=>[We(f),t[1]||(t[1]=Jn("span",null," Download Gems ",-1)),We(f)]),_:1}),We(m,null,{default:ze(()=>[Jn("div",dL,[We(o,{class:"my-2"},{default:ze(()=>[...t[2]||(t[2]=[Nt(" Select a download option ",-1)])]),_:1}),We(o,null,{default:ze(()=>[We(a,null,{default:ze(()=>[Jn("div",fL,[We(i,{block:"","data-test":"searchGithub",color:"primary",disabled:d.disableSearch,onClick:h.searchGithub},{default:ze(()=>[t[4]||(t[4]=Nt(" Github ",-1)),We(p,{end:"",theme:"dark"},{default:ze(()=>[...t[3]||(t[3]=[Nt(" mdi-github ",-1)])]),_:1})]),_:1},8,["disabled","onClick"])])]),_:1})]),_:1}),We(o,{class:"mt-5"},{default:ze(()=>[...t[5]||(t[5]=[Nt(" Community Gems ",-1)])]),_:1}),h.listData.length<1?(rt(),on("div",pL,[We(o,{class:"mx-2"},{default:ze(()=>[...t[6]||(t[6]=[Jn("span",null," I’m sorry, Dave. No gems available.... ",-1)])]),_:1})])):(rt(),on("div",gL,[(rt(!0),on(si,null,vo(h.listData,(R,S)=>(rt(),on("div",{key:S},[We(s,null,{default:ze(()=>[We(u,null,{default:ze(()=>[Nt(yn(R.name),1)]),_:2},1024),We(s,{icon:""},{default:ze(()=>[d.activeDownload?(rt(),Bt(g,{key:0,indeterminate:"",color:"primary"})):(rt(),Bt(i,{key:1,icon:"mdi-cloud-download",variant:"text",disabled:d.activeDownload,onClick:A=>h.downloadGem(R)},null,8,["disabled","onClick"]))]),_:2},1024)]),_:2},1024),S<h.listData.length-1?(rt(),Bt(c,{key:S})):Gr("",!0)]))),128))]))])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const TB=Mn("_",Xi(hL,[["render",mL]])),vL={props:{modelValue:Boolean,plugin:{type:String,default:null},targets:{type:Array,default:null},pluginDelete:Boolean},emits:["update:modelValue","submit","cancel"],data(){return{modifiedTargets:[],deleteModified:!1}},computed:{show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}}},created(){for(const n of this.targets)tm.get(`/openc3-api/targets/${n.name}/modified_files`).then(t=>{t.data.length!==0&&this.modifiedTargets.push({name:n.name,files:t.data})})},methods:{cancel(){this.show=!1,this.$emit("cancel")}}},yL={class:"file-list-container"};function bL(n,t,e,r,d,h){const f=Ue("v-spacer"),v=Ue("v-toolbar"),o=Ue("v-list-item-title"),p=Ue("v-list-item-subtitle"),i=Ue("v-list-item"),a=Ue("v-checkbox"),u=Ue("v-card-text"),g=Ue("v-btn"),s=Ue("v-card-actions"),c=Ue("v-card"),m=Ue("v-dialog");return rt(),Bt(m,{modelValue:h.show,"onUpdate:modelValue":t[2]||(t[2]=w=>h.show=w),persistent:"",width:"600",onKeydown:Bl(h.cancel,["esc"])},{default:ze(()=>[We(c,null,{default:ze(()=>[We(v,{height:"24"},{default:ze(()=>[We(f),t[3]||(t[3]=Jn("span",null," Modified Plugin ",-1)),We(f)]),_:1}),We(u,{class:"pa-3 card-container"},{default:ze(()=>[Jn("div",null," Plugin "+yn(e.plugin)+" was modified. Would you like to delete the existing modified files? ",1),(rt(!0),on(si,null,vo(d.modifiedTargets,(w,x)=>(rt(),Bt(i,{key:x,lines:"two"},{default:ze(()=>[We(o,null,{default:ze(()=>[Nt(yn(w.name),1)]),_:2},1024),Jn("div",yL,[(rt(!0),on(si,null,vo(w.files,(R,S)=>(rt(),Bt(p,{key:S},{default:ze(()=>[Nt(yn(R),1)]),_:2},1024))),128))])]),_:2},1024))),128)),We(a,{modelValue:d.deleteModified,"onUpdate:modelValue":t[0]||(t[0]=w=>d.deleteModified=w),label:"DELETE MODIFIED! THIS CAN NOT BE UNDONE!!!",color:"error","data-test":"modified-plugin-delete-checkbox"},null,8,["modelValue"])]),_:1}),We(s,{class:"px-2"},{default:ze(()=>[We(f),We(g,{variant:"outlined","data-test":"modified-plugin-cancel",onClick:h.cancel},{default:ze(()=>[...t[4]||(t[4]=[Nt(" Cancel ",-1)])]),_:1},8,["onClick"]),We(g,{variant:"flat","data-test":"modified-plugin-submit",onClick:t[1]||(t[1]=()=>{h.show=!1,n.$emit("submit",d.deleteModified)})},{default:ze(()=>[...t[5]||(t[5]=[Nt(" Confirm ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])}const IB=Mn("C",Xi(vL,[["render",bL],["__scopeId","data-v-06cfb31b"]])),Hd=[{displayName:"Plugins",name:"PluginsTab",path:"plugins",component:()=>tt(()=>et.import("./PluginsTab-1tlTx4k1-496335d424694bd25d9a.js"),void 0)},{displayName:"Targets",name:"TargetsTab",path:"targets",component:()=>tt(()=>et.import("./TargetsTab-Ci4cOsIa-d2957154b9bf46fa9617.js"),void 0)},{displayName:"Interfaces",name:"InterfacesTab",path:"interfaces",component:()=>tt(()=>et.import("./InterfacesTab-CZsnR6xB-abec32626a92ea91aa87.js"),void 0)},{displayName:"Routers",name:"RoutersTab",path:"routers",component:()=>tt(()=>et.import("./RoutersTab-G4WKtUOo-8f69fb20843fdf62fa85.js"),void 0)},{displayName:"Microservices",name:"MicroservicesTab",path:"microservices",component:()=>tt(()=>et.import("./MicroservicesTab-CQPpb7j1-7daf01af280d2c44c370.js"),void 0)},{displayName:"Packages",name:"PackagesTab",path:"packages",component:()=>tt(()=>et.import("./PackagesTab-DQ5s3nfh-dfdd8bd24af88c946d9d.js"),void 0)},{displayName:"Tools",name:"ToolsTab",path:"tools",component:()=>tt(()=>et.import("./ToolsTab-BCvmMDIZ-4b33c7b7aab46b7d4119.js"),void 0)},{displayName:"Redis",name:"RedisTab",path:"redis",component:()=>tt(()=>et.import("./RedisTab-DAeGow_e-aad9acabdf7d1943559b.js"),void 0)},{displayName:"TSDB",name:"TsdbTab",path:"tsdb",component:()=>tt(()=>et.import("./TsdbTab-BytqwnkN-ddc61c1fffc41912b8cb.js"),void 0)},{displayName:"Secrets",name:"SecretsTab",path:"secrets",component:()=>tt(()=>et.import("./SecretsTab-C9xAxuwO-89d69d126612c7b64f6d.js"),void 0)},{displayName:"Settings",name:"SettingsTab",path:"settings",component:()=>tt(()=>et.import("./SettingsTab-BUdeAh4o-f1b85c2ee59d2f206af1.js"),void 0)}],wL={components:{TopBar:uR},data(){return{title:"Administrator Console",curTab:null}},computed:{tabs:function(){return Hd.map(n=>({displayName:n.displayName,path:{name:n.name}}))}}};function xL(n,t,e,r,d,h){const f=Ue("top-bar"),v=Ue("v-tab"),o=Ue("v-tabs"),p=Ue("router-view"),i=Ue("v-card");return rt(),on("div",null,[We(f,{title:d.title},null,8,["title"]),We(i,null,{default:ze(()=>[We(o,{modelValue:d.curTab,"onUpdate:modelValue":t[0]||(t[0]=a=>d.curTab=a),"fixed-tabs":""},{default:ze(()=>[(rt(!0),on(si,null,vo(h.tabs,(a,u)=>(rt(),Bt(v,{key:u,to:a.path},{default:ze(()=>[Nt(yn(a.displayName),1)]),_:2},1032,["to"]))),128))]),_:1},8,["modelValue"]),We(p)]),_:1})])}const CL=Xi(wL,[["render",xL]]);function Ud(n){let[t,e]=n;return[t,e]}function yb(n,t){let e=n,r=t,d=e.length,h=r.length;if(d===0||h===0)return 0;d>h?e=e.substring(d-h):d<h&&(r=r.substring(0,d));let f=Math.min(d,h);if(e===r)return f;let v=0,o=1;for(let p=0;p!==-1;){let i=e.substring(f-o);if(p=r.indexOf(i),p===-1)return v;o+=p,(p===0||e.substring(f-o)===r.substring(0,o))&&(v=o,o++)}return v}function Vd(n,t){if(!n||!t||n[0]!==t[0])return 0;let e=0,r=Math.min(n.length,t.length),d=r,h=0;for(;e<d;)n.substring(h,d)===t.substring(h,d)?(e=d,h=e):r=d,d=Math.floor((r-e)/2+e);return d}function zc(n,t){if(!n||!t||n[n.length-1]!==t[t.length-1])return 0;let e=0,r=Math.min(n.length,t.length),d=r,h=0;for(;e<d;)n.substring(n.length-d,n.length-h)===t.substring(t.length-d,t.length-h)?(e=d,h=e):r=d,d=Math.floor((r-e)/2+e);return d}function AL(n){let t=n.charCodeAt(0);return t>=55296&&t<=56319}function _L(n){let t=n.charCodeAt(0);return t>=56320&&t<=57343}function kL(n,t,e){let r=n.length,d=t.length,h=Math.ceil((r+d)/2),f=h,v=2*h,o=Array(v),p=Array(v);for(let m=0;m<v;m++)o[m]=-1,p[m]=-1;o[f+1]=0,p[f+1]=0;let i=r-d,a=i%2!=0,u=0,g=0,s=0,c=0;for(let m=0;m<h&&!(Date.now()>e);m++){for(let w=-m+u;w<=m-g;w+=2){let x=f+w,R;R=w===-m||w!==m&&o[x-1]<o[x+1]?o[x+1]:o[x-1]+1;let S=R-w;for(;R<r&&S<d&&n.charAt(R)===t.charAt(S);)R++,S++;if(o[x]=R,R>r)g+=2;else if(S>d)u+=2;else if(a){let A=f+i-w;if(A>=0&&A<v&&p[A]!==-1){let C=r-p[A];if(R>=C)return bb(n,t,R,S,e)}}}for(let w=-m+s;w<=m-c;w+=2){let x=f+w,R;R=w===-m||w!==m&&p[x-1]<p[x+1]?p[x+1]:p[x-1]+1;let S=R-w;for(;R<r&&S<d&&n.charAt(r-R-1)===t.charAt(d-S-1);)R++,S++;if(p[x]=R,R>r)c+=2;else if(S>d)s+=2;else if(!a){let A=f+i-w;if(A>=0&&A<v&&o[A]!==-1){let C=o[A],O=f+C-A;if(R=r-R,C>=R)return bb(n,t,C,O,e)}}}}return[[_a,n],[ka,t]]}function bb(n,t,e,r,d){let h=n.substring(0,e),f=t.substring(0,r),v=n.substring(e),o=t.substring(r),p=Ns(h,f,{checkLines:!1,deadline:d}),i=Ns(v,o,{checkLines:!1,deadline:d});return p.concat(i)}function SL(n,t,e=1){if(e<=0)return null;let r=n.length>t.length?n:t,d=n.length>t.length?t:n;if(r.length<4||d.length*2<r.length)return null;let h=wb(r,d,Math.ceil(r.length/4)),f=wb(r,d,Math.ceil(r.length/2)),v;if(h&&f)v=h[4].length>f[4].length?h:f;else{if(!h&&!f)return null;f?h||(v=f):v=h}if(!v)throw Error("Unable to find a half match.");let o,p,i,a;n.length>t.length?(o=v[0],p=v[1],i=v[2],a=v[3]):(i=v[0],a=v[1],o=v[2],p=v[3]);let u=v[4];return[o,p,i,a,u]}function wb(n,t,e){let r=n.slice(e,e+Math.floor(n.length/4)),d=-1,h="",f,v,o,p;for(;(d=t.indexOf(r,d+1))!==-1;){let i=Vd(n.slice(e),t.slice(d)),a=zc(n.slice(0,e),t.slice(0,d));h.length<a+i&&(h=t.slice(d-a,d)+t.slice(d,d+i),f=n.slice(0,e-a),v=n.slice(e+i),o=t.slice(0,d-a),p=t.slice(d+i))}return h.length*2>=n.length?[f||"",v||"",o||"",p||"",h||""]:null}function $L(n,t){for(let e=0;e<n.length;e++){let r=n[e][1],d=[];for(let h=0;h<r.length;h++)d[h]=t[r.charCodeAt(h)];n[e][1]=d.join("")}}function EL(n,t){let e=[],r={};e[0]="";function d(v){let o="",p=0,i=-1,a=e.length;for(;i<v.length-1;){i=v.indexOf(`
|
|
1489
|
+
`,p),i===-1&&(i=v.length-1);let u=v.slice(p,i+1);(r.hasOwnProperty?r.hasOwnProperty(u):r[u]!==void 0)?o+=String.fromCharCode(r[u]):(a===h&&(u=v.slice(p),i=v.length),o+=String.fromCharCode(a),r[u]=a,e[a++]=u),p=i+1}return o}let h=4e4,f=d(n);return h=65535,{chars1:f,chars2:d(t),lineArray:e}}function RL(n,t,e){let r=n,d=t,h=EL(r,d);r=h.chars1,d=h.chars2;let f=h.lineArray,v=Ns(r,d,{checkLines:!1,deadline:e.deadline});$L(v,f),v=_b(v),v.push([Bc,""]);let o=0,p=0,i=0,a="",u="";for(;o<v.length;){switch(v[o][0]){case ka:i++,u+=v[o][1];break;case _a:p++,a+=v[o][1];break;case Bc:if(p>=1&&i>=1){v.splice(o-p-i,p+i),o=o-p-i;let g=Ns(a,u,{checkLines:!1,deadline:e.deadline});for(let s=g.length-1;s>=0;s--)v.splice(o,0,g[s]);o+=g.length}i=0,p=0,a="",u="";break;default:throw Error("Unknown diff operation.")}o++}return v.pop(),v}function TL(n,t,e){let r;if(!n)return[[ka,t]];if(!t)return[[_a,n]];let d=n.length>t.length?n:t,h=n.length>t.length?t:n,f=d.indexOf(h);if(f!==-1)return r=[[ka,d.substring(0,f)],[Bc,h],[ka,d.substring(f+h.length)]],n.length>t.length&&(r[0][0]=_a,r[2][0]=_a),r;if(h.length===1)return[[_a,n],[ka,t]];let v=SL(n,t);if(v){let o=v[0],p=v[1],i=v[2],a=v[3],u=v[4],g=Ns(o,i,e),s=Ns(p,a,e);return g.concat([[Bc,u]],s)}return e.checkLines&&n.length>100&&t.length>100?RL(n,t,e):kL(n,t,e.deadline)}var IL=Object.defineProperty,xb=Object.getOwnPropertySymbols,LL=Object.prototype.hasOwnProperty,ML=Object.prototype.propertyIsEnumerable,Cb=(n,t,e)=>t in n?IL(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,OL=(n,t)=>{for(var e in t||={})LL.call(t,e)&&Cb(n,e,t[e]);if(xb)for(var e of xb(t))ML.call(t,e)&&Cb(n,e,t[e]);return n};const _a=-1,ka=1,Bc=0;function NL(n,t,e){if(n===null||t===null)throw Error("Null input. (diff)");let r=Ns(n,t,PL({}));return zL(r),r}function Ns(n,t,e){let r=n,d=t;if(r===d)return r?[[0,r]]:[];let h=Vd(r,d),f=r.substring(0,h);r=r.substring(h),d=d.substring(h),h=zc(r,d);let v=r.substring(r.length-h);r=r.substring(0,r.length-h),d=d.substring(0,d.length-h);let o=TL(r,d,e);return f&&o.unshift([0,f]),v&&o.push([0,v]),o=Gd(o),o}function DL(n){let t=1;return typeof n<"u"&&(t=n<=0?Number.MAX_VALUE:n),Date.now()+t*1e3}function PL(n){return OL({checkLines:!0,deadline:DL(n.timeout||1)},n)}function jc(n,t,e){return e===1?n+t:t+n}function Wc(n,t){return t===1?[n.substring(0,n.length-1),n[n.length-1]]:[n.substring(1),n[0]]}function FL(n,t,e,r){return r===1?n[t][1][n[t][1].length-1]===n[e][1][n[e][1].length-1]:n[t][1][0]===n[e][1][0]}function Ab(n,t,e){let r=e===1?-1:1,d=null,h=null,f=t+e;for(;f>=0&&f<n.length&&(d===null||h===null);f+=e){let[p,i]=n[f];if(i.length!==0){if(p===1){d===null&&(d=f);continue}else if(p===-1){h===null&&(h=f);continue}else if(p===0){if(d===null&&h===null){let[a,u]=Wc(n[t][1],e);n[t][1]=a,n[f][1]=jc(n[f][1],u,r);return}break}}}if(d!==null&&h!==null&&FL(n,d,h,e)){let[p,i]=Wc(n[d][1],r),[a]=Wc(n[h][1],r);n[d][1]=p,n[h][1]=a,n[t][1]=jc(n[t][1],i,e);return}let[v,o]=Wc(n[t][1],e);n[t][1]=v,d===null?(n.splice(f,0,[1,o]),h!==null&&h>=f&&h++):n[d][1]=jc(n[d][1],o,r),h===null?n.splice(f,0,[-1,o]):n[h][1]=jc(n[h][1],o,r)}function zL(n){for(let t=0;t<n.length;t++){let[e,r]=n[t];if(r.length===0)continue;let d=r[0],h=r[r.length-1];AL(h)&&e===0&&Ab(n,t,1),_L(d)&&e===0&&Ab(n,t,-1)}for(let t=0;t<n.length;t++)n[t][1].length===0&&n.splice(t,1)}function _b(n){let t=n.map(a=>Ud(a)),e=!1,r=[],d=0,h=null,f=0,v=0,o=0,p=0,i=0;for(;f<t.length;)t[f][0]===0?(r[d++]=f,v=p,o=i,p=0,i=0,h=t[f][1]):(t[f][0]===1?p+=t[f][1].length:i+=t[f][1].length,h&&h.length<=Math.max(v,o)&&h.length<=Math.max(p,i)&&(t.splice(r[d-1],0,[-1,h]),t[r[d-1]+1][0]=1,d--,d--,f=d>0?r[d-1]:-1,v=0,o=0,p=0,i=0,h=null,e=!0)),f++;for(e&&(t=Gd(t)),t=WL(t),f=1;f<t.length;){if(t[f-1][0]===-1&&t[f][0]===1){let a=t[f-1][1],u=t[f][1],g=yb(a,u),s=yb(u,a);g>=s?(g>=a.length/2||g>=u.length/2)&&(t.splice(f,0,[0,u.substring(0,g)]),t[f-1][1]=a.substring(0,a.length-g),t[f+1][1]=u.substring(g),f++):(s>=a.length/2||s>=u.length/2)&&(t.splice(f,0,[0,a.substring(0,s)]),t[f-1][0]=1,t[f-1][1]=u.substring(0,u.length-s),t[f+1][0]=-1,t[f+1][1]=a.substring(s),f++),f++}f++}return t}const kb=/[^a-zA-Z0-9]/,Sb=/\s/,$b=/[\r\n]/,BL=/\n\r?\n$/,jL=/^\r?\n\r?\n/;function WL(n){let t=n.map(d=>Ud(d));function e(d,h){if(!d||!h)return 6;let f=d.charAt(d.length-1),v=h.charAt(0),o=f.match(kb),p=v.match(kb),i=o&&f.match(Sb),a=p&&v.match(Sb),u=i&&f.match($b),g=a&&v.match($b),s=u&&d.match(BL),c=g&&h.match(jL);return s||c?5:u||g?4:o&&!i&&a?3:i||a?2:o||p?1:0}let r=1;for(;r<t.length-1;){if(t[r-1][0]===0&&t[r+1][0]===0){let d=t[r-1][1],h=t[r][1],f=t[r+1][1],v=zc(d,h);if(v){let u=h.substring(h.length-v);d=d.substring(0,d.length-v),h=u+h.substring(0,h.length-v),f=u+f}let o=d,p=h,i=f,a=e(d,h)+e(h,f);for(;h.charAt(0)===f.charAt(0);){d+=h.charAt(0),h=h.substring(1)+f.charAt(0),f=f.substring(1);let u=e(d,h)+e(h,f);u>=a&&(a=u,o=d,p=h,i=f)}t[r-1][1]!==o&&(o?t[r-1][1]=o:(t.splice(r-1,1),r--),t[r][1]=p,i?t[r+1][1]=i:(t.splice(r+1,1),r--))}r++}return t}function Gd(n){let t=n.map(p=>Ud(p));t.push([0,""]);let e=0,r=0,d=0,h="",f="",v;for(;e<t.length;)switch(t[e][0]){case 1:d++,f+=t[e][1],e++;break;case-1:r++,h+=t[e][1],e++;break;case 0:r+d>1?(r!==0&&d!==0&&(v=Vd(f,h),v!==0&&(e-r-d>0&&t[e-r-d-1][0]===0?t[e-r-d-1][1]+=f.substring(0,v):(t.splice(0,0,[0,f.substring(0,v)]),e++),f=f.substring(v),h=h.substring(v)),v=zc(f,h),v!==0&&(t[e][1]=f.substring(f.length-v)+t[e][1],f=f.substring(0,f.length-v),h=h.substring(0,h.length-v))),e-=r+d,t.splice(e,r+d),h.length&&(t.splice(e,0,[-1,h]),e++),f.length&&(t.splice(e,0,[1,f]),e++),e++):e!==0&&t[e-1][0]===0?(t[e-1][1]+=t[e][1],t.splice(e,1)):e++,d=0,r=0,h="",f="";break;default:throw Error("Unknown diff operation")}t[t.length-1][1]===""&&t.pop();let o=!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),o=!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),o=!0)),e++;return o&&(t=Gd(t)),t}function Eb(n,t,e=!1){let r=null,d=!0;return function(...h){let f=e&&d,v=()=>{n.apply(this,h),r=null};f&&(d=!1,v()),r||=setTimeout(v,t)}}function HL(n,t){let e;return function(...r){clearTimeout(e),e=setTimeout(()=>n.apply(this,r),t)}}function Rb(n=""){return(n??"").replace(/\r\n/g,`
|
|
1490
|
+
`)}function Tb(n,t,e,r){let d=n+(e-n)/2;return`M ${n} ${t} C ${d},${t} ${d},${r} ${e},${r}`}const Sa="right",Ds="left",UL="specific",VL="broad";var Ib={SVG_NS:"http://www.w3.org/2000/svg"};function Lb(n,t){let{mode:e}=n.options;return t===Ds&&n.options.left.mode!==null&&(e=n.options.left.mode??e),t===Sa&&n.options.right.mode!==null&&(e=n.options.right.mode??e),e}function Mb(n,t){let{theme:e}=n.options;return t===Ds&&n.options.left.theme!==null&&(e=n.options.left.theme??e),t===Sa&&n.options.right.theme!==null&&(e=n.options.right.theme??e),e}function GL(n,t){return n.ace.getSession().doc.getLine(t)}function qL(n){let t=n.options.left.id;return t?document.getElementById(t)?.offsetHeight??0:0}function Ob(n){let t=document.createElement("div"),e={class:n.className,style:`top:${n.topOffset}px`,title:n.tooltip,"data-diff-index":n.diffIndex};for(let r in e)t.setAttribute(r,String(e[r]));return t.innerHTML=n.arrowContent,t}function qd(n,t){let e=`js-${t}-${Math.random().toString(36).substr(2,5)}`,r=n.querySelector(`.${t}`);if(r)return r.id=r.id||e,r.id;let d=document.createElement("div");return n.appendChild(d),d.className=t,d.id=e,d.id}function Nb(n,t,e,r){let d=n==="document"?document:document.querySelector(n);d&&d.addEventListener(t,h=>{let f=d.querySelectorAll(e),v=h.target;for(let o=0,p=f.length;o<p;o+=1){let i=v,a=f[o];for(;i&&i!==d;)i===a&&r.call(a,h),i=i.parentNode}})}let Ps=null;function KL(n){if(n.Range)return n.Range;let t=n.acequire||n.require;return t?t("ace/range"):!1}const YL={ace:void 0,mode:null,theme:null,element:null,diffGranularity:VL,lockScrolling:!0,showDiffs:!0,showConnectors:!0,charDiffs:!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",diffChar:"acediff__diffChar",diffGutter:"acediff__diffGutter",connector:"acediff__connector",newCodeConnectorLink:"acediff__newCodeConnector",newCodeConnectorLinkContent:"→",deletedCodeConnectorLink:"acediff__deletedCodeConnector",deletedCodeConnectorLinkContent:"←",copyRightContainer:"acediff__copy--right",copyLeftContainer:"acediff__copy--left"},connectorYOffset:0,onDiffReady:null};var XL=class{options;el;editors;diffs=[];lineHeight=0;gutterSVG=null;gutterWidth=0;gutterHeight=0;copyLeftContainer=null;copyRightContainer=null;connectorYOffset=0;removeEventHandlers=null;constructor(n={}){let t=JSON.parse(JSON.stringify(YL));this.options={...t,...n,left:{...t.left,...n.left},right:{...t.right,...n.right},classes:{...t.classes,...n.classes}};let e=()=>typeof window<"u"?window.ace:void 0;this.options.ace||(this.options.ace=e());let{ace:r}=this.options;if(!r){let h="No ace editor found nor supplied - `options.ace` or `window.ace` is missing";throw console.error(h),Error(h)}let d=KL(r);if(!d){let h="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";throw console.error(h),Error(h)}if(Ps=d,this.options.element===null){let h="You need to specify an element for Ace-diff - `options.element` is missing";throw console.error(h),Error(h)}if(this.options.element instanceof HTMLElement)this.el=this.options.element;else{let h=document.body.querySelector(this.options.element);if(!h){let f=`Can't find the specified element ${this.options.element}`;throw console.error(f),Error(f)}this.el=h}this.options.left.id=qd(this.el,"acediff__left"),this.options.classes.gutterID=qd(this.el,"acediff__gutter"),this.options.right.id=qd(this.el,"acediff__right"),this.el.innerHTML=`<div class="acediff acediff__wrap">${this.el.innerHTML}</div>`,this.editors={left:{ace:r.edit(this.options.left.id),markers:[],lineLengths:[],diffGutters:[]},right:{ace:r.edit(this.options.right.id),markers:[],lineLengths:[],diffGutters:[]},editorHeight:null},this.editors.left.ace.getSession().setMode(Lb(this,Ds)??""),this.editors.right.ace.getSession().setMode(Lb(this,Sa)??""),this.editors.left.ace.setReadOnly(!this.options.left.editable),this.editors.right.ace.setReadOnly(!this.options.right.editable),this.editors.left.ace.setShowFoldWidgets(!1),this.editors.right.ace.setShowFoldWidgets(!1),this.editors.left.ace.setTheme(Mb(this,Ds)??""),this.editors.right.ace.setTheme(Mb(this,Sa)??""),this.editors.left.ace.setValue(Rb(this.options.left.content??null),-1),this.editors.right.ace.setValue(Rb(this.options.right.content??null),-1),this.editors.editorHeight=qL(this),setTimeout(()=>{this.lineHeight=this.editors.left.ace.renderer.lineHeight,this.addEventHandlers(),this.createCopyContainers(),this.createGutter(),this.diff()},1)}setOptions(n){this.options={...this.options,...n,left:{...this.options.left,...n.left},right:{...this.options.right,...n.right},classes:{...this.options.classes,...n.classes}},this.diff()}getNumDiffs(){return this.diffs.length}getEditors(){return{left:this.editors.left.ace,right:this.editors.right.ace}}diff(){let n=this.editors.left.ace.getSession().getValue(),t=_b(NL(this.editors.right.ace.getSession().getValue(),n));this.editors.left.lineLengths=this.getLineLengths(this.editors.left),this.editors.right.lineLengths=this.getLineLengths(this.editors.right);let e=[],r={left:0,right:0};t.forEach(d=>{let h=d[0],f=d[1];f.length!==0&&(h===0?(r.left+=f.length,r.right+=f.length):h===-1?(e.push(this.computeDiff(-1,r.left,r.right,f)),r.right+=f.length):h===1&&(e.push(this.computeDiff(1,r.left,r.right,f)),r.left+=f.length))}),this.diffs=this.simplifyDiffs(e),!(this.diffs.length>this.options.maxDiffs)&&(this.clearDiffs(),this.decorate(),typeof this.options.onDiffReady=="function"&&this.options.onDiffReady(this.diffs))}clear(){this.clearDiffs(),this.clearGutter(),this.clearArrows()}destroy(){let n=this.editors.left.ace.getValue();this.editors.left.ace.destroy();let t=this.editors.left.ace.container,e=t.cloneNode(!1);e.textContent=n,t.parentNode?.replaceChild(e,t);let r=this.editors.right.ace.getValue();this.editors.right.ace.destroy(),t=this.editors.right.ace.container,e=t.cloneNode(!1),e.textContent=r,t.parentNode?.replaceChild(e,t);let d=document.getElementById(this.options.classes.gutterID);d&&(d.innerHTML=""),this.removeEventHandlers?.()}addEventHandlers(){let n=!1,t=(d,h)=>{if(!this.options.lockScrolling||n)return;let f=d.ace.getSession(),v=h.ace.getSession(),o=f.getScrollTop(),p=f.getLength()*this.lineHeight,i=d.ace.renderer.$size.scrollerHeight,a=Math.max(0,p-i),u=a>0?o/a:0,g=v.getLength()*this.lineHeight,s=h.ace.renderer.$size.scrollerHeight,c=u*Math.max(0,g-s);n=!0,v.setScrollTop(c),n=!1};this.editors.left.ace.getSession().on("changeScrollTop",Eb(()=>{t(this.editors.left,this.editors.right),this.updateGap()},16)),this.editors.right.ace.getSession().on("changeScrollTop",Eb(()=>{t(this.editors.right,this.editors.left),this.updateGap()},16));let e=this.diff.bind(this);this.editors.left.ace.on("change",e),this.editors.right.ace.on("change",e),this.options.left.copyLinkEnabled&&Nb(`#${this.options.classes.gutterID}`,"click",`.${this.options.classes.newCodeConnectorLink}`,d=>this.copy(d,"ltr")),this.options.right.copyLinkEnabled&&Nb(`#${this.options.classes.gutterID}`,"click",`.${this.options.classes.deletedCodeConnectorLink}`,d=>this.copy(d,"rtl"));let r=HL(()=>{let d=document.getElementById(this.options.left.id);d&&(this.editors.availableHeight=d.offsetHeight),this.diff()},250);window.addEventListener("resize",r),this.removeEventHandlers=()=>{window.removeEventListener("resize",r)}}copy(n,t){let e=n.target,r=parseInt(e.getAttribute("data-diff-index")??"0",10),d=this.diffs[r];if(!d||t==="ltr"&&!this.options.right.editable||t==="rtl"&&!this.options.left.editable)return;let h,f,v,o,p,i;t==="ltr"?(h=this.editors.left,f=this.editors.right,v=d.leftStartOffset,o=d.leftEndOffset,p=d.rightStartOffset,i=d.rightEndOffset):(h=this.editors.right,f=this.editors.left,v=d.rightStartOffset,o=d.rightEndOffset,p=d.leftStartOffset,i=d.leftEndOffset);let a=h.ace.getValue().substring(v,o),u=f.ace.getSession().doc,g=u.indexToPosition(p,0),s=u.indexToPosition(i,0),c=f.ace.getSession().getScrollTop();Ps&&f.ace.getSession().replace(new Ps(g.row,g.column,s.row,s.column),a),f.ace.getSession().setScrollTop(parseInt(String(c),10)),this.diff()}getLineLengths(n){return n.ace.getSession().doc.getAllLines().map(t=>t.length+1)}showDiff(n,t,e,r,d){let h=this.editors[n],f=e;f<t&&(f=t);let v=`${d} ${f>t?"lines":"targetOnly"} ${n}`,o=f;if(o>t&&--o,Ps&&h.markers.push(h.ace.session.addMarker(new Ps(t,0,o,1),v,"fullLine")),this.options.charDiffs&&r&&r.length>0){let i=`${this.options.classes.diffChar} ${n}`;r.forEach(a=>{Ps&&h.markers.push(h.ace.session.addMarker(new Ps(a.lineStart,a.start,a.lineEnd-1,a.end),i,"text"))})}let p=`${this.options.classes.diffGutter} ${n}`;for(let i=t;i<f;i+=1)h.ace.session.addGutterDecoration(i,p),h.diffGutters.push({line:i,className:p})}updateGap(){this.clearDiffs(),this.decorate(),this.positionCopyContainers()}clearDiffs(){this.editors.left.markers.forEach(n=>{this.editors.left.ace.getSession().removeMarker(n)}),this.editors.right.markers.forEach(n=>{this.editors.right.ace.getSession().removeMarker(n)}),this.editors.left.markers=[],this.editors.right.markers=[],this.editors.left.diffGutters.forEach(n=>{this.editors.left.ace.session.removeGutterDecoration(n.line,n.className)}),this.editors.right.diffGutters.forEach(n=>{this.editors.right.ace.session.removeGutterDecoration(n.line,n.className)}),this.editors.left.diffGutters=[],this.editors.right.diffGutters=[]}addConnector(n,t,e,r){let d=this.editors.left.ace.getSession().getScrollTop(),h=this.editors.right.ace.getSession().getScrollTop();this.connectorYOffset=1;let f=n*this.lineHeight-d+.5,v=this.gutterWidth+1,o=e*this.lineHeight-h+.5,p=t*this.lineHeight-d+this.connectorYOffset+.5,i=this.gutterWidth+1,a=r*this.lineHeight-h+this.connectorYOffset+.5,u=Tb(-1,f,v,o),g=Tb(i,a,-1,p),s=`${u} ${`L${v},${o} ${i},${a}`} ${g} ${`L-1,${p} -1,${f}`}`,c=document.createElementNS(Ib.SVG_NS,"path");c.setAttribute("d",s),c.setAttribute("class",this.options.classes.connector??""),this.gutterSVG?.appendChild(c)}addCopyArrows(n,t){if(n.leftEndLine>n.leftStartLine&&this.options.left.copyLinkEnabled&&this.options.right.editable){let e=Ob({className:this.options.classes.newCodeConnectorLink??"",topOffset:n.leftStartLine*this.lineHeight,tooltip:"Copy to right",diffIndex:t,arrowContent:this.options.classes.newCodeConnectorLinkContent??""});this.copyRightContainer?.appendChild(e)}if(n.rightEndLine>n.rightStartLine&&this.options.right.copyLinkEnabled&&this.options.left.editable){let e=Ob({className:this.options.classes.deletedCodeConnectorLink??"",topOffset:n.rightStartLine*this.lineHeight,tooltip:"Copy to left",diffIndex:t,arrowContent:this.options.classes.deletedCodeConnectorLinkContent??""});this.copyLeftContainer?.appendChild(e)}}positionCopyContainers(){let n=this.editors.left.ace.getSession().getScrollTop(),t=this.editors.right.ace.getSession().getScrollTop();this.copyRightContainer&&(this.copyRightContainer.style.cssText=`top: ${-n}px`),this.copyLeftContainer&&(this.copyLeftContainer.style.cssText=`top: ${-t}px`)}computeDiff(n,t,e,r){let d={};if(n===1){let h=this.getSingleDiffInfo(this.editors.left,t,r),f=this.getLineForCharPosition(this.editors.right,e),v=this.getCharsOnLine(this.editors.right,f),o=this.getCharsOnLine(this.editors.left,h.startLine),p=f,i=h.startLine===h.endLine,a=0;(h.startChar>0||i&&r.length<o)&&v>0&&h.startChar<o&&a++,d={leftStartLine:h.startLine,leftEndLine:h.endLine+1,rightStartLine:p,rightEndLine:p+a,leftStartOffset:t,leftEndOffset:t+r.length,rightStartOffset:e,rightEndOffset:e,leftStartChar:h.startChar,leftEndChar:h.endChar}}else{let h=this.getSingleDiffInfo(this.editors.right,e,r),f=this.getLineForCharPosition(this.editors.left,t),v=this.getCharsOnLine(this.editors.left,f),o=this.getCharsOnLine(this.editors.right,h.startLine),p=f,i=h.startLine===h.endLine,a=0;(h.startChar>0||i&&r.length<o)&&v>0&&h.startChar<o&&a++,d={leftStartLine:p,leftEndLine:p+a,rightStartLine:h.startLine,rightEndLine:h.endLine+1,leftStartOffset:t,leftEndOffset:t,rightStartOffset:e,rightEndOffset:e+r.length,rightStartChar:h.startChar,rightEndChar:h.endChar}}return d}getSingleDiffInfo(n,t,e){let r={startLine:0,startChar:0,endLine:0,endChar:0},d=t+e.length,h=0,f=!1,v=!1;n.lineLengths.forEach((p,i)=>{h+=p,!f&&t<h&&(r.startLine=i,r.startChar=t-h+p,f=!0),!v&&d<=h&&(r.endLine=i,r.endChar=d-h+p,v=!0)}),r.startChar>0&&this.getCharsOnLine(n,r.startLine)===r.startChar&&(r.startLine++,r.startChar=0),r.endChar===0&&r.endLine--;let o=/\n$/.test(e);return r.startChar>0&&o&&r.endLine++,r}getCharsOnLine(n,t){return GL(n,t).length}getLineForCharPosition(n,t){let e=n.ace.getSession().doc.getAllLines(),r=0,d=0;for(let h=0;h<e.length;h+=1){let f=e[h];if(f!==void 0&&(d+=f.length+1),t<=d){r=h,t===d&&h<e.length-1&&(r+=1);break}}return d>=n.ace.getSession().getValue().length&&(r+=1),r}createGutter(){let n=document.getElementById(this.options.classes.gutterID);if(!n)return;this.gutterHeight=n.clientHeight,this.gutterWidth=n.clientWidth;let t=this.getTotalHeight(Ds),e=this.getTotalHeight(Sa),r=Math.max(t,e,this.gutterHeight);this.gutterSVG=document.createElementNS(Ib.SVG_NS,"svg"),this.gutterSVG.setAttribute("width",String(this.gutterWidth)),this.gutterSVG.setAttribute("height",String(r)),n.appendChild(this.gutterSVG)}getTotalHeight(n){return(n===Ds?this.editors.left:this.editors.right).ace.getSession().getLength()*this.lineHeight}createCopyContainers(){this.copyRightContainer=document.createElement("div"),this.copyRightContainer.setAttribute("class",this.options.classes.copyRightContainer??""),this.copyLeftContainer=document.createElement("div"),this.copyLeftContainer.setAttribute("class",this.options.classes.copyLeftContainer??"");let n=document.getElementById(this.options.classes.gutterID);n&&(n.appendChild(this.copyRightContainer),n.appendChild(this.copyLeftContainer))}clearGutter(){let n=document.getElementById(this.options.classes.gutterID);n&&this.gutterSVG&&n.removeChild(this.gutterSVG),this.createGutter()}clearArrows(){this.copyLeftContainer&&(this.copyLeftContainer.innerHTML=""),this.copyRightContainer&&(this.copyRightContainer.innerHTML="")}simplifyDiffs(n){let t=[],e=d=>this.options.diffGranularity===UL?d<1:d<=1,r=d=>{let h={...d,leftChars:[],rightChars:[]};return d.leftEndChar!==void 0&&h.leftChars.push({start:d.leftStartChar??0,end:d.leftEndChar,lineStart:d.leftStartLine??0,lineEnd:d.leftEndLine??0}),d.rightEndChar!==void 0&&h.rightChars.push({start:d.rightStartChar??0,end:d.rightEndChar,lineStart:d.rightStartLine??0,lineEnd:d.rightEndLine??0}),h};return n.forEach((d,h)=>{if(h===0){t.push(r(d));return}let f=!1;for(let v=0;v<t.length;v+=1)if(e(Math.abs(d.leftStartLine-t[v].leftEndLine))&&e(Math.abs(d.rightStartLine-t[v].rightEndLine))){t[v].leftStartLine=Math.min(d.leftStartLine,t[v].leftStartLine),t[v].rightStartLine=Math.min(d.rightStartLine,t[v].rightStartLine),t[v].leftEndLine=Math.max(d.leftEndLine,t[v].leftEndLine),t[v].rightEndLine=Math.max(d.rightEndLine,t[v].rightEndLine),t[v].leftStartOffset=Math.min(d.leftStartOffset,t[v].leftStartOffset),t[v].leftEndOffset=Math.max(d.leftEndOffset,t[v].leftEndOffset),t[v].rightStartOffset=Math.min(d.rightStartOffset,t[v].rightStartOffset),t[v].rightEndOffset=Math.max(d.rightEndOffset,t[v].rightEndOffset),d.leftEndChar!==void 0&&t[v].leftChars.push({start:d.leftStartChar??0,end:d.leftEndChar,lineStart:d.leftStartLine,lineEnd:d.leftEndLine}),d.rightEndChar!==void 0&&t[v].rightChars.push({start:d.rightStartChar??0,end:d.rightEndChar,lineStart:d.rightStartLine,lineEnd:d.rightEndLine}),f=!0;break}f||t.push(r(d))}),t.filter(d=>!(d.leftStartLine===d.leftEndLine&&d.rightStartLine===d.rightEndLine))}decorate(){this.clearGutter(),this.clearArrows(),this.diffs.forEach((n,t)=>{this.options.showDiffs&&(this.showDiff(Ds,n.leftStartLine,n.leftEndLine,n.leftChars,this.options.classes.diff??""),this.showDiff(Sa,n.rightStartLine,n.rightEndLine,n.rightChars,this.options.classes.diff??""),this.options.showConnectors&&this.addConnector(n.leftStartLine,n.leftEndLine,n.rightStartLine,n.rightEndLine),this.addCopyArrows(n,t))})}},Kd={exports:{}},Yd,Db;function wl(){if(Db)return Yd;Db=1;const n="2.0.0",t=256,e=Number.MAX_SAFE_INTEGER||9007199254740991,r=16,d=t-6;return Yd={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:d,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:n,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Yd}var Pb,Fb;function Hc(){return Fb||(Fb=1,Pb=typeof process=="object"&&Wd&&Wd.NODE_DEBUG&&/\bsemver\b/i.test(Wd.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{}),Pb}var zb;function xl(){return zb||(zb=1,(function(n,t){const{MAX_SAFE_COMPONENT_LENGTH:e,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:d}=wl(),h=Hc();t=n.exports={};const f=t.re=[],v=t.safeRe=[],o=t.src=[],p=t.safeSrc=[],i=t.t={};let a=0;const u="[a-zA-Z0-9-]",g=[["\\s",1],["\\d",d],[u,r]],s=m=>{for(const[w,x]of g)m=m.split(`${w}*`).join(`${w}{0,${x}}`).split(`${w}+`).join(`${w}{1,${x}}`);return m},c=(m,w,x)=>{const R=s(w),S=a++;h(m,S,w),i[m]=S,o[S]=w,p[S]=R,f[S]=new RegExp(w,x?"g":void 0),v[S]=new RegExp(R,x?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","\\d+"),c("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${u}*`),c("MAINVERSION",`(${o[i.NUMERICIDENTIFIER]})\\.(${o[i.NUMERICIDENTIFIER]})\\.(${o[i.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${o[i.NUMERICIDENTIFIERLOOSE]})\\.(${o[i.NUMERICIDENTIFIERLOOSE]})\\.(${o[i.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${o[i.NONNUMERICIDENTIFIER]}|${o[i.NUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${o[i.NONNUMERICIDENTIFIER]}|${o[i.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASE",`(?:-(${o[i.PRERELEASEIDENTIFIER]}(?:\\.${o[i.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${o[i.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[i.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER",`${u}+`),c("BUILD",`(?:\\+(${o[i.BUILDIDENTIFIER]}(?:\\.${o[i.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${o[i.MAINVERSION]}${o[i.PRERELEASE]}?${o[i.BUILD]}?`),c("FULL",`^${o[i.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${o[i.MAINVERSIONLOOSE]}${o[i.PRERELEASELOOSE]}?${o[i.BUILD]}?`),c("LOOSE",`^${o[i.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${o[i.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${o[i.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${o[i.XRANGEIDENTIFIER]})(?:\\.(${o[i.XRANGEIDENTIFIER]})(?:\\.(${o[i.XRANGEIDENTIFIER]})(?:${o[i.PRERELEASE]})?${o[i.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${o[i.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[i.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[i.XRANGEIDENTIFIERLOOSE]})(?:${o[i.PRERELEASELOOSE]})?${o[i.BUILD]}?)?)?`),c("XRANGE",`^${o[i.GTLT]}\\s*${o[i.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${o[i.GTLT]}\\s*${o[i.XRANGEPLAINLOOSE]}$`),c("COERCEPLAIN",`(^|[^\\d])(\\d{1,${e}})(?:\\.(\\d{1,${e}}))?(?:\\.(\\d{1,${e}}))?`),c("COERCE",`${o[i.COERCEPLAIN]}(?:$|[^\\d])`),c("COERCEFULL",o[i.COERCEPLAIN]+`(?:${o[i.PRERELEASE]})?(?:${o[i.BUILD]})?(?:$|[^\\d])`),c("COERCERTL",o[i.COERCE],!0),c("COERCERTLFULL",o[i.COERCEFULL],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${o[i.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${o[i.LONETILDE]}${o[i.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${o[i.LONETILDE]}${o[i.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${o[i.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${o[i.LONECARET]}${o[i.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${o[i.LONECARET]}${o[i.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${o[i.GTLT]}\\s*(${o[i.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${o[i.GTLT]}\\s*(${o[i.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${o[i.GTLT]}\\s*(${o[i.LOOSEPLAIN]}|${o[i.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${o[i.XRANGEPLAIN]})\\s+-\\s+(${o[i.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${o[i.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[i.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Kd,Kd.exports)),Kd.exports}var Xd,Bb;function Jd(){if(Bb)return Xd;Bb=1;const n=Object.freeze({loose:!0}),t=Object.freeze({});return Xd=e=>e?typeof e!="object"?n:e:t,Xd}var Zd,jb;function Wb(){if(jb)return Zd;jb=1;const n=/^[0-9]+$/,t=(e,r)=>{if(typeof e=="number"&&typeof r=="number")return e===r?0:e<r?-1:1;const d=n.test(e),h=n.test(r);return d&&h&&(e=+e,r=+r),e===r?0:d&&!h?-1:h&&!d?1:e<r?-1:1};return Zd={compareIdentifiers:t,rcompareIdentifiers:(e,r)=>t(r,e)},Zd}var Qd,Hb;function Dr(){if(Hb)return Qd;Hb=1;const n=Hc(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:e}=wl(),{safeRe:r,t:d}=xl(),h=Jd(),{compareIdentifiers:f}=Wb();class v{constructor(p,i){if(i=h(i),p instanceof v){if(p.loose===!!i.loose&&p.includePrerelease===!!i.includePrerelease)return p;p=p.version}else if(typeof p!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof p}".`);if(p.length>t)throw new TypeError(`version is longer than ${t} characters`);n("SemVer",p,i),this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease;const a=p.trim().match(i.loose?r[d.LOOSE]:r[d.FULL]);if(!a)throw new TypeError(`Invalid Version: ${p}`);if(this.raw=p,this.major=+a[1],this.minor=+a[2],this.patch=+a[3],this.major>e||this.major<0)throw new TypeError("Invalid major version");if(this.minor>e||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>e||this.patch<0)throw new TypeError("Invalid patch version");a[4]?this.prerelease=a[4].split(".").map(u=>{if(/^[0-9]+$/.test(u)){const g=+u;if(g>=0&&g<e)return g}return u}):this.prerelease=[],this.build=a[5]?a[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(p){if(n("SemVer.compare",this.version,this.options,p),!(p instanceof v)){if(typeof p=="string"&&p===this.version)return 0;p=new v(p,this.options)}return p.version===this.version?0:this.compareMain(p)||this.comparePre(p)}compareMain(p){return p instanceof v||(p=new v(p,this.options)),this.major<p.major?-1:this.major>p.major?1:this.minor<p.minor?-1:this.minor>p.minor?1:this.patch<p.patch?-1:this.patch>p.patch?1:0}comparePre(p){if(p instanceof v||(p=new v(p,this.options)),this.prerelease.length&&!p.prerelease.length)return-1;if(!this.prerelease.length&&p.prerelease.length)return 1;if(!this.prerelease.length&&!p.prerelease.length)return 0;let i=0;do{const a=this.prerelease[i],u=p.prerelease[i];if(n("prerelease compare",i,a,u),a===void 0&&u===void 0)return 0;if(u===void 0)return 1;if(a===void 0)return-1;if(a!==u)return f(a,u)}while(++i)}compareBuild(p){p instanceof v||(p=new v(p,this.options));let i=0;do{const a=this.build[i],u=p.build[i];if(n("build compare",i,a,u),a===void 0&&u===void 0)return 0;if(u===void 0)return 1;if(a===void 0)return-1;if(a!==u)return f(a,u)}while(++i)}inc(p,i,a){if(p.startsWith("pre")){if(!i&&a===!1)throw new Error("invalid increment argument: identifier is empty");if(i){const u=`-${i}`.match(this.options.loose?r[d.PRERELEASELOOSE]:r[d.PRERELEASE]);if(!u||u[1]!==i)throw new Error(`invalid identifier: ${i}`)}}switch(p){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",i,a);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",i,a);break;case"prepatch":this.prerelease.length=0,this.inc("patch",i,a),this.inc("pre",i,a);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",i,a),this.inc("pre",i,a);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const u=Number(a)?1:0;if(this.prerelease.length===0)this.prerelease=[u];else{let g=this.prerelease.length;for(;--g>=0;)typeof this.prerelease[g]=="number"&&(this.prerelease[g]++,g=-2);if(g===-1){if(i===this.prerelease.join(".")&&a===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(u)}}if(i){let g=[i,u];a===!1&&(g=[i]),f(this.prerelease[0],i)===0?isNaN(this.prerelease[1])&&(this.prerelease=g):this.prerelease=g}break}default:throw new Error(`invalid increment argument: ${p}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Qd=v,Qd}var ef,Ub;function Fs(){if(Ub)return ef;Ub=1;const n=Dr();return ef=(t,e,r=!1)=>{if(t instanceof n)return t;try{return new n(t,e)}catch(d){if(!r)return null;throw d}},ef}var tf,Vb;function JL(){if(Vb)return tf;Vb=1;const n=Fs();return tf=(t,e)=>{const r=n(t,e);return r?r.version:null},tf}var nf,Gb;function ZL(){if(Gb)return nf;Gb=1;const n=Fs();return nf=(t,e)=>{const r=n(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null},nf}var rf,qb;function QL(){if(qb)return rf;qb=1;const n=Dr();return rf=(t,e,r,d,h)=>{typeof r=="string"&&(h=d,d=r,r=void 0);try{return new n(t instanceof n?t.version:t,r).inc(e,d,h).version}catch{return null}},rf}var of,Kb;function eM(){if(Kb)return of;Kb=1;const n=Fs();return of=(t,e)=>{const r=n(t,null,!0),d=n(e,null,!0),h=r.compare(d);if(h===0)return null;const f=h>0,v=f?r:d,o=f?d:r,p=!!v.prerelease.length;if(o.prerelease.length&&!p){if(!o.patch&&!o.minor)return"major";if(o.compareMain(v)===0)return o.minor&&!o.patch?"minor":"patch"}const i=p?"pre":"";return r.major!==d.major?i+"major":r.minor!==d.minor?i+"minor":r.patch!==d.patch?i+"patch":"prerelease"},of}var sf,Yb;function tM(){if(Yb)return sf;Yb=1;const n=Dr();return sf=(t,e)=>new n(t,e).major,sf}var af,Xb;function nM(){if(Xb)return af;Xb=1;const n=Dr();return af=(t,e)=>new n(t,e).minor,af}var lf,Jb;function rM(){if(Jb)return lf;Jb=1;const n=Dr();return lf=(t,e)=>new n(t,e).patch,lf}var cf,Zb;function iM(){if(Zb)return cf;Zb=1;const n=Fs();return cf=(t,e)=>{const r=n(t,e);return r&&r.prerelease.length?r.prerelease:null},cf}var uf,Qb;function ro(){if(Qb)return uf;Qb=1;const n=Dr();return uf=(t,e,r)=>new n(t,r).compare(new n(e,r)),uf}var hf,ew;function oM(){if(ew)return hf;ew=1;const n=ro();return hf=(t,e,r)=>n(e,t,r),hf}var df,tw;function sM(){if(tw)return df;tw=1;const n=ro();return df=(t,e)=>n(t,e,!0),df}var ff,nw;function pf(){if(nw)return ff;nw=1;const n=Dr();return ff=(t,e,r)=>{const d=new n(t,r),h=new n(e,r);return d.compare(h)||d.compareBuild(h)},ff}var gf,rw;function aM(){if(rw)return gf;rw=1;const n=pf();return gf=(t,e)=>t.sort((r,d)=>n(r,d,e)),gf}var mf,iw;function lM(){if(iw)return mf;iw=1;const n=pf();return mf=(t,e)=>t.sort((r,d)=>n(d,r,e)),mf}var vf,ow;function Uc(){if(ow)return vf;ow=1;const n=ro();return vf=(t,e,r)=>n(t,e,r)>0,vf}var yf,sw;function bf(){if(sw)return yf;sw=1;const n=ro();return yf=(t,e,r)=>n(t,e,r)<0,yf}var wf,aw;function lw(){if(aw)return wf;aw=1;const n=ro();return wf=(t,e,r)=>n(t,e,r)===0,wf}var xf,cw;function uw(){if(cw)return xf;cw=1;const n=ro();return xf=(t,e,r)=>n(t,e,r)!==0,xf}var Cf,hw;function Af(){if(hw)return Cf;hw=1;const n=ro();return Cf=(t,e,r)=>n(t,e,r)>=0,Cf}var _f,dw;function kf(){if(dw)return _f;dw=1;const n=ro();return _f=(t,e,r)=>n(t,e,r)<=0,_f}var Sf,fw;function pw(){if(fw)return Sf;fw=1;const n=lw(),t=uw(),e=Uc(),r=Af(),d=bf(),h=kf();return Sf=(f,v,o,p)=>{switch(v){case"===":return typeof f=="object"&&(f=f.version),typeof o=="object"&&(o=o.version),f===o;case"!==":return typeof f=="object"&&(f=f.version),typeof o=="object"&&(o=o.version),f!==o;case"":case"=":case"==":return n(f,o,p);case"!=":return t(f,o,p);case">":return e(f,o,p);case">=":return r(f,o,p);case"<":return d(f,o,p);case"<=":return h(f,o,p);default:throw new TypeError(`Invalid operator: ${v}`)}},Sf}var $f,gw;function cM(){if(gw)return $f;gw=1;const n=Dr(),t=Fs(),{safeRe:e,t:r}=xl();return $f=(d,h)=>{if(d instanceof n)return d;if(typeof d=="number"&&(d=String(d)),typeof d!="string")return null;h=h||{};let f=null;if(!h.rtl)f=d.match(h.includePrerelease?e[r.COERCEFULL]:e[r.COERCE]);else{const u=h.includePrerelease?e[r.COERCERTLFULL]:e[r.COERCERTL];let g;for(;(g=u.exec(d))&&(!f||f.index+f[0].length!==d.length);)(!f||g.index+g[0].length!==f.index+f[0].length)&&(f=g),u.lastIndex=g.index+g[1].length+g[2].length;u.lastIndex=-1}if(f===null)return null;const v=f[2],o=f[3]||"0",p=f[4]||"0",i=h.includePrerelease&&f[5]?`-${f[5]}`:"",a=h.includePrerelease&&f[6]?`+${f[6]}`:"";return t(`${v}.${o}.${p}${i}${a}`,h)},$f}var Ef,mw;function uM(){if(mw)return Ef;mw=1;const n=Fs(),t=wl(),e=Dr(),r=(v,o,p)=>{if(!t.RELEASE_TYPES.includes(o))return null;const i=d(v,p);return i&&h(i,o)},d=(v,o)=>{const p=v instanceof e?v.version:v;return n(p,o)},h=(v,o)=>{if(f(o))return v.version;switch(v.prerelease=[],o){case"major":v.minor=0,v.patch=0;break;case"minor":v.patch=0;break}return v.format()},f=v=>v.startsWith("pre");return Ef=r,Ef}var Rf,vw;function hM(){if(vw)return Rf;vw=1;class n{constructor(){this.max=1e3,this.map=new Map}get(e){const r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){const d=this.map.keys().next().value;this.delete(d)}this.map.set(e,r)}return this}}return Rf=n,Rf}var Tf,yw;function io(){if(yw)return Tf;yw=1;const n=/\s+/g;class t{constructor(z,U){if(U=d(U),z instanceof t)return z.loose===!!U.loose&&z.includePrerelease===!!U.includePrerelease?z:new t(z.raw,U);if(z instanceof h)return this.raw=z.value,this.set=[[z]],this.formatted=void 0,this;if(this.options=U,this.loose=!!U.loose,this.includePrerelease=!!U.includePrerelease,this.raw=z.trim().replace(n," "),this.set=this.raw.split("||").map(V=>this.parseRange(V.trim())).filter(V=>V.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const V=this.set[0];if(this.set=this.set.filter(K=>!w(K[0])),this.set.length===0)this.set=[V];else if(this.set.length>1){for(const K of this.set)if(K.length===1&&x(K[0])){this.set=[K];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let z=0;z<this.set.length;z++){z>0&&(this.formatted+="||");const U=this.set[z];for(let V=0;V<U.length;V++)V>0&&(this.formatted+=" "),this.formatted+=U[V].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(z){z=z.replace(m,"");const U=((this.options.includePrerelease&&s)|(this.options.loose&&c))+":"+z,V=r.get(U);if(V)return V;const K=this.options.loose,Z=K?o[i.HYPHENRANGELOOSE]:o[i.HYPHENRANGE];z=z.replace(Z,$(this.options.includePrerelease)),f("hyphen replace",z),z=z.replace(o[i.COMPARATORTRIM],a),f("comparator trim",z),z=z.replace(o[i.TILDETRIM],u),f("tilde trim",z),z=z.replace(o[i.CARETTRIM],g),f("caret trim",z);let oe=z.split(" ").map(ie=>S(ie,this.options)).join(" ").split(/\s+/).map(ie=>D(ie,this.options));K&&(oe=oe.filter(ie=>(f("loose invalid filter",ie,this.options),!!ie.match(o[i.COMPARATORLOOSE])))),f("range list",oe);const ee=new Map,re=oe.map(ie=>new h(ie,this.options));for(const ie of re){if(w(ie))return[ie];ee.set(ie.value,ie)}ee.size>1&&ee.has("")&&ee.delete("");const ce=[...ee.values()];return r.set(U,ce),ce}intersects(z,U){if(!(z instanceof t))throw new TypeError("a Range is required");return this.set.some(V=>R(V,U)&&z.set.some(K=>R(K,U)&&V.every(Z=>K.every(oe=>Z.intersects(oe,U)))))}test(z){if(!z)return!1;if(typeof z=="string")try{z=new v(z,this.options)}catch{return!1}for(let U=0;U<this.set.length;U++)if(_(this.set[U],z,this.options))return!0;return!1}}Tf=t;const e=hM(),r=new e,d=Jd(),h=Vc(),f=Hc(),v=Dr(),{safeRe:o,src:p,t:i,comparatorTrimReplace:a,tildeTrimReplace:u,caretTrimReplace:g}=xl(),{FLAG_INCLUDE_PRERELEASE:s,FLAG_LOOSE:c}=wl(),m=new RegExp(p[i.BUILD],"g"),w=I=>I.value==="<0.0.0-0",x=I=>I.value==="",R=(I,z)=>{let U=!0;const V=I.slice();let K=V.pop();for(;U&&V.length;)U=V.every(Z=>K.intersects(Z,z)),K=V.pop();return U},S=(I,z)=>(I=I.replace(o[i.BUILD],""),f("comp",I,z),I=N(I,z),f("caret",I),I=C(I,z),f("tildes",I),I=L(I,z),f("xrange",I),I=F(I,z),f("stars",I),I),A=I=>!I||I.toLowerCase()==="x"||I==="*",C=(I,z)=>I.trim().split(/\s+/).map(U=>O(U,z)).join(" "),O=(I,z)=>{const U=z.loose?o[i.TILDELOOSE]:o[i.TILDE];return I.replace(U,(V,K,Z,oe,ee)=>{f("tilde",I,V,K,Z,oe,ee);let re;return A(K)?re="":A(Z)?re=`>=${K}.0.0 <${+K+1}.0.0-0`:A(oe)?re=`>=${K}.${Z}.0 <${K}.${+Z+1}.0-0`:ee?(f("replaceTilde pr",ee),re=`>=${K}.${Z}.${oe}-${ee} <${K}.${+Z+1}.0-0`):re=`>=${K}.${Z}.${oe} <${K}.${+Z+1}.0-0`,f("tilde return",re),re})},N=(I,z)=>I.trim().split(/\s+/).map(U=>M(U,z)).join(" "),M=(I,z)=>{f("caret",I,z);const U=z.loose?o[i.CARETLOOSE]:o[i.CARET],V=z.includePrerelease?"-0":"";return I.replace(U,(K,Z,oe,ee,re)=>{f("caret",I,K,Z,oe,ee,re);let ce;return A(Z)?ce="":A(oe)?ce=`>=${Z}.0.0${V} <${+Z+1}.0.0-0`:A(ee)?Z==="0"?ce=`>=${Z}.${oe}.0${V} <${Z}.${+oe+1}.0-0`:ce=`>=${Z}.${oe}.0${V} <${+Z+1}.0.0-0`:re?(f("replaceCaret pr",re),Z==="0"?oe==="0"?ce=`>=${Z}.${oe}.${ee}-${re} <${Z}.${oe}.${+ee+1}-0`:ce=`>=${Z}.${oe}.${ee}-${re} <${Z}.${+oe+1}.0-0`:ce=`>=${Z}.${oe}.${ee}-${re} <${+Z+1}.0.0-0`):(f("no pr"),Z==="0"?oe==="0"?ce=`>=${Z}.${oe}.${ee}${V} <${Z}.${oe}.${+ee+1}-0`:ce=`>=${Z}.${oe}.${ee}${V} <${Z}.${+oe+1}.0-0`:ce=`>=${Z}.${oe}.${ee} <${+Z+1}.0.0-0`),f("caret return",ce),ce})},L=(I,z)=>(f("replaceXRanges",I,z),I.split(/\s+/).map(U=>j(U,z)).join(" ")),j=(I,z)=>{I=I.trim();const U=z.loose?o[i.XRANGELOOSE]:o[i.XRANGE];return I.replace(U,(V,K,Z,oe,ee,re)=>{f("xRange",I,V,K,Z,oe,ee,re);const ce=A(Z),ie=ce||A(oe),fe=ie||A(ee),pe=fe;return K==="="&&pe&&(K=""),re=z.includePrerelease?"-0":"",ce?K===">"||K==="<"?V="<0.0.0-0":V="*":K&&pe?(ie&&(oe=0),ee=0,K===">"?(K=">=",ie?(Z=+Z+1,oe=0,ee=0):(oe=+oe+1,ee=0)):K==="<="&&(K="<",ie?Z=+Z+1:oe=+oe+1),K==="<"&&(re="-0"),V=`${K+Z}.${oe}.${ee}${re}`):ie?V=`>=${Z}.0.0${re} <${+Z+1}.0.0-0`:fe&&(V=`>=${Z}.${oe}.0${re} <${Z}.${+oe+1}.0-0`),f("xRange return",V),V})},F=(I,z)=>(f("replaceStars",I,z),I.trim().replace(o[i.STAR],"")),D=(I,z)=>(f("replaceGTE0",I,z),I.trim().replace(o[z.includePrerelease?i.GTE0PRE:i.GTE0],"")),$=I=>(z,U,V,K,Z,oe,ee,re,ce,ie,fe,pe)=>(A(V)?U="":A(K)?U=`>=${V}.0.0${I?"-0":""}`:A(Z)?U=`>=${V}.${K}.0${I?"-0":""}`:oe?U=`>=${U}`:U=`>=${U}${I?"-0":""}`,A(ce)?re="":A(ie)?re=`<${+ce+1}.0.0-0`:A(fe)?re=`<${ce}.${+ie+1}.0-0`:pe?re=`<=${ce}.${ie}.${fe}-${pe}`:I?re=`<${ce}.${ie}.${+fe+1}-0`:re=`<=${re}`,`${U} ${re}`.trim()),_=(I,z,U)=>{for(let V=0;V<I.length;V++)if(!I[V].test(z))return!1;if(z.prerelease.length&&!U.includePrerelease){for(let V=0;V<I.length;V++)if(f(I[V].semver),I[V].semver!==h.ANY&&I[V].semver.prerelease.length>0){const K=I[V].semver;if(K.major===z.major&&K.minor===z.minor&&K.patch===z.patch)return!0}return!1}return!0};return Tf}var If,bw;function Vc(){if(bw)return If;bw=1;const n=Symbol("SemVer ANY");class t{static get ANY(){return n}constructor(i,a){if(a=e(a),i instanceof t){if(i.loose===!!a.loose)return i;i=i.value}i=i.trim().split(/\s+/).join(" "),f("comparator",i,a),this.options=a,this.loose=!!a.loose,this.parse(i),this.semver===n?this.value="":this.value=this.operator+this.semver.version,f("comp",this)}parse(i){const a=this.options.loose?r[d.COMPARATORLOOSE]:r[d.COMPARATOR],u=i.match(a);if(!u)throw new TypeError(`Invalid comparator: ${i}`);this.operator=u[1]!==void 0?u[1]:"",this.operator==="="&&(this.operator=""),u[2]?this.semver=new v(u[2],this.options.loose):this.semver=n}toString(){return this.value}test(i){if(f("Comparator.test",i,this.options.loose),this.semver===n||i===n)return!0;if(typeof i=="string")try{i=new v(i,this.options)}catch{return!1}return h(i,this.operator,this.semver,this.options)}intersects(i,a){if(!(i instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new o(i.value,a).test(this.value):i.operator===""?i.value===""?!0:new o(this.value,a).test(i.semver):(a=e(a),a.includePrerelease&&(this.value==="<0.0.0-0"||i.value==="<0.0.0-0")||!a.includePrerelease&&(this.value.startsWith("<0.0.0")||i.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&i.operator.startsWith(">")||this.operator.startsWith("<")&&i.operator.startsWith("<")||this.semver.version===i.semver.version&&this.operator.includes("=")&&i.operator.includes("=")||h(this.semver,"<",i.semver,a)&&this.operator.startsWith(">")&&i.operator.startsWith("<")||h(this.semver,">",i.semver,a)&&this.operator.startsWith("<")&&i.operator.startsWith(">")))}}If=t;const e=Jd(),{safeRe:r,t:d}=xl(),h=pw(),f=Hc(),v=Dr(),o=io();return If}var Lf,ww;function Gc(){if(ww)return Lf;ww=1;const n=io();return Lf=(t,e,r)=>{try{e=new n(e,r)}catch{return!1}return e.test(t)},Lf}var Mf,xw;function dM(){if(xw)return Mf;xw=1;const n=io();return Mf=(t,e)=>new n(t,e).set.map(r=>r.map(d=>d.value).join(" ").trim().split(" ")),Mf}var Of,Cw;function fM(){if(Cw)return Of;Cw=1;const n=Dr(),t=io();return Of=(e,r,d)=>{let h=null,f=null,v=null;try{v=new t(r,d)}catch{return null}return e.forEach(o=>{v.test(o)&&(!h||f.compare(o)===-1)&&(h=o,f=new n(h,d))}),h},Of}var Nf,Aw;function pM(){if(Aw)return Nf;Aw=1;const n=Dr(),t=io();return Nf=(e,r,d)=>{let h=null,f=null,v=null;try{v=new t(r,d)}catch{return null}return e.forEach(o=>{v.test(o)&&(!h||f.compare(o)===1)&&(h=o,f=new n(h,d))}),h},Nf}var Df,_w;function gM(){if(_w)return Df;_w=1;const n=Dr(),t=io(),e=Uc();return Df=(r,d)=>{r=new t(r,d);let h=new n("0.0.0");if(r.test(h)||(h=new n("0.0.0-0"),r.test(h)))return h;h=null;for(let f=0;f<r.set.length;++f){const v=r.set[f];let o=null;v.forEach(p=>{const i=new n(p.semver.version);switch(p.operator){case">":i.prerelease.length===0?i.patch++:i.prerelease.push(0),i.raw=i.format();case"":case">=":(!o||e(i,o))&&(o=i);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${p.operator}`)}}),o&&(!h||e(h,o))&&(h=o)}return h&&r.test(h)?h:null},Df}var Pf,kw;function mM(){if(kw)return Pf;kw=1;const n=io();return Pf=(t,e)=>{try{return new n(t,e).range||"*"}catch{return null}},Pf}var Ff,Sw;function zf(){if(Sw)return Ff;Sw=1;const n=Dr(),t=Vc(),{ANY:e}=t,r=io(),d=Gc(),h=Uc(),f=bf(),v=kf(),o=Af();return Ff=(p,i,a,u)=>{p=new n(p,u),i=new r(i,u);let g,s,c,m,w;switch(a){case">":g=h,s=v,c=f,m=">",w=">=";break;case"<":g=f,s=o,c=h,m="<",w="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(d(p,i,u))return!1;for(let x=0;x<i.set.length;++x){const R=i.set[x];let S=null,A=null;if(R.forEach(C=>{C.semver===e&&(C=new t(">=0.0.0")),S=S||C,A=A||C,g(C.semver,S.semver,u)?S=C:c(C.semver,A.semver,u)&&(A=C)}),S.operator===m||S.operator===w||(!A.operator||A.operator===m)&&s(p,A.semver)||A.operator===w&&c(p,A.semver))return!1}return!0},Ff}var Bf,$w;function vM(){if($w)return Bf;$w=1;const n=zf();return Bf=(t,e,r)=>n(t,e,">",r),Bf}var jf,Ew;function yM(){if(Ew)return jf;Ew=1;const n=zf();return jf=(t,e,r)=>n(t,e,"<",r),jf}var Wf,Rw;function bM(){if(Rw)return Wf;Rw=1;const n=io();return Wf=(t,e,r)=>(t=new n(t,r),e=new n(e,r),t.intersects(e,r)),Wf}var Hf,Tw;function wM(){if(Tw)return Hf;Tw=1;const n=Gc(),t=ro();return Hf=(e,r,d)=>{const h=[];let f=null,v=null;const o=e.sort((u,g)=>t(u,g,d));for(const u of o)n(u,r,d)?(v=u,f||(f=u)):(v&&h.push([f,v]),v=null,f=null);f&&h.push([f,null]);const p=[];for(const[u,g]of h)u===g?p.push(u):!g&&u===o[0]?p.push("*"):g?u===o[0]?p.push(`<=${g}`):p.push(`${u} - ${g}`):p.push(`>=${u}`);const i=p.join(" || "),a=typeof r.raw=="string"?r.raw:String(r);return i.length<a.length?i:r},Hf}var Uf,Iw;function xM(){if(Iw)return Uf;Iw=1;const n=io(),t=Vc(),{ANY:e}=t,r=Gc(),d=ro(),h=(a,u,g={})=>{if(a===u)return!0;a=new n(a,g),u=new n(u,g);let s=!1;e:for(const c of a.set){for(const m of u.set){const w=o(c,m,g);if(s=s||w!==null,w)continue e}if(s)return!1}return!0},f=[new t(">=0.0.0-0")],v=[new t(">=0.0.0")],o=(a,u,g)=>{if(a===u)return!0;if(a.length===1&&a[0].semver===e){if(u.length===1&&u[0].semver===e)return!0;g.includePrerelease?a=f:a=v}if(u.length===1&&u[0].semver===e){if(g.includePrerelease)return!0;u=v}const s=new Set;let c,m;for(const N of a)N.operator===">"||N.operator===">="?c=p(c,N,g):N.operator==="<"||N.operator==="<="?m=i(m,N,g):s.add(N.semver);if(s.size>1)return null;let w;if(c&&m&&(w=d(c.semver,m.semver,g),w>0||w===0&&(c.operator!==">="||m.operator!=="<=")))return null;for(const N of s){if(c&&!r(N,String(c),g)||m&&!r(N,String(m),g))return null;for(const M of u)if(!r(N,String(M),g))return!1;return!0}let x,R,S,A,C=m&&!g.includePrerelease&&m.semver.prerelease.length?m.semver:!1,O=c&&!g.includePrerelease&&c.semver.prerelease.length?c.semver:!1;C&&C.prerelease.length===1&&m.operator==="<"&&C.prerelease[0]===0&&(C=!1);for(const N of u){if(A=A||N.operator===">"||N.operator===">=",S=S||N.operator==="<"||N.operator==="<=",c){if(O&&N.semver.prerelease&&N.semver.prerelease.length&&N.semver.major===O.major&&N.semver.minor===O.minor&&N.semver.patch===O.patch&&(O=!1),N.operator===">"||N.operator===">="){if(x=p(c,N,g),x===N&&x!==c)return!1}else if(c.operator===">="&&!N.test(c.semver))return!1}if(m){if(C&&N.semver.prerelease&&N.semver.prerelease.length&&N.semver.major===C.major&&N.semver.minor===C.minor&&N.semver.patch===C.patch&&(C=!1),N.operator==="<"||N.operator==="<="){if(R=i(m,N,g),R===N&&R!==m)return!1}else if(m.operator==="<="&&!N.test(m.semver))return!1}if(!N.operator&&(m||c)&&w!==0)return!1}return!(c&&S&&!m&&w!==0||m&&A&&!c&&w!==0||O||C)},p=(a,u,g)=>{if(!a)return u;const s=d(a.semver,u.semver,g);return s>0?a:s<0||u.operator===">"&&a.operator===">="?u:a},i=(a,u,g)=>{if(!a)return u;const s=d(a.semver,u.semver,g);return s<0?a:s>0||u.operator==="<"&&a.operator==="<="?u:a};return Uf=h,Uf}var Vf,Lw;function CM(){if(Lw)return Vf;Lw=1;const n=xl(),t=wl(),e=Dr(),r=Wb(),d=Fs(),h=JL(),f=ZL(),v=QL(),o=eM(),p=tM(),i=nM(),a=rM(),u=iM(),g=ro(),s=oM(),c=sM(),m=pf(),w=aM(),x=lM(),R=Uc(),S=bf(),A=lw(),C=uw(),O=Af(),N=kf(),M=pw(),L=cM(),j=uM(),F=Vc(),D=io(),$=Gc(),_=dM(),I=fM(),z=pM(),U=gM(),V=mM(),K=zf(),Z=vM(),oe=yM(),ee=bM(),re=wM(),ce=xM();return Vf={parse:d,valid:h,clean:f,inc:v,diff:o,major:p,minor:i,patch:a,prerelease:u,compare:g,rcompare:s,compareLoose:c,compareBuild:m,sort:w,rsort:x,gt:R,lt:S,eq:A,neq:C,gte:O,lte:N,cmp:M,coerce:L,truncate:j,Comparator:F,Range:D,satisfies:$,toComparators:_,maxSatisfying:I,minSatisfying:z,minVersion:U,validRange:V,outside:K,gtr:Z,ltr:oe,intersects:ee,simplifyRange:re,subset:ce,SemVer:e,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:r.compareIdentifiers,rcompareIdentifiers:r.rcompareIdentifiers},Vf}var AM=Mn("c",CM());const _M={props:{pluginName:{type:String,required:!0},variables:{type:Object,required:!0},pluginTxt:{type:String,required:!0},existingPluginTxt:{type:String,required:!1,default:null},storePluginId:{type:Number,required:!1,default:null},storeVersionId:{type:Number,required:!1,default:null},minCosmosVersion:{type:String,required:!1,default:void 0},modelValue:Boolean},emits:["callback","update:modelValue"],data(){return{installedCosmosVersion:null,tab:0,localVariables:{},localPluginTxt:"",localExistingPluginTxt:null,editor:null,differ:null,contextMenu:!1,menuX:0,menuY:0}},computed:{show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}}},watch:{value:{immediate:!0,handler:function(){const n=JSON.parse(JSON.stringify(this.variables));this.localVariables={};for(const[t,e]of Object.entries(n))typeof e=="string"?this.localVariables[t]={value:e}:this.localVariables[t]=e;this.localPluginTxt=this.pluginTxt.slice(),this.existingPluginTxt!==null&&(this.localExistingPluginTxt=this.existingPluginTxt.slice())}}},created(){tm.get("/openc3-api/info").then(({data:n})=>{this.installedCosmosVersion=n.version})},mounted(){const n=this.buildPluginMode();this.existingPluginTxt===null?(this.editor=ks.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight"),this.editor.session.setMode(new n),this.editor.session.setTabSize(2),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.localPluginTxt),this.editor.clearSelection(),Cc.applyVimModeIfEnabled(this.editor),this.editor.session.$undoManager.markClean(),this.editor.focus()):(this.tab=1,this.differ=new XL({element:this.$refs.editor,mode:new n,theme:"ace/theme/twilight",left:{content:this.localExistingPluginTxt,copyLinkEnabled:!1},right:{content:this.localPluginTxt,editable:!1}}),this.differ.getEditors().left.setFontSize(16),this.differ.getEditors().right.setFontSize(16),Cc.applyVimModeIfEnabled(this.differ.getEditors().left),Cc.applyVimModeIfEnabled(this.differ.getEditors().right),this.curDiff=-1)},beforeUnmount(){this.editor&&this.editor.destroy(),this.differ&&this.differ.destroy()},methods:{previousDiff(){this.curDiff--,this.curDiff<0&&(this.curDiff=this.differ.diffs.length-1),this.scrollToCurDiff()},nextDiff(){this.curDiff++,this.curDiff>=this.differ.diffs.length&&(this.curDiff=0),this.scrollToCurDiff()},scrollToCurDiff(){if(this.differ.diffs.length===0)return;let n=this.differ.diffs[this.curDiff].leftStartLine,t=this.differ.diffs[this.curDiff].rightStartLine;n>5&&(n-=5),t>5&&(t-=5),this.differ.getEditors().left.scrollToLine(n),this.differ.getEditors().right.scrollToLine(t)},buildPluginMode(){let n=ks.require("ace/lib/oop"),t=ks.require("ace/mode/ruby_highlight_rules").RubyHighlightRules,e=["VARIABLE","VARIABLE_DESCRIPTION","VARIABLE_STATE"],r=new RegExp(`(\\b${e.join("\\b|\\b")}\\b)`),d=function(){t.call(this);for(let i in this.$rules)this.$rules[i].unshift({regex:r,token:"support.function"})};n.inherits(d,t);let h=ks.require("ace/mode/matching_brace_outdent").MatchingBraceOutdent,f=ks.require("ace/mode/behaviour/cstyle").CstyleBehaviour,v=ks.require("ace/mode/folding/ruby").FoldMode,o=function(){this.HighlightRules=d,this.$outdent=new h,this.$behaviour=new f,this.foldingRules=new v,this.indentKeywords=this.foldingRules.indentKeywords},p=ks.require("ace/mode/ruby").Mode;return n.inherits(o,p),(function(){this.$id="ace/mode/openc3"}).call(o.prototype),o},checkVersionAndSubmit:function(){!this.installedCosmosVersion||!this.minCosmosVersion||AM.gte(this.installedCosmosVersion,this.minCosmosVersion)?this.submit():this.$dialog.confirm(`This plugin requires a minimum COSMOS version of ${this.minCosmosVersion}, which is greater than your installed version (${this.installedCosmosVersion}). Install anyway?`,{okText:"Install",cancelText:"Cancel"}).then(n=>{this.submit()}).catch(n=>{this.close()})},submit:function(){this.existingPluginTxt===null?this.emitSubmit(this.editor.getValue().split(`
|
|
1491
|
+
`)):this.differ.diffs.length===0?this.emitSubmit(this.differ.getEditors().left.getValue().split(`
|
|
1492
|
+
`)):this.$dialog.confirm("Diffs still detected! Install using 'Existing plugin.txt' (left) and ignore additional changes in the new plugin.txt (right)?",{okText:"Install",cancelText:"Cancel"}).then(n=>{this.emitSubmit(this.differ.getEditors().left.getValue().split(`
|
|
1493
|
+
`))}).catch(n=>{})},emitSubmit(n){let t={name:this.pluginName,variables:eg(this.localVariables),plugin_txt_lines:n,store_plugin_id:this.storePluginId,store_version_id:this.storeVersionId};this.$emit("callback",t)},close:function(){this.show=!this.show},handleEsc:function(){this.editor.session.$undoManager.isClean()?this.close():this.$dialog.confirm("You have unsaved changes. Are you sure you want to close?",{okText:"Close without saving",cancelText:"Cancel"}).then(()=>{this.close()}).catch(()=>{this.editor?.focus()})},showContextMenu:function(n){this.menuX=n.pageX,this.menuY=n.pageY;let t=this.editor.getCursorPosition(),e=this.editor.session.getTokenAt(t.row,t.column);if(e){let r=e.value.trim();r.includes(" ")?this.docsKeyword=r.split(" ")[0]:this.docsKeyword=r,this.contextMenu=!0}},toggleVimMode:function(){this.editor&&Cc.toggleVimMode(this.editor)},hasOptions(n){return n.options&&n.options.length>0},getDescription(n){return n.description||""},getOptionItems(n){return n.options?n.options.map(t=>({text:t.text||t.value,value:t.value})):[]}}},kM={key:0,class:"text-body-1 text-medium-emphasis pa-3"},SM={ref:"editor",class:"editor"},$M={key:0};function EM(n,t,e,r,d,h){const f=Ue("v-card-title"),v=Ue("v-alert"),o=Ue("v-tab"),p=Ue("v-tabs"),i=Ue("v-list-item"),a=Ue("v-combobox"),u=Ue("v-text-field"),g=Ue("v-col"),s=Ue("v-row"),c=Ue("v-window-item"),m=Ue("v-list-item-title"),w=Ue("v-divider"),x=Ue("v-list"),R=Ue("v-menu"),S=Ue("v-window"),A=Ue("v-btn"),C=Ue("v-spacer"),O=Ue("v-card-actions"),N=Ue("v-card-text"),M=Ue("v-card"),L=Ue("v-dialog");return rt(),Bt(L,{modelValue:h.show,"onUpdate:modelValue":t[5]||(t[5]=j=>h.show=j),persistent:"",width:"80vw",onKeydown:Bl(ta(h.handleEsc,["stop"]),["esc"])},{default:ze(()=>[We(M,null,{default:ze(()=>[We(f,null,{default:ze(()=>[Nt(yn(e.pluginName),1)]),_:1}),We(N,{class:"pt-0"},{default:ze(()=>[e.existingPluginTxt!==null?(rt(),Bt(v,{key:0,type:"warning",variant:"tonal",class:"mb-3"},{default:ze(()=>[Nt(" The existing plugin.txt is different from the "+yn(e.pluginName)+"'s plugin.txt. Navigate the diffs making whatever edits you want before installing. You may want to update "+yn(e.pluginName)+"'s plugin.txt going forward. ",1)]),_:1})):Gr("",!0),We(p,{modelValue:d.tab,"onUpdate:modelValue":t[0]||(t[0]=j=>d.tab=j),class:"mb-3"},{default:ze(()=>[(rt(),Bt(o,{key:0},{default:ze(()=>[...t[6]||(t[6]=[Nt(" Variables ",-1)])]),_:1})),(rt(),Bt(o,{key:1},{default:ze(()=>[...t[7]||(t[7]=[Nt(" plugin.txt ",-1)])]),_:1}))]),_:1},8,["modelValue"]),Jn("form",{onSubmit:t[4]||(t[4]=ta((...j)=>n.onSubmit&&n.onSubmit(...j),["prevent"]))},[We(S,{modelValue:d.tab,"onUpdate:modelValue":t[3]||(t[3]=j=>d.tab=j)},{default:ze(()=>[We(c,{value:0,eager:"true",class:"tab"},{default:ze(()=>[Object.keys(d.localVariables).length===0?(rt(),on("div",kM," No variables defined for this plugin. ")):(rt(),Bt(s,{key:1,class:"pt-2"},{default:ze(()=>[(rt(!0),on(si,null,vo(d.localVariables,(j,F)=>(rt(),Bt(g,{key:F,cols:"12",sm:"6",md:"3"},{default:ze(()=>[h.hasOptions(j)?(rt(),Bt(a,{key:0,modelValue:j.value,"onUpdate:modelValue":D=>j.value=D,items:h.getOptionItems(j),"item-title":"text","item-value":"value","return-object":!1,label:F,hint:h.getDescription(j),"persistent-hint":"",density:"comfortable",variant:"outlined","data-test":"variable-combobox"},{item:ze(({item:D,props:$})=>[We(i,Va({ref_for:!0},$),{title:ze(()=>[Nt(yn(D.raw.text),1)]),_:2},1040)]),_:1},8,["modelValue","onUpdate:modelValue","items","label","hint"])):(rt(),Bt(u,{key:1,modelValue:j.value,"onUpdate:modelValue":D=>j.value=D,label:F,hint:h.getDescription(j),"persistent-hint":"",clearable:"",density:"comfortable",variant:"outlined","data-test":"variable-text"},null,8,["modelValue","onUpdate:modelValue","label","hint"]))]),_:2},1024))),128))]),_:1}))]),_:1}),e.existingPluginTxt===null?(rt(),Bt(c,{key:0,value:1,eager:"true",class:"tab"},{default:ze(()=>[We(s,{class:"pa-3"},{default:ze(()=>[We(g,null,{default:ze(()=>[...t[8]||(t[8]=[Nt(" This can be edited before installation. ",-1)])]),_:1})]),_:1}),Jn("pre",{ref:"editor",class:"editor",onContextmenu:t[1]||(t[1]=ta((...j)=>h.showContextMenu&&h.showContextMenu(...j),["prevent"]))},null,544),We(R,{modelValue:d.contextMenu,"onUpdate:modelValue":t[2]||(t[2]=j=>d.contextMenu=j),target:[d.menuX,d.menuY]},{default:ze(()=>[We(x,null,{default:ze(()=>[We(i,{link:""},{default:ze(()=>[We(m,{onClick:n.openDocumentation},{default:ze(()=>[Nt(yn(n.docsKeyword)+" documentation ",1)]),_:1},8,["onClick"])]),_:1}),We(w),We(i,{title:"Toggle Vim mode","prepend-icon":"extras:vim",onClick:h.toggleVimMode},null,8,["onClick"])]),_:1})]),_:1},8,["modelValue","target"])]),_:1})):(rt(),Bt(c,{key:1,value:1,eager:"true",class:"tab"},{default:ze(()=>[We(s,{class:"pa-3"},{default:ze(()=>[We(g,null,{default:ze(()=>[...t[9]||(t[9]=[Nt(" Existing plugin.txt. This can be edited before installation. ",-1)])]),_:1}),We(g,{class:"ml-6"},{default:ze(()=>[...t[10]||(t[10]=[Nt(" Uneditable plugin.txt from the new plugin. ",-1)])]),_:1})]),_:1}),Jn("pre",SM,null,512)]),_:1}))]),_:1},8,["modelValue"]),We(O,{class:"px-2 mt-2"},{default:ze(()=>[e.existingPluginTxt!==null?(rt(),on("div",$M,[We(A,{variant:"text",onClick:h.nextDiff},{default:ze(()=>[...t[11]||(t[11]=[Nt(" Next Diff ",-1)])]),_:1},8,["onClick"]),We(A,{variant:"text",onClick:h.previousDiff},{default:ze(()=>[...t[12]||(t[12]=[Nt(" Previous Diff ",-1)])]),_:1},8,["onClick"])])):Gr("",!0),We(C),We(A,{variant:"outlined","data-test":"edit-cancel",onClick:ta(h.close,["prevent"])},{default:ze(()=>[...t[13]||(t[13]=[Nt(" Cancel ",-1)])]),_:1},8,["onClick"]),We(A,{variant:"flat","data-test":"edit-submit",onClick:h.checkVersionAndSubmit},{default:ze(()=>[...t[14]||(t[14]=[Nt(" Install ",-1)])]),_:1},8,["onClick"])]),_:1})],32)]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])}const LB=Mn("$",Xi(_M,[["render",EM],["__scopeId","data-v-1bfc6e55"]])),RM=Hd.find(n=>n.name==="PluginsTab"),Mw=[{path:"/",component:CL,children:[{component:RM.component,path:""},...Hd]},{path:"/:pathMatch(.*)*",name:"NotFound",component:uL}];Mw.forEach(n=>vg(n));const TM=hg({history:dg(),routes:Mw});function Ow(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,r=Array(t);e<t;e++)r[e]=n[e];return r}function IM(n){if(Array.isArray(n))return n}function LM(n,t){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var r,d,h,f,v=[],o=!0,p=!1;try{if(h=(e=e.call(n)).next,t!==0)for(;!(o=(r=h.call(e)).done)&&(v.push(r.value),v.length!==t);o=!0);}catch(i){p=!0,d=i}finally{try{if(!o&&e.return!=null&&(f=e.return(),Object(f)!==f))return}finally{if(p)throw d}}return v}}function MM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1494
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OM(n,t){return IM(n)||LM(n,t)||NM(n,t)||MM()}function NM(n,t){if(n){if(typeof n=="string")return Ow(n,t);var e={}.toString.call(n).slice(8,-1);return e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set"?Array.from(n):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Ow(n,t):void 0}}const Nw=Object.entries,Dw=Object.setPrototypeOf,DM=Object.isFrozen,PM=Object.getPrototypeOf,FM=Object.getOwnPropertyDescriptor;let Zr=Object.freeze,Fi=Object.seal,$a=Object.create,Pw=typeof Reflect<"u"&&Reflect,Gf=Pw.apply,qf=Pw.construct;Zr||(Zr=function(n){return n}),Fi||(Fi=function(n){return n}),Gf||(Gf=function(n,t){for(var e=arguments.length,r=new Array(e>2?e-2:0),d=2;d<e;d++)r[d-2]=arguments[d];return n.apply(t,r)}),qf||(qf=function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return new n(...e)});const Ea=ar(Array.prototype.forEach),zM=ar(Array.prototype.lastIndexOf),Fw=ar(Array.prototype.pop),Ra=ar(Array.prototype.push),BM=ar(Array.prototype.splice),Qr=Array.isArray,Cl=ar(String.prototype.toLowerCase),Kf=ar(String.prototype.toString),zw=ar(String.prototype.match),Ta=ar(String.prototype.replace),Bw=ar(String.prototype.indexOf),jM=ar(String.prototype.trim),WM=ar(Number.prototype.toString),HM=ar(Boolean.prototype.toString),jw=typeof BigInt>"u"?null:ar(BigInt.prototype.toString),Ww=typeof Symbol>"u"?null:ar(Symbol.prototype.toString),Un=ar(Object.prototype.hasOwnProperty),Al=ar(Object.prototype.toString),$r=ar(RegExp.prototype.test),_l=UM(TypeError);function ar(n){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,r=new Array(e>1?e-1:0),d=1;d<e;d++)r[d-1]=arguments[d];return Gf(n,t,r)}}function UM(n){return function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return qf(n,e)}}function Dt(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Cl;if(Dw&&Dw(n,null),!Qr(t))return n;let r=t.length;for(;r--;){let d=t[r];if(typeof d=="string"){const h=e(d);h!==d&&(DM(t)||(t[r]=h),d=h)}n[d]=!0}return n}function VM(n){for(let t=0;t<n.length;t++)Un(n,t)||(n[t]=null);return n}function Pr(n){const t=$a(null);for(const r of Nw(n)){var e=OM(r,2);const d=e[0],h=e[1];Un(n,d)&&(Qr(h)?t[d]=VM(h):h&&typeof h=="object"&&h.constructor===Object?t[d]=Pr(h):t[d]=h)}return t}function GM(n){switch(typeof n){case"string":return n;case"number":return WM(n);case"boolean":return HM(n);case"bigint":return jw?jw(n):"0";case"symbol":return Ww?Ww(n):"Symbol()";case"undefined":return Al(n);case"function":case"object":{if(n===null)return Al(n);const t=n,e=wo(t,"toString");if(typeof e=="function"){const r=e(t);return typeof r=="string"?r:Al(r)}return Al(n)}default:return Al(n)}}function wo(n,t){for(;n!==null;){const r=FM(n,t);if(r){if(r.get)return ar(r.get);if(typeof r.value=="function")return ar(r.value)}n=PM(n)}function e(){return null}return e}function qM(n){try{return $r(n,""),!0}catch{return!1}}const Hw=Zr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Yf=Zr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Xf=Zr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),KM=Zr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Jf=Zr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),YM=Zr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Uw=Zr(["#text"]),Vw=Zr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Zf=Zr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Gw=Zr(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),qc=Zr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),XM=Fi(/{{[\w\W]*|^[\w\W]*}}/g),JM=Fi(/<%[\w\W]*|^[\w\W]*%>/g),ZM=Fi(/\${[\w\W]*/g),QM=Fi(/^data-[\-\w.\u00B7-\uFFFF]+$/),eO=Fi(/^aria-[\-\w]+$/),qw=Fi(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tO=Fi(/^(?:\w+script|data):/i),nO=Fi(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),rO=Fi(/^html$/i),iO=Fi(/^[a-z][.\w]*(-[.\w]+)+$/i),xo={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},oO=function(){return typeof window>"u"?null:window},sO=function(n,t){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let e=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(e=t.getAttribute(r));const d="dompurify"+(e?"#"+e:"");try{return n.createPolicy(d,{createHTML(h){return h},createScriptURL(h){return h}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}},Kw=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Yw(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:oO();const t=le=>Yw(le);if(t.version="3.4.7",t.removed=[],!n||!n.document||n.document.nodeType!==xo.document||!n.Element)return t.isSupported=!1,t;let e=n.document;const r=e,d=r.currentScript;n.DocumentFragment;const h=n.HTMLTemplateElement,f=n.Node,v=n.Element,o=n.NodeFilter;n.NamedNodeMap===void 0&&(n.NamedNodeMap||n.MozNamedAttrMap),n.HTMLFormElement;const i=n.DOMParser,a=n.trustedTypes,u=v.prototype,g=wo(u,"cloneNode"),s=wo(u,"remove"),c=wo(u,"nextSibling"),m=wo(u,"childNodes"),w=wo(u,"parentNode"),x=wo(u,"shadowRoot"),R=wo(u,"attributes"),S=f&&f.prototype?wo(f.prototype,"nodeType"):null,A=f&&f.prototype?wo(f.prototype,"nodeName"):null;if(typeof h=="function"){const le=e.createElement("template");le.content&&le.content.ownerDocument&&(e=le.content.ownerDocument)}let C,O="";const N=e,M=N.implementation,L=N.createNodeIterator,j=N.createDocumentFragment,F=N.getElementsByTagName,D=r.importNode;let $=Kw();t.isSupported=typeof Nw=="function"&&typeof w=="function"&&M&&M.createHTMLDocument!==void 0;const _=XM,I=JM,z=ZM,U=QM,V=eO,K=tO,Z=nO,oe=iO;let ee=qw,re=null;const ce=Dt({},[...Hw,...Yf,...Xf,...Jf,...Uw]);let ie=null;const fe=Dt({},[...Vw,...Zf,...Gw,...qc]);let pe=Object.seal($a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$e=null,Re=null;const Ge=Object.seal($a(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let qe=!0,ct=!0,ot=!1,dt=!0,Lt=!1,gr=!0,$t=!1,xr=!1,Bn=!1,er=!1,pn=!1,tr=!1,yt=!0,Qe=!1;const jt="user-content-";let En=!0,Rn=!1,Tn={},xn=null;const Cn=Dt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Vn=null;const nr=Dt({},["audio","video","img","source","image","track"]);let Qt=null;const Gn=Dt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ci="http://www.w3.org/1998/Math/MathML",Fr="http://www.w3.org/2000/svg",On="http://www.w3.org/1999/xhtml";let Cr=On,Ai=!1,lr=null;const oo=Dt({},[ci,Fr,On],Kf);let _i=Dt({},["mi","mo","mn","ms","mtext"]),No=Dt({},["annotation-xml"]);const ei=Dt({},["title","style","font","a","script"]);let so=null;const ts=["application/xhtml+xml","text/html"],Do="text/html";let en=null,vn=null;const zr=e.createElement("form"),Br=function(le){return le instanceof RegExp||le instanceof Function},In=function(){let le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(vn&&vn===le)return;(!le||typeof le!="object")&&(le={}),le=Pr(le),so=ts.indexOf(le.PARSER_MEDIA_TYPE)===-1?Do:le.PARSER_MEDIA_TYPE,en=so==="application/xhtml+xml"?Kf:Cl,re=Un(le,"ALLOWED_TAGS")&&Qr(le.ALLOWED_TAGS)?Dt({},le.ALLOWED_TAGS,en):ce,ie=Un(le,"ALLOWED_ATTR")&&Qr(le.ALLOWED_ATTR)?Dt({},le.ALLOWED_ATTR,en):fe,lr=Un(le,"ALLOWED_NAMESPACES")&&Qr(le.ALLOWED_NAMESPACES)?Dt({},le.ALLOWED_NAMESPACES,Kf):oo,Qt=Un(le,"ADD_URI_SAFE_ATTR")&&Qr(le.ADD_URI_SAFE_ATTR)?Dt(Pr(Gn),le.ADD_URI_SAFE_ATTR,en):Gn,Vn=Un(le,"ADD_DATA_URI_TAGS")&&Qr(le.ADD_DATA_URI_TAGS)?Dt(Pr(nr),le.ADD_DATA_URI_TAGS,en):nr,xn=Un(le,"FORBID_CONTENTS")&&Qr(le.FORBID_CONTENTS)?Dt({},le.FORBID_CONTENTS,en):Cn,$e=Un(le,"FORBID_TAGS")&&Qr(le.FORBID_TAGS)?Dt({},le.FORBID_TAGS,en):Pr({}),Re=Un(le,"FORBID_ATTR")&&Qr(le.FORBID_ATTR)?Dt({},le.FORBID_ATTR,en):Pr({}),Tn=Un(le,"USE_PROFILES")?le.USE_PROFILES&&typeof le.USE_PROFILES=="object"?Pr(le.USE_PROFILES):le.USE_PROFILES:!1,qe=le.ALLOW_ARIA_ATTR!==!1,ct=le.ALLOW_DATA_ATTR!==!1,ot=le.ALLOW_UNKNOWN_PROTOCOLS||!1,dt=le.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Lt=le.SAFE_FOR_TEMPLATES||!1,gr=le.SAFE_FOR_XML!==!1,$t=le.WHOLE_DOCUMENT||!1,er=le.RETURN_DOM||!1,pn=le.RETURN_DOM_FRAGMENT||!1,tr=le.RETURN_TRUSTED_TYPE||!1,Bn=le.FORCE_BODY||!1,yt=le.SANITIZE_DOM!==!1,Qe=le.SANITIZE_NAMED_PROPS||!1,En=le.KEEP_CONTENT!==!1,Rn=le.IN_PLACE||!1,ee=qM(le.ALLOWED_URI_REGEXP)?le.ALLOWED_URI_REGEXP:qw,Cr=typeof le.NAMESPACE=="string"?le.NAMESPACE:On,_i=Un(le,"MATHML_TEXT_INTEGRATION_POINTS")&&le.MATHML_TEXT_INTEGRATION_POINTS&&typeof le.MATHML_TEXT_INTEGRATION_POINTS=="object"?Pr(le.MATHML_TEXT_INTEGRATION_POINTS):Dt({},["mi","mo","mn","ms","mtext"]),No=Un(le,"HTML_INTEGRATION_POINTS")&&le.HTML_INTEGRATION_POINTS&&typeof le.HTML_INTEGRATION_POINTS=="object"?Pr(le.HTML_INTEGRATION_POINTS):Dt({},["annotation-xml"]);const Ne=Un(le,"CUSTOM_ELEMENT_HANDLING")&&le.CUSTOM_ELEMENT_HANDLING&&typeof le.CUSTOM_ELEMENT_HANDLING=="object"?Pr(le.CUSTOM_ELEMENT_HANDLING):$a(null);if(pe=$a(null),Un(Ne,"tagNameCheck")&&Br(Ne.tagNameCheck)&&(pe.tagNameCheck=Ne.tagNameCheck),Un(Ne,"attributeNameCheck")&&Br(Ne.attributeNameCheck)&&(pe.attributeNameCheck=Ne.attributeNameCheck),Un(Ne,"allowCustomizedBuiltInElements")&&typeof Ne.allowCustomizedBuiltInElements=="boolean"&&(pe.allowCustomizedBuiltInElements=Ne.allowCustomizedBuiltInElements),Lt&&(ct=!1),pn&&(er=!0),Tn&&(re=Dt({},Uw),ie=$a(null),Tn.html===!0&&(Dt(re,Hw),Dt(ie,Vw)),Tn.svg===!0&&(Dt(re,Yf),Dt(ie,Zf),Dt(ie,qc)),Tn.svgFilters===!0&&(Dt(re,Xf),Dt(ie,Zf),Dt(ie,qc)),Tn.mathMl===!0&&(Dt(re,Jf),Dt(ie,Gw),Dt(ie,qc))),Ge.tagCheck=null,Ge.attributeCheck=null,Un(le,"ADD_TAGS")&&(typeof le.ADD_TAGS=="function"?Ge.tagCheck=le.ADD_TAGS:Qr(le.ADD_TAGS)&&(re===ce&&(re=Pr(re)),Dt(re,le.ADD_TAGS,en))),Un(le,"ADD_ATTR")&&(typeof le.ADD_ATTR=="function"?Ge.attributeCheck=le.ADD_ATTR:Qr(le.ADD_ATTR)&&(ie===fe&&(ie=Pr(ie)),Dt(ie,le.ADD_ATTR,en))),Un(le,"ADD_URI_SAFE_ATTR")&&Qr(le.ADD_URI_SAFE_ATTR)&&Dt(Qt,le.ADD_URI_SAFE_ATTR,en),Un(le,"FORBID_CONTENTS")&&Qr(le.FORBID_CONTENTS)&&(xn===Cn&&(xn=Pr(xn)),Dt(xn,le.FORBID_CONTENTS,en)),Un(le,"ADD_FORBID_CONTENTS")&&Qr(le.ADD_FORBID_CONTENTS)&&(xn===Cn&&(xn=Pr(xn)),Dt(xn,le.ADD_FORBID_CONTENTS,en)),En&&(re["#text"]=!0),$t&&Dt(re,["html","head","body"]),re.table&&(Dt(re,["tbody"]),delete $e.tbody),le.TRUSTED_TYPES_POLICY){if(typeof le.TRUSTED_TYPES_POLICY.createHTML!="function")throw _l('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof le.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw _l('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=le.TRUSTED_TYPES_POLICY,O=C.createHTML("")}else C===void 0&&(C=sO(a,d)),C!==null&&typeof O=="string"&&(O=C.createHTML(""));($.uponSanitizeElement.length>0||$.uponSanitizeAttribute.length>0)&&re===ce&&(re=Pr(re)),$.uponSanitizeAttribute.length>0&&ie===fe&&(ie=Pr(ie)),Zr&&Zr(le),vn=le},rr=Dt({},[...Yf,...Xf,...KM]),ki=Dt({},[...Jf,...YM]),Si=function(le){let Ne=w(le);(!Ne||!Ne.tagName)&&(Ne={namespaceURI:Cr,tagName:"template"});const Be=Cl(le.tagName),bt=Cl(Ne.tagName);return lr[le.namespaceURI]?le.namespaceURI===Fr?Ne.namespaceURI===On?Be==="svg":Ne.namespaceURI===ci?Be==="svg"&&(bt==="annotation-xml"||_i[bt]):!!rr[Be]:le.namespaceURI===ci?Ne.namespaceURI===On?Be==="math":Ne.namespaceURI===Fr?Be==="math"&&No[bt]:!!ki[Be]:le.namespaceURI===On?Ne.namespaceURI===Fr&&!No[bt]||Ne.namespaceURI===ci&&!_i[bt]?!1:!ki[Be]&&(ei[Be]||!rr[Be]):!!(so==="application/xhtml+xml"&&lr[le.namespaceURI]):!1},ti=function(le){Ra(t.removed,{element:le});try{w(le).removeChild(le)}catch{s(le)}},ui=function(le,Ne){try{Ra(t.removed,{attribute:Ne.getAttributeNode(le),from:Ne})}catch{Ra(t.removed,{attribute:null,from:Ne})}if(Ne.removeAttribute(le),le==="is")if(er||pn)try{ti(Ne)}catch{}else try{Ne.setAttribute(le,"")}catch{}},ns=function(le){let Ne=null,Be=null;if(Bn)le="<remove></remove>"+le;else{const Mt=zw(le,/^[\r\n\t ]+/);Be=Mt&&Mt[0]}so==="application/xhtml+xml"&&Cr===On&&(le='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+le+"</body></html>");const bt=C?C.createHTML(le):le;if(Cr===On)try{Ne=new i().parseFromString(bt,so)}catch{}if(!Ne||!Ne.documentElement){Ne=M.createDocument(Cr,"template",null);try{Ne.documentElement.innerHTML=Ai?O:bt}catch{}}const Pt=Ne.body||Ne.documentElement;return le&&Be&&Pt.insertBefore(e.createTextNode(Be),Pt.childNodes[0]||null),Cr===On?F.call(Ne,$t?"html":"body")[0]:$t?Ne.documentElement:Pt},Po=function(le){return L.call(le.ownerDocument||le,le,o.SHOW_ELEMENT|o.SHOW_COMMENT|o.SHOW_TEXT|o.SHOW_PROCESSING_INSTRUCTION|o.SHOW_CDATA_SECTION,null)},hi=function(le){le.normalize();const Ne=L.call(le.ownerDocument||le,le,o.SHOW_TEXT|o.SHOW_COMMENT|o.SHOW_CDATA_SECTION|o.SHOW_PROCESSING_INSTRUCTION,null);let Be=Ne.nextNode();for(;Be;){let bt=Be.data;Ea([_,I,z],Pt=>{bt=Ta(bt,Pt," ")}),Be.data=bt,Be=Ne.nextNode()}},Er=function(le){const Ne=A?A(le):null;return typeof Ne!="string"||en(Ne)!=="form"?!1:typeof le.nodeName!="string"||typeof le.textContent!="string"||typeof le.removeChild!="function"||le.attributes!==R(le)||typeof le.removeAttribute!="function"||typeof le.setAttribute!="function"||typeof le.namespaceURI!="string"||typeof le.insertBefore!="function"||typeof le.hasChildNodes!="function"||le.nodeType!==S(le)||le.childNodes!==m(le)},Tt=function(le){if(!S||typeof le!="object"||le===null)return!1;try{return S(le)===xo.documentFragment}catch{return!1}},ao=function(le){if(!S||typeof le!="object"||le===null)return!1;try{return typeof S(le)=="number"}catch{return!1}};function _n(le,Ne,Be){Ea(le,bt=>{bt.call(t,Ne,Be,vn)})}const Nn=function(le){let Ne=null;if(_n($.beforeSanitizeElements,le,null),Er(le))return ti(le),!0;const Be=en(le.nodeName);if(_n($.uponSanitizeElement,le,{tagName:Be,allowedTags:re}),gr&&le.hasChildNodes()&&!ao(le.firstElementChild)&&$r(/<[/\w!]/g,le.innerHTML)&&$r(/<[/\w!]/g,le.textContent)||gr&&le.namespaceURI===On&&Be==="style"&&ao(le.firstElementChild)||le.nodeType===xo.progressingInstruction||gr&&le.nodeType===xo.comment&&$r(/<[/\w]/g,le.data))return ti(le),!0;if($e[Be]||!(Ge.tagCheck instanceof Function&&Ge.tagCheck(Be))&&!re[Be]){if(!$e[Be]&&zi(Be)&&(pe.tagNameCheck instanceof RegExp&&$r(pe.tagNameCheck,Be)||pe.tagNameCheck instanceof Function&&pe.tagNameCheck(Be)))return!1;if(En&&!xn[Be]){const bt=w(le),Pt=m(le);if(Pt&&bt){const Mt=Pt.length;for(let _r=Mt-1;_r>=0;--_r){const kr=g(Pt[_r],!0);bt.insertBefore(kr,c(le))}}}return ti(le),!0}return(S?S(le):le.nodeType)===xo.element&&!Si(le)||(Be==="noscript"||Be==="noembed"||Be==="noframes")&&$r(/<\/no(script|embed|frames)/i,le.innerHTML)?(ti(le),!0):(Lt&&le.nodeType===xo.text&&(Ne=le.textContent,Ea([_,I,z],bt=>{Ne=Ta(Ne,bt," ")}),le.textContent!==Ne&&(Ra(t.removed,{element:le.cloneNode()}),le.textContent=Ne)),_n($.afterSanitizeElements,le,null),!1)},gn=function(le,Ne,Be){if(Re[Ne]||yt&&(Ne==="id"||Ne==="name")&&(Be in e||Be in zr))return!1;const bt=ie[Ne]||Ge.attributeCheck instanceof Function&&Ge.attributeCheck(Ne,le);if(!(ct&&!Re[Ne]&&$r(U,Ne))&&!(qe&&$r(V,Ne))){if(!bt||Re[Ne]){if(!(zi(le)&&(pe.tagNameCheck instanceof RegExp&&$r(pe.tagNameCheck,le)||pe.tagNameCheck instanceof Function&&pe.tagNameCheck(le))&&(pe.attributeNameCheck instanceof RegExp&&$r(pe.attributeNameCheck,Ne)||pe.attributeNameCheck instanceof Function&&pe.attributeNameCheck(Ne,le))||Ne==="is"&&pe.allowCustomizedBuiltInElements&&(pe.tagNameCheck instanceof RegExp&&$r(pe.tagNameCheck,Be)||pe.tagNameCheck instanceof Function&&pe.tagNameCheck(Be))))return!1}else if(!Qt[Ne]&&!$r(ee,Ta(Be,Z,""))&&!((Ne==="src"||Ne==="xlink:href"||Ne==="href")&&le!=="script"&&Bw(Be,"data:")===0&&Vn[le])&&!(ot&&!$r(K,Ta(Be,Z,"")))&&Be)return!1}return!0},Dn=Dt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),zi=function(le){return!Dn[Cl(le)]&&$r(oe,le)},qn=function(le){_n($.beforeSanitizeAttributes,le,null);const Ne=le.attributes;if(!Ne||Er(le))return;const Be={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ie,forceKeepAttr:void 0};let bt=Ne.length;for(;bt--;){const Pt=Ne[bt],Mt=Pt.name,_r=Pt.namespaceURI,kr=Pt.value,mr=en(Mt),fi=kr;let Gt=Mt==="value"?fi:jM(fi);if(Be.attrName=mr,Be.attrValue=Gt,Be.keepAttr=!0,Be.forceKeepAttr=void 0,_n($.uponSanitizeAttribute,le,Be),Gt=Be.attrValue,Qe&&(mr==="id"||mr==="name")&&Bw(Gt,jt)!==0&&(ui(Mt,le),Gt=jt+Gt),gr&&$r(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Gt)){ui(Mt,le);continue}if(mr==="attributename"&&zw(Gt,"href")){ui(Mt,le);continue}if(Be.forceKeepAttr)continue;if(!Be.keepAttr){ui(Mt,le);continue}if(!dt&&$r(/\/>/i,Gt)){ui(Mt,le);continue}Lt&&Ea([_,I,z],Ao=>{Gt=Ta(Gt,Ao," ")});const Co=en(le.nodeName);if(!gn(Co,mr,Gt)){ui(Mt,le);continue}if(C&&typeof a=="object"&&typeof a.getAttributeType=="function"&&!_r)switch(a.getAttributeType(Co,mr)){case"TrustedHTML":{Gt=C.createHTML(Gt);break}case"TrustedScriptURL":{Gt=C.createScriptURL(Gt);break}}if(Gt!==fi)try{_r?le.setAttributeNS(_r,Mt,Gt):le.setAttribute(Mt,Gt),Er(le)?ti(le):Fw(t.removed)}catch{ui(Mt,le)}}_n($.afterSanitizeAttributes,le,null)},di=function(le){let Ne=null;const Be=Po(le);for(_n($.beforeSanitizeShadowDOM,le,null);Ne=Be.nextNode();)if(_n($.uponSanitizeShadowNode,Ne,null),Nn(Ne),qn(Ne),Tt(Ne.content)&&di(Ne.content),(S?S(Ne):Ne.nodeType)===xo.element){const bt=x?x(Ne):Ne.shadowRoot;Tt(bt)&&(Ar(bt),di(bt))}_n($.afterSanitizeShadowDOM,le,null)},Ar=function(le){const Ne=S?S(le):le.nodeType;if(Ne===xo.element){const Pt=x?x(le):le.shadowRoot;Tt(Pt)&&(Ar(Pt),di(Pt))}const Be=m?m(le):le.childNodes;if(!Be)return;const bt=[];Ea(Be,Pt=>{Ra(bt,Pt)});for(const Pt of bt)Ar(Pt);if(Ne===xo.element){const Pt=A?A(le):null;if(typeof Pt=="string"&&en(Pt)==="template"){const Mt=le.content;Tt(Mt)&&Ar(Mt)}}};return t.sanitize=function(le){let Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Be=null,bt=null,Pt=null,Mt=null;if(Ai=!le,Ai&&(le="<!-->"),typeof le!="string"&&!ao(le)&&(le=GM(le),typeof le!="string"))throw _l("dirty is not a string, aborting");if(!t.isSupported)return le;if(xr||In(Ne),t.removed=[],typeof le=="string"&&(Rn=!1),Rn){const mr=A?A(le):le.nodeName;if(typeof mr=="string"){const fi=en(mr);if(!re[fi]||$e[fi])throw _l("root node is forbidden and cannot be sanitized in-place")}if(Er(le))throw _l("root node is clobbered and cannot be sanitized in-place");Ar(le)}else if(ao(le))Be=ns("<!---->"),bt=Be.ownerDocument.importNode(le,!0),bt.nodeType===xo.element&&bt.nodeName==="BODY"||bt.nodeName==="HTML"?Be=bt:Be.appendChild(bt),Ar(bt);else{if(!er&&!Lt&&!$t&&le.indexOf("<")===-1)return C&&tr?C.createHTML(le):le;if(Be=ns(le),!Be)return er?null:tr?O:""}Be&&Bn&&ti(Be.firstChild);const _r=Po(Rn?le:Be);for(;Pt=_r.nextNode();)Nn(Pt),qn(Pt),Tt(Pt.content)&&di(Pt.content);if(Rn)return Lt&&hi(le),le;if(er){if(Lt&&hi(Be),pn)for(Mt=j.call(Be.ownerDocument);Be.firstChild;)Mt.appendChild(Be.firstChild);else Mt=Be;return(ie.shadowroot||ie.shadowrootmode)&&(Mt=D.call(r,Mt,!0)),Mt}let kr=$t?Be.outerHTML:Be.innerHTML;return $t&&re["!doctype"]&&Be.ownerDocument&&Be.ownerDocument.doctype&&Be.ownerDocument.doctype.name&&$r(rO,Be.ownerDocument.doctype.name)&&(kr="<!DOCTYPE "+Be.ownerDocument.doctype.name+`>
|
|
1495
|
+
`+kr),Lt&&Ea([_,I,z],mr=>{kr=Ta(kr,mr," ")}),C&&tr?C.createHTML(kr):kr},t.setConfig=function(){let le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};In(le),xr=!0},t.clearConfig=function(){vn=null,xr=!1},t.isValidAttribute=function(le,Ne,Be){vn||In({});const bt=en(le),Pt=en(Ne);return gn(bt,Pt,Be)},t.addHook=function(le,Ne){typeof Ne=="function"&&Ra($[le],Ne)},t.removeHook=function(le,Ne){if(Ne!==void 0){const Be=zM($[le],Ne);return Be===-1?void 0:BM($[le],Be,1)[0]}return Fw($[le])},t.removeHooks=function(le){$[le]=[]},t.removeAllHooks=function(){$=Kw()},t}var aO=Yw();const lO={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"}},cO={data:function(){return{show:!1,params:{title:"Title",text:"The text that is displayed",okText:"Ok",okClass:"primary",validateText:"CONFIRM",cancelText:"Cancel",html:!1},resolve:null,reject:null,validationText:null,rules:{required:n=>!!n||"Required.",match:n=>n===this.params.validateText||"Value mismatch."}}},computed:{dataTestOk:function(){return`confirm-dialog-${this.params.okText.toLowerCase()}`},dataTestCancel:function(){return`confirm-dialog-${this.params.cancelText.toLowerCase()}`},sanitizedText:function(){return aO.sanitize(this.params.text)}},methods:{dialog:function(n,t,e){this.params=n,this.show=!0,this.resolve=t,this.reject=e},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=""}}},uO=["innerHTML"],hO={key:2},dO={key:3,class:"validate mt-4"};function fO(n,t,e,r,d,h){const f=Ue("v-spacer"),v=Ue("v-toolbar"),o=Ue("v-icon"),p=Ue("v-text-field"),i=Ue("v-card-text"),a=Ue("v-btn"),u=Ue("v-card-actions"),g=Ue("v-card"),s=Ue("v-dialog"),c=Ue("v-app");return rt(),Bt(c,null,{default:ze(()=>[We(s,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=m=>n.show=m),persistent:"",width:"600",onKeydown:Bl(h.cancel,["esc"])},{default:ze(()=>[We(g,null,{default:ze(()=>[We(v,{height:"24"},{default:ze(()=>[We(f),Jn("span",null,yn(n.params.title),1),We(f)]),_:1}),We(i,{class:"mt-4 pa-3"},{default:ze(()=>[n.params.validateText?(rt(),Bt(o,{key:0,class:"mr-2"},{default:ze(()=>[...t[2]||(t[2]=[Nt(" mdi-alert ",-1)])]),_:1})):Gr("",!0),n.params.html?(rt(),on("span",{key:1,innerHTML:h.sanitizedText},null,8,uO)):(rt(),on("span",hO,yn(h.sanitizedText),1)),n.params.validateText?(rt(),on("div",dO,[Nt(" Enter "+yn(n.params.validateText)+" to confirm! ",1),We(p,{modelValue:n.validationText,"onUpdate:modelValue":t[0]||(t[0]=m=>n.validationText=m),variant:"solo",density:"compact","single-line":"",rules:[n.rules.required,n.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):Gr("",!0)]),_:1}),We(u,{class:"px-2"},{default:ze(()=>[We(f),n.params.cancelText?(rt(),Bt(a,{key:0,variant:"outlined","data-test":h.dataTestCancel,onClick:h.cancel},{default:ze(()=>[Nt(yn(n.params.cancelText),1)]),_:1},8,["data-test","onClick"])):Gr("",!0),We(a,{variant:"flat",color:n.params.okClass,"data-test":h.dataTestOk,onClick:h.ok},{default:ze(()=>[Nt(yn(n.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])]),_:1})}const pO=Xi(cO,[["render",fO],["__scopeId","data-v-53691296"]]);class gO{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const t=window.Vue.createApp(pO);t.use(ep);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=t.mount(e),this.mounted=!0}open({title:t,text:e,okText:r,okClass:d,validateText:h,cancelText:f,html:v}){return this.mount(),new Promise((o,p)=>{this.$root.dialog({title:t,text:e,okText:r,okClass:d,validateText:h,cancelText:f,html:v},o,p)})}confirm(t,{okText:e="Ok",cancelText:r="Cancel",okClass:d="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:d,validateText:null,cancelText:r,html:!1})}alert(t,{okText:e="Ok",html:r=!1,okClass:d="primary"}){return this.open({title:"Alert",text:t,okText:e,okClass:d,validateText:null,cancelText:null,html:r})}validate(t,{okText:e="Ok",validateText:r="CONFIRM",cancelText:d="Cancel",okClass:h="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:h,validateText:r,cancelText:d,html:!1})}}const mO={install(n,t){const e=new gO;n.provide("dialog",e),n.config.globalProperties.hasOwnProperty("$dialog")||(n.config.globalProperties.$dialog=e)}},vO={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(){return this.toastNotification.type==="notification"?"mdi-bell":"mdi-alert-box"},toastStyle:function(){return`
|
|
1496
|
+
--toast-bg-color:${jd[this.toastNotification.level]};
|
|
1497
|
+
--toast-fg-color:${eL(this.toastNotification.level)};
|
|
1498
|
+
`},contentStyle:function(){return`
|
|
1499
|
+
white-space: ${this.expanded?"normal":"nowrap"};
|
|
1500
|
+
overflow-x: ${this.expanded?"visible":"hidden"};
|
|
1501
|
+
text-overflow: ${this.expanded?"unset":"ellipsis"};
|
|
1502
|
+
`}},methods:{toast:function(n,t){this.noToastPaths.includes(window.location.pathname)||(t===void 0&&(t=5e3),this.toastNotification=n,this.showToast=!0,this.cancelAutohide(),t&&(this.timeout=setTimeout(()=>{this.hide()},t)))},hide:function(){this.cancelAutohide(),this.showToast=!1},cancelAutohide:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},expand:function(){this.cancelAutohide(),this.expanded=!0}}},yO={key:0,class:"text-subtitle-1 mr-1 notification-text"},bO={key:1,class:"text-body-2 notification-text"},wO={key:2,class:"text-body-2 notification-text"};function xO(n,t,e,r,d,h){const f=Ue("v-icon"),v=Ue("v-spacer"),o=Ue("v-btn"),p=Ue("v-sheet"),i=Ue("v-slide-y-transition");return rt(),Bt(i,null,{default:ze(()=>[cg(We(p,{style:gs(h.toastStyle),class:"toast-notification",onClick:h.expand},{default:ze(()=>[We(f,{class:"mr-1 notification-text"},{default:ze(()=>[Nt(yn(h.toastNotificationIcon),1)]),_:1}),Jn("div",{class:"toast-content",style:gs(h.contentStyle)},[n.toastNotification.title?(rt(),on("span",yO,[n.toastNotification.body||n.toastNotification.message?(rt(),on(si,{key:0},[Nt(yn(n.toastNotification.title)+": ",1)],64)):(rt(),on(si,{key:1},[Nt(yn(n.toastNotification.title),1)],64))])):Gr("",!0),n.toastNotification.body?(rt(),on("span",bO,yn(n.toastNotification.body),1)):Gr("",!0),n.toastNotification.message?(rt(),on("span",wO,yn(n.toastNotification.message),1)):Gr("",!0)],4),We(v),We(o,{variant:"text",class:"notification-text",onClick:ta(h.hide,["stop"])},{default:ze(()=>[...t[0]||(t[0]=[Nt(" Dismiss ",-1)])]),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[ug,n.showToast]])]),_:1})}const CO=Xi(vO,[["render",xO],["__scopeId","data-v-ef96840d"]]);class AO{constructor(t={}){this.store=null,this.mounted=!1,this.$root=null,window.$cosmosNotify?.$root?(this.mounted=!0,this.$root=window.$cosmosNotify.$root):window.$cosmosNotify=this}getStore(){return this.store||(this.store=gb()),this.store}mount(){if(this.mounted)return;const t=Lu(CO);t.use(ep);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=t.mount(e),this.mounted=!0}open({method:t,title:e,body:r,message:d,level:h,duration:f,type:v="alert",logToConsole:o=!1,saveToHistory:p=!0}){this.mount(),o&&console.log(d?`${h.toUpperCase()} - ${d}`:`${h.toUpperCase()} - ${e}: ${r}`),p&&this.getStore().notifyAddHistory({title:e,body:r,message:d,level:h}),this[t]({title:e,body:r,message:d,level:h,duration:f,type:v})}toast({title:t,body:e,message:r,level:d,duration:h,type:f}){this.$root.toast({title:t,body:e,message:r,level:d,type:f},h)}critical({title:t,body:e,message:r,type:d,duration:h,logToConsole:f,saveToHistory:v}){this.open({method:"toast",level:"critical",title:t,body:e,message:r,type:d,duration:h,logToConsole:f,saveToHistory:v})}FATAL(t){this.critical(t)}ERROR(t){this.critical(t)}serious({title:t,body:e,message:r,type:d,duration:h,logToConsole:f,saveToHistory:v}){this.open({method:"toast",level:"serious",title:t,body:e,message:r,type:d,duration:h,logToConsole:f,saveToHistory:v})}caution({title:t,body:e,message:r,type:d,duration:h,logToConsole:f,saveToHistory:v}){this.open({method:"toast",level:"caution",title:t,body:e,message:r,type:d,duration:h,logToConsole:f,saveToHistory:v})}WARN(t){this.caution(t)}normal({title:t,body:e,message:r,type:d,duration:h,logToConsole:f,saveToHistory:v}){this.open({method:"toast",level:"normal",title:t,body:e,message:r,type:d,duration:h,logToConsole:f,saveToHistory:v})}INFO(t){this.normal(t)}DEBUG(t){this.normal(t)}standby({title:t,body:e,message:r,type:d,duration:h,logToConsole:f,saveToHistory:v}){this.open({method:"toast",level:"standby",title:t,body:e,message:r,type:d,duration:h,logToConsole:f,saveToHistory:v})}off({title:t,body:e,message:r,type:d,duration:h,logToConsole:f,saveToHistory:v}){this.open({method:"toast",level:"off",title:t,body:e,message:r,type:d,duration:h,logToConsole:f,saveToHistory:v})}}const _O={install(n,t){const e=new AO(t);n.provide("notify",e),n.config.globalProperties.hasOwnProperty("$notify")||(n.config.globalProperties.$notify=e)}};function kO(n){ng(`Vuetify: ${n}`)}function Xw(n){let t;return n!==null&&typeof n=="object"&&((t=Object.getPrototypeOf(n))===Object.prototype||t===null)}function SO(n,t){const e={};for(const r of t)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}function Jw(n={},t={},e,r){const d={};for(const h in n)d[h]=n[h];for(const h in t){const f=t[h],v=n[h];if(Xw(v)&&Xw(f)){d[h]=Jw(v,f);continue}d[h]=f}return d}function kl(n=""){if(kl.cache.has(n))return kl.cache.get(n);const t=n.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return kl.cache.set(n,t),t}kl.cache=new Map;function Zw(n,t){return e=>Object.keys(n).reduce((r,d)=>{const h=typeof n[d]=="object"&&n[d]!=null&&!Array.isArray(n[d])?n[d]:{type:n[d]};return e&&d in e?r[d]={...h,default:e[d]}:r[d]=h,t&&!r[d].source&&(r[d].source=t),r},{})}function Qw(n,t){const e=ag();if(!e)throw new Error(`[Vuetify] ${n} must be called from inside a setup function`);return e}function $O(n,t=Qw("injectSelf")){const{provides:e}=t;if(e&&n in e)return e[n]}const Qf=Symbol.for("vuetify:defaults");function e1(){const n=rg(Qf);if(!n)throw new Error("[Vuetify] Could not find defaults instance");return n}function EO(n,t){return n.props&&(typeof n.props[t]<"u"||typeof n.props[kl(t)]<"u")}function RO(n={},t,e=e1()){const r=Qw("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const d=Iu(()=>e.value?.[n._as??t]),h=new Proxy(n,{get(o,p){const i=Reflect.get(o,p);if(p==="class"||p==="style")return[d.value?.[p],i].filter(g=>g!=null);if(EO(r.vnode,p))return i;const a=d.value?.[p];if(a!==void 0)return a;const u=e.value?.global?.[p];return u!==void 0?u:i}}),f=ig();og(()=>{if(d.value){const o=Object.entries(d.value).filter(([p])=>p.startsWith(p[0].toUpperCase()));f.value=o.length?Object.fromEntries(o):void 0}else f.value=void 0});function v(){const o=$O(Qf,r);lg(Qf,Iu(()=>f.value?Jw(o?.value??{},f.value):o?.value))}return{props:h,provideSubDefaults:v}}function Kc(n){if(n._setup=n._setup??n.setup,!n.name)return kO("The component is missing an explicit name, unable to generate default prop value"),n;if(n._setup){n.props=Zw(n.props??{},n.name)();const t=Object.keys(n.props).filter(e=>e!=="class"&&e!=="style");n.filterProps=function(e){return SO(e,t)},n.props._as=String,n.setup=function(e,r){const d=e1();if(!d.value)return n._setup(e,r);const{props:h,provideSubDefaults:f}=RO(e,e._as??n.name,d),v=n._setup(h,r);return f(),v}}return n}function TO(n=!0){return t=>(n?Kc:tg)(t)}const IO=[String,Function,Object,Array],Yc=Zw({icon:{type:IO},tag:{type:[String,Object,Function],required:!0}},"icon");TO()({name:"VComponentIcon",props:Yc(),setup(n,{slots:t}){return()=>{const e=n.icon;return We(n.tag,null,{default:()=>[n.icon?We(e,null,null):t.default?.()]})}}}),Kc({name:"VSvgIcon",inheritAttrs:!1,props:Yc(),setup(n,{attrs:t}){return()=>We(n.tag,Va(t,{style:null}),{default:()=>[Jn("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(n.icon)?n.icon.map(e=>Array.isArray(e)?Jn("path",{d:e[0],"fill-opacity":e[1]},null):Jn("path",{d:e},null)):Jn("path",{d:n.icon},null)])]})}}),Kc({name:"VLigatureIcon",props:Yc(),setup(n){return()=>We(n.tag,null,{default:()=>[n.icon]})}});const LO=Kc({name:"VClassIcon",props:Yc(),setup(n){return()=>We(n.tag,{class:sg(n.icon)},null)}}),MO={component:n=>ea(LO,{...n,class:"mdi"})},OO={dark:!0,colors:{primary:"#007ad0",secondary:"#4da3e0",tertiary:"#858585",surface:"#1f1f1f",background:"#161616","on-surface":"#d4d4d4","on-background":"#d4d4d4","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},NO={dark:!0,colors:{primary:"#5B52E0",secondary:"#8078F0",tertiary:"#7E8696",surface:"#24242F",background:"#1A1A24","on-surface":"#D0D4DC","on-background":"#D0D4DC","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},DO={dark:!0,colors:{primary:"#0097A7",secondary:"#26C6DA",tertiary:"#708090",surface:"#242D36",background:"#1A2027","on-surface":"#D4DCE4","on-background":"#D4DCE4","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},PO={dark:!0,colors:{primary:"#00897B",secondary:"#26A69A",tertiary:"#6E7680",surface:"#222428",background:"#181A1C","on-surface":"#D4D8DC","on-background":"#D4D8DC","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},ep=gg({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:lO,cosmosDarkCobalt:OO,cosmosDarkIndigo:NO,cosmosDarkSlate:DO,cosmosDarkEmerald:PO}},defaults:{VCheckbox:{color:"secondary"},VCheckboxBtn:{color:"secondary"},VRadio:{color:"secondary"},VRadioGroup:{color:"secondary"},VSwitch:{color:"secondary"}},icons:{defaultSet:"mdi",sets:{mdi:MO,...nL,...rL}}}),tp=Jx({createApp:Lu,appOptions:{render(){return ea(oC,{})},el:"#openc3-tool"},handleInstance:n=>{n.use(TM),n.use(Aa),n.use(ep),n.use(mO),n.use(_O)}}),MB=Mn("d",tp.bootstrap),OB=Mn("j",tp.mount),NB=Mn("r",tp.unmount)})}}));
|