openc3-cosmos-tool-tablemanager 6.2.1 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/tools/tablemanager/{ArrayWidget-BxEO5hEG-3a73fe422564c0429019.js → ArrayWidget-BbsN1dzF-959f895dd277057383c1.js} +2 -2
- data/tools/tablemanager/{ArrayplotWidget-B_VPoV4v-614b214bbb69773602e6.js → ArrayplotWidget-CCKEyYIx-346527d8ce418723987f.js} +1 -1
- data/tools/tablemanager/{BarColumn-C9dkpg2O-afaaf4c015a17f51205d.js → BarColumn-C6p07yWK-b792c9c7d152d8e7eac0.js} +1 -1
- data/tools/tablemanager/BlockWidget-DlCHbqZX-931e540736560d3298ad.js +2 -0
- data/tools/tablemanager/{ButtonWidget-B6HM0Doo-ab11ef0f26b360b37c5f.js → ButtonWidget-CtfJzCBR-21a7269786cac7b63ed2.js} +2 -2
- data/tools/tablemanager/{CanvasWidget-DZQGG-yQ-450fa6b1ddd932d29d98.js → CanvasWidget-CqRlXc4r-7ea98cc5aa658273d3ab.js} +1 -1
- data/tools/tablemanager/CanvasdotWidget--Xr_KsZs-fd37759adf5ff324502c.js +1 -0
- data/tools/tablemanager/{CanvasimageWidget-mhcPpAuN-3a4572ba31e277b16cbd.js → CanvasimageWidget-BPlj5QYK-4f3fc8e5b175b2af118a.js} +1 -1
- data/tools/tablemanager/{CanvasimagevalueWidget-Cx-dH8Gc-6a5ad086319cf0d016eb.js → CanvasimagevalueWidget-DVFGLt8f-5d90c4a6f82cfaeea904.js} +1 -1
- data/tools/tablemanager/CanvaslabelWidget-CYNqmyP0-ee5f201f9b9a94ef6529.js +1 -0
- data/tools/tablemanager/{CanvaslabelvalueWidget-CwmYDCjr-95d9dc3d6675b6cd6e95.js → CanvaslabelvalueWidget-B7yIDmsn-a62a21cc67b2555f10ed.js} +1 -1
- data/tools/tablemanager/CanvaslineWidget-BICdxX0Q-c00d646b5ebac0888f19.js +1 -0
- data/tools/tablemanager/{CanvaslinevalueWidget-C3sJnjLQ-411d1f87490e88f39075.js → CanvaslinevalueWidget-Cq-Ddh0P-7cd0e41fbdea71aaf9d7.js} +1 -1
- data/tools/tablemanager/CheckbuttonWidget-B74AWeaW-b3c0cfbdc0a8149a68ca.js +1 -0
- data/tools/tablemanager/ComboboxWidget-CtyKbEWb-dc447488fe813641c5c0.js +1 -0
- data/tools/tablemanager/DateWidget-BEVSczU8-1f01bd84bcb9e186cab1.js +1 -0
- data/tools/tablemanager/{DetailsDialog-BvbziA7Y-8ff3365fb0330e67e92d.js → DetailsDialog-DmEC5BTs-1d5b2d4cb4d94c28fb08.js} +1 -1
- data/tools/tablemanager/{DynamicWidget-gFSYxzvT-80de147600fb5278d2fa.js → DynamicWidget-CfMtj7H8-7310a45e174b3e0e1f4d.js} +1 -1
- data/tools/tablemanager/{FormatvalueWidget-CGpnTqVH-a388e9c67416044cd56a.js → FormatvalueWidget-DN12xymS-5d92462ee8b18046d1f4.js} +1 -1
- data/tools/tablemanager/Graph-Bgo0cjl3-52421e0307d7ca0fbe50.js +1 -0
- data/tools/tablemanager/{GraphWidget-Dycey-mj-84f812318e1113f14c38.js → GraphWidget-DurWDmpg-c9b122c94c912d0741ba.js} +1 -1
- data/tools/tablemanager/{HorizontalWidget-D31NRWy5-958adfe5f70cc49258e5.js → HorizontalWidget-Cd_wl1b3-1c2997802975048e709f.js} +1 -1
- data/tools/tablemanager/HorizontalboxWidget-BcMTFBU--8ad91cd7bc665ab4766a.js +1 -0
- data/tools/tablemanager/HorizontallineWidget-CXFqHclf-de6750f9b87d7529cbf5.js +1 -0
- data/tools/tablemanager/{IframeWidget-Ctj8OIcG-b610a31a59161ba750cf.js → IframeWidget-BPerHCCa-cdb2815ceb98ee81983f.js} +1 -1
- data/tools/tablemanager/{ImageLoader-BrNrCBvi-4a283664736dbaae848c.js → ImageLoader-4N-7Gj61-a07bd29ee9cfe36f21d7.js} +1 -1
- data/tools/tablemanager/ImageviewerWidget-Cw_H_HmZ-dc0a5ab97b39f8b02ffd.js +1 -0
- data/tools/tablemanager/{LabelWidget-t7I87dp7-23d565a7a3e595de5a3a.js → LabelWidget-xrmcVeq8-d217d37c2a6475bb6a9d.js} +1 -1
- data/tools/tablemanager/LabelledWidget-D48QoyMk-24bd01061fc3c283bb8e.js +1 -0
- data/tools/tablemanager/LabelprogressbarWidget-C_950t6g-42d1ee457a76977a9926.js +1 -0
- data/tools/tablemanager/LabelsparklineWidget-0KXQyPoU-4fefa82bdaecf6d9a3d0.js +1 -0
- data/tools/tablemanager/{LabelvalueWidget-Zx_yHCtl-e5c665527952e66cb7bd.js → LabelvalueWidget-CQ06wWDK-ac37a8b84574824ad5b7.js} +1 -1
- data/tools/tablemanager/{LabelvaluedescWidget-BBSBh4vI-efaa36da0688d2643586.js → LabelvaluedescWidget-Bo8zT01X-9c0bf9f4cf055d8313f8.js} +1 -1
- data/tools/tablemanager/{LabelvaluelimitsbarWidget-CZueHYWG-17bead7bb9d109e43b93.js → LabelvaluelimitsbarWidget-BucTw8Yk-e8fa86e345960718befd.js} +1 -1
- data/tools/tablemanager/LabelvaluelimitscolumnWidget-Dflb1hNd-a33ca9d0e9a93745c199.js +1 -0
- data/tools/tablemanager/{LabelvaluerangebarWidget-BhYTBgDq-2bdd722a647658c589bd.js → LabelvaluerangebarWidget-D8cbfXFM-ef9ea25e0833526e661c.js} +1 -1
- data/tools/tablemanager/{Layout-Bh7VzCZd-8c7800d758c191052a54.js → Layout-Tf--nruw-7e1c88bcb2d1e9c2cc9c.js} +1 -1
- data/tools/tablemanager/LedWidget-qH_FthkK-8c5e19d8ac9c7a6f321d.js +1 -0
- data/tools/tablemanager/{LimitsbarWidget-Djui0IpK-9c16f9767089dad25ed6.js → LimitsbarWidget-B9lAB2RD-46ce18c4a5dd690481e6.js} +1 -1
- data/tools/tablemanager/{LimitscolorWidget-DdmvKzmx-81f0bbf494d5c0a3fa28.js → LimitscolorWidget-c6Qa6su7-1ac01b8834b586d34820.js} +1 -1
- data/tools/tablemanager/{LimitscolumnWidget-Cc19IEjq-5e1e31809753a837e695.js → LimitscolumnWidget-CcLs_443-f29417bf8f4f674783bd.js} +1 -1
- data/tools/tablemanager/LinegraphWidget-BSVYLFo1-2acb1a88e7e56ce79a5a.js +1 -0
- data/tools/tablemanager/MatrixbycolumnsWidget-DXFpZTre-8918bddf56b2e85dce07.js +1 -0
- data/tools/tablemanager/{ProgressbarWidget-DIfqhHRE-57a1a49f10e1f8c4fe88.js → ProgressbarWidget-iYGw8-Dc-224838ec829e2d0aaaa2.js} +1 -1
- data/tools/tablemanager/RadiobuttonWidget-ytmoVZ3u-203d8cf62a1dbf9d4a07.js +1 -0
- data/tools/tablemanager/{RadiogroupWidget-Ci9sCX39-a9368165055b6fb98bec.js → RadiogroupWidget-CusMBhKH-b3330247ae7a777565fa.js} +1 -1
- data/tools/tablemanager/{RangebarWidget-CN0YuHqy-55884175e54d1bf0242c.js → RangebarWidget-D_zGTtCa-3b37862085afd896c860.js} +1 -1
- data/tools/tablemanager/{RollupWidget-y4jBtJB2-3212cb134c1c60f94d02.js → RollupWidget-Dolsixyt-215ca55830b76e505c94.js} +1 -1
- data/tools/tablemanager/ScrollwindowWidget-DV2nZuNi-688f314da002c3dea6fb.js +1 -0
- data/tools/tablemanager/{SignalWidget-DQ5Uc2uV-216dbd95901481c86c15.js → SignalWidget-d9-6h85k-5806e363f98a90f36b92.js} +1 -1
- data/tools/tablemanager/SpacerWidget-BH0p2OLi-3e44b9fc8ff9cdb8e47e.js +1 -0
- data/tools/tablemanager/{SparklineWidget-CZtvu2ss-df7d74a972238c4b44b5.js → SparklineWidget-coxi9r2g-e8dd44a94f090ab553c2.js} +1 -1
- data/tools/tablemanager/TabbookWidget-B1XKplGH-21be3775bb05a42b4489.js +1 -0
- data/tools/tablemanager/TableManager-57dfe866c6d08795123c.js +13 -0
- data/tools/tablemanager/TextboxWidget-C-_M2M4l-1be0ab781fe0200895fd.js +1 -0
- data/tools/tablemanager/{TextfieldWidget-Df0ANSiU-a28e82fd9d48be8f8681.js → TextfieldWidget-C08N4JE8-1d9f7537a0fa53d0113c.js} +1 -1
- data/tools/tablemanager/TimeWidget-DtwdEcFg-afe7ad8fa99dd194ca59.js +1 -0
- data/tools/tablemanager/TitleWidget-CT-aLcNb-458d3c419a64e978301d.js +1 -0
- data/tools/tablemanager/{VWidget-C4spAawK-8c01507f7f06c5187684.js → VWidget-DQqb7NVW-d11f448dc9b15447843f.js} +1 -1
- data/tools/tablemanager/ValueWidget-C6RanBj3-2f0a0c754e68ac6c14a2.js +1 -0
- data/tools/tablemanager/ValuelimitsbarWidget-B3bvjfxc-25ed16c2313234a49832.js +1 -0
- data/tools/tablemanager/ValuelimitscolumnWidget-QvhI6EcE-e110f67cadf8ca55f828.js +1 -0
- data/tools/tablemanager/ValuerangebarWidget-Dt3K9BnC-75e9d7e093a62f7c3249.js +1 -0
- data/tools/tablemanager/{VerticalWidget-D8jUFxjS-cf44fa81ee676059ad9a.js → VerticalWidget-BIIViZgI-9b15e72a48b5a570cf2a.js} +1 -1
- data/tools/tablemanager/VerticalboxWidget-DY72fLHW-66bb7cf651d4ee151f1f.js +1 -0
- data/tools/tablemanager/{Widget-fRCERxGf-cfb11a01a4e0819f0115.js → Widget-oyqWpFXJ-c03892ad37a5994a2368.js} +1 -1
- data/tools/tablemanager/main-1bc219fcc4bfc28dfaea.js +1497 -0
- data/tools/tablemanager/main.js +1 -1
- metadata +70 -73
- data/tools/tablemanager/BlockWidget-CuefOin6-2ce5f8e02729dff1191a.js +0 -2
- data/tools/tablemanager/CanvasdotWidget-6wuCSnw_-3e9a58f6ec929696a27d.js +0 -1
- data/tools/tablemanager/CanvaslabelWidget-CQZCeohU-2a4272c49b592e4ddf45.js +0 -1
- data/tools/tablemanager/CanvaslineWidget-nTP3fJB4-aea34db4c2864fce9a30.js +0 -1
- data/tools/tablemanager/CheckbuttonWidget-5-8YDsQL-c0409ca47123c3f97f46.js +0 -1
- data/tools/tablemanager/ComboboxWidget-DzBL8h9f-5954ab30bd7b7426b22c.js +0 -1
- data/tools/tablemanager/DateWidget-CW7Od7lB-1d0b15f0e4330f7e065f.js +0 -1
- data/tools/tablemanager/Graph-3rkhFP3G-1b4e0490f8d49eee571f.js +0 -1
- data/tools/tablemanager/HorizontalboxWidget-Br8dSVHD-5039ded5a283caa87aac.js +0 -1
- data/tools/tablemanager/HorizontallineWidget-CbxREBYI-37095b3ec5bbd179e346.js +0 -1
- data/tools/tablemanager/ImageviewerWidget-XrsqxmLo-9c12d72a58d8807ae1d6.js +0 -1
- data/tools/tablemanager/LabelledWidget-C7TDf92M-1c3bd9b94afe1875582f.js +0 -1
- data/tools/tablemanager/LabelprogressbarWidget-wwLURt1u-3c35046cdccb5a71641b.js +0 -1
- data/tools/tablemanager/LabelsparklineWidget-B3awLUyP-2931c20a0ea5be337cfa.js +0 -1
- data/tools/tablemanager/LabelvaluelimitscolumnWidget-BTvzyQMq-b6ffd102e2b4d8350578.js +0 -1
- data/tools/tablemanager/LedWidget-CxJjJBBS-26ce1b6e69c9598eb5b0.js +0 -1
- data/tools/tablemanager/LinegraphWidget-BtieJxeL-5bcb3fef06b23b91f5f2.js +0 -1
- data/tools/tablemanager/MatrixbycolumnsWidget-DnExVRF8-7f673688a46bf30cf39a.js +0 -1
- data/tools/tablemanager/RadiobuttonWidget-QzIkNP7m-c961855d53dedce26894.js +0 -1
- data/tools/tablemanager/ScrollwindowWidget-CBzYk4Y3-647d2a92619222daf4b8.js +0 -1
- data/tools/tablemanager/SpacerWidget-6rsc_dSM-fa85148918d47c63fca8.js +0 -1
- data/tools/tablemanager/TabbookWidget-DNALU0jl-51a0e5ec34cf2a336675.js +0 -1
- data/tools/tablemanager/TableManager-4489278ed163678dc1b3.js +0 -11
- data/tools/tablemanager/TextboxWidget-5hqPj74D-f302a608328b0b1967db.js +0 -1
- data/tools/tablemanager/TimeWidget-C6XQMUG2-dd29c7ddc2d565ba7979.js +0 -1
- data/tools/tablemanager/TitleWidget-B9SPUlbW-4ff0c087c1a143f4def0.js +0 -1
- data/tools/tablemanager/ValueWidget-D4RrYVEK-1772418f3c2af2fafe2f.js +0 -1
- data/tools/tablemanager/ValuelimitsbarWidget-Bc9_Vj_f-6789a20f577eb37c438b.js +0 -1
- data/tools/tablemanager/ValuelimitscolumnWidget-DHKIL7sf-24c5ee3bba096f057c3d.js +0 -1
- data/tools/tablemanager/ValuerangebarWidget-CecQRIok-95791525460c7348f42a.js +0 -1
- data/tools/tablemanager/VerticalboxWidget-B4eGUSYH-fe49e2388548a6c9c51d.js +0 -1
- data/tools/tablemanager/main-2fe9a0af25d48afd561f.js +0 -1423
@@ -0,0 +1,1497 @@
|
|
1
|
+
System.register(["vue","vue-router","single-spa","vuex","vuetify"],function($r,it){"use strict";var Tn,So,ur,ir,ln,zi,Es,Kd,Gd,Ls,va,To,ji,_i,Yd,Xd,Qd,Wc,Zd,Jd,ep,tp,Bc,np,rp,ip,op,sp,ap,lp,cp,up;return{setters:[Ft=>{Tn=Ft.resolveComponent,So=Ft.createBlock,ur=Ft.openBlock,ir=Ft.withCtx,ln=Ft.createVNode,zi=Ft.createElementBlock,Es=Ft.createElementVNode,Kd=Ft.useCssVars,Gd=Ft.defineAsyncComponent,Ls=Ft.h,va=Ft.normalizeStyle,To=Ft.createCommentVNode,ji=Ft.createTextVNode,_i=Ft.toDisplayString,Yd=Ft.defineComponent,Xd=Ft.warn,Qd=Ft.inject,Wc=Ft.computed,Zd=Ft.shallowRef,Jd=Ft.watchEffect,ep=Ft.getCurrentInstance,tp=Ft.provide,Bc=Ft.createApp,np=Ft.withDirectives,rp=Ft.withModifiers,ip=Ft.vShow,op=Ft.mergeProps},Ft=>{sp=Ft.createRouter,ap=Ft.createWebHistory},Ft=>{lp=Ft.getMountedApps},Ft=>{cp=Ft.createStore},Ft=>{up=Ft.createVuetify}],execute:function(){$r({$:yp,c:$$,l:yn,m:yr,y:Vn,z:Kh});var Ft=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hp(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(v){return Object.getOwnPropertyDescriptor(n,v).enumerable})),e.push.apply(e,r)}return e}function Qo(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?hp(Object(e),!0).forEach(function(r){ub(n,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):hp(Object(e)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))})}return n}function ub(n,t,e){return(t=function(r){var v=function(m,y){if(Zo(m)!=="object"||m===null)return m;var x=m[Symbol.toPrimitive];if(x!==void 0){var h=x.call(m,y);if(Zo(h)!=="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(m)}(r,"string");return Zo(v)==="symbol"?v:String(v)}(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function Zo(n){return Zo=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},Zo(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,v=String(e),m=v.length,y=-1,x="",h=v.charCodeAt(0);++y<m;)(r=v.charCodeAt(y))!=0?x+=r>=1&&r<=31||r==127||y==0&&r>=48&&r<=57||y==1&&r>=48&&r<=57&&h==45?"\\"+r.toString(16)+" ":y==0&&m==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+v.charAt(y):v.charAt(y):x+="�";return x};n.CSS||(n.CSS={}),n.CSS.escape=t})(Ft);var hb={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function db(n){if(Zo(n)!=="object")throw new Error("single-spa-vue requires a configuration object");var t=Qo(Qo({},hb),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(Zo(t.appOptions.el)));t.createApp=t.createApp||t.Vue&&t.Vue.createApp;var e={};return{bootstrap:pb.bind(null,t,e),mount:gb.bind(null,t,e),unmount:mb.bind(null,t,e),update:fb.bind(null,t,e)}}function pb(n){return n.loadRootComponent?n.loadRootComponent().then(function(t){return n.rootComponent=t}):Promise.resolve()}function gb(n,t,e){var r={};return Promise.resolve().then(function(){return function(v,m){return typeof v.appOptions=="function"?v.appOptions(m):Promise.resolve(Qo({},v.appOptions))}(n,e).then(function(v){var m;if(e.domElement&&!v.el&&(v.el=e.domElement),v.el)if(typeof v.el=="string"){if(!(m=document.querySelector(v.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(v.el))}else(m=v.el).id||(m.id="single-spa-application:".concat(e.name)),v.el="#".concat(CSS.escape(m.id));else{var y="single-spa-application:".concat(e.name);v.el="#".concat(CSS.escape(y)),(m=document.getElementById(y))||((m=document.createElement("div")).id=y,document.body.appendChild(m))}if(!n.replaceMode&&(v.el=v.el+" .single-spa-container",!m.querySelector(".single-spa-container"))){var x=document.createElement("div");x.className="single-spa-container",m.appendChild(x)}r.domEl=m,v.render||v.template||!n.rootComponent||(v.render=function(g){return g(n.rootComponent)}),v.data||(v.data={});var h=v.data;if(v.data=function(){return Qo(Qo({},typeof h=="function"?h.call(this,this):h),e)},n.createApp){if(r.vueInstance=n.createApp(v),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,e)).then(function(){return r.root=r.vueInstance.mount(v.el),t[e.name]=r,r.vueInstance});r.root=r.vueInstance.mount(v.el)}else if(r.vueInstance=new n.Vue(v),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 fb(n,t,e){return Promise.resolve().then(function(){var r=t[e.name],v=Qo(Qo({},n.appOptions.data||{}),e),m=r.root||r.vueInstance;for(var y in v)m[y]=v[y]})}function mb(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 vb=$r("_",(n,t)=>{const e=n.__vccOpts||n;for(const[r,v]of t)e[r]=v;return e}),yb={};function wb(n,t){const e=Tn("router-view"),r=Tn("v-app");return ur(),So(r,{id:"innerapp"},{default:ir(()=>[ln(e)]),_:1})}const bb=vb(yb,[["render",wb]]),C2="modulepreload",k2=function(n){return"/"+n},_2={},ot=function(t,e,r){let v=Promise.resolve();function m(y){const x=new Event("vite:preloadError",{cancelable:!0});if(x.payload=y,window.dispatchEvent(x),!x.defaultPrevented)throw y}return v.then(y=>{for(const x of y||[])x.status==="rejected"&&m(x.reason);return t().catch(m)})},dp=function(n){var t;!n.name!=="NotFound"&&(n.path=`/tools/tablemanager/${n.path.replace(/^\//,"")}`),(t=n.children)==null||t.forEach(dp)},Os=$r("d",(n,t)=>{const e=n.__vccOpts||n;for(const[r,v]of t)e[r]=v;return e}),xb="/icons/customIcons.svg",zc={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return xb+"#"+this.icon}}},pp=()=>{Kd(n=>({"259824e2":n.color}))},gp=zc.setup;zc.setup=gp?(n,t)=>(pp(),gp(n,t)):pp;const Cb={class:"cosmos-custom-icon"},kb={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},_b=["href"];function Ab(n,t,e,r,v,m){return ur(),zi("span",Cb,[(ur(),zi("svg",kb,[Es("use",{href:m.iconSrc},null,8,_b)]))])}const Sb=Os(zc,[["render",Ab],["__scopeId","data-v-4b6f1199"]]),sl=6e4,jc=36e5,Tb=1e3,fp=Symbol.for("constructDateFrom");function Vn(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&fp in n?n[fp](t):n instanceof Date?new n.constructor(t):new Date(t)}function yn(n,t){return Vn(t||n,n)}let $b={};function Ns(){return $b}function $o(n,t){var e,r,v,m;const y=Ns(),x=(t==null?void 0:t.weekStartsOn)??((r=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:r.weekStartsOn)??y.weekStartsOn??((m=(v=y.locale)==null?void 0:v.options)==null?void 0:m.weekStartsOn)??0,h=yn(n,t==null?void 0:t.in),g=h.getDay(),s=(g<x?7:0)+g-x;return h.setDate(h.getDate()-s),h.setHours(0,0,0,0),h}function Ds(n,t){return $o(n,{...t,weekStartsOn:1})}function mp(n,t){const e=yn(n,void 0),r=e.getFullYear(),v=Vn(e,0);v.setFullYear(r+1,0,4),v.setHours(0,0,0,0);const m=Ds(v),y=Vn(e,0);y.setFullYear(r,0,4),y.setHours(0,0,0,0);const x=Ds(y);return e.getTime()>=m.getTime()?r+1:e.getTime()>=x.getTime()?r:r-1}function al(n){const t=yn(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 Mb(n,...t){const e=Vn.bind(null,t.find(r=>typeof r=="object"));return t.map(e)}function vp(n,t){const e=yn(n,void 0);return e.setHours(0,0,0,0),e}function Ib(n,t,e){const[r,v]=Mb(void 0,n,t),m=vp(r),y=vp(v),x=+m-al(m),h=+y-al(y);return Math.round((x-h)/864e5)}function Rb(n,t){const e=mp(n),r=Vn(n,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),Ds(r)}function Eb(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function yp(n){return!(!Eb(n)&&typeof n!="number"||isNaN(+yn(n)))}function Lb(n,t){const e=yn(n,void 0);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const Ob={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"}},Nb=(n,t,e)=>{let r;const v=Ob[n];return typeof v=="string"?r=v:t===1?r=v.one:r=v.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function Hc(n){return(t={})=>{const e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const Db={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Fb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Pb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Wb={date:Hc({formats:Db,defaultWidth:"full"}),time:Hc({formats:Fb,defaultWidth:"full"}),dateTime:Hc({formats:Pb,defaultWidth:"full"})},Bb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},zb=(n,t,e,r)=>Bb[n];function ya(n){return(t,e)=>{const r=e!=null&&e.context?String(e.context):"standalone";let v;if(r==="formatting"&&n.formattingValues){const y=n.defaultFormattingWidth||n.defaultWidth,x=e!=null&&e.width?String(e.width):y;v=n.formattingValues[x]||n.formattingValues[y]}else{const y=n.defaultWidth,x=e!=null&&e.width?String(e.width):n.defaultWidth;v=n.values[x]||n.values[y]}const m=n.argumentCallback?n.argumentCallback(t):t;return v[m]}}const jb={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Hb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ub={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"]},Vb={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"]},qb={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"}},Kb={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"}},Gb=(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"},Yb={ordinalNumber:Gb,era:ya({values:jb,defaultWidth:"wide"}),quarter:ya({values:Hb,defaultWidth:"wide",argumentCallback:n=>n-1}),month:ya({values:Ub,defaultWidth:"wide"}),day:ya({values:Vb,defaultWidth:"wide"}),dayPeriod:ya({values:qb,defaultWidth:"wide",formattingValues:Kb,defaultFormattingWidth:"wide"})};function wa(n){return(t,e={})=>{const r=e.width,v=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],m=t.match(v);if(!m)return null;const y=m[0],x=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],h=Array.isArray(x)?Qb(x,l=>l.test(y)):Xb(x,l=>l.test(y));let g;g=n.valueCallback?n.valueCallback(h):h,g=e.valueCallback?e.valueCallback(g):g;const s=t.slice(y.length);return{value:g,rest:s}}}function Xb(n,t){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function Qb(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return e}function Zb(n){return(t,e={})=>{const r=t.match(n.matchPattern);if(!r)return null;const v=r[0],m=t.match(n.parsePattern);if(!m)return null;let y=n.valueCallback?n.valueCallback(m[0]):m[0];y=e.valueCallback?e.valueCallback(y):y;const x=t.slice(v.length);return{value:y,rest:x}}}const Jb=/^(\d+)(th|st|nd|rd)?/i,e0=/\d+/i,t0={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},n0={any:[/^b/i,/^(a|c)/i]},r0={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},i0={any:[/1/i,/2/i,/3/i,/4/i]},o0={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},s0={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]},a0={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},l0={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]},c0={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},u0={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}},h0={ordinalNumber:Zb({matchPattern:Jb,parsePattern:e0,valueCallback:n=>parseInt(n,10)}),era:wa({matchPatterns:t0,defaultMatchWidth:"wide",parsePatterns:n0,defaultParseWidth:"any"}),quarter:wa({matchPatterns:r0,defaultMatchWidth:"wide",parsePatterns:i0,defaultParseWidth:"any",valueCallback:n=>n+1}),month:wa({matchPatterns:o0,defaultMatchWidth:"wide",parsePatterns:s0,defaultParseWidth:"any"}),day:wa({matchPatterns:a0,defaultMatchWidth:"wide",parsePatterns:l0,defaultParseWidth:"any"}),dayPeriod:wa({matchPatterns:c0,defaultMatchWidth:"any",parsePatterns:u0,defaultParseWidth:"any"})},wp={code:"en-US",formatDistance:Nb,formatLong:Wb,formatRelative:zb,localize:Yb,match:h0,options:{weekStartsOn:0,firstWeekContainsDate:1}};function d0(n,t){const e=yn(n,void 0);return Ib(e,Lb(e))+1}function bp(n,t){const e=yn(n,void 0),r=+Ds(e)-+Rb(e);return Math.round(r/6048e5)+1}function Uc(n,t){var e,r,v,m;const y=yn(n,t==null?void 0:t.in),x=y.getFullYear(),h=Ns(),g=(t==null?void 0:t.firstWeekContainsDate)??((r=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:r.firstWeekContainsDate)??h.firstWeekContainsDate??((m=(v=h.locale)==null?void 0:v.options)==null?void 0:m.firstWeekContainsDate)??1,s=Vn((t==null?void 0:t.in)||n,0);s.setFullYear(x+1,0,g),s.setHours(0,0,0,0);const l=$o(s,t),c=Vn((t==null?void 0:t.in)||n,0);c.setFullYear(x,0,g),c.setHours(0,0,0,0);const a=$o(c,t);return+y>=+l?x+1:+y>=+a?x:x-1}function p0(n,t){var e,r,v,m;const y=Ns(),x=(t==null?void 0:t.firstWeekContainsDate)??((r=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:r.firstWeekContainsDate)??y.firstWeekContainsDate??((m=(v=y.locale)==null?void 0:v.options)==null?void 0:m.firstWeekContainsDate)??1,h=Uc(n,t),g=Vn((t==null?void 0:t.in)||n,0);return g.setFullYear(h,0,x),g.setHours(0,0,0,0),$o(g,t)}function xp(n,t){const e=yn(n,t==null?void 0:t.in),r=+$o(e,t)-+p0(e,t);return Math.round(r/6048e5)+1}function rn(n,t){const e=n<0?"-":"",r=Math.abs(n).toString().padStart(t,"0");return e+r}const Mo={y(n,t){const e=n.getFullYear(),r=e>0?e:1-e;return rn(t==="yy"?r%100:r,t.length)},M(n,t){const e=n.getMonth();return t==="M"?String(e+1):rn(e+1,2)},d(n,t){return rn(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];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(n,t){return rn(n.getHours()%12||12,t.length)},H(n,t){return rn(n.getHours(),t.length)},m(n,t){return rn(n.getMinutes(),t.length)},s(n,t){return rn(n.getSeconds(),t.length)},S(n,t){const e=t.length,r=n.getMilliseconds(),v=Math.trunc(r*Math.pow(10,e-3));return rn(v,t.length)}},Fs={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Cp={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"});case"GGGG":default:return e.era(r,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){const r=n.getFullYear(),v=r>0?r:1-r;return e.ordinalNumber(v,{unit:"year"})}return Mo.y(n,t)},Y:function(n,t,e,r){const v=Uc(n,r),m=v>0?v:1-v;if(t==="YY"){const y=m%100;return rn(y,2)}return t==="Yo"?e.ordinalNumber(m,{unit:"year"}):rn(m,t.length)},R:function(n,t){const e=mp(n);return rn(e,t.length)},u:function(n,t){const e=n.getFullYear();return rn(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 rn(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"});case"QQQQ":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 rn(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"});case"qqqq":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 Mo.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"});case"MMMM":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 rn(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"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(n,t,e,r){const v=xp(n,r);return t==="wo"?e.ordinalNumber(v,{unit:"week"}):rn(v,t.length)},I:function(n,t,e){const r=bp(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):rn(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):Mo.d(n,t)},D:function(n,t,e){const r=d0(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):rn(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"});case"EEEE":default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(n,t,e,r){const v=n.getDay(),m=(v-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(m);case"ee":return rn(m,2);case"eo":return e.ordinalNumber(m,{unit:"day"});case"eee":return e.day(v,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(v,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(v,{width:"short",context:"formatting"});case"eeee":default:return e.day(v,{width:"wide",context:"formatting"})}},c:function(n,t,e,r){const v=n.getDay(),m=(v-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(m);case"cc":return rn(m,t.length);case"co":return e.ordinalNumber(m,{unit:"day"});case"ccc":return e.day(v,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(v,{width:"narrow",context:"standalone"});case"cccccc":return e.day(v,{width:"short",context:"standalone"});case"cccc":default:return e.day(v,{width:"wide",context:"standalone"})}},i:function(n,t,e){const r=n.getDay(),v=r===0?7:r;switch(t){case"i":return String(v);case"ii":return rn(v,t.length);case"io":return e.ordinalNumber(v,{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"});case"iiii":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"});case"aaaa":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(n,t,e){const r=n.getHours();let v;switch(r===12?v=Fs.noon:r===0?v=Fs.midnight:v=r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(v,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(v,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(v,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(v,{width:"wide",context:"formatting"})}},B:function(n,t,e){const r=n.getHours();let v;switch(r>=17?v=Fs.evening:r>=12?v=Fs.afternoon:r>=4?v=Fs.morning:v=Fs.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(v,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(v,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(v,{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 Mo.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):Mo.H(n,t)},K:function(n,t,e){const r=n.getHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):rn(r,t.length)},k:function(n,t,e){let r=n.getHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):rn(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):Mo.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):Mo.s(n,t)},S:function(n,t){return Mo.S(n,t)},X:function(n,t,e){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return _p(r);case"XXXX":case"XX":return Jo(r);case"XXXXX":case"XXX":default:return Jo(r,":")}},x:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"x":return _p(r);case"xxxx":case"xx":return Jo(r);case"xxxxx":case"xxx":default:return Jo(r,":")}},O:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+kp(r,":");case"OOOO":default:return"GMT"+Jo(r,":")}},z:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+kp(r,":");case"zzzz":default:return"GMT"+Jo(r,":")}},t:function(n,t,e){const r=Math.trunc(+n/1e3);return rn(r,t.length)},T:function(n,t,e){return rn(+n,t.length)}};function kp(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),v=Math.trunc(r/60),m=r%60;return m===0?e+String(v):e+String(v)+t+rn(m,2)}function _p(n,t){return n%60===0?(n>0?"-":"+")+rn(Math.abs(n)/60,2):Jo(n,t)}function Jo(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),v=rn(Math.trunc(r/60),2),m=rn(r%60,2);return e+v+t+m}const Ap=(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"});case"PPPP":default:return t.date({width:"full"})}},Sp=(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"});case"pppp":default:return t.time({width:"full"})}},g0=(n,t)=>{const e=n.match(/(P+)(p+)?/)||[],r=e[1],v=e[2];if(!v)return Ap(n,t);let m;switch(r){case"P":m=t.dateTime({width:"short"});break;case"PP":m=t.dateTime({width:"medium"});break;case"PPP":m=t.dateTime({width:"long"});break;case"PPPP":default:m=t.dateTime({width:"full"});break}return m.replace("{{date}}",Ap(r,t)).replace("{{time}}",Sp(v,t))},Vc={p:Sp,P:g0},f0=/^D+$/,m0=/^Y+$/,v0=["D","DD","YY","YYYY"];function Tp(n){return f0.test(n)}function $p(n){return m0.test(n)}function qc(n,t,e){const r=y0(n,t,e);if(console.warn(r),v0.includes(n))throw new RangeError(r)}function y0(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 w0=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,b0=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,x0=/^'([^]*?)'?$/,C0=/''/g,k0=/[a-zA-Z]/;function Ps(n,t,e){var r,v,m,y,x,h,g,s;const l=Ns(),c=(e==null?void 0:e.locale)??l.locale??wp,a=(e==null?void 0:e.firstWeekContainsDate)??((v=(r=e==null?void 0:e.locale)==null?void 0:r.options)==null?void 0:v.firstWeekContainsDate)??l.firstWeekContainsDate??((y=(m=l.locale)==null?void 0:m.options)==null?void 0:y.firstWeekContainsDate)??1,o=(e==null?void 0:e.weekStartsOn)??((h=(x=e==null?void 0:e.locale)==null?void 0:x.options)==null?void 0:h.weekStartsOn)??l.weekStartsOn??((s=(g=l.locale)==null?void 0:g.options)==null?void 0:s.weekStartsOn)??0,u=yn(n,e==null?void 0:e.in);if(!yp(u))throw new RangeError("Invalid time value");let d=t.match(b0).map(b=>{const E=b[0];if(E==="p"||E==="P"){const $=Vc[E];return $(b,c.formatLong)}return b}).join("").match(w0).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const E=b[0];if(E==="'")return{isToken:!1,value:_0(b)};if(Cp[E])return{isToken:!0,value:b};if(E.match(k0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return{isToken:!1,value:b}});c.localize.preprocessor&&(d=c.localize.preprocessor(u,d));const w={firstWeekContainsDate:a,weekStartsOn:o,locale:c};return d.map(b=>{if(!b.isToken)return b.value;const E=b.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&$p(E)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&Tp(E))&&qc(E,t,String(n));const $=Cp[E[0]];return $(u,E,c.localize,w)}).join("")}function _0(n){const t=n.match(x0);return t?t[1].replace(C0,"'"):n}var Io=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ll(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Mp={exports:{}},Ip;function A0(){return Ip||(Ip=1,function(n,t){(function(){var e="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var v=function(s,l,c){if(typeof s!="string"){v.original?v.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(c=l),v.modules[s]||(v.payloads[s]=c,v.modules[s]=null)};v.modules={},v.payloads={};var m=function(s,l,c){if(typeof l=="string"){var a=h(s,l);if(a!=null)return c&&c(),a}else if(Object.prototype.toString.call(l)==="[object Array]"){for(var o=[],u=0,d=l.length;u<d;++u){var w=h(s,l[u]);if(w==null&&y.original)return;o.push(w)}return c&&c.apply(null,o)||!0}},y=function(s,l){var c=m("",s,l);return c==null&&y.original?y.original.apply(this,arguments):c},x=function(s,l){if(l.indexOf("!")!==-1){var c=l.split("!");return x(s,c[0])+"!"+x(s,c[1])}if(l.charAt(0)=="."){var a=s.split("/").slice(0,-1).join("/");for(l=a+"/"+l;l.indexOf(".")!==-1&&o!=l;){var o=l;l=l.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return l},h=function(s,l){l=x(s,l);var c=v.modules[l];if(!c){if(c=v.payloads[l],typeof c=="function"){var a={},o={id:l,uri:"",exports:a,packaged:!0},u=function(w,b){return m(l,w,b)},d=c(u,a,o);a=d||o.exports,v.modules[l]=a,delete v.payloads[l]}c=v.modules[l]=a||c}return c};function g(s){var l=r;r[s]||(r[s]={}),l=r[s],(!l.define||!l.define.packaged)&&(v.original=l.define,l.define=v,l.define.packaged=!0),(!l.require||!l.require.packaged)&&(y.original=l.require,l.require=y,l.require.packaged=!0)}g(e)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,r,v){function m(y,x,h){Object.defineProperty(y,x,{value:h,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||m(String.prototype,"startsWith",function(y,x){return x=x||0,this.lastIndexOf(y,x)===x}),String.prototype.endsWith||m(String.prototype,"endsWith",function(y,x){var h=this;(x===void 0||x>h.length)&&(x=h.length),x-=y.length;var g=h.indexOf(y,x);return g!==-1&&g===x}),String.prototype.repeat||m(String.prototype,"repeat",function(y){for(var x="",h=this;y>0;)y&1&&(x+=h),(y>>=1)&&(h+=h);return x}),String.prototype.includes||m(String.prototype,"includes",function(y,x){return this.indexOf(y,x)!=-1}),Object.assign||(Object.assign=function(y){if(y==null)throw new TypeError("Cannot convert undefined or null to object");for(var x=Object(y),h=1;h<arguments.length;h++){var g=arguments[h];g!=null&&Object.keys(g).forEach(function(s){x[s]=g[s]})}return x}),Object.values||(Object.values=function(y){return Object.keys(y).map(function(x){return y[x]})}),Array.prototype.find||m(Array.prototype,"find",function(y){for(var x=this.length,h=arguments[1],g=0;g<x;g++){var s=this[g];if(y.call(h,s,g,this))return s}}),Array.prototype.findIndex||m(Array.prototype,"findIndex",function(y){for(var x=this.length,h=arguments[1],g=0;g<x;g++){var s=this[g];if(y.call(h,s,g,this))return g}}),Array.prototype.includes||m(Array.prototype,"includes",function(y,x){return this.indexOf(y,x)!=-1}),Array.prototype.fill||m(Array.prototype,"fill",function(y){for(var x=this,h=x.length>>>0,g=arguments[1],s=g>>0,l=s<0?Math.max(h+s,0):Math.min(s,h),c=arguments[2],a=c===void 0?h:c>>0,o=a<0?Math.max(h+a,0):Math.min(a,h);l<o;)x[l]=y,l++;return x}),Array.of||m(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(e,r,v){e("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(e,r,v){r.deepCopy=function m(y){if(typeof y!="object"||!y)return y;var x;if(Array.isArray(y)){x=[];for(var h=0;h<y.length;h++)x[h]=m(y[h]);return x}if(Object.prototype.toString.call(y)!=="[object Object]")return y;x={};for(var h in y)x[h]=m(y[h]);return x}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(e,r,v){r.last=function(x){return x[x.length-1]},r.stringReverse=function(x){return x.split("").reverse().join("")},r.stringRepeat=function(x,h){for(var g="";h>0;)h&1&&(g+=x),(h>>=1)&&(x+=x);return g};var m=/^\s\s*/,y=/\s\s*$/;r.stringTrimLeft=function(x){return x.replace(m,"")},r.stringTrimRight=function(x){return x.replace(y,"")},r.copyObject=function(x){var h={};for(var g in x)h[g]=x[g];return h},r.copyArray=function(x){for(var h=[],g=0,s=x.length;g<s;g++)x[g]&&typeof x[g]=="object"?h[g]=this.copyObject(x[g]):h[g]=x[g];return h},r.deepCopy=e("./deep_copy").deepCopy,r.arrayToMap=function(x){for(var h={},g=0;g<x.length;g++)h[x[g]]=1;return h},r.createMap=function(x){var h=Object.create(null);for(var g in x)h[g]=x[g];return h},r.arrayRemove=function(x,h){for(var g=0;g<=x.length;g++)h===x[g]&&x.splice(g,1)},r.escapeRegExp=function(x){return x.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(x){return(""+x).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},r.getMatchOffsets=function(x,h){var g=[];return x.replace(h,function(s){g.push({offset:arguments[arguments.length-2],length:s.length})}),g},r.deferredCall=function(x){var h=null,g=function(){h=null,x()},s=function(l){return s.cancel(),h=setTimeout(g,l||0),s};return s.schedule=s,s.call=function(){return this.cancel(),x(),s},s.cancel=function(){return clearTimeout(h),h=null,s},s.isPending=function(){return h},s},r.delayedCall=function(x,h){var g=null,s=function(){g=null,x()},l=function(c){g==null&&(g=setTimeout(s,c||h))};return l.delay=function(c){g&&clearTimeout(g),g=setTimeout(s,c||h)},l.schedule=l,l.call=function(){this.cancel(),x()},l.cancel=function(){g&&clearTimeout(g),g=null},l.isPending=function(){return g},l},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(x,h,g){return g&&x.codePointAt(h)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,r,v){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 m=typeof navigator=="object"?navigator:{},y=(/mac|win|linux/i.exec(m.platform)||["other"])[0].toLowerCase(),x=m.userAgent||"",h=m.appName||"";r.isWin=y=="win",r.isMac=y=="mac",r.isLinux=y=="linux",r.isIE=h=="Microsoft Internet Explorer"||h.indexOf("MSAppHost")>=0?parseFloat((x.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((x.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=x.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(x.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(x.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(x.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(x.split(" Edge/")[1])||void 0,r.isAIR=x.indexOf("AdobeAIR")>=0,r.isAndroid=x.indexOf("Android")>=0,r.isChromeOS=x.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(x)&&!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,v){var m=e("./useragent"),y="http://www.w3.org/1999/xhtml";r.buildDom=function c(a,o,u){if(typeof a=="string"&&a){var d=document.createTextNode(a);return o&&o.appendChild(d),d}if(!Array.isArray(a))return a&&a.appendChild&&o&&o.appendChild(a),a;if(typeof a[0]!="string"||!a[0]){for(var w=[],b=0;b<a.length;b++){var E=c(a[b],o,u);E&&w.push(E)}return w}var $=document.createElement(a[0]),_=a[1],C=1;_&&typeof _=="object"&&!Array.isArray(_)&&(C=2);for(var b=C;b<a.length;b++)c(a[b],$,u);return C==2&&Object.keys(_).forEach(function(R){var L=_[R];R==="class"?$.className=Array.isArray(L)?L.join(" "):L:typeof L=="function"||R=="value"||R[0]=="$"?$[R]=L:R==="ref"?u&&(u[L]=$):R==="style"?typeof L=="string"&&($.style.cssText=L):L!=null&&$.setAttribute(R,L)}),o&&o.appendChild($),$},r.getDocumentHead=function(c){return c||(c=document),c.head||c.getElementsByTagName("head")[0]||c.documentElement},r.createElement=function(c,a){return document.createElementNS?document.createElementNS(a||y,c):document.createElement(c)},r.removeChildren=function(c){c.innerHTML=""},r.createTextNode=function(c,a){var o=a?a.ownerDocument:document;return o.createTextNode(c)},r.createFragment=function(c){var a=c?c.ownerDocument:document;return a.createDocumentFragment()},r.hasCssClass=function(c,a){var o=(c.className+"").split(/\s+/g);return o.indexOf(a)!==-1},r.addCssClass=function(c,a){r.hasCssClass(c,a)||(c.className+=" "+a)},r.removeCssClass=function(c,a){for(var o=c.className.split(/\s+/g);;){var u=o.indexOf(a);if(u==-1)break;o.splice(u,1)}c.className=o.join(" ")},r.toggleCssClass=function(c,a){for(var o=c.className.split(/\s+/g),u=!0;;){var d=o.indexOf(a);if(d==-1)break;u=!1,o.splice(d,1)}return u&&o.push(a),c.className=o.join(" "),u},r.setCssClass=function(c,a,o){o?r.addCssClass(c,a):r.removeCssClass(c,a)},r.hasCssString=function(c,a){var o=0,u;if(a=a||document,u=a.querySelectorAll("style")){for(;o<u.length;)if(u[o++].id===c)return!0}},r.removeElementById=function(c,a){a=a||document,a.getElementById(c)&&a.getElementById(c).remove()};var x,h=[];r.useStrictCSP=function(c){x=c,c==!1?g():h||(h=[])};function g(){var c=h;h=null,c&&c.forEach(function(a){s(a[0],a[1])})}function s(c,a,o){if(!(typeof document>"u")){if(h){if(o)g();else if(o===!1)return h.push([c,a])}if(!x){var u=o;!o||!o.getRootNode?u=document:(u=o.getRootNode(),(!u||u==o)&&(u=document));var d=u.ownerDocument||u;if(a&&r.hasCssString(a,u))return null;a&&(c+=`
|
2
|
+
/*# sourceURL=ace/css/`+a+" */");var w=r.createElement("style");w.appendChild(d.createTextNode(c)),a&&(w.id=a),u==d&&(u=r.getDocumentHead(d)),u.insertBefore(w,u.firstChild)}}}if(r.importCssString=s,r.importCssStylsheet=function(c,a){r.buildDom(["link",{rel:"stylesheet",href:c}],r.getDocumentHead(a))},r.scrollbarWidth=function(c){var a=r.createElement("ace_inner");a.style.width="100%",a.style.minWidth="0px",a.style.height="200px",a.style.display="block";var o=r.createElement("ace_outer"),u=o.style;u.position="absolute",u.left="-10000px",u.overflow="hidden",u.width="200px",u.minWidth="0px",u.height="150px",u.display="block",o.appendChild(a);var d=c&&c.documentElement||document&&document.documentElement;if(!d)return 0;d.appendChild(o);var w=a.offsetWidth;u.overflow="scroll";var b=a.offsetWidth;return w===b&&(b=o.clientWidth),d.removeChild(o),w-b},r.computedStyle=function(c,a){return window.getComputedStyle(c,"")||{}},r.setStyle=function(c,a,o){c[a]!==o&&(c[a]=o)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=m.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,m.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var l=document.createElement("div");r.HI_DPI&&l.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!m.isEdge&&typeof l.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),l=null}r.HAS_CSS_TRANSFORMS?r.translate=function(c,a,o){c.style.transform="translate("+Math.round(a)+"px, "+Math.round(o)+"px)"}:r.translate=function(c,a,o){c.style.top=Math.round(o)+"px",c.style.left=Math.round(a)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,r,v){/*
|
3
|
+
* based on code from:
|
4
|
+
*
|
5
|
+
* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
|
6
|
+
* Available via the MIT or new BSD license.
|
7
|
+
* see: http://github.com/jrburke/requirejs for details
|
8
|
+
*/var m=e("./dom");r.get=function(y,x){var h=new XMLHttpRequest;h.open("GET",y,!0),h.onreadystatechange=function(){h.readyState===4&&x(h.responseText)},h.send(null)},r.loadScript=function(y,x){var h=m.getDocumentHead(),g=document.createElement("script");g.src=y,h.appendChild(g),g.onload=g.onreadystatechange=function(s,l){(l||!g.readyState||g.readyState=="loaded"||g.readyState=="complete")&&(g=g.onload=g.onreadystatechange=null,l||x())}},r.qualifyURL=function(y){var x=document.createElement("a");return x.href=y,x.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,r,v){r.inherits=function(m,y){m.super_=y,m.prototype=Object.create(y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(m,y){for(var x in y)m[x]=y[x];return m},r.implement=function(m,y){r.mixin(m,y)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,r,v){var m={},y=function(){this.propagationStopped=!0},x=function(){this.defaultPrevented=!0};m._emit=m._dispatchEvent=function(h,g){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var s=this._eventRegistry[h]||[],l=this._defaultHandlers[h];if(!(!s.length&&!l)){(typeof g!="object"||!g)&&(g={}),g.type||(g.type=h),g.stopPropagation||(g.stopPropagation=y),g.preventDefault||(g.preventDefault=x),s=s.slice();for(var c=0;c<s.length&&(s[c](g,this),!g.propagationStopped);c++);if(l&&!g.defaultPrevented)return l(g,this)}},m._signal=function(h,g){var s=(this._eventRegistry||{})[h];if(s){s=s.slice();for(var l=0;l<s.length;l++)s[l](g,this)}},m.once=function(h,g){var s=this;if(this.on(h,function l(){s.off(h,l),g.apply(null,arguments)}),!g)return new Promise(function(l){g=l})},m.setDefaultHandler=function(h,g){var s=this._defaultHandlers;if(s||(s=this._defaultHandlers={_disabled_:{}}),s[h]){var l=s[h],c=s._disabled_[h];c||(s._disabled_[h]=c=[]),c.push(l);var a=c.indexOf(g);a!=-1&&c.splice(a,1)}s[h]=g},m.removeDefaultHandler=function(h,g){var s=this._defaultHandlers;if(s){var l=s._disabled_[h];if(s[h]==g)l&&this.setDefaultHandler(h,l.pop());else if(l){var c=l.indexOf(g);c!=-1&&l.splice(c,1)}}},m.on=m.addEventListener=function(h,g,s){this._eventRegistry=this._eventRegistry||{};var l=this._eventRegistry[h];return l||(l=this._eventRegistry[h]=[]),l.indexOf(g)==-1&&l[s?"unshift":"push"](g),g},m.off=m.removeListener=m.removeEventListener=function(h,g){this._eventRegistry=this._eventRegistry||{};var s=this._eventRegistry[h];if(s){var l=s.indexOf(g);l!==-1&&s.splice(l,1)}},m.removeAllListeners=function(h){h||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[h]=void 0),this._defaultHandlers&&(this._defaultHandlers[h]=void 0)},r.EventEmitter=m}),ace.define("ace/lib/report_error",["require","exports","module"],function(e,r,v){r.reportError=function(m,y){var x=new Error(m);x.data=y,typeof console=="object"&&console.error&&console.error(x),setTimeout(function(){throw x})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(e,r,v){var m={"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=m}),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,v){"no use strict";var m=e("./oop"),y=e("./event_emitter").EventEmitter,x=e("./report_error").reportError,h=e("./default_english_messages").defaultEnglishMessages,g={setOptions:function(o){Object.keys(o).forEach(function(u){this.setOption(u,o[u])},this)},getOptions:function(o){var u={};if(o)Array.isArray(o)||(u=o,o=Object.keys(u));else{var d=this.$options;o=Object.keys(d).filter(function(w){return!d[w].hidden})}return o.forEach(function(w){u[w]=this.getOption(w)},this),u},setOption:function(o,u){if(this["$"+o]!==u){var d=this.$options[o];if(!d)return s('misspelled option "'+o+'"');if(d.forwardTo)return this[d.forwardTo]&&this[d.forwardTo].setOption(o,u);d.handlesSet||(this["$"+o]=u),d&&d.set&&d.set.call(this,u)}},getOption:function(o){var u=this.$options[o];return u?u.forwardTo?this[u.forwardTo]&&this[u.forwardTo].getOption(o):u&&u.get?u.get.call(this):this["$"+o]:s('misspelled option "'+o+'"')}};function s(o){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var l,c,a=function(){function o(){this.$defaultOptions={},l=h,c="dollarSigns"}return o.prototype.defineOptions=function(u,d,w){return u.$options||(this.$defaultOptions[d]=u.$options={}),Object.keys(w).forEach(function(b){var E=w[b];typeof E=="string"&&(E={forwardTo:E}),E.name||(E.name=b),u.$options[E.name]=E,"initialValue"in E&&(u["$"+E.name]=E.initialValue)}),m.implement(u,g),this},o.prototype.resetOptions=function(u){Object.keys(u.$options).forEach(function(d){var w=u.$options[d];"value"in w&&u.setOption(d,w.value)})},o.prototype.setDefaultValue=function(u,d,w){if(!u){for(u in this.$defaultOptions)if(this.$defaultOptions[u][d])break;if(!this.$defaultOptions[u][d])return!1}var b=this.$defaultOptions[u]||(this.$defaultOptions[u]={});b[d]&&(b.forwardTo?this.setDefaultValue(b.forwardTo,d,w):b[d].value=w)},o.prototype.setDefaultValues=function(u,d){Object.keys(d).forEach(function(w){this.setDefaultValue(u,w,d[w])},this)},o.prototype.setMessages=function(u,d){l=u,d&&d.placeholders&&(c=d.placeholders)},o.prototype.nls=function(u,d,w){l[u]||(s("No message found for the key '"+u+"' in messages with id "+l.$id+", trying to find a translation for the default string '"+d+"'."),l[d]||s("No message found for the default string '"+d+"' in the provided messages. Falling back to the default English message."));var b=l[u]||l[d]||d;return w&&(c==="dollarSigns"&&(b=b.replace(/\$(\$|[\d]+)/g,function(E,$){return $=="$"?"$":w[$]})),c==="curlyBrackets"&&(b=b.replace(/\{([^\}]+)\}/g,function(E,$){return w[$]}))),b},o}();a.prototype.warn=s,a.prototype.reportError=x,m.implement(a.prototype,y),r.AppConfig=a}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(e,r,v){v.exports=`.ace-tm .ace_gutter {
|
9
|
+
background: #f0f0f0;
|
10
|
+
color: #333;
|
11
|
+
}
|
12
|
+
|
13
|
+
.ace-tm .ace_print-margin {
|
14
|
+
width: 1px;
|
15
|
+
background: #e8e8e8;
|
16
|
+
}
|
17
|
+
|
18
|
+
.ace-tm .ace_fold {
|
19
|
+
background-color: #6B72E6;
|
20
|
+
}
|
21
|
+
|
22
|
+
.ace-tm {
|
23
|
+
background-color: #FFFFFF;
|
24
|
+
color: black;
|
25
|
+
}
|
26
|
+
|
27
|
+
.ace-tm .ace_cursor {
|
28
|
+
color: black;
|
29
|
+
}
|
30
|
+
|
31
|
+
.ace-tm .ace_invisible {
|
32
|
+
color: rgb(191, 191, 191);
|
33
|
+
}
|
34
|
+
|
35
|
+
.ace-tm .ace_storage,
|
36
|
+
.ace-tm .ace_keyword {
|
37
|
+
color: blue;
|
38
|
+
}
|
39
|
+
|
40
|
+
.ace-tm .ace_constant {
|
41
|
+
color: rgb(197, 6, 11);
|
42
|
+
}
|
43
|
+
|
44
|
+
.ace-tm .ace_constant.ace_buildin {
|
45
|
+
color: rgb(88, 72, 246);
|
46
|
+
}
|
47
|
+
|
48
|
+
.ace-tm .ace_constant.ace_language {
|
49
|
+
color: rgb(88, 92, 246);
|
50
|
+
}
|
51
|
+
|
52
|
+
.ace-tm .ace_constant.ace_library {
|
53
|
+
color: rgb(6, 150, 14);
|
54
|
+
}
|
55
|
+
|
56
|
+
.ace-tm .ace_invalid {
|
57
|
+
background-color: rgba(255, 0, 0, 0.1);
|
58
|
+
color: red;
|
59
|
+
}
|
60
|
+
|
61
|
+
.ace-tm .ace_support.ace_function {
|
62
|
+
color: rgb(60, 76, 114);
|
63
|
+
}
|
64
|
+
|
65
|
+
.ace-tm .ace_support.ace_constant {
|
66
|
+
color: rgb(6, 150, 14);
|
67
|
+
}
|
68
|
+
|
69
|
+
.ace-tm .ace_support.ace_type,
|
70
|
+
.ace-tm .ace_support.ace_class {
|
71
|
+
color: rgb(109, 121, 222);
|
72
|
+
}
|
73
|
+
|
74
|
+
.ace-tm .ace_keyword.ace_operator {
|
75
|
+
color: rgb(104, 118, 135);
|
76
|
+
}
|
77
|
+
|
78
|
+
.ace-tm .ace_string {
|
79
|
+
color: rgb(3, 106, 7);
|
80
|
+
}
|
81
|
+
|
82
|
+
.ace-tm .ace_comment {
|
83
|
+
color: rgb(76, 136, 107);
|
84
|
+
}
|
85
|
+
|
86
|
+
.ace-tm .ace_comment.ace_doc {
|
87
|
+
color: rgb(0, 102, 255);
|
88
|
+
}
|
89
|
+
|
90
|
+
.ace-tm .ace_comment.ace_doc.ace_tag {
|
91
|
+
color: rgb(128, 159, 191);
|
92
|
+
}
|
93
|
+
|
94
|
+
.ace-tm .ace_constant.ace_numeric {
|
95
|
+
color: rgb(0, 0, 205);
|
96
|
+
}
|
97
|
+
|
98
|
+
.ace-tm .ace_variable {
|
99
|
+
color: rgb(49, 132, 149);
|
100
|
+
}
|
101
|
+
|
102
|
+
.ace-tm .ace_xml-pe {
|
103
|
+
color: rgb(104, 104, 91);
|
104
|
+
}
|
105
|
+
|
106
|
+
.ace-tm .ace_entity.ace_name.ace_function {
|
107
|
+
color: #0000A2;
|
108
|
+
}
|
109
|
+
|
110
|
+
|
111
|
+
.ace-tm .ace_heading {
|
112
|
+
color: rgb(12, 7, 255);
|
113
|
+
}
|
114
|
+
|
115
|
+
.ace-tm .ace_list {
|
116
|
+
color:rgb(185, 6, 144);
|
117
|
+
}
|
118
|
+
|
119
|
+
.ace-tm .ace_meta.ace_tag {
|
120
|
+
color:rgb(0, 22, 142);
|
121
|
+
}
|
122
|
+
|
123
|
+
.ace-tm .ace_string.ace_regex {
|
124
|
+
color: rgb(255, 0, 0)
|
125
|
+
}
|
126
|
+
|
127
|
+
.ace-tm .ace_marker-layer .ace_selection {
|
128
|
+
background: rgb(181, 213, 255);
|
129
|
+
}
|
130
|
+
.ace-tm.ace_multiselect .ace_selection.ace_start {
|
131
|
+
box-shadow: 0 0 3px 0px white;
|
132
|
+
}
|
133
|
+
.ace-tm .ace_marker-layer .ace_step {
|
134
|
+
background: rgb(252, 255, 0);
|
135
|
+
}
|
136
|
+
|
137
|
+
.ace-tm .ace_marker-layer .ace_stack {
|
138
|
+
background: rgb(164, 229, 101);
|
139
|
+
}
|
140
|
+
|
141
|
+
.ace-tm .ace_marker-layer .ace_bracket {
|
142
|
+
margin: -1px 0 0 -1px;
|
143
|
+
border: 1px solid rgb(192, 192, 192);
|
144
|
+
}
|
145
|
+
|
146
|
+
.ace-tm .ace_marker-layer .ace_active-line {
|
147
|
+
background: rgba(0, 0, 0, 0.07);
|
148
|
+
}
|
149
|
+
|
150
|
+
.ace-tm .ace_gutter-active-line {
|
151
|
+
background-color : #dcdcdc;
|
152
|
+
}
|
153
|
+
|
154
|
+
.ace-tm .ace_marker-layer .ace_selected-word {
|
155
|
+
background: rgb(250, 250, 255);
|
156
|
+
border: 1px solid rgb(200, 200, 250);
|
157
|
+
}
|
158
|
+
|
159
|
+
.ace-tm .ace_indent-guide {
|
160
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
|
161
|
+
}
|
162
|
+
|
163
|
+
.ace-tm .ace_indent-guide-active {
|
164
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
165
|
+
}
|
166
|
+
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(e,r,v){r.isDark=!1,r.cssClass="ace-tm",r.cssText=e("./textmate-css"),r.$id="ace/theme/textmate";var m=e("../lib/dom");m.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,v){"no use strict";var m=e("./lib/lang"),y=e("./lib/net"),x=e("./lib/dom"),h=e("./lib/app_config").AppConfig;v.exports=r=new h;var g={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(a){if(!g.hasOwnProperty(a))throw new Error("Unknown config key: "+a);return g[a]},r.set=function(a,o){if(g.hasOwnProperty(a))g[a]=o;else if(this.setDefaultValue("",a,o)==!1)throw new Error("Unknown config key: "+a);a=="useStrictCSP"&&x.useStrictCSP(o)},r.all=function(){return m.copyObject(g)},r.$modes={},r.moduleUrl=function(a,o){if(g.$moduleUrls[a])return g.$moduleUrls[a];var u=a.split("/");o=o||u[u.length-2]||"";var d=o=="snippets"?"/":"-",w=u[u.length-1];if(o=="worker"&&d=="-"){var b=new RegExp("^"+o+"[\\-_]|[\\-_]"+o+"$","g");w=w.replace(b,"")}(!w||w==o)&&u.length>1&&(w=u[u.length-2]);var E=g[o+"Path"];return E==null?E=g.basePath:d=="/"&&(o=d=""),E&&E.slice(-1)!="/"&&(E+="/"),E+o+d+w+this.get("suffix")},r.setModuleUrl=function(a,o){return g.$moduleUrls[a]=o};var s=function(a,o){if(a==="ace/theme/textmate"||a==="./theme/textmate")return o(null,e("./theme/textmate"));if(l)return l(a,o);console.error("loader is not configured")},l;r.setLoader=function(a){l=a},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(a,o){var u;if(Array.isArray(a))var d=a[0],w=a[1];else if(typeof a=="string")var w=a;var b=function(E){if(E&&!r.$loading[w])return o&&o(E);if(r.$loading[w]||(r.$loading[w]=[]),r.$loading[w].push(o),!(r.$loading[w].length>1)){var $=function(){s(w,function(_,C){C&&(r.$loaded[w]=C),r._emit("load.module",{name:w,module:C});var R=r.$loading[w];r.$loading[w]=null,R.forEach(function(L){L&&L(C)})})};if(!r.get("packaged"))return $();y.loadScript(r.moduleUrl(w,d),$),c()}};if(r.dynamicModules[w])r.dynamicModules[w]().then(function(E){E.default?b(E.default):b(E)});else{try{u=this.$require(w)}catch{}b(u||r.$loaded[w])}},r.$require=function(a){if(typeof v.require=="function"){var o="require";return v[o](a)}},r.setModuleLoader=function(a,o){r.dynamicModules[a]=o};var c=function(){!g.basePath&&!g.workerPath&&!g.modePath&&!g.themePath&&!Object.keys(g.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};r.version="1.39.1"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,r,v){e("./lib/fixoldbrowsers");var m=e("./config");m.setLoader(function(g,s){e([g],function(l){s(null,l)})});var y=function(){return this||typeof window<"u"&&window}();v.exports=function(g){m.init=x,m.$require=e,g.require=e},x(!0);function x(g){if(!(!y||!y.document)){m.set("packaged",g||e.packaged||v.packaged||y.define&&(void 0).packaged);var s={},l="",c=document.currentScript||document._currentScript,a=c&&c.ownerDocument||document;c&&c.src&&(l=c.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var o=a.getElementsByTagName("script"),u=0;u<o.length;u++){var d=o[u],w=d.src||d.getAttribute("src");if(w){for(var b=d.attributes,E=0,$=b.length;E<$;E++){var _=b[E];_.name.indexOf("data-ace-")===0&&(s[h(_.name.replace(/^data-ace-/,""))]=_.value)}var C=w.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);C&&(l=C[1])}}l&&(s.base=s.base||l,s.packaged=!0),s.basePath=s.base,s.workerPath=s.workerPath||s.base,s.modePath=s.modePath||s.base,s.themePath=s.themePath||s.base,delete s.base;for(var R in s)typeof s[R]<"u"&&m.set(R,s[R])}}function h(g){return g.replace(/-(.)/g,function(s,l){return l.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(e,r,v){var m=function(){function y(x,h,g,s){this.start={row:x,column:h},this.end={row:g,column:s}}return y.prototype.isEqual=function(x){return this.start.row===x.start.row&&this.end.row===x.end.row&&this.start.column===x.start.column&&this.end.column===x.end.column},y.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},y.prototype.contains=function(x,h){return this.compare(x,h)==0},y.prototype.compareRange=function(x){var h,g=x.end,s=x.start;return h=this.compare(g.row,g.column),h==1?(h=this.compare(s.row,s.column),h==1?2:h==0?1:0):h==-1?-2:(h=this.compare(s.row,s.column),h==-1?-1:h==1?42:0)},y.prototype.comparePoint=function(x){return this.compare(x.row,x.column)},y.prototype.containsRange=function(x){return this.comparePoint(x.start)==0&&this.comparePoint(x.end)==0},y.prototype.intersects=function(x){var h=this.compareRange(x);return h==-1||h==0||h==1},y.prototype.isEnd=function(x,h){return this.end.row==x&&this.end.column==h},y.prototype.isStart=function(x,h){return this.start.row==x&&this.start.column==h},y.prototype.setStart=function(x,h){typeof x=="object"?(this.start.column=x.column,this.start.row=x.row):(this.start.row=x,this.start.column=h)},y.prototype.setEnd=function(x,h){typeof x=="object"?(this.end.column=x.column,this.end.row=x.row):(this.end.row=x,this.end.column=h)},y.prototype.inside=function(x,h){return this.compare(x,h)==0?!(this.isEnd(x,h)||this.isStart(x,h)):!1},y.prototype.insideStart=function(x,h){return this.compare(x,h)==0?!this.isEnd(x,h):!1},y.prototype.insideEnd=function(x,h){return this.compare(x,h)==0?!this.isStart(x,h):!1},y.prototype.compare=function(x,h){return!this.isMultiLine()&&x===this.start.row?h<this.start.column?-1:h>this.end.column?1:0:x<this.start.row?-1:x>this.end.row?1:this.start.row===x?h>=this.start.column?0:-1:this.end.row===x?h<=this.end.column?0:1:0},y.prototype.compareStart=function(x,h){return this.start.row==x&&this.start.column==h?-1:this.compare(x,h)},y.prototype.compareEnd=function(x,h){return this.end.row==x&&this.end.column==h?1:this.compare(x,h)},y.prototype.compareInside=function(x,h){return this.end.row==x&&this.end.column==h?1:this.start.row==x&&this.start.column==h?-1:this.compare(x,h)},y.prototype.clipRows=function(x,h){if(this.end.row>h)var g={row:h+1,column:0};else if(this.end.row<x)var g={row:x,column:0};if(this.start.row>h)var s={row:h+1,column:0};else if(this.start.row<x)var s={row:x,column:0};return y.fromPoints(s||this.start,g||this.end)},y.prototype.extend=function(x,h){var g=this.compare(x,h);if(g==0)return this;if(g==-1)var s={row:x,column:h};else var l={row:x,column:h};return y.fromPoints(s||this.start,l||this.end)},y.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},y.prototype.isMultiLine=function(){return this.start.row!==this.end.row},y.prototype.clone=function(){return y.fromPoints(this.start,this.end)},y.prototype.collapseRows=function(){return this.end.column==0?new y(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new y(this.start.row,0,this.end.row,0)},y.prototype.toScreenRange=function(x){var h=x.documentToScreenPosition(this.start),g=x.documentToScreenPosition(this.end);return new y(h.row,h.column,g.row,g.column)},y.prototype.moveBy=function(x,h){this.start.row+=x,this.start.column+=h,this.end.row+=x,this.end.column+=h},y}();m.fromPoints=function(y,x){return new m(y.row,y.column,x.row,x.column)},m.comparePoints=function(y,x){return y.row-x.row||y.column-x.column},r.Range=m}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,r,v){for(var m=e("./oop"),y={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:"*"}},x={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},h=0;h<10;h++)x["Digit"+h]=48+h,x["Numpad"+h]=96+h,y.PRINTABLE_KEYS[48+h]=""+h,y.FUNCTION_KEYS[96+h]="Numpad"+h;for(var h=65;h<91;h++){var g=String.fromCharCode(h+32);x["Key"+g.toUpperCase()]=h,y.PRINTABLE_KEYS[h]=g}for(var h=1;h<13;h++)x["F"+h]=111+h,y.FUNCTION_KEYS[111+h]="F"+h;var s={Shift:16,Control:17,Alt:18,Meta:224};for(var l in s)x[l]=x[l+"Left"]=x[l+"Right"]=s[l];r.$codeToKeyCode=x,y.PRINTABLE_KEYS[173]="-";for(var c in y.FUNCTION_KEYS){var a=y.FUNCTION_KEYS[c].toLowerCase();y[a]=parseInt(c,10)}for(var c in y.PRINTABLE_KEYS){var a=y.PRINTABLE_KEYS[c].toLowerCase();y[a]=parseInt(c,10)}m.mixin(y,y.MODIFIER_KEYS),m.mixin(y,y.PRINTABLE_KEYS),m.mixin(y,y.FUNCTION_KEYS),y.enter=y.return,y.escape=y.esc,y.del=y.delete,function(){for(var o=["cmd","ctrl","alt","shift"],u=Math.pow(2,o.length);u--;)y.KEY_MODS[u]=o.filter(function(d){return u&y.KEY_MODS[d]}).join("-")+"-"}(),y.KEY_MODS[0]="",y.KEY_MODS[-1]="input-",m.mixin(r,y),r.default=r,r.keyCodeToString=function(o){var u=y[o];return typeof u!="string"&&(u=String.fromCharCode(o)),u.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,v){var m=e("./keys"),y=e("./useragent"),x=null,h=0,g;function s(){g=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return g={passive:!1},!0}})}catch{}}function l(){return g==null&&s(),g}function c(E,$,_){this.elem=E,this.type=$,this.callback=_}c.prototype.destroy=function(){o(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var a=r.addListener=function(E,$,_,C){E.addEventListener($,_,l()),C&&C.$toDestroy.push(new c(E,$,_))},o=r.removeListener=function(E,$,_){E.removeEventListener($,_,l())};r.stopEvent=function(E){return r.stopPropagation(E),r.preventDefault(E),!1},r.stopPropagation=function(E){E.stopPropagation&&E.stopPropagation()},r.preventDefault=function(E){E.preventDefault&&E.preventDefault()},r.getButton=function(E){return E.type=="dblclick"?0:E.type=="contextmenu"||y.isMac&&E.ctrlKey&&!E.altKey&&!E.shiftKey?2:E.button},r.capture=function(E,$,_){var C=E&&E.ownerDocument||document;function R(L){$&&$(L),_&&_(L),o(C,"mousemove",$),o(C,"mouseup",R),o(C,"dragstart",R)}return a(C,"mousemove",$),a(C,"mouseup",R),a(C,"dragstart",R),R},r.addMouseWheelListener=function(E,$,_){a(E,"wheel",function(C){var R=.15,L=C.deltaX||0,F=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=L*R,C.wheelY=F*R;break;case C.DOM_DELTA_LINE:var I=15;C.wheelX=L*I,C.wheelY=F*I;break;case C.DOM_DELTA_PAGE:var H=150;C.wheelX=L*H,C.wheelY=F*H;break}$(C)},_)},r.addMultiMouseDownListener=function(E,$,_,C,R){var L=0,F,I,H,P={2:"dblclick",3:"tripleclick",4:"quadclick"};function O(S){if(r.getButton(S)!==0?L=0:S.detail>1?(L++,L>4&&(L=1)):L=1,y.isIE){var A=Math.abs(S.clientX-F)>5||Math.abs(S.clientY-I)>5;(!H||A)&&(L=1),H&&clearTimeout(H),H=setTimeout(function(){H=null},$[L-1]||600),L==1&&(F=S.clientX,I=S.clientY)}if(S._clicks=L,_[C]("mousedown",S),L>4)L=0;else if(L>1)return _[C](P[L],S)}Array.isArray(E)||(E=[E]),E.forEach(function(S){a(S,"mousedown",O,R)})};function u(E){return 0|(E.ctrlKey?1:0)|(E.altKey?2:0)|(E.shiftKey?4:0)|(E.metaKey?8:0)}r.getModifierString=function(E){return m.KEY_MODS[u(E)]};function d(E,$,_){var C=u($);if(!_&&$.code&&(_=m.$codeToKeyCode[$.code]||_),!y.isMac&&x){if($.getModifierState&&($.getModifierState("OS")||$.getModifierState("Win"))&&(C|=8),x.altGr)if((3&C)!=3)x.altGr=0;else return;if(_===18||_===17){var R=$.location;if(_===17&&R===1)x[_]==1&&(h=$.timeStamp);else if(_===18&&C===3&&R===2){var L=$.timeStamp-h;L<50&&(x.altGr=!0)}}}if(_ in m.MODIFIER_KEYS&&(_=-1),!(!C&&_===13&&$.location===3&&(E($,C,-_),$.defaultPrevented))){if(y.isChromeOS&&C&8){if(E($,C,_),$.defaultPrevented)return;C&=-9}return!C&&!(_ in m.FUNCTION_KEYS)&&!(_ in m.PRINTABLE_KEYS)?!1:E($,C,_)}}r.addCommandKeyListener=function(E,$,_){var C=null;a(E,"keydown",function(R){x[R.keyCode]=(x[R.keyCode]||0)+1;var L=d($,R,R.keyCode);return C=R.defaultPrevented,L},_),a(E,"keypress",function(R){C&&(R.ctrlKey||R.altKey||R.shiftKey||R.metaKey)&&(r.stopEvent(R),C=null)},_),a(E,"keyup",function(R){x[R.keyCode]=null},_),x||(w(),a(window,"focus",w))};function w(){x=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!y.isOldIE){var b=1;r.nextTick=function(E,$){$=$||window;var _="zero-timeout-message-"+b++,C=function(R){R.data==_&&(r.stopPropagation(R),o($,"message",C),E())};a($,"message",C),$.postMessage(_,"*")}}r.$idleBlocked=!1,r.onIdle=function(E,$){return setTimeout(function _(){r.$idleBlocked?setTimeout(_,100):E()},$)},r.$idleBlockId=null,r.blockIdle=function(E){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},E||100)},r.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),r.nextFrame?r.nextFrame=r.nextFrame.bind(window):r.nextFrame=function(E){setTimeout(E,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,r,v){var m;v.exports={lineMode:!1,pasteCancelled:function(){return m&&m>Date.now()-50?!0:m=!1},cancel:function(){m=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,v){var m=e("../lib/event"),y=e("../config").nls,x=e("../lib/useragent"),h=e("../lib/dom"),g=e("../lib/lang"),s=e("../clipboard"),l=x.isChrome<18,c=x.isIE,a=x.isChrome>63,o=400,u=e("../lib/keys"),d=u.KEY_MODS,w=x.isIOS,b=w?/\s/:/\n/,E=x.isMobile,$;$=function(_,C){var R=h.createElement("textarea");R.className="ace_text-input",R.setAttribute("wrap","off"),R.setAttribute("autocorrect","off"),R.setAttribute("autocapitalize","off"),R.setAttribute("spellcheck","false"),R.style.opacity="0",_.insertBefore(R,_.firstChild);var L=!1,F=!1,I=!1,H=!1,P="";E||(R.style.fontSize="1px");var O=!1,S=!1,A="",N=0,B=0,U=0,K=Number.MAX_SAFE_INTEGER,Z=Number.MIN_SAFE_INTEGER,te=0;try{var he=document.activeElement===R}catch{}this.setNumberOfExtraLines=function(ke){if(K=Number.MAX_SAFE_INTEGER,Z=Number.MIN_SAFE_INTEGER,ke<0){te=0;return}te=ke},this.setAriaLabel=function(){var ke="";if(C.$textInputAriaLabel&&(ke+="".concat(C.$textInputAriaLabel,", ")),C.session){var ze=C.session.selection.cursor.row;ke+=y("text-input.aria-label","Cursor at row $0",[ze+1])}R.setAttribute("aria-label",ke)},this.setAriaOptions=function(ke){ke.activeDescendant?(R.setAttribute("aria-haspopup","true"),R.setAttribute("aria-autocomplete",ke.inline?"both":"list"),R.setAttribute("aria-activedescendant",ke.activeDescendant)):(R.setAttribute("aria-haspopup","false"),R.setAttribute("aria-autocomplete","both"),R.removeAttribute("aria-activedescendant")),ke.role&&R.setAttribute("role",ke.role),ke.setLabel&&(R.setAttribute("aria-roledescription",y("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),m.addListener(R,"blur",function(ke){S||(C.onBlur(ke),he=!1)},C),m.addListener(R,"focus",function(ke){if(!S){if(he=!0,x.isEdge)try{if(!document.hasFocus())return}catch{}C.onFocus(ke),x.isEdge?setTimeout(ae):ae()}},C),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:C.renderer.enableKeyboardAccessibility}),P||a||this.$focusScroll=="browser")return R.focus({preventScroll:!0});var ke=R.style.top;R.style.position="fixed",R.style.top="0px";try{var ze=R.getBoundingClientRect().top!=0}catch{return}var Ye=[];if(ze)for(var dt=R.parentElement;dt&&dt.nodeType==1;)Ye.push(dt),dt.setAttribute("ace_nocontext","true"),!dt.parentElement&&dt.getRootNode?dt=dt.getRootNode().host:dt=dt.parentElement;R.focus({preventScroll:!0}),ze&&Ye.forEach(function(Ct){Ct.removeAttribute("ace_nocontext")}),setTimeout(function(){R.style.position="",R.style.top=="0px"&&(R.style.top=ke)},0)},this.blur=function(){R.blur()},this.isFocused=function(){return he},C.on("beforeEndOperation",function(){var ke=C.curOp,ze=ke&&ke.command&&ke.command.name;if(ze!="insertstring"){var Ye=ze&&(ke.docChanged||ke.selectionChanged);I&&Ye&&(A=R.value="",qt()),ae()}}),C.on("changeSelection",this.setAriaLabel);var ne=function(ke,ze){for(var Ye=ze,dt=1;dt<=ke-K&&dt<2*te+1;dt++)Ye+=C.session.getLine(ke-dt).length+1;return Ye},ae=w?function(ke){if(!(!he||L&&!ke||H)){ke||(ke="");var ze=`
|
167
|
+
ab`+ke+`cde fg
|
168
|
+
`;ze!=R.value&&(R.value=A=ze);var Ye=4,dt=4+(ke.length||(C.selection.isEmpty()?0:1));(N!=Ye||B!=dt)&&R.setSelectionRange(Ye,dt),N=Ye,B=dt}}:function(){if(!(I||H)&&!(!he&&!Ae)){I=!0;var ke=0,ze=0,Ye="";if(C.session){var dt=C.selection,Ct=dt.getRange(),xt=dt.cursor.row;xt===Z+1?(K=Z+1,Z=K+2*te):xt===K-1?(Z=K-1,K=Z-2*te):(xt<K-1||xt>Z+1)&&(K=xt>te?xt-te:0,Z=xt>te?xt+te:2*te);for(var Et=[],It=K;It<=Z;It++)Et.push(C.session.getLine(It));if(Ye=Et.join(`
|
169
|
+
`),ke=ne(Ct.start.row,Ct.start.column),ze=ne(Ct.end.row,Ct.end.column),Ct.start.row<K){var ct=C.session.getLine(K-1);ke=Ct.start.row<K-1?0:ke,ze+=ct.length+1,Ye=ct+`
|
170
|
+
`+Ye}else if(Ct.end.row>Z){var yt=C.session.getLine(Z+1);ze=Ct.end.row>Z+1?yt.length:Ct.end.column,ze+=Ye.length+1,Ye=Ye+`
|
171
|
+
`+yt}else E&&xt>0&&(Ye=`
|
172
|
+
`+Ye,ze+=1,ke+=1);Ye.length>o&&(ke<o&&ze<o?Ye=Ye.slice(0,o):(Ye=`
|
173
|
+
`,ke==ze?ke=ze=0:(ke=0,ze=1)));var wn=Ye+`
|
174
|
+
|
175
|
+
`;wn!=A&&(R.value=A=wn,N=B=wn.length)}if(Ae&&(N=R.selectionStart,B=R.selectionEnd),B!=ze||N!=ke||R.selectionEnd!=B)try{R.setSelectionRange(ke,ze),N=ke,B=ze}catch{}I=!1}};this.resetSelection=ae,he&&C.onFocus();var ce=function(ke){return ke.selectionStart===0&&ke.selectionEnd>=A.length&&ke.value===A&&A&&ke.selectionEnd!==B},ue=function(ke){I||(L?L=!1:ce(R)?(C.selectAll(),ae()):E&&R.selectionStart!=N&&ae())},ye=null;this.setInputHandler=function(ke){ye=ke},this.getInputHandler=function(){return ye};var Ae=!1,$e=function(ke,ze){if(Ae&&(Ae=!1),F)return ae(),ke&&C.onPaste(ke),F=!1,"";for(var Ye=R.selectionStart,dt=R.selectionEnd,Ct=N,xt=A.length-B,Et=ke,It=ke.length-Ye,ct=ke.length-dt,yt=0;Ct>0&&A[yt]==ke[yt];)yt++,Ct--;for(Et=Et.slice(yt),yt=1;xt>0&&A.length-yt>N-1&&A[A.length-yt]==ke[ke.length-yt];)yt++,xt--;It-=yt-1,ct-=yt-1;var wn=Et.length-yt+1;if(wn<0&&(Ct=-wn,wn=0),Et=Et.slice(0,wn),!ze&&!Et&&!It&&!Ct&&!xt&&!ct)return"";H=!0;var br=!1;return x.isAndroid&&Et==". "&&(Et=" ",br=!0),Et&&!Ct&&!xt&&!It&&!ct||O?C.onTextInput(Et):C.onTextInput(Et,{extendLeft:Ct,extendRight:xt,restoreStart:It,restoreEnd:ct}),H=!1,A=ke,N=Ye,B=dt,U=ct,br?`
|
176
|
+
`:Et},Ie=function(ke){if(I)return hn();if(ke&&ke.inputType){if(ke.inputType=="historyUndo")return C.execCommand("undo");if(ke.inputType=="historyRedo")return C.execCommand("redo")}var ze=R.value,Ye=$e(ze,!0);(ze.length>o+100||b.test(Ye)||E&&N<1&&N==B)&&ae()},Ge=function(ke,ze,Ye){var dt=ke.clipboardData||window.clipboardData;if(!(!dt||l)){var Ct=c||Ye?"Text":"text/plain";try{return ze?dt.setData(Ct,ze)!==!1:dt.getData(Ct)}catch(xt){if(!Ye)return Ge(xt,ze,!0)}}},qe=function(ke,ze){var Ye=C.getCopyText();if(!Ye)return m.preventDefault(ke);Ge(ke,Ye)?(w&&(ae(Ye),L=Ye,setTimeout(function(){L=!1},10)),ze?C.onCut():C.onCopy(),m.preventDefault(ke)):(L=!0,R.value=Ye,R.select(),setTimeout(function(){L=!1,ae(),ze?C.onCut():C.onCopy()}))},ut=function(ke){qe(ke,!0)},tt=function(ke){qe(ke,!1)},ht=function(ke){var ze=Ge(ke);s.pasteCancelled()||(typeof ze=="string"?(ze&&C.onPaste(ze,ke),x.isIE&&setTimeout(ae),m.preventDefault(ke)):(R.value="",F=!0))};m.addCommandKeyListener(R,function(ke,ze,Ye){if(!I)return C.onCommandKey(ke,ze,Ye)},C),m.addListener(R,"select",ue,C),m.addListener(R,"input",Ie,C),m.addListener(R,"cut",ut,C),m.addListener(R,"copy",tt,C),m.addListener(R,"paste",ht,C),(!("oncut"in R)||!("oncopy"in R)||!("onpaste"in R))&&m.addListener(_,"keydown",function(ke){if(!(x.isMac&&!ke.metaKey||!ke.ctrlKey))switch(ke.keyCode){case 67:tt(ke);break;case 86:ht(ke);break;case 88:ut(ke);break}},C);var Zt=function(ke){if(!(I||!C.onCompositionStart||C.$readOnly)&&(I={},!O)){ke.data&&(I.useTextareaForIME=!1),setTimeout(hn,0),C._signal("compositionStart"),C.on("mousedown",dr);var ze=C.getSelectionRange();ze.end.row=ze.start.row,ze.end.column=ze.start.column,I.markerRange=ze,I.selectionStart=N,C.onCompositionStart(I),I.useTextareaForIME?(A=R.value="",N=0,B=0):(R.msGetInputContext&&(I.context=R.msGetInputContext()),R.getInputContext&&(I.context=R.getInputContext()))}},hn=function(){if(!(!I||!C.onCompositionUpdate||C.$readOnly)){if(O)return dr();if(I.useTextareaForIME)C.onCompositionUpdate(R.value);else{var ke=R.value;$e(ke),I.markerRange&&(I.context&&(I.markerRange.start.column=I.selectionStart=I.context.compositionStartOffset),I.markerRange.end.column=I.markerRange.start.column+B-I.selectionStart+U)}}},qt=function(ke){!C.onCompositionEnd||C.$readOnly||(I=!1,C.onCompositionEnd(),C.off("mousedown",dr),ke&&Ie())};function dr(){S=!0,R.blur(),R.focus(),S=!1}var dn=g.delayedCall(hn,50).schedule.bind(null,null);function Mn(ke){ke.keyCode==27&&R.value.length<R.selectionStart&&(I||(A=R.value),N=B=-1,ae()),dn()}m.addListener(R,"compositionstart",Zt,C),m.addListener(R,"compositionupdate",hn,C),m.addListener(R,"keyup",Mn,C),m.addListener(R,"keydown",dn,C),m.addListener(R,"compositionend",qt,C),this.getElement=function(){return R},this.setCommandMode=function(ke){O=ke,R.readOnly=!1},this.setReadOnly=function(ke){O||(R.readOnly=ke)},this.setCopyWithEmptySelection=function(ke){},this.onContextMenu=function(ke){Ae=!0,ae(),C._emit("nativecontextmenu",{target:C,domEvent:ke}),this.moveToMouse(ke,!0)},this.moveToMouse=function(ke,ze){P||(P=R.style.cssText),R.style.cssText=(ze?"z-index:100000;":"")+(x.isIE?"opacity:0.1;":"")+"text-indent: -"+(N+B)*C.renderer.characterWidth*.5+"px;";var Ye=C.container.getBoundingClientRect(),dt=h.computedStyle(C.container),Ct=Ye.top+(parseInt(dt.borderTopWidth)||0),xt=Ye.left+(parseInt(dt.borderLeftWidth)||0),Et=Ye.bottom-Ct-R.clientHeight-2,It=function(ct){h.translate(R,ct.clientX-xt-2,Math.min(ct.clientY-Ct-2,Et))};It(ke),ke.type=="mousedown"&&(C.renderer.$isMousePressed=!0,clearTimeout(In),x.isWin&&m.capture(C.container,It,Gn))},this.onContextMenuClose=Gn;var In;function Gn(){clearTimeout(In),In=setTimeout(function(){P&&(R.style.cssText=P,P=""),C.renderer.$isMousePressed=!1,C.renderer.$keepTextAreaAtCursor&&C.renderer.$moveTextAreaToCursor()},0)}var vt=function(ke){C.textInput.onContextMenu(ke),Gn()};m.addListener(R,"mouseup",vt,C),m.addListener(R,"mousedown",function(ke){ke.preventDefault(),Gn()},C),m.addListener(C.renderer.scroller,"contextmenu",vt,C),m.addListener(R,"contextmenu",vt,C),w&&He(_,C,R);function He(ke,ze,Ye){var dt=null,Ct=!1;Ye.addEventListener("keydown",function(Et){dt&&clearTimeout(dt),Ct=!0},!0),Ye.addEventListener("keyup",function(Et){dt=setTimeout(function(){Ct=!1},100)},!0);var xt=function(Et){if(document.activeElement===Ye&&!(Ct||I||ze.$mouseHandler.isMousePressed)&&!L){var It=Ye.selectionStart,ct=Ye.selectionEnd,yt=null,wn=0;if(It==0?yt=u.up:It==1?yt=u.home:ct>B&&A[ct]==`
|
177
|
+
`?yt=u.end:It<N&&A[It-1]==" "?(yt=u.left,wn=d.option):It<N||It==N&&B!=N&&It==ct?yt=u.left:ct>B&&A.slice(0,ct).split(`
|
178
|
+
`).length>2?yt=u.down:ct>B&&A[ct-1]==" "?(yt=u.right,wn=d.option):(ct>B||ct==B&&B!=N&&It==ct)&&(yt=u.right),It!==ct&&(wn|=d.shift),yt){var br=ze.onCommandKey({},wn,yt);if(!br&&ze.commands){yt=u.keyCodeToString(yt);var Wr=ze.commands.findKeyCommand(wn,yt);Wr&&ze.execCommand(Wr)}N=It,B=ct,ae("")}}};document.addEventListener("selectionchange",xt),ze.on("destroy",function(){document.removeEventListener("selectionchange",xt)})}this.destroy=function(){R.parentElement&&R.parentElement.removeChild(R)}},r.TextInput=$,r.$setUserAgentForTests=function(_,C){E=_,w=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,r,v){var m=e("../lib/useragent"),y=0,x=550,h=function(){function l(c){c.$clickSelection=null;var a=c.editor;a.setDefaultHandler("mousedown",this.onMouseDown.bind(c)),a.setDefaultHandler("dblclick",this.onDoubleClick.bind(c)),a.setDefaultHandler("tripleclick",this.onTripleClick.bind(c)),a.setDefaultHandler("quadclick",this.onQuadClick.bind(c)),a.setDefaultHandler("mousewheel",this.onMouseWheel.bind(c));var o=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];o.forEach(function(u){c[u]=this[u]},this),c.selectByLines=this.extendSelectionBy.bind(c,"getLineRange"),c.selectByWords=this.extendSelectionBy.bind(c,"getWordRange")}return l.prototype.onMouseDown=function(c){var a=c.inSelection(),o=c.getDocumentPosition();this.mousedownEvent=c;var u=this.editor,d=c.getButton();if(d!==0){var w=u.getSelectionRange(),b=w.isEmpty();(b||d==1)&&u.selection.moveToPosition(o),d==2&&(u.textInput.onContextMenu(c.domEvent),m.isMozilla||c.preventDefault());return}if(this.mousedownEvent.time=Date.now(),a&&!u.isFocused()&&(u.focus(),this.$focusTimeout&&!this.$clickSelection&&!u.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(c);return}return this.captureMouse(c),this.startSelect(o,c.domEvent._clicks>1),c.preventDefault()},l.prototype.startSelect=function(c,a){c=c||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(c):a||o.selection.moveToPosition(c),a||this.select(),o.setStyle("ace_selecting"),this.setState("select"))},l.prototype.select=function(){var c,a=this.editor,o=a.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var u=this.$clickSelection.comparePoint(o);if(u==-1)c=this.$clickSelection.end;else if(u==1)c=this.$clickSelection.start;else{var d=s(this.$clickSelection,o);o=d.cursor,c=d.anchor}a.selection.setSelectionAnchor(c.row,c.column)}a.selection.selectToPosition(o),a.renderer.scrollCursorIntoView()},l.prototype.extendSelectionBy=function(c){var a,o=this.editor,u=o.renderer.screenToTextCoordinates(this.x,this.y),d=o.selection[c](u.row,u.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(d.start),b=this.$clickSelection.comparePoint(d.end);if(w==-1&&b<=0)a=this.$clickSelection.end,(d.end.row!=u.row||d.end.column!=u.column)&&(u=d.start);else if(b==1&&w>=0)a=this.$clickSelection.start,(d.start.row!=u.row||d.start.column!=u.column)&&(u=d.end);else if(w==-1&&b==1)u=d.end,a=d.start;else{var E=s(this.$clickSelection,u);u=E.cursor,a=E.anchor}o.selection.setSelectionAnchor(a.row,a.column)}o.selection.selectToPosition(u),o.renderer.scrollCursorIntoView()},l.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},l.prototype.focusWait=function(){var c=g(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),a=Date.now();(c>y||a-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},l.prototype.onDoubleClick=function(c){var a=c.getDocumentPosition(),o=this.editor,u=o.session,d=u.getBracketRange(a);d?(d.isEmpty()&&(d.start.column--,d.end.column++),this.setState("select")):(d=o.selection.getWordRange(a.row,a.column),this.setState("selectByWords")),this.$clickSelection=d,this.select()},l.prototype.onTripleClick=function(c){var a=c.getDocumentPosition(),o=this.editor;this.setState("selectByLines");var u=o.getSelectionRange();u.isMultiLine()&&u.contains(a.row,a.column)?(this.$clickSelection=o.selection.getLineRange(u.start.row),this.$clickSelection.end=o.selection.getLineRange(u.end.row).end):this.$clickSelection=o.selection.getLineRange(a.row),this.select()},l.prototype.onQuadClick=function(c){var a=this.editor;a.selectAll(),this.$clickSelection=a.getSelectionRange(),this.setState("selectAll")},l.prototype.onMouseWheel=function(c){if(!c.getAccelKey()){c.getShiftKey()&&c.wheelY&&!c.wheelX&&(c.wheelX=c.wheelY,c.wheelY=0);var a=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var o=this.$lastScroll,u=c.domEvent.timeStamp,d=u-o.t,w=d?c.wheelX/d:o.vx,b=d?c.wheelY/d:o.vy;d<x&&(w=(w+o.vx)/2,b=(b+o.vy)/2);var E=Math.abs(w/b),$=!1;if(E>=1&&a.renderer.isScrollableBy(c.wheelX*c.speed,0)&&($=!0),E<=1&&a.renderer.isScrollableBy(0,c.wheelY*c.speed)&&($=!0),$)o.allowed=u;else if(u-o.allowed<x){var _=Math.abs(w)<=1.5*Math.abs(o.vx)&&Math.abs(b)<=1.5*Math.abs(o.vy);_?($=!0,o.allowed=u):o.allowed=0}if(o.t=u,o.vx=w,o.vy=b,$)return a.renderer.scrollBy(c.wheelX*c.speed,c.wheelY*c.speed),c.stop()}},l}();h.prototype.selectEnd=h.prototype.selectByLinesEnd,h.prototype.selectAllEnd=h.prototype.selectByLinesEnd,h.prototype.selectByWordsEnd=h.prototype.selectByLinesEnd,r.DefaultHandlers=h;function g(l,c,a,o){return Math.sqrt(Math.pow(a-l,2)+Math.pow(o-c,2))}function s(l,c){if(l.start.row==l.end.row)var a=2*c.column-l.start.column-l.end.column;else if(l.start.row==l.end.row-1&&!l.start.column&&!l.end.column)var a=c.column-4;else var a=2*c.row-l.start.row-l.end.row;return a<0?{cursor:l.start,anchor:l.end}:{cursor:l.end,anchor:l.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,r,v){r.preventParentScroll=function(m){m.stopPropagation();var y=m.currentTarget,x=y.scrollHeight>y.clientHeight;x||m.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,r,v){var m=this&&this.__extends||function(){var u=function(d,w){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,E){b.__proto__=E}||function(b,E){for(var $ in E)Object.prototype.hasOwnProperty.call(E,$)&&(b[$]=E[$])},u(d,w)};return function(d,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");u(d,w);function b(){this.constructor=d}d.prototype=w===null?Object.create(w):(b.prototype=w.prototype,new b)}}(),y=this&&this.__values||function(u){var d=typeof Symbol=="function"&&Symbol.iterator,w=d&&u[d],b=0;if(w)return w.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&b>=u.length&&(u=void 0),{value:u&&u[b++],done:!u}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")},x=e("./lib/dom");e("./lib/event");var h=e("./range").Range,g=e("./lib/scroll").preventParentScroll,s="ace_tooltip",l=function(){function u(d){this.isOpen=!1,this.$element=null,this.$parentNode=d}return u.prototype.$init=function(){return this.$element=x.createElement("div"),this.$element.className=s,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},u.prototype.getElement=function(){return this.$element||this.$init()},u.prototype.setText=function(d){this.getElement().textContent=d},u.prototype.setHtml=function(d){this.getElement().innerHTML=d},u.prototype.setPosition=function(d,w){this.getElement().style.left=d+"px",this.getElement().style.top=w+"px"},u.prototype.setClassName=function(d){x.addCssClass(this.getElement(),d)},u.prototype.setTheme=function(d){this.$element.className=s+" "+(d.isDark?"ace_dark ":"")+(d.cssClass||"")},u.prototype.show=function(d,w,b){d!=null&&this.setText(d),w!=null&&b!=null&&this.setPosition(w,b),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},u.prototype.hide=function(d){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=s,this.isOpen=!1)},u.prototype.getHeight=function(){return this.getElement().offsetHeight},u.prototype.getWidth=function(){return this.getElement().offsetWidth},u.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},u}(),c=function(){function u(){this.popups=[]}return u.prototype.addPopup=function(d){this.popups.push(d),this.updatePopups()},u.prototype.removePopup=function(d){var w=this.popups.indexOf(d);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},u.prototype.updatePopups=function(){var d,w,b,E;this.popups.sort(function(P,O){return O.priority-P.priority});var $=[];try{for(var _=y(this.popups),C=_.next();!C.done;C=_.next()){var R=C.value,L=!0;try{for(var F=(b=void 0,y($)),I=F.next();!I.done;I=F.next()){var H=I.value;if(this.doPopupsOverlap(H,R)){L=!1;break}}}catch(P){b={error:P}}finally{try{I&&!I.done&&(E=F.return)&&E.call(F)}finally{if(b)throw b.error}}L?$.push(R):R.hide()}}catch(P){d={error:P}}finally{try{C&&!C.done&&(w=_.return)&&w.call(_)}finally{if(d)throw d.error}}},u.prototype.doPopupsOverlap=function(d,w){var b=d.getElement().getBoundingClientRect(),E=w.getElement().getBoundingClientRect();return b.left<E.right&&b.right>E.left&&b.top<E.bottom&&b.bottom>E.top},u}(),a=new c;r.popupManager=a,r.Tooltip=l;var o=function(u){m(d,u);function d(w){w===void 0&&(w=document.body);var b=u.call(this,w)||this;b.timeout=void 0,b.lastT=0,b.idleTime=350,b.lastEvent=void 0,b.onMouseOut=b.onMouseOut.bind(b),b.onMouseMove=b.onMouseMove.bind(b),b.waitForHover=b.waitForHover.bind(b),b.hide=b.hide.bind(b);var E=b.getElement();return E.style.whiteSpace="pre-wrap",E.style.pointerEvents="auto",E.addEventListener("mouseout",b.onMouseOut),E.tabIndex=-1,E.addEventListener("blur",(function(){E.contains(document.activeElement)||this.hide()}).bind(b)),E.addEventListener("wheel",g),b}return d.prototype.addToEditor=function(w){w.on("mousemove",this.onMouseMove),w.on("mousedown",this.hide),w.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},d.prototype.removeFromEditor=function(w){w.off("mousemove",this.onMouseMove),w.off("mousedown",this.hide),w.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},d.prototype.onMouseMove=function(w,b){this.lastEvent=w,this.lastT=Date.now();var E=b.$mouseHandler.isMousePressed;if(this.isOpen){var $=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains($.row,$.column)||E||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||E||(this.lastEvent=w,this.timeout=setTimeout(this.waitForHover,this.idleTime))},d.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)},d.prototype.isOutsideOfText=function(w){var b=w.editor,E=w.getDocumentPosition(),$=b.session.getLine(E.row);if(E.column==$.length){var _=b.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),C=b.session.documentToScreenPosition(E.row,E.column);if(C.column!=_.column||C.row!=_.row)return!0}return!1},d.prototype.setDataProvider=function(w){this.$gatherData=w},d.prototype.showForRange=function(w,b,E,$){var _=10;if(!($&&$!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var C=w.renderer;this.isOpen||(a.addPopup(this),this.$registerCloseEvents(),this.setTheme(C.theme)),this.isOpen=!0,this.addMarker(b,w.session),this.range=h.fromPoints(b.start,b.end);var R=C.textToScreenCoordinates(b.start.row,b.start.column),L=C.scroller.getBoundingClientRect();R.pageX<L.left&&(R.pageX=L.left);var F=this.getElement();F.innerHTML="",F.appendChild(E),F.style.maxHeight="",F.style.display="block";var I=F.clientHeight,H=F.clientWidth,P=window.innerHeight-R.pageY-C.lineHeight,O=!0;R.pageY-I<0&&R.pageY<P&&(O=!1),F.style.maxHeight=(O?R.pageY:P)-_+"px",F.style.top=O?"":R.pageY+C.lineHeight+"px",F.style.bottom=O?window.innerHeight-R.pageY+"px":"",F.style.left=Math.min(R.pageX,window.innerWidth-H-_)+"px"}},d.prototype.addMarker=function(w,b){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=b,this.marker=b&&b.addMarker(w,"ace_highlight-marker","text")},d.prototype.hide=function(w){!w&&document.activeElement==this.getElement()||w&&w.target&&(w.type!="keydown"||w.ctrlKey||w.metaKey)&&this.$element.contains(w.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,a.removePopup(this)))},d.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},d.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},d.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())},d}(l);r.HoverTooltip=o}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(e,r,v){var m=this&&this.__extends||function(){var u=function(d,w){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,E){b.__proto__=E}||function(b,E){for(var $ in E)Object.prototype.hasOwnProperty.call(E,$)&&(b[$]=E[$])},u(d,w)};return function(d,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");u(d,w);function b(){this.constructor=d}d.prototype=w===null?Object.create(w):(b.prototype=w.prototype,new b)}}(),y=this&&this.__values||function(u){var d=typeof Symbol=="function"&&Symbol.iterator,w=d&&u[d],b=0;if(w)return w.call(u);if(u&&typeof u.length=="number")return{next:function(){return u&&b>=u.length&&(u=void 0),{value:u&&u[b++],done:!u}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")},x=e("../lib/dom"),h=e("../lib/event"),g=e("../tooltip").Tooltip,s=e("../config").nls,l=5,c=3;r.GUTTER_TOOLTIP_LEFT_OFFSET=l,r.GUTTER_TOOLTIP_TOP_OFFSET=c;function a(u){var d=u.editor,w=d.renderer.$gutterLayer,b=new o(d,!0);u.editor.setDefaultHandler("guttermousedown",function(L){if(!(!d.isFocused()||L.getButton()!=0)){var F=w.getRegion(L);if(F!="foldWidgets"){var I=L.getDocumentPosition().row,H=d.session.selection;if(L.getShiftKey())H.selectTo(I,0);else{if(L.domEvent.detail==2)return d.selectAll(),L.preventDefault();u.$clickSelection=d.selection.getLineRange(I)}return u.setState("selectByLines"),u.captureMouse(L),L.preventDefault()}}});var E,$;function _(){var L=$.getDocumentPosition().row,F=d.session.getLength();if(L==F){var I=d.renderer.pixelToScreenCoordinates(0,$.y).row,H=$.$pos;if(I>d.session.documentToScreenRow(H.row,H.column))return C()}if(b.showTooltip(L),!!b.isOpen)if(d.on("mousewheel",C),d.on("changeSession",C),window.addEventListener("keydown",C,!0),u.$tooltipFollowsMouse)R($);else{var P=$.getGutterRow(),O=w.$lines.get(P);if(O){var S=O.element.querySelector(".ace_gutter_annotation"),A=S.getBoundingClientRect(),N=b.getElement().style;N.left=A.right-l+"px",N.top=A.bottom-c+"px"}else R($)}}function C(L){L&&L.type==="keydown"&&(L.ctrlKey||L.metaKey)||L&&L.type==="mouseout"&&(!L.relatedTarget||b.getElement().contains(L.relatedTarget))||(E&&(E=clearTimeout(E)),b.isOpen&&(b.hideTooltip(),d.off("mousewheel",C),d.off("changeSession",C),window.removeEventListener("keydown",C,!0)))}function R(L){b.setPosition(L.x,L.y)}u.editor.setDefaultHandler("guttermousemove",function(L){var F=L.domEvent.target||L.domEvent.srcElement;if(x.hasCssClass(F,"ace_fold-widget"))return C();b.isOpen&&u.$tooltipFollowsMouse&&R(L),$=L,!E&&(E=setTimeout(function(){E=null,$&&!u.isMousePressed&&_()},50))}),h.addListener(d.renderer.$gutter,"mouseout",function(L){$=null,b.isOpen&&(E=setTimeout(function(){E=null,C(L)},50))},d)}r.GutterHandler=a;var o=function(u){m(d,u);function d(w,b){b===void 0&&(b=!1);var E=u.call(this,w.container)||this;E.editor=w,E.visibleTooltipRow;var $=E.getElement();return $.setAttribute("role","tooltip"),$.style.pointerEvents="auto",b&&(E.onMouseOut=E.onMouseOut.bind(E),$.addEventListener("mouseout",E.onMouseOut)),E}return d.prototype.onMouseOut=function(w){this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||this.hideTooltip())},d.prototype.setPosition=function(w,b){var E=window.innerWidth||document.documentElement.clientWidth,$=window.innerHeight||document.documentElement.clientHeight,_=this.getWidth(),C=this.getHeight();w+=15,b+=15,w+_>E&&(w-=w+_-E),b+C>$&&(b-=20+C),g.prototype.setPosition.call(this,w,b)},Object.defineProperty(d,"annotationLabels",{get:function(){return{error:{singular:s("gutter-tooltip.aria-label.error.singular","error"),plural:s("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:s("gutter-tooltip.aria-label.security.singular","security finding"),plural:s("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:s("gutter-tooltip.aria-label.warning.singular","warning"),plural:s("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:s("gutter-tooltip.aria-label.info.singular","information message"),plural:s("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:s("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:s("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),d.prototype.showTooltip=function(w){var b,E=this.editor.renderer.$gutterLayer,$=E.$annotations[w],_;$?_={displayText:Array.from($.displayText),type:Array.from($.type)}:_={displayText:[],type:[]};var C=E.session.getFoldLine(w);if(C&&E.$showFoldedAnnotations){for(var R={error:[],security:[],warning:[],info:[],hint:[]},L={error:1,security:2,warning:3,info:4,hint:5},F,I=w+1;I<=C.end.row;I++)if(E.$annotations[I])for(var H=0;H<E.$annotations[I].text.length;H++){var P=E.$annotations[I].type[H];R[P].push(E.$annotations[I].text[H]),(!F||L[P]<L[F])&&(F=P)}if(["error","security","warning"].includes(F)){var O="".concat(d.annotationsToSummaryString(R)," in folded code.");_.displayText.push(O),_.type.push(F+"_fold")}}if(_.displayText.length===0)return this.hideTooltip();for(var S={error:[],security:[],warning:[],info:[],hint:[]},A=E.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",I=0;I<_.displayText.length;I++){var N=x.createElement("span"),B=x.createElement("span");(b=B.classList).add.apply(b,["ace_".concat(_.type[I]),A]),B.setAttribute("aria-label","".concat(d.annotationLabels[_.type[I].replace("_fold","")].singular)),B.setAttribute("role","img"),B.appendChild(x.createTextNode(" ")),N.appendChild(B),N.appendChild(x.createTextNode(_.displayText[I])),N.appendChild(x.createElement("br")),S[_.type[I].replace("_fold","")].push(N)}var U=this.getElement();x.removeChildren(U),S.error.forEach(function(K){return U.appendChild(K)}),S.security.forEach(function(K){return U.appendChild(K)}),S.warning.forEach(function(K){return U.appendChild(K)}),S.info.forEach(function(K){return U.appendChild(K)}),S.hint.forEach(function(K){return U.appendChild(K)}),U.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.visibleTooltipRow=w,this.editor._signal("showGutterTooltip",this)},d.prototype.hideTooltip=function(){this.isOpen&&(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this))},d.annotationsToSummaryString=function(w){var b,E,$=[],_=["error","security","warning","info","hint"];try{for(var C=y(_),R=C.next();!R.done;R=C.next()){var L=R.value;if(w[L].length){var F=w[L].length===1?d.annotationLabels[L].singular:d.annotationLabels[L].plural;$.push("".concat(w[L].length," ").concat(F))}}}catch(I){b={error:I}}finally{try{R&&!R.done&&(E=C.return)&&E.call(C)}finally{if(b)throw b.error}}return $.join(", ")},d}(g);r.GutterTooltip=o}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,v){var m=e("../lib/event"),y=e("../lib/useragent"),x=function(){function h(g,s){this.speed,this.wheelX,this.wheelY,this.domEvent=g,this.editor=s,this.x=this.clientX=g.clientX,this.y=this.clientY=g.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return h.prototype.stopPropagation=function(){m.stopPropagation(this.domEvent),this.propagationStopped=!0},h.prototype.preventDefault=function(){m.preventDefault(this.domEvent),this.defaultPrevented=!0},h.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},h.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},h.prototype.getGutterRow=function(){var g=this.getDocumentPosition().row,s=this.editor.session.documentToScreenRow(g,0),l=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return s-l},h.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var g=this.editor,s=g.getSelectionRange();if(s.isEmpty())this.$inSelection=!1;else{var l=this.getDocumentPosition();this.$inSelection=s.contains(l.row,l.column)}return this.$inSelection},h.prototype.getButton=function(){return m.getButton(this.domEvent)},h.prototype.getShiftKey=function(){return this.domEvent.shiftKey},h.prototype.getAccelKey=function(){return y.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},h}();r.MouseEvent=x}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,r,v){var m=e("../lib/dom"),y=e("../lib/event"),x=e("../lib/useragent"),h=200,g=200,s=5;function l(a){var o=a.editor,u=m.createElement("div");u.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",u.textContent=" ";var d=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];d.forEach(function(ne){a[ne]=this[ne]},this),o.on("mousedown",this.onMouseDown.bind(a));var w=o.container,b,E,$,_,C,R,L=0,F,I,H,P,O;this.onDragStart=function(ne){if(this.cancelDrag||!w.draggable){var ae=this;return setTimeout(function(){ae.startSelect(),ae.captureMouse(ne)},0),ne.preventDefault()}C=o.getSelectionRange();var ce=ne.dataTransfer;ce.effectAllowed=o.getReadOnly()?"copy":"copyMove",o.container.appendChild(u),ce.setDragImage&&ce.setDragImage(u,0,0),setTimeout(function(){o.container.removeChild(u)}),ce.clearData(),ce.setData("Text",o.session.getTextRange()),I=!0,this.setState("drag")},this.onDragEnd=function(ne){if(w.draggable=!1,I=!1,this.setState(null),!o.getReadOnly()){var ae=ne.dataTransfer.dropEffect;!F&&ae=="move"&&o.session.remove(o.getSelectionRange()),o.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return E=ne.clientX,$=ne.clientY,b||B(),L++,ne.dataTransfer.dropEffect=F=he(ne),y.preventDefault(ne)},this.onDragOver=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return E=ne.clientX,$=ne.clientY,b||(B(),L++),K!==null&&(K=null),ne.dataTransfer.dropEffect=F=he(ne),y.preventDefault(ne)},this.onDragLeave=function(ne){if(L--,L<=0&&b)return U(),F=null,y.preventDefault(ne)},this.onDrop=function(ne){if(R){var ae=ne.dataTransfer;if(I)switch(F){case"move":C.contains(R.row,R.column)?C={start:R,end:R}:C=o.moveText(C,R);break;case"copy":C=o.moveText(C,R,!0);break}else{var ce=ae.getData("Text");C={start:R,end:o.session.insert(R,ce)},o.focus(),F=null}return U(),y.preventDefault(ne)}},y.addListener(w,"dragstart",this.onDragStart.bind(a),o),y.addListener(w,"dragend",this.onDragEnd.bind(a),o),y.addListener(w,"dragenter",this.onDragEnter.bind(a),o),y.addListener(w,"dragover",this.onDragOver.bind(a),o),y.addListener(w,"dragleave",this.onDragLeave.bind(a),o),y.addListener(w,"drop",this.onDrop.bind(a),o);function S(ne,ae){var ce=Date.now(),ue=!ae||ne.row!=ae.row,ye=!ae||ne.column!=ae.column;if(!P||ue||ye)o.moveCursorToPosition(ne),P=ce,O={x:E,y:$};else{var Ae=c(O.x,O.y,E,$);Ae>s?P=null:ce-P>=g&&(o.renderer.scrollCursorIntoView(),P=null)}}function A(ne,ae){var ce=Date.now(),ue=o.renderer.layerConfig.lineHeight,ye=o.renderer.layerConfig.characterWidth,Ae=o.renderer.scroller.getBoundingClientRect(),$e={x:{left:E-Ae.left,right:Ae.right-E},y:{top:$-Ae.top,bottom:Ae.bottom-$}},Ie=Math.min($e.x.left,$e.x.right),Ge=Math.min($e.y.top,$e.y.bottom),qe={row:ne.row,column:ne.column};Ie/ye<=2&&(qe.column+=$e.x.left<$e.x.right?-3:2),Ge/ue<=1&&(qe.row+=$e.y.top<$e.y.bottom?-1:1);var ut=ne.row!=qe.row,tt=ne.column!=qe.column,ht=!ae||ne.row!=ae.row;ut||tt&&!ht?H?ce-H>=h&&o.renderer.scrollCursorIntoView(qe):H=ce:H=null}function N(){var ne=R;R=o.renderer.screenToTextCoordinates(E,$),S(R,ne),A(R,ne)}function B(){C=o.selection.toOrientedRange(),b=o.session.addMarker(C,"ace_selection",o.getSelectionStyle()),o.clearSelection(),o.isFocused()&&o.renderer.$cursorLayer.setBlinking(!1),clearInterval(_),N(),_=setInterval(N,20),L=0,y.addListener(document,"mousemove",Z)}function U(){clearInterval(_),o.session.removeMarker(b),b=null,o.selection.fromOrientedRange(C),o.isFocused()&&!I&&o.$resetCursorStyle(),C=null,R=null,L=0,H=null,P=null,y.removeListener(document,"mousemove",Z)}var K=null;function Z(){K==null&&(K=setTimeout(function(){K!=null&&b&&U()},20))}function te(ne){var ae=ne.types;return!ae||Array.prototype.some.call(ae,function(ce){return ce=="text/plain"||ce=="Text"})}function he(ne){var ae=["copy","copymove","all","uninitialized"],ce=["move","copymove","linkmove","all","uninitialized"],ue=x.isMac?ne.altKey:ne.ctrlKey,ye="uninitialized";try{ye=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var Ae="none";return ue&&ae.indexOf(ye)>=0?Ae="copy":ce.indexOf(ye)>=0?Ae="move":ae.indexOf(ye)>=0&&(Ae="copy"),Ae}}(function(){this.dragWait=function(){var a=Date.now()-this.mousedownEvent.time;a>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var a=this.editor.container;a.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(a){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var a=this.editor,o=a.container;o.draggable=!0,a.renderer.$cursorLayer.setBlinking(!1),a.setStyle("ace_dragging");var u=x.isWin?"default":"move";a.renderer.setCursorStyle(u),this.setState("dragReady")},this.onMouseDrag=function(a){var o=this.editor.container;if(x.isIE&&this.state=="dragReady"){var u=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);u>3&&o.dragDrop()}if(this.state==="dragWait"){var u=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);u>0&&(o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(a){if(this.$dragEnabled){this.mousedownEvent=a;var o=this.editor,u=a.inSelection(),d=a.getButton(),w=a.domEvent.detail||1;if(w===1&&d===0&&u){if(a.editor.inMultiSelectMode&&(a.getAccelKey()||a.getShiftKey()))return;this.mousedownEvent.time=Date.now();var b=a.domEvent.target||a.domEvent.srcElement;if("unselectable"in b&&(b.unselectable="on"),o.getDragDelay()){if(x.isWebKit){this.cancelDrag=!0;var E=o.container;E.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(a,this.onMouseDrag.bind(this)),a.defaultPrevented=!0}}}}).call(l.prototype);function c(a,o,u,d){return Math.sqrt(Math.pow(u-a,2)+Math.pow(d-o,2))}r.DragdropHandler=l}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,r,v){var m=e("./mouse_event").MouseEvent,y=e("../lib/event"),x=e("../lib/dom");r.addTouchListeners=function(h,g){var s="scroll",l,c,a,o,u,d,w=0,b,E=0,$=0,_=0,C,R;function L(){var S=window.navigator&&window.navigator.clipboard,A=!1,N=function(){var K=g.getCopyText(),Z=g.session.getUndoManager().hasUndo();R.replaceChild(x.buildDom(A?["span",!K&&B("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],K&&B("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],K&&B("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],S&&B("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Z&&B("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],B("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],B("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),R.firstChild)},B=function(K){return g.commands.canExecute(K,g)},U=function(K){var Z=K.target.getAttribute("action");if(Z=="more"||!A)return A=!A,N();Z=="paste"?S.readText().then(function(te){g.execCommand(Z,te)}):Z&&((Z=="cut"||Z=="copy")&&(S?S.writeText(g.getCopyText()):document.execCommand("copy")),g.execCommand(Z)),R.firstChild.style.display="none",A=!1,Z!="openCommandPalette"&&g.focus()};R=x.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(K){s="menu",K.stopPropagation(),K.preventDefault(),g.textInput.focus()},ontouchend:function(K){K.stopPropagation(),K.preventDefault(),U(K)},onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],g.container)}function F(){if(!g.getOption("enableMobileMenu")){R&&I();return}R||L();var S=g.selection.cursor,A=g.renderer.textToScreenCoordinates(S.row,S.column),N=g.renderer.textToScreenCoordinates(0,0).pageX,B=g.renderer.scrollLeft,U=g.container.getBoundingClientRect();R.style.top=A.pageY-U.top-3+"px",A.pageX-U.left<U.width-70?(R.style.left="",R.style.right="10px"):(R.style.right="",R.style.left=N+B-U.left+"px"),R.style.display="",R.firstChild.style.display="none",g.on("input",I)}function I(S){R&&(R.style.display="none"),g.off("input",I)}function H(){u=null,clearTimeout(u);var S=g.selection.getRange(),A=S.contains(b.row,b.column);(S.isEmpty()||!A)&&(g.selection.moveToPosition(b),g.selection.selectWord()),s="wait",F()}function P(){u=null,clearTimeout(u),g.selection.moveToPosition(b);var S=E>=2?g.selection.getLineRange(b.row):g.session.getBracketRange(b);S&&!S.isEmpty()?g.selection.setRange(S):g.selection.selectWord(),s="wait"}y.addListener(h,"contextmenu",function(S){if(C){var A=g.textInput.getElement();A.focus()}},g),y.addListener(h,"touchstart",function(S){var A=S.touches;if(u||A.length>1){clearTimeout(u),u=null,a=-1,s="zoom";return}C=g.$mouseHandler.isMousePressed=!0;var N=g.renderer.layerConfig.lineHeight,B=g.renderer.layerConfig.lineHeight,U=S.timeStamp;o=U;var K=A[0],Z=K.clientX,te=K.clientY;Math.abs(l-Z)+Math.abs(c-te)>N&&(a=-1),l=S.clientX=Z,c=S.clientY=te,$=_=0;var he=new m(S,g);if(b=he.getDocumentPosition(),U-a<500&&A.length==1&&!w)E++,S.preventDefault(),S.button=0,P();else{E=0;var ne=g.selection.cursor,ae=g.selection.isEmpty()?ne:g.selection.anchor,ce=g.renderer.$cursorLayer.getPixelPosition(ne,!0),ue=g.renderer.$cursorLayer.getPixelPosition(ae,!0),ye=g.renderer.scroller.getBoundingClientRect(),Ae=g.renderer.layerConfig.offset,$e=g.renderer.scrollLeft,Ie=function(ut,tt){return ut=ut/B,tt=tt/N-.75,ut*ut+tt*tt};if(S.clientX<ye.left){s="zoom";return}var Ge=Ie(S.clientX-ye.left-ce.left+$e,S.clientY-ye.top-ce.top+Ae),qe=Ie(S.clientX-ye.left-ue.left+$e,S.clientY-ye.top-ue.top+Ae);Ge<3.5&&qe<3.5&&(s=Ge>qe?"cursor":"anchor"),qe<3.5?s="anchor":Ge<3.5?s="cursor":s="scroll",u=setTimeout(H,450)}a=U},g),y.addListener(h,"touchend",function(S){C=g.$mouseHandler.isMousePressed=!1,d&&clearInterval(d),s=="zoom"?(s="",w=0):u?(g.selection.moveToPosition(b),w=0,F()):s=="scroll"?(O(),I()):F(),clearTimeout(u),u=null},g),y.addListener(h,"touchmove",function(S){u&&(clearTimeout(u),u=null);var A=S.touches;if(!(A.length>1||s=="zoom")){var N=A[0],B=l-N.clientX,U=c-N.clientY;if(s=="wait")if(B*B+U*U>4)s="cursor";else return S.preventDefault();l=N.clientX,c=N.clientY,S.clientX=N.clientX,S.clientY=N.clientY;var K=S.timeStamp,Z=K-o;if(o=K,s=="scroll"){var te=new m(S,g);te.speed=1,te.wheelX=B,te.wheelY=U,10*Math.abs(B)<Math.abs(U)&&(B=0),10*Math.abs(U)<Math.abs(B)&&(U=0),Z!=0&&($=B/Z,_=U/Z),g._emit("mousewheel",te),te.propagationStopped||($=_=0)}else{var he=new m(S,g),ne=he.getDocumentPosition();s=="cursor"?g.selection.moveCursorToPosition(ne):s=="anchor"&&g.selection.setSelectionAnchor(ne.row,ne.column),g.renderer.scrollCursorIntoView(ne),S.preventDefault()}}},g);function O(){w+=60,d=setInterval(function(){w--<=0&&(clearInterval(d),d=null),Math.abs($)<.01&&($=0),Math.abs(_)<.01&&(_=0),w<20&&($=.9*$),w<20&&(_=.9*_);var S=g.session.getScrollTop();g.renderer.scrollBy(10*$,10*_),S==g.session.getScrollTop()&&(w=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(e,r,v){var m=e("../lib/event"),y=e("../lib/useragent"),x=e("./default_handlers").DefaultHandlers,h=e("./default_gutter_handler").GutterHandler,g=e("./mouse_event").MouseEvent,s=e("./dragdrop_handler").DragdropHandler,l=e("./touch_handler").addTouchListeners,c=e("../config"),a=function(){function o(u){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var d=this;this.editor=u,new x(this),new h(this),new s(this);var w=function($){var _=!document.hasFocus||!document.hasFocus()||!u.isFocused()&&document.activeElement==(u.textInput&&u.textInput.getElement());_&&window.focus(),u.focus(),setTimeout(function(){u.isFocused()||u.focus()})},b=u.renderer.getMouseEventTarget();m.addListener(b,"click",this.onMouseEvent.bind(this,"click"),u),m.addListener(b,"mousemove",this.onMouseMove.bind(this,"mousemove"),u),m.addMultiMouseDownListener([b,u.renderer.scrollBarV&&u.renderer.scrollBarV.inner,u.renderer.scrollBarH&&u.renderer.scrollBarH.inner,u.textInput&&u.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",u),m.addMouseWheelListener(u.container,this.onMouseWheel.bind(this,"mousewheel"),u),l(u.container,u);var E=u.renderer.$gutter;m.addListener(E,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),u),m.addListener(E,"click",this.onMouseEvent.bind(this,"gutterclick"),u),m.addListener(E,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),u),m.addListener(E,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),u),m.addListener(b,"mousedown",w,u),m.addListener(E,"mousedown",w,u),y.isIE&&u.renderer.scrollBarV&&(m.addListener(u.renderer.scrollBarV.element,"mousedown",w,u),m.addListener(u.renderer.scrollBarH.element,"mousedown",w,u)),u.on("mousemove",function($){if(!(d.state||d.$dragDelay||!d.$dragEnabled)){var _=u.renderer.screenToTextCoordinates($.x,$.y),C=u.session.selection.getRange(),R=u.renderer;!C.isEmpty()&&C.insideStart(_.row,_.column)?R.setCursorStyle("default"):R.setCursorStyle("")}},u)}return o.prototype.onMouseEvent=function(u,d){this.editor.session&&this.editor._emit(u,new g(d,this.editor))},o.prototype.onMouseMove=function(u,d){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(u,new g(d,this.editor))},o.prototype.onMouseWheel=function(u,d){var w=new g(d,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=d.wheelX,w.wheelY=d.wheelY,this.editor._emit(u,w)},o.prototype.setState=function(u){this.state=u},o.prototype.captureMouse=function(u,d){this.x=u.x,this.y=u.y,this.isMousePressed=!0;var w=this.editor,b=this.editor.renderer;b.$isMousePressed=!0;var E=this,$=function(F){if(F){if(y.isWebKit&&!F.which&&E.releaseMouse)return E.releaseMouse();E.x=F.clientX,E.y=F.clientY,d&&d(F),E.mouseEvent=new g(F,E.editor),E.$mouseMoved=!0}},_=function(F){w.off("beforeEndOperation",R),clearInterval(L),w.session&&C(),E[E.state+"End"]&&E[E.state+"End"](F),E.state="",E.isMousePressed=b.$isMousePressed=!1,b.$keepTextAreaAtCursor&&b.$moveTextAreaToCursor(),E.$onCaptureMouseMove=E.releaseMouse=null,F&&E.onMouseEvent("mouseup",F),w.endOperation()},C=function(){E[E.state]&&E[E.state](),E.$mouseMoved=!1};if(y.isOldIE&&u.domEvent.type=="dblclick")return setTimeout(function(){_(u)});var R=function(F){E.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(E[E.state+"End"]&&E[E.state+"End"](),E.state="",E.releaseMouse())};w.on("beforeEndOperation",R),w.startOperation({command:{name:"mouse"}}),E.$onCaptureMouseMove=$,E.releaseMouse=m.capture(this.editor.container,$,_);var L=setInterval(C,20)},o.prototype.cancelContextMenu=function(){var u=(function(d){d&&d.domEvent&&d.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",u),d&&d.domEvent&&m.stopEvent(d.domEvent))}).bind(this);setTimeout(u,10),this.editor.on("nativecontextmenu",u)},o.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},o}();a.prototype.releaseMouse=null,c.defineOptions(a.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:y.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),r.MouseHandler=a}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,r,v){var m=e("../lib/dom"),y=function(){function x(h){h.on("click",function(g){var s=g.getDocumentPosition(),l=h.session,c=l.getFoldAt(s.row,s.column,1);c&&(g.getAccelKey()?l.removeFold(c):l.expandFold(c),g.stop());var a=g.domEvent&&g.domEvent.target;a&&m.hasCssClass(a,"ace_inline_button")&&m.hasCssClass(a,"ace_toggle_wrap")&&(l.setOption("wrap",!l.getUseWrapMode()),h.renderer.scrollCursorIntoView())}),h.on("gutterclick",function(g){var s=h.renderer.$gutterLayer.getRegion(g);if(s=="foldWidgets"){var l=g.getDocumentPosition().row,c=h.session;c.foldWidgets&&c.foldWidgets[l]&&h.session.onFoldWidgetClick(l,g),h.isFocused()||h.focus(),g.stop()}}),h.on("gutterdblclick",function(g){var s=h.renderer.$gutterLayer.getRegion(g);if(s=="foldWidgets"){var l=g.getDocumentPosition().row,c=h.session,a=c.getParentFoldRangeData(l,!0),o=a.range||a.firstRange;if(o){l=o.start.row;var u=c.getFoldAt(l,c.getLine(l).length,1);u?c.removeFold(u):(c.addFold("...",o),h.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}g.stop()}})}return x}();r.FoldHandler=y}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,r,v){var m=e("../lib/keys"),y=e("../lib/event"),x=function(){function h(g){this.$editor=g,this.$data={editor:g},this.$handlers=[],this.setDefaultHandler(g.commands)}return h.prototype.setDefaultHandler=function(g){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=g,this.addKeyboardHandler(g,0)},h.prototype.setKeyboardHandler=function(g){var s=this.$handlers;if(s[s.length-1]!=g){for(;s[s.length-1]&&s[s.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(s[s.length-1]);this.addKeyboardHandler(g,1)}},h.prototype.addKeyboardHandler=function(g,s){if(g){typeof g=="function"&&!g.handleKeyboard&&(g.handleKeyboard=g);var l=this.$handlers.indexOf(g);l!=-1&&this.$handlers.splice(l,1),s==null?this.$handlers.push(g):this.$handlers.splice(s,0,g),l==-1&&g.attach&&g.attach(this.$editor)}},h.prototype.removeKeyboardHandler=function(g){var s=this.$handlers.indexOf(g);return s==-1?!1:(this.$handlers.splice(s,1),g.detach&&g.detach(this.$editor),!0)},h.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},h.prototype.getStatusText=function(){var g=this.$data,s=g.editor;return this.$handlers.map(function(l){return l.getStatusText&&l.getStatusText(s,g)||""}).filter(Boolean).join(" ")},h.prototype.$callKeyboardHandlers=function(g,s,l,c){for(var a,o=!1,u=this.$editor.commands,d=this.$handlers.length;d--&&(a=this.$handlers[d].handleKeyboard(this.$data,g,s,l,c),!(!(!a||!a.command)&&(a.command=="null"?o=!0:o=u.exec(a.command,this.$editor,a.args,c),o&&c&&g!=-1&&a.passEvent!=!0&&a.command.passEvent!=!0&&y.stopEvent(c),o))););return!o&&g==-1&&(a={command:"insertstring"},o=u.exec("insertstring",this.$editor,s)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",a),o},h.prototype.onCommandKey=function(g,s,l){var c=m.keyCodeToString(l);return this.$callKeyboardHandlers(s,c,l,g)},h.prototype.onTextInput=function(g){return this.$callKeyboardHandlers(-1,g)},h}();r.KeyBinding=x}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,r,v){var m=0,y=0,x=!1,h=!1,g=!1,s=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],l=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],c=0,a=1,o=0,u=1,d=2,w=3,b=4,E=5,$=6,_=7,C=8,R=9,L=10,F=11,I=12,H=13,P=14,O=15,S=16,A=17,N=18,B=[N,N,N,N,N,N,N,N,N,$,E,$,C,E,N,N,N,N,N,N,N,N,N,N,N,N,N,N,E,E,E,$,C,b,b,F,F,F,b,b,b,b,b,L,R,L,R,R,d,d,d,d,d,d,d,d,d,d,R,b,b,b,b,b,b,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,b,b,b,b,b,b,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,b,b,b,b,N,N,N,N,N,N,E,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,R,b,F,F,F,F,b,b,b,b,o,b,b,N,b,b,F,F,d,d,b,o,b,b,b,d,o,b,b,b,b,b],U=[C,C,C,C,C,C,C,C,C,C,C,N,N,N,o,u,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,C,E,H,P,O,S,A,R,F,F,F,F,F,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,R,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,C];function K(ne,ae,ce,ue){var ye=m?l:s,Ae=null,$e=null,Ie=null,Ge=0,qe=null,ut=null,tt=-1,ht=null,Zt=null,hn=[];if(!ue)for(ht=0,ue=[];ht<ce;ht++)ue[ht]=he(ne[ht]);for(y=m,x=!1,h=!1,g=!1,Zt=0;Zt<ce;Zt++){if(Ae=Ge,hn[Zt]=$e=te(ne,ue,hn,Zt),Ge=ye[Ae][$e],qe=Ge&240,Ge&=15,ae[Zt]=Ie=ye[Ge][5],qe>0)if(qe==16){for(ht=tt;ht<Zt;ht++)ae[ht]=1;tt=-1}else tt=-1;if(ut=ye[Ge][6],ut)tt==-1&&(tt=Zt);else if(tt>-1){for(ht=tt;ht<Zt;ht++)ae[ht]=Ie;tt=-1}ue[Zt]==E&&(ae[Zt]=0),y|=Ie}if(g){for(ht=0;ht<ce;ht++)if(ue[ht]==$){ae[ht]=m;for(var qt=ht-1;qt>=0&&ue[qt]==C;qt--)ae[qt]=m}}}function Z(ne,ae,ce){if(!(y<ne)){if(ne==1&&m==a&&!h){ce.reverse();return}for(var ue=ce.length,ye=0,Ae,$e,Ie,Ge;ye<ue;){if(ae[ye]>=ne){for(Ae=ye+1;Ae<ue&&ae[Ae]>=ne;)Ae++;for($e=ye,Ie=Ae-1;$e<Ie;$e++,Ie--)Ge=ce[$e],ce[$e]=ce[Ie],ce[Ie]=Ge;ye=Ae}ye++}}}function te(ne,ae,ce,ue){var ye=ae[ue],Ae,$e,Ie,Ge;switch(ye){case o:case u:x=!1;case b:case w:return ye;case d:return x?w:d;case _:return x=!0,u;case C:return b;case R:return ue<1||ue+1>=ae.length||(Ae=ce[ue-1])!=d&&Ae!=w||($e=ae[ue+1])!=d&&$e!=w?b:(x&&($e=w),$e==Ae?$e:b);case L:return Ae=ue>0?ce[ue-1]:E,Ae==d&&ue+1<ae.length&&ae[ue+1]==d?d:b;case F:if(ue>0&&ce[ue-1]==d)return d;if(x)return b;for(Ge=ue+1,Ie=ae.length;Ge<Ie&&ae[Ge]==F;)Ge++;return Ge<Ie&&ae[Ge]==d?d:b;case I:for(Ie=ae.length,Ge=ue+1;Ge<Ie&&ae[Ge]==I;)Ge++;if(Ge<Ie){var qe=ne[ue],ut=qe>=1425&&qe<=2303||qe==64286;if(Ae=ae[Ge],ut&&(Ae==u||Ae==_))return u}return ue<1||(Ae=ae[ue-1])==E?b:ce[ue-1];case E:return x=!1,h=!0,m;case $:return g=!0,b;case H:case P:case S:case A:case O:x=!1;case N:return b}}function he(ne){var ae=ne.charCodeAt(0),ce=ae>>8;return ce==0?ae>191?o:B[ae]:ce==5?/[\u0591-\u05f4]/.test(ne)?u:o:ce==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?I:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?w:ae==1642?F:/[\u06f0-\u06f9]/.test(ne)?d:_:ce==32&&ae<=8287?U[ae&255]:ce==254&&ae>=65136?_:b}r.L=o,r.R=u,r.EN=d,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(ne,ae,ce){if(ne.length<2)return{};var ue=ne.split(""),ye=new Array(ue.length),Ae=new Array(ue.length),$e=[];m=ce?a:c,K(ue,$e,ue.length,ae);for(var Ie=0;Ie<ye.length;ye[Ie]=Ie,Ie++);Z(2,$e,ye),Z(1,$e,ye);for(var Ie=0;Ie<ye.length-1;Ie++)ae[Ie]===w?$e[Ie]=r.AN:$e[Ie]===u&&(ae[Ie]>_&&ae[Ie]<H||ae[Ie]===b||ae[Ie]===N)?$e[Ie]=r.ON_R:Ie>0&&ue[Ie-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ue[Ie])&&($e[Ie-1]=$e[Ie]=r.R_H,Ie++);ue[ue.length-1]===r.DOT&&($e[ue.length-1]=r.B),ue[0]===""&&($e[0]=r.RLE);for(var Ie=0;Ie<ye.length;Ie++)Ae[Ie]=$e[ye[Ie]];return{logicalFromVisual:ye,bidiLevels:Ae}},r.hasBidiCharacters=function(ne,ae){for(var ce=!1,ue=0;ue<ne.length;ue++)ae[ue]=he(ne.charAt(ue)),!ce&&(ae[ue]==u||ae[ue]==_||ae[ue]==w)&&(ce=!0);return ce},r.getVisualFromLogicalIdx=function(ne,ae){for(var ce=0;ce<ae.logicalFromVisual.length;ce++)if(ae.logicalFromVisual[ce]==ne)return ce;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,r,v){var m=e("./lib/bidiutil"),y=e("./lib/lang"),x=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,h=function(){function g(s){this.session=s,this.bidiMap={},this.currentRow=null,this.bidiUtil=m,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=x.test(s.getValue())}return g.prototype.isBidiRow=function(s,l,c){return this.seenBidi?(s!==this.currentRow&&(this.currentRow=s,this.updateRowLine(l,c),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},g.prototype.onChange=function(s){this.seenBidi?this.currentRow=null:s.action=="insert"&&x.test(s.lines.join(`
|
179
|
+
`))&&(this.seenBidi=!0,this.currentRow=null)},g.prototype.getDocumentRow=function(){var s=0,l=this.session.$screenRowCache;if(l.length){var c=this.session.$getRowCacheIndex(l,this.currentRow);c>=0&&(s=this.session.$docRowCache[c])}return s},g.prototype.getSplitIndex=function(){var s=0,l=this.session.$screenRowCache;if(l.length)for(var c,a=this.session.$getRowCacheIndex(l,this.currentRow);this.currentRow-s>0&&(c=this.session.$getRowCacheIndex(l,this.currentRow-s-1),c===a);)a=c,s++;else s=this.currentRow;return s},g.prototype.updateRowLine=function(s,l){s===void 0&&(s=this.getDocumentRow());var c=s===this.session.getLength()-1,a=c?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(s),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[s];o&&(l===void 0&&(l=this.getSplitIndex()),l>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[m.L],this.line=l<o.length?this.line.substring(o[l-1],o[l]):this.line.substring(o[o.length-1])):this.line=this.line.substring(0,o[l]),l==o.length&&(this.line+=this.showInvisibles?a:m.DOT))}else this.line+=this.showInvisibles?a:m.DOT;var u=this.session,d=0,w;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(b,E){return b===" "||u.isFullWidth(b.charCodeAt(0))?(w=b===" "?u.getScreenTabSize(E+d):2,d+=w-1,y.stringRepeat(m.DOT,w)):b}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==m.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},g.prototype.updateBidiMap=function(){var s=[];m.hasBidiCharacters(this.line,s)||this.isRtlDir?this.bidiMap=m.doBidiReorder(this.line,s,this.isRtlDir):this.bidiMap={}},g.prototype.markAsDirty=function(){this.currentRow=null},g.prototype.updateCharacterWidths=function(s){if(this.characterWidth!==s.$characterSize.width){this.fontMetrics=s;var l=this.characterWidth=s.$characterSize.width,c=s.$measureCharWidth("ה");this.charWidths[m.L]=this.charWidths[m.EN]=this.charWidths[m.ON_R]=l,this.charWidths[m.R]=this.charWidths[m.AN]=c,this.charWidths[m.R_H]=c*.45,this.charWidths[m.B]=this.charWidths[m.RLE]=0,this.currentRow=null}},g.prototype.setShowInvisibles=function(s){this.showInvisibles=s,this.currentRow=null},g.prototype.setEolChar=function(s){this.EOL=s},g.prototype.setContentWidth=function(s){this.contentWidth=s},g.prototype.isRtlLine=function(s){return this.$isRtl?!0:s!=null?this.session.getLine(s).charAt(0)==this.RLE:this.isRtlDir},g.prototype.setRtlDirection=function(s,l){for(var c=s.getCursorPosition(),a=s.selection.getSelectionAnchor().row;a<=c.row;a++)!l&&s.session.getLine(a).charAt(0)===s.session.$bidiHandler.RLE?s.session.doc.removeInLine(a,0,1):l&&s.session.getLine(a).charAt(0)!==s.session.$bidiHandler.RLE&&s.session.doc.insert({column:0,row:a},s.session.$bidiHandler.RLE)},g.prototype.getPosLeft=function(s){s-=this.wrapIndent;var l=this.line.charAt(0)===this.RLE?1:0,c=s>l?this.session.getOverwrite()?s:s-1:l,a=m.getVisualFromLogicalIdx(c,this.bidiMap),o=this.bidiMap.bidiLevels,u=0;!this.session.getOverwrite()&&s<=l&&o[a]%2!==0&&a++;for(var d=0;d<a;d++)u+=this.charWidths[o[d]];return!this.session.getOverwrite()&&s>l&&o[a]%2===0&&(u+=this.charWidths[o[a]]),this.wrapIndent&&(u+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(u+=this.rtlLineOffset),u},g.prototype.getSelections=function(s,l){var c=this.bidiMap,a=c.bidiLevels,o,u=[],d=0,w=Math.min(s,l)-this.wrapIndent,b=Math.max(s,l)-this.wrapIndent,E=!1,$=!1,_=0;this.wrapIndent&&(d+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,R=0;R<a.length;R++)C=c.logicalFromVisual[R],o=a[R],E=C>=w&&C<b,E&&!$?_=d:!E&&$&&u.push({left:_,width:d-_}),d+=this.charWidths[o],$=E;if(E&&R===a.length&&u.push({left:_,width:d-_}),this.isRtlDir)for(var L=0;L<u.length;L++)u[L].left+=this.rtlLineOffset;return u},g.prototype.offsetToCol=function(c){this.isRtlDir&&(c-=this.rtlLineOffset);var l=0,c=Math.max(c,0),a=0,o=0,u=this.bidiMap.bidiLevels,d=this.charWidths[u[o]];for(this.wrapIndent&&(c-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);c>a+d/2;){if(a+=d,o===u.length-1){d=0;break}d=this.charWidths[u[++o]]}return o>0&&u[o-1]%2!==0&&u[o]%2===0?(c<a&&o--,l=this.bidiMap.logicalFromVisual[o]):o>0&&u[o-1]%2===0&&u[o]%2!==0?l=1+(c>a?this.bidiMap.logicalFromVisual[o]:this.bidiMap.logicalFromVisual[o-1]):this.isRtlDir&&o===u.length-1&&d===0&&u[o-1]%2===0||!this.isRtlDir&&o===0&&u[o]%2!==0?l=1+this.bidiMap.logicalFromVisual[o]:(o>0&&u[o-1]%2!==0&&d!==0&&o--,l=this.bidiMap.logicalFromVisual[o]),l===0&&this.isRtlDir&&l++,l+this.wrapIndent},g}();r.BidiHandler=h}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,r,v){var m=e("./lib/oop"),y=e("./lib/lang"),x=e("./lib/event_emitter").EventEmitter,h=e("./range").Range,g=function(){function s(l){this.session=l,this.doc=l.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var c=this;this.cursor.on("change",function(a){c.$cursorChanged=!0,c.$silent||c._emit("changeCursor"),!c.$isEmpty&&!c.$silent&&c._emit("changeSelection"),!c.$keepDesiredColumnOnChange&&a.old.column!=a.value.column&&(c.$desiredColumn=null)}),this.anchor.on("change",function(){c.$anchorChanged=!0,!c.$isEmpty&&!c.$silent&&c._emit("changeSelection")})}return s.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},s.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},s.prototype.getCursor=function(){return this.lead.getPosition()},s.prototype.setAnchor=function(l,c){this.$isEmpty=!1,this.anchor.setPosition(l,c)},s.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},s.prototype.getSelectionLead=function(){return this.lead.getPosition()},s.prototype.isBackwards=function(){var l=this.anchor,c=this.lead;return l.row>c.row||l.row==c.row&&l.column>c.column},s.prototype.getRange=function(){var l=this.anchor,c=this.lead;return this.$isEmpty?h.fromPoints(c,c):this.isBackwards()?h.fromPoints(c,l):h.fromPoints(l,c)},s.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},s.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},s.prototype.setRange=function(l,c){var a=c?l.end:l.start,o=c?l.start:l.end;this.$setSelection(a.row,a.column,o.row,o.column)},s.prototype.$setSelection=function(l,c,a,o){if(!this.$silent){var u=this.$isEmpty,d=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(l,c),this.cursor.setPosition(a,o),this.$isEmpty=!h.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||u!=this.$isEmpty||d)&&this._emit("changeSelection")}},s.prototype.$moveSelection=function(l){var c=this.lead;this.$isEmpty&&this.setSelectionAnchor(c.row,c.column),l.call(this)},s.prototype.selectTo=function(l,c){this.$moveSelection(function(){this.moveCursorTo(l,c)})},s.prototype.selectToPosition=function(l){this.$moveSelection(function(){this.moveCursorToPosition(l)})},s.prototype.moveTo=function(l,c){this.clearSelection(),this.moveCursorTo(l,c)},s.prototype.moveToPosition=function(l){this.clearSelection(),this.moveCursorToPosition(l)},s.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},s.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},s.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},s.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},s.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},s.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},s.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},s.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},s.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},s.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},s.prototype.getWordRange=function(l,c){if(typeof c>"u"){var a=l||this.lead;l=a.row,c=a.column}return this.session.getWordRange(l,c)},s.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},s.prototype.selectAWord=function(){var l=this.getCursor(),c=this.session.getAWordRange(l.row,l.column);this.setSelectionRange(c)},s.prototype.getLineRange=function(l,c){var a=typeof l=="number"?l:this.lead.row,o,u=this.session.getFoldLine(a);return u?(a=u.start.row,o=u.end.row):o=a,c===!0?new h(a,0,o,this.session.getLine(o).length):new h(a,0,o+1,0)},s.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},s.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},s.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},s.prototype.wouldMoveIntoSoftTab=function(l,c,a){var o=l.column,u=l.column+c;return a<0&&(o=l.column-c,u=l.column),this.session.isTabStop(l)&&this.doc.getLine(l.row).slice(o,u).split(" ").length-1==c},s.prototype.moveCursorLeft=function(){var l=this.lead.getPosition(),c;if(c=this.session.getFoldAt(l.row,l.column,-1))this.moveCursorTo(c.start.row,c.start.column);else if(l.column===0)l.row>0&&this.moveCursorTo(l.row-1,this.doc.getLine(l.row-1).length);else{var a=this.session.getTabSize();this.wouldMoveIntoSoftTab(l,a,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-a):this.moveCursorBy(0,-1)}},s.prototype.moveCursorRight=function(){var l=this.lead.getPosition(),c;if(c=this.session.getFoldAt(l.row,l.column,1))this.moveCursorTo(c.end.row,c.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var a=this.session.getTabSize(),l=this.lead;this.wouldMoveIntoSoftTab(l,a,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,a):this.moveCursorBy(0,1)}},s.prototype.moveCursorLineStart=function(){var l=this.lead.row,c=this.lead.column,a=this.session.documentToScreenRow(l,c),o=this.session.screenToDocumentPosition(a,0),u=this.session.getDisplayLine(l,null,o.row,o.column),d=u.match(/^\s*/);d[0].length!=c&&!this.session.$useEmacsStyleLineStart&&(o.column+=d[0].length),this.moveCursorToPosition(o)},s.prototype.moveCursorLineEnd=function(){var l=this.lead,c=this.session.getDocumentLastRowColumnPosition(l.row,l.column);if(this.lead.column==c.column){var a=this.session.getLine(c.row);if(c.column==a.length){var o=a.search(/\s+$/);o>0&&(c.column=o)}}this.moveCursorTo(c.row,c.column)},s.prototype.moveCursorFileEnd=function(){var l=this.doc.getLength()-1,c=this.doc.getLine(l).length;this.moveCursorTo(l,c)},s.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},s.prototype.moveCursorLongWordRight=function(){var l=this.lead.row,c=this.lead.column,a=this.doc.getLine(l),o=a.substring(c);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var u=this.session.getFoldAt(l,c,1);if(u){this.moveCursorTo(u.end.row,u.end.column);return}if(this.session.nonTokenRe.exec(o)&&(c+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=a.substring(c)),c>=a.length){this.moveCursorTo(l,a.length),this.moveCursorRight(),l<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(o)&&(c+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(l,c)},s.prototype.moveCursorLongWordLeft=function(){var l=this.lead.row,c=this.lead.column,a;if(a=this.session.getFoldAt(l,c,-1)){this.moveCursorTo(a.start.row,a.start.column);return}var o=this.session.getFoldStringAt(l,c,-1);o==null&&(o=this.doc.getLine(l).substring(0,c));var u=y.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(u)&&(c-=this.session.nonTokenRe.lastIndex,u=u.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),c<=0){this.moveCursorTo(l,0),this.moveCursorLeft(),l>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(u)&&(c-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(l,c)},s.prototype.$shortWordEndIndex=function(l){var c=0,a,o=/\s/,u=this.session.tokenRe;if(u.lastIndex=0,this.session.tokenRe.exec(l))c=this.session.tokenRe.lastIndex;else{for(;(a=l[c])&&o.test(a);)c++;if(c<1){for(u.lastIndex=0;(a=l[c])&&!u.test(a);)if(u.lastIndex=0,c++,o.test(a))if(c>2){c--;break}else{for(;(a=l[c])&&o.test(a);)c++;if(c>2)break}}}return u.lastIndex=0,c},s.prototype.moveCursorShortWordRight=function(){var l=this.lead.row,c=this.lead.column,a=this.doc.getLine(l),o=a.substring(c),u=this.session.getFoldAt(l,c,1);if(u)return this.moveCursorTo(u.end.row,u.end.column);if(c==a.length){var d=this.doc.getLength();do l++,o=this.doc.getLine(l);while(l<d&&/^\s*$/.test(o));/^\s+/.test(o)||(o=""),c=0}var w=this.$shortWordEndIndex(o);this.moveCursorTo(l,c+w)},s.prototype.moveCursorShortWordLeft=function(){var l=this.lead.row,c=this.lead.column,a;if(a=this.session.getFoldAt(l,c,-1))return this.moveCursorTo(a.start.row,a.start.column);var o=this.session.getLine(l).substring(0,c);if(c===0){do l--,o=this.doc.getLine(l);while(l>0&&/^\s*$/.test(o));c=o.length,/\s+$/.test(o)||(o="")}var u=y.stringReverse(o),d=this.$shortWordEndIndex(u);return this.moveCursorTo(l,c-d)},s.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},s.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},s.prototype.moveCursorBy=function(l,c){var a=this.session.documentToScreenPosition(this.lead.row,this.lead.column),o;if(c===0&&(l!==0&&(this.session.$bidiHandler.isBidiRow(a.row,this.lead.row)?(o=this.session.$bidiHandler.getPosLeft(a.column),a.column=Math.round(o/this.session.$bidiHandler.charWidths[0])):o=a.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?a.column=this.$desiredColumn:this.$desiredColumn=a.column),l!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var u=this.session.lineWidgets[this.lead.row];l<0?l-=u.rowsAbove||0:l>0&&(l+=u.rowCount-(u.rowsAbove||0))}var d=this.session.screenToDocumentPosition(a.row+l,a.column,o);l!==0&&c===0&&d.row===this.lead.row&&(d.column,this.lead.column),this.moveCursorTo(d.row,d.column+c,c===0)},s.prototype.moveCursorToPosition=function(l){this.moveCursorTo(l.row,l.column)},s.prototype.moveCursorTo=function(l,c,a){var o=this.session.getFoldAt(l,c,1);o&&(l=o.start.row,c=o.start.column),this.$keepDesiredColumnOnChange=!0;var u=this.session.getLine(l);/[\uDC00-\uDFFF]/.test(u.charAt(c))&&u.charAt(c-1)&&(this.lead.row==l&&this.lead.column==c+1?c=c-1:c=c+1),this.lead.setPosition(l,c),this.$keepDesiredColumnOnChange=!1,a||(this.$desiredColumn=null)},s.prototype.moveCursorToScreen=function(l,c,a){var o=this.session.screenToDocumentPosition(l,c);this.moveCursorTo(o.row,o.column,a)},s.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},s.prototype.fromOrientedRange=function(l){this.setSelectionRange(l,l.cursor==l.start),this.$desiredColumn=l.desiredColumn||this.$desiredColumn},s.prototype.toOrientedRange=function(l){var c=this.getRange();return l?(l.start.column=c.start.column,l.start.row=c.start.row,l.end.column=c.end.column,l.end.row=c.end.row):l=c,l.cursor=this.isBackwards()?l.start:l.end,l.desiredColumn=this.$desiredColumn,l},s.prototype.getRangeOfMovements=function(l){var c=this.getCursor();try{l(this);var a=this.getCursor();return h.fromPoints(c,a)}catch{return h.fromPoints(c,c)}finally{this.moveCursorToPosition(c)}},s.prototype.toJSON=function(){if(this.rangeCount)var l=this.ranges.map(function(c){var a=c.clone();return a.isBackwards=c.cursor==c.start,a});else{var l=this.getRange();l.isBackwards=this.isBackwards()}return l},s.prototype.fromJSON=function(l){if(l.start==null)if(this.rangeList&&l.length>1){this.toSingleRange(l[0]);for(var c=l.length;c--;){var a=h.fromPoints(l[c].start,l[c].end);l[c].isBackwards&&(a.cursor=a.start),this.addRange(a,!0)}return}else l=l[0];this.rangeList&&this.toSingleRange(l),this.setSelectionRange(l,l.isBackwards)},s.prototype.isEqual=function(l){if((l.length||this.rangeCount)&&l.length!=this.rangeCount)return!1;if(!l.length||!this.ranges)return this.getRange().isEqual(l);for(var c=this.ranges.length;c--;)if(!this.ranges[c].isEqual(l[c]))return!1;return!0},s}();g.prototype.setSelectionAnchor=g.prototype.setAnchor,g.prototype.getSelectionAnchor=g.prototype.getAnchor,g.prototype.setSelectionRange=g.prototype.setRange,m.implement(g.prototype,x),r.Selection=g}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,r,v){var m=e("./lib/report_error").reportError,y=2e3,x=function(){function h(g){this.splitRegex,this.states=g,this.regExps={},this.matchMappings={};for(var s in this.states){for(var l=this.states[s],c=[],a=0,o=this.matchMappings[s]={defaultToken:"text"},u="g",d=[],w=0;w<l.length;w++){var b=l[w];if(b.defaultToken&&(o.defaultToken=b.defaultToken),b.caseInsensitive&&u.indexOf("i")===-1&&(u+="i"),b.unicode&&u.indexOf("u")===-1&&(u+="u"),b.regex!=null){b.regex instanceof RegExp&&(b.regex=b.regex.toString().slice(1,-1));var E=b.regex,$=new RegExp("(?:("+E+")|(.))").exec("a").length-2;Array.isArray(b.token)?b.token.length==1||$==1?b.token=b.token[0]:$-1!=b.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:b,groupCount:$-1}),b.token=b.token[0]):(b.tokenArray=b.token,b.token=null,b.onMatch=this.$arrayTokens):typeof b.token=="function"&&!b.onMatch&&($>1?b.onMatch=this.$applyToken:b.onMatch=b.token),$>1&&(/\\\d/.test(b.regex)?E=b.regex.replace(/\\([0-9]+)/g,function(_,C){return"\\"+(parseInt(C,10)+a+1)}):($=1,E=this.removeCapturingGroups(b.regex)),!b.splitRegex&&typeof b.token!="string"&&d.push(b)),o[a]=w,a+=$,c.push(E),b.onMatch||(b.onMatch=null)}}c.length||(o[0]=0,c.push("$")),d.forEach(function(_){_.splitRegex=this.createSplitterRegexp(_.regex,u)},this),this.regExps[s]=new RegExp("("+c.join(")|(")+")|($)",u)}}return h.prototype.$setMaxTokenCount=function(g){y=g|0},h.prototype.$applyToken=function(g){var s=this.splitRegex.exec(g).slice(1),l=this.token.apply(this,s);if(typeof l=="string")return[{type:l,value:g}];for(var c=[],a=0,o=l.length;a<o;a++)s[a]&&(c[c.length]={type:l[a],value:s[a]});return c},h.prototype.$arrayTokens=function(g){if(!g)return[];var s=this.splitRegex.exec(g);if(!s)return"text";for(var l=[],c=this.tokenArray,a=0,o=c.length;a<o;a++)s[a+1]&&(l[l.length]={type:c[a],value:s[a+1]});return l},h.prototype.removeCapturingGroups=function(g){var s=g.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(l,c){return c?"(?:":l});return s},h.prototype.createSplitterRegexp=function(g,s){if(g.indexOf("(?=")!=-1){var l=0,c=!1,a={};g.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(o,u,d,w,b,E){return c?c=b!="]":b?c=!0:w?(l==a.stack&&(a.end=E+1,a.stack=-1),l--):d&&(l++,d.length!=1&&(a.stack=l,a.start=E)),o}),a.end!=null&&/^\)*$/.test(g.substr(a.end))&&(g=g.substring(0,a.start)+g.substr(a.end))}return g.charAt(0)!="^"&&(g="^"+g),g.charAt(g.length-1)!="$"&&(g+="$"),new RegExp(g,(s||"").replace("g",""))},h.prototype.getLineTokens=function(g,s){if(s&&typeof s!="string"){var l=s.slice(0);s=l[0],s==="#tmp"&&(l.shift(),s=l.shift())}else var l=[];var c=s||"start",a=this.states[c];a||(c="start",a=this.states[c]);var o=this.matchMappings[c],u=this.regExps[c];u.lastIndex=0;for(var d,w=[],b=0,E=0,$={type:null,value:""};d=u.exec(g);){var _=o.defaultToken,C=null,R=d[0],L=u.lastIndex;if(L-R.length>b){var F=g.substring(b,L-R.length);$.type==_?$.value+=F:($.type&&w.push($),$={type:_,value:F})}for(var I=0;I<d.length-2;I++)if(d[I+1]!==void 0){C=a[o[I]],C.onMatch?_=C.onMatch(R,c,l,g):_=C.token,C.next&&(typeof C.next=="string"?c=C.next:c=C.next(c,l),a=this.states[c],a||(this.reportError("state doesn't exist",c),c="start",a=this.states[c]),o=this.matchMappings[c],b=L,u=this.regExps[c],u.lastIndex=L),C.consumeLineEnd&&(b=L);break}if(R){if(typeof _=="string")(!C||C.merge!==!1)&&$.type===_?$.value+=R:($.type&&w.push($),$={type:_,value:R});else if(_){$.type&&w.push($),$={type:null,value:""};for(var I=0;I<_.length;I++)w.push(_[I])}}if(b==g.length)break;if(b=L,E++>y){for(E>2*g.length&&this.reportError("infinite loop with in ace tokenizer",{startState:s,line:g});b<g.length;)$.type&&w.push($),$={value:g.substring(b,b+=500),type:"overflow"};c="start",l=[];break}}return $.type&&w.push($),l.length>1&&l[0]!==c&&l.unshift("#tmp",c),{tokens:w,state:l.length?l:c}},h}();x.prototype.reportError=m,r.Tokenizer=x}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,r,v){var m=e("../lib/deep_copy").deepCopy,y;y=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(g,s){if(!s){for(var l in g)this.$rules[l]=g[l];return}for(var l in g){for(var c=g[l],a=0;a<c.length;a++){var o=c[a];(o.next||o.onMatch)&&(typeof o.next=="string"&&o.next.indexOf(s)!==0&&(o.next=s+o.next),o.nextState&&o.nextState.indexOf(s)!==0&&(o.nextState=s+o.nextState))}this.$rules[s+l]=c}},this.getRules=function(){return this.$rules},this.embedRules=function(g,s,l,c,a){var o=typeof g=="function"?new g().getRules():g;if(c)for(var u=0;u<c.length;u++)c[u]=s+c[u];else{c=[];for(var d in o)c.push(s+d)}if(this.addRules(o,s),l)for(var w=Array.prototype[a?"push":"unshift"],u=0;u<c.length;u++)w.apply(this.$rules[c[u]],m(l));this.$embeds||(this.$embeds=[]),this.$embeds.push(s)},this.getEmbeds=function(){return this.$embeds};var x=function(g,s){return(g!="start"||s.length)&&s.unshift(this.nextState,g),this.nextState},h=function(g,s){return s.shift(),s.shift()||"start"};this.normalizeRules=function(){var g=0,s=this.$rules;function l(c){var a=s[c];a.processed=!0;for(var o=0;o<a.length;o++){var u=a[o],d=null;Array.isArray(u)&&(d=u,u={}),!u.regex&&u.start&&(u.regex=u.start,u.next||(u.next=[]),u.next.push({defaultToken:u.token},{token:u.token+".end",regex:u.end||u.start,next:"pop"}),u.token=u.token+".start",u.push=!0);var w=u.next||u.push;if(w&&Array.isArray(w)){var b=u.stateName;b||(b=u.token,typeof b!="string"&&(b=b[0]||""),s[b]&&(b+=g++)),s[b]=w,u.next=b,l(b)}else w=="pop"&&(u.next=h);if(u.push&&(u.nextState=u.next||u.push,u.next=x,delete u.push),u.rules)for(var E in u.rules)s[E]?s[E].push&&s[E].push.apply(s[E],u.rules[E]):s[E]=u.rules[E];var $=typeof u=="string"?u:u.include;if($&&($==="$self"&&($="start"),Array.isArray($)?d=$.map(function(C){return s[C]}):d=s[$]),d){var _=[o,1].concat(d);u.noEscape&&(_=_.filter(function(C){return!C.next})),a.splice.apply(a,_),o--}u.keywordMap&&(u.token=this.createKeywordMapper(u.keywordMap,u.defaultToken||"text",u.caseInsensitive),delete u.defaultToken)}}Object.keys(s).forEach(l,this)},this.createKeywordMapper=function(g,s,l,c){var a=Object.create(null);return this.$keywordList=[],Object.keys(g).forEach(function(o){for(var u=g[o],d=u.split(c||"|"),w=d.length;w--;){var b=d[w];this.$keywordList.push(b),l&&(b=b.toLowerCase()),a[b]=o}},this),g=null,l?function(o){return a[o.toLowerCase()]||s}:function(o){return a[o]||s}},this.getKeywords=function(){return this.$keywords}}).call(y.prototype),r.TextHighlightRules=y}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,r,v){var m;m=function(){this.$behaviours={}},(function(){this.add=function(y,x,h){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[y]:this.$behaviours[y]={}}this.$behaviours[y][x]=h},this.addBehaviours=function(y){for(var x in y)for(var h in y[x])this.add(x,h,y[x][h])},this.remove=function(y){this.$behaviours&&this.$behaviours[y]&&delete this.$behaviours[y]},this.inherit=function(y,x){if(typeof y=="function")var h=new y().getBehaviours(x);else var h=y.getBehaviours(x);this.addBehaviours(h)},this.getBehaviours=function(y){if(y){for(var x={},h=0;h<y.length;h++)this.$behaviours[y[h]]&&(x[y[h]]=this.$behaviours[y[h]]);return x}else return this.$behaviours}}).call(m.prototype),r.Behaviour=m}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,r,v){var m=e("./range").Range,y=function(){function x(h,g,s){this.$session=h,this.$row=g,this.$rowTokens=h.getTokens(g);var l=h.getTokenAt(g,s);this.$tokenIndex=l?l.index:-1}return x.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]},x.prototype.stepForward=function(){this.$tokenIndex+=1;for(var h;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,h||(h=this.$session.getLength()),this.$row>=h)return this.$row=h-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},x.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},x.prototype.getCurrentTokenRow=function(){return this.$row},x.prototype.getCurrentTokenColumn=function(){var h=this.$rowTokens,g=this.$tokenIndex,s=h[g].start;if(s!==void 0)return s;for(s=0;g>0;)g-=1,s+=h[g].value.length;return s},x.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},x.prototype.getCurrentTokenRange=function(){var h=this.$rowTokens[this.$tokenIndex],g=this.getCurrentTokenColumn();return new m(this.$row,g,this.$row,g+h.value.length)},x}();r.TokenIterator=y}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,r,v){var m=e("../../lib/oop"),y=e("../behaviour").Behaviour,x=e("../../token_iterator").TokenIterator,h=e("../../lib/lang"),g=["text","paren.rparen","rparen","paren","punctuation.operator"],s=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],l,c={},a={'"':'"',"'":"'"},o=function(w){var b=-1;if(w.multiSelect&&(b=w.selection.index,c.rangeCount!=w.multiSelect.rangeCount&&(c={rangeCount:w.multiSelect.rangeCount})),c[b])return l=c[b];l=c[b]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},u=function(w,b,E,$){var _=w.end.row-w.start.row;return{text:E+b+$,selection:[0,w.start.column+1,_,w.end.column+(_?0:1)]}},d;d=function(w){w=w||{},this.add("braces","insertion",function(b,E,$,_,C){var R=$.getCursorPosition(),L=_.doc.getLine(R.row);if(C=="{"){o($);var F=$.getSelectionRange(),I=_.doc.getTextRange(F),H=_.getTokenAt(R.row,R.column);if(I!==""&&I!=="{"&&$.getWrapBehavioursEnabled())return u(F,I,"{","}");if(H&&/(?:string)\.quasi|\.xml/.test(H.type)){var P=[/tag\-(?:open|name)/,/attribute\-name/];return P.some(function(K){return K.test(H.type)})||/(string)\.quasi/.test(H.type)&&H.value[R.column-H.start-1]!=="$"?void 0:(d.recordAutoInsert($,_,"}"),{text:"{}",selection:[1,1]})}else if(d.isSaneInsertion($,_))return/[\]\}\)]/.test(L[R.column])||$.inMultiSelectMode||w.braces?(d.recordAutoInsert($,_,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert($,_,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){o($);var O=L.substring(R.column,R.column+1);if(O=="}"){var S=_.$findOpeningBracket("}",{column:R.column+1,row:R.row});if(S!==null&&d.isAutoInsertedClosing(R,L,C))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
|
180
|
+
`||C==`\r
|
181
|
+
`){o($);var A="";d.isMaybeInsertedClosing(R,L)&&(A=h.stringRepeat("}",l.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var O=L.substring(R.column,R.column+1);if(O==="}"){var N=_.findMatchingBracket({row:R.row,column:R.column+1},"}");if(!N)return null;var B=this.$getIndent(_.getLine(N.row))}else if(A)var B=this.$getIndent(L);else{d.clearMaybeInsertedClosing();return}var U=B+_.getTabString();return{text:`
|
182
|
+
`+U+`
|
183
|
+
`+B+A,selection:[1,U.length,1,U.length]}}else d.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(b,E,$,_,C){var R=_.doc.getTextRange(C);if(!C.isMultiLine()&&R=="{"){o($);var L=_.doc.getLine(C.start.row),F=L.substring(C.end.column,C.end.column+1);if(F=="}")return C.end.column++,C;l.maybeInsertedBrackets--}}),this.add("parens","insertion",function(b,E,$,_,C){if(C=="("){o($);var R=$.getSelectionRange(),L=_.doc.getTextRange(R);if(L!==""&&$.getWrapBehavioursEnabled())return u(R,L,"(",")");if(d.isSaneInsertion($,_))return d.recordAutoInsert($,_,")"),{text:"()",selection:[1,1]}}else if(C==")"){o($);var F=$.getCursorPosition(),I=_.doc.getLine(F.row),H=I.substring(F.column,F.column+1);if(H==")"){var P=_.$findOpeningBracket(")",{column:F.column+1,row:F.row});if(P!==null&&d.isAutoInsertedClosing(F,I,C))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(b,E,$,_,C){var R=_.doc.getTextRange(C);if(!C.isMultiLine()&&R=="("){o($);var L=_.doc.getLine(C.start.row),F=L.substring(C.start.column+1,C.start.column+2);if(F==")")return C.end.column++,C}}),this.add("brackets","insertion",function(b,E,$,_,C){if(C=="["){o($);var R=$.getSelectionRange(),L=_.doc.getTextRange(R);if(L!==""&&$.getWrapBehavioursEnabled())return u(R,L,"[","]");if(d.isSaneInsertion($,_))return d.recordAutoInsert($,_,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){o($);var F=$.getCursorPosition(),I=_.doc.getLine(F.row),H=I.substring(F.column,F.column+1);if(H=="]"){var P=_.$findOpeningBracket("]",{column:F.column+1,row:F.row});if(P!==null&&d.isAutoInsertedClosing(F,I,C))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(b,E,$,_,C){var R=_.doc.getTextRange(C);if(!C.isMultiLine()&&R=="["){o($);var L=_.doc.getLine(C.start.row),F=L.substring(C.start.column+1,C.start.column+2);if(F=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(b,E,$,_,C){var R=_.$mode.$quotes||a;if(C.length==1&&R[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;o($);var L=C,F=$.getSelectionRange(),I=_.doc.getTextRange(F);if(I!==""&&(I.length!=1||!R[I])&&$.getWrapBehavioursEnabled())return u(F,I,L,L);if(!I){var H=$.getCursorPosition(),P=_.doc.getLine(H.row),O=P.substring(H.column-1,H.column),S=P.substring(H.column,H.column+1),A=_.getTokenAt(H.row,H.column),N=_.getTokenAt(H.row,H.column+1);if(O=="\\"&&A&&/escape/.test(A.type))return null;var B=A&&/string|escape/.test(A.type),U=!N||/string|escape/.test(N.type),K;if(S==L)K=B!==U,K&&/string\.end/.test(N.type)&&(K=!1);else{if(B&&!U||B&&U)return null;var Z=_.$mode.tokenRe;Z.lastIndex=0;var te=Z.test(O);Z.lastIndex=0;var he=Z.test(S),ne=_.$mode.$pairQuotesAfter,ae=ne&&ne[L]&&ne[L].test(O);if(!ae&&te||he||S&&!/[\s;,.})\]\\]/.test(S))return null;var ce=P[H.column-2];if(O==L&&(ce==L||Z.test(ce)))return null;K=!0}return{text:K?L+L:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(b,E,$,_,C){var R=_.$mode.$quotes||a,L=_.doc.getTextRange(C);if(!C.isMultiLine()&&R.hasOwnProperty(L)){o($);var F=_.doc.getLine(C.start.row),I=F.substring(C.start.column+1,C.start.column+2);if(I==L)return C.end.column++,C}}),w.closeDocComment!==!1&&this.add("doc comment end","insertion",function(b,E,$,_,C){if(b==="doc-start"&&(C===`
|
184
|
+
`||C===`\r
|
185
|
+
`)&&$.selection.isEmpty()){var R=$.getCursorPosition();if(R.column===0)return;for(var L=_.doc.getLine(R.row),F=_.doc.getLine(R.row+1),I=_.getTokens(R.row),H=0,P=0;P<I.length;P++){H+=I[P].value.length;var O=I[P];if(H>=R.column){if(H===R.column){if(!/\.doc/.test(O.type))return;if(/\*\//.test(O.value)){var S=I[P+1];if(!S||!/\.doc/.test(S.type))return}}var A=R.column-(H-O.value.length),N=O.value.indexOf("*/"),B=O.value.indexOf("/**",N>-1?N+2:0);if(B!==-1&&A>B&&A<B+3||N!==-1&&B!==-1&&A>=N&&A<=B||!/\.doc/.test(O.type))return;break}}var U=this.$getIndent(L);if(/\s*\*/.test(F))return/^\s*\*/.test(L)?{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(L.substring(0,R.column)))return{text:C+U+" * "+C+" "+U+"*/",selection:[1,4+U.length,1,4+U.length]}}})},d.isSaneInsertion=function(w,b){var E=w.getCursorPosition(),$=new x(b,E.row,E.column);if(!this.$matchTokenType($.getCurrentToken()||"text",g)){if(/[)}\]]/.test(w.session.getLine(E.row)[E.column]))return!0;var _=new x(b,E.row,E.column+1);if(!this.$matchTokenType(_.getCurrentToken()||"text",g))return!1}return $.stepForward(),$.getCurrentTokenRow()!==E.row||this.$matchTokenType($.getCurrentToken()||"text",s)},d.$matchTokenType=function(w,b){return b.indexOf(w.type||w)>-1},d.recordAutoInsert=function(w,b,E){var $=w.getCursorPosition(),_=b.doc.getLine($.row);this.isAutoInsertedClosing($,_,l.autoInsertedLineEnd[0])||(l.autoInsertedBrackets=0),l.autoInsertedRow=$.row,l.autoInsertedLineEnd=E+_.substr($.column),l.autoInsertedBrackets++},d.recordMaybeInsert=function(w,b,E){var $=w.getCursorPosition(),_=b.doc.getLine($.row);this.isMaybeInsertedClosing($,_)||(l.maybeInsertedBrackets=0),l.maybeInsertedRow=$.row,l.maybeInsertedLineStart=_.substr(0,$.column)+E,l.maybeInsertedLineEnd=_.substr($.column),l.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(w,b,E){return l.autoInsertedBrackets>0&&w.row===l.autoInsertedRow&&E===l.autoInsertedLineEnd[0]&&b.substr(w.column)===l.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(w,b){return l.maybeInsertedBrackets>0&&w.row===l.maybeInsertedRow&&b.substr(w.column)===l.maybeInsertedLineEnd&&b.substr(0,w.column)==l.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){l.autoInsertedLineEnd=l.autoInsertedLineEnd.substr(1),l.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){l&&(l.maybeInsertedBrackets=0,l.maybeInsertedRow=-1)},m.inherits(d,y),r.CstyleBehaviour=d}),ace.define("ace/unicode",["require","exports","module"],function(e,r,v){for(var m=[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],y=0,x=[],h=0;h<m.length;h+=2)x.push(y+=m[h]),m[h+1]&&x.push(45,y+=m[h+1]);r.wordChars=String.fromCharCode.apply(null,x)}),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,v){var m=e("../config"),y=e("../tokenizer").Tokenizer,x=e("./text_highlight_rules").TextHighlightRules,h=e("./behaviour/cstyle").CstyleBehaviour,g=e("../unicode"),s=e("../lib/lang"),l=e("../token_iterator").TokenIterator,c=e("../range").Range,a;a=function(){this.HighlightRules=x},(function(){this.$defaultBehaviour=new h,this.tokenRe=new RegExp("^["+g.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+g.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new y(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(o,u,d,w){var b=u.doc,E=!0,$=!0,_=1/0,C=u.getTabSize(),R=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var L=this.lineCommentStart.map(s.escapeRegExp).join("|"),F=this.lineCommentStart[0];else var L=s.escapeRegExp(this.lineCommentStart),F=this.lineCommentStart;L=new RegExp("^(\\s*)(?:"+L+") ?"),R=u.getUseSoftTabs();var I=function(K,Z){var te=K.match(L);if(te){var he=te[1].length,ne=te[0].length;!S(K,he,ne)&&te[0][ne-1]==" "&&ne--,b.removeInLine(Z,he,ne)}},H=F+" ",P=function(K,Z){(!E||/\S/.test(K))&&(S(K,_,_)?b.insertInLine({row:Z,column:_},H):b.insertInLine({row:Z,column:_},F))},O=function(K,Z){return L.test(K)},S=function(K,Z,te){for(var he=0;Z--&&K.charAt(Z)==" ";)he++;if(he%C!=0)return!1;for(var he=0;K.charAt(te++)==" ";)he++;return C>2?he%C!=C-1:he%C==0}}else{if(!this.blockComment)return!1;var F=this.blockComment.start,A=this.blockComment.end,L=new RegExp("^(\\s*)(?:"+s.escapeRegExp(F)+")"),N=new RegExp("(?:"+s.escapeRegExp(A)+")\\s*$"),P=function(ae,ce){O(ae,ce)||(!E||/\S/.test(ae))&&(b.insertInLine({row:ce,column:ae.length},A),b.insertInLine({row:ce,column:_},F))},I=function(ae,ce){var ue;(ue=ae.match(N))&&b.removeInLine(ce,ae.length-ue[0].length,ae.length),(ue=ae.match(L))&&b.removeInLine(ce,ue[1].length,ue[0].length)},O=function(ae,ce){if(L.test(ae))return!0;for(var ue=u.getTokens(ce),ye=0;ye<ue.length;ye++)if(ue[ye].type==="comment")return!0}}function B(K){for(var Z=d;Z<=w;Z++)K(b.getLine(Z),Z)}var U=1/0;B(function(K,Z){var te=K.search(/\S/);te!==-1?(te<_&&(_=te),$&&!O(K,Z)&&($=!1)):U>K.length&&(U=K.length)}),_==1/0&&(_=U,E=!1,$=!1),R&&_%C!=0&&(_=Math.floor(_/C)*C),B($?I:P)},this.toggleBlockComment=function(o,u,d,w){var b=this.blockComment;if(b){!b.start&&b[0]&&(b=b[0]);var E=new l(u,w.row,w.column),$=E.getCurrentToken();u.selection;var _=u.selection.toOrientedRange(),C,R;if($&&/comment/.test($.type)){for(var L,F;$&&/comment/.test($.type);){var I=$.value.indexOf(b.start);if(I!=-1){var H=E.getCurrentTokenRow(),P=E.getCurrentTokenColumn()+I;L=new c(H,P,H,P+b.start.length);break}$=E.stepBackward()}for(var E=new l(u,w.row,w.column),$=E.getCurrentToken();$&&/comment/.test($.type);){var I=$.value.indexOf(b.end);if(I!=-1){var H=E.getCurrentTokenRow(),P=E.getCurrentTokenColumn()+I;F=new c(H,P,H,P+b.end.length);break}$=E.stepForward()}F&&u.remove(F),L&&(u.remove(L),C=L.start.row,R=-b.start.length)}else R=b.start.length,C=d.start.row,u.insert(d.end,b.end),u.insert(d.start,b.start);_.start.row==C&&(_.start.column+=R),_.end.row==C&&(_.end.column+=R),u.selection.fromOrientedRange(_)}},this.getNextLineIndent=function(o,u,d){return this.$getIndent(u)},this.checkOutdent=function(o,u,d){return!1},this.autoOutdent=function(o,u,d){},this.$getIndent=function(o){return o.match(/^\s*/)[0]},this.createWorker=function(o){return null},this.createModeDelegates=function(o){this.$embeds=[],this.$modes={};for(var u in o)if(o[u]){var d=o[u],w=d.prototype.$id,b=m.$modes[w];b||(m.$modes[w]=b=new d),m.$modes[u]||(m.$modes[u]=b),this.$embeds.push(u),this.$modes[u]=b}for(var E=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],$=function(R){(function(L){var F=E[R],I=L[F];L[E[R]]=function(){return this.$delegator(F,arguments,I)}})(_)},_=this,u=0;u<E.length;u++)$(u)},this.$delegator=function(o,u,d){var w=u[0]||"start";if(typeof w!="string"){if(Array.isArray(w[2])){var b=w[2][w[2].length-1],E=this.$modes[b];if(E)return E[o].apply(E,[w[1]].concat([].slice.call(u,1)))}w=w[0]||"start"}for(var $=0;$<this.$embeds.length;$++)if(this.$modes[this.$embeds[$]]){var _=w.split(this.$embeds[$]);if(!_[0]&&_[1]){u[0]=_[1];var E=this.$modes[this.$embeds[$]];return E[o].apply(E,u)}}var C=d.apply(this,u);return d?C:void 0},this.transformAction=function(o,u,d,w,b){if(this.$behaviour){var E=this.$behaviour.getBehaviours();for(var $ in E)if(E[$][u]){var _=E[$][u].apply(this,arguments);if(_)return _}}},this.getKeywords=function(o){if(!this.completionKeywords){var u=this.$tokenizer.rules,d=[];for(var w in u)for(var b=u[w],E=0,$=b.length;E<$;E++)if(typeof b[E].token=="string")/keyword|support|storage/.test(b[E].token)&&d.push(b[E].regex);else if(typeof b[E].token=="object"){for(var _=0,C=b[E].token.length;_<C;_++)if(/keyword|support|storage/.test(b[E].token[_])){var w=b[E].regex.match(/\(.+?\)/g)[_];d.push(w.substr(1,w.length-2))}}this.completionKeywords=d}return o?d.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(o,u,d,w){var b=this.$keywordList||this.$createKeywordList();return b.map(function(E){return{name:E,value:E,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(a.prototype),r.Mode=a}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,r,v){var m=e("./lib/dom"),y=function(){function x(h){this.session=h,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return x.prototype.getRowLength=function(h){var g;return this.lineWidgets?g=this.lineWidgets[h]&&this.lineWidgets[h].rowCount||0:g=0,!this.$useWrapMode||!this.$wrapData[h]?1+g:this.$wrapData[h].length+1+g},x.prototype.$getWidgetScreenLength=function(){var h=0;return this.lineWidgets.forEach(function(g){g&&g.rowCount&&!g.hidden&&(h+=g.rowCount)}),h},x.prototype.$onChangeEditor=function(h){this.attach(h.editor)},x.prototype.attach=function(h){h&&h.widgetManager&&h.widgetManager!=this&&h.widgetManager.detach(),this.editor!=h&&(this.detach(),this.editor=h,h&&(h.widgetManager=this,h.renderer.on("beforeRender",this.measureWidgets),h.renderer.on("afterRender",this.renderWidgets)))},x.prototype.detach=function(h){var g=this.editor;if(g){this.editor=null,g.widgetManager=null,g.renderer.off("beforeRender",this.measureWidgets),g.renderer.off("afterRender",this.renderWidgets);var s=this.session.lineWidgets;s&&s.forEach(function(l){l&&l.el&&l.el.parentNode&&(l._inDocument=!1,l.el.parentNode.removeChild(l.el))})}},x.prototype.updateOnFold=function(h,g){var s=g.lineWidgets;if(!(!s||!h.action)){for(var l=h.data,c=l.start.row,a=l.end.row,o=h.action=="add",u=c+1;u<a;u++)s[u]&&(s[u].hidden=o);s[a]&&(o?s[c]?s[a].hidden=o:s[c]=s[a]:(s[c]==s[a]&&(s[c]=void 0),s[a].hidden=o))}},x.prototype.updateOnChange=function(h){var g=this.session.lineWidgets;if(g){var s=h.start.row,l=h.end.row-s;if(l!==0)if(h.action=="remove"){var c=g.splice(s+1,l);!g[s]&&c[c.length-1]&&(g[s]=c.pop()),c.forEach(function(o){o&&this.removeLineWidget(o)},this),this.$updateRows()}else{var a=new Array(l);g[s]&&g[s].column!=null&&h.start.column>g[s].column&&s++,a.unshift(s,0),g.splice.apply(g,a),this.$updateRows()}}},x.prototype.$updateRows=function(){var h=this.session.lineWidgets;if(h){var g=!0;h.forEach(function(s,l){if(s)for(g=!1,s.row=l;s.$oldWidget;)s.$oldWidget.row=l,s=s.$oldWidget}),g&&(this.session.lineWidgets=null)}},x.prototype.$registerLineWidget=function(h){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var g=this.session.lineWidgets[h.row];return g&&(h.$oldWidget=g,g.el&&g.el.parentNode&&(g.el.parentNode.removeChild(g.el),g._inDocument=!1)),this.session.lineWidgets[h.row]=h,h},x.prototype.addLineWidget=function(h){if(this.$registerLineWidget(h),h.session=this.session,!this.editor)return h;var g=this.editor.renderer;h.html&&!h.el&&(h.el=m.createElement("div"),h.el.innerHTML=h.html),h.text&&!h.el&&(h.el=m.createElement("div"),h.el.textContent=h.text),h.el&&(m.addCssClass(h.el,"ace_lineWidgetContainer"),h.className&&m.addCssClass(h.el,h.className),h.el.style.position="absolute",h.el.style.zIndex="5",g.container.appendChild(h.el),h._inDocument=!0,h.coverGutter||(h.el.style.zIndex="3"),h.pixelHeight==null&&(h.pixelHeight=h.el.offsetHeight)),h.rowCount==null&&(h.rowCount=h.pixelHeight/g.layerConfig.lineHeight);var s=this.session.getFoldAt(h.row,0);if(h.$fold=s,s){var l=this.session.lineWidgets;h.row==s.end.row&&!l[s.start.row]?l[s.start.row]=h:h.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:h.row}}}),this.$updateRows(),this.renderWidgets(null,g),this.onWidgetChanged(h),h},x.prototype.removeLineWidget=function(h){if(h._inDocument=!1,h.session=null,h.el&&h.el.parentNode&&h.el.parentNode.removeChild(h.el),h.editor&&h.editor.destroy)try{h.editor.destroy()}catch{}if(this.session.lineWidgets){var g=this.session.lineWidgets[h.row];if(g==h)this.session.lineWidgets[h.row]=h.$oldWidget,h.$oldWidget&&this.onWidgetChanged(h.$oldWidget);else for(;g;){if(g.$oldWidget==h){g.$oldWidget=h.$oldWidget;break}g=g.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:h.row}}}),this.$updateRows()},x.prototype.getWidgetsAtRow=function(h){for(var g=this.session.lineWidgets,s=g&&g[h],l=[];s;)l.push(s),s=s.$oldWidget;return l},x.prototype.onWidgetChanged=function(h){this.session._changedWidgets.push(h),this.editor&&this.editor.renderer.updateFull()},x.prototype.measureWidgets=function(h,g){var s=this.session._changedWidgets,l=g.layerConfig;if(!(!s||!s.length)){for(var c=1/0,a=0;a<s.length;a++){var o=s[a];if(!(!o||!o.el)&&o.session==this.session){if(!o._inDocument){if(this.session.lineWidgets[o.row]!=o)continue;o._inDocument=!0,g.container.appendChild(o.el)}o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/l.characterWidth));var u=o.h/l.lineHeight;o.coverLine&&(u-=this.session.getRowLineCount(o.row),u<0&&(u=0)),o.rowCount!=u&&(o.rowCount=u,o.row<c&&(c=o.row))}}c!=1/0&&(this.session._emit("changeFold",{data:{start:{row:c}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},x.prototype.renderWidgets=function(h,g){var s=g.layerConfig,l=this.session.lineWidgets;if(l){for(var c=Math.min(this.firstRow,s.firstRow),a=Math.max(this.lastRow,s.lastRow,l.length);c>0&&!l[c];)c--;this.firstRow=s.firstRow,this.lastRow=s.lastRow,g.$cursorLayer.config=s;for(var o=c;o<=a;o++){var u=l[o];if(!(!u||!u.el)){if(u.hidden){u.el.style.top=-100-(u.pixelHeight||0)+"px";continue}u._inDocument||(u._inDocument=!0,g.container.appendChild(u.el));var d=g.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;u.coverLine||(d+=s.lineHeight*this.session.getRowLineCount(u.row)),u.el.style.top=d-s.offset+"px";var w=u.coverGutter?0:g.gutterWidth;u.fixedWidth||(w-=g.scrollLeft),u.el.style.left=w+"px",u.fullWidth&&u.screenWidth&&(u.el.style.minWidth=s.width+2*s.padding+"px"),u.fixedWidth?u.el.style.right=g.scrollBar.getWidth()+"px":u.el.style.right=""}}}},x}();r.LineWidgets=y}),ace.define("ace/apply_delta",["require","exports","module"],function(e,r,v){r.applyDelta=function(m,y,x){var h=y.start.row,g=y.start.column,s=m[h]||"";switch(y.action){case"insert":var l=y.lines;if(l.length===1)m[h]=s.substring(0,g)+y.lines[0]+s.substring(g);else{var c=[h,1].concat(y.lines);m.splice.apply(m,c),m[h]=s.substring(0,g)+m[h],m[h+y.lines.length-1]+=s.substring(g)}break;case"remove":var a=y.end.column,o=y.end.row;h===o?m[h]=s.substring(0,g)+s.substring(a):m.splice(h,o-h+1,s.substring(0,g)+m[o].substring(a));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,v){var m=e("./lib/oop"),y=e("./lib/event_emitter").EventEmitter,x=function(){function s(l,c,a){this.$onChange=this.onChange.bind(this),this.attach(l),typeof c!="number"?this.setPosition(c.row,c.column):this.setPosition(c,a)}return s.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},s.prototype.getDocument=function(){return this.document},s.prototype.onChange=function(l){if(!(l.start.row==l.end.row&&l.start.row!=this.row)&&!(l.start.row>this.row)){var c=g(l,{row:this.row,column:this.column},this.$insertRight);this.setPosition(c.row,c.column,!0)}},s.prototype.setPosition=function(l,c,a){var o;if(a?o={row:l,column:c}:o=this.$clipPositionToDocument(l,c),!(this.row==o.row&&this.column==o.column)){var u={row:this.row,column:this.column};this.row=o.row,this.column=o.column,this._signal("change",{old:u,value:o})}},s.prototype.detach=function(){this.document.off("change",this.$onChange)},s.prototype.attach=function(l){this.document=l||this.document,this.document.on("change",this.$onChange)},s.prototype.$clipPositionToDocument=function(l,c){var a={};return l>=this.document.getLength()?(a.row=Math.max(0,this.document.getLength()-1),a.column=this.document.getLine(a.row).length):l<0?(a.row=0,a.column=0):(a.row=l,a.column=Math.min(this.document.getLine(a.row).length,Math.max(0,c))),c<0&&(a.column=0),a},s}();x.prototype.$insertRight=!1,m.implement(x.prototype,y);function h(s,l,c){var a=c?s.column<=l.column:s.column<l.column;return s.row<l.row||s.row==l.row&&a}function g(s,l,c){var a=s.action=="insert",o=(a?1:-1)*(s.end.row-s.start.row),u=(a?1:-1)*(s.end.column-s.start.column),d=s.start,w=a?d:s.end;return h(l,d,c)?{row:l.row,column:l.column}:h(w,l,!c)?{row:l.row+o,column:l.column+(l.row==w.row?u:0)}:{row:d.row,column:d.column}}r.Anchor=x}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,r,v){var m=e("./lib/oop"),y=e("./apply_delta").applyDelta,x=e("./lib/event_emitter").EventEmitter,h=e("./range").Range,g=e("./anchor").Anchor,s=function(){function l(c){this.$lines=[""],c.length===0?this.$lines=[""]:Array.isArray(c)?this.insertMergedLines({row:0,column:0},c):this.insert({row:0,column:0},c)}return l.prototype.setValue=function(c){var a=this.getLength()-1;this.remove(new h(0,0,a,this.getLine(a).length)),this.insert({row:0,column:0},c||"")},l.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},l.prototype.createAnchor=function(c,a){return new g(this,c,a)},l.prototype.$detectNewLine=function(c){var a=c.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=a?a[1]:`
|
186
|
+
`,this._signal("changeNewLineMode")},l.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
187
|
+
`;case"unix":return`
|
188
|
+
`;default:return this.$autoNewLine||`
|
189
|
+
`}},l.prototype.setNewLineMode=function(c){this.$newLineMode!==c&&(this.$newLineMode=c,this._signal("changeNewLineMode"))},l.prototype.getNewLineMode=function(){return this.$newLineMode},l.prototype.isNewLine=function(c){return c==`\r
|
190
|
+
`||c=="\r"||c==`
|
191
|
+
`},l.prototype.getLine=function(c){return this.$lines[c]||""},l.prototype.getLines=function(c,a){return this.$lines.slice(c,a+1)},l.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},l.prototype.getLength=function(){return this.$lines.length},l.prototype.getTextRange=function(c){return this.getLinesForRange(c).join(this.getNewLineCharacter())},l.prototype.getLinesForRange=function(c){var a;if(c.start.row===c.end.row)a=[this.getLine(c.start.row).substring(c.start.column,c.end.column)];else{a=this.getLines(c.start.row,c.end.row),a[0]=(a[0]||"").substring(c.start.column);var o=a.length-1;c.end.row-c.start.row==o&&(a[o]=a[o].substring(0,c.end.column))}return a},l.prototype.insertLines=function(c,a){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(c,a)},l.prototype.removeLines=function(c,a){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(c,a)},l.prototype.insertNewLine=function(c){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(c,["",""])},l.prototype.insert=function(c,a){return this.getLength()<=1&&this.$detectNewLine(a),this.insertMergedLines(c,this.$split(a))},l.prototype.insertInLine=function(c,a){var o=this.clippedPos(c.row,c.column),u=this.pos(c.row,c.column+a.length);return this.applyDelta({start:o,end:u,action:"insert",lines:[a]},!0),this.clonePos(u)},l.prototype.clippedPos=function(c,a){var o=this.getLength();c===void 0?c=o:c<0?c=0:c>=o&&(c=o-1,a=void 0);var u=this.getLine(c);return a==null&&(a=u.length),a=Math.min(Math.max(a,0),u.length),{row:c,column:a}},l.prototype.clonePos=function(c){return{row:c.row,column:c.column}},l.prototype.pos=function(c,a){return{row:c,column:a}},l.prototype.$clipPosition=function(c){var a=this.getLength();return c.row>=a?(c.row=Math.max(0,a-1),c.column=this.getLine(a-1).length):(c.row=Math.max(0,c.row),c.column=Math.min(Math.max(c.column,0),this.getLine(c.row).length)),c},l.prototype.insertFullLines=function(c,a){c=Math.min(Math.max(c,0),this.getLength());var o=0;c<this.getLength()?(a=a.concat([""]),o=0):(a=[""].concat(a),c--,o=this.$lines[c].length),this.insertMergedLines({row:c,column:o},a)},l.prototype.insertMergedLines=function(c,a){var o=this.clippedPos(c.row,c.column),u={row:o.row+a.length-1,column:(a.length==1?o.column:0)+a[a.length-1].length};return this.applyDelta({start:o,end:u,action:"insert",lines:a}),this.clonePos(u)},l.prototype.remove=function(c){var a=this.clippedPos(c.start.row,c.start.column),o=this.clippedPos(c.end.row,c.end.column);return this.applyDelta({start:a,end:o,action:"remove",lines:this.getLinesForRange({start:a,end:o})}),this.clonePos(a)},l.prototype.removeInLine=function(c,a,o){var u=this.clippedPos(c,a),d=this.clippedPos(c,o);return this.applyDelta({start:u,end:d,action:"remove",lines:this.getLinesForRange({start:u,end:d})},!0),this.clonePos(u)},l.prototype.removeFullLines=function(c,a){c=Math.min(Math.max(0,c),this.getLength()-1),a=Math.min(Math.max(0,a),this.getLength()-1);var o=a==this.getLength()-1&&c>0,u=a<this.getLength()-1,d=o?c-1:c,w=o?this.getLine(d).length:0,b=u?a+1:a,E=u?0:this.getLine(b).length,$=new h(d,w,b,E),_=this.$lines.slice(c,a+1);return this.applyDelta({start:$.start,end:$.end,action:"remove",lines:this.getLinesForRange($)}),_},l.prototype.removeNewLine=function(c){c<this.getLength()-1&&c>=0&&this.applyDelta({start:this.pos(c,this.getLine(c).length),end:this.pos(c+1,0),action:"remove",lines:["",""]})},l.prototype.replace=function(c,a){if(c instanceof h||(c=h.fromPoints(c.start,c.end)),a.length===0&&c.isEmpty())return c.start;if(a==this.getTextRange(c))return c.end;this.remove(c);var o;return a?o=this.insert(c.start,a):o=c.start,o},l.prototype.applyDeltas=function(c){for(var a=0;a<c.length;a++)this.applyDelta(c[a])},l.prototype.revertDeltas=function(c){for(var a=c.length-1;a>=0;a--)this.revertDelta(c[a])},l.prototype.applyDelta=function(c,a){var o=c.action=="insert";(o?c.lines.length<=1&&!c.lines[0]:!h.comparePoints(c.start,c.end))||(o&&c.lines.length>2e4?this.$splitAndapplyLargeDelta(c,2e4):(y(this.$lines,c,a),this._signal("change",c)))},l.prototype.$safeApplyDelta=function(c){var a=this.$lines.length;(c.action=="remove"&&c.start.row<a&&c.end.row<a||c.action=="insert"&&c.start.row<=a)&&this.applyDelta(c)},l.prototype.$splitAndapplyLargeDelta=function(c,a){for(var o=c.lines,u=o.length-a+1,d=c.start.row,w=c.start.column,b=0,E=0;b<u;b=E){E+=a-1;var $=o.slice(b,E);$.push(""),this.applyDelta({start:this.pos(d+b,w),end:this.pos(d+E,w=0),action:c.action,lines:$},!0)}c.lines=o.slice(b),c.start.row=d+b,c.start.column=w,this.applyDelta(c,!0)},l.prototype.revertDelta=function(c){this.$safeApplyDelta({start:this.clonePos(c.start),end:this.clonePos(c.end),action:c.action=="insert"?"remove":"insert",lines:c.lines.slice()})},l.prototype.indexToPosition=function(c,a){for(var o=this.$lines||this.getAllLines(),u=this.getNewLineCharacter().length,d=a||0,w=o.length;d<w;d++)if(c-=o[d].length+u,c<0)return{row:d,column:c+o[d].length+u};return{row:w-1,column:c+o[w-1].length+u}},l.prototype.positionToIndex=function(c,a){for(var o=this.$lines||this.getAllLines(),u=this.getNewLineCharacter().length,d=0,w=Math.min(c.row,o.length),b=a||0;b<w;++b)d+=o[b].length+u;return d+c.column},l.prototype.$split=function(c){return c.split(/\r\n|\r|\n/)},l}();s.prototype.$autoNewLine="",s.prototype.$newLineMode="auto",m.implement(s.prototype,x),r.Document=s}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,v){var m=e("./lib/oop"),y=e("./lib/event_emitter").EventEmitter,x=function(){function h(g,s){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=g;var l=this;this.$worker=function(){if(l.running){for(var c=new Date,a=l.currentLine,o=-1,u=l.doc,d=a;l.lines[a];)a++;var w=u.getLength(),b=0;for(l.running=!1;a<w;){l.$tokenizeRow(a),o=a;do a++;while(l.lines[a]);if(b++,b%5===0&&new Date-c>20){l.running=setTimeout(l.$worker,20);break}}l.currentLine=a,o==-1&&(o=a),d<=o&&l.fireUpdateEvent(d,o)}}}return h.prototype.setTokenizer=function(g){this.tokenizer=g,this.lines=[],this.states=[],this.start(0)},h.prototype.setDocument=function(g){this.doc=g,this.lines=[],this.states=[],this.stop()},h.prototype.fireUpdateEvent=function(g,s){var l={first:g,last:s};this._signal("update",{data:l})},h.prototype.start=function(g){this.currentLine=Math.min(g||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},h.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},h.prototype.$updateOnChange=function(g){var s=g.start.row,l=g.end.row-s;if(l===0)this.lines[s]=null;else if(g.action=="remove")this.lines.splice(s,l+1,null),this.states.splice(s,l+1,null);else{var c=Array(l+1);c.unshift(s,1),this.lines.splice.apply(this.lines,c),this.states.splice.apply(this.states,c)}this.currentLine=Math.min(s,this.currentLine,this.doc.getLength()),this.stop()},h.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},h.prototype.getTokens=function(g){return this.lines[g]||this.$tokenizeRow(g)},h.prototype.getState=function(g){return this.currentLine==g&&this.$tokenizeRow(g),this.states[g]||"start"},h.prototype.$tokenizeRow=function(g){var s=this.doc.getLine(g),l=this.states[g-1],c=this.tokenizer.getLineTokens(s,l,g);return this.states[g]+""!=c.state+""?(this.states[g]=c.state,this.lines[g+1]=null,this.currentLine>g+1&&(this.currentLine=g+1)):this.currentLine==g&&(this.currentLine=g+1),this.lines[g]=c.tokens},h.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},h}();m.implement(x.prototype,y),r.BackgroundTokenizer=x}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,r,v){var m=e("./lib/lang"),y=e("./range").Range,x=function(){function h(g,s,l){l===void 0&&(l="text"),this.setRegexp(g),this.clazz=s,this.type=l,this.docLen=0}return h.prototype.setRegexp=function(g){this.regExp+""!=g+""&&(this.regExp=g,this.cache=[])},h.prototype.update=function(g,s,l,c){if(this.regExp){for(var a=c.firstRow,o=c.lastRow,u={},d=l.$editor.$search,w=d.$isMultilineSearch(l.$editor.getLastSearchOptions()),b=a;b<=o;b++){var E=this.cache[b];if(E==null||l.getValue().length!=this.docLen){if(w){E=[];var $=d.$multiLineForward(l,this.regExp,b,o);if($){var _=$.endRow<=o?$.endRow-1:o;_>b&&(b=_),E.push(new y($.startRow,$.startCol,$.endRow,$.endCol))}E.length>this.MAX_RANGES&&(E=E.slice(0,this.MAX_RANGES))}else E=m.getMatchOffsets(l.getLine(b),this.regExp),E.length>this.MAX_RANGES&&(E=E.slice(0,this.MAX_RANGES)),E=E.map(function(F){return new y(b,F.offset,b,F.offset+F.length)});this.cache[b]=E.length?E:""}if(E.length!==0)for(var C=E.length;C--;){var R=E[C].toScreenRange(l),L=R.toString();u[L]||(u[L]=!0,s.drawSingleLineMarker(g,R,this.clazz,c))}}this.docLen=l.getValue().length}},h}();x.prototype.MAX_RANGES=500,r.SearchHighlight=x}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,r,v){var m=function(){function _(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return _.prototype.addSession=function(C){this.$session=C},_.prototype.add=function(C,R,L){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),R===!1||!this.lastDeltas){this.lastDeltas=[];var F=this.$undoStack.length;F>this.$undoDepth-1&&this.$undoStack.splice(0,F-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),C.id=this.$rev=++this.$maxRev}(C.action=="remove"||C.action=="insert")&&(this.$lastDelta=C),this.lastDeltas.push(C)}},_.prototype.addSelection=function(C,R){this.selections.push({value:C,rev:R||this.$rev})},_.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},_.prototype.markIgnored=function(C,R){R==null&&(R=this.$rev+1);for(var L=this.$undoStack,F=L.length;F--;){var I=L[F][0];if(I.id<=C)break;I.id<R&&(I.ignore=!0)}this.lastDeltas=null},_.prototype.getSelection=function(C,R){for(var L=this.selections,F=L.length;F--;){var I=L[F];if(I.rev<C)return R&&(I=L[F+1]),I}},_.prototype.getRevision=function(){return this.$rev},_.prototype.getDeltas=function(C,R){R==null&&(R=this.$rev+1);for(var L=this.$undoStack,F=null,I=0,H=L.length;H--;){var P=L[H][0];if(P.id<R&&!F&&(F=H+1),P.id<=C){I=H+1;break}}return L.slice(I,F)},_.prototype.getChangedRanges=function(C,R){R==null&&(R=this.$rev+1)},_.prototype.getChangedLines=function(C,R){R==null&&(R=this.$rev+1)},_.prototype.undo=function(C,R){this.lastDeltas=null;var L=this.$undoStack;if(y(L,L.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var F=L.pop(),I=null;return F&&(I=C.undoChanges(F,R),this.$redoStack.push(F),this.$syncRev()),this.$fromUndo=!1,I}},_.prototype.redo=function(C,R){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var L=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);$(this.$redoStack,L),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(H){H[0].id=++this.$maxRev},this)}var F=this.$redoStack.pop(),I=null;return F&&(I=C.redoChanges(F,R),this.$undoStack.push(F),this.$syncRev()),this.$fromUndo=!1,I},_.prototype.$syncRev=function(){var C=this.$undoStack,R=C[C.length-1],L=R&&R[0].id||0;this.$redoStackBaseRev=L,this.$rev=L},_.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},_.prototype.canUndo=function(){return this.$undoStack.length>0},_.prototype.canRedo=function(){return this.$redoStack.length>0},_.prototype.bookmark=function(C){C==null&&(C=this.$rev),this.mark=C},_.prototype.isAtBookmark=function(){return this.$rev===this.mark},_.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},_.prototype.fromJSON=function(C){this.reset(),this.$undoStack=C.$undoStack,this.$redoStack=C.$redoStack},_.prototype.$prettyPrint=function(C){return C?l(C):l(this.$undoStack)+`
|
192
|
+
---
|
193
|
+
`+l(this.$redoStack)},_}();m.prototype.hasUndo=m.prototype.canUndo,m.prototype.hasRedo=m.prototype.canRedo,m.prototype.isClean=m.prototype.isAtBookmark,m.prototype.markClean=m.prototype.bookmark;function y(_,C){for(var R=C;R--;){var L=_[R];if(L&&!L[0].ignore){for(;R<C-1;){var F=o(_[R],_[R+1]);_[R]=F[0],_[R+1]=F[1],R++}return!0}}}var x=e("./range").Range,h=x.comparePoints;x.comparePoints;function g(_){return{row:_.row,column:_.column}}function s(_){return{start:g(_.start),end:g(_.end),action:_.action,lines:_.lines.slice()}}function l(_){if(_=_||this,Array.isArray(_))return _.map(l).join(`
|
194
|
+
`);var C="";return _.action?(C=_.action=="insert"?"+":"-",C+="["+_.lines+"]"):_.value&&(Array.isArray(_.value)?C=_.value.map(c).join(`
|
195
|
+
`):C=c(_.value)),_.start&&(C+=c(_)),(_.id||_.rev)&&(C+=" ("+(_.id||_.rev)+")"),C}function c(_){return _.start.row+":"+_.start.column+"=>"+_.end.row+":"+_.end.column}function a(_,C){var R=_.action=="insert",L=C.action=="insert";if(R&&L)if(h(C.start,_.end)>=0)d(C,_,-1);else if(h(C.start,_.start)<=0)d(_,C,1);else return null;else if(R&&!L)if(h(C.start,_.end)>=0)d(C,_,-1);else if(h(C.end,_.start)<=0)d(_,C,-1);else return null;else if(!R&&L)if(h(C.start,_.start)>=0)d(C,_,1);else if(h(C.start,_.start)<=0)d(_,C,1);else return null;else if(!R&&!L)if(h(C.start,_.start)>=0)d(C,_,1);else if(h(C.end,_.start)<=0)d(_,C,-1);else return null;return[C,_]}function o(_,C){for(var R=_.length;R--;)for(var L=0;L<C.length;L++)if(!a(_[R],C[L])){for(;R<_.length;){for(;L--;)a(C[L],_[R]);L=C.length,R++}return[_,C]}return _.selectionBefore=C.selectionBefore=_.selectionAfter=C.selectionAfter=null,[C,_]}function u(_,C){var R=_.action=="insert",L=C.action=="insert";if(R&&L)h(_.start,C.start)<0?d(C,_,1):d(_,C,1);else if(R&&!L)h(_.start,C.end)>=0?d(_,C,-1):(h(_.start,C.start)<=0||d(_,x.fromPoints(C.start,_.start),-1),d(C,_,1));else if(!R&&L)h(C.start,_.end)>=0?d(C,_,-1):(h(C.start,_.start)<=0||d(C,x.fromPoints(_.start,C.start),-1),d(_,C,1));else if(!R&&!L)if(h(C.start,_.end)>=0)d(C,_,-1);else if(h(C.end,_.start)<=0)d(_,C,-1);else{var F,I;return h(_.start,C.start)<0&&(F=_,_=b(_,C.start)),h(_.end,C.end)>0&&(I=b(_,C.end)),w(C.end,_.start,_.end,-1),I&&!F&&(_.lines=I.lines,_.start=I.start,_.end=I.end,I=_),[C,F,I].filter(Boolean)}return[C,_]}function d(_,C,R){w(_.start,C.start,C.end,R),w(_.end,C.start,C.end,R)}function w(_,C,R,L){_.row==(L==1?C:R).row&&(_.column+=L*(R.column-C.column)),_.row+=L*(R.row-C.row)}function b(_,C){var R=_.lines,L=_.end;_.end=g(C);var F=_.end.row-_.start.row,I=R.splice(F,R.length),H=F?C.column:C.column-_.start.column;R.push(I[0].substring(0,H)),I[0]=I[0].substr(H);var P={start:g(C),end:L,lines:I,action:_.action};return P}function E(_,C){C=s(C);for(var R=_.length;R--;){for(var L=_[R],F=0;F<L.length;F++){var I=L[F],H=u(I,C);C=H[0],H.length!=2&&(H[2]?(L.splice(F+1,1,H[1],H[2]),F++):H[1]||(L.splice(F,1),F--))}L.length||_.splice(R,1)}return _}function $(_,C){for(var R=0;R<C.length;R++)for(var L=C[R],F=0;F<L.length;F++)E(_,L[F])}r.UndoManager=m}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,r,v){var m=e("../range").Range,y=function(){function x(h,g){this.foldData=h,Array.isArray(g)?this.folds=g:g=this.folds=[g];var s=g[g.length-1];this.range=new m(g[0].start.row,g[0].start.column,s.end.row,s.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(l){l.setFoldLine(this)},this)}return x.prototype.shiftRow=function(h){this.start.row+=h,this.end.row+=h,this.folds.forEach(function(g){g.start.row+=h,g.end.row+=h})},x.prototype.addFold=function(h){if(h.sameRow){if(h.start.row<this.startRow||h.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(h),this.folds.sort(function(g,s){return-g.range.compareEnd(s.start.row,s.start.column)}),this.range.compareEnd(h.start.row,h.start.column)>0?(this.end.row=h.end.row,this.end.column=h.end.column):this.range.compareStart(h.end.row,h.end.column)<0&&(this.start.row=h.start.row,this.start.column=h.start.column)}else if(h.start.row==this.end.row)this.folds.push(h),this.end.row=h.end.row,this.end.column=h.end.column;else if(h.end.row==this.start.row)this.folds.unshift(h),this.start.row=h.start.row,this.start.column=h.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");h.foldLine=this},x.prototype.containsRow=function(h){return h>=this.start.row&&h<=this.end.row},x.prototype.walk=function(h,g,s){var l=0,c=this.folds,a,o,u,d=!0;g==null&&(g=this.end.row,s=this.end.column);for(var w=0;w<c.length;w++){if(a=c[w],o=a.range.compareStart(g,s),o==-1){h(null,g,s,l,d);return}if(u=h(null,a.start.row,a.start.column,l,d),u=!u&&h(a.placeholder,a.start.row,a.start.column,l),u||o===0)return;d=!a.sameRow,l=a.end.column}h(null,g,s,l,d)},x.prototype.getNextFoldTo=function(h,g){for(var s,l,c=0;c<this.folds.length;c++){if(s=this.folds[c],l=s.range.compareEnd(h,g),l==-1)return{fold:s,kind:"after"};if(l===0)return{fold:s,kind:"inside"}}return null},x.prototype.addRemoveChars=function(h,g,s){var l=this.getNextFoldTo(h,g),c,a;if(l){if(c=l.fold,l.kind=="inside"&&c.start.column!=g&&c.start.row!=h)window.console&&window.console.log(h,g,c);else if(c.start.row==h){a=this.folds;var o=a.indexOf(c);for(o===0&&(this.start.column+=s),o;o<a.length;o++){if(c=a[o],c.start.column+=s,!c.sameRow)return;c.end.column+=s}this.end.column+=s}}},x.prototype.split=function(h,g){var s=this.getNextFoldTo(h,g);if(!s||s.kind=="inside")return null;var l=s.fold,c=this.folds,a=this.foldData,o=c.indexOf(l),u=c[o-1];this.end.row=u.end.row,this.end.column=u.end.column,c=c.splice(o,c.length-o);var d=new x(a,c);return a.splice(a.indexOf(this)+1,0,d),d},x.prototype.merge=function(h){for(var g=h.folds,s=0;s<g.length;s++)this.addFold(g[s]);var l=this.foldData;l.splice(l.indexOf(h),1)},x.prototype.toString=function(){var h=[this.range.toString()+": ["];return this.folds.forEach(function(g){h.push(" "+g.toString())}),h.push("]"),h.join(`
|
196
|
+
`)},x.prototype.idxToPosition=function(h){for(var g=0,s=0;s<this.folds.length;s++){var l=this.folds[s];if(h-=l.start.column-g,h<0)return{row:l.start.row,column:l.start.column+h};if(h-=l.placeholder.length,h<0)return l.start;g=l.end.column}return{row:this.end.row,column:this.end.column+h}},x}();r.FoldLine=y}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,r,v){var m=e("./range").Range,y=m.comparePoints,x=function(){function h(){this.ranges=[],this.$bias=1}return h.prototype.pointIndex=function(g,s,l){for(var c=this.ranges,a=l||0;a<c.length;a++){var o=c[a],u=y(g,o.end);if(!(u>0)){var d=y(g,o.start);return u===0?s&&d!==0?-a-2:a:d>0||d===0&&!s?a:-a-1}}return-a-1},h.prototype.add=function(g){var s=!g.isEmpty(),l=this.pointIndex(g.start,s);l<0&&(l=-l-1);var c=this.pointIndex(g.end,s,l);return c<0?c=-c-1:c++,this.ranges.splice(l,c-l,g)},h.prototype.addList=function(g){for(var s=[],l=g.length;l--;)s.push.apply(s,this.add(g[l]));return s},h.prototype.substractPoint=function(g){var s=this.pointIndex(g);if(s>=0)return this.ranges.splice(s,1)},h.prototype.merge=function(){var g=[],s=this.ranges;s=s.sort(function(u,d){return y(u.start,d.start)});for(var l=s[0],c,a=1;a<s.length;a++){c=l,l=s[a];var o=y(c.end,l.start);o<0||o==0&&!c.isEmpty()&&!l.isEmpty()||(y(c.end,l.end)<0&&(c.end.row=l.end.row,c.end.column=l.end.column),s.splice(a,1),g.push(l),l=c,a--)}return this.ranges=s,g},h.prototype.contains=function(g,s){return this.pointIndex({row:g,column:s})>=0},h.prototype.containsPoint=function(g){return this.pointIndex(g)>=0},h.prototype.rangeAtPoint=function(g){var s=this.pointIndex(g);if(s>=0)return this.ranges[s]},h.prototype.clipRows=function(g,s){var l=this.ranges;if(l[0].start.row>s||l[l.length-1].start.row<g)return[];var c=this.pointIndex({row:g,column:0});c<0&&(c=-c-1);var a=this.pointIndex({row:s,column:0},c);a<0&&(a=-a-1);for(var o=[],u=c;u<a;u++)o.push(l[u]);return o},h.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},h.prototype.attach=function(g){this.session&&this.detach(),this.session=g,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},h.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},h.prototype.$onChange=function(g){for(var s=g.start,l=g.end,c=s.row,a=l.row,o=this.ranges,u=0,d=o.length;u<d;u++){var w=o[u];if(w.end.row>=c)break}if(g.action=="insert")for(var b=a-c,E=-s.column+l.column;u<d;u++){var w=o[u];if(w.start.row>c)break;if(w.start.row==c&&w.start.column>=s.column&&(w.start.column==s.column&&this.$bias<=0||(w.start.column+=E,w.start.row+=b)),w.end.row==c&&w.end.column>=s.column){if(w.end.column==s.column&&this.$bias<0)continue;w.end.column==s.column&&E>0&&u<d-1&&w.end.column>w.start.column&&w.end.column==o[u+1].start.column&&(w.end.column-=E),w.end.column+=E,w.end.row+=b}}else for(var b=c-a,E=s.column-l.column;u<d;u++){var w=o[u];if(w.start.row>a)break;w.end.row<a&&(c<w.end.row||c==w.end.row&&s.column<w.end.column)?(w.end.row=c,w.end.column=s.column):w.end.row==a?w.end.column<=l.column?(b||w.end.column>s.column)&&(w.end.column=s.column,w.end.row=s.row):(w.end.column+=E,w.end.row+=b):w.end.row>a&&(w.end.row+=b),w.start.row<a&&(c<w.start.row||c==w.start.row&&s.column<w.start.column)?(w.start.row=c,w.start.column=s.column):w.start.row==a?w.start.column<=l.column?(b||w.start.column>s.column)&&(w.start.column=s.column,w.start.row=s.row):(w.start.column+=E,w.start.row+=b):w.start.row>a&&(w.start.row+=b)}if(b!=0&&u<d)for(;u<d;u++){var w=o[u];w.start.row+=b,w.end.row+=b}},h}();x.prototype.comparePoints=y,r.RangeList=x}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(e,r,v){var m=this&&this.__extends||function(){var c=function(a,o){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var w in d)Object.prototype.hasOwnProperty.call(d,w)&&(u[w]=d[w])},c(a,o)};return function(a,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");c(a,o);function u(){this.constructor=a}a.prototype=o===null?Object.create(o):(u.prototype=o.prototype,new u)}}(),y=e("../range_list").RangeList,x=function(c){m(a,c);function a(o,u){var d=c.call(this)||this;return d.foldLine=null,d.placeholder=u,d.range=o,d.start=o.start,d.end=o.end,d.sameRow=o.start.row==o.end.row,d.subFolds=d.ranges=[],d}return a.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},a.prototype.setFoldLine=function(o){this.foldLine=o,this.subFolds.forEach(function(u){u.setFoldLine(o)})},a.prototype.clone=function(){var o=this.range.clone(),u=new a(o,this.placeholder);return this.subFolds.forEach(function(d){u.subFolds.push(d.clone())}),u.collapseChildren=this.collapseChildren,u},a.prototype.addSubFold=function(o){if(!this.range.isEqual(o)){g(o,this.start);for(var u=o.start.row,d=o.start.column,w=0,b=-1;w<this.subFolds.length&&(b=this.subFolds[w].range.compare(u,d),b==1);w++);var E=this.subFolds[w],$=0;if(b==0){if(E.range.containsRange(o))return E.addSubFold(o);$=1}for(var u=o.range.end.row,d=o.range.end.column,_=w,b=-1;_<this.subFolds.length&&(b=this.subFolds[_].range.compare(u,d),b==1);_++);b==0&&_++;for(var C=this.subFolds.splice(w,_-w,o),R=b==0?C.length-1:C.length,L=$;L<R;L++)o.addSubFold(C[L]);return o.setFoldLine(this.foldLine),o}},a.prototype.restoreRange=function(o){return l(o,this.start)},a}(y);function h(c,a){c.row-=a.row,c.row==0&&(c.column-=a.column)}function g(c,a){h(c.start,a),h(c.end,a)}function s(c,a){c.row==0&&(c.column+=a.column),c.row+=a.row}function l(c,a){s(c.start,a),s(c.end,a)}r.Fold=x}),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,v){var m=e("../range").Range,y=e("./fold_line").FoldLine,x=e("./fold").Fold,h=e("../token_iterator").TokenIterator,g=e("../mouse/mouse_event").MouseEvent;function s(){this.getFoldAt=function(l,c,a){var o=this.getFoldLine(l);if(!o)return null;for(var u=o.folds,d=0;d<u.length;d++){var w=u[d].range;if(w.contains(l,c)){if(a==1&&w.isEnd(l,c)&&!w.isEmpty()||a==-1&&w.isStart(l,c)&&!w.isEmpty())continue;return u[d]}}},this.getFoldsInRange=function(l){var c=l.start,a=l.end,o=this.$foldData,u=[];c.column+=1,a.column-=1;for(var d=0;d<o.length;d++){var w=o[d].range.compareRange(l);if(w!=2){if(w==-2)break;for(var b=o[d].folds,E=0;E<b.length;E++){var $=b[E];if(w=$.range.compareRange(l),w==-2)break;if(w!=2){if(w==42)break;u.push($)}}}}return c.column-=1,a.column+=1,u},this.getFoldsInRangeList=function(l){if(Array.isArray(l)){var c=[];l.forEach(function(o){c=c.concat(this.getFoldsInRange(o))},this)}else var c=this.getFoldsInRange(l);return c},this.getAllFolds=function(){for(var l=[],c=this.$foldData,a=0;a<c.length;a++)for(var o=0;o<c[a].folds.length;o++)l.push(c[a].folds[o]);return l},this.getFoldStringAt=function(l,c,a,o){if(o=o||this.getFoldLine(l),!o)return null;for(var u={end:{column:0}},d,w,b=0;b<o.folds.length;b++){w=o.folds[b];var E=w.range.compareEnd(l,c);if(E==-1){d=this.getLine(w.start.row).substring(u.end.column,w.start.column);break}else if(E===0)return null;u=w}return d||(d=this.getLine(w.start.row).substring(u.end.column)),a==-1?d.substring(0,c-u.end.column):a==1?d.substring(c-u.end.column):d},this.getFoldLine=function(l,c){var a=this.$foldData,o=0;for(c&&(o=a.indexOf(c)),o==-1&&(o=0),o;o<a.length;o++){var u=a[o];if(u.start.row<=l&&u.end.row>=l)return u;if(u.end.row>l)return null}return null},this.getNextFoldLine=function(l,c){var a=this.$foldData,o=0;for(c&&(o=a.indexOf(c)),o==-1&&(o=0),o;o<a.length;o++){var u=a[o];if(u.end.row>=l)return u}return null},this.getFoldedRowCount=function(l,c){for(var a=this.$foldData,o=c-l+1,u=0;u<a.length;u++){var d=a[u],w=d.end.row,b=d.start.row;if(w>=c){b<c&&(b>=l?o-=c-b:o=0);break}else w>=l&&(b>=l?o-=w-b:o-=w-l+1)}return o},this.$addFoldLine=function(l){return this.$foldData.push(l),this.$foldData.sort(function(c,a){return c.start.row-a.start.row}),l},this.addFold=function(l,c){var a=this.$foldData,o=!1,u;l instanceof x?u=l:(u=new x(c,l),u.collapseChildren=c.collapseChildren),this.$clipRangeToDocument(u.range);var d=u.start.row,w=u.start.column,b=u.end.row,E=u.end.column,$=this.getFoldAt(d,w,1),_=this.getFoldAt(b,E,-1);if($&&_==$)return $.addSubFold(u);$&&!$.range.isStart(d,w)&&this.removeFold($),_&&!_.range.isEnd(b,E)&&this.removeFold(_);var C=this.getFoldsInRange(u.range);C.length>0&&(this.removeFolds(C),u.collapseChildren||C.forEach(function(I){u.addSubFold(I)}));for(var R=0;R<a.length;R++){var L=a[R];if(b==L.start.row){L.addFold(u),o=!0;break}else if(d==L.end.row){if(L.addFold(u),o=!0,!u.sameRow){var F=a[R+1];if(F&&F.start.row==b){L.merge(F);break}}break}else if(b<=L.start.row)break}return o||(L=this.$addFoldLine(new y(this.$foldData,u))),this.$useWrapMode?this.$updateWrapData(L.start.row,L.start.row):this.$updateRowLengthCache(L.start.row,L.start.row),this.$modified=!0,this._signal("changeFold",{data:u,action:"add"}),u},this.addFolds=function(l){l.forEach(function(c){this.addFold(c)},this)},this.removeFold=function(l){var c=l.foldLine,a=c.start.row,o=c.end.row,u=this.$foldData,d=c.folds;if(d.length==1)u.splice(u.indexOf(c),1);else if(c.range.isEnd(l.end.row,l.end.column))d.pop(),c.end.row=d[d.length-1].end.row,c.end.column=d[d.length-1].end.column;else if(c.range.isStart(l.start.row,l.start.column))d.shift(),c.start.row=d[0].start.row,c.start.column=d[0].start.column;else if(l.sameRow)d.splice(d.indexOf(l),1);else{var w=c.split(l.start.row,l.start.column);d=w.folds,d.shift(),w.start.row=d[0].start.row,w.start.column=d[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(a,o):this.$updateRowLengthCache(a,o)),this.$modified=!0,this._signal("changeFold",{data:l,action:"remove"})},this.removeFolds=function(l){for(var c=[],a=0;a<l.length;a++)c.push(l[a]);c.forEach(function(o){this.removeFold(o)},this),this.$modified=!0},this.expandFold=function(l){this.removeFold(l),l.subFolds.forEach(function(c){l.restoreRange(c),this.addFold(c)},this),l.collapseChildren>0&&this.foldAll(l.start.row+1,l.end.row,l.collapseChildren-1),l.subFolds=[]},this.expandFolds=function(l){l.forEach(function(c){this.expandFold(c)},this)},this.unfold=function(l,c){var a,o;if(l==null)a=new m(0,0,this.getLength(),0),c==null&&(c=!0);else if(typeof l=="number")a=new m(l,0,l,this.getLine(l).length);else if("row"in l)a=m.fromPoints(l,l);else{if(Array.isArray(l))return o=[],l.forEach(function(d){o=o.concat(this.unfold(d))},this),o;a=l}o=this.getFoldsInRangeList(a);for(var u=o;o.length==1&&m.comparePoints(o[0].start,a.start)<0&&m.comparePoints(o[0].end,a.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(a);if(c!=!1?this.removeFolds(o):this.expandFolds(o),u.length)return u},this.isRowFolded=function(l,c){return!!this.getFoldLine(l,c)},this.getRowFoldEnd=function(l,c){var a=this.getFoldLine(l,c);return a?a.end.row:l},this.getRowFoldStart=function(l,c){var a=this.getFoldLine(l,c);return a?a.start.row:l},this.getFoldDisplayLine=function(l,c,a,o,u){o==null&&(o=l.start.row),u==null&&(u=0),c==null&&(c=l.end.row),a==null&&(a=this.getLine(c).length);var d=this.doc,w="";return l.walk(function(b,E,$,_){if(!(E<o)){if(E==o){if($<u)return;_=Math.max(u,_)}b!=null?w+=b:w+=d.getLine(E).substring(_,$)}},c,a),w},this.getDisplayLine=function(l,c,a,o){var u=this.getFoldLine(l);if(u)return this.getFoldDisplayLine(u,l,c,a,o);var d;return d=this.doc.getLine(l),d.substring(o||0,c||d.length)},this.$cloneFoldData=function(){var l=[];return l=this.$foldData.map(function(c){var a=c.folds.map(function(o){return o.clone()});return new y(l,a)}),l},this.toggleFold=function(l){var c=this.selection,a=c.getRange(),o,u;if(a.isEmpty()){var d=a.start;if(o=this.getFoldAt(d.row,d.column),o){this.expandFold(o);return}else(u=this.findMatchingBracket(d))?a.comparePoint(u)==1?a.end=u:(a.start=u,a.start.column++,a.end.column--):(u=this.findMatchingBracket({row:d.row,column:d.column+1}))?(a.comparePoint(u)==1?a.end=u:a.start=u,a.start.column++):a=this.getCommentFoldRange(d.row,d.column)||a}else{var w=this.getFoldsInRange(a);if(l&&w.length){this.expandFolds(w);return}else w.length==1&&(o=w[0])}if(o||(o=this.getFoldAt(a.start.row,a.start.column)),o&&o.range.toString()==a.toString()){this.expandFold(o);return}var b="...";if(!a.isMultiLine()){if(b=this.getTextRange(a),b.length<4)return;b=b.trim().substring(0,2)+".."}this.addFold(b,a)},this.getCommentFoldRange=function(l,c,a){var o=new h(this,l,c),u=o.getCurrentToken(),d=u&&u.type;if(u&&/^comment|string/.test(d)){d=d.match(/comment|string/)[0],d=="comment"&&(d+="|doc-start|\\.doc");var w=new RegExp(d),b=new m;if(a!=1){do u=o.stepBackward();while(u&&w.test(u.type));u=o.stepForward()}b.start.row=o.getCurrentTokenRow(),b.start.column=o.getCurrentTokenColumn()+u.value.length,o=new h(this,l,c);var E=this.getState(o.$row);if(a!=-1){var $=-1;do if(u=o.stepForward(),$==-1){var _=this.getState(o.$row);E.toString()!==_.toString()&&($=o.$row)}else if(o.$row>$)break;while(u&&w.test(u.type));u=o.stepBackward()}else u=o.getCurrentToken();return b.end.row=o.getCurrentTokenRow(),b.end.column=o.getCurrentTokenColumn(),b}},this.foldAll=function(l,c,a,o){a==null&&(a=1e5);var u=this.foldWidgets;if(u){c=c||this.getLength(),l=l||0;for(var d=l;d<c;d++)if(u[d]==null&&(u[d]=this.getFoldWidget(d)),u[d]=="start"&&!(o&&!o(d))){var w=this.getFoldWidgetRange(d);w&&w.isMultiLine()&&w.end.row<=c&&w.start.row>=l&&(d=w.end.row,w.collapseChildren=a,this.addFold("...",w))}}},this.foldToLevel=function(l){for(this.foldAll();l-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var l=this;this.foldAll(null,null,null,function(c){for(var a=l.getTokens(c),o=0;o<a.length;o++){var u=a[o];if(!(u.type=="text"&&/^\s+$/.test(u.value)))return!!/comment/.test(u.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(l){if(!this.$foldStyles[l])throw new Error("invalid fold style: "+l+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=l){this.$foldStyle=l,l=="manual"&&this.unfold();var c=this.$foldMode;this.$setFolding(null),this.$setFolding(c)}},this.$setFolding=function(l){if(this.$foldMode!=l){if(this.$foldMode=l,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!l||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=l.getFoldWidget.bind(l,this,this.$foldStyle),this.getFoldWidgetRange=l.getFoldWidgetRange.bind(l,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(l,c){var a=this.foldWidgets;if(!a||c&&a[l])return{};for(var o=l-1,u;o>=0;){var d=a[o];if(d==null&&(d=a[o]=this.getFoldWidget(o)),d=="start"){var w=this.getFoldWidgetRange(o);if(u||(u=w),w&&w.end.row>=l)break}o--}return{range:o!==-1&&w,firstRange:u}},this.onFoldWidgetClick=function(l,c){c instanceof g&&(c=c.domEvent);var a={children:c.shiftKey,all:c.ctrlKey||c.metaKey,siblings:c.altKey},o=this.$toggleFoldWidget(l,a);if(!o){var u=c.target||c.srcElement;u&&/ace_fold-widget/.test(u.className)&&(u.className+=" ace_invalid")}},this.$toggleFoldWidget=function(l,c){if(this.getFoldWidget){var a=this.getFoldWidget(l),o=this.getLine(l),u=a==="end"?-1:1,d=this.getFoldAt(l,u===-1?0:o.length,u);if(d)return c.children||c.all?this.removeFold(d):this.expandFold(d),d;var w=this.getFoldWidgetRange(l,!0);if(w&&!w.isMultiLine()&&(d=this.getFoldAt(w.start.row,w.start.column,1),d&&w.isEqual(d.range)))return this.removeFold(d),d;if(c.siblings){var b=this.getParentFoldRangeData(l);if(b.range)var E=b.range.start.row+1,$=b.range.end.row;this.foldAll(E,$,c.all?1e4:0)}else c.children?($=w?w.end.row:this.getLength(),this.foldAll(l+1,$,c.all?1e4:0)):w&&(c.all&&(w.collapseChildren=1e4),this.addFold("...",w));return w}},this.toggleFoldWidget=function(l){var c=this.selection.getCursor().row;c=this.getRowFoldStart(c);var a=this.$toggleFoldWidget(c,{});if(!a){var o=this.getParentFoldRangeData(c,!0);if(a=o.range||o.firstRange,a){c=a.start.row;var u=this.getFoldAt(c,this.getLine(c).length,1);u?this.removeFold(u):this.addFold("...",a)}}},this.updateFoldWidgets=function(l){var c=l.start.row,a=l.end.row-c;if(a===0)this.foldWidgets[c]=null;else if(l.action=="remove")this.foldWidgets.splice(c,a+1,null);else{var o=Array(a+1);o.unshift(c,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},this.tokenizerUpdateFoldWidgets=function(l){var c=l.data;c.first!=c.last&&this.foldWidgets.length>c.first&&this.foldWidgets.splice(c.first,this.foldWidgets.length)}}r.Folding=s}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,r,v){var m=e("../token_iterator").TokenIterator,y=e("../range").Range;function x(){this.findMatchingBracket=function(h,g){if(h.column==0)return null;var s=g||this.getLine(h.row).charAt(h.column-1);if(s=="")return null;var l=s.match(/([\(\[\{])|([\)\]\}])/);return l?l[1]?this.$findClosingBracket(l[1],h):this.$findOpeningBracket(l[2],h):null},this.getBracketRange=function(h){var g=this.getLine(h.row),s=!0,l,c=g.charAt(h.column-1),a=c&&c.match(/([\(\[\{])|([\)\]\}])/);if(a||(c=g.charAt(h.column),h={row:h.row,column:h.column+1},a=c&&c.match(/([\(\[\{])|([\)\]\}])/),s=!1),!a)return null;if(a[1]){var o=this.$findClosingBracket(a[1],h);if(!o)return null;l=y.fromPoints(h,o),s||(l.end.column++,l.start.column--),l.cursor=l.end}else{var o=this.$findOpeningBracket(a[2],h);if(!o)return null;l=y.fromPoints(o,h),s||(l.start.column++,l.end.column--),l.cursor=l.start}return l},this.getMatchingBracketRanges=function(h,g){var s=this.getLine(h.row),l=/([\(\[\{])|([\)\]\}])/,c=!g&&s.charAt(h.column-1),a=c&&c.match(l);if(a||(c=(g===void 0||g)&&s.charAt(h.column),h={row:h.row,column:h.column+1},a=c&&c.match(l)),!a)return null;var o=new y(h.row,h.column-1,h.row,h.column),u=a[1]?this.$findClosingBracket(a[1],h):this.$findOpeningBracket(a[2],h);if(!u)return[o];var d=new y(u.row,u.column,u.row,u.column+1);return[o,d]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(h,g,s){var l=this.$brackets[h],c=1,a=new m(this,g.row,g.column),o=a.getCurrentToken();if(o||(o=a.stepForward()),!!o){s||(s=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var u=g.column-a.getCurrentTokenColumn()-2,d=o.value;;){for(;u>=0;){var w=d.charAt(u);if(w==l){if(c-=1,c==0)return{row:a.getCurrentTokenRow(),column:u+a.getCurrentTokenColumn()}}else w==h&&(c+=1);u-=1}do o=a.stepBackward();while(o&&!s.test(o.type));if(o==null)break;d=o.value,u=d.length-1}return null}},this.$findClosingBracket=function(h,g,s){var l=this.$brackets[h],c=1,a=new m(this,g.row,g.column),o=a.getCurrentToken();if(o||(o=a.stepForward()),!!o){s||(s=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var u=g.column-a.getCurrentTokenColumn();;){for(var d=o.value,w=d.length;u<w;){var b=d.charAt(u);if(b==l){if(c-=1,c==0)return{row:a.getCurrentTokenRow(),column:u+a.getCurrentTokenColumn()}}else b==h&&(c+=1);u+=1}do o=a.stepForward();while(o&&!s.test(o.type));if(o==null)break;u=0}return null}},this.getMatchingTags=function(h){var g=new m(this,h.row,h.column),s=this.$findTagName(g);if(s){var l=g.stepBackward();return l.value==="<"?this.$findClosingTag(g,s):this.$findOpeningTag(g,s)}},this.$findTagName=function(h){var g=h.getCurrentToken(),s=!1,l=!1;if(g&&g.type.indexOf("tag-name")===-1)do l?g=h.stepBackward():g=h.stepForward(),g&&(g.value==="/>"?l=!0:g.type.indexOf("tag-name")!==-1&&(s=!0));while(g&&!s);return g},this.$findClosingTag=function(h,g){var s,l=g.value,c=g.value,a=0,o=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);g=h.stepForward();var u=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+g.value.length),d=!1;do{if(s=g,s.type.indexOf("tag-close")!==-1&&!d){var w=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);d=!0}if(g=h.stepForward(),g){if(g.value===">"&&!d){var w=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);d=!0}if(g.type.indexOf("tag-name")!==-1){if(l=g.value,c===l){if(s.value==="<")a++;else if(s.value==="</"&&(a--,a<0)){h.stepBackward();var b=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2);g=h.stepForward();var E=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+g.value.length);if(g.type.indexOf("tag-close")===-1&&(g=h.stepForward()),g&&g.value===">")var $=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);else return}}}else if(c===l&&g.value==="/>"&&(a--,a<0))var b=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2),E=b,$=E,w=new y(u.end.row,u.end.column,u.end.row,u.end.column+1)}}while(g&&a>=0);if(o&&w&&b&&$&&u&&E)return{openTag:new y(o.start.row,o.start.column,w.end.row,w.end.column),closeTag:new y(b.start.row,b.start.column,$.end.row,$.end.column),openTagName:u,closeTagName:E}},this.$findOpeningTag=function(h,g){var s=h.getCurrentToken(),l=g.value,c=0,a=h.getCurrentTokenRow(),o=h.getCurrentTokenColumn(),u=o+2,d=new y(a,o,a,u);h.stepForward();var w=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+g.value.length);if(g.type.indexOf("tag-close")===-1&&(g=h.stepForward()),!(!g||g.value!==">")){var b=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);h.stepBackward(),h.stepBackward();do if(g=s,a=h.getCurrentTokenRow(),o=h.getCurrentTokenColumn(),u=o+g.value.length,s=h.stepBackward(),g){if(g.type.indexOf("tag-name")!==-1){if(l===g.value)if(s.value==="<"){if(c++,c>0){var E=new y(a,o,a,u),$=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);do g=h.stepForward();while(g&&g.value!==">");var _=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1)}}else s.value==="</"&&c--}else if(g.value==="/>"){for(var C=0,R=s;R;){if(R.type.indexOf("tag-name")!==-1&&R.value===l){c--;break}else if(R.value==="<")break;R=h.stepBackward(),C++}for(var L=0;L<C;L++)h.stepForward()}}while(s&&c<=0);if($&&_&&d&&b&&E&&w)return{openTag:new y($.start.row,$.start.column,_.end.row,_.end.column),closeTag:new y(d.start.row,d.start.column,b.end.row,b.end.column),openTagName:E,closeTagName:w}}}}r.BracketMatch=x}),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,v){var m=e("./lib/oop"),y=e("./lib/lang"),x=e("./bidihandler").BidiHandler,h=e("./config"),g=e("./lib/event_emitter").EventEmitter,s=e("./selection").Selection,l=e("./mode/text").Mode,c=e("./range").Range,a=e("./line_widgets").LineWidgets,o=e("./document").Document,u=e("./background_tokenizer").BackgroundTokenizer,d=e("./search_highlight").SearchHighlight,w=e("./undomanager").UndoManager,b=function(){function P(O,S){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++P.$uid,this.$foldData.toString=function(){return this.join(`
|
197
|
+
`)},this.bgTokenizer=new u(new l().getTokenizer(),this);var A=this;this.bgTokenizer.on("update",function(N){A._signal("tokenizerUpdate",N)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof O!="object"||!O.getLine)&&(O=new o(O)),this.setDocument(O),this.selection=new s(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new x(this),h.resetOptions(this),this.setMode(S),h._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return P.prototype.$initOperationListeners=function(){var O=this;this.curOp=null,this.on("change",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.docChanged=!0},!0),this.on("changeSelection",function(){O.curOp||(O.startOperation(),O.curOp.selectionBefore=O.$lastSel),O.curOp.selectionChanged=!0},!0),this.$operationResetTimer=y.delayedCall(this.endOperation.bind(this,!0))},P.prototype.startOperation=function(O){if(this.curOp){if(!O||this.curOp.command)return;this.prevOp=this.curOp}O||(O={}),this.$operationResetTimer.schedule(),this.curOp={command:O.command||{},args:O.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",O)},P.prototype.endOperation=function(O){if(this.curOp){if(O&&O.returnValue===!1){this.curOp=null,this._signal("endOperation",O);return}if(O==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var S=this.selection.toJSON();this.curOp.selectionAfter=S,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(S),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",O)}},P.prototype.setDocument=function(O){this.doc&&this.doc.off("change",this.$onChange),this.doc=O,O.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},P.prototype.getDocument=function(){return this.doc},Object.defineProperty(P.prototype,"widgetManager",{get:function(){var O=new a(this);return this.widgetManager=O,this.$editor&&O.attach(this.$editor),O},set:function(O){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:O})},enumerable:!1,configurable:!0}),P.prototype.$resetRowCache=function(O){if(!O){this.$docRowCache=[],this.$screenRowCache=[];return}var S=this.$docRowCache.length,A=this.$getRowCacheIndex(this.$docRowCache,O)+1;S>A&&(this.$docRowCache.splice(A,S),this.$screenRowCache.splice(A,S))},P.prototype.$getRowCacheIndex=function(O,S){for(var A=0,N=O.length-1;A<=N;){var B=A+N>>1,U=O[B];if(S>U)A=B+1;else if(S<U)N=B-1;else return B}return A-1},P.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},P.prototype.onChangeFold=function(O){var S=O.data;this.$resetRowCache(S.start.row)},P.prototype.onChange=function(O){this.$modified=!0,this.$bidiHandler.onChange(O),this.$resetRowCache(O.start.row);var S=this.$updateInternalDataOnChange(O);!this.$fromUndo&&this.$undoManager&&(S&&S.length&&(this.$undoManager.add({action:"removeFolds",folds:S},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(O,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(O),this._signal("change",O)},P.prototype.onSelectionChange=function(){this._signal("changeSelection")},P.prototype.setValue=function(O){this.doc.setValue(O),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},P.fromJSON=function(O){typeof O=="string"&&(O=JSON.parse(O));var S=new w;S.$undoStack=O.history.undo,S.$redoStack=O.history.redo,S.mark=O.history.mark,S.$rev=O.history.rev;var A=new P(O.value);return O.folds.forEach(function(N){A.addFold("...",c.fromPoints(N.start,N.end))}),A.setAnnotations(O.annotations),A.setBreakpoints(O.breakpoints),A.setMode(O.mode),A.setScrollLeft(O.scrollLeft),A.setScrollTop(O.scrollTop),A.setUndoManager(S),A.selection.fromJSON(O.selection),A},P.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(O){return O.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},P.prototype.toString=function(){return this.doc.getValue()},P.prototype.getSelection=function(){return this.selection},P.prototype.getState=function(O){return this.bgTokenizer.getState(O)},P.prototype.getTokens=function(O){return this.bgTokenizer.getTokens(O)},P.prototype.getTokenAt=function(O,S){var A=this.bgTokenizer.getTokens(O),N,B=0;if(S==null){var U=A.length-1;B=this.getLine(O).length}else for(var U=0;U<A.length&&(B+=A[U].value.length,!(B>=S));U++);return N=A[U],N?(N.index=U,N.start=B-N.value.length,N):null},P.prototype.setUndoManager=function(O){if(this.$undoManager=O,this.$informUndoManager&&this.$informUndoManager.cancel(),O){var S=this;O.addSession(this),this.$syncInformUndoManager=function(){S.$informUndoManager.cancel(),S.mergeUndoDeltas=!1},this.$informUndoManager=y.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},P.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},P.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},P.prototype.getTabString=function(){return this.getUseSoftTabs()?y.stringRepeat(" ",this.getTabSize()):" "},P.prototype.setUseSoftTabs=function(O){this.setOption("useSoftTabs",O)},P.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},P.prototype.setTabSize=function(O){this.setOption("tabSize",O)},P.prototype.getTabSize=function(){return this.$tabSize},P.prototype.isTabStop=function(O){return this.$useSoftTabs&&O.column%this.$tabSize===0},P.prototype.setNavigateWithinSoftTabs=function(O){this.setOption("navigateWithinSoftTabs",O)},P.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},P.prototype.setOverwrite=function(O){this.setOption("overwrite",O)},P.prototype.getOverwrite=function(){return this.$overwrite},P.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},P.prototype.addGutterDecoration=function(O,S){this.$decorations[O]||(this.$decorations[O]=""),this.$decorations[O]+=" "+S,this._signal("changeBreakpoint",{})},P.prototype.removeGutterDecoration=function(O,S){this.$decorations[O]=(this.$decorations[O]||"").replace(" "+S,""),this._signal("changeBreakpoint",{})},P.prototype.getBreakpoints=function(){return this.$breakpoints},P.prototype.setBreakpoints=function(O){this.$breakpoints=[];for(var S=0;S<O.length;S++)this.$breakpoints[O[S]]="ace_breakpoint";this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},P.prototype.setBreakpoint=function(O,S){S===void 0&&(S="ace_breakpoint"),S?this.$breakpoints[O]=S:delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoint=function(O){delete this.$breakpoints[O],this._signal("changeBreakpoint",{})},P.prototype.addMarker=function(O,S,A,N){var B=this.$markerId++,U={range:O,type:A||"line",renderer:typeof A=="function"?A:null,clazz:S,inFront:!!N,id:B};return N?(this.$frontMarkers[B]=U,this._signal("changeFrontMarker")):(this.$backMarkers[B]=U,this._signal("changeBackMarker")),B},P.prototype.addDynamicMarker=function(O,S){if(O.update){var A=this.$markerId++;return O.id=A,O.inFront=!!S,S?(this.$frontMarkers[A]=O,this._signal("changeFrontMarker")):(this.$backMarkers[A]=O,this._signal("changeBackMarker")),O}},P.prototype.removeMarker=function(O){var S=this.$frontMarkers[O]||this.$backMarkers[O];if(S){var A=S.inFront?this.$frontMarkers:this.$backMarkers;delete A[O],this._signal(S.inFront?"changeFrontMarker":"changeBackMarker")}},P.prototype.getMarkers=function(O){return O?this.$frontMarkers:this.$backMarkers},P.prototype.highlight=function(O){if(!this.$searchHighlight){var S=new d(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(S)}this.$searchHighlight.setRegexp(O)},P.prototype.highlightLines=function(O,S,A,N){typeof S!="number"&&(A=S,S=O),A||(A="ace_step");var B=new c(O,0,S,1/0);return B.id=this.addMarker(B,A,"fullLine",N),B},P.prototype.setAnnotations=function(O){this.$annotations=O,this._signal("changeAnnotation",{})},P.prototype.getAnnotations=function(){return this.$annotations||[]},P.prototype.clearAnnotations=function(){this.setAnnotations([])},P.prototype.$detectNewLine=function(O){var S=O.match(/^.*?(\r?\n)/m);S?this.$autoNewLine=S[1]:this.$autoNewLine=`
|
198
|
+
`},P.prototype.getWordRange=function(O,S){var A=this.getLine(O),N=!1;if(S>0&&(N=!!A.charAt(S-1).match(this.tokenRe)),N||(N=!!A.charAt(S).match(this.tokenRe)),N)var B=this.tokenRe;else if(/^\s+$/.test(A.slice(S-1,S+1)))var B=/\s/;else var B=this.nonTokenRe;var U=S;if(U>0){do U--;while(U>=0&&A.charAt(U).match(B));U++}for(var K=S;K<A.length&&A.charAt(K).match(B);)K++;return new c(O,U,O,K)},P.prototype.getAWordRange=function(O,S){for(var A=this.getWordRange(O,S),N=this.getLine(A.end.row);N.charAt(A.end.column).match(/[ \t]/);)A.end.column+=1;return A},P.prototype.setNewLineMode=function(O){this.doc.setNewLineMode(O)},P.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},P.prototype.setUseWorker=function(O){this.setOption("useWorker",O)},P.prototype.getUseWorker=function(){return this.$useWorker},P.prototype.onReloadTokenizer=function(O){var S=O.data;this.bgTokenizer.start(S.first),this._signal("tokenizerUpdate",O)},P.prototype.setMode=function(O,S){if(O&&typeof O=="object"){if(O.getTokenizer)return this.$onChangeMode(O);var A=O,N=A.path}else N=O||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new l),this.$modes[N]&&!A){this.$onChangeMode(this.$modes[N]),S&&S();return}this.$modeId=N,h.loadModule(["mode",N],(function(B){if(!this.destroyed){if(this.$modeId!==N)return S&&S();this.$modes[N]&&!A?this.$onChangeMode(this.$modes[N]):B&&B.Mode&&(B=new B.Mode(A),A||(this.$modes[N]=B,B.$id=N),this.$onChangeMode(B)),S&&S()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},P.prototype.$onChangeMode=function(O,S){if(S||(this.$modeId=O.$id),this.$mode!==O){var A=this.$mode;this.$mode=O,this.$stopWorker(),this.$useWorker&&this.$startWorker();var N=O.getTokenizer();if(N.on!==void 0){var B=this.onReloadTokenizer.bind(this);N.on("update",B)}this.bgTokenizer.setTokenizer(N),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=O.tokenRe,this.nonTokenRe=O.nonTokenRe,S||(O.attachToSession&&O.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(O.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:A,mode:O}))}},P.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},P.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(O){h.warn("Could not load worker",O),this.$worker=null}},P.prototype.getMode=function(){return this.$mode},P.prototype.setScrollTop=function(O){this.$scrollTop===O||isNaN(O)||(this.$scrollTop=O,this._signal("changeScrollTop",O))},P.prototype.getScrollTop=function(){return this.$scrollTop},P.prototype.setScrollLeft=function(O){this.$scrollLeft===O||isNaN(O)||(this.$scrollLeft=O,this._signal("changeScrollLeft",O))},P.prototype.getScrollLeft=function(){return this.$scrollLeft},P.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},P.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var O=0;return this.lineWidgets.forEach(function(S){S&&S.screenWidth>O&&(O=S.screenWidth)}),this.lineWidgetWidth=O},P.prototype.$computeWidth=function(O){if(this.$modified||O){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var S=this.doc.getAllLines(),A=this.$rowLengthCache,N=0,B=0,U=this.$foldData[B],K=U?U.start.row:1/0,Z=S.length,te=0;te<Z;te++){if(te>K){if(te=U.end.row+1,te>=Z)break;U=this.$foldData[B++],K=U?U.start.row:1/0}A[te]==null&&(A[te]=this.$getStringScreenWidth(S[te])[0]),A[te]>N&&(N=A[te])}this.screenWidth=N}},P.prototype.getLine=function(O){return this.doc.getLine(O)},P.prototype.getLines=function(O,S){return this.doc.getLines(O,S)},P.prototype.getLength=function(){return this.doc.getLength()},P.prototype.getTextRange=function(O){return this.doc.getTextRange(O||this.selection.getRange())},P.prototype.insert=function(O,S){return this.doc.insert(O,S)},P.prototype.remove=function(O){return this.doc.remove(O)},P.prototype.removeFullLines=function(O,S){return this.doc.removeFullLines(O,S)},P.prototype.undoChanges=function(O,S){if(O.length){this.$fromUndo=!0;for(var A=O.length-1;A!=-1;A--){var N=O[A];N.action=="insert"||N.action=="remove"?this.doc.revertDelta(N):N.folds&&this.addFolds(N.folds)}!S&&this.$undoSelect&&(O.selectionBefore?this.selection.fromJSON(O.selectionBefore):this.selection.setRange(this.$getUndoSelection(O,!0))),this.$fromUndo=!1}},P.prototype.redoChanges=function(O,S){if(O.length){this.$fromUndo=!0;for(var A=0;A<O.length;A++){var N=O[A];(N.action=="insert"||N.action=="remove")&&this.doc.$safeApplyDelta(N)}!S&&this.$undoSelect&&(O.selectionAfter?this.selection.fromJSON(O.selectionAfter):this.selection.setRange(this.$getUndoSelection(O,!1))),this.$fromUndo=!1}},P.prototype.setUndoSelect=function(O){this.$undoSelect=O},P.prototype.$getUndoSelection=function(O,S){function A(Z){return S?Z.action!=="insert":Z.action==="insert"}for(var N,B,U=0;U<O.length;U++){var K=O[U];if(K.start){if(!N){A(K)?N=c.fromPoints(K.start,K.end):N=c.fromPoints(K.start,K.start);continue}A(K)?(B=K.start,N.compare(B.row,B.column)==-1&&N.setStart(B),B=K.end,N.compare(B.row,B.column)==1&&N.setEnd(B)):(B=K.start,N.compare(B.row,B.column)==-1&&(N=c.fromPoints(K.start,K.start)))}}return N},P.prototype.replace=function(O,S){return this.doc.replace(O,S)},P.prototype.moveText=function(O,S,A){var N=this.getTextRange(O),B=this.getFoldsInRange(O),U=c.fromPoints(S,S);if(!A){this.remove(O);var K=O.start.row-O.end.row,Z=K?-O.end.column:O.start.column-O.end.column;Z&&(U.start.row==O.end.row&&U.start.column>O.end.column&&(U.start.column+=Z),U.end.row==O.end.row&&U.end.column>O.end.column&&(U.end.column+=Z)),K&&U.start.row>=O.end.row&&(U.start.row+=K,U.end.row+=K)}if(U.end=this.insert(U.start,N),B.length){var te=O.start,he=U.start,K=he.row-te.row,Z=he.column-te.column;this.addFolds(B.map(function(ce){return ce=ce.clone(),ce.start.row==te.row&&(ce.start.column+=Z),ce.end.row==te.row&&(ce.end.column+=Z),ce.start.row+=K,ce.end.row+=K,ce}))}return U},P.prototype.indentRows=function(O,S,A){A=A.replace(/\t/g,this.getTabString());for(var N=O;N<=S;N++)this.doc.insertInLine({row:N,column:0},A)},P.prototype.outdentRows=function(O){for(var S=O.collapseRows(),A=new c(0,0,0,0),N=this.getTabSize(),B=S.start.row;B<=S.end.row;++B){var U=this.getLine(B);A.start.row=B,A.end.row=B;for(var K=0;K<N&&U.charAt(K)==" ";++K);K<N&&U.charAt(K)==" "?(A.start.column=K,A.end.column=K+1):(A.start.column=0,A.end.column=K),this.remove(A)}},P.prototype.$moveLines=function(O,S,A){if(O=this.getRowFoldStart(O),S=this.getRowFoldEnd(S),A<0){var N=this.getRowFoldStart(O+A);if(N<0)return 0;var B=N-O}else if(A>0){var N=this.getRowFoldEnd(S+A);if(N>this.doc.getLength()-1)return 0;var B=N-S}else{O=this.$clipRowToDocument(O),S=this.$clipRowToDocument(S);var B=S-O+1}var U=new c(O,0,S,Number.MAX_VALUE),K=this.getFoldsInRange(U).map(function(te){return te=te.clone(),te.start.row+=B,te.end.row+=B,te}),Z=A==0?this.doc.getLines(O,S):this.doc.removeFullLines(O,S);return this.doc.insertFullLines(O+B,Z),K.length&&this.addFolds(K),B},P.prototype.moveLinesUp=function(O,S){return this.$moveLines(O,S,-1)},P.prototype.moveLinesDown=function(O,S){return this.$moveLines(O,S,1)},P.prototype.duplicateLines=function(O,S){return this.$moveLines(O,S,0)},P.prototype.$clipRowToDocument=function(O){return Math.max(0,Math.min(O,this.doc.getLength()-1))},P.prototype.$clipColumnToRow=function(O,S){return S<0?0:Math.min(this.doc.getLine(O).length,S)},P.prototype.$clipPositionToDocument=function(O,S){if(S=Math.max(0,S),O<0)O=0,S=0;else{var A=this.doc.getLength();O>=A?(O=A-1,S=this.doc.getLine(A-1).length):S=Math.min(this.doc.getLine(O).length,S)}return{row:O,column:S}},P.prototype.$clipRangeToDocument=function(O){O.start.row<0?(O.start.row=0,O.start.column=0):O.start.column=this.$clipColumnToRow(O.start.row,O.start.column);var S=this.doc.getLength()-1;return O.end.row>S?(O.end.row=S,O.end.column=this.doc.getLine(S).length):O.end.column=this.$clipColumnToRow(O.end.row,O.end.column),O},P.prototype.setUseWrapMode=function(O){if(O!=this.$useWrapMode){if(this.$useWrapMode=O,this.$modified=!0,this.$resetRowCache(0),O){var S=this.getLength();this.$wrapData=Array(S),this.$updateWrapData(0,S-1)}this._signal("changeWrapMode")}},P.prototype.getUseWrapMode=function(){return this.$useWrapMode},P.prototype.setWrapLimitRange=function(O,S){(this.$wrapLimitRange.min!==O||this.$wrapLimitRange.max!==S)&&(this.$wrapLimitRange={min:O,max:S},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},P.prototype.adjustWrapLimit=function(O,S){var A=this.$wrapLimitRange;A.max<0&&(A={min:S,max:S});var N=this.$constrainWrapLimit(O,A.min,A.max);return N!=this.$wrapLimit&&N>1?(this.$wrapLimit=N,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},P.prototype.$constrainWrapLimit=function(O,S,A){return S&&(O=Math.max(S,O)),A&&(O=Math.min(A,O)),O},P.prototype.getWrapLimit=function(){return this.$wrapLimit},P.prototype.setWrapLimit=function(O){this.setWrapLimitRange(O,O)},P.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},P.prototype.$updateInternalDataOnChange=function(O){var S=this.$useWrapMode,A=O.action,N=O.start,B=O.end,U=N.row,K=B.row,Z=K-U,te=null;if(this.$updating=!0,Z!=0)if(A==="remove"){this[S?"$wrapData":"$rowLengthCache"].splice(U,Z);var he=this.$foldData;te=this.getFoldsInRange(O),this.removeFolds(te);var ne=this.getFoldLine(B.row),ae=0;if(ne){ne.addRemoveChars(B.row,B.column,N.column-B.column),ne.shiftRow(-Z);var ce=this.getFoldLine(U);ce&&ce!==ne&&(ce.merge(ne),ne=ce),ae=he.indexOf(ne)+1}for(ae;ae<he.length;ae++){var ne=he[ae];ne.start.row>=B.row&&ne.shiftRow(-Z)}K=U}else{var ue=Array(Z);ue.unshift(U,0);var ye=S?this.$wrapData:this.$rowLengthCache;ye.splice.apply(ye,ue);var he=this.$foldData,ne=this.getFoldLine(U),ae=0;if(ne){var Ae=ne.range.compareInside(N.row,N.column);Ae==0?(ne=ne.split(N.row,N.column),ne&&(ne.shiftRow(Z),ne.addRemoveChars(K,0,B.column-N.column))):Ae==-1&&(ne.addRemoveChars(U,0,B.column-N.column),ne.shiftRow(Z)),ae=he.indexOf(ne)+1}for(ae;ae<he.length;ae++){var ne=he[ae];ne.start.row>=U&&ne.shiftRow(Z)}}else{Z=Math.abs(O.start.column-O.end.column),A==="remove"&&(te=this.getFoldsInRange(O),this.removeFolds(te),Z=-Z);var ne=this.getFoldLine(U);ne&&ne.addRemoveChars(U,N.column,Z)}return S&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,S?this.$updateWrapData(U,K):this.$updateRowLengthCache(U,K),te},P.prototype.$updateRowLengthCache=function(O,S){this.$rowLengthCache[O]=null,this.$rowLengthCache[S]=null},P.prototype.$updateWrapData=function(O,S){var A=this.doc.getAllLines(),N=this.getTabSize(),B=this.$wrapData,U=this.$wrapLimit,K,Z,te=O;for(S=Math.min(S,A.length-1);te<=S;)Z=this.getFoldLine(te,Z),Z?(K=[],Z.walk((function(he,ne,ae,ce){var ue;if(he!=null){ue=this.$getDisplayTokens(he,K.length),ue[0]=_;for(var ye=1;ye<ue.length;ye++)ue[ye]=C}else ue=this.$getDisplayTokens(A[ne].substring(ce,ae),K.length);K=K.concat(ue)}).bind(this),Z.end.row,A[Z.end.row].length+1),B[Z.start.row]=this.$computeWrapSplits(K,U,N),te=Z.end.row+1):(K=this.$getDisplayTokens(A[te]),B[te]=this.$computeWrapSplits(K,U,N),te++)},P.prototype.$computeWrapSplits=function(O,S,A){if(O.length==0)return[];var N=[],B=O.length,U=0,K=0,Z=this.$wrapAsCode,te=this.$indentedSoftWrap,he=S<=Math.max(2*A,8)||te===!1?0:Math.floor(S/2);function ne(){var Ae=0;if(he===0)return Ae;if(te)for(var $e=0;$e<O.length;$e++){var Ie=O[$e];if(Ie==L)Ae+=1;else if(Ie==F)Ae+=A;else{if(Ie==I)continue;break}}return Z&&te!==!1&&(Ae+=A),Math.min(Ae,he)}function ae(Ae){for(var $e=Ae-U,Ie=U;Ie<Ae;Ie++){var Ge=O[Ie];(Ge===12||Ge===2)&&($e-=1)}N.length||(ce=ne(),N.indent=ce),K+=$e,N.push(K),U=Ae}for(var ce=0;B-U>S-ce;){var ue=U+S-ce;if(O[ue-1]>=L&&O[ue]>=L){ae(ue);continue}if(O[ue]==_||O[ue]==C){for(ue;ue!=U-1&&O[ue]!=_;ue--);if(ue>U){ae(ue);continue}for(ue=U+S,ue;ue<O.length&&O[ue]==C;ue++);if(ue==O.length)break;ae(ue);continue}for(var ye=Math.max(ue-(S-(S>>2)),U-1);ue>ye&&O[ue]<_;)ue--;if(Z){for(;ue>ye&&O[ue]<_;)ue--;for(;ue>ye&&O[ue]==R;)ue--}else for(;ue>ye&&O[ue]<L;)ue--;if(ue>ye){ae(++ue);continue}ue=U+S,O[ue]==$&&ue--,ae(ue-ce)}return N},P.prototype.$getDisplayTokens=function(O,S){var A=[],N;S=S||0;for(var B=0;B<O.length;B++){var U=O.charCodeAt(B);if(U==9){N=this.getScreenTabSize(A.length+S),A.push(F);for(var K=1;K<N;K++)A.push(I)}else U==32?A.push(L):U>39&&U<48||U>57&&U<64?A.push(R):U>=4352&&H(U)?A.push(E,$):A.push(E)}return A},P.prototype.$getStringScreenWidth=function(O,S,A){if(S==0)return[0,0];S==null&&(S=1/0),A=A||0;var N,B;for(B=0;B<O.length&&(N=O.charCodeAt(B),N==9?A+=this.getScreenTabSize(A):N>=4352&&H(N)?A+=2:A+=1,!(A>S));B++);return[A,B]},P.prototype.getRowLength=function(O){var S=1;return this.lineWidgets&&(S+=this.lineWidgets[O]&&this.lineWidgets[O].rowCount||0),!this.$useWrapMode||!this.$wrapData[O]?S:this.$wrapData[O].length+S},P.prototype.getRowLineCount=function(O){return!this.$useWrapMode||!this.$wrapData[O]?1:this.$wrapData[O].length+1},P.prototype.getRowWrapIndent=function(O){if(this.$useWrapMode){var S=this.screenToDocumentPosition(O,Number.MAX_VALUE),A=this.$wrapData[S.row];return A.length&&A[0]<S.column?A.indent:0}else return 0},P.prototype.getScreenLastRowColumn=function(O){var S=this.screenToDocumentPosition(O,Number.MAX_VALUE);return this.documentToScreenColumn(S.row,S.column)},P.prototype.getDocumentLastRowColumn=function(O,S){var A=this.documentToScreenRow(O,S);return this.getScreenLastRowColumn(A)},P.prototype.getDocumentLastRowColumnPosition=function(O,S){var A=this.documentToScreenRow(O,S);return this.screenToDocumentPosition(A,Number.MAX_VALUE/10)},P.prototype.getRowSplitData=function(O){if(this.$useWrapMode)return this.$wrapData[O]},P.prototype.getScreenTabSize=function(O){return this.$tabSize-(O%this.$tabSize|0)},P.prototype.screenToDocumentRow=function(O,S){return this.screenToDocumentPosition(O,S).row},P.prototype.screenToDocumentColumn=function(O,S){return this.screenToDocumentPosition(O,S).column},P.prototype.screenToDocumentPosition=function(O,S,A){if(O<0)return{row:0,column:0};var N,ae=0,B=0,U,ne=0,K=0,Z=this.$screenRowCache,te=this.$getRowCacheIndex(Z,O),he=Z.length;if(he&&te>=0)var ne=Z[te],ae=this.$docRowCache[te],ce=O>Z[he-1];else var ce=!he;for(var ue=this.getLength()-1,ye=this.getNextFoldLine(ae),Ae=ye?ye.start.row:1/0;ne<=O&&(K=this.getRowLength(ae),!(ne+K>O||ae>=ue));)ne+=K,ae++,ae>Ae&&(ae=ye.end.row+1,ye=this.getNextFoldLine(ae,ye),Ae=ye?ye.start.row:1/0),ce&&(this.$docRowCache.push(ae),this.$screenRowCache.push(ne));if(ye&&ye.start.row<=ae)N=this.getFoldDisplayLine(ye),ae=ye.start.row;else{if(ne+K<=O||ae>ue)return{row:ue,column:this.getLine(ue).length};N=this.getLine(ae),ye=null}var $e=0,Ie=Math.floor(O-ne);if(this.$useWrapMode){var Ge=this.$wrapData[ae];Ge&&(U=Ge[Ie],Ie>0&&Ge.length&&($e=Ge.indent,B=Ge[Ie-1]||Ge[Ge.length-1],N=N.substring(B)))}return A!==void 0&&this.$bidiHandler.isBidiRow(ne+Ie,ae,Ie)&&(S=this.$bidiHandler.offsetToCol(A)),B+=this.$getStringScreenWidth(N,S-$e)[1],this.$useWrapMode&&B>=U&&(B=U-1),ye?ye.idxToPosition(B):{row:ae,column:B}},P.prototype.documentToScreenPosition=function(O,S){if(typeof S>"u")var A=this.$clipPositionToDocument(O.row,O.column);else A=this.$clipPositionToDocument(O,S);O=A.row,S=A.column;var ne=0,N=null,B=null;B=this.getFoldAt(O,S,1),B&&(O=B.start.row,S=B.start.column);var U,he=0,K=this.$docRowCache,Z=this.$getRowCacheIndex(K,O),te=K.length;if(te&&Z>=0)var he=K[Z],ne=this.$screenRowCache[Z],ae=O>K[te-1];else var ae=!te;for(var ce=this.getNextFoldLine(he),ue=ce?ce.start.row:1/0;he<O;){if(he>=ue){if(U=ce.end.row+1,U>O)break;ce=this.getNextFoldLine(U,ce),ue=ce?ce.start.row:1/0}else U=he+1;ne+=this.getRowLength(he),he=U,ae&&(this.$docRowCache.push(he),this.$screenRowCache.push(ne))}var ye="";ce&&he>=ue?(ye=this.getFoldDisplayLine(ce,O,S),N=ce.start.row):(ye=this.getLine(O).substring(0,S),N=O);var Ae=0;if(this.$useWrapMode){var $e=this.$wrapData[N];if($e){for(var Ie=0;ye.length>=$e[Ie];)ne++,Ie++;ye=ye.substring($e[Ie-1]||0,ye.length),Ae=Ie>0?$e.indent:0}}return this.lineWidgets&&this.lineWidgets[he]&&this.lineWidgets[he].rowsAbove&&(ne+=this.lineWidgets[he].rowsAbove),{row:ne,column:Ae+this.$getStringScreenWidth(ye)[0]}},P.prototype.documentToScreenColumn=function(O,S){return this.documentToScreenPosition(O,S).column},P.prototype.documentToScreenRow=function(O,S){return this.documentToScreenPosition(O,S).row},P.prototype.getScreenLength=function(){var O=0,S=null;if(this.$useWrapMode)for(var A=this.$wrapData.length,N=0,B=0,S=this.$foldData[B++],U=S?S.start.row:1/0;N<A;){var K=this.$wrapData[N];O+=K?K.length+1:1,N++,N>U&&(N=S.end.row+1,S=this.$foldData[B++],U=S?S.start.row:1/0)}else{O=this.getLength();for(var Z=this.$foldData,B=0;B<Z.length;B++)S=Z[B],O-=S.end.row-S.start.row}return this.lineWidgets&&(O+=this.$getWidgetScreenLength()),O},P.prototype.$setFontMetrics=function(O){this.$enableVarChar&&(this.$getStringScreenWidth=function(S,A,N){if(A===0)return[0,0];A||(A=1/0),N=N||0;var B,U;for(U=0;U<S.length&&(B=S.charAt(U),B===" "?N+=this.getScreenTabSize(N):N+=O.getCharacterWidth(B),!(N>A));U++);return[N,U]})},P.prototype.getPrecedingCharacter=function(){var O=this.selection.getCursor();if(O.column===0)return O.row===0?"":this.doc.getNewLineCharacter();var S=this.getLine(O.row);return S[O.column-1]},P.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},P}();b.$uid=0,b.prototype.$modes=h.$modes,b.prototype.getValue=b.prototype.toString,b.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},b.prototype.$overwrite=!1,b.prototype.$mode=null,b.prototype.$modeId=null,b.prototype.$scrollTop=0,b.prototype.$scrollLeft=0,b.prototype.$wrapLimit=80,b.prototype.$useWrapMode=!1,b.prototype.$wrapLimitRange={min:null,max:null},b.prototype.lineWidgets=null,b.prototype.isFullWidth=H,m.implement(b.prototype,g);var E=1,$=2,_=3,C=4,R=9,L=10,F=11,I=12;function H(P){return P<4352?!1:P>=4352&&P<=4447||P>=4515&&P<=4519||P>=4602&&P<=4607||P>=9001&&P<=9002||P>=11904&&P<=11929||P>=11931&&P<=12019||P>=12032&&P<=12245||P>=12272&&P<=12283||P>=12288&&P<=12350||P>=12353&&P<=12438||P>=12441&&P<=12543||P>=12549&&P<=12589||P>=12593&&P<=12686||P>=12688&&P<=12730||P>=12736&&P<=12771||P>=12784&&P<=12830||P>=12832&&P<=12871||P>=12880&&P<=13054||P>=13056&&P<=19903||P>=19968&&P<=42124||P>=42128&&P<=42182||P>=43360&&P<=43388||P>=44032&&P<=55203||P>=55216&&P<=55238||P>=55243&&P<=55291||P>=63744&&P<=64255||P>=65040&&P<=65049||P>=65072&&P<=65106||P>=65108&&P<=65126||P>=65128&&P<=65131||P>=65281&&P<=65376||P>=65504&&P<=65510}e("./edit_session/folding").Folding.call(b.prototype),e("./edit_session/bracket_match").BracketMatch.call(b.prototype),h.defineOptions(b.prototype,"session",{wrap:{set:function(P){if(!P||P=="off"?P=!1:P=="free"?P=!0:P=="printMargin"?P=-1:typeof P=="string"&&(P=parseInt(P,10)||!1),this.$wrap!=P)if(this.$wrap=P,!P)this.setUseWrapMode(!1);else{var O=typeof P=="number"?P:null;this.setWrapLimitRange(O,O),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(P){P=P=="auto"?this.$mode.type!="text":P!="text",P!=this.$wrapAsCode&&(this.$wrapAsCode=P,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(P){this.$useWorker=P,this.$stopWorker(),P&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(P){P=parseInt(P),P>0&&this.$tabSize!==P&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=P,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(P){this.setFoldStyle(P)},handlesSet:!0},overwrite:{set:function(P){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(P){this.doc.setNewLineMode(P)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(P){this.setMode(P)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=b}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,r,v){var m=e("./lib/lang"),y=e("./lib/oop"),x=e("./range").Range,h=function(){function c(){this.$options={}}return c.prototype.set=function(a){return y.mixin(this.$options,a),this},c.prototype.getOptions=function(){return m.copyObject(this.$options)},c.prototype.setOptions=function(a){this.$options=a},c.prototype.find=function(a){var o=this.$options,u=this.$matchIterator(a,o);if(!u)return!1;var d=null;return u.forEach(function(w,b,E,$){return d=new x(w,b,E,$),b==$&&o.start&&o.start.start&&o.skipCurrent!=!1&&d.isEqual(o.start)?(d=null,!1):!0}),d},c.prototype.findAll=function(a){var o=this.$options;if(!o.needle)return[];this.$assembleRegExp(o);var u=o.range,d=u?a.getLines(u.start.row,u.end.row):a.doc.getAllLines(),w=[],b=o.re;if(o.$isMultiLine){var E=b.length,$=d.length-E,_;e:for(var C=b.offset||0;C<=$;C++){for(var R=0;R<E;R++)if(d[C+R].search(b[R])==-1)continue e;var L=d[C],F=d[C+E-1],I=L.length-L.match(b[0])[0].length,H=F.match(b[E-1])[0].length;_&&_.end.row===C&&_.end.column>I||(w.push(_=new x(C,I,C+E-1,H)),E>2&&(C=C+E-2))}}else for(var P,O=0;O<d.length;O++)if(this.$isMultilineSearch(o)){var S=d.length-1;if(P=this.$multiLineForward(a,b,O,S),P){var A=P.endRow<=S?P.endRow-1:S;A>O&&(O=A),w.push(new x(P.startRow,P.startCol,P.endRow,P.endCol))}}else{P=m.getMatchOffsets(d[O],b);for(var R=0;R<P.length;R++){var N=P[R];w.push(new x(O,N.offset,O,N.offset+N.length))}}if(u){for(var B=u.start.column,U=u.end.column,O=0,R=w.length-1;O<R&&w[O].start.column<B&&w[O].start.row==0;)O++;for(var K=u.end.row-u.start.row;O<R&&w[R].end.column>U&&w[R].end.row==K;)R--;for(w=w.slice(O,R+1),O=0,R=w.length;O<R;O++)w[O].start.row+=u.start.row,w[O].end.row+=u.start.row}return w},c.prototype.parseReplaceString=function(a){for(var o={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},u="",d=0,w=a.length;d<w;d++){var b=a.charCodeAt(d);if(b===o.Backslash){if(d++,d>=w){u+="\\";break}var E=a.charCodeAt(d);switch(E){case o.Backslash:u+="\\";break;case o.n:u+=`
|
199
|
+
`;break;case o.t:u+=" ";break}continue}if(b===o.DollarSign){if(d++,d>=w){u+="$";break}var $=a.charCodeAt(d);if($===o.DollarSign){u+="$$";continue}if($===o.Digit0||$===o.Ampersand){u+="$&";continue}if(o.Digit1<=$&&$<=o.Digit9){u+="$"+a[d];continue}}u+=a[d]}return u||a},c.prototype.replace=function(a,o){var u=this.$options,d=this.$assembleRegExp(u);if(u.$isMultiLine)return o;if(d){var w=this.$isMultilineSearch(u);w&&(a=a.replace(/\r\n|\r|\n/g,`
|
200
|
+
`));var b=d.exec(a);if(!b||!w&&b[0].length!=a.length)return null;if(o=u.regExp?this.parseReplaceString(o):o.replace(/\$/g,"$$$$"),o=a.replace(d,o),u.preserveCase){o=o.split("");for(var E=Math.min(a.length,a.length);E--;){var $=a[E];$&&$.toLowerCase()!=$?o[E]=o[E].toUpperCase():o[E]=o[E].toLowerCase()}o=o.join("")}return o}},c.prototype.$assembleRegExp=function(a,o){if(a.needle instanceof RegExp)return a.re=a.needle;var u=a.needle;if(!a.needle)return a.re=!1;a.regExp||(u=m.escapeRegExp(u));var d=a.caseSensitive?"gm":"gmi";try{new RegExp(u,"u"),a.$supportsUnicodeFlag=!0,d+="u"}catch{a.$supportsUnicodeFlag=!1}if(a.wholeWord&&(u=g(u,a)),a.$isMultiLine=!o&&/[\n\r]/.test(u),a.$isMultiLine)return a.re=this.$assembleMultilineRegExp(u,d);try{var w=new RegExp(u,d)}catch{w=!1}return a.re=w},c.prototype.$assembleMultilineRegExp=function(a,o){for(var u=a.replace(/\r\n|\r|\n/g,`$
|
201
|
+
^`).split(`
|
202
|
+
`),d=[],w=0;w<u.length;w++)try{d.push(new RegExp(u[w],o))}catch{return!1}return d},c.prototype.$isMultilineSearch=function(a){return a.re&&/\\r\\n|\\r|\\n/.test(a.re.source)&&a.regExp&&!a.$isMultiLine},c.prototype.$multiLineForward=function(a,o,u,d){for(var w,b=l(a,u),E=u;E<=d;){for(var $=0;$<b&&!(E>d);$++){var _=a.getLine(E++);w=w==null?_:w+`
|
203
|
+
`+_}var C=o.exec(w);if(o.lastIndex=0,C){var R=w.slice(0,C.index).split(`
|
204
|
+
`),L=C[0].split(`
|
205
|
+
`),F=u+R.length-1,I=R[R.length-1].length,H=F+L.length-1,P=L.length==1?I+L[0].length:L[L.length-1].length;return{startRow:F,startCol:I,endRow:H,endCol:P}}}return null},c.prototype.$multiLineBackward=function(a,o,u,d,w){for(var b,E=l(a,d),$=a.getLine(d).length-u,_=d;_>=w;){for(var C=0;C<E&&_>=w;C++){var R=a.getLine(_--);b=b==null?R:R+`
|
206
|
+
`+b}var L=s(b,o,$);if(L){var F=b.slice(0,L.index).split(`
|
207
|
+
`),I=L[0].split(`
|
208
|
+
`),H=_+F.length,P=F[F.length-1].length,O=H+I.length-1,S=I.length==1?P+I[0].length:I[I.length-1].length;return{startRow:H,startCol:P,endRow:O,endCol:S}}}return null},c.prototype.$matchIterator=function(a,o){var u=this.$assembleRegExp(o);if(!u)return!1;var d=this.$isMultilineSearch(o),w=this.$multiLineForward,b=this.$multiLineBackward,E=o.backwards==!0,$=o.skipCurrent!=!1,_=u.unicode,C=o.range,R=o.start;R||(R=C?C[E?"end":"start"]:a.selection.getRange()),R.start&&(R=R[$!=E?"end":"start"]);var L=C?C.start.row:0,F=C?C.end.row:a.getLength()-1;if(E)var I=function(O){var S=R.row;if(!P(S,R.column,O)){for(S--;S>=L;S--)if(P(S,Number.MAX_VALUE,O))return;if(o.wrap!=!1){for(S=F,L=R.row;S>=L;S--)if(P(S,Number.MAX_VALUE,O))return}}};else var I=function(O){var S=R.row;if(!P(S,R.column,O)){for(S=S+1;S<=F;S++)if(P(S,0,O))return;if(o.wrap!=!1){for(S=L,F=R.row;S<=F;S++)if(P(S,0,O))return}}};if(o.$isMultiLine)var H=u.length,P=function(O,S,A){var N=E?O-H+1:O;if(!(N<0||N+H>a.getLength())){var B=a.getLine(N),U=B.search(u[0]);if(!(!E&&U<S||U===-1)){for(var K=1;K<H;K++)if(B=a.getLine(N+K),B.search(u[K])==-1)return;var Z=B.match(u[H-1])[0].length;if(!(E&&Z>S)&&A(N,U,N+H-1,Z))return!0}}};else if(E)var P=function(O,S,A){if(d){var N=b(a,u,S,O,L);if(!N)return!1;if(A(N.startRow,N.startCol,N.endRow,N.endCol))return!0}else{var B=a.getLine(O),U=[],K,Z=0;for(u.lastIndex=0;K=u.exec(B);){var te=K[0].length;if(Z=K.index,!te){if(Z>=B.length)break;u.lastIndex=Z+=m.skipEmptyMatch(B,Z,_)}if(K.index+te>S)break;U.push(K.index,te)}for(var he=U.length-1;he>=0;he-=2){var ne=U[he-1],te=U[he];if(A(O,ne,O,ne+te))return!0}}};else var P=function(O,S,A){if(u.lastIndex=S,d){var N=w(a,u,O,F);if(N){var B=N.endRow<=F?N.endRow-1:F;B>O&&(O=B)}if(!N)return!1;if(A(N.startRow,N.startCol,N.endRow,N.endCol))return!0}else for(var U=a.getLine(O),K,Z;Z=u.exec(U);){var te=Z[0].length;if(K=Z.index,A(O,K,O,K+te))return!0;if(!te&&(u.lastIndex=K+=m.skipEmptyMatch(U,K,_),K>=U.length))return!1}};return{forEach:I}},c}();function g(c,a){var o=m.supportsLookbehind();function u(E,$){$===void 0&&($=!0);var _=o&&a.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return _.test(E)||a.regExp?o&&a.$supportsUnicodeFlag?$?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var d=Array.from(c),w=d[0],b=d[d.length-1];return u(w)+c+u(b,!1)}function s(c,a,o){for(var u=null,d=0;d<=c.length;){a.lastIndex=d;var w=a.exec(c);if(!w)break;var b=w.index+w[0].length;if(b>c.length-o)break;(!u||b>u.index+u[0].length)&&(u=w),d=w.index+1}return u}function l(c,a){var o=5e3,u={row:a,column:0},d=c.doc.positionToIndex(u),w=d+o,b=c.doc.indexToPosition(w),E=b.row;return E+1}r.Search=h}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,v){var m=this&&this.__extends||function(){var c=function(a,o){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var w in d)Object.prototype.hasOwnProperty.call(d,w)&&(u[w]=d[w])},c(a,o)};return function(a,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");c(a,o);function u(){this.constructor=a}a.prototype=o===null?Object.create(o):(u.prototype=o.prototype,new u)}}(),y=e("../lib/keys"),x=e("../lib/useragent"),h=y.KEY_MODS,g=function(){function c(a,o){this.$init(a,o,!1)}return c.prototype.$init=function(a,o,u){this.platform=o||(x.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(a),this.$singleCommand=u},c.prototype.addCommand=function(a){this.commands[a.name]&&this.removeCommand(a),this.commands[a.name]=a,a.bindKey&&this._buildKeyHash(a)},c.prototype.removeCommand=function(a,o){var u=a&&(typeof a=="string"?a:a.name);a=this.commands[u],o||delete this.commands[u];var d=this.commandKeyBinding;for(var w in d){var b=d[w];if(b==a)delete d[w];else if(Array.isArray(b)){var E=b.indexOf(a);E!=-1&&(b.splice(E,1),b.length==1&&(d[w]=b[0]))}}},c.prototype.bindKey=function(a,o,u){if(typeof a=="object"&&a&&(u==null&&(u=a.position),a=a[this.platform]),!!a){if(typeof o=="function")return this.addCommand({exec:o,bindKey:a,name:o.name||a});a.split("|").forEach(function(d){var w="";if(d.indexOf(" ")!=-1){var b=d.split(/\s+/);d=b.pop(),b.forEach(function(_){var C=this.parseKeys(_),R=h[C.hashId]+C.key;w+=(w?" ":"")+R,this._addCommandToBinding(w,"chainKeys")},this),w+=" "}var E=this.parseKeys(d),$=h[E.hashId]+E.key;this._addCommandToBinding(w+$,o,u)},this)}},c.prototype._addCommandToBinding=function(a,o,u){var d=this.commandKeyBinding,w;if(!o)delete d[a];else if(!d[a]||this.$singleCommand)d[a]=o;else{Array.isArray(d[a])?(w=d[a].indexOf(o))!=-1&&d[a].splice(w,1):d[a]=[d[a]],typeof u!="number"&&(u=s(o));var b=d[a];for(w=0;w<b.length;w++){var E=b[w],$=s(E);if($>u)break}b.splice(w,0,o)}},c.prototype.addCommands=function(a){a&&Object.keys(a).forEach(function(o){var u=a[o];if(u){if(typeof u=="string")return this.bindKey(u,o);typeof u=="function"&&(u={exec:u}),typeof u=="object"&&(u.name||(u.name=o),this.addCommand(u))}},this)},c.prototype.removeCommands=function(a){Object.keys(a).forEach(function(o){this.removeCommand(a[o])},this)},c.prototype.bindKeys=function(a){Object.keys(a).forEach(function(o){this.bindKey(o,a[o])},this)},c.prototype._buildKeyHash=function(a){this.bindKey(a.bindKey,a)},c.prototype.parseKeys=function(a){var o=a.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function($){return $}),u=o.pop(),d=y[u];if(y.FUNCTION_KEYS[d])u=y.FUNCTION_KEYS[d].toLowerCase();else if(o.length){if(o.length==1&&o[0]=="shift")return{key:u.toUpperCase(),hashId:-1}}else return{key:u,hashId:-1};for(var w=0,b=o.length;b--;){var E=y.KEY_MODS[o[b]];if(E==null)return typeof console<"u"&&console.error("invalid modifier "+o[b]+" in "+a),!1;w|=E}return{key:u,hashId:w}},c.prototype.findKeyCommand=function(a,o){var u=h[a]+o;return this.commandKeyBinding[u]},c.prototype.handleKeyboard=function(a,o,u,d){if(!(d<0)){var w=h[o]+u,b=this.commandKeyBinding[w];return a.$keyChain&&(a.$keyChain+=" "+w,b=this.commandKeyBinding[a.$keyChain]||b),b&&(b=="chainKeys"||b[b.length-1]=="chainKeys")?(a.$keyChain=a.$keyChain||w,{command:"null"}):(a.$keyChain&&((!o||o==4)&&u.length==1?a.$keyChain=a.$keyChain.slice(0,-w.length-1):(o==-1||d>0)&&(a.$keyChain="")),{command:b})}},c.prototype.getStatusText=function(a,o){return o.$keyChain||""},c}();function s(c){return typeof c=="object"&&c.bindKey&&c.bindKey.position||(c.isDefault?-100:0)}var l=function(c){m(a,c);function a(o,u){var d=c.call(this,o,u)||this;return d.$singleCommand=!0,d}return a}(g);l.call=function(c,a,o){g.prototype.$init.call(c,a,o,!0)},g.call=function(c,a,o){g.prototype.$init.call(c,a,o,!1)},r.HashHandler=l,r.MultiHashHandler=g}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,r,v){var m=this&&this.__extends||function(){var s=function(l,c){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,o){a.__proto__=o}||function(a,o){for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&(a[u]=o[u])},s(l,c)};return function(l,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");s(l,c);function a(){this.constructor=l}l.prototype=c===null?Object.create(c):(a.prototype=c.prototype,new a)}}(),y=e("../lib/oop"),x=e("../keyboard/hash_handler").MultiHashHandler,h=e("../lib/event_emitter").EventEmitter,g=function(s){m(l,s);function l(c,a){var o=s.call(this,a,c)||this;return o.byName=o.commands,o.setDefaultHandler("exec",function(u){return u.args?u.command.exec(u.editor,u.args,u.event,!1):u.command.exec(u.editor,{},u.event,!0)}),o}return l.prototype.exec=function(c,a,o){if(Array.isArray(c)){for(var u=c.length;u--;)if(this.exec(c[u],a,o))return!0;return!1}typeof c=="string"&&(c=this.commands[c]);var d={editor:a,command:c,args:o};return this.canExecute(c,a)?(d.returnValue=this._emit("exec",d),this._signal("afterExec",d),d.returnValue!==!1):(this._signal("commandUnavailable",d),!1)},l.prototype.canExecute=function(c,a){return typeof c=="string"&&(c=this.commands[c]),!(!c||a&&a.$readOnly&&!c.readOnly||this.$checkCommandState!=!1&&c.isAvailable&&!c.isAvailable(a))},l.prototype.toggleRecording=function(c){if(!this.$inReplay)return c&&c._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(a){this.macro.push([a.command,a.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},l.prototype.replay=function(c){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(c);try{this.$inReplay=!0,this.macro.forEach(function(a){typeof a=="string"?this.exec(a,c):this.exec(a[0],c,a[1])},this)}finally{this.$inReplay=!1}}},l.prototype.trimMacro=function(c){return c.map(function(a){return typeof a[0]!="string"&&(a[0]=a[0].name),a[1]||(a=a[0]),a})},l}(x);y.implement(g.prototype,h),r.CommandManager=g}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,r,v){var m=e("../lib/lang"),y=e("../config"),x=e("../range").Range;function h(s,l){return{win:s,mac:l}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:h("Ctrl-,","Command-,"),exec:function(s){y.loadModule("ace/ext/settings_menu",function(l){l.init(s),s.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:h("Alt-E","F4"),exec:function(s){y.loadModule("ace/ext/error_marker",function(l){l.showErrorMarker(s,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:h("Alt-Shift-E","Shift-F4"),exec:function(s){y.loadModule("ace/ext/error_marker",function(l){l.showErrorMarker(s,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:h("Ctrl-A","Command-A"),exec:function(s){s.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:h(null,"Ctrl-L"),exec:function(s){s.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:h("Ctrl-L","Command-L"),exec:function(s,l){typeof l=="number"&&!isNaN(l)&&s.gotoLine(l),s.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:h("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(s){s.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:h("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(s){s.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:h("F2","F2"),exec:function(s){s.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:h("Alt-F2","Alt-F2"),exec:function(s){s.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:h(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:h(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:h("Alt-0","Command-Option-0"),exec:function(s){s.session.foldAll(),s.session.unfold(s.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:h("Alt-Shift-0","Command-Option-Shift-0"),exec:function(s){s.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:h("Ctrl-K","Command-G"),exec:function(s){s.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:h("Ctrl-Shift-K","Command-Shift-G"),exec:function(s){s.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:h("Alt-K","Ctrl-G"),exec:function(s){s.selection.isEmpty()?s.selection.selectWord():s.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:h("Alt-Shift-K","Ctrl-Shift-G"),exec:function(s){s.selection.isEmpty()?s.selection.selectWord():s.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:h("Ctrl-F","Command-F"),exec:function(s){y.loadModule("ace/ext/searchbox",function(l){l.Search(s)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(s){s.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:h("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(s){s.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:h("Ctrl-Home","Command-Home|Command-Up"),exec:function(s){s.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:h("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(s){s.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:h("Up","Up|Ctrl-P"),exec:function(s,l){s.navigateUp(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:h("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(s){s.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:h("Ctrl-End","Command-End|Command-Down"),exec:function(s){s.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:h("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(s){s.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:h("Down","Down|Ctrl-N"),exec:function(s,l){s.navigateDown(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:h("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(s){s.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:h("Ctrl-Left","Option-Left"),exec:function(s){s.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:h("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(s){s.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:h("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(s){s.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:h("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(s){s.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:h("Left","Left|Ctrl-B"),exec:function(s,l){s.navigateLeft(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:h("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(s){s.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:h("Ctrl-Right","Option-Right"),exec:function(s){s.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:h("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(s){s.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:h("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(s){s.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:h("Shift-Right","Shift-Right"),exec:function(s){s.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:h("Right","Right|Ctrl-F"),exec:function(s,l){s.navigateRight(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(s){s.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:h(null,"Option-PageDown"),exec:function(s){s.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:h("PageDown","PageDown|Ctrl-V"),exec:function(s){s.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(s){s.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:h(null,"Option-PageUp"),exec:function(s){s.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(s){s.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:h("Ctrl-Up",null),exec:function(s){s.renderer.scrollBy(0,-2*s.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:h("Ctrl-Down",null),exec:function(s){s.renderer.scrollBy(0,2*s.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(s){s.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(s){s.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:h("Ctrl-Alt-E","Command-Option-E"),exec:function(s){s.commands.toggleRecording(s)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:h("Ctrl-Shift-E","Command-Shift-E"),exec:function(s){s.commands.replay(s)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:h("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(s){s.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:h("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(s){s.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:h("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(s){s.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:h(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(s){},readOnly:!0},{name:"cut",description:"Cut",exec:function(s){var l=s.$copyWithEmptySelection&&s.selection.isEmpty(),c=l?s.selection.getLineRange():s.selection.getRange();s._emit("cut",c),c.isEmpty()||s.session.remove(c),s.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(s,l){s.$handlePaste(l)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:h("Ctrl-D","Command-D"),exec:function(s){s.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:h("Ctrl-Shift-D","Command-Shift-D"),exec:function(s){s.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:h("Ctrl-Alt-S","Command-Alt-S"),exec:function(s){s.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:h("Ctrl-/","Command-/"),exec:function(s){s.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:h("Ctrl-Shift-/","Command-Shift-/"),exec:function(s){s.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:h("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(s){s.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:h("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(s){s.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:h("Ctrl-H","Command-Option-F"),exec:function(s){y.loadModule("ace/ext/searchbox",function(l){l.Search(s,!0)})}},{name:"undo",description:"Undo",bindKey:h("Ctrl-Z","Command-Z"),exec:function(s){s.undo()}},{name:"redo",description:"Redo",bindKey:h("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(s){s.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:h("Alt-Shift-Up","Command-Option-Up"),exec:function(s){s.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:h("Alt-Up","Option-Up"),exec:function(s){s.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:h("Alt-Shift-Down","Command-Option-Down"),exec:function(s){s.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:h("Alt-Down","Option-Down"),exec:function(s){s.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:h("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(s){s.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:h("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(s){s.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:h("Shift-Delete",null),exec:function(s){if(s.selection.isEmpty())s.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:h("Alt-Backspace","Command-Backspace"),exec:function(s){s.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:h("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(s){s.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:h("Ctrl-Shift-Backspace",null),exec:function(s){var l=s.selection.getRange();l.start.column=0,s.session.remove(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:h("Ctrl-Shift-Delete",null),exec:function(s){var l=s.selection.getRange();l.end.column=Number.MAX_VALUE,s.session.remove(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:h("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(s){s.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:h("Ctrl-Delete","Alt-Delete"),exec:function(s){s.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:h("Shift-Tab","Shift-Tab"),exec:function(s){s.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:h("Tab","Tab"),exec:function(s){s.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:h("Ctrl-[","Ctrl-["),exec:function(s){s.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:h("Ctrl-]","Ctrl-]"),exec:function(s){s.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(s,l){s.insert(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(s,l){s.insert(m.stringRepeat(l.text||"",l.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:h(null,"Ctrl-O"),exec:function(s){s.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:h("Alt-Shift-X","Ctrl-T"),exec:function(s){s.transposeLetters()},multiSelectAction:function(s){s.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:h("Ctrl-U","Ctrl-U"),exec:function(s){s.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:h("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(s){s.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:h(null,null),exec:function(s){s.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:h("Ctrl-Shift-L","Command-Shift-L"),exec:function(s){var l=s.selection.getRange();l.start.column=l.end.column=0,l.end.row++,s.selection.setRange(l,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:h("Ctrl+F3","F3"),exec:function(s){s.openLink()}},{name:"joinlines",description:"Join lines",bindKey:h(null,null),exec:function(s){for(var l=s.selection.isBackwards(),c=l?s.selection.getSelectionLead():s.selection.getSelectionAnchor(),a=l?s.selection.getSelectionAnchor():s.selection.getSelectionLead(),o=s.session.doc.getLine(c.row).length,u=s.session.doc.getTextRange(s.selection.getRange()),d=u.replace(/\n\s*/," ").length,w=s.session.doc.getLine(c.row),b=c.row+1;b<=a.row+1;b++){var E=m.stringTrimLeft(m.stringTrimRight(s.session.doc.getLine(b)));E.length!==0&&(E=" "+E),w+=E}a.row+1<s.session.doc.getLength()-1&&(w+=s.session.doc.getNewLineCharacter()),s.clearSelection(),s.session.doc.replace(new x(c.row,0,a.row+2,0),w),d>0?(s.selection.moveCursorTo(c.row,c.column),s.selection.selectTo(c.row,c.column+d)):(o=s.session.doc.getLine(c.row).length>o?o+1:o,s.selection.moveCursorTo(c.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:h(null,null),exec:function(s){var l=s.session.doc.getLength()-1,c=s.session.doc.getLine(l).length,a=s.selection.rangeList.ranges,o=[];a.length<1&&(a=[s.selection.getRange()]);for(var u=0;u<a.length;u++)u==a.length-1&&(a[u].end.row===l&&a[u].end.column===c||o.push(new x(a[u].end.row,a[u].end.column,l,c))),u===0?a[u].start.row===0&&a[u].start.column===0||o.push(new x(0,0,a[u].start.row,a[u].start.column)):o.push(new x(a[u-1].end.row,a[u-1].end.column,a[u].start.row,a[u].start.column));s.exitMultiSelectMode(),s.clearSelection();for(var u=0;u<o.length;u++)s.selection.addRange(o[u],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(s){s.selection.clearSelection(),s.navigateLineEnd(),s.insert(`
|
209
|
+
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(s){s.selection.clearSelection();var l=s.getCursorPosition();s.selection.moveTo(l.row-1,Number.MAX_VALUE),s.insert(`
|
210
|
+
`),l.row===0&&s.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(s){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),s.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:h("F1","F1"),exec:function(s){s.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:h(null,null),exec:function(s){s.prompt({$type:"modes"})},readOnly:!0}];for(var g=1;g<9;g++)r.commands.push({name:"foldToLevel"+g,description:"Fold To Level "+g,level:g,exec:function(s){s.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(e,r,v){var m=e("../lib/keys"),y=e("../mouse/default_gutter_handler").GutterTooltip,x=function(){function g(s){this.editor=s,this.gutterLayer=s.renderer.$gutterLayer,this.element=s.renderer.$gutter,this.lines=s.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new y(this.editor)}return g.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},g.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},g.prototype.$onGutterKeyDown=function(s){if(this.annotationTooltip.isOpen){s.preventDefault(),s.keyCode===m.escape&&this.annotationTooltip.hideTooltip();return}if(s.target===this.element){if(s.keyCode!=m.enter)return;s.preventDefault();var l=this.editor.getCursorPosition().row;this.editor.isRowVisible(l)||this.editor.scrollToLine(l,!0,!0),setTimeout((function(){var c=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),a=this.$findNearestFoldWidget(c),o=this.$findNearestAnnotation(c);if(!(a===null&&o===null)){if(a===null&&o!==null){this.activeRowIndex=o,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(a!==null&&o===null){this.activeRowIndex=a,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(o-c)<Math.abs(a-c)){this.activeRowIndex=o,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}else{this.activeRowIndex=a,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(s),setTimeout((function(){this.editor._signal("gutterkeydown",new h(s,this))}).bind(this),10)},g.prototype.$handleGutterKeyboardInteraction=function(s){if(s.keyCode===m.tab){s.preventDefault();return}if(s.keyCode===m.escape){s.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(s.keyCode===m.up){switch(s.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(s.keyCode===m.down){switch(s.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(s.keyCode===m.left){s.preventDefault(),this.$switchLane("annotation");return}if(s.keyCode===m.right){s.preventDefault(),this.$switchLane("fold");return}if(s.keyCode===m.enter||s.keyCode===m.space){switch(s.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var l=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),s),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==l&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(l),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var c=this.lines.cells[this.activeRowIndex].element.childNodes[2],a=c.getBoundingClientRect(),o=this.annotationTooltip.getElement().style;o.left=a.right+"px",o.top=a.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},g.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},g.prototype.$isFoldWidgetVisible=function(s){var l=this.editor.isRowFullyVisible(this.$rowIndexToRow(s)),c=this.$getFoldWidget(s).style.display!=="none";return l&&c},g.prototype.$isAnnotationVisible=function(s){var l=this.editor.isRowFullyVisible(this.$rowIndexToRow(s)),c=this.$getAnnotation(s).style.display!=="none";return l&&c},g.prototype.$getFoldWidget=function(s){var l=this.lines.get(s),c=l.element;return c.childNodes[1]},g.prototype.$getAnnotation=function(s){var l=this.lines.get(s),c=l.element;return c.childNodes[2]},g.prototype.$findNearestFoldWidget=function(s){if(this.$isFoldWidgetVisible(s))return s;for(var l=0;s-l>0||s+l<this.lines.getLength()-1;){if(l++,s-l>=0&&this.$isFoldWidgetVisible(s-l))return s-l;if(s+l<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(s+l))return s+l}return null},g.prototype.$findNearestAnnotation=function(s){if(this.$isAnnotationVisible(s))return s;for(var l=0;s-l>0||s+l<this.lines.getLength()-1;){if(l++,s-l>=0&&this.$isAnnotationVisible(s-l))return s-l;if(s+l<=this.lines.getLength()-1&&this.$isAnnotationVisible(s+l))return s+l}return null},g.prototype.$focusFoldWidget=function(s){if(s!=null){var l=this.$getFoldWidget(s);l.classList.add(this.editor.renderer.keyboardFocusClassName),l.focus()}},g.prototype.$focusAnnotation=function(s){if(s!=null){var l=this.$getAnnotation(s);l.classList.add(this.editor.renderer.keyboardFocusClassName),l.focus()}},g.prototype.$blurFoldWidget=function(s){var l=this.$getFoldWidget(s);l.classList.remove(this.editor.renderer.keyboardFocusClassName),l.blur()},g.prototype.$blurAnnotation=function(s){var l=this.$getAnnotation(s);l.classList.remove(this.editor.renderer.keyboardFocusClassName),l.blur()},g.prototype.$moveFoldWidgetUp=function(){for(var s=this.activeRowIndex;s>0;)if(s--,this.$isFoldWidgetVisible(s)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=s,this.$focusFoldWidget(this.activeRowIndex);return}},g.prototype.$moveFoldWidgetDown=function(){for(var s=this.activeRowIndex;s<this.lines.getLength()-1;)if(s++,this.$isFoldWidgetVisible(s)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=s,this.$focusFoldWidget(this.activeRowIndex);return}},g.prototype.$moveAnnotationUp=function(){for(var s=this.activeRowIndex;s>0;)if(s--,this.$isAnnotationVisible(s)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=s,this.$focusAnnotation(this.activeRowIndex);return}},g.prototype.$moveAnnotationDown=function(){for(var s=this.activeRowIndex;s<this.lines.getLength()-1;)if(s++,this.$isAnnotationVisible(s)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=s,this.$focusAnnotation(this.activeRowIndex);return}},g.prototype.$switchLane=function(s){switch(s){case"annotation":if(this.activeLane==="annotation")break;var l=this.$findNearestAnnotation(this.activeRowIndex);if(l==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=l,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var c=this.$findNearestFoldWidget(this.activeRowIndex);if(c==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=c,this.$focusFoldWidget(this.activeRowIndex);break}},g.prototype.$rowIndexToRow=function(s){var l=this.lines.get(s);return l?l.row:null},g.prototype.$rowToRowIndex=function(s){for(var l=0;l<this.lines.getLength();l++){var c=this.lines.get(l);if(c.row==s)return l}return null},g}();r.GutterKeyboardHandler=x;var h=function(){function g(s,l){this.gutterKeyboardHandler=l,this.domEvent=s}return g.prototype.getKey=function(){return m.keyCodeToString(this.domEvent.keyCode)},g.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},g.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},g.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},g}();r.GutterKeyboardEvent=h}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(e,r,v){var m=this&&this.__values||function(S){var A=typeof Symbol=="function"&&Symbol.iterator,N=A&&S[A],B=0;if(N)return N.call(S);if(S&&typeof S.length=="number")return{next:function(){return S&&B>=S.length&&(S=void 0),{value:S&&S[B++],done:!S}}};throw new TypeError(A?"Object is not iterable.":"Symbol.iterator is not defined.")},y=e("./lib/oop"),x=e("./lib/dom"),h=e("./lib/lang"),g=e("./lib/useragent"),s=e("./keyboard/textinput").TextInput,l=e("./mouse/mouse_handler").MouseHandler,c=e("./mouse/fold_handler").FoldHandler,a=e("./keyboard/keybinding").KeyBinding,o=e("./edit_session").EditSession,u=e("./search").Search,d=e("./range").Range,w=e("./lib/event_emitter").EventEmitter,b=e("./commands/command_manager").CommandManager,E=e("./commands/default_commands").commands,$=e("./config"),_=e("./token_iterator").TokenIterator,C=e("./keyboard/gutter_handler").GutterKeyboardHandler,R=e("./config").nls,L=e("./clipboard"),F=e("./lib/keys"),I=e("./lib/event"),H=e("./tooltip").HoverTooltip,P=function(){function S(A,N,B){this.session,this.$toDestroy=[];var U=A.getContainerElement();this.container=U,this.renderer=A,this.id="editor"+ ++S.$uid,this.commands=new b(g.isMac?"mac":"win",E),typeof document=="object"&&(this.textInput=new s(A.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new l(this),new c(this)),this.keyBinding=new a(this),this.$search=new u().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=h.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(K,Z){Z._$emitInputEvent.schedule(31)}),this.setSession(N||B&&B.session||new o("")),$.resetOptions(this),B&&this.setOptions(B),$._signal("editor",this)}return S.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},S.prototype.startOperation=function(A){this.session.startOperation(A)},S.prototype.endOperation=function(A){this.session.endOperation(A)},S.prototype.onStartOperation=function(A){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,A||(this.previousCommand=null)},S.prototype.onEndOperation=function(A){if(this.curOp&&this.session){if(A&&A.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var N=this.curOp.command,B=N&&N.scrollIntoView;if(B){switch(B){case"center-animate":B="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var U=this.selection.getRange(),K=this.renderer.layerConfig;(U.start.row>=K.lastRow||U.end.row<=K.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}B=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},S.prototype.$historyTracker=function(A){if(this.$mergeUndoDeltas){var N=this.prevOp,B=this.$mergeableCommands,U=N.command&&A.command.name==N.command.name;if(A.command.name=="insertstring"){var K=A.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),U=U&&this.mergeNextCommand&&(!/\s/.test(K)||/\s/.test(N.args)),this.mergeNextCommand=!0}else U=U&&B.indexOf(A.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(U=!1),U?this.session.mergeUndoDeltas=!0:B.indexOf(A.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},S.prototype.setKeyboardHandler=function(A,N){if(A&&typeof A=="string"&&A!="ace"){this.$keybindingId=A;var B=this;$.loadModule(["keybinding",A],function(U){B.$keybindingId==A&&B.keyBinding.setKeyboardHandler(U&&U.handler),N&&N()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(A),N&&N()},S.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},S.prototype.setSession=function(A){if(this.session!=A){this.curOp&&this.endOperation(),this.curOp={};var N=this.session;if(N){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var B=this.session.getSelection();B.off("changeCursor",this.$onCursorChange),B.off("changeSelection",this.$onSelectionChange)}this.session=A,A?(this.$onDocumentChange=this.onDocumentChange.bind(this),A.on("change",this.$onDocumentChange),this.renderer.setSession(A),this.$onChangeMode=this.onChangeMode.bind(this),A.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),A.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),A.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),A.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),A.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),A.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=A.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(A)),this._signal("changeSession",{session:A,oldSession:N}),this.curOp=null,N&&N._signal("changeEditor",{oldEditor:this}),N&&(N.$editor=null),A&&A._signal("changeEditor",{editor:this}),A&&(A.$editor=this),A&&!A.destroyed&&A.bgTokenizer.scheduleStart()}},S.prototype.getSession=function(){return this.session},S.prototype.setValue=function(A,N){return this.session.doc.setValue(A),N?N==1?this.navigateFileEnd():N==-1&&this.navigateFileStart():this.selectAll(),A},S.prototype.getValue=function(){return this.session.getValue()},S.prototype.getSelection=function(){return this.selection},S.prototype.resize=function(A){this.renderer.onResize(A)},S.prototype.setTheme=function(A,N){this.renderer.setTheme(A,N)},S.prototype.getTheme=function(){return this.renderer.getTheme()},S.prototype.setStyle=function(A){this.renderer.setStyle(A)},S.prototype.unsetStyle=function(A){this.renderer.unsetStyle(A)},S.prototype.getFontSize=function(){return this.getOption("fontSize")||x.computedStyle(this.container).fontSize},S.prototype.setFontSize=function(A){this.setOption("fontSize",A)},S.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var A=this;this.$highlightPending=!0,setTimeout(function(){A.$highlightPending=!1;var N=A.session;if(!(!N||N.destroyed)){N.$bracketHighlight&&(N.$bracketHighlight.markerIds.forEach(function(ce){N.removeMarker(ce)}),N.$bracketHighlight=null);var B=A.getCursorPosition(),U=A.getKeyboardHandler(),K=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(A),Z=N.getMatchingBracketRanges(B,K);if(!Z){var te=new _(N,B.row,B.column),he=te.getCurrentToken();if(he&&/\b(?:tag-open|tag-name)/.test(he.type)){var ne=N.getMatchingTags(B);ne&&(Z=[ne.openTagName.isEmpty()?ne.openTag:ne.openTagName,ne.closeTagName.isEmpty()?ne.closeTag:ne.closeTagName])}}if(!Z&&N.$mode.getMatching&&(Z=N.$mode.getMatching(A.session)),!Z){A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide();return}var ae="ace_bracket";Array.isArray(Z)?Z.length==1&&(ae="ace_error_bracket"):Z=[Z],Z.length==2&&(d.comparePoints(Z[0].end,Z[1].start)==0?Z=[d.fromPoints(Z[0].start,Z[1].end)]:d.comparePoints(Z[0].start,Z[1].end)==0&&(Z=[d.fromPoints(Z[1].start,Z[0].end)])),N.$bracketHighlight={ranges:Z,markerIds:Z.map(function(ce){return N.addMarker(ce,ae,"text")})},A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide()}},50)}},S.prototype.focus=function(){this.textInput.focus()},S.prototype.isFocused=function(){return this.textInput.isFocused()},S.prototype.blur=function(){this.textInput.blur()},S.prototype.onFocus=function(A){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",A))},S.prototype.onBlur=function(A){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",A))},S.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},S.prototype.onDocumentChange=function(A){var N=this.session.$useWrapMode,B=A.start.row==A.end.row?A.end.row:1/0;this.renderer.updateLines(A.start.row,B,N),this._signal("change",A),this.$cursorChange()},S.prototype.onTokenizerUpdate=function(A){var N=A.data;this.renderer.updateLines(N.first,N.last)},S.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},S.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},S.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},S.prototype.$updateHighlightActiveLine=function(){var A=this.getSession(),N;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(N=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(N=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(N=!1)),A.$highlightLineMarker&&!N)A.removeMarker(A.$highlightLineMarker.id),A.$highlightLineMarker=null;else if(!A.$highlightLineMarker&&N){var B=new d(N.row,N.column,N.row,1/0);B.id=A.addMarker(B,"ace_active-line","screenLine"),A.$highlightLineMarker=B}else N&&(A.$highlightLineMarker.start.row=N.row,A.$highlightLineMarker.end.row=N.row,A.$highlightLineMarker.start.column=N.column,A._signal("changeBackMarker"))},S.prototype.onSelectionChange=function(A){var N=this.session;if(N.$selectionMarker&&N.removeMarker(N.$selectionMarker),N.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var B=this.selection.getRange(),U=this.getSelectionStyle();N.$selectionMarker=N.addMarker(B,"ace_selection",U)}var K=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(K),this._signal("changeSelection")},S.prototype.$getSelectionHighLightRegexp=function(){var A=this.session,N=this.getSelectionRange();if(!(N.isEmpty()||N.isMultiLine())){var B=N.start.column,U=N.end.column,K=A.getLine(N.start.row),Z=K.substring(B,U);if(!(Z.length>5e3||!/[\w\d]/.test(Z))){var te=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Z}),he=K.substring(B-1,U+1);if(te.test(he))return te}}},S.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},S.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},S.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},S.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},S.prototype.onChangeMode=function(A){this.renderer.updateText(),this._emit("changeMode",A)},S.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},S.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},S.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},S.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},S.prototype.getCopyText=function(){var A=this.getSelectedText(),N=this.session.doc.getNewLineCharacter(),B=!1;if(!A&&this.$copyWithEmptySelection){B=!0;for(var U=this.selection.getAllRanges(),K=0;K<U.length;K++){var Z=U[K];K&&U[K-1].start.row==Z.start.row||(A+=this.session.getLine(Z.start.row)+N)}}var te={text:A};return this._signal("copy",te),L.lineMode=B?te.text:!1,te.text},S.prototype.onCopy=function(){this.commands.exec("copy",this)},S.prototype.onCut=function(){this.commands.exec("cut",this)},S.prototype.onPaste=function(A,N){var B={text:A,event:N};this.commands.exec("paste",this,B)},S.prototype.$handlePaste=function(A){typeof A=="string"&&(A={text:A}),this._signal("paste",A);var N=A.text,B=N===L.lineMode,U=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)B?U.insert({row:this.selection.lead.row,column:0},N):this.insert(N);else if(B)this.selection.rangeList.ranges.forEach(function(ae){U.insert({row:ae.start.row,column:0},N)});else{var K=N.split(/\r\n|\r|\n/),Z=this.selection.rangeList.ranges,te=K.length==2&&(!K[0]||!K[1]);if(K.length!=Z.length||te)return this.commands.exec("insertstring",this,N);for(var he=Z.length;he--;){var ne=Z[he];ne.isEmpty()||U.remove(ne),U.insert(ne.start,K[he])}}},S.prototype.execCommand=function(A,N){return this.commands.exec(A,this,N)},S.prototype.insert=function(A,N){var B=this.session,U=B.getMode(),K=this.getCursorPosition();if(this.getBehavioursEnabled()&&!N){var Z=U.transformAction(B.getState(K.row),"insertion",this,B,A);Z&&(A!==Z.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),A=Z.text)}if(A==" "&&(A=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&A.indexOf(`
|
211
|
+
`)==-1){var te=d.fromPoints(K,K);te.end.column+=A.length,this.session.remove(te)}}else{var te=this.getSelectionRange();K=this.session.remove(te),this.clearSelection()}if(A==`
|
212
|
+
`||A==`\r
|
213
|
+
`){var ce=B.getLine(K.row);if(K.column>ce.search(/\S|$/)){var he=ce.substr(K.column).search(/\S|$/);B.doc.removeInLine(K.row,K.column,K.column+he)}}this.clearSelection();var ne=K.column,ae=B.getState(K.row),ce=B.getLine(K.row),ue=U.checkOutdent(ae,ce,A);if(B.insert(K,A),Z&&Z.selection&&(Z.selection.length==2?this.selection.setSelectionRange(new d(K.row,ne+Z.selection[0],K.row,ne+Z.selection[1])):this.selection.setSelectionRange(new d(K.row+Z.selection[0],Z.selection[1],K.row+Z.selection[2],Z.selection[3]))),this.$enableAutoIndent){if(B.getDocument().isNewLine(A)){var ye=U.getNextLineIndent(ae,ce.slice(0,K.column),B.getTabString());B.insert({row:K.row+1,column:0},ye)}ue&&U.autoOutdent(ae,B,K.row)}},S.prototype.autoIndent=function(){for(var A=this.session,N=A.getMode(),B=this.selection.isEmpty()?[new d(0,0,A.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",K="",Z="",te=A.getTabString(),he=0;he<B.length;he++)for(var ne=B[he].start.row,ae=B[he].end.row,ce=ne;ce<=ae;ce++){ce>0&&(U=A.getState(ce-1),K=A.getLine(ce-1),Z=N.getNextLineIndent(U,K,te));var ue=A.getLine(ce),ye=N.$getIndent(ue);if(Z!==ye){if(ye.length>0){var Ae=new d(ce,0,ce,ye.length);A.remove(Ae)}Z.length>0&&A.insert({row:ce,column:0},Z)}N.autoOutdent(U,A,ce)}},S.prototype.onTextInput=function(A,N){if(!N)return this.keyBinding.onTextInput(A);this.startOperation({command:{name:"insertstring"}});var B=this.applyComposition.bind(this,A,N);this.selection.rangeCount?this.forEachSelection(B):B(),this.endOperation()},S.prototype.applyComposition=function(A,N){if(N.extendLeft||N.extendRight){var B=this.selection.getRange();B.start.column-=N.extendLeft,B.end.column+=N.extendRight,B.start.column<0&&(B.start.row--,B.start.column+=this.session.getLine(B.start.row).length+1),this.selection.setRange(B),!A&&!B.isEmpty()&&this.remove()}if((A||!this.selection.isEmpty())&&this.insert(A,!0),N.restoreStart||N.restoreEnd){var B=this.selection.getRange();B.start.column-=N.restoreStart,B.end.column-=N.restoreEnd,this.selection.setRange(B)}},S.prototype.onCommandKey=function(A,N,B){return this.keyBinding.onCommandKey(A,N,B)},S.prototype.setOverwrite=function(A){this.session.setOverwrite(A)},S.prototype.getOverwrite=function(){return this.session.getOverwrite()},S.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},S.prototype.setScrollSpeed=function(A){this.setOption("scrollSpeed",A)},S.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},S.prototype.setDragDelay=function(A){this.setOption("dragDelay",A)},S.prototype.getDragDelay=function(){return this.getOption("dragDelay")},S.prototype.setSelectionStyle=function(A){this.setOption("selectionStyle",A)},S.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},S.prototype.setHighlightActiveLine=function(A){this.setOption("highlightActiveLine",A)},S.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},S.prototype.setHighlightGutterLine=function(A){this.setOption("highlightGutterLine",A)},S.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},S.prototype.setHighlightSelectedWord=function(A){this.setOption("highlightSelectedWord",A)},S.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},S.prototype.setAnimatedScroll=function(A){this.renderer.setAnimatedScroll(A)},S.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},S.prototype.setShowInvisibles=function(A){this.renderer.setShowInvisibles(A)},S.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},S.prototype.setDisplayIndentGuides=function(A){this.renderer.setDisplayIndentGuides(A)},S.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},S.prototype.setHighlightIndentGuides=function(A){this.renderer.setHighlightIndentGuides(A)},S.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},S.prototype.setShowPrintMargin=function(A){this.renderer.setShowPrintMargin(A)},S.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},S.prototype.setPrintMarginColumn=function(A){this.renderer.setPrintMarginColumn(A)},S.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},S.prototype.setReadOnly=function(A){this.setOption("readOnly",A)},S.prototype.getReadOnly=function(){return this.getOption("readOnly")},S.prototype.setBehavioursEnabled=function(A){this.setOption("behavioursEnabled",A)},S.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},S.prototype.setWrapBehavioursEnabled=function(A){this.setOption("wrapBehavioursEnabled",A)},S.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},S.prototype.setShowFoldWidgets=function(A){this.setOption("showFoldWidgets",A)},S.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},S.prototype.setFadeFoldWidgets=function(A){this.setOption("fadeFoldWidgets",A)},S.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},S.prototype.remove=function(A){this.selection.isEmpty()&&(A=="left"?this.selection.selectLeft():this.selection.selectRight());var N=this.getSelectionRange();if(this.getBehavioursEnabled()){var B=this.session,U=B.getState(N.start.row),K=B.getMode().transformAction(U,"deletion",this,B,N);if(N.end.column===0){var Z=B.getTextRange(N);if(Z[Z.length-1]==`
|
214
|
+
`){var te=B.getLine(N.end.row);/^\s+$/.test(te)&&(N.end.column=te.length)}}K&&(N=K)}this.session.remove(N),this.clearSelection()},S.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var A=this.getSelectionRange();A.start.column==A.end.column&&A.start.row==A.end.row&&(A.end.column=0,A.end.row++),this.session.remove(A),this.clearSelection()},S.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var A=this.getCursorPosition();this.insert(`
|
215
|
+
`),this.moveCursorToPosition(A)},S.prototype.setGhostText=function(A,N){this.renderer.setGhostText(A,N)},S.prototype.removeGhostText=function(){this.renderer.removeGhostText()},S.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var A=this.getCursorPosition(),N=A.column;if(N!==0){var B=this.session.getLine(A.row),U,K;N<B.length?(U=B.charAt(N)+B.charAt(N-1),K=new d(A.row,N-1,A.row,N+1)):(U=B.charAt(N-1)+B.charAt(N-2),K=new d(A.row,N-2,A.row,N)),this.session.replace(K,U),this.session.selection.moveToPosition(K.end)}}},S.prototype.toLowerCase=function(){var A=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),B=this.session.getTextRange(N);this.session.replace(N,B.toLowerCase()),this.selection.setSelectionRange(A)},S.prototype.toUpperCase=function(){var A=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),B=this.session.getTextRange(N);this.session.replace(N,B.toUpperCase()),this.selection.setSelectionRange(A)},S.prototype.indent=function(){var A=this.session,N=this.getSelectionRange();if(N.start.row<N.end.row){var B=this.$getSelectedRows();A.indentRows(B.first,B.last," ");return}else if(N.start.column<N.end.column){var U=A.getTextRange(N);if(!/^\s+$/.test(U)){var B=this.$getSelectedRows();A.indentRows(B.first,B.last," ");return}}var K=A.getLine(N.start.row),Z=N.start,te=A.getTabSize(),he=A.documentToScreenColumn(Z.row,Z.column);if(this.session.getUseSoftTabs())var ne=te-he%te,ae=h.stringRepeat(" ",ne);else{for(var ne=he%te;K[N.start.column-1]==" "&≠)N.start.column--,ne--;this.selection.setSelectionRange(N),ae=" "}return this.insert(ae)},S.prototype.blockIndent=function(){var A=this.$getSelectedRows();this.session.indentRows(A.first,A.last," ")},S.prototype.blockOutdent=function(){var A=this.session.getSelection();this.session.outdentRows(A.getRange())},S.prototype.sortLines=function(){for(var A=this.$getSelectedRows(),N=this.session,B=[],U=A.first;U<=A.last;U++)B.push(N.getLine(U));B.sort(function(te,he){return te.toLowerCase()<he.toLowerCase()?-1:te.toLowerCase()>he.toLowerCase()?1:0});for(var K=new d(0,0,0,0),U=A.first;U<=A.last;U++){var Z=N.getLine(U);K.start.row=U,K.end.row=U,K.end.column=Z.length,N.replace(K,B[U-A.first])}},S.prototype.toggleCommentLines=function(){var A=this.session.getState(this.getCursorPosition().row),N=this.$getSelectedRows();this.session.getMode().toggleCommentLines(A,this.session,N.first,N.last)},S.prototype.toggleBlockComment=function(){var A=this.getCursorPosition(),N=this.session.getState(A.row),B=this.getSelectionRange();this.session.getMode().toggleBlockComment(N,this.session,B,A)},S.prototype.getNumberAt=function(A,N){var B=/[\-]?[0-9]+(?:\.[0-9]+)?/g;B.lastIndex=0;for(var U=this.session.getLine(A);B.lastIndex<N;){var K=B.exec(U);if(K.index<=N&&K.index+K[0].length>=N){var Z={value:K[0],start:K.index,end:K.index+K[0].length};return Z}}return null},S.prototype.modifyNumber=function(A){var N=this.selection.getCursor().row,B=this.selection.getCursor().column,U=new d(N,B-1,N,B),K=this.session.getTextRange(U);if(!isNaN(parseFloat(K))&&isFinite(K)){var Z=this.getNumberAt(N,B);if(Z){var te=Z.value.indexOf(".")>=0?Z.start+Z.value.indexOf(".")+1:Z.end,he=Z.start+Z.value.length-te,ne=parseFloat(Z.value);ne*=Math.pow(10,he),te!==Z.end&&B<te?A*=Math.pow(10,Z.end-B-1):A*=Math.pow(10,Z.end-B),ne+=A,ne/=Math.pow(10,he);var ae=ne.toFixed(he),ce=new d(N,Z.start,N,Z.end);this.session.replace(ce,ae),this.moveCursorTo(N,Math.max(Z.start+1,B+ae.length-Z.value.length))}}else this.toggleWord()},S.prototype.toggleWord=function(){var A=this.selection.getCursor().row,N=this.selection.getCursor().column;this.selection.selectWord();var B=this.getSelectedText(),U=this.selection.getWordRange().start.column,K=B.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),Z=N-U-1;Z<0&&(Z=0);var te=0,he=0,ne=this;B.match(/[A-Za-z0-9_]+/)&&K.forEach(function(qe,ut){he=te+qe.length,Z>=te&&Z<=he&&(B=qe,ne.selection.clearSelection(),ne.moveCursorTo(A,te+U),ne.selection.selectTo(A,he+U)),te=he});for(var ae=this.$toggleWordPairs,ce,ue=0;ue<ae.length;ue++)for(var ye=ae[ue],Ae=0;Ae<=1;Ae++){var $e=+!Ae,Ie=B.match(new RegExp("^\\s?_?("+h.escapeRegExp(ye[Ae])+")\\s?$","i"));if(Ie){var Ge=B.match(new RegExp("([_]|^|\\s)("+h.escapeRegExp(Ie[1])+")($|\\s)","g"));Ge&&(ce=B.replace(new RegExp(h.escapeRegExp(ye[Ae]),"i"),function(qe){var ut=ye[$e];return qe.toUpperCase()==qe?ut=ut.toUpperCase():qe.charAt(0).toUpperCase()==qe.charAt(0)&&(ut=ut.substr(0,0)+ye[$e].charAt(0).toUpperCase()+ut.substr(1)),ut}),this.insert(ce),ce="")}}},S.prototype.findLinkAt=function(A,N){var B,U,K=this.session.getLine(A),Z=K.split(/((?:https?|ftp):\/\/[\S]+)/),te=N;te<0&&(te=0);var he=0,ne=0,ae;try{for(var ce=m(Z),ue=ce.next();!ue.done;ue=ce.next()){var ye=ue.value;if(ne=he+ye.length,te>=he&&te<=ne&&ye.match(/((?:https?|ftp):\/\/[\S]+)/)){ae=ye.replace(/[\s:.,'";}\]]+$/,"");break}he=ne}}catch(Ae){B={error:Ae}}finally{try{ue&&!ue.done&&(U=ce.return)&&U.call(ce)}finally{if(B)throw B.error}}return ae},S.prototype.openLink=function(){var A=this.selection.getCursor(),N=this.findLinkAt(A.row,A.column);return N&&window.open(N,"_blank"),N!=null},S.prototype.removeLines=function(){var A=this.$getSelectedRows();this.session.removeFullLines(A.first,A.last),this.clearSelection()},S.prototype.duplicateSelection=function(){var A=this.selection,N=this.session,B=A.getRange(),U=A.isBackwards();if(B.isEmpty()){var K=B.start.row;N.duplicateLines(K,K)}else{var Z=U?B.start:B.end,te=N.insert(Z,N.getTextRange(B));B.start=Z,B.end=te,A.setSelectionRange(B,U)}},S.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},S.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},S.prototype.moveText=function(A,N,B){return this.session.moveText(A,N,B)},S.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},S.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},S.prototype.$moveLines=function(A,N){var B,U,K=this.selection;if(!K.inMultiSelectMode||this.inVirtualSelectionMode){var Z=K.toOrientedRange();B=this.$getSelectedRows(Z),U=this.session.$moveLines(B.first,B.last,N?0:A),N&&A==-1&&(U=0),Z.moveBy(U,0),K.fromOrientedRange(Z)}else{var te=K.rangeList.ranges;K.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var he=0,ne=0,ae=te.length,ce=0;ce<ae;ce++){var ue=ce;te[ce].moveBy(he,0),B=this.$getSelectedRows(te[ce]);for(var ye=B.first,Ae=B.last;++ce<ae;){ne&&te[ce].moveBy(ne,0);var $e=this.$getSelectedRows(te[ce]);if(N&&$e.first!=Ae||!N&&$e.first>Ae+1)break;Ae=$e.last}for(ce--,he=this.session.$moveLines(ye,Ae,N?0:A),N&&A==-1&&(ue=ce+1);ue<=ce;)te[ue].moveBy(he,0),ue++;N||(he=0),ne+=he}K.fromOrientedRange(K.ranges[0]),K.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},S.prototype.$getSelectedRows=function(A){return A=(A||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(A.start.row),last:this.session.getRowFoldEnd(A.end.row)}},S.prototype.onCompositionStart=function(A){this.renderer.showComposition(A)},S.prototype.onCompositionUpdate=function(A){this.renderer.setCompositionText(A)},S.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},S.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},S.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},S.prototype.isRowVisible=function(A){return A>=this.getFirstVisibleRow()&&A<=this.getLastVisibleRow()},S.prototype.isRowFullyVisible=function(A){return A>=this.renderer.getFirstFullyVisibleRow()&&A<=this.renderer.getLastFullyVisibleRow()},S.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},S.prototype.$moveByPage=function(A,N){var B=this.renderer,U=this.renderer.layerConfig,K=A*Math.floor(U.height/U.lineHeight);N===!0?this.selection.$moveSelection(function(){this.moveCursorBy(K,0)}):N===!1&&(this.selection.moveCursorBy(K,0),this.selection.clearSelection());var Z=B.scrollTop;B.scrollBy(0,K*U.lineHeight),N!=null&&B.scrollCursorIntoView(null,.5),B.animateScrolling(Z)},S.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},S.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},S.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},S.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},S.prototype.scrollPageDown=function(){this.$moveByPage(1)},S.prototype.scrollPageUp=function(){this.$moveByPage(-1)},S.prototype.scrollToRow=function(A){this.renderer.scrollToRow(A)},S.prototype.scrollToLine=function(A,N,B,U){this.renderer.scrollToLine(A,N,B,U)},S.prototype.centerSelection=function(){var A=this.getSelectionRange(),N={row:Math.floor(A.start.row+(A.end.row-A.start.row)/2),column:Math.floor(A.start.column+(A.end.column-A.start.column)/2)};this.renderer.alignCursor(N,.5)},S.prototype.getCursorPosition=function(){return this.selection.getCursor()},S.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},S.prototype.getSelectionRange=function(){return this.selection.getRange()},S.prototype.selectAll=function(){this.selection.selectAll()},S.prototype.clearSelection=function(){this.selection.clearSelection()},S.prototype.moveCursorTo=function(A,N){this.selection.moveCursorTo(A,N)},S.prototype.moveCursorToPosition=function(A){this.selection.moveCursorToPosition(A)},S.prototype.jumpToMatching=function(A,N){var B=this.getCursorPosition(),U=new _(this.session,B.row,B.column),K=U.getCurrentToken(),Z=0;K&&K.type.indexOf("tag-name")!==-1&&(K=U.stepBackward());var te=K||U.stepForward();if(te){var he,ne=!1,ae={},ce=B.column-te.start,ue,ye={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(te.value.match(/[{}()\[\]]/g)){for(;ce<te.value.length&&!ne;ce++)if(ye[te.value[ce]])switch(ue=ye[te.value[ce]]+"."+te.type.replace("rparen","lparen"),isNaN(ae[ue])&&(ae[ue]=0),te.value[ce]){case"(":case"[":case"{":ae[ue]++;break;case")":case"]":case"}":ae[ue]--,ae[ue]===-1&&(he="bracket",ne=!0);break}}else te.type.indexOf("tag-name")!==-1&&(isNaN(ae[te.value])&&(ae[te.value]=0),K.value==="<"&&Z>1?ae[te.value]++:K.value==="</"&&ae[te.value]--,ae[te.value]===-1&&(he="tag",ne=!0));ne||(K=te,Z++,te=U.stepForward(),ce=0)}while(te&&!ne);if(he){var Ae,$e;if(he==="bracket")Ae=this.session.getBracketRange(B),Ae||(Ae=new d(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ce-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ce-1),$e=Ae.start,(N||$e.row===B.row&&Math.abs($e.column-B.column)<2)&&(Ae=this.session.getBracketRange($e)));else if(he==="tag"){if(!te||te.type.indexOf("tag-name")===-1)return;if(Ae=new d(U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2,U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2),Ae.compare(B.row,B.column)===0){var Ie=this.session.getMatchingTags(B);Ie&&(Ie.openTag.contains(B.row,B.column)?(Ae=Ie.closeTag,$e=Ae.start):(Ae=Ie.openTag,Ie.closeTag.start.row===B.row&&Ie.closeTag.start.column===B.column?$e=Ae.end:$e=Ae.start))}$e=$e||Ae.start}$e=Ae&&Ae.cursor||$e,$e&&(A?Ae&&N?this.selection.setRange(Ae):Ae&&Ae.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo($e.row,$e.column):this.selection.moveTo($e.row,$e.column))}}},S.prototype.gotoLine=function(A,N,B){this.selection.clearSelection(),this.session.unfold({row:A-1,column:N||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(A-1,N||0),this.isRowFullyVisible(A-1)||this.scrollToLine(A-1,!0,B)},S.prototype.navigateTo=function(A,N){this.selection.moveTo(A,N)},S.prototype.navigateUp=function(A){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(-A||-1,0)},S.prototype.navigateDown=function(A){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(A||1,0)},S.prototype.navigateLeft=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorLeft();else{var N=this.getSelectionRange().start;this.moveCursorToPosition(N)}this.clearSelection()},S.prototype.navigateRight=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorRight();else{var N=this.getSelectionRange().end;this.moveCursorToPosition(N)}this.clearSelection()},S.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},S.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},S.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},S.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},S.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},S.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},S.prototype.replace=function(A,N){N&&this.$search.set(N);var B=this.$search.find(this.session),U=0;return B&&(this.$tryReplace(B,A)&&(U=1),this.selection.setSelectionRange(B),this.renderer.scrollSelectionIntoView(B.start,B.end)),U},S.prototype.replaceAll=function(A,N){N&&this.$search.set(N);var B=this.$search.findAll(this.session),U=0;if(!B.length)return U;var K=this.getSelectionRange();this.selection.moveTo(0,0);for(var Z=B.length-1;Z>=0;--Z)this.$tryReplace(B[Z],A)&&U++;return this.selection.setSelectionRange(K),U},S.prototype.$tryReplace=function(A,N){var B=this.session.getTextRange(A);return N=this.$search.replace(B,N),N!==null?(A.end=this.session.replace(A,N),A):null},S.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},S.prototype.find=function(A,N,B){N||(N={}),typeof A=="string"||A instanceof RegExp?N.needle=A:typeof A=="object"&&y.mixin(N,A);var U=this.selection.getRange();N.needle==null&&(A=this.session.getTextRange(U)||this.$search.$options.needle,A||(U=this.session.getWordRange(U.start.row,U.start.column),A=this.session.getTextRange(U)),this.$search.set({needle:A})),this.$search.set(N),N.start||this.$search.set({start:U});var K=this.$search.find(this.session);if(N.preventScroll)return K;if(K)return this.revealRange(K,B),K;N.backwards?U.start=U.end:U.end=U.start,this.selection.setRange(U)},S.prototype.findNext=function(A,N){this.find({skipCurrent:!0,backwards:!1},A,N)},S.prototype.findPrevious=function(A,N){this.find(A,{skipCurrent:!0,backwards:!0},N)},S.prototype.revealRange=function(A,N){this.session.unfold(A),this.selection.setSelectionRange(A);var B=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(A.start,A.end,.5),N!==!1&&this.renderer.animateScrolling(B)},S.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},S.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},S.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(A){A.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},S.prototype.setAutoScrollEditorIntoView=function(A){if(A){var N,B=this,U=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var K=this.$scrollAnchor;K.style.cssText="position:absolute",this.container.insertBefore(K,this.container.firstChild);var Z=this.on("changeSelection",function(){U=!0}),te=this.renderer.on("beforeRender",function(){U&&(N=B.renderer.container.getBoundingClientRect())}),he=this.renderer.on("afterRender",function(){if(U&&N&&(B.isFocused()||B.searchBox&&B.searchBox.isFocused())){var ne=B.renderer,ae=ne.$cursorLayer.$pixelPos,ce=ne.layerConfig,ue=ae.top-ce.offset;ae.top>=0&&ue+N.top<0?U=!0:ae.top<ce.height&&ae.top+N.top+ce.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(K.style.top=ue+"px",K.style.left=ae.left+"px",K.style.height=ce.lineHeight+"px",K.scrollIntoView(U)),U=N=null}});this.setAutoScrollEditorIntoView=function(ne){ne||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Z),this.renderer.off("afterRender",he),this.renderer.off("beforeRender",te))}}},S.prototype.$resetCursorStyle=function(){var A=this.$cursorStyle||"ace",N=this.renderer.$cursorLayer;N&&(N.setSmoothBlinking(/smooth/.test(A)),N.isBlinking=!this.$readOnly&&A!="wide",x.setCssClass(N.element,"ace_slim-cursors",/slim/.test(A)))},S.prototype.prompt=function(A,N,B){var U=this;$.loadModule("ace/ext/prompt",function(K){K.prompt(U,A,N,B)})},S}();P.$uid=0,P.prototype.curOp=null,P.prototype.prevOp={},P.prototype.$mergeableCommands=["backspace","del","insertstring"],P.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],y.implement(P.prototype,w),$.defineOptions(P.prototype,"editor",{selectionStyle:{set:function(S){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:S})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(S){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(S){var A=this;this.textInput.setReadOnly(S),this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(B){var U=!1;if(B&&B.type=="keydown"){if(U=B&&B.key&&B.key.length==1&&!B.ctrlKey&&!B.metaKey,!U)return}else B&&B.type!=="exec"&&(U=!0);if(U){A.hoverTooltip||(A.hoverTooltip=new H);var K=x.createElement("div");K.textContent=R("editor.tooltip.disable-editing","Editing is disabled"),A.hoverTooltip.isOpen||A.hoverTooltip.showForRange(A,A.getSelectionRange(),K)}else A.hoverTooltip&&A.hoverTooltip.isOpen&&A.hoverTooltip.hide()});var N=this.textInput.getElement();S?(I.addListener(N,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(I.removeListener(N,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))},initialValue:!1},copyWithEmptySelection:{set:function(S){this.textInput.setCopyWithEmptySelection(S)},initialValue:!1},cursorStyle:{set:function(S){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(S){this.setAutoScrollEditorIntoView(S)}},keyboardHandler:{set:function(S){this.setKeyboardHandler(S)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(S){this.session.setValue(S)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(S){this.setSession(S)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(S){this.renderer.$gutterLayer.setShowLineNumbers(S),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),S&&this.$relativeLineNumbers?O.attach(this):O.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(S){this.$showLineNumbers&&S?O.attach(this):O.detach(this)}},placeholder:{set:function(S){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var A=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(A&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),x.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!A&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),x.addCssClass(this.container,"ace_hasPlaceholder");var N=x.createElement("div");N.className="ace_placeholder",N.textContent=this.$placeholder||"",this.renderer.placeholderNode=N,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!A&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(S){var A={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(U){U.blur(),U.renderer.scroller.focus()},readOnly:!0},N=function(U){if(U.target==this.renderer.scroller&&U.keyCode===F.enter){U.preventDefault();var K=this.getCursorPosition().row;this.isRowVisible(K)||this.scrollToLine(K,!0,!0),this.focus()}},B;S?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(g.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",R("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",R("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",N.bind(this)),this.commands.addCommand(A),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",R("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",R("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),B||(B=new C(this)),B.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",N.bind(this)),this.commands.removeCommand(A),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),B&&B.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(S){this.$textInputAriaLabel=S},initialValue:""},enableMobileMenu:{set:function(S){this.$enableMobileMenu=S},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var O={getText:function(S,A){return(Math.abs(S.selection.lead.row-A)||A+1+(A<9?"·":""))+""},getWidth:function(S,A,N){return Math.max(A.toString().length,(N.lastRow+1).toString().length,2)*N.characterWidth},update:function(S,A){A.renderer.$loop.schedule(A.renderer.CHANGE_GUTTER)},attach:function(S){S.renderer.$gutterLayer.$renderer=this,S.on("changeSelection",this.update),this.update(null,S)},detach:function(S){S.renderer.$gutterLayer.$renderer==this&&(S.renderer.$gutterLayer.$renderer=null),S.off("changeSelection",this.update),this.update(null,S)}};r.Editor=P}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,r,v){var m=e("../lib/dom"),y=function(){function x(h,g){this.element=h,this.canvasHeight=g||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return x.prototype.moveContainer=function(h){m.translate(this.element,0,-(h.firstRowScreen*h.lineHeight%this.canvasHeight)-h.offset*this.$offsetCoefficient)},x.prototype.pageChanged=function(h,g){return Math.floor(h.firstRowScreen*h.lineHeight/this.canvasHeight)!==Math.floor(g.firstRowScreen*g.lineHeight/this.canvasHeight)},x.prototype.computeLineTop=function(h,g,s){var l=g.firstRowScreen*g.lineHeight,c=Math.floor(l/this.canvasHeight),a=s.documentToScreenRow(h,0)*g.lineHeight;return a-c*this.canvasHeight},x.prototype.computeLineHeight=function(h,g,s){return g.lineHeight*s.getRowLineCount(h)},x.prototype.getLength=function(){return this.cells.length},x.prototype.get=function(h){return this.cells[h]},x.prototype.shift=function(){this.$cacheCell(this.cells.shift())},x.prototype.pop=function(){this.$cacheCell(this.cells.pop())},x.prototype.push=function(h){if(Array.isArray(h)){this.cells.push.apply(this.cells,h);for(var g=m.createFragment(this.element),s=0;s<h.length;s++)g.appendChild(h[s].element);this.element.appendChild(g)}else this.cells.push(h),this.element.appendChild(h.element)},x.prototype.unshift=function(h){if(Array.isArray(h)){this.cells.unshift.apply(this.cells,h);for(var g=m.createFragment(this.element),s=0;s<h.length;s++)g.appendChild(h[s].element);this.element.firstChild?this.element.insertBefore(g,this.element.firstChild):this.element.appendChild(g)}else this.cells.unshift(h),this.element.insertAdjacentElement("afterbegin",h.element)},x.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},x.prototype.$cacheCell=function(h){h&&(h.element.remove(),this.cellCache.push(h))},x.prototype.createCell=function(h,g,s,l){var c=this.cellCache.pop();if(!c){var a=m.createElement("div");l&&l(a),this.element.appendChild(a),c={element:a,text:"",row:h}}return c.row=h,c},x}();r.Lines=y}),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,v){var m=e("../lib/dom"),y=e("../lib/oop"),x=e("../lib/lang"),h=e("../lib/event_emitter").EventEmitter,g=e("./lines").Lines,s=e("../config").nls,l=function(){function a(o){this.element=m.createElement("div"),this.element.className="ace_layer ace_gutter-layer",o.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new g(this.element),this.$lines.$offsetCoefficient=1}return a.prototype.setSession=function(o){this.session&&this.session.off("change",this.$updateAnnotations),this.session=o,o&&o.on("change",this.$updateAnnotations)},a.prototype.addGutterDecoration=function(o,u){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(o,u)},a.prototype.removeGutterDecoration=function(o,u){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(o,u)},a.prototype.setAnnotations=function(o){this.$annotations=[];for(var u=0;u<o.length;u++){var d=o[u],w=d.row,b=this.$annotations[w];b||(b=this.$annotations[w]={text:[],type:[],displayText:[]});var E=d.text,$=d.text,_=d.type;E=E?x.escapeHTML(E):d.html||"",$=$||d.html||"",b.text.indexOf(E)===-1&&(b.text.push(E),b.type.push(_),b.displayText.push($));var C=d.className;C?b.className=C:_==="error"?b.className=" ace_error":_==="security"&&!/\bace_error\b/.test(b.className)?b.className=" ace_security":_==="warning"&&!/\bace_(error|security)\b/.test(b.className)?b.className=" ace_warning":_==="info"&&!b.className?b.className=" ace_info":_==="hint"&&!b.className&&(b.className=" ace_hint")}},a.prototype.$updateAnnotations=function(o){if(this.$annotations.length){var u=o.start.row,d=o.end.row-u;if(d!==0)if(o.action=="remove")this.$annotations.splice(u,d+1,null);else{var w=new Array(d+1);w.unshift(u,1),this.$annotations.splice.apply(this.$annotations,w)}}},a.prototype.update=function(o){this.config=o;var u=this.session,d=o.firstRow,w=Math.min(o.lastRow+o.gutterOffset,u.getLength()-1);this.oldLastRow=w,this.config=o,this.$lines.moveContainer(o),this.$updateCursorRow();for(var b=u.getNextFoldLine(d),E=b?b.start.row:1/0,$=null,_=-1,C=d;;){if(C>E&&(C=b.end.row+1,b=u.getNextFoldLine(C,b),E=b?b.start.row:1/0),C>w){for(;this.$lines.getLength()>_+1;)this.$lines.pop();break}$=this.$lines.get(++_),$?$.row=C:($=this.$lines.createCell(C,o,this.session,c),this.$lines.push($)),this.$renderCell($,o,b,C),C++}this._signal("afterRender"),this.$updateGutterWidth(o)},a.prototype.$updateGutterWidth=function(o){var u=this.session,d=u.gutterRenderer||this.$renderer,w=u.$firstLineNumber,b=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||u.$useWrapMode)&&(b=u.getLength()+w-1);var E=d?d.getWidth(u,b,o):b.toString().length*o.characterWidth,$=this.$padding||this.$computePadding();E+=$.left+$.right,E!==this.gutterWidth&&!isNaN(E)&&(this.gutterWidth=E,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",E))},a.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var o=this.session.selection.getCursor();this.$cursorRow!==o.row&&(this.$cursorRow=o.row)}},a.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var o=this.session.selection.cursor.row;if(this.$cursorRow=o,!(this.$cursorCell&&this.$cursorCell.row==o)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var u=this.$lines.cells;this.$cursorCell=null;for(var d=0;d<u.length;d++){var w=u[d];if(w.row>=this.$cursorRow){if(w.row>this.$cursorRow){var b=this.session.getFoldLine(this.$cursorRow);if(d>0&&b&&b.start.row==u[d-1].row)w=u[d-1];else break}w.element.className="ace_gutter-active-line "+w.element.className,this.$cursorCell=w;break}}}}},a.prototype.scrollLines=function(o){var u=this.config;if(this.config=o,this.$updateCursorRow(),this.$lines.pageChanged(u,o))return this.update(o);this.$lines.moveContainer(o);var d=Math.min(o.lastRow+o.gutterOffset,this.session.getLength()-1),w=this.oldLastRow;if(this.oldLastRow=d,!u||w<o.firstRow)return this.update(o);if(d<u.firstRow)return this.update(o);if(u.firstRow<o.firstRow)for(var b=this.session.getFoldedRowCount(u.firstRow,o.firstRow-1);b>0;b--)this.$lines.shift();if(w>d)for(var b=this.session.getFoldedRowCount(d+1,w);b>0;b--)this.$lines.pop();o.firstRow<u.firstRow&&this.$lines.unshift(this.$renderLines(o,o.firstRow,u.firstRow-1)),d>w&&this.$lines.push(this.$renderLines(o,w+1,d)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(o)},a.prototype.$renderLines=function(o,u,d){for(var w=[],b=u,E=this.session.getNextFoldLine(b),$=E?E.start.row:1/0;b>$&&(b=E.end.row+1,E=this.session.getNextFoldLine(b,E),$=E?E.start.row:1/0),!(b>d);){var _=this.$lines.createCell(b,o,this.session,c);this.$renderCell(_,o,E,b),w.push(_),b++}return w},a.prototype.$renderCell=function(o,u,d,w){var b=o.element,E=this.session,$=b.childNodes[0],_=b.childNodes[1],C=b.childNodes[2],R=C.firstChild,L=E.$firstLineNumber,F=E.$breakpoints,I=E.$decorations,H=E.gutterRenderer||this.$renderer,P=this.$showFoldWidgets&&E.foldWidgets,O=d?d.start.row:Number.MAX_VALUE,S=u.lineHeight+"px",A=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",N=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",B=(H?H.getText(E,w):w+L).toString();if(this.$highlightGutterLine&&(w==this.$cursorRow||d&&w<this.$cursorRow&&w>=O&&this.$cursorRow<=d.end.row)&&(A+="ace_gutter-active-line ",this.$cursorCell!=o&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=o)),F[w]&&(A+=F[w]),I[w]&&(A+=I[w]),this.$annotations[w]&&w!==O&&(A+=this.$annotations[w].className),P){var U=P[w];U==null&&(U=P[w]=E.getFoldWidget(w))}if(U){var K="ace_fold-widget ace_"+U,Z=U=="start"&&w==O&&w<d.end.row;if(Z){K+=" ace_closed";for(var te="",he=!1,ne=w+1;ne<=d.end.row;ne++)if(this.$annotations[ne]){if(this.$annotations[ne].className===" ace_error"){he=!0,te=" ace_error_fold";break}this.$annotations[ne].className===" ace_security"?(he=!0,te=" ace_security_fold"):this.$annotations[ne].className===" ace_warning"&&te!==" ace_security_fold"&&(he=!0,te=" ace_warning_fold")}A+=te}else K+=" ace_open";_.className!=K&&(_.className=K),m.setStyle(_.style,"height",S),m.setStyle(_.style,"display","inline-block"),_.setAttribute("role","button"),_.setAttribute("tabindex","-1");var ae=E.getFoldWidgetRange(w);ae?_.setAttribute("aria-label",s("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[ae.start.row+1,ae.end.row+1])):d?_.setAttribute("aria-label",s("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[d.start.row+1,d.end.row+1])):_.setAttribute("aria-label",s("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[w+1])),Z?(_.setAttribute("aria-expanded","false"),_.setAttribute("title",s("gutter.code-folding.closed.title","Unfold code"))):(_.setAttribute("aria-expanded","true"),_.setAttribute("title",s("gutter.code-folding.open.title","Fold code")))}else _&&(m.setStyle(_.style,"display","none"),_.setAttribute("tabindex","0"),_.removeAttribute("role"),_.removeAttribute("aria-label"));if(he&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",R.className=N,R.className+=te,m.setStyle(R.style,"height",S),m.setStyle(C.style,"display","block"),m.setStyle(C.style,"height",S);var ce;switch(te){case" ace_error_fold":ce=s("gutter.annotation.aria-label.error","Error, read annotations row $0",[B]);break;case" ace_security_fold":ce=s("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[B]);break;case" ace_warning_fold":ce=s("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[B]);break}C.setAttribute("aria-label",ce),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else if(this.$annotations[w]){C.className="ace_gutter_annotation",R.className=N,this.$useSvgGutterIcons?R.className+=this.$annotations[w].className:b.classList.add(this.$annotations[w].className.replace(" ","")),m.setStyle(R.style,"height",S),m.setStyle(C.style,"display","block"),m.setStyle(C.style,"height",S);var ce;switch(this.$annotations[w].className){case" ace_error":ce=s("gutter.annotation.aria-label.error","Error, read annotations row $0",[B]);break;case" ace_security":ce=s("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[B]);break;case" ace_warning":ce=s("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[B]);break;case" ace_info":ce=s("gutter.annotation.aria-label.info","Info, read annotations row $0",[B]);break;case" ace_hint":ce=s("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[B]);break}C.setAttribute("aria-label",ce),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else m.setStyle(C.style,"display","none"),C.removeAttribute("aria-label"),C.removeAttribute("role"),C.setAttribute("tabindex","0");return B!==$.data&&($.data=B),b.className!=A&&(b.className=A),m.setStyle(o.element.style,"height",this.$lines.computeLineHeight(w,u,E)+"px"),m.setStyle(o.element.style,"top",this.$lines.computeLineTop(w,u,E)+"px"),o.text=B,C.style.display==="none"&&_.style.display==="none"?o.element.setAttribute("aria-hidden",!0):o.element.setAttribute("aria-hidden",!1),o},a.prototype.setHighlightGutterLine=function(o){this.$highlightGutterLine=o},a.prototype.setShowLineNumbers=function(o){this.$renderer=!o&&{getWidth:function(){return 0},getText:function(){return""}}},a.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},a.prototype.setShowFoldWidgets=function(o){o?m.addCssClass(this.element,"ace_folding-enabled"):m.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=o,this.$padding=null},a.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},a.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var o=m.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(o.borderLeftWidth)||0)+(parseInt(o.paddingLeft)||0)+1,this.$padding.right=(parseInt(o.borderRightWidth)||0)+(parseInt(o.paddingRight)||0),this.$padding},a.prototype.getRegion=function(o){var u=this.$padding||this.$computePadding(),d=this.element.getBoundingClientRect();if(o.x<u.left+d.left)return"markers";if(this.$showFoldWidgets&&o.x>d.right-u.right)return"foldWidgets"},a}();l.prototype.$fixedWidth=!1,l.prototype.$highlightGutterLine=!0,l.prototype.$renderer="",l.prototype.$showLineNumbers=!0,l.prototype.$showFoldWidgets=!0,y.implement(l.prototype,h);function c(a){var o=document.createTextNode("");a.appendChild(o);var u=m.createElement("span");a.appendChild(u);var d=m.createElement("span");a.appendChild(d);var w=m.createElement("span");return d.appendChild(w),a}r.Gutter=l}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,r,v){var m=e("../range").Range,y=e("../lib/dom"),x=function(){function g(s){this.element=y.createElement("div"),this.element.className="ace_layer ace_marker-layer",s.appendChild(this.element)}return g.prototype.setPadding=function(s){this.$padding=s},g.prototype.setSession=function(s){this.session=s},g.prototype.setMarkers=function(s){this.markers=s},g.prototype.elt=function(s,l){var c=this.i!=-1&&this.element.childNodes[this.i];c?this.i++:(c=document.createElement("div"),this.element.appendChild(c),this.i=-1),c.style.cssText=l,c.className=s},g.prototype.update=function(s){if(s){this.config=s,this.i=0;var l;for(var c in this.markers){var a=this.markers[c];if(!a.range){a.update(l,this,this.session,s);continue}var o=a.range.clipRows(s.firstRow,s.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),a.renderer){var u=this.$getTop(o.start.row,s),d=this.$padding+o.start.column*s.characterWidth;a.renderer(l,o,d,u,s)}else a.type=="fullLine"?this.drawFullLineMarker(l,o,a.clazz,s):a.type=="screenLine"?this.drawScreenLineMarker(l,o,a.clazz,s):o.isMultiLine()?a.type=="text"?this.drawTextMarker(l,o,a.clazz,s):this.drawMultiLineMarker(l,o,a.clazz,s):this.drawSingleLineMarker(l,o,a.clazz+" ace_start ace_br15",s)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},g.prototype.$getTop=function(s,l){return(s-l.firstRowScreen)*l.lineHeight},g.prototype.drawTextMarker=function(s,l,c,a,o){for(var u=this.session,d=l.start.row,w=l.end.row,b=d,E=0,$=0,_=u.getScreenLastRowColumn(b),C=new m(b,l.start.column,b,$);b<=w;b++)C.start.row=C.end.row=b,C.start.column=b==d?l.start.column:u.getRowWrapIndent(b),C.end.column=_,E=$,$=_,_=b+1<w?u.getScreenLastRowColumn(b+1):b==w?0:l.end.column,this.drawSingleLineMarker(s,C,c+(b==d?" ace_start":"")+" ace_br"+h(b==d||b==d+1&&l.start.column,E<$,$>_,b==w),a,b==w?0:1,o)},g.prototype.drawMultiLineMarker=function(s,l,c,a,o){var u=this.$padding,d=a.lineHeight,w=this.$getTop(l.start.row,a),b=u+l.start.column*a.characterWidth;if(o=o||"",this.session.$bidiHandler.isBidiRow(l.start.row)){var E=l.clone();E.end.row=E.start.row,E.end.column=this.session.getLine(E.start.row).length,this.drawBidiSingleLineMarker(s,E,c+" ace_br1 ace_start",a,null,o)}else this.elt(c+" ace_br1 ace_start","height:"+d+"px;right:"+u+"px;top:"+w+"px;left:"+b+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(l.end.row)){var E=l.clone();E.start.row=E.end.row,E.start.column=0,this.drawBidiSingleLineMarker(s,E,c+" ace_br12",a,null,o)}else{w=this.$getTop(l.end.row,a);var $=l.end.column*a.characterWidth;this.elt(c+" ace_br12","height:"+d+"px;width:"+$+"px;top:"+w+"px;left:"+u+"px;"+(o||""))}if(d=(l.end.row-l.start.row-1)*a.lineHeight,!(d<=0)){w=this.$getTop(l.start.row+1,a);var _=(l.start.column?1:0)|(l.end.column?0:8);this.elt(c+(_?" ace_br"+_:""),"height:"+d+"px;right:"+u+"px;top:"+w+"px;left:"+u+"px;"+(o||""))}},g.prototype.drawSingleLineMarker=function(s,l,c,a,o,u){if(this.session.$bidiHandler.isBidiRow(l.start.row))return this.drawBidiSingleLineMarker(s,l,c,a,o,u);var d=a.lineHeight,w=(l.end.column+(o||0)-l.start.column)*a.characterWidth,b=this.$getTop(l.start.row,a),E=this.$padding+l.start.column*a.characterWidth;this.elt(c,"height:"+d+"px;width:"+w+"px;top:"+b+"px;left:"+E+"px;"+(u||""))},g.prototype.drawBidiSingleLineMarker=function(s,l,c,a,o,u){var d=a.lineHeight,w=this.$getTop(l.start.row,a),b=this.$padding,E=this.session.$bidiHandler.getSelections(l.start.column,l.end.column);E.forEach(function($){this.elt(c,"height:"+d+"px;width:"+($.width+(o||0))+"px;top:"+w+"px;left:"+(b+$.left)+"px;"+(u||""))},this)},g.prototype.drawFullLineMarker=function(s,l,c,a,o){var u=this.$getTop(l.start.row,a),d=a.lineHeight;l.start.row!=l.end.row&&(d+=this.$getTop(l.end.row,a)-u),this.elt(c,"height:"+d+"px;top:"+u+"px;left:0;right:0;"+(o||""))},g.prototype.drawScreenLineMarker=function(s,l,c,a,o){var u=this.$getTop(l.start.row,a),d=a.lineHeight;this.elt(c,"height:"+d+"px;top:"+u+"px;left:0;right:0;"+(o||""))},g}();x.prototype.$padding=0;function h(g,s,l,c){return(g?1:0)|(s?2:0)|(l?4:0)|(c?8:0)}r.Marker=x}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,r,v){var m=new Set(["text","rparen","lparen"]);r.isTextToken=function(y){return m.has(y)}}),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,v){var m=e("../lib/oop"),y=e("../lib/dom"),x=e("../lib/lang"),h=e("./lines").Lines,g=e("../lib/event_emitter").EventEmitter,s=e("../config").nls,l=e("./text_util").isTextToken,c=function(){function a(o){this.dom=y,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",o.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new h(this.element)}return a.prototype.$updateEolChar=function(){var o=this.session.doc,u=o.getNewLineCharacter()==`
|
216
|
+
`&&o.getNewLineMode()!="windows",d=u?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=d)return this.EOL_CHAR=d,!0},a.prototype.setPadding=function(o){this.$padding=o,this.element.style.margin="0 "+o+"px"},a.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},a.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},a.prototype.$setFontMetrics=function(o){this.$fontMetrics=o,this.$fontMetrics.on("changeCharacterSize",(function(u){this._signal("changeCharacterSize",u)}).bind(this)),this.$pollSizeChanges()},a.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},a.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},a.prototype.setSession=function(o){this.session=o,o&&this.$computeTabString()},a.prototype.setShowInvisibles=function(o){return this.showInvisibles==o?!1:(this.showInvisibles=o,typeof o=="string"?(this.showSpaces=/tab/i.test(o),this.showTabs=/space/i.test(o),this.showEOL=/eol/i.test(o)):this.showSpaces=this.showTabs=this.showEOL=o,this.$computeTabString(),!0)},a.prototype.setDisplayIndentGuides=function(o){return this.displayIndentGuides==o?!1:(this.displayIndentGuides=o,this.$computeTabString(),!0)},a.prototype.setHighlightIndentGuides=function(o){return this.$highlightIndentGuides===o?!1:(this.$highlightIndentGuides=o,o)},a.prototype.$computeTabString=function(){var o=this.session.getTabSize();this.tabSize=o;for(var u=this.$tabStrings=[0],d=1;d<o+1;d++)if(this.showTabs){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_tab",w.textContent=x.stringRepeat(this.TAB_CHAR,d),u.push(w)}else u.push(this.dom.createTextNode(x.stringRepeat(" ",d),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var b="ace_indent-guide",E=this.showSpaces?" ace_invisible ace_invisible_space":"",$=this.showSpaces?x.stringRepeat(this.SPACE_CHAR,this.tabSize):x.stringRepeat(" ",this.tabSize),_=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?x.stringRepeat(this.TAB_CHAR,this.tabSize):$,w=this.dom.createElement("span");w.className=b+E,w.textContent=$,this.$tabStrings[" "]=w;var w=this.dom.createElement("span");w.className=b+_,w.textContent=C,this.$tabStrings[" "]=w}},a.prototype.updateLines=function(o,u,d){if(this.config.lastRow!=o.lastRow||this.config.firstRow!=o.firstRow)return this.update(o);this.config=o;for(var w=Math.max(u,o.firstRow),b=Math.min(d,o.lastRow),E=this.element.childNodes,$=0,_=o.firstRow;_<w;_++){var C=this.session.getFoldLine(_);if(C)if(C.containsRow(w)){w=C.start.row;break}else _=C.end.row;$++}for(var R=!1,_=w,C=this.session.getNextFoldLine(_),L=C?C.start.row:1/0;_>L&&(_=C.end.row+1,C=this.session.getNextFoldLine(_,C),L=C?C.start.row:1/0),!(_>b);){var F=E[$++];if(F){this.dom.removeChildren(F),this.$renderLine(F,_,_==L?C:!1),R&&(F.style.top=this.$lines.computeLineTop(_,o,this.session)+"px");var I=o.lineHeight*this.session.getRowLength(_)+"px";F.style.height!=I&&(R=!0,F.style.height=I)}_++}if(R)for(;$<this.$lines.cells.length;){var H=this.$lines.cells[$++];H.element.style.top=this.$lines.computeLineTop(H.row,o,this.session)+"px"}},a.prototype.scrollLines=function(o){var u=this.config;if(this.config=o,this.$lines.pageChanged(u,o))return this.update(o);this.$lines.moveContainer(o);var d=o.lastRow,w=u?u.lastRow:-1;if(!u||w<o.firstRow)return this.update(o);if(d<u.firstRow)return this.update(o);if(!u||u.lastRow<o.firstRow)return this.update(o);if(o.lastRow<u.firstRow)return this.update(o);if(u.firstRow<o.firstRow)for(var b=this.session.getFoldedRowCount(u.firstRow,o.firstRow-1);b>0;b--)this.$lines.shift();if(u.lastRow>o.lastRow)for(var b=this.session.getFoldedRowCount(o.lastRow+1,u.lastRow);b>0;b--)this.$lines.pop();o.firstRow<u.firstRow&&this.$lines.unshift(this.$renderLinesFragment(o,o.firstRow,u.firstRow-1)),o.lastRow>u.lastRow&&this.$lines.push(this.$renderLinesFragment(o,u.lastRow+1,o.lastRow)),this.$highlightIndentGuide()},a.prototype.$renderLinesFragment=function(o,u,d){for(var w=[],b=u,E=this.session.getNextFoldLine(b),$=E?E.start.row:1/0;b>$&&(b=E.end.row+1,E=this.session.getNextFoldLine(b,E),$=E?E.start.row:1/0),!(b>d);){var _=this.$lines.createCell(b,o,this.session),C=_.element;this.dom.removeChildren(C),y.setStyle(C.style,"height",this.$lines.computeLineHeight(b,o,this.session)+"px"),y.setStyle(C.style,"top",this.$lines.computeLineTop(b,o,this.session)+"px"),this.$renderLine(C,b,b==$?E:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",w.push(_),b++}return w},a.prototype.update=function(o){this.$lines.moveContainer(o),this.config=o;for(var u=o.firstRow,d=o.lastRow,w=this.$lines;w.getLength();)w.pop();w.push(this.$renderLinesFragment(o,u,d))},a.prototype.$renderToken=function(o,u,d,w){for(var b=this,E=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,$=this.dom.createFragment(this.element),_,C=0;_=E.exec(w);){var R=_[1],L=_[2],F=_[3],I=_[4],H=_[5];if(!(!b.showSpaces&&L)){var P=C!=_.index?w.slice(C,_.index):"";if(C=_.index+_[0].length,P&&$.appendChild(this.dom.createTextNode(P,this.element)),R){var O=b.session.getScreenTabSize(u+_.index);$.appendChild(b.$tabStrings[O].cloneNode(!0)),u+=O-1}else if(L)if(b.showSpaces){var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_space",S.textContent=x.stringRepeat(b.SPACE_CHAR,L.length),$.appendChild(S)}else $.appendChild(this.dom.createTextNode(L,this.element));else if(F){var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_space ace_invalid",S.textContent=x.stringRepeat(b.SPACE_CHAR,F.length),$.appendChild(S)}else if(I){u+=1;var S=this.dom.createElement("span");S.style.width=b.config.characterWidth*2+"px",S.className=b.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",S.textContent=b.showSpaces?b.SPACE_CHAR:I,$.appendChild(S)}else if(H){u+=1;var S=this.dom.createElement("span");S.style.width=b.config.characterWidth*2+"px",S.className="ace_cjk",S.textContent=H,$.appendChild(S)}}}if($.appendChild(this.dom.createTextNode(C?w.slice(C):w,this.element)),l(d.type))o.appendChild($);else{var A="ace_"+d.type.replace(/\./g," ace_"),S=this.dom.createElement("span");d.type=="fold"&&(S.style.width=d.value.length*this.config.characterWidth+"px",S.setAttribute("title",s("inline-fold.closed.title","Unfold code"))),S.className=A,S.appendChild($),o.appendChild(S)}return u+w.length},a.prototype.renderIndentGuide=function(o,u,d){var w=u.search(this.$indentGuideRe);if(w<=0||w>=d)return u;if(u[0]==" "){w-=w%this.tabSize;for(var b=w/this.tabSize,E=0;E<b;E++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),u.substr(w)}else if(u[0]==" "){for(var E=0;E<w;E++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),u.substr(w)}return this.$highlightIndentGuide(),u},a.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var o=this.session.doc.$lines;if(o){var u=this.session.selection.getCursor(),d=/^\s*/.exec(this.session.doc.getLine(u.row))[0].length,w=Math.floor(d/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:w,start:u.row};var b=this.session.$bracketHighlight;if(b){for(var E=this.session.$bracketHighlight.ranges,$=0;$<E.length;$++)if(u.row!==E[$].start.row){this.$highlightIndentGuideMarker.end=E[$].start.row+1,u.row>E[$].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&o[u.row]!==""&&u.column===o[u.row].length){this.$highlightIndentGuideMarker.dir=1;for(var $=u.row+1;$<o.length;$++){var _=o[$],C=/^\s*/.exec(_)[0].length;if(_!==""&&(this.$highlightIndentGuideMarker.end=$,C<=d))break}}this.$renderHighlightIndentGuide()}}},a.prototype.$clearActiveIndentGuide=function(){for(var o=this.element.querySelectorAll(".ace_indent-guide-active"),u=0;u<o.length;u++)o[u].classList.remove("ace_indent-guide-active")},a.prototype.$setIndentGuideActive=function(o,u){var d=this.session.doc.getLine(o.row);if(d!==""){var w=o.element;if(o.element.classList&&o.element.classList.contains("ace_line_group"))if(o.element.childNodes.length>0)w=o.element.childNodes[0];else return;var b=w.childNodes;if(b){var E=b[u-1];E&&E.classList&&E.classList.contains("ace_indent-guide")&&E.classList.add("ace_indent-guide-active")}}},a.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var o=this.$lines.cells;this.$clearActiveIndentGuide();var u=this.$highlightIndentGuideMarker.indentLevel;if(u!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var d=0;d<o.length;d++){var w=o[d];if(this.$highlightIndentGuideMarker.end&&w.row>=this.$highlightIndentGuideMarker.start+1){if(w.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,u)}}else for(var d=o.length-1;d>=0;d--){var w=o[d];if(this.$highlightIndentGuideMarker.end&&w.row<this.$highlightIndentGuideMarker.start){if(w.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,u)}}}},a.prototype.$createLineElement=function(o){var u=this.dom.createElement("div");return u.className="ace_line",u.style.height=this.config.lineHeight+"px",u},a.prototype.$renderWrappedLine=function(o,u,d){var w=0,b=0,E=d[0],$=0,_=this.$createLineElement();o.appendChild(_);for(var C=0;C<u.length;C++){var R=u[C],L=R.value;if(C==0&&this.displayIndentGuides){if(w=L.length,L=this.renderIndentGuide(_,L,E),!L)continue;w-=L.length}if(w+L.length<E)$=this.$renderToken(_,$,R,L),w+=L.length;else{for(;w+L.length>=E;)$=this.$renderToken(_,$,R,L.substring(0,E-w)),L=L.substring(E-w),w=E,_=this.$createLineElement(),o.appendChild(_),_.appendChild(this.dom.createTextNode(x.stringRepeat(" ",d.indent),this.element)),b++,$=0,E=d[b]||Number.MAX_VALUE;L.length!=0&&(w+=L.length,$=this.$renderToken(_,$,R,L))}}d[d.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(_,$,null,"",!0)},a.prototype.$renderSimpleLine=function(o,u){for(var d=0,w=0;w<u.length;w++){var b=u[w],E=b.value;if(!(w==0&&this.displayIndentGuides&&(E=this.renderIndentGuide(o,E),!E))){if(d+E.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(o,d,b,E);d=this.$renderToken(o,d,b,E)}}},a.prototype.$renderOverflowMessage=function(o,u,d,w,b){d&&this.$renderToken(o,u,d,w.slice(0,this.MAX_LINE_LENGTH-u));var E=this.dom.createElement("span");E.className="ace_inline_button ace_keyword ace_toggle_wrap",E.textContent=b?"<hide>":"<click to see more...>",o.appendChild(E)},a.prototype.$renderLine=function(o,u,d){if(!d&&d!=!1&&(d=this.session.getFoldLine(u)),d)var w=this.$getFoldLineTokens(u,d);else var w=this.session.getTokens(u);var b=o;if(w.length){var E=this.session.getRowSplitData(u);if(E&&E.length){this.$renderWrappedLine(o,w,E);var b=o.lastChild}else{var b=o;this.$useLineGroups()&&(b=this.$createLineElement(),o.appendChild(b)),this.$renderSimpleLine(b,w)}}else this.$useLineGroups()&&(b=this.$createLineElement(),o.appendChild(b));if(this.showEOL&&b){d&&(u=d.end.row);var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_eol",$.textContent=u==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,b.appendChild($)}},a.prototype.$getFoldLineTokens=function(o,u){var d=this.session,w=[];function b($,_,C){for(var R=0,L=0;L+$[R].value.length<_;)if(L+=$[R].value.length,R++,R==$.length)return;if(L!=_){var F=$[R].value.substring(_-L);F.length>C-_&&(F=F.substring(0,C-_)),w.push({type:$[R].type,value:F}),L=_+F.length,R+=1}for(;L<C&&R<$.length;){var F=$[R].value;F.length+L>C?w.push({type:$[R].type,value:F.substring(0,C-L)}):w.push($[R]),L+=F.length,R+=1}}var E=d.getTokens(o);return u.walk(function($,_,C,R,L){$!=null?w.push({type:"fold",value:$}):(L&&(E=d.getTokens(_)),E.length&&b(E,R,C))},u.end.row,this.session.getLine(u.end.row).length),w},a.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},a}();c.prototype.EOF_CHAR="¶",c.prototype.EOL_CHAR_LF="¬",c.prototype.EOL_CHAR_CRLF="¤",c.prototype.EOL_CHAR=c.prototype.EOL_CHAR_LF,c.prototype.TAB_CHAR="—",c.prototype.SPACE_CHAR="·",c.prototype.$padding=0,c.prototype.MAX_LINE_LENGTH=1e4,c.prototype.showInvisibles=!1,c.prototype.showSpaces=!1,c.prototype.showTabs=!1,c.prototype.showEOL=!1,c.prototype.displayIndentGuides=!0,c.prototype.$highlightIndentGuides=!0,c.prototype.$tabStrings=[],c.prototype.destroy={},c.prototype.onChangeTabSize=c.prototype.$computeTabString,m.implement(c.prototype,g),r.Text=c}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,r,v){var m=e("../lib/dom"),y=function(){function x(h){this.element=m.createElement("div"),this.element.className="ace_layer ace_cursor-layer",h.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),m.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return x.prototype.$updateOpacity=function(h){for(var g=this.cursors,s=g.length;s--;)m.setStyle(g[s].style,"opacity",h?"":"0")},x.prototype.$startCssAnimation=function(){for(var h=this.cursors,g=h.length;g--;)h[g].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&m.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},x.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,m.removeCssClass(this.element,"ace_animate-blinking")},x.prototype.setPadding=function(h){this.$padding=h},x.prototype.setSession=function(h){this.session=h},x.prototype.setBlinking=function(h){h!=this.isBlinking&&(this.isBlinking=h,this.restartTimer())},x.prototype.setBlinkInterval=function(h){h!=this.blinkInterval&&(this.blinkInterval=h,this.restartTimer())},x.prototype.setSmoothBlinking=function(h){h!=this.smoothBlinking&&(this.smoothBlinking=h,m.setCssClass(this.element,"ace_smooth-blinking",h),this.$updateCursors(!0),this.restartTimer())},x.prototype.addCursor=function(){var h=m.createElement("div");return h.className="ace_cursor",this.element.appendChild(h),this.cursors.push(h),h},x.prototype.removeCursor=function(){if(this.cursors.length>1){var h=this.cursors.pop();return h.parentNode.removeChild(h),h}},x.prototype.hideCursor=function(){this.isVisible=!1,m.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},x.prototype.showCursor=function(){this.isVisible=!0,m.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},x.prototype.restartTimer=function(){var h=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,m.removeCssClass(this.element,"ace_smooth-blinking")),h(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&m.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),m.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var g=(function(){this.timeoutId=setTimeout(function(){h(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){h(!0),g()},this.blinkInterval),g()}},x.prototype.getPixelPosition=function(h,g){if(!this.config||!this.session)return{left:0,top:0};h||(h=this.session.selection.getCursor());var s=this.session.documentToScreenPosition(h),l=this.$padding+(this.session.$bidiHandler.isBidiRow(s.row,h.row)?this.session.$bidiHandler.getPosLeft(s.column):s.column*this.config.characterWidth),c=(s.row-(g?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:l,top:c}},x.prototype.isCursorInView=function(h,g){return h.top>=0&&h.top<g.maxHeight},x.prototype.update=function(h){this.config=h;var g=this.session.$selectionMarkers,s=0,l=0;(g===void 0||g.length===0)&&(g=[{cursor:null}]);for(var s=0,c=g.length;s<c;s++){var a=this.getPixelPosition(g[s].cursor,!0);if(!((a.top>h.height+h.offset||a.top<0)&&s>1)){var o=this.cursors[l++]||this.addCursor(),u=o.style;this.drawCursor?this.drawCursor(o,a,h,g[s],this.session):this.isCursorInView(a,h)?(m.setStyle(u,"display","block"),m.translate(o,a.left,a.top),m.setStyle(u,"width",Math.round(h.characterWidth)+"px"),m.setStyle(u,"height",h.lineHeight+"px")):m.setStyle(u,"display","none")}}for(;this.cursors.length>l;)this.removeCursor();var d=this.session.getOverwrite();this.$setOverwrite(d),this.$pixelPos=a,this.restartTimer()},x.prototype.$setOverwrite=function(h){h!=this.overwrite&&(this.overwrite=h,h?m.addCssClass(this.element,"ace_overwrite-cursors"):m.removeCssClass(this.element,"ace_overwrite-cursors"))},x.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},x}();y.prototype.$padding=0,y.prototype.drawCursor=null,r.Cursor=y}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,v){var m=this&&this.__extends||function(){var o=function(u,d){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,b){w.__proto__=b}||function(w,b){for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(w[E]=b[E])},o(u,d)};return function(u,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");o(u,d);function w(){this.constructor=u}u.prototype=d===null?Object.create(d):(w.prototype=d.prototype,new w)}}(),y=e("./lib/oop"),x=e("./lib/dom"),h=e("./lib/event"),g=e("./lib/event_emitter").EventEmitter,s=32768,l=function(){function o(u,d){this.element=x.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+d,this.inner=x.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),u.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,h.addListener(this.element,"scroll",this.onScroll.bind(this)),h.addListener(this.element,"mousedown",h.preventDefault)}return o.prototype.setVisible=function(u){this.element.style.display=u?"":"none",this.isVisible=u,this.coeff=1},o}();y.implement(l.prototype,g);var c=function(o){m(u,o);function u(d,w){var b=o.call(this,d,"-v")||this;return b.scrollTop=0,b.scrollHeight=0,w.$scrollbarWidth=b.width=x.scrollbarWidth(d.ownerDocument),b.inner.style.width=b.element.style.width=(b.width||15)+5+"px",b.$minWidth=0,b}return u.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var d=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-d)/(this.coeff-d)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},u.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},u.prototype.setHeight=function(d){this.element.style.height=d+"px"},u.prototype.setScrollHeight=function(d){this.scrollHeight=d,d>s?(this.coeff=s/d,d=s):this.coeff!=1&&(this.coeff=1),this.inner.style.height=d+"px"},u.prototype.setScrollTop=function(d){this.scrollTop!=d&&(this.skipEvent=!0,this.scrollTop=d,this.element.scrollTop=d*this.coeff)},u}(l);c.prototype.setInnerHeight=c.prototype.setScrollHeight;var a=function(o){m(u,o);function u(d,w){var b=o.call(this,d,"-h")||this;return b.scrollLeft=0,b.height=w.$scrollbarWidth,b.inner.style.height=b.element.style.height=(b.height||15)+5+"px",b}return u.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},u.prototype.getHeight=function(){return this.isVisible?this.height:0},u.prototype.setWidth=function(d){this.element.style.width=d+"px"},u.prototype.setInnerWidth=function(d){this.inner.style.width=d+"px"},u.prototype.setScrollWidth=function(d){this.inner.style.width=d+"px"},u.prototype.setScrollLeft=function(d){this.scrollLeft!=d&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=d)},u}(l);r.ScrollBar=c,r.ScrollBarV=c,r.ScrollBarH=a,r.VScrollBar=c,r.HScrollBar=a}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,v){var m=this&&this.__extends||function(){var a=function(o,u){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,w){d.__proto__=w}||function(d,w){for(var b in w)Object.prototype.hasOwnProperty.call(w,b)&&(d[b]=w[b])},a(o,u)};return function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");a(o,u);function d(){this.constructor=o}o.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)}}(),y=e("./lib/oop"),x=e("./lib/dom"),h=e("./lib/event"),g=e("./lib/event_emitter").EventEmitter;x.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
|
217
|
+
position: absolute;
|
218
|
+
background: rgba(128, 128, 128, 0.6);
|
219
|
+
-moz-box-sizing: border-box;
|
220
|
+
box-sizing: border-box;
|
221
|
+
border: 1px solid #bbb;
|
222
|
+
border-radius: 2px;
|
223
|
+
z-index: 8;
|
224
|
+
}
|
225
|
+
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
|
226
|
+
position: absolute;
|
227
|
+
z-index: 6;
|
228
|
+
background: none;
|
229
|
+
overflow: hidden!important;
|
230
|
+
}
|
231
|
+
.ace_editor>.ace_sb-v {
|
232
|
+
z-index: 6;
|
233
|
+
right: 0;
|
234
|
+
top: 0;
|
235
|
+
width: 12px;
|
236
|
+
}
|
237
|
+
.ace_editor>.ace_sb-v div {
|
238
|
+
z-index: 8;
|
239
|
+
right: 0;
|
240
|
+
width: 100%;
|
241
|
+
}
|
242
|
+
.ace_editor>.ace_sb-h {
|
243
|
+
bottom: 0;
|
244
|
+
left: 0;
|
245
|
+
height: 12px;
|
246
|
+
}
|
247
|
+
.ace_editor>.ace_sb-h div {
|
248
|
+
bottom: 0;
|
249
|
+
height: 100%;
|
250
|
+
}
|
251
|
+
.ace_editor>.ace_sb_grabbed {
|
252
|
+
z-index: 8;
|
253
|
+
background: #000;
|
254
|
+
}`,"ace_scrollbar.css",!1);var s=function(){function a(o,u){this.element=x.createElement("div"),this.element.className="ace_sb"+u,this.inner=x.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,o.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,h.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return a.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1},a}();y.implement(s.prototype,g);var l=function(a){m(o,a);function o(u,d){var w=a.call(this,u,"-v")||this;return w.scrollTop=0,w.scrollHeight=0,w.parent=u,w.width=w.VScrollWidth,w.renderer=d,w.inner.style.width=w.element.style.width=(w.width||15)+"px",w.$minWidth=0,w}return o.prototype.onMouseDown=function(u,d){if(u==="mousedown"&&!(h.getButton(d)!==0||d.detail===2)){if(d.target===this.inner){var w=this,b=d.clientY,E=function(I){b=I.clientY},$=function(){clearInterval(L)},_=d.clientY,C=this.thumbTop,R=function(){if(b!==void 0){var I=w.scrollTopFromThumbTop(C+b-_);I!==w.scrollTop&&w._emit("scroll",{data:I})}};h.capture(this.inner,E,$);var L=setInterval(R,20);return h.preventDefault(d)}var F=d.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(F)}),h.preventDefault(d)}},o.prototype.getHeight=function(){return this.height},o.prototype.scrollTopFromThumbTop=function(u){var d=u*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return d=d>>0,d<0?d=0:d>this.pageHeight-this.viewHeight&&(d=this.pageHeight-this.viewHeight),d},o.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},o.prototype.setHeight=function(u){this.height=Math.max(0,u),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},o.prototype.setScrollHeight=function(u,d){this.pageHeight===u&&!d||(this.pageHeight=u,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},o.prototype.setScrollTop=function(u){this.scrollTop=u,u<0&&(u=0),this.thumbTop=u*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},o}(s);l.prototype.setInnerHeight=l.prototype.setScrollHeight;var c=function(a){m(o,a);function o(u,d){var w=a.call(this,u,"-h")||this;return w.scrollLeft=0,w.scrollWidth=0,w.height=w.HScrollHeight,w.inner.style.height=w.element.style.height=(w.height||12)+"px",w.renderer=d,w}return o.prototype.onMouseDown=function(u,d){if(u==="mousedown"&&!(h.getButton(d)!==0||d.detail===2)){if(d.target===this.inner){var w=this,b=d.clientX,E=function(I){b=I.clientX},$=function(){clearInterval(L)},_=d.clientX,C=this.thumbLeft,R=function(){if(b!==void 0){var I=w.scrollLeftFromThumbLeft(C+b-_);I!==w.scrollLeft&&w._emit("scroll",{data:I})}};h.capture(this.inner,E,$);var L=setInterval(R,20);return h.preventDefault(d)}var F=d.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(F)}),h.preventDefault(d)}},o.prototype.getHeight=function(){return this.isVisible?this.height:0},o.prototype.scrollLeftFromThumbLeft=function(u){var d=u*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return d=d>>0,d<0?d=0:d>this.pageWidth-this.viewWidth&&(d=this.pageWidth-this.viewWidth),d},o.prototype.setWidth=function(u){this.width=Math.max(0,u),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},o.prototype.setScrollWidth=function(u,d){this.pageWidth===u&&!d||(this.pageWidth=u,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},o.prototype.setScrollLeft=function(u){this.scrollLeft=u,u<0&&(u=0),this.thumbLeft=u*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},o}(s);c.prototype.setInnerWidth=c.prototype.setScrollWidth,r.ScrollBar=l,r.ScrollBarV=l,r.ScrollBarH=c,r.VScrollBar=l,r.HScrollBar=c}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,r,v){var m=e("./lib/event"),y=function(){function x(h,g){this.onRender=h,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=g||window;var s=this;this._flush=function(l){s.pending=!1;var c=s.changes;if(c&&(m.blockIdle(100),s.changes=0,s.onRender(c)),s.changes){if(s.$recursionLimit--<0)return;s.schedule()}else s.$recursionLimit=2}}return x.prototype.schedule=function(h){this.changes=this.changes|h,this.changes&&!this.pending&&(m.nextFrame(this._flush),this.pending=!0)},x.prototype.clear=function(h){var g=this.changes;return this.changes=0,g},x}();r.RenderLoop=y}),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,v){var m=e("../lib/oop"),y=e("../lib/dom"),x=e("../lib/lang"),h=e("../lib/event"),g=e("../lib/useragent"),s=e("../lib/event_emitter").EventEmitter,l=512,c=typeof ResizeObserver=="function",a=200,o=function(){function u(d){this.el=y.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=y.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=y.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),d.appendChild(this.el),this.$measureNode.textContent=x.stringRepeat("X",l),this.$characterSize={width:0,height:0},c?this.$addObserver():this.checkForSizeChanges()}return u.prototype.$setMeasureNodeStyles=function(d,w){d.width=d.height="auto",d.left=d.top="0px",d.visibility="hidden",d.position="absolute",d.whiteSpace="pre",g.isIE<8?d["font-family"]="inherit":d.font="inherit",d.overflow=w?"hidden":"visible"},u.prototype.checkForSizeChanges=function(d){if(d===void 0&&(d=this.$measureSizes()),d&&(this.$characterSize.width!==d.width||this.$characterSize.height!==d.height)){this.$measureNode.style.fontWeight="bold";var w=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=d,this.charSizes=Object.create(null),this.allowBoldFonts=w&&w.width===d.width&&w.height===d.height,this._emit("changeCharacterSize",{data:d})}},u.prototype.$addObserver=function(){var d=this;this.$observer=new window.ResizeObserver(function(w){d.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},u.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var d=this;return this.$pollSizeChangesTimer=h.onIdle(function w(){d.checkForSizeChanges(),h.onIdle(w,500)},500)},u.prototype.setPolling=function(d){d?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},u.prototype.$measureSizes=function(d){var w={height:(d||this.$measureNode).clientHeight,width:(d||this.$measureNode).clientWidth/l};return w.width===0||w.height===0?null:w},u.prototype.$measureCharWidth=function(d){this.$main.textContent=x.stringRepeat(d,l);var w=this.$main.getBoundingClientRect();return w.width/l},u.prototype.getCharacterWidth=function(d){var w=this.charSizes[d];return w===void 0&&(w=this.charSizes[d]=this.$measureCharWidth(d)/this.$characterSize.width),w},u.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},u.prototype.$getZoom=function(d){return!d||!d.parentElement?1:(Number(window.getComputedStyle(d).zoom)||1)*this.$getZoom(d.parentElement)},u.prototype.$initTransformMeasureNodes=function(){var d=function(w,b){return["div",{style:"position: absolute;top:"+w+"px;left:"+b+"px;"}]};this.els=y.buildDom([d(0,0),d(a,0),d(0,a),d(a,a)],this.el)},u.prototype.transformCoordinates=function(d,w){if(d){var b=this.$getZoom(this.el);d=C(1/b,d)}function E(Z,te,he){var ne=Z[1]*te[0]-Z[0]*te[1];return[(-te[1]*he[0]+te[0]*he[1])/ne,(+Z[1]*he[0]-Z[0]*he[1])/ne]}function $(Z,te){return[Z[0]-te[0],Z[1]-te[1]]}function _(Z,te){return[Z[0]+te[0],Z[1]+te[1]]}function C(Z,te){return[Z*te[0],Z*te[1]]}this.els||this.$initTransformMeasureNodes();function R(Z){var te=Z.getBoundingClientRect();return[te.left,te.top]}var L=R(this.els[0]),F=R(this.els[1]),I=R(this.els[2]),H=R(this.els[3]),P=E($(H,F),$(H,I),$(_(F,I),_(H,L))),O=C(1+P[0],$(F,L)),S=C(1+P[1],$(I,L));if(w){var A=w,N=P[0]*A[0]/a+P[1]*A[1]/a+1,B=_(C(A[0],O),C(A[1],S));return _(C(1/N/a,B),L)}var U=$(d,L),K=E($(O,C(P[0],U)),$(S,C(P[1],U)),U);return C(a,K)},u}();o.prototype.$characterSize={width:0,height:0},m.implement(o.prototype,s),r.FontMetrics=o}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,r,v){v.exports=`
|
255
|
+
.ace_br1 {border-top-left-radius : 3px;}
|
256
|
+
.ace_br2 {border-top-right-radius : 3px;}
|
257
|
+
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
|
258
|
+
.ace_br4 {border-bottom-right-radius: 3px;}
|
259
|
+
.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
|
260
|
+
.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
|
261
|
+
.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
|
262
|
+
.ace_br8 {border-bottom-left-radius : 3px;}
|
263
|
+
.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
|
264
|
+
.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
|
265
|
+
.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
|
266
|
+
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
267
|
+
.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
268
|
+
.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
269
|
+
.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
270
|
+
|
271
|
+
|
272
|
+
.ace_editor {
|
273
|
+
position: relative;
|
274
|
+
overflow: hidden;
|
275
|
+
padding: 0;
|
276
|
+
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
|
277
|
+
direction: ltr;
|
278
|
+
text-align: left;
|
279
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
280
|
+
forced-color-adjust: none;
|
281
|
+
}
|
282
|
+
|
283
|
+
.ace_scroller {
|
284
|
+
position: absolute;
|
285
|
+
overflow: hidden;
|
286
|
+
top: 0;
|
287
|
+
bottom: 0;
|
288
|
+
background-color: inherit;
|
289
|
+
-ms-user-select: none;
|
290
|
+
-moz-user-select: none;
|
291
|
+
-webkit-user-select: none;
|
292
|
+
user-select: none;
|
293
|
+
cursor: text;
|
294
|
+
}
|
295
|
+
|
296
|
+
.ace_content {
|
297
|
+
position: absolute;
|
298
|
+
box-sizing: border-box;
|
299
|
+
min-width: 100%;
|
300
|
+
contain: style size layout;
|
301
|
+
font-variant-ligatures: no-common-ligatures;
|
302
|
+
}
|
303
|
+
.ace_invisible {
|
304
|
+
font-variant-ligatures: none;
|
305
|
+
}
|
306
|
+
|
307
|
+
.ace_keyboard-focus:focus {
|
308
|
+
box-shadow: inset 0 0 0 2px #5E9ED6;
|
309
|
+
outline: none;
|
310
|
+
}
|
311
|
+
|
312
|
+
.ace_dragging .ace_scroller:before{
|
313
|
+
position: absolute;
|
314
|
+
top: 0;
|
315
|
+
left: 0;
|
316
|
+
right: 0;
|
317
|
+
bottom: 0;
|
318
|
+
content: '';
|
319
|
+
background: rgba(250, 250, 250, 0.01);
|
320
|
+
z-index: 1000;
|
321
|
+
}
|
322
|
+
.ace_dragging.ace_dark .ace_scroller:before{
|
323
|
+
background: rgba(0, 0, 0, 0.01);
|
324
|
+
}
|
325
|
+
|
326
|
+
.ace_gutter {
|
327
|
+
position: absolute;
|
328
|
+
overflow : hidden;
|
329
|
+
width: auto;
|
330
|
+
top: 0;
|
331
|
+
bottom: 0;
|
332
|
+
left: 0;
|
333
|
+
cursor: default;
|
334
|
+
z-index: 4;
|
335
|
+
-ms-user-select: none;
|
336
|
+
-moz-user-select: none;
|
337
|
+
-webkit-user-select: none;
|
338
|
+
user-select: none;
|
339
|
+
contain: style size layout;
|
340
|
+
}
|
341
|
+
|
342
|
+
.ace_gutter-active-line {
|
343
|
+
position: absolute;
|
344
|
+
left: 0;
|
345
|
+
right: 0;
|
346
|
+
}
|
347
|
+
|
348
|
+
.ace_scroller.ace_scroll-left:after {
|
349
|
+
content: "";
|
350
|
+
position: absolute;
|
351
|
+
top: 0;
|
352
|
+
right: 0;
|
353
|
+
bottom: 0;
|
354
|
+
left: 0;
|
355
|
+
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
|
356
|
+
pointer-events: none;
|
357
|
+
}
|
358
|
+
|
359
|
+
.ace_gutter-cell, .ace_gutter-cell_svg-icons {
|
360
|
+
position: absolute;
|
361
|
+
top: 0;
|
362
|
+
left: 0;
|
363
|
+
right: 0;
|
364
|
+
padding-left: 19px;
|
365
|
+
padding-right: 6px;
|
366
|
+
background-repeat: no-repeat;
|
367
|
+
}
|
368
|
+
|
369
|
+
.ace_gutter-cell_svg-icons .ace_gutter_annotation {
|
370
|
+
margin-left: -14px;
|
371
|
+
float: left;
|
372
|
+
}
|
373
|
+
|
374
|
+
.ace_gutter-cell .ace_gutter_annotation {
|
375
|
+
margin-left: -19px;
|
376
|
+
float: left;
|
377
|
+
}
|
378
|
+
|
379
|
+
.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {
|
380
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
|
381
|
+
background-repeat: no-repeat;
|
382
|
+
background-position: 2px center;
|
383
|
+
}
|
384
|
+
|
385
|
+
.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
|
386
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
|
387
|
+
background-repeat: no-repeat;
|
388
|
+
background-position: 2px center;
|
389
|
+
}
|
390
|
+
|
391
|
+
.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
|
392
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
|
393
|
+
background-repeat: no-repeat;
|
394
|
+
background-position: 2px center;
|
395
|
+
}
|
396
|
+
|
397
|
+
.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {
|
398
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
|
399
|
+
}
|
400
|
+
|
401
|
+
.ace_icon_svg.ace_error {
|
402
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
|
403
|
+
background-color: crimson;
|
404
|
+
}
|
405
|
+
.ace_icon_svg.ace_security {
|
406
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
|
407
|
+
background-color: crimson;
|
408
|
+
}
|
409
|
+
.ace_icon_svg.ace_warning {
|
410
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
|
411
|
+
background-color: darkorange;
|
412
|
+
}
|
413
|
+
.ace_icon_svg.ace_info {
|
414
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
|
415
|
+
background-color: royalblue;
|
416
|
+
}
|
417
|
+
.ace_icon_svg.ace_hint {
|
418
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
|
419
|
+
background-color: silver;
|
420
|
+
}
|
421
|
+
|
422
|
+
.ace_icon_svg.ace_error_fold {
|
423
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
424
|
+
background-color: crimson;
|
425
|
+
}
|
426
|
+
.ace_icon_svg.ace_security_fold {
|
427
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
428
|
+
background-color: crimson;
|
429
|
+
}
|
430
|
+
.ace_icon_svg.ace_warning_fold {
|
431
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
|
432
|
+
background-color: darkorange;
|
433
|
+
}
|
434
|
+
|
435
|
+
.ace_scrollbar {
|
436
|
+
contain: strict;
|
437
|
+
position: absolute;
|
438
|
+
right: 0;
|
439
|
+
bottom: 0;
|
440
|
+
z-index: 6;
|
441
|
+
}
|
442
|
+
|
443
|
+
.ace_scrollbar-inner {
|
444
|
+
position: absolute;
|
445
|
+
cursor: text;
|
446
|
+
left: 0;
|
447
|
+
top: 0;
|
448
|
+
}
|
449
|
+
|
450
|
+
.ace_scrollbar-v{
|
451
|
+
overflow-x: hidden;
|
452
|
+
overflow-y: scroll;
|
453
|
+
top: 0;
|
454
|
+
}
|
455
|
+
|
456
|
+
.ace_scrollbar-h {
|
457
|
+
overflow-x: scroll;
|
458
|
+
overflow-y: hidden;
|
459
|
+
left: 0;
|
460
|
+
}
|
461
|
+
|
462
|
+
.ace_print-margin {
|
463
|
+
position: absolute;
|
464
|
+
height: 100%;
|
465
|
+
}
|
466
|
+
|
467
|
+
.ace_text-input {
|
468
|
+
position: absolute;
|
469
|
+
z-index: 0;
|
470
|
+
width: 0.5em;
|
471
|
+
height: 1em;
|
472
|
+
opacity: 0;
|
473
|
+
background: transparent;
|
474
|
+
-moz-appearance: none;
|
475
|
+
appearance: none;
|
476
|
+
border: none;
|
477
|
+
resize: none;
|
478
|
+
outline: none;
|
479
|
+
overflow: hidden;
|
480
|
+
font: inherit;
|
481
|
+
padding: 0 1px;
|
482
|
+
margin: 0 -1px;
|
483
|
+
contain: strict;
|
484
|
+
-ms-user-select: text;
|
485
|
+
-moz-user-select: text;
|
486
|
+
-webkit-user-select: text;
|
487
|
+
user-select: text;
|
488
|
+
/*with \`pre-line\` chrome inserts instead of space*/
|
489
|
+
white-space: pre!important;
|
490
|
+
}
|
491
|
+
.ace_text-input.ace_composition {
|
492
|
+
background: transparent;
|
493
|
+
color: inherit;
|
494
|
+
z-index: 1000;
|
495
|
+
opacity: 1;
|
496
|
+
}
|
497
|
+
.ace_composition_placeholder { color: transparent }
|
498
|
+
.ace_composition_marker {
|
499
|
+
border-bottom: 1px solid;
|
500
|
+
position: absolute;
|
501
|
+
border-radius: 0;
|
502
|
+
margin-top: 1px;
|
503
|
+
}
|
504
|
+
|
505
|
+
[ace_nocontext=true] {
|
506
|
+
transform: none!important;
|
507
|
+
filter: none!important;
|
508
|
+
clip-path: none!important;
|
509
|
+
mask : none!important;
|
510
|
+
contain: none!important;
|
511
|
+
perspective: none!important;
|
512
|
+
mix-blend-mode: initial!important;
|
513
|
+
z-index: auto;
|
514
|
+
}
|
515
|
+
|
516
|
+
.ace_layer {
|
517
|
+
z-index: 1;
|
518
|
+
position: absolute;
|
519
|
+
overflow: hidden;
|
520
|
+
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
|
521
|
+
word-wrap: normal;
|
522
|
+
white-space: pre;
|
523
|
+
height: 100%;
|
524
|
+
width: 100%;
|
525
|
+
box-sizing: border-box;
|
526
|
+
/* setting pointer-events: auto; on node under the mouse, which changes
|
527
|
+
during scroll, will break mouse wheel scrolling in Safari */
|
528
|
+
pointer-events: none;
|
529
|
+
}
|
530
|
+
|
531
|
+
.ace_gutter-layer {
|
532
|
+
position: relative;
|
533
|
+
width: auto;
|
534
|
+
text-align: right;
|
535
|
+
pointer-events: auto;
|
536
|
+
height: 1000000px;
|
537
|
+
contain: style size layout;
|
538
|
+
}
|
539
|
+
|
540
|
+
.ace_text-layer {
|
541
|
+
font: inherit !important;
|
542
|
+
position: absolute;
|
543
|
+
height: 1000000px;
|
544
|
+
width: 1000000px;
|
545
|
+
contain: style size layout;
|
546
|
+
}
|
547
|
+
|
548
|
+
.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
|
549
|
+
contain: style size layout;
|
550
|
+
position: absolute;
|
551
|
+
top: 0;
|
552
|
+
left: 0;
|
553
|
+
right: 0;
|
554
|
+
}
|
555
|
+
|
556
|
+
.ace_hidpi .ace_text-layer,
|
557
|
+
.ace_hidpi .ace_gutter-layer,
|
558
|
+
.ace_hidpi .ace_content,
|
559
|
+
.ace_hidpi .ace_gutter {
|
560
|
+
contain: strict;
|
561
|
+
}
|
562
|
+
.ace_hidpi .ace_text-layer > .ace_line,
|
563
|
+
.ace_hidpi .ace_text-layer > .ace_line_group {
|
564
|
+
contain: strict;
|
565
|
+
}
|
566
|
+
|
567
|
+
.ace_cjk {
|
568
|
+
display: inline-block;
|
569
|
+
text-align: center;
|
570
|
+
}
|
571
|
+
|
572
|
+
.ace_cursor-layer {
|
573
|
+
z-index: 4;
|
574
|
+
}
|
575
|
+
|
576
|
+
.ace_cursor {
|
577
|
+
z-index: 4;
|
578
|
+
position: absolute;
|
579
|
+
box-sizing: border-box;
|
580
|
+
border-left: 2px solid;
|
581
|
+
/* workaround for smooth cursor repaintng whole screen in chrome */
|
582
|
+
transform: translatez(0);
|
583
|
+
}
|
584
|
+
|
585
|
+
.ace_multiselect .ace_cursor {
|
586
|
+
border-left-width: 1px;
|
587
|
+
}
|
588
|
+
|
589
|
+
.ace_slim-cursors .ace_cursor {
|
590
|
+
border-left-width: 1px;
|
591
|
+
}
|
592
|
+
|
593
|
+
.ace_overwrite-cursors .ace_cursor {
|
594
|
+
border-left-width: 0;
|
595
|
+
border-bottom: 1px solid;
|
596
|
+
}
|
597
|
+
|
598
|
+
.ace_hidden-cursors .ace_cursor {
|
599
|
+
opacity: 0.2;
|
600
|
+
}
|
601
|
+
|
602
|
+
.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
|
603
|
+
opacity: 0;
|
604
|
+
}
|
605
|
+
|
606
|
+
.ace_smooth-blinking .ace_cursor {
|
607
|
+
transition: opacity 0.18s;
|
608
|
+
}
|
609
|
+
|
610
|
+
.ace_animate-blinking .ace_cursor {
|
611
|
+
animation-duration: 1000ms;
|
612
|
+
animation-timing-function: step-end;
|
613
|
+
animation-name: blink-ace-animate;
|
614
|
+
animation-iteration-count: infinite;
|
615
|
+
}
|
616
|
+
|
617
|
+
.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
|
618
|
+
animation-duration: 1000ms;
|
619
|
+
animation-timing-function: ease-in-out;
|
620
|
+
animation-name: blink-ace-animate-smooth;
|
621
|
+
}
|
622
|
+
|
623
|
+
@keyframes blink-ace-animate {
|
624
|
+
from, to { opacity: 1; }
|
625
|
+
60% { opacity: 0; }
|
626
|
+
}
|
627
|
+
|
628
|
+
@keyframes blink-ace-animate-smooth {
|
629
|
+
from, to { opacity: 1; }
|
630
|
+
45% { opacity: 1; }
|
631
|
+
60% { opacity: 0; }
|
632
|
+
85% { opacity: 0; }
|
633
|
+
}
|
634
|
+
|
635
|
+
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
|
636
|
+
position: absolute;
|
637
|
+
z-index: 3;
|
638
|
+
}
|
639
|
+
|
640
|
+
.ace_marker-layer .ace_selection {
|
641
|
+
position: absolute;
|
642
|
+
z-index: 5;
|
643
|
+
}
|
644
|
+
|
645
|
+
.ace_marker-layer .ace_bracket {
|
646
|
+
position: absolute;
|
647
|
+
z-index: 6;
|
648
|
+
}
|
649
|
+
|
650
|
+
.ace_marker-layer .ace_error_bracket {
|
651
|
+
position: absolute;
|
652
|
+
border-bottom: 1px solid #DE5555;
|
653
|
+
border-radius: 0;
|
654
|
+
}
|
655
|
+
|
656
|
+
.ace_marker-layer .ace_active-line {
|
657
|
+
position: absolute;
|
658
|
+
z-index: 2;
|
659
|
+
}
|
660
|
+
|
661
|
+
.ace_marker-layer .ace_selected-word {
|
662
|
+
position: absolute;
|
663
|
+
z-index: 4;
|
664
|
+
box-sizing: border-box;
|
665
|
+
}
|
666
|
+
|
667
|
+
.ace_line .ace_fold {
|
668
|
+
box-sizing: border-box;
|
669
|
+
|
670
|
+
display: inline-block;
|
671
|
+
height: 11px;
|
672
|
+
margin-top: -2px;
|
673
|
+
vertical-align: middle;
|
674
|
+
|
675
|
+
background-image:
|
676
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
677
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
|
678
|
+
background-repeat: no-repeat, repeat-x;
|
679
|
+
background-position: center center, top left;
|
680
|
+
color: transparent;
|
681
|
+
|
682
|
+
border: 1px solid black;
|
683
|
+
border-radius: 2px;
|
684
|
+
|
685
|
+
cursor: pointer;
|
686
|
+
pointer-events: auto;
|
687
|
+
}
|
688
|
+
|
689
|
+
.ace_dark .ace_fold {
|
690
|
+
}
|
691
|
+
|
692
|
+
.ace_fold:hover{
|
693
|
+
background-image:
|
694
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
695
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
|
696
|
+
}
|
697
|
+
|
698
|
+
.ace_tooltip {
|
699
|
+
background-color: #f5f5f5;
|
700
|
+
border: 1px solid gray;
|
701
|
+
border-radius: 1px;
|
702
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
703
|
+
color: black;
|
704
|
+
padding: 3px 4px;
|
705
|
+
position: fixed;
|
706
|
+
z-index: 999999;
|
707
|
+
box-sizing: border-box;
|
708
|
+
cursor: default;
|
709
|
+
white-space: pre-wrap;
|
710
|
+
word-wrap: break-word;
|
711
|
+
line-height: normal;
|
712
|
+
font-style: normal;
|
713
|
+
font-weight: normal;
|
714
|
+
letter-spacing: normal;
|
715
|
+
pointer-events: none;
|
716
|
+
overflow: auto;
|
717
|
+
max-width: min(33em, 66vw);
|
718
|
+
overscroll-behavior: contain;
|
719
|
+
}
|
720
|
+
.ace_tooltip pre {
|
721
|
+
white-space: pre-wrap;
|
722
|
+
}
|
723
|
+
|
724
|
+
.ace_tooltip.ace_dark {
|
725
|
+
background-color: #636363;
|
726
|
+
color: #fff;
|
727
|
+
}
|
728
|
+
|
729
|
+
.ace_tooltip:focus {
|
730
|
+
outline: 1px solid #5E9ED6;
|
731
|
+
}
|
732
|
+
|
733
|
+
.ace_icon {
|
734
|
+
display: inline-block;
|
735
|
+
width: 18px;
|
736
|
+
vertical-align: top;
|
737
|
+
}
|
738
|
+
|
739
|
+
.ace_icon_svg {
|
740
|
+
display: inline-block;
|
741
|
+
width: 12px;
|
742
|
+
vertical-align: top;
|
743
|
+
-webkit-mask-repeat: no-repeat;
|
744
|
+
-webkit-mask-size: 12px;
|
745
|
+
-webkit-mask-position: center;
|
746
|
+
}
|
747
|
+
|
748
|
+
.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
|
749
|
+
padding-right: 13px;
|
750
|
+
}
|
751
|
+
|
752
|
+
.ace_fold-widget {
|
753
|
+
box-sizing: border-box;
|
754
|
+
|
755
|
+
margin: 0 -12px 0 1px;
|
756
|
+
display: none;
|
757
|
+
width: 11px;
|
758
|
+
vertical-align: top;
|
759
|
+
|
760
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
|
761
|
+
background-repeat: no-repeat;
|
762
|
+
background-position: center;
|
763
|
+
|
764
|
+
border-radius: 3px;
|
765
|
+
|
766
|
+
border: 1px solid transparent;
|
767
|
+
cursor: pointer;
|
768
|
+
}
|
769
|
+
|
770
|
+
.ace_folding-enabled .ace_fold-widget {
|
771
|
+
display: inline-block;
|
772
|
+
}
|
773
|
+
|
774
|
+
.ace_fold-widget.ace_end {
|
775
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
776
|
+
}
|
777
|
+
|
778
|
+
.ace_fold-widget.ace_closed {
|
779
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
780
|
+
}
|
781
|
+
|
782
|
+
.ace_fold-widget:hover {
|
783
|
+
border: 1px solid rgba(0, 0, 0, 0.3);
|
784
|
+
background-color: rgba(255, 255, 255, 0.2);
|
785
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
786
|
+
}
|
787
|
+
|
788
|
+
.ace_fold-widget:active {
|
789
|
+
border: 1px solid rgba(0, 0, 0, 0.4);
|
790
|
+
background-color: rgba(0, 0, 0, 0.05);
|
791
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
792
|
+
}
|
793
|
+
/**
|
794
|
+
* Dark version for fold widgets
|
795
|
+
*/
|
796
|
+
.ace_dark .ace_fold-widget {
|
797
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
798
|
+
}
|
799
|
+
.ace_dark .ace_fold-widget.ace_end {
|
800
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
801
|
+
}
|
802
|
+
.ace_dark .ace_fold-widget.ace_closed {
|
803
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
804
|
+
}
|
805
|
+
.ace_dark .ace_fold-widget:hover {
|
806
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
807
|
+
background-color: rgba(255, 255, 255, 0.1);
|
808
|
+
}
|
809
|
+
.ace_dark .ace_fold-widget:active {
|
810
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
811
|
+
}
|
812
|
+
|
813
|
+
.ace_inline_button {
|
814
|
+
border: 1px solid lightgray;
|
815
|
+
display: inline-block;
|
816
|
+
margin: -1px 8px;
|
817
|
+
padding: 0 5px;
|
818
|
+
pointer-events: auto;
|
819
|
+
cursor: pointer;
|
820
|
+
}
|
821
|
+
.ace_inline_button:hover {
|
822
|
+
border-color: gray;
|
823
|
+
background: rgba(200,200,200,0.2);
|
824
|
+
display: inline-block;
|
825
|
+
pointer-events: auto;
|
826
|
+
}
|
827
|
+
|
828
|
+
.ace_fold-widget.ace_invalid {
|
829
|
+
background-color: #FFB4B4;
|
830
|
+
border-color: #DE5555;
|
831
|
+
}
|
832
|
+
|
833
|
+
.ace_fade-fold-widgets .ace_fold-widget {
|
834
|
+
transition: opacity 0.4s ease 0.05s;
|
835
|
+
opacity: 0;
|
836
|
+
}
|
837
|
+
|
838
|
+
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
839
|
+
transition: opacity 0.05s ease 0.05s;
|
840
|
+
opacity:1;
|
841
|
+
}
|
842
|
+
|
843
|
+
.ace_underline {
|
844
|
+
text-decoration: underline;
|
845
|
+
}
|
846
|
+
|
847
|
+
.ace_bold {
|
848
|
+
font-weight: bold;
|
849
|
+
}
|
850
|
+
|
851
|
+
.ace_nobold .ace_bold {
|
852
|
+
font-weight: normal;
|
853
|
+
}
|
854
|
+
|
855
|
+
.ace_italic {
|
856
|
+
font-style: italic;
|
857
|
+
}
|
858
|
+
|
859
|
+
|
860
|
+
.ace_error-marker {
|
861
|
+
background-color: rgba(255, 0, 0,0.2);
|
862
|
+
position: absolute;
|
863
|
+
z-index: 9;
|
864
|
+
}
|
865
|
+
|
866
|
+
.ace_highlight-marker {
|
867
|
+
background-color: rgba(255, 255, 0,0.2);
|
868
|
+
position: absolute;
|
869
|
+
z-index: 8;
|
870
|
+
}
|
871
|
+
|
872
|
+
.ace_mobile-menu {
|
873
|
+
position: absolute;
|
874
|
+
line-height: 1.5;
|
875
|
+
border-radius: 4px;
|
876
|
+
-ms-user-select: none;
|
877
|
+
-moz-user-select: none;
|
878
|
+
-webkit-user-select: none;
|
879
|
+
user-select: none;
|
880
|
+
background: white;
|
881
|
+
box-shadow: 1px 3px 2px grey;
|
882
|
+
border: 1px solid #dcdcdc;
|
883
|
+
color: black;
|
884
|
+
}
|
885
|
+
.ace_dark > .ace_mobile-menu {
|
886
|
+
background: #333;
|
887
|
+
color: #ccc;
|
888
|
+
box-shadow: 1px 3px 2px grey;
|
889
|
+
border: 1px solid #444;
|
890
|
+
|
891
|
+
}
|
892
|
+
.ace_mobile-button {
|
893
|
+
padding: 2px;
|
894
|
+
cursor: pointer;
|
895
|
+
overflow: hidden;
|
896
|
+
}
|
897
|
+
.ace_mobile-button:hover {
|
898
|
+
background-color: #eee;
|
899
|
+
opacity:1;
|
900
|
+
}
|
901
|
+
.ace_mobile-button:active {
|
902
|
+
background-color: #ddd;
|
903
|
+
}
|
904
|
+
|
905
|
+
.ace_placeholder {
|
906
|
+
position: relative;
|
907
|
+
font-family: arial;
|
908
|
+
transform: scale(0.9);
|
909
|
+
transform-origin: left;
|
910
|
+
white-space: pre;
|
911
|
+
opacity: 0.7;
|
912
|
+
margin: 0 10px;
|
913
|
+
z-index: 1;
|
914
|
+
}
|
915
|
+
|
916
|
+
.ace_ghost_text {
|
917
|
+
opacity: 0.5;
|
918
|
+
font-style: italic;
|
919
|
+
}
|
920
|
+
|
921
|
+
.ace_ghost_text_container > div {
|
922
|
+
white-space: pre;
|
923
|
+
}
|
924
|
+
|
925
|
+
.ghost_text_line_wrapped::after {
|
926
|
+
content: "↩";
|
927
|
+
position: absolute;
|
928
|
+
}
|
929
|
+
|
930
|
+
.ace_lineWidgetContainer.ace_ghost_text {
|
931
|
+
margin: 0px 4px
|
932
|
+
}
|
933
|
+
|
934
|
+
.ace_screenreader-only {
|
935
|
+
position:absolute;
|
936
|
+
left:-10000px;
|
937
|
+
top:auto;
|
938
|
+
width:1px;
|
939
|
+
height:1px;
|
940
|
+
overflow:hidden;
|
941
|
+
}
|
942
|
+
|
943
|
+
.ace_hidden_token {
|
944
|
+
display: none;
|
945
|
+
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,r,v){var m=e("../lib/dom"),y=e("../lib/oop"),x=e("../lib/event_emitter").EventEmitter,h=function(){function g(s,l){this.canvas=m.createElement("canvas"),this.renderer=l,this.pixelRatio=1,this.maxHeight=l.layerConfig.maxHeight,this.lineHeight=l.layerConfig.lineHeight,this.canvasHeight=s.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=s.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},s.element.appendChild(this.canvas)}return g.prototype.$updateDecorators=function(s){var l=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(s){this.maxHeight=s.maxHeight,this.lineHeight=s.lineHeight,this.canvasHeight=s.height;var c=(s.lastRow+1)*this.lineHeight;c<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var a=this.canvas.getContext("2d");function o(H,P){return H.priority<P.priority?-1:H.priority>P.priority?1:0}var u=this.renderer.session.$annotations;if(a.clearRect(0,0,this.canvas.width,this.canvas.height),u){var d={info:1,warning:2,error:3};u.forEach(function(H){H.priority=d[H.type]||null}),u=u.sort(o);for(var w=this.renderer.session.$foldData,b=0;b<u.length;b++){var E=u[b].row,$=this.compensateFoldRows(E,w),_=Math.round((E-$)*this.lineHeight*this.heightRatio),C=Math.round((E-$)*this.lineHeight*this.heightRatio),R=Math.round(((E-$)*this.lineHeight+this.lineHeight)*this.heightRatio),L=R-C;if(L<this.minDecorationHeight){var F=(C+R)/2|0;F<this.halfMinDecorationHeight?F=this.halfMinDecorationHeight:F+this.halfMinDecorationHeight>this.canvasHeight&&(F=this.canvasHeight-this.halfMinDecorationHeight),C=Math.round(F-this.halfMinDecorationHeight),R=Math.round(F+this.halfMinDecorationHeight)}a.fillStyle=l[u[b].type]||null,a.fillRect(0,_,this.canvasWidth,R-C)}}var I=this.renderer.session.selection.getCursor();if(I){var $=this.compensateFoldRows(I.row,w),_=Math.round((I.row-$)*this.lineHeight*this.heightRatio);a.fillStyle="rgba(0, 0, 0, 0.5)",a.fillRect(0,_,this.canvasWidth,2)}},g.prototype.compensateFoldRows=function(s,l){var c=0;if(l&&l.length>0)for(var a=0;a<l.length;a++)s>l[a].start.row&&s<l[a].end.row?c+=s-l[a].start.row:s>=l[a].end.row&&(c+=l[a].end.row-l[a].start.row);return c},g}();y.implement(h.prototype,x),r.Decorator=h}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(e,r,v){var m=e("./lib/oop"),y=e("./lib/dom"),x=e("./lib/lang"),h=e("./config"),g=e("./layer/gutter").Gutter,s=e("./layer/marker").Marker,l=e("./layer/text").Text,c=e("./layer/cursor").Cursor,a=e("./scrollbar").HScrollBar,o=e("./scrollbar").VScrollBar,u=e("./scrollbar_custom").HScrollBar,d=e("./scrollbar_custom").VScrollBar,w=e("./renderloop").RenderLoop,b=e("./layer/font_metrics").FontMetrics,E=e("./lib/event_emitter").EventEmitter,$=e("./css/editor-css"),_=e("./layer/decorators").Decorator,C=e("./lib/useragent"),R=e("./layer/text_util").isTextToken;y.importCssString($,"ace_editor.css",!1);var L=function(){function F(I,H){var P=this;this.container=I||y.createElement("div"),y.addCssClass(this.container,"ace_editor"),y.HI_DPI&&y.addCssClass(this.container,"ace_hidpi"),this.setTheme(H),h.get("useStrictCSP")==null&&h.set("useStrictCSP",!1),this.$gutter=y.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=y.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=y.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new g(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new s(this.content);var O=this.$textLayer=new l(this.content);this.canvas=O.element,this.$markerFront=new s(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new o(this.container,this),this.scrollBarH=new a(this.container,this),this.scrollBarV.on("scroll",function(S){P.$scrollAnimation||P.session.setScrollTop(S.data-P.scrollMargin.top)}),this.scrollBarH.on("scroll",function(S){P.$scrollAnimation||P.session.setScrollLeft(S.data-P.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new b(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(S){P.updateCharacterSize(),P.onResize(!0,P.gutterWidth,P.$size.width,P.$size.height),P._signal("changeCharacterSize",S)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!C.isIOS,this.$loop=new w(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),h.resetOptions(this),h._signal("renderer",this)}return F.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),y.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},F.prototype.setSession=function(I){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=I,I&&this.scrollMargin.top&&I.getScrollTop()<=0&&I.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(I),this.$markerBack.setSession(I),this.$markerFront.setSession(I),this.$gutterLayer.setSession(I),this.$textLayer.setSession(I),I&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},F.prototype.updateLines=function(I,H,P){if(H===void 0&&(H=1/0),this.$changedLines?(this.$changedLines.firstRow>I&&(this.$changedLines.firstRow=I),this.$changedLines.lastRow<H&&(this.$changedLines.lastRow=H)):this.$changedLines={firstRow:I,lastRow:H},this.$changedLines.lastRow<this.layerConfig.firstRow)if(P)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},F.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},F.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},F.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},F.prototype.updateFull=function(I){I?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},F.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},F.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},F.prototype.onResize=function(I,H,P,O){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=I?1:0;var S=this.container;O||(O=S.clientHeight||S.scrollHeight),!O&&this.$maxLines&&this.lineHeight>1&&(!S.style.height||S.style.height=="0px")&&(S.style.height="1px",O=S.clientHeight||S.scrollHeight),P||(P=S.clientWidth||S.scrollWidth);var A=this.$updateCachedSize(I,H,P,O);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!P&&!O)return this.resizing=0;I&&(this.$gutterLayer.$padding=null),I?this.$renderChanges(A|this.$changes,!0):this.$loop.schedule(A|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},F.prototype.$updateCachedSize=function(I,H,P,O){O-=this.$extraHeight||0;var S=0,A=this.$size,N={width:A.width,height:A.height,scrollerHeight:A.scrollerHeight,scrollerWidth:A.scrollerWidth};if(O&&(I||A.height!=O)&&(A.height=O,S|=this.CHANGE_SIZE,A.scrollerHeight=A.height,this.$horizScroll&&(A.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(A.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",S=S|this.CHANGE_SCROLL),P&&(I||A.width!=P)){S|=this.CHANGE_SIZE,A.width=P,H==null&&(H=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=H,y.setStyle(this.scrollBarH.element.style,"left",H+"px"),y.setStyle(this.scroller.style,"left",H+this.margin.left+"px"),A.scrollerWidth=Math.max(0,P-H-this.scrollBarV.getWidth()-this.margin.h),y.setStyle(this.$gutter.style,"left",this.margin.left+"px");var B=this.scrollBarV.getWidth()+"px";y.setStyle(this.scrollBarH.element.style,"right",B),y.setStyle(this.scroller.style,"right",B),y.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(A.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||I)&&(S|=this.CHANGE_FULL)}return A.$dirty=!P||!O,S&&this._signal("resize",N),S},F.prototype.onGutterResize=function(I){var H=this.$showGutter?I:0;H!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,H,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},F.prototype.adjustWrapLimit=function(){var I=this.$size.scrollerWidth-this.$padding*2,H=Math.floor(I/this.characterWidth);return this.session.adjustWrapLimit(H,this.$showPrintMargin&&this.$printMarginColumn)},F.prototype.setAnimatedScroll=function(I){this.setOption("animatedScroll",I)},F.prototype.getAnimatedScroll=function(){return this.$animatedScroll},F.prototype.setShowInvisibles=function(I){this.setOption("showInvisibles",I),this.session.$bidiHandler.setShowInvisibles(I)},F.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},F.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},F.prototype.setDisplayIndentGuides=function(I){this.setOption("displayIndentGuides",I)},F.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},F.prototype.setHighlightIndentGuides=function(I){this.setOption("highlightIndentGuides",I)},F.prototype.setShowPrintMargin=function(I){this.setOption("showPrintMargin",I)},F.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},F.prototype.setPrintMarginColumn=function(I){this.setOption("printMarginColumn",I)},F.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},F.prototype.getShowGutter=function(){return this.getOption("showGutter")},F.prototype.setShowGutter=function(I){return this.setOption("showGutter",I)},F.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},F.prototype.setFadeFoldWidgets=function(I){this.setOption("fadeFoldWidgets",I)},F.prototype.setHighlightGutterLine=function(I){this.setOption("highlightGutterLine",I)},F.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},F.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var I=y.createElement("div");I.className="ace_layer ace_print-margin-layer",this.$printMarginEl=y.createElement("div"),this.$printMarginEl.className="ace_print-margin",I.appendChild(this.$printMarginEl),this.content.insertBefore(I,this.content.firstChild)}var H=this.$printMarginEl.style;H.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",H.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},F.prototype.getContainerElement=function(){return this.container},F.prototype.getMouseEventTarget=function(){return this.scroller},F.prototype.getTextAreaContainer=function(){return this.container},F.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var I=this.textarea.style,H=this.$composition;if(!this.$keepTextAreaAtCursor&&!H){y.translate(this.textarea,-100,0);return}var P=this.$cursorLayer.$pixelPos;if(P){H&&H.markerRange&&(P=this.$cursorLayer.getPixelPosition(H.markerRange.start,!0));var O=this.layerConfig,S=P.top,A=P.left;S-=O.offset;var N=H&&H.useTextareaForIME||C.isMobile?this.lineHeight:1;if(S<0||S>O.height-N){y.translate(this.textarea,0,0);return}var B=1,U=this.$size.height-N;if(!H)S+=this.lineHeight;else if(H.useTextareaForIME){var K=this.textarea.value;B=this.characterWidth*this.session.$getStringScreenWidth(K)[0]}else S+=this.lineHeight+2;A-=this.scrollLeft,A>this.$size.scrollerWidth-B&&(A=this.$size.scrollerWidth-B),A+=this.gutterWidth+this.margin.left,y.setStyle(I,"height",N+"px"),y.setStyle(I,"width",B+"px"),y.translate(this.textarea,Math.min(A,this.$size.scrollerWidth-B),Math.min(S,U))}}},F.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},F.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},F.prototype.getLastFullyVisibleRow=function(){var I=this.layerConfig,H=I.lastRow,P=this.session.documentToScreenRow(H,0)*I.lineHeight;return P-this.session.getScrollTop()>I.height-I.lineHeight?H-1:H},F.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},F.prototype.setPadding=function(I){this.$padding=I,this.$textLayer.setPadding(I),this.$cursorLayer.setPadding(I),this.$markerFront.setPadding(I),this.$markerBack.setPadding(I),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},F.prototype.setScrollMargin=function(I,H,P,O){var S=this.scrollMargin;S.top=I|0,S.bottom=H|0,S.right=O|0,S.left=P|0,S.v=S.top+S.bottom,S.h=S.left+S.right,S.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-S.top),this.updateFull()},F.prototype.setMargin=function(I,H,P,O){var S=this.margin;S.top=I|0,S.bottom=H|0,S.right=O|0,S.left=P|0,S.v=S.top+S.bottom,S.h=S.left+S.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},F.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},F.prototype.setHScrollBarAlwaysVisible=function(I){this.setOption("hScrollBarAlwaysVisible",I)},F.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},F.prototype.setVScrollBarAlwaysVisible=function(I){this.setOption("vScrollBarAlwaysVisible",I)},F.prototype.$updateScrollBarV=function(){var I=this.layerConfig.maxHeight,H=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(I-=(H-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>I-H&&(I=this.scrollTop+H,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(I+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},F.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},F.prototype.freeze=function(){this.$frozen=!0},F.prototype.unfreeze=function(){this.$frozen=!1},F.prototype.$renderChanges=function(I,H){if(this.$changes&&(I|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!I&&!H){this.$changes|=I;return}if(this.$size.$dirty)return this.$changes|=I,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",I),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var P=this.layerConfig;if(I&this.CHANGE_FULL||I&this.CHANGE_SIZE||I&this.CHANGE_TEXT||I&this.CHANGE_LINES||I&this.CHANGE_SCROLL||I&this.CHANGE_H_SCROLL){if(I|=this.$computeLayerConfig()|this.$loop.clear(),P.firstRow!=this.layerConfig.firstRow&&P.firstRowScreen==this.layerConfig.firstRowScreen){var O=this.scrollTop+(P.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;O>0&&(this.scrollTop=O,I=I|this.CHANGE_SCROLL,I|=this.$computeLayerConfig()|this.$loop.clear())}P=this.layerConfig,this.$updateScrollBarV(),I&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),y.translate(this.content,-this.scrollLeft,-P.offset);var S=P.width+2*this.$padding+"px",A=P.minHeight+"px";y.setStyle(this.content.style,"width",S),y.setStyle(this.content.style,"height",A)}if(I&this.CHANGE_H_SCROLL&&(y.translate(this.content,-this.scrollLeft,-P.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),I&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(P),this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P),this.$markerBack.update(P),this.$markerFront.update(P),this.$cursorLayer.update(P),this.$moveTextAreaToCursor(),this._signal("afterRender",I);return}if(I&this.CHANGE_SCROLL){this.$changedLines=null,I&this.CHANGE_TEXT||I&this.CHANGE_LINES?this.$textLayer.update(P):this.$textLayer.scrollLines(P),this.$showGutter&&(I&this.CHANGE_GUTTER||I&this.CHANGE_LINES?this.$gutterLayer.update(P):this.$gutterLayer.scrollLines(P)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P),this.$markerBack.update(P),this.$markerFront.update(P),this.$cursorLayer.update(P),this.$moveTextAreaToCursor(),this._signal("afterRender",I);return}I&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(P),this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):I&this.CHANGE_LINES?((this.$updateLines()||I&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):I&this.CHANGE_TEXT||I&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):I&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)),I&this.CHANGE_CURSOR&&(this.$cursorLayer.update(P),this.$moveTextAreaToCursor()),I&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(P),I&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(P),this._signal("afterRender",I)},F.prototype.$autosize=function(){var I=this.session.getScreenLength()*this.lineHeight,H=this.$maxLines*this.lineHeight,P=Math.min(H,Math.max((this.$minLines||1)*this.lineHeight,I))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(P+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&P>this.$maxPixelHeight&&(P=this.$maxPixelHeight);var O=P<=2*this.lineHeight,S=!O&&I>H;if(P!=this.desiredHeight||this.$size.height!=this.desiredHeight||S!=this.$vScroll){S!=this.$vScroll&&(this.$vScroll=S,this.scrollBarV.setVisible(S));var A=this.container.clientWidth;this.container.style.height=P+"px",this.$updateCachedSize(!0,this.$gutterWidth,A,P),this.desiredHeight=P,this._signal("autosize")}},F.prototype.$computeLayerConfig=function(){var I=this.session,H=this.$size,P=H.height<=2*this.lineHeight,O=this.session.getScreenLength(),S=O*this.lineHeight,A=this.$getLongestLine(),N=!P&&(this.$hScrollBarAlwaysVisible||H.scrollerWidth-A-2*this.$padding<0),B=this.$horizScroll!==N;B&&(this.$horizScroll=N,this.scrollBarH.setVisible(N));var U=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),P=H.height<=2*this.lineHeight);var K=H.scrollerHeight+this.lineHeight,Z=!this.$maxLines&&this.$scrollPastEnd?(H.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;S+=Z;var te=this.scrollMargin;this.session.setScrollTop(Math.max(-te.top,Math.min(this.scrollTop,S-H.scrollerHeight+te.bottom))),this.session.setScrollLeft(Math.max(-te.left,Math.min(this.scrollLeft,A+2*this.$padding-H.scrollerWidth+te.right)));var he=!P&&(this.$vScrollBarAlwaysVisible||H.scrollerHeight-S+Z<0||this.scrollTop>te.top),ne=U!==he;ne&&(this.$vScroll=he,this.scrollBarV.setVisible(he));var ae=this.scrollTop%this.lineHeight,ce=Math.ceil(K/this.lineHeight)-1,ue=Math.max(0,Math.round((this.scrollTop-ae)/this.lineHeight)),ye=ue+ce,Ae,$e,Ie=this.lineHeight;ue=I.screenToDocumentRow(ue,0);var Ge=I.getFoldLine(ue);Ge&&(ue=Ge.start.row),Ae=I.documentToScreenRow(ue,0),$e=I.getRowLength(ue)*Ie,ye=Math.min(I.screenToDocumentRow(ye,0),I.getLength()-1),K=H.scrollerHeight+I.getRowLength(ye)*Ie+$e,ae=this.scrollTop-Ae*Ie;var qe=0;return(this.layerConfig.width!=A||B)&&(qe=this.CHANGE_H_SCROLL),(B||ne)&&(qe|=this.$updateCachedSize(!0,this.gutterWidth,H.width,H.height),this._signal("scrollbarVisibilityChanged"),ne&&(A=this.$getLongestLine())),this.layerConfig={width:A,padding:this.$padding,firstRow:ue,firstRowScreen:Ae,lastRow:ye,lineHeight:Ie,characterWidth:this.characterWidth,minHeight:K,maxHeight:S,offset:ae,gutterOffset:Ie?Math.max(0,Math.ceil((ae+H.height-H.scrollerHeight)/Ie)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(A-this.$padding),qe},F.prototype.$updateLines=function(){if(this.$changedLines){var I=this.$changedLines.firstRow,H=this.$changedLines.lastRow;this.$changedLines=null;var P=this.layerConfig;if(!(I>P.lastRow+1)&&!(H<P.firstRow)){if(H===1/0){this.$showGutter&&this.$gutterLayer.update(P),this.$textLayer.update(P);return}return this.$textLayer.updateLines(P,I,H),!0}}},F.prototype.$getLongestLine=function(){var I=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(I+=1),this.$textLayer&&I>this.$textLayer.MAX_LINE_LENGTH&&(I=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(I*this.characterWidth))},F.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},F.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},F.prototype.addGutterDecoration=function(I,H){this.$gutterLayer.addGutterDecoration(I,H)},F.prototype.removeGutterDecoration=function(I,H){this.$gutterLayer.removeGutterDecoration(I,H)},F.prototype.updateBreakpoints=function(I){this._rows=I,this.$loop.schedule(this.CHANGE_GUTTER)},F.prototype.setAnnotations=function(I){this.$gutterLayer.setAnnotations(I),this.$loop.schedule(this.CHANGE_GUTTER)},F.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},F.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},F.prototype.showCursor=function(){this.$cursorLayer.showCursor()},F.prototype.scrollSelectionIntoView=function(I,H,P){this.scrollCursorIntoView(I,P),this.scrollCursorIntoView(H,P)},F.prototype.scrollCursorIntoView=function(I,H,P){if(this.$size.scrollerHeight!==0){var O=this.$cursorLayer.getPixelPosition(I),S=O.left,A=O.top,N=P&&P.top||0,B=P&&P.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var U=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;U+N>A?(H&&U+N>A+this.lineHeight&&(A-=H*this.$size.scrollerHeight),A===0&&(A=-this.scrollMargin.top),this.session.setScrollTop(A)):U+this.$size.scrollerHeight-B<A+this.lineHeight&&(H&&U+this.$size.scrollerHeight-B<A-this.lineHeight&&(A+=H*this.$size.scrollerHeight),this.session.setScrollTop(A+this.lineHeight+B-this.$size.scrollerHeight));var K=this.scrollLeft,Z=2*this.layerConfig.characterWidth;S-Z<K?(S-=Z,S<this.$padding+Z&&(S=-this.scrollMargin.left),this.session.setScrollLeft(S)):(S+=Z,K+this.$size.scrollerWidth<S+this.characterWidth?this.session.setScrollLeft(Math.round(S+this.characterWidth-this.$size.scrollerWidth)):K<=this.$padding&&S-K<this.characterWidth&&this.session.setScrollLeft(0))}},F.prototype.getScrollTop=function(){return this.session.getScrollTop()},F.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},F.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},F.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},F.prototype.scrollToRow=function(I){this.session.setScrollTop(I*this.lineHeight)},F.prototype.alignCursor=function(I,H){typeof I=="number"&&(I={row:I,column:0});var P=this.$cursorLayer.getPixelPosition(I),O=this.$size.scrollerHeight-this.lineHeight,S=P.top-O*(H||0);return this.session.setScrollTop(S),S},F.prototype.$calcSteps=function(I,H){var P=0,O=this.STEPS,S=[],A=function(N,B,U){return U*(Math.pow(N-1,3)+1)+B};for(P=0;P<O;++P)S.push(A(P/this.STEPS,I,H-I));return S},F.prototype.scrollToLine=function(I,H,P,O){var S=this.$cursorLayer.getPixelPosition({row:I,column:0}),A=S.top;H&&(A-=this.$size.scrollerHeight/2);var N=this.scrollTop;this.session.setScrollTop(A),P!==!1&&this.animateScrolling(N,O)},F.prototype.animateScrolling=function(I,H){var P=this.scrollTop;if(!this.$animatedScroll)return;var O=this;if(I==P)return;if(this.$scrollAnimation){var S=this.$scrollAnimation.steps;if(S.length&&(I=S[0],I==P))return}var A=O.$calcSteps(I,P);this.$scrollAnimation={from:I,to:P,steps:A},clearInterval(this.$timer),O.session.setScrollTop(A.shift()),O.session.$scrollTop=P;function N(){O.$timer=clearInterval(O.$timer),O.$scrollAnimation=null,O.$stopAnimation=!1,H&&H()}this.$timer=setInterval(function(){if(O.$stopAnimation){N();return}if(!O.session)return clearInterval(O.$timer);A.length?(O.session.setScrollTop(A.shift()),O.session.$scrollTop=P):P!=null?(O.session.$scrollTop=-1,O.session.setScrollTop(P),P=null):N()},10)},F.prototype.scrollToY=function(I){this.scrollTop!==I&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=I)},F.prototype.scrollToX=function(I){this.scrollLeft!==I&&(this.scrollLeft=I),this.$loop.schedule(this.CHANGE_H_SCROLL)},F.prototype.scrollTo=function(I,H){this.session.setScrollTop(H),this.session.setScrollLeft(I)},F.prototype.scrollBy=function(I,H){H&&this.session.setScrollTop(this.session.getScrollTop()+H),I&&this.session.setScrollLeft(this.session.getScrollLeft()+I)},F.prototype.isScrollableBy=function(I,H){if(H<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||H>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||I<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||I>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},F.prototype.pixelToScreenCoordinates=function(I,H){var P;if(this.$hasCssTransforms){P={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([I,H]);I=O[1]-this.gutterWidth-this.margin.left,H=O[0]}else P=this.scroller.getBoundingClientRect();var S=I+this.scrollLeft-P.left-this.$padding,A=S/this.characterWidth,N=Math.floor((H+this.scrollTop-P.top)/this.lineHeight),B=this.$blockCursor?Math.floor(A):Math.round(A);return{row:N,column:B,side:A-B>0?1:-1,offsetX:S}},F.prototype.screenToTextCoordinates=function(I,H){var P;if(this.$hasCssTransforms){P={top:0,left:0};var O=this.$fontMetrics.transformCoordinates([I,H]);I=O[1]-this.gutterWidth-this.margin.left,H=O[0]}else P=this.scroller.getBoundingClientRect();var S=I+this.scrollLeft-P.left-this.$padding,A=S/this.characterWidth,N=this.$blockCursor?Math.floor(A):Math.round(A),B=Math.floor((H+this.scrollTop-P.top)/this.lineHeight);return this.session.screenToDocumentPosition(B,Math.max(N,0),S)},F.prototype.textToScreenCoordinates=function(I,H){var P=this.scroller.getBoundingClientRect(),O=this.session.documentToScreenPosition(I,H),S=this.$padding+(this.session.$bidiHandler.isBidiRow(O.row,I)?this.session.$bidiHandler.getPosLeft(O.column):Math.round(O.column*this.characterWidth)),A=O.row*this.lineHeight;return{pageX:P.left+S-this.scrollLeft,pageY:P.top+A-this.scrollTop}},F.prototype.visualizeFocus=function(){y.addCssClass(this.container,"ace_focus")},F.prototype.visualizeBlur=function(){y.removeCssClass(this.container,"ace_focus")},F.prototype.showComposition=function(I){this.$composition=I,I.cssText||(I.cssText=this.textarea.style.cssText),I.useTextareaForIME==null&&(I.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(y.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):I.markerId=this.session.addMarker(I.markerRange,"ace_composition_marker","text")},F.prototype.setCompositionText=function(I){var H=this.session.selection.cursor;this.addToken(I,"composition_placeholder",H.row,H.column),this.$moveTextAreaToCursor()},F.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),y.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var I=this.session.selection.cursor;this.removeExtraToken(I.row,I.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},F.prototype.setGhostText=function(I,H){var P=this.session.selection.cursor,O=H||{row:P.row,column:P.column};this.removeGhostText();var S=this.$calculateWrappedTextChunks(I,O);this.addToken(S[0].text,"ghost_text",O.row,O.column),this.$ghostText={text:I,position:{row:O.row,column:O.column}};var A=y.createElement("div");if(S.length>1){var N=this.hideTokensAfterPosition(O.row,O.column),B;S.slice(1).forEach(function(ne){var ae=y.createElement("div"),ce=y.createElement("span");ce.className="ace_ghost_text",ne.wrapped&&(ae.className="ghost_text_line_wrapped"),ne.text.length===0&&(ne.text=" "),ce.appendChild(y.createTextNode(ne.text)),ae.appendChild(ce),A.appendChild(ae),B=ae}),N.forEach(function(ne){var ae=y.createElement("span");R(ne.type)||(ae.className="ace_"+ne.type.replace(/\./g," ace_")),ae.appendChild(y.createTextNode(ne.value)),B.appendChild(ae)}),this.$ghostTextWidget={el:A,row:O.row,column:O.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var U=this.$cursorLayer.getPixelPosition(O,!0),K=this.container,Z=K.getBoundingClientRect().height,te=S.length*this.lineHeight,he=te<Z-U.top;if(he)return;te<Z?this.scrollBy(0,(S.length-1)*this.lineHeight):this.scrollToRow(O.row)}},F.prototype.$calculateWrappedTextChunks=function(I,H){var P=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(P/this.characterWidth)-2;O=O<=0?60:O;for(var S=I.split(/\r?\n/),A=[],N=0;N<S.length;N++){var B=this.session.$getDisplayTokens(S[N],H.column),U=this.session.$computeWrapSplits(B,O,this.session.$tabSize);if(U.length>0){var K=0;U.push(S[N].length);for(var Z=0;Z<U.length;Z++){var te=S[N].slice(K,U[Z]);A.push({text:te,wrapped:!0}),K=U[Z]}}else A.push({text:S[N],wrapped:!1})}return A},F.prototype.removeGhostText=function(){if(this.$ghostText){var I=this.$ghostText.position;this.removeExtraToken(I.row,I.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},F.prototype.addToken=function(I,H,P,O){var S=this.session;S.bgTokenizer.lines[P]=null;var A={type:H,value:I},N=S.getTokens(P);if(O==null||!N.length)N.push(A);else for(var B=0,U=0;U<N.length;U++){var K=N[U];if(B+=K.value.length,O<=B){var Z=K.value.length-(B-O),te=K.value.slice(0,Z),he=K.value.slice(Z);N.splice(U,1,{type:K.type,value:te},A,{type:K.type,value:he});break}}this.updateLines(P,P)},F.prototype.hideTokensAfterPosition=function(I,H){for(var P=this.session.getTokens(I),O=0,S=!1,A=[],N=0;N<P.length;N++){var B=P[N];if(O+=B.value.length,B.type!=="ghost_text"){if(S){A.push({type:B.type,value:B.value}),B.type="hidden_token";continue}O===H&&(S=!0)}}return this.updateLines(I,I),A},F.prototype.removeExtraToken=function(I,H){this.session.bgTokenizer.lines[I]=null,this.updateLines(I,I)},F.prototype.setTheme=function(I,H){var P=this;if(this.$themeId=I,P._dispatchEvent("themeChange",{theme:I}),!I||typeof I=="string"){var O=I||this.$options.theme.initialValue;h.loadModule(["theme",O],S)}else S(I);function S(A){if(P.$themeId!=I)return H&&H();if(!A||!A.cssClass)throw new Error("couldn't load module "+I+" or it didn't call define");A.$id&&(P.$themeId=A.$id),y.importCssString(A.cssText,A.cssClass,P.container),P.theme&&y.removeCssClass(P.container,P.theme.cssClass);var N="padding"in A?A.padding:"padding"in(P.theme||{})?4:P.$padding;P.$padding&&N!=P.$padding&&P.setPadding(N),P.$theme=A.cssClass,P.theme=A,y.addCssClass(P.container,A.cssClass),y.setCssClass(P.container,"ace_dark",A.isDark),P.$size&&(P.$size.width=0,P.$updateSizeAsync()),P._dispatchEvent("themeLoaded",{theme:A}),H&&H(),C.isSafari&&P.scroller&&(P.scroller.style.background="red",P.scroller.style.background="")}},F.prototype.getTheme=function(){return this.$themeId},F.prototype.setStyle=function(I,H){y.setCssClass(this.container,I,H!==!1)},F.prototype.unsetStyle=function(I){y.removeCssClass(this.container,I)},F.prototype.setCursorStyle=function(I){y.setStyle(this.scroller.style,"cursor",I)},F.prototype.setMouseCursor=function(I){y.setStyle(this.scroller.style,"cursor",I)},F.prototype.attachToShadowRoot=function(){y.importCssString($,"ace_editor.css",this.container)},F.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},F.prototype.$updateCustomScrollbar=function(I){var H=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,I===!0?(this.scrollBarV=new d(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollTop(P.data-H.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollLeft(P.data-H.scrollMargin.left)}),this.$scrollDecorator=new _(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new o(this.container,this),this.scrollBarH=new a(this.container,this),this.scrollBarV.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollTop(P.data-H.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollLeft(P.data-H.scrollMargin.left)}))},F.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var I=this;this.$resizeTimer=x.delayedCall(function(){I.destroyed||I.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(H){var P=H[0].contentRect.width,O=H[0].contentRect.height;Math.abs(I.$size.width-P)>1||Math.abs(I.$size.height-O)>1?I.$resizeTimer.delay():I.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},F}();L.prototype.CHANGE_CURSOR=1,L.prototype.CHANGE_MARKER=2,L.prototype.CHANGE_GUTTER=4,L.prototype.CHANGE_SCROLL=8,L.prototype.CHANGE_LINES=16,L.prototype.CHANGE_TEXT=32,L.prototype.CHANGE_SIZE=64,L.prototype.CHANGE_MARKER_BACK=128,L.prototype.CHANGE_MARKER_FRONT=256,L.prototype.CHANGE_FULL=512,L.prototype.CHANGE_H_SCROLL=1024,L.prototype.$changes=0,L.prototype.$padding=null,L.prototype.$frozen=!1,L.prototype.STEPS=8,m.implement(L.prototype,E),h.defineOptions(L.prototype,"renderer",{useResizeObserver:{set:function(F){!F&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):F&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(F){this.$textLayer.setShowInvisibles(F)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(F){typeof F=="number"&&(this.$printMarginColumn=F),this.$showPrintMargin=!!F,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(F){this.$gutter.style.display=F?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(F){this.$gutterLayer.$useSvgGutterIcons=F},initialValue:!1},showFoldedAnnotations:{set:function(F){this.$gutterLayer.$showFoldedAnnotations=F},initialValue:!1},fadeFoldWidgets:{set:function(F){y.setCssClass(this.$gutter,"ace_fade-fold-widgets",F)},initialValue:!1},showFoldWidgets:{set:function(F){this.$gutterLayer.setShowFoldWidgets(F),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(F){this.$textLayer.setDisplayIndentGuides(F)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(F){this.$textLayer.setHighlightIndentGuides(F)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(F){this.$gutterLayer.setHighlightGutterLine(F),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(F){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(F){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(F){typeof F=="number"&&(F=F+"px"),this.container.style.fontSize=F,this.updateFontSize()},initialValue:12},fontFamily:{set:function(F){this.container.style.fontFamily=F,this.updateFontSize()}},maxLines:{set:function(F){this.updateFull()}},minLines:{set:function(F){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(F){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(F){F=+F||0,this.$scrollPastEnd!=F&&(this.$scrollPastEnd=F,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(F){this.$gutterLayer.$fixedWidth=!!F,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(F){this.$updateCustomScrollbar(F)},initialValue:!1},theme:{set:function(F){this.setTheme(F)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!C.isMobile&&!C.isIE}}),r.VirtualRenderer=L}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,r,v){var m=e("../lib/oop"),y=e("../lib/net"),x=e("../lib/event_emitter").EventEmitter,h=e("../config");function g(a){var o="importScripts('"+y.qualifyURL(a)+"');";try{return new Blob([o],{type:"application/javascript"})}catch{var u=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,d=new u;return d.append(o),d.getBlob("application/javascript")}}function s(a){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(h.get("loadWorkerFromBlob")){var o=g(a),u=window.URL||window.webkitURL,d=u.createObjectURL(o);return new Worker(d)}return new Worker(a)}var l=function(a){a.postMessage||(a=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=a,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(){m.implement(this,x),this.$createWorkerFromOldConfig=function(a,o,u,d,w){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),h.get("packaged")||!e.toUrl)d=d||h.moduleUrl(o,"worker");else{var b=this.$normalizePath;d=d||b(e.toUrl("ace/worker/worker.js",null,"_"));var E={};a.forEach(function($){E[$]=b(e.toUrl($,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=s(d),w&&this.send("importScripts",w),this.$worker.postMessage({init:!0,tlns:E,module:o,classname:u}),this.$worker},this.onMessage=function(a){var o=a.data;switch(o.type){case"event":this._signal(o.name,{data:o.data});break;case"call":var u=this.callbacks[o.id];u&&(u(o.data),delete this.callbacks[o.id]);break;case"error":this.reportError(o.data);break;case"log":window.console&&console.log&&console.log.apply(console,o.data);break}},this.reportError=function(a){window.console&&console.error&&console.error(a)},this.$normalizePath=function(a){return y.qualifyURL(a)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(a){a.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(a,o){this.$worker.postMessage({command:a,args:o})},this.call=function(a,o,u){if(u){var d=this.callbackId++;this.callbacks[d]=u,o.push(d)}this.send(a,o)},this.emit=function(a,o){try{o.data&&o.data.err&&(o.data.err={message:o.data.err.message,stack:o.data.err.stack,code:o.data.err.code}),this.$worker&&this.$worker.postMessage({event:a,data:{data:o.data}})}catch(u){console.error(u.stack)}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener,!0)},this.changeListener=function(a){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),a.action=="insert"?this.deltaQueue.push(a.start,a.lines):this.deltaQueue.push(a.start,a.end)},this.$sendDeltaQueue=function(){var a=this.deltaQueue;a&&(this.deltaQueue=null,a.length>50&&a.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:a}))}}).call(l.prototype);var c=function(a,o,u){var d=null,w=!1,b=Object.create(x),E=[],$=new l({messageBuffer:E,terminate:function(){},postMessage:function(C){E.push(C),d&&(w?setTimeout(_):_())}});$.setEmitSync=function(C){w=C};var _=function(){var C=E.shift();C.command?d[C.command].apply(d,C.args):C.event&&b._signal(C.event,C.data)};return b.postMessage=function(C){$.onMessage({data:C})},b.callback=function(C,R){this.postMessage({type:"call",id:R,data:C})},b.emit=function(C,R){this.postMessage({type:"event",name:C,data:R})},h.loadModule(["worker",o],function(C){for(d=new C[u](b);E.length;)_()}),$};r.UIWorkerClient=c,r.WorkerClient=l,r.createWorker=s}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,r,v){var m=e("./range").Range,y=e("./lib/event_emitter").EventEmitter,x=e("./lib/oop"),h=function(){function g(s,l,c,a,o,u){var d=this;this.length=l,this.session=s,this.doc=s.getDocument(),this.mainClass=o,this.othersClass=u,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=a,this.$onCursorChange=function(){setTimeout(function(){d.onCursorChange()})},this.$pos=c;var w=s.getUndoManager().$undoStack||s.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=w.length,this.setup(),s.selection.on("changeCursor",this.$onCursorChange)}return g.prototype.setup=function(){var s=this,l=this.doc,c=this.session;this.selectionBefore=c.selection.toJSON(),c.selection.inMultiSelectMode&&c.selection.toSingleRange(),this.pos=l.createAnchor(this.$pos.row,this.$pos.column);var a=this.pos;a.$insertRight=!0,a.detach(),a.markerId=c.addMarker(new m(a.row,a.column,a.row,a.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(o){var u=l.createAnchor(o.row,o.column);u.$insertRight=!0,u.detach(),s.others.push(u)}),c.setUndoSelect(!1)},g.prototype.showOtherMarkers=function(){if(!this.othersActive){var s=this.session,l=this;this.othersActive=!0,this.others.forEach(function(c){c.markerId=s.addMarker(new m(c.row,c.column,c.row,c.column+l.length),l.othersClass,null,!1)})}},g.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var s=0;s<this.others.length;s++)this.session.removeMarker(this.others[s].markerId)}},g.prototype.onUpdate=function(s){if(this.$updating)return this.updateAnchors(s);var l=s;if(l.start.row===l.end.row&&l.start.row===this.pos.row){this.$updating=!0;var c=s.action==="insert"?l.end.column-l.start.column:l.start.column-l.end.column,a=l.start.column>=this.pos.column&&l.start.column<=this.pos.column+this.length+1,o=l.start.column-this.pos.column;if(this.updateAnchors(s),a&&(this.length+=c),a&&!this.session.$fromUndo){if(s.action==="insert")for(var u=this.others.length-1;u>=0;u--){var d=this.others[u],w={row:d.row,column:d.column+o};this.doc.insertMergedLines(w,s.lines)}else if(s.action==="remove")for(var u=this.others.length-1;u>=0;u--){var d=this.others[u],w={row:d.row,column:d.column+o};this.doc.remove(new m(w.row,w.column,w.row,w.column-c))}}this.$updating=!1,this.updateMarkers()}},g.prototype.updateAnchors=function(s){this.pos.onChange(s);for(var l=this.others.length;l--;)this.others[l].onChange(s);this.updateMarkers()},g.prototype.updateMarkers=function(){if(!this.$updating){var s=this,l=this.session,c=function(o,u){l.removeMarker(o.markerId),o.markerId=l.addMarker(new m(o.row,o.column,o.row,o.column+s.length),u,null,!1)};c(this.pos,this.mainClass);for(var a=this.others.length;a--;)c(this.others[a],this.othersClass)}},g.prototype.onCursorChange=function(s){if(!(this.$updating||!this.session)){var l=this.session.selection.getCursor();l.row===this.pos.row&&l.column>=this.pos.column&&l.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",s)):(this.hideOtherMarkers(),this._emit("cursorLeave",s))}},g.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},g.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var s=this.session.getUndoManager(),l=(s.$undoStack||s.$undostack).length-this.$undoStackDepth,c=0;c<l;c++)s.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},g}();x.implement(h.prototype,y),r.PlaceHolder=h}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,v){var m=e("../lib/event"),y=e("../lib/useragent");function x(g,s){return g.row==s.row&&g.column==s.column}function h(g){var s=g.domEvent,l=s.altKey,c=s.shiftKey,a=s.ctrlKey,o=g.getAccelKey(),u=g.getButton();if(a&&y.isMac&&(u=s.button),g.editor.inMultiSelectMode&&u==2){g.editor.textInput.onContextMenu(g.domEvent);return}if(!a&&!l&&!o){u===0&&g.editor.inMultiSelectMode&&g.editor.exitMultiSelectMode();return}if(u===0){var d=g.editor,w=d.selection,b=d.inMultiSelectMode,E=g.getDocumentPosition(),$=w.getCursor(),_=g.inSelection()||w.isEmpty()&&x(E,$),C=g.x,R=g.y,L=function(te){C=te.clientX,R=te.clientY},F=d.session,I=d.renderer.pixelToScreenCoordinates(C,R),H=I,P;if(d.$mouseHandler.$enableJumpToDef)a&&l||o&&l?P=c?"block":"add":l&&d.$blockSelectEnabled&&(P="block");else if(o&&!l){if(P="add",!b&&c)return}else l&&d.$blockSelectEnabled&&(P="block");if(P&&y.isMac&&s.ctrlKey&&d.$mouseHandler.cancelContextMenu(),P=="add"){if(!b&&_)return;if(!b){var O=w.toOrientedRange();d.addSelectionMarker(O)}var S=w.rangeList.rangeAtPoint(E);d.inVirtualSelectionMode=!0,c&&(S=null,O=w.ranges[0]||O,d.removeSelectionMarker(O)),d.once("mouseup",function(){var te=w.toOrientedRange();S&&te.isEmpty()&&x(S.cursor,te.cursor)?w.substractPoint(te.cursor):(c?w.substractPoint(O.cursor):O&&(d.removeSelectionMarker(O),w.addRange(O)),w.addRange(te)),d.inVirtualSelectionMode=!1})}else if(P=="block"){g.stop(),d.inVirtualSelectionMode=!0;var A,N=[],B=function(){var te=d.renderer.pixelToScreenCoordinates(C,R),he=F.screenToDocumentPosition(te.row,te.column,te.offsetX);x(H,te)&&x(he,w.lead)||(H=te,d.selection.moveToPosition(he),d.renderer.scrollCursorIntoView(),d.removeSelectionMarkers(N),N=w.rectangularRangeBlock(H,I),d.$mouseHandler.$clickSelection&&N.length==1&&N[0].isEmpty()&&(N[0]=d.$mouseHandler.$clickSelection.clone()),N.forEach(d.addSelectionMarker,d),d.updateSelectionMarkers())};b&&!o?w.toSingleRange():!b&&o&&(A=w.toOrientedRange(),d.addSelectionMarker(A)),c?I=F.documentToScreenPosition(w.lead):w.moveToPosition(E),H={row:-1,column:-1};var U=function(te){B(),clearInterval(Z),d.removeSelectionMarkers(N),N.length||(N=[w.toOrientedRange()]),A&&(d.removeSelectionMarker(A),w.toSingleRange(A));for(var he=0;he<N.length;he++)w.addRange(N[he]);d.inVirtualSelectionMode=!1,d.$mouseHandler.$clickSelection=null},K=B;m.capture(d.container,L,U);var Z=setInterval(function(){K()},20);return g.preventDefault()}}}r.onMouseDown=h}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,r,v){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(y){y.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(y){y.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(y){y.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(y){y.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(y){y.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(y){y.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(y){y.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(y){y.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(y){y.multiSelect.rangeCount>1?y.multiSelect.joinSelections():y.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(y){y.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(y){y.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(y){y.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(y){y.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(y){return y&&y.inMultiSelectMode}}];var m=e("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new m(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,v){var m=e("./range_list").RangeList,y=e("./range").Range,x=e("./selection").Selection,h=e("./mouse/multi_select_handler").onMouseDown,g=e("./lib/event"),s=e("./lib/lang"),l=e("./commands/multi_select_commands");r.commands=l.defaultCommands.concat(l.multiSelectCommands);var c=e("./search").Search,a=new c;function o($,_,C){return a.$options.wrap=!0,a.$options.needle=_,a.$options.backwards=C==-1,a.find($)}var u=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(u.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function($,_){if($){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add($),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),_||this.fromOrientedRange($);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}$.cursor||($.cursor=$.end);var R=this.rangeList.add($);return this.$onAddRange($),R.length&&this.$onRemoveRange(R),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),_||this.fromOrientedRange($)}},this.toSingleRange=function($){$=$||this.ranges[0];var _=this.rangeList.removeAll();_.length&&this.$onRemoveRange(_),$&&this.fromOrientedRange($)},this.substractPoint=function($){var _=this.rangeList.substractPoint($);if(_)return this.$onRemoveRange(_),_[0]},this.mergeOverlappingRanges=function(){var $=this.rangeList.merge();$.length&&this.$onRemoveRange($)},this.$onAddRange=function($){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift($),this._signal("addRange",{range:$})},this.$onRemoveRange=function($){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var _=this.rangeList.ranges.pop();$.push(_),this.rangeCount=0}for(var C=$.length;C--;){var R=this.ranges.indexOf($[C]);this.ranges.splice(R,1)}this._signal("removeRange",{ranges:$}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),_=_||this.ranges[0],_&&!_.isEqual(this.getRange())&&this.fromOrientedRange(_)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new m,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var $=this.ranges.length?this.ranges:[this.getRange()],_=[],C=0;C<$.length;C++){var R=$[C],L=R.start.row,F=R.end.row;if(L===F)_.push(R.clone());else{for(_.push(new y(L,R.start.column,L,this.session.getLine(L).length));++L<F;)_.push(this.getLineRange(L,!0));_.push(new y(F,0,F,R.end.column))}C==0&&!this.isBackwards()&&(_=_.reverse())}this.toSingleRange();for(var C=_.length;C--;)this.addRange(_[C])},this.joinSelections=function(){var $=this.rangeList.ranges,_=$[$.length-1],C=y.fromPoints($[0].start,_.end);this.toSingleRange(),this.setSelectionRange(C,_.cursor==_.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var $=this.rangeList.ranges,_=$[$.length-1],C=y.fromPoints($[0].start,_.end);this.toSingleRange(),this.setSelectionRange(C,_.cursor==_.start)}else{var R=this.session.documentToScreenPosition(this.cursor),L=this.session.documentToScreenPosition(this.anchor),F=this.rectangularRangeBlock(R,L);F.forEach(this.addRange,this)}},this.rectangularRangeBlock=function($,_,C){var R=[],L=$.column<_.column;if(L)var F=$.column,I=_.column,H=$.offsetX,P=_.offsetX;else var F=_.column,I=$.column,H=_.offsetX,P=$.offsetX;var O=$.row<_.row;if(O)var S=$.row,A=_.row;else var S=_.row,A=$.row;F<0&&(F=0),S<0&&(S=0),S==A&&(C=!0);for(var N,B=S;B<=A;B++){var U=y.fromPoints(this.session.screenToDocumentPosition(B,F,H),this.session.screenToDocumentPosition(B,I,P));if(U.isEmpty()){if(N&&w(U.end,N))break;N=U.end}U.cursor=L?U.start:U.end,R.push(U)}if(O&&R.reverse(),!C){for(var K=R.length-1;R[K].isEmpty()&&K>0;)K--;if(K>0)for(var Z=0;R[Z].isEmpty();)Z++;for(var te=K;te>=Z;te--)R[te].isEmpty()&&R.splice(te,1)}return R}}).call(x.prototype);var d=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function($){$.cursor||($.cursor=$.end);var _=this.getSelectionStyle();return $.marker=this.session.addMarker($,"ace_selection",_),this.session.$selectionMarkers.push($),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,$},this.removeSelectionMarker=function($){if($.marker){this.session.removeMarker($.marker);var _=this.session.$selectionMarkers.indexOf($);_!=-1&&this.session.$selectionMarkers.splice(_,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function($){for(var _=this.session.$selectionMarkers,C=$.length;C--;){var R=$[C];if(R.marker){this.session.removeMarker(R.marker);var L=_.indexOf(R);L!=-1&&_.splice(L,1)}}this.session.selectionMarkerCount=_.length},this.$onAddRange=function($){this.addSelectionMarker($.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function($){this.removeSelectionMarkers($.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function($){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(l.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function($){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(l.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function($){var _=$.command,C=$.editor;if(C.multiSelect){if(_.multiSelectAction)_.multiSelectAction=="forEach"?R=C.forEachSelection(_,$.args):_.multiSelectAction=="forEachLine"?R=C.forEachSelection(_,$.args,!0):_.multiSelectAction=="single"?(C.exitMultiSelectMode(),R=_.exec(C,$.args||{})):R=_.multiSelectAction(C,$.args||{});else{var R=_.exec(C,$.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return R}},this.forEachSelection=function($,_,C){if(!this.inVirtualSelectionMode){var R=C&&C.keepOrder,L=C==!0||C&&C.$byLines,F=this.session,I=this.selection,H=I.rangeList,P=(R?I:H).ranges,O;if(!P.length)return $.exec?$.exec(this,_||{}):$(this,_||{});var S=I._eventRegistry;I._eventRegistry={};var A=new x(F);this.inVirtualSelectionMode=!0;for(var N=P.length;N--;){if(L)for(;N>0&&P[N].start.row==P[N-1].end.row;)N--;A.fromOrientedRange(P[N]),A.index=N,this.selection=F.selection=A;var B=$.exec?$.exec(this,_||{}):$(this,_||{});!O&&B!==void 0&&(O=B),A.toOrientedRange(P[N])}A.detach(),this.selection=F.selection=I,this.inVirtualSelectionMode=!1,I._eventRegistry=S,I.mergeOverlappingRanges(),I.ranges[0]&&I.fromOrientedRange(I.ranges[0]);var U=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),U&&U.from==U.to&&this.renderer.animateScrolling(U.from),O}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var $="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var _=this.multiSelect.rangeList.ranges,C=[],R=0;R<_.length;R++)C.push(this.session.getTextRange(_[R]));var L=this.session.getDocument().getNewLineCharacter();$=C.join(L),$.length==(C.length-1)*L.length&&($="")}else this.selection.isEmpty()||($=this.session.getTextRange(this.getSelectionRange()));return $},this.$checkMultiselectChange=function($,_){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&_==this.multiSelect.anchor)return;var R=_==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;R.row!=_.row||this.session.$clipPositionToDocument(R.row,R.column).column!=_.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function($,_,C){if(_=_||{},_.needle=$||_.needle,_.needle==null){var R=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();_.needle=this.session.getTextRange(R)}this.$search.set(_);var L=this.$search.findAll(this.session);if(!L.length)return 0;var F=this.multiSelect;C||F.toSingleRange(L[0]);for(var I=L.length;I--;)F.addRange(L[I],!0);return R&&F.rangeList.rangeAtPoint(R.start)&&F.addRange(R,!0),L.length},this.selectMoreLines=function($,_){var C=this.selection.toOrientedRange(),R=C.cursor==C.end,L=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(L.column=this.selection.$desiredColumn);var F=this.session.screenToDocumentPosition(L.row+$,L.column);if(C.isEmpty())var H=F;else var I=this.session.documentToScreenPosition(R?C.end:C.start),H=this.session.screenToDocumentPosition(I.row+$,I.column);if(R){var P=y.fromPoints(F,H);P.cursor=P.start}else{var P=y.fromPoints(H,F);P.cursor=P.end}if(P.desiredColumn=L.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(_)var O=C.cursor;this.selection.addRange(P),O&&this.selection.substractPoint(O)},this.transposeSelections=function($){for(var _=this.session,C=_.multiSelect,R=C.ranges,L=R.length;L--;){var F=R[L];if(F.isEmpty()){var I=_.getWordRange(F.start.row,F.start.column);F.start.row=I.start.row,F.start.column=I.start.column,F.end.row=I.end.row,F.end.column=I.end.column}}C.mergeOverlappingRanges();for(var H=[],L=R.length;L--;){var F=R[L];H.unshift(_.getTextRange(F))}$<0?H.unshift(H.pop()):H.push(H.shift());for(var L=R.length;L--;){var F=R[L],P=F.clone();_.replace(F,H[L]),F.start.row=P.start.row,F.start.column=P.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function($,_,C){var R=this.session,L=R.multiSelect,F=L.toOrientedRange();if(!(F.isEmpty()&&(F=R.getWordRange(F.start.row,F.start.column),F.cursor=$==-1?F.start:F.end,this.multiSelect.addRange(F),C))){var I=R.getTextRange(F),H=o(R,I,$);H&&(H.cursor=$==-1?H.start:H.end,this.session.unfold(H),this.multiSelect.addRange(H),this.renderer.scrollCursorIntoView(null,.5)),_&&this.multiSelect.substractPoint(F.cursor)}},this.alignCursors=function(){var $=this.session,_=$.multiSelect,C=_.ranges,R=-1,L=C.filter(function(K){if(K.cursor.row==R)return!0;R=K.cursor.row});if(!C.length||L.length==C.length-1){var F=this.selection.getRange(),I=F.start.row,H=F.end.row,P=I==H;if(P){var O=this.session.getLength(),S;do S=this.session.getLine(H);while(/[=:]/.test(S)&&++H<O);do S=this.session.getLine(I);while(/[=:]/.test(S)&&--I>0);I<0&&(I=0),H>=O&&(H=O-1)}var A=this.session.removeFullLines(I,H);A=this.$reAlignText(A,P),this.session.insert({row:I,column:0},A.join(`
|
946
|
+
`)+`
|
947
|
+
`),P||(F.start.column=0,F.end.column=A[A.length-1].length),this.selection.setRange(F)}else{L.forEach(function(K){_.substractPoint(K.cursor)});var N=0,B=1/0,U=C.map(function(K){var Z=K.cursor,te=$.getLine(Z.row),he=te.substr(Z.column).search(/\S/g);return he==-1&&(he=0),Z.column>N&&(N=Z.column),he<B&&(B=he),he});C.forEach(function(K,Z){var te=K.cursor,he=N-te.column,ne=U[Z]-B;he>ne?$.insert(te,s.stringRepeat(" ",he-ne)):$.remove(new y(te.row,te.column,te.row,te.column-he+ne)),K.start.column=K.end.column=N,K.start.row=K.end.row=te.row,K.cursor=K.end}),_.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function($,_){var C=!0,R=!0,L,F,I;return $.map(function(A){var N=A.match(/(\s*)(.*?)(\s*)([=:].*)/);return N?L==null?(L=N[1].length,F=N[2].length,I=N[3].length,N):(L+F+I!=N[1].length+N[2].length+N[3].length&&(R=!1),L!=N[1].length&&(C=!1),L>N[1].length&&(L=N[1].length),F<N[2].length&&(F=N[2].length),I>N[3].length&&(I=N[3].length),N):[A]}).map(_?P:C?R?O:P:S);function H(A){return s.stringRepeat(" ",A)}function P(A){return A[2]?H(L)+A[2]+H(F-A[2].length+I)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function O(A){return A[2]?H(L+F-A[2].length)+A[2]+H(I)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}function S(A){return A[2]?H(L)+A[2]+H(I)+A[4].replace(/^([=:])\s+/,"$1 "):A[0]}}}).call(d.prototype);function w($,_){return $.row==_.row&&$.column==_.column}r.onSessionChange=function($){var _=$.session;_&&!_.multiSelect&&(_.$selectionMarkers=[],_.selection.$initRangeList(),_.multiSelect=_.selection),this.multiSelect=_&&_.multiSelect;var C=$.oldSession;C&&(C.multiSelect.off("addRange",this.$onAddRange),C.multiSelect.off("removeRange",this.$onRemoveRange),C.multiSelect.off("multiSelect",this.$onMultiSelect),C.multiSelect.off("singleSelect",this.$onSingleSelect),C.multiSelect.lead.off("change",this.$checkMultiselectChange),C.multiSelect.anchor.off("change",this.$checkMultiselectChange)),_&&(_.multiSelect.on("addRange",this.$onAddRange),_.multiSelect.on("removeRange",this.$onRemoveRange),_.multiSelect.on("multiSelect",this.$onMultiSelect),_.multiSelect.on("singleSelect",this.$onSingleSelect),_.multiSelect.lead.on("change",this.$checkMultiselectChange),_.multiSelect.anchor.on("change",this.$checkMultiselectChange)),_&&this.inMultiSelectMode!=_.selection.inMultiSelectMode&&(_.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function b($){$.$multiselectOnSessionChange||($.$onAddRange=$.$onAddRange.bind($),$.$onRemoveRange=$.$onRemoveRange.bind($),$.$onMultiSelect=$.$onMultiSelect.bind($),$.$onSingleSelect=$.$onSingleSelect.bind($),$.$multiselectOnSessionChange=r.onSessionChange.bind($),$.$checkMultiselectChange=$.$checkMultiselectChange.bind($),$.$multiselectOnSessionChange($),$.on("changeSession",$.$multiselectOnSessionChange),$.on("mousedown",h),$.commands.addCommands(l.defaultCommands),E($))}function E($){if(!$.textInput)return;var _=$.textInput.getElement(),C=!1;g.addListener(_,"keydown",function(L){var F=L.keyCode==18&&!(L.ctrlKey||L.shiftKey||L.metaKey);$.$blockSelectEnabled&&F?C||($.renderer.setMouseCursor("crosshair"),C=!0):C&&R()},$),g.addListener(_,"keyup",R,$),g.addListener(_,"blur",R,$);function R(L){C&&($.renderer.setMouseCursor(""),C=!1)}}r.MultiSelect=b,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function($){b(this),$?this.on("mousedown",h):this.off("mousedown",h)},value:!0},enableBlockSelect:{set:function($){this.$blockSelectEnabled=$},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,r,v){var m=e("../../range").Range,y=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(x,h,g){var s=x.getLine(g);return this.foldingStartMarker.test(s)?"start":h=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(s)?"end":""},this.getFoldWidgetRange=function(x,h,g){return null},this.indentationBlock=function(x,h,g){var s=/\S/,l=x.getLine(h),c=l.search(s);if(c!=-1){for(var a=g||l.length,o=x.getLength(),u=h,d=h;++h<o;){var w=x.getLine(h).search(s);if(w!=-1){if(w<=c){var b=x.getTokenAt(h,0);if(!b||b.type!=="string")break}d=h}}if(d>u){var E=x.getLine(d).length;return new m(u,a,d,E)}}},this.openingBracketBlock=function(x,h,g,s,l){var c={row:g,column:s+1},a=x.$findClosingBracket(h,c,l);if(a){var o=x.foldWidgets[a.row];return o==null&&(o=x.getFoldWidget(a.row)),o=="start"&&a.row>c.row&&(a.row--,a.column=x.getLine(a.row).length),m.fromPoints(c,a)}},this.closingBracketBlock=function(x,h,g,s,l){var c={row:g,column:s},a=x.$findOpeningBracket(h,c);if(a)return a.column++,c.column--,m.fromPoints(a,c)}}).call(y.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,r,v){var m=e("../lib/dom"),y=e("../range").Range,x=e("../config").nls;function h(s,l,c){for(var a=0,o=s.length-1;a<=o;){var u=a+o>>1,d=c(l,s[u]);if(d>0)a=u+1;else if(d<0)o=u-1;else return u}return-(a+1)}function g(s,l,c){var a=s.getAnnotations().sort(y.comparePoints);if(a.length){var o=h(a,{row:l,column:-1},y.comparePoints);o<0&&(o=-o-1),o>=a.length?o=c>0?0:a.length-1:o===0&&c<0&&(o=a.length-1);var u=a[o];if(!(!u||!c)){if(u.row===l){do u=a[o+=c];while(u&&u.row===l);if(!u)return a.slice()}var d=[];l=u.row;do d[c<0?"unshift":"push"](u),u=a[o+=c];while(u&&u.row==l);return d.length&&d}}}r.showErrorMarker=function(s,l){var c=s.session,a=s.getCursorPosition(),o=a.row,u=c.widgetManager.getWidgetsAtRow(o).filter(function(L){return L.type=="errorMarker"})[0];u?u.destroy():o-=l;var d=g(c,o,l),w;if(d){var b=d[0];a.column=(b.pos&&typeof b.column!="number"?b.pos.sc:b.column)||0,a.row=b.row,w=s.renderer.$gutterLayer.$annotations[a.row]}else{if(u)return;w={displayText:[x("error-marker.good-state","Looks good!")],className:"ace_ok"}}s.session.unfold(a.row),s.selection.moveToPosition(a);var E={row:a.row,fixedWidth:!0,coverGutter:!0,el:m.createElement("div"),type:"errorMarker"},$=E.el.appendChild(m.createElement("div")),_=E.el.appendChild(m.createElement("div"));_.className="error_widget_arrow "+w.className;var C=s.renderer.$cursorLayer.getPixelPosition(a).left;_.style.left=C+s.renderer.gutterWidth-5+"px",E.el.className="error_widget_wrapper",$.className="error_widget "+w.className,w.displayText.forEach(function(L,F){$.appendChild(m.createTextNode(L)),F<w.displayText.length-1&&$.appendChild(m.createElement("br"))}),$.appendChild(m.createElement("div"));var R=function(L,F,I){if(F===0&&(I==="esc"||I==="return"))return E.destroy(),{command:"null"}};E.destroy=function(){s.$mouseHandler.isMousePressed||(s.keyBinding.removeKeyboardHandler(R),c.widgetManager.removeLineWidget(E),s.off("changeSelection",E.destroy),s.off("changeSession",E.destroy),s.off("mouseup",E.destroy),s.off("change",E.destroy))},s.keyBinding.addKeyboardHandler(R),s.on("changeSelection",E.destroy),s.on("changeSession",E.destroy),s.on("mouseup",E.destroy),s.on("change",E.destroy),s.session.widgetManager.addLineWidget(E),E.el.onmousedown=s.focus.bind(s),s.renderer.scrollCursorIntoView(null,.5,{bottom:E.el.offsetHeight})},m.importCssString(`
|
948
|
+
.error_widget_wrapper {
|
949
|
+
background: inherit;
|
950
|
+
color: inherit;
|
951
|
+
border:none
|
952
|
+
}
|
953
|
+
.error_widget {
|
954
|
+
border-top: solid 2px;
|
955
|
+
border-bottom: solid 2px;
|
956
|
+
margin: 5px 0;
|
957
|
+
padding: 10px 40px;
|
958
|
+
white-space: pre-wrap;
|
959
|
+
}
|
960
|
+
.error_widget.ace_error, .error_widget_arrow.ace_error{
|
961
|
+
border-color: #ff5a5a
|
962
|
+
}
|
963
|
+
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
|
964
|
+
border-color: #F1D817
|
965
|
+
}
|
966
|
+
.error_widget.ace_info, .error_widget_arrow.ace_info{
|
967
|
+
border-color: #5a5a5a
|
968
|
+
}
|
969
|
+
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
|
970
|
+
border-color: #5aaa5a
|
971
|
+
}
|
972
|
+
.error_widget_arrow {
|
973
|
+
position: absolute;
|
974
|
+
border: solid 5px;
|
975
|
+
border-top-color: transparent!important;
|
976
|
+
border-right-color: transparent!important;
|
977
|
+
border-left-color: transparent!important;
|
978
|
+
top: -5px;
|
979
|
+
}
|
980
|
+
`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(e,r,v){e("./loader_build")(r);var m=e("./lib/dom"),y=e("./range").Range,x=e("./editor").Editor,h=e("./edit_session").EditSession,g=e("./undomanager").UndoManager,s=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(c,a){if(typeof c=="string"){var o=c;if(c=document.getElementById(o),!c)throw new Error("ace.edit can't find div #"+o)}if(c&&c.env&&c.env.editor instanceof x)return c.env.editor;var u="";if(c&&/input|textarea/i.test(c.tagName)){var d=c;u=d.value,c=m.createElement("pre"),d.parentNode.replaceChild(c,d)}else c&&(u=c.textContent,c.innerHTML="");var w=r.createEditSession(u),b=new x(new s(c),w,a),E={document:w,editor:b,onResize:b.resize.bind(b,null)};return d&&(E.textarea=d),b.on("destroy",function(){E.editor.container.env=null}),b.container.env=b.env=E,b},r.createEditSession=function(c,a){var o=new h(c,a);return o.setUndoManager(new g),o},r.Range=y,r.Editor=x,r.EditSession=h,r.UndoManager=g,r.VirtualRenderer=s;var l=r.config.version;r.version=l}),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 v in e)e.hasOwnProperty(v)&&(r.ace[v]=e[v]);r.ace.default=r.ace,n&&(n.exports=r.ace)})}()}(Mp)),Mp.exports}A0();var Rp={exports:{}},Ep;function S0(){return Ep||(Ep=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,v){var m=e("../lib/oop"),y=e("./text_highlight_rules").TextHighlightRules,x=r.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};r.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},r.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},r.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var h=r.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},g=r.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},s=r.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},l=r.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},c=r.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},a=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},o=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},u=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},d=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",b="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",E="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",$="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",_=this.$keywords=this.createKeywordMapper({keyword:b,"constant.language":E,"variable.language":$,"support.function":w,"invalid.deprecated":"debugger"},"identifier"),C=`\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})`,R={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(L,F,I){I.length&&(I=[]);var H=L[L.length-1];return I.unshift(H,F),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(L,F,I){I.length&&(I=[]);var H=L[L.length-1];return I.unshift(H,F),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(L,F,I){I.length&&(I=[]);var H=L[L.length-1];return I.unshift(H,F),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(L,F,I){I.length&&(I=[]);var H=L[L.length-1];return I.unshift(H,F),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(L,F,I){I.length&&(I=[]);var H=L[L.length-1];return I.unshift(H,F),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},u,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+C+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},c,a,x,h,o,g,s,l,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:_,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(L,F,I){var H=L[2]=="-"||L[2]=="~"?"indentedHeredoc":"heredoc",P=L.split(this.splitRegex);return I.push(H,P[3]),[{type:"constant",value:P[1]},{type:"string",value:P[2]},{type:"support.class",value:P[3]},{type:"string",value:P[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(L,F,I){return L===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(L,F,I){return L===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(L,F){return F[0]==="heredoc"||F[0]==="indentedHeredoc"?F[0]:L}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(L,F,I){return this.next="",L=="}"&&I.length>1&&I[1]!="start"&&(I.shift(),this.next=I.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(L,F,I){return I.length&&L===I[0]?(I.unshift(L,F),this.token):"string"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(L,F,I){return I.length&&L===R[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(L,F,I){return I.length&&L===I[0]?(I.unshift(L,F),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(L,F,I){return I.length&&L===R[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(L,F,I){return I.length&&L===I[0]?(I.unshift(L,F),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(L,F,I){return I.length&&L===R[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(L,F,I){return I.length&&L===I[0]?(I.unshift(L,F),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(L,F,I){return I.length&&L===R[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(L,F,I){return I.length&&L===I[0]?(I.unshift(L,F),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(L,F,I){return I.length&&L[0]===R[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","constant.language.escape")}},{include:"regex"},{defaultToken:"string.regexp"}],regex:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"constant.language.escape",regex:/\\[AGbBzZ]/},{token:"constant.language.escape",regex:/\\g<[a-zA-Z0-9]*>/},{token:["constant.language.escape","regexp.keyword","constant.language.escape"],regex:/(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/},{token:["constant.language.escape","invalid","constant.language.escape"],regex:/(\\p{\^?)([^/]*)(})/},{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:/[/][imxouesn]*/,next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"regexp.keyword",regex:/\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/},{token:"constant.language.escape",regex:/\[\^?/,push:"regex_character_class"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:/&?&?\[\^?/,push:"regex_character_class"},{token:"constant.language.escape",regex:"]",next:"pop"},{token:"constant.language.escape",regex:"-"},{defaultToken:"string.regexp.characterclass"}]},this.normalizeRules()};m.inherits(d,y),r.RubyHighlightRules=d}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,v){var m=e("../range").Range,y=function(){};(function(){this.checkOutdent=function(x,h){return/^\s+$/.test(x)?/^\s*\}/.test(h):!1},this.autoOutdent=function(x,h){var g=x.getLine(h),s=g.match(/^(\s*\})/);if(!s)return 0;var l=s[1].length,c=x.findMatchingBracket({row:h,column:l});if(!c||c.row==h)return 0;var a=this.$getIndent(x.getLine(c.row));x.replace(new m(h,0,h,l-1),a)},this.$getIndent=function(x){return x.match(/^\s*/)[0]}}).call(y.prototype),r.MatchingBraceOutdent=y}),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,v){var m=e("../../lib/oop"),y=e("./fold_mode").FoldMode,x=e("../../range").Range,h=e("../../token_iterator").TokenIterator,g=r.FoldMode=function(){};m.inherits(g,y),(function(){this.indentKeywords={class:1,def:1,module:1,do:1,unless:1,if:1,while:1,for:1,until:1,begin:1,else:0,elsif:0,rescue:0,ensure:0,when:0,end:-1,case:1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(s,l,c){var a=s.getLine(c),o=this.foldingStartMarker.test(a),u=this.foldingStopMarker.test(a);if(o&&!u){var d=a.match(this.foldingStartMarker);if(d[1]){if((d[1]=="if"||d[1]=="else"||d[1]=="while"||d[1]=="until"||d[1]=="unless")&&(d[1]=="else"&&/^\s*else\s*$/.test(a)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(a)===!1)||d[1]=="when"&&/\sthen\s/.test(a)===!0)return;if(s.getTokenAt(c,d.index+2).type==="keyword")return"start"}else if(!d[3]||s.getTokenAt(c,d.index+1).type==="comment.multiline")return"start"}if(l!="markbeginend"||!u||o&&u)return"";var d=a.match(this.foldingStopMarker);if(d[3]==="end"){if(s.getTokenAt(c,d.index+1).type==="keyword")return"end"}else if(!d[1]||s.getTokenAt(c,d.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(s,l,c){var a=s.doc.getLine(c),o=this.foldingStartMarker.exec(a);if(o)return o[1]||o[3]?this.rubyBlock(s,c,o.index+2):this.openingBracketBlock(s,"{",c,o.index);var o=this.foldingStopMarker.exec(a);if(o)return o[3]==="end"&&s.getTokenAt(c,o.index+1).type==="keyword"?this.rubyBlock(s,c,o.index+1):o[1]==="=end"&&s.getTokenAt(c,o.index+1).type==="comment.multiline"?this.rubyBlock(s,c,o.index+1):this.closingBracketBlock(s,"}",c,o.index+o[0].length)},this.rubyBlock=function(s,l,c,a){var o=new h(s,l,c),u=o.getCurrentToken();if(!(!u||u.type!="keyword"&&u.type!="comment.multiline")){var d=u.value,w=s.getLine(l);switch(u.value){case"if":case"unless":case"while":case"until":var b=new RegExp("^\\s*"+u.value);if(!b.test(w))return;var E=this.indentKeywords[d];break;case"when":if(/\sthen\s/.test(w))return;case"elsif":case"rescue":case"ensure":var E=1;break;case"else":var b=new RegExp("^\\s*"+u.value+"\\s*$");if(!b.test(w))return;var E=1;break;default:var E=this.indentKeywords[d]}var $=[d];if(E){var _=E===-1?s.getLine(l-1).length:s.getLine(l).length,C=l,R=[];if(R.push(o.getCurrentTokenRange()),o.step=E===-1?o.stepBackward:o.stepForward,u.type=="comment.multiline"){for(;u=o.step();)if(u.type==="comment.multiline"){if(E==1){if(_=6,u.value=="=end")break}else if(u.value=="=begin")break}}else for(;u=o.step();){var L=!1;if(u.type==="keyword"){var F=E*this.indentKeywords[u.value];switch(w=s.getLine(o.getCurrentTokenRow()),u.value){case"do":for(var I=o.$tokenIndex-1;I>=0;I--){var H=o.$rowTokens[I];if(H&&(H.value=="while"||H.value=="until"||H.value=="for")){F=0;break}}break;case"else":var b=new RegExp("^\\s*"+u.value+"\\s*$");(!b.test(w)||d=="case")&&(F=0,L=!0);break;case"if":case"unless":case"while":case"until":var b=new RegExp("^\\s*"+u.value);b.test(w)||(F=0,L=!0);break;case"when":(/\sthen\s/.test(w)||d=="case")&&(F=0,L=!0)}if(F>0)$.unshift(u.value);else if(F<=0&&L===!1){if($.shift(),!$.length&&((d=="while"||d=="until"||d=="for")&&u.value!="do"||u.value=="do"&&E==-1&&F!=0||u.value!="do"))break;F===0&&$.unshift(u.value)}}}if(!u)return null;if(a)return R.push(o.getCurrentTokenRange()),R;var l=o.getCurrentTokenRow();if(E===-1){if(u.type==="comment.multiline")var P=6;else var P=s.getLine(l).length;return new x(l,P,C-1,_)}return new x(C,_,l-1,s.getLine(l-1).length)}}}}).call(g.prototype)}),ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"],function(e,r,v){var m=e("../lib/oop"),y=e("./text").Mode,x=e("./ruby_highlight_rules").RubyHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,g=e("../range").Range,s=e("./folding/ruby").FoldMode,l=function(){this.HighlightRules=x,this.$outdent=new h,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new s,this.indentKeywords=this.foldingRules.indentKeywords};m.inherits(l,y),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(c,a,o){var u=this.$getIndent(a),d=this.getTokenizer().getLineTokens(a,c),w=d.tokens;if(w.length&&w[w.length-1].type=="comment")return u;if(c=="start"){var b=a.match(/^.*[\{\(\[]\s*$/),E=a.match(/^\s*(class|def|module)\s.*$/),$=a.match(/.*do(\s*|\s+\|.*\|\s*)$/),_=a.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(b||E||$||_)&&(u+=o)}return u},this.checkOutdent=function(c,a,o){return/^\s+(end|else|rescue|ensure)$/.test(a+o)||this.$outdent.checkOutdent(a,o)},this.autoOutdent=function(c,a,o){var u=a.getLine(o);if(/}/.test(u))return this.$outdent.autoOutdent(a,o);var d=this.$getIndent(u),w=a.getLine(o-1),b=this.$getIndent(w),E=a.getTabString();b.length<=d.length&&d.slice(-E.length)==E&&a.remove(new g(o,d.length-E.length,o,d.length))},this.getMatching=function(c,a,o){if(a==null){var u=c.selection.lead;o=u.column,a=u.row}var d=c.getTokenAt(a,o);if(d&&d.value in this.indentKeywords)return this.foldingRules.rubyBlock(c,a,o,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(l.prototype),r.Mode=l}),function(){ace.require(["ace/mode/ruby"],function(e){n&&(n.exports=e)})}()}(Rp)),Rp.exports}S0();var Lp={exports:{}},Op;function T0(){return Op||(Op=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,v){var m=e("../lib/oop"),y=e("./text_highlight_rules").TextHighlightRules,x=function(){var h="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await|nonlocal",g="True|False|None|NotImplemented|Ellipsis|__debug__",s="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",l=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":s,"variable.language":"self|cls","constant.language":g,keyword:h},"identifier"),c="[uU]?",a="[rR]",o="[fF]",u="(?:[rR][fF]|[fF][rR])",d="(?:(?:[1-9]\\d*)|(?:0))",w="(?:0[oO]?[0-7]+)",b="(?:0[xX][\\dA-Fa-f]+)",E="(?:0[bB][01]+)",$="(?:"+d+"|"+w+"|"+b+"|"+E+")",_="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",R="(?:\\d+)",L="(?:(?:"+R+"?"+C+")|(?:"+R+"\\.))",F="(?:(?:"+L+"|"+R+")"+_+")",I="(?:"+F+"|"+L+")",H=`\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})`;this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:c+'"{3}',next:"qqstring3"},{token:"string",regex:c+'"(?=.)',next:"qqstring"},{token:"string",regex:c+"'{3}",next:"qstring3"},{token:"string",regex:c+"'(?=.)",next:"qstring"},{token:"string",regex:a+'"{3}',next:"rawqqstring3"},{token:"string",regex:a+'"(?=.)',next:"rawqqstring"},{token:"string",regex:a+"'{3}",next:"rawqstring3"},{token:"string",regex:a+"'(?=.)",next:"rawqstring"},{token:"string",regex:o+'"{3}',next:"fqqstring3"},{token:"string",regex:o+'"(?=.)',next:"fqqstring"},{token:"string",regex:o+"'{3}",next:"fqstring3"},{token:"string",regex:o+"'(?=.)",next:"fqstring"},{token:"string",regex:u+'"{3}',next:"rfqqstring3"},{token:"string",regex:u+'"(?=.)',next:"rfqqstring"},{token:"string",regex:u+"'{3}",next:"rfqstring3"},{token:"string",regex:u+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:["keyword","text","entity.name.function"],regex:"(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:H},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:H},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],rawqqstring3:[{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],rawqstring3:[{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],rawqqstring:[{token:"string",regex:"\\\\$",next:"rawqqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],rawqstring:[{token:"string",regex:"\\\\$",next:"rawqstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],fqqstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:H},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:H},{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring3:[{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring3:[{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring:[{token:"string",regex:"\\\\$",next:"rfqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring:[{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstringParRules:[{token:"paren.lparen",regex:"[\\[\\(]"},{token:"paren.rparen",regex:"[\\]\\)]"},{token:"string",regex:"\\s+"},{token:"string",regex:"'[^']*'"},{token:"string",regex:'"[^"]*"'},{token:"function.support",regex:"(!s|!r|!a)"},{include:"constants"},{token:"paren.rparen",regex:"}",next:"pop"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"}],constants:[{token:"constant.numeric",regex:"(?:"+I+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:I},{token:"constant.numeric",regex:$+"[lL]\\b"},{token:"constant.numeric",regex:$+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:l,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};m.inherits(x,y),r.PythonHighlightRules=x}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,v){var m=e("../../lib/oop"),y=e("./fold_mode").FoldMode,x=r.FoldMode=function(h){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+h+")(?:\\s*)(?:#.*)?$")};m.inherits(x,y),(function(){this.getFoldWidgetRange=function(h,g,s){var l=h.getLine(s),c=l.match(this.foldingStartMarker);if(c)return c[1]?this.openingBracketBlock(h,c[1],s,c.index):c[2]?this.indentationBlock(h,s,c.index+c[2].length):this.indentationBlock(h,s)}}).call(x.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,v){var m=e("../lib/oop"),y=e("./text").Mode,x=e("./python_highlight_rules").PythonHighlightRules,h=e("./folding/pythonic").FoldMode,g=e("../range").Range,s=function(){this.HighlightRules=x,this.foldingRules=new h("\\:"),this.$behaviour=this.$defaultBehaviour};m.inherits(s,y),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(c,a,o){var u=this.$getIndent(a),d=this.getTokenizer().getLineTokens(a,c),w=d.tokens;if(w.length&&w[w.length-1].type=="comment")return u;if(c=="start"){var b=a.match(/^.*[\{\(\[:]\s*$/);b&&(u+=o)}return u};var l={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(c,a,o){if(o!==`\r
|
981
|
+
`&&o!=="\r"&&o!==`
|
982
|
+
`)return!1;var u=this.getTokenizer().getLineTokens(a.trim(),c).tokens;if(!u)return!1;do var d=u.pop();while(d&&(d.type=="comment"||d.type=="text"&&d.value.match(/^\s+$/)));return d?d.type=="keyword"&&l[d.value]:!1},this.autoOutdent=function(c,a,o){o+=1;var u=this.$getIndent(a.getLine(o)),d=a.getTabString();u.slice(-d.length)==d&&a.remove(new g(o,u.length-d.length,o,u.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(s.prototype),r.Mode=s}),function(){ace.require(["ace/mode/python"],function(e){n&&(n.exports=e)})}()}(Lp)),Lp.exports}T0();var Np={exports:{}},Dp;function $0(){return Dp||(Dp=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,v){var m=e("../lib/oop"),y=e("./text_highlight_rules").TextHighlightRules,x=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"}]}};m.inherits(x,y),r.JsonHighlightRules=x}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,v){var m=e("../range").Range,y=function(){};(function(){this.checkOutdent=function(x,h){return/^\s+$/.test(x)?/^\s*\}/.test(h):!1},this.autoOutdent=function(x,h){var g=x.getLine(h),s=g.match(/^(\s*\})/);if(!s)return 0;var l=s[1].length,c=x.findMatchingBracket({row:h,column:l});if(!c||c.row==h)return 0;var a=this.$getIndent(x.getLine(c.row));x.replace(new m(h,0,h,l-1),a)},this.$getIndent=function(x){return x.match(/^\s*/)[0]}}).call(y.prototype),r.MatchingBraceOutdent=y}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,v){var m=e("../../lib/oop"),y=e("../../range").Range,x=e("./fold_mode").FoldMode,h=r.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end)))};m.inherits(h,x),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(g,s,l){var c=g.getLine(l);if(this.singleLineBlockCommentRe.test(c)&&!this.startRegionRe.test(c)&&!this.tripleStarBlockCommentRe.test(c))return"";var a=this._getFoldWidgetBase(g,s,l);return!a&&this.startRegionRe.test(c)?"start":a},this.getFoldWidgetRange=function(g,s,l,c){var a=g.getLine(l);if(this.startRegionRe.test(a))return this.getCommentRegionBlock(g,a,l);var o=a.match(this.foldingStartMarker);if(o){var u=o.index;if(o[1])return this.openingBracketBlock(g,o[1],l,u);var d=g.getCommentFoldRange(l,u+o[0].length,1);return d&&!d.isMultiLine()&&(c?d=this.getSectionRange(g,l):s!="all"&&(d=null)),d}if(s!=="markbegin"){var o=a.match(this.foldingStopMarker);if(o){var u=o.index+o[0].length;return o[1]?this.closingBracketBlock(g,o[1],l,u):g.getCommentFoldRange(l,u,-1)}}},this.getSectionRange=function(g,s){var l=g.getLine(s),c=l.search(/\S/),a=s,o=l.length;s+=1;for(var u=s,d=g.getLength();++s<d;){l=g.getLine(s);var w=l.search(/\S/);if(w!==-1){if(c>w)break;var b=this.getFoldWidgetRange(g,"all",s);if(b){if(b.start.row<=a)break;if(b.isMultiLine())s=b.end.row;else if(c==w)break}u=s}}return new y(a,o,u,g.getLine(u).length)},this.getCommentRegionBlock=function(g,s,l){for(var c=s.search(/\s*$/),a=g.getLength(),o=l,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,d=1;++l<a;){s=g.getLine(l);var w=u.exec(s);if(w&&(w[1]?d--:d++,!d))break}var b=l;if(b>o)return new y(o,c,b,s.length)}}).call(h.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(e,r,v){var m=e("../lib/oop"),y=e("./text").Mode,x=e("./json_highlight_rules").JsonHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,g=e("./folding/cstyle").FoldMode,s=e("../worker/worker_client").WorkerClient,l=function(){this.HighlightRules=x,this.$outdent=new h,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new g};m.inherits(l,y),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(c,a,o){var u=this.$getIndent(a);if(c=="start"){var d=a.match(/^.*[\{\(\[]\s*$/);d&&(u+=o)}return u},this.checkOutdent=function(c,a,o){return this.$outdent.checkOutdent(a,o)},this.autoOutdent=function(c,a,o){this.$outdent.autoOutdent(a,o)},this.createWorker=function(c){var a=new s(["ace"],"ace/mode/json_worker","JsonWorker");return a.attachToDocument(c.getDocument()),a.on("annotate",function(o){c.setAnnotations(o.data)}),a.on("terminate",function(){c.clearAnnotations()}),a},this.$id="ace/mode/json"}).call(l.prototype),r.Mode=l}),function(){ace.require(["ace/mode/json"],function(e){n&&(n.exports=e)})}()}(Np)),Np.exports}$0();var Fp={exports:{}},Pp;function M0(){return Pp||(Pp=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,v){var m=e("../lib/oop");e("../lib/lang");var y=e("./text_highlight_rules").TextHighlightRules,x=r.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",h=r.supportFunction="rgb|rgba|url|attr|counter|counters",g=r.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",s=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",l=r.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",a=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",o=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",u=function(){var d=this.createKeywordMapper({"support.function":h,"support.constant":g,"support.type":x,"support.constant.color":s,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:a},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:o},{include:"url"},{token:d,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()};m.inherits(u,y),r.CssHighlightRules=u}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,v){var m=e("../lib/oop"),y=e("./text_highlight_rules").TextHighlightRules,x=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|$)"},x.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};m.inherits(x,y),x.getTagRule=function(h){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},x.getStartRule=function(h){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:h}},x.getEndRule=function(h){return{token:"comment.doc",regex:"\\*\\/",next:h}},r.JsDocCommentHighlightRules=x}),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,v){function m(){var c=s.replace("\\d","\\d\\-"),a={onMatch:function(u,d,w){var b=u.charAt(1)=="/"?2:1;return b==1?(d!=this.nextState?w.unshift(this.next,this.nextState,0):w.unshift(this.next),w[2]++):b==2&&d==this.nextState&&(w[1]--,(!w[1]||w[1]<0)&&(w.shift(),w.shift())),[{type:"meta.tag.punctuation."+(b==1?"":"end-")+"tag-open.xml",value:u.slice(0,b)},{type:"meta.tag.tag-name.xml",value:u.substr(b)}]},regex:"</?(?:"+c+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(a);var o={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[o,a,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(u,d,w){return d==w[0]&&w.shift(),u.length==2&&(w[0]==this.nextState&&w[1]--,(!w[1]||w[1]<0)&&w.splice(0,2)),this.next=w[0]||"start",[{type:this.token,value:u}]},nextState:"jsx"},o,y("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:c},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},a],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function y(c){return[{token:"comment",regex:/\/\*/,next:[h.getTagRule(),{token:"comment",regex:"\\*\\/",next:c||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[h.getTagRule(),{token:"comment",regex:"$|^",next:c||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var x=e("../lib/oop"),h=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,g=e("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*",l=function(c){var a={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},o=this.createKeywordMapper(a,"identifier"),u="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",d="\\\\(?: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*)(\\*?)",b={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(a).join("|")+"\\b)"+s+")(\\s*)(\\()"};this.$rules={no_regex:[h.getStartRule("doc-start"),y("no_regex"),b,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(=)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+s+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+s+")(\\s*)(:)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+u+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:o,regex:s},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:s},{regex:"",token:"empty",next:"no_regex"}],start:[h.getStartRule("doc-start"),y("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[y("function_arguments"),{token:"variable.parameter",regex:s},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:d},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:d},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!c||!c.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(E,$,_){if(this.next=E=="{"?this.nextState:"",E=="{"&&_.length)_.unshift("start",$);else if(E=="}"&&_.length&&(_.shift(),this.next=_.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return E=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:d},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+s+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!c||c.jsx!=0)&&m.call(this)),this.embedRules(h,"doc-",[h.getEndRule("no_regex")]),this.normalizeRules()};x.inherits(l,g),r.JavaScriptHighlightRules=l}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,v){var m=e("../lib/oop"),y=e("./text_highlight_rules").TextHighlightRules,x=function(h){var g="[_:a-zA-ZÀ-][-_:.a-zA-Z0-9À-]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+g+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:g},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+g+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+g+":)?"+g+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:g},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===x&&this.normalizeRules()};(function(){this.embedTagRules=function(h,g,s){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+s+".tag-name.xml"],regex:"(<)("+s+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:g+"start"}]}),this.$rules[s+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(l,c,a){return a.splice(0),this.token}}],this.embedRules(h,g,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+s+".tag-name.xml"],regex:"(</)("+s+"(?=\\s|>|$))",next:s+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(y.prototype),m.inherits(x,y),r.XmlHighlightRules=x}),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,v){var m=e("../lib/oop"),y=e("../lib/lang"),x=e("./css_highlight_rules").CssHighlightRules,h=e("./javascript_highlight_rules").JavaScriptHighlightRules,g=e("./xml_highlight_rules").XmlHighlightRules,s=y.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"}),l=function(){g.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(c,a){var o=s[a];return["meta.tag.punctuation."+(c=="<"?"":"end-")+"tag-open.xml","meta.tag"+(o?"."+o:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(x,"css-","style"),this.embedTagRules(new h({jsx:!1}).getRules(),"js-","script"),this.constructor===l&&this.normalizeRules()};m.inherits(l,g),r.HtmlHighlightRules=l}),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,v){var m=e("../config").$modes,y=e("../lib/oop"),x=e("../lib/lang"),h=e("./text_highlight_rules").TextHighlightRules,g=e("./html_highlight_rules").HtmlHighlightRules,s=function(c){return"(?:[^"+x.escapeRegExp(c)+"\\\\]|\\\\.)*"},l=function(){g.call(this);var c={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(o,u,d,w){var b=o.match(/^(\s*)([`~]+)(.*)/),E=/[\w-]+|$/.exec(b[3])[0];return m[E]||(E=""),d.unshift("githubblock",[],[b[1],b[2],E],u),this.token},next:"githubblock"},a=[{token:"support.function",regex:".*",onMatch:function(o,u,d,w){var b=d[1],E=d[2][0],$=d[2][1],_=d[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(o);if(C&&C[1].length<E.length+3&&C[2].length>=$.length&&C[2][0]==$[0])return d.splice(0,3),this.next=d.shift(),this.token;if(this.next="",_&&m[_]){var R=m[_].getTokenizer().getLineTokens(o,b.slice(0));return d[1]=R.state,R.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(o){return"markup.heading."+o.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},c,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+s("]")+")(\\]\\s*\\[)("+s("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+s("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+s('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},c,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:a}),this.normalizeRules()};y.inherits(l,h),r.MarkdownHighlightRules=l}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,r,v){var m=e("../../lib/oop"),y=e("./fold_mode").FoldMode,x=e("../../range").Range,h=r.FoldMode=function(){};m.inherits(h,y),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(g,s,l){var c=g.getLine(l);return this.foldingStartMarker.test(c)?c[0]=="`"&&g.bgTokenizer.getState(l)=="start"?"end":"start":""},this.getFoldWidgetRange=function(g,s,l){function c(L){return E=g.getTokens(L)[0],E&&E.type.lastIndexOf($,0)===0}function a(){var L=E.value[0];return L=="="?6:L=="-"?5:7-E.value.search(/[^#]|$/)}var o=g.getLine(l),u=o.length,d=g.getLength(),w=l,b=l;if(o.match(this.foldingStartMarker)){if(o[0]=="`"){if(g.bgTokenizer.getState(l)!=="start"){for(;++l<d&&(o=g.getLine(l),!(o[0]=="`"&o.substring(0,3)=="```")););return new x(w,u,l,0)}for(;l-- >0&&(o=g.getLine(l),!(o[0]=="`"&o.substring(0,3)=="```")););return new x(l,o.length,w,0)}var E,$="markup.heading";if(c(l)){for(var _=a();++l<d;)if(c(l)){var C=a();if(C>=_)break}if(b=l-(!E||["=","-"].indexOf(E.value[0])==-1?1:2),b>w)for(;b>w&&/^\s*$/.test(g.getLine(b));)b--;if(b>w){var R=g.getLine(b).length;return new x(w,u,b,R)}}}}}).call(h.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,v){var m=e("../range").Range,y=function(){};(function(){this.checkOutdent=function(x,h){return/^\s+$/.test(x)?/^\s*\}/.test(h):!1},this.autoOutdent=function(x,h){var g=x.getLine(h),s=g.match(/^(\s*\})/);if(!s)return 0;var l=s[1].length,c=x.findMatchingBracket({row:h,column:l});if(!c||c.row==h)return 0;var a=this.$getIndent(x.getLine(c.row));x.replace(new m(h,0,h,l-1),a)},this.$getIndent=function(x){return x.match(/^\s*/)[0]}}).call(y.prototype),r.MatchingBraceOutdent=y}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,r,v){function m(s,l){return s&&s.type.lastIndexOf(l+".xml")>-1}var y=e("../../lib/oop"),x=e("../behaviour").Behaviour,h=e("../../token_iterator").TokenIterator,g=function(){this.add("string_dquotes","insertion",function(s,l,c,a,o){if(o=='"'||o=="'"){var u=o,d=a.doc.getTextRange(c.getSelectionRange());if(d!==""&&d!=="'"&&d!='"'&&c.getWrapBehavioursEnabled())return{text:u+d+u,selection:!1};var w=c.getCursorPosition(),b=a.doc.getLine(w.row),E=b.substring(w.column,w.column+1),$=new h(a,w.row,w.column),_=$.getCurrentToken();if(E==u&&(m(_,"attribute-value")||m(_,"string")))return{text:"",selection:[1,1]};if(_||(_=$.stepBackward()),!_)return;for(;m(_,"tag-whitespace")||m(_,"whitespace");)_=$.stepBackward();var C=!E||E.match(/\s/);if(m(_,"attribute-equals")&&(C||E==">")||m(_,"decl-attribute-equals")&&(C||E=="?"))return{text:u+u,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(s,l,c,a,o){var u=a.doc.getTextRange(o);if(!o.isMultiLine()&&(u=='"'||u=="'")){var d=a.doc.getLine(o.start.row),w=d.substring(o.start.column+1,o.start.column+2);if(w==u)return o.end.column++,o}}),this.add("autoclosing","insertion",function(s,l,c,a,o){if(o==">"){var u=c.getSelectionRange().start,d=new h(a,u.row,u.column),w=d.getCurrentToken()||d.stepBackward();if(!w||!(m(w,"tag-name")||m(w,"tag-whitespace")||m(w,"attribute-name")||m(w,"attribute-equals")||m(w,"attribute-value"))||m(w,"reference.attribute-value"))return;if(m(w,"attribute-value")){var b=d.getCurrentTokenColumn()+w.value.length;if(u.column<b)return;if(u.column==b){var E=d.stepForward();if(E&&m(E,"attribute-value"))return;d.stepBackward()}}if(/^\s*>/.test(a.getLine(u.row).slice(u.column)))return;for(;!m(w,"tag-name");)if(w=d.stepBackward(),w.value=="<"){w=d.stepForward();break}var $=d.getCurrentTokenRow(),_=d.getCurrentTokenColumn();if(m(d.stepBackward(),"end-tag-open"))return;var C=w.value;return $==u.row&&(C=C.substring(0,u.column-_)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(s,l,c,a,o){if(o==`
|
983
|
+
`){var u=c.getCursorPosition(),d=a.getLine(u.row),w=new h(a,u.row,u.column),b=w.getCurrentToken();if(m(b,"")&&b.type.indexOf("tag-close")!==-1){if(b.value=="/>")return;for(;b&&b.type.indexOf("tag-name")===-1;)b=w.stepBackward();if(!b)return;var E=b.value,$=w.getCurrentTokenRow();if(b=w.stepBackward(),!b||b.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[E]||!this.voidElements){var _=a.getTokenAt(u.row,u.column+1),d=a.getLine($),C=this.$getIndent(d),R=C+a.getTabString();return _&&_.value==="</"?{text:`
|
984
|
+
`+R+`
|
985
|
+
`+C,selection:[1,R.length,1,R.length]}:{text:`
|
986
|
+
`+R}}}}})};y.inherits(g,x),r.XmlBehaviour=g}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(e,r,v){var m=e("../../lib/oop"),y=e("../../token_iterator").TokenIterator,x=e("../behaviour/cstyle").CstyleBehaviour,h=e("../behaviour/xml").XmlBehaviour,g=function(){var s=new h({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(s),this.inherit(x),this.add("autoclosing-fragment","insertion",function(l,c,a,o,u){if(u==">"){var d=a.getSelectionRange().start,w=new y(o,d.row,d.column),b=w.getCurrentToken()||w.stepBackward();if(!b)return;if(b.value=="<")return{text:"></>",selection:[1,1]}}})};m.inherits(g,x),r.JavaScriptBehaviour=g}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,v){function m(l,c){return l&&l.type&&l.type.lastIndexOf(c+".xml")>-1}var y=e("../../lib/oop"),x=e("../../range").Range,h=e("./fold_mode").FoldMode,g=r.FoldMode=function(l,c){h.call(this),this.voidElements=l||{},this.optionalEndTags=y.mixin({},this.voidElements),c&&y.mixin(this.optionalEndTags,c)};y.inherits(g,h);var s=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(l,c,a){var o=this._getFirstTagInLine(l,a);return o?o.closing||!o.tagName&&o.selfClosing?c==="markbeginend"?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())||this._findEndTagInLine(l,a,o.tagName,o.end.column)?"":"start":this.getCommentFoldWidget(l,a)},this.getCommentFoldWidget=function(l,c){return/comment/.test(l.getState(c))&&/<!-/.test(l.getLine(c))?"start":""},this._getFirstTagInLine=function(l,c){for(var a=l.getTokens(c),o=new s,u=0;u<a.length;u++){var d=a[u];if(m(d,"tag-open")){if(o.end.column=o.start.column+d.value.length,o.closing=m(d,"end-tag-open"),d=a[++u],!d)return null;if(o.tagName=d.value,d.value===""){if(d=a[++u],!d)return null;o.tagName=d.value}for(o.end.column+=d.value.length,u++;u<a.length;u++)if(d=a[u],o.end.column+=d.value.length,m(d,"tag-close")){o.selfClosing=d.value=="/>";break}return o}if(m(d,"tag-close"))return o.selfClosing=d.value=="/>",o;o.start.column+=d.value.length}return null},this._findEndTagInLine=function(l,c,a,o){for(var u=l.getTokens(c),d=0,w=0;w<u.length;w++){var b=u[w];if(d+=b.value.length,!(d<o-1)&&m(b,"end-tag-open")&&(b=u[w+1],m(b,"tag-name")&&b.value===""&&(b=u[w+2]),b&&b.value==a))return!0}return!1},this.getFoldWidgetRange=function(l,c,a){var o=this._getFirstTagInLine(l,a);if(!o)return this.getCommentFoldWidget(l,a)&&l.getCommentFoldRange(a,l.getLine(a).length);var u=l.getMatchingTags({row:a,column:0});if(u)return new x(u.openTag.end.row,u.openTag.end.column,u.closeTag.start.row,u.closeTag.start.column)}}).call(g.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,v){var m=e("../../lib/oop"),y=e("../../range").Range,x=e("./fold_mode").FoldMode,h=r.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end)))};m.inherits(h,x),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(g,s,l){var c=g.getLine(l);if(this.singleLineBlockCommentRe.test(c)&&!this.startRegionRe.test(c)&&!this.tripleStarBlockCommentRe.test(c))return"";var a=this._getFoldWidgetBase(g,s,l);return!a&&this.startRegionRe.test(c)?"start":a},this.getFoldWidgetRange=function(g,s,l,c){var a=g.getLine(l);if(this.startRegionRe.test(a))return this.getCommentRegionBlock(g,a,l);var o=a.match(this.foldingStartMarker);if(o){var u=o.index;if(o[1])return this.openingBracketBlock(g,o[1],l,u);var d=g.getCommentFoldRange(l,u+o[0].length,1);return d&&!d.isMultiLine()&&(c?d=this.getSectionRange(g,l):s!="all"&&(d=null)),d}if(s!=="markbegin"){var o=a.match(this.foldingStopMarker);if(o){var u=o.index+o[0].length;return o[1]?this.closingBracketBlock(g,o[1],l,u):g.getCommentFoldRange(l,u,-1)}}},this.getSectionRange=function(g,s){var l=g.getLine(s),c=l.search(/\S/),a=s,o=l.length;s+=1;for(var u=s,d=g.getLength();++s<d;){l=g.getLine(s);var w=l.search(/\S/);if(w!==-1){if(c>w)break;var b=this.getFoldWidgetRange(g,"all",s);if(b){if(b.start.row<=a)break;if(b.isMultiLine())s=b.end.row;else if(c==w)break}u=s}}return new y(a,o,u,g.getLine(u).length)},this.getCommentRegionBlock=function(g,s,l){for(var c=s.search(/\s*$/),a=g.getLength(),o=l,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,d=1;++l<a;){s=g.getLine(l);var w=u.exec(s);if(w&&(w[1]?d--:d++,!d))break}var b=l;if(b>o)return new y(o,c,b,s.length)}}).call(h.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,r,v){var m=e("../../lib/oop"),y=e("./xml").FoldMode,x=e("./cstyle").FoldMode,h=r.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end))),this.xmlFoldMode=new y};m.inherits(h,x),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(g,s,l){var c=this.getFoldWidgetBase(g,s,l);return c||this.xmlFoldMode.getFoldWidget(g,s,l)},this.getFoldWidgetRange=function(g,s,l,c){var a=this.getFoldWidgetRangeBase(g,s,l,c);return a||this.xmlFoldMode.getFoldWidgetRange(g,s,l)}}).call(h.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,r,v){var m=e("../lib/oop"),y=e("./text").Mode,x=e("./javascript_highlight_rules").JavaScriptHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,g=e("../worker/worker_client").WorkerClient,s=e("./behaviour/javascript").JavaScriptBehaviour,l=e("./folding/javascript").FoldMode,c=function(){this.HighlightRules=x,this.$outdent=new h,this.$behaviour=new s,this.foldingRules=new l};m.inherits(c,y),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(a,o,u){var d=this.$getIndent(o),w=this.getTokenizer().getLineTokens(o,a),b=w.tokens,E=w.state;if(b.length&&b[b.length-1].type=="comment")return d;if(a=="start"||a=="no_regex"){var $=o.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);$&&(d+=u)}else if(a=="doc-start"&&(E=="start"||E=="no_regex"))return"";return d},this.checkOutdent=function(a,o,u){return this.$outdent.checkOutdent(o,u)},this.autoOutdent=function(a,o,u){this.$outdent.autoOutdent(o,u)},this.createWorker=function(a){var o=new g(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return o.attachToDocument(a.getDocument()),o.on("annotate",function(u){a.setAnnotations(u.data)}),o.on("terminate",function(){a.clearAnnotations()}),o},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,r,v){var m={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}},y=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var x=document.createElement("c").style;for(var h in x)if(typeof x[h]=="string"){var g=h.replace(/[A-Z]/g,function(s){return"-"+s.toLowerCase()});m.hasOwnProperty(g)||(m[g]=1)}}this.completionsDefined=!0},this.getCompletions=function(x,h,g,s){if(this.completionsDefined||this.defineCompletions(),x==="ruleset"||h.$mode.$id=="ace/mode/scss"){var l=h.getLine(g.row).substr(0,g.column),c=/\([^)]*$/.test(l);return c&&(l=l.substr(l.lastIndexOf("(")+1)),/:[^;]+$/.test(l)?this.getPropertyValueCompletions(x,h,g,s):this.getPropertyCompletions(x,h,g,s,c)}return[]},this.getPropertyCompletions=function(x,h,g,s,l){l=l||!1;var c=Object.keys(m);return c.map(function(a){return{caption:a,snippet:a+": $0"+(l?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(x,h,g,s){var l=h.getLine(g.row).substr(0,g.column),c=(/([\w\-]+):[^:]*$/.exec(l)||{})[1];if(!c)return[];var a=[];return c in m&&typeof m[c]=="object"&&(a=Object.keys(m[c])),a.map(function(o){return{caption:o,snippet:o,meta:"property value",score:1e6}})}}).call(y.prototype),r.CssCompletions=y}),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,v){var m=e("../../lib/oop");e("../behaviour").Behaviour;var y=e("./cstyle").CstyleBehaviour,x=e("../../token_iterator").TokenIterator,h=function(){this.inherit(y),this.add("colon","insertion",function(g,s,l,c,a){if(a===":"&&l.selection.isEmpty()){var o=l.getCursorPosition(),u=new x(c,o.row,o.column),d=u.getCurrentToken();if(d&&d.value.match(/\s+/)&&(d=u.stepBackward()),d&&d.type==="support.type"){var w=c.doc.getLine(o.row),b=w.substring(o.column,o.column+1);if(b===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(w.substring(o.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(g,s,l,c,a){var o=c.doc.getTextRange(a);if(!a.isMultiLine()&&o===":"){var u=l.getCursorPosition(),d=new x(c,u.row,u.column),w=d.getCurrentToken();if(w&&w.value.match(/\s+/)&&(w=d.stepBackward()),w&&w.type==="support.type"){var b=c.doc.getLine(a.start.row),E=b.substring(a.end.column,a.end.column+1);if(E===";")return a.end.column++,a}}}),this.add("semicolon","insertion",function(g,s,l,c,a){if(a===";"&&l.selection.isEmpty()){var o=l.getCursorPosition(),u=c.doc.getLine(o.row),d=u.substring(o.column,o.column+1);if(d===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(g,s,l,c,a){if(a==="!"&&l.selection.isEmpty()){var o=l.getCursorPosition(),u=c.doc.getLine(o.row);if(/^\s*(;|}|$)/.test(u.substring(o.column)))return{text:"!important",selection:[10,10]}}})};m.inherits(h,y),r.CssBehaviour=h}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,r,v){var m=e("../lib/oop"),y=e("./text").Mode,x=e("./css_highlight_rules").CssHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,g=e("../worker/worker_client").WorkerClient,s=e("./css_completions").CssCompletions,l=e("./behaviour/css").CssBehaviour,c=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=x,this.$outdent=new h,this.$behaviour=new l,this.$completer=new s,this.foldingRules=new c};m.inherits(a,y),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(o,u,d){var w=this.$getIndent(u),b=this.getTokenizer().getLineTokens(u,o).tokens;if(b.length&&b[b.length-1].type=="comment")return w;var E=u.match(/^.*\{\s*$/);return E&&(w+=d),w},this.checkOutdent=function(o,u,d){return this.$outdent.checkOutdent(u,d)},this.autoOutdent=function(o,u,d){this.$outdent.autoOutdent(u,d)},this.getCompletions=function(o,u,d,w){return this.$completer.getCompletions(o,u,d,w)},this.createWorker=function(o){var u=new g(["ace"],"ace/mode/css_worker","Worker");return u.attachToDocument(o.getDocument()),u.on("annotate",function(d){o.setAnnotations(d.data)}),u.on("terminate",function(){o.clearAnnotations()}),u},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(a.prototype),r.Mode=a}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,v){var m=e("../../lib/oop"),y=e("./fold_mode").FoldMode,x=r.FoldMode=function(h,g){this.defaultMode=h,this.subModes=g};m.inherits(x,y),(function(){this.$getMode=function(h){typeof h!="string"&&(h=h[0]);for(var g in this.subModes)if(h.indexOf(g)===0)return this.subModes[g];return null},this.$tryMode=function(h,g,s,l){var c=this.$getMode(h);return c?c.getFoldWidget(g,s,l):""},this.getFoldWidget=function(h,g,s){return this.$tryMode(h.getState(s-1),h,g,s)||this.$tryMode(h.getState(s),h,g,s)||this.defaultMode.getFoldWidget(h,g,s)},this.getFoldWidgetRange=function(h,g,s){var l=this.$getMode(h.getState(s-1));return(!l||!l.getFoldWidget(h,g,s))&&(l=this.$getMode(h.getState(s))),(!l||!l.getFoldWidget(h,g,s))&&(l=this.defaultMode),l.getFoldWidgetRange(h,g,s)}}).call(x.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,v){var m=e("../../lib/oop"),y=e("./mixed").FoldMode,x=e("./xml").FoldMode,h=e("./cstyle").FoldMode,g=r.FoldMode=function(s,l){y.call(this,new x(s,l),{"js-":new h,"css-":new h})};m.inherits(g,y)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,r,v){function m(u,d){return u.type.lastIndexOf(d+".xml")>-1}function y(u,d){for(var w=new h(u,d.row,d.column),b=w.getCurrentToken();b&&!m(b,"tag-name");)b=w.stepBackward();if(b)return b.value}function x(u,d){for(var w=new h(u,d.row,d.column),b=w.getCurrentToken();b&&!m(b,"attribute-name");)b=w.stepBackward();if(b)return b.value}var h=e("../token_iterator").TokenIterator,g=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],l=g.concat(s),c={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(c),o=function(){};(function(){this.getCompletions=function(u,d,w,b){var E=d.getTokenAt(w.row,w.column);if(!E)return[];if(m(E,"tag-name")||m(E,"tag-open")||m(E,"end-tag-open"))return this.getTagCompletions(u,d,w,b);if(m(E,"tag-whitespace")||m(E,"attribute-name"))return this.getAttributeCompletions(u,d,w,b);if(m(E,"attribute-value"))return this.getAttributeValueCompletions(u,d,w,b);var $=d.getLine(w.row).substr(0,w.column);return/&[a-z]*$/i.test($)?this.getHTMLEntityCompletions(u,d,w,b):[]},this.getTagCompletions=function(u,d,w,b){return a.map(function(E){return{value:E,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(u,d,w,b){var E=y(d,w);if(!E)return[];var $=l;return E in c&&($=$.concat(Object.keys(c[E]))),$.map(function(_){return{caption:_,snippet:_+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(u,d,w,b){var E=y(d,w),$=x(d,w);if(!E)return[];var _=[];return E in c&&$ in c[E]&&typeof c[E][$]=="object"&&(_=Object.keys(c[E][$])),_.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(u,d,w,b){var E=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return E.map(function($){return{caption:$,snippet:$,meta:"html entity",score:1e6}})}}).call(o.prototype),r.HtmlCompletions=o}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,r,v){var m=e("../lib/oop"),y=e("../lib/lang"),x=e("./text").Mode,h=e("./javascript").Mode,g=e("./css").Mode,s=e("./html_highlight_rules").HtmlHighlightRules,l=e("./behaviour/xml").XmlBehaviour,c=e("./folding/html").FoldMode,a=e("./html_completions").HtmlCompletions,o=e("../worker/worker_client").WorkerClient,u=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],d=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],w=function(b){this.fragmentContext=b&&b.fragmentContext,this.HighlightRules=s,this.$behaviour=new l,this.$completer=new a,this.createModeDelegates({"js-":h,"css-":g}),this.foldingRules=new c(this.voidElements,y.arrayToMap(d))};m.inherits(w,x),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=y.arrayToMap(u),this.getNextLineIndent=function(b,E,$){return this.$getIndent(E)},this.checkOutdent=function(b,E,$){return!1},this.getCompletions=function(b,E,$,_){return this.$completer.getCompletions(b,E,$,_)},this.createWorker=function(b){if(this.constructor==w){var E=new o(["ace"],"ace/mode/html_worker","Worker");return E.attachToDocument(b.getDocument()),this.fragmentContext&&E.call("setOptions",[{context:this.fragmentContext}]),E.on("error",function($){b.setAnnotations($.data)}),E.on("terminate",function(){b.clearAnnotations()}),E}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(w.prototype),r.Mode=w}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,v){var m=e("../lib/oop"),y=e("./text_highlight_rules").TextHighlightRules,x=r.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",h=r.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",g=function(){var s=this.createKeywordMapper({keyword:x,"support.function.builtin":h,"invalid.deprecated":"debugger"},"identifier"),l="(?:(?:[1-9]\\d*)|(?:0))",c="(?:\\.\\d+)",a="(?:\\d+)",o="(?:(?:"+a+"?"+c+")|(?:"+a+"\\.))",u="(?:(?:"+o+"|"+a+"))",d="(?:"+u+"|"+o+")",w="(?:&"+a+")",b="[a-zA-Z_][a-zA-Z0-9_]*",E="(?:"+b+"(?==))",$="(?:\\$(?:SHLVL|\\$|\\!|\\?))",_="(?:"+b+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(C,R,L){var F=C[2]=="-"?"indentedHeredoc":"heredoc",I=C.split(this.splitRegex);return L.push(F,I[4]),[{type:"constant",value:I[1]},{type:"text",value:I[2]},{type:"string",value:I[3]},{type:"support.class",value:I[4]},{type:"string",value:I[5]}]},rules:{heredoc:[{onMatch:function(C,R,L){return C===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(C,R,L){return C===L[1]?(L.shift(),L.shift(),this.next=L[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(C,R){return R[0]==="heredoc"||R[0]==="indentedHeredoc"?R[0]:C}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:$},{token:"variable",regex:E},{include:"variables"},{token:"support.function",regex:_},{token:"support.function",regex:w},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:d},{token:"constant.numeric",regex:l+"\\b"},{token:s,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};m.inherits(g,y),r.ShHighlightRules=g}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(e,r,v){var m=e("../lib/oop"),y=e("./text").Mode,x=e("./sh_highlight_rules").ShHighlightRules,h=e("../range").Range,g=e("./folding/cstyle").FoldMode,s=function(){this.HighlightRules=x,this.foldingRules=new g,this.$behaviour=this.$defaultBehaviour};m.inherits(s,y),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(c,a,o){var u=this.$getIndent(a),d=this.getTokenizer().getLineTokens(a,c),w=d.tokens;if(w.length&&w[w.length-1].type=="comment")return u;if(c=="start"){var b=a.match(/^.*[\{\(\[:]\s*$/);b&&(u+=o)}return u};var l={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(c,a,o){if(o!==`\r
|
987
|
+
`&&o!=="\r"&&o!==`
|
988
|
+
`)return!1;var u=this.getTokenizer().getLineTokens(a.trim(),c).tokens;if(!u)return!1;do var d=u.pop();while(d&&(d.type=="comment"||d.type=="text"&&d.value.match(/^\s+$/)));return d?d.type=="keyword"&&l[d.value]:!1},this.autoOutdent=function(c,a,o){o+=1;var u=this.$getIndent(a.getLine(o)),d=a.getTabString();u.slice(-d.length)==d&&a.remove(new h(o,u.length-d.length,o,u.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(s.prototype),r.Mode=s}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(e,r,v){var m=e("../lib/oop"),y=e("../lib/lang"),x=e("./text").Mode,h=e("./xml_highlight_rules").XmlHighlightRules,g=e("./behaviour/xml").XmlBehaviour,s=e("./folding/xml").FoldMode,l=e("../worker/worker_client").WorkerClient,c=function(){this.HighlightRules=h,this.$behaviour=new g,this.foldingRules=new s};m.inherits(c,x),(function(){this.voidElements=y.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(a){var o=new l(["ace"],"ace/mode/xml_worker","Worker");return o.attachToDocument(a.getDocument()),o.on("error",function(u){a.setAnnotations(u.data)}),o.on("terminate",function(){a.clearAnnotations()}),o},this.$id="ace/mode/xml"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(e,r,v){var m=e("../lib/oop"),y=e("./behaviour/cstyle").CstyleBehaviour,x=e("./text").Mode,h=e("./markdown_highlight_rules").MarkdownHighlightRules,g=e("./folding/markdown").FoldMode,s=function(){this.HighlightRules=h,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 g,this.$behaviour=new y({braces:!0})};m.inherits(s,x),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(l,c,a){if(l=="listblock"){var o=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(c);if(!o)return"";var u=o[2];return u||(u=parseInt(o[3],10)+1+"."),o[1]+u+o[4]}return this.$getIndent(c)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(s.prototype),r.Mode=s}),function(){ace.require(["ace/mode/markdown"],function(e){n&&(n.exports=e)})}()}(Fp)),Fp.exports}M0();var Wp={exports:{}},Bp;function I0(){return Bp||(Bp=1,function(n,t){ace.define("ace/theme/twilight-css",["require","exports","module"],function(e,r,v){v.exports=`.ace-twilight .ace_gutter {
|
989
|
+
background: #232323;
|
990
|
+
color: #E2E2E2
|
991
|
+
}
|
992
|
+
|
993
|
+
.ace-twilight .ace_print-margin {
|
994
|
+
width: 1px;
|
995
|
+
background: #232323
|
996
|
+
}
|
997
|
+
|
998
|
+
.ace-twilight {
|
999
|
+
background-color: #141414;
|
1000
|
+
color: #F8F8F8
|
1001
|
+
}
|
1002
|
+
|
1003
|
+
.ace-twilight .ace_cursor {
|
1004
|
+
color: #A7A7A7
|
1005
|
+
}
|
1006
|
+
|
1007
|
+
.ace-twilight .ace_marker-layer .ace_selection {
|
1008
|
+
background: rgba(221, 240, 255, 0.20)
|
1009
|
+
}
|
1010
|
+
|
1011
|
+
.ace-twilight.ace_multiselect .ace_selection.ace_start {
|
1012
|
+
box-shadow: 0 0 3px 0px #141414;
|
1013
|
+
}
|
1014
|
+
|
1015
|
+
.ace-twilight .ace_marker-layer .ace_step {
|
1016
|
+
background: rgb(102, 82, 0)
|
1017
|
+
}
|
1018
|
+
|
1019
|
+
.ace-twilight .ace_marker-layer .ace_bracket {
|
1020
|
+
margin: -1px 0 0 -1px;
|
1021
|
+
border: 1px solid rgba(255, 255, 255, 0.25)
|
1022
|
+
}
|
1023
|
+
|
1024
|
+
.ace-twilight .ace_marker-layer .ace_active-line {
|
1025
|
+
background: rgba(255, 255, 255, 0.031)
|
1026
|
+
}
|
1027
|
+
|
1028
|
+
.ace-twilight .ace_gutter-active-line {
|
1029
|
+
background-color: rgba(255, 255, 255, 0.031)
|
1030
|
+
}
|
1031
|
+
|
1032
|
+
.ace-twilight .ace_marker-layer .ace_selected-word {
|
1033
|
+
border: 1px solid rgba(221, 240, 255, 0.20)
|
1034
|
+
}
|
1035
|
+
|
1036
|
+
.ace-twilight .ace_invisible {
|
1037
|
+
color: rgba(255, 255, 255, 0.25)
|
1038
|
+
}
|
1039
|
+
|
1040
|
+
.ace-twilight .ace_keyword,
|
1041
|
+
.ace-twilight .ace_meta {
|
1042
|
+
color: #CDA869
|
1043
|
+
}
|
1044
|
+
|
1045
|
+
.ace-twilight .ace_constant,
|
1046
|
+
.ace-twilight .ace_constant.ace_character,
|
1047
|
+
.ace-twilight .ace_constant.ace_character.ace_escape,
|
1048
|
+
.ace-twilight .ace_constant.ace_other,
|
1049
|
+
.ace-twilight .ace_heading,
|
1050
|
+
.ace-twilight .ace_markup.ace_heading,
|
1051
|
+
.ace-twilight .ace_support.ace_constant {
|
1052
|
+
color: #CF6A4C
|
1053
|
+
}
|
1054
|
+
|
1055
|
+
.ace-twilight .ace_invalid.ace_illegal {
|
1056
|
+
color: #F8F8F8;
|
1057
|
+
background-color: rgba(86, 45, 86, 0.75)
|
1058
|
+
}
|
1059
|
+
|
1060
|
+
.ace-twilight .ace_invalid.ace_deprecated {
|
1061
|
+
text-decoration: underline;
|
1062
|
+
font-style: italic;
|
1063
|
+
color: #D2A8A1
|
1064
|
+
}
|
1065
|
+
|
1066
|
+
.ace-twilight .ace_support {
|
1067
|
+
color: #9B859D
|
1068
|
+
}
|
1069
|
+
|
1070
|
+
.ace-twilight .ace_fold {
|
1071
|
+
background-color: #AC885B;
|
1072
|
+
border-color: #F8F8F8
|
1073
|
+
}
|
1074
|
+
|
1075
|
+
.ace-twilight .ace_support.ace_function {
|
1076
|
+
color: #DAD085
|
1077
|
+
}
|
1078
|
+
|
1079
|
+
.ace-twilight .ace_list,
|
1080
|
+
.ace-twilight .ace_markup.ace_list,
|
1081
|
+
.ace-twilight .ace_storage {
|
1082
|
+
color: #F9EE98
|
1083
|
+
}
|
1084
|
+
|
1085
|
+
.ace-twilight .ace_entity.ace_name.ace_function,
|
1086
|
+
.ace-twilight .ace_meta.ace_tag {
|
1087
|
+
color: #AC885B
|
1088
|
+
}
|
1089
|
+
|
1090
|
+
.ace-twilight .ace_string {
|
1091
|
+
color: #8F9D6A
|
1092
|
+
}
|
1093
|
+
|
1094
|
+
.ace-twilight .ace_string.ace_regexp {
|
1095
|
+
color: #E9C062
|
1096
|
+
}
|
1097
|
+
|
1098
|
+
.ace-twilight .ace_comment {
|
1099
|
+
font-style: italic;
|
1100
|
+
color: #5F5A60
|
1101
|
+
}
|
1102
|
+
|
1103
|
+
.ace-twilight .ace_variable {
|
1104
|
+
color: #7587A6
|
1105
|
+
}
|
1106
|
+
|
1107
|
+
.ace-twilight .ace_xml-pe {
|
1108
|
+
color: #494949
|
1109
|
+
}
|
1110
|
+
|
1111
|
+
.ace-twilight .ace_indent-guide {
|
1112
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
|
1113
|
+
}
|
1114
|
+
|
1115
|
+
.ace-twilight .ace_indent-guide-active {
|
1116
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
|
1117
|
+
}
|
1118
|
+
`}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(e,r,v){r.isDark=!0,r.cssClass="ace-twilight",r.cssText=e("./twilight-css");var m=e("../lib/dom");m.importCssString(r.cssText,r.cssClass,!1)}),function(){ace.require(["ace/theme/twilight"],function(e){n&&(n.exports=e)})}()}(Wp)),Wp.exports}I0();var zp={exports:{}},jp;function R0(){return jp||(jp=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,v){function m(C){var R=new Date().toLocaleString("en-us",C);return R.length==1?"0"+R:R}var y=e("./lib/dom"),x=e("./lib/oop"),h=e("./lib/event_emitter").EventEmitter,g=e("./lib/lang"),s=e("./range").Range,l=e("./range_list").RangeList,c=e("./keyboard/hash_handler").HashHandler,a=e("./tokenizer").Tokenizer,o=e("./clipboard"),u={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,R,L){var F=C.session.getTextRange();return L?F.replace(/\n\r?([ \t]*\S)/g,`
|
1119
|
+
`+L+"$1"):F},CURRENT_LINE:function(C){return C.session.getLine(C.getCursorPosition().row)},PREV_LINE:function(C){return C.session.getLine(C.getCursorPosition().row-1)},LINE_INDEX:function(C){return C.getCursorPosition().row},LINE_NUMBER:function(C){return C.getCursorPosition().row+1},SOFT_TABS:function(C){return C.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(C){return C.session.getTabSize()},CLIPBOARD:function(C){return o.getText&&o.getText()},FILENAME:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0]},FILENAME_BASE:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(C){return this.FILEPATH(C).replace(/[^/\\]*$/,"")},FILEPATH:function(C){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(C){var R=C.session.$mode||{};return R.blockComment&&R.blockComment.start||""},BLOCK_COMMENT_END:function(C){var R=C.session.$mode||{};return R.blockComment&&R.blockComment.end||""},LINE_COMMENT:function(C){var R=C.session.$mode||{};return R.lineCommentStart||""},CURRENT_YEAR:m.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:m.bind(null,{year:"2-digit"}),CURRENT_MONTH:m.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:m.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:m.bind(null,{month:"short"}),CURRENT_DATE:m.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:m.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:m.bind(null,{weekday:"short"}),CURRENT_HOUR:m.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:m.bind(null,{minute:"2-digit"}),CURRENT_SECOND:m.bind(null,{second:"2-digit"})};u.SELECTED_TEXT=u.SELECTION;var d=function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=u}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function R(I){return I=I.substr(1),/^\d+$/.test(I)?[{tabstopId:parseInt(I,10)}]:[{text:I}]}function L(I){return"(?:[^\\\\"+I+"]|\\\\.)"}var F={regex:"/("+L("/")+"+)/",onMatch:function(I,H,P){var O=P[0];return O.fmtString=!0,O.guard=I.slice(1,-1),O.flag="",""},next:"formatString"};return C.$tokenizer=new a({start:[{regex:/\\./,onMatch:function(I,H,P){var O=I[1];return(O=="}"&&P.length||"`$\\".indexOf(O)!=-1)&&(I=O),[I]}},{regex:/}/,onMatch:function(I,H,P){return[P.length?P.shift():I]}},{regex:/\$(?:\d+|\w+)/,onMatch:R},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(I,H,P){var O=R(I.substr(1));return P.unshift(O[0]),O},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+L("\\|")+"*\\|",onMatch:function(I,H,P){var O=I.slice(1,-1).replace(/\\[,|\\]|,/g,function(S){return S.length==2?S[1]:"\0"}).split("\0").map(function(S){return{value:S}});return P[0].choices=O,[O[0]]},next:"start"},F,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(I,H,P){return P.length&&P[0].expectElse?(P[0].expectElse=!1,P[0].ifEnd={elseEnd:P[0]},[P[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(I,H,P){var O=I[1];return O=="}"&&P.length||"`$\\".indexOf(O)!=-1?I=O:O=="n"?I=`
|
1120
|
+
`:O=="t"?I=" ":"ulULE".indexOf(O)!=-1&&(I={changeCase:O,local:O>"a"}),[I]}},{regex:"/\\w*}",onMatch:function(I,H,P){var O=P.shift();return O&&(O.flag=I.slice(1,-1)),this.next=O&&O.tabstopId?"start":"",[O||I]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(I,H,P){return[{text:I.slice(1)}]}},{regex:/\${\w+/,onMatch:function(I,H,P){var O={text:I.slice(2)};return P.unshift(O),[O]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(I,H,P){var O=P.shift();return this.next=O&&O.tabstopId?"start":"",[O||I]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(I,H,P){var O=P[0];return O.formatFunction=I.slice(2,-1),[P.shift()]},next:"formatString"},F,{regex:/:[\?\-+]?/,onMatch:function(I,H,P){I[1]=="+"&&(P[0].ifEnd=P[0]),I[1]=="?"&&(P[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),C.$tokenizer},C.prototype.tokenizeTmSnippet=function(R,L){return this.getTokenizer().getLineTokens(R,L).tokens.map(function(F){return F.value||F})},C.prototype.getVariableValue=function(R,L,F){if(/^\d+$/.test(L))return(this.variables.__||{})[L]||"";if(/^[A-Z]\d+$/.test(L))return(this.variables[L[0]+"__"]||{})[L.substr(1)]||"";if(L=L.replace(/^TM_/,""),!this.variables.hasOwnProperty(L))return"";var I=this.variables[L];return typeof I=="function"&&(I=this.variables[L](R,L,F)),I??""},C.prototype.tmStrFormat=function(R,L,F){if(!L.fmt)return R;var I=L.flag||"",H=L.guard;H=new RegExp(H,I.replace(/[^gim]/g,""));var P=typeof L.fmt=="string"?this.tokenizeTmSnippet(L.fmt,"formatString"):L.fmt,O=this,S=R.replace(H,function(){var A=O.variables.__;O.variables.__=[].slice.call(arguments);for(var N=O.resolveVariables(P,F),B="E",U=0;U<N.length;U++){var K=N[U];if(typeof K=="object")if(N[U]="",K.changeCase&&K.local){var Z=N[U+1];Z&&typeof Z=="string"&&(K.changeCase=="u"?N[U]=Z[0].toUpperCase():N[U]=Z[0].toLowerCase(),N[U+1]=Z.substr(1))}else K.changeCase&&(B=K.changeCase);else B=="U"?N[U]=K.toUpperCase():B=="L"&&(N[U]=K.toLowerCase())}return O.variables.__=A,N.join("")});return S},C.prototype.tmFormatFunction=function(R,L,F){return L.formatFunction=="upcase"?R.toUpperCase():L.formatFunction=="downcase"?R.toLowerCase():R},C.prototype.resolveVariables=function(R,L){function F(B){var U=R.indexOf(B,O+1);U!=-1&&(O=U)}for(var I=[],H="",P=!0,O=0;O<R.length;O++){var S=R[O];if(typeof S=="string"){I.push(S),S==`
|
1121
|
+
`?(P=!0,H=""):P&&(H=/^\t*/.exec(S)[0],P=/\S/.test(S));continue}if(S){if(P=!1,S.fmtString){var A=R.indexOf(S,O+1);A==-1&&(A=R.length),S.fmt=R.slice(O+1,A),O=A}if(S.text){var N=this.getVariableValue(L,S.text,H)+"";S.fmtString&&(N=this.tmStrFormat(N,S,L)),S.formatFunction&&(N=this.tmFormatFunction(N,S,L)),N&&!S.ifEnd?(I.push(N),F(S)):!N&&S.ifEnd&&F(S.ifEnd)}else S.elseEnd?F(S.elseEnd):(S.tabstopId!=null||S.changeCase!=null)&&I.push(S)}}return I},C.prototype.getDisplayTextForSnippet=function(R,L){var F=w.call(this,R,L);return F.text},C.prototype.insertSnippetForSelection=function(R,L,F){F===void 0&&(F={});var I=w.call(this,R,L,F),H=R.getSelectionRange(),P=R.session.replace(H,I.text),O=new b(R),S=R.inVirtualSelectionMode&&R.selection.index;O.addTabstops(I.tabstops,H.start,P,S)},C.prototype.insertSnippet=function(R,L,F){F===void 0&&(F={});var I=this;if(R.inVirtualSelectionMode)return I.insertSnippetForSelection(R,L,F);R.forEachSelection(function(){I.insertSnippetForSelection(R,L,F)},null,{keepOrder:!0}),R.tabstopManager&&R.tabstopManager.tabNext()},C.prototype.$getScope=function(R){var L=R.session.$mode.$id||"";if(L=L.split("/").pop(),L==="html"||L==="php"){L==="php"&&!R.session.$mode.inlinePhp&&(L="html");var F=R.getCursorPosition(),I=R.session.getState(F.row);typeof I=="object"&&(I=I[0]),I.substring&&(I.substring(0,3)=="js-"?L="javascript":I.substring(0,4)=="css-"?L="css":I.substring(0,4)=="php-"&&(L="php"))}return L},C.prototype.getActiveScopes=function(R){var L=this.$getScope(R),F=[L],I=this.snippetMap;return I[L]&&I[L].includeScopes&&F.push.apply(F,I[L].includeScopes),F.push("_"),F},C.prototype.expandWithTab=function(R,L){var F=this,I=R.forEachSelection(function(){return F.expandSnippetForSelection(R,L)},null,{keepOrder:!0});return I&&R.tabstopManager&&R.tabstopManager.tabNext(),I},C.prototype.expandSnippetForSelection=function(R,L){var F=R.getCursorPosition(),I=R.session.getLine(F.row),H=I.substring(0,F.column),P=I.substr(F.column),O=this.snippetMap,S;return this.getActiveScopes(R).some(function(A){var N=O[A];return N&&(S=this.findMatchingSnippet(N,H,P)),!!S},this),S?(L&&L.dryRun||(R.session.doc.removeInLine(F.row,F.column-S.replaceBefore.length,F.column+S.replaceAfter.length),this.variables.M__=S.matchBefore,this.variables.T__=S.matchAfter,this.insertSnippetForSelection(R,S.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(R,L,F){for(var I=R.length;I--;){var H=R[I];if(!(H.startRe&&!H.startRe.test(L))&&!(H.endRe&&!H.endRe.test(F))&&!(!H.startRe&&!H.endRe))return H.matchBefore=H.startRe?H.startRe.exec(L):[""],H.matchAfter=H.endRe?H.endRe.exec(F):[""],H.replaceBefore=H.triggerRe?H.triggerRe.exec(L)[0]:"",H.replaceAfter=H.endTriggerRe?H.endTriggerRe.exec(F)[0]:"",H}},C.prototype.register=function(R,L){function F(A){return A&&!/^\^?\(.*\)\$?$|^\\b$/.test(A)&&(A="(?:"+A+")"),A||""}function I(A,N,B){return A=F(A),N=F(N),A=N+A,A&&A[A.length-1]!="$"&&(A+="$"),new RegExp(A)}function H(A){A.scope||(A.scope=L||"_"),L=A.scope,P[L]||(P[L]=[],O[L]={});var N=O[L];if(A.name){var B=N[A.name];B&&S.unregister(B),N[A.name]=A}P[L].push(A),A.prefix&&(A.tabTrigger=A.prefix),!A.content&&A.body&&(A.content=Array.isArray(A.body)?A.body.join(`
|
1122
|
+
`):A.body),A.tabTrigger&&!A.trigger&&(!A.guard&&/^\w/.test(A.tabTrigger)&&(A.guard="\\b"),A.trigger=g.escapeRegExp(A.tabTrigger)),!(!A.trigger&&!A.guard&&!A.endTrigger&&!A.endGuard)&&(A.startRe=I(A.trigger,A.guard),A.triggerRe=new RegExp(A.trigger),A.endRe=I(A.endTrigger,A.endGuard),A.endTriggerRe=new RegExp(A.endTrigger))}var P=this.snippetMap,O=this.snippetNameMap,S=this;R||(R=[]),Array.isArray(R)?R.forEach(H):Object.keys(R).forEach(function(A){H(R[A])}),this._signal("registerSnippets",{scope:L})},C.prototype.unregister=function(R,L){function F(P){var O=H[P.scope||L];if(O&&O[P.name]){delete O[P.name];var S=I[P.scope||L],A=S&&S.indexOf(P);A>=0&&S.splice(A,1)}}var I=this.snippetMap,H=this.snippetNameMap;R.content?F(R):Array.isArray(R)&&R.forEach(F)},C.prototype.parseSnippetFile=function(R){R=R.replace(/\r/g,"");for(var L=[],F={},I=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,H;H=I.exec(R);){if(H[1])try{F=JSON.parse(H[1]),L.push(F)}catch{}if(H[4])F.content=H[4].replace(/^\t/gm,""),L.push(F),F={};else{var P=H[2],O=H[3];if(P=="regex"){var S=/\/((?:[^\/\\]|\\.)*)|$/g;F.guard=S.exec(O)[1],F.trigger=S.exec(O)[1],F.endTrigger=S.exec(O)[1],F.endGuard=S.exec(O)[1]}else P=="snippet"?(F.tabTrigger=O.match(/^\S*/)[0],F.name||(F.name=O)):P&&(F[P]=O)}}return L},C.prototype.getSnippetByName=function(R,L){var F=this.snippetNameMap,I;return this.getActiveScopes(L).some(function(H){var P=F[H];return P&&(I=P[R]),!!I},this),I},C}();x.implement(d.prototype,h);var w=function(C,R,L){function F(ue){for(var ye=[],Ae=0;Ae<ue.length;Ae++){var $e=ue[Ae];if(typeof $e=="object"){if(N[$e.tabstopId])continue;var Ie=ue.lastIndexOf($e,Ae-1);$e=ye[Ie]||{tabstopId:$e.tabstopId}}ye[Ae]=$e}return ye}L===void 0&&(L={});var I=C.getCursorPosition(),H=C.session.getLine(I.row),P=C.session.getTabString(),O=H.match(/^\s*/)[0];I.column<O.length&&(O=O.slice(0,I.column)),R=R.replace(/\r/g,"");var S=this.tokenizeTmSnippet(R);S=this.resolveVariables(S,C),S=S.map(function(ue){return ue==`
|
1123
|
+
`&&!L.excludeExtraIndent?ue+O:typeof ue=="string"?ue.replace(/\t/g,P):ue});var A=[];S.forEach(function(ue,ye){if(typeof ue=="object"){var Ae=ue.tabstopId,$e=A[Ae];if($e||($e=A[Ae]=[],$e.index=Ae,$e.value="",$e.parents={}),$e.indexOf(ue)===-1){ue.choices&&!$e.choices&&($e.choices=ue.choices),$e.push(ue);var Ie=S.indexOf(ue,ye+1);if(Ie!==-1){var Ge=S.slice(ye+1,Ie),qe=Ge.some(function(ut){return typeof ut=="object"});qe&&!$e.value?$e.value=Ge:Ge.length&&(!$e.value||typeof $e.value!="string")&&($e.value=Ge.join(""))}}}}),A.forEach(function(ue){ue.length=0});for(var N={},B=0;B<S.length;B++){var U=S[B];if(typeof U=="object"){var K=U.tabstopId,Z=A[K],te=S.indexOf(U,B+1);if(N[K]){N[K]===U&&(delete N[K],Object.keys(N).forEach(function(ue){Z.parents[ue]=!0}));continue}N[K]=U;var he=Z.value;typeof he!="string"?he=F(he):U.fmt&&(he=this.tmStrFormat(he,U,C)),S.splice.apply(S,[B+1,Math.max(0,te-B)].concat(he,U)),Z.indexOf(U)===-1&&Z.push(U)}}var ne=0,ae=0,ce="";return S.forEach(function(ue){if(typeof ue=="string"){var ye=ue.split(`
|
1124
|
+
`);ye.length>1?(ae=ye[ye.length-1].length,ne+=ye.length-1):ae+=ue.length,ce+=ue}else ue&&(ue.start?ue.end={row:ne,column:ae}:ue.start={row:ne,column:ae})}),{text:ce,tabstops:A,tokens:S}},b=function(){function C(R){if(this.index=0,this.ranges=[],this.tabstops=[],R.tabstopManager)return R.tabstopManager;R.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=g.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(R)}return C.prototype.attach=function(R){this.$openTabstops=null,this.selectedTabstop=null,this.editor=R,this.session=R.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},C.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},C.prototype.onChange=function(R){for(var L=R.action[0]=="r",F=this.selectedTabstop||{},I=F.parents||{},H=this.tabstops.slice(),P=0;P<H.length;P++){var O=H[P],S=O==F||I[O.index];if(O.rangeList.$bias=S?0:1,R.action=="remove"&&O!==F){var A=O.parents&&O.parents[F.index],N=O.rangeList.pointIndex(R.start,A);N=N<0?-N-1:N+1;var B=O.rangeList.pointIndex(R.end,A);B=B<0?-B-1:B-1;for(var U=O.rangeList.ranges.slice(N,B),K=0;K<U.length;K++)this.removeRange(U[K])}O.rangeList.$onChange(R)}var Z=this.session;!this.$inChange&&L&&Z.getLength()==1&&!Z.getValue()&&this.detach()},C.prototype.updateLinkedFields=function(){var R=this.selectedTabstop;if(!(!R||!R.hasLinkedRanges||!R.firstNonLinked)){this.$inChange=!0;for(var L=this.session,F=L.getTextRange(R.firstNonLinked),I=0;I<R.length;I++){var H=R[I];if(H.linked){var P=H.original,O=r.snippetManager.tmStrFormat(F,P,this.editor);L.replace(H,O)}}this.$inChange=!1}},C.prototype.onAfterExec=function(R){R.command&&!R.command.readOnly&&this.updateLinkedFields()},C.prototype.onChangeSelection=function(){if(this.editor){for(var R=this.editor.selection.lead,L=this.editor.selection.anchor,F=this.editor.selection.isEmpty(),I=0;I<this.ranges.length;I++)if(!this.ranges[I].linked){var H=this.ranges[I].contains(R.row,R.column),P=F||this.ranges[I].contains(L.row,L.column);if(H&&P)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(R){var L=this.tabstops.length,F=this.index+(R||1);F=Math.min(Math.max(F,1),L),F==L&&(F=0),this.selectTabstop(F),this.updateTabstopMarkers(),F===0&&this.detach()},C.prototype.selectTabstop=function(R){this.$openTabstops=null;var L=this.tabstops[this.index];if(L&&this.addTabstopMarkers(L),this.index=R,L=this.tabstops[this.index],!(!L||!L.length)){this.selectedTabstop=L;var F=L.firstNonLinked||L;if(L.choices&&(F.cursor=F.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(F);else{var I=this.editor.multiSelect;I.toSingleRange(F);for(var H=0;H<L.length;H++)L.hasLinkedRanges&&L[H].linked||I.addRange(L[H].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},C.prototype.addTabstops=function(R,L,F){var I=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!R[0]){var H=s.fromPoints(F,F);$(H.start,L),$(H.end,L),R[0]=[H],R[0].index=0}var P=this.index,O=[P+1,0],S=this.ranges,A=this.snippetId=(this.snippetId||0)+1;R.forEach(function(N,B){var U=this.$openTabstops[B]||N;U.snippetId=A;for(var K=0;K<N.length;K++){var Z=N[K],te=s.fromPoints(Z.start,Z.end||Z.start);E(te.start,L),E(te.end,L),te.original=Z,te.tabstop=U,S.push(te),U!=N?U.unshift(te):U[K]=te,Z.fmtString||U.firstNonLinked&&I?(te.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=te)}U.firstNonLinked||(U.hasLinkedRanges=!1),U===N&&(O.push(U),this.$openTabstops[B]=U),this.addTabstopMarkers(U),U.rangeList=U.rangeList||new l,U.rangeList.$bias=0,U.rangeList.addList(U)},this),O.length>2&&(this.tabstops.length&&O.push(O.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,O))},C.prototype.addTabstopMarkers=function(R){var L=this.session;R.forEach(function(F){F.markerId||(F.markerId=L.addMarker(F,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(R){var L=this.session;R.forEach(function(F){L.removeMarker(F.markerId),F.markerId=null})},C.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var R=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&R--,this.tabstops.forEach(function(L){L.snippetId===R?this.addTabstopMarkers(L):this.removeTabstopMarkers(L)},this)}},C.prototype.removeRange=function(R){var L=R.tabstop.indexOf(R);L!=-1&&R.tabstop.splice(L,1),L=this.ranges.indexOf(R),L!=-1&&this.ranges.splice(L,1),L=R.tabstop.rangeList.ranges.indexOf(R),L!=-1&&R.tabstop.splice(L,1),this.session.removeMarker(R.markerId),R.tabstop.length||(L=this.tabstops.indexOf(R.tabstop),L!=-1&&this.tabstops.splice(L,1),this.tabstops.length||this.detach())},C}();b.prototype.keyboardHandler=new c,b.prototype.keyboardHandler.bindKeys({Tab:function(C){r.snippetManager&&r.snippetManager.expandWithTab(C)||(C.tabstopManager.tabNext(1),C.renderer.scrollCursorIntoView())},"Shift-Tab":function(C){C.tabstopManager.tabNext(-1),C.renderer.scrollCursorIntoView()},Esc:function(C){C.tabstopManager.detach()}});var E=function(C,R){C.row==0&&(C.column+=R.column),C.row+=R.row},$=function(C,R){C.row==R.row&&(C.column-=R.column),C.row-=R.row};y.importCssString(`
|
1125
|
+
.ace_snippet-marker {
|
1126
|
+
-moz-box-sizing: border-box;
|
1127
|
+
box-sizing: border-box;
|
1128
|
+
background: rgba(194, 193, 208, 0.09);
|
1129
|
+
border: 1px dotted rgba(211, 208, 235, 0.62);
|
1130
|
+
position: absolute;
|
1131
|
+
}`,"snippets.css",!1),r.snippetManager=new d;var _=e("./editor").Editor;(function(){this.insertSnippet=function(C,R){return r.snippetManager.insertSnippet(this,C,R)},this.expandSnippet=function(C){return r.snippetManager.expandWithTab(this,C)}}).call(_.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,v){var m=e("../virtual_renderer").VirtualRenderer,y=e("../editor").Editor,x=e("../range").Range,h=e("../lib/event"),g=e("../lib/lang"),s=e("../lib/dom"),l=e("../config").nls,c=e("./../lib/useragent"),a=function(E){return"suggest-aria-id:".concat(E)},o=c.isSafari?"menu":"listbox",u=c.isSafari?"menuitem":"option",d=c.isSafari?"aria-current":"aria-selected",w=function(E){var $=new m(E);$.$maxLines=4;var _=new y($);return _.setHighlightActiveLine(!1),_.setShowPrintMargin(!1),_.renderer.setShowGutter(!1),_.renderer.setHighlightGutterLine(!1),_.$mouseHandler.$focusTimeout=0,_.$highlightTagPending=!0,_},b=function(){function E($){var _=s.createElement("div"),C=w(_);$&&$.appendChild(_),_.style.display="none",C.renderer.content.style.cursor="default",C.renderer.setStyle("ace_autocomplete"),C.renderer.$textLayer.element.setAttribute("role",o),C.renderer.$textLayer.element.setAttribute("aria-roledescription",l("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),C.renderer.$textLayer.element.setAttribute("aria-label",l("autocomplete.popup.aria-label","Autocomplete suggestions")),C.renderer.textarea.setAttribute("aria-hidden","true"),C.setOption("displayIndentGuides",!1),C.setOption("dragDelay",150);var R=function(){};C.focus=R,C.$isFocused=!0,C.renderer.$cursorLayer.restartTimer=R,C.renderer.$cursorLayer.element.style.opacity="0",C.renderer.$maxLines=8,C.renderer.$keepTextAreaAtCursor=!1,C.setHighlightActiveLine(!1),C.session.highlight(""),C.session.$searchHighlight.clazz="ace_highlight-marker",C.on("mousedown",function(S){var A=S.getDocumentPosition();C.selection.moveToPosition(A),I.start.row=I.end.row=A.row,S.stop()});var L,F=new x(-1,0,-1,1/0),I=new x(-1,0,-1,1/0);I.id=C.session.addMarker(I,"ace_active-line","fullLine"),C.setSelectOnHover=function(S){S?F.id&&(C.session.removeMarker(F.id),F.id=null):F.id=C.session.addMarker(F,"ace_line-hover","fullLine")},C.setSelectOnHover(!1),C.on("mousemove",function(S){if(!L){L=S;return}if(!(L.x==S.x&&L.y==S.y)){L=S,L.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var A=L.getDocumentPosition().row;F.start.row!=A&&(F.id||C.setRow(A),P(A))}}),C.renderer.on("beforeRender",function(){if(L&&F.start.row!=-1){L.$pos=null;var S=L.getDocumentPosition().row;F.id||C.setRow(S),P(S,!0)}}),C.renderer.on("afterRender",function(){for(var S=C.renderer.$textLayer,A=S.config.firstRow,N=S.config.lastRow;A<=N;A++){var B=S.element.childNodes[A-S.config.firstRow];B.setAttribute("role",u),B.setAttribute("aria-roledescription",l("autocomplete.popup.item.aria-roledescription","item")),B.setAttribute("aria-setsize",C.data.length),B.setAttribute("aria-describedby","doc-tooltip"),B.setAttribute("aria-posinset",A+1);var U=C.getData(A);if(U){var K="".concat(U.caption||U.value).concat(U.meta?", ".concat(U.meta):"");B.setAttribute("aria-label",K)}var Z=B.querySelectorAll(".ace_completion-highlight");Z.forEach(function(te){te.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var S=C.getRow(),A=C.renderer.$textLayer,N=A.element.childNodes[S-A.config.firstRow],B=document.activeElement;if(N!==C.selectedNode&&C.selectedNode&&(s.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(d),C.selectedNode.removeAttribute("id")),B.removeAttribute("aria-activedescendant"),C.selectedNode=N,N){var U=a(S);s.addCssClass(N,"ace_selected"),N.id=U,A.element.setAttribute("aria-activedescendant",U),B.setAttribute("aria-activedescendant",U),N.setAttribute(d,"true")}});var H=function(){P(-1)},P=function(S,A){S!==F.start.row&&(F.start.row=F.end.row=S,A||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return F.start.row},h.addListener(C.container,"mouseout",function(){C.isMouseOver=!1,H()}),C.on("hide",H),C.on("changeSelection",H),C.session.doc.getLength=function(){return C.data.length},C.session.doc.getLine=function(S){var A=C.data[S];return typeof A=="string"?A:A&&A.value||""};var O=C.session.bgTokenizer;return O.$tokenizeRow=function(S){function A(ue,ye){ue&&B.push({type:(N.className||"")+(ye||""),value:ue})}var N=C.data[S],B=[];if(!N)return B;typeof N=="string"&&(N={value:N});for(var U=N.caption||N.value||N.name,K=U.toLowerCase(),Z=(C.filterText||"").toLowerCase(),te=0,he=0,ne=0;ne<=Z.length;ne++)if(ne!=he&&(N.matchMask&1<<ne||ne==Z.length)){var ae=Z.slice(he,ne);he=ne;var ce=K.indexOf(ae,te);if(ce==-1)continue;A(U.slice(te,ce),""),te=ce+ae.length,A(U.slice(ce,te),"completion-highlight")}return A(U.slice(te,U.length),""),B.push({type:"completion-spacer",value:" "}),N.meta&&B.push({type:"completion-meta",value:N.meta}),N.message&&B.push({type:"completion-message",value:N.message}),B},O.$updateOnChange=R,O.start=R,C.session.$computeWidth=function(){return this.screenWidth=0},C.isOpen=!1,C.isTopdown=!1,C.autoSelect=!0,C.filterText="",C.isMouseOver=!1,C.data=[],C.setData=function(S,A){C.filterText=A||"",C.setValue(g.stringRepeat(`
|
1132
|
+
`,S.length),-1),C.data=S||[],C.setRow(0)},C.getData=function(S){return C.data[S]},C.getRow=function(){return I.start.row},C.setRow=function(S){S=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,S)),I.start.row!=S&&(C.selection.clearSelection(),I.start.row=I.end.row=S||0,C.session._emit("changeBackMarker"),C.moveCursorTo(S||0,0),C.isOpen&&C._signal("select"))},C.on("changeSelection",function(){C.isOpen&&C.setRow(C.selection.lead.row),C.renderer.scrollCursorIntoView()}),C.hide=function(){this.container.style.display="none",C.anchorPos=null,C.anchor=null,C.isOpen&&(C.isOpen=!1,this._signal("hide"))},C.tryShow=function(S,A,N,B){if(!B&&C.isOpen&&C.anchorPos&&C.anchor&&C.anchorPos.top===S.top&&C.anchorPos.left===S.left&&C.anchor===N)return!0;var U=this.container,K=this.renderer.scrollBar.width||10,Z=window.innerHeight-K,te=window.innerWidth-K,he=this.renderer,ne=he.$maxLines*A*1.4,ae={top:0,bottom:0},ce=Z-S.top-3*this.$borderSize-A,ue=S.top-3*this.$borderSize;N||(ue<=ce||ce>=ne?N="bottom":N="top"),N==="top"?(ae.bottom=S.top-this.$borderSize,ae.top=ae.bottom-ne):N==="bottom"&&(ae.top=S.top+A+this.$borderSize,ae.bottom=ae.top+ne);var ye=ae.top>=0&&ae.bottom<=Z;if(!B&&!ye)return!1;ye?he.$maxPixelHeight=null:N==="top"?he.$maxPixelHeight=ue:he.$maxPixelHeight=ce,N==="top"?(U.style.top="",U.style.bottom=Z+K-ae.bottom+"px",C.isTopdown=!1):(U.style.top=ae.top+"px",U.style.bottom="",C.isTopdown=!0),U.style.display="";var Ae=S.left;return Ae+U.offsetWidth>te&&(Ae=te-U.offsetWidth),U.style.left=Ae+"px",U.style.right="",C.isOpen||(C.isOpen=!0,this._signal("show"),L=null),C.anchorPos=S,C.anchor=N,!0},C.show=function(S,A,N){this.tryShow(S,A,N?"bottom":void 0,!0)},C.goTo=function(S){var A=this.getRow(),N=this.session.getLength()-1;switch(S){case"up":A=A<=0?N:A-1;break;case"down":A=A>=N?-1:A+1;break;case"start":A=0;break;case"end":A=N}this.setRow(A)},C.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},C.$imageSize=0,C.$borderSize=1,C}return E}();s.importCssString(`
|
1133
|
+
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
1134
|
+
background-color: #CAD6FA;
|
1135
|
+
z-index: 1;
|
1136
|
+
}
|
1137
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
1138
|
+
background-color: #3a674e;
|
1139
|
+
}
|
1140
|
+
.ace_editor.ace_autocomplete .ace_line-hover {
|
1141
|
+
border: 1px solid #abbffe;
|
1142
|
+
margin-top: -1px;
|
1143
|
+
background: rgba(233,233,253,0.4);
|
1144
|
+
position: absolute;
|
1145
|
+
z-index: 2;
|
1146
|
+
}
|
1147
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
|
1148
|
+
border: 1px solid rgba(109, 150, 13, 0.8);
|
1149
|
+
background: rgba(58, 103, 78, 0.62);
|
1150
|
+
}
|
1151
|
+
.ace_completion-meta {
|
1152
|
+
opacity: 0.5;
|
1153
|
+
margin-left: 0.9em;
|
1154
|
+
}
|
1155
|
+
.ace_completion-message {
|
1156
|
+
margin-left: 0.9em;
|
1157
|
+
color: blue;
|
1158
|
+
}
|
1159
|
+
.ace_editor.ace_autocomplete .ace_completion-highlight{
|
1160
|
+
color: #2d69c7;
|
1161
|
+
}
|
1162
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
|
1163
|
+
color: #93ca12;
|
1164
|
+
}
|
1165
|
+
.ace_editor.ace_autocomplete {
|
1166
|
+
width: 300px;
|
1167
|
+
z-index: 200000;
|
1168
|
+
border: 1px lightgray solid;
|
1169
|
+
position: fixed;
|
1170
|
+
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
1171
|
+
line-height: 1.4;
|
1172
|
+
background: #fefefe;
|
1173
|
+
color: #111;
|
1174
|
+
}
|
1175
|
+
.ace_dark.ace_editor.ace_autocomplete {
|
1176
|
+
border: 1px #484747 solid;
|
1177
|
+
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
|
1178
|
+
line-height: 1.4;
|
1179
|
+
background: #25282c;
|
1180
|
+
color: #c1c1c1;
|
1181
|
+
}
|
1182
|
+
.ace_autocomplete .ace_text-layer {
|
1183
|
+
width: calc(100% - 8px);
|
1184
|
+
}
|
1185
|
+
.ace_autocomplete .ace_line {
|
1186
|
+
display: flex;
|
1187
|
+
align-items: center;
|
1188
|
+
}
|
1189
|
+
.ace_autocomplete .ace_line > * {
|
1190
|
+
min-width: 0;
|
1191
|
+
flex: 0 0 auto;
|
1192
|
+
}
|
1193
|
+
.ace_autocomplete .ace_line .ace_ {
|
1194
|
+
flex: 0 1 auto;
|
1195
|
+
overflow: hidden;
|
1196
|
+
text-overflow: ellipsis;
|
1197
|
+
}
|
1198
|
+
.ace_autocomplete .ace_completion-spacer {
|
1199
|
+
flex: 1;
|
1200
|
+
}
|
1201
|
+
.ace_autocomplete.ace_loading:after {
|
1202
|
+
content: "";
|
1203
|
+
position: absolute;
|
1204
|
+
top: 0px;
|
1205
|
+
height: 2px;
|
1206
|
+
width: 8%;
|
1207
|
+
background: blue;
|
1208
|
+
z-index: 100;
|
1209
|
+
animation: ace_progress 3s infinite linear;
|
1210
|
+
animation-delay: 300ms;
|
1211
|
+
transform: translateX(-100%) scaleX(1);
|
1212
|
+
}
|
1213
|
+
@keyframes ace_progress {
|
1214
|
+
0% { transform: translateX(-100%) scaleX(1) }
|
1215
|
+
50% { transform: translateX(625%) scaleX(2) }
|
1216
|
+
100% { transform: translateX(1500%) scaleX(3) }
|
1217
|
+
}
|
1218
|
+
@media (prefers-reduced-motion) {
|
1219
|
+
.ace_autocomplete.ace_loading:after {
|
1220
|
+
transform: translateX(625%) scaleX(2);
|
1221
|
+
animation: none;
|
1222
|
+
}
|
1223
|
+
}
|
1224
|
+
`,"autocompletion.css",!1),r.AcePopup=b,r.$singleLineEditor=w,r.getAriaId=a}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,r,v){var m=function(){function y(x){this.editor=x,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return y.prototype.setScreenReaderContent=function(x){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var g=this.popup.getRow(),s=this.popup.renderer.$textLayer,l=s.element.childNodes[g-s.config.firstRow];if(l){for(var c="doc-tooltip ",a=0;a<this._lines.length;a++)c+="ace-inline-screenreader-line-".concat(a," ");l.setAttribute("aria-describedby",c)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=x.split(/\r\n|\r|\n/);var h=this.createCodeBlock();this.screenReaderDiv.appendChild(h)},y.prototype.destroy=function(){this.screenReaderDiv.remove()},y.prototype.createCodeBlock=function(){var x=document.createElement("pre");x.setAttribute("id","ace-inline-screenreader");for(var h=0;h<this._lines.length;h++){var g=document.createElement("code");g.setAttribute("id","ace-inline-screenreader-line-".concat(h));var s=document.createTextNode(this._lines[h]);g.appendChild(s),x.appendChild(g)}return x},y}();r.AceInlineScreenReader=m}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(e,r,v){var m=e("../snippets").snippetManager,y=e("./inline_screenreader").AceInlineScreenReader,x=function(){function h(){this.editor=null}return h.prototype.show=function(g,s,l){if(l=l||"",g&&this.editor&&this.editor!==g&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!g||!s)return!1;this.inlineScreenReader||(this.inlineScreenReader=new y(g));var c=s.snippet?m.getDisplayTextForSnippet(g,s.snippet):s.value;return s.hideInlinePreview||!c||!c.startsWith(l)?!1:(this.editor=g,this.inlineScreenReader.setScreenReaderContent(c),c=c.slice(l.length),c===""?g.removeGhostText():g.setGhostText(c),!0)},h.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},h.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},h.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},h}();r.AceInline=x}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,r,v){r.parForEach=function(y,x,h){var g=0,s=y.length;s===0&&h();for(var l=0;l<s;l++)x(y[l],function(c,a){g++,g===s&&h(c,a)})};var m=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(y,x,h){h=h||m;for(var g=[],s=x-1;s>=0&&h.test(y[s]);s--)g.push(y[s]);return g.reverse().join("")},r.retrieveFollowingIdentifier=function(y,x,h){h=h||m;for(var g=[],s=x;s<y.length&&h.test(y[s]);s++)g.push(y[s]);return g},r.getCompletionPrefix=function(y){var x=y.getCursorPosition(),h=y.session.getLine(x.row),g;return y.completers.forEach((function(s){s.identifierRegexps&&s.identifierRegexps.forEach((function(l){!g&&l&&(g=this.retrievePrecedingIdentifier(h,x.column,l))}).bind(this))}).bind(this)),g||this.retrievePrecedingIdentifier(h,x.column)},r.triggerAutocomplete=function(y,h){var h=h??y.session.getPrecedingCharacter();return y.completers.some(function(g){if(g.triggerCharacters&&Array.isArray(g.triggerCharacters))return g.triggerCharacters.includes(h)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function(e,r,v){var m=e("./keyboard/hash_handler").HashHandler,y=e("./autocomplete/popup").AcePopup,x=e("./autocomplete/inline").AceInline,h=e("./autocomplete/popup").getAriaId,g=e("./autocomplete/util"),s=e("./lib/lang"),l=e("./lib/dom"),c=e("./snippets").snippetManager,a=e("./config"),o=e("./lib/event"),u=e("./lib/scroll").preventParentScroll,d=function($,_){_.completer&&_.completer.destroy()},w=function(){function $(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new m,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=s.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=s.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=s.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=s.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=s.delayedCall((function(){var _=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!_||this.editor.completers.length===0||(this.completions=new E($.completionsForLoading),this.openPopup(this.editor,_.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty($,"completionsForLoading",{get:function(){return[{caption:a.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),$.prototype.$init=function(){return this.popup=new y(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(_){this.insertMatch(),_.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),o.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},$.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new x,this.inlineRenderer},$.prototype.getPopup=function(){return this.popup||this.$init()},$.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},$.prototype.$seen=function(_){!this.hasSeen.has(_)&&_&&_.completer&&_.completer.onSeen&&typeof _.completer.onSeen=="function"&&(_.completer.onSeen(this.editor,_),this.hasSeen.add(_))},$.prototype.$onPopupChange=function(_){if(this.inlineRenderer&&this.inlineEnabled){var C=_?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(C),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},$.prototype.$updateGhostText=function(_){var C=this.base.row,R=this.base.column,L=this.editor.getCursorPosition().column,F=this.editor.session.getLine(C).slice(R,L);this.inlineRenderer.show(this.editor,_,F)?this.$seen(_):this.inlineRenderer.hide()},$.prototype.$onPopupRender=function(){var _=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var C=this.popup.getFirstVisibleRow();C<=this.popup.getLastVisibleRow();C++){var R=this.popup.getData(C);R&&(!_||R.hideInlinePreview)&&this.$seen(R)}},$.prototype.$onPopupShow=function(_){this.$onPopupChange(_),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},$.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var _=this.editor.container.parentNode,C=[];_;)C.push(_),_.addEventListener("scroll",this.onLayoutChange,{passive:!0}),_=_.parentNode;this.$elements=C}},$.prototype.unObserveLayoutChanges=function(){var _=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(C){C.removeEventListener("scroll",_.onLayoutChange,{passive:!0})}),this.$elements=null},$.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},$.prototype.$updatePopupPosition=function(){var _=this.editor,C=_.renderer,R=C.layerConfig.lineHeight,L=C.$cursorLayer.getPixelPosition(this.base,!0);L.left-=this.popup.getTextLeftOffset();var F=_.container.getBoundingClientRect();L.top+=F.top-C.layerConfig.offset,L.left+=F.left-_.renderer.scrollLeft,L.left+=C.gutterWidth;var I={top:L.top,left:L.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(I.top+=C.$ghostTextWidget.el.offsetHeight);var H=_.container.getBoundingClientRect().bottom-R,P=H<I.top?{top:H,left:I.left}:I;this.popup.tryShow(P,R,"bottom")||this.popup.tryShow(L,R,"top")||this.popup.show(L,R)},$.prototype.openPopup=function(_,C,R){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var L=this.popup.getRow(),F=this.popup.data[L];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:h(this.popup.getRow()),inline:this.inlineEnabled}),_.keyBinding.addKeyboardHandler(this.keyboardHandler);var I;this.stickySelection&&(I=this.popup.data.indexOf(F)),(!I||I===-1)&&(I=0),this.popup.setRow(this.autoSelect?I:-1),I===L&&F!==this.completions.filtered[I]&&this.$onPopupChange();var H=this.inlineRenderer&&this.inlineEnabled;if(I===L&&H){var P=this.popup.getData(this.popup.getRow());this.$updateGhostText(P)}R||(this.popup.setTheme(_.getTheme()),this.popup.setFontSize(_.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},$.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},$.prototype.changeListener=function(_){var C=this.editor.selection.lead;(C.row!=this.base.row||C.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},$.prototype.blurListener=function(_){var C=document.activeElement,R=this.editor.textInput.getElement(),L=_.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(_.relatedTarget),F=this.popup&&this.popup.container;C!=R&&C.parentNode!=F&&!L&&C!=this.tooltipNode&&_.relatedTarget!=R&&this.detach()},$.prototype.mousedownListener=function(_){this.detach()},$.prototype.mousewheelListener=function(_){this.popup&&!this.popup.isMouseOver&&this.detach()},$.prototype.mouseOutListener=function(_){this.popup.isOpen&&this.$updatePopupPosition()},$.prototype.goTo=function(_){this.popup.goTo(_)},$.prototype.insertMatch=function(_,C){if(_||(_=this.popup.getData(this.popup.getRow())),!_)return!1;if(_.value==="")return this.detach();var R=this.completions,L=this.getCompletionProvider().insertMatch(this.editor,_,R.filterText,C);return this.completions==R&&this.detach(),L},$.prototype.showPopup=function(_,C){this.editor&&this.detach(),this.activated=!0,this.editor=_,_.completer!=this&&(_.completer&&_.completer.detach(),_.completer=this),_.on("changeSelection",this.changeListener),_.on("blur",this.blurListener),_.on("mousedown",this.mousedownListener),_.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,C)},$.prototype.getCompletionProvider=function(_){return this.completionProvider||(this.completionProvider=new b(_)),this.completionProvider},$.prototype.gatherCompletions=function(_,C){return this.getCompletionProvider().gatherCompletions(_,C)},$.prototype.updateCompletions=function(_,C){if(_&&this.base&&this.completions){var L=this.editor.getCursorPosition(),F=this.editor.session.getTextRange({start:this.base,end:L});if(F==this.completions.filterText)return;if(this.completions.setFilter(F),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==F&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,F,_);return}if(C&&C.matches){var L=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(L.row,L.column),this.base.$insertRight=!0,this.completions=new E(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",_)}var R=this.editor.getSession(),L=this.editor.getCursorPosition(),F=g.getCompletionPrefix(this.editor);this.base=R.doc.createAnchor(L.row,L.column-F.length),this.base.$insertRight=!0;var I={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:F,pos:L}).provideCompletions(this.editor,I,(function(H,P,O){var S=P.filtered,A=g.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),O){if(!S.length){var N=!this.autoShown&&this.emptyMessage;if(typeof N=="function"&&(N=this.emptyMessage(A)),N){var B=[{caption:N,value:""}];this.completions=new E(B),this.openPopup(this.editor,A,_),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(S.length==1&&S[0].value==A&&!S[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&S.length==1)return this.insertMatch(S[0])}this.completions=!O&&this.showLoadingState?new E($.completionsForLoading.concat(S),P.filterText):P,this.openPopup(this.editor,A,_),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!O)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},$.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},$.prototype.updateDocTooltip=function(){var _=this.popup,C=this.completions&&this.completions.filtered,R=C&&(C[_.getHoveredRow()]||C[_.getRow()]),L=null;if(!R||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var F=this.editor.completers.length,I=0;I<F;I++){var H=this.editor.completers[I];if(H.getDocTooltip&&R.completerId===H.id){L=H.getDocTooltip(R);break}}if(!L&&typeof R!="string"&&(L=R),typeof L=="string"&&(L={docText:L}),!L||!L.docHTML&&!L.docText)return this.hideDocTooltip();this.showDocTooltip(L)},$.prototype.showDocTooltip=function(_){this.tooltipNode||(this.tooltipNode=l.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",u));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var R=this.tooltipNode;_.docHTML?R.innerHTML=_.docHTML:_.docText&&(R.textContent=_.docText),R.parentNode||this.popup.container.appendChild(this.tooltipNode);var L=this.popup,F=L.container.getBoundingClientRect(),I=400,H=300,P=L.renderer.scrollBar.width||10,O=F.left,S=window.innerWidth-F.right-P,A=L.isTopdown?F.top:window.innerHeight-P-F.bottom,N=[Math.min(S/I,1),Math.min(O/I,1),Math.min(A/H*.9)],B=Math.max.apply(Math,N),U=R.style;U.display="block",B==N[0]?(U.left=F.right+1+"px",U.right="",U.maxWidth=I*B+"px",U.top=F.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-F.top,H)+"px"):B==N[1]?(U.right=window.innerWidth-F.left+"px",U.left="",U.maxWidth=I*B+"px",U.top=F.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-F.top,H)+"px"):B==N[2]&&(U.left=window.innerWidth-F.left+"px",U.maxWidth=Math.min(I,window.innerWidth)+"px",L.isTopdown?(U.top=F.bottom+"px",U.left=F.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-F.bottom,H)+"px"):(U.top=L.container.offsetTop-R.offsetHeight+"px",U.left=F.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(L.container.offsetTop,H)+"px"))},$.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var _=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==_&&this.editor.focus(),this.tooltipNode=null,_.parentNode&&_.parentNode.removeChild(_)}},$.prototype.onTooltipClick=function(_){for(var C=_.target;C&&C!=this.tooltipNode;){if(C.nodeName=="A"&&C.href){C.rel="noreferrer",C.target="_blank";break}C=C.parentNode}},$.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var _=this.popup.container;_&&_.parentNode&&_.parentNode.removeChild(_)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",d),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},$.for=function(_){return _.completer instanceof $||(_.completer&&(_.completer.destroy(),_.completer=null),a.get("sharedPopups")?($.$sharedInstance||($.$sharedInstance=new $),_.completer=$.$sharedInstance):(_.completer=new $,_.once("destroy",d))),_.completer},$}();w.prototype.commands={Up:function($){$.completer.goTo("up")},Down:function($){$.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function($){$.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function($){$.completer.goTo("end")},Esc:function($){$.completer.detach()},Return:function($){return $.completer.insertMatch()},"Shift-Return":function($){$.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function($){var _=$.completer.insertMatch();if(_||$.tabstopManager)return _;$.completer.goTo("down")},Backspace:function($){$.execCommand("backspace");var _=g.getCompletionPrefix($);!_&&$.completer&&$.completer.detach()},PageUp:function($){$.completer.popup.gotoPageUp()},PageDown:function($){$.completer.popup.gotoPageDown()}},w.startCommand={name:"startAutocomplete",exec:function($,_){var C=w.for($);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup($,_),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var b=function(){function $(_){this.initialPosition=_,this.active=!0}return $.prototype.insertByIndex=function(_,C,R){return!this.completions||!this.completions.filtered?!1:this.insertMatch(_,this.completions.filtered[C],R)},$.prototype.insertMatch=function(_,C,R){if(!C)return!1;if(_.startOperation({command:{name:"insertMatch"}}),C.completer&&C.completer.insertMatch)C.completer.insertMatch(_,C);else{if(!this.completions)return!1;var L=this.completions.filterText.length,F=0;if(C.range&&C.range.start.row===C.range.end.row&&(L-=this.initialPosition.prefix.length,L+=this.initialPosition.pos.column-C.range.start.column,F+=C.range.end.column-this.initialPosition.pos.column),L||F){var I;_.selection.getAllRanges?I=_.selection.getAllRanges():I=[_.getSelectionRange()];for(var H=0,P;P=I[H];H++)P.start.column-=L,P.end.column+=F,_.session.remove(P)}C.snippet?c.insertSnippet(_,C.snippet):this.$insertString(_,C),C.completer&&C.completer.onInsert&&typeof C.completer.onInsert=="function"&&C.completer.onInsert(_,C),C.command&&C.command==="startAutocomplete"&&_.execCommand(C.command)}return _.endOperation(),!0},$.prototype.$insertString=function(_,C){var R=C.value||C;_.execCommand("insertstring",R)},$.prototype.gatherCompletions=function(_,C){var R=_.getSession(),L=_.getCursorPosition(),F=g.getCompletionPrefix(_),I=[];this.completers=_.completers;var H=_.completers.length;return _.completers.forEach(function(P,O){P.getCompletions(_,R,L,F,function(S,A){P.hideInlinePreview&&(A=A.map(function(N){return Object.assign(N,{hideInlinePreview:P.hideInlinePreview})})),!S&&A&&(I=I.concat(A)),C(null,{prefix:g.getCompletionPrefix(_),matches:I,finished:--H===0})})}),!0},$.prototype.provideCompletions=function(_,C,R){var L=(function(P){var O=P.prefix,S=P.matches;this.completions=new E(S),C.exactMatch&&(this.completions.exactMatch=!0),C.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(O),(P.finished||this.completions.filtered.length)&&R(null,this.completions,P.finished)}).bind(this),F=!0,I=null;if(this.gatherCompletions(_,(function(P,O){if(this.active){P&&(R(P,[],!0),this.detach());var S=O.prefix;if(S.indexOf(O.prefix)===0){if(F){I=O;return}L(O)}}}).bind(this)),F=!1,I){var H=I;I=null,L(H)}},$.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(_){typeof _.cancel=="function"&&_.cancel()})},$}(),E=function(){function $(_,C){this.all=_,this.filtered=_,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return $.prototype.setFilter=function(_){if(_.length>this.filterText&&_.lastIndexOf(this.filterText,0)===0)var C=this.filtered;else var C=this.all;this.filterText=_,C=this.filterCompletions(C,this.filterText),C=C.sort(function(L,F){return F.exactMatch-L.exactMatch||F.$score-L.$score||(L.caption||L.value).localeCompare(F.caption||F.value)});var R=null;C=C.filter(function(L){var F=L.snippet||L.caption||L.value;return F===R?!1:(R=F,!0)}),this.filtered=C},$.prototype.filterCompletions=function(_,C){var R=[],L=C.toUpperCase(),F=C.toLowerCase();e:for(var I=0,H;H=_[I];I++){if(H.skipFilter){H.$score=H.score,R.push(H);continue}var P=!this.ignoreCaption&&H.caption||H.value||H.snippet;if(P){var O=-1,S=0,A=0,N,B;if(this.exactMatch){if(C!==P.substr(0,C.length))continue e}else{var U=P.toLowerCase().indexOf(F);if(U>-1)A=U;else for(var K=0;K<C.length;K++){var Z=P.indexOf(F[K],O+1),te=P.indexOf(L[K],O+1);if(N=Z>=0&&(te<0||Z<te)?Z:te,N<0)continue e;B=N-O-1,B>0&&(O===-1&&(A+=10),A+=B,S|=1<<K),O=N}}H.matchMask=S,H.exactMatch=A?0:1,H.$score=(H.score||0)-A,R.push(H)}}return R},$}();r.Autocomplete=w,r.CompletionProvider=b,r.FilteredList=E}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,r,v){function m(g,s){var l=g.getTextRange(x.fromPoints({row:0,column:0},s));return l.split(h).length-1}function y(g,s){var l=m(g,s),c=g.getValue().split(h),a=Object.create(null),o=c[l];return c.forEach(function(u,d){if(!(!u||u===o)){var w=Math.abs(l-d),b=c.length-w;a[u]?a[u]=Math.max(b,a[u]):a[u]=b}}),a}var x=e("../range").Range,h=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.getCompletions=function(g,s,l,c,a){var o=y(s,l),u=Object.keys(o);a(null,u.map(function(d){return{caption:d,value:d,score:o[d],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,r,v){var m=e("../snippets").snippetManager,y=e("../autocomplete").Autocomplete,x=e("../config"),h=e("../lib/lang"),g=e("../autocomplete/util"),s=e("../autocomplete/text_completer"),l={getCompletions:function(L,F,I,H,P){if(F.$mode.completer)return F.$mode.completer.getCompletions(L,F,I,H,P);var O=L.session.getState(I.row),S=F.$mode.getCompletions(O,F,I,H);S=S.map(function(A){return A.completerId=l.id,A}),P(null,S)},id:"keywordCompleter"},c=function(L){var F={};return L.replace(/\${(\d+)(:(.*?))?}/g,function(I,H,P,O){return F[H]=O||""}).replace(/\$(\d+?)/g,function(I,H){return F[H]})},a={getCompletions:function(L,F,I,H,P){var O=[],S=F.getTokenAt(I.row,I.column);S&&S.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?O.push("html-tag"):O=m.getActiveScopes(L);var A=m.snippetMap,N=[];O.forEach(function(B){for(var U=A[B]||[],K=U.length;K--;){var Z=U[K],te=Z.name||Z.tabTrigger;te&&N.push({caption:te,snippet:Z.content,meta:Z.tabTrigger&&!Z.name?Z.tabTrigger+"⇥ ":"snippet",completerId:a.id})}},this),P(null,N)},getDocTooltip:function(L){L.snippet&&!L.docHTML&&(L.docHTML=["<b>",h.escapeHTML(L.caption),"</b>","<hr></hr>",h.escapeHTML(c(L.snippet))].join(""))},id:"snippetCompleter"},o=[a,s,l];r.setCompleters=function(L){o.length=0,L&&o.push.apply(o,L)},r.addCompleter=function(L){o.push(L)},r.textCompleter=s,r.keyWordCompleter=l,r.snippetCompleter=a;var u={name:"expandSnippet",exec:function(L){return m.expandWithTab(L)},bindKey:"Tab"},d=function(L,F){w(F.session.$mode)},w=function(L){typeof L=="string"&&(L=x.$modes[L]),L&&(m.files||(m.files={}),b(L.$id,L.snippetFileId),L.modes&&L.modes.forEach(w))},b=function(L,F){!F||!L||m.files[L]||(m.files[L]={},x.loadModule(F,function(I){I&&(m.files[L]=I,!I.snippets&&I.snippetText&&(I.snippets=m.parseSnippetFile(I.snippetText)),m.register(I.snippets||[],I.scope),I.includeScopes&&(m.snippetMap[I.scope].includeScopes=I.includeScopes,I.includeScopes.forEach(function(H){w("ace/mode/"+H)})))}))},E=function(L){var F=L.editor,I=F.completer&&F.completer.activated;if(L.command.name==="backspace")I&&!g.getCompletionPrefix(F)&&F.completer.detach();else if(L.command.name==="insertstring"&&!I){$=L;var H=L.editor.$liveAutocompletionDelay;H?_.delay(H):C(L)}},$,_=h.delayedCall(function(){C($)},0),C=function(L){var F=L.editor,I=g.getCompletionPrefix(F),H=L.args,P=g.triggerAutocomplete(F,H);if(I&&I.length>=F.$liveAutocompletionThreshold||P){var O=y.for(F);O.autoShown=!0,O.showPopup(F)}},R=e("../editor").Editor;e("../config").defineOptions(R.prototype,"editor",{enableBasicAutocompletion:{set:function(L){L?(this.completers||(this.completers=Array.isArray(L)?L:o),this.commands.addCommand(y.startCommand)):this.commands.removeCommand(y.startCommand)},value:!1},enableLiveAutocompletion:{set:function(L){L?(this.completers||(this.completers=Array.isArray(L)?L:o),this.commands.on("afterExec",E)):this.commands.off("afterExec",E)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(L){L?(this.commands.addCommand(u),this.on("changeMode",d),d(null,this)):(this.commands.removeCommand(u),this.off("changeMode",d))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(e){n&&(n.exports=e)})}()}(zp)),zp.exports}R0();var Hp={exports:{}},Up;function E0(){return Up||(Up=1,function(n,t){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(e,r,v){v.exports=`
|
1225
|
+
|
1226
|
+
/* ------------------------------------------------------------------------------------------
|
1227
|
+
* Editor Search Form
|
1228
|
+
* --------------------------------------------------------------------------------------- */
|
1229
|
+
.ace_search {
|
1230
|
+
background-color: #ddd;
|
1231
|
+
color: #666;
|
1232
|
+
border: 1px solid #cbcbcb;
|
1233
|
+
border-top: 0 none;
|
1234
|
+
overflow: hidden;
|
1235
|
+
margin: 0;
|
1236
|
+
padding: 4px 6px 0 4px;
|
1237
|
+
position: absolute;
|
1238
|
+
top: 0;
|
1239
|
+
z-index: 99;
|
1240
|
+
white-space: normal;
|
1241
|
+
}
|
1242
|
+
.ace_search.left {
|
1243
|
+
border-left: 0 none;
|
1244
|
+
border-radius: 0px 0px 5px 0px;
|
1245
|
+
left: 0;
|
1246
|
+
}
|
1247
|
+
.ace_search.right {
|
1248
|
+
border-radius: 0px 0px 0px 5px;
|
1249
|
+
border-right: 0 none;
|
1250
|
+
right: 0;
|
1251
|
+
}
|
1252
|
+
|
1253
|
+
.ace_search_form, .ace_replace_form {
|
1254
|
+
margin: 0 20px 4px 0;
|
1255
|
+
overflow: hidden;
|
1256
|
+
line-height: 1.9;
|
1257
|
+
}
|
1258
|
+
.ace_replace_form {
|
1259
|
+
margin-right: 0;
|
1260
|
+
}
|
1261
|
+
.ace_search_form.ace_nomatch {
|
1262
|
+
outline: 1px solid red;
|
1263
|
+
}
|
1264
|
+
|
1265
|
+
.ace_search_field {
|
1266
|
+
border-radius: 3px 0 0 3px;
|
1267
|
+
background-color: white;
|
1268
|
+
color: black;
|
1269
|
+
border: 1px solid #cbcbcb;
|
1270
|
+
border-right: 0 none;
|
1271
|
+
outline: 0;
|
1272
|
+
padding: 0;
|
1273
|
+
font-size: inherit;
|
1274
|
+
margin: 0;
|
1275
|
+
line-height: inherit;
|
1276
|
+
padding: 0 6px;
|
1277
|
+
min-width: 17em;
|
1278
|
+
vertical-align: top;
|
1279
|
+
min-height: 1.8em;
|
1280
|
+
box-sizing: content-box;
|
1281
|
+
}
|
1282
|
+
.ace_searchbtn {
|
1283
|
+
border: 1px solid #cbcbcb;
|
1284
|
+
line-height: inherit;
|
1285
|
+
display: inline-block;
|
1286
|
+
padding: 0 6px;
|
1287
|
+
background: #fff;
|
1288
|
+
border-right: 0 none;
|
1289
|
+
border-left: 1px solid #dcdcdc;
|
1290
|
+
cursor: pointer;
|
1291
|
+
margin: 0;
|
1292
|
+
position: relative;
|
1293
|
+
color: #666;
|
1294
|
+
}
|
1295
|
+
.ace_searchbtn:last-child {
|
1296
|
+
border-radius: 0 3px 3px 0;
|
1297
|
+
border-right: 1px solid #cbcbcb;
|
1298
|
+
}
|
1299
|
+
.ace_searchbtn:disabled {
|
1300
|
+
background: none;
|
1301
|
+
cursor: default;
|
1302
|
+
}
|
1303
|
+
.ace_searchbtn:hover {
|
1304
|
+
background-color: #eef1f6;
|
1305
|
+
}
|
1306
|
+
.ace_searchbtn.prev, .ace_searchbtn.next {
|
1307
|
+
padding: 0px 0.7em
|
1308
|
+
}
|
1309
|
+
.ace_searchbtn.prev:after, .ace_searchbtn.next:after {
|
1310
|
+
content: "";
|
1311
|
+
border: solid 2px #888;
|
1312
|
+
width: 0.5em;
|
1313
|
+
height: 0.5em;
|
1314
|
+
border-width: 2px 0 0 2px;
|
1315
|
+
display:inline-block;
|
1316
|
+
transform: rotate(-45deg);
|
1317
|
+
}
|
1318
|
+
.ace_searchbtn.next:after {
|
1319
|
+
border-width: 0 2px 2px 0 ;
|
1320
|
+
}
|
1321
|
+
.ace_searchbtn_close {
|
1322
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
|
1323
|
+
border-radius: 50%;
|
1324
|
+
border: 0 none;
|
1325
|
+
color: #656565;
|
1326
|
+
cursor: pointer;
|
1327
|
+
font: 16px/16px Arial;
|
1328
|
+
padding: 0;
|
1329
|
+
height: 14px;
|
1330
|
+
width: 14px;
|
1331
|
+
top: 9px;
|
1332
|
+
right: 7px;
|
1333
|
+
position: absolute;
|
1334
|
+
}
|
1335
|
+
.ace_searchbtn_close:hover {
|
1336
|
+
background-color: #656565;
|
1337
|
+
background-position: 50% 100%;
|
1338
|
+
color: white;
|
1339
|
+
}
|
1340
|
+
|
1341
|
+
.ace_button {
|
1342
|
+
margin-left: 2px;
|
1343
|
+
cursor: pointer;
|
1344
|
+
-webkit-user-select: none;
|
1345
|
+
-moz-user-select: none;
|
1346
|
+
-o-user-select: none;
|
1347
|
+
-ms-user-select: none;
|
1348
|
+
user-select: none;
|
1349
|
+
overflow: hidden;
|
1350
|
+
opacity: 0.7;
|
1351
|
+
border: 1px solid rgba(100,100,100,0.23);
|
1352
|
+
padding: 1px;
|
1353
|
+
box-sizing: border-box!important;
|
1354
|
+
color: black;
|
1355
|
+
}
|
1356
|
+
|
1357
|
+
.ace_button:hover {
|
1358
|
+
background-color: #eee;
|
1359
|
+
opacity:1;
|
1360
|
+
}
|
1361
|
+
.ace_button:active {
|
1362
|
+
background-color: #ddd;
|
1363
|
+
}
|
1364
|
+
|
1365
|
+
.ace_button.checked {
|
1366
|
+
border-color: #3399ff;
|
1367
|
+
opacity:1;
|
1368
|
+
}
|
1369
|
+
|
1370
|
+
.ace_search_options{
|
1371
|
+
margin-bottom: 3px;
|
1372
|
+
text-align: right;
|
1373
|
+
-webkit-user-select: none;
|
1374
|
+
-moz-user-select: none;
|
1375
|
+
-o-user-select: none;
|
1376
|
+
-ms-user-select: none;
|
1377
|
+
user-select: none;
|
1378
|
+
clear: both;
|
1379
|
+
}
|
1380
|
+
|
1381
|
+
.ace_search_counter {
|
1382
|
+
float: left;
|
1383
|
+
font-family: arial;
|
1384
|
+
padding: 0 8px;
|
1385
|
+
}`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(e,r,v){var m=e("../lib/dom"),y=e("../lib/lang"),x=e("../lib/event"),h=e("./searchbox-css"),g=e("../keyboard/hash_handler").HashHandler,s=e("../lib/keys"),l=e("../config").nls,c=999;m.importCssString(h,"ace_searchbox",!1);var a=function(){function d(w,b,E){this.activeInput,this.element=m.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:l("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"},l("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:l("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},l("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},l("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:l("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:l("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:l("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:l("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:l("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),m.importCssString(h,"ace_searchbox",w.container),x.addListener(this.element,"touchstart",function($){$.stopPropagation()},w)}return d.prototype.setEditor=function(w){w.searchBox=this,w.renderer.scroller.appendChild(this.element),this.editor=w},d.prototype.setSession=function(w){this.searchRange=null,this.$syncOptions(!0)},d.prototype.onEditorInput=function(){this.find(!1,!1,!0)},d.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")},d.prototype.$init=function(){var w=this.element;this.$initElements(w);var b=this;x.addListener(w,"mousedown",function(E){setTimeout(function(){b.activeInput.focus()},0),x.stopPropagation(E)}),x.addListener(w,"click",function(E){var $=E.target||E.srcElement,_=$.getAttribute("action");_&&b[_]?b[_]():b.$searchBarKb.commands[_]&&b.$searchBarKb.commands[_].exec(b),x.stopPropagation(E)}),x.addCommandKeyListener(w,function(E,$,_){var C=s.keyCodeToString(_),R=b.$searchBarKb.findKeyCommand($,C);R&&R.exec&&(R.exec(b),x.stopEvent(E))}),this.$onChange=y.delayedCall(function(){b.find(!1,!1)}),x.addListener(this.searchInput,"input",function(){b.$onChange.schedule(20)}),x.addListener(this.searchInput,"focus",function(){b.activeInput=b.searchInput,b.searchInput.value&&b.highlight()}),x.addListener(this.replaceInput,"focus",function(){b.activeInput=b.replaceInput,b.searchInput.value&&b.highlight()})},d.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)},d.prototype.$syncOptions=function(w){m.setCssClass(this.replaceOption,"checked",this.searchRange),m.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",m.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),m.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),m.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var b=this.editor.getReadOnly();this.replaceOption.style.display=b?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!b?"":"none",this.find(!1,!1,w)},d.prototype.highlight=function(w){this.editor.session.highlight(w||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},d.prototype.find=function(w,b,E){var $=this.editor.find(this.searchInput.value,{skipCurrent:w,backwards:b,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:E,range:this.searchRange}),_=!$&&this.searchInput.value;m.setCssClass(this.searchBox,"ace_nomatch",_),this.editor._emit("findSearchBox",{match:!_}),this.highlight(),this.updateCounter()},d.prototype.updateCounter=function(){var w=this.editor,b=w.$search.$options.re,E=b.unicode,$=0,_=0;if(b){var C=this.searchRange?w.session.getTextRange(this.searchRange):w.getValue();w.$search.$isMultilineSearch(w.getLastSearchOptions())&&(C=C.replace(/\r\n|\r|\n/g,`
|
1386
|
+
`),w.session.doc.$autoNewLine=`
|
1387
|
+
`);var R=w.session.doc.positionToIndex(w.selection.anchor);this.searchRange&&(R-=w.session.doc.positionToIndex(this.searchRange.start));for(var L=b.lastIndex=0,F;(F=b.exec(C))&&($++,L=F.index,L<=R&&_++,!($>c||!F[0]&&(b.lastIndex=L+=y.skipEmptyMatch(C,L,E),L>=C.length))););}this.searchCounter.textContent=l("search-box.search-counter","$0 of $1",[_,$>c?c+"+":$])},d.prototype.findNext=function(){this.find(!0,!1)},d.prototype.findPrev=function(){this.find(!0,!0)},d.prototype.findAll=function(){var w=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),b=!w&&this.searchInput.value;m.setCssClass(this.searchBox,"ace_nomatch",b),this.editor._emit("findSearchBox",{match:!b}),this.highlight(),this.hide()},d.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},d.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},d.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},d.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()},d.prototype.show=function(w,b){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=b,this.editor.$search.$options.regExp&&(w=y.escapeRegExp(w)),w&&(this.searchInput.value=w),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},d.prototype.isFocused=function(){var w=document.activeElement;return w==this.searchInput||w==this.replaceInput},d}(),o=new g;o.bindKeys({"Ctrl-f|Command-f":function(d){var w=d.isReplace=!d.isReplace;d.replaceBox.style.display=w?"":"none",d.replaceOption.checked=!1,d.$syncOptions(),d.searchInput.focus()},"Ctrl-H|Command-Option-F":function(d){d.editor.getReadOnly()||(d.replaceOption.checked=!0,d.$syncOptions(),d.replaceInput.focus())},"Ctrl-G|Command-G":function(d){d.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(d){d.findPrev()},esc:function(d){setTimeout(function(){d.hide()})},Return:function(d){d.activeInput==d.replaceInput&&d.replace(),d.findNext()},"Shift-Return":function(d){d.activeInput==d.replaceInput&&d.replace(),d.findPrev()},"Alt-Return":function(d){d.activeInput==d.replaceInput&&d.replaceAll(),d.findAll()},Tab:function(d){(d.activeInput==d.replaceInput?d.searchInput:d.replaceInput).focus()}}),o.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(d){d.regExpOption.checked=!d.regExpOption.checked,d.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(d){d.caseSensitiveOption.checked=!d.caseSensitiveOption.checked,d.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(d){d.wholeWordOption.checked=!d.wholeWordOption.checked,d.$syncOptions()}},{name:"toggleReplace",exec:function(d){d.replaceOption.checked=!d.replaceOption.checked,d.$syncOptions()}},{name:"searchInSelection",exec:function(d){d.searchOption.checked=!d.searchRange,d.setSearchRange(d.searchOption.checked&&d.editor.getSelectionRange()),d.$syncOptions()}}]);var u=new g([{bindKey:"Esc",name:"closeSearchBar",exec:function(d){d.searchBox.hide()}}]);a.prototype.$searchBarKb=o,a.prototype.$closeSearchBarKb=u,r.SearchBox=a,r.Search=function(d,w){var b=d.searchBox||new a(d);b.show(d.session.getTextRange(),w)}}),function(){ace.require(["ace/ext/searchbox"],function(e){n&&(n.exports=e)})}()}(Hp)),Hp.exports}E0();var L0=Object.defineProperty,O0=(n,t,e)=>t in n?L0(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,cl=(n,t,e)=>O0(n,typeof t!="symbol"?t+"":t,e);function Vp(n,t){return function(){return n.apply(t,arguments)}}const{toString:N0}=Object.prototype,{getPrototypeOf:Kc}=Object,ul=(n=>t=>{const e=N0.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ai=n=>(n=n.toLowerCase(),t=>ul(t)===n),hl=n=>t=>typeof t===n,{isArray:Ws}=Array,ba=hl("undefined");function D0(n){return n!==null&&!ba(n)&&n.constructor!==null&&!ba(n.constructor)&&Kr(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const qp=Ai("ArrayBuffer");function F0(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&qp(n.buffer),t}const P0=hl("string"),Kr=hl("function"),Kp=hl("number"),dl=n=>n!==null&&typeof n=="object",W0=n=>n===!0||n===!1,pl=n=>{if(ul(n)!=="object")return!1;const t=Kc(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},B0=Ai("Date"),z0=Ai("File"),j0=Ai("Blob"),H0=Ai("FileList"),U0=n=>dl(n)&&Kr(n.pipe),V0=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Kr(n.append)&&((t=ul(n))==="formdata"||t==="object"&&Kr(n.toString)&&n.toString()==="[object FormData]"))},q0=Ai("URLSearchParams"),[K0,G0,Y0,X0]=["ReadableStream","Request","Response","Headers"].map(Ai),Q0=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xa(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,v;if(typeof n!="object"&&(n=[n]),Ws(n))for(r=0,v=n.length;r<v;r++)t.call(null,n[r],r,n);else{const m=e?Object.getOwnPropertyNames(n):Object.keys(n),y=m.length;let x;for(r=0;r<y;r++)x=m[r],t.call(null,n[x],x,n)}}function Gp(n,t){t=t.toLowerCase();const e=Object.keys(n);let r=e.length,v;for(;r-- >0;)if(v=e[r],t===v.toLowerCase())return v;return null}const es=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Yp=n=>!ba(n)&&n!==es;function Gc(){const{caseless:n}=Yp(this)&&this||{},t={},e=(r,v)=>{const m=n&&Gp(t,v)||v;pl(t[m])&&pl(r)?t[m]=Gc(t[m],r):pl(r)?t[m]=Gc({},r):Ws(r)?t[m]=r.slice():t[m]=r};for(let r=0,v=arguments.length;r<v;r++)arguments[r]&&xa(arguments[r],e);return t}const Z0=(n,t,e,{allOwnKeys:r}={})=>(xa(t,(v,m)=>{e&&Kr(v)?n[m]=Vp(v,e):n[m]=v},{allOwnKeys:r}),n),J0=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),ex=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},tx=(n,t,e,r)=>{let v,m,y;const x={};if(t=t||{},n==null)return t;do{for(v=Object.getOwnPropertyNames(n),m=v.length;m-- >0;)y=v[m],(!r||r(y,n,t))&&!x[y]&&(t[y]=n[y],x[y]=!0);n=e!==!1&&Kc(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},nx=(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},rx=n=>{if(!n)return null;if(Ws(n))return n;let t=n.length;if(!Kp(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},ix=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Kc(Uint8Array)),ox=(n,t)=>{const e=(n&&n[Symbol.iterator]).call(n);let r;for(;(r=e.next())&&!r.done;){const v=r.value;t.call(n,v[0],v[1])}},sx=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},ax=Ai("HTMLFormElement"),lx=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),Xp=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),cx=Ai("RegExp"),Qp=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};xa(e,(v,m)=>{let y;(y=t(v,m,n))!==!1&&(r[m]=y||v)}),Object.defineProperties(n,r)},ux=n=>{Qp(n,(t,e)=>{if(Kr(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(Kr(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+"'")})}})},hx=(n,t)=>{const e={},r=v=>{v.forEach(m=>{e[m]=!0})};return Ws(n)?r(n):r(String(n).split(t)),e},dx=()=>{},px=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function gx(n){return!!(n&&Kr(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const fx=n=>{const t=new Array(10),e=(r,v)=>{if(dl(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[v]=r;const m=Ws(r)?[]:{};return xa(r,(y,x)=>{const h=e(y,v+1);!ba(h)&&(m[x]=h)}),t[v]=void 0,m}}return r};return e(n,0)},mx=Ai("AsyncFunction"),vx=n=>n&&(dl(n)||Kr(n))&&Kr(n.then)&&Kr(n.catch),Zp=((n,t)=>n?setImmediate:t?((e,r)=>(es.addEventListener("message",({source:v,data:m})=>{v===es&&m===e&&r.length&&r.shift()()},!1),v=>{r.push(v),es.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Kr(es.postMessage)),yx=typeof queueMicrotask<"u"?queueMicrotask.bind(es):typeof process<"u"&&process.nextTick||Zp,Se={isArray:Ws,isArrayBuffer:qp,isBuffer:D0,isFormData:V0,isArrayBufferView:F0,isString:P0,isNumber:Kp,isBoolean:W0,isObject:dl,isPlainObject:pl,isReadableStream:K0,isRequest:G0,isResponse:Y0,isHeaders:X0,isUndefined:ba,isDate:B0,isFile:z0,isBlob:j0,isRegExp:cx,isFunction:Kr,isStream:U0,isURLSearchParams:q0,isTypedArray:ix,isFileList:H0,forEach:xa,merge:Gc,extend:Z0,trim:Q0,stripBOM:J0,inherits:ex,toFlatObject:tx,kindOf:ul,kindOfTest:Ai,endsWith:nx,toArray:rx,forEachEntry:ox,matchAll:sx,isHTMLForm:ax,hasOwnProperty:Xp,hasOwnProp:Xp,reduceDescriptors:Qp,freezeMethods:ux,toObjectSet:hx,toCamelCase:lx,noop:dx,toFiniteNumber:px,findKey:Gp,global:es,isContextDefined:Yp,isSpecCompliantForm:gx,toJSONObject:fx,isAsyncFn:mx,isThenable:vx,setImmediate:Zp,asap:yx};function St(n,t,e,r,v){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),r&&(this.request=r),v&&(this.response=v,this.status=v.status?v.status:null)}Se.inherits(St,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Se.toJSONObject(this.config),code:this.code,status:this.status}}});const Jp=St.prototype,eg={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{eg[n]={value:n}}),Object.defineProperties(St,eg),Object.defineProperty(Jp,"isAxiosError",{value:!0}),St.from=(n,t,e,r,v,m)=>{const y=Object.create(Jp);return Se.toFlatObject(n,y,function(x){return x!==Error.prototype},x=>x!=="isAxiosError"),St.call(y,n.message,t,e,r,v),y.cause=n,y.name=n.name,m&&Object.assign(y,m),y};const wx=null;function Yc(n){return Se.isPlainObject(n)||Se.isArray(n)}function tg(n){return Se.endsWith(n,"[]")?n.slice(0,-2):n}function ng(n,t,e){return n?n.concat(t).map(function(r,v){return r=tg(r),!e&&v?"["+r+"]":r}).join(e?".":""):t}function bx(n){return Se.isArray(n)&&!n.some(Yc)}const xx=Se.toFlatObject(Se,{},null,function(n){return/^is[A-Z]/.test(n)});function gl(n,t,e){if(!Se.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=Se.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(a,o){return!Se.isUndefined(o[a])});const r=e.metaTokens,v=e.visitor||g,m=e.dots,y=e.indexes,x=(e.Blob||typeof Blob<"u"&&Blob)&&Se.isSpecCompliantForm(t);if(!Se.isFunction(v))throw new TypeError("visitor must be a function");function h(a){if(a===null)return"";if(Se.isDate(a))return a.toISOString();if(!x&&Se.isBlob(a))throw new St("Blob is not supported. Use a Buffer instead.");return Se.isArrayBuffer(a)||Se.isTypedArray(a)?x&&typeof Blob=="function"?new Blob([a]):Buffer.from(a):a}function g(a,o,u){let d=a;if(a&&!u&&typeof a=="object"){if(Se.endsWith(o,"{}"))o=r?o:o.slice(0,-2),a=JSON.stringify(a);else if(Se.isArray(a)&&bx(a)||(Se.isFileList(a)||Se.endsWith(o,"[]"))&&(d=Se.toArray(a)))return o=tg(o),d.forEach(function(w,b){!(Se.isUndefined(w)||w===null)&&t.append(y===!0?ng([o],b,m):y===null?o:o+"[]",h(w))}),!1}return Yc(a)?!0:(t.append(ng(u,o,m),h(a)),!1)}const s=[],l=Object.assign(xx,{defaultVisitor:g,convertValue:h,isVisitable:Yc});function c(a,o){if(!Se.isUndefined(a)){if(s.indexOf(a)!==-1)throw Error("Circular reference detected in "+o.join("."));s.push(a),Se.forEach(a,function(u,d){(!(Se.isUndefined(u)||u===null)&&v.call(t,u,Se.isString(d)?d.trim():d,o,l))===!0&&c(u,o?o.concat(d):[d])}),s.pop()}}if(!Se.isObject(n))throw new TypeError("data must be an object");return c(n),t}function rg(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Xc(n,t){this._pairs=[],n&&gl(n,this,t)}const ig=Xc.prototype;ig.append=function(n,t){this._pairs.push([n,t])},ig.toString=function(n){const t=n?function(e){return n.call(this,e,rg)}:rg;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function Cx(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function og(n,t,e){if(!t)return n;const r=e&&e.encode||Cx;Se.isFunction(e)&&(e={serialize:e});const v=e&&e.serialize;let m;if(v?m=v(t,e):m=Se.isURLSearchParams(t)?t.toString():new Xc(t,e).toString(r),m){const y=n.indexOf("#");y!==-1&&(n=n.slice(0,y)),n+=(n.indexOf("?")===-1?"?":"&")+m}return n}class sg{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){Se.forEach(this.handlers,function(e){e!==null&&t(e)})}}const ag={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},kx=typeof URLSearchParams<"u"?URLSearchParams:Xc,_x=typeof FormData<"u"?FormData:null,Ax=typeof Blob<"u"?Blob:null,Sx={isBrowser:!0,classes:{URLSearchParams:kx,FormData:_x,Blob:Ax},protocols:["http","https","file","blob","url","data"]},Qc=typeof window<"u"&&typeof document<"u",Zc=typeof navigator=="object"&&navigator||void 0,Tx=Qc&&(!Zc||["ReactNative","NativeScript","NS"].indexOf(Zc.product)<0),$x=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Mx=Qc&&window.location.href||"http://localhost",Ix=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qc,hasStandardBrowserEnv:Tx,hasStandardBrowserWebWorkerEnv:$x,navigator:Zc,origin:Mx},Symbol.toStringTag,{value:"Module"})),vr={...Ix,...Sx};function Rx(n,t){return gl(n,new vr.classes.URLSearchParams,Object.assign({visitor:function(e,r,v,m){return vr.isNode&&Se.isBuffer(e)?(this.append(r,e.toString("base64")),!1):m.defaultVisitor.apply(this,arguments)}},t))}function Ex(n){return Se.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Lx(n){const t={},e=Object.keys(n);let r;const v=e.length;let m;for(r=0;r<v;r++)m=e[r],t[m]=n[m];return t}function lg(n){function t(e,r,v,m){let y=e[m++];if(y==="__proto__")return!0;const x=Number.isFinite(+y),h=m>=e.length;return y=!y&&Se.isArray(v)?v.length:y,h?(Se.hasOwnProp(v,y)?v[y]=[v[y],r]:v[y]=r,!x):((!v[y]||!Se.isObject(v[y]))&&(v[y]=[]),t(e,r,v[y],m)&&Se.isArray(v[y])&&(v[y]=Lx(v[y])),!x)}if(Se.isFormData(n)&&Se.isFunction(n.entries)){const e={};return Se.forEachEntry(n,(r,v)=>{t(Ex(r),v,e,0)}),e}return null}function Ox(n,t,e){if(Se.isString(n))try{return(t||JSON.parse)(n),Se.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const Ca={transitional:ag,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,v=Se.isObject(n);if(v&&Se.isHTMLForm(n)&&(n=new FormData(n)),Se.isFormData(n))return r?JSON.stringify(lg(n)):n;if(Se.isArrayBuffer(n)||Se.isBuffer(n)||Se.isStream(n)||Se.isFile(n)||Se.isBlob(n)||Se.isReadableStream(n))return n;if(Se.isArrayBufferView(n))return n.buffer;if(Se.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let m;if(v){if(e.indexOf("application/x-www-form-urlencoded")>-1)return Rx(n,this.formSerializer).toString();if((m=Se.isFileList(n))||e.indexOf("multipart/form-data")>-1){const y=this.env&&this.env.FormData;return gl(m?{"files[]":n}:n,y&&new y,this.formSerializer)}}return v||r?(t.setContentType("application/json",!1),Ox(n)):n}],transformResponse:[function(n){const t=this.transitional||Ca.transitional,e=t&&t.forcedJSONParsing,r=this.responseType==="json";if(Se.isResponse(n)||Se.isReadableStream(n))return n;if(n&&Se.isString(n)&&(e&&!this.responseType||r)){const v=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(m){if(v)throw m.name==="SyntaxError"?St.from(m,St.ERR_BAD_RESPONSE,this,null,this.response):m}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:vr.classes.FormData,Blob:vr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Se.forEach(["delete","get","head","post","put","patch"],n=>{Ca.headers[n]={}});const Nx=Se.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Dx=n=>{const t={};let e,r,v;return n&&n.split(`
|
1388
|
+
`).forEach(function(m){v=m.indexOf(":"),e=m.substring(0,v).trim().toLowerCase(),r=m.substring(v+1).trim(),!(!e||t[e]&&Nx[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},cg=Symbol("internals");function ka(n){return n&&String(n).trim().toLowerCase()}function fl(n){return n===!1||n==null?n:Se.isArray(n)?n.map(fl):String(n)}function Fx(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 Px=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Jc(n,t,e,r,v){if(Se.isFunction(r))return r.call(this,t,e);if(v&&(t=e),!!Se.isString(t)){if(Se.isString(r))return t.indexOf(r)!==-1;if(Se.isRegExp(r))return r.test(t)}}function Wx(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function Bx(n,t){const e=Se.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{value:function(v,m,y){return this[r].call(this,t,v,m,y)},configurable:!0})})}let Fr=class{constructor(n){n&&this.set(n)}set(n,t,e){const r=this;function v(y,x,h){const g=ka(x);if(!g)throw new Error("header name must be a non-empty string");const s=Se.findKey(r,g);(!s||r[s]===void 0||h===!0||h===void 0&&r[s]!==!1)&&(r[s||x]=fl(y))}const m=(y,x)=>Se.forEach(y,(h,g)=>v(h,g,x));if(Se.isPlainObject(n)||n instanceof this.constructor)m(n,t);else if(Se.isString(n)&&(n=n.trim())&&!Px(n))m(Dx(n),t);else if(Se.isHeaders(n))for(const[y,x]of n.entries())v(x,y,e);else n!=null&&v(t,n,e);return this}get(n,t){if(n=ka(n),n){const e=Se.findKey(this,n);if(e){const r=this[e];if(!t)return r;if(t===!0)return Fx(r);if(Se.isFunction(t))return t.call(this,r,e);if(Se.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,t){if(n=ka(n),n){const e=Se.findKey(this,n);return!!(e&&this[e]!==void 0&&(!t||Jc(this,this[e],e,t)))}return!1}delete(n,t){const e=this;let r=!1;function v(m){if(m=ka(m),m){const y=Se.findKey(e,m);y&&(!t||Jc(e,e[y],y,t))&&(delete e[y],r=!0)}}return Se.isArray(n)?n.forEach(v):v(n),r}clear(n){const t=Object.keys(this);let e=t.length,r=!1;for(;e--;){const v=t[e];(!n||Jc(this,this[v],v,n,!0))&&(delete this[v],r=!0)}return r}normalize(n){const t=this,e={};return Se.forEach(this,(r,v)=>{const m=Se.findKey(e,v);if(m){t[m]=fl(r),delete t[v];return}const y=n?Wx(v):String(v).trim();y!==v&&delete t[v],t[y]=fl(r),e[y]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const t=Object.create(null);return Se.forEach(this,(e,r)=>{e!=null&&e!==!1&&(t[r]=n&&Se.isArray(e)?e.join(", "):e)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,t])=>n+": "+t).join(`
|
1389
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...t){const e=new this(n);return t.forEach(r=>e.set(r)),e}static accessor(n){const t=(this[cg]=this[cg]={accessors:{}}).accessors,e=this.prototype;function r(v){const m=ka(v);t[m]||(Bx(e,v),t[m]=!0)}return Se.isArray(n)?n.forEach(r):r(n),this}};Fr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Se.reduceDescriptors(Fr.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),Se.freezeMethods(Fr);function eu(n,t){const e=this||Ca,r=t||e,v=Fr.from(r.headers);let m=r.data;return Se.forEach(n,function(y){m=y.call(e,m,v.normalize(),t?t.status:void 0)}),v.normalize(),m}function ug(n){return!!(n&&n.__CANCEL__)}function Bs(n,t,e){St.call(this,n??"canceled",St.ERR_CANCELED,t,e),this.name="CanceledError"}Se.inherits(Bs,St,{__CANCEL__:!0});function hg(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new St("Request failed with status code "+e.status,[St.ERR_BAD_REQUEST,St.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function zx(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function jx(n,t){n=n||10;const e=new Array(n),r=new Array(n);let v=0,m=0,y;return t=t!==void 0?t:1e3,function(x){const h=Date.now(),g=r[m];y||(y=h),e[v]=x,r[v]=h;let s=m,l=0;for(;s!==v;)l+=e[s++],s=s%n;if(v=(v+1)%n,v===m&&(m=(m+1)%n),h-y<t)return;const c=g&&h-g;return c?Math.round(l*1e3/c):void 0}}function Hx(n,t){let e=0,r=1e3/t,v,m;const y=(x,h=Date.now())=>{e=h,v=null,m&&(clearTimeout(m),m=null),n.apply(null,x)};return[(...x)=>{const h=Date.now(),g=h-e;g>=r?y(x,h):(v=x,m||(m=setTimeout(()=>{m=null,y(v)},r-g)))},()=>v&&y(v)]}const ml=(n,t,e=3)=>{let r=0;const v=jx(50,250);return Hx(m=>{const y=m.loaded,x=m.lengthComputable?m.total:void 0,h=y-r,g=v(h),s=y<=x;r=y;const l={loaded:y,total:x,progress:x?y/x:void 0,bytes:h,rate:g||void 0,estimated:g&&x&&s?(x-y)/g:void 0,event:m,lengthComputable:x!=null,[t?"download":"upload"]:!0};n(l)},e)},dg=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},pg=n=>(...t)=>Se.asap(()=>n(...t)),Ux=vr.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,vr.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(vr.origin),vr.navigator&&/(msie|trident)/i.test(vr.navigator.userAgent)):()=>!0,Vx=vr.hasStandardBrowserEnv?{write(n,t,e,r,v,m){const y=[n+"="+encodeURIComponent(t)];Se.isNumber(e)&&y.push("expires="+new Date(e).toGMTString()),Se.isString(r)&&y.push("path="+r),Se.isString(v)&&y.push("domain="+v),m===!0&&y.push("secure"),document.cookie=y.join("; ")},read(n){const t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function qx(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Kx(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function gg(n,t,e){let r=!qx(t);return n&&(r||e==!1)?Kx(n,t):t}const fg=n=>n instanceof Fr?{...n}:n;function ts(n,t){t=t||{};const e={};function r(g,s,l,c){return Se.isPlainObject(g)&&Se.isPlainObject(s)?Se.merge.call({caseless:c},g,s):Se.isPlainObject(s)?Se.merge({},s):Se.isArray(s)?s.slice():s}function v(g,s,l,c){if(Se.isUndefined(s)){if(!Se.isUndefined(g))return r(void 0,g,l,c)}else return r(g,s,l,c)}function m(g,s){if(!Se.isUndefined(s))return r(void 0,s)}function y(g,s){if(Se.isUndefined(s)){if(!Se.isUndefined(g))return r(void 0,g)}else return r(void 0,s)}function x(g,s,l){if(l in t)return r(g,s);if(l in n)return r(void 0,g)}const h={url:m,method:m,data:m,baseURL:y,transformRequest:y,transformResponse:y,paramsSerializer:y,timeout:y,timeoutMessage:y,withCredentials:y,withXSRFToken:y,adapter:y,responseType:y,xsrfCookieName:y,xsrfHeaderName:y,onUploadProgress:y,onDownloadProgress:y,decompress:y,maxContentLength:y,maxBodyLength:y,beforeRedirect:y,transport:y,httpAgent:y,httpsAgent:y,cancelToken:y,socketPath:y,responseEncoding:y,validateStatus:x,headers:(g,s,l)=>v(fg(g),fg(s),l,!0)};return Se.forEach(Object.keys(Object.assign({},n,t)),function(g){const s=h[g]||v,l=s(n[g],t[g],g);Se.isUndefined(l)&&s!==x||(e[g]=l)}),e}const mg=n=>{const t=ts({},n);let{data:e,withXSRFToken:r,xsrfHeaderName:v,xsrfCookieName:m,headers:y,auth:x}=t;t.headers=y=Fr.from(y),t.url=og(gg(t.baseURL,t.url,t.allowAbsoluteUrls),n.params,n.paramsSerializer),x&&y.set("Authorization","Basic "+btoa((x.username||"")+":"+(x.password?unescape(encodeURIComponent(x.password)):"")));let h;if(Se.isFormData(e)){if(vr.hasStandardBrowserEnv||vr.hasStandardBrowserWebWorkerEnv)y.setContentType(void 0);else if((h=y.getContentType())!==!1){const[g,...s]=h?h.split(";").map(l=>l.trim()).filter(Boolean):[];y.setContentType([g||"multipart/form-data",...s].join("; "))}}if(vr.hasStandardBrowserEnv&&(r&&Se.isFunction(r)&&(r=r(t)),r||r!==!1&&Ux(t.url))){const g=v&&m&&Vx.read(m);g&&y.set(v,g)}return t},Gx=typeof XMLHttpRequest<"u",Yx=Gx&&function(n){return new Promise(function(t,e){const r=mg(n);let v=r.data;const m=Fr.from(r.headers).normalize();let{responseType:y,onUploadProgress:x,onDownloadProgress:h}=r,g,s,l,c,a;function o(){c&&c(),a&&a(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let u=new XMLHttpRequest;u.open(r.method.toUpperCase(),r.url,!0),u.timeout=r.timeout;function d(){if(!u)return;const b=Fr.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),E={data:!y||y==="text"||y==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:b,config:n,request:u};hg(function($){t($),o()},function($){e($),o()},E),u=null}"onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(d)},u.onabort=function(){u&&(e(new St("Request aborted",St.ECONNABORTED,n,u)),u=null)},u.onerror=function(){e(new St("Network Error",St.ERR_NETWORK,n,u)),u=null},u.ontimeout=function(){let b=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||ag;r.timeoutErrorMessage&&(b=r.timeoutErrorMessage),e(new St(b,E.clarifyTimeoutError?St.ETIMEDOUT:St.ECONNABORTED,n,u)),u=null},v===void 0&&m.setContentType(null),"setRequestHeader"in u&&Se.forEach(m.toJSON(),function(b,E){u.setRequestHeader(E,b)}),Se.isUndefined(r.withCredentials)||(u.withCredentials=!!r.withCredentials),y&&y!=="json"&&(u.responseType=r.responseType),h&&([l,a]=ml(h,!0),u.addEventListener("progress",l)),x&&u.upload&&([s,c]=ml(x),u.upload.addEventListener("progress",s),u.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(g=b=>{u&&(e(!b||b.type?new Bs(null,n,u):b),u.abort(),u=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const w=zx(r.url);if(w&&vr.protocols.indexOf(w)===-1){e(new St("Unsupported protocol "+w+":",St.ERR_BAD_REQUEST,n));return}u.send(v||null)})},Xx=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let r=new AbortController,v;const m=function(g){if(!v){v=!0,x();const s=g instanceof Error?g:this.reason;r.abort(s instanceof St?s:new Bs(s instanceof Error?s.message:s))}};let y=t&&setTimeout(()=>{y=null,m(new St(`timeout ${t} of ms exceeded`,St.ETIMEDOUT))},t);const x=()=>{n&&(y&&clearTimeout(y),y=null,n.forEach(g=>{g.unsubscribe?g.unsubscribe(m):g.removeEventListener("abort",m)}),n=null)};n.forEach(g=>g.addEventListener("abort",m));const{signal:h}=r;return h.unsubscribe=()=>Se.asap(x),h}},Qx=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let r=0,v;for(;r<e;)v=r+t,yield n.slice(r,v),r=v},Zx=async function*(n,t){for await(const e of Jx(n))yield*Qx(e,t)},Jx=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 v=Zx(n,t);let m=0,y,x=h=>{y||(y=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:g,value:s}=await v.next();if(g){x(),h.close();return}let l=s.byteLength;if(e){let c=m+=l;e(c)}h.enqueue(new Uint8Array(s))}catch(g){throw x(g),g}},cancel(h){return x(h),v.return()}},{highWaterMark:2})},vl=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",yg=vl&&typeof ReadableStream=="function",e1=vl&&(typeof TextEncoder=="function"?(n=>t=>n.encode(t))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),wg=(n,...t)=>{try{return!!n(...t)}catch{return!1}},t1=yg&&wg(()=>{let n=!1;const t=new Request(vr.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!t}),bg=64*1024,tu=yg&&wg(()=>Se.isReadableStream(new Response("").body)),yl={stream:tu&&(n=>n.body)};vl&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!yl[t]&&(yl[t]=Se.isFunction(n[t])?e=>e[t]():(e,r)=>{throw new St(`Response type '${t}' is not supported`,St.ERR_NOT_SUPPORT,r)})})})(new Response);const n1=async n=>{if(n==null)return 0;if(Se.isBlob(n))return n.size;if(Se.isSpecCompliantForm(n))return(await new Request(vr.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(Se.isArrayBufferView(n)||Se.isArrayBuffer(n))return n.byteLength;if(Se.isURLSearchParams(n)&&(n=n+""),Se.isString(n))return(await e1(n)).byteLength},r1=async(n,t)=>Se.toFiniteNumber(n.getContentLength())??n1(t),i1=vl&&(async n=>{let{url:t,method:e,data:r,signal:v,cancelToken:m,timeout:y,onDownloadProgress:x,onUploadProgress:h,responseType:g,headers:s,withCredentials:l="same-origin",fetchOptions:c}=mg(n);g=g?(g+"").toLowerCase():"text";let a=Xx([v,m&&m.toAbortSignal()],y),o;const u=a&&a.unsubscribe&&(()=>{a.unsubscribe()});let d;try{if(h&&t1&&e!=="get"&&e!=="head"&&(d=await r1(s,r))!==0){let _=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(Se.isFormData(r)&&(C=_.headers.get("content-type"))&&s.setContentType(C),_.body){const[R,L]=dg(d,ml(pg(h)));r=vg(_.body,bg,R,L)}}Se.isString(l)||(l=l?"include":"omit");const w="credentials"in Request.prototype;o=new Request(t,{...c,signal:a,method:e.toUpperCase(),headers:s.normalize().toJSON(),body:r,duplex:"half",credentials:w?l:void 0});let b=await fetch(o);const E=tu&&(g==="stream"||g==="response");if(tu&&(x||E&&u)){const _={};["status","statusText","headers"].forEach(F=>{_[F]=b[F]});const C=Se.toFiniteNumber(b.headers.get("content-length")),[R,L]=x&&dg(C,ml(pg(x),!0))||[];b=new Response(vg(b.body,bg,R,()=>{L&&L(),u&&u()}),_)}g=g||"text";let $=await yl[Se.findKey(yl,g)||"text"](b,n);return!E&&u&&u(),await new Promise((_,C)=>{hg(_,C,{data:$,headers:Fr.from(b.headers),status:b.status,statusText:b.statusText,config:n,request:o})})}catch(w){throw u&&u(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new St("Network Error",St.ERR_NETWORK,n,o),{cause:w.cause||w}):St.from(w,w&&w.code,n,o)}}),nu={http:wx,xhr:Yx,fetch:i1};Se.forEach(nu,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const xg=n=>`- ${n}`,o1=n=>Se.isFunction(n)||n===null||n===!1,Cg={getAdapter:n=>{n=Se.isArray(n)?n:[n];const{length:t}=n;let e,r;const v={};for(let m=0;m<t;m++){e=n[m];let y;if(r=e,!o1(e)&&(r=nu[(y=String(e)).toLowerCase()],r===void 0))throw new St(`Unknown adapter '${y}'`);if(r)break;v[y||"#"+m]=r}if(!r){const m=Object.entries(v).map(([x,h])=>`adapter ${x} `+(h===!1?"is not supported by the environment":"is not available in the build"));let y=t?m.length>1?`since :
|
1390
|
+
`+m.map(xg).join(`
|
1391
|
+
`):" "+xg(m[0]):"as no adapter specified";throw new St("There is no suitable adapter to dispatch the request "+y,"ERR_NOT_SUPPORT")}return r},adapters:nu};function ru(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Bs(null,n)}function kg(n){return ru(n),n.headers=Fr.from(n.headers),n.data=eu.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Cg.getAdapter(n.adapter||Ca.adapter)(n).then(function(t){return ru(n),t.data=eu.call(n,n.transformResponse,t),t.headers=Fr.from(t.headers),t},function(t){return ug(t)||(ru(n),t&&t.response&&(t.response.data=eu.call(n,n.transformResponse,t.response),t.response.headers=Fr.from(t.response.headers))),Promise.reject(t)})}const _g="1.8.4",wl={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{wl[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const Ag={};wl.transitional=function(n,t,e){function r(v,m){return"[Axios v"+_g+"] Transitional option '"+v+"'"+m+(e?". "+e:"")}return(v,m,y)=>{if(n===!1)throw new St(r(m," has been removed"+(t?" in "+t:"")),St.ERR_DEPRECATED);return t&&!Ag[m]&&(Ag[m]=!0,console.warn(r(m," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(v,m,y):!0}},wl.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function s1(n,t,e){if(typeof n!="object")throw new St("options must be an object",St.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let v=r.length;for(;v-- >0;){const m=r[v],y=t[m];if(y){const x=n[m],h=x===void 0||y(x,m,n);if(h!==!0)throw new St("option "+m+" must be "+h,St.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new St("Unknown option "+m,St.ERR_BAD_OPTION)}}const bl={assertOptions:s1,validators:wl},Hi=bl.validators;let ns=class{constructor(n){this.defaults=n,this.interceptors={request:new sg,response:new sg}}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 v=r.stack?r.stack.replace(/^.+\n/,""):"";try{e.stack?v&&!String(e.stack).endsWith(v.replace(/^.+\n.+\n/,""))&&(e.stack+=`
|
1392
|
+
`+v):e.stack=v}catch{}}throw e}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=ts(this.defaults,t);const{transitional:e,paramsSerializer:r,headers:v}=t;e!==void 0&&bl.assertOptions(e,{silentJSONParsing:Hi.transitional(Hi.boolean),forcedJSONParsing:Hi.transitional(Hi.boolean),clarifyTimeoutError:Hi.transitional(Hi.boolean)},!1),r!=null&&(Se.isFunction(r)?t.paramsSerializer={serialize:r}:bl.assertOptions(r,{encode:Hi.function,serialize:Hi.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),bl.assertOptions(t,{baseUrl:Hi.spelling("baseURL"),withXsrfToken:Hi.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let m=v&&Se.merge(v.common,v[t.method]);v&&Se.forEach(["delete","get","head","post","put","patch","common"],a=>{delete v[a]}),t.headers=Fr.concat(m,v);const y=[];let x=!0;this.interceptors.request.forEach(function(a){typeof a.runWhen=="function"&&a.runWhen(t)===!1||(x=x&&a.synchronous,y.unshift(a.fulfilled,a.rejected))});const h=[];this.interceptors.response.forEach(function(a){h.push(a.fulfilled,a.rejected)});let g,s=0,l;if(!x){const a=[kg.bind(this),void 0];for(a.unshift.apply(a,y),a.push.apply(a,h),l=a.length,g=Promise.resolve(t);s<l;)g=g.then(a[s++],a[s++]);return g}l=y.length;let c=t;for(s=0;s<l;){const a=y[s++],o=y[s++];try{c=a(c)}catch(u){o.call(this,u);break}}try{g=kg.call(this,c)}catch(a){return Promise.reject(a)}for(s=0,l=h.length;s<l;)g=g.then(h[s++],h[s++]);return g}getUri(n){n=ts(this.defaults,n);const t=gg(n.baseURL,n.url,n.allowAbsoluteUrls);return og(t,n.params,n.paramsSerializer)}};Se.forEach(["delete","get","head","options"],function(n){ns.prototype[n]=function(t,e){return this.request(ts(e||{},{method:n,url:t,data:(e||{}).data}))}}),Se.forEach(["post","put","patch"],function(n){function t(e){return function(r,v,m){return this.request(ts(m||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:v}))}}ns.prototype[n]=t(),ns.prototype[n+"Form"]=t(!0)});let a1=class lb{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(v){e=v});const r=this;this.promise.then(v=>{if(!r._listeners)return;let m=r._listeners.length;for(;m-- >0;)r._listeners[m](v);r._listeners=null}),this.promise.then=v=>{let m;const y=new Promise(x=>{r.subscribe(x),m=x}).then(v);return y.cancel=function(){r.unsubscribe(m)},y},t(function(v,m,y){r.reason||(r.reason=new Bs(v,m,y),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 lb(function(e){t=e}),cancel:t}}};function l1(n){return function(t){return n.apply(null,t)}}function c1(n){return Se.isObject(n)&&n.isAxiosError===!0}const iu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(iu).forEach(([n,t])=>{iu[t]=n});function Sg(n){const t=new ns(n),e=Vp(ns.prototype.request,t);return Se.extend(e,ns.prototype,t,{allOwnKeys:!0}),Se.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Sg(ts(n,r))},e}const Fn=Sg(Ca);Fn.Axios=ns,Fn.CanceledError=Bs,Fn.CancelToken=a1,Fn.isCancel=ug,Fn.VERSION=_g,Fn.toFormData=gl,Fn.AxiosError=St,Fn.Cancel=Fn.CanceledError,Fn.all=function(n){return Promise.all(n)},Fn.spread=l1,Fn.isAxiosError=c1,Fn.mergeConfig=ts,Fn.AxiosHeaders=Fr,Fn.formToJSON=n=>lg(Se.isHTMLForm(n)?new FormData(n):n),Fn.getAdapter=Cg.getAdapter,Fn.HttpStatusCode=iu,Fn.default=Fn;const{Axios:A2,AxiosError:S2,CanceledError:T2,isCancel:$2,CancelToken:M2,VERSION:I2,all:R2,Cancel:E2,isAxiosError:L2,spread:O2,toFormData:N2,AxiosHeaders:D2,HttpStatusCode:F2,formToJSON:P2,getAdapter:W2,mergeConfig:B2}=Fn,ou=Fn.create({baseURL:location.origin,timeout:6e4,params:{}});ou.interceptors.response.use(n=>n,n=>{var t,e,r,v,m,y,x,h,g,s,l;if(n.response){if(n.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(o){o&&OpenC3Auth.setTokens()}),n.response.config.headers["Ignore-Errors"]&&n.response.config.headers["Ignore-Errors"].includes(n.response.status.toString()))return Promise.reject(n);let c=`HTTP ${n.response.status} - `;(t=n.response)!=null&&t.statusText&&(c+=`${n.response.statusText} `),(r=(e=n.response)==null?void 0:e.config)!=null&&r.data&&(c+=`${n.response.config.data} `),(m=(v=n.response)==null?void 0:v.data)!=null&&m.message?c+=`${n.response.data.message}`:(x=(y=n.response)==null?void 0:y.data)!=null&&x.exception?c+=`${n.response.data.exception}`:(s=(g=(h=n.response)==null?void 0:h.data)==null?void 0:g.error)!=null&&s.message?(n.response.data.error.class&&(c+=`${n.response.data.error.class} `),c+=`${n.response.data.error.message}`):c+=`${(l=n.response)==null?void 0:l.data}`;const{$cosmosNotify:a}=window;throw a&&a.serious({title:"Network error",body:c}),n}else throw n});const xl=async function(n,t,{data:e,params:r={},headers:v,noAuth:m=!1,noScope:y=!1,onUploadProgress:x=!1}={}){if(!m){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}v.Authorization=localStorage.openc3Token}return v.manual=!0,!y&&!r.scope&&(r.scope=window.openc3Scope),ou({method:n,url:t,data:e,params:r,headers:v,onUploadProgress:x})},su={Accept:"application/json"},Tg={...su,"Content-Type":"application/json"},z2=$r("O",{get:function(n,{params:t,headers:e=su,noScope:r,noAuth:v,onUploadProgress:m}={}){return xl("get",n,{params:t,headers:e,noScope:r,noAuth:v,onUploadProgress:m})},put:function(n,{data:t,params:e,headers:r=Tg,noScope:v,noAuth:m,onUploadProgress:y}={}){return xl("put",n,{data:t,params:e,headers:r,noScope:v,noAuth:m,onUploadProgress:y})},post:function(n,{data:t,params:e,headers:r=Tg,noScope:v,noAuth:m,onUploadProgress:y}={}){return xl("post",n,{data:t,params:e,headers:r,noScope:v,noAuth:m,onUploadProgress:y})},delete:function(n,{params:t,headers:e=su,noScope:r,noAuth:v,onUploadProgress:m}={}){return xl("delete",n,{params:t,headers:e,noScope:r,noAuth:v,onUploadProgress:m})}});let Cl=()=>({emit(n,...t){for(let e=this.events[n]||[],r=0,v=e.length;r<v;r++)e[r](...t)},events:{},on(n,t){var e;return((e=this.events)[n]||(e[n]=[])).push(t),()=>{var r;this.events[n]=(r=this.events[n])==null?void 0:r.filter(v=>t!==v)}}});class _a extends Error{constructor(t,e){t instanceof Error?(super(t.message),this.cause=t):super(t),this.reason=e,this.name="ReasonError"}}class au extends _a{constructor(t){super("Rejected",t),this.name="SubscriptionRejectedError"}}class u1 extends _a{constructor(t){super(t||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class Si extends _a{constructor(t,e){e?super(t,e):super("Disconnected",t),this.name="DisconnectedError"}}class h1 extends Si{constructor(t){super(t,"stale_connection"),this.name="StaleConnectionError"}}function $g(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(",")}}`:""}class d1{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: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:v})=>(e[r]=v,e),{})}}const rs=Symbol("state");class Mg{constructor(t={}){this.emitter=Cl(),this.params=Object.freeze(t),this.presence=new d1(this),this.initialConnect=!0,this[rs]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=$g({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[rs]}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[rs]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[rs]="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[rs]="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[rs]="disconnected",this.presence.reset(),this.emit("disconnect",t))}closed(t){this.state!=="closed"&&(this[rs]="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,(...v)=>{r(),e(...v)});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(v=>v()),t()})),r.push(this.on("close",v=>{r.forEach(m=>m()),e(v||new _a("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class p1{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(m=>{e=m}),intent:t,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),e(r)},canceled:!1,acquired:!1},v=this._pendingTop;return this._pendings.push(r),v&&await v.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 g1{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 f1{constructor(t){t.concurrentSubscribes===!1&&(this.glv=new g1),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(t){return this._subscriptions[t]}create(t,{subscribe:e,unsubscribe:r}){let v=this._subscriptions[t]=new p1(t);return v.remoteId=this._localToRemote[t],v.subscriber=e,v.unsubscriber=r,v.gvl=this.glv,v}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 m1{constructor(t={}){this.subscriptions=new f1(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 v=this._remoteToLocal[t];if(!v){this._pendingMessages.push([t,e,r]);return}let m=this.subscriptions.get(v);m&&m.channels.forEach(y=>{y.receive(e,r)})}notify(t,e,r){let v=this._remoteToLocal[t];if(!v)return;let m=this.subscriptions.get(v);m&&m.channels.forEach(y=>y.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 Ig={debug:0,info:1,warn:2,error:3};class Rg{constructor(t){this.level=t||"warn"}log(t,e,r){Ig[t]<Ig[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)}}class Aa extends Rg{writeLogEntry(){}}class v1{encode(t){return JSON.stringify(t)}decode(t){try{return JSON.parse(t)}catch{}}}let y1=0;class Eg{constructor(t={}){let{logger:e}=t;this.logger=e||new Aa,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 v=$g(r);if(this.pendingUnsubscriptions[v]){let y=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${y}`,v),new Promise(x=>{setTimeout(()=>{x(this.subscribe(t,e))},y)})}if(this.pendingSubscriptions[v])return this.logger.warn("subscription is already pending, skipping",v),Promise.reject(Error("Already subscribing"));let m=this.subscribeRetryInterval;return new Promise((y,x)=>{let h=++y1;this.pendingSubscriptions[v]={resolve:y,reject:x,id:h},this.cable.send(this.buildSubscribeRequest(v)),this.maybeRetrySubscribe(h,v,m)})}buildSubscribeRequest(t){return{command:"subscribe",identifier:t}}maybeRetrySubscribe(t,e,r){setTimeout(()=>{let v=this.pendingSubscriptions[e];v&&v.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 v=this.pendingSubscriptions[e];v&&v.id===t&&(delete this.pendingSubscriptions[e],v.reject(new u1(`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:v,reason:m,reconnect:y}=t;if(e==="ping")return this.cable.keepalive(t.message);if(this.cable.keepalive(),e==="welcome"){let x=t.sid;return x&&this.cable.setSessionId(x),this.cable.connected()}if(e==="disconnect"){let x=new Si(m);this.reset(x),y===!1?this.cable.closed(x):this.cable.disconnected(x);return}if(e==="confirm_subscription"){let x=this.pendingSubscriptions[r];if(!x){this.logger.error("subscription not found, unsubscribing",{type:e,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],x.resolve(r)}if(e==="reject_subscription"){let x=this.pendingSubscriptions[r];return x?(delete this.pendingSubscriptions[r],x.reject(new au)):this.logger.error("subscription not found",{type:e,identifier:r})}if(v)return{identifier:r,message:v};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 Lg=()=>Date.now()/1e3|0;class w1 extends Eg{constructor(t={}){super(t),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=t.historyTimestamp,this.restoreSince===void 0&&(this.restoreSince=Lg()),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:v}=t;if(e==="disconnect"||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=Lg()),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.sessionId=t.sid,this.sessionId&&this.cable.setSessionId(this.sessionId),t.restored){let m=t.restored_ids||Object.keys(this.subscriptionStreams);for(let y of m)this.cable.send({identifier:y,command:"history",history:this.historyRequestFor(y)}),this.presenceInfo[y]&&this.cable.send({identifier:y,command:"join",presence:this.presenceInfo[y]});return this.cable.restored(m)}return this.cable.connected(this.sessionId)}if(e==="presence"){let m=v.type;if(m==="info"){let y=this.pendingPresence[r];y&&(delete this.pendingPresence[r],y.resolve(v))}else if(m==="error"){let y=this.pendingPresence[r];y&&(delete this.pendingPresence[r],y.reject(new Error("failed to retrieve presence")))}return{type:e,identifier:r,message:v}}if(v){let m=this.trackStreamPosition(r,t.stream_id,t.epoch,t.offset);return{identifier:r,message:v,meta:m}}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 v=this.presenceInfo[t];return v&&(e.presence=v),e}recoverableClosure(){return!!this.sessionId}historyRequestFor(t){let e={},r=!1;if(this.subscriptionStreams[t])for(let v of this.subscriptionStreams[t]){let m=this.streamsPositions[v];m&&(r=!0,e[v]=m)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:e}}trackStreamPosition(t,e,r,v){if(!(!e||!r))return this.subscriptionStreams[t]||(this.subscriptionStreams[t]=new Set),this.subscriptionStreams[t].add(e),this.streamsPositions[e]={epoch:r,offset:v},{stream:e,epoch:r,offset:v}}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,v)=>{this.pendingPresence[t]={resolve:r,reject:v},this.cable.send({command:"presence",identifier:t,data:e})})}}class b1 extends _a{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class lu extends Mg{constructor(t,e){super(e),this.channelId=t}set channelId(t){this._channelId=t}get channelId(){return this._channelId}}cl(lu,"identifier","__ghost__");const x1="$pubsub";class cu extends Mg{async perform(t,e){if(t.startsWith("$"))return super.perform(t,e);throw Error("not implemented")}}cl(cu,"identifier",x1);const is=Symbol("state");let C1=class{constructor({transport:n,protocol:t,encoder:e,logger:r,lazy:v,hubOptions:m,performFailures:y,transportConfigurator:x}){this.emitter=Cl(),this.transport=n,this.encoder=e,this.logger=r||new Aa,this.protocol=t,this.performFailures=y||"throw",this.protocol.attached(this),this.hub=new m1(m||{}),this[is]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=x,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,v===!1&&this.connect().catch(()=>{})}get state(){return this[is]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let n=this.state==="idle";this[is]="connecting";let 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[is]="connected",this.recovering&&this.hub.subscriptions.all().forEach(t=>t.notify("disconnected",new Si("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[is]="connected",this.hub.subscriptions.all().forEach(r=>{n&&r.remoteId&&n.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new Si("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 Si(n,"transport_closed"))}disconnected(n){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:n}),this[is]="disconnected",this.recovering=this.protocol.recoverableClosure(n),this.recovering?this.hub.subscriptions.all().forEach(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 Si?n:new Si(n,void 0)),this.logger.info("closed",{reason:n||"user"}),this[is]="closed";let e=t||new Si("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:v,message:m,meta:y}=e;r?this.hub.notify(v,r,m):this.hub.transmit(v,m,y)}}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 cu({stream_name:n});return this.subscribe(t)}streamFromSigned(n){let t=new cu({signed_stream_name:n});return this.subscribe(t)}subscribeTo(n,t){let e,r;return typeof n=="string"&&(r=n,n=lu),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 v=await n.acquire("subscribed");if(v.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),v.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),n.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),v.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),v.release();return}if(n.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),n.notify("connected"),v.release();return}let m={identifier:t,params:e};this.logger.debug("subscribing",m);try{let y=await this.protocol.subscribe(t,e);this.hub.subscribe(r,y),this.logger.debug("subscribed",{...m,remoteId:y}),n.notify("connected")}catch(y){if(y){if(y instanceof au&&this.logger.warn("rejected",m),y instanceof Si){this.logger.debug("disconnected during subscription; will retry on connect",m),v.release();return}this.logger.error("failed to subscribe",{error:y,...m})}n.close(y),this.hub.unsubscribe(r)}v.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(v){v&&(v instanceof Si?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:t,error:v}):this.logger.error("unsubscribe failed",{id:t,error:v}))}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 b1;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 v=r.remoteId,m={id:v,action:t,payload:e};this.logger.debug("perform",m);try{let y=await this.protocol.perform(v,t,e);return y&&this.logger.debug("perform result",{message:y,request:m}),y}catch(y){throw this.logger.error("perform failed",{error:y,request:m}),y}}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(v=>v()),t(r)})),e.push(this.on("disconnect",r=>{e.forEach(v=>v()),t(r)}))}),this._pendingConnect)}};const k1={maxMissingPings:2,maxReconnectAttempts:1/0},zs=()=>Date.now(),Og=(n,t)=>{t=t||{};let{backoffRate:e,jitterRatio:r,maxInterval:v}=t;return e=e||2,r===void 0&&(r=.5),m=>{let y=n*e**m,x=y*e,h=y+(x-y)*Math.random(),g=2*(Math.random()-.5)*r;return h=h*(1+g),v&&v<h&&(h=v),h}};let Ng=class{constructor({pingInterval:n,...t}){if(this.pingInterval=n,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${n}`);if(t=Object.assign({},k1,t),this.strategy=t.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=t.maxMissingPings,this.maxReconnectAttempts=t.maxReconnectAttempts,this.logger=t.logger||new Aa,this.state="pending_connect",this.attempts=0,this.disconnectedAt=zs()}watch(n){this.target=n,this.initListeners()}reconnectNow(){return this.state==="connected"||this.state==="pending_connect"||this.state==="closed"?!1:(this.cancelReconnect(),this.state="pending_connect",this.target.connect().catch(n=>{this.logger.info("Failed at reconnecting: "+n)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=zs(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=zs(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=zs(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=zs()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(n=>n()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let n=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},n)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let n=zs()-this.pingedAt;n>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${n}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new h1))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let n=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${n}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),n)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}};class _1{constructor(t,e={}){this.transports=t,this.transport=null,this.emitter=Cl(),this.unbind=[],this.logger=e.logger||new Aa}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,(...v)=>{r(),e(...v)});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 A1{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=Cl();let{format:v,subprotocol:m,authStrategy:y}=e;this.format=v||"text",this.connectionOptions=e.websocketOptions,this.authStrategy=y||"param",this.authProtocol="",this.subprotocol=m}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 v=[];v.push(this.once("open",()=>{v.forEach(m=>m()),e()})),v.push(this.once("close",()=>{v.forEach(m=>m()),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 v=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(v)}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(v=>v.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,(...v)=>{r(),e(...v)});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")}}const Dg={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function S1(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({},Dg,t);let{protocol:e,websocketImplementation:r,websocketFormat:v,websocketOptions:m,websocketAuthStrategy:y,fallbacks:x,logLevel:h,logger:g,transport:s,encoder:l,lazy:c,monitor:a,pingInterval:o,reconnectStrategy:u,maxMissingPings:d,maxReconnectAttempts:w,subprotocol:b,tokenRefresher:E,historyTimestamp:$,protocolOptions:_,concurrentSubscribes:C,performFailures:R,transportConfigurator:L,auth:F}=t;if(g=g||new Aa(h),typeof e=="string"){b=b||e;let P=e.substring(0,e.lastIndexOf("-")),O=e.substring(e.lastIndexOf("-")+1);if(_=_||{},P==="actioncable-v1")e=new Eg({logger:g,..._});else if(P==="actioncable-v1-ext")e=new w1({logger:g,historyTimestamp:$,..._});else throw Error(`Protocol is not supported yet: ${e}`);if(O==="json")l=l||new v1,v=v||"text";else if(O==="msgpack"){if(v="binary",!l)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(O==="protobuf"){if(v=v||"binary",!l)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");s=s||new A1(n,{websocketImplementation:r,websocketOptions:m,subprotocol:b,authStrategy:y,format:v}),x&&(s=new _1([s,...x],{logger:g})),F&&F.token&&s.setToken(F.token,F.param||"jid"),u=u||Og(o),a!==!1&&(a=a||new Ng({pingInterval:o,reconnectStrategy:u,maxMissingPings:d,maxReconnectAttempts:w,logger:g}));let I={concurrentSubscribes:C},H=new C1({protocol:e,transport:s,encoder:l,logger:g,lazy:c,hubOptions:I,performFailures:R,transportConfigurator:L});return a&&(a.watch(H),H.monitor=a),E&&T1(H,async()=>{try{await E(s)}catch(P){return g.error("Failed to refresh authentication token: "+P),!1}return H.connect().catch(()=>{}),!0}),H}function T1(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 $1{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)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class M1 extends lu{constructor(t,e,r){super(t,e),this.subscription=new $1(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:v})=>this.subscription.notify("connected",{reconnected:v})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",v=>this.subscription.notify("received",v)),this.on("close",v=>{v&&v instanceof au?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class I1{constructor(t){this.cable=t}create(t,e){let r,v;typeof t=="object"?(r=t.channel,delete t.channel,v=t):(r=t,v={});let m=new M1(r,v,e);return m.subscription.notify("initialized"),this.cable.subscribe(m),m.subscription}findAll(t){return this.cable.hub.channels.filter(e=>e.identifier===t).map(e=>e.subscription)}}class R1{constructor(t){this.cable=t,this.subscriptions=new I1(t)}}class E1 extends Rg{writeLogEntry(t,e,r){r?console[t](e,r):console[t](e)}}class L1 extends Ng{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=v=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:v})},r=()=>this.disconnect(new Si("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 O1=["cable","action-cable"],N1="/cable",kl=(n,t)=>{for(let e of O1){let r=n.head.querySelector(`meta[name='${e}-${t}']`);if(r)return r.getAttribute("content")}},Fg=n=>n.match(/wss?:\/\//)?n:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${n}`:n,D1=()=>{if(typeof document<"u"&&document.head){let n=kl(document,"url");if(n)return Fg(n)}return Fg(N1)},F1=()=>{if(typeof document<"u"&&document.head){let n=kl(document,"history-timestamp");if(n)return n|0}},P1=()=>{if(typeof document<"u"&&document.head)return kl(document,"token")},W1=()=>{if(typeof document<"u"&&document.head)return kl(document,"token-param")};function B1(n,t){typeof n=="object"&&typeof t>"u"&&(t=n,n=void 0),n=n||D1(),t=t||{},t.historyTimestamp||(t.historyTimestamp=F1());let e=P1();if(e){let g=W1();t.auth=Object.assign({token:e,param:g},t.auth||{})}t=Object.assign({},Dg,t);let{logLevel:r,logger:v,pingInterval:m,reconnectStrategy:y,maxMissingPings:x,maxReconnectAttempts:h}=t;return v=t.logger=t.logger||new E1(r),y=t.reconnectStrategy=t.reconnectStrategy||Og(m),t.monitor!==!1&&(t.monitor=t.monitor||new L1({pingInterval:m,reconnectStrategy:y,maxMissingPings:x,maxReconnectAttempts:h,logger:v})),S1(n,t)}function z1(n,t){let e=B1(n,t);return new R1(e)}class j1{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={},v={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(m=>{if(m&&OpenC3Auth.setTokens(),this._cable==null){let y=this._url+"?scope="+encodeURIComponent(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);y=new URL(y,document.baseURI).href,this._cable=z1(y)}return this._cable.subscriptions.create({channel:t,...v},r)})}recordPing(){}}$r("D",j1);class H1{constructor(t,e,r="",v=""){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=v}}$r("b",H1);function uu(n){return U1.test(n)}const U1=/^-?[0-9]+$/;function Pg(n){return V1.test(n)}const V1=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Wg(n,t){const e=Number.parseFloat(n),r=String(e),v=Bg(n),m=Bg(r);return!!(v===m||(t==null?void 0:t.approx)===!0&&!uu(n)&&m.length>=14&&v.startsWith(m.substring(0,14)))}let Sa=function(n){return n.underflow="underflow",n.overflow="overflow",n.truncate_integer="truncate_integer",n.truncate_float="truncate_float",n}({});function q1(n){if(Wg(n,{approx:!1}))return;if(uu(n))return Sa.truncate_integer;const t=Number.parseFloat(n);return Number.isFinite(t)?t===0?Sa.underflow:Sa.truncate_float:Sa.overflow}function Bg(n){return n.replace(K1,"").replace(Y1,"").replace(X1,"").replace(G1,"")}const K1=/[eE][+-]?\d+$/,G1=/^-?(0*)?/,Y1=/\./,X1=/0+$/;class Q1{constructor(t){if(cl(this,"isLosslessNumber",!0),!Pg(t))throw new Error(`Invalid number (value: "${t}")`);this.value=t}valueOf(){const t=q1(this.value);if(t===void 0||t===Sa.truncate_float)return Number.parseFloat(this.value);if(uu(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 Z1(n){return n&&typeof n=="object"&&n.isLosslessNumber===!0||!1}function J1(n){return new Q1(n)}function eC(n,t){return hu({"":n},"",n,t)}function hu(n,t,e,r){return Array.isArray(e)?r.call(n,t,nC(e,r)):e&&typeof e=="object"&&!Z1(e)?r.call(n,t,tC(e,r)):r.call(n,t,e)}function tC(n,t){for(const e of Object.keys(n)){const r=hu(n,e,n[e],t);r!==void 0?n[e]=r:delete n[e]}return n}function nC(n,t){for(let e=0;e<n.length;e++)n[e]=hu(n,String(e),n[e],t);return n}function rC(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:J1,r=0;const v=x();return o(v),d(),t?eC(v,t):v;function m(){if(n.charCodeAt(r)===cC){r++,g();const S={};let A=!0;for(;r<n.length&&n.charCodeAt(r)!==jg;){A?A=!1:(c(),g());const N=r,B=s();if(B===void 0){E();return}g(),a();const U=x();if(U===void 0){F();return}Object.prototype.hasOwnProperty.call(S,B)&&!du(U,S[B])&&$(B,N+1),S[B]=U}return n.charCodeAt(r)!==jg&&_(),r++,S}}function y(){if(n.charCodeAt(r)===uC){r++,g();const S=[];let A=!0;for(;r<n.length&&n.charCodeAt(r)!==Hg;){A?A=!1:c();const N=x();u(N),S.push(N)}return n.charCodeAt(r)!==Hg&&C(),r++,S}}function x(){g();const S=s()??l()??m()??y()??h("true",!0)??h("false",!1)??h("null",null);return g(),S}function h(S,A){if(n.slice(r,r+S.length)===S)return r+=S.length,A}function g(){for(;iC(n.charCodeAt(r));)r++}function s(){if(n.charCodeAt(r)===pu){r++;let S="";for(;r<n.length&&n.charCodeAt(r)!==pu;){if(n.charCodeAt(r)===lC){const A=n[r+1],N=aC[A];N!==void 0?(S+=N,r++):A==="u"?_l(n.charCodeAt(r+2))&&_l(n.charCodeAt(r+3))&&_l(n.charCodeAt(r+4))&&_l(n.charCodeAt(r+5))?(S+=String.fromCharCode(Number.parseInt(n.slice(r+2,r+6),16)),r+=5):I(r):L(r)}else sC(n.charCodeAt(r))?S+=n[r]:R(n[r]);r++}return b(),r++,S}}function l(){const S=r;if(n.charCodeAt(r)===Ug&&(r++,w(S)),n.charCodeAt(r)===gu)r++;else if(oC(n.charCodeAt(r)))for(r++;Al(n.charCodeAt(r));)r++;if(n.charCodeAt(r)===yC)for(r++,w(S);Al(n.charCodeAt(r));)r++;if(n.charCodeAt(r)===kC||n.charCodeAt(r)===CC)for(r++,(n.charCodeAt(r)===Ug||n.charCodeAt(r)===fC)&&r++,w(S);Al(n.charCodeAt(r));)r++;if(r>S)return e(n.slice(S,r))}function c(){if(n.charCodeAt(r)!==vC)throw new SyntaxError(`Comma ',' expected after value ${O()}`);r++}function a(){if(n.charCodeAt(r)!==wC)throw new SyntaxError(`Colon ':' expected after property name ${O()}`);r++}function o(S){if(S===void 0)throw new SyntaxError(`JSON value expected ${O()}`)}function u(S){if(S===void 0)throw new SyntaxError(`Array item expected ${O()}`)}function d(){if(r<n.length)throw new SyntaxError(`Expected end of input ${O()}`)}function w(S){if(!Al(n.charCodeAt(r))){const A=n.slice(S,r);throw new SyntaxError(`Invalid number '${A}', expecting a digit ${O()}`)}}function b(){if(n.charCodeAt(r)!==pu)throw new SyntaxError(`End of string '"' expected ${O()}`)}function E(){throw new SyntaxError(`Quoted object key expected ${O()}`)}function $(S,A){throw new SyntaxError(`Duplicate key '${S}' encountered at position ${A}`)}function _(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${O()}`)}function C(){throw new SyntaxError(`Array item or end of array ']' expected ${O()}`)}function R(S){throw new SyntaxError(`Invalid character '${S}' ${H()}`)}function L(S){const A=n.slice(S,S+2);throw new SyntaxError(`Invalid escape character '${A}' ${H()}`)}function F(){throw new SyntaxError(`Object value expected after ':' ${H()}`)}function I(S){const A=n.slice(S,S+6);throw new SyntaxError(`Invalid unicode character '${A}' ${H()}`)}function H(){return`at position ${r}`}function P(){return r<n.length?`but got '${n[r]}'`:"but reached end of input"}function O(){return`${P()} ${H()}`}}function iC(n){return n===hC||n===dC||n===pC||n===gC}function _l(n){return n>=gu&&n<=fu||n>=bC&&n<=_C||n>=xC&&n<=AC}function Al(n){return n>=gu&&n<=fu}function oC(n){return n>=mC&&n<=fu}function sC(n){return n>=32&&n<=1114111}function du(n,t){return n===t?!0:Array.isArray(n)&&Array.isArray(t)?n.length===t.length&&n.every((e,r)=>du(e,t[r])):zg(n)&&zg(t)?[...new Set([...Object.keys(n),...Object.keys(t)])].every(e=>du(n[e],t[e])):!1}function zg(n){return typeof n=="object"&&n!==null}const aC={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
1393
|
+
`,r:"\r",t:" "},lC=92,cC=123,jg=125,uC=91,Hg=93,hC=32,dC=10,pC=9,gC=13,pu=34,fC=43,Ug=45,gu=48,mC=49,fu=57,vC=44,yC=46,wC=58,bC=65,xC=97,CC=69,kC=101,_C=70,AC=102;function Vg(n,t,e,r){return v(n);function v(h,g){if(Array.isArray(r)){const s=r.find(l=>l.test(h));if(s){const l=s.stringify(h);if(typeof l!="string"||!Pg(l))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${l})`);return l}}if(typeof h=="boolean"||typeof h=="number"||typeof h=="string"||h===null||h instanceof Date||h instanceof Boolean||h instanceof Number||h instanceof String)return JSON.stringify(h);if(h!=null&&h.isLosslessNumber||typeof h=="bigint")return h.toString();if(Array.isArray(h))return m(h);if(h&&typeof h=="object")return y(h)}function m(h,g){if(h.length===0)return"[]";let s="[";for(let l=0;l<h.length;l++){const c=h[l];typeof c<"u"&&typeof c!="function"?s+=v(c):s+="null",l<h.length-1&&(s+=",")}return s+="]",s}function y(h,g){if(typeof h.toJSON=="function")return Vg(h.toJSON(),t,e,void 0);const s=Array.isArray(t)?t.map(String):Object.keys(h);if(s.length===0)return"{}";let l=!0,c="{";for(const a of s){const o=h[a];if(x(a,o)){l?l=!1:c+=",";const u=JSON.stringify(a);c+=`${u}:`,c+=v(o)}}return c+="}",c}function x(h,g){return typeof g<"u"&&typeof g!="function"&&typeof g!="symbol"}}function SC(n){return Wg(n)?parseFloat(n):BigInt(n)}class TC{constructor(){cl(this,"id",1)}async exec(t,e,r={},v={},m=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,v.manual=!0,(await ou.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",...v},timeout:m,transformRequest:[(y,x)=>Vg(y)],transformResponse:[y=>rC(y,void 0,SC)]})).data.result}catch(y){let x=new Error;throw y.response?(x.name=y.response.data.error.data.class,x.message=y.response.data.error.data.message,x.object=y.response.data.error):y.request?(x.name="Request error",x.message="Request error, no response received"):x.name="Unknown error",x}}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){return this.exec("map_target_to_interface",[t,e])}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])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(t){return this.exec("connect_router",[t])}disconnect_router(t){return this.exec("disconnect_router",[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,v=30){const m=await this.exec("get_tlm_packet",[t,e],{type:r,stale_time:v});if(m!=null){let y=m.length,x=null;for(let h=0;h<y;h++)x=this.decode_openc3_type(m[h][1]),x!==null&&(m[h][1]=x)}return m}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])}async get_tlm_values(t,e=30,r=null){let v={stale_time:e};r!==null&&(v.cache_timeout=r);const m=await this.exec("get_tlm_values",[t],v,{},1e4);let y=m[0].length,x=null;for(let h=0;h<y;h++)x=this.decode_openc3_type(m[0][h]),x!==null&&(m[0][h]=x);return m}get_limits(t,e,r){return this.exec("get_limits",[t,e,r])}async tlm(t,e,r,v="CONVERTED"){let m=null;if(e===void 0)m=await this.exec("tlm",[t]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(e))m=await this.exec("tlm",[t],{type:e});else{let x=new Error;throw x.name="TypeError",x.message=`Invalid data type ${e}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,x}else m=await this.exec("tlm",[t,e,r],{type:v});let y=this.decode_openc3_type(m);return y!==null&&(m=y),m}async inject_tlm(t,e,r=null,v="CONVERTED"){await this.exec("inject_tlm",[t,e,r],{type:v})}set_tlm(t,e,r,v){return this.exec("set_tlm",[t,e,r],{type:v})}override_tlm(t,e,r,v){return this.exec("override_tlm",[t,e,r],{type:v})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(t,e,r,v){return this.exec("normalize_tlm",[t,e,r],{type:v})}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,v="CONVERTED"){return this.exec("get_cmd_value",[t,e,r,v])}get_cmd_buffer(t,e){return this.exec("get_cmd_buffer",[t,e])}_cmd(t,e,r,v,m){let y=null;for(let x in v)Object.prototype.hasOwnProperty.call(v,x)&&(y=this.encode_openc3_type(v[x]),y!==null&&(v[x]=y));return this.exec(t,[e,r,v],{},m)}get_cmd_hazardous(t,e,r,v={}){return e===void 0?this.exec("get_cmd_hazardous",t,{},v):this._cmd("get_cmd_hazardous",t,e,r,v)}cmd(t,e,r,v={}){return e===void 0?this.exec("cmd",t,{},v):this._cmd("cmd",t,e,r,v)}cmd_no_range_check(t,e,r,v={}){return e===void 0?this.exec("cmd_no_range_check",t,{},v):this._cmd("cmd_no_range_check",t,e,r,v)}cmd_raw(t,e,r,v={}){return e===void 0?this.exec("cmd_raw",t,{},v):this._cmd("cmd_raw",t,e,r,v)}cmd_raw_no_range_check(t,e,r,v={}){return e===void 0?this.exec("cmd_raw_no_range_check",t,{},v):this._cmd("cmd_raw_no_range_check",t,e,r,v)}cmd_no_hazardous_check(t,e,r,v={}){return e===void 0?this.exec("cmd_no_hazardous_check",t,{},v):this._cmd("cmd_no_hazardous_check",t,e,r,v)}cmd_no_checks(t,e,r,v={}){return e===void 0?this.exec("cmd_no_checks",t,{},v):this._cmd("cmd_no_checks",t,e,r,v)}cmd_raw_no_hazardous_check(t,e,r,v={}){return e===void 0?this.exec("cmd_raw_no_hazardous_check",t,{},v):this._cmd("cmd_raw_no_hazardous_check",t,e,r,v)}cmd_raw_no_checks(t,e,r,v={}){return e===void 0?this.exec("cmd_raw_no_checks",t,{},v):this._cmd("cmd_raw_no_checks",t,e,r,v)}build_cmd(t,e,r){return e===void 0?this.exec("build_cmd",t):this._cmd("build_cmd",t,e,r)}build_command(t,e,r){return e===void 0?this.exec("build_cmd",t):this._cmd("build_cmd",t,e,r)}get_interface_names(){return this.exec("get_interface_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){return this.exec("get_setting",[t])}get_settings(t){return this.exec("get_settings",t)}set_setting(t,e){return this.exec("set_setting",[t,e])}update_news(){return this.exec("update_news",[])}save_setting(t,e){return this.exec("set_setting",[t,e])}get_metrics(){return this.exec("get_metrics",[])}async hashString(t){if(window.isSecureContext){const e=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",e),v=new Uint8Array(r);return Array.from(v).map(m=>m.toString(16).padStart(2,"0")).join("")}}}$r("F",TC);var qg={exports:{}},Kg;function $C(){return Kg||(Kg=1,function(n,t){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,r,v){function m(g,s){function l(F,I,H){if(!(F.length<I)){var P=F.slice(0,I),O=F.slice(I),S=/^(?:(\s+)|(\S+)(\s+))/.exec(O),A=/(?:(\s+)|(\s+)(\S+))$/.exec(P),N=0,B=0;if(A&&!A[2]&&(N=I-A[1].length,B=I),S&&!S[2]&&(N||(N=I),B=I+S[1].length),N)return{start:N,end:B};if(A&&A[2]&&A.index>H)return{start:A.index,end:A.index+A[2].length};if(S&&S[2])return N=I+S[2].length,{start:N,end:N+S[3].length}}}for(var c=s.column||g.getOption("printMarginColumn"),a=s.allowMerge!=0,o=Math.min(s.startRow,s.endRow),u=Math.max(s.startRow,s.endRow),d=g.session;o<=u;){var w=d.getLine(o);if(w.length>c){var b=l(w,c,5);if(b){var E=/^\s*/.exec(w)[0];d.replace(new x(o,b.start,o,b.end),`
|
1394
|
+
`+E)}u++}else if(a&&/\S/.test(w)&&o!=u){var $=d.getLine(o+1);if($&&/\S/.test($)){var _=w.replace(/\s+$/,""),C=$.replace(/^\s+/,""),R=_+" "+C,b=l(R,c,5);if(b&&b.start>_.length||R.length<c){var L=new x(o,_.length,o+1,$.length-C.length);d.replace(L," "),o--,u--}else _.length<w.length&&d.remove(new x(o,_.length,o,w.length))}}o++}}function y(g){if(g.command.name=="insertstring"&&/\S/.test(g.args)){var s=g.editor,l=s.selection.cursor;if(l.column<=s.renderer.$printMarginColumn)return;var c=s.session.$undoManager.$lastDelta;m(s,{startRow:l.row,endRow:l.row,allowMerge:!1}),c!=s.session.$undoManager.$lastDelta&&s.session.markUndoGroup()}}var x=e("../range").Range,h=e("../editor").Editor;e("../config").defineOptions(h.prototype,"editor",{hardWrap:{set:function(g){g?this.commands.on("afterExec",y):this.commands.off("afterExec",y)},value:!1}}),r.hardWrap=m}),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,v){function m(f){return{row:f.line,column:f.ch}}function y(f){return new Ne(f.row,f.column)}function x(f,T,k){if(T.line===k.line&&T.ch>=k.ch-1){var D=f.getLine(T.line),W=D.charCodeAt(T.ch);55296<=W&&W<=55551&&(k.ch+=1)}return{start:T,end:k}}function h(f){f.setOption("disableInput",!0),f.setOption("showCursorWhenSelecting",!1),Pe.signal(f,"vim-mode-change",{mode:"normal"}),f.on("cursorActivity",Po),R(f),Pe.on(f.getInputField(),"paste",s(f))}function g(f){f.setOption("disableInput",!1),f.off("cursorActivity",Po),Pe.off(f.getInputField(),"paste",s(f)),f.state.vim=null,sr&&clearTimeout(sr)}function s(f){var T=f.state.vim;return T.onPasteFn||(T.onPasteFn=function(){T.insertMode||(f.setCursor(ye(f.getCursor(),0,1)),On.enterInsertMode(f,{},T))}),T.onPasteFn}function l(f,T){return T>=f.firstLine()&&T<=f.lastLine()}function c(f){return/^[a-z]$/.test(f)}function a(f){return"()[]{}".indexOf(f)!=-1}function o(f){return la.test(f)}function u(f){return en.test(f)}function d(f){return/^\s*$/.test(f)}function w(f){return".?!".indexOf(f)!=-1}function b(f,T){for(var k=0;k<T.length;k++)if(T[k]==f)return!0;return!1}function E(f,T,k,D,W){if(T===void 0&&!W)throw Error("defaultValue is required unless callback is provided");if(k||(k="string"),jt[f]={type:k,defaultValue:T,callback:W},D)for(var z=0;z<D.length;z++)jt[D[z]]=jt[f];T&&$(f,T)}function $(f,T,k,D){var W=jt[f];D=D||{};var z=D.scope;if(!W)return new Error("Unknown option: "+f);if(W.type=="boolean"){if(T&&T!==!0)return new Error("Invalid argument: "+f+"="+T);T!==!1&&(T=!0)}W.callback?(z!=="local"&&W.callback(T,void 0),z!=="global"&&k&&W.callback(T,k)):(z!=="local"&&(W.value=W.type=="boolean"?!!T:T),z!=="global"&&k&&(k.state.vim.options[f]={value:T}))}function _(f,T,k){var D=jt[f];k=k||{};var W=k.scope;if(!D)return new Error("Unknown option: "+f);if(D.callback){var z=T&&D.callback(void 0,T);return W!=="global"&&z!==void 0?z:W!=="local"?D.callback():void 0}var z=W!=="global"&&T&&T.state.vim.options[f];return(z||W!=="local"&&D||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=En()}function R(f){return f.state.vim||(f.state.vim={inputState:new S,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),f.state.vim}function L(){Be={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:fi(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new K({}),searchHistoryController:new Z,exCommandHistoryController:new Z};for(var f in jt){var T=jt[f];T.value=T.defaultValue}}function F(f){function T(Y){typeof Y=="string"?vn.value=Y:vn=null}if(f[0]=="<"){var k=f.toLowerCase().slice(1,-1),D=k.split("-");if(k=D.pop()||"",k=="lt")f="<";else if(k=="space")f=" ";else if(k=="cr")f=`
|
1395
|
+
`;else if(mi[k]){var W=vn.value,z={key:mi[k],target:{value:W,selectionEnd:W.length,selectionStart:W.length}};vn.onKeyDown&&vn.onKeyDown(z,vn.value,T),vn&&vn.onKeyUp&&vn.onKeyUp(z,vn.value,T);return}}if(f==`
|
1396
|
+
`){var q=vn;vn=null,q.onClose&&q.onClose(q.value)}else vn.value=(vn.value||"")+f}function I(f,T,k){var D=sn;if(k){if(Rr.indexOf(k)!=-1)return;Rr.push(k),sn=k.noremap!=0}try{for(var W=R(f),z=/<(?:[CSMA]-)*\w+>|./gi,q;q=z.exec(T);){var Y=q[0],Q=W.insertMode;if(vn){F(Y);continue}var re=wt.handleKey(f,Y,"mapping");if(!re&&Q&&W.insertMode){if(Y[0]=="<"){var se=Y.toLowerCase().slice(1,-1),ve=se.split("-");if(se=ve.pop()||"",se=="lt")Y="<";else if(se=="space")Y=" ";else if(se=="cr")Y=`
|
1397
|
+
`;else{if(mi.hasOwnProperty(se)){Y=mi[se],Bo(f,Y);continue}Y=Y[0],z.lastIndex=q.index+1}}f.replaceSelection(Y)}}}finally{if(Rr.pop(),sn=Rr.length?D:!1,!Rr.length&&vn){var Ce=vn;vn=null,kr(f,Ce)}}}function H(f,T){var k=f.key;if(!Er[k]){k.length>1&&k[0]=="n"&&(k=k.replace("Numpad","")),k=Yn[k]||k;var D="";if(f.ctrlKey&&(D+="C-"),f.altKey&&(D+="A-"),f.metaKey&&(D+="M-"),Pe.isMac&&f.altKey&&!f.metaKey&&!f.ctrlKey&&(D=D.slice(2)),(D||k.length>1)&&f.shiftKey&&(D+="S-"),T&&!T.expectLiteralNext&&k.length==1){if(jn.keymap&&k in jn.keymap)(jn.remapCtrl!=0||!D)&&(k=jn.keymap[k]);else if(k.charCodeAt(0)>255){var W=f.code&&f.code.slice(-1)||"";f.shiftKey||(W=W.toLowerCase()),W&&(k=W)}}return D+=k,D.length>1&&(D="<"+D+">"),D}}function P(f,T){jn.string!==f&&(jn=O(f)),jn.remapCtrl=T}function O(f){function T(D){return D.split(/\\?(.)/).filter(Boolean)}var k={};return f?(f.split(/((?:[^\\,]|\\.)+),/).map(function(D){if(D){var W=D.split(/((?:[^\\;]|\\.)+);/);if(W.length==3){var z=T(W[1]),q=T(W[2]);if(z.length!==q.length)return;for(var Y=0;Y<z.length;++Y)k[z[Y]]=q[Y]}else if(W.length==1){var Q=T(D);if(Q.length%2!==0)return;for(var Y=0;Y<Q.length;Y+=2)k[Q[Y]]=Q[Y+1]}}}),{keymap:k,string:f}):{keymap:k,string:""}}function S(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}function A(f,T){f.state.vim.inputState=new S,f.state.vim.expectLiteralNext=!1,Pe.signal(f,"vim-command-done",T)}function N(){this.removed=[],this.inserted=""}function B(f,T,k){this.clear(),this.keyBuffer=[f||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!T,this.blockwise=!!k}function U(f,T){var k=Be.registerController.registers;if(!f||f.length!=1)throw Error("Register name must be 1 character");k[f]=T,Jt.push(f)}function K(f){this.registers=f,this.unnamedRegister=f['"']=new B,f["."]=new B,f[":"]=new B,f["/"]=new B,f["+"]=new B}function Z(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function te(f,T){jr[f]=T}function he(f,T){for(var k=[],D=0;D<T;D++)k.push(f);return k}function ne(f,T){Uo[f]=T}function ae(f,T){On[f]=T}function ce(f,T,k){var D=f.state.vim,W=D.insertMode||D.visualMode,z=Math.min(Math.max(f.firstLine(),T.line),f.lastLine()),q=f.getLine(z),Y=q.length-1+ +!!W,Q=Math.min(Math.max(0,T.ch),Y),re=q.charCodeAt(Q);if(56320<=re&&re<=57343){var se=1;k&&k.line==z&&k.ch>Q&&(se=-1),Q+=se,Q>Y&&(Q-=2)}return new Ne(z,Q)}function ue(f){var T={};for(var k in f)f.hasOwnProperty(k)&&(T[k]=f[k]);return T}function ye(f,T,k){return typeof T=="object"&&(k=T.ch,T=T.line),new Ne(f.line+T,f.ch+k)}function Ae(f,T,k,D){D.operator&&(k="operatorPending");for(var W,z=[],q=[],Y=sn?T.length-go:0,Q=Y;Q<T.length;Q++){var re=T[Q];k=="insert"&&re.context!="insert"||re.context&&re.context!=k||D.operator&&re.type=="action"||!(W=$e(f,re.keys))||(W=="partial"&&z.push(re),W=="full"&&q.push(re))}return{partial:z.length&&z,full:q.length&&q}}function $e(f,T){var k=T.slice(-11)=="<character>",D=T.slice(-10)=="<register>";if(k||D){var W=T.length-(k?11:10),z=f.slice(0,W),q=T.slice(0,W);return z==q&&f.length>W?"full":q.indexOf(z)==0?"partial":!1}return f==T?"full":T.indexOf(f)==0?"partial":!1}function Ie(f){var T=/^.*(<[^>]+>)$/.exec(f),k=T?T[1]:f.slice(-1);if(k.length>1)switch(k){case"<CR>":k=`
|
1398
|
+
`;break;case"<Space>":k=" ";break;default:k=""}return k}function Ge(f,T,k){return function(){for(var D=0;D<k;D++)T(f)}}function qe(f){return new Ne(f.line,f.ch)}function ut(f,T){return f.ch==T.ch&&f.line==T.line}function tt(f,T){return f.line<T.line?!0:f.line==T.line&&f.ch<T.ch}function ht(f,T){return arguments.length>2&&(T=ht.apply(void 0,Array.prototype.slice.call(arguments,1))),tt(f,T)?f:T}function Zt(f,T){return arguments.length>2&&(T=Zt.apply(void 0,Array.prototype.slice.call(arguments,1))),tt(f,T)?T:f}function hn(f,T,k){var D=tt(f,T),W=tt(T,k);return D&&W}function qt(f,T){return f.getLine(T).length}function dr(f){return f.trim?f.trim():f.replace(/^\s+|\s+$/g,"")}function dn(f){return f.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Mn(f,T,k){var D=qt(f,T),W=new Array(k-D+1).join(" ");f.setCursor(new Ne(T,D)),f.replaceRange(W,f.getCursor())}function In(f,T){var k=[],D=f.listSelections(),W=qe(f.clipPos(T)),z=!ut(T,W),q=f.getCursor("head"),Y=vt(D,q),Q=ut(D[Y].head,D[Y].anchor),re=D.length-1,se=re-Y>Y?re:0,ve=D[se].anchor,Ce=Math.min(ve.line,W.line),fe=Math.max(ve.line,W.line),we=ve.ch,Oe=W.ch,Le=D[se].head.ch-we,Ue=Oe-we;Le>0&&Ue<=0?(we++,z||Oe--):Le<0&&Ue>=0?(we--,Q||Oe++):Le<0&&Ue==-1&&(we--,Oe++);for(var st=Ce;st<=fe;st++){var Qe={anchor:new Ne(st,we),head:new Ne(st,Oe)};k.push(Qe)}return f.setSelections(k),T.ch=Oe,ve.ch=we,ve}function Gn(f,T,k){for(var D=[],W=0;W<k;W++){var z=ye(T,W,0);D.push({anchor:z,head:z})}f.setSelections(D,0)}function vt(f,T,k){for(var D=0;D<f.length;D++){var W=ut(f[D].anchor,T),z=ut(f[D].head,T);if(W||z)return D}return-1}function He(f,T){var k=T.lastSelection,D=function(){var z=f.listSelections(),q=z[0],Y=z[z.length-1],Q=tt(q.anchor,q.head)?q.anchor:q.head,re=tt(Y.anchor,Y.head)?Y.head:Y.anchor;return[Q,re]},W=function(){var z=f.getCursor(),q=f.getCursor(),Y=k.visualBlock;if(Y){var Q=Y.width,re=Y.height;q=new Ne(z.line+re,z.ch+Q);for(var se=[],ve=z.line;ve<q.line;ve++){var Ce=new Ne(ve,z.ch),fe=new Ne(ve,q.ch),we={anchor:Ce,head:fe};se.push(we)}f.setSelections(se)}else{var Oe=k.anchorMark.find(),Le=k.headMark.find(),Ue=Le.line-Oe.line,st=Le.ch-Oe.ch;q={line:q.line+Ue,ch:Ue?q.ch:st+q.ch},k.visualLine&&(z=new Ne(z.line,0),q=new Ne(q.line,qt(f,q.line))),f.setSelection(z,q)}return[z,q]};return T.visualMode?D():W()}function ke(f,T){var k=T.sel.anchor,D=T.sel.head;T.lastPastedText&&(D=f.posFromIndex(f.indexFromPos(k)+T.lastPastedText.length),T.lastPastedText=null),T.lastSelection={anchorMark:f.setBookmark(k),headMark:f.setBookmark(D),anchor:qe(k),head:qe(D),visualMode:T.visualMode,visualLine:T.visualLine,visualBlock:T.visualBlock}}function ze(f,T,k,D){var W=f.state.vim.sel,z=D?T:W.head,q=D?T:W.anchor,Y;return tt(k,T)&&(Y=k,k=T,T=Y),tt(z,q)?(z=ht(T,z),q=Zt(q,k)):(q=ht(T,q),z=Zt(z,k),z=ye(z,0,-1),z.ch==-1&&z.line!=f.firstLine()&&(z=new Ne(z.line-1,qt(f,z.line-1)))),[q,z]}function Ye(f,T,W){var D=f.state.vim;T=T||D.sel;var W=W||D.visualLine?"line":D.visualBlock?"block":"char",z=dt(f,T,W);f.setSelections(z.ranges,z.primary)}function dt(f,T,k,D){var W=qe(T.head),z=qe(T.anchor);if(k=="char"){var q=!D&&!tt(T.head,T.anchor)?1:0,Y=tt(T.head,T.anchor)?1:0;return W=ye(T.head,0,q),z=ye(T.anchor,0,Y),{ranges:[{anchor:z,head:W}],primary:0}}if(k=="line"){if(tt(T.head,T.anchor))W.ch=0,z.ch=qt(f,z.line);else{z.ch=0;var Q=f.lastLine();W.line>Q&&(W.line=Q),W.ch=qt(f,W.line)}return{ranges:[{anchor:z,head:W}],primary:0}}if(k=="block"){var re=Math.min(z.line,W.line),se=z.ch,ve=Math.max(z.line,W.line),Ce=W.ch;se<Ce?Ce+=1:se+=1;for(var fe=ve-re+1,we=W.line==re?0:fe-1,Oe=[],Le=0;Le<fe;Le++)Oe.push({anchor:new Ne(re+Le,se),head:new Ne(re+Le,Ce)});return{ranges:Oe,primary:we}}}function Ct(f){var T=f.getCursor("head");return f.getSelection().length==1&&(T=ht(T,f.getCursor("anchor"))),T}function xt(f,T){var k=f.state.vim;T!==!1&&f.setCursor(ce(f,k.sel.head)),ke(f,k),k.visualMode=!1,k.visualLine=!1,k.visualBlock=!1,k.insertMode||Pe.signal(f,"vim-mode-change",{mode:"normal"})}function Et(f,T,k){var D=f.getRange(T,k);if(/\n\s*$/.test(D)){var W=D.split(`
|
1399
|
+
`);W.pop();for(var z,z=W.pop();W.length>0&&z&&d(z);z=W.pop())k.line--,k.ch=0;z?(k.line--,k.ch=qt(f,k.line)):k.ch=0}}function It(f,T,k){T.ch=0,k.ch=0,k.line++}function ct(f){if(!f)return 0;var T=f.search(/\S/);return T==-1?f.length:T}function yt(f,T,k){var D=T.inclusive,W=T.innerWord,z=T.bigWord,q=T.noSymbol,Y=T.multiline,Q=k||Ct(f),re=f.getLine(Q.line),se=re,ve=Q.line,Ce=ve,fe=Q.ch,we,Oe=q?fo[0]:gi[0];if(W&&/\s/.test(re.charAt(fe)))Oe=function(fn){return/\s/.test(fn)};else{for(;!Oe(re.charAt(fe));)if(fe++,fe>=re.length){if(!Y)return null;fe--,we=oo(f,Q,!0,z,!0);break}z?Oe=gi[0]:(Oe=fo[0],Oe(re.charAt(fe))||(Oe=fo[1]))}for(var Le=fe,Ue=fe;Oe(re.charAt(Ue))&&Ue>=0;)Ue--;if(Ue++,we)Le=we.to,Ce=we.line,se=f.getLine(Ce),!se&&Le==0&&Le++;else for(;Oe(re.charAt(Le))&&Le<re.length;)Le++;if(D){var st=Le,Qe=Q.ch<=Ue&&/\s/.test(re.charAt(Q.ch));if(!Qe)for(;/\s/.test(se.charAt(Le))&&Le<se.length;)Le++;if(st==Le||Qe){for(var et=Ue;/\s/.test(re.charAt(Ue-1))&&Ue>0;)Ue--;!Ue&&!Qe&&(Ue=et)}}return{start:new Ne(ve,Ue),end:new Ne(Ce,Le)}}function wn(f,T,k){var D=T;if(!Pe.findMatchingTag||!Pe.findEnclosingTag)return{start:D,end:D};var W=Pe.findMatchingTag(f,T)||Pe.findEnclosingTag(f,T);return!W||!W.open||!W.close?{start:D,end:D}:k?{start:W.open.from,end:W.close.to}:{start:W.open.to,end:W.close.from}}function br(f,T,k){ut(T,k)||Be.jumpList.add(f,T,k)}function Wr(f,T){Be.lastCharacterSearch.increment=f,Be.lastCharacterSearch.forward=T.forward,Be.lastCharacterSearch.selectedCharacter=T.selectedCharacter}function Ri(f,T,k,D){var W=qe(f.getCursor()),z=k?1:-1,q=k?f.lineCount():-1,Y=W.ch,Q=W.line,re=f.getLine(Q),se={lineText:re,nextCh:re.charAt(Y),lastCh:null,index:Y,symb:D,reverseSymb:(k?{")":"(","}":"{"}:{"(":")","{":"}"})[D],forward:k,depth:0,curMoveThrough:!1},ve=ti[D];if(!ve)return W;var Ce=ni[ve].init,fe=ni[ve].isComplete;for(Ce&&Ce(se);Q!==q&&T;){if(se.index+=z,se.nextCh=se.lineText.charAt(se.index),!se.nextCh){if(Q+=z,se.lineText=f.getLine(Q)||"",z>0)se.index=0;else{var we=se.lineText.length;se.index=we>0?we-1:0}se.nextCh=se.lineText.charAt(se.index)}fe(se)&&(W.line=Q,W.ch=se.index,T--)}return se.nextCh||se.curMoveThrough?new Ne(Q,se.index):W}function oo(f,T,k,D,W){var z=T.line,q=T.ch,Y=f.getLine(z),Q=k?1:-1,re=D?gi:fo;if(W&&Y==""){if(z+=Q,Y=f.getLine(z),!l(f,z))return null;q=k?0:Y.length}for(;;){if(W&&Y=="")return{from:0,to:0,line:z};for(var se=Q>0?Y.length:-1,ve=se,Ce=se;q!=se;){for(var fe=!1,we=0;we<re.length&&!fe;++we)if(re[we](Y.charAt(q))){for(ve=q;q!=se&&re[we](Y.charAt(q));)q+=Q;if(Ce=q,fe=ve!=Ce,ve==T.ch&&z==T.line&&Ce==ve+Q)continue;return{from:Math.min(ve,Ce+1),to:Math.max(ve,Ce),line:z}}fe||(q+=Q)}if(z+=Q,!l(f,z))return null;Y=f.getLine(z),q=Q>0?0:Y.length}}function pr(f,T,k,D,W,z){var q=qe(T),Y=[];(D&&!W||!D&&W)&&k++;for(var Q=!D||!W,re=0;re<k;re++){var se=oo(f,T,D,z,Q);if(!se){var ve=qt(f,f.lastLine());Y.push(D?{line:f.lastLine(),from:ve,to:ve}:{line:0,from:0,to:0});break}Y.push(se),T=new Ne(se.line,D?se.to-1:se.from)}var Ce=Y.length!=k,fe=Y[0],we=Y.pop();return D&&!W?(!Ce&&(fe.from!=q.ch||fe.line!=q.line)&&(we=Y.pop()),new Ne(we.line,we.from)):D&&W?new Ne(we.line,we.to-1):!D&&W?(!Ce&&(fe.to!=q.ch||fe.line!=q.line)&&(we=Y.pop()),new Ne(we.line,we.to)):new Ne(we.line,we.from)}function so(f,T,k,D,W){var z=T,q=new Ne(z.line+k.repeat-1,1/0),Y=f.clipPos(q);return Y.ch--,W||(D.lastHPos=1/0,D.lastHSPos=f.charCoords(Y,"div").left),q}function Lo(f,T,k,D,W){for(var z=W||f.getCursor(),q=z.ch,Y,Q=0;Q<T;Q++){var re=f.getLine(z.line);if(Y=ja(q,re,D,k),Y==-1)return null;q=Y}return new Ne(f.getCursor().line,Y)}function za(f,T){var k=f.getCursor().line;return ce(f,new Ne(k,T-1))}function Zr(f,T,k,D){!b(k,Ji)&&!Yt.test(k)||(T.marks[k]&&T.marks[k].clear(),T.marks[k]=f.setBookmark(D))}function ja(f,T,k,D,W){var z;return D?(z=T.indexOf(k,f+1),z!=-1):(z=T.lastIndexOf(k,f-1),z!=-1),z}function gs(f,T,k,D,W){function z(Ue){return!/\S/.test(f.getLine(Ue))}function q(Ue,st,Qe){return Qe?z(Ue)!=z(Ue+st):!z(Ue)&&z(Ue+st)}function Y(Ue){D=D>0?1:-1;var st=f.ace.session.getFoldLine(Ue);st&&Ue+D>st.start.row&&Ue+D<st.end.row&&(D=(D>0?st.end.row:st.start.row)-Ue)}var Q=T.line,re=f.firstLine(),se=f.lastLine(),ve,Ce,fe=Q;if(D){for(;re<=fe&&fe<=se&&k>0;)Y(fe),q(fe,D)&&k--,fe+=D;return new Ne(fe,0)}var we=f.state.vim;if(we.visualLine&&q(Q,1,!0)){var Oe=we.sel.anchor;q(Oe.line,-1,!0)&&(!W||Oe.line!=Q)&&(Q+=1)}var Le=z(Q);for(fe=Q;fe<=se&&k;fe++)q(fe,1,!0)&&(!W||z(fe)!=Le)&&k--;for(Ce=new Ne(fe,0),fe>se&&!Le?Le=!0:W=!1,fe=Q;fe>re&&!((!W||z(fe)==Le||fe==Q)&&q(fe,-1,!0));fe--);return ve=new Ne(fe,0),{start:ve,end:Ce}}function ta(f,T,k,D,W){function z(re){re.pos+re.dir<0||re.pos+re.dir>=re.line.length?re.line=null:re.pos+=re.dir}function q(re,se,ve,Ce){var fe=re.getLine(se),we={line:fe,ln:se,pos:ve,dir:Ce};if(we.line==="")return{ln:we.ln,pos:we.pos};var Oe=we.pos;for(z(we);we.line!==null;){if(Oe=we.pos,w(we.line[we.pos])){if(!W)return{ln:we.ln,pos:we.pos+1};for(z(we);we.line!==null&&d(we.line[we.pos]);)Oe=we.pos,z(we);return{ln:we.ln,pos:Oe+1}}z(we)}return{ln:we.ln,pos:Oe+1}}function Y(re,se,ve,Ce){var fe=re.getLine(se),we={line:fe,ln:se,pos:ve,dir:Ce};if(we.line==="")return{ln:we.ln,pos:we.pos};var Oe=we.pos;for(z(we);we.line!==null;){if(!d(we.line[we.pos])&&!w(we.line[we.pos]))Oe=we.pos;else if(w(we.line[we.pos]))return W?d(we.line[we.pos+1])?{ln:we.ln,pos:we.pos+1}:{ln:we.ln,pos:Oe}:{ln:we.ln,pos:Oe};z(we)}return we.line=fe,W&&d(we.line[we.pos])?{ln:we.ln,pos:we.pos}:{ln:we.ln,pos:Oe}}for(var Q={ln:T.line,pos:T.ch};k>0;)D<0?Q=Y(f,Q.ln,Q.pos,D):Q=q(f,Q.ln,Q.pos,D),k--;return new Ne(Q.ln,Q.pos)}function Ei(f,T,k,D){function W(Q,re){if(re.pos+re.dir<0||re.pos+re.dir>=re.line.length){if(re.ln+=re.dir,!l(Q,re.ln)){re.line=null,re.ln=null,re.pos=null;return}re.line=Q.getLine(re.ln),re.pos=re.dir>0?0:re.line.length-1}else re.pos+=re.dir}function z(Q,re,se,ve){var Le=Q.getLine(re),Ce=Le==="",fe={line:Le,ln:re,pos:se,dir:ve},we={ln:fe.ln,pos:fe.pos},Oe=fe.line==="";for(W(Q,fe);fe.line!==null;){if(we.ln=fe.ln,we.pos=fe.pos,fe.line===""&&!Oe)return{ln:fe.ln,pos:fe.pos};if(Ce&&fe.line!==""&&!d(fe.line[fe.pos]))return{ln:fe.ln,pos:fe.pos};w(fe.line[fe.pos])&&!Ce&&(fe.pos===fe.line.length-1||d(fe.line[fe.pos+1]))&&(Ce=!0),W(Q,fe)}var Le=Q.getLine(we.ln);we.pos=0;for(var Ue=Le.length-1;Ue>=0;--Ue)if(!d(Le[Ue])){we.pos=Ue;break}return we}function q(Q,re,se,ve){var Oe=Q.getLine(re),Ce={line:Oe,ln:re,pos:se,dir:ve},fe={ln:Ce.ln,pos:null},we=Ce.line==="";for(W(Q,Ce);Ce.line!==null;){if(Ce.line===""&&!we)return fe.pos!==null?fe:{ln:Ce.ln,pos:Ce.pos};if(!(!w(Ce.line[Ce.pos])||fe.pos===null||Ce.ln===fe.ln&&Ce.pos+1===fe.pos))return fe;Ce.line!==""&&!d(Ce.line[Ce.pos])&&(we=!1,fe={ln:Ce.ln,pos:Ce.pos}),W(Q,Ce)}var Oe=Q.getLine(fe.ln);fe.pos=0;for(var Le=0;Le<Oe.length;++Le)if(!d(Oe[Le])){fe.pos=Le;break}return fe}for(var Y={ln:T.line,pos:T.ch};k>0;)D<0?Y=q(f,Y.ln,Y.pos,D):Y=z(f,Y.ln,Y.pos,D),k--;return new Ne(Y.ln,Y.pos)}function Bn(f,T,k,D){var W=T,z,q,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[k],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[k],re=f.getLine(W.line).charAt(W.ch),se=re===Q?1:0;if(z=f.scanForBracket(new Ne(W.line,W.ch+se),-1,void 0,{bracketRegex:Y}),q=f.scanForBracket(new Ne(W.line,W.ch+se),1,void 0,{bracketRegex:Y}),!z||!q)return null;if(z=z.pos,q=q.pos,z.line==q.line&&z.ch>q.ch||z.line>q.line){var ve=z;z=q,q=ve}return D?q.ch+=1:z.ch+=1,{start:z,end:q}}function xr(f,T,k,D){var W=qe(T),z=f.getLine(W.line),q=z.split(""),Y,Q,re,se,ve=q.indexOf(k);if(W.ch<ve)W.ch=ve;else if(ve<W.ch&&q[W.ch]==k){var Ce=/string/.test(f.getTokenTypeAt(ye(T,0,1))),fe=/string/.test(f.getTokenTypeAt(T)),we=Ce&&!fe;we||(Q=W.ch,--W.ch)}if(q[W.ch]==k&&!Q)Y=W.ch+1;else for(re=W.ch;re>-1&&!Y;re--)q[re]==k&&(Y=re+1);if(Y&&!Q)for(re=Y,se=q.length;re<se&&!Q;re++)q[re]==k&&(Q=re);return!Y||!Q?{start:W,end:W}:(D&&(--Y,++Q),{start:new Ne(W.line,Y),end:new Ne(W.line,Q)})}function Li(){}function _n(f){var T=f.state.vim;return T.searchState_||(T.searchState_=new Li)}function Cr(f){return Oi(f,"/")}function Gi(f){return fs(f,"/")}function Oi(f,T){var k=fs(f,T)||[];if(!k.length)return[];var D=[];if(k[0]===0){for(var W=0;W<k.length;W++)typeof k[W]=="number"&&D.push(f.substring(k[W]+1,k[W+1]));return D}}function fs(f,T){T||(T="/");for(var k=!1,D=[],W=0;W<f.length;W++){var z=f.charAt(W);!k&&z==T&&D.push(W),k=!k&&z=="\\"}return D}function na(f){for(var T="|(){",k="}",D=!1,W=[],z=-1;z<f.length;z++){var q=f.charAt(z)||"",Y=f.charAt(z+1)||"",Q=Y&&T.indexOf(Y)!=-1;D?((q!=="\\"||!Q)&&W.push(q),D=!1):q==="\\"?(D=!0,Y&&k.indexOf(Y)!=-1&&(Q=!0),(!Q||Y==="\\")&&W.push(q)):(W.push(q),Q&&Y!=="\\"&&W.push("\\"))}return W.join("")}function Ha(f){for(var T=!1,k=[],D=-1;D<f.length;D++){var W=f.charAt(D)||"",z=f.charAt(D+1)||"";vi[W+z]?(k.push(vi[W+z]),D++):T?(k.push(W),T=!1):W==="\\"?(T=!0,o(z)||z==="$"?k.push("$"):z!=="/"&&z!=="\\"&&k.push("\\")):(W==="$"&&k.push("$"),k.push(W),z==="/"&&k.push("\\"))}return k.join("")}function Ua(f){for(var T=new Pe.StringStream(f),k=[];!T.eol();){for(;T.peek()&&T.peek()!="\\";)k.push(T.next());var D=!1;for(var W in or)if(T.match(W,!0)){D=!0,k.push(or[W]);break}D||k.push(T.next())}return k.join("")}function Ni(f,T,k){var D=Be.registerController.getRegister("/");if(D.setText(f),f instanceof RegExp)return f;var W=Gi(f),z,q;if(!W.length)z=f;else{z=f.substring(0,W[0]);var Y=f.substring(W[0]);q=Y.indexOf("i")!=-1}if(!z)return null;_("pcre")||(z=na(z)),k&&(T=/^[^A-Z]*$/.test(z));var Q=new RegExp(z,T||q?"im":"m");return Q}function Jr(f){typeof f=="string"&&(f=document.createElement(f));for(var T,k=1;k<arguments.length;k++)if(T=arguments[k])if(typeof T!="object"&&(T=document.createTextNode(T)),T.nodeType)f.appendChild(T);else for(var D in T)Object.prototype.hasOwnProperty.call(T,D)&&(D[0]==="$"?f.style[D.slice(1)]=T[D]:f.setAttribute(D,T[D]));return f}function zt(f,T){var k=Jr("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},T);f.openNotification?f.openNotification(k,{bottom:!0,duration:5e3}):alert(k.innerText)}function ra(f,T){return Jr("div",{$display:"flex"},Jr("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},f,Jr("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),T&&Jr("span",{$color:"#888"},T))}function kr(f,T){if(Rr.length){T.value||(T.value=""),vn=T;return}var k=ra(T.prefix,T.desc);if(f.openDialog)f.openDialog(k,T.onClose,{onKeyDown:T.onKeyDown,onKeyUp:T.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:T.value});else{var D="";typeof T.prefix!="string"&&T.prefix&&(D+=T.prefix.textContent),T.desc&&(D+=" "+T.desc),T.onClose(prompt(D,""))}}function zn(f,T){if(f instanceof RegExp&&T instanceof RegExp){for(var k=["global","multiline","ignoreCase","source"],D=0;D<k.length;D++){var W=k[D];if(f[W]!==T[W])return!1}return!0}return!1}function pn(f,T,k,D){if(T){var W=_n(f),z=Ni(T,!!k,!!D);if(z)return hi(f,z),zn(z,W.getQuery())||W.setQuery(z),z}}function Rn(f){if(f.source.charAt(0)=="^")var T=!0;return{token:function(k){if(T&&!k.sol()){k.skipToEnd();return}var D=k.match(f,!1);if(D)return D[0].length==0?(k.next(),"searching"):!k.sol()&&(k.backUp(1),!f.exec(k.next()+D[0]))?(k.next(),null):(k.match(f),"searching");for(;!k.eol()&&(k.next(),!k.match(f,!1)););},query:f}}function hi(f,T){clearTimeout(sr);var k=_n(f);k.highlightTimeout=sr,sr=setTimeout(function(){if(f.state.vim){var D=_n(f);D.highlightTimeout=null;var W=D.getOverlay();(!W||T!=W.query)&&(W&&f.removeOverlay(W),W=Rn(T),f.addOverlay(W),f.showMatchesOnScrollbar&&(D.getScrollbarAnnotate()&&D.getScrollbarAnnotate().clear(),D.setScrollbarAnnotate(f.showMatchesOnScrollbar(T))),D.setOverlay(W))}},50)}function _r(f,T,k,D){return D===void 0&&(D=1),f.operation(function(){for(var W=f.getCursor(),z=f.getSearchCursor(k,W),q=0;q<D;q++){var Y=z.find(T);if(q==0&&Y&&ut(z.from(),W)){var Q=T?z.from():z.to();Y=z.find(T),Y&&!Y[0]&&ut(z.from(),Q)&&f.getLine(Q.line).length==Q.ch&&(Y=z.find(T))}if(!Y&&(z=f.getSearchCursor(k,T?new Ne(f.lastLine()):new Ne(f.firstLine(),0)),!z.find(T)))return}return z.from()})}function di(f,T,k,D,W){return D===void 0&&(D=1),f.operation(function(){var z=f.getCursor(),q=f.getSearchCursor(k,z),Y=q.find(!T);!W.visualMode&&Y&&ut(q.from(),z)&&q.find(!T);for(var Q=0;Q<D;Q++)if(Y=q.find(T),!Y&&(q=f.getSearchCursor(k,T?new Ne(f.lastLine()):new Ne(f.firstLine(),0)),!q.find(T)))return;return[q.from(),q.to()]})}function Oo(f){var T=_n(f);T.highlightTimeout&&(clearTimeout(T.highlightTimeout),T.highlightTimeout=null),f.removeOverlay(_n(f).getOverlay()),T.setOverlay(null),T.getScrollbarAnnotate()&&(T.getScrollbarAnnotate().clear(),T.setScrollbarAnnotate(null))}function ms(f,T,k){return typeof f!="number"&&(f=f.line),T instanceof Array?b(f,T):typeof k=="number"?f>=T&&f<=k:f==T}function Yi(f){var T=f.ace.renderer;return{top:T.getFirstFullyVisibleRow(),bottom:T.getLastFullyVisibleRow()}}function Br(f,T,k){if(k=="'"||k=="`")return Be.jumpList.find(f,-1)||new Ne(0,0);if(k==".")return ao(f);var D=T.marks[k];return D&&D.find()}function ao(f){if(f.getLastEditEnd)return f.getLastEditEnd();for(var T=f.doc.history.done,k=T.length;k--;)if(T[k].changes)return qe(T[k].changes[0].to)}function No(f,T,k,D,W,z,q,Y,Q){function re(){f.operation(function(){for(;!Oe;)se(),Ce();fe()})}function se(){var Qe=f.getRange(z.from(),z.to()),et=Qe.replace(q,Y),fn=z.to().line;z.replace(et),Ue=z.to().line,W+=Ue-fn,st=Ue<fn}function ve(){var Qe=Le&&qe(z.to()),et=z.findNext();return et&&!et[0]&&Qe&&ut(z.from(),Qe)&&(et=z.findNext()),et}function Ce(){for(;ve()&&ms(z.from(),D,W);)if(!(!k&&z.from().line==Ue&&!st)){f.scrollIntoView(z.from(),30),f.setSelection(z.from(),z.to()),Le=z.from(),Oe=!1;return}Oe=!0}function fe(Qe){if(Qe&&Qe(),f.focus(),Le){f.setCursor(Le);var et=f.state.vim;et.exMode=!1,et.lastHPos=et.lastHSPos=Le.ch}Q&&Q()}function we(Qe,et,fn){Pe.e_stop(Qe);var at=H(Qe);switch(at){case"y":se(),Ce();break;case"n":Ce();break;case"a":var bn=Q;Q=void 0,f.operation(re),Q=bn;break;case"l":se();case"q":case"<Esc>":case"<C-c>":case"<C-[>":fe(fn)}return Oe&&fe(fn),!0}f.state.vim.exMode=!0;var Oe=!1,Le,Ue,st;if(Ce(),Oe){zt(f,"No matches for "+q.source);return}if(!T){re(),Q&&Q();return}kr(f,{prefix:Jr("span","replace with ",Jr("strong",Y)," (y/n/a/q/l)"),onKeyDown:we})}function zr(f,T){var k=f.state.vim,D=Be.macroModeState,W=Be.registerController.getRegister("."),z=D.isPlaying,q=D.lastInsertModeChanges;z||(f.off("change",lo),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=null,Pe.off(f.getInputField(),"keydown",bs)),!z&&k.insertModeRepeat>1&&(ia(f,k,k.insertModeRepeat-1,!0),k.lastEditInputState.repeatOverride=k.insertModeRepeat),delete k.insertModeRepeat,k.insertMode=!1,T||f.setCursor(f.getCursor().line,f.getCursor().ch-1),f.setOption("keyMap","vim"),f.setOption("disableInput",!0),f.toggleOverwrite(!1),W.setText(q.changes.join("")),Pe.signal(f,"vim-mode-change",{mode:"normal"}),D.isRecording&&tr(D)}function Do(f){An.unshift(f)}function vs(f,T,k,D,W){var z={keys:f,type:T};z[T]=k,z[T+"Args"]=D;for(var q in W)z[q]=W[q];Do(z)}function ys(f,T,k,D){var W=Be.registerController.getRegister(D);if(D==":"){W.keyBuffer[0]&&fr.processCommand(f,W.keyBuffer[0]),k.isPlaying=!1;return}var z=W.keyBuffer,q=0;k.isPlaying=!0,k.replaySearchQueries=W.searchQueries.slice(0);for(var Y=0;Y<z.length;Y++)for(var Q=z[Y],re,se;Q;)if(re=/<\w+-.+?>|<\w+>|./.exec(Q),se=re[0],Q=Q.substring(re.index+se.length),wt.handleKey(f,se,"macro"),T.insertMode){var ve=W.insertModeChanges[q++].changes;Be.macroModeState.lastInsertModeChanges.changes=ve,zo(f,ve,1),zr(f)}k.isPlaying=!1}function Fo(f,T){if(!f.isPlaying){var k=f.latestRegister,D=Be.registerController.getRegister(k);D&&D.pushText(T)}}function tr(f){if(!f.isPlaying){var T=f.latestRegister,k=Be.registerController.getRegister(T);k&&k.pushInsertModeChanges&&k.pushInsertModeChanges(f.lastInsertModeChanges)}}function ws(f,T){if(!f.isPlaying){var k=f.latestRegister,D=Be.registerController.getRegister(k);D&&D.pushSearchQuery&&D.pushSearchQuery(T)}}function lo(f,T){var k=Be.macroModeState,D=k.lastInsertModeChanges;if(!k.isPlaying)for(var W=f.state.vim;T;){if(D.expectCursorActivityForChange=!0,D.ignoreCount>1)D.ignoreCount--;else if(T.origin=="+input"||T.origin=="paste"||T.origin===void 0){var z=f.listSelections().length;z>1&&(D.ignoreCount=z);var q=T.text.join(`
|
1400
|
+
`);if(D.maybeReset&&(D.changes=[],D.maybeReset=!1),q)if(f.state.overwrite&&!/\n/.test(q))D.changes.push([q]);else{if(q.length>1){var Y=W&&W.insertEnd&&W.insertEnd.find(),Q=f.getCursor();if(Y&&Y.line==Q.line){var re=Y.ch-Q.ch;re>0&&re<q.length&&(D.changes.push([q,re]),q="")}}q&&D.changes.push(q)}}T=T.next}}function Po(f){var T=f.state.vim;if(T.insertMode){var k=Be.macroModeState;if(k.isPlaying)return;var D=k.lastInsertModeChanges;D.expectCursorActivityForChange?D.expectCursorActivityForChange=!1:(D.maybeReset=!0,T.insertEnd&&T.insertEnd.clear(),T.insertEnd=f.setBookmark(f.getCursor(),{insertLeft:!0}))}else f.curOp.isVimOp||Wo(f,T)}function Wo(f,T,k){var D=f.getCursor("anchor"),W=f.getCursor("head");if(T.visualMode&&!f.somethingSelected()?xt(f,!1):!T.visualMode&&!T.insertMode&&f.somethingSelected()&&(T.visualMode=!0,T.visualLine=!1,Pe.signal(f,"vim-mode-change",{mode:"visual"})),T.visualMode){var z=tt(W,D)?0:-1,q=tt(W,D)?-1:0;W=ye(W,0,z),D=ye(D,0,q),T.sel={anchor:D,head:W},Zr(f,T,"<",ht(W,D)),Zr(f,T,">",Zt(W,D))}else!T.insertMode&&!k&&(T.lastHPos=f.getCursor().ch)}function Xi(f,T){this.keyName=f,this.key=T.key,this.ctrlKey=T.ctrlKey,this.altKey=T.altKey,this.metaKey=T.metaKey,this.shiftKey=T.shiftKey}function bs(f){var T=Be.macroModeState,k=T.lastInsertModeChanges,D=Pe.keyName?Pe.keyName(f):f.key;D&&(D.indexOf("Delete")!=-1||D.indexOf("Backspace")!=-1)&&(k.maybeReset&&(k.changes=[],k.maybeReset=!1),k.changes.push(new Xi(D,f)))}function ia(f,T,k,D){function W(){Y?Ln.processAction(f,T,T.lastEditActionCommand):Ln.evalInput(f,T)}function z(se){if(q.lastInsertModeChanges.changes.length>0){se=T.lastEditActionCommand?se:1;var ve=q.lastInsertModeChanges;zo(f,ve.changes,se)}}var q=Be.macroModeState;q.isPlaying=!0;var Y=!!T.lastEditActionCommand,Q=T.inputState;if(T.inputState=T.lastEditInputState,Y&&T.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<k;re++)W(),z(1);else D||W(),z(k);T.inputState=Q,T.insertMode&&!D&&zr(f),q.isPlaying=!1}function Bo(f,T){Pe.lookupKey(T,"vim-insert",function(k){return typeof k=="string"?Pe.commands[k](f):k(f),!0})}function zo(f,T,k){var D=f.getCursor("head"),W=Be.macroModeState.lastInsertModeChanges.visualBlock;W&&(Gn(f,D,W+1),k=f.listSelections().length,f.setCursor(D));for(var z=0;z<k;z++){W&&f.setCursor(ye(D,z,0));for(var q=0;q<T.length;q++){var Y=T[q];if(Y instanceof Xi)Bo(f,Y.keyName);else if(typeof Y=="string")f.replaceSelection(Y);else{var Q=f.getCursor(),re=ye(Q,0,Y[0].length-(Y[1]||0));f.replaceRange(Y[0],Q,Y[1]?Q:re),f.setCursor(re)}}}W&&f.setCursor(ye(D,0,1))}function xs(f,T,k,D){T.length>1&&T[0]=="n"&&(T=T.replace("numpad","")),T=Ar[T]||T;var W="";if(k.ctrlKey&&(W+="C-"),k.altKey&&(W+="A-"),(W||T.length>1)&&k.shiftKey&&(W+="S-"),D&&!D.expectLiteralNext&&T.length==1){if(jn.keymap&&T in jn.keymap)(jn.remapCtrl!==!1||!W)&&(T=jn.keymap[T]);else if(T.charCodeAt(0)>255){var z=k.code&&k.code.slice(-1)||"";k.shiftKey||(z=z.toLowerCase()),z&&(T=z)}}return W+=T,W.length>1&&(W="<"+W+">"),W}function jo(f){var T=new f.constructor;return Object.keys(f).forEach(function(k){if(k!="insertEnd"){var D=f[k];Array.isArray(D)?D=D.slice():D&&typeof D=="object"&&D.constructor!=Object&&(D=jo(D)),T[k]=D}}),f.sel&&(T.sel={head:f.sel.head&&qe(f.sel.head),anchor:f.sel.anchor&&qe(f.sel.anchor)}),T}function co(f,T,k){var D=!1,W=wt.maybeInitVimState_(f),z=W.visualBlock||W.wasInVisualBlock,q=f.ace.inMultiSelectMode;if(W.wasInVisualBlock&&!q?W.wasInVisualBlock=!1:q&&W.visualBlock&&(W.wasInVisualBlock=!0),T=="<Esc>"&&!W.insertMode&&!W.visualMode&&q)f.ace.exitMultiSelectMode();else if(z||!q||f.ace.inVirtualSelectionMode)D=wt.handleKey(f,T,k);else{var Y=jo(W),Q=W.inputState.changeQueueList||[];f.operation(function(){f.curOp.isVimOp=!0;var re=0;f.ace.forEachSelection(function(){var se=f.ace.selection;f.state.vim.lastHPos=se.$desiredColumn==null?se.lead.column:se.$desiredColumn,f.state.vim.inputState.changeQueue=Q[re];var ve=f.getCursor("head"),Ce=f.getCursor("anchor"),fe=tt(ve,Ce)?0:-1,we=tt(ve,Ce)?-1:0;ve=ye(ve,0,fe),Ce=ye(Ce,0,we),f.state.vim.sel.head=ve,f.state.vim.sel.anchor=Ce,D=ri(f,T,k),se.$desiredColumn=f.state.vim.lastHPos==-1?null:f.state.vim.lastHPos,f.ace.inVirtualSelectionMode&&(Q[re]=f.state.vim.inputState.changeQueue),f.virtualSelectionMode()&&(f.state.vim=jo(Y)),re++}),f.curOp.cursorActivity&&!D&&(f.curOp.cursorActivity=!1),W.status=f.state.vim.status,f.state.vim=W,W.inputState.changeQueueList=Q,W.inputState.changeQueue=null},!0)}return D&&!W.visualMode&&!W.insert&&W.visualMode!=f.somethingSelected()&&Wo(f,W,!0),D}function pi(f,T){T.off("beforeEndOperation",pi);var k=T.state.cm.vimCmd;k&&T.execCommand(k.exec?k:k.name,k.args),T.curOp=T.prevOp}var nr=e("../range").Range,Qi=e("../lib/event_emitter").EventEmitter,Di=e("../lib/dom"),oa=e("../lib/oop"),Va=e("../lib/keys"),uo=e("../lib/event"),Fi=e("../search").Search,ho=e("../lib/useragent"),Ho=e("../search_highlight").SearchHighlight,po=e("../commands/multi_select_commands"),sa=e("../mode/text").Mode.prototype.tokenRe,Zi=e("../ext/hardwrap").hardWrap;e("../multi_select");var Pe=function(f){this.ace=f,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)};Pe.Pos=function(f,T){if(!(this instanceof Ne))return new Ne(f,T);this.line=f,this.ch=T},Pe.defineOption=function(f,T,k){},Pe.commands={redo:function(f){f.ace.redo()},undo:function(f){f.ace.undo()},newlineAndIndent:function(f){f.ace.insert(`
|
1401
|
+
`)},goLineLeft:function(f){f.ace.selection.moveCursorLineStart()},goLineRight:function(f){f.ace.selection.moveCursorLineEnd()}},Pe.keyMap={},Pe.addClass=Pe.rmClass=function(){},Pe.e_stop=Pe.e_preventDefault=uo.stopEvent,Pe.keyName=function(f){var T=Va[f.keyCode]||f.key||"";return T.length==1&&(T=T.toUpperCase()),T=uo.getModifierString(f).replace(/(^|-)\w/g,function(k){return k.toUpperCase()})+T,T},Pe.keyMap.default=function(f){return function(T){var k=T.ace.commands.commandKeyBinding[f.toLowerCase()];return k&&T.ace.execCommand(k)!==!1}},Pe.lookupKey=function f(T,k,D){k||(k="default"),typeof k=="string"&&(k=Pe.keyMap[k]||Pe.keyMap.default);var W=typeof k=="function"?k(T):k[T];if(W===!1)return"nothing";if(W==="...")return"multi";if(W!=null&&D(W))return"handled";if(k.fallthrough){if(!Array.isArray(k.fallthrough))return f(T,k.fallthrough,D);for(var z=0;z<k.fallthrough.length;z++){var q=f(T,k.fallthrough[z],D);if(q)return q}}},Pe.findMatchingTag=function(f,T){return f.findMatchingTag(T)},Pe.findEnclosingTag=function(f,T){},Pe.signal=function(f,T,k){return f._signal(T,k)},Pe.on=uo.addListener,Pe.off=uo.removeListener,Pe.isWordChar=function(f){return f<""?/^\w$/.test(f):(sa.lastIndex=0,sa.test(f))},(function(){oa.implement(Pe.prototype,Qi),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 D={text:k.action[0]=="i"?k.lines:[]},W=this.curOp=this.curOp||{};W.changeHandlers||(W.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),W.lastChange?W.lastChange.next=W.lastChange=D:W.lastChange=W.change=D,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(po.keyboardHandler)},this.operation=function(k,D){if(!D&&this.curOp||D&&this.curOp&&this.curOp.force)return k();if((D||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var W=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var z=this.curOp=this.curOp||{};this.curOp.force=D;var q=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(),!z.cursorActivity&&!z.lastChange&&W&&(this.ace.prevOp=W)),(D||!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,D,W){var z=W?W[k+"Handlers"]:(this._eventRegistry||{})[k];if(z){z=z.slice();for(var q=0;q<z.length;q++)z[q](this,D)}},this.firstLine=function(){return 0},this.lastLine=function(){return this.ace.session.getLength()-1},this.lineCount=function(){return this.ace.session.getLength()},this.setCursor=function(k,D){typeof k=="object"&&(D=k.ch,k=k.line);var W=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:k,column:D}),this.ace.selection.moveTo(k,D),W&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(k){var D=this.ace.selection,W=k=="anchor"?D.isEmpty()?D.lead:D.anchor:k=="head"||!k?D.lead:D.getRange()[k];return y(W)},this.listSelections=function(k){var D=this.ace.multiSelect.rangeList.ranges;return!D.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:D.map(function(W){return{anchor:this.clipPos(y(W.cursor==W.end?W.start:W.end)),head:this.clipPos(y(W.cursor))}},this)},this.setSelections=function(k,D){var W=this.ace.multiSelect,z=k.map(function(re){var se=m(re.anchor),ve=m(re.head),Ce=nr.comparePoints(se,ve)<0?new nr.fromPoints(se,ve):new nr.fromPoints(ve,se);return Ce.cursor=nr.comparePoints(Ce.start,ve)?Ce.end:Ce.start,Ce});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(z[0]);return}D?z[D]&&z.push(z.splice(D,1)[0]):z=z.reverse(),W.toSingleRange(z[0].clone());for(var q=this.ace.session,Y=0;Y<z.length;Y++){var Q=q.$clipRangeToDocument(z[Y]);W.addRange(Q)}},this.setSelection=function(k,D,W){var z=this.ace.selection;z.moveTo(k.line,k.ch),z.selectTo(D.line,D.ch),W&&W.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(k){return!this.ace.selection.isEmpty()},this.clipPos=function(k){var D=this.ace.session.$clipPositionToDocument(k.line,k.ch);return y(D)},this.foldCode=function(k){this.ace.session.$toggleFoldWidget(k.line,{})},this.markText=function(k){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(k){var D=k.action=="insert",W=k.start,z=k.end,q=(z.row-W.row)*(D?1:-1),Y=(z.column-W.column)*(D?1:-1);D&&(z=W);for(var Q in this.marks){var re=this.marks[Q],se=nr.comparePoints(re,W);if(!(se<0)){if(se===0&&D)if(!re.$insertRight)se=1;else{if(re.bias!=1){re.bias=-1;continue}se=1}var ve=D?se:nr.comparePoints(re,z);if(ve>0){re.row+=q,re.column+=re.row==z.row?Y:0;continue}!D&&ve<=0&&(re.row=W.row,re.column=W.column,ve===0&&(re.bias=1))}}};var f=function(k,D,W,z){this.cm=k,this.id=D,this.row=W,this.column=z,k.marks[this.id]=this};f.prototype.clear=function(){delete this.cm.marks[this.id]},f.prototype.find=function(){return y(this)},this.setBookmark=function(k,D){var W=new f(this,this.$uid++,k.line,k.ch);return(!D||!D.insertLeft)&&(W.$insertRight=!0),this.marks[W.id]=W,W},this.moveH=function(k,D){if(D=="char"){var W=this.ace.selection;W.clearSelection(),W.moveCursorBy(0,k)}},this.findPosV=function(k,D,W,z){if(W=="page"){var q=this.ace.renderer,Y=q.layerConfig;D*=Math.floor(Y.height/Y.lineHeight),W="line"}if(W=="line"){var Q=this.ace.session.documentToScreenPosition(k.line,k.ch);z!=null&&(Q.column=z),Q.row+=D,Q.row=Math.min(Math.max(0,Q.row),this.ace.session.getScreenLength()-1);var re=this.ace.session.screenToDocumentPosition(Q.row,Q.column);return y(re)}debugger},this.charCoords=function(k,D){if(D=="div"||!D){var W=this.ace.session.documentToScreenPosition(k.line,k.ch);return{left:W.column,top:W.row}}if(D=="local"){var z=this.ace.renderer,W=this.ace.session.documentToScreenPosition(k.line,k.ch),q=z.layerConfig.lineHeight,Y=z.layerConfig.characterWidth,Q=q*W.row;return{left:W.column*Y,top:Q,bottom:Q+q}}},this.coordsChar=function(k,D){var W=this.ace.renderer;if(D=="local"){var z=Math.max(0,Math.floor(k.top/W.lineHeight)),q=Math.max(0,Math.floor(k.left/W.characterWidth)),Y=W.session.screenToDocumentPosition(z,q);return y(Y)}if(D=="div")throw"not implemented"},this.getSearchCursor=function(k,D,W){var z=!1,q=!1;k instanceof RegExp&&!k.global&&(z=!k.ignoreCase,k=k.source,q=!0),k=="\\n"&&(k=`
|
1402
|
+
`,q=!1);var Y=new Fi;D.ch==null&&(D.ch=Number.MAX_VALUE);var Q={row:D.line,column:D.ch},re=this,se=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(ve){Y.setOptions({needle:k,caseSensitive:z,wrap:!1,backwards:ve,regExp:q,start:se||Q});var Ce=Y.find(re.ace.session);return se=Ce,se&&[!se.isEmpty()]},from:function(){return se&&y(se.start)},to:function(){return se&&y(se.end)},replace:function(ve){se&&(se.end=re.ace.session.doc.replace(se,ve))}}},this.scrollTo=function(k,D){var W=this.ace.renderer,z=W.layerConfig,q=z.maxHeight;q-=(W.$size.scrollerHeight-W.lineHeight)*W.$scrollPastEnd,D!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(D,q))),k!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(k,z.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(k,D){if(k){var W=this.ace.renderer,z={top:0,bottom:D};W.scrollCursorIntoView(m(k),W.lineHeight*2/W.$size.scrollerHeight,z)}},this.getLine=function(k){return this.ace.session.getLine(k)},this.getRange=function(k,D){return this.ace.session.getTextRange(new nr(k.line,k.ch,D.line,D.ch))},this.replaceRange=function(k,D,W){W||(W=D);var z=new nr(D.line,D.ch,W.line,W.ch);return this.ace.session.$clipRangeToDocument(z),this.ace.session.replace(z,k)},this.replaceSelection=this.replaceSelections=function(k){var D=Array.isArray(k)&&k,W=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(W.getRange(),D?k[0]||"":k);return}W.inVirtualSelectionMode=!0;var z=W.rangeList.ranges;z.length||(z=[this.ace.multiSelect.getRange()]);for(var q=z.length;q--;)this.ace.session.replace(z[q],D?k[q]||"":k);W.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(k){return this.getRange(k.anchor,k.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var T={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(k,D){switch(this.state[k]=D,k){case"indentWithTabs":k=T[k],D=!D;break;case"keyMap":this.state.$keyMap=D;return;default:k=T[k]}k&&this.ace.setOption(k,D)},this.getOption=function(k){var D,W=T[k];switch(W&&(D=this.ace.getOption(W)),k){case"indentWithTabs":return k=T[k],!D;case"keyMap":return this.state.$keyMap||"vim"}return W?D: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 D=new Ho(null,"ace_highlight-marker","text"),W=this.ace.session.addDynamicMarker(D);D.id=W.id,D.session=this.ace.session,D.destroy=function(q){D.session.off("change",D.updateOnChange),D.session.off("changeEditor",D.destroy),D.session.removeMarker(D.id),D.session=null},D.updateOnChange=function(q){var Y=q.start.row;Y==q.end.row?D.cache[Y]=void 0:D.cache.splice(Y,D.cache.length)},D.session.on("changeEditor",D.destroy),D.session.on("change",D.updateOnChange)}var z=new RegExp(k.query.source,"gmi");this.$searchHighlight=k.highlight=D,this.$searchHighlight.setRegexp(z),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(k){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var k=this.ace.renderer,D=k.layerConfig;return{left:k.scrollLeft,top:k.scrollTop,height:D.maxHeight,width:D.width,clientHeight:D.height,clientWidth:D.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(k){return this.ace.setValue(k,-1)},this.getTokenTypeAt=function(k){var D=this.ace.session.getTokenAt(k.line,k.ch);return D&&/comment|string/.test(D.type)?"string":""},this.findMatchingBracket=function(k){var D=this.ace.session.findMatchingBracket(m(k));return{to:D&&y(D)}},this.findMatchingTag=function(k){var D=this.ace.session.getMatchingTags(m(k));if(D)return{open:{from:y(D.openTag.start),to:y(D.openTag.end)},close:{from:y(D.closeTag.start),to:y(D.closeTag.end)}}},this.indentLine=function(k,D){D===!0?this.ace.session.indentRows(k,k," "):D===!1&&this.ace.session.outdentRows(new nr(k,0,k,0))},this.indexFromPos=function(k){return this.ace.session.doc.positionToIndex(m(k))},this.posFromIndex=function(k){return y(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,D,W,z){var q=z.bracketRegex.source,Y=/paren|text|operator|tag/;if(D==1)var Q=this.ace.session.$findClosingBracket(q.slice(1,2),m(k),Y);else{var Q=this.ace.session.$findOpeningBracket(q.slice(-2,-1),{row:k.line,column:k.ch+1},Y);!Q&&z.bracketRegex&&z.bracketRegex.test(this.getLine(k.line)[k.ch-1])&&(Q={row:k.line,column:k.ch-1})}return Q&&{pos:y(Q)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(k){if(Pe.commands.hasOwnProperty(k))return Pe.commands[k](this);if(k=="indentAuto")return this.ace.execCommand("autoindent");console.log(k+" is not implemented")},this.getLineNumber=function(k){var D=this.$lineHandleChanges;if(!D)return null;for(var W=k.row,z=0;z<D.length;z++){var q=D[z];if(q.start.row!=q.end.row){if(q.action[0]=="i")q.start.row<W&&(W+=q.end.row-q.start.row);else if(q.start.row<W){if(W<q.end.row||W==q.end.row&&q.start.column>0)return null;W-=q.end.row-q.start.row}}}return W},this.getLineHandle=function(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 y(k.$lastDelta.end)}}).call(Pe.prototype);var aa=Pe.StringStream=function(f,T){this.pos=this.start=0,this.string=f,this.tabSize=T||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};aa.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(f){var T=this.string.charAt(this.pos);if(typeof f=="string")var k=T==f;else var k=T&&(f.test?f.test(T):f(T));if(k)return++this.pos,T},eatWhile:function(f){for(var T=this.pos;this.eat(f););return this.pos>T},eatSpace:function(){for(var f=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>f},skipToEnd:function(){this.pos=this.string.length},skipTo:function(f){var T=this.string.indexOf(f,this.pos);if(T>-1)return this.pos=T,!0},backUp:function(f){this.pos-=f},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(f,T,k){if(typeof f!="string"){var D=this.string.slice(this.pos).match(f);return D&&D.index>0?null:(D&&T!==!1&&(this.pos+=D[0].length),D)}var W=function(q){return k?q.toLowerCase():q},z=this.string.substr(this.pos,f.length);if(W(z)==W(f))return T!==!1&&(this.pos+=f.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(f,T){this.lineStart+=f;try{return T()}finally{this.lineStart-=f}}},Pe.defineExtension=function(f,T){Pe.prototype[f]=T},Di.importCssString(`.normal-mode .ace_cursor{
|
1403
|
+
border: none;
|
1404
|
+
background-color: rgba(255,0,0,0.5);
|
1405
|
+
}
|
1406
|
+
.normal-mode .ace_hidden-cursors .ace_cursor{
|
1407
|
+
background-color: transparent;
|
1408
|
+
border: 1px solid red;
|
1409
|
+
opacity: 0.7
|
1410
|
+
}
|
1411
|
+
.ace_dialog {
|
1412
|
+
position: absolute;
|
1413
|
+
left: 0; right: 0;
|
1414
|
+
background: inherit;
|
1415
|
+
z-index: 15;
|
1416
|
+
padding: .1em .8em;
|
1417
|
+
overflow: hidden;
|
1418
|
+
color: inherit;
|
1419
|
+
}
|
1420
|
+
.ace_dialog-top {
|
1421
|
+
border-bottom: 1px solid #444;
|
1422
|
+
top: 0;
|
1423
|
+
}
|
1424
|
+
.ace_dialog-bottom {
|
1425
|
+
border-top: 1px solid #444;
|
1426
|
+
bottom: 0;
|
1427
|
+
}
|
1428
|
+
.ace_dialog input {
|
1429
|
+
border: none;
|
1430
|
+
outline: none;
|
1431
|
+
background: transparent;
|
1432
|
+
width: 20em;
|
1433
|
+
color: inherit;
|
1434
|
+
font-family: monospace;
|
1435
|
+
}`,"vimMode",!1),function(){function f(k,D,W){var z=k.ace.container,q;return q=z.appendChild(document.createElement("div")),W?q.className="ace_dialog ace_dialog-bottom":q.className="ace_dialog ace_dialog-top",typeof D=="string"?q.innerHTML=D:q.appendChild(D),q}function T(k,D){k.state.currentNotificationClose&&k.state.currentNotificationClose(),k.state.currentNotificationClose=D}Pe.defineExtension("openDialog",function(k,D,W){function z(ve){if(typeof ve=="string")re.value=ve;else{if(Y||ve&&ve.type=="blur"&&document.activeElement===re)return;Q.state.dialog==q&&(Q.state.dialog=null,Q.focus()),Y=!0,q.remove(),W.onClose&&W.onClose(q);var Ce=Q;Ce.state.vim&&(Ce.state.vim.status=null,Ce.ace._signal("changeStatus"),Ce.ace.renderer.$loop.schedule(Ce.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){W||(W={}),T(this,null);var q=f(this,k,W.bottom),Y=!1,Q=this;this.state.dialog=q;var re=q.getElementsByTagName("input")[0],se;return re?(W.value&&(re.value=W.value,W.selectValueOnOpen!==!1&&re.select()),W.onInput&&Pe.on(re,"input",function(ve){W.onInput(ve,re.value,z)}),W.onKeyUp&&Pe.on(re,"keyup",function(ve){W.onKeyUp(ve,re.value,z)}),Pe.on(re,"keydown",function(ve){W&&W.onKeyDown&&W.onKeyDown(ve,re.value,z)||(ve.keyCode==13&&D(re.value),(ve.keyCode==27||W.closeOnEnter!==!1&&ve.keyCode==13)&&(Pe.e_stop(ve),z()))}),W.closeOnBlur!==!1&&Pe.on(re,"blur",z),re.focus()):(se=q.getElementsByTagName("button")[0])&&(Pe.on(se,"click",function(){z(),Q.focus()}),W.closeOnBlur!==!1&&Pe.on(se,"blur",z),se.focus()),z}}),Pe.defineExtension("openNotification",function(k,D){function W(){q||(q=!0,clearTimeout(Y),z.remove())}if(!this.virtualSelectionMode()){T(this,W);var z=f(this,k,D&&D.bottom),q=!1,Y,Q=D&&typeof D.duration<"u"?D.duration:5e3;return Pe.on(z,"click",function(re){Pe.e_preventDefault(re),W()}),Q&&(Y=setTimeout(W,Q)),W}})}();var Ne=Pe.Pos,An=[{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"}],go=An.length,ei=[{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"}],jn=O(""),la=/[\d]/,fo=[Pe.isWordChar,function(f){return f&&!Pe.isWordChar(f)&&!/\s/.test(f)}],gi=[function(f){return/\S/.test(f)}],Ji=["<",">"],Jt=["-",'"',".",":","_","/","+"],Yt=/^\w$/,en;try{en=new RegExp("^[\\p{Lu}]$","u")}catch{en=/^[A-Z]$/}var jt={};E("filetype",void 0,"string",["ft"],function(f,T){if(T!==void 0){if(f===void 0){var k=T.getOption("mode");return k=="null"?"":k}var k=f==""?"null":f;T.setOption("mode",k)}}),E("textwidth",80,"number",["tw"],function(f,T){if(T!==void 0){if(f===void 0){var k=T.getOption("textwidth");return k}var D=Math.round(f);D>1&&T.setOption("textwidth",D)}});var fi=function(){function f(Q,re,se){function ve(Oe){var Le=++W%D,Ue=Y[Le];Ue&&Ue.clear(),Y[Le]=Q.setBookmark(Oe)}var Ce=W%D,fe=Y[Ce];if(fe){var we=fe.find();we&&!ut(we,re)&&ve(re)}else ve(re);ve(se),z=W,q=W-D+1,q<0&&(q=0)}function T(Q,re){W+=re,W>z?W=z:W<q&&(W=q);var se=Y[(D+W)%D];if(se&&!se.find()){var ve=re>0?1:-1,Ce,fe=Q.getCursor();do if(W+=ve,se=Y[(D+W)%D],se&&(Ce=se.find())&&!ut(fe,Ce))break;while(W<z&&W>q)}return se}function k(Q,re){var se=W,ve=T(Q,re);return W=se,ve&&ve.find()}var D=100,W=-1,z=0,q=0,Y=new Array(D);return{cachedCursor:void 0,add:f,find:k,move:T}},En=function(f){return f?{changes:f.changes,expectCursorActivityForChange:f.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var f=Be.macroModeState;f.onRecordingDone&&f.onRecordingDone(),f.onRecordingDone=void 0,f.isRecording=!1},enterMacroRecordMode:function(f,T){var k=Be.registerController.getRegister(T);if(k){if(k.clear(),this.latestRegister=T,f.openDialog){var D=Jr("span",{class:"cm-vim-message"},"recording @"+T);this.onRecordingDone=f.openDialog(D,null,{bottom:!0})}this.isRecording=!0}}};var Be,gn,wt={enterVimMode:h,leaveVimMode:g,buildKeyMap:function(){},getRegisterController:function(){return Be.registerController},resetVimGlobalState_:L,getVimGlobalState_:function(){return Be},maybeInitVimState_:R,suppressErrorLogging:!1,InsertModeKey:Xi,map:function(f,T,k){fr.map(f,T,k)},unmap:function(f,T){return fr.unmap(f,T)},noremap:function(f,T,k){fr.map(f,T,k,!0)},mapclear:function(f){var T=An.length,k=go,D=An.slice(0,T-k);if(An=An.slice(T-k),f)for(var W=D.length-1;W>=0;W--){var z=D[W];if(f!==z.context)if(z.context)this._mapCommand(z);else{var q=["normal","insert","visual"];for(var Y in q)if(q[Y]!==f){var Q={};for(var re in z)Q[re]=z[re];Q.context=q[Y],this._mapCommand(Q)}}}},langmap:P,vimKeyFromEvent:H,setOption:$,getOption:_,defineOption:E,defineEx:function(f,T,k){if(!T)T=f;else if(f.indexOf(T)!==0)throw new Error('(Vim.defineEx) "'+T+'" is not a prefix of "'+f+'", command not registered');Cs[f]=k,fr.commandMap_[T]={name:f,shortName:T,type:"api"}},handleKey:function(f,T,k){var D=this.findKey(f,T,k);if(typeof D=="function")return D()},multiSelectHandleKey:co,findKey:function(f,T,k){function D(){var re=Be.macroModeState;if(re.isRecording){if(T=="q")return re.exitMacroRecordMode(),A(f),!0;k!="mapping"&&Fo(re,T)}}function W(){if(T=="<Esc>"){if(Y.visualMode)xt(f);else{if(!Y.insertMode)return;zr(f)}return A(f),!0}}function z(){if(W())return!0;Y.inputState.keyBuffer.push(T);var re=Y.inputState.keyBuffer.join(""),se=T.length==1,ve=Ln.matchCommand(re,An,Y.inputState,"insert"),Ce=Y.inputState.changeQueue;if(ve.type=="none")return A(f),!1;if(ve.type=="partial"){if(ve.expectLiteralNext&&(Y.expectLiteralNext=!0),gn&&window.clearTimeout(gn),gn=se&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&A(f)},_("insertModeEscKeysTimeout")),se){var fe=f.listSelections();(!Ce||Ce.removed.length!=fe.length)&&(Ce=Y.inputState.changeQueue=new N),Ce.inserted+=T;for(var we=0;we<fe.length;we++){var Oe=ht(fe[we].anchor,fe[we].head),Le=Zt(fe[we].anchor,fe[we].head),Ue=f.getRange(Oe,f.state.overwrite?ye(Le,0,1):Le);Ce.removed[we]=(Ce.removed[we]||"")+Ue}}return!se}if(Y.expectLiteralNext=!1,gn&&window.clearTimeout(gn),ve.command&&Ce){for(var fe=f.listSelections(),we=0;we<fe.length;we++){var st=fe[we].head;f.replaceRange(Ce.removed[we]||"",ye(st,0,-Ce.inserted.length),st,"+input")}Be.macroModeState.lastInsertModeChanges.changes.pop()}return ve.command||A(f),ve.command}function q(){if(D()||W())return!0;Y.inputState.keyBuffer.push(T);var re=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var se=/^(\d*)(.*)$/.exec(re);if(!se)return A(f),!1;var ve=Y.visualMode?"visual":"normal",Ce=se[2]||se[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==Ce&&(Ce=Y.inputState.operatorShortcut);var fe=Ln.matchCommand(Ce,An,Y.inputState,ve);return fe.type=="none"?(A(f),!1):fe.type=="partial"?(fe.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):fe.type=="clear"?(A(f),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,se=/^(\d*)(.*)$/.exec(re),se[1]&&se[1]!="0"&&Y.inputState.pushRepeatDigit(se[1]),fe.command)}var Y=R(f),Q;return Y.insertMode?Q=z():Q=q(),Q===!1?!Y.insertMode&&T.length===1?function(){return!0}:void 0:Q===!0?function(){return!0}:function(){if(!((Q.operator||Q.isEdit)&&f.getOption("readOnly")))return f.operation(function(){f.curOp.isVimOp=!0;try{Q.type=="keyToKey"?I(f,Q.toKeys,Q):Ln.processCommand(f,Y,Q)}catch(re){throw f.state.vim=void 0,R(f),wt.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(f,T){fr.processCommand(f,T)},defineMotion:te,defineAction:ae,defineOperator:ne,mapCommand:vs,_mapCommand:Do,defineRegister:U,exitVisualMode:xt,exitInsertMode:zr},Rr=[],sn=!1,vn,Yn={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},Er={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},mi={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(Yn)).forEach(function(f){mi[(Yn[f]||"").toLowerCase()]=mi[f.toLowerCase()]=f}),E("langmap",void 0,"string",["lmap"],function(f,T){if(f===void 0)return jn.string;P(f)}),S.prototype.pushRepeatDigit=function(f){this.operator?this.motionRepeat=this.motionRepeat.concat(f):this.prefixRepeat=this.prefixRepeat.concat(f)},S.prototype.getRepeat=function(){var f=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(f=1,this.prefixRepeat.length>0&&(f*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(f*=parseInt(this.motionRepeat.join(""),10))),f},B.prototype={setText:function(f,T,k){this.keyBuffer=[f||""],this.linewise=!!T,this.blockwise=!!k},pushText:function(f,T){T&&(this.linewise||this.keyBuffer.push(`
|
1436
|
+
`),this.linewise=!0),this.keyBuffer.push(f)},pushInsertModeChanges:function(f){this.insertModeChanges.push(En(f))},pushSearchQuery:function(f){this.searchQueries.push(f)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},K.prototype={pushText:function(f,T,k,D,W){if(f!=="_"){D&&k.charAt(k.length-1)!==`
|
1437
|
+
`&&(k+=`
|
1438
|
+
`);var z=this.isValidRegister(f)?this.getRegister(f):null;if(!z){switch(T){case"yank":this.registers[0]=new B(k,D,W);break;case"delete":case"change":k.indexOf(`
|
1439
|
+
`)==-1?this.registers["-"]=new B(k,D):(this.shiftNumericRegisters_(),this.registers[1]=new B(k,D))}this.unnamedRegister.setText(k,D,W);return}var q=u(f);q?z.pushText(k,D):z.setText(k,D,W),f==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(k),this.unnamedRegister.setText(z.toString(),D)}},getRegister:function(f){return this.isValidRegister(f)?(f=f.toLowerCase(),this.registers[f]||(this.registers[f]=new B),this.registers[f]):this.unnamedRegister},isValidRegister:function(f){return f&&(b(f,Jt)||Yt.test(f))},shiftNumericRegisters_:function(){for(var f=9;f>=2;f--)this.registers[f]=this.getRegister(""+(f-1))}},Z.prototype={nextMatch:function(f,T){var k=this.historyBuffer,D=T?-1:1;this.initialPrefix===null&&(this.initialPrefix=f);for(var W=this.iterator+D;T?W>=0:W<k.length;W+=D)for(var z=k[W],q=0;q<=z.length;q++)if(this.initialPrefix==z.substring(0,q))return this.iterator=W,z;if(W>=k.length)return this.iterator=k.length,this.initialPrefix;if(W<0)return f},pushInput:function(f){var T=this.historyBuffer.indexOf(f);T>-1&&this.historyBuffer.splice(T,1),f.length&&this.historyBuffer.push(f)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Ln={matchCommand:function(f,T,k,D){var W=Ae(f,T,D,k);if(!W.full&&!W.partial)return{type:"none"};if(!W.full&&W.partial)return{type:"partial",expectLiteralNext:W.partial.length==1&&W.partial[0].keys.slice(-11)=="<character>"};for(var z,q=0;q<W.full.length;q++){var Y=W.full[q];z||(z=Y)}if(z.keys.slice(-11)=="<character>"||z.keys.slice(-10)=="<register>"){var Q=Ie(f);if(!Q||Q.length>1)return{type:"clear"};k.selectedCharacter=Q}return{type:"full",command:z}},processCommand:function(f,T,k){switch(T.inputState.repeatOverride=k.repeatOverride,k.type){case"motion":this.processMotion(f,T,k);break;case"operator":this.processOperator(f,T,k);break;case"operatorMotion":this.processOperatorMotion(f,T,k);break;case"action":this.processAction(f,T,k);break;case"search":this.processSearch(f,T,k);break;case"ex":case"keyToEx":this.processEx(f,T,k);break}},processMotion:function(f,T,k){T.inputState.motion=k.motion,T.inputState.motionArgs=ue(k.motionArgs),this.evalInput(f,T)},processOperator:function(f,T,k){var D=T.inputState;if(D.operator){if(D.operator==k.operator){D.motion="expandToLine",D.motionArgs={linewise:!0},this.evalInput(f,T);return}A(f)}D.operator=k.operator,D.operatorArgs=ue(k.operatorArgs),k.keys.length>1&&(D.operatorShortcut=k.keys),k.exitVisualBlock&&(T.visualBlock=!1,Ye(f)),T.visualMode&&this.evalInput(f,T)},processOperatorMotion:function(f,T,k){var D=T.visualMode,W=ue(k.operatorMotionArgs);W&&D&&W.visualLine&&(T.visualLine=!0),this.processOperator(f,T,k),D||this.processMotion(f,T,k)},processAction:function(f,T,k){var D=T.inputState,W=D.getRepeat(),z=!!W,q=ue(k.actionArgs)||{};D.selectedCharacter&&(q.selectedCharacter=D.selectedCharacter),k.operator&&this.processOperator(f,T,k),k.motion&&this.processMotion(f,T,k),(k.motion||k.operator)&&this.evalInput(f,T),q.repeat=W||1,q.repeatIsExplicit=z,q.registerName=D.registerName,A(f),T.lastMotion=null,k.isEdit&&this.recordLastEdit(T,D,k),On[k.action](f,q,T)},processSearch:function(f,T,k){function D(Le,Ue,st){Be.searchHistoryController.pushInput(Le),Be.searchHistoryController.reset();try{pn(f,Le,Ue,st)}catch{zt(f,"Invalid regex: "+Le),A(f);return}Ln.processMotion(f,T,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:k.searchArgs.toJumplist}})}function W(Le){D(Le,!0,!0);var Ue=Be.macroModeState;Ue.isRecording&&ws(Ue,Le)}function z(Le,Ue,st){var Qe=H(Le),et,fn;Qe=="<Up>"||Qe=="<Down>"?(et=Qe=="<Up>",fn=Le.target?Le.target.selectionEnd:0,Ue=Be.searchHistoryController.nextMatch(Ue,et)||"",st(Ue),fn&&Le.target&&(Le.target.selectionEnd=Le.target.selectionStart=Math.min(fn,Le.target.value.length))):Qe&&Qe!="<Left>"&&Qe!="<Right>"&&Be.searchHistoryController.reset();var at;try{at=pn(f,Ue,!0,!0)}catch{}at?f.scrollIntoView(_r(f,!Y,at),30):(Oo(f),f.scrollTo(ve.left,ve.top))}function q(Le,Ue,st){var Qe=H(Le);Qe=="<Esc>"||Qe=="<C-c>"||Qe=="<C-[>"||Qe=="<BS>"&&Ue==""?(Be.searchHistoryController.pushInput(Ue),Be.searchHistoryController.reset(),pn(f,se),Oo(f),f.scrollTo(ve.left,ve.top),Pe.e_stop(Le),A(f),st(),f.focus()):Qe=="<Up>"||Qe=="<Down>"?Pe.e_stop(Le):Qe=="<C-u>"&&(Pe.e_stop(Le),st(""))}if(f.getSearchCursor){var Y=k.searchArgs.forward,Q=k.searchArgs.wholeWordOnly;_n(f).setReversed(!Y);var re=Y?"/":"?",se=_n(f).getQuery(),ve=f.getScrollInfo();switch(k.searchArgs.querySrc){case"prompt":var Ce=Be.macroModeState;if(Ce.isPlaying){var Oe=Ce.replaySearchQueries.shift();D(Oe,!0,!1)}else kr(f,{onClose:W,prefix:re,desc:"(JavaScript regexp)",onKeyUp:z,onKeyDown:q});break;case"wordUnderCursor":var fe=yt(f,{noSymbol:!0}),we=!0;if(fe||(fe=yt(f,{noSymbol:!1}),we=!1),!fe){zt(f,"No word under cursor"),A(f);return}var Oe=f.getLine(fe.start.line).substring(fe.start.ch,fe.end.ch);we&&Q?Oe="\\b"+Oe+"\\b":Oe=dn(Oe),Be.jumpList.cachedCursor=f.getCursor(),f.setCursor(fe.start),D(Oe,!0,!1)}}},processEx:function(f,T,k){function D(z){Be.exCommandHistoryController.pushInput(z),Be.exCommandHistoryController.reset(),fr.processCommand(f,z),f.state.vim&&A(f)}function W(z,q,Y){var Q=H(z),re,se;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&q=="")&&(Be.exCommandHistoryController.pushInput(q),Be.exCommandHistoryController.reset(),Pe.e_stop(z),A(f),Y(),f.focus()),Q=="<Up>"||Q=="<Down>"?(Pe.e_stop(z),re=Q=="<Up>",se=z.target?z.target.selectionEnd:0,q=Be.exCommandHistoryController.nextMatch(q,re)||"",Y(q),se&&z.target&&(z.target.selectionEnd=z.target.selectionStart=Math.min(se,z.target.value.length))):Q=="<C-u>"?(Pe.e_stop(z),Y("")):Q&&Q!="<Left>"&&Q!="<Right>"&&Be.exCommandHistoryController.reset()}k.type=="keyToEx"?fr.processCommand(f,k.exArgs.input):T.visualMode?kr(f,{onClose:D,prefix:":",value:"'<,'>",onKeyDown:W,selectValueOnOpen:!1}):kr(f,{onClose:D,prefix:":",onKeyDown:W})},evalInput:function(f,T){var k=T.inputState,D=k.motion,W=k.motionArgs||{},z=k.operator,q=k.operatorArgs||{},Y=k.registerName,Q=T.sel,re=qe(T.visualMode?ce(f,Q.head):f.getCursor("head")),se=qe(T.visualMode?ce(f,Q.anchor):f.getCursor("anchor")),ve=qe(re),Ce=qe(se),fe,we,Oe;if(z&&this.recordLastEdit(T,k),k.repeatOverride!==void 0?Oe=k.repeatOverride:Oe=k.getRepeat(),Oe>0&&W.explicitRepeat?W.repeatIsExplicit=!0:(W.noRepeat||!W.explicitRepeat&&Oe===0)&&(Oe=1,W.repeatIsExplicit=!1),k.selectedCharacter&&(W.selectedCharacter=q.selectedCharacter=k.selectedCharacter),W.repeat=Oe,A(f),D){var Le=jr[D](f,re,W,T,k);if(T.lastMotion=jr[D],!Le)return;if(W.toJumplist){!z&&f.ace.curOp!=null&&(f.ace.curOp.command.scrollIntoView="center-animate");var Ue=Be.jumpList,st=Ue.cachedCursor;st?(br(f,st,Le),delete Ue.cachedCursor):br(f,re,Le)}Le instanceof Array?(we=Le[0],fe=Le[1]):fe=Le,fe||(fe=qe(re)),T.visualMode?((!T.visualBlock||fe.ch!==1/0)&&(fe=ce(f,fe,ve)),we&&(we=ce(f,we)),we=we||Ce,Q.anchor=we,Q.head=fe,Ye(f),Zr(f,T,"<",tt(we,fe)?we:fe),Zr(f,T,">",tt(we,fe)?fe:we)):z||(f.ace.curOp&&(f.ace.curOp.vimDialogScroll="center-animate"),fe=ce(f,fe,ve),f.setCursor(fe.line,fe.ch))}if(z){if(q.lastSel){we=Ce;var Qe=q.lastSel,et=Math.abs(Qe.head.line-Qe.anchor.line),fn=Math.abs(Qe.head.ch-Qe.anchor.ch);Qe.visualLine?fe=new Ne(Ce.line+et,Ce.ch):Qe.visualBlock?fe=new Ne(Ce.line+et,Ce.ch+fn):Qe.head.line==Qe.anchor.line?fe=new Ne(Ce.line,Ce.ch+fn):fe=new Ne(Ce.line+et,Ce.ch),T.visualMode=!0,T.visualLine=Qe.visualLine,T.visualBlock=Qe.visualBlock,Q=T.sel={anchor:we,head:fe},Ye(f)}else T.visualMode&&(q.lastSel={anchor:qe(Q.anchor),head:qe(Q.head),visualBlock:T.visualBlock,visualLine:T.visualLine});var at,bn,kt,$t,Xn;if(T.visualMode){at=ht(Q.head,Q.anchor),bn=Zt(Q.head,Q.anchor),kt=T.visualLine||q.linewise,$t=T.visualBlock?"block":kt?"line":"char";var ar=x(f,at,bn);if(Xn=dt(f,{anchor:ar.start,head:ar.end},$t),kt){var xn=Xn.ranges;if($t=="block")for(var V=0;V<xn.length;V++)xn[V].head.ch=qt(f,xn[V].head.line);else $t=="line"&&(xn[0].head=new Ne(xn[0].head.line+1,0))}}else{if(at=qe(we||Ce),bn=qe(fe||ve),tt(bn,at)){var X=at;at=bn,bn=X}kt=W.linewise||q.linewise,kt?It(f,at,bn):W.forward&&Et(f,at,bn),$t="char";var ie=!W.inclusive||kt,ar=x(f,at,bn);Xn=dt(f,{anchor:ar.start,head:ar.end},$t,ie)}f.setSelections(Xn.ranges,Xn.primary),T.lastMotion=null,q.repeat=Oe,q.registerName=Y,q.linewise=kt;var oe=Uo[z](f,q,Xn.ranges,Ce,fe);T.visualMode&&xt(f,oe!=null),oe&&f.setCursor(oe)}},recordLastEdit:function(f,T,k){var D=Be.macroModeState;D.isPlaying||(f.lastEditInputState=T,f.lastEditActionCommand=k,D.lastInsertModeChanges.changes=[],D.lastInsertModeChanges.expectCursorActivityForChange=!1,D.lastInsertModeChanges.visualBlock=f.visualBlock?f.sel.head.line-f.sel.anchor.line:0)}},jr={moveToTopLine:function(f,T,k){var D=Yi(f).top+k.repeat-1;return new Ne(D,ct(f.getLine(D)))},moveToMiddleLine:function(f){var T=Yi(f),k=Math.floor((T.top+T.bottom)*.5);return new Ne(k,ct(f.getLine(k)))},moveToBottomLine:function(f,T,k){var D=Yi(f).bottom-k.repeat+1;return new Ne(D,ct(f.getLine(D)))},expandToLine:function(f,T,k){var D=T;return new Ne(D.line+k.repeat-1,1/0)},findNext:function(f,T,k){var D=_n(f),W=D.getQuery();if(W){var z=!k.forward;return z=D.isReversed()?!z:z,hi(f,W),_r(f,z,W,k.repeat)}},findAndSelectNextInclusive:function(f,T,k,D,W){var z=_n(f),q=z.getQuery();if(q){var Y=!k.forward;Y=z.isReversed()?!Y:Y;var Q=di(f,Y,q,k.repeat,D);if(Q){if(W.operator)return Q;var re=Q[0],se=new Ne(Q[1].line,Q[1].ch-1);if(D.visualMode){(D.visualLine||D.visualBlock)&&(D.visualLine=!1,D.visualBlock=!1,Pe.signal(f,"vim-mode-change",{mode:"visual",subMode:""}));var ve=D.sel.anchor;if(ve)return z.isReversed()?k.forward?[ve,re]:[ve,se]:k.forward?[ve,se]:[ve,re]}else D.visualMode=!0,D.visualLine=!1,D.visualBlock=!1,Pe.signal(f,"vim-mode-change",{mode:"visual",subMode:""});return Y?[se,re]:[re,se]}}},goToMark:function(f,T,k,D){var W=Br(f,D,k.selectedCharacter);return W?k.linewise?{line:W.line,ch:ct(f.getLine(W.line))}:W:null},moveToOtherHighlightedEnd:function(f,T,k,D){if(D.visualBlock&&k.sameLine){var W=D.sel;return[ce(f,new Ne(W.anchor.line,W.head.ch)),ce(f,new Ne(W.head.line,W.anchor.ch))]}return[D.sel.head,D.sel.anchor]},jumpToMark:function(f,T,k,D){for(var W=T,z=0;z<k.repeat;z++){var q=W;for(var Y in D.marks)if(c(Y)){var Q=D.marks[Y].find(),re=k.forward?tt(Q,q):tt(q,Q);if(!re&&!(k.linewise&&Q.line==q.line)){var se=ut(q,W),ve=k.forward?hn(q,Q,W):hn(W,Q,q);(se||ve)&&(W=Q)}}}return k.linewise&&(W=new Ne(W.line,ct(f.getLine(W.line)))),W},moveByCharacters:function(f,T,k){var D=T,W=k.repeat,z=k.forward?D.ch+W:D.ch-W;return new Ne(D.line,z)},moveByLines:function(f,T,k,D){var W=T,z=W.ch;switch(D.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:z=D.lastHPos;break;default:D.lastHPos=z}var q=k.repeat+(k.repeatOffset||0),Y=k.forward?W.line+q:W.line-q,Q=f.firstLine(),re=f.lastLine();if(Y<Q&&W.line==Q)return this.moveToStartOfLine(f,T,k,D);if(Y>re&&W.line==re)return so(f,T,k,D,!0);var se=f.ace.session.getFoldLine(Y);return se&&(k.forward?Y>se.start.row&&(Y=se.end.row+1):Y=se.start.row),k.toFirstChar&&(z=ct(f.getLine(Y)),D.lastHPos=z),D.lastHSPos=f.charCoords(new Ne(Y,z),"div").left,new Ne(Y,z)},moveByDisplayLines:function(f,T,k,D){var W=T;switch(D.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:D.lastHSPos=f.charCoords(W,"div").left}var z=k.repeat,Q=f.findPosV(W,k.forward?z:-z,"line",D.lastHSPos);if(Q.hitSide)if(k.forward)var q=f.charCoords(Q,"div"),Y={top:q.top+8,left:D.lastHSPos},Q=f.coordsChar(Y,"div");else{var re=f.charCoords(new Ne(f.firstLine(),0),"div");re.left=D.lastHSPos,Q=f.coordsChar(re,"div")}return D.lastHPos=Q.ch,Q},moveByPage:function(f,T,k){var D=T,W=k.repeat;return f.findPosV(D,k.forward?W:-W,"page")},moveByParagraph:function(f,T,k){var D=k.forward?1:-1;return gs(f,T,k.repeat,D)},moveBySentence:function(f,T,k){var D=k.forward?1:-1;return Ei(f,T,k.repeat,D)},moveByScroll:function(f,T,k,D){var W=f.getScrollInfo(),z=null,q=k.repeat;q||(q=W.clientHeight/(2*f.defaultTextHeight()));var Y=f.charCoords(T,"local");if(k.repeat=q,z=jr.moveByDisplayLines(f,T,k,D),!z)return null;var Q=f.charCoords(z,"local");return f.scrollTo(null,W.top+Q.top-Y.top),z},moveByWords:function(f,T,k){return pr(f,T,k.repeat,!!k.forward,!!k.wordEnd,!!k.bigWord)},moveTillCharacter:function(f,T,k){var D=k.repeat,W=Lo(f,D,k.forward,k.selectedCharacter,T),z=k.forward?-1:1;return Wr(z,k),W?(W.ch+=z,W):null},moveToCharacter:function(f,T,k){var D=k.repeat;return Wr(0,k),Lo(f,D,k.forward,k.selectedCharacter,T)||T},moveToSymbol:function(f,T,k){var D=k.repeat;return Ri(f,D,k.forward,k.selectedCharacter)||T},moveToColumn:function(f,T,k,D){var W=k.repeat;return D.lastHPos=W-1,D.lastHSPos=f.charCoords(T,"div").left,za(f,W)},moveToEol:function(f,T,k,D){return so(f,T,k,D,!1)},moveToFirstNonWhiteSpaceCharacter:function(f,T){var k=T;return new Ne(k.line,ct(f.getLine(k.line)))},moveToMatchedSymbol:function(f,T){for(var k=T,D=k.line,W=k.ch,z=f.getLine(D),q;W<z.length;W++)if(q=z.charAt(W),q&&a(q)){var Y=f.getTokenTypeAt(new Ne(D,W+1));if(Y!=="string"&&Y!=="comment")break}if(W<z.length){var Q=/[<>]/.test(z[W])?/[(){}[\]<>]/:/[(){}[\]]/,re=f.findMatchingBracket(new Ne(D,W+1),{bracketRegex:Q});return re.to}return k},moveToStartOfLine:function(f,T){return new Ne(T.line,0)},moveToLineOrEdgeOfDocument:function(f,T,k){var D=k.forward?f.lastLine():f.firstLine();return k.repeatIsExplicit&&(D=k.repeat-f.getOption("firstLineNumber")),new Ne(D,ct(f.getLine(D)))},moveToStartOfDisplayLine:function(f){return f.execCommand("goLineLeft"),f.getCursor()},moveToEndOfDisplayLine:function(f){f.execCommand("goLineRight");var T=f.getCursor();return T.sticky=="before"&&T.ch--,T},textObjectManipulation:function(f,T,k,D){var W={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},z={"'":!0,'"':!0,"`":!0},q=k.selectedCharacter;q=="b"?q="(":q=="B"&&(q="{");var Y=!k.textObjectInner,Q,re;if(W[q]){if(re=!0,Q=Bn(f,T,q,Y),!Q){var se=f.getSearchCursor(new RegExp("\\"+q,"g"),T);se.find()&&(Q=Bn(f,se.from(),q,Y))}}else if(z[q])re=!0,Q=xr(f,T,q,Y);else if(q==="W"||q==="w")for(var ve=k.repeat||1;ve-- >0;){var Ce=yt(f,{inclusive:Y,innerWord:!Y,bigWord:q==="W",noSymbol:q==="W",multiline:!0},Q&&Q.end);Ce&&(Q||(Q=Ce),Q.end=Ce.end)}else if(q==="p")if(Q=gs(f,T,k.repeat,0,Y),k.linewise=!0,D.visualMode)D.visualLine||(D.visualLine=!0);else{var fe=D.inputState.operatorArgs;fe&&(fe.linewise=!0),Q.end.line--}else if(q==="t")Q=wn(f,T,Y);else if(q==="s"){var we=f.getLine(T.line);T.ch>0&&w(we[T.ch])&&(T.ch-=1);var Oe=ta(f,T,k.repeat,1,Y),Le=ta(f,T,k.repeat,-1,Y);d(f.getLine(Le.line)[Le.ch])&&d(f.getLine(Oe.line)[Oe.ch-1])&&(Le={line:Le.line,ch:Le.ch+1}),Q={start:Le,end:Oe}}return Q?f.state.vim.visualMode?ze(f,Q.start,Q.end,re):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(f,T,k){var D=Be.lastCharacterSearch,W=k.repeat,z=k.forward===D.forward,q=(D.increment?1:0)*(z?-1:1);f.moveH(-q,"char"),k.inclusive=!!z;var Y=Lo(f,W,z,D.selectedCharacter);return Y?(Y.ch+=q,Y):(f.moveH(q,"char"),T)}},Uo={change:function(f,T,k){var D,W,z=f.state.vim,q=k[0].anchor,Y=k[0].head;if(z.visualMode)if(T.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,f.setSelection(q,Y),W=f.getSelection(),f.replaceSelection(""),D=q;else{W=f.getSelection();var Q=he("",k.length);f.replaceSelections(Q),D=ht(k[0].head,k[0].anchor)}else{W=f.getRange(q,Y);var re=z.lastEditInputState||{};if(re.motion=="moveByWords"&&!d(W)){var se=/\s+$/.exec(W);se&&re.motionArgs&&re.motionArgs.forward&&(Y=ye(Y,0,-se[0].length),W=W.slice(0,-se[0].length))}T.linewise&&(q=new Ne(q.line,ct(f.getLine(q.line))),Y.line>q.line&&(Y=new Ne(Y.line-1,Number.MAX_VALUE))),f.replaceRange("",q,Y),D=q}Be.registerController.pushText(T.registerName,"change",W,T.linewise,k.length>1),On.enterInsertMode(f,{head:D},f.state.vim)},delete:function(f,T,k){var D,W,z=f.state.vim;if(z.visualBlock){W=f.getSelection();var q=he("",k.length);f.replaceSelections(q),D=ht(k[0].head,k[0].anchor)}else{var Y=k[0].anchor,Q=k[0].head;T.linewise&&Q.line!=f.firstLine()&&Y.line==f.lastLine()&&Y.line==Q.line-1&&(Y.line==f.firstLine()?Y.ch=0:Y=new Ne(Y.line-1,qt(f,Y.line-1))),W=f.getRange(Y,Q),f.replaceRange("",Y,Q),D=Y,T.linewise&&(D=jr.moveToFirstNonWhiteSpaceCharacter(f,Y))}return Be.registerController.pushText(T.registerName,"delete",W,T.linewise,z.visualBlock),ce(f,D)},indent:function(f,T,k){var D=f.state.vim,W=D.visualMode?T.repeat:1;if(D.visualBlock){for(var z=f.getOption("tabSize"),q=f.getOption("indentWithTabs")?" ":" ".repeat(z),Y,Q=k.length-1;Q>=0;Q--)if(Y=ht(k[Q].anchor,k[Q].head),T.indentRight)f.replaceRange(q.repeat(W),Y,Y);else{for(var re=f.getLine(Y.line),se=0,ve=0;ve<W;ve++){var Ce=re[Y.ch+se];if(Ce==" ")se++;else{if(Ce!=" ")break;se++;for(var fe=1;fe<q.length&&(Ce=re[Y.ch+se],Ce===" ");fe++)se++}}f.replaceRange("",Y,ye(Y,0,se))}return Y}if(f.indentMore)for(var ve=0;ve<W;ve++)T.indentRight?f.indentMore():f.indentLess();else{var we=k[0].anchor.line,Oe=D.visualBlock?k[k.length-1].anchor.line:k[0].head.line;T.linewise&&Oe--;for(var Q=we;Q<=Oe;Q++)for(var ve=0;ve<W;ve++)f.indentLine(Q,T.indentRight)}return jr.moveToFirstNonWhiteSpaceCharacter(f,k[0].anchor)},indentAuto:function(f,T,k){return f.execCommand("indentAuto"),jr.moveToFirstNonWhiteSpaceCharacter(f,k[0].anchor)},hardWrap:function(f,T,k,D,W){if(f.hardWrap){var z=k[0].anchor.line,q=k[0].head.line;T.linewise&&q--;var Y=f.hardWrap({from:z,to:q});return Y>z&&T.linewise&&Y--,T.keepCursor?D:new Ne(Y,0)}},changeCase:function(f,T,k,D,W){for(var z=f.getSelections(),q=[],Y=T.toLower,Q=0;Q<z.length;Q++){var re=z[Q],se="";if(Y===!0)se=re.toLowerCase();else if(Y===!1)se=re.toUpperCase();else for(var ve=0;ve<re.length;ve++){var Ce=re.charAt(ve);se+=u(Ce)?Ce.toLowerCase():Ce.toUpperCase()}q.push(se)}return f.replaceSelections(q),T.shouldMoveCursor?W:!f.state.vim.visualMode&&T.linewise&&k[0].anchor.line+1==k[0].head.line?jr.moveToFirstNonWhiteSpaceCharacter(f,D):T.linewise?D:ht(k[0].anchor,k[0].head)},yank:function(f,T,k,D){var W=f.state.vim,z=f.getSelection(),q=W.visualMode?ht(W.sel.anchor,W.sel.head,k[0].head,k[0].anchor):D;return Be.registerController.pushText(T.registerName,"yank",z,T.linewise,W.visualBlock),q}},On={jumpListWalk:function(f,T,k){if(!k.visualMode){var D=T.repeat,W=T.forward,z=Be.jumpList,q=z.move(f,W?D:-D),Y=q?q.find():void 0;Y=Y||f.getCursor(),f.setCursor(Y),f.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(f,T,k){if(!k.visualMode){var D=T.repeat||1,W=f.defaultTextHeight(),z=f.getScrollInfo().top,q=W*D,Y=T.forward?z+q:z-q,Q=qe(f.getCursor()),re=f.charCoords(Q,"local");if(T.forward)Y>re.top?(Q.line+=(Y-re.top)/W,Q.line=Math.ceil(Q.line),f.setCursor(Q),re=f.charCoords(Q,"local"),f.scrollTo(null,re.top)):f.scrollTo(null,Y);else{var se=Y+f.getScrollInfo().clientHeight;se<re.bottom?(Q.line-=(re.bottom-se)/W,Q.line=Math.floor(Q.line),f.setCursor(Q),re=f.charCoords(Q,"local"),f.scrollTo(null,re.bottom-f.getScrollInfo().clientHeight)):f.scrollTo(null,Y)}}},scrollToCursor:function(f,T){var k=f.getCursor().line,D=f.charCoords(new Ne(k,0),"local"),W=f.getScrollInfo().clientHeight,z=D.top;switch(T.position){case"center":z=D.bottom-W/2;break;case"bottom":var q=new Ne(k,f.getLine(k).length-1),Y=f.charCoords(q,"local"),Q=Y.bottom-z;z=z-W+Q}f.scrollTo(null,z)},replayMacro:function(f,T,k){var D=T.selectedCharacter,W=T.repeat,z=Be.macroModeState;for(D=="@"?D=z.latestRegister:z.latestRegister=D;W--;)ys(f,k,z,D)},enterMacroRecordMode:function(f,T){var k=Be.macroModeState,D=T.selectedCharacter;Be.registerController.isValidRegister(D)&&k.enterMacroRecordMode(f,D)},toggleOverwrite:function(f){f.state.overwrite?(f.toggleOverwrite(!1),f.setOption("keyMap","vim-insert"),Pe.signal(f,"vim-mode-change",{mode:"insert"})):(f.toggleOverwrite(!0),f.setOption("keyMap","vim-replace"),Pe.signal(f,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(f,T,k){if(!f.getOption("readOnly")){k.insertMode=!0,k.insertModeRepeat=T&&T.repeat||1;var D=T?T.insertAt:null,W=k.sel,z=T.head||f.getCursor("head"),q=f.listSelections().length;if(D=="eol")z=new Ne(z.line,qt(f,z.line));else if(D=="bol")z=new Ne(z.line,0);else if(D=="charAfter"){var Y=x(f,z,ye(z,0,1));z=Y.end}else if(D=="firstNonBlank"){var Y=x(f,z,jr.moveToFirstNonWhiteSpaceCharacter(f,z));z=Y.end}else if(D=="startOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(z=new Ne(Math.min(W.head.line,W.anchor.line),Math.min(W.head.ch,W.anchor.ch)),q=Math.abs(W.head.line-W.anchor.line)+1):W.head.line<W.anchor.line?z=W.head:z=new Ne(W.anchor.line,0)}else if(D=="endOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(z=new Ne(Math.min(W.head.line,W.anchor.line),Math.max(W.head.ch,W.anchor.ch)+1),q=Math.abs(W.head.line-W.anchor.line)+1):W.head.line>=W.anchor.line?z=ye(W.head,0,1):z=new Ne(W.anchor.line,0)}else if(D=="inplace"){if(k.visualMode)return}else D=="lastEdit"&&(z=ao(f)||z);f.setOption("disableInput",!1),T&&T.replace?(f.toggleOverwrite(!0),f.setOption("keyMap","vim-replace"),Pe.signal(f,"vim-mode-change",{mode:"replace"})):(f.toggleOverwrite(!1),f.setOption("keyMap","vim-insert"),Pe.signal(f,"vim-mode-change",{mode:"insert"})),Be.macroModeState.isPlaying||(f.on("change",lo),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=f.setBookmark(z,{insertLeft:!0}),Pe.on(f.getInputField(),"keydown",bs)),k.visualMode&&xt(f),Gn(f,z,q)}},toggleVisualMode:function(f,T,k){var D=T.repeat,W=f.getCursor(),z;if(k.visualMode)k.visualLine^T.linewise||k.visualBlock^T.blockwise?(k.visualLine=!!T.linewise,k.visualBlock=!!T.blockwise,Pe.signal(f,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),Ye(f)):xt(f);else{k.visualMode=!0,k.visualLine=!!T.linewise,k.visualBlock=!!T.blockwise,z=ce(f,new Ne(W.line,W.ch+D-1));var q=x(f,W,z);k.sel={anchor:q.start,head:q.end},Pe.signal(f,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),Ye(f),Zr(f,k,"<",ht(W,z)),Zr(f,k,">",Zt(W,z))}},reselectLastSelection:function(f,T,k){var D=k.lastSelection;if(k.visualMode&&ke(f,k),D){var W=D.anchorMark.find(),z=D.headMark.find();if(!W||!z)return;k.sel={anchor:W,head:z},k.visualMode=!0,k.visualLine=D.visualLine,k.visualBlock=D.visualBlock,Ye(f),Zr(f,k,"<",ht(W,z)),Zr(f,k,">",Zt(W,z)),Pe.signal(f,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""})}},joinLines:function(f,T,k){var D,W;if(k.visualMode){if(D=f.getCursor("anchor"),W=f.getCursor("head"),tt(W,D)){var z=W;W=D,D=z}W.ch=qt(f,W.line)-1}else{var q=Math.max(T.repeat,2);D=f.getCursor(),W=ce(f,new Ne(D.line+q-1,1/0))}for(var Y=0,Q=D.line;Q<W.line;Q++){Y=qt(f,D.line);var re="",se=0;if(!T.keepSpaces){var ve=f.getLine(D.line+1);se=ve.search(/\S/),se==-1?se=ve.length:re=" "}f.replaceRange(re,new Ne(D.line,Y),new Ne(D.line+1,se))}var Ce=ce(f,new Ne(D.line,Y));k.visualMode&&xt(f,!1),f.setCursor(Ce)},newLineAndEnterInsertMode:function(f,T,k){k.insertMode=!0;var D=qe(f.getCursor());if(D.line===f.firstLine()&&!T.after)f.replaceRange(`
|
1440
|
+
`,new Ne(f.firstLine(),0)),f.setCursor(f.firstLine(),0);else{D.line=T.after?D.line:D.line-1,D.ch=qt(f,D.line),f.setCursor(D);var W=Pe.commands.newlineAndIndentContinueComment||Pe.commands.newlineAndIndent;W(f)}this.enterInsertMode(f,{repeat:T.repeat},k)},paste:function(f,T,k){var D=this,W=Be.registerController.getRegister(T.registerName),z=function(){var q=W.toString();D.continuePaste(f,T,k,q,W)};T.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(q){D.continuePaste(f,T,k,q,W)},function(){z()}):z()},continuePaste:function(f,T,k,D,W){var z=qe(f.getCursor());if(D){if(T.matchIndent){var q=f.getOption("tabSize"),Y=function(xn){var V=xn.split(" ").length-1,X=xn.split(" ").length-1;return V*q+X*1},Q=f.getLine(f.getCursor().line),re=Y(Q.match(/^\s*/)[0]),se=D.replace(/\n$/,""),ve=D!==se,Ce=Y(D.match(/^\s*/)[0]),D=se.replace(/^\s*/gm,function(xn){var V=re+(Y(xn)-Ce);if(V<0)return"";if(f.getOption("indentWithTabs")){var X=Math.floor(V/q);return Array(X+1).join(" ")}return Array(V+1).join(" ")});D+=ve?`
|
1441
|
+
`:""}if(T.repeat>1)var D=Array(T.repeat+1).join(D);var fe=W.linewise,we=W.blockwise;if(we){D=D.split(`
|
1442
|
+
`),fe&&D.pop();for(var Oe=0;Oe<D.length;Oe++)D[Oe]=D[Oe]==""?" ":D[Oe];z.ch+=T.after?1:0,z.ch=Math.min(qt(f,z.line),z.ch)}else fe?k.visualMode?D=k.visualLine?D.slice(0,-1):`
|
1443
|
+
`+D.slice(0,D.length-1)+`
|
1444
|
+
`:T.after?(D=`
|
1445
|
+
`+D.slice(0,D.length-1),z.ch=qt(f,z.line)):z.ch=0:z.ch+=T.after?1:0;var Le;if(k.visualMode){k.lastPastedText=D;var Ue,st=He(f,k),Qe=st[0],et=st[1],fn=f.getSelection(),at=f.listSelections(),bn=new Array(at.length).join("1").split("1");k.lastSelection&&(Ue=k.lastSelection.headMark.find()),Be.registerController.unnamedRegister.setText(fn),we?(f.replaceSelections(bn),et=new Ne(Qe.line+D.length-1,Qe.ch),f.setCursor(Qe),In(f,et),f.replaceSelections(D),Le=Qe):k.visualBlock?(f.replaceSelections(bn),f.setCursor(Qe),f.replaceRange(D,Qe,Qe),Le=Qe):(f.replaceRange(D,Qe,et),Le=f.posFromIndex(f.indexFromPos(Qe)+D.length-1)),Ue&&(k.lastSelection.headMark=f.setBookmark(Ue)),fe&&(Le.ch=0)}else if(we){f.setCursor(z);for(var Oe=0;Oe<D.length;Oe++){var kt=z.line+Oe;kt>f.lastLine()&&f.replaceRange(`
|
1446
|
+
`,new Ne(kt,0));var $t=qt(f,kt);$t<z.ch&&Mn(f,kt,z.ch)}f.setCursor(z),In(f,new Ne(z.line+D.length-1,z.ch)),f.replaceSelections(D),Le=z}else if(f.replaceRange(D,z),fe){var kt=T.after?z.line+1:z.line;Le=new Ne(kt,ct(f.getLine(kt)))}else Le=qe(z),/\n/.test(D)||(Le.ch+=D.length-(T.after?1:0));k.visualMode&&xt(f,!1),f.setCursor(Le)}},undo:function(f,T){f.operation(function(){Ge(f,Pe.commands.undo,T.repeat)(),f.setCursor(ce(f,f.getCursor("start")))})},redo:function(f,T){Ge(f,Pe.commands.redo,T.repeat)()},setRegister:function(f,T,k){k.inputState.registerName=T.selectedCharacter},insertRegister:function(f,T,k){var D=T.selectedCharacter,W=Be.registerController.getRegister(D),z=W&&W.toString();z&&f.replaceSelection(z)},oneNormalCommand:function(f,T,k){zr(f,!0),k.insertModeReturn=!0,Pe.on(f,"vim-command-done",function D(){k.visualMode||(k.insertModeReturn&&(k.insertModeReturn=!1,k.insertMode||On.enterInsertMode(f,{},k)),Pe.off(f,"vim-command-done",D))})},setMark:function(f,T,k){var D=T.selectedCharacter;Zr(f,k,D,f.getCursor())},replace:function(f,T,k){var D=T.selectedCharacter,W=f.getCursor(),z,q,Y=f.listSelections();if(k.visualMode)W=f.getCursor("start"),q=f.getCursor("end");else{var Q=f.getLine(W.line);z=W.ch+T.repeat,z>Q.length&&(z=Q.length),q=new Ne(W.line,z)}var re=x(f,W,q);if(W=re.start,q=re.end,D==`
|
1447
|
+
`)k.visualMode||f.replaceRange("",W,q),(Pe.commands.newlineAndIndentContinueComment||Pe.commands.newlineAndIndent)(f);else{var se=f.getRange(W,q);if(se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,D),se=se.replace(/[^\n]/g,D),k.visualBlock){var ve=new Array(f.getOption("tabSize")+1).join(" ");se=f.getSelection(),se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,D),se=se.replace(/\t/g,ve).replace(/[^\n]/g,D).split(`
|
1448
|
+
`),f.replaceSelections(se)}else f.replaceRange(se,W,q);k.visualMode?(W=tt(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,f.setCursor(W),xt(f,!1)):f.setCursor(ye(q,0,-1))}},incrementNumberToken:function(f,T){for(var k=f.getCursor(),D=f.getLine(k.line),W=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,z,q,Y,Q;(z=W.exec(D))!==null&&(q=z.index,Y=q+z[0].length,!(k.ch<Y)););if(!(!T.backtrack&&Y<=k.ch)&&z){var re=z[2]||z[4],se=z[3]||z[5],ve=T.increase?1:-1,Ce={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],fe=parseInt(z[1]+se,Ce)+ve*T.repeat;Q=fe.toString(Ce);var we=re?new Array(se.length-Q.length+1+z[1].length).join("0"):"";Q.charAt(0)==="-"?Q="-"+re+we+Q.substr(1):Q=re+we+Q;var Oe=new Ne(k.line,q),Le=new Ne(k.line,Y);f.replaceRange(Q,Oe,Le),f.setCursor(new Ne(k.line,q+Q.length-1))}},repeatLastEdit:function(f,T,k){var D=k.lastEditInputState;if(D){var W=T.repeat;W&&T.repeatIsExplicit?k.lastEditInputState.repeatOverride=W:W=k.lastEditInputState.repeatOverride||W,ia(f,k,W,!1)}},indent:function(f,T){f.indentLine(f.getCursor().line,T.indentRight)},exitInsertMode:zr},ti={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},ni={bracket:{isComplete:function(f){if(f.nextCh===f.symb){if(f.depth++,f.depth>=1)return!0}else f.nextCh===f.reverseSymb&&f.depth--;return!1}},section:{init:function(f){f.curMoveThrough=!0,f.symb=(f.forward?"]":"[")===f.symb?"{":"}"},isComplete:function(f){return f.index===0&&f.nextCh===f.symb}},comment:{isComplete:function(f){var T=f.lastCh==="*"&&f.nextCh==="/";return f.lastCh=f.nextCh,T}},method:{init:function(f){f.symb=f.symb==="m"?"{":"}",f.reverseSymb=f.symb==="{"?"}":"{"},isComplete:function(f){return f.nextCh===f.symb}},preprocess:{init:function(f){f.index=0},isComplete:function(f){if(f.nextCh==="#"){var T=f.lineText.match(/^#(\w+)/)[1];if(T==="endif"){if(f.forward&&f.depth===0)return!0;f.depth++}else if(T==="if"){if(!f.forward&&f.depth===0)return!0;f.depth--}if(T==="else"&&f.depth===0)return!0}return!1}}};E("pcre",!0,"boolean"),Li.prototype={getQuery:function(){return Be.query},setQuery:function(f){Be.query=f},getOverlay:function(){return this.searchOverlay},setOverlay:function(f){this.searchOverlay=f},isReversed:function(){return Be.isReversed},setReversed:function(f){Be.isReversed=f},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(f){this.annotate=f}};var vi={"\\n":`
|
1449
|
+
`,"\\r":"\r","\\t":" "},or={"\\/":"/","\\\\":"\\","\\n":`
|
1450
|
+
`,"\\r":"\r","\\t":" ","\\&":"&"},sr=0,gr=function(){this.buildCommandMap_()};gr.prototype={processCommand:function(f,T,k){var D=this;f.operation(function(){f.curOp.isVimOp=!0,D._processCommand(f,T,k)})},_processCommand:function(f,T,k){var D=f.state.vim,W=Be.registerController.getRegister(":"),z=W.toString(),q=new Pe.StringStream(T);W.setText(T);var Y=k||{};Y.input=T;try{this.parseInput_(f,q,Y)}catch(se){throw zt(f,se.toString()),se}D.visualMode&&xt(f);var Q,re;if(!Y.commandName)Y.line!==void 0&&(re="move");else if(Q=this.matchCommand_(Y.commandName),Q){if(re=Q.name,Q.excludeFromCommandHistory&&W.setText(z),this.parseCommandArgs_(q,Y,Q),Q.type=="exToKey"){I(f,Q.toKeys,Q);return}if(Q.type=="exToEx"){this.processCommand(f,Q.toInput);return}}if(!re){zt(f,'Not an editor command ":'+T+'"');return}try{Cs[re](f,Y),(!Q||!Q.possiblyAsync)&&Y.callback&&Y.callback()}catch(se){throw zt(f,se.toString()),se}},parseInput_:function(f,T,k){if(T.eatWhile(":"),T.eat("%")?(k.line=f.firstLine(),k.lineEnd=f.lastLine()):(k.line=this.parseLineSpec_(f,T),k.line!==void 0&&T.eat(",")&&(k.lineEnd=this.parseLineSpec_(f,T))),k.line==null)if(f.state.vim.visualMode){var D=Br(f,f.state.vim,"<");k.selectionLine=D&&D.line,D=Br(f,f.state.vim,">"),k.selectionLineEnd=D&&D.line}else k.selectionLine=f.getCursor().line;else k.selectionLine=k.line,k.selectionLineEnd=k.lineEnd;var W=T.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return W?k.commandName=W[1]:k.commandName=T.match(/.*/)[0],k},parseLineSpec_:function(f,T){var k=T.match(/^(\d+)/);if(k)return parseInt(k[1],10)-1;switch(T.next()){case".":return this.parseLineSpecOffset_(T,f.getCursor().line);case"$":return this.parseLineSpecOffset_(T,f.lastLine());case"'":var D=T.next(),W=Br(f,f.state.vim,D);if(!W)throw new Error("Mark not set");return this.parseLineSpecOffset_(T,W.line);case"-":case"+":return T.backUp(1),this.parseLineSpecOffset_(T,f.getCursor().line);default:return T.backUp(1),void 0}},parseLineSpecOffset_:function(f,T){var k=f.match(/^([+-])?(\d+)/);if(k){var D=parseInt(k[2],10);k[1]=="-"?T-=D:T+=D}return T},parseCommandArgs_:function(f,T,k){if(!f.eol()){T.argString=f.match(/.*/)[0];var D=k.argDelimiter||/\s+/,W=dr(T.argString).split(D);W.length&&W[0]&&(T.args=W)}},matchCommand_:function(f){for(var T=f.length;T>0;T--){var k=f.substring(0,T);if(this.commandMap_[k]){var D=this.commandMap_[k];if(D.name.indexOf(f)===0)return D}}return null},buildCommandMap_:function(){this.commandMap_={};for(var f=0;f<ei.length;f++){var T=ei[f],k=T.shortName||T.name;this.commandMap_[k]=T}},map:function(f,T,k,D){if(f!=":"&&f.charAt(0)==":"){if(k)throw Error("Mode not supported for ex mappings");var W=f.substring(1);T!=":"&&T.charAt(0)==":"?this.commandMap_[W]={name:W,type:"exToEx",toInput:T.substring(1),user:!0}:this.commandMap_[W]={name:W,type:"exToKey",toKeys:T,user:!0}}else{var z={keys:f,type:"keyToKey",toKeys:T,noremap:!!D};k&&(z.context=k),An.unshift(z)}},unmap:function(f,T){if(f!=":"&&f.charAt(0)==":"){if(T)throw Error("Mode not supported for ex mappings");var k=f.substring(1);if(this.commandMap_[k]&&this.commandMap_[k].user)return delete this.commandMap_[k],!0}else for(var D=f,W=0;W<An.length;W++)if(D==An[W].keys&&An[W].context===T)return An.splice(W,1),!0}};var Cs={colorscheme:function(f,T){if(!T.args||T.args.length<1){zt(f,f.getOption("theme"));return}f.setOption("theme",T.args[0])},map:function(f,T,k,D){var W=T.args;if(!W||W.length<2){f&&zt(f,"Invalid mapping: "+T.input);return}fr.map(W[0],W[1],k,D)},imap:function(f,T){this.map(f,T,"insert")},nmap:function(f,T){this.map(f,T,"normal")},vmap:function(f,T){this.map(f,T,"visual")},omap:function(f,T){this.map(f,T,"operatorPending")},noremap:function(f,T){this.map(f,T,void 0,!0)},inoremap:function(f,T){this.map(f,T,"insert",!0)},nnoremap:function(f,T){this.map(f,T,"normal",!0)},vnoremap:function(f,T){this.map(f,T,"visual",!0)},onoremap:function(f,T){this.map(f,T,"operatorPending",!0)},unmap:function(f,T,k){var D=T.args;(!D||D.length<1||!fr.unmap(D[0],k))&&f&&zt(f,"No such mapping: "+T.input)},mapclear:function(f,T){wt.mapclear()},imapclear:function(f,T){wt.mapclear("insert")},nmapclear:function(f,T){wt.mapclear("normal")},vmapclear:function(f,T){wt.mapclear("visual")},omapclear:function(f,T){wt.mapclear("operatorPending")},move:function(f,T){Ln.processCommand(f,f.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:T.line+1})},set:function(f,T){var k=T.args,D=T.setCfg||{};if(!k||k.length<1){f&&zt(f,"Invalid mapping: "+T.input);return}var W=k[0].split("="),z=W[0],q=W[1],Y=!1,Q=!1;if(z.charAt(z.length-1)=="?"){if(q)throw Error("Trailing characters: "+T.argString);z=z.substring(0,z.length-1),Y=!0}else z.charAt(z.length-1)=="!"&&(z=z.substring(0,z.length-1),Q=!0);q===void 0&&z.substring(0,2)=="no"&&(z=z.substring(2),q=!1);var re=jt[z]&&jt[z].type=="boolean";if(re&&(Q?q=!_(z,f,D):q==null&&(q=!0)),!re&&q===void 0||Y){var se=_(z,f,D);se instanceof Error?zt(f,se.message):se===!0||se===!1?zt(f," "+(se?"":"no")+z):zt(f," "+z+"="+se)}else{var ve=$(z,q,f,D);ve instanceof Error&&zt(f,ve.message)}},setlocal:function(f,T){T.setCfg={scope:"local"},this.set(f,T)},setglobal:function(f,T){T.setCfg={scope:"global"},this.set(f,T)},registers:function(f,T){var k=T.args,D=Be.registerController.registers,W=`----------Registers----------
|
1451
|
+
|
1452
|
+
`;if(k){var z;k=k.join("");for(var q=0;q<k.length;q++)if(z=k.charAt(q),!!Be.registerController.isValidRegister(z)){var Y=D[z]||new B;W+='"'+z+" "+Y.toString()+`
|
1453
|
+
`}}else for(var z in D){var Q=D[z].toString();Q.length&&(W+='"'+z+" "+Q+`
|
1454
|
+
`)}zt(f,W)},sort:function(f,T){function k(){if(T.argString){var kt=new Pe.StringStream(T.argString);if(kt.eat("!")&&(z=!0),kt.eol())return;if(!kt.eatSpace())return"Invalid arguments";var $t=kt.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!$t&&!kt.eol())return"Invalid arguments";if($t[1]){q=$t[1].indexOf("i")!=-1,Y=$t[1].indexOf("u")!=-1;var Xn=$t[1].indexOf("d")!=-1||$t[1].indexOf("n")!=-1&&1,ar=$t[1].indexOf("x")!=-1&&1,xn=$t[1].indexOf("o")!=-1&&1;if(Xn+ar+xn>1)return"Invalid arguments";Q=Xn&&"decimal"||ar&&"hex"||xn&&"octal"}$t[2]&&(re=new RegExp($t[2].substr(1,$t[2].length-2),q?"i":""))}}function D(kt,$t){if(z){var Xn;Xn=kt,kt=$t,$t=Xn}q&&(kt=kt.toLowerCase(),$t=$t.toLowerCase());var ar=Q&&Le.exec(kt),xn=Q&&Le.exec($t);return ar?(ar=parseInt((ar[1]+ar[2]).toLowerCase(),Ue),xn=parseInt((xn[1]+xn[2]).toLowerCase(),Ue),ar-xn):kt<$t?-1:1}function W(kt,$t){if(z){var Xn;Xn=kt,kt=$t,$t=Xn}return q&&(kt[0]=kt[0].toLowerCase(),$t[0]=$t[0].toLowerCase()),kt[0]<$t[0]?-1:1}var z,q,Y,Q,re,se=k();if(se){zt(f,se+": "+T.argString);return}var ve=T.line||f.firstLine(),Ce=T.lineEnd||T.line||f.lastLine();if(ve!=Ce){var fe=new Ne(ve,0),we=new Ne(Ce,qt(f,Ce)),Oe=f.getRange(fe,we).split(`
|
1455
|
+
`),Le=re||(Q=="decimal"?/(-?)([\d]+)/:Q=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Q=="octal"?/([0-7]+)/:null),Ue=Q=="decimal"?10:Q=="hex"?16:Q=="octal"?8:null,st=[],Qe=[];if(Q||re)for(var et=0;et<Oe.length;et++){var fn=re?Oe[et].match(re):null;fn&&fn[0]!=""?st.push(fn):!re&&Le.exec(Oe[et])?st.push(Oe[et]):Qe.push(Oe[et])}else Qe=Oe;if(st.sort(re?W:D),re)for(var et=0;et<st.length;et++)st[et]=st[et].input;else Q||Qe.sort(D);if(Oe=z?st.concat(Qe):Qe.concat(st),Y){var at=Oe,bn;Oe=[];for(var et=0;et<at.length;et++)at[et]!=bn&&Oe.push(at[et]),bn=at[et]}f.replaceRange(Oe.join(`
|
1456
|
+
`),fe,we)}},vglobal:function(f,T){this.global(f,T)},normal:function(f,T){var k=T.argString;if(k&&k[0]=="!"&&(k=k.slice(1),sn=!0),k=k.trimStart(),!k){zt(f,"Argument is required.");return}var D=T.line;if(typeof D=="number")for(var W=isNaN(T.lineEnd)?D:T.lineEnd,z=D;z<=W;z++)f.setCursor(z,0),I(f,T.argString.trimStart()),f.state.vim.insertMode&&zr(f,!0);else I(f,T.argString.trimStart()),f.state.vim.insertMode&&zr(f,!0)},global:function(f,T){var k=T.argString;if(!k){zt(f,"Regular Expression missing from global");return}var D=T.commandName[0]==="v";k[0]==="!"&&T.commandName[0]==="g"&&(D=!0,k=k.slice(1));var W=T.line!==void 0?T.line:f.firstLine(),z=T.lineEnd||T.line||f.lastLine(),q=Cr(k),Y=k,Q;if(q.length&&(Y=q[0],Q=q.slice(1,q.length).join("/")),Y)try{pn(f,Y,!0,!0)}catch{zt(f,"Invalid regex: "+Y);return}for(var re=_n(f).getQuery(),se=[],ve=W;ve<=z;ve++){var Ce=f.getLine(ve),fe=re.test(Ce);fe!==D&&se.push(Q?f.getLineHandle(ve):Ce)}if(!Q){zt(f,se.join(`
|
1457
|
+
`));return}var we=0,Oe=function(){if(we<se.length){var Le=se[we++],Ue=f.getLineNumber(Le);if(Ue==null){Oe();return}var st=Ue+1+Q;fr.processCommand(f,st,{callback:Oe})}else f.releaseLineHandles&&f.releaseLineHandles()};Oe()},substitute:function(f,T){if(!f.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var k=T.argString,D=k?Oi(k,k[0]):[],W,z="",q,Y,Q,re=!1,se=!1;if(D.length)W=D[0],_("pcre")&&W!==""&&(W=new RegExp(W).source),z=D[1],z!==void 0&&(_("pcre")?z=Ua(z.replace(/([^\\])&/g,"$1$$&")):z=Ha(z),Be.lastSubstituteReplacePart=z),q=D[2]?D[2].split(" "):[];else if(k&&k.length){zt(f,"Substitutions should be of the form :s/pattern/replace/");return}if(q&&(Y=q[0],Q=parseInt(q[1]),Y&&(Y.indexOf("c")!=-1&&(re=!0),Y.indexOf("g")!=-1&&(se=!0),_("pcre")?W=W+"/"+Y:W=W.replace(/\//g,"\\/")+"/"+Y)),W)try{pn(f,W,!0,!0)}catch{zt(f,"Invalid regex: "+W);return}if(z=z||Be.lastSubstituteReplacePart,z===void 0){zt(f,"No previous substitute regular expression");return}var ve=_n(f),Ce=ve.getQuery(),fe=T.line!==void 0?T.line:f.getCursor().line,we=T.lineEnd||fe;fe==f.firstLine()&&we==f.lastLine()&&(we=1/0),Q&&(fe=we,we=fe+Q-1);var Oe=ce(f,new Ne(fe,0)),Le=f.getSearchCursor(Ce,Oe);No(f,re,se,fe,we,Le,Ce,z,T.callback)},startinsert:function(f,T){I(f,T.argString=="!"?"A":"i",{})},redo:Pe.commands.redo,undo:Pe.commands.undo,write:function(f){Pe.commands.save?Pe.commands.save(f):f.save&&f.save()},nohlsearch:function(f){Oo(f)},yank:function(f){var T=qe(f.getCursor()),k=T.line,D=f.getLine(k);Be.registerController.pushText("0","yank",D,!0,!0)},delete:function(f,T){var k=T.selectionLine,D=isNaN(T.selectionLineEnd)?k:T.selectionLineEnd;Uo.delete(f,{linewise:!0},[{anchor:new Ne(k,0),head:new Ne(D+1,0)}])},join:function(f,T){var k=T.selectionLine,D=isNaN(T.selectionLineEnd)?k:T.selectionLineEnd;f.setCursor(new Ne(k,0)),On.joinLines(f,{repeat:D-k},f.state.vim)},delmarks:function(f,T){if(!T.argString||!dr(T.argString)){zt(f,"Argument required");return}for(var k=f.state.vim,D=new Pe.StringStream(dr(T.argString));!D.eol();){D.eatSpace();var W=D.pos;if(!D.match(/[a-zA-Z]/,!1)){zt(f,"Invalid argument: "+T.argString.substring(W));return}var z=D.next();if(D.match("-",!0)){if(!D.match(/[a-zA-Z]/,!1)){zt(f,"Invalid argument: "+T.argString.substring(W));return}var q=z,Y=D.next();if(!(c(q)&&c(Y)||u(q)&&u(Y))){zt(f,"Invalid argument: "+q+"-");return}var Q=q.charCodeAt(0),re=Y.charCodeAt(0);if(Q>=re){zt(f,"Invalid argument: "+T.argString.substring(W));return}for(var se=0;se<=re-Q;se++){var ve=String.fromCharCode(Q+se);delete k.marks[ve]}}else delete k.marks[z]}}},fr=new gr;E("insertModeEscKeysTimeout",200,"number"),Pe.Vim=wt;var Ar={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"},ri=wt.handleKey.bind(wt);wt.handleKey=function(f,T,k){return f.operation(function(){return ri(f,T,k)},!0)},L(),r.CodeMirror=Pe;var ii=wt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(f,T,k,D,W){var z=this.state.vim||{},q=k.characterWidth,Y=k.lineHeight,Q=T.top,re=T.left;if(!z.insertMode){var se=D.cursor?nr.comparePoints(D.cursor,D.start)<=0:W.selection.isBackwards()||W.selection.isEmpty();!se&&re>q&&(re-=q)}!z.insertMode&&z.status&&(Y/=2,Q+=Y),Di.translate(f,re,Q),Di.setStyle(f.style,"width",q+"px"),Di.setStyle(f.style,"height",Y+"px")},$getDirectionForHighlight:function(f){var T=f.state.cm,k=ii(T);if(!k.insertMode)return f.session.selection.isBackwards()||f.session.selection.isEmpty()},handleKeyboard:function(f,T,k,D,W){var z=f.editor,q=z.state.cm,Y=ii(q);if(D!=-1){if(Y.insertMode||(T==-1?(k.charCodeAt(0)>255&&f.inputKey&&(k=f.inputKey,k&&f.inputHash==4&&(k=k.toUpperCase())),f.inputChar=k):T==4||T==0?f.inputKey==k&&f.inputHash==T&&f.inputChar?(k=f.inputChar,T=-1):(f.inputChar=null,f.inputKey=k,f.inputHash=T):f.inputChar=f.inputKey=null),q.state.overwrite&&Y.insertMode&&k=="backspace"&&T==0)return{command:"gotoleft"};if(k=="c"&&T==1&&!ho.isMac&&z.getCopyText())return z.once("copy",function(){Y.insertMode?z.selection.clearSelection():q.operation(function(){xt(q)})}),{command:"null",passEvent:!0};if(k=="esc"&&!Y.insertMode&&!Y.visualMode&&!q.ace.inMultiSelectMode){var Q=_n(q),re=Q.getOverlay();re&&q.removeOverlay(re)}if(T==-1||T&1||T===0&&k.length>1){var se=Y.insertMode,ve=xs(T,k,W||{},Y);Y.status==null&&(Y.status="");var Ce=co(q,ve,"user");return Y=ii(q),Ce&&Y.status!=null?Y.status+=ve:Y.status==null&&(Y.status=""),q._signal("changeStatus"),!Ce&&(T!=-1||se)?void 0:{command:"null",passEvent:!Ce}}}},attach:function(f){function T(){var D=ii(k).insertMode;k.ace.renderer.setStyle("normal-mode",!D),f.textInput.setCommandMode(!D),f.renderer.$keepTextAreaAtCursor=D,f.renderer.$blockCursor=!D}f.state||(f.state={});var k=new Pe(f);f.state.cm=k,f.$vimModeHandler=this,h(k),ii(k).status=null,k.on("vim-command-done",function(){k.virtualSelectionMode()||(ii(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()||(T(),k._signal("changeStatus"))}),T(),f.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(k)},detach:function(f){var T=f.state.cm;g(T),T.destroy(),f.state.cm=null,f.$vimModeHandler=null,f.renderer.$cursorLayer.drawCursor=null,f.renderer.setStyle("normal-mode",!1),f.textInput.setCommandMode(!1),f.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(f){var T=f.state.cm,k=ii(T);if(k.insertMode)return"INSERT";var D="";return k.visualMode&&(D+="VISUAL",k.visualLine&&(D+=" LINE"),k.visualBlock&&(D+=" BLOCK")),k.status&&(D+=(D?" ":"")+k.status),D}},wt.defineOption({name:"wrap",set:function(f,T){T&&T.ace.setOption("wrap",f)},type:"boolean"},!1),wt.defineEx("write","w",function(){console.log(":write is not implemented")}),An.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"}}),An.push({keys:"gq",type:"operator",operator:"hardWrap"}),wt.defineOperator("hardWrap",function(f,T,k,D,W){var z=k[0].anchor.line,q=k[0].head.line;return T.linewise&&q--,Zi(f.ace,{startRow:z,endRow:q}),Ne(q,0)}),E("textwidth",void 0,"number",["tw"],function(f,T){if(T!==void 0){if(f===void 0){var k=T.ace.getOption("printMarginColumn");return k}var D=Math.round(f);D>1&&T.ace.setOption("printMarginColumn",D)}}),On.aceCommand=function(f,T,k){f.vimCmd=T,f.ace.inVirtualSelectionMode?f.ace.on("beforeEndOperation",pi):pi(null,f.ace)},On.fold=function(f,T,k){f.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(T.all?2:0)+(T.open?1:0)])},go=An.length,r.handler.defaultKeymap=An,r.handler.actions=On,r.Vim=wt}),function(){ace.require(["ace/keyboard/vim"],function(e){n&&(n.exports=e)})}()}(qg)),qg.exports}$C();var Sl={exports:{}};/**
|
1458
|
+
* @license
|
1459
|
+
* Lodash <https://lodash.com/>
|
1460
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
1461
|
+
* Released under MIT license <https://lodash.com/license>
|
1462
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
1463
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
1464
|
+
*/var MC=Sl.exports,Gg;function IC(){return Gg||(Gg=1,function(n,t){(function(){var e,r="4.17.21",v=200,m="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",y="Expected a function",x="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",g=500,s="__lodash_placeholder__",l=1,c=2,a=4,o=1,u=2,d=1,w=2,b=4,E=8,$=16,_=32,C=64,R=128,L=256,F=512,I=30,H="...",P=800,O=16,S=1,A=2,N=3,B=1/0,U=9007199254740991,K=17976931348623157e292,Z=NaN,te=4294967295,he=te-1,ne=te>>>1,ae=[["ary",R],["bind",d],["bindKey",w],["curry",E],["curryRight",$],["flip",F],["partial",_],["partialRight",C],["rearg",L]],ce="[object Arguments]",ue="[object Array]",ye="[object AsyncFunction]",Ae="[object Boolean]",$e="[object Date]",Ie="[object DOMException]",Ge="[object Error]",qe="[object Function]",ut="[object GeneratorFunction]",tt="[object Map]",ht="[object Number]",Zt="[object Null]",hn="[object Object]",qt="[object Promise]",dr="[object Proxy]",dn="[object RegExp]",Mn="[object Set]",In="[object String]",Gn="[object Symbol]",vt="[object Undefined]",He="[object WeakMap]",ke="[object WeakSet]",ze="[object ArrayBuffer]",Ye="[object DataView]",dt="[object Float32Array]",Ct="[object Float64Array]",xt="[object Int8Array]",Et="[object Int16Array]",It="[object Int32Array]",ct="[object Uint8Array]",yt="[object Uint8ClampedArray]",wn="[object Uint16Array]",br="[object Uint32Array]",Wr=/\b__p \+= '';/g,Ri=/\b(__p \+=) '' \+/g,oo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pr=/&(?:amp|lt|gt|quot|#39);/g,so=/[&<>"']/g,Lo=RegExp(pr.source),za=RegExp(so.source),Zr=/<%-([\s\S]+?)%>/g,ja=/<%([\s\S]+?)%>/g,gs=/<%=([\s\S]+?)%>/g,ta=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ei=/^\w*$/,Bn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xr=/[\\^$.*+?()[\]{}|]/g,Li=RegExp(xr.source),_n=/^\s+/,Cr=/\s/,Gi=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Oi=/\{\n\/\* \[wrapped with (.+)\] \*/,fs=/,? & /,na=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ha=/[()=,{}\[\]\/\s]/,Ua=/\\(\\)?/g,Ni=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Jr=/\w*$/,zt=/^[-+]0x[0-9a-f]+$/i,ra=/^0b[01]+$/i,kr=/^\[object .+?Constructor\]$/,zn=/^0o[0-7]+$/i,pn=/^(?:0|[1-9]\d*)$/,Rn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,hi=/($^)/,_r=/['\n\r\u2028\u2029\\]/g,di="\\ud800-\\udfff",Oo="\\u0300-\\u036f",ms="\\ufe20-\\ufe2f",Yi="\\u20d0-\\u20ff",Br=Oo+ms+Yi,ao="\\u2700-\\u27bf",No="a-z\\xdf-\\xf6\\xf8-\\xff",zr="\\xac\\xb1\\xd7\\xf7",Do="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",vs="\\u2000-\\u206f",ys=" \\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",Fo="A-Z\\xc0-\\xd6\\xd8-\\xde",tr="\\ufe0e\\ufe0f",ws=zr+Do+vs+ys,lo="['’]",Po="["+di+"]",Wo="["+ws+"]",Xi="["+Br+"]",bs="\\d+",ia="["+ao+"]",Bo="["+No+"]",zo="[^"+di+ws+bs+ao+No+Fo+"]",xs="\\ud83c[\\udffb-\\udfff]",jo="(?:"+Xi+"|"+xs+")",co="[^"+di+"]",pi="(?:\\ud83c[\\udde6-\\uddff]){2}",nr="[\\ud800-\\udbff][\\udc00-\\udfff]",Qi="["+Fo+"]",Di="\\u200d",oa="(?:"+Bo+"|"+zo+")",Va="(?:"+Qi+"|"+zo+")",uo="(?:"+lo+"(?:d|ll|m|re|s|t|ve))?",Fi="(?:"+lo+"(?:D|LL|M|RE|S|T|VE))?",ho=jo+"?",Ho="["+tr+"]?",po="(?:"+Di+"(?:"+[co,pi,nr].join("|")+")"+Ho+ho+")*",sa="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Zi="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Pe=Ho+ho+po,aa="(?:"+[ia,pi,nr].join("|")+")"+Pe,Ne="(?:"+[co+Xi+"?",Xi,pi,nr,Po].join("|")+")",An=RegExp(lo,"g"),go=RegExp(Xi,"g"),ei=RegExp(xs+"(?="+xs+")|"+Ne+Pe,"g"),jn=RegExp([Qi+"?"+Bo+"+"+uo+"(?="+[Wo,Qi,"$"].join("|")+")",Va+"+"+Fi+"(?="+[Wo,Qi+oa,"$"].join("|")+")",Qi+"?"+oa+"+"+uo,Qi+"+"+Fi,Zi,sa,bs,aa].join("|"),"g"),la=RegExp("["+Di+di+Br+tr+"]"),fo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,gi=["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"],Ji=-1,Jt={};Jt[dt]=Jt[Ct]=Jt[xt]=Jt[Et]=Jt[It]=Jt[ct]=Jt[yt]=Jt[wn]=Jt[br]=!0,Jt[ce]=Jt[ue]=Jt[ze]=Jt[Ae]=Jt[Ye]=Jt[$e]=Jt[Ge]=Jt[qe]=Jt[tt]=Jt[ht]=Jt[hn]=Jt[dn]=Jt[Mn]=Jt[In]=Jt[He]=!1;var Yt={};Yt[ce]=Yt[ue]=Yt[ze]=Yt[Ye]=Yt[Ae]=Yt[$e]=Yt[dt]=Yt[Ct]=Yt[xt]=Yt[Et]=Yt[It]=Yt[tt]=Yt[ht]=Yt[hn]=Yt[dn]=Yt[Mn]=Yt[In]=Yt[Gn]=Yt[ct]=Yt[yt]=Yt[wn]=Yt[br]=!0,Yt[Ge]=Yt[qe]=Yt[He]=!1;var en={À:"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"},jt={"&":"&","<":"<",">":">",'"':""","'":"'"},fi={"&":"&","<":"<",">":">",""":'"',"'":"'"},En={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Be=parseFloat,gn=parseInt,wt=typeof Io=="object"&&Io&&Io.Object===Object&&Io,Rr=typeof self=="object"&&self&&self.Object===Object&&self,sn=wt||Rr||Function("return this")(),vn=t&&!t.nodeType&&t,Yn=vn&&!0&&n&&!n.nodeType&&n,Er=Yn&&Yn.exports===vn,mi=Er&&wt.process,Ln=function(){try{var pe=Yn&&Yn.require&&Yn.require("util").types;return pe||mi&&mi.binding&&mi.binding("util")}catch{}}(),jr=Ln&&Ln.isArrayBuffer,Uo=Ln&&Ln.isDate,On=Ln&&Ln.isMap,ti=Ln&&Ln.isRegExp,ni=Ln&&Ln.isSet,vi=Ln&&Ln.isTypedArray;function or(pe,_e,xe){switch(xe.length){case 0:return pe.call(_e);case 1:return pe.call(_e,xe[0]);case 2:return pe.call(_e,xe[0],xe[1]);case 3:return pe.call(_e,xe[0],xe[1],xe[2])}return pe.apply(_e,xe)}function sr(pe,_e,xe,je){for(var lt=-1,Mt=pe==null?0:pe.length;++lt<Mt;){var Kt=pe[lt];_e(je,Kt,xe(Kt),pe)}return je}function gr(pe,_e){for(var xe=-1,je=pe==null?0:pe.length;++xe<je&&_e(pe[xe],xe,pe)!==!1;);return pe}function Cs(pe,_e){for(var xe=pe==null?0:pe.length;xe--&&_e(pe[xe],xe,pe)!==!1;);return pe}function fr(pe,_e){for(var xe=-1,je=pe==null?0:pe.length;++xe<je;)if(!_e(pe[xe],xe,pe))return!1;return!0}function Ar(pe,_e){for(var xe=-1,je=pe==null?0:pe.length,lt=0,Mt=[];++xe<je;){var Kt=pe[xe];_e(Kt,xe,pe)&&(Mt[lt++]=Kt)}return Mt}function ri(pe,_e){var xe=pe==null?0:pe.length;return!!xe&&se(pe,_e,0)>-1}function ii(pe,_e,xe){for(var je=-1,lt=pe==null?0:pe.length;++je<lt;)if(xe(_e,pe[je]))return!0;return!1}function f(pe,_e){for(var xe=-1,je=pe==null?0:pe.length,lt=Array(je);++xe<je;)lt[xe]=_e(pe[xe],xe,pe);return lt}function T(pe,_e){for(var xe=-1,je=_e.length,lt=pe.length;++xe<je;)pe[lt+xe]=_e[xe];return pe}function k(pe,_e,xe,je){var lt=-1,Mt=pe==null?0:pe.length;for(je&&Mt&&(xe=pe[++lt]);++lt<Mt;)xe=_e(xe,pe[lt],lt,pe);return xe}function D(pe,_e,xe,je){var lt=pe==null?0:pe.length;for(je&<&&(xe=pe[--lt]);lt--;)xe=_e(xe,pe[lt],lt,pe);return xe}function W(pe,_e){for(var xe=-1,je=pe==null?0:pe.length;++xe<je;)if(_e(pe[xe],xe,pe))return!0;return!1}var z=we("length");function q(pe){return pe.split("")}function Y(pe){return pe.match(na)||[]}function Q(pe,_e,xe){var je;return xe(pe,function(lt,Mt,Kt){if(_e(lt,Mt,Kt))return je=Mt,!1}),je}function re(pe,_e,xe,je){for(var lt=pe.length,Mt=xe+(je?1:-1);je?Mt--:++Mt<lt;)if(_e(pe[Mt],Mt,pe))return Mt;return-1}function se(pe,_e,xe){return _e===_e?Ze(pe,_e,xe):re(pe,Ce,xe)}function ve(pe,_e,xe,je){for(var lt=xe-1,Mt=pe.length;++lt<Mt;)if(je(pe[lt],_e))return lt;return-1}function Ce(pe){return pe!==pe}function fe(pe,_e){var xe=pe==null?0:pe.length;return xe?st(pe,_e)/xe:Z}function we(pe){return function(_e){return _e==null?e:_e[pe]}}function Oe(pe){return function(_e){return pe==null?e:pe[_e]}}function Le(pe,_e,xe,je,lt){return lt(pe,function(Mt,Kt,Lt){xe=je?(je=!1,Mt):_e(xe,Mt,Kt,Lt)}),xe}function Ue(pe,_e){var xe=pe.length;for(pe.sort(_e);xe--;)pe[xe]=pe[xe].value;return pe}function st(pe,_e){for(var xe,je=-1,lt=pe.length;++je<lt;){var Mt=_e(pe[je]);Mt!==e&&(xe=xe===e?Mt:xe+Mt)}return xe}function Qe(pe,_e){for(var xe=-1,je=Array(pe);++xe<pe;)je[xe]=_e(xe);return je}function et(pe,_e){return f(_e,function(xe){return[xe,pe[xe]]})}function fn(pe){return pe&&pe.slice(0,Nt(pe)+1).replace(_n,"")}function at(pe){return function(_e){return pe(_e)}}function bn(pe,_e){return f(_e,function(xe){return pe[xe]})}function kt(pe,_e){return pe.has(_e)}function $t(pe,_e){for(var xe=-1,je=pe.length;++xe<je&&se(_e,pe[xe],0)>-1;);return xe}function Xn(pe,_e){for(var xe=pe.length;xe--&&se(_e,pe[xe],0)>-1;);return xe}function ar(pe,_e){for(var xe=pe.length,je=0;xe--;)pe[xe]===_e&&++je;return je}var xn=Oe(en),V=Oe(jt);function X(pe){return"\\"+En[pe]}function ie(pe,_e){return pe==null?e:pe[_e]}function oe(pe){return la.test(pe)}function ge(pe){return fo.test(pe)}function be(pe){for(var _e,xe=[];!(_e=pe.next()).done;)xe.push(_e.value);return xe}function Me(pe){var _e=-1,xe=Array(pe.size);return pe.forEach(function(je,lt){xe[++_e]=[lt,je]}),xe}function Fe(pe,_e){return function(xe){return pe(_e(xe))}}function We(pe,_e){for(var xe=-1,je=pe.length,lt=0,Mt=[];++xe<je;){var Kt=pe[xe];(Kt===_e||Kt===s)&&(pe[xe]=s,Mt[lt++]=xe)}return Mt}function Ve(pe){var _e=-1,xe=Array(pe.size);return pe.forEach(function(je){xe[++_e]=je}),xe}function Xe(pe){var _e=-1,xe=Array(pe.size);return pe.forEach(function(je){xe[++_e]=[je,je]}),xe}function Ze(pe,_e,xe){for(var je=xe-1,lt=pe.length;++je<lt;)if(pe[je]===_e)return je;return-1}function bt(pe,_e,xe){for(var je=xe+1;je--;)if(pe[je]===_e)return je;return je}function Pt(pe){return oe(pe)?rt(pe):z(pe)}function _t(pe){return oe(pe)?un(pe):q(pe)}function Nt(pe){for(var _e=pe.length;_e--&&Cr.test(pe.charAt(_e)););return _e}var pt=Oe(fi);function rt(pe){for(var _e=ei.lastIndex=0;ei.test(pe);)++_e;return _e}function un(pe){return pe.match(ei)||[]}function Cn(pe){return pe.match(jn)||[]}var Qn=function pe(_e){_e=_e==null?sn:Ut.defaults(sn.Object(),_e,Ut.pick(sn,gi));var xe=_e.Array,je=_e.Date,lt=_e.Error,Mt=_e.Function,Kt=_e.Math,Lt=_e.Object,Lr=_e.RegExp,yi=_e.String,an=_e.TypeError,lr=xe.prototype,mo=Mt.prototype,Nn=Lt.prototype,ks=_e["__core-js_shared__"],oc=mo.toString,on=Nn.hasOwnProperty,vM=0,wy=function(){var i=/[^.]+$/.exec(ks&&ks.keys&&ks.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),sc=Nn.toString,yM=oc.call(Lt),wM=sn._,bM=Lr("^"+oc.call(on).replace(xr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ac=Er?_e.Buffer:e,Vo=_e.Symbol,lc=_e.Uint8Array,by=ac?ac.allocUnsafe:e,cc=Fe(Lt.getPrototypeOf,Lt),xy=Lt.create,Cy=Nn.propertyIsEnumerable,uc=lr.splice,ky=Vo?Vo.isConcatSpreadable:e,qa=Vo?Vo.iterator:e,_s=Vo?Vo.toStringTag:e,hc=function(){try{var i=Ms(Lt,"defineProperty");return i({},"",{}),i}catch{}}(),xM=_e.clearTimeout!==sn.clearTimeout&&_e.clearTimeout,CM=je&&je.now!==sn.Date.now&&je.now,kM=_e.setTimeout!==sn.setTimeout&&_e.setTimeout,dc=Kt.ceil,pc=Kt.floor,ed=Lt.getOwnPropertySymbols,_M=ac?ac.isBuffer:e,_y=_e.isFinite,AM=lr.join,SM=Fe(Lt.keys,Lt),rr=Kt.max,Sr=Kt.min,TM=je.now,$M=_e.parseInt,Ay=Kt.random,MM=lr.reverse,td=Ms(_e,"DataView"),Ka=Ms(_e,"Map"),nd=Ms(_e,"Promise"),ca=Ms(_e,"Set"),Ga=Ms(_e,"WeakMap"),Ya=Ms(Lt,"create"),gc=Ga&&new Ga,ua={},IM=Is(td),RM=Is(Ka),EM=Is(nd),LM=Is(ca),OM=Is(Ga),fc=Vo?Vo.prototype:e,Xa=fc?fc.valueOf:e,Sy=fc?fc.toString:e;function J(i){if(Dn(i)&&!At(i)&&!(i instanceof Ht)){if(i instanceof wi)return i;if(on.call(i,"__wrapped__"))return Tw(i)}return new wi(i)}var ha=function(){function i(){}return function(p){if(!Sn(p))return{};if(xy)return xy(p);i.prototype=p;var M=new i;return i.prototype=e,M}}();function mc(){}function wi(i,p){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!p,this.__index__=0,this.__values__=e}J.templateSettings={escape:Zr,evaluate:ja,interpolate:gs,variable:"",imports:{_:J}},J.prototype=mc.prototype,J.prototype.constructor=J,wi.prototype=ha(mc.prototype),wi.prototype.constructor=wi;function Ht(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=te,this.__views__=[]}function NM(){var i=new Ht(this.__wrapped__);return i.__actions__=Hr(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Hr(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Hr(this.__views__),i}function DM(){if(this.__filtered__){var i=new Ht(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function FM(){var i=this.__wrapped__.value(),p=this.__dir__,M=At(i),j=p<0,G=M?i.length:0,ee=YI(0,G,this.__views__),le=ee.start,de=ee.end,me=de-le,Re=j?de:le-1,Ee=this.__iteratees__,De=Ee.length,Ke=0,nt=Sr(me,this.__takeCount__);if(!M||!j&&G==me&&nt==me)return Xy(i,this.__actions__);var ft=[];e:for(;me--&&Ke<nt;){Re+=p;for(var Ot=-1,mt=i[Re];++Ot<De;){var Wt=Ee[Ot],Vt=Wt.iteratee,ai=Wt.type,Dr=Vt(mt);if(ai==A)mt=Dr;else if(!Dr){if(ai==S)continue e;break e}}ft[Ke++]=mt}return ft}Ht.prototype=ha(mc.prototype),Ht.prototype.constructor=Ht;function As(i){var p=-1,M=i==null?0:i.length;for(this.clear();++p<M;){var j=i[p];this.set(j[0],j[1])}}function PM(){this.__data__=Ya?Ya(null):{},this.size=0}function WM(i){var p=this.has(i)&&delete this.__data__[i];return this.size-=p?1:0,p}function BM(i){var p=this.__data__;if(Ya){var M=p[i];return M===h?e:M}return on.call(p,i)?p[i]:e}function zM(i){var p=this.__data__;return Ya?p[i]!==e:on.call(p,i)}function jM(i,p){var M=this.__data__;return this.size+=this.has(i)?0:1,M[i]=Ya&&p===e?h:p,this}As.prototype.clear=PM,As.prototype.delete=WM,As.prototype.get=BM,As.prototype.has=zM,As.prototype.set=jM;function vo(i){var p=-1,M=i==null?0:i.length;for(this.clear();++p<M;){var j=i[p];this.set(j[0],j[1])}}function HM(){this.__data__=[],this.size=0}function UM(i){var p=this.__data__,M=vc(p,i);if(M<0)return!1;var j=p.length-1;return M==j?p.pop():uc.call(p,M,1),--this.size,!0}function VM(i){var p=this.__data__,M=vc(p,i);return M<0?e:p[M][1]}function qM(i){return vc(this.__data__,i)>-1}function KM(i,p){var M=this.__data__,j=vc(M,i);return j<0?(++this.size,M.push([i,p])):M[j][1]=p,this}vo.prototype.clear=HM,vo.prototype.delete=UM,vo.prototype.get=VM,vo.prototype.has=qM,vo.prototype.set=KM;function yo(i){var p=-1,M=i==null?0:i.length;for(this.clear();++p<M;){var j=i[p];this.set(j[0],j[1])}}function GM(){this.size=0,this.__data__={hash:new As,map:new(Ka||vo),string:new As}}function YM(i){var p=Mc(this,i).delete(i);return this.size-=p?1:0,p}function XM(i){return Mc(this,i).get(i)}function QM(i){return Mc(this,i).has(i)}function ZM(i,p){var M=Mc(this,i),j=M.size;return M.set(i,p),this.size+=M.size==j?0:1,this}yo.prototype.clear=GM,yo.prototype.delete=YM,yo.prototype.get=XM,yo.prototype.has=QM,yo.prototype.set=ZM;function Ss(i){var p=-1,M=i==null?0:i.length;for(this.__data__=new yo;++p<M;)this.add(i[p])}function JM(i){return this.__data__.set(i,h),this}function eI(i){return this.__data__.has(i)}Ss.prototype.add=Ss.prototype.push=JM,Ss.prototype.has=eI;function Pi(i){var p=this.__data__=new vo(i);this.size=p.size}function tI(){this.__data__=new vo,this.size=0}function nI(i){var p=this.__data__,M=p.delete(i);return this.size=p.size,M}function rI(i){return this.__data__.get(i)}function iI(i){return this.__data__.has(i)}function oI(i,p){var M=this.__data__;if(M instanceof vo){var j=M.__data__;if(!Ka||j.length<v-1)return j.push([i,p]),this.size=++M.size,this;M=this.__data__=new yo(j)}return M.set(i,p),this.size=M.size,this}Pi.prototype.clear=tI,Pi.prototype.delete=nI,Pi.prototype.get=rI,Pi.prototype.has=iI,Pi.prototype.set=oI;function Ty(i,p){var M=At(i),j=!M&&Rs(i),G=!M&&!j&&Xo(i),ee=!M&&!j&&!G&&fa(i),le=M||j||G||ee,de=le?Qe(i.length,yi):[],me=de.length;for(var Re in i)(p||on.call(i,Re))&&!(le&&(Re=="length"||G&&(Re=="offset"||Re=="parent")||ee&&(Re=="buffer"||Re=="byteLength"||Re=="byteOffset")||Co(Re,me)))&&de.push(Re);return de}function $y(i){var p=i.length;return p?i[pd(0,p-1)]:e}function sI(i,p){return Ic(Hr(i),Ts(p,0,i.length))}function aI(i){return Ic(Hr(i))}function rd(i,p,M){(M!==e&&!Wi(i[p],M)||M===e&&!(p in i))&&wo(i,p,M)}function Qa(i,p,M){var j=i[p];(!(on.call(i,p)&&Wi(j,M))||M===e&&!(p in i))&&wo(i,p,M)}function vc(i,p){for(var M=i.length;M--;)if(Wi(i[M][0],p))return M;return-1}function lI(i,p,M,j){return qo(i,function(G,ee,le){p(j,G,M(G),le)}),j}function My(i,p){return i&&to(p,cr(p),i)}function cI(i,p){return i&&to(p,Vr(p),i)}function wo(i,p,M){p=="__proto__"&&hc?hc(i,p,{configurable:!0,enumerable:!0,value:M,writable:!0}):i[p]=M}function id(i,p){for(var M=-1,j=p.length,G=xe(j),ee=i==null;++M<j;)G[M]=ee?e:Pd(i,p[M]);return G}function Ts(i,p,M){return i===i&&(M!==e&&(i=i<=M?i:M),p!==e&&(i=i>=p?i:p)),i}function bi(i,p,M,j,G,ee){var le,de=p&l,me=p&c,Re=p&a;if(M&&(le=G?M(i,j,G,ee):M(i)),le!==e)return le;if(!Sn(i))return i;var Ee=At(i);if(Ee){if(le=QI(i),!de)return Hr(i,le)}else{var De=Tr(i),Ke=De==qe||De==ut;if(Xo(i))return Jy(i,de);if(De==hn||De==ce||Ke&&!G){if(le=me||Ke?{}:yw(i),!de)return me?BI(i,cI(le,i)):WI(i,My(le,i))}else{if(!Yt[De])return G?i:{};le=ZI(i,De,de)}}ee||(ee=new Pi);var nt=ee.get(i);if(nt)return nt;ee.set(i,le),Kw(i)?i.forEach(function(mt){le.add(bi(mt,p,M,mt,i,ee))}):Vw(i)&&i.forEach(function(mt,Wt){le.set(Wt,bi(mt,p,M,Wt,i,ee))});var ft=Re?me?_d:kd:me?Vr:cr,Ot=Ee?e:ft(i);return gr(Ot||i,function(mt,Wt){Ot&&(Wt=mt,mt=i[Wt]),Qa(le,Wt,bi(mt,p,M,Wt,i,ee))}),le}function uI(i){var p=cr(i);return function(M){return Iy(M,i,p)}}function Iy(i,p,M){var j=M.length;if(i==null)return!j;for(i=Lt(i);j--;){var G=M[j],ee=p[G],le=i[G];if(le===e&&!(G in i)||!ee(le))return!1}return!0}function Ry(i,p,M){if(typeof i!="function")throw new an(y);return il(function(){i.apply(e,M)},p)}function Za(i,p,M,j){var G=-1,ee=ri,le=!0,de=i.length,me=[],Re=p.length;if(!de)return me;M&&(p=f(p,at(M))),j?(ee=ii,le=!1):p.length>=v&&(ee=kt,le=!1,p=new Ss(p));e:for(;++G<de;){var Ee=i[G],De=M==null?Ee:M(Ee);if(Ee=j||Ee!==0?Ee:0,le&&De===De){for(var Ke=Re;Ke--;)if(p[Ke]===De)continue e;me.push(Ee)}else ee(p,De,j)||me.push(Ee)}return me}var qo=iw(eo),Ey=iw(sd,!0);function hI(i,p){var M=!0;return qo(i,function(j,G,ee){return M=!!p(j,G,ee),M}),M}function yc(i,p,M){for(var j=-1,G=i.length;++j<G;){var ee=i[j],le=p(ee);if(le!=null&&(de===e?le===le&&!si(le):M(le,de)))var de=le,me=ee}return me}function dI(i,p,M,j){var G=i.length;for(M=Rt(M),M<0&&(M=-M>G?0:G+M),j=j===e||j>G?G:Rt(j),j<0&&(j+=G),j=M>j?0:Yw(j);M<j;)i[M++]=p;return i}function Ly(i,p){var M=[];return qo(i,function(j,G,ee){p(j,G,ee)&&M.push(j)}),M}function mr(i,p,M,j,G){var ee=-1,le=i.length;for(M||(M=eR),G||(G=[]);++ee<le;){var de=i[ee];p>0&&M(de)?p>1?mr(de,p-1,M,j,G):T(G,de):j||(G[G.length]=de)}return G}var od=ow(),Oy=ow(!0);function eo(i,p){return i&&od(i,p,cr)}function sd(i,p){return i&&Oy(i,p,cr)}function wc(i,p){return Ar(p,function(M){return ko(i[M])})}function $s(i,p){p=Go(p,i);for(var M=0,j=p.length;i!=null&&M<j;)i=i[no(p[M++])];return M&&M==j?i:e}function Ny(i,p,M){var j=p(i);return At(i)?j:T(j,M(i))}function Or(i){return i==null?i===e?vt:Zt:_s&&_s in Lt(i)?GI(i):aR(i)}function ad(i,p){return i>p}function pI(i,p){return i!=null&&on.call(i,p)}function gI(i,p){return i!=null&&p in Lt(i)}function fI(i,p,M){return i>=Sr(p,M)&&i<rr(p,M)}function ld(i,p,M){for(var j=M?ii:ri,G=i[0].length,ee=i.length,le=ee,de=xe(ee),me=1/0,Re=[];le--;){var Ee=i[le];le&&p&&(Ee=f(Ee,at(p))),me=Sr(Ee.length,me),de[le]=!M&&(p||G>=120&&Ee.length>=120)?new Ss(le&&Ee):e}Ee=i[0];var De=-1,Ke=de[0];e:for(;++De<G&&Re.length<me;){var nt=Ee[De],ft=p?p(nt):nt;if(nt=M||nt!==0?nt:0,!(Ke?kt(Ke,ft):j(Re,ft,M))){for(le=ee;--le;){var Ot=de[le];if(!(Ot?kt(Ot,ft):j(i[le],ft,M)))continue e}Ke&&Ke.push(ft),Re.push(nt)}}return Re}function mI(i,p,M,j){return eo(i,function(G,ee,le){p(j,M(G),ee,le)}),j}function Ja(i,p,M){p=Go(p,i),i=Cw(i,p);var j=i==null?i:i[no(Ci(p))];return j==null?e:or(j,i,M)}function Dy(i){return Dn(i)&&Or(i)==ce}function vI(i){return Dn(i)&&Or(i)==ze}function yI(i){return Dn(i)&&Or(i)==$e}function el(i,p,M,j,G){return i===p?!0:i==null||p==null||!Dn(i)&&!Dn(p)?i!==i&&p!==p:wI(i,p,M,j,el,G)}function wI(i,p,M,j,G,ee){var le=At(i),de=At(p),me=le?ue:Tr(i),Re=de?ue:Tr(p);me=me==ce?hn:me,Re=Re==ce?hn:Re;var Ee=me==hn,De=Re==hn,Ke=me==Re;if(Ke&&Xo(i)){if(!Xo(p))return!1;le=!0,Ee=!1}if(Ke&&!Ee)return ee||(ee=new Pi),le||fa(i)?fw(i,p,M,j,G,ee):qI(i,p,me,M,j,G,ee);if(!(M&o)){var nt=Ee&&on.call(i,"__wrapped__"),ft=De&&on.call(p,"__wrapped__");if(nt||ft){var Ot=nt?i.value():i,mt=ft?p.value():p;return ee||(ee=new Pi),G(Ot,mt,M,j,ee)}}return Ke?(ee||(ee=new Pi),KI(i,p,M,j,G,ee)):!1}function bI(i){return Dn(i)&&Tr(i)==tt}function cd(i,p,M,j){var G=M.length,ee=G,le=!j;if(i==null)return!ee;for(i=Lt(i);G--;){var de=M[G];if(le&&de[2]?de[1]!==i[de[0]]:!(de[0]in i))return!1}for(;++G<ee;){de=M[G];var me=de[0],Re=i[me],Ee=de[1];if(le&&de[2]){if(Re===e&&!(me in i))return!1}else{var De=new Pi;if(j)var Ke=j(Re,Ee,me,i,p,De);if(!(Ke===e?el(Ee,Re,o|u,j,De):Ke))return!1}}return!0}function Fy(i){if(!Sn(i)||nR(i))return!1;var p=ko(i)?bM:kr;return p.test(Is(i))}function xI(i){return Dn(i)&&Or(i)==dn}function CI(i){return Dn(i)&&Tr(i)==Mn}function kI(i){return Dn(i)&&Dc(i.length)&&!!Jt[Or(i)]}function Py(i){return typeof i=="function"?i:i==null?qr:typeof i=="object"?At(i)?zy(i[0],i[1]):By(i):sb(i)}function ud(i){if(!rl(i))return SM(i);var p=[];for(var M in Lt(i))on.call(i,M)&&M!="constructor"&&p.push(M);return p}function _I(i){if(!Sn(i))return sR(i);var p=rl(i),M=[];for(var j in i)j=="constructor"&&(p||!on.call(i,j))||M.push(j);return M}function hd(i,p){return i<p}function Wy(i,p){var M=-1,j=Ur(i)?xe(i.length):[];return qo(i,function(G,ee,le){j[++M]=p(G,ee,le)}),j}function By(i){var p=Sd(i);return p.length==1&&p[0][2]?bw(p[0][0],p[0][1]):function(M){return M===i||cd(M,i,p)}}function zy(i,p){return $d(i)&&ww(p)?bw(no(i),p):function(M){var j=Pd(M,i);return j===e&&j===p?Wd(M,i):el(p,j,o|u)}}function bc(i,p,M,j,G){i!==p&&od(p,function(ee,le){if(G||(G=new Pi),Sn(ee))AI(i,p,le,M,bc,j,G);else{var de=j?j(Id(i,le),ee,le+"",i,p,G):e;de===e&&(de=ee),rd(i,le,de)}},Vr)}function AI(i,p,M,j,G,ee,le){var de=Id(i,M),me=Id(p,M),Re=le.get(me);if(Re){rd(i,M,Re);return}var Ee=ee?ee(de,me,M+"",i,p,le):e,De=Ee===e;if(De){var Ke=At(me),nt=!Ke&&Xo(me),ft=!Ke&&!nt&&fa(me);Ee=me,Ke||nt||ft?At(de)?Ee=de:Hn(de)?Ee=Hr(de):nt?(De=!1,Ee=Jy(me,!0)):ft?(De=!1,Ee=ew(me,!0)):Ee=[]:ol(me)||Rs(me)?(Ee=de,Rs(de)?Ee=Xw(de):(!Sn(de)||ko(de))&&(Ee=yw(me))):De=!1}De&&(le.set(me,Ee),G(Ee,me,j,ee,le),le.delete(me)),rd(i,M,Ee)}function jy(i,p){var M=i.length;if(M)return p+=p<0?M:0,Co(p,M)?i[p]:e}function Hy(i,p,M){p.length?p=f(p,function(ee){return At(ee)?function(le){return $s(le,ee.length===1?ee[0]:ee)}:ee}):p=[qr];var j=-1;p=f(p,at(gt()));var G=Wy(i,function(ee,le,de){var me=f(p,function(Re){return Re(ee)});return{criteria:me,index:++j,value:ee}});return Ue(G,function(ee,le){return PI(ee,le,M)})}function SI(i,p){return Uy(i,p,function(M,j){return Wd(i,j)})}function Uy(i,p,M){for(var j=-1,G=p.length,ee={};++j<G;){var le=p[j],de=$s(i,le);M(de,le)&&tl(ee,Go(le,i),de)}return ee}function TI(i){return function(p){return $s(p,i)}}function dd(i,p,M,j){var G=j?ve:se,ee=-1,le=p.length,de=i;for(i===p&&(p=Hr(p)),M&&(de=f(i,at(M)));++ee<le;)for(var me=0,Re=p[ee],Ee=M?M(Re):Re;(me=G(de,Ee,me,j))>-1;)de!==i&&uc.call(de,me,1),uc.call(i,me,1);return i}function Vy(i,p){for(var M=i?p.length:0,j=M-1;M--;){var G=p[M];if(M==j||G!==ee){var ee=G;Co(G)?uc.call(i,G,1):md(i,G)}}return i}function pd(i,p){return i+pc(Ay()*(p-i+1))}function $I(i,p,M,j){for(var G=-1,ee=rr(dc((p-i)/(M||1)),0),le=xe(ee);ee--;)le[j?ee:++G]=i,i+=M;return le}function gd(i,p){var M="";if(!i||p<1||p>U)return M;do p%2&&(M+=i),p=pc(p/2),p&&(i+=i);while(p);return M}function Dt(i,p){return Rd(xw(i,p,qr),i+"")}function MI(i){return $y(ma(i))}function II(i,p){var M=ma(i);return Ic(M,Ts(p,0,M.length))}function tl(i,p,M,j){if(!Sn(i))return i;p=Go(p,i);for(var G=-1,ee=p.length,le=ee-1,de=i;de!=null&&++G<ee;){var me=no(p[G]),Re=M;if(me==="__proto__"||me==="constructor"||me==="prototype")return i;if(G!=le){var Ee=de[me];Re=j?j(Ee,me,de):e,Re===e&&(Re=Sn(Ee)?Ee:Co(p[G+1])?[]:{})}Qa(de,me,Re),de=de[me]}return i}var qy=gc?function(i,p){return gc.set(i,p),i}:qr,RI=hc?function(i,p){return hc(i,"toString",{configurable:!0,enumerable:!1,value:zd(p),writable:!0})}:qr;function EI(i){return Ic(ma(i))}function xi(i,p,M){var j=-1,G=i.length;p<0&&(p=-p>G?0:G+p),M=M>G?G:M,M<0&&(M+=G),G=p>M?0:M-p>>>0,p>>>=0;for(var ee=xe(G);++j<G;)ee[j]=i[j+p];return ee}function LI(i,p){var M;return qo(i,function(j,G,ee){return M=p(j,G,ee),!M}),!!M}function xc(i,p,M){var j=0,G=i==null?j:i.length;if(typeof p=="number"&&p===p&&G<=ne){for(;j<G;){var ee=j+G>>>1,le=i[ee];le!==null&&!si(le)&&(M?le<=p:le<p)?j=ee+1:G=ee}return G}return fd(i,p,qr,M)}function fd(i,p,M,j){var G=0,ee=i==null?0:i.length;if(ee===0)return 0;p=M(p);for(var le=p!==p,de=p===null,me=si(p),Re=p===e;G<ee;){var Ee=pc((G+ee)/2),De=M(i[Ee]),Ke=De!==e,nt=De===null,ft=De===De,Ot=si(De);if(le)var mt=j||ft;else Re?mt=ft&&(j||Ke):de?mt=ft&&Ke&&(j||!nt):me?mt=ft&&Ke&&!nt&&(j||!Ot):nt||Ot?mt=!1:mt=j?De<=p:De<p;mt?G=Ee+1:ee=Ee}return Sr(ee,he)}function Ky(i,p){for(var M=-1,j=i.length,G=0,ee=[];++M<j;){var le=i[M],de=p?p(le):le;if(!M||!Wi(de,me)){var me=de;ee[G++]=le===0?0:le}}return ee}function Gy(i){return typeof i=="number"?i:si(i)?Z:+i}function oi(i){if(typeof i=="string")return i;if(At(i))return f(i,oi)+"";if(si(i))return Sy?Sy.call(i):"";var p=i+"";return p=="0"&&1/i==-1/0?"-0":p}function Ko(i,p,M){var j=-1,G=ri,ee=i.length,le=!0,de=[],me=de;if(M)le=!1,G=ii;else if(ee>=v){var Re=p?null:UI(i);if(Re)return Ve(Re);le=!1,G=kt,me=new Ss}else me=p?[]:de;e:for(;++j<ee;){var Ee=i[j],De=p?p(Ee):Ee;if(Ee=M||Ee!==0?Ee:0,le&&De===De){for(var Ke=me.length;Ke--;)if(me[Ke]===De)continue e;p&&me.push(De),de.push(Ee)}else G(me,De,M)||(me!==de&&me.push(De),de.push(Ee))}return de}function md(i,p){return p=Go(p,i),i=Cw(i,p),i==null||delete i[no(Ci(p))]}function Yy(i,p,M,j){return tl(i,p,M($s(i,p)),j)}function Cc(i,p,M,j){for(var G=i.length,ee=j?G:-1;(j?ee--:++ee<G)&&p(i[ee],ee,i););return M?xi(i,j?0:ee,j?ee+1:G):xi(i,j?ee+1:0,j?G:ee)}function Xy(i,p){var M=i;return M instanceof Ht&&(M=M.value()),k(p,function(j,G){return G.func.apply(G.thisArg,T([j],G.args))},M)}function vd(i,p,M){var j=i.length;if(j<2)return j?Ko(i[0]):[];for(var G=-1,ee=xe(j);++G<j;)for(var le=i[G],de=-1;++de<j;)de!=G&&(ee[G]=Za(ee[G]||le,i[de],p,M));return Ko(mr(ee,1),p,M)}function Qy(i,p,M){for(var j=-1,G=i.length,ee=p.length,le={};++j<G;){var de=j<ee?p[j]:e;M(le,i[j],de)}return le}function yd(i){return Hn(i)?i:[]}function wd(i){return typeof i=="function"?i:qr}function Go(i,p){return At(i)?i:$d(i,p)?[i]:Sw(nn(i))}var OI=Dt;function Yo(i,p,M){var j=i.length;return M=M===e?j:M,!p&&M>=j?i:xi(i,p,M)}var Zy=xM||function(i){return sn.clearTimeout(i)};function Jy(i,p){if(p)return i.slice();var M=i.length,j=by?by(M):new i.constructor(M);return i.copy(j),j}function bd(i){var p=new i.constructor(i.byteLength);return new lc(p).set(new lc(i)),p}function NI(i,p){var M=p?bd(i.buffer):i.buffer;return new i.constructor(M,i.byteOffset,i.byteLength)}function DI(i){var p=new i.constructor(i.source,Jr.exec(i));return p.lastIndex=i.lastIndex,p}function FI(i){return Xa?Lt(Xa.call(i)):{}}function ew(i,p){var M=p?bd(i.buffer):i.buffer;return new i.constructor(M,i.byteOffset,i.length)}function tw(i,p){if(i!==p){var M=i!==e,j=i===null,G=i===i,ee=si(i),le=p!==e,de=p===null,me=p===p,Re=si(p);if(!de&&!Re&&!ee&&i>p||ee&&le&&me&&!de&&!Re||j&&le&&me||!M&&me||!G)return 1;if(!j&&!ee&&!Re&&i<p||Re&&M&&G&&!j&&!ee||de&&M&&G||!le&&G||!me)return-1}return 0}function PI(i,p,M){for(var j=-1,G=i.criteria,ee=p.criteria,le=G.length,de=M.length;++j<le;){var me=tw(G[j],ee[j]);if(me){if(j>=de)return me;var Re=M[j];return me*(Re=="desc"?-1:1)}}return i.index-p.index}function nw(i,p,M,j){for(var G=-1,ee=i.length,le=M.length,de=-1,me=p.length,Re=rr(ee-le,0),Ee=xe(me+Re),De=!j;++de<me;)Ee[de]=p[de];for(;++G<le;)(De||G<ee)&&(Ee[M[G]]=i[G]);for(;Re--;)Ee[de++]=i[G++];return Ee}function rw(i,p,M,j){for(var G=-1,ee=i.length,le=-1,de=M.length,me=-1,Re=p.length,Ee=rr(ee-de,0),De=xe(Ee+Re),Ke=!j;++G<Ee;)De[G]=i[G];for(var nt=G;++me<Re;)De[nt+me]=p[me];for(;++le<de;)(Ke||G<ee)&&(De[nt+M[le]]=i[G++]);return De}function Hr(i,p){var M=-1,j=i.length;for(p||(p=xe(j));++M<j;)p[M]=i[M];return p}function to(i,p,M,j){var G=!M;M||(M={});for(var ee=-1,le=p.length;++ee<le;){var de=p[ee],me=j?j(M[de],i[de],de,M,i):e;me===e&&(me=i[de]),G?wo(M,de,me):Qa(M,de,me)}return M}function WI(i,p){return to(i,Td(i),p)}function BI(i,p){return to(i,mw(i),p)}function kc(i,p){return function(M,j){var G=At(M)?sr:lI,ee=p?p():{};return G(M,i,gt(j,2),ee)}}function da(i){return Dt(function(p,M){var j=-1,G=M.length,ee=G>1?M[G-1]:e,le=G>2?M[2]:e;for(ee=i.length>3&&typeof ee=="function"?(G--,ee):e,le&&Nr(M[0],M[1],le)&&(ee=G<3?e:ee,G=1),p=Lt(p);++j<G;){var de=M[j];de&&i(p,de,j,ee)}return p})}function iw(i,p){return function(M,j){if(M==null)return M;if(!Ur(M))return i(M,j);for(var G=M.length,ee=p?G:-1,le=Lt(M);(p?ee--:++ee<G)&&j(le[ee],ee,le)!==!1;);return M}}function ow(i){return function(p,M,j){for(var G=-1,ee=Lt(p),le=j(p),de=le.length;de--;){var me=le[i?de:++G];if(M(ee[me],me,ee)===!1)break}return p}}function zI(i,p,M){var j=p&d,G=nl(i);function ee(){var le=this&&this!==sn&&this instanceof ee?G:i;return le.apply(j?M:this,arguments)}return ee}function sw(i){return function(p){p=nn(p);var M=oe(p)?_t(p):e,j=M?M[0]:p.charAt(0),G=M?Yo(M,1).join(""):p.slice(1);return j[i]()+G}}function pa(i){return function(p){return k(ib(rb(p).replace(An,"")),i,"")}}function nl(i){return function(){var p=arguments;switch(p.length){case 0:return new i;case 1:return new i(p[0]);case 2:return new i(p[0],p[1]);case 3:return new i(p[0],p[1],p[2]);case 4:return new i(p[0],p[1],p[2],p[3]);case 5:return new i(p[0],p[1],p[2],p[3],p[4]);case 6:return new i(p[0],p[1],p[2],p[3],p[4],p[5]);case 7:return new i(p[0],p[1],p[2],p[3],p[4],p[5],p[6])}var M=ha(i.prototype),j=i.apply(M,p);return Sn(j)?j:M}}function jI(i,p,M){var j=nl(i);function G(){for(var ee=arguments.length,le=xe(ee),de=ee,me=ga(G);de--;)le[de]=arguments[de];var Re=ee<3&&le[0]!==me&&le[ee-1]!==me?[]:We(le,me);if(ee-=Re.length,ee<M)return hw(i,p,_c,G.placeholder,e,le,Re,e,e,M-ee);var Ee=this&&this!==sn&&this instanceof G?j:i;return or(Ee,this,le)}return G}function aw(i){return function(p,M,j){var G=Lt(p);if(!Ur(p)){var ee=gt(M,3);p=cr(p),M=function(de){return ee(G[de],de,G)}}var le=i(p,M,j);return le>-1?G[ee?p[le]:le]:e}}function lw(i){return xo(function(p){var M=p.length,j=M,G=wi.prototype.thru;for(i&&p.reverse();j--;){var ee=p[j];if(typeof ee!="function")throw new an(y);if(G&&!le&&$c(ee)=="wrapper")var le=new wi([],!0)}for(j=le?j:M;++j<M;){ee=p[j];var de=$c(ee),me=de=="wrapper"?Ad(ee):e;me&&Md(me[0])&&me[1]==(R|E|_|L)&&!me[4].length&&me[9]==1?le=le[$c(me[0])].apply(le,me[3]):le=ee.length==1&&Md(ee)?le[de]():le.thru(ee)}return function(){var Re=arguments,Ee=Re[0];if(le&&Re.length==1&&At(Ee))return le.plant(Ee).value();for(var De=0,Ke=M?p[De].apply(this,Re):Ee;++De<M;)Ke=p[De].call(this,Ke);return Ke}})}function _c(i,p,M,j,G,ee,le,de,me,Re){var Ee=p&R,De=p&d,Ke=p&w,nt=p&(E|$),ft=p&F,Ot=Ke?e:nl(i);function mt(){for(var Wt=arguments.length,Vt=xe(Wt),ai=Wt;ai--;)Vt[ai]=arguments[ai];if(nt)var Dr=ga(mt),li=ar(Vt,Dr);if(j&&(Vt=nw(Vt,j,G,nt)),ee&&(Vt=rw(Vt,ee,le,nt)),Wt-=li,nt&&Wt<Re){var Un=We(Vt,Dr);return hw(i,p,_c,mt.placeholder,M,Vt,Un,de,me,Re-Wt)}var Bi=De?M:this,Ao=Ke?Bi[i]:i;return Wt=Vt.length,de?Vt=lR(Vt,de):ft&&Wt>1&&Vt.reverse(),Ee&&me<Wt&&(Vt.length=me),this&&this!==sn&&this instanceof mt&&(Ao=Ot||nl(Ao)),Ao.apply(Bi,Vt)}return mt}function cw(i,p){return function(M,j){return mI(M,i,p(j),{})}}function Ac(i,p){return function(M,j){var G;if(M===e&&j===e)return p;if(M!==e&&(G=M),j!==e){if(G===e)return j;typeof M=="string"||typeof j=="string"?(M=oi(M),j=oi(j)):(M=Gy(M),j=Gy(j)),G=i(M,j)}return G}}function xd(i){return xo(function(p){return p=f(p,at(gt())),Dt(function(M){var j=this;return i(p,function(G){return or(G,j,M)})})})}function Sc(i,p){p=p===e?" ":oi(p);var M=p.length;if(M<2)return M?gd(p,i):p;var j=gd(p,dc(i/Pt(p)));return oe(p)?Yo(_t(j),0,i).join(""):j.slice(0,i)}function HI(i,p,M,j){var G=p&d,ee=nl(i);function le(){for(var de=-1,me=arguments.length,Re=-1,Ee=j.length,De=xe(Ee+me),Ke=this&&this!==sn&&this instanceof le?ee:i;++Re<Ee;)De[Re]=j[Re];for(;me--;)De[Re++]=arguments[++de];return or(Ke,G?M:this,De)}return le}function uw(i){return function(p,M,j){return j&&typeof j!="number"&&Nr(p,M,j)&&(M=j=e),p=_o(p),M===e?(M=p,p=0):M=_o(M),j=j===e?p<M?1:-1:_o(j),$I(p,M,j,i)}}function Tc(i){return function(p,M){return typeof p=="string"&&typeof M=="string"||(p=ki(p),M=ki(M)),i(p,M)}}function hw(i,p,M,j,G,ee,le,de,me,Re){var Ee=p&E,De=Ee?le:e,Ke=Ee?e:le,nt=Ee?ee:e,ft=Ee?e:ee;p|=Ee?_:C,p&=~(Ee?C:_),p&b||(p&=-4);var Ot=[i,p,G,nt,De,ft,Ke,de,me,Re],mt=M.apply(e,Ot);return Md(i)&&kw(mt,Ot),mt.placeholder=j,_w(mt,i,p)}function Cd(i){var p=Kt[i];return function(M,j){if(M=ki(M),j=j==null?0:Sr(Rt(j),292),j&&_y(M)){var G=(nn(M)+"e").split("e"),ee=p(G[0]+"e"+(+G[1]+j));return G=(nn(ee)+"e").split("e"),+(G[0]+"e"+(+G[1]-j))}return p(M)}}var UI=ca&&1/Ve(new ca([,-0]))[1]==B?function(i){return new ca(i)}:Ud;function dw(i){return function(p){var M=Tr(p);return M==tt?Me(p):M==Mn?Xe(p):et(p,i(p))}}function bo(i,p,M,j,G,ee,le,de){var me=p&w;if(!me&&typeof i!="function")throw new an(y);var Re=j?j.length:0;if(Re||(p&=-97,j=G=e),le=le===e?le:rr(Rt(le),0),de=de===e?de:Rt(de),Re-=G?G.length:0,p&C){var Ee=j,De=G;j=G=e}var Ke=me?e:Ad(i),nt=[i,p,M,j,G,Ee,De,ee,le,de];if(Ke&&oR(nt,Ke),i=nt[0],p=nt[1],M=nt[2],j=nt[3],G=nt[4],de=nt[9]=nt[9]===e?me?0:i.length:rr(nt[9]-Re,0),!de&&p&(E|$)&&(p&=-25),!p||p==d)var ft=zI(i,p,M);else p==E||p==$?ft=jI(i,p,de):(p==_||p==(d|_))&&!G.length?ft=HI(i,p,M,j):ft=_c.apply(e,nt);var Ot=Ke?qy:kw;return _w(Ot(ft,nt),i,p)}function pw(i,p,M,j){return i===e||Wi(i,Nn[M])&&!on.call(j,M)?p:i}function gw(i,p,M,j,G,ee){return Sn(i)&&Sn(p)&&(ee.set(p,i),bc(i,p,e,gw,ee),ee.delete(p)),i}function VI(i){return ol(i)?e:i}function fw(i,p,M,j,G,ee){var le=M&o,de=i.length,me=p.length;if(de!=me&&!(le&&me>de))return!1;var Re=ee.get(i),Ee=ee.get(p);if(Re&&Ee)return Re==p&&Ee==i;var De=-1,Ke=!0,nt=M&u?new Ss:e;for(ee.set(i,p),ee.set(p,i);++De<de;){var ft=i[De],Ot=p[De];if(j)var mt=le?j(Ot,ft,De,p,i,ee):j(ft,Ot,De,i,p,ee);if(mt!==e){if(mt)continue;Ke=!1;break}if(nt){if(!W(p,function(Wt,Vt){if(!kt(nt,Vt)&&(ft===Wt||G(ft,Wt,M,j,ee)))return nt.push(Vt)})){Ke=!1;break}}else if(!(ft===Ot||G(ft,Ot,M,j,ee))){Ke=!1;break}}return ee.delete(i),ee.delete(p),Ke}function qI(i,p,M,j,G,ee,le){switch(M){case Ye:if(i.byteLength!=p.byteLength||i.byteOffset!=p.byteOffset)return!1;i=i.buffer,p=p.buffer;case ze:return!(i.byteLength!=p.byteLength||!ee(new lc(i),new lc(p)));case Ae:case $e:case ht:return Wi(+i,+p);case Ge:return i.name==p.name&&i.message==p.message;case dn:case In:return i==p+"";case tt:var de=Me;case Mn:var me=j&o;if(de||(de=Ve),i.size!=p.size&&!me)return!1;var Re=le.get(i);if(Re)return Re==p;j|=u,le.set(i,p);var Ee=fw(de(i),de(p),j,G,ee,le);return le.delete(i),Ee;case Gn:if(Xa)return Xa.call(i)==Xa.call(p)}return!1}function KI(i,p,M,j,G,ee){var le=M&o,de=kd(i),me=de.length,Re=kd(p),Ee=Re.length;if(me!=Ee&&!le)return!1;for(var De=me;De--;){var Ke=de[De];if(!(le?Ke in p:on.call(p,Ke)))return!1}var nt=ee.get(i),ft=ee.get(p);if(nt&&ft)return nt==p&&ft==i;var Ot=!0;ee.set(i,p),ee.set(p,i);for(var mt=le;++De<me;){Ke=de[De];var Wt=i[Ke],Vt=p[Ke];if(j)var ai=le?j(Vt,Wt,Ke,p,i,ee):j(Wt,Vt,Ke,i,p,ee);if(!(ai===e?Wt===Vt||G(Wt,Vt,M,j,ee):ai)){Ot=!1;break}mt||(mt=Ke=="constructor")}if(Ot&&!mt){var Dr=i.constructor,li=p.constructor;Dr!=li&&"constructor"in i&&"constructor"in p&&!(typeof Dr=="function"&&Dr instanceof Dr&&typeof li=="function"&&li instanceof li)&&(Ot=!1)}return ee.delete(i),ee.delete(p),Ot}function xo(i){return Rd(xw(i,e,Iw),i+"")}function kd(i){return Ny(i,cr,Td)}function _d(i){return Ny(i,Vr,mw)}var Ad=gc?function(i){return gc.get(i)}:Ud;function $c(i){for(var p=i.name+"",M=ua[p],j=on.call(ua,p)?M.length:0;j--;){var G=M[j],ee=G.func;if(ee==null||ee==i)return G.name}return p}function ga(i){var p=on.call(J,"placeholder")?J:i;return p.placeholder}function gt(){var i=J.iteratee||jd;return i=i===jd?Py:i,arguments.length?i(arguments[0],arguments[1]):i}function Mc(i,p){var M=i.__data__;return tR(p)?M[typeof p=="string"?"string":"hash"]:M.map}function Sd(i){for(var p=cr(i),M=p.length;M--;){var j=p[M],G=i[j];p[M]=[j,G,ww(G)]}return p}function Ms(i,p){var M=ie(i,p);return Fy(M)?M:e}function GI(i){var p=on.call(i,_s),M=i[_s];try{i[_s]=e;var j=!0}catch{}var G=sc.call(i);return j&&(p?i[_s]=M:delete i[_s]),G}var Td=ed?function(i){return i==null?[]:(i=Lt(i),Ar(ed(i),function(p){return Cy.call(i,p)}))}:Vd,mw=ed?function(i){for(var p=[];i;)T(p,Td(i)),i=cc(i);return p}:Vd,Tr=Or;(td&&Tr(new td(new ArrayBuffer(1)))!=Ye||Ka&&Tr(new Ka)!=tt||nd&&Tr(nd.resolve())!=qt||ca&&Tr(new ca)!=Mn||Ga&&Tr(new Ga)!=He)&&(Tr=function(i){var p=Or(i),M=p==hn?i.constructor:e,j=M?Is(M):"";if(j)switch(j){case IM:return Ye;case RM:return tt;case EM:return qt;case LM:return Mn;case OM:return He}return p});function YI(i,p,M){for(var j=-1,G=M.length;++j<G;){var ee=M[j],le=ee.size;switch(ee.type){case"drop":i+=le;break;case"dropRight":p-=le;break;case"take":p=Sr(p,i+le);break;case"takeRight":i=rr(i,p-le);break}}return{start:i,end:p}}function XI(i){var p=i.match(Oi);return p?p[1].split(fs):[]}function vw(i,p,M){p=Go(p,i);for(var j=-1,G=p.length,ee=!1;++j<G;){var le=no(p[j]);if(!(ee=i!=null&&M(i,le)))break;i=i[le]}return ee||++j!=G?ee:(G=i==null?0:i.length,!!G&&Dc(G)&&Co(le,G)&&(At(i)||Rs(i)))}function QI(i){var p=i.length,M=new i.constructor(p);return p&&typeof i[0]=="string"&&on.call(i,"index")&&(M.index=i.index,M.input=i.input),M}function yw(i){return typeof i.constructor=="function"&&!rl(i)?ha(cc(i)):{}}function ZI(i,p,M){var j=i.constructor;switch(p){case ze:return bd(i);case Ae:case $e:return new j(+i);case Ye:return NI(i,M);case dt:case Ct:case xt:case Et:case It:case ct:case yt:case wn:case br:return ew(i,M);case tt:return new j;case ht:case In:return new j(i);case dn:return DI(i);case Mn:return new j;case Gn:return FI(i)}}function JI(i,p){var M=p.length;if(!M)return i;var j=M-1;return p[j]=(M>1?"& ":"")+p[j],p=p.join(M>2?", ":" "),i.replace(Gi,`{
|
1465
|
+
/* [wrapped with `+p+`] */
|
1466
|
+
`)}function eR(i){return At(i)||Rs(i)||!!(ky&&i&&i[ky])}function Co(i,p){var M=typeof i;return p=p??U,!!p&&(M=="number"||M!="symbol"&&pn.test(i))&&i>-1&&i%1==0&&i<p}function Nr(i,p,M){if(!Sn(M))return!1;var j=typeof p;return(j=="number"?Ur(M)&&Co(p,M.length):j=="string"&&p in M)?Wi(M[p],i):!1}function $d(i,p){if(At(i))return!1;var M=typeof i;return M=="number"||M=="symbol"||M=="boolean"||i==null||si(i)?!0:Ei.test(i)||!ta.test(i)||p!=null&&i in Lt(p)}function tR(i){var p=typeof i;return p=="string"||p=="number"||p=="symbol"||p=="boolean"?i!=="__proto__":i===null}function Md(i){var p=$c(i),M=J[p];if(typeof M!="function"||!(p in Ht.prototype))return!1;if(i===M)return!0;var j=Ad(M);return!!j&&i===j[0]}function nR(i){return!!wy&&wy in i}var rR=ks?ko:qd;function rl(i){var p=i&&i.constructor,M=typeof p=="function"&&p.prototype||Nn;return i===M}function ww(i){return i===i&&!Sn(i)}function bw(i,p){return function(M){return M==null?!1:M[i]===p&&(p!==e||i in Lt(M))}}function iR(i){var p=Oc(i,function(j){return M.size===g&&M.clear(),j}),M=p.cache;return p}function oR(i,p){var M=i[1],j=p[1],G=M|j,ee=G<(d|w|R),le=j==R&&M==E||j==R&&M==L&&i[7].length<=p[8]||j==(R|L)&&p[7].length<=p[8]&&M==E;if(!(ee||le))return i;j&d&&(i[2]=p[2],G|=M&d?0:b);var de=p[3];if(de){var me=i[3];i[3]=me?nw(me,de,p[4]):de,i[4]=me?We(i[3],s):p[4]}return de=p[5],de&&(me=i[5],i[5]=me?rw(me,de,p[6]):de,i[6]=me?We(i[5],s):p[6]),de=p[7],de&&(i[7]=de),j&R&&(i[8]=i[8]==null?p[8]:Sr(i[8],p[8])),i[9]==null&&(i[9]=p[9]),i[0]=p[0],i[1]=G,i}function sR(i){var p=[];if(i!=null)for(var M in Lt(i))p.push(M);return p}function aR(i){return sc.call(i)}function xw(i,p,M){return p=rr(p===e?i.length-1:p,0),function(){for(var j=arguments,G=-1,ee=rr(j.length-p,0),le=xe(ee);++G<ee;)le[G]=j[p+G];G=-1;for(var de=xe(p+1);++G<p;)de[G]=j[G];return de[p]=M(le),or(i,this,de)}}function Cw(i,p){return p.length<2?i:$s(i,xi(p,0,-1))}function lR(i,p){for(var M=i.length,j=Sr(p.length,M),G=Hr(i);j--;){var ee=p[j];i[j]=Co(ee,M)?G[ee]:e}return i}function Id(i,p){if(!(p==="constructor"&&typeof i[p]=="function")&&p!="__proto__")return i[p]}var kw=Aw(qy),il=kM||function(i,p){return sn.setTimeout(i,p)},Rd=Aw(RI);function _w(i,p,M){var j=p+"";return Rd(i,JI(j,cR(XI(j),M)))}function Aw(i){var p=0,M=0;return function(){var j=TM(),G=O-(j-M);if(M=j,G>0){if(++p>=P)return arguments[0]}else p=0;return i.apply(e,arguments)}}function Ic(i,p){var M=-1,j=i.length,G=j-1;for(p=p===e?j:p;++M<p;){var ee=pd(M,G),le=i[ee];i[ee]=i[M],i[M]=le}return i.length=p,i}var Sw=iR(function(i){var p=[];return i.charCodeAt(0)===46&&p.push(""),i.replace(Bn,function(M,j,G,ee){p.push(G?ee.replace(Ua,"$1"):j||M)}),p});function no(i){if(typeof i=="string"||si(i))return i;var p=i+"";return p=="0"&&1/i==-1/0?"-0":p}function Is(i){if(i!=null){try{return oc.call(i)}catch{}try{return i+""}catch{}}return""}function cR(i,p){return gr(ae,function(M){var j="_."+M[0];p&M[1]&&!ri(i,j)&&i.push(j)}),i.sort()}function Tw(i){if(i instanceof Ht)return i.clone();var p=new wi(i.__wrapped__,i.__chain__);return p.__actions__=Hr(i.__actions__),p.__index__=i.__index__,p.__values__=i.__values__,p}function uR(i,p,M){(M?Nr(i,p,M):p===e)?p=1:p=rr(Rt(p),0);var j=i==null?0:i.length;if(!j||p<1)return[];for(var G=0,ee=0,le=xe(dc(j/p));G<j;)le[ee++]=xi(i,G,G+=p);return le}function hR(i){for(var p=-1,M=i==null?0:i.length,j=0,G=[];++p<M;){var ee=i[p];ee&&(G[j++]=ee)}return G}function dR(){var i=arguments.length;if(!i)return[];for(var p=xe(i-1),M=arguments[0],j=i;j--;)p[j-1]=arguments[j];return T(At(M)?Hr(M):[M],mr(p,1))}var pR=Dt(function(i,p){return Hn(i)?Za(i,mr(p,1,Hn,!0)):[]}),gR=Dt(function(i,p){var M=Ci(p);return Hn(M)&&(M=e),Hn(i)?Za(i,mr(p,1,Hn,!0),gt(M,2)):[]}),fR=Dt(function(i,p){var M=Ci(p);return Hn(M)&&(M=e),Hn(i)?Za(i,mr(p,1,Hn,!0),e,M):[]});function mR(i,p,M){var j=i==null?0:i.length;return j?(p=M||p===e?1:Rt(p),xi(i,p<0?0:p,j)):[]}function vR(i,p,M){var j=i==null?0:i.length;return j?(p=M||p===e?1:Rt(p),p=j-p,xi(i,0,p<0?0:p)):[]}function yR(i,p){return i&&i.length?Cc(i,gt(p,3),!0,!0):[]}function wR(i,p){return i&&i.length?Cc(i,gt(p,3),!0):[]}function bR(i,p,M,j){var G=i==null?0:i.length;return G?(M&&typeof M!="number"&&Nr(i,p,M)&&(M=0,j=G),dI(i,p,M,j)):[]}function $w(i,p,M){var j=i==null?0:i.length;if(!j)return-1;var G=M==null?0:Rt(M);return G<0&&(G=rr(j+G,0)),re(i,gt(p,3),G)}function Mw(i,p,M){var j=i==null?0:i.length;if(!j)return-1;var G=j-1;return M!==e&&(G=Rt(M),G=M<0?rr(j+G,0):Sr(G,j-1)),re(i,gt(p,3),G,!0)}function Iw(i){var p=i==null?0:i.length;return p?mr(i,1):[]}function xR(i){var p=i==null?0:i.length;return p?mr(i,B):[]}function CR(i,p){var M=i==null?0:i.length;return M?(p=p===e?1:Rt(p),mr(i,p)):[]}function kR(i){for(var p=-1,M=i==null?0:i.length,j={};++p<M;){var G=i[p];j[G[0]]=G[1]}return j}function Rw(i){return i&&i.length?i[0]:e}function _R(i,p,M){var j=i==null?0:i.length;if(!j)return-1;var G=M==null?0:Rt(M);return G<0&&(G=rr(j+G,0)),se(i,p,G)}function AR(i){var p=i==null?0:i.length;return p?xi(i,0,-1):[]}var SR=Dt(function(i){var p=f(i,yd);return p.length&&p[0]===i[0]?ld(p):[]}),TR=Dt(function(i){var p=Ci(i),M=f(i,yd);return p===Ci(M)?p=e:M.pop(),M.length&&M[0]===i[0]?ld(M,gt(p,2)):[]}),$R=Dt(function(i){var p=Ci(i),M=f(i,yd);return p=typeof p=="function"?p:e,p&&M.pop(),M.length&&M[0]===i[0]?ld(M,e,p):[]});function MR(i,p){return i==null?"":AM.call(i,p)}function Ci(i){var p=i==null?0:i.length;return p?i[p-1]:e}function IR(i,p,M){var j=i==null?0:i.length;if(!j)return-1;var G=j;return M!==e&&(G=Rt(M),G=G<0?rr(j+G,0):Sr(G,j-1)),p===p?bt(i,p,G):re(i,Ce,G,!0)}function RR(i,p){return i&&i.length?jy(i,Rt(p)):e}var ER=Dt(Ew);function Ew(i,p){return i&&i.length&&p&&p.length?dd(i,p):i}function LR(i,p,M){return i&&i.length&&p&&p.length?dd(i,p,gt(M,2)):i}function OR(i,p,M){return i&&i.length&&p&&p.length?dd(i,p,e,M):i}var NR=xo(function(i,p){var M=i==null?0:i.length,j=id(i,p);return Vy(i,f(p,function(G){return Co(G,M)?+G:G}).sort(tw)),j});function DR(i,p){var M=[];if(!(i&&i.length))return M;var j=-1,G=[],ee=i.length;for(p=gt(p,3);++j<ee;){var le=i[j];p(le,j,i)&&(M.push(le),G.push(j))}return Vy(i,G),M}function Ed(i){return i==null?i:MM.call(i)}function FR(i,p,M){var j=i==null?0:i.length;return j?(M&&typeof M!="number"&&Nr(i,p,M)?(p=0,M=j):(p=p==null?0:Rt(p),M=M===e?j:Rt(M)),xi(i,p,M)):[]}function PR(i,p){return xc(i,p)}function WR(i,p,M){return fd(i,p,gt(M,2))}function BR(i,p){var M=i==null?0:i.length;if(M){var j=xc(i,p);if(j<M&&Wi(i[j],p))return j}return-1}function zR(i,p){return xc(i,p,!0)}function jR(i,p,M){return fd(i,p,gt(M,2),!0)}function HR(i,p){var M=i==null?0:i.length;if(M){var j=xc(i,p,!0)-1;if(Wi(i[j],p))return j}return-1}function UR(i){return i&&i.length?Ky(i):[]}function VR(i,p){return i&&i.length?Ky(i,gt(p,2)):[]}function qR(i){var p=i==null?0:i.length;return p?xi(i,1,p):[]}function KR(i,p,M){return i&&i.length?(p=M||p===e?1:Rt(p),xi(i,0,p<0?0:p)):[]}function GR(i,p,M){var j=i==null?0:i.length;return j?(p=M||p===e?1:Rt(p),p=j-p,xi(i,p<0?0:p,j)):[]}function YR(i,p){return i&&i.length?Cc(i,gt(p,3),!1,!0):[]}function XR(i,p){return i&&i.length?Cc(i,gt(p,3)):[]}var QR=Dt(function(i){return Ko(mr(i,1,Hn,!0))}),ZR=Dt(function(i){var p=Ci(i);return Hn(p)&&(p=e),Ko(mr(i,1,Hn,!0),gt(p,2))}),JR=Dt(function(i){var p=Ci(i);return p=typeof p=="function"?p:e,Ko(mr(i,1,Hn,!0),e,p)});function eE(i){return i&&i.length?Ko(i):[]}function tE(i,p){return i&&i.length?Ko(i,gt(p,2)):[]}function nE(i,p){return p=typeof p=="function"?p:e,i&&i.length?Ko(i,e,p):[]}function Ld(i){if(!(i&&i.length))return[];var p=0;return i=Ar(i,function(M){if(Hn(M))return p=rr(M.length,p),!0}),Qe(p,function(M){return f(i,we(M))})}function Lw(i,p){if(!(i&&i.length))return[];var M=Ld(i);return p==null?M:f(M,function(j){return or(p,e,j)})}var rE=Dt(function(i,p){return Hn(i)?Za(i,p):[]}),iE=Dt(function(i){return vd(Ar(i,Hn))}),oE=Dt(function(i){var p=Ci(i);return Hn(p)&&(p=e),vd(Ar(i,Hn),gt(p,2))}),sE=Dt(function(i){var p=Ci(i);return p=typeof p=="function"?p:e,vd(Ar(i,Hn),e,p)}),aE=Dt(Ld);function lE(i,p){return Qy(i||[],p||[],Qa)}function cE(i,p){return Qy(i||[],p||[],tl)}var uE=Dt(function(i){var p=i.length,M=p>1?i[p-1]:e;return M=typeof M=="function"?(i.pop(),M):e,Lw(i,M)});function Ow(i){var p=J(i);return p.__chain__=!0,p}function hE(i,p){return p(i),i}function Rc(i,p){return p(i)}var dE=xo(function(i){var p=i.length,M=p?i[0]:0,j=this.__wrapped__,G=function(ee){return id(ee,i)};return p>1||this.__actions__.length||!(j instanceof Ht)||!Co(M)?this.thru(G):(j=j.slice(M,+M+(p?1:0)),j.__actions__.push({func:Rc,args:[G],thisArg:e}),new wi(j,this.__chain__).thru(function(ee){return p&&!ee.length&&ee.push(e),ee}))});function pE(){return Ow(this)}function gE(){return new wi(this.value(),this.__chain__)}function fE(){this.__values__===e&&(this.__values__=Gw(this.value()));var i=this.__index__>=this.__values__.length,p=i?e:this.__values__[this.__index__++];return{done:i,value:p}}function mE(){return this}function vE(i){for(var p,M=this;M instanceof mc;){var j=Tw(M);j.__index__=0,j.__values__=e,p?G.__wrapped__=j:p=j;var G=j;M=M.__wrapped__}return G.__wrapped__=i,p}function yE(){var i=this.__wrapped__;if(i instanceof Ht){var p=i;return this.__actions__.length&&(p=new Ht(this)),p=p.reverse(),p.__actions__.push({func:Rc,args:[Ed],thisArg:e}),new wi(p,this.__chain__)}return this.thru(Ed)}function wE(){return Xy(this.__wrapped__,this.__actions__)}var bE=kc(function(i,p,M){on.call(i,M)?++i[M]:wo(i,M,1)});function xE(i,p,M){var j=At(i)?fr:hI;return M&&Nr(i,p,M)&&(p=e),j(i,gt(p,3))}function CE(i,p){var M=At(i)?Ar:Ly;return M(i,gt(p,3))}var kE=aw($w),_E=aw(Mw);function AE(i,p){return mr(Ec(i,p),1)}function SE(i,p){return mr(Ec(i,p),B)}function TE(i,p,M){return M=M===e?1:Rt(M),mr(Ec(i,p),M)}function Nw(i,p){var M=At(i)?gr:qo;return M(i,gt(p,3))}function Dw(i,p){var M=At(i)?Cs:Ey;return M(i,gt(p,3))}var $E=kc(function(i,p,M){on.call(i,M)?i[M].push(p):wo(i,M,[p])});function ME(i,p,M,j){i=Ur(i)?i:ma(i),M=M&&!j?Rt(M):0;var G=i.length;return M<0&&(M=rr(G+M,0)),Fc(i)?M<=G&&i.indexOf(p,M)>-1:!!G&&se(i,p,M)>-1}var IE=Dt(function(i,p,M){var j=-1,G=typeof p=="function",ee=Ur(i)?xe(i.length):[];return qo(i,function(le){ee[++j]=G?or(p,le,M):Ja(le,p,M)}),ee}),RE=kc(function(i,p,M){wo(i,M,p)});function Ec(i,p){var M=At(i)?f:Wy;return M(i,gt(p,3))}function EE(i,p,M,j){return i==null?[]:(At(p)||(p=p==null?[]:[p]),M=j?e:M,At(M)||(M=M==null?[]:[M]),Hy(i,p,M))}var LE=kc(function(i,p,M){i[M?0:1].push(p)},function(){return[[],[]]});function OE(i,p,M){var j=At(i)?k:Le,G=arguments.length<3;return j(i,gt(p,4),M,G,qo)}function NE(i,p,M){var j=At(i)?D:Le,G=arguments.length<3;return j(i,gt(p,4),M,G,Ey)}function DE(i,p){var M=At(i)?Ar:Ly;return M(i,Nc(gt(p,3)))}function FE(i){var p=At(i)?$y:MI;return p(i)}function PE(i,p,M){(M?Nr(i,p,M):p===e)?p=1:p=Rt(p);var j=At(i)?sI:II;return j(i,p)}function WE(i){var p=At(i)?aI:EI;return p(i)}function BE(i){if(i==null)return 0;if(Ur(i))return Fc(i)?Pt(i):i.length;var p=Tr(i);return p==tt||p==Mn?i.size:ud(i).length}function zE(i,p,M){var j=At(i)?W:LI;return M&&Nr(i,p,M)&&(p=e),j(i,gt(p,3))}var jE=Dt(function(i,p){if(i==null)return[];var M=p.length;return M>1&&Nr(i,p[0],p[1])?p=[]:M>2&&Nr(p[0],p[1],p[2])&&(p=[p[0]]),Hy(i,mr(p,1),[])}),Lc=CM||function(){return sn.Date.now()};function HE(i,p){if(typeof p!="function")throw new an(y);return i=Rt(i),function(){if(--i<1)return p.apply(this,arguments)}}function Fw(i,p,M){return p=M?e:p,p=i&&p==null?i.length:p,bo(i,R,e,e,e,e,p)}function Pw(i,p){var M;if(typeof p!="function")throw new an(y);return i=Rt(i),function(){return--i>0&&(M=p.apply(this,arguments)),i<=1&&(p=e),M}}var Od=Dt(function(i,p,M){var j=d;if(M.length){var G=We(M,ga(Od));j|=_}return bo(i,j,p,M,G)}),Ww=Dt(function(i,p,M){var j=d|w;if(M.length){var G=We(M,ga(Ww));j|=_}return bo(p,j,i,M,G)});function Bw(i,p,M){p=M?e:p;var j=bo(i,E,e,e,e,e,e,p);return j.placeholder=Bw.placeholder,j}function zw(i,p,M){p=M?e:p;var j=bo(i,$,e,e,e,e,e,p);return j.placeholder=zw.placeholder,j}function jw(i,p,M){var j,G,ee,le,de,me,Re=0,Ee=!1,De=!1,Ke=!0;if(typeof i!="function")throw new an(y);p=ki(p)||0,Sn(M)&&(Ee=!!M.leading,De="maxWait"in M,ee=De?rr(ki(M.maxWait)||0,p):ee,Ke="trailing"in M?!!M.trailing:Ke);function nt(Un){var Bi=j,Ao=G;return j=G=e,Re=Un,le=i.apply(Ao,Bi),le}function ft(Un){return Re=Un,de=il(Wt,p),Ee?nt(Un):le}function Ot(Un){var Bi=Un-me,Ao=Un-Re,ab=p-Bi;return De?Sr(ab,ee-Ao):ab}function mt(Un){var Bi=Un-me,Ao=Un-Re;return me===e||Bi>=p||Bi<0||De&&Ao>=ee}function Wt(){var Un=Lc();if(mt(Un))return Vt(Un);de=il(Wt,Ot(Un))}function Vt(Un){return de=e,Ke&&j?nt(Un):(j=G=e,le)}function ai(){de!==e&&Zy(de),Re=0,j=me=G=de=e}function Dr(){return de===e?le:Vt(Lc())}function li(){var Un=Lc(),Bi=mt(Un);if(j=arguments,G=this,me=Un,Bi){if(de===e)return ft(me);if(De)return Zy(de),de=il(Wt,p),nt(me)}return de===e&&(de=il(Wt,p)),le}return li.cancel=ai,li.flush=Dr,li}var UE=Dt(function(i,p){return Ry(i,1,p)}),VE=Dt(function(i,p,M){return Ry(i,ki(p)||0,M)});function qE(i){return bo(i,F)}function Oc(i,p){if(typeof i!="function"||p!=null&&typeof p!="function")throw new an(y);var M=function(){var j=arguments,G=p?p.apply(this,j):j[0],ee=M.cache;if(ee.has(G))return ee.get(G);var le=i.apply(this,j);return M.cache=ee.set(G,le)||ee,le};return M.cache=new(Oc.Cache||yo),M}Oc.Cache=yo;function Nc(i){if(typeof i!="function")throw new an(y);return function(){var p=arguments;switch(p.length){case 0:return!i.call(this);case 1:return!i.call(this,p[0]);case 2:return!i.call(this,p[0],p[1]);case 3:return!i.call(this,p[0],p[1],p[2])}return!i.apply(this,p)}}function KE(i){return Pw(2,i)}var GE=OI(function(i,p){p=p.length==1&&At(p[0])?f(p[0],at(gt())):f(mr(p,1),at(gt()));var M=p.length;return Dt(function(j){for(var G=-1,ee=Sr(j.length,M);++G<ee;)j[G]=p[G].call(this,j[G]);return or(i,this,j)})}),Nd=Dt(function(i,p){var M=We(p,ga(Nd));return bo(i,_,e,p,M)}),Hw=Dt(function(i,p){var M=We(p,ga(Hw));return bo(i,C,e,p,M)}),YE=xo(function(i,p){return bo(i,L,e,e,e,p)});function XE(i,p){if(typeof i!="function")throw new an(y);return p=p===e?p:Rt(p),Dt(i,p)}function QE(i,p){if(typeof i!="function")throw new an(y);return p=p==null?0:rr(Rt(p),0),Dt(function(M){var j=M[p],G=Yo(M,0,p);return j&&T(G,j),or(i,this,G)})}function ZE(i,p,M){var j=!0,G=!0;if(typeof i!="function")throw new an(y);return Sn(M)&&(j="leading"in M?!!M.leading:j,G="trailing"in M?!!M.trailing:G),jw(i,p,{leading:j,maxWait:p,trailing:G})}function JE(i){return Fw(i,1)}function eL(i,p){return Nd(wd(p),i)}function tL(){if(!arguments.length)return[];var i=arguments[0];return At(i)?i:[i]}function nL(i){return bi(i,a)}function rL(i,p){return p=typeof p=="function"?p:e,bi(i,a,p)}function iL(i){return bi(i,l|a)}function oL(i,p){return p=typeof p=="function"?p:e,bi(i,l|a,p)}function sL(i,p){return p==null||Iy(i,p,cr(p))}function Wi(i,p){return i===p||i!==i&&p!==p}var aL=Tc(ad),lL=Tc(function(i,p){return i>=p}),Rs=Dy(function(){return arguments}())?Dy:function(i){return Dn(i)&&on.call(i,"callee")&&!Cy.call(i,"callee")},At=xe.isArray,cL=jr?at(jr):vI;function Ur(i){return i!=null&&Dc(i.length)&&!ko(i)}function Hn(i){return Dn(i)&&Ur(i)}function uL(i){return i===!0||i===!1||Dn(i)&&Or(i)==Ae}var Xo=_M||qd,hL=Uo?at(Uo):yI;function dL(i){return Dn(i)&&i.nodeType===1&&!ol(i)}function pL(i){if(i==null)return!0;if(Ur(i)&&(At(i)||typeof i=="string"||typeof i.splice=="function"||Xo(i)||fa(i)||Rs(i)))return!i.length;var p=Tr(i);if(p==tt||p==Mn)return!i.size;if(rl(i))return!ud(i).length;for(var M in i)if(on.call(i,M))return!1;return!0}function gL(i,p){return el(i,p)}function fL(i,p,M){M=typeof M=="function"?M:e;var j=M?M(i,p):e;return j===e?el(i,p,e,M):!!j}function Dd(i){if(!Dn(i))return!1;var p=Or(i);return p==Ge||p==Ie||typeof i.message=="string"&&typeof i.name=="string"&&!ol(i)}function mL(i){return typeof i=="number"&&_y(i)}function ko(i){if(!Sn(i))return!1;var p=Or(i);return p==qe||p==ut||p==ye||p==dr}function Uw(i){return typeof i=="number"&&i==Rt(i)}function Dc(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=U}function Sn(i){var p=typeof i;return i!=null&&(p=="object"||p=="function")}function Dn(i){return i!=null&&typeof i=="object"}var Vw=On?at(On):bI;function vL(i,p){return i===p||cd(i,p,Sd(p))}function yL(i,p,M){return M=typeof M=="function"?M:e,cd(i,p,Sd(p),M)}function wL(i){return qw(i)&&i!=+i}function bL(i){if(rR(i))throw new lt(m);return Fy(i)}function xL(i){return i===null}function CL(i){return i==null}function qw(i){return typeof i=="number"||Dn(i)&&Or(i)==ht}function ol(i){if(!Dn(i)||Or(i)!=hn)return!1;var p=cc(i);if(p===null)return!0;var M=on.call(p,"constructor")&&p.constructor;return typeof M=="function"&&M instanceof M&&oc.call(M)==yM}var Fd=ti?at(ti):xI;function kL(i){return Uw(i)&&i>=-9007199254740991&&i<=U}var Kw=ni?at(ni):CI;function Fc(i){return typeof i=="string"||!At(i)&&Dn(i)&&Or(i)==In}function si(i){return typeof i=="symbol"||Dn(i)&&Or(i)==Gn}var fa=vi?at(vi):kI;function _L(i){return i===e}function AL(i){return Dn(i)&&Tr(i)==He}function SL(i){return Dn(i)&&Or(i)==ke}var TL=Tc(hd),$L=Tc(function(i,p){return i<=p});function Gw(i){if(!i)return[];if(Ur(i))return Fc(i)?_t(i):Hr(i);if(qa&&i[qa])return be(i[qa]());var p=Tr(i),M=p==tt?Me:p==Mn?Ve:ma;return M(i)}function _o(i){if(!i)return i===0?i:0;if(i=ki(i),i===B||i===-1/0){var p=i<0?-1:1;return p*K}return i===i?i:0}function Rt(i){var p=_o(i),M=p%1;return p===p?M?p-M:p:0}function Yw(i){return i?Ts(Rt(i),0,te):0}function ki(i){if(typeof i=="number")return i;if(si(i))return Z;if(Sn(i)){var p=typeof i.valueOf=="function"?i.valueOf():i;i=Sn(p)?p+"":p}if(typeof i!="string")return i===0?i:+i;i=fn(i);var M=ra.test(i);return M||zn.test(i)?gn(i.slice(2),M?2:8):zt.test(i)?Z:+i}function Xw(i){return to(i,Vr(i))}function ML(i){return i?Ts(Rt(i),-9007199254740991,U):i===0?i:0}function nn(i){return i==null?"":oi(i)}var IL=da(function(i,p){if(rl(p)||Ur(p)){to(p,cr(p),i);return}for(var M in p)on.call(p,M)&&Qa(i,M,p[M])}),Qw=da(function(i,p){to(p,Vr(p),i)}),Pc=da(function(i,p,M,j){to(p,Vr(p),i,j)}),RL=da(function(i,p,M,j){to(p,cr(p),i,j)}),EL=xo(id);function LL(i,p){var M=ha(i);return p==null?M:My(M,p)}var OL=Dt(function(i,p){i=Lt(i);var M=-1,j=p.length,G=j>2?p[2]:e;for(G&&Nr(p[0],p[1],G)&&(j=1);++M<j;)for(var ee=p[M],le=Vr(ee),de=-1,me=le.length;++de<me;){var Re=le[de],Ee=i[Re];(Ee===e||Wi(Ee,Nn[Re])&&!on.call(i,Re))&&(i[Re]=ee[Re])}return i}),NL=Dt(function(i){return i.push(e,gw),or(Zw,e,i)});function DL(i,p){return Q(i,gt(p,3),eo)}function FL(i,p){return Q(i,gt(p,3),sd)}function PL(i,p){return i==null?i:od(i,gt(p,3),Vr)}function WL(i,p){return i==null?i:Oy(i,gt(p,3),Vr)}function BL(i,p){return i&&eo(i,gt(p,3))}function zL(i,p){return i&&sd(i,gt(p,3))}function jL(i){return i==null?[]:wc(i,cr(i))}function HL(i){return i==null?[]:wc(i,Vr(i))}function Pd(i,p,M){var j=i==null?e:$s(i,p);return j===e?M:j}function UL(i,p){return i!=null&&vw(i,p,pI)}function Wd(i,p){return i!=null&&vw(i,p,gI)}var VL=cw(function(i,p,M){p!=null&&typeof p.toString!="function"&&(p=sc.call(p)),i[p]=M},zd(qr)),qL=cw(function(i,p,M){p!=null&&typeof p.toString!="function"&&(p=sc.call(p)),on.call(i,p)?i[p].push(M):i[p]=[M]},gt),KL=Dt(Ja);function cr(i){return Ur(i)?Ty(i):ud(i)}function Vr(i){return Ur(i)?Ty(i,!0):_I(i)}function GL(i,p){var M={};return p=gt(p,3),eo(i,function(j,G,ee){wo(M,p(j,G,ee),j)}),M}function YL(i,p){var M={};return p=gt(p,3),eo(i,function(j,G,ee){wo(M,G,p(j,G,ee))}),M}var XL=da(function(i,p,M){bc(i,p,M)}),Zw=da(function(i,p,M,j){bc(i,p,M,j)}),QL=xo(function(i,p){var M={};if(i==null)return M;var j=!1;p=f(p,function(ee){return ee=Go(ee,i),j||(j=ee.length>1),ee}),to(i,_d(i),M),j&&(M=bi(M,l|c|a,VI));for(var G=p.length;G--;)md(M,p[G]);return M});function ZL(i,p){return Jw(i,Nc(gt(p)))}var JL=xo(function(i,p){return i==null?{}:SI(i,p)});function Jw(i,p){if(i==null)return{};var M=f(_d(i),function(j){return[j]});return p=gt(p),Uy(i,M,function(j,G){return p(j,G[0])})}function eO(i,p,M){p=Go(p,i);var j=-1,G=p.length;for(G||(G=1,i=e);++j<G;){var ee=i==null?e:i[no(p[j])];ee===e&&(j=G,ee=M),i=ko(ee)?ee.call(i):ee}return i}function tO(i,p,M){return i==null?i:tl(i,p,M)}function nO(i,p,M,j){return j=typeof j=="function"?j:e,i==null?i:tl(i,p,M,j)}var eb=dw(cr),tb=dw(Vr);function rO(i,p,M){var j=At(i),G=j||Xo(i)||fa(i);if(p=gt(p,4),M==null){var ee=i&&i.constructor;G?M=j?new ee:[]:Sn(i)?M=ko(ee)?ha(cc(i)):{}:M={}}return(G?gr:eo)(i,function(le,de,me){return p(M,le,de,me)}),M}function iO(i,p){return i==null?!0:md(i,p)}function oO(i,p,M){return i==null?i:Yy(i,p,wd(M))}function sO(i,p,M,j){return j=typeof j=="function"?j:e,i==null?i:Yy(i,p,wd(M),j)}function ma(i){return i==null?[]:bn(i,cr(i))}function aO(i){return i==null?[]:bn(i,Vr(i))}function lO(i,p,M){return M===e&&(M=p,p=e),M!==e&&(M=ki(M),M=M===M?M:0),p!==e&&(p=ki(p),p=p===p?p:0),Ts(ki(i),p,M)}function cO(i,p,M){return p=_o(p),M===e?(M=p,p=0):M=_o(M),i=ki(i),fI(i,p,M)}function uO(i,p,M){if(M&&typeof M!="boolean"&&Nr(i,p,M)&&(p=M=e),M===e&&(typeof p=="boolean"?(M=p,p=e):typeof i=="boolean"&&(M=i,i=e)),i===e&&p===e?(i=0,p=1):(i=_o(i),p===e?(p=i,i=0):p=_o(p)),i>p){var j=i;i=p,p=j}if(M||i%1||p%1){var G=Ay();return Sr(i+G*(p-i+Be("1e-"+((G+"").length-1))),p)}return pd(i,p)}var hO=pa(function(i,p,M){return p=p.toLowerCase(),i+(M?nb(p):p)});function nb(i){return Bd(nn(i).toLowerCase())}function rb(i){return i=nn(i),i&&i.replace(Rn,xn).replace(go,"")}function dO(i,p,M){i=nn(i),p=oi(p);var j=i.length;M=M===e?j:Ts(Rt(M),0,j);var G=M;return M-=p.length,M>=0&&i.slice(M,G)==p}function pO(i){return i=nn(i),i&&za.test(i)?i.replace(so,V):i}function gO(i){return i=nn(i),i&&Li.test(i)?i.replace(xr,"\\$&"):i}var fO=pa(function(i,p,M){return i+(M?"-":"")+p.toLowerCase()}),mO=pa(function(i,p,M){return i+(M?" ":"")+p.toLowerCase()}),vO=sw("toLowerCase");function yO(i,p,M){i=nn(i),p=Rt(p);var j=p?Pt(i):0;if(!p||j>=p)return i;var G=(p-j)/2;return Sc(pc(G),M)+i+Sc(dc(G),M)}function wO(i,p,M){i=nn(i),p=Rt(p);var j=p?Pt(i):0;return p&&j<p?i+Sc(p-j,M):i}function bO(i,p,M){i=nn(i),p=Rt(p);var j=p?Pt(i):0;return p&&j<p?Sc(p-j,M)+i:i}function xO(i,p,M){return M||p==null?p=0:p&&(p=+p),$M(nn(i).replace(_n,""),p||0)}function CO(i,p,M){return(M?Nr(i,p,M):p===e)?p=1:p=Rt(p),gd(nn(i),p)}function kO(){var i=arguments,p=nn(i[0]);return i.length<3?p:p.replace(i[1],i[2])}var _O=pa(function(i,p,M){return i+(M?"_":"")+p.toLowerCase()});function AO(i,p,M){return M&&typeof M!="number"&&Nr(i,p,M)&&(p=M=e),M=M===e?te:M>>>0,M?(i=nn(i),i&&(typeof p=="string"||p!=null&&!Fd(p))&&(p=oi(p),!p&&oe(i))?Yo(_t(i),0,M):i.split(p,M)):[]}var SO=pa(function(i,p,M){return i+(M?" ":"")+Bd(p)});function TO(i,p,M){return i=nn(i),M=M==null?0:Ts(Rt(M),0,i.length),p=oi(p),i.slice(M,M+p.length)==p}function $O(i,p,M){var j=J.templateSettings;M&&Nr(i,p,M)&&(p=e),i=nn(i),p=Pc({},p,j,pw);var G=Pc({},p.imports,j.imports,pw),ee=cr(G),le=bn(G,ee),de,me,Re=0,Ee=p.interpolate||hi,De="__p += '",Ke=Lr((p.escape||hi).source+"|"+Ee.source+"|"+(Ee===gs?Ni:hi).source+"|"+(p.evaluate||hi).source+"|$","g"),nt="//# sourceURL="+(on.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ji+"]")+`
|
1467
|
+
`;i.replace(Ke,function(mt,Wt,Vt,ai,Dr,li){return Vt||(Vt=ai),De+=i.slice(Re,li).replace(_r,X),Wt&&(de=!0,De+=`' +
|
1468
|
+
__e(`+Wt+`) +
|
1469
|
+
'`),Dr&&(me=!0,De+=`';
|
1470
|
+
`+Dr+`;
|
1471
|
+
__p += '`),Vt&&(De+=`' +
|
1472
|
+
((__t = (`+Vt+`)) == null ? '' : __t) +
|
1473
|
+
'`),Re=li+mt.length,mt}),De+=`';
|
1474
|
+
`;var ft=on.call(p,"variable")&&p.variable;if(!ft)De=`with (obj) {
|
1475
|
+
`+De+`
|
1476
|
+
}
|
1477
|
+
`;else if(Ha.test(ft))throw new lt(x);De=(me?De.replace(Wr,""):De).replace(Ri,"$1").replace(oo,"$1;"),De="function("+(ft||"obj")+`) {
|
1478
|
+
`+(ft?"":`obj || (obj = {});
|
1479
|
+
`)+"var __t, __p = ''"+(de?", __e = _.escape":"")+(me?`, __j = Array.prototype.join;
|
1480
|
+
function print() { __p += __j.call(arguments, '') }
|
1481
|
+
`:`;
|
1482
|
+
`)+De+`return __p
|
1483
|
+
}`;var Ot=ob(function(){return Mt(ee,nt+"return "+De).apply(e,le)});if(Ot.source=De,Dd(Ot))throw Ot;return Ot}function MO(i){return nn(i).toLowerCase()}function IO(i){return nn(i).toUpperCase()}function RO(i,p,M){if(i=nn(i),i&&(M||p===e))return fn(i);if(!i||!(p=oi(p)))return i;var j=_t(i),G=_t(p),ee=$t(j,G),le=Xn(j,G)+1;return Yo(j,ee,le).join("")}function EO(i,p,M){if(i=nn(i),i&&(M||p===e))return i.slice(0,Nt(i)+1);if(!i||!(p=oi(p)))return i;var j=_t(i),G=Xn(j,_t(p))+1;return Yo(j,0,G).join("")}function LO(i,p,M){if(i=nn(i),i&&(M||p===e))return i.replace(_n,"");if(!i||!(p=oi(p)))return i;var j=_t(i),G=$t(j,_t(p));return Yo(j,G).join("")}function OO(i,p){var M=I,j=H;if(Sn(p)){var G="separator"in p?p.separator:G;M="length"in p?Rt(p.length):M,j="omission"in p?oi(p.omission):j}i=nn(i);var ee=i.length;if(oe(i)){var le=_t(i);ee=le.length}if(M>=ee)return i;var de=M-Pt(j);if(de<1)return j;var me=le?Yo(le,0,de).join(""):i.slice(0,de);if(G===e)return me+j;if(le&&(de+=me.length-de),Fd(G)){if(i.slice(de).search(G)){var Re,Ee=me;for(G.global||(G=Lr(G.source,nn(Jr.exec(G))+"g")),G.lastIndex=0;Re=G.exec(Ee);)var De=Re.index;me=me.slice(0,De===e?de:De)}}else if(i.indexOf(oi(G),de)!=de){var Ke=me.lastIndexOf(G);Ke>-1&&(me=me.slice(0,Ke))}return me+j}function NO(i){return i=nn(i),i&&Lo.test(i)?i.replace(pr,pt):i}var DO=pa(function(i,p,M){return i+(M?" ":"")+p.toUpperCase()}),Bd=sw("toUpperCase");function ib(i,p,M){return i=nn(i),p=M?e:p,p===e?ge(i)?Cn(i):Y(i):i.match(p)||[]}var ob=Dt(function(i,p){try{return or(i,e,p)}catch(M){return Dd(M)?M:new lt(M)}}),FO=xo(function(i,p){return gr(p,function(M){M=no(M),wo(i,M,Od(i[M],i))}),i});function PO(i){var p=i==null?0:i.length,M=gt();return i=p?f(i,function(j){if(typeof j[1]!="function")throw new an(y);return[M(j[0]),j[1]]}):[],Dt(function(j){for(var G=-1;++G<p;){var ee=i[G];if(or(ee[0],this,j))return or(ee[1],this,j)}})}function WO(i){return uI(bi(i,l))}function zd(i){return function(){return i}}function BO(i,p){return i==null||i!==i?p:i}var zO=lw(),jO=lw(!0);function qr(i){return i}function jd(i){return Py(typeof i=="function"?i:bi(i,l))}function HO(i){return By(bi(i,l))}function UO(i,p){return zy(i,bi(p,l))}var VO=Dt(function(i,p){return function(M){return Ja(M,i,p)}}),qO=Dt(function(i,p){return function(M){return Ja(i,M,p)}});function Hd(i,p,M){var j=cr(p),G=wc(p,j);M==null&&!(Sn(p)&&(G.length||!j.length))&&(M=p,p=i,i=this,G=wc(p,cr(p)));var ee=!(Sn(M)&&"chain"in M)||!!M.chain,le=ko(i);return gr(G,function(de){var me=p[de];i[de]=me,le&&(i.prototype[de]=function(){var Re=this.__chain__;if(ee||Re){var Ee=i(this.__wrapped__),De=Ee.__actions__=Hr(this.__actions__);return De.push({func:me,args:arguments,thisArg:i}),Ee.__chain__=Re,Ee}return me.apply(i,T([this.value()],arguments))})}),i}function KO(){return sn._===this&&(sn._=wM),this}function Ud(){}function GO(i){return i=Rt(i),Dt(function(p){return jy(p,i)})}var YO=xd(f),XO=xd(fr),QO=xd(W);function sb(i){return $d(i)?we(no(i)):TI(i)}function ZO(i){return function(p){return i==null?e:$s(i,p)}}var JO=uw(),e2=uw(!0);function Vd(){return[]}function qd(){return!1}function t2(){return{}}function n2(){return""}function r2(){return!0}function i2(i,p){if(i=Rt(i),i<1||i>U)return[];var M=te,j=Sr(i,te);p=gt(p),i-=te;for(var G=Qe(j,p);++M<i;)p(M);return G}function o2(i){return At(i)?f(i,no):si(i)?[i]:Hr(Sw(nn(i)))}function s2(i){var p=++vM;return nn(i)+p}var a2=Ac(function(i,p){return i+p},0),l2=Cd("ceil"),c2=Ac(function(i,p){return i/p},1),u2=Cd("floor");function h2(i){return i&&i.length?yc(i,qr,ad):e}function d2(i,p){return i&&i.length?yc(i,gt(p,2),ad):e}function p2(i){return fe(i,qr)}function g2(i,p){return fe(i,gt(p,2))}function f2(i){return i&&i.length?yc(i,qr,hd):e}function m2(i,p){return i&&i.length?yc(i,gt(p,2),hd):e}var v2=Ac(function(i,p){return i*p},1),y2=Cd("round"),w2=Ac(function(i,p){return i-p},0);function b2(i){return i&&i.length?st(i,qr):0}function x2(i,p){return i&&i.length?st(i,gt(p,2)):0}return J.after=HE,J.ary=Fw,J.assign=IL,J.assignIn=Qw,J.assignInWith=Pc,J.assignWith=RL,J.at=EL,J.before=Pw,J.bind=Od,J.bindAll=FO,J.bindKey=Ww,J.castArray=tL,J.chain=Ow,J.chunk=uR,J.compact=hR,J.concat=dR,J.cond=PO,J.conforms=WO,J.constant=zd,J.countBy=bE,J.create=LL,J.curry=Bw,J.curryRight=zw,J.debounce=jw,J.defaults=OL,J.defaultsDeep=NL,J.defer=UE,J.delay=VE,J.difference=pR,J.differenceBy=gR,J.differenceWith=fR,J.drop=mR,J.dropRight=vR,J.dropRightWhile=yR,J.dropWhile=wR,J.fill=bR,J.filter=CE,J.flatMap=AE,J.flatMapDeep=SE,J.flatMapDepth=TE,J.flatten=Iw,J.flattenDeep=xR,J.flattenDepth=CR,J.flip=qE,J.flow=zO,J.flowRight=jO,J.fromPairs=kR,J.functions=jL,J.functionsIn=HL,J.groupBy=$E,J.initial=AR,J.intersection=SR,J.intersectionBy=TR,J.intersectionWith=$R,J.invert=VL,J.invertBy=qL,J.invokeMap=IE,J.iteratee=jd,J.keyBy=RE,J.keys=cr,J.keysIn=Vr,J.map=Ec,J.mapKeys=GL,J.mapValues=YL,J.matches=HO,J.matchesProperty=UO,J.memoize=Oc,J.merge=XL,J.mergeWith=Zw,J.method=VO,J.methodOf=qO,J.mixin=Hd,J.negate=Nc,J.nthArg=GO,J.omit=QL,J.omitBy=ZL,J.once=KE,J.orderBy=EE,J.over=YO,J.overArgs=GE,J.overEvery=XO,J.overSome=QO,J.partial=Nd,J.partialRight=Hw,J.partition=LE,J.pick=JL,J.pickBy=Jw,J.property=sb,J.propertyOf=ZO,J.pull=ER,J.pullAll=Ew,J.pullAllBy=LR,J.pullAllWith=OR,J.pullAt=NR,J.range=JO,J.rangeRight=e2,J.rearg=YE,J.reject=DE,J.remove=DR,J.rest=XE,J.reverse=Ed,J.sampleSize=PE,J.set=tO,J.setWith=nO,J.shuffle=WE,J.slice=FR,J.sortBy=jE,J.sortedUniq=UR,J.sortedUniqBy=VR,J.split=AO,J.spread=QE,J.tail=qR,J.take=KR,J.takeRight=GR,J.takeRightWhile=YR,J.takeWhile=XR,J.tap=hE,J.throttle=ZE,J.thru=Rc,J.toArray=Gw,J.toPairs=eb,J.toPairsIn=tb,J.toPath=o2,J.toPlainObject=Xw,J.transform=rO,J.unary=JE,J.union=QR,J.unionBy=ZR,J.unionWith=JR,J.uniq=eE,J.uniqBy=tE,J.uniqWith=nE,J.unset=iO,J.unzip=Ld,J.unzipWith=Lw,J.update=oO,J.updateWith=sO,J.values=ma,J.valuesIn=aO,J.without=rE,J.words=ib,J.wrap=eL,J.xor=iE,J.xorBy=oE,J.xorWith=sE,J.zip=aE,J.zipObject=lE,J.zipObjectDeep=cE,J.zipWith=uE,J.entries=eb,J.entriesIn=tb,J.extend=Qw,J.extendWith=Pc,Hd(J,J),J.add=a2,J.attempt=ob,J.camelCase=hO,J.capitalize=nb,J.ceil=l2,J.clamp=lO,J.clone=nL,J.cloneDeep=iL,J.cloneDeepWith=oL,J.cloneWith=rL,J.conformsTo=sL,J.deburr=rb,J.defaultTo=BO,J.divide=c2,J.endsWith=dO,J.eq=Wi,J.escape=pO,J.escapeRegExp=gO,J.every=xE,J.find=kE,J.findIndex=$w,J.findKey=DL,J.findLast=_E,J.findLastIndex=Mw,J.findLastKey=FL,J.floor=u2,J.forEach=Nw,J.forEachRight=Dw,J.forIn=PL,J.forInRight=WL,J.forOwn=BL,J.forOwnRight=zL,J.get=Pd,J.gt=aL,J.gte=lL,J.has=UL,J.hasIn=Wd,J.head=Rw,J.identity=qr,J.includes=ME,J.indexOf=_R,J.inRange=cO,J.invoke=KL,J.isArguments=Rs,J.isArray=At,J.isArrayBuffer=cL,J.isArrayLike=Ur,J.isArrayLikeObject=Hn,J.isBoolean=uL,J.isBuffer=Xo,J.isDate=hL,J.isElement=dL,J.isEmpty=pL,J.isEqual=gL,J.isEqualWith=fL,J.isError=Dd,J.isFinite=mL,J.isFunction=ko,J.isInteger=Uw,J.isLength=Dc,J.isMap=Vw,J.isMatch=vL,J.isMatchWith=yL,J.isNaN=wL,J.isNative=bL,J.isNil=CL,J.isNull=xL,J.isNumber=qw,J.isObject=Sn,J.isObjectLike=Dn,J.isPlainObject=ol,J.isRegExp=Fd,J.isSafeInteger=kL,J.isSet=Kw,J.isString=Fc,J.isSymbol=si,J.isTypedArray=fa,J.isUndefined=_L,J.isWeakMap=AL,J.isWeakSet=SL,J.join=MR,J.kebabCase=fO,J.last=Ci,J.lastIndexOf=IR,J.lowerCase=mO,J.lowerFirst=vO,J.lt=TL,J.lte=$L,J.max=h2,J.maxBy=d2,J.mean=p2,J.meanBy=g2,J.min=f2,J.minBy=m2,J.stubArray=Vd,J.stubFalse=qd,J.stubObject=t2,J.stubString=n2,J.stubTrue=r2,J.multiply=v2,J.nth=RR,J.noConflict=KO,J.noop=Ud,J.now=Lc,J.pad=yO,J.padEnd=wO,J.padStart=bO,J.parseInt=xO,J.random=uO,J.reduce=OE,J.reduceRight=NE,J.repeat=CO,J.replace=kO,J.result=eO,J.round=y2,J.runInContext=pe,J.sample=FE,J.size=BE,J.snakeCase=_O,J.some=zE,J.sortedIndex=PR,J.sortedIndexBy=WR,J.sortedIndexOf=BR,J.sortedLastIndex=zR,J.sortedLastIndexBy=jR,J.sortedLastIndexOf=HR,J.startCase=SO,J.startsWith=TO,J.subtract=w2,J.sum=b2,J.sumBy=x2,J.template=$O,J.times=i2,J.toFinite=_o,J.toInteger=Rt,J.toLength=Yw,J.toLower=MO,J.toNumber=ki,J.toSafeInteger=ML,J.toString=nn,J.toUpper=IO,J.trim=RO,J.trimEnd=EO,J.trimStart=LO,J.truncate=OO,J.unescape=NO,J.uniqueId=s2,J.upperCase=DO,J.upperFirst=Bd,J.each=Nw,J.eachRight=Dw,J.first=Rw,Hd(J,function(){var i={};return eo(J,function(p,M){on.call(J.prototype,M)||(i[M]=p)}),i}(),{chain:!1}),J.VERSION=r,gr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){J[i].placeholder=J}),gr(["drop","take"],function(i,p){Ht.prototype[i]=function(M){M=M===e?1:rr(Rt(M),0);var j=this.__filtered__&&!p?new Ht(this):this.clone();return j.__filtered__?j.__takeCount__=Sr(M,j.__takeCount__):j.__views__.push({size:Sr(M,te),type:i+(j.__dir__<0?"Right":"")}),j},Ht.prototype[i+"Right"]=function(M){return this.reverse()[i](M).reverse()}}),gr(["filter","map","takeWhile"],function(i,p){var M=p+1,j=M==S||M==N;Ht.prototype[i]=function(G){var ee=this.clone();return ee.__iteratees__.push({iteratee:gt(G,3),type:M}),ee.__filtered__=ee.__filtered__||j,ee}}),gr(["head","last"],function(i,p){var M="take"+(p?"Right":"");Ht.prototype[i]=function(){return this[M](1).value()[0]}}),gr(["initial","tail"],function(i,p){var M="drop"+(p?"":"Right");Ht.prototype[i]=function(){return this.__filtered__?new Ht(this):this[M](1)}}),Ht.prototype.compact=function(){return this.filter(qr)},Ht.prototype.find=function(i){return this.filter(i).head()},Ht.prototype.findLast=function(i){return this.reverse().find(i)},Ht.prototype.invokeMap=Dt(function(i,p){return typeof i=="function"?new Ht(this):this.map(function(M){return Ja(M,i,p)})}),Ht.prototype.reject=function(i){return this.filter(Nc(gt(i)))},Ht.prototype.slice=function(i,p){i=Rt(i);var M=this;return M.__filtered__&&(i>0||p<0)?new Ht(M):(i<0?M=M.takeRight(-i):i&&(M=M.drop(i)),p!==e&&(p=Rt(p),M=p<0?M.dropRight(-p):M.take(p-i)),M)},Ht.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Ht.prototype.toArray=function(){return this.take(te)},eo(Ht.prototype,function(i,p){var M=/^(?:filter|find|map|reject)|While$/.test(p),j=/^(?:head|last)$/.test(p),G=J[j?"take"+(p=="last"?"Right":""):p],ee=j||/^find/.test(p);G&&(J.prototype[p]=function(){var le=this.__wrapped__,de=j?[1]:arguments,me=le instanceof Ht,Re=de[0],Ee=me||At(le),De=function(Wt){var Vt=G.apply(J,T([Wt],de));return j&&Ke?Vt[0]:Vt};Ee&&M&&typeof Re=="function"&&Re.length!=1&&(me=Ee=!1);var Ke=this.__chain__,nt=!!this.__actions__.length,ft=ee&&!Ke,Ot=me&&!nt;if(!ee&&Ee){le=Ot?le:new Ht(this);var mt=i.apply(le,de);return mt.__actions__.push({func:Rc,args:[De],thisArg:e}),new wi(mt,Ke)}return ft&&Ot?i.apply(this,de):(mt=this.thru(De),ft?j?mt.value()[0]:mt.value():mt)})}),gr(["pop","push","shift","sort","splice","unshift"],function(i){var p=lr[i],M=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",j=/^(?:pop|shift)$/.test(i);J.prototype[i]=function(){var G=arguments;if(j&&!this.__chain__){var ee=this.value();return p.apply(At(ee)?ee:[],G)}return this[M](function(le){return p.apply(At(le)?le:[],G)})}}),eo(Ht.prototype,function(i,p){var M=J[p];if(M){var j=M.name+"";on.call(ua,j)||(ua[j]=[]),ua[j].push({name:p,func:M})}}),ua[_c(e,w).name]=[{name:"wrapper",func:e}],Ht.prototype.clone=NM,Ht.prototype.reverse=DM,Ht.prototype.value=FM,J.prototype.at=dE,J.prototype.chain=pE,J.prototype.commit=gE,J.prototype.next=fE,J.prototype.plant=vE,J.prototype.reverse=yE,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=wE,J.prototype.first=J.prototype.head,qa&&(J.prototype[qa]=mE),J},Ut=Qn();Yn?((Yn.exports=Ut)._=Ut,vn._=Ut):sn._=Ut}).call(MC)}(Sl,Sl.exports)),Sl.exports}var RC=IC();$r("a",ll(RC)).debounce(function(){this.rebuildDisplayText()},300);var Yg={exports:{}},Xg;function EC(){return Xg||(Xg=1,function(n,t){(function(){ace.require(["ace/mode/text"],function(e){n&&(n.exports=e)})})()}(Yg)),Yg.exports}EC();const LC=!0,Zn="u-",OC="uplot",NC=Zn+"hz",DC=Zn+"vt",FC=Zn+"title",PC=Zn+"wrap",WC=Zn+"under",BC=Zn+"over",zC=Zn+"axis",os=Zn+"off",jC=Zn+"select",HC=Zn+"cursor-x",UC=Zn+"cursor-y",VC=Zn+"cursor-pt",qC=Zn+"legend",KC=Zn+"live",GC=Zn+"inline",YC=Zn+"series",XC=Zn+"marker",Qg=Zn+"label",QC=Zn+"value",Ta="width",$a="height",Ma="top",Zg="bottom",js="left",mu="right",vu="#000",Jg=vu+"0",yu="mousemove",ef="mousedown",wu="mouseup",tf="mouseenter",nf="mouseleave",rf="dblclick",ZC="resize",JC="scroll",of="change",Tl="dppxchange",bu="--",Hs=typeof window<"u",xu=Hs?document:null,Us=Hs?window:null,ek=Hs?navigator:null;let Xt,$l;function Cu(){let n=devicePixelRatio;Xt!=n&&(Xt=n,$l&&Au(of,$l,Cu),$l=matchMedia(`(min-resolution: ${Xt-.001}dppx) and (max-resolution: ${Xt+.001}dppx)`),ss(of,$l,Cu),Us.dispatchEvent(new CustomEvent(Tl)))}function Gr(n,t){if(t!=null){let e=n.classList;!e.contains(t)&&e.add(t)}}function ku(n,t){let e=n.classList;e.contains(t)&&e.remove(t)}function mn(n,t,e){n.style[t]=e+"px"}function Ti(n,t,e,r){let v=xu.createElement(n);return t!=null&&Gr(v,t),e!=null&&e.insertBefore(v,r),v}function ci(n,t){return Ti("div",n,t)}const sf=new WeakMap;function Ui(n,t,e,r,v){let m="translate("+t+"px,"+e+"px)",y=sf.get(n);m!=y&&(n.style.transform=m,sf.set(n,m),t<0||e<0||t>r||e>v?Gr(n,os):ku(n,os))}const af=new WeakMap;function lf(n,t,e){let r=t+e,v=af.get(n);r!=v&&(af.set(n,r),n.style.background=t,n.style.borderColor=e)}const cf=new WeakMap;function uf(n,t,e,r){let v=t+""+e,m=cf.get(n);v!=m&&(cf.set(n,v),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 _u={passive:!0},tk={..._u,capture:!0};function ss(n,t,e,r){t.addEventListener(n,e,r?tk:_u)}function Au(n,t,e,r){t.removeEventListener(n,e,_u)}Hs&&Cu();function $i(n,t,e,r){let v;e=e||0,r=r||t.length-1;let m=r<=2147483647;for(;r-e>1;)v=m?e+r>>1:Xr((e+r)/2),t[v]<n?e=v:r=v;return n-t[e]<=t[r]-n?e:r}function hf(n){return(t,e,r)=>{let v=-1,m=-1;for(let y=e;y<=r;y++)if(n(t[y])){v=y;break}for(let y=r;y>=e;y--)if(n(t[y])){m=y;break}return[v,m]}}const df=n=>n!=null,pf=n=>n!=null&&n>0,Ml=hf(df),nk=hf(pf);function rk(n,t,e,r=0,v=!1){let m=v?nk:Ml,y=v?pf:df;[t,e]=m(n,t,e);let x=n[t],h=n[t];if(t>-1)if(r==1)x=n[t],h=n[e];else if(r==-1)x=n[e],h=n[t];else for(let g=t;g<=e;g++){let s=n[g];y(s)&&(s<x?x=s:s>h&&(h=s))}return[x??hr,h??-1/0]}function Il(n,t,e,r){let v=mf(n),m=mf(t);n==t&&(v==-1?(n*=e,t/=e):(n/=e,t*=e));let y=e==10?ro:vf,x=v==1?Xr:ui,h=m==1?ui:Xr,g=x(y(Jn(n))),s=h(y(Jn(t))),l=Vs(e,g),c=Vs(e,s);return e==10&&(g<0&&(l=cn(l,-g)),s<0&&(c=cn(c,-s))),r||e==2?(n=l*v,t=c*m):(n=_f(n,l),t=Ll(t,c)),[n,t]}function Su(n,t,e,r){let v=Il(n,t,e,r);return n==0&&(v[0]=0),t==0&&(v[1]=0),v}const Tu=.1,gf={mode:3,pad:Tu},Ia={pad:0,soft:null,mode:0},ik={min:Ia,max:Ia};function Rl(n,t,e,r){return Ol(e)?ff(n,t,e):(Ia.pad=e,Ia.soft=r?0:null,Ia.mode=r?3:0,ff(n,t,ik))}function Gt(n,t){return n??t}function ok(n,t,e){for(t=Gt(t,0),e=Gt(e,n.length-1);t<=e;){if(n[t]!=null)return!0;t++}return!1}function ff(n,t,e){let r=e.min,v=e.max,m=Gt(r.pad,0),y=Gt(v.pad,0),x=Gt(r.hard,-1/0),h=Gt(v.hard,hr),g=Gt(r.soft,hr),s=Gt(v.soft,-1/0),l=Gt(r.mode,0),c=Gt(v.mode,0),a=t-n,o=ro(a),u=Mr(Jn(n),Jn(t)),d=ro(u),w=Jn(d-o);(a<1e-24||w>10)&&(a=0,(n==0||t==0)&&(a=1e-24,l==2&&g!=hr&&(m=0),c==2&&s!=-1/0&&(y=0)));let b=a||u||1e3,E=ro(b),$=Vs(10,Xr(E)),_=b*(a==0?n==0?.1:1:m),C=cn(_f(n-_,$/10),24),R=n>=g&&(l==1||l==3&&C<=g||l==2&&C>=g)?g:hr,L=Mr(x,C<R&&n>=R?R:Mi(R,C)),F=b*(a==0?t==0?.1:1:y),I=cn(Ll(t+F,$/10),24),H=t<=s&&(c==1||c==3&&I>=s||c==2&&I<=s)?s:-1/0,P=Mi(h,I>H&&t<=H?H:Mr(H,I));return L==P&&L==0&&(P=100),[L,P]}const sk=new Intl.NumberFormat(Hs?ek.language:"en-US"),$u=n=>sk.format(n),Yr=Math,El=Yr.PI,Jn=Yr.abs,Xr=Yr.floor,er=Yr.round,ui=Yr.ceil,Mi=Yr.min,Mr=Yr.max,Vs=Yr.pow,mf=Yr.sign,ro=Yr.log10,vf=Yr.log2,ak=(n,t=1)=>Yr.sinh(n)*t,Mu=(n,t=1)=>Yr.asinh(n/t),hr=1/0;function yf(n){return(ro((n^n>>31)-(n>>31))|0)+1}function Iu(n,t,e){return Mi(Mr(n,t),e)}function wf(n){return typeof n=="function"}function Bt(n){return wf(n)?n:()=>n}const lk=()=>{},bf=n=>n,xf=(n,t)=>t,ck=n=>null,Cf=n=>!0,kf=(n,t)=>n==t,uk=/\.\d*?(?=9{6,}|0{6,})/gm,as=n=>{if(Sf(n)||Ro.has(n))return n;const t=`${n}`,e=t.match(uk);if(e==null)return n;let r=e[0].length-1;if(t.indexOf("e-")!=-1){let[v,m]=t.split("e");return+`${as(v)}e${m}`}return cn(n,r)};function ls(n,t){return as(cn(as(n/t))*t)}function Ll(n,t){return as(ui(as(n/t))*t)}function _f(n,t){return as(Xr(as(n/t))*t)}function cn(n,t=0){if(Sf(n))return n;let e=10**t,r=n*e*(1+Number.EPSILON);return er(r)/e}const Ro=new Map;function Af(n){return((""+n).split(".")[1]||"").length}function Ra(n,t,e,r){let v=[],m=r.map(Af);for(let y=t;y<e;y++){let x=Jn(y),h=cn(Vs(n,y),x);for(let g=0;g<r.length;g++){let s=n==10?+`${r[g]}e${y}`:r[g]*h,l=(y>=0?0:x)+(y>=m[g]?0:m[g]),c=n==10?s:cn(s,l);v.push(c),Ro.set(c,l)}}return v}const Ea={},Ru=[],qs=[null,null],Eo=Array.isArray,Sf=Number.isInteger,hk=n=>n===void 0;function Tf(n){return typeof n=="string"}function Ol(n){let t=!1;if(n!=null){let e=n.constructor;t=e==null||e==Object}return t}function dk(n){return n!=null&&typeof n=="object"}const pk=Object.getPrototypeOf(Uint8Array),$f="__proto__";function Ks(n,t=Ol){let e;if(Eo(n)){let r=n.find(v=>v!=null);if(Eo(r)||t(r)){e=Array(n.length);for(let v=0;v<n.length;v++)e[v]=Ks(n[v],t)}else e=n.slice()}else if(n instanceof pk)e=n.slice();else if(t(n)){e={};for(let r in n)r!=$f&&(e[r]=Ks(n[r],t))}else e=n;return e}function qn(n){let t=arguments;for(let e=1;e<t.length;e++){let r=t[e];for(let v in r)v!=$f&&(Ol(n[v])?qn(n[v],Ks(r[v])):n[v]=Ks(r[v]))}return n}const gk=0,fk=1,mk=2;function vk(n,t,e){for(let r=0,v,m=-1;r<t.length;r++){let y=t[r];if(y>m){for(v=y-1;v>=0&&n[v]==null;)n[v--]=null;for(v=y+1;v<e&&n[v]==null;)n[m=v++]=null}}}function yk(n,t){if(xk(n)){let y=n[0].slice();for(let x=1;x<n.length;x++)y.push(...n[x].slice(1));return Ck(y[0])||(y=bk(y)),y}let e=new Set;for(let y=0;y<n.length;y++){let x=n[y][0],h=x.length;for(let g=0;g<h;g++)e.add(x[g])}let r=[Array.from(e).sort((y,x)=>y-x)],v=r[0].length,m=new Map;for(let y=0;y<v;y++)m.set(r[0][y],y);for(let y=0;y<n.length;y++){let x=n[y],h=x[0];for(let g=1;g<x.length;g++){let s=x[g],l=Array(v).fill(void 0),c=t?t[y][g]:fk,a=[];for(let o=0;o<s.length;o++){let u=s[o],d=m.get(h[o]);u===null?c!=gk&&(l[d]=u,c==mk&&a.push(d)):l[d]=u}vk(l,a,v),r.push(l)}}return r}const wk=typeof queueMicrotask>"u"?n=>Promise.resolve().then(n):queueMicrotask;function bk(n){let t=n[0],e=t.length,r=Array(e);for(let m=0;m<r.length;m++)r[m]=m;r.sort((m,y)=>t[m]-t[y]);let v=[];for(let m=0;m<n.length;m++){let y=n[m],x=Array(e);for(let h=0;h<e;h++)x[h]=y[r[h]];v.push(x)}return v}function xk(n){let t=n[0][0],e=t.length;for(let r=1;r<n.length;r++){let v=n[r][0];if(v.length!=e)return!1;if(v!=t){for(let m=0;m<e;m++)if(v[m]!=t[m])return!1}}return!0}function Ck(n,t=100){const e=n.length;if(e<=1)return!0;let r=0,v=e-1;for(;r<=v&&n[r]==null;)r++;for(;v>=r&&n[v]==null;)v--;if(v<=r)return!0;const m=Mr(1,Xr((v-r+1)/t));for(let y=n[r],x=r+m;x<=v;x+=m){const h=n[x];if(h!=null){if(h<=y)return!1;y=h}}return!0}const Mf=["January","February","March","April","May","June","July","August","September","October","November","December"],If=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Rf(n){return n.slice(0,3)}const kk=If.map(Rf),_k=Mf.map(Rf),Ak={MMMM:Mf,MMM:_k,WWWW:If,WWW:kk};function La(n){return(n<10?"0":"")+n}function Sk(n){return(n<10?"00":n<100?"0":"")+n}const Tk={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=>La(n.getMonth()+1),M:n=>n.getMonth()+1,DD:n=>La(n.getDate()),D:n=>n.getDate(),WWWW:(n,t)=>t.WWWW[n.getDay()],WWW:(n,t)=>t.WWW[n.getDay()],HH:n=>La(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=>La(n.getMinutes()),m:n=>n.getMinutes(),ss:n=>La(n.getSeconds()),s:n=>n.getSeconds(),fff:n=>Sk(n.getMilliseconds())};function Eu(n,t){t=t||Ak;let e=[],r=/\{([a-z]+)\}|[^{]+/gi,v;for(;v=r.exec(n);)e.push(v[0][0]=="{"?Tk[v[1]]:v[0]);return m=>{let y="";for(let x=0;x<e.length;x++)y+=typeof e[x]=="string"?e[x]:e[x](m,t);return y}}const $k=new Intl.DateTimeFormat().resolvedOptions().timeZone;function Mk(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 Ef=n=>n%1==0,Nl=[1,2,2.5,5],Ik=Ra(10,-32,0,Nl),Lf=Ra(10,0,32,Nl),Rk=Lf.filter(Ef),cs=Ik.concat(Lf),Lu=`
|
1484
|
+
`,Of="{YYYY}",Nf=Lu+Of,Df="{M}/{D}",Oa=Lu+Df,Dl=Oa+"/{YY}",Ff="{aa}",Ek="{h}:{mm}",Gs=Ek+Ff,Pf=Lu+Gs,Wf=":{ss}",tn=null;function Bf(n){let t=n*1e3,e=t*60,r=e*60,v=r*24,m=v*30,y=v*365,x=(n==1?Ra(10,0,3,Nl).filter(Ef):Ra(10,-3,0,Nl)).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,v,v*2,v*3,v*4,v*5,v*6,v*7,v*8,v*9,v*10,v*15,m,m*2,m*3,m*4,m*6,y,y*2,y*5,y*10,y*25,y*50,y*100]);const h=[[y,Of,tn,tn,tn,tn,tn,tn,1],[v*28,"{MMM}",Nf,tn,tn,tn,tn,tn,1],[v,Df,Nf,tn,tn,tn,tn,tn,1],[r,"{h}"+Ff,Dl,tn,Oa,tn,tn,tn,1],[e,Gs,Dl,tn,Oa,tn,tn,tn,1],[t,Wf,Dl+" "+Gs,tn,Oa+" "+Gs,tn,Pf,tn,1],[n,Wf+".{fff}",Dl+" "+Gs,tn,Oa+" "+Gs,tn,Pf,tn,1]];function g(s){return(l,c,a,o,u,d)=>{let w=[],b=u>=y,E=u>=m&&u<y,$=s(a),_=cn($*n,3),C=Ou($.getFullYear(),b?0:$.getMonth(),E||b?1:$.getDate()),R=cn(C*n,3);if(E||b){let L=E?u/m:0,F=b?u/y:0,I=_==R?_:cn(Ou(C.getFullYear()+F,C.getMonth()+L,1)*n,3),H=new Date(er(I/n)),P=H.getFullYear(),O=H.getMonth();for(let S=0;I<=o;S++){let A=Ou(P+F*S,O+L*S,1),N=A-s(cn(A*n,3));I=cn((+A+N)*n,3),I<=o&&w.push(I)}}else{let L=u>=v?v:u,F=Xr(a)-Xr(_),I=R+F+Ll(_-R,L);w.push(I);let H=s(I),P=H.getHours()+H.getMinutes()/e+H.getSeconds()/r,O=u/r,S=l.axes[c]._space,A=d/S;for(;I=cn(I+u,n==1?0:3),!(I>o);)if(O>1){let N=Xr(cn(P+O,6))%24,B=s(I).getHours()-N;B>1&&(B=-1),I-=B*r,P=(P+O)%24;let U=w[w.length-1];cn((I-U)/u,3)*A>=.7&&w.push(I)}else w.push(I)}return w}}return[x,h,g]}const[Lk,Ok,Nk]=Bf(1),[Dk,Fk,Pk]=Bf(.001);Ra(2,-53,53,[1]);function zf(n,t){return n.map(e=>e.map((r,v)=>v==0||v==8||r==null?r:t(v==1||e[8]==0?r:e[1]+r)))}function jf(n,t){return(e,r,v,m,y)=>{let x=t.find(o=>y>=o[0])||t[t.length-1],h,g,s,l,c,a;return r.map(o=>{let u=n(o),d=u.getFullYear(),w=u.getMonth(),b=u.getDate(),E=u.getHours(),$=u.getMinutes(),_=u.getSeconds(),C=d!=h&&x[2]||w!=g&&x[3]||b!=s&&x[4]||E!=l&&x[5]||$!=c&&x[6]||_!=a&&x[7]||x[1];return h=d,g=w,s=b,l=E,c=$,a=_,C(u)})}}function Wk(n,t){let e=Eu(t);return(r,v,m,y,x)=>v.map(h=>e(n(h)))}function Ou(n,t,e){return new Date(n,t,e)}function Hf(n,t){return t(n)}const Bk="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function Uf(n,t){return(e,r,v,m)=>m==null?bu:t(n(r))}function zk(n,t){let e=n.series[t];return e.width?e.stroke(n,t):e.points.width?e.points.stroke(n,t):null}function jk(n,t){return n.series[t].fill(n,t)}const Hk={show:!0,live:!0,isolate:!1,mount:lk,markers:{show:!0,width:2,stroke:zk,fill:jk,dash:"solid"},idx:null,idxs:null,values:[]};function Uk(n,t){let e=n.cursor.points,r=ci(),v=e.size(n,t);mn(r,Ta,v),mn(r,$a,v);let m=v/-2;mn(r,"marginLeft",m),mn(r,"marginTop",m);let y=e.width(n,t,v);return y&&mn(r,"borderWidth",y),r}function Vk(n,t){let e=n.series[t].points;return e._fill||e._stroke}function qk(n,t){let e=n.series[t].points;return e._stroke||e._fill}function Kk(n,t){return n.series[t].points.size}const Nu=[0,0];function Gk(n,t,e){return Nu[0]=t,Nu[1]=e,Nu}function Fl(n,t,e,r=!0){return v=>{v.button==0&&(!r||v.target==t)&&e(v)}}function Du(n,t,e,r=!0){return v=>{(!r||v.target==t)&&e(v)}}const Yk={show:!0,x:!0,y:!0,lock:!1,move:Gk,points:{one:!1,show:Uk,size:Kk,width:0,stroke:qk,fill:Vk},bind:{mousedown:Fl,mouseup:Fl,click:Fl,dblclick:Fl,mousemove:Du,mouseleave:Du,mouseenter:Du},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,v)=>r-v,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},Vf={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Fu=qn({},Vf,{filter:xf}),qf=qn({},Fu,{size:10}),Kf=qn({},Vf,{show:!1}),Pu='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"',Gf="bold "+Pu,Yf=1.5,Xf={show:!0,scale:"x",stroke:vu,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Gf,side:2,grid:Fu,ticks:qf,border:Kf,font:Pu,lineGap:Yf,rotate:0},Xk="Value",Qk="Time",Qf={show:!0,scale:"x",auto:!1,sorted:1,min:hr,max:-1/0,idxs:[]};function Zk(n,t,e,r,v){return t.map(m=>m==null?"":$u(m))}function Jk(n,t,e,r,v,m,y){let x=[],h=Ro.get(v)||0;e=y?e:cn(Ll(e,v),h);for(let g=e;g<=r;g=cn(g+v,h))x.push(Object.is(g,-0)?0:g);return x}function Wu(n,t,e,r,v,m,y){const x=[],h=n.scales[n.axes[t].scale].log,g=h==10?ro:vf,s=Xr(g(e));v=Vs(h,s),h==10&&(v=cs[$i(v,cs)]);let l=e,c=v*h;h==10&&(c=cs[$i(c,cs)]);do x.push(l),l=l+v,h==10&&!Ro.has(l)&&(l=cn(l,Ro.get(v))),l>=c&&(v=l,c=v*h,h==10&&(c=cs[$i(c,cs)]));while(l<=r);return x}function e_(n,t,e,r,v,m,y){let x=n.scales[n.axes[t].scale].asinh,h=r>x?Wu(n,t,Mr(x,e),r,v):[x],g=r>=0&&e<=0?[0]:[];return(e<-x?Wu(n,t,Mr(x,-r),-e,v):[x]).reverse().map(s=>-s).concat(g,h)}const Zf=/./,t_=/[12357]/,n_=/[125]/,Jf=/1/,Bu=(n,t,e,r)=>n.map((v,m)=>t==4&&v==0||m%r==0&&e.test(v.toExponential()[v<0?1:0])?v:null);function r_(n,t,e,r,v){let m=n.axes[e],y=m.scale,x=n.scales[y],h=n.valToPos,g=m._space,s=h(10,y),l=h(9,y)-s>=g?Zf:h(7,y)-s>=g?t_:h(5,y)-s>=g?n_:Jf;if(l==Jf){let c=Jn(h(1,y)-s);if(c<g)return Bu(t.slice().reverse(),x.distr,l,ui(g/c)).reverse()}return Bu(t,x.distr,l,1)}function i_(n,t,e,r,v){let m=n.axes[e],y=m.scale,x=m._space,h=n.valToPos,g=Jn(h(1,y)-h(2,y));return g<x?Bu(t.slice().reverse(),3,Zf,ui(x/g)).reverse():t}function o_(n,t,e,r){return r==null?bu:t==null?"":$u(t)}const em={show:!0,scale:"y",stroke:vu,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Gf,side:3,grid:Fu,ticks:qf,border:Kf,font:Pu,lineGap:Yf,rotate:0};function s_(n,t){let e=3+(n||1)*2;return cn(e*t,3)}function a_(n,t){let{scale:e,idxs:r}=n.series[0],v=n._data[0],m=n.valToPos(v[r[0]],e,!0),y=n.valToPos(v[r[1]],e,!0),x=Jn(y-m),h=n.series[t],g=x/(h.points.space*Xt);return r[1]-r[0]<=g}const tm={scale:null,auto:!0,sorted:0,min:hr,max:-1/0},nm=(n,t,e,r,v)=>v,rm={show:!0,auto:!0,sorted:0,gaps:nm,alpha:1,facets:[qn({},tm,{scale:"x"}),qn({},tm,{scale:"y"})]},im={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:nm,alpha:1,points:{show:a_,filter:null},values:null,min:hr,max:-1/0,idxs:[],path:null,clip:null};function l_(n,t,e,r,v){return e/10}const om={time:LC,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},c_=qn({},om,{time:!1,ori:1}),sm={};function am(n,t){let e=sm[n];return e||(e={key:n,plots:[],sub(r){e.plots.push(r)},unsub(r){e.plots=e.plots.filter(v=>v!=r)},pub(r,v,m,y,x,h,g){for(let s=0;s<e.plots.length;s++)e.plots[s]!=v&&e.plots[s].pub(r,v,m,y,x,h,g)}},n!=null&&(sm[n]=e)),e}const Ys=1,zu=2;function us(n,t,e){const r=n.mode,v=n.series[t],m=r==2?n._data[t]:n._data,y=n.scales,x=n.bbox;let h=m[0],g=r==2?m[1]:m[t],s=r==2?y[v.facets[0].scale]:y[n.series[0].scale],l=r==2?y[v.facets[1].scale]:y[v.scale],c=x.left,a=x.top,o=x.width,u=x.height,d=n.valToPosH,w=n.valToPosV;return s.ori==0?e(v,h,g,s,l,d,w,c,a,o,u,Wl,Xs,zl,um,dm):e(v,h,g,s,l,w,d,a,c,u,o,Bl,Qs,Uu,hm,pm)}function ju(n,t){let e=0,r=0,v=Gt(n.bands,Ru);for(let m=0;m<v.length;m++){let y=v[m];y.series[0]==t?e=y.dir:y.series[1]==t&&(y.dir==1?r|=1:r|=2)}return[e,r==1?-1:r==2?1:r==3?2:0]}function u_(n,t,e,r,v){let m=n.mode,y=n.series[t],x=m==2?y.facets[1].scale:y.scale,h=n.scales[x];return v==-1?h.min:v==1?h.max:h.distr==3?h.dir==1?h.min:h.max:0}function io(n,t,e,r,v,m){return us(n,t,(y,x,h,g,s,l,c,a,o,u,d)=>{let w=y.pxRound;const b=g.dir*(g.ori==0?1:-1),E=g.ori==0?Xs:Qs;let $,_;b==1?($=e,_=r):($=r,_=e);let C=w(l(x[$],g,u,a)),R=w(c(h[$],s,d,o)),L=w(l(x[_],g,u,a)),F=w(c(m==1?s.max:s.min,s,d,o)),I=new Path2D(v);return E(I,L,F),E(I,C,F),E(I,C,R),I})}function Pl(n,t,e,r,v,m){let y=null;if(n.length>0){y=new Path2D;const x=t==0?zl:Uu;let h=e;for(let l=0;l<n.length;l++){let c=n[l];if(c[1]>c[0]){let a=c[0]-h;a>0&&x(y,h,r,a,r+m),h=c[1]}}let g=e+v-h,s=10;g>0&&x(y,h,r-s/2,g,r+m+s)}return y}function h_(n,t,e){let r=n[n.length-1];r&&r[0]==t?r[1]=e:n.push([t,e])}function Hu(n,t,e,r,v,m,y){let x=[],h=n.length;for(let g=v==1?e:r;g>=e&&g<=r;g+=v)if(t[g]===null){let s=g,l=g;if(v==1)for(;++g<=r&&t[g]===null;)l=g;else for(;--g>=e&&t[g]===null;)l=g;let c=m(n[s]),a=l==s?c:m(n[l]),o=s-v;c=y<=0&&o>=0&&o<h?m(n[o]):c;let u=l+v;a=y>=0&&u>=0&&u<h?m(n[u]):a,a>=c&&x.push([c,a])}return x}function lm(n){return n==0?bf:n==1?er:t=>ls(t,n)}function cm(n){let t=n==0?Wl:Bl,e=n==0?(v,m,y,x,h,g)=>{v.arcTo(m,y,x,h,g)}:(v,m,y,x,h,g)=>{v.arcTo(y,m,h,x,g)},r=n==0?(v,m,y,x,h)=>{v.rect(m,y,x,h)}:(v,m,y,x,h)=>{v.rect(y,m,h,x)};return(v,m,y,x,h,g=0,s=0)=>{g==0&&s==0?r(v,m,y,x,h):(g=Mi(g,x/2,h/2),s=Mi(s,x/2,h/2),t(v,m+g,y),e(v,m+x,y,m+x,y+h,g),e(v,m+x,y+h,m,y+h,s),e(v,m,y+h,m,y,s),e(v,m,y,m+x,y,g),v.closePath())}}const Wl=(n,t,e)=>{n.moveTo(t,e)},Bl=(n,t,e)=>{n.moveTo(e,t)},Xs=(n,t,e)=>{n.lineTo(t,e)},Qs=(n,t,e)=>{n.lineTo(e,t)},zl=cm(0),Uu=cm(1),um=(n,t,e,r,v,m)=>{n.arc(t,e,r,v,m)},hm=(n,t,e,r,v,m)=>{n.arc(e,t,r,v,m)},dm=(n,t,e,r,v,m,y)=>{n.bezierCurveTo(t,e,r,v,m,y)},pm=(n,t,e,r,v,m,y)=>{n.bezierCurveTo(e,t,v,r,y,m)};function gm(n){return(t,e,r,v,m)=>us(t,e,(y,x,h,g,s,l,c,a,o,u,d)=>{let{pxRound:w,points:b}=y,E,$;g.ori==0?(E=Wl,$=um):(E=Bl,$=hm);const _=cn(b.width*Xt,3);let C=(b.size-b.width)/2*Xt,R=cn(C*2,3),L=new Path2D,F=new Path2D,{left:I,top:H,width:P,height:O}=t.bbox;zl(F,I-R,H-R,P+R*2,O+R*2);const S=A=>{if(h[A]!=null){let N=w(l(x[A],g,u,a)),B=w(c(h[A],s,d,o));E(L,N+C,B),$(L,N,B,C,0,El*2)}};if(m)m.forEach(S);else for(let A=r;A<=v;A++)S(A);return{stroke:_>0?L:null,fill:L,clip:F,flags:Ys|zu}})}function fm(n){return(t,e,r,v,m,y)=>{r!=v&&(m!=r&&y!=r&&n(t,e,r),m!=v&&y!=v&&n(t,e,v),n(t,e,y))}}const d_=fm(Xs),p_=fm(Qs);function mm(n){const t=Gt(n==null?void 0:n.alignGaps,0);return(e,r,v,m)=>us(e,r,(y,x,h,g,s,l,c,a,o,u,d)=>{[v,m]=Ml(h,v,m);let w=y.pxRound,b=P=>w(l(P,g,u,a)),E=P=>w(c(P,s,d,o)),$,_;g.ori==0?($=Xs,_=d_):($=Qs,_=p_);const C=g.dir*(g.ori==0?1:-1),R={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Ys},L=R.stroke;let F=!1;if(m-v>=u*4){let P=he=>e.posToVal(he,g.key,!0),O=null,S=null,A,N,B,U=b(x[C==1?v:m]),K=b(x[v]),Z=b(x[m]),te=P(C==1?K+1:Z-1);for(let he=C==1?v:m;he>=v&&he<=m;he+=C){let ne=x[he],ae=(C==1?ne<te:ne>te)?U:b(ne),ce=h[he];ae==U?ce!=null?(N=ce,O==null?($(L,ae,E(N)),A=O=S=N):N<O?O=N:N>S&&(S=N)):ce===null&&(F=!0):(O!=null&&_(L,U,E(O),E(S),E(A),E(N)),ce!=null?(N=ce,$(L,ae,E(N)),O=S=A=N):(O=S=null,ce===null&&(F=!0)),U=ae,te=P(U+C))}O!=null&&O!=S&&B!=U&&_(L,U,E(O),E(S),E(A),E(N))}else for(let P=C==1?v:m;P>=v&&P<=m;P+=C){let O=h[P];O===null?F=!0:O!=null&&$(L,b(x[P]),E(O))}let[I,H]=ju(e,r);if(y.fill!=null||I!=0){let P=R.fill=new Path2D(L),O=y.fillTo(e,r,y.min,y.max,I),S=E(O),A=b(x[v]),N=b(x[m]);C==-1&&([N,A]=[A,N]),$(P,N,S),$(P,A,S)}if(!y.spanGaps){let P=[];F&&P.push(...Hu(x,h,v,m,C,b,t)),R.gaps=P=y.gaps(e,r,v,m,P),R.clip=Pl(P,g.ori,a,o,u,d)}return H!=0&&(R.band=H==2?[io(e,r,v,m,L,-1),io(e,r,v,m,L,1)]:io(e,r,v,m,L,H)),R})}function g_(n){const t=Gt(n.align,1),e=Gt(n.ascDesc,!1),r=Gt(n.alignGaps,0),v=Gt(n.extend,!1);return(m,y,x,h)=>us(m,y,(g,s,l,c,a,o,u,d,w,b,E)=>{[x,h]=Ml(l,x,h);let $=g.pxRound,{left:_,width:C}=m.bbox,R=Z=>$(o(Z,c,b,d)),L=Z=>$(u(Z,a,E,w)),F=c.ori==0?Xs:Qs;const I={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Ys},H=I.stroke,P=c.dir*(c.ori==0?1:-1);let O=L(l[P==1?x:h]),S=R(s[P==1?x:h]),A=S,N=S;v&&t==-1&&(N=_,F(H,N,O)),F(H,S,O);for(let Z=P==1?x:h;Z>=x&&Z<=h;Z+=P){let te=l[Z];if(te==null)continue;let he=R(s[Z]),ne=L(te);t==1?F(H,he,O):F(H,A,ne),F(H,he,ne),O=ne,A=he}let B=A;v&&t==1&&(B=_+C,F(H,B,O));let[U,K]=ju(m,y);if(g.fill!=null||U!=0){let Z=I.fill=new Path2D(H),te=g.fillTo(m,y,g.min,g.max,U),he=L(te);F(Z,B,he),F(Z,N,he)}if(!g.spanGaps){let Z=[];Z.push(...Hu(s,l,x,h,P,R,r));let te=g.width*Xt/2,he=e||t==1?te:-te,ne=e||t==-1?-te:te;Z.forEach(ae=>{ae[0]+=he,ae[1]+=ne}),I.gaps=Z=g.gaps(m,y,x,h,Z),I.clip=Pl(Z,c.ori,d,w,b,E)}return K!=0&&(I.band=K==2?[io(m,y,x,h,H,-1),io(m,y,x,h,H,1)]:io(m,y,x,h,H,K)),I})}function vm(n,t,e,r,v,m,y=hr){if(n.length>1){let x=null;for(let h=0,g=1/0;h<n.length;h++)if(t[h]!==void 0){if(x!=null){let s=Jn(n[h]-n[x]);s<g&&(g=s,y=Jn(e(n[h],r,v,m)-e(n[x],r,v,m)))}x=h}}return y}function f_(n){n=n||Ea;const t=Gt(n.size,[.6,hr,1]),e=n.align||0,r=n.gap||0;let v=n.radius;v=v==null?[0,0]:typeof v=="number"?[v,0]:v;const m=Bt(v),y=1-t[0],x=Gt(t[1],hr),h=Gt(t[2],1),g=Gt(n.disp,Ea),s=Gt(n.each,a=>{}),{fill:l,stroke:c}=g;return(a,o,u,d)=>us(a,o,(w,b,E,$,_,C,R,L,F,I,H)=>{let P=w.pxRound,O=e,S=r*Xt,A=x*Xt,N=h*Xt,B,U;$.ori==0?[B,U]=m(a,o):[U,B]=m(a,o);const K=$.dir*($.ori==0?1:-1);let Z=$.ori==0?zl:Uu,te=$.ori==0?s:(He,ke,ze,Ye,dt,Ct,xt)=>{s(He,ke,ze,dt,Ye,xt,Ct)},he=Gt(a.bands,Ru).find(He=>He.series[0]==o),ne=he!=null?he.dir:0,ae=w.fillTo(a,o,w.min,w.max,ne),ce=P(R(ae,_,H,F)),ue,ye,Ae,$e=I,Ie=P(w.width*Xt),Ge=!1,qe=null,ut=null,tt=null,ht=null;l!=null&&(Ie==0||c!=null)&&(Ge=!0,qe=l.values(a,o,u,d),ut=new Map,new Set(qe).forEach(He=>{He!=null&&ut.set(He,new Path2D)}),Ie>0&&(tt=c.values(a,o,u,d),ht=new Map,new Set(tt).forEach(He=>{He!=null&&ht.set(He,new Path2D)})));let{x0:Zt,size:hn}=g;if(Zt!=null&&hn!=null){O=1,b=Zt.values(a,o,u,d),Zt.unit==2&&(b=b.map(ke=>a.posToVal(L+ke*I,$.key,!0)));let He=hn.values(a,o,u,d);hn.unit==2?ye=He[0]*I:ye=C(He[0],$,I,L)-C(0,$,I,L),$e=vm(b,E,C,$,I,L,$e),Ae=$e-ye+S}else $e=vm(b,E,C,$,I,L,$e),Ae=$e*y+S,ye=$e-Ae;Ae<1&&(Ae=0),Ie>=ye/2&&(Ie=0),Ae<5&&(P=bf);let qt=Ae>0,dr=$e-Ae-(qt?Ie:0);ye=P(Iu(dr,N,A)),ue=(O==0?ye/2:O==K?0:ye)-O*K*((O==0?S/2:0)+(qt?Ie/2:0));const dn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Mn=Ge?null:new Path2D;let In=null;if(he!=null)In=a.data[he.series[1]];else{let{y0:He,y1:ke}=g;He!=null&&ke!=null&&(E=ke.values(a,o,u,d),In=He.values(a,o,u,d))}let Gn=B*ye,vt=U*ye;for(let He=K==1?u:d;He>=u&&He<=d;He+=K){let ke=E[He];if(ke==null)continue;if(In!=null){let ct=In[He]??0;if(ke-ct==0)continue;ce=R(ct,_,H,F)}let ze=$.distr!=2||g!=null?b[He]:He,Ye=C(ze,$,I,L),dt=R(Gt(ke,ae),_,H,F),Ct=P(Ye-ue),xt=P(Mr(dt,ce)),Et=P(Mi(dt,ce)),It=xt-Et;if(ke!=null){let ct=ke<0?vt:Gn,yt=ke<0?Gn:vt;Ge?(Ie>0&&tt[He]!=null&&Z(ht.get(tt[He]),Ct,Et+Xr(Ie/2),ye,Mr(0,It-Ie),ct,yt),qe[He]!=null&&Z(ut.get(qe[He]),Ct,Et+Xr(Ie/2),ye,Mr(0,It-Ie),ct,yt)):Z(Mn,Ct,Et+Xr(Ie/2),ye,Mr(0,It-Ie),ct,yt),te(a,o,He,Ct-Ie/2,Et,ye+Ie,It)}}return Ie>0?dn.stroke=Ge?ht:Mn:Ge||(dn._fill=w.width==0?w._fill:w._stroke??w._fill,dn.width=0),dn.fill=Ge?ut:Mn,dn})}function m_(n,t){const e=Gt(t==null?void 0:t.alignGaps,0);return(r,v,m,y)=>us(r,v,(x,h,g,s,l,c,a,o,u,d,w)=>{[m,y]=Ml(g,m,y);let b=x.pxRound,E=B=>b(c(B,s,d,o)),$=B=>b(a(B,l,w,u)),_,C,R;s.ori==0?(_=Wl,R=Xs,C=dm):(_=Bl,R=Qs,C=pm);const L=s.dir*(s.ori==0?1:-1);let F=E(h[L==1?m:y]),I=F,H=[],P=[];for(let B=L==1?m:y;B>=m&&B<=y;B+=L)if(g[B]!=null){let U=h[B],K=E(U);H.push(I=K),P.push($(g[B]))}const O={stroke:n(H,P,_,R,C,b),fill:null,clip:null,band:null,gaps:null,flags:Ys},S=O.stroke;let[A,N]=ju(r,v);if(x.fill!=null||A!=0){let B=O.fill=new Path2D(S),U=x.fillTo(r,v,x.min,x.max,A),K=$(U);R(B,I,K),R(B,F,K)}if(!x.spanGaps){let B=[];B.push(...Hu(h,g,m,y,L,E,e)),O.gaps=B=x.gaps(r,v,m,y,B),O.clip=Pl(B,s.ori,o,u,d,w)}return N!=0&&(O.band=N==2?[io(r,v,m,y,S,-1),io(r,v,m,y,S,1)]:io(r,v,m,y,S,N)),O})}function v_(n){return m_(y_,n)}function y_(n,t,e,r,v,m){const y=n.length;if(y<2)return null;const x=new Path2D;if(e(x,n[0],t[0]),y==2)r(x,n[1],t[1]);else{let h=Array(y),g=Array(y-1),s=Array(y-1),l=Array(y-1);for(let c=0;c<y-1;c++)s[c]=t[c+1]-t[c],l[c]=n[c+1]-n[c],g[c]=s[c]/l[c];h[0]=g[0];for(let c=1;c<y-1;c++)g[c]===0||g[c-1]===0||g[c-1]>0!=g[c]>0?h[c]=0:(h[c]=3*(l[c-1]+l[c])/((2*l[c]+l[c-1])/g[c-1]+(l[c]+2*l[c-1])/g[c]),isFinite(h[c])||(h[c]=0));h[y-1]=g[y-2];for(let c=0;c<y-1;c++)v(x,n[c]+l[c]/3,t[c]+h[c]*l[c]/3,n[c+1]-l[c]/3,t[c+1]-h[c+1]*l[c]/3,n[c+1],t[c+1])}return x}const Vu=new Set;function ym(){for(let n of Vu)n.syncRect(!0)}Hs&&(ss(ZC,Us,ym),ss(JC,Us,ym,!0),ss(Tl,Us,()=>{yr.pxRatio=Xt}));const w_=mm(),b_=gm();function wm(n,t,e,r){return(r?[n[0],n[1]].concat(n.slice(2)):[n[0]].concat(n.slice(1))).map((v,m)=>qu(v,m,t,e))}function x_(n,t){return n.map((e,r)=>r==0?{}:qn({},t,e))}function qu(n,t,e,r){return qn({},t==0?e:r,n)}function bm(n,t,e){return t==null?qs:[t,e]}const C_=bm;function k_(n,t,e){return t==null?qs:Rl(t,e,Tu,!0)}function xm(n,t,e,r){return t==null?qs:Il(t,e,n.scales[r].log,!1)}const __=xm;function Cm(n,t,e,r){return t==null?qs:Su(t,e,n.scales[r].log,!1)}const A_=Cm;function S_(n,t,e,r,v){let m=Mr(yf(n),yf(t)),y=t-n,x=$i(v/r*y,e);do{let h=e[x],g=r*h/y;if(g>=v&&m+(h<5?Ro.get(h):0)<=17)return[h,g]}while(++x<e.length);return[0,0]}function km(n){let t,e;return n=n.replace(/(\d+)px/,(r,v)=>(t=er((e=+v)*Xt))+"px"),[n,t,e]}function T_(n){n.show&&[n.font,n.labelFont].forEach(t=>{let e=cn(t[2]*Xt,1);t[0]=t[0].replace(/[0-9.]+px/,e+"px"),t[1]=e})}function yr(n,t,e){const r={mode:Gt(n.mode,1)},v=r.mode;function m(V,X,ie,oe){let ge=X.valToPct(V);return oe+ie*(X.dir==-1?1-ge:ge)}function y(V,X,ie,oe){let ge=X.valToPct(V);return oe+ie*(X.dir==-1?ge:1-ge)}function x(V,X,ie,oe){return X.ori==0?m(V,X,ie,oe):y(V,X,ie,oe)}r.valToPosH=m,r.valToPosV=y;let h=!1;r.status=0;const g=r.root=ci(OC);if(n.id!=null&&(g.id=n.id),Gr(g,n.class),n.title){let V=ci(FC,g);V.textContent=n.title}const s=Ti("canvas"),l=r.ctx=s.getContext("2d"),c=ci(PC,g);ss("click",c,V=>{V.target===o&&(en!=gi||jt!=Ji)&&En.click(r,V)},!0);const a=r.under=ci(WC,c);c.appendChild(s);const o=r.over=ci(BC,c);n=Ks(n);const u=+Gt(n.pxAlign,1),d=lm(u);(n.plugins||[]).forEach(V=>{V.opts&&(n=V.opts(r,n)||n)});const w=n.ms||.001,b=r.series=v==1?wm(n.series||[],Qf,im,!1):x_(n.series||[null],rm),E=r.axes=wm(n.axes||[],Xf,em,!0),$=r.scales={},_=r.bands=n.bands||[];_.forEach(V=>{V.fill=Bt(V.fill||null),V.dir=Gt(V.dir,-1)});const C=v==2?b[1].facets[0].scale:b[0].scale,R={axes:uo,series:ia},L=(n.drawOrder||["axes","series"]).map(V=>R[V]);function F(V){const X=V.distr==3?ie=>ro(ie>0?ie:V.clamp(r,ie,V.min,V.max,V.key)):V.distr==4?ie=>Mu(ie,V.asinh):V.distr==100?ie=>V.fwd(ie):ie=>ie;return ie=>{let oe=X(ie),{_min:ge,_max:be}=V,Me=be-ge;return(oe-ge)/Me}}function I(V){let X=$[V];if(X==null){let ie=(n.scales||Ea)[V]||Ea;if(ie.from!=null){I(ie.from);let oe=qn({},$[ie.from],ie,{key:V});oe.valToPct=F(oe),$[V]=oe}else{X=$[V]=qn({},V==C?om:c_,ie),X.key=V;let oe=X.time,ge=X.range,be=Eo(ge);if((V!=C||v==2&&!oe)&&(be&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?gf:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?gf:{mode:1,hard:ge[1],soft:ge[1]}},be=!1),!be&&Ol(ge))){let Me=ge;ge=(Fe,We,Ve)=>We==null?qs:Rl(We,Ve,Me)}X.range=Bt(ge||(oe?C_:V==C?X.distr==3?__:X.distr==4?A_:bm:X.distr==3?xm:X.distr==4?Cm:k_)),X.auto=Bt(be?!1:X.auto),X.clamp=Bt(X.clamp||l_),X._min=X._max=null,X.valToPct=F(X)}}}I("x"),I("y"),v==1&&b.forEach(V=>{I(V.scale)}),E.forEach(V=>{I(V.scale)});for(let V in n.scales)I(V);const H=$[C],P=H.distr;let O,S;H.ori==0?(Gr(g,NC),O=m,S=y):(Gr(g,DC),O=y,S=m);const A={};for(let V in $){let X=$[V];(X.min!=null||X.max!=null)&&(A[V]={min:X.min,max:X.max},X.min=X.max=null)}const N=n.tzDate||(V=>new Date(er(V/w))),B=n.fmtDate||Eu,U=w==1?Nk(N):Pk(N),K=jf(N,zf(w==1?Ok:Fk,B)),Z=Uf(N,Hf(Bk,B)),te=[],he=r.legend=qn({},Hk,n.legend),ne=r.cursor=qn({},Yk,{drag:{y:v==2}},n.cursor),ae=he.show,ce=ne.show,ue=he.markers;he.idxs=te,ue.width=Bt(ue.width),ue.dash=Bt(ue.dash),ue.stroke=Bt(ue.stroke),ue.fill=Bt(ue.fill);let ye,Ae,$e,Ie=[],Ge=[],qe,ut=!1,tt={};if(he.live){const V=b[1]?b[1].values:null;ut=V!=null,qe=ut?V(r,1,0):{_:0};for(let X in qe)tt[X]=bu}if(ae)if(ye=Ti("table",qC,g),$e=Ti("tbody",null,ye),he.mount(r,ye),ut){Ae=Ti("thead",null,ye,$e);let V=Ti("tr",null,Ae);Ti("th",null,V);for(var ht in qe)Ti("th",Qg,V).textContent=ht}else Gr(ye,GC),he.live&&Gr(ye,KC);const Zt={show:!0},hn={show:!1};function qt(V,X){if(X==0&&(ut||!he.live||v==2))return qs;let ie=[],oe=Ti("tr",YC,$e,$e.childNodes[X]);Gr(oe,V.class),V.show||Gr(oe,os);let ge=Ti("th",null,oe);if(ue.show){let Fe=ci(XC,ge);if(X>0){let We=ue.width(r,X);We&&(Fe.style.border=We+"px "+ue.dash(r,X)+" "+ue.stroke(r,X)),Fe.style.background=ue.fill(r,X)}}let be=ci(Qg,ge);V.label instanceof HTMLElement?be.appendChild(V.label):be.textContent=V.label,X>0&&(ue.show||(be.style.color=V.width>0?ue.stroke(r,X):ue.fill(r,X)),dn("click",ge,Fe=>{if(ne._lock)return;Ei(Fe);let We=b.indexOf(V);if((Fe.ctrlKey||Fe.metaKey)!=he.isolate){let Ve=b.some((Xe,Ze)=>Ze>0&&Ze!=We&&Xe.show);b.forEach((Xe,Ze)=>{Ze>0&&Er(Ze,Ve?Ze==We?Zt:hn:Zt,!0,at.setSeries)})}else Er(We,{show:!V.show},!0,at.setSeries)},!1),Li&&dn(tf,ge,Fe=>{ne._lock||(Ei(Fe),Er(b.indexOf(V),vi,!0,at.setSeries))},!1));for(var Me in qe){let Fe=Ti("td",QC,oe);Fe.textContent="--",ie.push(Fe)}return[oe,ie]}const dr=new Map;function dn(V,X,ie,oe=!0){const ge=dr.get(X)||{},be=ne.bind[V](r,X,ie,oe);be&&(ss(V,X,ge[V]=be),dr.set(X,ge))}function Mn(V,X,ie){const oe=dr.get(X)||{};for(let ge in oe)(V==null||ge==V)&&(Au(ge,X,oe[ge]),delete oe[ge]);V==null&&dr.delete(X)}let In=0,Gn=0,vt=0,He=0,ke=0,ze=0,Ye=ke,dt=ze,Ct=vt,xt=He,Et=0,It=0,ct=0,yt=0;r.bbox={};let wn=!1,br=!1,Wr=!1,Ri=!1,oo=!1,pr=!1;function so(V,X,ie){(ie||V!=r.width||X!=r.height)&&Lo(V,X),Fi(!1),Wr=!0,br=!0,Zi()}function Lo(V,X){r.width=In=vt=V,r.height=Gn=He=X,ke=ze=0,gs(),ta();let ie=r.bbox;Et=ie.left=ls(ke*Xt,.5),It=ie.top=ls(ze*Xt,.5),ct=ie.width=ls(vt*Xt,.5),yt=ie.height=ls(He*Xt,.5)}const za=3;function Zr(){let V=!1,X=0;for(;!V;){X++;let ie=oa(X),oe=Va(X);V=X==za||ie&&oe,V||(Lo(r.width,r.height),br=!0)}}function ja({width:V,height:X}){so(V,X)}r.setSize=ja;function gs(){let V=!1,X=!1,ie=!1,oe=!1;E.forEach((ge,be)=>{if(ge.show&&ge._show){let{side:Me,_size:Fe}=ge,We=Me%2,Ve=ge.label!=null?ge.labelSize:0,Xe=Fe+Ve;Xe>0&&(We?(vt-=Xe,Me==3?(ke+=Xe,oe=!0):ie=!0):(He-=Xe,Me==0?(ze+=Xe,V=!0):X=!0))}}),Ni[0]=V,Ni[1]=ie,Ni[2]=X,Ni[3]=oe,vt-=kr[1]+kr[3],ke+=kr[3],He-=kr[2]+kr[0],ze+=kr[0]}function ta(){let V=ke+vt,X=ze+He,ie=ke,oe=ze;function ge(be,Me){switch(be){case 1:return V+=Me,V-Me;case 2:return X+=Me,X-Me;case 3:return ie-=Me,ie+Me;case 0:return oe-=Me,oe+Me}}E.forEach((be,Me)=>{if(be.show&&be._show){let Fe=be.side;be._pos=ge(Fe,be._size),be.label!=null&&(be._lpos=ge(Fe,be.labelSize))}})}if(ne.dataIdx==null){let V=ne.hover,X=V.skip=new Set(V.skip??[]);X.add(void 0);let ie=V.prox=Bt(V.prox),oe=V.bias??(V.bias=0);ne.dataIdx=(ge,be,Me,Fe)=>{if(be==0)return Me;let We=Me,Ve=ie(ge,be,Me,Fe)??hr,Xe=Ve>=0&&Ve<hr,Ze=H.ori==0?vt:He,bt=ne.left,Pt=t[0],_t=t[be];if(X.has(_t[Me])){We=null;let Nt=null,pt=null,rt;if(oe==0||oe==-1)for(rt=Me;Nt==null&&rt-- >0;)X.has(_t[rt])||(Nt=rt);if(oe==0||oe==1)for(rt=Me;pt==null&&rt++<_t.length;)X.has(_t[rt])||(pt=rt);if(Nt!=null||pt!=null)if(Xe){let un=Nt==null?-1/0:O(Pt[Nt],H,Ze,0),Cn=pt==null?1/0:O(Pt[pt],H,Ze,0),Qn=bt-un,Ut=Cn-bt;Qn<=Ut?Qn<=Ve&&(We=Nt):Ut<=Ve&&(We=pt)}else We=pt==null?Nt:Nt==null?pt:Me-Nt<=pt-Me?Nt:pt}else Xe&&Jn(bt-O(Pt[Me],H,Ze,0))>Ve&&(We=null);return We}}const Ei=V=>{ne.event=V};ne.idxs=te,ne._lock=!1;let Bn=ne.points;Bn.show=Bt(Bn.show),Bn.size=Bt(Bn.size),Bn.stroke=Bt(Bn.stroke),Bn.width=Bt(Bn.width),Bn.fill=Bt(Bn.fill);const xr=r.focus=qn({},n.focus||{alpha:.3},ne.focus),Li=xr.prox>=0,_n=Li&&Bn.one;let Cr=[],Gi=[],Oi=[];function fs(V,X){let ie=Bn.show(r,X);if(ie instanceof HTMLElement)return Gr(ie,VC),Gr(ie,V.class),Ui(ie,-10,-10,vt,He),o.insertBefore(ie,Cr[X]),ie}function na(V,X){if(v==1||X>0){let ie=v==1&&$[V.scale].time,oe=V.value;V.value=ie?Tf(oe)?Uf(N,Hf(oe,B)):oe||Z:oe||o_,V.label=V.label||(ie?Qk:Xk)}if(_n||X>0){V.width=V.width==null?1:V.width,V.paths=V.paths||w_||ck,V.fillTo=Bt(V.fillTo||u_),V.pxAlign=+Gt(V.pxAlign,u),V.pxRound=lm(V.pxAlign),V.stroke=Bt(V.stroke||null),V.fill=Bt(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let ie=s_(Mr(1,V.width),1),oe=V.points=qn({},{size:ie,width:Mr(1,ie*.2),stroke:V.stroke,space:ie*2,paths:b_,_stroke:null,_fill:null},V.points);oe.show=Bt(oe.show),oe.filter=Bt(oe.filter),oe.fill=Bt(oe.fill),oe.stroke=Bt(oe.stroke),oe.paths=Bt(oe.paths),oe.pxAlign=V.pxAlign}if(ae){let ie=qt(V,X);Ie.splice(X,0,ie[0]),Ge.splice(X,0,ie[1]),he.values.push(null)}if(ce){te.splice(X,0,null);let ie=null;_n?X==0&&(ie=fs(V,X)):X>0&&(ie=fs(V,X)),Cr.splice(X,0,ie),Gi.splice(X,0,0),Oi.splice(X,0,0)}et("addSeries",X)}function Ha(V,X){X=X??b.length,V=v==1?qu(V,X,Qf,im):qu(V,X,{},rm),b.splice(X,0,V),na(b[X],X)}r.addSeries=Ha;function Ua(V){if(b.splice(V,1),ae){he.values.splice(V,1),Ge.splice(V,1);let X=Ie.splice(V,1)[0];Mn(null,X.firstChild),X.remove()}ce&&(te.splice(V,1),Cr.splice(V,1)[0].remove(),Gi.splice(V,1),Oi.splice(V,1)),et("delSeries",V)}r.delSeries=Ua;const Ni=[!1,!1,!1,!1];function Jr(V,X){if(V._show=V.show,V.show){let ie=V.side%2,oe=$[V.scale];oe==null&&(V.scale=ie?b[1].scale:C,oe=$[V.scale]);let ge=oe.time;V.size=Bt(V.size),V.space=Bt(V.space),V.rotate=Bt(V.rotate),Eo(V.incrs)&&V.incrs.forEach(Me=>{!Ro.has(Me)&&Ro.set(Me,Af(Me))}),V.incrs=Bt(V.incrs||(oe.distr==2?Rk:ge?w==1?Lk:Dk:cs)),V.splits=Bt(V.splits||(ge&&oe.distr==1?U:oe.distr==3?Wu:oe.distr==4?e_:Jk)),V.stroke=Bt(V.stroke),V.grid.stroke=Bt(V.grid.stroke),V.ticks.stroke=Bt(V.ticks.stroke),V.border.stroke=Bt(V.border.stroke);let be=V.values;V.values=Eo(be)&&!Eo(be[0])?Bt(be):ge?Eo(be)?jf(N,zf(be,B)):Tf(be)?Wk(N,be):be||K:be||Zk,V.filter=Bt(V.filter||(oe.distr>=3&&oe.log==10?r_:oe.distr==3&&oe.log==2?i_:xf)),V.font=km(V.font),V.labelFont=km(V.labelFont),V._size=V.size(r,null,X,0),V._space=V._rotate=V._incrs=V._found=V._splits=V._values=null,V._size>0&&(Ni[X]=!0,V._el=ci(zC,c))}}function zt(V,X,ie,oe){let[ge,be,Me,Fe]=ie,We=X%2,Ve=0;return We==0&&(Fe||be)&&(Ve=X==0&&!ge||X==2&&!Me?er(Xf.size/3):0),We==1&&(ge||Me)&&(Ve=X==1&&!be||X==3&&!Fe?er(em.size/2):0),Ve}const ra=r.padding=(n.padding||[zt,zt,zt,zt]).map(V=>Bt(Gt(V,zt))),kr=r._padding=ra.map((V,X)=>V(r,X,Ni,0));let zn,pn=null,Rn=null;const hi=v==1?b[0].idxs:null;let _r=null,di=!1;function Oo(V,X){if(t=V??[],r.data=r._data=t,v==2){zn=0;for(let ie=1;ie<b.length;ie++)zn+=t[ie][0].length}else{t.length==0&&(r.data=r._data=t=[[]]),_r=t[0],zn=_r.length;let ie=t;if(P==2){ie=t.slice();let oe=ie[0]=Array(zn);for(let ge=0;ge<zn;ge++)oe[ge]=ge}r._data=t=ie}if(Fi(!0),et("setData"),P==2&&(Wr=!0),X!==!1){let ie=H;ie.auto(r,di)?ms():Yn(C,ie.min,ie.max),Ri=Ri||ne.left>=0,pr=!0,Zi()}}r.setData=Oo;function ms(){di=!0;let V,X;v==1&&(zn>0?(pn=hi[0]=0,Rn=hi[1]=zn-1,V=t[0][pn],X=t[0][Rn],P==2?(V=pn,X=Rn):V==X&&(P==3?[V,X]=Il(V,V,H.log,!1):P==4?[V,X]=Su(V,V,H.log,!1):H.time?X=V+er(86400/w):[V,X]=Rl(V,X,Tu,!0))):(pn=hi[0]=V=null,Rn=hi[1]=X=null)),Yn(C,V,X)}let Yi,Br,ao,No,zr,Do,vs,ys,Fo,tr;function ws(V,X,ie,oe,ge,be){V??(V=Jg),ie??(ie=Ru),oe??(oe="butt"),ge??(ge=Jg),be??(be="round"),V!=Yi&&(l.strokeStyle=Yi=V),ge!=Br&&(l.fillStyle=Br=ge),X!=ao&&(l.lineWidth=ao=X),be!=zr&&(l.lineJoin=zr=be),oe!=Do&&(l.lineCap=Do=oe),ie!=No&&l.setLineDash(No=ie)}function lo(V,X,ie,oe){X!=Br&&(l.fillStyle=Br=X),V!=vs&&(l.font=vs=V),ie!=ys&&(l.textAlign=ys=ie),oe!=Fo&&(l.textBaseline=Fo=oe)}function Po(V,X,ie,oe,ge=0){if(oe.length>0&&V.auto(r,di)&&(X==null||X.min==null)){let be=Gt(pn,0),Me=Gt(Rn,oe.length-1),Fe=ie.min==null?rk(oe,be,Me,ge,V.distr==3):[ie.min,ie.max];V.min=Mi(V.min,ie.min=Fe[0]),V.max=Mr(V.max,ie.max=Fe[1])}}const Wo={min:null,max:null};function Xi(){for(let oe in $){let ge=$[oe];A[oe]==null&&(ge.min==null||A[C]!=null&&ge.auto(r,di))&&(A[oe]=Wo)}for(let oe in $){let ge=$[oe];A[oe]==null&&ge.from!=null&&A[ge.from]!=null&&(A[oe]=Wo)}A[C]!=null&&Fi(!0);let V={};for(let oe in A){let ge=A[oe];if(ge!=null){let be=V[oe]=Ks($[oe],dk);if(ge.min!=null)qn(be,ge);else if(oe!=C||v==2)if(zn==0&&be.from==null){let Me=be.range(r,null,null,oe);be.min=Me[0],be.max=Me[1]}else be.min=hr,be.max=-1/0}}if(zn>0){b.forEach((oe,ge)=>{if(v==1){let be=oe.scale,Me=A[be];if(Me==null)return;let Fe=V[be];if(ge==0){let We=Fe.range(r,Fe.min,Fe.max,be);Fe.min=We[0],Fe.max=We[1],pn=$i(Fe.min,t[0]),Rn=$i(Fe.max,t[0]),Rn-pn>1&&(t[0][pn]<Fe.min&&pn++,t[0][Rn]>Fe.max&&Rn--),oe.min=_r[pn],oe.max=_r[Rn]}else oe.show&&oe.auto&&Po(Fe,Me,oe,t[ge],oe.sorted);oe.idxs[0]=pn,oe.idxs[1]=Rn}else if(ge>0&&oe.show&&oe.auto){let[be,Me]=oe.facets,Fe=be.scale,We=Me.scale,[Ve,Xe]=t[ge],Ze=V[Fe],bt=V[We];Ze!=null&&Po(Ze,A[Fe],be,Ve,be.sorted),bt!=null&&Po(bt,A[We],Me,Xe,Me.sorted),oe.min=Me.min,oe.max=Me.max}});for(let oe in V){let ge=V[oe],be=A[oe];if(ge.from==null&&(be==null||be.min==null)){let Me=ge.range(r,ge.min==hr?null:ge.min,ge.max==-1/0?null:ge.max,oe);ge.min=Me[0],ge.max=Me[1]}}}for(let oe in V){let ge=V[oe];if(ge.from!=null){let be=V[ge.from];if(be.min==null)ge.min=ge.max=null;else{let Me=ge.range(r,be.min,be.max,oe);ge.min=Me[0],ge.max=Me[1]}}}let X={},ie=!1;for(let oe in V){let ge=V[oe],be=$[oe];if(be.min!=ge.min||be.max!=ge.max){be.min=ge.min,be.max=ge.max;let Me=be.distr;be._min=Me==3?ro(be.min):Me==4?Mu(be.min,be.asinh):Me==100?be.fwd(be.min):be.min,be._max=Me==3?ro(be.max):Me==4?Mu(be.max,be.asinh):Me==100?be.fwd(be.max):be.max,X[oe]=ie=!0}}if(ie){b.forEach((oe,ge)=>{v==2?ge>0&&X.y&&(oe._paths=null):X[oe.scale]&&(oe._paths=null)});for(let oe in X)Wr=!0,et("setScale",oe);ce&&ne.left>=0&&(Ri=pr=!0)}for(let oe in A)A[oe]=null}function bs(V){let X=Iu(pn-1,0,zn-1),ie=Iu(Rn+1,0,zn-1);for(;V[X]==null&&X>0;)X--;for(;V[ie]==null&&ie<zn-1;)ie++;return[X,ie]}function ia(){if(zn>0){let V=b.some(X=>X._focus)&&tr!=xr.alpha;V&&(l.globalAlpha=tr=xr.alpha),b.forEach((X,ie)=>{if(ie>0&&X.show&&(Bo(ie,!1),Bo(ie,!0),X._paths==null)){let oe=tr;tr!=X.alpha&&(l.globalAlpha=tr=X.alpha);let ge=v==2?[0,t[ie][0].length-1]:bs(t[ie]);X._paths=X.paths(r,ie,ge[0],ge[1]),tr!=oe&&(l.globalAlpha=tr=oe)}}),b.forEach((X,ie)=>{if(ie>0&&X.show){let oe=tr;tr!=X.alpha&&(l.globalAlpha=tr=X.alpha),X._paths!=null&&zo(ie,!1);{let ge=X._paths!=null?X._paths.gaps:null,be=X.points.show(r,ie,pn,Rn,ge),Me=X.points.filter(r,ie,be,ge);(be||Me)&&(X.points._paths=X.points.paths(r,ie,pn,Rn,Me),zo(ie,!0))}tr!=oe&&(l.globalAlpha=tr=oe),et("drawSeries",ie)}}),V&&(l.globalAlpha=tr=1)}}function Bo(V,X){let ie=X?b[V].points:b[V];ie._stroke=ie.stroke(r,V),ie._fill=ie.fill(r,V)}function zo(V,X){let ie=X?b[V].points:b[V],{stroke:oe,fill:ge,clip:be,flags:Me,_stroke:Fe=ie._stroke,_fill:We=ie._fill,_width:Ve=ie.width}=ie._paths;Ve=cn(Ve*Xt,3);let Xe=null,Ze=Ve%2/2;X&&We==null&&(We=Ve>0?"#fff":Fe);let bt=ie.pxAlign==1&&Ze>0;if(bt&&l.translate(Ze,Ze),!X){let Pt=Et-Ve/2,_t=It-Ve/2,Nt=ct+Ve,pt=yt+Ve;Xe=new Path2D,Xe.rect(Pt,_t,Nt,pt)}X?co(Fe,Ve,ie.dash,ie.cap,We,oe,ge,Me,be):xs(V,Fe,Ve,ie.dash,ie.cap,We,oe,ge,Me,Xe,be),bt&&l.translate(-Ze,-Ze)}function xs(V,X,ie,oe,ge,be,Me,Fe,We,Ve,Xe){let Ze=!1;We!=0&&_.forEach((bt,Pt)=>{if(bt.series[0]==V){let _t=b[bt.series[1]],Nt=t[bt.series[1]],pt=(_t._paths||Ea).band;Eo(pt)&&(pt=bt.dir==1?pt[0]:pt[1]);let rt,un=null;_t.show&&pt&&ok(Nt,pn,Rn)?(un=bt.fill(r,Pt)||be,rt=_t._paths.clip):pt=null,co(X,ie,oe,ge,un,Me,Fe,We,Ve,Xe,rt,pt),Ze=!0}}),Ze||co(X,ie,oe,ge,be,Me,Fe,We,Ve,Xe)}const jo=Ys|zu;function co(V,X,ie,oe,ge,be,Me,Fe,We,Ve,Xe,Ze){ws(V,X,ie,oe,ge),(We||Ve||Ze)&&(l.save(),We&&l.clip(We),Ve&&l.clip(Ve)),Ze?(Fe&jo)==jo?(l.clip(Ze),Xe&&l.clip(Xe),nr(ge,Me),pi(V,be,X)):Fe&zu?(nr(ge,Me),l.clip(Ze),pi(V,be,X)):Fe&Ys&&(l.save(),l.clip(Ze),Xe&&l.clip(Xe),nr(ge,Me),l.restore(),pi(V,be,X)):(nr(ge,Me),pi(V,be,X)),(We||Ve||Ze)&&l.restore()}function pi(V,X,ie){ie>0&&(X instanceof Map?X.forEach((oe,ge)=>{l.strokeStyle=Yi=ge,l.stroke(oe)}):X!=null&&V&&l.stroke(X))}function nr(V,X){X instanceof Map?X.forEach((ie,oe)=>{l.fillStyle=Br=oe,l.fill(ie)}):X!=null&&V&&l.fill(X)}function Qi(V,X,ie,oe){let ge=E[V],be;if(oe<=0)be=[0,0];else{let Me=ge._space=ge.space(r,V,X,ie,oe),Fe=ge._incrs=ge.incrs(r,V,X,ie,oe,Me);be=S_(X,ie,Fe,oe,Me)}return ge._found=be}function Di(V,X,ie,oe,ge,be,Me,Fe,We,Ve){let Xe=Me%2/2;u==1&&l.translate(Xe,Xe),ws(Fe,Me,We,Ve,Fe),l.beginPath();let Ze,bt,Pt,_t,Nt=ge+(oe==0||oe==3?-be:be);ie==0?(bt=ge,_t=Nt):(Ze=ge,Pt=Nt);for(let pt=0;pt<V.length;pt++)X[pt]!=null&&(ie==0?Ze=Pt=V[pt]:bt=_t=V[pt],l.moveTo(Ze,bt),l.lineTo(Pt,_t));l.stroke(),u==1&&l.translate(-Xe,-Xe)}function oa(V){let X=!0;return E.forEach((ie,oe)=>{if(!ie.show)return;let ge=$[ie.scale];if(ge.min==null){ie._show&&(X=!1,ie._show=!1,Fi(!1));return}else ie._show||(X=!1,ie._show=!0,Fi(!1));let be=ie.side,Me=be%2,{min:Fe,max:We}=ge,[Ve,Xe]=Qi(oe,Fe,We,Me==0?vt:He);if(Xe==0)return;let Ze=ge.distr==2,bt=ie._splits=ie.splits(r,oe,Fe,We,Ve,Xe,Ze),Pt=ge.distr==2?bt.map(rt=>_r[rt]):bt,_t=ge.distr==2?_r[bt[1]]-_r[bt[0]]:Ve,Nt=ie._values=ie.values(r,ie.filter(r,Pt,oe,Xe,_t),oe,Xe,_t);ie._rotate=be==2?ie.rotate(r,Nt,oe,Xe):0;let pt=ie._size;ie._size=ui(ie.size(r,Nt,oe,V)),pt!=null&&ie._size!=pt&&(X=!1)}),X}function Va(V){let X=!0;return ra.forEach((ie,oe)=>{let ge=ie(r,oe,Ni,V);ge!=kr[oe]&&(X=!1),kr[oe]=ge}),X}function uo(){for(let V=0;V<E.length;V++){let X=E[V];if(!X.show||!X._show)continue;let ie=X.side,oe=ie%2,ge,be,Me=X.stroke(r,V),Fe=ie==0||ie==3?-1:1,[We,Ve]=X._found;if(X.label!=null){let an=X.labelGap*Fe,lr=er((X._lpos+an)*Xt);lo(X.labelFont[0],Me,"center",ie==2?Ma:Zg),l.save(),oe==1?(ge=be=0,l.translate(lr,er(It+yt/2)),l.rotate((ie==3?-El:El)/2)):(ge=er(Et+ct/2),be=lr);let mo=wf(X.label)?X.label(r,V,We,Ve):X.label;l.fillText(mo,ge,be),l.restore()}if(Ve==0)continue;let Xe=$[X.scale],Ze=oe==0?ct:yt,bt=oe==0?Et:It,Pt=X._splits,_t=Xe.distr==2?Pt.map(an=>_r[an]):Pt,Nt=Xe.distr==2?_r[Pt[1]]-_r[Pt[0]]:We,pt=X.ticks,rt=X.border,un=pt.show?pt.size:0,Cn=er(un*Xt),Qn=er((X.alignTo==2?X._size-un-X.gap:X.gap)*Xt),Ut=X._rotate*-El/180,pe=d(X._pos*Xt),_e=(Cn+Qn)*Fe,xe=pe+_e;be=oe==0?xe:0,ge=oe==1?xe:0;let je=X.font[0],lt=X.align==1?js:X.align==2?mu:Ut>0?js:Ut<0?mu:oe==0?"center":ie==3?mu:js,Mt=Ut||oe==1?"middle":ie==2?Ma:Zg;lo(je,Me,lt,Mt);let Kt=X.font[1]*X.lineGap,Lt=Pt.map(an=>d(x(an,Xe,Ze,bt))),Lr=X._values;for(let an=0;an<Lr.length;an++){let lr=Lr[an];if(lr!=null){oe==0?ge=Lt[an]:be=Lt[an],lr=""+lr;let mo=lr.indexOf(`
|
1485
|
+
`)==-1?[lr]:lr.split(/\n/gm);for(let Nn=0;Nn<mo.length;Nn++){let ks=mo[Nn];Ut?(l.save(),l.translate(ge,be+Nn*Kt),l.rotate(Ut),l.fillText(ks,0,0),l.restore()):l.fillText(ks,ge,be+Nn*Kt)}}}pt.show&&Di(Lt,pt.filter(r,_t,V,Ve,Nt),oe,ie,pe,Cn,cn(pt.width*Xt,3),pt.stroke(r,V),pt.dash,pt.cap);let yi=X.grid;yi.show&&Di(Lt,yi.filter(r,_t,V,Ve,Nt),oe,oe==0?2:1,oe==0?It:Et,oe==0?yt:ct,cn(yi.width*Xt,3),yi.stroke(r,V),yi.dash,yi.cap),rt.show&&Di([pe],[1],oe==0?1:0,oe==0?1:2,oe==1?It:Et,oe==1?yt:ct,cn(rt.width*Xt,3),rt.stroke(r,V),rt.dash,rt.cap)}et("drawAxes")}function Fi(V){b.forEach((X,ie)=>{ie>0&&(X._paths=null,V&&(v==1?(X.min=null,X.max=null):X.facets.forEach(oe=>{oe.min=null,oe.max=null})))})}let ho=!1,Ho=!1,po=[];function sa(){Ho=!1;for(let V=0;V<po.length;V++)et(...po[V]);po.length=0}function Zi(){ho||(wk(aa),ho=!0)}function Pe(V,X=!1){ho=!0,Ho=X,V(r),aa(),X&&po.length>0&&queueMicrotask(sa)}r.batch=Pe;function aa(){if(wn&&(Xi(),wn=!1),Wr&&(Zr(),Wr=!1),br){if(mn(a,js,ke),mn(a,Ma,ze),mn(a,Ta,vt),mn(a,$a,He),mn(o,js,ke),mn(o,Ma,ze),mn(o,Ta,vt),mn(o,$a,He),mn(c,Ta,In),mn(c,$a,Gn),s.width=er(In*Xt),s.height=er(Gn*Xt),E.forEach(({_el:V,_show:X,_size:ie,_pos:oe,side:ge})=>{if(V!=null)if(X){let be=ge===3||ge===0?ie:0,Me=ge%2==1;mn(V,Me?"left":"top",oe-be),mn(V,Me?"width":"height",ie),mn(V,Me?"top":"left",Me?ze:ke),mn(V,Me?"height":"width",Me?He:vt),ku(V,os)}else Gr(V,os)}),Yi=Br=ao=zr=Do=vs=ys=Fo=No=null,tr=1,W(!0),ke!=Ye||ze!=dt||vt!=Ct||He!=xt){Fi(!1);let V=vt/Ct,X=He/xt;if(ce&&!Ri&&ne.left>=0){ne.left*=V,ne.top*=X,ei&&Ui(ei,er(ne.left),0,vt,He),jn&&Ui(jn,0,er(ne.top),vt,He);for(let ie=0;ie<Cr.length;ie++){let oe=Cr[ie];oe!=null&&(Gi[ie]*=V,Oi[ie]*=X,Ui(oe,ui(Gi[ie]),ui(Oi[ie]),vt,He))}}if(wt.show&&!oo&&wt.left>=0&&wt.width>0){wt.left*=V,wt.width*=V,wt.top*=X,wt.height*=X;for(let ie in Y)mn(Rr,ie,wt[ie])}Ye=ke,dt=ze,Ct=vt,xt=He}et("setSize"),br=!1}In>0&&Gn>0&&(l.clearRect(0,0,s.width,s.height),et("drawClear"),L.forEach(V=>V()),et("draw")),wt.show&&oo&&(sn(wt),oo=!1),ce&&Ri&&(k(null,!0,!1),Ri=!1),he.show&&he.live&&pr&&(f(),pr=!1),h||(h=!0,r.status=1,et("ready")),di=!1,ho=!1}r.redraw=(V,X)=>{Wr=X||!1,V!==!1?Yn(C,H.min,H.max):Zi()};function Ne(V,X){let ie=$[V];if(ie.from==null){if(zn==0){let oe=ie.range(r,X.min,X.max,V);X.min=oe[0],X.max=oe[1]}if(X.min>X.max){let oe=X.min;X.min=X.max,X.max=oe}if(zn>1&&X.min!=null&&X.max!=null&&X.max-X.min<1e-16)return;V==C&&ie.distr==2&&zn>0&&(X.min=$i(X.min,t[0]),X.max=$i(X.max,t[0]),X.min==X.max&&X.max++),A[V]=X,wn=!0,Zi()}}r.setScale=Ne;let An,go,ei,jn,la,fo,gi,Ji,Jt,Yt,en,jt,fi=!1;const En=ne.drag;let Be=En.x,gn=En.y;ce&&(ne.x&&(An=ci(HC,o)),ne.y&&(go=ci(UC,o)),H.ori==0?(ei=An,jn=go):(ei=go,jn=An),en=ne.left,jt=ne.top);const wt=r.select=qn({show:!0,over:!0,left:0,width:0,top:0,height:0},n.select),Rr=wt.show?ci(jC,wt.over?o:a):null;function sn(V,X){if(wt.show){for(let ie in V)wt[ie]=V[ie],ie in Y&&mn(Rr,ie,V[ie]);X!==!1&&et("setSelect")}}r.setSelect=sn;function vn(V){if(b[V].show)ae&&ku(Ie[V],os);else if(ae&&Gr(Ie[V],os),ce){let X=_n?Cr[0]:Cr[V];X!=null&&Ui(X,-10,-10,vt,He)}}function Yn(V,X,ie){Ne(V,{min:X,max:ie})}function Er(V,X,ie,oe){X.focus!=null&&or(V),X.show!=null&&b.forEach((ge,be)=>{be>0&&(V==be||V==null)&&(ge.show=X.show,vn(be),v==2?(Yn(ge.facets[0].scale,null,null),Yn(ge.facets[1].scale,null,null)):Yn(ge.scale,null,null),Zi())}),ie!==!1&&et("setSeries",V,X),oe&&$t("setSeries",r,V,X)}r.setSeries=Er;function mi(V,X){qn(_[V],X)}function Ln(V,X){V.fill=Bt(V.fill||null),V.dir=Gt(V.dir,-1),X=X??_.length,_.splice(X,0,V)}function jr(V){V==null?_.length=0:_.splice(V,1)}r.addBand=Ln,r.setBand=mi,r.delBand=jr;function Uo(V,X){b[V].alpha=X,ce&&Cr[V]!=null&&(Cr[V].style.opacity=X),ae&&Ie[V]&&(Ie[V].style.opacity=X)}let On,ti,ni;const vi={focus:!0};function or(V){if(V!=ni){let X=V==null,ie=xr.alpha!=1;b.forEach((oe,ge)=>{if(v==1||ge>0){let be=X||ge==0||ge==V;oe._focus=X?null:be,ie&&Uo(ge,be?1:xr.alpha)}}),ni=V,ie&&Zi()}}ae&&Li&&dn(nf,ye,V=>{ne._lock||(Ei(V),ni!=null&&Er(null,vi,!0,at.setSeries))});function sr(V,X,ie){let oe=$[X];ie&&(V=V/Xt-(oe.ori==1?ze:ke));let ge=vt;oe.ori==1&&(ge=He,V=ge-V),oe.dir==-1&&(V=ge-V);let be=oe._min,Me=oe._max,Fe=V/ge,We=be+(Me-be)*Fe,Ve=oe.distr;return Ve==3?Vs(10,We):Ve==4?ak(We,oe.asinh):Ve==100?oe.bwd(We):We}function gr(V,X){let ie=sr(V,C,X);return $i(ie,t[0],pn,Rn)}r.valToIdx=V=>$i(V,t[0]),r.posToIdx=gr,r.posToVal=sr,r.valToPos=(V,X,ie)=>$[X].ori==0?m(V,$[X],ie?ct:vt,ie?Et:0):y(V,$[X],ie?yt:He,ie?It:0),r.setCursor=(V,X,ie)=>{en=V.left,jt=V.top,k(null,X,ie)};function Cs(V,X){mn(Rr,js,wt.left=V),mn(Rr,Ta,wt.width=X)}function fr(V,X){mn(Rr,Ma,wt.top=V),mn(Rr,$a,wt.height=X)}let Ar=H.ori==0?Cs:fr,ri=H.ori==1?Cs:fr;function ii(){if(ae&&he.live)for(let V=v==2?1:0;V<b.length;V++){if(V==0&&ut)continue;let X=he.values[V],ie=0;for(let oe in X)Ge[V][ie++].firstChild.nodeValue=X[oe]}}function f(V,X){if(V!=null&&(V.idxs?V.idxs.forEach((ie,oe)=>{te[oe]=ie}):hk(V.idx)||te.fill(V.idx),he.idx=te[0]),ae&&he.live){for(let ie=0;ie<b.length;ie++)(ie>0||v==1&&!ut)&&T(ie,te[ie]);ii()}pr=!1,X!==!1&&et("setLegend")}r.setLegend=f;function T(V,X){let ie=b[V],oe=V==0&&P==2?_r:t[V],ge;ut?ge=ie.values(r,V,X)??tt:(ge=ie.value(r,X==null?null:oe[X],V,X),ge=ge==null?tt:{_:ge}),he.values[V]=ge}function k(V,X,ie){Jt=en,Yt=jt,[en,jt]=ne.move(r,en,jt),ne.left=en,ne.top=jt,ce&&(ei&&Ui(ei,er(en),0,vt,He),jn&&Ui(jn,0,er(jt),vt,He));let oe,ge=pn>Rn;On=hr,ti=null;let be=H.ori==0?vt:He,Me=H.ori==1?vt:He;if(en<0||zn==0||ge){oe=ne.idx=null;for(let Fe=0;Fe<b.length;Fe++){let We=Cr[Fe];We!=null&&Ui(We,-10,-10,vt,He)}Li&&Er(null,vi,!0,V==null&&at.setSeries),he.live&&(te.fill(oe),pr=!0)}else{let Fe,We,Ve;v==1&&(Fe=H.ori==0?en:jt,We=sr(Fe,C),oe=ne.idx=$i(We,t[0],pn,Rn),Ve=O(t[0][oe],H,be,0));let Xe=-10,Ze=-10,bt=0,Pt=0,_t=!0,Nt="",pt="";for(let rt=v==2?1:0;rt<b.length;rt++){let un=b[rt],Cn=te[rt],Qn=Cn==null?null:v==1?t[rt][Cn]:t[rt][1][Cn],Ut=ne.dataIdx(r,rt,oe,We),pe=Ut==null?null:v==1?t[rt][Ut]:t[rt][1][Ut];if(pr=pr||pe!=Qn||Ut!=Cn,te[rt]=Ut,rt>0&&un.show){let _e=Ut==null?-10:Ut==oe?Ve:O(v==1?t[0][Ut]:t[rt][0][Ut],H,be,0),xe=pe==null?-10:S(pe,v==1?$[un.scale]:$[un.facets[1].scale],Me,0);if(Li&&pe!=null){let je=H.ori==1?en:jt,lt=Jn(xr.dist(r,rt,Ut,xe,je));if(lt<On){let Mt=xr.bias;if(Mt!=0){let Kt=sr(je,un.scale),Lt=pe>=0?1:-1,Lr=Kt>=0?1:-1;Lr==Lt&&(Lr==1?Mt==1?pe>=Kt:pe<=Kt:Mt==1?pe<=Kt:pe>=Kt)&&(On=lt,ti=rt)}else On=lt,ti=rt}}if(pr||_n){let je,lt;H.ori==0?(je=_e,lt=xe):(je=xe,lt=_e);let Mt,Kt,Lt,Lr,yi,an,lr=!0,mo=Bn.bbox;if(mo!=null){lr=!1;let Nn=mo(r,rt);Lt=Nn.left,Lr=Nn.top,Mt=Nn.width,Kt=Nn.height}else Lt=je,Lr=lt,Mt=Kt=Bn.size(r,rt);if(an=Bn.fill(r,rt),yi=Bn.stroke(r,rt),_n)rt==ti&&On<=xr.prox&&(Xe=Lt,Ze=Lr,bt=Mt,Pt=Kt,_t=lr,Nt=an,pt=yi);else{let Nn=Cr[rt];Nn!=null&&(Gi[rt]=Lt,Oi[rt]=Lr,uf(Nn,Mt,Kt,lr),lf(Nn,an,yi),Ui(Nn,ui(Lt),ui(Lr),vt,He))}}}}if(_n){let rt=xr.prox,un=ni==null?On<=rt:On>rt||ti!=ni;if(pr||un){let Cn=Cr[0];Cn!=null&&(Gi[0]=Xe,Oi[0]=Ze,uf(Cn,bt,Pt,_t),lf(Cn,Nt,pt),Ui(Cn,ui(Xe),ui(Ze),vt,He))}}}if(wt.show&&fi)if(V!=null){let[Fe,We]=at.scales,[Ve,Xe]=at.match,[Ze,bt]=V.cursor.sync.scales,Pt=V.cursor.drag;if(Be=Pt._x,gn=Pt._y,Be||gn){let{left:_t,top:Nt,width:pt,height:rt}=V.select,un=V.scales[Ze].ori,Cn=V.posToVal,Qn,Ut,pe,_e,xe,je=Fe!=null&&Ve(Fe,Ze),lt=We!=null&&Xe(We,bt);je&&Be?(un==0?(Qn=_t,Ut=pt):(Qn=Nt,Ut=rt),pe=$[Fe],_e=O(Cn(Qn,Ze),pe,be,0),xe=O(Cn(Qn+Ut,Ze),pe,be,0),Ar(Mi(_e,xe),Jn(xe-_e))):Ar(0,be),lt&&gn?(un==1?(Qn=_t,Ut=pt):(Qn=Nt,Ut=rt),pe=$[We],_e=S(Cn(Qn,bt),pe,Me,0),xe=S(Cn(Qn+Ut,bt),pe,Me,0),ri(Mi(_e,xe),Jn(xe-_e))):ri(0,Me)}else Q()}else{let Fe=Jn(Jt-la),We=Jn(Yt-fo);if(H.ori==1){let bt=Fe;Fe=We,We=bt}Be=En.x&&Fe>=En.dist,gn=En.y&&We>=En.dist;let Ve=En.uni;Ve!=null?Be&&gn&&(Be=Fe>=Ve,gn=We>=Ve,!Be&&!gn&&(We>Fe?gn=!0:Be=!0)):En.x&&En.y&&(Be||gn)&&(Be=gn=!0);let Xe,Ze;Be&&(H.ori==0?(Xe=gi,Ze=en):(Xe=Ji,Ze=jt),Ar(Mi(Xe,Ze),Jn(Ze-Xe)),gn||ri(0,Me)),gn&&(H.ori==1?(Xe=gi,Ze=en):(Xe=Ji,Ze=jt),ri(Mi(Xe,Ze),Jn(Ze-Xe)),Be||Ar(0,be)),!Be&&!gn&&(Ar(0,0),ri(0,0))}if(En._x=Be,En._y=gn,V==null){if(ie){if(bn!=null){let[Fe,We]=at.scales;at.values[0]=Fe!=null?sr(H.ori==0?en:jt,Fe):null,at.values[1]=We!=null?sr(H.ori==1?en:jt,We):null}$t(yu,r,en,jt,vt,He,oe)}if(Li){let Fe=ie&&at.setSeries,We=xr.prox;ni==null?On<=We&&Er(ti,vi,!0,Fe):On>We?Er(null,vi,!0,Fe):ti!=ni&&Er(ti,vi,!0,Fe)}}pr&&(he.idx=oe,f()),X!==!1&&et("setCursor")}let D=null;Object.defineProperty(r,"rect",{get(){return D==null&&W(!1),D}});function W(V=!1){V?D=null:(D=o.getBoundingClientRect(),et("syncRect",D))}function z(V,X,ie,oe,ge,be,Me){ne._lock||fi&&V!=null&&V.movementX==0&&V.movementY==0||(q(V,X,ie,oe,ge,be,Me,!1,V!=null),V!=null?k(null,!0,!0):k(X,!0,!1))}function q(V,X,ie,oe,ge,be,Me,Fe,We){if(D==null&&W(!1),Ei(V),V!=null)ie=V.clientX-D.left,oe=V.clientY-D.top;else{if(ie<0||oe<0){en=-10,jt=-10;return}let[Ve,Xe]=at.scales,Ze=X.cursor.sync,[bt,Pt]=Ze.values,[_t,Nt]=Ze.scales,[pt,rt]=at.match,un=X.axes[0].side%2==1,Cn=H.ori==0?vt:He,Qn=H.ori==1?vt:He,Ut=un?be:ge,pe=un?ge:be,_e=un?oe:ie,xe=un?ie:oe;if(_t!=null?ie=pt(Ve,_t)?x(bt,$[Ve],Cn,0):-10:ie=Cn*(_e/Ut),Nt!=null?oe=rt(Xe,Nt)?x(Pt,$[Xe],Qn,0):-10:oe=Qn*(xe/pe),H.ori==1){let je=ie;ie=oe,oe=je}}We&&(X==null||X.cursor.event.type==yu)&&((ie<=1||ie>=vt-1)&&(ie=ls(ie,vt)),(oe<=1||oe>=He-1)&&(oe=ls(oe,He))),Fe?(la=ie,fo=oe,[gi,Ji]=ne.move(r,ie,oe)):(en=ie,jt=oe)}const Y={width:0,height:0,left:0,top:0};function Q(){sn(Y,!1)}let re,se,ve,Ce;function fe(V,X,ie,oe,ge,be,Me){fi=!0,Be=gn=En._x=En._y=!1,q(V,X,ie,oe,ge,be,Me,!0,!1),V!=null&&(dn(wu,xu,we,!1),$t(ef,r,gi,Ji,vt,He,null));let{left:Fe,top:We,width:Ve,height:Xe}=wt;re=Fe,se=We,ve=Ve,Ce=Xe}function we(V,X,ie,oe,ge,be,Me){fi=En._x=En._y=!1,q(V,X,ie,oe,ge,be,Me,!1,!0);let{left:Fe,top:We,width:Ve,height:Xe}=wt,Ze=Ve>0||Xe>0,bt=re!=Fe||se!=We||ve!=Ve||Ce!=Xe;if(Ze&&bt&&sn(wt),En.setScale&&Ze&&bt){let Pt=Fe,_t=Ve,Nt=We,pt=Xe;if(H.ori==1&&(Pt=We,_t=Xe,Nt=Fe,pt=Ve),Be&&Yn(C,sr(Pt,C),sr(Pt+_t,C)),gn)for(let rt in $){let un=$[rt];rt!=C&&un.from==null&&un.min!=hr&&Yn(rt,sr(Nt+pt,rt),sr(Nt,rt))}Q()}else ne.lock&&(ne._lock=!ne._lock,k(X,!0,V!=null));V!=null&&(Mn(wu,xu),$t(wu,r,en,jt,vt,He,null))}function Oe(V,X,ie,oe,ge,be,Me){if(ne._lock)return;Ei(V);let Fe=fi;if(fi){let We=!0,Ve=!0,Xe=10,Ze,bt;H.ori==0?(Ze=Be,bt=gn):(Ze=gn,bt=Be),Ze&&bt&&(We=en<=Xe||en>=vt-Xe,Ve=jt<=Xe||jt>=He-Xe),Ze&&We&&(en=en<gi?0:vt),bt&&Ve&&(jt=jt<Ji?0:He),k(null,!0,!0),fi=!1}en=-10,jt=-10,te.fill(null),k(null,!0,!0),Fe&&(fi=Fe)}function Le(V,X,ie,oe,ge,be,Me){ne._lock||(Ei(V),ms(),Q(),V!=null&&$t(rf,r,en,jt,vt,He,null))}function Ue(){E.forEach(T_),so(r.width,r.height,!0)}ss(Tl,Us,Ue);const st={};st.mousedown=fe,st.mousemove=z,st.mouseup=we,st.dblclick=Le,st.setSeries=(V,X,ie,oe)=>{let ge=at.match[2];ie=ge(r,X,ie),ie!=-1&&Er(ie,oe,!0,!1)},ce&&(dn(ef,o,fe),dn(yu,o,z),dn(tf,o,V=>{Ei(V),W(!1)}),dn(nf,o,Oe),dn(rf,o,Le),Vu.add(r),r.syncRect=W);const Qe=r.hooks=n.hooks||{};function et(V,X,ie){Ho?po.push([V,X,ie]):V in Qe&&Qe[V].forEach(oe=>{oe.call(null,r,X,ie)})}(n.plugins||[]).forEach(V=>{for(let X in V.hooks)Qe[X]=(Qe[X]||[]).concat(V.hooks[X])});const fn=(V,X,ie)=>ie,at=qn({key:null,setSeries:!1,filters:{pub:Cf,sub:Cf},scales:[C,b[1]?b[1].scale:null],match:[kf,kf,fn],values:[null,null]},ne.sync);at.match.length==2&&at.match.push(fn),ne.sync=at;const bn=at.key,kt=am(bn);function $t(V,X,ie,oe,ge,be,Me){at.filters.pub(V,X,ie,oe,ge,be,Me)&&kt.pub(V,X,ie,oe,ge,be,Me)}kt.sub(r);function Xn(V,X,ie,oe,ge,be,Me){at.filters.sub(V,X,ie,oe,ge,be,Me)&&st[V](null,X,ie,oe,ge,be,Me)}r.pub=Xn;function ar(){kt.unsub(r),Vu.delete(r),dr.clear(),Au(Tl,Us,Ue),g.remove(),ye==null||ye.remove(),et("destroy")}r.destroy=ar;function xn(){et("init",n,t),Oo(t||n.data,!1),A[C]?Ne(C,A[C]):ms(),oo=wt.show&&(wt.width>0||wt.height>0),Ri=pr=!0,so(n.width,n.height)}return b.forEach(na),E.forEach(Jr),e?e instanceof HTMLElement?(e.appendChild(g),xn()):e(r,xn):xn(),r}yr.assign=qn,yr.fmtNum=$u,yr.rangeNum=Rl,yr.rangeLog=Il,yr.rangeAsinh=Su,yr.orient=us,yr.pxRatio=Xt,yr.join=yk,yr.fmtDate=Eu,yr.tzDate=Mk,yr.sync=am;{yr.addGap=h_,yr.clipGaps=Pl;let n=yr.paths={points:gm};n.linear=mm,n.stepped=g_,n.bars=f_,n.spline=v_}var _m,Am;function $_(){return Am||(Am=1,_m=function(n,t,e,r,v){var m,y;if(r===void 0)r=0;else if(r=r|0,r<0||r>=n.length)throw new RangeError("invalid lower bound");if(v===void 0)v=n.length-1;else if(v=v|0,v<r||v>=n.length)throw new RangeError("invalid upper bound");for(;r<=v;)if(m=r+(v-r>>>1),y=+e(n[m],t,m,n),y<0)r=m+1;else if(y>0)v=m-1;else return m;return~r}),_m}var M_=$_();const H2=$r("B",ll(M_));var Ku,Sm;function I_(){if(Sm)return Ku;Sm=1;function n(t,e,r){var v=-1,m=t.length;e<0&&(e=-e>m?0:m+e),r=r>m?m:r,r<0&&(r+=m),m=e>r?0:r-e>>>0,e>>>=0;for(var y=Array(m);++v<m;)y[v]=t[v+e];return y}return Ku=n,Ku}var Gu,Tm;function R_(){if(Tm)return Gu;Tm=1;var n=I_();function t(e,r,v){var m=e.length;return v=v===void 0?m:v,!r&&v>=m?e:n(e,r,v)}return Gu=t,Gu}var Yu,$m;function Mm(){if($m)return Yu;$m=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",v=t+e+r,m="\\ufe0e\\ufe0f",y="\\u200d",x=RegExp("["+y+n+v+m+"]");function h(g){return x.test(g)}return Yu=h,Yu}var Xu,Im;function E_(){if(Im)return Xu;Im=1;function n(t){return t.split("")}return Xu=n,Xu}var Qu,Rm;function L_(){if(Rm)return Qu;Rm=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",v=t+e+r,m="\\ufe0e\\ufe0f",y="["+n+"]",x="["+v+"]",h="\\ud83c[\\udffb-\\udfff]",g="(?:"+x+"|"+h+")",s="[^"+n+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",a="\\u200d",o=g+"?",u="["+m+"]?",d="(?:"+a+"(?:"+[s,l,c].join("|")+")"+u+o+")*",w=u+o+d,b="(?:"+[s+x+"?",x,l,c,y].join("|")+")",E=RegExp(h+"(?="+h+")|"+b+w,"g");function $(_){return _.match(E)||[]}return Qu=$,Qu}var Zu,Em;function O_(){if(Em)return Zu;Em=1;var n=E_(),t=Mm(),e=L_();function r(v){return t(v)?e(v):n(v)}return Zu=r,Zu}var Ju,Lm;function N_(){if(Lm)return Ju;Lm=1;var n=typeof Io=="object"&&Io&&Io.Object===Object&&Io;return Ju=n,Ju}var eh,Om;function D_(){if(Om)return eh;Om=1;var n=N_(),t=typeof self=="object"&&self&&self.Object===Object&&self,e=n||t||Function("return this")();return eh=e,eh}var th,Nm;function nh(){if(Nm)return th;Nm=1;var n=D_(),t=n.Symbol;return th=t,th}var rh,Dm;function F_(){if(Dm)return rh;Dm=1;function n(t,e){for(var r=-1,v=t==null?0:t.length,m=Array(v);++r<v;)m[r]=e(t[r],r,t);return m}return rh=n,rh}var ih,Fm;function P_(){if(Fm)return ih;Fm=1;var n=Array.isArray;return ih=n,ih}var oh,Pm;function W_(){if(Pm)return oh;Pm=1;var n=nh(),t=Object.prototype,e=t.hasOwnProperty,r=t.toString,v=n?n.toStringTag:void 0;function m(y){var x=e.call(y,v),h=y[v];try{y[v]=void 0;var g=!0}catch{}var s=r.call(y);return g&&(x?y[v]=h:delete y[v]),s}return oh=m,oh}var sh,Wm;function B_(){if(Wm)return sh;Wm=1;var n=Object.prototype,t=n.toString;function e(r){return t.call(r)}return sh=e,sh}var ah,Bm;function z_(){if(Bm)return ah;Bm=1;var n=nh(),t=W_(),e=B_(),r="[object Null]",v="[object Undefined]",m=n?n.toStringTag:void 0;function y(x){return x==null?x===void 0?v:r:m&&m in Object(x)?t(x):e(x)}return ah=y,ah}var lh,zm;function j_(){if(zm)return lh;zm=1;function n(t){return t!=null&&typeof t=="object"}return lh=n,lh}var ch,jm;function H_(){if(jm)return ch;jm=1;var n=z_(),t=j_(),e="[object Symbol]";function r(v){return typeof v=="symbol"||t(v)&&n(v)==e}return ch=r,ch}var uh,Hm;function U_(){if(Hm)return uh;Hm=1;var n=nh(),t=F_(),e=P_(),r=H_(),v=n?n.prototype:void 0,m=v?v.toString:void 0;function y(x){if(typeof x=="string")return x;if(e(x))return t(x,y)+"";if(r(x))return m?m.call(x):"";var h=x+"";return h=="0"&&1/x==-1/0?"-0":h}return uh=y,uh}var hh,Um;function jl(){if(Um)return hh;Um=1;var n=U_();function t(e){return e==null?"":n(e)}return hh=t,hh}var dh,Vm;function V_(){if(Vm)return dh;Vm=1;var n=R_(),t=Mm(),e=O_(),r=jl();function v(m){return function(y){y=r(y);var x=t(y)?e(y):void 0,h=x?x[0]:y.charAt(0),g=x?n(x,1).join(""):y.slice(1);return h[m]()+g}}return dh=v,dh}var ph,qm;function Km(){if(qm)return ph;qm=1;var n=V_(),t=n("toUpperCase");return ph=t,ph}var q_=Km();const K_=ll(q_);var gh,Gm;function G_(){if(Gm)return gh;Gm=1;var n=jl(),t=Km();function e(r){return t(n(r).toLowerCase())}return gh=e,gh}var fh,Ym;function Y_(){if(Ym)return fh;Ym=1;function n(t,e,r,v){var m=-1,y=t==null?0:t.length;for(v&&y&&(r=t[++m]);++m<y;)r=e(r,t[m],m,t);return r}return fh=n,fh}var mh,Xm;function X_(){if(Xm)return mh;Xm=1;function n(t){return function(e){return t==null?void 0:t[e]}}return mh=n,mh}var vh,Qm;function Q_(){if(Qm)return vh;Qm=1;var n=X_(),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 vh=e,vh}var yh,Zm;function Z_(){if(Zm)return yh;Zm=1;var n=Q_(),t=jl(),e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",v="\\ufe20-\\ufe2f",m="\\u20d0-\\u20ff",y=r+v+m,x="["+y+"]",h=RegExp(x,"g");function g(s){return s=t(s),s&&s.replace(e,n).replace(h,"")}return yh=g,yh}var wh,Jm;function J_(){if(Jm)return wh;Jm=1;var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function t(e){return e.match(n)||[]}return wh=t,wh}var bh,ev;function eA(){if(ev)return bh;ev=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 bh=t,bh}var xh,tv;function tA(){if(tv)return xh;tv=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",v=t+e+r,m="\\u2700-\\u27bf",y="a-z\\xdf-\\xf6\\xf8-\\xff",x="\\xac\\xb1\\xd7\\xf7",h="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",g="\\u2000-\\u206f",s=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",l="A-Z\\xc0-\\xd6\\xd8-\\xde",c="\\ufe0e\\ufe0f",a=x+h+g+s,o="['’]",u="["+a+"]",d="["+v+"]",w="\\d+",b="["+m+"]",E="["+y+"]",$="[^"+n+a+w+m+y+l+"]",_="\\ud83c[\\udffb-\\udfff]",C="(?:"+d+"|"+_+")",R="[^"+n+"]",L="(?:\\ud83c[\\udde6-\\uddff]){2}",F="[\\ud800-\\udbff][\\udc00-\\udfff]",I="["+l+"]",H="\\u200d",P="(?:"+E+"|"+$+")",O="(?:"+I+"|"+$+")",S="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",A="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",N=C+"?",B="["+c+"]?",U="(?:"+H+"(?:"+[R,L,F].join("|")+")"+B+N+")*",K="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",te=B+N+U,he="(?:"+[b,L,F].join("|")+")"+te,ne=RegExp([I+"?"+E+"+"+S+"(?="+[u,I,"$"].join("|")+")",O+"+"+A+"(?="+[u,I+P,"$"].join("|")+")",I+"?"+P+"+"+S,I+"+"+A,Z,K,w,he].join("|"),"g");function ae(ce){return ce.match(ne)||[]}return xh=ae,xh}var Ch,nv;function nA(){if(nv)return Ch;nv=1;var n=J_(),t=eA(),e=jl(),r=tA();function v(m,y,x){return m=e(m),y=x?void 0:y,y===void 0?t(m)?r(m):n(m):m.match(y)||[]}return Ch=v,Ch}var kh,rv;function rA(){if(rv)return kh;rv=1;var n=Y_(),t=Z_(),e=nA(),r="['’]",v=RegExp(r,"g");function m(y){return function(x){return n(e(t(x).replace(v,"")),y,"")}}return kh=m,kh}var _h,iv;function iA(){if(iv)return _h;iv=1;var n=G_(),t=rA(),e=t(function(r,v,m){return v=v.toLowerCase(),r+(m?n(v):v)});return _h=e,_h}var oA=iA();const sA=ll(oA),aA=Object.assign({"./ArrayWidget.vue":()=>ot(()=>it.import("./ArrayWidget-BbsN1dzF-959f895dd277057383c1.js"),void 0),"./ArrayplotWidget.vue":()=>ot(()=>it.import("./ArrayplotWidget-CCKEyYIx-346527d8ce418723987f.js"),void 0),"./BlockWidget.vue":()=>ot(()=>it.import("./BlockWidget-DlCHbqZX-931e540736560d3298ad.js"),void 0),"./ButtonWidget.vue":()=>ot(()=>it.import("./ButtonWidget-CtfJzCBR-21a7269786cac7b63ed2.js"),void 0),"./CanvasWidget.vue":()=>ot(()=>it.import("./CanvasWidget-CqRlXc4r-7ea98cc5aa658273d3ab.js"),void 0),"./CanvasdotWidget.vue":()=>ot(()=>it.import("./CanvasdotWidget--Xr_KsZs-fd37759adf5ff324502c.js"),void 0),"./CanvasimageWidget.vue":()=>ot(()=>it.import("./CanvasimageWidget-BPlj5QYK-4f3fc8e5b175b2af118a.js"),void 0),"./CanvasimagevalueWidget.vue":()=>ot(()=>it.import("./CanvasimagevalueWidget-DVFGLt8f-5d90c4a6f82cfaeea904.js"),void 0),"./CanvaslabelWidget.vue":()=>ot(()=>it.import("./CanvaslabelWidget-CYNqmyP0-ee5f201f9b9a94ef6529.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>ot(()=>it.import("./CanvaslabelvalueWidget-B7yIDmsn-a62a21cc67b2555f10ed.js"),void 0),"./CanvaslineWidget.vue":()=>ot(()=>it.import("./CanvaslineWidget-BICdxX0Q-c00d646b5ebac0888f19.js"),void 0),"./CanvaslinevalueWidget.vue":()=>ot(()=>it.import("./CanvaslinevalueWidget-Cq-Ddh0P-7cd0e41fbdea71aaf9d7.js"),void 0),"./CheckbuttonWidget.vue":()=>ot(()=>it.import("./CheckbuttonWidget-B74AWeaW-b3c0cfbdc0a8149a68ca.js"),void 0),"./ComboboxWidget.vue":()=>ot(()=>it.import("./ComboboxWidget-CtyKbEWb-dc447488fe813641c5c0.js"),void 0),"./DateWidget.vue":()=>ot(()=>it.import("./DateWidget-BEVSczU8-1f01bd84bcb9e186cab1.js"),void 0),"./DynamicWidget.vue":()=>ot(()=>it.import("./DynamicWidget-CfMtj7H8-7310a45e174b3e0e1f4d.js"),void 0),"./FormatvalueWidget.vue":()=>ot(()=>it.import("./FormatvalueWidget-DN12xymS-5d92462ee8b18046d1f4.js"),void 0),"./HorizontalWidget.vue":()=>ot(()=>it.import("./HorizontalWidget-Cd_wl1b3-1c2997802975048e709f.js"),void 0),"./HorizontalboxWidget.vue":()=>ot(()=>it.import("./HorizontalboxWidget-BcMTFBU--8ad91cd7bc665ab4766a.js"),void 0),"./HorizontallineWidget.vue":()=>ot(()=>it.import("./HorizontallineWidget-CXFqHclf-de6750f9b87d7529cbf5.js"),void 0),"./IframeWidget.vue":()=>ot(()=>it.import("./IframeWidget-BPerHCCa-cdb2815ceb98ee81983f.js"),void 0),"./ImageviewerWidget.vue":()=>ot(()=>it.import("./ImageviewerWidget-Cw_H_HmZ-dc0a5ab97b39f8b02ffd.js"),void 0),"./LabelWidget.vue":()=>ot(()=>it.import("./LabelWidget-xrmcVeq8-d217d37c2a6475bb6a9d.js"),void 0),"./LabelledWidget.vue":()=>ot(()=>it.import("./LabelledWidget-D48QoyMk-24bd01061fc3c283bb8e.js"),void 0),"./LabelprogressbarWidget.vue":()=>ot(()=>it.import("./LabelprogressbarWidget-C_950t6g-42d1ee457a76977a9926.js"),void 0),"./LabelsparklineWidget.vue":()=>ot(()=>it.import("./LabelsparklineWidget-0KXQyPoU-4fefa82bdaecf6d9a3d0.js"),void 0),"./LabelvalueWidget.vue":()=>ot(()=>it.import("./LabelvalueWidget-CQ06wWDK-ac37a8b84574824ad5b7.js"),void 0),"./LabelvaluedescWidget.vue":()=>ot(()=>it.import("./LabelvaluedescWidget-Bo8zT01X-9c0bf9f4cf055d8313f8.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>ot(()=>it.import("./LabelvaluelimitsbarWidget-BucTw8Yk-e8fa86e345960718befd.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>ot(()=>it.import("./LabelvaluelimitscolumnWidget-Dflb1hNd-a33ca9d0e9a93745c199.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>ot(()=>it.import("./LabelvaluerangebarWidget-D8cbfXFM-ef9ea25e0833526e661c.js"),void 0),"./LedWidget.vue":()=>ot(()=>it.import("./LedWidget-qH_FthkK-8c5e19d8ac9c7a6f321d.js"),void 0),"./LimitsbarWidget.vue":()=>ot(()=>it.import("./LimitsbarWidget-B9lAB2RD-46ce18c4a5dd690481e6.js"),void 0),"./LimitscolorWidget.vue":()=>ot(()=>it.import("./LimitscolorWidget-c6Qa6su7-1ac01b8834b586d34820.js"),void 0),"./LimitscolumnWidget.vue":()=>ot(()=>it.import("./LimitscolumnWidget-CcLs_443-f29417bf8f4f674783bd.js"),void 0),"./LinegraphWidget.vue":()=>ot(()=>it.import("./LinegraphWidget-BSVYLFo1-2acb1a88e7e56ce79a5a.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>ot(()=>it.import("./MatrixbycolumnsWidget-DXFpZTre-8918bddf56b2e85dce07.js"),void 0),"./ProgressbarWidget.vue":()=>ot(()=>it.import("./ProgressbarWidget-iYGw8-Dc-224838ec829e2d0aaaa2.js"),void 0),"./RadiobuttonWidget.vue":()=>ot(()=>it.import("./RadiobuttonWidget-ytmoVZ3u-203d8cf62a1dbf9d4a07.js"),void 0),"./RadiogroupWidget.vue":()=>ot(()=>it.import("./RadiogroupWidget-CusMBhKH-b3330247ae7a777565fa.js"),void 0),"./RangebarWidget.vue":()=>ot(()=>it.import("./RangebarWidget-D_zGTtCa-3b37862085afd896c860.js"),void 0),"./RollupWidget.vue":()=>ot(()=>it.import("./RollupWidget-Dolsixyt-215ca55830b76e505c94.js"),void 0),"./ScrollwindowWidget.vue":()=>ot(()=>it.import("./ScrollwindowWidget-DV2nZuNi-688f314da002c3dea6fb.js"),void 0),"./SignalWidget.vue":()=>ot(()=>it.import("./SignalWidget-d9-6h85k-5806e363f98a90f36b92.js"),void 0),"./SpacerWidget.vue":()=>ot(()=>it.import("./SpacerWidget-BH0p2OLi-3e44b9fc8ff9cdb8e47e.js"),void 0),"./SparklineWidget.vue":()=>ot(()=>it.import("./SparklineWidget-coxi9r2g-e8dd44a94f090ab553c2.js"),void 0),"./TabbookWidget.vue":()=>ot(()=>it.import("./TabbookWidget-B1XKplGH-21be3775bb05a42b4489.js"),void 0),"./TextboxWidget.vue":()=>ot(()=>it.import("./TextboxWidget-C-_M2M4l-1be0ab781fe0200895fd.js"),void 0),"./TextfieldWidget.vue":()=>ot(()=>it.import("./TextfieldWidget-C08N4JE8-1d9f7537a0fa53d0113c.js"),void 0),"./TimeWidget.vue":()=>ot(()=>it.import("./TimeWidget-DtwdEcFg-afe7ad8fa99dd194ca59.js"),void 0),"./TitleWidget.vue":()=>ot(()=>it.import("./TitleWidget-CT-aLcNb-458d3c419a64e978301d.js"),void 0),"./ValueWidget.vue":()=>ot(()=>it.import("./ValueWidget-C6RanBj3-2f0a0c754e68ac6c14a2.js"),void 0),"./ValuelimitsbarWidget.vue":()=>ot(()=>it.import("./ValuelimitsbarWidget-B3bvjfxc-25ed16c2313234a49832.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>ot(()=>it.import("./ValuelimitscolumnWidget-QvhI6EcE-e110f67cadf8ca55f828.js"),void 0),"./ValuerangebarWidget.vue":()=>ot(()=>it.import("./ValuerangebarWidget-Dt3K9BnC-75e9d7e093a62f7c3249.js"),void 0),"./VerticalWidget.vue":()=>ot(()=>it.import("./VerticalWidget-BIIViZgI-9b15e72a48b5a570cf2a.js"),void 0),"./VerticalboxWidget.vue":()=>ot(()=>it.import("./VerticalboxWidget-DY72fLHW-66bb7cf651d4ee151f1f.js"),void 0)}),lA=Object.entries(aA).reduce((n,[t,e])=>{t=t.split("/").pop();const r=K_(sA(t.replace(/\.\w+$/,"")));return{...n,[r]:Gd(e)}},{}),U2=$r("W",{components:lA});function ov(n,t){return function(){return n.apply(t,arguments)}}const{toString:cA}=Object.prototype,{getPrototypeOf:Ah}=Object,Hl=(n=>t=>{const e=cA.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ii=n=>(n=n.toLowerCase(),t=>Hl(t)===n),Ul=n=>t=>typeof t===n,{isArray:Zs}=Array,Na=Ul("undefined");function uA(n){return n!==null&&!Na(n)&&n.constructor!==null&&!Na(n.constructor)&&Qr(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const sv=Ii("ArrayBuffer");function hA(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&sv(n.buffer),t}const dA=Ul("string"),Qr=Ul("function"),av=Ul("number"),Vl=n=>n!==null&&typeof n=="object",pA=n=>n===!0||n===!1,ql=n=>{if(Hl(n)!=="object")return!1;const t=Ah(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},gA=Ii("Date"),fA=Ii("File"),mA=Ii("Blob"),vA=Ii("FileList"),yA=n=>Vl(n)&&Qr(n.pipe),wA=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Qr(n.append)&&((t=Hl(n))==="formdata"||t==="object"&&Qr(n.toString)&&n.toString()==="[object FormData]"))},bA=Ii("URLSearchParams"),[xA,CA,kA,_A]=["ReadableStream","Request","Response","Headers"].map(Ii),AA=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Da(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,v;if(typeof n!="object"&&(n=[n]),Zs(n))for(r=0,v=n.length;r<v;r++)t.call(null,n[r],r,n);else{const m=e?Object.getOwnPropertyNames(n):Object.keys(n),y=m.length;let x;for(r=0;r<y;r++)x=m[r],t.call(null,n[x],x,n)}}function lv(n,t){t=t.toLowerCase();const e=Object.keys(n);let r=e.length,v;for(;r-- >0;)if(v=e[r],t===v.toLowerCase())return v;return null}const hs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,cv=n=>!Na(n)&&n!==hs;function Sh(){const{caseless:n}=cv(this)&&this||{},t={},e=(r,v)=>{const m=n&&lv(t,v)||v;ql(t[m])&&ql(r)?t[m]=Sh(t[m],r):ql(r)?t[m]=Sh({},r):Zs(r)?t[m]=r.slice():t[m]=r};for(let r=0,v=arguments.length;r<v;r++)arguments[r]&&Da(arguments[r],e);return t}const SA=(n,t,e,{allOwnKeys:r}={})=>(Da(t,(v,m)=>{e&&Qr(v)?n[m]=ov(v,e):n[m]=v},{allOwnKeys:r}),n),TA=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),$A=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},MA=(n,t,e,r)=>{let v,m,y;const x={};if(t=t||{},n==null)return t;do{for(v=Object.getOwnPropertyNames(n),m=v.length;m-- >0;)y=v[m],(!r||r(y,n,t))&&!x[y]&&(t[y]=n[y],x[y]=!0);n=e!==!1&&Ah(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},IA=(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},RA=n=>{if(!n)return null;if(Zs(n))return n;let t=n.length;if(!av(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},EA=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Ah(Uint8Array)),LA=(n,t)=>{const e=(n&&n[Symbol.iterator]).call(n);let r;for(;(r=e.next())&&!r.done;){const v=r.value;t.call(n,v[0],v[1])}},OA=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},NA=Ii("HTMLFormElement"),DA=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),uv=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),FA=Ii("RegExp"),hv=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};Da(e,(v,m)=>{let y;(y=t(v,m,n))!==!1&&(r[m]=y||v)}),Object.defineProperties(n,r)},PA=n=>{hv(n,(t,e)=>{if(Qr(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(Qr(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+"'")})}})},WA=(n,t)=>{const e={},r=v=>{v.forEach(m=>{e[m]=!0})};return Zs(n)?r(n):r(String(n).split(t)),e},BA=()=>{},zA=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function jA(n){return!!(n&&Qr(n.append)&&n[Symbol.toStringTag]==="FormData"&&n[Symbol.iterator])}const HA=n=>{const t=new Array(10),e=(r,v)=>{if(Vl(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[v]=r;const m=Zs(r)?[]:{};return Da(r,(y,x)=>{const h=e(y,v+1);!Na(h)&&(m[x]=h)}),t[v]=void 0,m}}return r};return e(n,0)},UA=Ii("AsyncFunction"),VA=n=>n&&(Vl(n)||Qr(n))&&Qr(n.then)&&Qr(n.catch),dv=((n,t)=>n?setImmediate:t?((e,r)=>(hs.addEventListener("message",({source:v,data:m})=>{v===hs&&m===e&&r.length&&r.shift()()},!1),v=>{r.push(v),hs.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Qr(hs.postMessage)),qA=typeof queueMicrotask<"u"?queueMicrotask.bind(hs):typeof process<"u"&&process.nextTick||dv,Te={isArray:Zs,isArrayBuffer:sv,isBuffer:uA,isFormData:wA,isArrayBufferView:hA,isString:dA,isNumber:av,isBoolean:pA,isObject:Vl,isPlainObject:ql,isReadableStream:xA,isRequest:CA,isResponse:kA,isHeaders:_A,isUndefined:Na,isDate:gA,isFile:fA,isBlob:mA,isRegExp:FA,isFunction:Qr,isStream:yA,isURLSearchParams:bA,isTypedArray:EA,isFileList:vA,forEach:Da,merge:Sh,extend:SA,trim:AA,stripBOM:TA,inherits:$A,toFlatObject:MA,kindOf:Hl,kindOfTest:Ii,endsWith:IA,toArray:RA,forEachEntry:LA,matchAll:OA,isHTMLForm:NA,hasOwnProperty:uv,hasOwnProp:uv,reduceDescriptors:hv,freezeMethods:PA,toObjectSet:WA,toCamelCase:DA,noop:BA,toFiniteNumber:zA,findKey:lv,global:hs,isContextDefined:cv,isSpecCompliantForm:jA,toJSONObject:HA,isAsyncFn:UA,isThenable:VA,setImmediate:dv,asap:qA};function Tt(n,t,e,r,v){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),r&&(this.request=r),v&&(this.response=v,this.status=v.status?v.status:null)}Te.inherits(Tt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Te.toJSONObject(this.config),code:this.code,status:this.status}}});const pv=Tt.prototype,gv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{gv[n]={value:n}}),Object.defineProperties(Tt,gv),Object.defineProperty(pv,"isAxiosError",{value:!0}),Tt.from=(n,t,e,r,v,m)=>{const y=Object.create(pv);return Te.toFlatObject(n,y,function(x){return x!==Error.prototype},x=>x!=="isAxiosError"),Tt.call(y,n.message,t,e,r,v),y.cause=n,y.name=n.name,m&&Object.assign(y,m),y};const KA=null;function Th(n){return Te.isPlainObject(n)||Te.isArray(n)}function fv(n){return Te.endsWith(n,"[]")?n.slice(0,-2):n}function mv(n,t,e){return n?n.concat(t).map(function(r,v){return r=fv(r),!e&&v?"["+r+"]":r}).join(e?".":""):t}function GA(n){return Te.isArray(n)&&!n.some(Th)}const YA=Te.toFlatObject(Te,{},null,function(n){return/^is[A-Z]/.test(n)});function Kl(n,t,e){if(!Te.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=Te.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(a,o){return!Te.isUndefined(o[a])});const r=e.metaTokens,v=e.visitor||g,m=e.dots,y=e.indexes,x=(e.Blob||typeof Blob<"u"&&Blob)&&Te.isSpecCompliantForm(t);if(!Te.isFunction(v))throw new TypeError("visitor must be a function");function h(a){if(a===null)return"";if(Te.isDate(a))return a.toISOString();if(!x&&Te.isBlob(a))throw new Tt("Blob is not supported. Use a Buffer instead.");return Te.isArrayBuffer(a)||Te.isTypedArray(a)?x&&typeof Blob=="function"?new Blob([a]):Buffer.from(a):a}function g(a,o,u){let d=a;if(a&&!u&&typeof a=="object"){if(Te.endsWith(o,"{}"))o=r?o:o.slice(0,-2),a=JSON.stringify(a);else if(Te.isArray(a)&&GA(a)||(Te.isFileList(a)||Te.endsWith(o,"[]"))&&(d=Te.toArray(a)))return o=fv(o),d.forEach(function(w,b){!(Te.isUndefined(w)||w===null)&&t.append(y===!0?mv([o],b,m):y===null?o:o+"[]",h(w))}),!1}return Th(a)?!0:(t.append(mv(u,o,m),h(a)),!1)}const s=[],l=Object.assign(YA,{defaultVisitor:g,convertValue:h,isVisitable:Th});function c(a,o){if(!Te.isUndefined(a)){if(s.indexOf(a)!==-1)throw Error("Circular reference detected in "+o.join("."));s.push(a),Te.forEach(a,function(u,d){(!(Te.isUndefined(u)||u===null)&&v.call(t,u,Te.isString(d)?d.trim():d,o,l))===!0&&c(u,o?o.concat(d):[d])}),s.pop()}}if(!Te.isObject(n))throw new TypeError("data must be an object");return c(n),t}function vv(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function $h(n,t){this._pairs=[],n&&Kl(n,this,t)}const yv=$h.prototype;yv.append=function(n,t){this._pairs.push([n,t])},yv.toString=function(n){const t=n?function(e){return n.call(this,e,vv)}:vv;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function XA(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function wv(n,t,e){if(!t)return n;const r=e&&e.encode||XA;Te.isFunction(e)&&(e={serialize:e});const v=e&&e.serialize;let m;if(v?m=v(t,e):m=Te.isURLSearchParams(t)?t.toString():new $h(t,e).toString(r),m){const y=n.indexOf("#");y!==-1&&(n=n.slice(0,y)),n+=(n.indexOf("?")===-1?"?":"&")+m}return n}let bv=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){Te.forEach(this.handlers,function(e){e!==null&&t(e)})}};const xv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},QA=typeof URLSearchParams<"u"?URLSearchParams:$h,ZA=typeof FormData<"u"?FormData:null,JA=typeof Blob<"u"?Blob:null,eS={isBrowser:!0,classes:{URLSearchParams:QA,FormData:ZA,Blob:JA},protocols:["http","https","file","blob","url","data"]},Mh=typeof window<"u"&&typeof document<"u",Ih=typeof navigator=="object"&&navigator||void 0,tS=Mh&&(!Ih||["ReactNative","NativeScript","NS"].indexOf(Ih.product)<0),nS=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",rS=Mh&&window.location.href||"http://localhost",iS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Mh,hasStandardBrowserEnv:tS,hasStandardBrowserWebWorkerEnv:nS,navigator:Ih,origin:rS},Symbol.toStringTag,{value:"Module"})),wr={...iS,...eS};function oS(n,t){return Kl(n,new wr.classes.URLSearchParams,Object.assign({visitor:function(e,r,v,m){return wr.isNode&&Te.isBuffer(e)?(this.append(r,e.toString("base64")),!1):m.defaultVisitor.apply(this,arguments)}},t))}function sS(n){return Te.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function aS(n){const t={},e=Object.keys(n);let r;const v=e.length;let m;for(r=0;r<v;r++)m=e[r],t[m]=n[m];return t}function Cv(n){function t(e,r,v,m){let y=e[m++];if(y==="__proto__")return!0;const x=Number.isFinite(+y),h=m>=e.length;return y=!y&&Te.isArray(v)?v.length:y,h?(Te.hasOwnProp(v,y)?v[y]=[v[y],r]:v[y]=r,!x):((!v[y]||!Te.isObject(v[y]))&&(v[y]=[]),t(e,r,v[y],m)&&Te.isArray(v[y])&&(v[y]=aS(v[y])),!x)}if(Te.isFormData(n)&&Te.isFunction(n.entries)){const e={};return Te.forEachEntry(n,(r,v)=>{t(sS(r),v,e,0)}),e}return null}function lS(n,t,e){if(Te.isString(n))try{return(t||JSON.parse)(n),Te.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const Fa={transitional:xv,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,v=Te.isObject(n);if(v&&Te.isHTMLForm(n)&&(n=new FormData(n)),Te.isFormData(n))return r?JSON.stringify(Cv(n)):n;if(Te.isArrayBuffer(n)||Te.isBuffer(n)||Te.isStream(n)||Te.isFile(n)||Te.isBlob(n)||Te.isReadableStream(n))return n;if(Te.isArrayBufferView(n))return n.buffer;if(Te.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let m;if(v){if(e.indexOf("application/x-www-form-urlencoded")>-1)return oS(n,this.formSerializer).toString();if((m=Te.isFileList(n))||e.indexOf("multipart/form-data")>-1){const y=this.env&&this.env.FormData;return Kl(m?{"files[]":n}:n,y&&new y,this.formSerializer)}}return v||r?(t.setContentType("application/json",!1),lS(n)):n}],transformResponse:[function(n){const t=this.transitional||Fa.transitional,e=t&&t.forcedJSONParsing,r=this.responseType==="json";if(Te.isResponse(n)||Te.isReadableStream(n))return n;if(n&&Te.isString(n)&&(e&&!this.responseType||r)){const v=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(m){if(v)throw m.name==="SyntaxError"?Tt.from(m,Tt.ERR_BAD_RESPONSE,this,null,this.response):m}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:wr.classes.FormData,Blob:wr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Te.forEach(["delete","get","head","post","put","patch"],n=>{Fa.headers[n]={}});const cS=Te.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),uS=n=>{const t={};let e,r,v;return n&&n.split(`
|
1486
|
+
`).forEach(function(m){v=m.indexOf(":"),e=m.substring(0,v).trim().toLowerCase(),r=m.substring(v+1).trim(),!(!e||t[e]&&cS[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},kv=Symbol("internals");function Pa(n){return n&&String(n).trim().toLowerCase()}function Gl(n){return n===!1||n==null?n:Te.isArray(n)?n.map(Gl):String(n)}function hS(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 dS=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Rh(n,t,e,r,v){if(Te.isFunction(r))return r.call(this,t,e);if(v&&(t=e),!!Te.isString(t)){if(Te.isString(r))return t.indexOf(r)!==-1;if(Te.isRegExp(r))return r.test(t)}}function pS(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function gS(n,t){const e=Te.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{value:function(v,m,y){return this[r].call(this,t,v,m,y)},configurable:!0})})}let Pr=class{constructor(t){t&&this.set(t)}set(t,e,r){const v=this;function m(x,h,g){const s=Pa(h);if(!s)throw new Error("header name must be a non-empty string");const l=Te.findKey(v,s);(!l||v[l]===void 0||g===!0||g===void 0&&v[l]!==!1)&&(v[l||h]=Gl(x))}const y=(x,h)=>Te.forEach(x,(g,s)=>m(g,s,h));if(Te.isPlainObject(t)||t instanceof this.constructor)y(t,e);else if(Te.isString(t)&&(t=t.trim())&&!dS(t))y(uS(t),e);else if(Te.isHeaders(t))for(const[x,h]of t.entries())m(h,x,r);else t!=null&&m(e,t,r);return this}get(t,e){if(t=Pa(t),t){const r=Te.findKey(this,t);if(r){const v=this[r];if(!e)return v;if(e===!0)return hS(v);if(Te.isFunction(e))return e.call(this,v,r);if(Te.isRegExp(e))return e.exec(v);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Pa(t),t){const r=Te.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||Rh(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let v=!1;function m(y){if(y=Pa(y),y){const x=Te.findKey(r,y);x&&(!e||Rh(r,r[x],x,e))&&(delete r[x],v=!0)}}return Te.isArray(t)?t.forEach(m):m(t),v}clear(t){const e=Object.keys(this);let r=e.length,v=!1;for(;r--;){const m=e[r];(!t||Rh(this,this[m],m,t,!0))&&(delete this[m],v=!0)}return v}normalize(t){const e=this,r={};return Te.forEach(this,(v,m)=>{const y=Te.findKey(r,m);if(y){e[y]=Gl(v),delete e[m];return}const x=t?pS(m):String(m).trim();x!==m&&delete e[m],e[x]=Gl(v),r[x]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return Te.forEach(this,(r,v)=>{r!=null&&r!==!1&&(e[v]=t&&Te.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(`
|
1487
|
+
`)}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(v=>r.set(v)),r}static accessor(t){const e=(this[kv]=this[kv]={accessors:{}}).accessors,r=this.prototype;function v(m){const y=Pa(m);e[y]||(gS(r,m),e[y]=!0)}return Te.isArray(t)?t.forEach(v):v(t),this}};Pr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Te.reduceDescriptors(Pr.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),Te.freezeMethods(Pr);function Eh(n,t){const e=this||Fa,r=t||e,v=Pr.from(r.headers);let m=r.data;return Te.forEach(n,function(y){m=y.call(e,m,v.normalize(),t?t.status:void 0)}),v.normalize(),m}function _v(n){return!!(n&&n.__CANCEL__)}function Js(n,t,e){Tt.call(this,n??"canceled",Tt.ERR_CANCELED,t,e),this.name="CanceledError"}Te.inherits(Js,Tt,{__CANCEL__:!0});function Av(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new Tt("Request failed with status code "+e.status,[Tt.ERR_BAD_REQUEST,Tt.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function fS(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function mS(n,t){n=n||10;const e=new Array(n),r=new Array(n);let v=0,m=0,y;return t=t!==void 0?t:1e3,function(x){const h=Date.now(),g=r[m];y||(y=h),e[v]=x,r[v]=h;let s=m,l=0;for(;s!==v;)l+=e[s++],s=s%n;if(v=(v+1)%n,v===m&&(m=(m+1)%n),h-y<t)return;const c=g&&h-g;return c?Math.round(l*1e3/c):void 0}}function vS(n,t){let e=0,r=1e3/t,v,m;const y=(x,h=Date.now())=>{e=h,v=null,m&&(clearTimeout(m),m=null),n.apply(null,x)};return[(...x)=>{const h=Date.now(),g=h-e;g>=r?y(x,h):(v=x,m||(m=setTimeout(()=>{m=null,y(v)},r-g)))},()=>v&&y(v)]}const Yl=(n,t,e=3)=>{let r=0;const v=mS(50,250);return vS(m=>{const y=m.loaded,x=m.lengthComputable?m.total:void 0,h=y-r,g=v(h),s=y<=x;r=y;const l={loaded:y,total:x,progress:x?y/x:void 0,bytes:h,rate:g||void 0,estimated:g&&x&&s?(x-y)/g:void 0,event:m,lengthComputable:x!=null,[t?"download":"upload"]:!0};n(l)},e)},Sv=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},Tv=n=>(...t)=>Te.asap(()=>n(...t)),yS=wr.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,wr.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(wr.origin),wr.navigator&&/(msie|trident)/i.test(wr.navigator.userAgent)):()=>!0,wS=wr.hasStandardBrowserEnv?{write(n,t,e,r,v,m){const y=[n+"="+encodeURIComponent(t)];Te.isNumber(e)&&y.push("expires="+new Date(e).toGMTString()),Te.isString(r)&&y.push("path="+r),Te.isString(v)&&y.push("domain="+v),m===!0&&y.push("secure"),document.cookie=y.join("; ")},read(n){const t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function bS(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function xS(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function $v(n,t,e){let r=!bS(t);return n&&(r||e==!1)?xS(n,t):t}const Mv=n=>n instanceof Pr?{...n}:n;function ds(n,t){t=t||{};const e={};function r(g,s,l,c){return Te.isPlainObject(g)&&Te.isPlainObject(s)?Te.merge.call({caseless:c},g,s):Te.isPlainObject(s)?Te.merge({},s):Te.isArray(s)?s.slice():s}function v(g,s,l,c){if(Te.isUndefined(s)){if(!Te.isUndefined(g))return r(void 0,g,l,c)}else return r(g,s,l,c)}function m(g,s){if(!Te.isUndefined(s))return r(void 0,s)}function y(g,s){if(Te.isUndefined(s)){if(!Te.isUndefined(g))return r(void 0,g)}else return r(void 0,s)}function x(g,s,l){if(l in t)return r(g,s);if(l in n)return r(void 0,g)}const h={url:m,method:m,data:m,baseURL:y,transformRequest:y,transformResponse:y,paramsSerializer:y,timeout:y,timeoutMessage:y,withCredentials:y,withXSRFToken:y,adapter:y,responseType:y,xsrfCookieName:y,xsrfHeaderName:y,onUploadProgress:y,onDownloadProgress:y,decompress:y,maxContentLength:y,maxBodyLength:y,beforeRedirect:y,transport:y,httpAgent:y,httpsAgent:y,cancelToken:y,socketPath:y,responseEncoding:y,validateStatus:x,headers:(g,s,l)=>v(Mv(g),Mv(s),l,!0)};return Te.forEach(Object.keys(Object.assign({},n,t)),function(g){const s=h[g]||v,l=s(n[g],t[g],g);Te.isUndefined(l)&&s!==x||(e[g]=l)}),e}const Iv=n=>{const t=ds({},n);let{data:e,withXSRFToken:r,xsrfHeaderName:v,xsrfCookieName:m,headers:y,auth:x}=t;t.headers=y=Pr.from(y),t.url=wv($v(t.baseURL,t.url,t.allowAbsoluteUrls),n.params,n.paramsSerializer),x&&y.set("Authorization","Basic "+btoa((x.username||"")+":"+(x.password?unescape(encodeURIComponent(x.password)):"")));let h;if(Te.isFormData(e)){if(wr.hasStandardBrowserEnv||wr.hasStandardBrowserWebWorkerEnv)y.setContentType(void 0);else if((h=y.getContentType())!==!1){const[g,...s]=h?h.split(";").map(l=>l.trim()).filter(Boolean):[];y.setContentType([g||"multipart/form-data",...s].join("; "))}}if(wr.hasStandardBrowserEnv&&(r&&Te.isFunction(r)&&(r=r(t)),r||r!==!1&&yS(t.url))){const g=v&&m&&wS.read(m);g&&y.set(v,g)}return t},CS=typeof XMLHttpRequest<"u",kS=CS&&function(n){return new Promise(function(t,e){const r=Iv(n);let v=r.data;const m=Pr.from(r.headers).normalize();let{responseType:y,onUploadProgress:x,onDownloadProgress:h}=r,g,s,l,c,a;function o(){c&&c(),a&&a(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let u=new XMLHttpRequest;u.open(r.method.toUpperCase(),r.url,!0),u.timeout=r.timeout;function d(){if(!u)return;const b=Pr.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),E={data:!y||y==="text"||y==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:b,config:n,request:u};Av(function($){t($),o()},function($){e($),o()},E),u=null}"onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(d)},u.onabort=function(){u&&(e(new Tt("Request aborted",Tt.ECONNABORTED,n,u)),u=null)},u.onerror=function(){e(new Tt("Network Error",Tt.ERR_NETWORK,n,u)),u=null},u.ontimeout=function(){let b=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||xv;r.timeoutErrorMessage&&(b=r.timeoutErrorMessage),e(new Tt(b,E.clarifyTimeoutError?Tt.ETIMEDOUT:Tt.ECONNABORTED,n,u)),u=null},v===void 0&&m.setContentType(null),"setRequestHeader"in u&&Te.forEach(m.toJSON(),function(b,E){u.setRequestHeader(E,b)}),Te.isUndefined(r.withCredentials)||(u.withCredentials=!!r.withCredentials),y&&y!=="json"&&(u.responseType=r.responseType),h&&([l,a]=Yl(h,!0),u.addEventListener("progress",l)),x&&u.upload&&([s,c]=Yl(x),u.upload.addEventListener("progress",s),u.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(g=b=>{u&&(e(!b||b.type?new Js(null,n,u):b),u.abort(),u=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const w=fS(r.url);if(w&&wr.protocols.indexOf(w)===-1){e(new Tt("Unsupported protocol "+w+":",Tt.ERR_BAD_REQUEST,n));return}u.send(v||null)})},_S=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let r=new AbortController,v;const m=function(g){if(!v){v=!0,x();const s=g instanceof Error?g:this.reason;r.abort(s instanceof Tt?s:new Js(s instanceof Error?s.message:s))}};let y=t&&setTimeout(()=>{y=null,m(new Tt(`timeout ${t} of ms exceeded`,Tt.ETIMEDOUT))},t);const x=()=>{n&&(y&&clearTimeout(y),y=null,n.forEach(g=>{g.unsubscribe?g.unsubscribe(m):g.removeEventListener("abort",m)}),n=null)};n.forEach(g=>g.addEventListener("abort",m));const{signal:h}=r;return h.unsubscribe=()=>Te.asap(x),h}},AS=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let r=0,v;for(;r<e;)v=r+t,yield n.slice(r,v),r=v},SS=async function*(n,t){for await(const e of TS(n))yield*AS(e,t)},TS=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()}},Rv=(n,t,e,r)=>{const v=SS(n,t);let m=0,y,x=h=>{y||(y=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:g,value:s}=await v.next();if(g){x(),h.close();return}let l=s.byteLength;if(e){let c=m+=l;e(c)}h.enqueue(new Uint8Array(s))}catch(g){throw x(g),g}},cancel(h){return x(h),v.return()}},{highWaterMark:2})},Xl=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ev=Xl&&typeof ReadableStream=="function",$S=Xl&&(typeof TextEncoder=="function"?(n=>t=>n.encode(t))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),Lv=(n,...t)=>{try{return!!n(...t)}catch{return!1}},MS=Ev&&Lv(()=>{let n=!1;const t=new Request(wr.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!t}),Ov=64*1024,Lh=Ev&&Lv(()=>Te.isReadableStream(new Response("").body)),Ql={stream:Lh&&(n=>n.body)};Xl&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ql[t]&&(Ql[t]=Te.isFunction(n[t])?e=>e[t]():(e,r)=>{throw new Tt(`Response type '${t}' is not supported`,Tt.ERR_NOT_SUPPORT,r)})})})(new Response);const IS=async n=>{if(n==null)return 0;if(Te.isBlob(n))return n.size;if(Te.isSpecCompliantForm(n))return(await new Request(wr.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(Te.isArrayBufferView(n)||Te.isArrayBuffer(n))return n.byteLength;if(Te.isURLSearchParams(n)&&(n=n+""),Te.isString(n))return(await $S(n)).byteLength},RS=async(n,t)=>Te.toFiniteNumber(n.getContentLength())??IS(t),ES=Xl&&(async n=>{let{url:t,method:e,data:r,signal:v,cancelToken:m,timeout:y,onDownloadProgress:x,onUploadProgress:h,responseType:g,headers:s,withCredentials:l="same-origin",fetchOptions:c}=Iv(n);g=g?(g+"").toLowerCase():"text";let a=_S([v,m&&m.toAbortSignal()],y),o;const u=a&&a.unsubscribe&&(()=>{a.unsubscribe()});let d;try{if(h&&MS&&e!=="get"&&e!=="head"&&(d=await RS(s,r))!==0){let _=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(Te.isFormData(r)&&(C=_.headers.get("content-type"))&&s.setContentType(C),_.body){const[R,L]=Sv(d,Yl(Tv(h)));r=Rv(_.body,Ov,R,L)}}Te.isString(l)||(l=l?"include":"omit");const w="credentials"in Request.prototype;o=new Request(t,{...c,signal:a,method:e.toUpperCase(),headers:s.normalize().toJSON(),body:r,duplex:"half",credentials:w?l:void 0});let b=await fetch(o);const E=Lh&&(g==="stream"||g==="response");if(Lh&&(x||E&&u)){const _={};["status","statusText","headers"].forEach(F=>{_[F]=b[F]});const C=Te.toFiniteNumber(b.headers.get("content-length")),[R,L]=x&&Sv(C,Yl(Tv(x),!0))||[];b=new Response(Rv(b.body,Ov,R,()=>{L&&L(),u&&u()}),_)}g=g||"text";let $=await Ql[Te.findKey(Ql,g)||"text"](b,n);return!E&&u&&u(),await new Promise((_,C)=>{Av(_,C,{data:$,headers:Pr.from(b.headers),status:b.status,statusText:b.statusText,config:n,request:o})})}catch(w){throw u&&u(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new Tt("Network Error",Tt.ERR_NETWORK,n,o),{cause:w.cause||w}):Tt.from(w,w&&w.code,n,o)}}),Oh={http:KA,xhr:kS,fetch:ES};Te.forEach(Oh,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const Nv=n=>`- ${n}`,LS=n=>Te.isFunction(n)||n===null||n===!1,Dv={getAdapter:n=>{n=Te.isArray(n)?n:[n];const{length:t}=n;let e,r;const v={};for(let m=0;m<t;m++){e=n[m];let y;if(r=e,!LS(e)&&(r=Oh[(y=String(e)).toLowerCase()],r===void 0))throw new Tt(`Unknown adapter '${y}'`);if(r)break;v[y||"#"+m]=r}if(!r){const m=Object.entries(v).map(([x,h])=>`adapter ${x} `+(h===!1?"is not supported by the environment":"is not available in the build"));let y=t?m.length>1?`since :
|
1488
|
+
`+m.map(Nv).join(`
|
1489
|
+
`):" "+Nv(m[0]):"as no adapter specified";throw new Tt("There is no suitable adapter to dispatch the request "+y,"ERR_NOT_SUPPORT")}return r},adapters:Oh};function Nh(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Js(null,n)}function Fv(n){return Nh(n),n.headers=Pr.from(n.headers),n.data=Eh.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Dv.getAdapter(n.adapter||Fa.adapter)(n).then(function(t){return Nh(n),t.data=Eh.call(n,n.transformResponse,t),t.headers=Pr.from(t.headers),t},function(t){return _v(t)||(Nh(n),t&&t.response&&(t.response.data=Eh.call(n,n.transformResponse,t.response),t.response.headers=Pr.from(t.response.headers))),Promise.reject(t)})}const Pv="1.8.4",Zl={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Zl[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const Wv={};Zl.transitional=function(n,t,e){function r(v,m){return"[Axios v"+Pv+"] Transitional option '"+v+"'"+m+(e?". "+e:"")}return(v,m,y)=>{if(n===!1)throw new Tt(r(m," has been removed"+(t?" in "+t:"")),Tt.ERR_DEPRECATED);return t&&!Wv[m]&&(Wv[m]=!0,console.warn(r(m," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(v,m,y):!0}},Zl.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function OS(n,t,e){if(typeof n!="object")throw new Tt("options must be an object",Tt.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let v=r.length;for(;v-- >0;){const m=r[v],y=t[m];if(y){const x=n[m],h=x===void 0||y(x,m,n);if(h!==!0)throw new Tt("option "+m+" must be "+h,Tt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new Tt("Unknown option "+m,Tt.ERR_BAD_OPTION)}}const Jl={assertOptions:OS,validators:Zl},Vi=Jl.validators;let ps=class{constructor(t){this.defaults=t,this.interceptors={request:new bv,response:new bv}}async request(t,e){try{return await this._request(t,e)}catch(r){if(r instanceof Error){let v={};Error.captureStackTrace?Error.captureStackTrace(v):v=new Error;const m=v.stack?v.stack.replace(/^.+\n/,""):"";try{r.stack?m&&!String(r.stack).endsWith(m.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
1490
|
+
`+m):r.stack=m}catch{}}throw r}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=ds(this.defaults,e);const{transitional:r,paramsSerializer:v,headers:m}=e;r!==void 0&&Jl.assertOptions(r,{silentJSONParsing:Vi.transitional(Vi.boolean),forcedJSONParsing:Vi.transitional(Vi.boolean),clarifyTimeoutError:Vi.transitional(Vi.boolean)},!1),v!=null&&(Te.isFunction(v)?e.paramsSerializer={serialize:v}:Jl.assertOptions(v,{encode:Vi.function,serialize:Vi.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Jl.assertOptions(e,{baseUrl:Vi.spelling("baseURL"),withXsrfToken:Vi.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let y=m&&Te.merge(m.common,m[e.method]);m&&Te.forEach(["delete","get","head","post","put","patch","common"],o=>{delete m[o]}),e.headers=Pr.concat(y,m);const x=[];let h=!0;this.interceptors.request.forEach(function(o){typeof o.runWhen=="function"&&o.runWhen(e)===!1||(h=h&&o.synchronous,x.unshift(o.fulfilled,o.rejected))});const g=[];this.interceptors.response.forEach(function(o){g.push(o.fulfilled,o.rejected)});let s,l=0,c;if(!h){const o=[Fv.bind(this),void 0];for(o.unshift.apply(o,x),o.push.apply(o,g),c=o.length,s=Promise.resolve(e);l<c;)s=s.then(o[l++],o[l++]);return s}c=x.length;let a=e;for(l=0;l<c;){const o=x[l++],u=x[l++];try{a=o(a)}catch(d){u.call(this,d);break}}try{s=Fv.call(this,a)}catch(o){return Promise.reject(o)}for(l=0,c=g.length;l<c;)s=s.then(g[l++],g[l++]);return s}getUri(t){t=ds(this.defaults,t);const e=$v(t.baseURL,t.url,t.allowAbsoluteUrls);return wv(e,t.params,t.paramsSerializer)}};Te.forEach(["delete","get","head","options"],function(n){ps.prototype[n]=function(t,e){return this.request(ds(e||{},{method:n,url:t,data:(e||{}).data}))}}),Te.forEach(["post","put","patch"],function(n){function t(e){return function(r,v,m){return this.request(ds(m||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:v}))}}ps.prototype[n]=t(),ps.prototype[n+"Form"]=t(!0)});let NS=class cb{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(v){e=v});const r=this;this.promise.then(v=>{if(!r._listeners)return;let m=r._listeners.length;for(;m-- >0;)r._listeners[m](v);r._listeners=null}),this.promise.then=v=>{let m;const y=new Promise(x=>{r.subscribe(x),m=x}).then(v);return y.cancel=function(){r.unsubscribe(m)},y},t(function(v,m,y){r.reason||(r.reason=new Js(v,m,y),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 cb(function(e){t=e}),cancel:t}}};function DS(n){return function(t){return n.apply(null,t)}}function FS(n){return Te.isObject(n)&&n.isAxiosError===!0}const Dh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Dh).forEach(([n,t])=>{Dh[t]=n});function Bv(n){const t=new ps(n),e=ov(ps.prototype.request,t);return Te.extend(e,ps.prototype,t,{allOwnKeys:!0}),Te.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Bv(ds(n,r))},e}const Kn=$r("E",Bv(Fa));Kn.Axios=ps,Kn.CanceledError=Js,Kn.CancelToken=NS,Kn.isCancel=_v,Kn.VERSION=Pv,Kn.toFormData=Kl,Kn.AxiosError=Tt,Kn.Cancel=Kn.CanceledError,Kn.all=function(n){return Promise.all(n)},Kn.spread=DS,Kn.isAxiosError=FS,Kn.mergeConfig=ds,Kn.AxiosHeaders=Pr,Kn.formToJSON=n=>Cv(Te.isHTMLForm(n)?new FormData(n):n),Kn.getAdapter=Dv.getAdapter,Kn.HttpStatusCode=Dh,Kn.default=Kn;const{Axios:V2,AxiosError:q2,CanceledError:K2,isCancel:G2,CancelToken:Y2,VERSION:X2,all:Q2,Cancel:Z2,isAxiosError:J2,spread:eN,toFormData:tN,AxiosHeaders:nN,HttpStatusCode:rN,formToJSON:iN,getAdapter:oN,mergeConfig:sN}=Kn;function zv(){return Object.assign({},Ns())}function PS(n,t,e){const r=yn(n,void 0);return r.setTime(r.getTime()+t*sl),r}function WS(n,t){const e=()=>Vn(void 0,NaN),r=HS(n);let v;if(r.date){const h=US(r.date,2);v=VS(h.restDateString,h.year)}if(!v||isNaN(+v))return e();const m=+v;let y=0,x;if(r.time&&(y=qS(r.time),isNaN(y)))return e();if(r.timezone){if(x=KS(r.timezone),isNaN(x))return e()}else{const h=new Date(m+y),g=yn(0,void 0);return g.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),g.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),g}return yn(m+y+x,void 0)}const ec={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},BS=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,zS=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,jS=/^([+-])(\d{2})(?::?(\d{2}))?$/;function HS(n){const t={},e=n.split(ec.dateTimeDelimiter);let r;if(e.length>2)return t;if(/:/.test(e[0])?r=e[0]:(t.date=e[0],r=e[1],ec.timeZoneDelimiter.test(t.date)&&(t.date=n.split(ec.timeZoneDelimiter)[0],r=n.substr(t.date.length,n.length))),r){const v=ec.timezone.exec(r);v?(t.time=r.replace(v[1],""),t.timezone=v[1]):t.time=r}return t}function US(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 v=r[1]?parseInt(r[1]):null,m=r[2]?parseInt(r[2]):null;return{year:m===null?v:m*100,restDateString:n.slice((r[1]||r[2]).length)}}function VS(n,t){if(t===null)return new Date(NaN);const e=n.match(BS);if(!e)return new Date(NaN);const r=!!e[4],v=Wa(e[1]),m=Wa(e[2])-1,y=Wa(e[3]),x=Wa(e[4]),h=Wa(e[5])-1;if(r)return ZS(t,x,h)?GS(t,x,h):new Date(NaN);{const g=new Date(0);return!XS(t,m,y)||!QS(t,v)?new Date(NaN):(g.setUTCFullYear(t,m,Math.max(v,y)),g)}}function Wa(n){return n?parseInt(n):1}function qS(n){const t=n.match(zS);if(!t)return NaN;const e=Fh(t[1]),r=Fh(t[2]),v=Fh(t[3]);return JS(e,r,v)?e*jc+r*sl+v*1e3:NaN}function Fh(n){return n&&parseFloat(n.replace(",","."))||0}function KS(n){if(n==="Z")return 0;const t=n.match(jS);if(!t)return 0;const e=t[1]==="+"?-1:1,r=parseInt(t[2]),v=t[3]&&parseInt(t[3])||0;return eT(r,v)?e*(r*jc+v*sl):NaN}function GS(n,t,e){const r=new Date(0);r.setUTCFullYear(n,0,4);const v=r.getUTCDay()||7,m=(t-1)*7+e+1-v;return r.setUTCDate(r.getUTCDate()+m),r}const YS=[31,null,31,30,31,30,31,31,30,31,30,31];function jv(n){return n%400===0||n%4===0&&n%100!==0}function XS(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(YS[t]||(jv(n)?29:28))}function QS(n,t){return t>=1&&t<=(jv(n)?366:365)}function ZS(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function JS(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function eT(n,t){return t>=0&&t<=59}function tT(n,t,e){return PS(n,-t)}function Hv(n,t,e){const r=zv(),v=iT(n,e.timeZone,e.locale??r.locale);return"formatToParts"in v?nT(v,t):rT(v,t)}function nT(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 rT(n,t){const e=n.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(e);return r?r[0].substr(1):""}function iT(n,t,e){return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:t,timeZoneName:n})}function oT(n,t){const e=uT(t);return"formatToParts"in e?aT(e,n):lT(e,n)}const sT={year:0,month:1,day:2,hour:3,minute:4,second:5};function aT(n,t){try{const e=n.formatToParts(t),r=[];for(let v=0;v<e.length;v++){const m=sT[e[v].type];m!==void 0&&(r[m]=parseInt(e[v].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}function lT(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 Ph={},Uv=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")),cT=Uv==="06/25/2014, 00:00:00"||Uv==="06/25/2014 00:00:00";function uT(n){return Ph[n]||(Ph[n]=cT?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"})),Ph[n]}function Vv(n,t,e,r,v,m,y){const x=new Date(0);return x.setUTCFullYear(n,t,e),x.setUTCHours(r,v,m,y),x}const qv=36e5,hT=6e4,Wh={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Bh(n,t,e){if(!n)return 0;let r=Wh.timezoneZ.exec(n);if(r)return 0;let v,m;if(r=Wh.timezoneHH.exec(n),r)return v=parseInt(r[1],10),Kv(v)?-(v*qv):NaN;if(r=Wh.timezoneHHMM.exec(n),r){v=parseInt(r[2],10);const y=parseInt(r[3],10);return Kv(v,y)?(m=Math.abs(v)*qv+y*hT,r[1]==="+"?-m:m):NaN}if(gT(n)){t=new Date(t||Date.now());const y=e?t:dT(t),x=zh(y,n);return-(e?x:pT(t,x,n))}return NaN}function dT(n){return Vv(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function zh(n,t){const e=oT(n,t),r=Vv(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime();let v=n.getTime();const m=v%1e3;return v-=m>=0?m:1e3+m,r-v}function pT(n,t,e){let r=n.getTime()-t;const v=zh(new Date(r),e);if(t===v)return t;r-=v-t;const m=zh(new Date(r),e);return v===m?v:Math.max(v,m)}function Kv(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}const Gv={};function gT(n){if(Gv[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),Gv[n]=!0,!0}catch{return!1}}const fT=60*1e3,mT={X:function(n,t,e){const r=jh(e.timeZone,n);if(r===0)return"Z";switch(t){case"X":return Yv(r);case"XXXX":case"XX":return ea(r);case"XXXXX":case"XXX":default:return ea(r,":")}},x:function(n,t,e){const r=jh(e.timeZone,n);switch(t){case"x":return Yv(r);case"xxxx":case"xx":return ea(r);case"xxxxx":case"xxx":default:return ea(r,":")}},O:function(n,t,e){const r=jh(e.timeZone,n);switch(t){case"O":case"OO":case"OOO":return"GMT"+vT(r,":");case"OOOO":default:return"GMT"+ea(r,":")}},z:function(n,t,e){switch(t){case"z":case"zz":case"zzz":return Hv("short",n,e);case"zzzz":default:return Hv("long",n,e)}}};function jh(n,t){const e=n?Bh(n,t,!0)/fT:(t==null?void 0:t.getTimezoneOffset())??0;if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+n);return e}function tc(n,t){const e=n<0?"-":"";let r=Math.abs(n).toString();for(;r.length<t;)r="0"+r;return e+r}function ea(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),v=tc(Math.floor(r/60),2),m=tc(Math.floor(r%60),2);return e+v+t+m}function Yv(n,t){return n%60===0?(n>0?"-":"+")+tc(Math.abs(n)/60,2):ea(n,t)}function vT(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),v=Math.floor(r/60),m=r%60;return m===0?e+String(v):e+String(v)+t+tc(m,2)}function Xv(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 yT=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Hh=36e5,Qv=6e4,wT=2,Ir={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:yT};function Zv(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?wT: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=bT(n),{year:v,restDateString:m}=xT(r.date,e),y=CT(m,v);if(y===null||isNaN(y.getTime()))return new Date(NaN);if(y){const x=y.getTime();let h=0,g;if(r.time&&(h=kT(r.time),h===null||isNaN(h)))return new Date(NaN);if(r.timeZone||t.timeZone){if(g=Bh(r.timeZone||t.timeZone,new Date(x+h)),isNaN(g))return new Date(NaN)}else g=Xv(new Date(x+h)),g=Xv(new Date(x+h+g));return new Date(x+h+g)}else return new Date(NaN)}function bT(n){const t={};let e=Ir.dateTimePattern.exec(n),r;if(e?(t.date=e[1],r=e[3]):(e=Ir.datePattern.exec(n),e?(t.date=e[1],r=e[2]):(t.date=null,r=n)),r){const v=Ir.timeZone.exec(r);v?(t.time=r.replace(v[1],""),t.timeZone=v[1].trim()):t.time=r}return t}function xT(n,t){if(n){const e=Ir.YYY[t],r=Ir.YYYYY[t];let v=Ir.YYYY.exec(n)||r.exec(n);if(v){const m=v[1];return{year:parseInt(m,10),restDateString:n.slice(m.length)}}if(v=Ir.YY.exec(n)||e.exec(n),v){const m=v[1];return{year:parseInt(m,10)*100,restDateString:n.slice(m.length)}}}return{year:null}}function CT(n,t){if(t===null)return null;let e,r,v;if(!n||!n.length)return e=new Date(0),e.setUTCFullYear(t),e;let m=Ir.MM.exec(n);if(m)return e=new Date(0),r=parseInt(m[1],10)-1,ty(t,r)?(e.setUTCFullYear(t,r),e):new Date(NaN);if(m=Ir.DDD.exec(n),m){e=new Date(0);const y=parseInt(m[1],10);return ST(t,y)?(e.setUTCFullYear(t,0,y),e):new Date(NaN)}if(m=Ir.MMDD.exec(n),m){e=new Date(0),r=parseInt(m[1],10)-1;const y=parseInt(m[2],10);return ty(t,r,y)?(e.setUTCFullYear(t,r,y),e):new Date(NaN)}if(m=Ir.Www.exec(n),m)return v=parseInt(m[1],10)-1,ny(v)?Jv(t,v):new Date(NaN);if(m=Ir.WwwD.exec(n),m){v=parseInt(m[1],10)-1;const y=parseInt(m[2],10)-1;return ny(v,y)?Jv(t,v,y):new Date(NaN)}return null}function kT(n){let t,e,r=Ir.HH.exec(n);if(r)return t=parseFloat(r[1].replace(",",".")),Uh(t)?t%24*Hh:NaN;if(r=Ir.HHMM.exec(n),r)return t=parseInt(r[1],10),e=parseFloat(r[2].replace(",",".")),Uh(t,e)?t%24*Hh+e*Qv:NaN;if(r=Ir.HHMMSS.exec(n),r){t=parseInt(r[1],10),e=parseInt(r[2],10);const v=parseFloat(r[3].replace(",","."));return Uh(t,e,v)?t%24*Hh+e*Qv+v*1e3:NaN}return null}function Jv(n,t,e){t=t||0,e=e||0;const r=new Date(0);r.setUTCFullYear(n,0,4);const v=r.getUTCDay()||7,m=t*7+e+1-v;return r.setUTCDate(r.getUTCDate()+m),r}const _T=[31,28,31,30,31,30,31,31,30,31,30,31],AT=[31,29,31,30,31,30,31,31,30,31,30,31];function ey(n){return n%400===0||n%4===0&&n%100!==0}function ty(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;const r=ey(n);if(r&&e>AT[t]||!r&&e>_T[t])return!1}return!0}function ST(n,t){if(t<1)return!1;const e=ey(n);return!(e&&t>366||!e&&t>365)}function ny(n,t){return!(n<0||n>52||t!=null&&(t<0||t>6))}function Uh(n,t,e){return!(n<0||n>=25||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}const TT=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function $T(n,t,e={}){t=String(t);const r=t.match(TT);if(r){const v=Zv(e.originalDate||n,e);t=r.reduce(function(m,y){if(y[0]==="'")return m;const x=m.indexOf(y),h=m[x-1]==="'",g=m.replace(y,"'"+mT[y[0]](v,y,e)+"'");return h?g.substring(0,x-1)+g.substring(x+1):g},t)}return Ps(n,t,e)}function MT(n,t,e){n=Zv(n,e);const r=Bh(t,n,!0),v=new Date(n.getTime()-r),m=new Date(0);return m.setFullYear(v.getUTCFullYear(),v.getUTCMonth(),v.getUTCDate()),m.setHours(v.getUTCHours(),v.getUTCMinutes(),v.getUTCSeconds(),v.getUTCMilliseconds()),m}function Vh(n,t,e,r){return r={...r,timeZone:t,originalDate:n},$T(MT(n,t,{timeZone:r.timeZone}),e,r)}const qh="yyyy-MM-dd",ry="HH:mm:ss.SSS",IT="HH:mm:ss",nc=`${qh} ${ry}`,aN=$r("P",{methods:{parseDateTime(n,t){return n.includes(" ")&&(n=n.replace(" ","T")),t&&t==="UTC"&&(n+="Z"),Date.parse(n)},formatUtcToLocal(n,t){return Ps(!t||t==="local"?tT(n,n.getTimezoneOffset()):n,nc)},formatDateTime(n,t){return!t||t==="local"?Ps(n,nc):Vh(n,t,nc)},formatDate:function(n,t){return!t||t==="local"?Ps(n,qh):Vh(n,this.timeZone,qh)},formatTime:function(n,t,e=ry){return!t||t==="local"?Ps(n,e):Vh(n,this.timeZone,e)},formatTimeHMS:function(n,t){return this.formatTime(n,t,IT)},formatTimestamp(n,t){return this.formatDateTime(WS(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)}}});var RT=Object.defineProperty,ET=(n,t,e)=>t in n?RT(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Je=(n,t,e)=>ET(n,typeof t!="symbol"?t+"":t,e);function Kh(n,t,e){const r=yn(n,e==null?void 0:e.in);return isNaN(t)?Vn((e==null?void 0:e.in)||n,NaN):(t&&r.setDate(r.getDate()+t),r)}function LT(n,t){const e=yn(n,void 0).getDay();return e===0?7:e}function OT(n,t){const e=NT(t)?new t(0):Vn(t,0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}function NT(n){var t;return typeof n=="function"&&((t=n.prototype)==null?void 0:t.constructor)===n}const DT=10;class iy{constructor(){Je(this,"subPriority",0)}validate(t,e){return!0}}class FT extends iy{constructor(t,e,r,v,m){super(),this.value=t,this.validateValue=e,this.setValue=r,this.priority=v,m&&(this.subPriority=m)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,r){return this.setValue(t,e,this.value,r)}}class PT extends iy{constructor(t,e){super(),Je(this,"priority",DT),Je(this,"subPriority",-1),this.context=t||(r=>Vn(e,r))}set(t,e){return e.timestampIsSet?t:Vn(t,OT(t,this.context))}}class Qt{run(t,e,r,v){const m=this.parse(t,e,r,v);return m?{setter:new FT(m.value,this.validate,this.set,this.priority,this.subPriority),rest:m.rest}:null}validate(t,e,r){return!0}}class WT extends Qt{constructor(){super(...arguments),Je(this,"priority",140),Je(this,"incompatibleTokens",["R","u","t","T"])}parse(t,e,r){switch(e){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});case"GGGG":default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,e,r){return e.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}}const Pn={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},qi={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Wn(n,t){return n&&{value:t(n.value),rest:n.rest}}function kn(n,t){const e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function Ki(n,t){const e=t.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:t.slice(1)};const r=e[1]==="+"?1:-1,v=e[2]?parseInt(e[2],10):0,m=e[3]?parseInt(e[3],10):0,y=e[5]?parseInt(e[5],10):0;return{value:r*(v*jc+m*sl+y*Tb),rest:t.slice(e[0].length)}}function oy(n){return kn(Pn.anyDigitsSigned,n)}function $n(n,t){switch(n){case 1:return kn(Pn.singleDigit,t);case 2:return kn(Pn.twoDigits,t);case 3:return kn(Pn.threeDigits,t);case 4:return kn(Pn.fourDigits,t);default:return kn(new RegExp("^\\d{1,"+n+"}"),t)}}function sy(n,t){switch(n){case 1:return kn(Pn.singleDigitSigned,t);case 2:return kn(Pn.twoDigitsSigned,t);case 3:return kn(Pn.threeDigitsSigned,t);case 4:return kn(Pn.fourDigitsSigned,t);default:return kn(new RegExp("^-?\\d{1,"+n+"}"),t)}}function Gh(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function ay(n,t){const e=t>0,r=e?t:1-t;let v;if(r<=50)v=n||100;else{const m=r+50,y=Math.trunc(m/100)*100,x=n>=m%100;v=n+y-(x?100:0)}return e?v:1-v}function ly(n){return n%400===0||n%4===0&&n%100!==0}class BT extends Qt{constructor(){super(...arguments),Je(this,"priority",130),Je(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,e,r){const v=m=>({year:m,isTwoDigitYear:e==="yy"});switch(e){case"y":return Wn($n(4,t),v);case"yo":return Wn(r.ordinalNumber(t,{unit:"year"}),v);default:return Wn($n(e.length,t),v)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r){const v=t.getFullYear();if(r.isTwoDigitYear){const y=ay(r.year,v);return t.setFullYear(y,0,1),t.setHours(0,0,0,0),t}const m=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(m,0,1),t.setHours(0,0,0,0),t}}class zT extends Qt{constructor(){super(...arguments),Je(this,"priority",130),Je(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,e,r){const v=m=>({year:m,isTwoDigitYear:e==="YY"});switch(e){case"Y":return Wn($n(4,t),v);case"Yo":return Wn(r.ordinalNumber(t,{unit:"year"}),v);default:return Wn($n(e.length,t),v)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r,v){const m=Uc(t,v);if(r.isTwoDigitYear){const x=ay(r.year,m);return t.setFullYear(x,0,v.firstWeekContainsDate),t.setHours(0,0,0,0),$o(t,v)}const y=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(y,0,v.firstWeekContainsDate),t.setHours(0,0,0,0),$o(t,v)}}class jT extends Qt{constructor(){super(...arguments),Je(this,"priority",130),Je(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,e){return sy(e==="R"?4:e.length,t)}set(t,e,r){const v=Vn(t,0);return v.setFullYear(r,0,4),v.setHours(0,0,0,0),Ds(v)}}class HT extends Qt{constructor(){super(...arguments),Je(this,"priority",130),Je(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,e){return sy(e==="u"?4:e.length,t)}set(t,e,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}}let UT=class extends Qt{constructor(){super(...arguments),Je(this,"priority",120),Je(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"Q":case"QQ":return $n(e.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=1&&e<=4}set(t,e,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}};class VT extends Qt{constructor(){super(...arguments),Je(this,"priority",120),Je(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"q":case"qq":return $n(e.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=1&&e<=4}set(t,e,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}}class qT extends Qt{constructor(){super(...arguments),Je(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Je(this,"priority",110)}parse(t,e,r){const v=m=>m-1;switch(e){case"M":return Wn(kn(Pn.month,t),v);case"MM":return Wn($n(2,t),v);case"Mo":return Wn(r.ordinalNumber(t,{unit:"month"}),v);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class KT extends Qt{constructor(){super(...arguments),Je(this,"priority",110),Je(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,e,r){const v=m=>m-1;switch(e){case"L":return Wn(kn(Pn.month,t),v);case"LL":return Wn($n(2,t),v);case"Lo":return Wn(r.ordinalNumber(t,{unit:"month"}),v);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}function GT(n,t,e){const r=yn(n,e==null?void 0:e.in),v=xp(r,e)-t;return r.setDate(r.getDate()-v*7),yn(r,e==null?void 0:e.in)}class YT extends Qt{constructor(){super(...arguments),Je(this,"priority",100),Je(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,e,r){switch(e){case"w":return kn(Pn.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return $n(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r,v){return $o(GT(t,r,v),v)}}function XT(n,t,e){const r=yn(n,void 0),v=bp(r)-t;return r.setDate(r.getDate()-v*7),r}class QT extends Qt{constructor(){super(...arguments),Je(this,"priority",100),Je(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,e,r){switch(e){case"I":return kn(Pn.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return $n(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r){return Ds(XT(t,r))}}const ZT=[31,28,31,30,31,30,31,31,30,31,30,31],JT=[31,29,31,30,31,30,31,31,30,31,30,31];class e$ extends Qt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"subPriority",1),Je(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"d":return kn(Pn.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return $n(e.length,t)}}validate(t,e){const r=t.getFullYear(),v=ly(r),m=t.getMonth();return v?e>=1&&e<=JT[m]:e>=1&&e<=ZT[m]}set(t,e,r){return t.setDate(r),t.setHours(0,0,0,0),t}}class t$ extends Qt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"subpriority",1),Je(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,e,r){switch(e){case"D":case"DD":return kn(Pn.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return $n(e.length,t)}}validate(t,e){const r=t.getFullYear();return ly(r)?e>=1&&e<=366:e>=1&&e<=365}set(t,e,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}}function Yh(n,t,e){var r,v,m,y;const x=Ns(),h=(e==null?void 0:e.weekStartsOn)??((v=(r=e==null?void 0:e.locale)==null?void 0:r.options)==null?void 0:v.weekStartsOn)??x.weekStartsOn??((y=(m=x.locale)==null?void 0:m.options)==null?void 0:y.weekStartsOn)??0,g=yn(n,e==null?void 0:e.in),s=g.getDay(),l=(t%7+7)%7,c=7-h,a=t<0||t>6?t-(s+c)%7:(l+c)%7-(s+c)%7;return Kh(g,a,e)}class n$ extends Qt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,v){return t=Yh(t,r,v),t.setHours(0,0,0,0),t}}class r$ extends Qt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,e,r,v){const m=y=>{const x=Math.floor((y-1)/7)*7;return(y+v.weekStartsOn+6)%7+x};switch(e){case"e":case"ee":return Wn($n(e.length,t),m);case"eo":return Wn(r.ordinalNumber(t,{unit:"day"}),m);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,v){return t=Yh(t,r,v),t.setHours(0,0,0,0),t}}class i$ extends Qt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,e,r,v){const m=y=>{const x=Math.floor((y-1)/7)*7;return(y+v.weekStartsOn+6)%7+x};switch(e){case"c":case"cc":return Wn($n(e.length,t),m);case"co":return Wn(r.ordinalNumber(t,{unit:"day"}),m);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,v){return t=Yh(t,r,v),t.setHours(0,0,0,0),t}}function o$(n,t,e){const r=yn(n,void 0),v=LT(r),m=t-v;return Kh(r,m,e)}class s$ extends Qt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,e,r){const v=m=>m===0?7:m;switch(e){case"i":case"ii":return $n(e.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Wn(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),v);case"iiiii":return Wn(r.day(t,{width:"narrow",context:"formatting"}),v);case"iiiiii":return Wn(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),v);case"iiii":default:return Wn(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),v)}}validate(t,e){return e>=1&&e<=7}set(t,e,r){return t=o$(t,r),t.setHours(0,0,0,0),t}}class a$ extends Qt{constructor(){super(...arguments),Je(this,"priority",80),Je(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,e,r){switch(e){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(Gh(r),0,0,0),t}}class l$ extends Qt{constructor(){super(...arguments),Je(this,"priority",80),Je(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,e,r){switch(e){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(Gh(r),0,0,0),t}}class c$ extends Qt{constructor(){super(...arguments),Je(this,"priority",80),Je(this,"incompatibleTokens",["a","b","t","T"])}parse(t,e,r){switch(e){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(Gh(r),0,0,0),t}}class u$ extends Qt{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,e,r){switch(e){case"h":return kn(Pn.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return $n(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(t,e,r){const v=t.getHours()>=12;return v&&r<12?t.setHours(r+12,0,0,0):!v&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}}class h$ extends Qt{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,e,r){switch(e){case"H":return kn(Pn.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return $n(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,r){return t.setHours(r,0,0,0),t}}class d$ extends Qt{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,e,r){switch(e){case"K":return kn(Pn.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return $n(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}}class p$ extends Qt{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,e,r){switch(e){case"k":return kn(Pn.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return $n(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,r){const v=r<=24?r%24:r;return t.setHours(v,0,0,0),t}}class g$ extends Qt{constructor(){super(...arguments),Je(this,"priority",60),Je(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"m":return kn(Pn.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return $n(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setMinutes(r,0,0),t}}class f$ extends Qt{constructor(){super(...arguments),Je(this,"priority",50),Je(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"s":return kn(Pn.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return $n(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setSeconds(r,0),t}}class m$ extends Qt{constructor(){super(...arguments),Je(this,"priority",30),Je(this,"incompatibleTokens",["t","T"])}parse(t,e){const r=v=>Math.trunc(v*Math.pow(10,-e.length+3));return Wn($n(e.length,t),r)}set(t,e,r){return t.setMilliseconds(r),t}}class v$ extends Qt{constructor(){super(...arguments),Je(this,"priority",10),Je(this,"incompatibleTokens",["t","T","x"])}parse(t,e){switch(e){case"X":return Ki(qi.basicOptionalMinutes,t);case"XX":return Ki(qi.basic,t);case"XXXX":return Ki(qi.basicOptionalSeconds,t);case"XXXXX":return Ki(qi.extendedOptionalSeconds,t);case"XXX":default:return Ki(qi.extended,t)}}set(t,e,r){return e.timestampIsSet?t:Vn(t,t.getTime()-al(t)-r)}}class y$ extends Qt{constructor(){super(...arguments),Je(this,"priority",10),Je(this,"incompatibleTokens",["t","T","X"])}parse(t,e){switch(e){case"x":return Ki(qi.basicOptionalMinutes,t);case"xx":return Ki(qi.basic,t);case"xxxx":return Ki(qi.basicOptionalSeconds,t);case"xxxxx":return Ki(qi.extendedOptionalSeconds,t);case"xxx":default:return Ki(qi.extended,t)}}set(t,e,r){return e.timestampIsSet?t:Vn(t,t.getTime()-al(t)-r)}}class w$ extends Qt{constructor(){super(...arguments),Je(this,"priority",40),Je(this,"incompatibleTokens","*")}parse(t){return oy(t)}set(t,e,r){return[Vn(t,r*1e3),{timestampIsSet:!0}]}}class b$ extends Qt{constructor(){super(...arguments),Je(this,"priority",20),Je(this,"incompatibleTokens","*")}parse(t){return oy(t)}set(t,e,r){return[Vn(t,r),{timestampIsSet:!0}]}}const x$={G:new WT,y:new BT,Y:new zT,R:new jT,u:new HT,Q:new UT,q:new VT,M:new qT,L:new KT,w:new YT,I:new QT,d:new e$,D:new t$,E:new n$,e:new r$,c:new i$,i:new s$,a:new a$,b:new l$,B:new c$,h:new u$,H:new h$,K:new d$,k:new p$,m:new g$,s:new f$,S:new m$,X:new v$,x:new y$,t:new w$,T:new b$},C$=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,k$=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_$=/^'([^]*?)'?$/,A$=/''/g,S$=/\S/,T$=/[a-zA-Z]/;function $$(n,t,e,r){var v,m,y,x;const h=()=>Vn(e,NaN),g=zv(),s=g.locale??wp,l=g.firstWeekContainsDate??((m=(v=g.locale)==null?void 0:v.options)==null?void 0:m.firstWeekContainsDate)??1,c=g.weekStartsOn??((x=(y=g.locale)==null?void 0:y.options)==null?void 0:x.weekStartsOn)??0;if(!t)return n?h():yn(e,void 0);const a={firstWeekContainsDate:l,weekStartsOn:c,locale:s},o=[new PT(void 0,e)],u=t.match(k$).map($=>{const _=$[0];if(_ in Vc){const C=Vc[_];return C($,s.formatLong)}return $}).join("").match(C$),d=[];for(let $ of u){$p($)&&qc($,t,n),Tp($)&&qc($,t,n);const _=$[0],C=x$[_];if(C){const{incompatibleTokens:R}=C;if(Array.isArray(R)){const F=d.find(I=>R.includes(I.token)||I.token===_);if(F)throw new RangeError(`The format string mustn't contain \`${F.fullToken}\` and \`${$}\` at the same time`)}else if(C.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${$}\` and any other token at the same time`);d.push({token:_,fullToken:$});const L=C.run(n,$,s.match,a);if(!L)return h();o.push(L.setter),n=L.rest}else{if(_.match(T$))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");if($==="''"?$="'":_==="'"&&($=M$($)),n.indexOf($)===0)n=n.slice($.length);else return h()}}if(n.length>0&&S$.test(n))return h();const w=o.map($=>$.priority).sort(($,_)=>_-$).filter(($,_,C)=>C.indexOf($)===_).map($=>o.filter(_=>_.priority===$).sort((_,C)=>C.subPriority-_.subPriority)).map($=>$[0]);let b=yn(e,void 0);if(isNaN(+b))return h();const E={};for(const $ of w){if(!$.validate(b,a))return h();const _=$.set(b,E,a);Array.isArray(_)?(b=_[0],Object.assign(E,_[1])):b=_}return b}function M$(n){return n.match(_$)[1].replace(A$,"'")}const I$="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=",R$={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number}},computed:{icons:function(){return I$},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const n=P$.indexOf(cy[this.status]),t=1-(n-1)*.05,e=224*this.scaleFactor*t,r=32*this.scaleFactor*t,v=32*this.scaleFactor*t;return[`background-image: url(${this.icons});`,`background-position-x: -${n*v}px;`,`background-size: ${e}px ${r}px;`,`height: ${v}px;`,`width: ${v}px;`,`padding-top: ${n-1}px;`].join("")}}};function E$(n,t,e,r,v,m){return ur(),zi("div",{style:va(m.iconStyle)},null,4)}const L$=Os(R$,[["render",E$]]),O$={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function N$(n,t,e,r,v,m){const y=Tn("rux-icon");return ur(),So(y,{size:e.size,icon:e.icon,style:va(m.colorStyle)},null,8,["size","icon","style"])}const D$=Os(O$,[["render",N$],["__scopeId","data-v-9af48e85"]]),cy={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"},Xh={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},F$=function(n){const t="#000000",e="#ffffff",r=Xh[cy[n]];if(r){const v=+`0x${r.slice(1,3)}`,m=+`0x${r.slice(3,5)}`,y=+`0x${r.slice(5,7)}`;if((v*299+m*587+y*114)/1e3>128)return t}return e},P$=Object.keys(Xh),W$={astro:{component:n=>Ls(D$,{...n})},"astro-status":{component:n=>Ls(L$,{...n,status:n.icon})}},B$={extras:{component:n=>Ls(Sb,{...n})}},uy="single-spa:app-change",z$={data(){return{show:!1}},created(){window.addEventListener(uy,this.handleAppChange)},mounted(){setTimeout(()=>{this.show=lp().length===0},150)},unmounted(){window.removeEventListener(uy,this.handleAppChange)},methods:{handleAppChange:function(n){this.show=!n.detail.appsByNewStatus.MOUNTED}}},j$={class:"mx-1"};function H$(n,t,e,r,v,m){const y=Tn("v-card-title"),x=Tn("v-card-text"),h=Tn("v-card");return v.show?(ur(),So(h,{key:0},{default:ir(()=>[ln(y,null,{default:ir(()=>t[0]||(t[0]=[ji(" 404 Not Found ")])),_:1}),ln(x,{class:"d-flex align-center mt-3"},{default:ir(()=>[t[1]||(t[1]=ji(" The requested URL ")),Es("code",j$,_i(n.$route.fullPath),1),t[2]||(t[2]=ji(" was not routable. ")),t[3]||(t[3]=Es("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):To("",!0)}const hy=[{path:"/",name:"TableManager",component:()=>ot(()=>it.import("./TableManager-57dfe866c6d08795123c.js"),void 0)},{path:"/:pathMatch(.*)*",name:"NotFound",component:Os(z$,[["render",H$]])}];hy.forEach(dp);const U$=sp({history:ap(),routes:hy}),V$={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"}},q$={data:function(){return{show:!1,params:{title:"Title",text:"The text that is displayed",okText:"Ok",okClass:"primary",validateText:"CONFIRM",cancelText:"Cancel",html:!1},resolve:null,reject:null,validationText:null,rules:{required:n=>!!n||"Required.",match:n=>n===this.params.validateText||"Value mismatch."}}},computed:{dataTestOk:function(){return`confirm-dialog-${this.params.okText.toLowerCase()}`},dataTestCancel:function(){return`confirm-dialog-${this.params.cancelText.toLowerCase()}`}},methods:{dialog:function(n,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=""}}},K$=["innerHTML"],G$={key:2},Y$={key:3,class:"validate mt-4"};function X$(n,t,e,r,v,m){const y=Tn("v-spacer"),x=Tn("v-toolbar"),h=Tn("v-icon"),g=Tn("v-text-field"),s=Tn("v-card-text"),l=Tn("v-btn"),c=Tn("v-card-actions"),a=Tn("v-card"),o=Tn("v-dialog"),u=Tn("v-app");return ur(),So(u,null,{default:ir(()=>[ln(o,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=d=>n.show=d),width:"600"},{default:ir(()=>[ln(a,null,{default:ir(()=>[ln(x,{height:"24"},{default:ir(()=>[ln(y),Es("span",null,_i(n.params.title),1),ln(y)]),_:1}),ln(s,{class:"mt-4 pa-3"},{default:ir(()=>[n.params.validateText?(ur(),So(h,{key:0,class:"mr-2"},{default:ir(()=>t[2]||(t[2]=[ji(" mdi-alert ")])),_:1})):To("",!0),n.params.html?(ur(),zi("span",{key:1,innerHTML:n.params.text},null,8,K$)):(ur(),zi("span",G$,_i(n.params.text),1)),n.params.validateText?(ur(),zi("div",Y$,[ji(" Enter "+_i(n.params.validateText)+" to confirm! ",1),ln(g,{variant:"solo",density:"compact","single-line":"",modelValue:n.validationText,"onUpdate:modelValue":t[0]||(t[0]=d=>n.validationText=d),rules:[n.rules.required,n.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):To("",!0)]),_:1}),ln(c,{class:"px-2"},{default:ir(()=>[ln(y),n.params.cancelText?(ur(),So(l,{key:0,variant:"outlined","data-test":m.dataTestCancel,onClick:m.cancel},{default:ir(()=>[ji(_i(n.params.cancelText),1)]),_:1},8,["data-test","onClick"])):To("",!0),ln(l,{variant:"flat",color:n.params.okClass,"data-test":m.dataTestOk,onClick:m.ok},{default:ir(()=>[ji(_i(n.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}const Q$=Os(q$,[["render",X$],["__scopeId","data-v-f10fb7f4"]]);class Z${constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const t=window.Vue.createApp(Q$);t.use(Zh);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:v,validateText:m,cancelText:y,html:x}){return this.mount(),new Promise((h,g)=>{this.$root.dialog({title:t,text:e,okText:r,okClass:v,validateText:m,cancelText:y,html:x},h,g)})}confirm(t,{okText:e="Ok",cancelText:r="Cancel",okClass:v="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:v,validateText:null,cancelText:r,html:!1})}alert(t,{okText:e="Ok",html:r=!1,okClass:v="primary"}){return this.open({title:"Alert",text:t,okText:e,okClass:v,validateText:null,cancelText:null,html:r})}validate(t,{okText:e="Ok",validateText:r="CONFIRM",cancelText:v="Cancel",okClass:m="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:m,validateText:r,cancelText:v,html:!1})}}const J$={install(n,t){const e=new Z$;n.provide("dialog",e),n.config.globalProperties.hasOwnProperty("$dialog")||(n.config.globalProperties.$dialog=e)}},eM={data:function(){return{showToast:!1,expanded:!1,toastNotification:{title:"Title here",body:"This is the notification body",message:"Overall message here"},timeout:null,noToastPaths:["/login"]}},computed:{toastNotificationIcon:function(){switch(this.toastNotification.type){case"notification":return"mdi-bell";case"alert":default:return"mdi-alert-box"}},toastStyle:function(){return`
|
1491
|
+
--toast-bg-color:${Xh[this.toastNotification.level]};
|
1492
|
+
--toast-fg-color:${F$(this.toastNotification.level)};
|
1493
|
+
`},contentStyle:function(){return`
|
1494
|
+
white-space: ${this.expanded?"normal":"nowrap"};
|
1495
|
+
overflow-x: ${this.expanded?"visible":"hidden"};
|
1496
|
+
text-overflow: ${this.expanded?"unset":"ellipsis"};
|
1497
|
+
`}},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}}},tM={key:0,class:"text-subtitle-1 mr-1 notification-text"},nM={key:1,class:"text-body-2 notification-text"},rM={key:2,class:"text-body-2 notification-text"};function iM(n,t,e,r,v,m){const y=Tn("v-icon"),x=Tn("v-spacer"),h=Tn("v-btn"),g=Tn("v-sheet"),s=Tn("v-slide-y-transition");return ur(),So(s,null,{default:ir(()=>[np(ln(g,{style:va(m.toastStyle),class:"toast-notification",onClick:m.expand},{default:ir(()=>[ln(y,{class:"mr-1 notification-text"},{default:ir(()=>[ji(_i(m.toastNotificationIcon),1)]),_:1}),Es("div",{class:"toast-content",style:va(m.contentStyle)},[n.toastNotification.title?(ur(),zi("span",tM,_i(n.toastNotification.title)+": ",1)):To("",!0),n.toastNotification.body?(ur(),zi("span",nM,_i(n.toastNotification.body),1)):To("",!0),n.toastNotification.message?(ur(),zi("span",rM,_i(n.toastNotification.message),1)):To("",!0)],4),ln(x),ln(h,{variant:"text",onClick:rp(m.hide,["stop"]),class:"notification-text"},{default:ir(()=>t[0]||(t[0]=[ji(" Dismiss ")])),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[ip,n.showToast]])]),_:1})}const oM=Os(eM,[["render",iM],["__scopeId","data-v-b0459ba8"]]);class sM{constructor(t={}){var e;this.$store=t.store,this.mounted=!1,this.$root=null,(e=window.$cosmosNotify)!=null&&e.$root?(this.mounted=!0,this.$root=window.$cosmosNotify.$root):window.$cosmosNotify=this}mount(){if(this.mounted)return;const t=Bc(oM);t.use(Zh);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:v,level:m,duration:y,type:x="alert",logToConsole:h=!1,saveToHistory:g=!0}){this.mount(),h&&console.log(v?`${m.toUpperCase()} - ${v}`:`${m.toUpperCase()} - ${e}: ${r}`),g&&this.$store.commit("notifyAddHistory",{title:e,body:r,message:v,level:m}),this[t]({title:e,body:r,message:v,level:m,duration:y,type:x})}toast({title:t,body:e,message:r,level:v,duration:m,type:y}){this.$root.toast({title:t,body:e,message:r,level:v,type:y},m)}critical({title:t,body:e,message:r,type:v,duration:m,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"critical",title:t,body:e,message:r,type:v,duration:m,logToConsole:y,saveToHistory:x})}FATAL(t){this.critical(t)}ERROR(t){this.critical(t)}serious({title:t,body:e,message:r,type:v,duration:m,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"serious",title:t,body:e,message:r,type:v,duration:m,logToConsole:y,saveToHistory:x})}caution({title:t,body:e,message:r,type:v,duration:m,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"caution",title:t,body:e,message:r,type:v,duration:m,logToConsole:y,saveToHistory:x})}WARN(t){this.caution(t)}normal({title:t,body:e,message:r,type:v,duration:m,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"normal",title:t,body:e,message:r,type:v,duration:m,logToConsole:y,saveToHistory:x})}INFO(t){this.normal(t)}DEBUG(t){this.normal(t)}standby({title:t,body:e,message:r,type:v,duration:m,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"standby",title:t,body:e,message:r,type:v,duration:m,logToConsole:y,saveToHistory:x})}off({title:t,body:e,message:r,type:v,duration:m,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"off",title:t,body:e,message:r,type:v,duration:m,logToConsole:y,saveToHistory:x})}}const aM={install(n,t){const e=new sM(t);n.provide("notify",e),n.config.globalProperties.hasOwnProperty("$notify")||(n.config.globalProperties.$notify=e)}},dy=100,py=cp({state:{notifyHistory:[],namedWidgets:{}},getters:{namedWidget:n=>t=>n.namedWidgets[t]},mutations:{notifyAddHistory:(n,t)=>{n.notifyHistory.length>=dy&&(n.notifyHistory.length=dy-1),n.notifyHistory.unshift(t)},notifyClearHistory:n=>{n.notifyHistory=[]},setNamedWidget:(n,t)=>{Object.assign(n.namedWidgets,t)},clearNamedWidget:(n,t)=>{delete n.namedWidgets[t]}},modules:{}});function gy(n){let t;return n!==null&&typeof n=="object"&&((t=Object.getPrototypeOf(n))===Object.prototype||t===null)}function lM(n,t){const e={};for(const r of t)Object.hasOwn(n,r)&&(e[r]=n[r]);return e}function fy(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2?arguments[2]:void 0;const r={};for(const v in n)r[v]=n[v];for(const v in t){const m=n[v],y=t[v];if(gy(m)&&gy(y)){r[v]=fy(m,y,e);continue}if(e&&Array.isArray(m)&&Array.isArray(y)){r[v]=e(m,y);continue}r[v]=y}return r}function Ba(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Ba.cache.has(n))return Ba.cache.get(n);const t=n.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Ba.cache.set(n,t),t}Ba.cache=new Map;function cM(n){Xd(`Vuetify: ${n}`)}function my(n,t){return e=>Object.keys(n).reduce((r,v)=>{const m=typeof n[v]=="object"&&n[v]!=null&&!Array.isArray(n[v])?n[v]:{type:n[v]};return e&&v in e?r[v]={...m,default:e[v]}:r[v]=m,t&&!r[v].source&&(r[v].source=t),r},{})}function vy(n,t){const e=ep();if(!e)throw new Error(`[Vuetify] ${n} must be called from inside a setup function`);return e}function uM(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vy("injectSelf");const{provides:e}=t;if(e&&n in e)return e[n]}const Qh=Symbol.for("vuetify:defaults");function yy(){const n=Qd(Qh);if(!n)throw new Error("[Vuetify] Could not find defaults instance");return n}function hM(n,t){var e,r;return typeof((e=n.props)==null?void 0:e[t])<"u"||typeof((r=n.props)==null?void 0:r[Ba(t)])<"u"}function dM(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yy();const r=vy("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const v=Wc(()=>{var h;return(h=e.value)==null?void 0:h[n._as??t]}),m=new Proxy(n,{get(h,g){var s,l,c,a,o,u,d;const w=Reflect.get(h,g);return g==="class"||g==="style"?[(s=v.value)==null?void 0:s[g],w].filter(b=>b!=null):typeof g=="string"&&!hM(r.vnode,g)?((l=v.value)==null?void 0:l[g])!==void 0?(c=v.value)==null?void 0:c[g]:((o=(a=e.value)==null?void 0:a.global)==null?void 0:o[g])!==void 0?(d=(u=e.value)==null?void 0:u.global)==null?void 0:d[g]:w:w}}),y=Zd();Jd(()=>{if(v.value){const h=Object.entries(v.value).filter(g=>{let[s]=g;return s.startsWith(s[0].toUpperCase())});y.value=h.length?Object.fromEntries(h):void 0}else y.value=void 0});function x(){const h=uM(Qh,r);tp(Qh,Wc(()=>y.value?fy((h==null?void 0:h.value)??{},y.value):h==null?void 0:h.value))}return{props:m,provideSubDefaults:x}}function rc(n){if(n._setup=n._setup??n.setup,!n.name)return cM("The component is missing an explicit name, unable to generate default prop value"),n;if(n._setup){n.props=my(n.props??{},n.name)();const t=Object.keys(n.props).filter(e=>e!=="class"&&e!=="style");n.filterProps=function(e){return lM(e,t)},n.props._as=String,n.setup=function(e,r){const v=yy();if(!v.value)return n._setup(e,r);const{props:m,provideSubDefaults:y}=dM(e,e._as??n.name,v),x=n._setup(m,r);return y(),x}}return n}function pM(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(n?rc:Yd)(t)}const gM=[String,Function,Object,Array],ic=my({icon:{type:gM},tag:{type:String,required:!0}},"icon");pM()({name:"VComponentIcon",props:ic(),setup(n,t){let{slots:e}=t;return()=>{const r=n.icon;return ln(n.tag,null,{default:()=>{var v;return[n.icon?ln(r,null,null):(v=e.default)==null?void 0:v.call(e)]}})}}}),rc({name:"VSvgIcon",inheritAttrs:!1,props:ic(),setup(n,t){let{attrs:e}=t;return()=>ln(n.tag,op(e,{style:null}),{default:()=>[ln("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(n.icon)?n.icon.map(r=>Array.isArray(r)?ln("path",{d:r[0],"fill-opacity":r[1]},null):ln("path",{d:r},null)):ln("path",{d:n.icon},null)])]})}}),rc({name:"VLigatureIcon",props:ic(),setup(n){return()=>ln(n.tag,null,{default:()=>[n.icon]})}});const fM=rc({name:"VClassIcon",props:ic(),setup(n){return()=>ln(n.tag,{class:n.icon},null)}}),mM={component:n=>Ls(fM,{...n,class:"mdi"})},Zh=up({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:V$}},icons:{defaultSet:"mdi",sets:{mdi:mM,...W$,...B$}}}),Jh=db({createApp:Bc,appOptions:{render(){return Ls(bb,{})},el:"#openc3-tool"},handleInstance:n=>{n.use(U$),n.use(py),n.use(Zh),n.use(J$),n.use(aM,{store:py})}}),cN=$r("e",Jh.bootstrap),uN=$r("f",Jh.mount),hN=$r("u",Jh.unmount)}}});
|