openc3-cosmos-tool-cmdtlmserver 6.7.0 → 6.8.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/cmdtlmserver/ArrayWidget-j3ncPuPx-aa449c34e8f2de77f02d.js +2 -0
- data/tools/cmdtlmserver/ArrayplotWidget-DuLaiGa9-77c1fd4a0e82123f179c.js +1 -0
- data/tools/cmdtlmserver/BarColumn-BWJ0Dd4O-9580bca73f301a5631b0.js +1 -0
- data/tools/cmdtlmserver/BlockWidget-Bf5Dd6Cr-2ff4d8de685d2f1a246d.js +2 -0
- data/tools/cmdtlmserver/ButtonWidget-bl_mGFYh-23c6822c774698262466.js +2 -0
- data/tools/cmdtlmserver/CanvasWidget-boDemgx1-5f50b097b6549e169840.js +1 -0
- data/tools/cmdtlmserver/CanvasdotWidget-BZBbJcER-e2edd0c4fcd86c333a44.js +1 -0
- data/tools/cmdtlmserver/CanvasimageWidget-6ywvT5jd-a799aa1aa433d6d88beb.js +1 -0
- data/tools/cmdtlmserver/CanvasimagevalueWidget-DjWrA3gX-230ce31ddbb0bafff228.js +1 -0
- data/tools/cmdtlmserver/CanvaslabelWidget-Bq4V2BQh-67022f223ae243ebffca.js +1 -0
- data/tools/cmdtlmserver/CanvaslabelvalueWidget-C8oNcFLi-13dedf0d20f2441be1d8.js +1 -0
- data/tools/cmdtlmserver/CanvaslineWidget-nvbL2GoL-765e7124b8b7548dfe0a.js +1 -0
- data/tools/cmdtlmserver/CanvaslinevalueWidget-ZACQedKx-9552fa7149a798613862.js +1 -0
- data/tools/cmdtlmserver/CheckbuttonWidget-B82UE8AB-df0b5614bec6e1ccf335.js +1 -0
- data/tools/cmdtlmserver/CmdPacketsTab-7b1570af54437af5c0de.js +1 -0
- data/tools/cmdtlmserver/CmdTlmServer-5815c31ab60371d94b85.js +2 -0
- data/tools/cmdtlmserver/ComboboxWidget-4OFiSkI6-7afa4829a51f955a8209.js +1 -0
- data/tools/cmdtlmserver/DateWidget-BmwtdirF-bd6b72378049852005fe.js +1 -0
- data/tools/cmdtlmserver/DetailsDialog-CLKEfU0s-938c98477d00508b53db.js +1 -0
- data/tools/cmdtlmserver/DynamicWidget-CfMtj7H8-c96aa4c168ed11bcf844.js +1 -0
- data/tools/cmdtlmserver/FormatvalueWidget-C8exC3bj-8404db1fd5379699b37f.js +1 -0
- data/tools/cmdtlmserver/Graph-CWcrowaT-3e0edfd3dff3bc7fa765.js +1 -0
- data/tools/cmdtlmserver/GraphWidget-CvzxZYVx-e85f7d45732c92a996bb.js +1 -0
- data/tools/cmdtlmserver/HorizontalWidget-Ck151zVw-ba2c7293de57b38ad084.js +1 -0
- data/tools/cmdtlmserver/HorizontalboxWidget-D3P-cl9V-8e77ae12037a5cad67c4.js +1 -0
- data/tools/cmdtlmserver/HorizontallineWidget-BE1TjPU8-57fb772c196f8ef02c1d.js +1 -0
- data/tools/cmdtlmserver/IframeWidget-BgJCgues-7416bfc3527f97b9c518.js +1 -0
- data/tools/cmdtlmserver/ImageLoader-CWn-PLOk-5bbb7cf54177471e4a33.js +1 -0
- data/tools/cmdtlmserver/ImageviewerWidget-BlhFZD2f-91640482e9e639ceface.js +1 -0
- data/tools/cmdtlmserver/InterfacesTab-4bc1d83c4984c90c17de.js +1 -0
- data/tools/cmdtlmserver/LabelWidget-Cwosk4x2-8785c02eedc9d37ce9f4.js +1 -0
- data/tools/cmdtlmserver/LabelledWidget-Dl6rAFTQ-ffff6c8bc54996ff009b.js +1 -0
- data/tools/cmdtlmserver/LabelprogressbarWidget-MuAKesOz-19ab339878f12d356862.js +1 -0
- data/tools/cmdtlmserver/LabelsparklineWidget-6LA6Ox3d-bcc296ae7aac37883cba.js +1 -0
- data/tools/cmdtlmserver/LabelvalueWidget-BxAXx-Tf-2957105bfd285293b1ff.js +1 -0
- data/tools/cmdtlmserver/LabelvaluedescWidget-Dwwlnd1g-977a71583eb59f6ca41e.js +1 -0
- data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-Dv8Qk8kK-85033266a3796669f49a.js +1 -0
- data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-D-_gl6fq-fa9848f7143e5417a6e3.js +1 -0
- data/tools/cmdtlmserver/LabelvaluerangebarWidget-B3MKT-3Y-1d904e7150106be3691c.js +1 -0
- data/tools/cmdtlmserver/Layout-Bkb6VP3e-fc96ab10903fbd87a380.js +1 -0
- data/tools/cmdtlmserver/LedWidget-DOuDD8LI-694fd994c9de77da0b0e.js +1 -0
- data/tools/cmdtlmserver/LimitsbarWidget-D1U6SvVL-405a5d80bc0d24a6ea9c.js +1 -0
- data/tools/cmdtlmserver/LimitscolorWidget-iSMGusqt-305f9af8f2126d808257.js +1 -0
- data/tools/cmdtlmserver/LimitscolumnWidget-DjxZTt_r-7884a5f80243d71a9d93.js +1 -0
- data/tools/cmdtlmserver/LinegraphWidget-BHKU6zlT-b11846e1d296fe9e737a.js +1 -0
- data/tools/cmdtlmserver/MatrixbycolumnsWidget-BKO-A2QD-b4a979b9575a554a8094.js +1 -0
- data/tools/cmdtlmserver/ProgressbarWidget-fbr2qu_N-6859373386d079792a35.js +1 -0
- data/tools/cmdtlmserver/RadiobuttonWidget-DL08zcQT-5efcd58f0a02450b7a37.js +1 -0
- data/tools/cmdtlmserver/RadiogroupWidget-DW9Xpj3c-d1707fe4a2c00fae25f9.js +1 -0
- data/tools/cmdtlmserver/RangebarWidget-o9q55kjc-7aabb41ecc4ae9037d47.js +1 -0
- data/tools/cmdtlmserver/{RawDialog-9155547b67f8ddb4a1b7.js → RawDialog-e4e3df8a8847d8b9c7a8.js} +3 -3
- data/tools/cmdtlmserver/RollupWidget-BHnjj-DF-c74742451d37d9e097bd.js +1 -0
- data/tools/cmdtlmserver/RoutersTab-2b7966868bec8fc126c1.js +1 -0
- data/tools/cmdtlmserver/ScrollwindowWidget-D-QVwztC-f20ac6f14a07bf25d9fc.js +1 -0
- data/tools/cmdtlmserver/SignalWidget-CsWuufdx-b3ad1e932e523a328af2.js +1 -0
- data/tools/cmdtlmserver/SpacerWidget-Di9-qunj-f0576375735204748b60.js +1 -0
- data/tools/cmdtlmserver/SparklineWidget-B6-zhdPW-f446460528d6a77569f4.js +1 -0
- data/tools/cmdtlmserver/StatusTab-ae0b2c5be6cbf46600a1.js +1 -0
- data/tools/cmdtlmserver/TabbookWidget-B1E1_mzA-271da99223fd0fe54877.js +1 -0
- data/tools/cmdtlmserver/TargetsTab-d3f565722ca5bc06951c.js +1 -0
- data/tools/cmdtlmserver/TextboxWidget-CBVEXPw_-e3310a030edd4860e1c6.js +1 -0
- data/tools/cmdtlmserver/TextfieldWidget-DZMHrtQa-5edfedfbe5434ac47fce.js +1 -0
- data/tools/cmdtlmserver/TimeWidget-K4MNmJ7J-e360ab888129cd54fdc0.js +1 -0
- data/tools/cmdtlmserver/TitleWidget-8IcwweFE-d7457335c820d6d08fce.js +1 -0
- data/tools/cmdtlmserver/TlmPacketsTab-f323eb4d9a40e8bf8fca.js +1 -0
- data/tools/cmdtlmserver/Updater-e55ffb83364e21986b8c.js +1 -0
- data/tools/cmdtlmserver/VWidget-CoIgX3hM-ccd82edbac10fbc930dc.js +1 -0
- data/tools/cmdtlmserver/ValueWidget-BvT1ASar-7d9cbd5e4e5c5145fb91.js +1 -0
- data/tools/cmdtlmserver/ValuelimitsbarWidget-C5lBnUmB-bfe696226d34e3ce4e48.js +1 -0
- data/tools/cmdtlmserver/ValuelimitscolumnWidget-DHYI0WBL-22923915e43f24541699.js +1 -0
- data/tools/cmdtlmserver/ValuerangebarWidget-BSszZhlE-e0a9426f1670a3078848.js +1 -0
- data/tools/cmdtlmserver/VerticalWidget-1GhgYrC3-3c064edb22edbb46dba2.js +1 -0
- data/tools/cmdtlmserver/VerticalboxWidget-DYHJqEzd-d0896602a919174a6de6.js +1 -0
- data/tools/cmdtlmserver/Widget-B8t93Oid-23f19040e8371d60c6e8.js +1 -0
- data/tools/cmdtlmserver/main-27739428341b2d2dc265.js +1504 -0
- data/tools/cmdtlmserver/main.js +1 -1
- data/tools/cmdtlmserver/{services-a785d536ab3a733aa2d5.js → services-7ff9a5fbdaf6fa0de1b3.js} +6 -6
- metadata +78 -78
- data/tools/cmdtlmserver/ArrayWidget-BSG8KEtf-cbd5f5c949b5cf241afe.js +0 -2
- data/tools/cmdtlmserver/ArrayplotWidget-WVu76Kqn-8cd39f67f7c1ae9e478f.js +0 -1
- data/tools/cmdtlmserver/BarColumn-Cflh9pUz-1c7db00e85eff474d1a5.js +0 -1
- data/tools/cmdtlmserver/BlockWidget-B7ryWGCq-a4a3d485dfbf3ac7fa11.js +0 -2
- data/tools/cmdtlmserver/ButtonWidget-BKih3ix9-5d171b777c6a3a7c5a3f.js +0 -2
- data/tools/cmdtlmserver/CanvasWidget-DT9xMSfb-dbba02e1458989ff322d.js +0 -1
- data/tools/cmdtlmserver/CanvasdotWidget-7H5Hvcn--264b1fe9638e7001fa83.js +0 -1
- data/tools/cmdtlmserver/CanvasimageWidget-BbWYx6Gj-a5286b4d8bdb6aa2a68f.js +0 -1
- data/tools/cmdtlmserver/CanvasimagevalueWidget-Blvoe2X4-1cf9e0d30c3c2661ded0.js +0 -1
- data/tools/cmdtlmserver/CanvaslabelWidget-BPx_Rm4o-2bbe4d58b124595d0a79.js +0 -1
- data/tools/cmdtlmserver/CanvaslabelvalueWidget-DzdWvL0W-a6672cb874446440d60e.js +0 -1
- data/tools/cmdtlmserver/CanvaslineWidget-CqskilGk-279c69f4d2acb3a2a9bf.js +0 -1
- data/tools/cmdtlmserver/CanvaslinevalueWidget-C0JIKdvZ-e206d4d1c9a5b183e907.js +0 -1
- data/tools/cmdtlmserver/CheckbuttonWidget-C9FbJx2v-2f9b7e52ce874ec88e6f.js +0 -1
- data/tools/cmdtlmserver/CmdPacketsTab-76c7150a309c7370fedd.js +0 -1
- data/tools/cmdtlmserver/CmdTlmServer-3905c7ff0d71415031fe.js +0 -2
- data/tools/cmdtlmserver/ComboboxWidget-BbNKT0s8-f5960bfb563ec404dd90.js +0 -1
- data/tools/cmdtlmserver/DateWidget-CBMsdRUE-75130b14363dac262f69.js +0 -1
- data/tools/cmdtlmserver/DetailsDialog-DRVahE5z-9b92f2767e414098591b.js +0 -1
- data/tools/cmdtlmserver/DynamicWidget-CfMtj7H8-d95609758a30e674d5e3.js +0 -1
- data/tools/cmdtlmserver/FormatvalueWidget-BLWsqhIZ-edc31de79aa8740218ab.js +0 -1
- data/tools/cmdtlmserver/Graph-BiU56Qj2-54315d40edf483ba20b7.js +0 -1
- data/tools/cmdtlmserver/GraphWidget-Ga0AEfrJ-5d499fb644841b729647.js +0 -1
- data/tools/cmdtlmserver/HorizontalWidget-CsVhLwZO-4669f5ba5e312ae61672.js +0 -1
- data/tools/cmdtlmserver/HorizontalboxWidget-xC6PADl3-d4a26968ac07f7687ec6.js +0 -1
- data/tools/cmdtlmserver/HorizontallineWidget-NZIxmRVN-b0514a6724a5856ce5c5.js +0 -1
- data/tools/cmdtlmserver/IframeWidget-BgzjSfag-b44ad43e66c005281a3d.js +0 -1
- data/tools/cmdtlmserver/ImageLoader-DbFVK1Ui-aca69def5d95969b43d8.js +0 -1
- data/tools/cmdtlmserver/ImageviewerWidget-BnT5m-nw-d7fcf42c59ef29fea1b1.js +0 -1
- data/tools/cmdtlmserver/InterfacesTab-235fe81ace9605d0b904.js +0 -1
- data/tools/cmdtlmserver/LabelWidget-DSDYmz6X-2acdf9f316a1e9e3b696.js +0 -1
- data/tools/cmdtlmserver/LabelledWidget-DMb-myxs-35161504637a6200849e.js +0 -1
- data/tools/cmdtlmserver/LabelprogressbarWidget-CkjDJBao-1342d998d47befcc9620.js +0 -1
- data/tools/cmdtlmserver/LabelsparklineWidget-DBYPFz3Y-f24748082a23b8de528d.js +0 -1
- data/tools/cmdtlmserver/LabelvalueWidget-DlTkJC4i-829629548ba3c01ef0c4.js +0 -1
- data/tools/cmdtlmserver/LabelvaluedescWidget-dRqnGZub-989dd94dd3490c5d723a.js +0 -1
- data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-CS4NAPJ1-306529c0ebb2a7afeefb.js +0 -1
- data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-D9x4Ppv8-bca2bd52454a15ecfda1.js +0 -1
- data/tools/cmdtlmserver/LabelvaluerangebarWidget-Dhyng4-n-714d06b2c473bd07d8a9.js +0 -1
- data/tools/cmdtlmserver/Layout-mWR35VAD-e550601c2ba102cf0978.js +0 -1
- data/tools/cmdtlmserver/LedWidget-D8cq4pUv-a186047e33924c8459fd.js +0 -1
- data/tools/cmdtlmserver/LimitsbarWidget-VGJnDuVM-25785045a2d5c4b13987.js +0 -1
- data/tools/cmdtlmserver/LimitscolorWidget-CG6Pqi12-e92368bd49f2e95c0ec0.js +0 -1
- data/tools/cmdtlmserver/LimitscolumnWidget-DjovQdiT-9b915e3fa359f72525f9.js +0 -1
- data/tools/cmdtlmserver/LinegraphWidget-DSWAhXgZ-4495e5932eb42cb20724.js +0 -1
- data/tools/cmdtlmserver/MatrixbycolumnsWidget-C3cuhRxz-a2518a76b1b006dd6832.js +0 -1
- data/tools/cmdtlmserver/ProgressbarWidget-oCgAEFBO-1b15827bd31abc8ec628.js +0 -1
- data/tools/cmdtlmserver/RadiobuttonWidget-D4Dak3lc-a5ebed47987e0428e1dc.js +0 -1
- data/tools/cmdtlmserver/RadiogroupWidget-Dbe9T4fp-1945e56ea701549baa60.js +0 -1
- data/tools/cmdtlmserver/RangebarWidget-CIVrgqrW-5e3ad9b627fc39a1a74a.js +0 -1
- data/tools/cmdtlmserver/RollupWidget-CH1-XNLV-5ae87244026dba1263ec.js +0 -1
- data/tools/cmdtlmserver/RoutersTab-79a5c3bc6e8a23dc39a2.js +0 -1
- data/tools/cmdtlmserver/ScrollwindowWidget-BwFG6Wn8-cd540c10bc1172173d6f.js +0 -1
- data/tools/cmdtlmserver/SignalWidget-Gz2gHrUm-8f42c62ed9c7c9daee50.js +0 -1
- data/tools/cmdtlmserver/SpacerWidget-Bg7VDB0k-61dce9792e33ada83be9.js +0 -1
- data/tools/cmdtlmserver/SparklineWidget-D_b5rfJv-6d9dcc78da498f3ea49b.js +0 -1
- data/tools/cmdtlmserver/StatusTab-cac15bc5c5ebfafbd8a1.js +0 -1
- data/tools/cmdtlmserver/TabbookWidget-C30f9B6z-54c4e96a7dd6322d638b.js +0 -1
- data/tools/cmdtlmserver/TargetsTab-f67dd6d498653319cf57.js +0 -1
- data/tools/cmdtlmserver/TextboxWidget-CDqxsgys-f7842c0af89400ad3c0b.js +0 -1
- data/tools/cmdtlmserver/TextfieldWidget-CAyjKJs6-b663ec33fa13b3935c34.js +0 -1
- data/tools/cmdtlmserver/TimeWidget-BQsP0G2X-aad85b8a4420b87e344d.js +0 -1
- data/tools/cmdtlmserver/TitleWidget-DXVba53S-48bdf9ab5f610a2dbbfb.js +0 -1
- data/tools/cmdtlmserver/TlmPacketsTab-f29e2bb217a5a6fdb3fa.js +0 -1
- data/tools/cmdtlmserver/Updater-2caaf27746e43f262f9a.js +0 -1
- data/tools/cmdtlmserver/VWidget-CFTCukCL-99bc49d1b235886d2c8a.js +0 -1
- data/tools/cmdtlmserver/ValueWidget-B-TWLPdM-951a8bd8d6aaeb5533c7.js +0 -1
- data/tools/cmdtlmserver/ValuelimitsbarWidget-jsDXdPdC-b4eb1145ace4ae5fcfb6.js +0 -1
- data/tools/cmdtlmserver/ValuelimitscolumnWidget-I-uwnXM2-8ae2729a548785b59fae.js +0 -1
- data/tools/cmdtlmserver/ValuerangebarWidget-OyhSTScu-9e9072d0b64f38559370.js +0 -1
- data/tools/cmdtlmserver/VerticalWidget-CkFbX1Gq-1a8932da2f05b6d41847.js +0 -1
- data/tools/cmdtlmserver/VerticalboxWidget-FEQgPM9r-18aba3a89fd11ea2653d.js +0 -1
- data/tools/cmdtlmserver/Widget-C3-TBgP7-bc82af910e32192fcc04.js +0 -1
- data/tools/cmdtlmserver/main-e0dc737e1cb81d554ebd.js +0 -1504
@@ -0,0 +1,1504 @@
|
|
1
|
+
System.register(["vue","vue-router","single-spa","vuex","vuetify"],(function(dr,Qe){"use strict";var zt,ro,Cn,fn,Dt,Dr,Sr,ep,tp,Ns,Ds,dl,io,qr,Ar,np,rp,ip,Yc,op,sp,ap,lp,cp,Xc,up,hp,dp,pp,gp,fp,Qc,mp,vp;return{setters:[kt=>{zt=kt.resolveComponent,ro=kt.createBlock,Cn=kt.openBlock,fn=kt.withCtx,Dt=kt.createVNode,Dr=kt.createElementBlock,Sr=kt.createElementVNode,ep=kt.useCssVars,tp=kt.defineAsyncComponent,Ns=kt.h,Ds=kt.normalizeStyle,dl=kt.Fragment,io=kt.createCommentVNode,qr=kt.createTextVNode,Ar=kt.toDisplayString,np=kt.defineComponent,rp=kt.warn,ip=kt.inject,Yc=kt.computed,op=kt.shallowRef,sp=kt.watchEffect,ap=kt.normalizeClass,lp=kt.getCurrentInstance,cp=kt.provide,Xc=kt.createApp,up=kt.withDirectives,hp=kt.withModifiers,dp=kt.vShow,pp=kt.mergeProps},kt=>{gp=kt.createRouter,fp=kt.createWebHistory},kt=>{Qc=kt.getMountedApps},kt=>{mp=kt.createStore},kt=>{vp=kt.createVuetify}],execute:(function(){dr({$:Ap,c:u$,f:gr,l:hn,y:Wn,z:Hh});var kt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yp(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(m){return Object.getOwnPropertyDescriptor(n,m).enumerable}))),e.push.apply(e,r)}return e}function Jo(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?yp(Object(e),!0).forEach((function(r){kb(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):yp(Object(e)).forEach((function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))}))}return n}function kb(n,t,e){return(t=(function(r){var m=(function(g,y){if(es(g)!=="object"||g===null)return g;var x=g[Symbol.toPrimitive];if(x!==void 0){var h=x.call(g,y);if(es(h)!=="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(g)})(r,"string");return es(m)==="symbol"?m:String(m)})(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function es(n){return es=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},es(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,m=String(e),g=m.length,y=-1,x="",h=m.charCodeAt(0);++y<g;)(r=m.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&&g==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+m.charAt(y):m.charAt(y):x+="�";return x};n.CSS||(n.CSS={}),n.CSS.escape=t})(kt);var Sb={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function Ab(n){if(es(n)!=="object")throw new Error("single-spa-vue requires a configuration object");var t=Jo(Jo({},Sb),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(es(t.appOptions.el)));t.createApp=t.createApp||t.Vue&&t.Vue.createApp;var e={};return{bootstrap:_b.bind(null,t,e),mount:$b.bind(null,t,e),unmount:Tb.bind(null,t,e),update:Mb.bind(null,t,e)}}function _b(n){return n.loadRootComponent?n.loadRootComponent().then((function(t){return n.rootComponent=t})):Promise.resolve()}function $b(n,t,e){var r={};return Promise.resolve().then((function(){return(function(m,g){return typeof m.appOptions=="function"?m.appOptions(g):Promise.resolve(Jo({},m.appOptions))})(n,e).then((function(m){var g;if(e.domElement&&!m.el&&(m.el=e.domElement),m.el)if(typeof m.el=="string"){if(!(g=document.querySelector(m.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(m.el))}else(g=m.el).id||(g.id="single-spa-application:".concat(e.name)),m.el="#".concat(CSS.escape(g.id));else{var y="single-spa-application:".concat(e.name);m.el="#".concat(CSS.escape(y)),(g=document.getElementById(y))||((g=document.createElement("div")).id=y,document.body.appendChild(g))}if(!n.replaceMode&&(m.el=m.el+" .single-spa-container",!g.querySelector(".single-spa-container"))){var x=document.createElement("div");x.className="single-spa-container",g.appendChild(x)}r.domEl=g,m.render||m.template||!n.rootComponent||(m.render=function(d){return d(n.rootComponent)}),m.data||(m.data={});var h=m.data;if(m.data=function(){return Jo(Jo({},typeof h=="function"?h.call(this,this):h),e)},n.createApp){if(r.vueInstance=n.createApp(m),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,e)).then((function(){return r.root=r.vueInstance.mount(m.el),t[e.name]=r,r.vueInstance}));r.root=r.vueInstance.mount(m.el)}else if(r.vueInstance=new n.Vue(m),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 Mb(n,t,e){return Promise.resolve().then((function(){var r=t[e.name],m=Jo(Jo({},n.appOptions.data||{}),e),g=r.root||r.vueInstance;for(var y in m)g[y]=m[y]}))}function Tb(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 Ib=dr("_",(n,t)=>{const e=n.__vccOpts||n;for(const[r,m]of t)e[r]=m;return e}),Lb={};function Eb(n,t){const e=zt("router-view"),r=zt("v-app");return Cn(),ro(r,{id:"innerapp"},{default:fn(()=>[Dt(e)]),_:1})}const Rb=Ib(Lb,[["render",Eb]]),j2="modulepreload",H2=function(n){return"/"+n},U2={},Ze=function(t,e,r){let m=Promise.resolve();function g(y){const x=new Event("vite:preloadError",{cancelable:!0});if(x.payload=y,window.dispatchEvent(x),!x.defaultPrevented)throw y}return m.then(y=>{for(const x of y||[])x.status==="rejected"&&g(x.reason);return t().catch(g)})},wp=function(n){var t;!n.name!=="NotFound"&&(n.path=`/tools/cmdtlmserver/${n.path.replace(/^\//,"")}`),(t=n.children)==null||t.forEach(wp)},ts=dr("d",(n,t)=>{const e=n.__vccOpts||n;for(const[r,m]of t)e[r]=m;return e}),Ob="/icons/customIcons.svg",Zc={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return Ob+"#"+this.icon}}},bp=()=>{ep(n=>({"259824e2":n.color}))},xp=Zc.setup;Zc.setup=xp?(n,t)=>(bp(),xp(n,t)):bp;const Nb={class:"cosmos-custom-icon"},Db={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},Fb=["href"];function Pb(n,t,e,r,m,g){return Cn(),Dr("span",Nb,[(Cn(),Dr("svg",Db,[Sr("use",{href:g.iconSrc},null,8,Fb)]))])}const Wb=ts(Zc,[["render",Pb],["__scopeId","data-v-4b6f1199"]]),pl=6e4,Jc=36e5,Bb=1e3,Cp=Symbol.for("constructDateFrom");function Wn(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&Cp in n?n[Cp](t):n instanceof Date?new n.constructor(t):new Date(t)}function hn(n,t){return Wn(t||n,n)}let zb={};function Fs(){return zb}function To(n,t){var e,r,m,g;const y=Fs(),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??((g=(m=y.locale)==null?void 0:m.options)==null?void 0:g.weekStartsOn)??0,h=hn(n,t==null?void 0:t.in),d=h.getDay(),s=(d<x?7:0)+d-x;return h.setDate(h.getDate()-s),h.setHours(0,0,0,0),h}function Ps(n,t){return To(n,{...t,weekStartsOn:1})}function kp(n,t){const e=hn(n,void 0),r=e.getFullYear(),m=Wn(e,0);m.setFullYear(r+1,0,4),m.setHours(0,0,0,0);const g=Ps(m),y=Wn(e,0);y.setFullYear(r,0,4),y.setHours(0,0,0,0);const x=Ps(y);return e.getTime()>=g.getTime()?r+1:e.getTime()>=x.getTime()?r:r-1}function gl(n){const t=hn(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 jb(n,...t){const e=Wn.bind(null,t.find(r=>typeof r=="object"));return t.map(e)}function Sp(n,t){const e=hn(n,void 0);return e.setHours(0,0,0,0),e}function Hb(n,t,e){const[r,m]=jb(void 0,n,t),g=Sp(r),y=Sp(m),x=+g-gl(g),h=+y-gl(y);return Math.round((x-h)/864e5)}function Ub(n,t){const e=kp(n),r=Wn(n,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),Ps(r)}function Vb(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Ap(n){return!(!Vb(n)&&typeof n!="number"||isNaN(+hn(n)))}function Gb(n,t){const e=hn(n,void 0);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const Kb={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"}},qb=(n,t,e)=>{let r;const m=Kb[n];return typeof m=="string"?r=m:t===1?r=m.one:r=m.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function eu(n){return(t={})=>{const e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const Yb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Xb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Qb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Zb={date:eu({formats:Yb,defaultWidth:"full"}),time:eu({formats:Xb,defaultWidth:"full"}),dateTime:eu({formats:Qb,defaultWidth:"full"})},Jb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},e0=(n,t,e,r)=>Jb[n];function ya(n){return(t,e)=>{const r=e!=null&&e.context?String(e.context):"standalone";let m;if(r==="formatting"&&n.formattingValues){const y=n.defaultFormattingWidth||n.defaultWidth,x=e!=null&&e.width?String(e.width):y;m=n.formattingValues[x]||n.formattingValues[y]}else{const y=n.defaultWidth,x=e!=null&&e.width?String(e.width):n.defaultWidth;m=n.values[x]||n.values[y]}const g=n.argumentCallback?n.argumentCallback(t):t;return m[g]}}const t0={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},n0={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},r0={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"]},i0={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"]},o0={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"}},s0={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"}},a0=(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"},l0={ordinalNumber:a0,era:ya({values:t0,defaultWidth:"wide"}),quarter:ya({values:n0,defaultWidth:"wide",argumentCallback:n=>n-1}),month:ya({values:r0,defaultWidth:"wide"}),day:ya({values:i0,defaultWidth:"wide"}),dayPeriod:ya({values:o0,defaultWidth:"wide",formattingValues:s0,defaultFormattingWidth:"wide"})};function wa(n){return(t,e={})=>{const r=e.width,m=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],g=t.match(m);if(!g)return null;const y=g[0],x=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],h=Array.isArray(x)?u0(x,a=>a.test(y)):c0(x,a=>a.test(y));let d;d=n.valueCallback?n.valueCallback(h):h,d=e.valueCallback?e.valueCallback(d):d;const s=t.slice(y.length);return{value:d,rest:s}}}function c0(n,t){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function u0(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return e}function h0(n){return(t,e={})=>{const r=t.match(n.matchPattern);if(!r)return null;const m=r[0],g=t.match(n.parsePattern);if(!g)return null;let y=n.valueCallback?n.valueCallback(g[0]):g[0];y=e.valueCallback?e.valueCallback(y):y;const x=t.slice(m.length);return{value:y,rest:x}}}const d0=/^(\d+)(th|st|nd|rd)?/i,p0=/\d+/i,g0={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},f0={any:[/^b/i,/^(a|c)/i]},m0={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},v0={any:[/1/i,/2/i,/3/i,/4/i]},y0={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},w0={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]},b0={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},x0={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},k0={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}},S0={ordinalNumber:h0({matchPattern:d0,parsePattern:p0,valueCallback:n=>parseInt(n,10)}),era:wa({matchPatterns:g0,defaultMatchWidth:"wide",parsePatterns:f0,defaultParseWidth:"any"}),quarter:wa({matchPatterns:m0,defaultMatchWidth:"wide",parsePatterns:v0,defaultParseWidth:"any",valueCallback:n=>n+1}),month:wa({matchPatterns:y0,defaultMatchWidth:"wide",parsePatterns:w0,defaultParseWidth:"any"}),day:wa({matchPatterns:b0,defaultMatchWidth:"wide",parsePatterns:x0,defaultParseWidth:"any"}),dayPeriod:wa({matchPatterns:C0,defaultMatchWidth:"any",parsePatterns:k0,defaultParseWidth:"any"})},_p={code:"en-US",formatDistance:qb,formatLong:Zb,formatRelative:e0,localize:l0,match:S0,options:{weekStartsOn:0,firstWeekContainsDate:1}};function A0(n,t){const e=hn(n,void 0);return Hb(e,Gb(e))+1}function $p(n,t){const e=hn(n,void 0),r=+Ps(e)-+Ub(e);return Math.round(r/6048e5)+1}function tu(n,t){var e,r,m,g;const y=hn(n,t==null?void 0:t.in),x=y.getFullYear(),h=Fs(),d=(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??((g=(m=h.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,s=Wn((t==null?void 0:t.in)||n,0);s.setFullYear(x+1,0,d),s.setHours(0,0,0,0);const a=To(s,t),u=Wn((t==null?void 0:t.in)||n,0);u.setFullYear(x,0,d),u.setHours(0,0,0,0);const l=To(u,t);return+y>=+a?x+1:+y>=+l?x:x-1}function _0(n,t){var e,r,m,g;const y=Fs(),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??((g=(m=y.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,h=tu(n,t),d=Wn((t==null?void 0:t.in)||n,0);return d.setFullYear(h,0,x),d.setHours(0,0,0,0),To(d,t)}function Mp(n,t){const e=hn(n,t==null?void 0:t.in),r=+To(e,t)-+_0(e,t);return Math.round(r/6048e5)+1}function Yt(n,t){const e=n<0?"-":"",r=Math.abs(n).toString().padStart(t,"0");return e+r}const Io={y(n,t){const e=n.getFullYear(),r=e>0?e:1-e;return Yt(t==="yy"?r%100:r,t.length)},M(n,t){const e=n.getMonth();return t==="M"?String(e+1):Yt(e+1,2)},d(n,t){return Yt(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 Yt(n.getHours()%12||12,t.length)},H(n,t){return Yt(n.getHours(),t.length)},m(n,t){return Yt(n.getMinutes(),t.length)},s(n,t){return Yt(n.getSeconds(),t.length)},S(n,t){const e=t.length,r=n.getMilliseconds(),m=Math.trunc(r*Math.pow(10,e-3));return Yt(m,t.length)}},Ws={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Tp={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(),m=r>0?r:1-r;return e.ordinalNumber(m,{unit:"year"})}return Io.y(n,t)},Y:function(n,t,e,r){const m=tu(n,r),g=m>0?m:1-m;if(t==="YY"){const y=g%100;return Yt(y,2)}return t==="Yo"?e.ordinalNumber(g,{unit:"year"}):Yt(g,t.length)},R:function(n,t){const e=kp(n);return Yt(e,t.length)},u:function(n,t){const e=n.getFullYear();return Yt(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 Yt(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 Yt(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 Io.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 Yt(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 m=Mp(n,r);return t==="wo"?e.ordinalNumber(m,{unit:"week"}):Yt(m,t.length)},I:function(n,t,e){const r=$p(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):Yt(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):Io.d(n,t)},D:function(n,t,e){const r=A0(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):Yt(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 m=n.getDay(),g=(m-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(g);case"ee":return Yt(g,2);case"eo":return e.ordinalNumber(g,{unit:"day"});case"eee":return e.day(m,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(m,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(m,{width:"short",context:"formatting"});case"eeee":default:return e.day(m,{width:"wide",context:"formatting"})}},c:function(n,t,e,r){const m=n.getDay(),g=(m-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(g);case"cc":return Yt(g,t.length);case"co":return e.ordinalNumber(g,{unit:"day"});case"ccc":return e.day(m,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(m,{width:"narrow",context:"standalone"});case"cccccc":return e.day(m,{width:"short",context:"standalone"});case"cccc":default:return e.day(m,{width:"wide",context:"standalone"})}},i:function(n,t,e){const r=n.getDay(),m=r===0?7:r;switch(t){case"i":return String(m);case"ii":return Yt(m,t.length);case"io":return e.ordinalNumber(m,{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 m;switch(r===12?m=Ws.noon:r===0?m=Ws.midnight:m=r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(m,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(m,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(m,{width:"wide",context:"formatting"})}},B:function(n,t,e){const r=n.getHours();let m;switch(r>=17?m=Ws.evening:r>=12?m=Ws.afternoon:r>=4?m=Ws.morning:m=Ws.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(m,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(m,{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 Io.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):Io.H(n,t)},K:function(n,t,e){const r=n.getHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):Yt(r,t.length)},k:function(n,t,e){let r=n.getHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):Yt(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):Io.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):Io.s(n,t)},S:function(n,t){return Io.S(n,t)},X:function(n,t,e){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Lp(r);case"XXXX":case"XX":return ns(r);case"XXXXX":case"XXX":default:return ns(r,":")}},x:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"x":return Lp(r);case"xxxx":case"xx":return ns(r);case"xxxxx":case"xxx":default:return ns(r,":")}},O:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ip(r,":");case"OOOO":default:return"GMT"+ns(r,":")}},z:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ip(r,":");case"zzzz":default:return"GMT"+ns(r,":")}},t:function(n,t,e){const r=Math.trunc(+n/1e3);return Yt(r,t.length)},T:function(n,t,e){return Yt(+n,t.length)}};function Ip(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),m=Math.trunc(r/60),g=r%60;return g===0?e+String(m):e+String(m)+t+Yt(g,2)}function Lp(n,t){return n%60===0?(n>0?"-":"+")+Yt(Math.abs(n)/60,2):ns(n,t)}function ns(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),m=Yt(Math.trunc(r/60),2),g=Yt(r%60,2);return e+m+t+g}const Ep=(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"})}},Rp=(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"})}},$0=(n,t)=>{const e=n.match(/(P+)(p+)?/)||[],r=e[1],m=e[2];if(!m)return Ep(n,t);let g;switch(r){case"P":g=t.dateTime({width:"short"});break;case"PP":g=t.dateTime({width:"medium"});break;case"PPP":g=t.dateTime({width:"long"});break;case"PPPP":default:g=t.dateTime({width:"full"});break}return g.replace("{{date}}",Ep(r,t)).replace("{{time}}",Rp(m,t))},nu={p:Rp,P:$0},M0=/^D+$/,T0=/^Y+$/,I0=["D","DD","YY","YYYY"];function Op(n){return M0.test(n)}function Np(n){return T0.test(n)}function ru(n,t,e){const r=L0(n,t,e);if(console.warn(r),I0.includes(n))throw new RangeError(r)}function L0(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 E0=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,R0=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,O0=/^'([^]*?)'?$/,N0=/''/g,D0=/[a-zA-Z]/;function Lo(n,t,e){var r,m,g,y,x,h,d,s;const a=Fs(),u=(e==null?void 0:e.locale)??a.locale??_p,l=(e==null?void 0:e.firstWeekContainsDate)??((m=(r=e==null?void 0:e.locale)==null?void 0:r.options)==null?void 0:m.firstWeekContainsDate)??a.firstWeekContainsDate??((y=(g=a.locale)==null?void 0:g.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)??a.weekStartsOn??((s=(d=a.locale)==null?void 0:d.options)==null?void 0:s.weekStartsOn)??0,c=hn(n,e==null?void 0:e.in);if(!Ap(c))throw new RangeError("Invalid time value");let p=t.match(R0).map(b=>{const L=b[0];if(L==="p"||L==="P"){const M=nu[L];return M(b,u.formatLong)}return b}).join("").match(E0).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const L=b[0];if(L==="'")return{isToken:!1,value:F0(b)};if(Tp[L])return{isToken:!0,value:b};if(L.match(D0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+L+"`");return{isToken:!1,value:b}});u.localize.preprocessor&&(p=u.localize.preprocessor(c,p));const w={firstWeekContainsDate:l,weekStartsOn:o,locale:u};return p.map(b=>{if(!b.isToken)return b.value;const L=b.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&Np(L)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&Op(L))&&ru(L,t,String(n));const M=Tp[L[0]];return M(c,L,u.localize,w)}).join("")}function F0(n){const t=n.match(O0);return t?t[1].replace(N0,"'"):n}var Eo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fl(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Dp={exports:{}},Fp;function P0(){return Fp||(Fp=1,(function(n,t){(function(){var e="ace",r=(function(){return this})();!r&&typeof window<"u"&&(r=window);var m=function(s,a,u){if(typeof s!="string"){m.original?m.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(u=a),m.modules[s]||(m.payloads[s]=u,m.modules[s]=null)};m.modules={},m.payloads={};var g=function(s,a,u){if(typeof a=="string"){var l=h(s,a);if(l!=null)return u&&u(),l}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var o=[],c=0,p=a.length;c<p;++c){var w=h(s,a[c]);if(w==null&&y.original)return;o.push(w)}return u&&u.apply(null,o)||!0}},y=function(s,a){var u=g("",s,a);return u==null&&y.original?y.original.apply(this,arguments):u},x=function(s,a){if(a.indexOf("!")!==-1){var u=a.split("!");return x(s,u[0])+"!"+x(s,u[1])}if(a.charAt(0)=="."){var l=s.split("/").slice(0,-1).join("/");for(a=l+"/"+a;a.indexOf(".")!==-1&&o!=a;){var o=a;a=a.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return a},h=function(s,a){a=x(s,a);var u=m.modules[a];if(!u){if(u=m.payloads[a],typeof u=="function"){var l={},o={id:a,uri:"",exports:l,packaged:!0},c=function(w,b){return g(a,w,b)},p=u(c,l,o);l=p||o.exports,m.modules[a]=l,delete m.payloads[a]}u=m.modules[a]=l||u}return u};function d(s){var a=r;r[s]||(r[s]={}),a=r[s],(!a.define||!a.define.packaged)&&(m.original=a.define,a.define=m,a.define.packaged=!0),(!a.require||!a.require.packaged)&&(y.original=a.require,a.require=y,a.require.packaged=!0)}d(e)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,r,m){function g(y,x,h){Object.defineProperty(y,x,{value:h,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||g(String.prototype,"startsWith",function(y,x){return x=x||0,this.lastIndexOf(y,x)===x}),String.prototype.endsWith||g(String.prototype,"endsWith",function(y,x){var h=this;(x===void 0||x>h.length)&&(x=h.length),x-=y.length;var d=h.indexOf(y,x);return d!==-1&&d===x}),String.prototype.repeat||g(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||g(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 d=arguments[h];d!=null&&Object.keys(d).forEach(function(s){x[s]=d[s]})}return x}),Object.values||(Object.values=function(y){return Object.keys(y).map(function(x){return y[x]})}),Array.prototype.find||g(Array.prototype,"find",function(y){for(var x=this.length,h=arguments[1],d=0;d<x;d++){var s=this[d];if(y.call(h,s,d,this))return s}}),Array.prototype.findIndex||g(Array.prototype,"findIndex",function(y){for(var x=this.length,h=arguments[1],d=0;d<x;d++){var s=this[d];if(y.call(h,s,d,this))return d}}),Array.prototype.includes||g(Array.prototype,"includes",function(y,x){return this.indexOf(y,x)!=-1}),Array.prototype.fill||g(Array.prototype,"fill",function(y){for(var x=this,h=x.length>>>0,d=arguments[1],s=d>>0,a=s<0?Math.max(h+s,0):Math.min(s,h),u=arguments[2],l=u===void 0?h:u>>0,o=l<0?Math.max(h+l,0):Math.min(l,h);a<o;)x[a]=y,a++;return x}),Array.of||g(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(e,r,m){e("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(e,r,m){r.deepCopy=function g(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]=g(y[h]);return x}if(Object.prototype.toString.call(y)!=="[object Object]")return y;x={};for(var h in y)x[h]=g(y[h]);return x}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(e,r,m){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 d="";h>0;)h&1&&(d+=x),(h>>=1)&&(x+=x);return d};var g=/^\s\s*/,y=/\s\s*$/;r.stringTrimLeft=function(x){return x.replace(g,"")},r.stringTrimRight=function(x){return x.replace(y,"")},r.copyObject=function(x){var h={};for(var d in x)h[d]=x[d];return h},r.copyArray=function(x){for(var h=[],d=0,s=x.length;d<s;d++)x[d]&&typeof x[d]=="object"?h[d]=this.copyObject(x[d]):h[d]=x[d];return h},r.deepCopy=e("./deep_copy").deepCopy,r.arrayToMap=function(x){for(var h={},d=0;d<x.length;d++)h[x[d]]=1;return h},r.createMap=function(x){var h=Object.create(null);for(var d in x)h[d]=x[d];return h},r.arrayRemove=function(x,h){for(var d=0;d<=x.length;d++)h===x[d]&&x.splice(d,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 d=[];return x.replace(h,function(s){d.push({offset:arguments[arguments.length-2],length:s.length})}),d},r.deferredCall=function(x){var h=null,d=function(){h=null,x()},s=function(a){return s.cancel(),h=setTimeout(d,a||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 d=null,s=function(){d=null,x()},a=function(u){d==null&&(d=setTimeout(s,u||h))};return a.delay=function(u){d&&clearTimeout(d),d=setTimeout(s,u||h)},a.schedule=a,a.call=function(){this.cancel(),x()},a.cancel=function(){d&&clearTimeout(d),d=null},a.isPending=function(){return d},a},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(x,h,d){return d&&x.codePointAt(h)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,r,m){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 g=typeof navigator=="object"?navigator:{},y=(/mac|win|linux/i.exec(g.platform)||["other"])[0].toLowerCase(),x=g.userAgent||"",h=g.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,m){var g=e("./useragent"),y="http://www.w3.org/1999/xhtml";r.buildDom=function u(l,o,c){if(typeof l=="string"&&l){var p=document.createTextNode(l);return o&&o.appendChild(p),p}if(!Array.isArray(l))return l&&l.appendChild&&o&&o.appendChild(l),l;if(typeof l[0]!="string"||!l[0]){for(var w=[],b=0;b<l.length;b++){var L=u(l[b],o,c);L&&w.push(L)}return w}var M=document.createElement(l[0]),k=l[1],C=1;k&&typeof k=="object"&&!Array.isArray(k)&&(C=2);for(var b=C;b<l.length;b++)u(l[b],M,c);return C==2&&Object.keys(k).forEach(function(R){var O=k[R];R==="class"?M.className=Array.isArray(O)?O.join(" "):O:typeof O=="function"||R=="value"||R[0]=="$"?M[R]=O:R==="ref"?c&&(c[O]=M):R==="style"?typeof O=="string"&&(M.style.cssText=O):O!=null&&M.setAttribute(R,O)}),o&&o.appendChild(M),M},r.getDocumentHead=function(u){return u||(u=document),u.head||u.getElementsByTagName("head")[0]||u.documentElement},r.createElement=function(u,l){return document.createElementNS?document.createElementNS(l||y,u):document.createElement(u)},r.removeChildren=function(u){u.innerHTML=""},r.createTextNode=function(u,l){var o=l?l.ownerDocument:document;return o.createTextNode(u)},r.createFragment=function(u){var l=u?u.ownerDocument:document;return l.createDocumentFragment()},r.hasCssClass=function(u,l){var o=(u.className+"").split(/\s+/g);return o.indexOf(l)!==-1},r.addCssClass=function(u,l){r.hasCssClass(u,l)||(u.className+=" "+l)},r.removeCssClass=function(u,l){for(var o=u.className.split(/\s+/g);;){var c=o.indexOf(l);if(c==-1)break;o.splice(c,1)}u.className=o.join(" ")},r.toggleCssClass=function(u,l){for(var o=u.className.split(/\s+/g),c=!0;;){var p=o.indexOf(l);if(p==-1)break;c=!1,o.splice(p,1)}return c&&o.push(l),u.className=o.join(" "),c},r.setCssClass=function(u,l,o){o?r.addCssClass(u,l):r.removeCssClass(u,l)},r.hasCssString=function(u,l){var o=0,c;if(l=l||document,c=l.querySelectorAll("style")){for(;o<c.length;)if(c[o++].id===u)return!0}},r.removeElementById=function(u,l){l=l||document,l.getElementById(u)&&l.getElementById(u).remove()};var x,h=[];r.useStrictCSP=function(u){x=u,u==!1?d():h||(h=[])};function d(){var u=h;h=null,u&&u.forEach(function(l){s(l[0],l[1])})}function s(u,l,o){if(!(typeof document>"u")){if(h){if(o)d();else if(o===!1)return h.push([u,l])}if(!x){var c=o;!o||!o.getRootNode?c=document:(c=o.getRootNode(),(!c||c==o)&&(c=document));var p=c.ownerDocument||c;if(l&&r.hasCssString(l,c))return null;l&&(u+=`
|
2
|
+
/*# sourceURL=ace/css/`+l+" */");var w=r.createElement("style");w.appendChild(p.createTextNode(u)),l&&(w.id=l),c==p&&(c=r.getDocumentHead(p)),c.insertBefore(w,c.firstChild)}}}if(r.importCssString=s,r.importCssStylsheet=function(u,l){r.buildDom(["link",{rel:"stylesheet",href:u}],r.getDocumentHead(l))},r.scrollbarWidth=function(u){var l=r.createElement("ace_inner");l.style.width="100%",l.style.minWidth="0px",l.style.height="200px",l.style.display="block";var o=r.createElement("ace_outer"),c=o.style;c.position="absolute",c.left="-10000px",c.overflow="hidden",c.width="200px",c.minWidth="0px",c.height="150px",c.display="block",o.appendChild(l);var p=u&&u.documentElement||document&&document.documentElement;if(!p)return 0;p.appendChild(o);var w=l.offsetWidth;c.overflow="scroll";var b=l.offsetWidth;return w===b&&(b=o.clientWidth),p.removeChild(o),w-b},r.computedStyle=function(u,l){return window.getComputedStyle(u,"")||{}},r.setStyle=function(u,l,o){u[l]!==o&&(u[l]=o)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=g.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,g.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var a=document.createElement("div");r.HI_DPI&&a.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!g.isEdge&&typeof a.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),a=null}r.HAS_CSS_TRANSFORMS?r.translate=function(u,l,o){u.style.transform="translate("+Math.round(l)+"px, "+Math.round(o)+"px)"}:r.translate=function(u,l,o){u.style.top=Math.round(o)+"px",u.style.left=Math.round(l)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,r,m){/*
|
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 g=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=g.getDocumentHead(),d=document.createElement("script");d.src=y,h.appendChild(d),d.onload=d.onreadystatechange=function(s,a){(a||!d.readyState||d.readyState=="loaded"||d.readyState=="complete")&&(d=d.onload=d.onreadystatechange=null,a||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,m){r.inherits=function(g,y){g.super_=y,g.prototype=Object.create(y.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(g,y){for(var x in y)g[x]=y[x];return g},r.implement=function(g,y){r.mixin(g,y)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,r,m){var g={},y=function(){this.propagationStopped=!0},x=function(){this.defaultPrevented=!0};g._emit=g._dispatchEvent=function(h,d){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var s=this._eventRegistry[h]||[],a=this._defaultHandlers[h];if(!(!s.length&&!a)){(typeof d!="object"||!d)&&(d={}),d.type||(d.type=h),d.stopPropagation||(d.stopPropagation=y),d.preventDefault||(d.preventDefault=x),s=s.slice();for(var u=0;u<s.length&&(s[u](d,this),!d.propagationStopped);u++);if(a&&!d.defaultPrevented)return a(d,this)}},g._signal=function(h,d){var s=(this._eventRegistry||{})[h];if(s){s=s.slice();for(var a=0;a<s.length;a++)s[a](d,this)}},g.once=function(h,d){var s=this;if(this.on(h,function a(){s.off(h,a),d.apply(null,arguments)}),!d)return new Promise(function(a){d=a})},g.setDefaultHandler=function(h,d){var s=this._defaultHandlers;if(s||(s=this._defaultHandlers={_disabled_:{}}),s[h]){var a=s[h],u=s._disabled_[h];u||(s._disabled_[h]=u=[]),u.push(a);var l=u.indexOf(d);l!=-1&&u.splice(l,1)}s[h]=d},g.removeDefaultHandler=function(h,d){var s=this._defaultHandlers;if(s){var a=s._disabled_[h];if(s[h]==d)a&&this.setDefaultHandler(h,a.pop());else if(a){var u=a.indexOf(d);u!=-1&&a.splice(u,1)}}},g.on=g.addEventListener=function(h,d,s){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[h];return a||(a=this._eventRegistry[h]=[]),a.indexOf(d)==-1&&a[s?"unshift":"push"](d),d},g.off=g.removeListener=g.removeEventListener=function(h,d){this._eventRegistry=this._eventRegistry||{};var s=this._eventRegistry[h];if(s){var a=s.indexOf(d);a!==-1&&s.splice(a,1)}},g.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=g}),ace.define("ace/lib/report_error",["require","exports","module"],function(e,r,m){r.reportError=function(g,y){var x=new Error(g);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,m){var g={"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=g}),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,m){"no use strict";var g=e("./oop"),y=e("./event_emitter").EventEmitter,x=e("./report_error").reportError,h=e("./default_english_messages").defaultEnglishMessages,d={setOptions:function(o){Object.keys(o).forEach(function(c){this.setOption(c,o[c])},this)},getOptions:function(o){var c={};if(o)Array.isArray(o)||(o=Object.keys(o));else{var p=this.$options;o=Object.keys(p).filter(function(w){return!p[w].hidden})}return o.forEach(function(w){c[w]=this.getOption(w)},this),c},setOption:function(o,c){if(this["$"+o]!==c){var p=this.$options[o];if(!p)return s('misspelled option "'+o+'"');if(p.forwardTo)return this[p.forwardTo]&&this[p.forwardTo].setOption(o,c);p.handlesSet||(this["$"+o]=c),p&&p.set&&p.set.call(this,c)}},getOption:function(o){var c=this.$options[o];return c?c.forwardTo?this[c.forwardTo]&&this[c.forwardTo].getOption(o):c&&c.get?c.get.call(this):this["$"+o]:s('misspelled option "'+o+'"')}};function s(o){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var a,u,l=(function(){function o(){this.$defaultOptions={},a=h,u="dollarSigns"}return o.prototype.defineOptions=function(c,p,w){return c.$options||(this.$defaultOptions[p]=c.$options={}),Object.keys(w).forEach(function(b){var L=w[b];typeof L=="string"&&(L={forwardTo:L}),L.name||(L.name=b),c.$options[L.name]=L,"initialValue"in L&&(c["$"+L.name]=L.initialValue)}),g.implement(c,d),this},o.prototype.resetOptions=function(c){Object.keys(c.$options).forEach(function(p){var w=c.$options[p];"value"in w&&c.setOption(p,w.value)})},o.prototype.setDefaultValue=function(c,p,w){if(!c){for(c in this.$defaultOptions)if(this.$defaultOptions[c][p])break;if(!this.$defaultOptions[c][p])return!1}var b=this.$defaultOptions[c]||(this.$defaultOptions[c]={});b[p]&&(b.forwardTo?this.setDefaultValue(b.forwardTo,p,w):b[p].value=w)},o.prototype.setDefaultValues=function(c,p){Object.keys(p).forEach(function(w){this.setDefaultValue(c,w,p[w])},this)},o.prototype.setMessages=function(c,p){a=c,p&&p.placeholders&&(u=p.placeholders)},o.prototype.nls=function(c,p,w){a[c]||(s("No message found for the key '"+c+"' in messages with id "+a.$id+", trying to find a translation for the default string '"+p+"'."),a[p]||s("No message found for the default string '"+p+"' in the provided messages. Falling back to the default English message."));var b=a[c]||a[p]||p;return w&&(u==="dollarSigns"&&(b=b.replace(/\$(\$|[\d]+)/g,function(L,M){return M=="$"?"$":w[M]})),u==="curlyBrackets"&&(b=b.replace(/\{([^\}]+)\}/g,function(L,M){return w[M]}))),b},o})();l.prototype.warn=s,l.prototype.reportError=x,g.implement(l.prototype,y),r.AppConfig=l}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(e,r,m){m.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,m){r.isDark=!1,r.cssClass="ace-tm",r.cssText=e("./textmate-css"),r.$id="ace/theme/textmate";var g=e("../lib/dom");g.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,m){"no use strict";var g=e("./lib/lang"),y=e("./lib/net"),x=e("./lib/dom"),h=e("./lib/app_config").AppConfig;m.exports=r=new h;var d={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(l){if(!d.hasOwnProperty(l))throw new Error("Unknown config key: "+l);return d[l]},r.set=function(l,o){if(d.hasOwnProperty(l))d[l]=o;else if(this.setDefaultValue("",l,o)==!1)throw new Error("Unknown config key: "+l);l=="useStrictCSP"&&x.useStrictCSP(o)},r.all=function(){return g.copyObject(d)},r.$modes={},r.moduleUrl=function(l,o){if(d.$moduleUrls[l])return d.$moduleUrls[l];var c=l.split("/");o=o||c[c.length-2]||"";var p=o=="snippets"?"/":"-",w=c[c.length-1];if(o=="worker"&&p=="-"){var b=new RegExp("^"+o+"[\\-_]|[\\-_]"+o+"$","g");w=w.replace(b,"")}(!w||w==o)&&c.length>1&&(w=c[c.length-2]);var L=d[o+"Path"];return L==null?L=d.basePath:p=="/"&&(o=p=""),L&&L.slice(-1)!="/"&&(L+="/"),L+o+p+w+this.get("suffix")},r.setModuleUrl=function(l,o){return d.$moduleUrls[l]=o};var s=function(l,o){if(l==="ace/theme/textmate"||l==="./theme/textmate")return o(null,e("./theme/textmate"));if(a)return a(l,o);console.error("loader is not configured")},a;r.setLoader=function(l){a=l},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(l,o){var c;if(Array.isArray(l))var p=l[0],w=l[1];else if(typeof l=="string")var w=l;var b=function(L){if(L&&!r.$loading[w])return o&&o(L);if(r.$loading[w]||(r.$loading[w]=[]),r.$loading[w].push(o),!(r.$loading[w].length>1)){var M=function(){s(w,function(k,C){C&&(r.$loaded[w]=C),r._emit("load.module",{name:w,module:C});var R=r.$loading[w];r.$loading[w]=null,R.forEach(function(O){O&&O(C)})})};if(!r.get("packaged"))return M();y.loadScript(r.moduleUrl(w,p),M),u()}};if(r.dynamicModules[w])r.dynamicModules[w]().then(function(L){L.default?b(L.default):b(L)});else{try{c=this.$require(w)}catch{}b(c||r.$loaded[w])}},r.$require=function(l){if(typeof m.require=="function"){var o="require";return m[o](l)}},r.setModuleLoader=function(l,o){r.dynamicModules[l]=o};var u=function(){!d.basePath&&!d.workerPath&&!d.modePath&&!d.themePath&&!Object.keys(d.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),u=function(){})};r.version="1.43.3"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,r,m){e("./lib/fixoldbrowsers");var g=e("./config");g.setLoader(function(d,s){e([d],function(a){s(null,a)})});var y=(function(){return this||typeof window<"u"&&window})();m.exports=function(d){g.init=x,g.$require=e,d.require=e},x(!0);function x(d){if(!(!y||!y.document)){g.set("packaged",d||e.packaged||m.packaged||y.define&&(void 0).packaged);var s={},a="",u=document.currentScript||document._currentScript,l=u&&u.ownerDocument||document;u&&u.src&&(a=u.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var o=l.getElementsByTagName("script"),c=0;c<o.length;c++){var p=o[c],w=p.src||p.getAttribute("src");if(w){for(var b=p.attributes,L=0,M=b.length;L<M;L++){var k=b[L];k.name.indexOf("data-ace-")===0&&(s[h(k.name.replace(/^data-ace-/,""))]=k.value)}var C=w.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);C&&(a=C[1])}}a&&(s.base=s.base||a,s.packaged=!0),s.basePath=s.base,s.workerPath=s.workerPath||s.base,s.modePath=s.modePath||s.base,s.themePath=s.themePath||s.base,delete s.base;for(var R in s)typeof s[R]<"u"&&g.set(R,s[R])}}function h(d){return d.replace(/-(.)/g,function(s,a){return a.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(e,r,m){var g=(function(){function y(x,h,d,s){this.start={row:x,column:h},this.end={row:d,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,d=x.end,s=x.start;return h=this.compare(d.row,d.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 d={row:h+1,column:0};else if(this.end.row<x)var d={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,d||this.end)},y.prototype.extend=function(x,h){var d=this.compare(x,h);if(d==0)return this;if(d==-1)var s={row:x,column:h};else var a={row:x,column:h};return y.fromPoints(s||this.start,a||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),d=x.documentToScreenPosition(this.end);return new y(h.row,h.column,d.row,d.column)},y.prototype.moveBy=function(x,h){this.start.row+=x,this.start.column+=h,this.end.row+=x,this.end.column+=h},y})();g.fromPoints=function(y,x){return new g(y.row,y.column,x.row,x.column)},g.comparePoints=function(y,x){return y.row-x.row||y.column-x.column},r.Range=g}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,r,m){for(var g=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 d=String.fromCharCode(h+32);x["Key"+d.toUpperCase()]=h,y.PRINTABLE_KEYS[h]=d}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 a in s)x[a]=x[a+"Left"]=x[a+"Right"]=s[a];r.$codeToKeyCode=x,y.PRINTABLE_KEYS[173]="-";for(var u in y.FUNCTION_KEYS){var l=y.FUNCTION_KEYS[u].toLowerCase();y[l]=parseInt(u,10)}for(var u in y.PRINTABLE_KEYS){var l=y.PRINTABLE_KEYS[u].toLowerCase();y[l]=parseInt(u,10)}g.mixin(y,y.MODIFIER_KEYS),g.mixin(y,y.PRINTABLE_KEYS),g.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"],c=Math.pow(2,o.length);c--;)y.KEY_MODS[c]=o.filter(function(p){return c&y.KEY_MODS[p]}).join("-")+"-"})(),y.KEY_MODS[0]="",y.KEY_MODS[-1]="input-",g.mixin(r,y),r.default=r,r.keyCodeToString=function(o){var c=y[o];return typeof c!="string"&&(c=String.fromCharCode(o)),c.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,m){var g=e("./keys"),y=e("./useragent"),x=null,h=0,d;function s(){d=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return d={passive:!1},!0}})}catch{}}function a(){return d==null&&s(),d}function u(L,M,k){this.elem=L,this.type=M,this.callback=k}u.prototype.destroy=function(){o(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var l=r.addListener=function(L,M,k,C){L.addEventListener(M,k,a()),C&&C.$toDestroy.push(new u(L,M,k))},o=r.removeListener=function(L,M,k){L.removeEventListener(M,k,a())};r.stopEvent=function(L){return r.stopPropagation(L),r.preventDefault(L),!1},r.stopPropagation=function(L){L.stopPropagation&&L.stopPropagation()},r.preventDefault=function(L){L.preventDefault&&L.preventDefault()},r.getButton=function(L){return L.type=="dblclick"?0:L.type=="contextmenu"||y.isMac&&L.ctrlKey&&!L.altKey&&!L.shiftKey?2:L.button},r.capture=function(L,M,k){var C=L&&L.ownerDocument||document;function R(O){M&&M(O),k&&k(O),o(C,"mousemove",M),o(C,"mouseup",R),o(C,"dragstart",R)}return l(C,"mousemove",M),l(C,"mouseup",R),l(C,"dragstart",R),R},r.addMouseWheelListener=function(L,M,k){l(L,"wheel",function(C){var R=.15,O=C.deltaX||0,E=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=O*R,C.wheelY=E*R;break;case C.DOM_DELTA_LINE:var I=15;C.wheelX=O*I,C.wheelY=E*I;break;case C.DOM_DELTA_PAGE:var z=150;C.wheelX=O*z,C.wheelY=E*z;break}M(C)},k)},r.addMultiMouseDownListener=function(L,M,k,C,R){var O=0,E,I,z,P={2:"dblclick",3:"tripleclick",4:"quadclick"};function N(_){if(r.getButton(_)!==0?O=0:_.detail>1?(O++,O>4&&(O=1)):O=1,y.isIE){var S=Math.abs(_.clientX-E)>5||Math.abs(_.clientY-I)>5;(!z||S)&&(O=1),z&&clearTimeout(z),z=setTimeout(function(){z=null},M[O-1]||600),O==1&&(E=_.clientX,I=_.clientY)}if(_._clicks=O,k[C]("mousedown",_),O>4)O=0;else if(O>1)return k[C](P[O],_)}Array.isArray(L)||(L=[L]),L.forEach(function(_){l(_,"mousedown",N,R)})};function c(L){return 0|(L.ctrlKey?1:0)|(L.altKey?2:0)|(L.shiftKey?4:0)|(L.metaKey?8:0)}r.getModifierString=function(L){return g.KEY_MODS[c(L)]};function p(L,M,k){var C=c(M);if(!k&&M.code&&(k=g.$codeToKeyCode[M.code]||k),!y.isMac&&x){if(M.getModifierState&&(M.getModifierState("OS")||M.getModifierState("Win"))&&(C|=8),x.altGr)if((3&C)!=3)x.altGr=0;else return;if(k===18||k===17){var R=M.location;if(k===17&&R===1)x[k]==1&&(h=M.timeStamp);else if(k===18&&C===3&&R===2){var O=M.timeStamp-h;O<50&&(x.altGr=!0)}}}if(k in g.MODIFIER_KEYS&&(k=-1),!(!C&&k===13&&M.location===3&&(L(M,C,-k),M.defaultPrevented))){if(y.isChromeOS&&C&8){if(L(M,C,k),M.defaultPrevented)return;C&=-9}return!C&&!(k in g.FUNCTION_KEYS)&&!(k in g.PRINTABLE_KEYS)?!1:L(M,C,k)}}r.addCommandKeyListener=function(L,M,k){var C=null;l(L,"keydown",function(R){x[R.keyCode]=(x[R.keyCode]||0)+1;var O=p(M,R,R.keyCode);return C=R.defaultPrevented,O},k),l(L,"keypress",function(R){C&&(R.ctrlKey||R.altKey||R.shiftKey||R.metaKey)&&(r.stopEvent(R),C=null)},k),l(L,"keyup",function(R){x[R.keyCode]=null},k),x||(w(),l(window,"focus",w))};function w(){x=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!y.isOldIE){var b=1;r.nextTick=function(L,M){M=M||window;var k="zero-timeout-message-"+b++,C=function(R){R.data==k&&(r.stopPropagation(R),o(M,"message",C),L())};l(M,"message",C),M.postMessage(k,"*")}}r.$idleBlocked=!1,r.onIdle=function(L,M){return setTimeout(function k(){r.$idleBlocked?setTimeout(k,100):L()},M)},r.$idleBlockId=null,r.blockIdle=function(L){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},L||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(L){setTimeout(L,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,r,m){var g;m.exports={lineMode:!1,pasteCancelled:function(){return g&&g>Date.now()-50?!0:g=!1},cancel:function(){g=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,m){var g=e("../lib/event"),y=e("../config").nls,x=e("../lib/useragent"),h=e("../lib/dom"),d=e("../lib/lang"),s=e("../clipboard"),a=x.isChrome<18,u=x.isIE,l=x.isChrome>63,o=400,c=e("../lib/keys"),p=c.KEY_MODS,w=x.isIOS,b=w?/\s/:/\n/,L=x.isMobile,M=(function(){function k(C,R){var O=this;this.host=R,this.text=h.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",C.insertBefore(this.text,C.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",L||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),g.addListener(this.text,"blur",function(E){O.ignoreFocusEvents||(R.onBlur(E),O.$isFocused=!1)},R),g.addListener(this.text,"focus",function(E){if(!O.ignoreFocusEvents){if(O.$isFocused=!0,x.isEdge)try{if(!document.hasFocus())return}catch{}R.onFocus(E),x.isEdge?setTimeout(O.resetSelection.bind(O)):O.resetSelection()}},R),this.$focusScroll=!1,R.on("beforeEndOperation",function(){var E=R.curOp,I=E&&E.command&&E.command.name;if(I!="insertstring"){var z=I&&(E.docChanged||E.selectionChanged);O.inComposition&&z&&(O.lastValue=O.text.value="",O.onCompositionEnd()),O.resetSelection()}}),R.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=w?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&R.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,g.addCommandKeyListener(this.text,function(E,I,z){if(!O.inComposition)return R.onCommandKey(E,I,z)},R),g.addListener(this.text,"select",this.onSelect.bind(this),R),g.addListener(this.text,"input",this.onInput.bind(this),R),g.addListener(this.text,"cut",this.onCut.bind(this),R),g.addListener(this.text,"copy",this.onCopy.bind(this),R),g.addListener(this.text,"paste",this.onPaste.bind(this),R),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&g.addListener(C,"keydown",function(E){if(!(x.isMac&&!E.metaKey||!E.ctrlKey))switch(E.keyCode){case 67:O.onCopy(E);break;case 86:O.onPaste(E);break;case 88:O.onCut(E);break}},R),this.syncComposition=d.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),g.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),R),g.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),R),g.addListener(this.text,"keyup",this.onKeyup.bind(this),R),g.addListener(this.text,"keydown",this.syncComposition.bind(this),R),g.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),R),this.closeTimeout,g.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),R),g.addListener(this.text,"mousedown",function(E){E.preventDefault(),O.onContextMenuClose()},R),g.addListener(R.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),R),g.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),R),w&&this.addIosSelectionHandler(C,R,this.text)}return k.prototype.addIosSelectionHandler=function(C,R,O){var E=this,I=null,z=!1;O.addEventListener("keydown",function(N){I&&clearTimeout(I),z=!0},!0),O.addEventListener("keyup",function(N){I=setTimeout(function(){z=!1},100)},!0);var P=function(N){if(document.activeElement===O&&!(z||E.inComposition||R.$mouseHandler.isMousePressed)&&!E.copied){var _=O.selectionStart,S=O.selectionEnd,D=null,j=0;if(_==0?D=c.up:_==1?D=c.home:S>E.lastSelectionEnd&&E.lastValue[S]==`
|
167
|
+
`?D=c.end:_<E.lastSelectionStart&&E.lastValue[_-1]==" "?(D=c.left,j=p.option):_<E.lastSelectionStart||_==E.lastSelectionStart&&E.lastSelectionEnd!=E.lastSelectionStart&&_==S?D=c.left:S>E.lastSelectionEnd&&E.lastValue.slice(0,S).split(`
|
168
|
+
`).length>2?D=c.down:S>E.lastSelectionEnd&&E.lastValue[S-1]==" "?(D=c.right,j=p.option):(S>E.lastSelectionEnd||S==E.lastSelectionEnd&&E.lastSelectionEnd!=E.lastSelectionStart&&_==S)&&(D=c.right),_!==S&&(j|=p.shift),D){var U=R.onCommandKey({},j,D);if(!U&&R.commands){D=c.keyCodeToString(D);var q=R.commands.findKeyCommand(j,D);q&&R.execCommand(q)}E.lastSelectionStart=_,E.lastSelectionEnd=S,E.resetSelection("")}}};document.addEventListener("selectionchange",P),R.on("destroy",function(){document.removeEventListener("selectionchange",P)})},k.prototype.onContextMenuClose=function(){var C=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){C.tempStyle&&(C.text.style.cssText=C.tempStyle,C.tempStyle=""),C.host.renderer.$isMousePressed=!1,C.host.renderer.$keepTextAreaAtCursor&&C.host.renderer.$moveTextAreaToCursor()},0)},k.prototype.$onContextMenu=function(C){this.host.textInput.onContextMenu(C),this.onContextMenuClose()},k.prototype.onKeyup=function(C){C.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},k.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},k.prototype.onCompositionStart=function(C){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){C.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var R=this.host.getSelectionRange();R.end.row=R.start.row,R.end.column=R.start.column,this.inComposition.markerRange=R,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},k.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var C=this.text.value;this.sendText(C),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},k.prototype.onCompositionEnd=function(C){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),C&&this.onInput())},k.prototype.onCut=function(C){this.doCopy(C,!0)},k.prototype.onCopy=function(C){this.doCopy(C,!1)},k.prototype.onPaste=function(C){var R=this.handleClipboardData(C);s.pasteCancelled()||(typeof R=="string"?(R&&this.host.onPaste(R,C),x.isIE&&setTimeout(this.resetSelection),g.preventDefault(C)):(this.text.value="",this.pasted=!0))},k.prototype.doCopy=function(C,R){var O=this,E=this.host.getCopyText();if(!E)return g.preventDefault(C);this.handleClipboardData(C,E)?(w&&(this.resetSelection(E),this.copied=E,setTimeout(function(){O.copied=!1},10)),R?this.host.onCut():this.host.onCopy(),g.preventDefault(C)):(this.copied=!0,this.text.value=E,this.text.select(),setTimeout(function(){O.copied=!1,O.resetSelection(),R?O.host.onCut():O.host.onCopy()}))},k.prototype.handleClipboardData=function(C,R,O){var E=C.clipboardData||window.clipboardData;if(!(!E||a)){var I=u||O?"Text":"text/plain";try{return R?E.setData(I,R)!==!1:E.getData(I)}catch(z){if(!O)return this.handleClipboardData(z,R,!0)}}},k.prototype.onInput=function(C){if(this.inComposition)return this.onCompositionUpdate();if(C&&C.inputType){if(C.inputType=="historyUndo")return this.host.execCommand("undo");if(C.inputType=="historyRedo")return this.host.execCommand("redo")}var R=this.text.value,O=this.sendText(R,!0);(R.length>o+100||b.test(O)||L&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},k.prototype.sendText=function(C,R){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),C&&this.host.onPaste(C),this.pasted=!1,"";for(var O=this.text.selectionStart,E=this.text.selectionEnd,I=this.lastSelectionStart,z=this.lastValue.length-this.lastSelectionEnd,P=C,N=C.length-O,_=C.length-E,S=0;I>0&&this.lastValue[S]==C[S];)S++,I--;for(P=P.slice(S),S=1;z>0&&this.lastValue.length-S>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-S]==C[C.length-S];)S++,z--;N-=S-1,_-=S-1;var D=P.length-S+1;if(D<0&&(I=-D,D=0),P=P.slice(0,D),!R&&!P&&!N&&!I&&!z&&!_)return"";this.sendingText=!0;var j=!1;return x.isAndroid&&P==". "&&(P=" ",j=!0),P&&!I&&!z&&!N&&!_||this.commandMode?this.host.onTextInput(P):this.host.onTextInput(P,{extendLeft:I,extendRight:z,restoreStart:N,restoreEnd:_}),this.sendingText=!1,this.lastValue=C,this.lastSelectionStart=O,this.lastSelectionEnd=E,this.lastRestoreEnd=_,j?`
|
169
|
+
`:P},k.prototype.onSelect=function(C){var R=this;if(!this.inComposition){var O=function(E){return E.selectionStart===0&&E.selectionEnd>=R.lastValue.length&&E.value===R.lastValue&&R.lastValue&&E.selectionEnd!==R.lastSelectionEnd};this.copied?this.copied=!1:O(this.text)?(this.host.selectAll(),this.resetSelection()):L&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},k.prototype.$resetSelectionIOS=function(C){if(!(!this.$isFocused||this.copied&&!C||this.sendingText)){C||(C="");var R=`
|
170
|
+
ab`+C+`cde fg
|
171
|
+
`;R!=this.text.value&&(this.text.value=this.lastValue=R);var O=4,E=4+(C.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=O||this.lastSelectionEnd!=E)&&this.text.setSelectionRange(O,E),this.lastSelectionStart=O,this.lastSelectionEnd=E}},k.prototype.$resetSelection=function(){var C=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var R=0,O=0,E="",I=function(q,Z){for(var te=Z,he=1;he<=q-C.rowStart&&he<2*C.numberOfExtraLines+1;he++)te+=C.host.session.getLine(q-he).length+1;return te};if(this.host.session){var z=this.host.selection,P=z.getRange(),N=z.cursor.row;N===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):N===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(N<this.rowStart-1||N>this.rowEnd+1)&&(this.rowStart=N>this.numberOfExtraLines?N-this.numberOfExtraLines:0,this.rowEnd=N>this.numberOfExtraLines?N+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var _=[],S=this.rowStart;S<=this.rowEnd;S++)_.push(this.host.session.getLine(S));if(E=_.join(`
|
172
|
+
`),R=I(P.start.row,P.start.column),O=I(P.end.row,P.end.column),P.start.row<this.rowStart){var D=this.host.session.getLine(this.rowStart-1);R=P.start.row<this.rowStart-1?0:R,O+=D.length+1,E=D+`
|
173
|
+
`+E}else if(P.end.row>this.rowEnd){var j=this.host.session.getLine(this.rowEnd+1);O=P.end.row>this.rowEnd+1?j.length:P.end.column,O+=E.length+1,E=E+`
|
174
|
+
`+j}else L&&N>0&&(E=`
|
175
|
+
`+E,O+=1,R+=1);E.length>o&&(R<o&&O<o?E=E.slice(0,o):(E=`
|
176
|
+
`,R==O?R=O=0:(R=0,O=1)));var U=E+`
|
177
|
+
|
178
|
+
`;U!=this.lastValue&&(this.text.value=this.lastValue=U,this.lastSelectionStart=this.lastSelectionEnd=U.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=O||this.lastSelectionStart!=R||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(R,O),this.lastSelectionStart=R,this.lastSelectionEnd=O}catch{}this.inComposition=!1}},k.prototype.setHost=function(C){this.host=C},k.prototype.setNumberOfExtraLines=function(C){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,C<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=C},k.prototype.setAriaLabel=function(){var C="";if(this.host.$textInputAriaLabel&&(C+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var R=this.host.session.selection.cursor.row;C+=y("text-input.aria-label","Cursor at row $0",[R+1])}this.text.setAttribute("aria-label",C)},k.prototype.setAriaOptions=function(C){C.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",C.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",C.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),C.role&&this.text.setAttribute("role",C.role),C.setLabel&&(this.text.setAttribute("aria-roledescription",y("text-input.aria-roledescription","editor")),this.setAriaLabel())},k.prototype.focus=function(){var C=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||l||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var R=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var O=this.text.getBoundingClientRect().top!=0}catch{return}var E=[];if(O)for(var I=this.text.parentElement;I&&I.nodeType==1;)E.push(I),I.setAttribute("ace_nocontext","true"),!I.parentElement&&I.getRootNode?I=I.getRootNode().host:I=I.parentElement;this.text.focus({preventScroll:!0}),O&&E.forEach(function(z){z.removeAttribute("ace_nocontext")}),setTimeout(function(){C.text.style.position="",C.text.style.top=="0px"&&(C.text.style.top=R)},0)},k.prototype.blur=function(){this.text.blur()},k.prototype.isFocused=function(){return this.$isFocused},k.prototype.setInputHandler=function(C){this.inputHandler=C},k.prototype.getInputHandler=function(){return this.inputHandler},k.prototype.getElement=function(){return this.text},k.prototype.setCommandMode=function(C){this.commandMode=C,this.text.readOnly=!1},k.prototype.setReadOnly=function(C){this.commandMode||(this.text.readOnly=C)},k.prototype.setCopyWithEmptySelection=function(C){},k.prototype.onContextMenu=function(C){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:C}),this.moveToMouse(C,!0)},k.prototype.moveToMouse=function(C,R){var O=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(R?"z-index:100000;":"")+(x.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var E=this.host.container.getBoundingClientRect(),I=h.computedStyle(this.host.container),z=E.top+(parseInt(I.borderTopWidth)||0),P=E.left+(parseInt(I.borderLeftWidth)||0),N=E.bottom-z-this.text.clientHeight-2,_=function(S){h.translate(O.text,S.clientX-P-2,Math.min(S.clientY-z-2,N))};_(C),C.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),x.isWin&&g.capture(this.host.container,_,this.onContextMenuClose.bind(this)))},k.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},k})();r.TextInput=M,r.$setUserAgentForTests=function(k,C){L=k,w=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,r,m){var g=e("../lib/useragent"),y=0,x=550,h=(function(){function a(u){u.$clickSelection=null;var l=u.editor;l.setDefaultHandler("mousedown",this.onMouseDown.bind(u)),l.setDefaultHandler("dblclick",this.onDoubleClick.bind(u)),l.setDefaultHandler("tripleclick",this.onTripleClick.bind(u)),l.setDefaultHandler("quadclick",this.onQuadClick.bind(u)),l.setDefaultHandler("mousewheel",this.onMouseWheel.bind(u));var o=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];o.forEach(function(c){u[c]=this[c]},this),u.selectByLines=this.extendSelectionBy.bind(u,"getLineRange"),u.selectByWords=this.extendSelectionBy.bind(u,"getWordRange")}return a.prototype.onMouseDown=function(u){var l=u.inSelection(),o=u.getDocumentPosition();this.mousedownEvent=u;var c=this.editor,p=u.getButton();if(p!==0){var w=c.getSelectionRange(),b=w.isEmpty();(b||p==1)&&c.selection.moveToPosition(o),p==2&&(c.textInput.onContextMenu(u.domEvent),g.isMozilla||u.preventDefault());return}if(this.mousedownEvent.time=Date.now(),l&&!c.isFocused()&&(c.focus(),this.$focusTimeout&&!this.$clickSelection&&!c.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(u);return}return this.captureMouse(u),this.startSelect(o,u.domEvent._clicks>1),u.preventDefault()},a.prototype.startSelect=function(u,l){u=u||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(u):l||o.selection.moveToPosition(u),l||this.select(),o.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var u,l=this.editor,o=l.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var c=this.$clickSelection.comparePoint(o);if(c==-1)u=this.$clickSelection.end;else if(c==1)u=this.$clickSelection.start;else{var p=s(this.$clickSelection,o);o=p.cursor,u=p.anchor}l.selection.setSelectionAnchor(u.row,u.column)}l.selection.selectToPosition(o),l.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(u){var l,o=this.editor,c=o.renderer.screenToTextCoordinates(this.x,this.y),p=o.selection[u](c.row,c.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(p.start),b=this.$clickSelection.comparePoint(p.end);if(w==-1&&b<=0)l=this.$clickSelection.end,(p.end.row!=c.row||p.end.column!=c.column)&&(c=p.start);else if(b==1&&w>=0)l=this.$clickSelection.start,(p.start.row!=c.row||p.start.column!=c.column)&&(c=p.end);else if(w==-1&&b==1)c=p.end,l=p.start;else{var L=s(this.$clickSelection,c);c=L.cursor,l=L.anchor}o.selection.setSelectionAnchor(l.row,l.column)}o.selection.selectToPosition(c),o.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var u=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),l=Date.now();(u>y||l-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(u){var l=u.getDocumentPosition(),o=this.editor,c=o.session,p=c.getBracketRange(l);p?(p.isEmpty()&&(p.start.column--,p.end.column++),this.setState("select")):(p=o.selection.getWordRange(l.row,l.column),this.setState("selectByWords")),this.$clickSelection=p,this.select()},a.prototype.onTripleClick=function(u){var l=u.getDocumentPosition(),o=this.editor;this.setState("selectByLines");var c=o.getSelectionRange();c.isMultiLine()&&c.contains(l.row,l.column)?(this.$clickSelection=o.selection.getLineRange(c.start.row),this.$clickSelection.end=o.selection.getLineRange(c.end.row).end):this.$clickSelection=o.selection.getLineRange(l.row),this.select()},a.prototype.onQuadClick=function(u){var l=this.editor;l.selectAll(),this.$clickSelection=l.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(u){if(!u.getAccelKey()){u.getShiftKey()&&u.wheelY&&!u.wheelX&&(u.wheelX=u.wheelY,u.wheelY=0);var l=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var o=this.$lastScroll,c=u.domEvent.timeStamp,p=c-o.t,w=p?u.wheelX/p:o.vx,b=p?u.wheelY/p:o.vy;p<x&&(w=(w+o.vx)/2,b=(b+o.vy)/2);var L=Math.abs(w/b),M=!1;if(L>=1&&l.renderer.isScrollableBy(u.wheelX*u.speed,0)&&(M=!0),L<=1&&l.renderer.isScrollableBy(0,u.wheelY*u.speed)&&(M=!0),M)o.allowed=c;else if(c-o.allowed<x){var k=Math.abs(w)<=1.5*Math.abs(o.vx)&&Math.abs(b)<=1.5*Math.abs(o.vy);k?(M=!0,o.allowed=c):o.allowed=0}if(o.t=c,o.vx=w,o.vy=b,M)return l.renderer.scrollBy(u.wheelX*u.speed,u.wheelY*u.speed),u.stop()}},a})();h.prototype.selectEnd=h.prototype.selectByLinesEnd,h.prototype.selectAllEnd=h.prototype.selectByLinesEnd,h.prototype.selectByWordsEnd=h.prototype.selectByLinesEnd,r.DefaultHandlers=h;function d(a,u,l,o){return Math.sqrt(Math.pow(l-a,2)+Math.pow(o-u,2))}function s(a,u){if(a.start.row==a.end.row)var l=2*u.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var l=u.column-4;else var l=2*u.row-a.start.row-a.end.row;return l<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,r,m){r.preventParentScroll=function(g){g.stopPropagation();var y=g.currentTarget,x=y.scrollHeight>y.clientHeight;x||g.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,r,m){var g=this&&this.__extends||(function(){var c=function(p,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,L){b.__proto__=L}||function(b,L){for(var M in L)Object.prototype.hasOwnProperty.call(L,M)&&(b[M]=L[M])},c(p,w)};return function(p,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");c(p,w);function b(){this.constructor=p}p.prototype=w===null?Object.create(w):(b.prototype=w.prototype,new b)}})(),y=this&&this.__values||function(c){var p=typeof Symbol=="function"&&Symbol.iterator,w=p&&c[p],b=0;if(w)return w.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&b>=c.length&&(c=void 0),{value:c&&c[b++],done:!c}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},x=e("./lib/dom");e("./lib/event");var h=e("./range").Range,d=e("./lib/scroll").preventParentScroll,s="ace_tooltip",a=(function(){function c(p){this.isOpen=!1,this.$element=null,this.$parentNode=p}return c.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},c.prototype.getElement=function(){return this.$element||this.$init()},c.prototype.setText=function(p){this.getElement().textContent=p},c.prototype.setHtml=function(p){this.getElement().innerHTML=p},c.prototype.setPosition=function(p,w){var b=this.getElement(),L=b.offsetParent&&b.offsetParent.getBoundingClientRect();b.style.left=p-(L?L.left:0)+"px",b.style.top=w-(L?L.top:0)+"px"},c.prototype.setClassName=function(p){x.addCssClass(this.getElement(),p)},c.prototype.setTheme=function(p){this.$element.className=s+" "+(p.isDark?"ace_dark ":"")+(p.cssClass||"")},c.prototype.show=function(p,w,b){p!=null&&this.setText(p),w!=null&&b!=null&&this.setPosition(w,b),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},c.prototype.hide=function(p){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=s,this.isOpen=!1)},c.prototype.getHeight=function(){return this.getElement().offsetHeight},c.prototype.getWidth=function(){return this.getElement().offsetWidth},c.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},c})(),u=(function(){function c(){this.popups=[]}return c.prototype.addPopup=function(p){this.popups.push(p),this.updatePopups()},c.prototype.removePopup=function(p){var w=this.popups.indexOf(p);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},c.prototype.updatePopups=function(){var p,w,b,L;this.popups.sort(function(P,N){return N.priority-P.priority});var M=[];try{for(var k=y(this.popups),C=k.next();!C.done;C=k.next()){var R=C.value,O=!0;try{for(var E=(b=void 0,y(M)),I=E.next();!I.done;I=E.next()){var z=I.value;if(this.doPopupsOverlap(z,R)){O=!1;break}}}catch(P){b={error:P}}finally{try{I&&!I.done&&(L=E.return)&&L.call(E)}finally{if(b)throw b.error}}O?M.push(R):R.hide()}}catch(P){p={error:P}}finally{try{C&&!C.done&&(w=k.return)&&w.call(k)}finally{if(p)throw p.error}}},c.prototype.doPopupsOverlap=function(p,w){var b=p.getElement().getBoundingClientRect(),L=w.getElement().getBoundingClientRect();return b.left<L.right&&b.right>L.left&&b.top<L.bottom&&b.bottom>L.top},c})(),l=new u;r.popupManager=l,r.Tooltip=a;var o=(function(c){g(p,c);function p(w){w===void 0&&(w=document.body);var b=c.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 L=b.getElement();return L.style.whiteSpace="pre-wrap",L.style.pointerEvents="auto",L.addEventListener("mouseout",b.onMouseOut),L.tabIndex=-1,L.addEventListener("blur",(function(){L.contains(document.activeElement)||this.hide()}).bind(b)),L.addEventListener("wheel",d),b}return p.prototype.addToEditor=function(w){w.on("mousemove",this.onMouseMove),w.on("mousedown",this.hide),w.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},p.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)},p.prototype.onMouseMove=function(w,b){this.lastEvent=w,this.lastT=Date.now();var L=b.$mouseHandler.isMousePressed;if(this.isOpen){var M=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(M.row,M.column)||L||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||L||(this.lastEvent=w,this.timeout=setTimeout(this.waitForHover,this.idleTime))},p.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)},p.prototype.isOutsideOfText=function(w){var b=w.editor,L=w.getDocumentPosition(),M=b.session.getLine(L.row);if(L.column==M.length){var k=b.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),C=b.session.documentToScreenPosition(L.row,L.column);if(C.column!=k.column||C.row!=k.row)return!0}return!1},p.prototype.setDataProvider=function(w){this.$gatherData=w},p.prototype.showForRange=function(w,b,L,M){var k=10;if(!(M&&M!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var C=w.renderer;this.isOpen||(l.addPopup(this),this.$registerCloseEvents(),this.setTheme(C.theme)),this.isOpen=!0,this.addMarker(b,w.session),this.range=h.fromPoints(b.start,b.end);var R=C.textToScreenCoordinates(b.start.row,b.start.column),O=C.scroller.getBoundingClientRect();R.pageX<O.left&&(R.pageX=O.left);var E=this.getElement();E.innerHTML="",E.appendChild(L),E.style.maxHeight="",E.style.display="block";var I=E.clientHeight,z=E.clientWidth,P=window.innerHeight-R.pageY-C.lineHeight,N=!0;R.pageY-I<0&&R.pageY<P&&(N=!1),E.style.maxHeight=(N?R.pageY:P)-k+"px",E.style.top=N?"":R.pageY+C.lineHeight+"px",E.style.bottom=N?window.innerHeight-R.pageY+"px":"",E.style.left=Math.min(R.pageX,window.innerWidth-z-k)+"px"}},p.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")},p.prototype.hide=function(w){!w&&document.activeElement==this.getElement()||w&&w.target&&(w.type!="keydown"||w.ctrlKey||w.metaKey)&&this.$element.contains(w.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,l.removePopup(this)))},p.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},p.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},p.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())},p})(a);r.HoverTooltip=o}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(e,r,m){var g=this&&this.__extends||(function(){var c=function(p,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,L){b.__proto__=L}||function(b,L){for(var M in L)Object.prototype.hasOwnProperty.call(L,M)&&(b[M]=L[M])},c(p,w)};return function(p,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");c(p,w);function b(){this.constructor=p}p.prototype=w===null?Object.create(w):(b.prototype=w.prototype,new b)}})(),y=this&&this.__values||function(c){var p=typeof Symbol=="function"&&Symbol.iterator,w=p&&c[p],b=0;if(w)return w.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&b>=c.length&&(c=void 0),{value:c&&c[b++],done:!c}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},x=e("../lib/dom"),h=e("../lib/event"),d=e("../tooltip").Tooltip,s=e("../config").nls,a=5,u=3;r.GUTTER_TOOLTIP_LEFT_OFFSET=a,r.GUTTER_TOOLTIP_TOP_OFFSET=u;function l(c){var p=c.editor,w=p.renderer.$gutterLayer,b=new o(p,!0);c.editor.setDefaultHandler("guttermousedown",function(O){if(!(!p.isFocused()||O.getButton()!=0)){var E=w.getRegion(O);if(E!="foldWidgets"){var I=O.getDocumentPosition().row,z=p.session.selection;if(O.getShiftKey())z.selectTo(I,0);else{if(O.domEvent.detail==2)return p.selectAll(),O.preventDefault();c.$clickSelection=p.selection.getLineRange(I)}return c.setState("selectByLines"),c.captureMouse(O),O.preventDefault()}}});var L,M;function k(){var O=M.getDocumentPosition().row,E=p.session.getLength();if(O==E){var I=p.renderer.pixelToScreenCoordinates(0,M.y).row,z=M.$pos;if(I>p.session.documentToScreenRow(z.row,z.column))return C()}if(b.showTooltip(O),!!b.isOpen)if(p.on("mousewheel",C),p.on("changeSession",C),window.addEventListener("keydown",C,!0),c.$tooltipFollowsMouse)R(M);else{var P=M.getGutterRow(),N=w.$lines.get(P);if(N){var _=N.element.querySelector(".ace_gutter_annotation"),S=_.getBoundingClientRect(),D=b.getElement().style;D.left=S.right-a+"px",D.top=S.bottom-u+"px"}else R(M)}}function C(O){O&&O.type==="keydown"&&(O.ctrlKey||O.metaKey)||O&&O.type==="mouseout"&&(!O.relatedTarget||b.getElement().contains(O.relatedTarget))||(L&&(L=clearTimeout(L)),b.isOpen&&(b.hideTooltip(),p.off("mousewheel",C),p.off("changeSession",C),window.removeEventListener("keydown",C,!0)))}function R(O){b.setPosition(O.x,O.y)}c.editor.setDefaultHandler("guttermousemove",function(O){var E=O.domEvent.target||O.domEvent.srcElement;if(x.hasCssClass(E,"ace_fold-widget")||x.hasCssClass(E,"ace_custom-widget"))return C();b.isOpen&&c.$tooltipFollowsMouse&&R(O),M=O,!L&&(L=setTimeout(function(){L=null,M&&!c.isMousePressed&&k()},50))}),h.addListener(p.renderer.$gutter,"mouseout",function(O){M=null,b.isOpen&&(L=setTimeout(function(){L=null,C(O)},50))},p)}r.GutterHandler=l;var o=(function(c){g(p,c);function p(w,b){b===void 0&&(b=!1);var L=c.call(this,w.container)||this;L.id="gt"+ ++p.$uid,L.editor=w,L.visibleTooltipRow;var M=L.getElement();return M.setAttribute("role","tooltip"),M.setAttribute("id",L.id),M.style.pointerEvents="auto",b&&(L.onMouseOut=L.onMouseOut.bind(L),M.addEventListener("mouseout",L.onMouseOut)),L}return p.prototype.onMouseOut=function(w){this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||this.hideTooltip())},p.prototype.setPosition=function(w,b){var L=window.innerWidth||document.documentElement.clientWidth,M=window.innerHeight||document.documentElement.clientHeight,k=this.getWidth(),C=this.getHeight();w+=15,b+=15,w+k>L&&(w-=w+k-L),b+C>M&&(b-=20+C),d.prototype.setPosition.call(this,w,b)},Object.defineProperty(p,"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}),p.prototype.showTooltip=function(w){var b,L=this.editor.renderer.$gutterLayer,M=L.$annotations[w],k;M?k={displayText:Array.from(M.displayText),type:Array.from(M.type)}:k={displayText:[],type:[]};var C=L.session.getFoldLine(w);if(C&&L.$showFoldedAnnotations){for(var R={error:[],security:[],warning:[],info:[],hint:[]},O={error:1,security:2,warning:3,info:4,hint:5},E,I=w+1;I<=C.end.row;I++)if(L.$annotations[I])for(var z=0;z<L.$annotations[I].text.length;z++){var P=L.$annotations[I].type[z];R[P].push(L.$annotations[I].text[z]),(!E||O[P]<O[E])&&(E=P)}if(["error","security","warning"].includes(E)){var N="".concat(p.annotationsToSummaryString(R)," in folded code.");k.displayText.push(N),k.type.push(E+"_fold")}}if(k.displayText.length===0)return this.hideTooltip();for(var _={error:[],security:[],warning:[],info:[],hint:[]},S=L.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",I=0;I<k.displayText.length;I++){var D=x.createElement("span"),j=x.createElement("span");(b=j.classList).add.apply(b,["ace_".concat(k.type[I]),S]),j.setAttribute("aria-label","".concat(p.annotationLabels[k.type[I].replace("_fold","")].singular)),j.setAttribute("role","img"),j.appendChild(x.createTextNode(" ")),D.appendChild(j),D.appendChild(x.createTextNode(k.displayText[I])),D.appendChild(x.createElement("br")),_[k.type[I].replace("_fold","")].push(D)}var U=this.getElement();x.removeChildren(U),_.error.forEach(function(Z){return U.appendChild(Z)}),_.security.forEach(function(Z){return U.appendChild(Z)}),_.warning.forEach(function(Z){return U.appendChild(Z)}),_.info.forEach(function(Z){return U.appendChild(Z)}),_.hint.forEach(function(Z){return U.appendChild(Z)}),U.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip"));var q=this.$findLinkedAnnotationNode(w);q&&q.setAttribute("aria-describedby",this.id),this.show(),this.visibleTooltipRow=w,this.editor._signal("showGutterTooltip",this)},p.prototype.$findLinkedAnnotationNode=function(w){var b=this.$findCellByRow(w);if(b){var L=b.element;if(L.childNodes.length>2)return L.childNodes[2]}},p.prototype.$findCellByRow=function(w){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(b){return b.row===w})},p.prototype.hideTooltip=function(){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow!=null){var w=this.$findLinkedAnnotationNode(this.visibleTooltipRow);w&&w.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this)}},p.annotationsToSummaryString=function(w){var b,L,M=[],k=["error","security","warning","info","hint"];try{for(var C=y(k),R=C.next();!R.done;R=C.next()){var O=R.value;if(w[O].length){var E=w[O].length===1?p.annotationLabels[O].singular:p.annotationLabels[O].plural;M.push("".concat(w[O].length," ").concat(E))}}}catch(I){b={error:I}}finally{try{R&&!R.done&&(L=C.return)&&L.call(C)}finally{if(b)throw b.error}}return M.join(", ")},p})(d);o.$uid=0,r.GutterTooltip=o}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,m){var g=e("../lib/event"),y=e("../lib/useragent"),x=(function(){function h(d,s){this.speed,this.wheelX,this.wheelY,this.domEvent=d,this.editor=s,this.x=this.clientX=d.clientX,this.y=this.clientY=d.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return h.prototype.stopPropagation=function(){g.stopPropagation(this.domEvent),this.propagationStopped=!0},h.prototype.preventDefault=function(){g.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 d=this.getDocumentPosition().row,s=this.editor.session.documentToScreenRow(d,0),a=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return s-a},h.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var d=this.editor,s=d.getSelectionRange();if(s.isEmpty())this.$inSelection=!1;else{var a=this.getDocumentPosition();this.$inSelection=s.contains(a.row,a.column)}return this.$inSelection},h.prototype.getButton=function(){return g.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,m){var g=e("../lib/dom"),y=e("../lib/event"),x=e("../lib/useragent"),h=200,d=200,s=5;function a(l){var o=l.editor,c=g.createElement("div");c.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",c.textContent=" ";var p=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];p.forEach(function(ne){l[ne]=this[ne]},this),o.on("mousedown",this.onMouseDown.bind(l));var w=o.container,b,L,M,k,C,R,O=0,E,I,z,P,N;this.onDragStart=function(ne){if(this.cancelDrag||!w.draggable){var le=this;return setTimeout(function(){le.startSelect(),le.captureMouse(ne)},0),ne.preventDefault()}C=o.getSelectionRange();var ue=ne.dataTransfer;ue.effectAllowed=o.getReadOnly()?"copy":"copyMove",o.container.appendChild(c),ue.setDragImage&&ue.setDragImage(c,0,0),setTimeout(function(){o.container.removeChild(c)}),ue.clearData(),ue.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 le=ne.dataTransfer.dropEffect;!E&&le=="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 L=ne.clientX,M=ne.clientY,b||j(),O++,ne.dataTransfer.dropEffect=E=he(ne),y.preventDefault(ne)},this.onDragOver=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return L=ne.clientX,M=ne.clientY,b||(j(),O++),q!==null&&(q=null),ne.dataTransfer.dropEffect=E=he(ne),y.preventDefault(ne)},this.onDragLeave=function(ne){if(O--,O<=0&&b)return U(),E=null,y.preventDefault(ne)},this.onDrop=function(ne){if(R){var le=ne.dataTransfer;if(I)switch(E){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 ue=le.getData("Text");C={start:R,end:o.session.insert(R,ue)},o.focus(),E=null}return U(),y.preventDefault(ne)}},y.addListener(w,"dragstart",this.onDragStart.bind(l),o),y.addListener(w,"dragend",this.onDragEnd.bind(l),o),y.addListener(w,"dragenter",this.onDragEnter.bind(l),o),y.addListener(w,"dragover",this.onDragOver.bind(l),o),y.addListener(w,"dragleave",this.onDragLeave.bind(l),o),y.addListener(w,"drop",this.onDrop.bind(l),o);function _(ne,le){var ue=Date.now(),ce=!le||ne.row!=le.row,fe=!le||ne.column!=le.column;if(!P||ce||fe)o.moveCursorToPosition(ne),P=ue,N={x:L,y:M};else{var _e=u(N.x,N.y,L,M);_e>s?P=null:ue-P>=d&&(o.renderer.scrollCursorIntoView(),P=null)}}function S(ne,le){var ue=Date.now(),ce=o.renderer.layerConfig.lineHeight,fe=o.renderer.layerConfig.characterWidth,_e=o.renderer.scroller.getBoundingClientRect(),$e={x:{left:L-_e.left,right:_e.right-L},y:{top:M-_e.top,bottom:_e.bottom-M}},Te=Math.min($e.x.left,$e.x.right),qe=Math.min($e.y.top,$e.y.bottom),Ve={row:ne.row,column:ne.column};Te/fe<=2&&(Ve.column+=$e.x.left<$e.x.right?-3:2),qe/ce<=1&&(Ve.row+=$e.y.top<$e.y.bottom?-1:1);var lt=ne.row!=Ve.row,tt=ne.column!=Ve.column,ht=!le||ne.row!=le.row;lt||tt&&!ht?z?ue-z>=h&&o.renderer.scrollCursorIntoView(Ve):z=ue:z=null}function D(){var ne=R;R=o.renderer.screenToTextCoordinates(L,M),_(R,ne),S(R,ne)}function j(){C=o.selection.toOrientedRange(),b=o.session.addMarker(C,"ace_selection",o.getSelectionStyle()),o.clearSelection(),o.isFocused()&&o.renderer.$cursorLayer.setBlinking(!1),clearInterval(k),D(),k=setInterval(D,20),O=0,y.addListener(document,"mousemove",Z)}function U(){clearInterval(k),o.session.removeMarker(b),b=null,o.selection.fromOrientedRange(C),o.isFocused()&&!I&&o.$resetCursorStyle(),C=null,R=null,O=0,z=null,P=null,y.removeListener(document,"mousemove",Z)}var q=null;function Z(){q==null&&(q=setTimeout(function(){q!=null&&b&&U()},20))}function te(ne){var le=ne.types;return!le||Array.prototype.some.call(le,function(ue){return ue=="text/plain"||ue=="Text"})}function he(ne){var le=["copy","copymove","all","uninitialized"],ue=["move","copymove","linkmove","all","uninitialized"],ce=x.isMac?ne.altKey:ne.ctrlKey,fe="uninitialized";try{fe=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var _e="none";return ce&&le.indexOf(fe)>=0?_e="copy":ue.indexOf(fe)>=0?_e="move":le.indexOf(fe)>=0&&(_e="copy"),_e}}(function(){this.dragWait=function(){var l=Date.now()-this.mousedownEvent.time;l>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var l=this.editor.container;l.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(l){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var l=this.editor,o=l.container;o.draggable=!0,l.renderer.$cursorLayer.setBlinking(!1),l.setStyle("ace_dragging");var c=x.isWin?"default":"move";l.renderer.setCursorStyle(c),this.setState("dragReady")},this.onMouseDrag=function(l){var o=this.editor.container;if(x.isIE&&this.state=="dragReady"){var c=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>3&&o.dragDrop()}if(this.state==="dragWait"){var c=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>0&&(o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(l){if(this.$dragEnabled){this.mousedownEvent=l;var o=this.editor,c=l.inSelection(),p=l.getButton(),w=l.domEvent.detail||1;if(w===1&&p===0&&c){if(l.editor.inMultiSelectMode&&(l.getAccelKey()||l.getShiftKey()))return;this.mousedownEvent.time=Date.now();var b=l.domEvent.target||l.domEvent.srcElement;if("unselectable"in b&&(b.unselectable="on"),o.getDragDelay()){if(x.isWebKit){this.cancelDrag=!0;var L=o.container;L.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(l,this.onMouseDrag.bind(this)),l.defaultPrevented=!0}}}}).call(a.prototype);function u(l,o,c,p){return Math.sqrt(Math.pow(c-l,2)+Math.pow(p-o,2))}r.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,r,m){var g=e("./mouse_event").MouseEvent,y=e("../lib/event"),x=e("../lib/dom");r.addTouchListeners=function(h,d){var s="scroll",a,u,l,o,c,p,w=0,b,L=0,M=0,k=0,C,R;function O(){var _=window.navigator&&window.navigator.clipboard,S=!1,D=function(){var q=d.getCopyText(),Z=d.session.getUndoManager().hasUndo();R.replaceChild(x.buildDom(S?["span",!q&&j("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],q&&j("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],q&&j("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],_&&j("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Z&&j("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],j("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],j("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),R.firstChild)},j=function(q){return d.commands.canExecute(q,d)},U=function(q){var Z=q.target.getAttribute("action");if(Z=="more"||!S)return S=!S,D();Z=="paste"?_.readText().then(function(te){d.execCommand(Z,te)}):Z&&((Z=="cut"||Z=="copy")&&(_?_.writeText(d.getCopyText()):document.execCommand("copy")),d.execCommand(Z)),R.firstChild.style.display="none",S=!1,Z!="openCommandPalette"&&d.focus()};R=x.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(q){s="menu",q.stopPropagation(),q.preventDefault(),d.textInput.focus()},ontouchend:function(q){q.stopPropagation(),q.preventDefault(),U(q)},onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],d.container)}function E(){if(!d.getOption("enableMobileMenu")){R&&I();return}R||O();var _=d.selection.cursor,S=d.renderer.textToScreenCoordinates(_.row,_.column),D=d.renderer.textToScreenCoordinates(0,0).pageX,j=d.renderer.scrollLeft,U=d.container.getBoundingClientRect();R.style.top=S.pageY-U.top-3+"px",S.pageX-U.left<U.width-70?(R.style.left="",R.style.right="10px"):(R.style.right="",R.style.left=D+j-U.left+"px"),R.style.display="",R.firstChild.style.display="none",d.on("input",I)}function I(_){R&&(R.style.display="none"),d.off("input",I)}function z(){c=null,clearTimeout(c);var _=d.selection.getRange(),S=_.contains(b.row,b.column);(_.isEmpty()||!S)&&(d.selection.moveToPosition(b),d.selection.selectWord()),s="wait",E()}function P(){c=null,clearTimeout(c),d.selection.moveToPosition(b);var _=L>=2?d.selection.getLineRange(b.row):d.session.getBracketRange(b);_&&!_.isEmpty()?d.selection.setRange(_):d.selection.selectWord(),s="wait"}y.addListener(h,"contextmenu",function(_){if(C){var S=d.textInput.getElement();S.focus()}},d),y.addListener(h,"touchstart",function(_){var S=_.touches;if(c||S.length>1){clearTimeout(c),c=null,l=-1,s="zoom";return}C=d.$mouseHandler.isMousePressed=!0;var D=d.renderer.layerConfig.lineHeight,j=d.renderer.layerConfig.lineHeight,U=_.timeStamp;o=U;var q=S[0],Z=q.clientX,te=q.clientY;Math.abs(a-Z)+Math.abs(u-te)>D&&(l=-1),a=_.clientX=Z,u=_.clientY=te,M=k=0;var he=new g(_,d);if(b=he.getDocumentPosition(),U-l<500&&S.length==1&&!w)L++,_.preventDefault(),_.button=0,P();else{L=0;var ne=d.selection.cursor,le=d.selection.isEmpty()?ne:d.selection.anchor,ue=d.renderer.$cursorLayer.getPixelPosition(ne,!0),ce=d.renderer.$cursorLayer.getPixelPosition(le,!0),fe=d.renderer.scroller.getBoundingClientRect(),_e=d.renderer.layerConfig.offset,$e=d.renderer.scrollLeft,Te=function(lt,tt){return lt=lt/j,tt=tt/D-.75,lt*lt+tt*tt};if(_.clientX<fe.left){s="zoom";return}var qe=Te(_.clientX-fe.left-ue.left+$e,_.clientY-fe.top-ue.top+_e),Ve=Te(_.clientX-fe.left-ce.left+$e,_.clientY-fe.top-ce.top+_e);qe<3.5&&Ve<3.5&&(s=qe>Ve?"cursor":"anchor"),Ve<3.5?s="anchor":qe<3.5?s="cursor":s="scroll",c=setTimeout(z,450)}l=U},d),y.addListener(h,"touchend",function(_){C=d.$mouseHandler.isMousePressed=!1,p&&clearInterval(p),s=="zoom"?(s="",w=0):c?(d.selection.moveToPosition(b),w=0,E()):s=="scroll"?(N(),I()):E(),clearTimeout(c),c=null},d),y.addListener(h,"touchmove",function(_){c&&(clearTimeout(c),c=null);var S=_.touches;if(!(S.length>1||s=="zoom")){var D=S[0],j=a-D.clientX,U=u-D.clientY;if(s=="wait")if(j*j+U*U>4)s="cursor";else return _.preventDefault();a=D.clientX,u=D.clientY,_.clientX=D.clientX,_.clientY=D.clientY;var q=_.timeStamp,Z=q-o;if(o=q,s=="scroll"){var te=new g(_,d);te.speed=1,te.wheelX=j,te.wheelY=U,10*Math.abs(j)<Math.abs(U)&&(j=0),10*Math.abs(U)<Math.abs(j)&&(U=0),Z!=0&&(M=j/Z,k=U/Z),d._emit("mousewheel",te),te.propagationStopped||(M=k=0)}else{var he=new g(_,d),ne=he.getDocumentPosition();s=="cursor"?d.selection.moveCursorToPosition(ne):s=="anchor"&&d.selection.setSelectionAnchor(ne.row,ne.column),d.renderer.scrollCursorIntoView(ne),_.preventDefault()}}},d);function N(){w+=60,p=setInterval(function(){w--<=0&&(clearInterval(p),p=null),Math.abs(M)<.01&&(M=0),Math.abs(k)<.01&&(k=0),w<20&&(M=.9*M),w<20&&(k=.9*k);var _=d.session.getScrollTop();d.renderer.scrollBy(10*M,10*k),_==d.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,m){var g=e("../lib/event"),y=e("../lib/useragent"),x=e("./default_handlers").DefaultHandlers,h=e("./default_gutter_handler").GutterHandler,d=e("./mouse_event").MouseEvent,s=e("./dragdrop_handler").DragdropHandler,a=e("./touch_handler").addTouchListeners,u=e("../config"),l=(function(){function o(c){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var p=this;this.editor=c,new x(this),new h(this),new s(this);var w=function(M){var k=!document.hasFocus||!document.hasFocus()||!c.isFocused()&&document.activeElement==(c.textInput&&c.textInput.getElement());k&&window.focus(),c.focus(),setTimeout(function(){c.isFocused()||c.focus()})},b=c.renderer.getMouseEventTarget();g.addListener(b,"click",this.onMouseEvent.bind(this,"click"),c),g.addListener(b,"mousemove",this.onMouseMove.bind(this,"mousemove"),c),g.addMultiMouseDownListener([b,c.renderer.scrollBarV&&c.renderer.scrollBarV.inner,c.renderer.scrollBarH&&c.renderer.scrollBarH.inner,c.textInput&&c.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",c),g.addMouseWheelListener(c.container,this.onMouseWheel.bind(this,"mousewheel"),c),a(c.container,c);var L=c.renderer.$gutter;g.addListener(L,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),c),g.addListener(L,"click",this.onMouseEvent.bind(this,"gutterclick"),c),g.addListener(L,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),c),g.addListener(L,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),c),g.addListener(b,"mousedown",w,c),g.addListener(L,"mousedown",w,c),y.isIE&&c.renderer.scrollBarV&&(g.addListener(c.renderer.scrollBarV.element,"mousedown",w,c),g.addListener(c.renderer.scrollBarH.element,"mousedown",w,c)),c.on("mousemove",function(M){if(!(p.state||p.$dragDelay||!p.$dragEnabled)){var k=c.renderer.screenToTextCoordinates(M.x,M.y),C=c.session.selection.getRange(),R=c.renderer;!C.isEmpty()&&C.insideStart(k.row,k.column)?R.setCursorStyle("default"):R.setCursorStyle("")}},c)}return o.prototype.onMouseEvent=function(c,p){this.editor.session&&this.editor._emit(c,new d(p,this.editor))},o.prototype.onMouseMove=function(c,p){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(c,new d(p,this.editor))},o.prototype.onMouseWheel=function(c,p){var w=new d(p,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=p.wheelX,w.wheelY=p.wheelY,this.editor._emit(c,w)},o.prototype.setState=function(c){this.state=c},o.prototype.captureMouse=function(c,p){this.x=c.x,this.y=c.y,this.isMousePressed=!0;var w=this.editor,b=this.editor.renderer;b.$isMousePressed=!0;var L=this,M=!0,k=function(I){if(I){if(y.isWebKit&&!I.which&&L.releaseMouse)return L.releaseMouse();L.x=I.clientX,L.y=I.clientY,p&&p(I),L.mouseEvent=new d(I,L.editor),L.$mouseMoved=!0}},C=function(I){w.off("beforeEndOperation",E),M=!1,w.session&&R(),L[L.state+"End"]&&L[L.state+"End"](I),L.state="",L.isMousePressed=b.$isMousePressed=!1,b.$keepTextAreaAtCursor&&b.$moveTextAreaToCursor(),L.$onCaptureMouseMove=L.releaseMouse=null,I&&L.onMouseEvent("mouseup",I),w.endOperation()},R=function(){L[L.state]&&L[L.state](),L.$mouseMoved=!1},O=function(){M&&(R(),g.nextFrame(O))};if(y.isOldIE&&c.domEvent.type=="dblclick")return setTimeout(function(){C(c)});var E=function(I){L.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(L[L.state+"End"]&&L[L.state+"End"](),L.state="",L.releaseMouse())};w.on("beforeEndOperation",E),w.startOperation({command:{name:"mouse"}}),L.$onCaptureMouseMove=k,L.releaseMouse=g.capture(this.editor.container,k,C),O()},o.prototype.cancelContextMenu=function(){var c=(function(p){p&&p.domEvent&&p.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",c),p&&p.domEvent&&g.stopEvent(p.domEvent))}).bind(this);setTimeout(c,10),this.editor.on("nativecontextmenu",c)},o.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},o})();l.prototype.releaseMouse=null,u.defineOptions(l.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:y.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),r.MouseHandler=l}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,r,m){var g=e("../lib/dom"),y=(function(){function x(h){h.on("click",function(d){var s=d.getDocumentPosition(),a=h.session,u=a.getFoldAt(s.row,s.column,1);u&&(d.getAccelKey()?a.removeFold(u):a.expandFold(u),d.stop());var l=d.domEvent&&d.domEvent.target;l&&g.hasCssClass(l,"ace_inline_button")&&g.hasCssClass(l,"ace_toggle_wrap")&&(a.setOption("wrap",!a.getUseWrapMode()),h.renderer.scrollCursorIntoView())}),h.on("gutterclick",function(d){var s=h.renderer.$gutterLayer.getRegion(d);if(s=="foldWidgets"){var a=d.getDocumentPosition().row,u=h.session;u.foldWidgets&&u.foldWidgets[a]&&h.session.onFoldWidgetClick(a,d),h.isFocused()||h.focus(),d.stop()}}),h.on("gutterdblclick",function(d){var s=h.renderer.$gutterLayer.getRegion(d);if(s=="foldWidgets"){var a=d.getDocumentPosition().row,u=h.session,l=u.getParentFoldRangeData(a,!0),o=l.range||l.firstRange;if(o){a=o.start.row;var c=u.getFoldAt(a,u.getLine(a).length,1);c?u.removeFold(c):(u.addFold("...",o),h.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}d.stop()}})}return x})();r.FoldHandler=y}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,r,m){var g=e("../lib/keys"),y=e("../lib/event"),x=(function(){function h(d){this.$editor=d,this.$data={editor:d},this.$handlers=[],this.setDefaultHandler(d.commands)}return h.prototype.setDefaultHandler=function(d){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=d,this.addKeyboardHandler(d,0)},h.prototype.setKeyboardHandler=function(d){var s=this.$handlers;if(s[s.length-1]!=d){for(;s[s.length-1]&&s[s.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(s[s.length-1]);this.addKeyboardHandler(d,1)}},h.prototype.addKeyboardHandler=function(d,s){if(d){typeof d=="function"&&!d.handleKeyboard&&(d.handleKeyboard=d);var a=this.$handlers.indexOf(d);a!=-1&&this.$handlers.splice(a,1),s==null?this.$handlers.push(d):this.$handlers.splice(s,0,d),a==-1&&d.attach&&d.attach(this.$editor)}},h.prototype.removeKeyboardHandler=function(d){var s=this.$handlers.indexOf(d);return s==-1?!1:(this.$handlers.splice(s,1),d.detach&&d.detach(this.$editor),!0)},h.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},h.prototype.getStatusText=function(){var d=this.$data,s=d.editor;return this.$handlers.map(function(a){return a.getStatusText&&a.getStatusText(s,d)||""}).filter(Boolean).join(" ")},h.prototype.$callKeyboardHandlers=function(d,s,a,u){for(var l,o=!1,c=this.$editor.commands,p=this.$handlers.length;p--&&(l=this.$handlers[p].handleKeyboard(this.$data,d,s,a,u),!(!(!l||!l.command)&&(l.command=="null"?o=!0:o=c.exec(l.command,this.$editor,l.args,u),o&&u&&d!=-1&&l.passEvent!=!0&&l.command.passEvent!=!0&&y.stopEvent(u),o))););return!o&&d==-1&&(l={command:"insertstring"},o=c.exec("insertstring",this.$editor,s)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",l),o},h.prototype.onCommandKey=function(d,s,a){var u=g.keyCodeToString(a);return this.$callKeyboardHandlers(s,u,a,d)},h.prototype.onTextInput=function(d){return this.$callKeyboardHandlers(-1,d)},h})();r.KeyBinding=x}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,r,m){var g=0,y=0,x=!1,h=!1,d=!1,s=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],a=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=0,l=1,o=0,c=1,p=2,w=3,b=4,L=5,M=6,k=7,C=8,R=9,O=10,E=11,I=12,z=13,P=14,N=15,_=16,S=17,D=18,j=[D,D,D,D,D,D,D,D,D,M,L,M,C,L,D,D,D,D,D,D,D,D,D,D,D,D,D,D,L,L,L,M,C,b,b,E,E,E,b,b,b,b,b,O,R,O,R,R,p,p,p,p,p,p,p,p,p,p,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,D,D,D,D,D,D,L,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,R,b,E,E,E,E,b,b,b,b,o,b,b,D,b,b,E,E,p,p,b,o,b,b,b,p,o,b,b,b,b,b],U=[C,C,C,C,C,C,C,C,C,C,C,D,D,D,o,c,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,L,z,P,N,_,S,R,E,E,E,E,E,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 q(ne,le,ue,ce){var fe=g?a:s,_e=null,$e=null,Te=null,qe=0,Ve=null,lt=null,tt=-1,ht=null,Xt=null,Rn=[];if(!ce)for(ht=0,ce=[];ht<ue;ht++)ce[ht]=he(ne[ht]);for(y=g,x=!1,h=!1,d=!1,Xt=0;Xt<ue;Xt++){if(_e=qe,Rn[Xt]=$e=te(ne,ce,Rn,Xt),qe=fe[_e][$e],Ve=qe&240,qe&=15,le[Xt]=Te=fe[qe][5],Ve>0)if(Ve==16){for(ht=tt;ht<Xt;ht++)le[ht]=1;tt=-1}else tt=-1;if(lt=fe[qe][6],lt)tt==-1&&(tt=Xt);else if(tt>-1){for(ht=tt;ht<Xt;ht++)le[ht]=Te;tt=-1}ce[Xt]==L&&(le[Xt]=0),y|=Te}if(d){for(ht=0;ht<ue;ht++)if(ce[ht]==M){le[ht]=g;for(var Kt=ht-1;Kt>=0&&ce[Kt]==C;Kt--)le[Kt]=g}}}function Z(ne,le,ue){if(!(y<ne)){if(ne==1&&g==l&&!h){ue.reverse();return}for(var ce=ue.length,fe=0,_e,$e,Te,qe;fe<ce;){if(le[fe]>=ne){for(_e=fe+1;_e<ce&&le[_e]>=ne;)_e++;for($e=fe,Te=_e-1;$e<Te;$e++,Te--)qe=ue[$e],ue[$e]=ue[Te],ue[Te]=qe;fe=_e}fe++}}}function te(ne,le,ue,ce){var fe=le[ce],_e,$e,Te,qe;switch(fe){case o:case c:x=!1;case b:case w:return fe;case p:return x?w:p;case k:return x=!0,c;case C:return b;case R:return ce<1||ce+1>=le.length||(_e=ue[ce-1])!=p&&_e!=w||($e=le[ce+1])!=p&&$e!=w?b:(x&&($e=w),$e==_e?$e:b);case O:return _e=ce>0?ue[ce-1]:L,_e==p&&ce+1<le.length&&le[ce+1]==p?p:b;case E:if(ce>0&&ue[ce-1]==p)return p;if(x)return b;for(qe=ce+1,Te=le.length;qe<Te&&le[qe]==E;)qe++;return qe<Te&&le[qe]==p?p:b;case I:for(Te=le.length,qe=ce+1;qe<Te&&le[qe]==I;)qe++;if(qe<Te){var Ve=ne[ce],lt=Ve>=1425&&Ve<=2303||Ve==64286;if(_e=le[qe],lt&&(_e==c||_e==k))return c}return ce<1||(_e=le[ce-1])==L?b:ue[ce-1];case L:return x=!1,h=!0,g;case M:return d=!0,b;case z:case P:case _:case S:case N:x=!1;case D:return b}}function he(ne){var le=ne.charCodeAt(0),ue=le>>8;return ue==0?le>191?o:j[le]:ue==5?/[\u0591-\u05f4]/.test(ne)?c:o:ue==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?I:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?w:le==1642?E:/[\u06f0-\u06f9]/.test(ne)?p:k:ue==32&&le<=8287?U[le&255]:ue==254&&le>=65136?k:b}r.L=o,r.R=c,r.EN=p,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(ne,le,ue){if(ne.length<2)return{};var ce=ne.split(""),fe=new Array(ce.length),_e=new Array(ce.length),$e=[];g=ue?l:u,q(ce,$e,ce.length,le);for(var Te=0;Te<fe.length;fe[Te]=Te,Te++);Z(2,$e,fe),Z(1,$e,fe);for(var Te=0;Te<fe.length-1;Te++)le[Te]===w?$e[Te]=r.AN:$e[Te]===c&&(le[Te]>k&&le[Te]<z||le[Te]===b||le[Te]===D)?$e[Te]=r.ON_R:Te>0&&ce[Te-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ce[Te])&&($e[Te-1]=$e[Te]=r.R_H,Te++);ce[ce.length-1]===r.DOT&&($e[ce.length-1]=r.B),ce[0]===""&&($e[0]=r.RLE);for(var Te=0;Te<fe.length;Te++)_e[Te]=$e[fe[Te]];return{logicalFromVisual:fe,bidiLevels:_e}},r.hasBidiCharacters=function(ne,le){for(var ue=!1,ce=0;ce<ne.length;ce++)le[ce]=he(ne.charAt(ce)),!ue&&(le[ce]==c||le[ce]==k||le[ce]==w)&&(ue=!0);return ue},r.getVisualFromLogicalIdx=function(ne,le){for(var ue=0;ue<le.logicalFromVisual.length;ue++)if(le.logicalFromVisual[ue]==ne)return ue;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,r,m){var g=e("./lib/bidiutil"),y=e("./lib/lang"),x=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,h=(function(){function d(s){this.session=s,this.bidiMap={},this.currentRow=null,this.bidiUtil=g,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 d.prototype.isBidiRow=function(s,a,u){return this.seenBidi?(s!==this.currentRow&&(this.currentRow=s,this.updateRowLine(a,u),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},d.prototype.onChange=function(s){this.seenBidi?this.currentRow=null:s.action=="insert"&&x.test(s.lines.join(`
|
179
|
+
`))&&(this.seenBidi=!0,this.currentRow=null)},d.prototype.getDocumentRow=function(){var s=0,a=this.session.$screenRowCache;if(a.length){var u=this.session.$getRowCacheIndex(a,this.currentRow);u>=0&&(s=this.session.$docRowCache[u])}return s},d.prototype.getSplitIndex=function(){var s=0,a=this.session.$screenRowCache;if(a.length)for(var u,l=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-s>0&&(u=this.session.$getRowCacheIndex(a,this.currentRow-s-1),u===l);)l=u,s++;else s=this.currentRow;return s},d.prototype.updateRowLine=function(s,a){s===void 0&&(s=this.getDocumentRow());var u=s===this.session.getLength()-1,l=u?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(s),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[s];o&&(a===void 0&&(a=this.getSplitIndex()),a>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[g.L],this.line=a<o.length?this.line.substring(o[a-1],o[a]):this.line.substring(o[o.length-1])):this.line=this.line.substring(0,o[a]),a==o.length&&(this.line+=this.showInvisibles?l:g.DOT))}else this.line+=this.showInvisibles?l:g.DOT;var c=this.session,p=0,w;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(b,L){return b===" "||c.isFullWidth(b.charCodeAt(0))?(w=b===" "?c.getScreenTabSize(L+p):2,p+=w-1,y.stringRepeat(g.DOT,w)):b}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==g.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},d.prototype.updateBidiMap=function(){var s=[];g.hasBidiCharacters(this.line,s)||this.isRtlDir?this.bidiMap=g.doBidiReorder(this.line,s,this.isRtlDir):this.bidiMap={}},d.prototype.markAsDirty=function(){this.currentRow=null},d.prototype.updateCharacterWidths=function(s){if(this.characterWidth!==s.$characterSize.width){this.fontMetrics=s;var a=this.characterWidth=s.$characterSize.width,u=s.$measureCharWidth("ה");this.charWidths[g.L]=this.charWidths[g.EN]=this.charWidths[g.ON_R]=a,this.charWidths[g.R]=this.charWidths[g.AN]=u,this.charWidths[g.R_H]=u*.45,this.charWidths[g.B]=this.charWidths[g.RLE]=0,this.currentRow=null}},d.prototype.setShowInvisibles=function(s){this.showInvisibles=s,this.currentRow=null},d.prototype.setEolChar=function(s){this.EOL=s},d.prototype.setContentWidth=function(s){this.contentWidth=s},d.prototype.isRtlLine=function(s){return this.$isRtl?!0:s!=null?this.session.getLine(s).charAt(0)==this.RLE:this.isRtlDir},d.prototype.setRtlDirection=function(s,a){for(var u=s.getCursorPosition(),l=s.selection.getSelectionAnchor().row;l<=u.row;l++)!a&&s.session.getLine(l).charAt(0)===s.session.$bidiHandler.RLE?s.session.doc.removeInLine(l,0,1):a&&s.session.getLine(l).charAt(0)!==s.session.$bidiHandler.RLE&&s.session.doc.insert({column:0,row:l},s.session.$bidiHandler.RLE)},d.prototype.getPosLeft=function(s){s-=this.wrapIndent;var a=this.line.charAt(0)===this.RLE?1:0,u=s>a?this.session.getOverwrite()?s:s-1:a,l=g.getVisualFromLogicalIdx(u,this.bidiMap),o=this.bidiMap.bidiLevels,c=0;!this.session.getOverwrite()&&s<=a&&o[l]%2!==0&&l++;for(var p=0;p<l;p++)c+=this.charWidths[o[p]];return!this.session.getOverwrite()&&s>a&&o[l]%2===0&&(c+=this.charWidths[o[l]]),this.wrapIndent&&(c+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(c+=this.rtlLineOffset),c},d.prototype.getSelections=function(s,a){var u=this.bidiMap,l=u.bidiLevels,o,c=[],p=0,w=Math.min(s,a)-this.wrapIndent,b=Math.max(s,a)-this.wrapIndent,L=!1,M=!1,k=0;this.wrapIndent&&(p+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,R=0;R<l.length;R++)C=u.logicalFromVisual[R],o=l[R],L=C>=w&&C<b,L&&!M?k=p:!L&&M&&c.push({left:k,width:p-k}),p+=this.charWidths[o],M=L;if(L&&R===l.length&&c.push({left:k,width:p-k}),this.isRtlDir)for(var O=0;O<c.length;O++)c[O].left+=this.rtlLineOffset;return c},d.prototype.offsetToCol=function(u){this.isRtlDir&&(u-=this.rtlLineOffset);var a=0,u=Math.max(u,0),l=0,o=0,c=this.bidiMap.bidiLevels,p=this.charWidths[c[o]];for(this.wrapIndent&&(u-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);u>l+p/2;){if(l+=p,o===c.length-1){p=0;break}p=this.charWidths[c[++o]]}return o>0&&c[o-1]%2!==0&&c[o]%2===0?(u<l&&o--,a=this.bidiMap.logicalFromVisual[o]):o>0&&c[o-1]%2===0&&c[o]%2!==0?a=1+(u>l?this.bidiMap.logicalFromVisual[o]:this.bidiMap.logicalFromVisual[o-1]):this.isRtlDir&&o===c.length-1&&p===0&&c[o-1]%2===0||!this.isRtlDir&&o===0&&c[o]%2!==0?a=1+this.bidiMap.logicalFromVisual[o]:(o>0&&c[o-1]%2!==0&&p!==0&&o--,a=this.bidiMap.logicalFromVisual[o]),a===0&&this.isRtlDir&&a++,a+this.wrapIndent},d})();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,m){var g=e("./lib/oop"),y=e("./lib/lang"),x=e("./lib/event_emitter").EventEmitter,h=e("./range").Range,d=(function(){function s(a){this.session=a,this.doc=a.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var u=this;this.cursor.on("change",function(l){u.$cursorChanged=!0,u.$silent||u._emit("changeCursor"),!u.$isEmpty&&!u.$silent&&u._emit("changeSelection"),!u.$keepDesiredColumnOnChange&&l.old.column!=l.value.column&&(u.$desiredColumn=null)}),this.anchor.on("change",function(){u.$anchorChanged=!0,!u.$isEmpty&&!u.$silent&&u._emit("changeSelection")})}return s.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},s.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},s.prototype.getCursor=function(){return this.lead.getPosition()},s.prototype.setAnchor=function(a,u){this.$isEmpty=!1,this.anchor.setPosition(a,u)},s.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},s.prototype.getSelectionLead=function(){return this.lead.getPosition()},s.prototype.isBackwards=function(){var a=this.anchor,u=this.lead;return a.row>u.row||a.row==u.row&&a.column>u.column},s.prototype.getRange=function(){var a=this.anchor,u=this.lead;return this.$isEmpty?h.fromPoints(u,u):this.isBackwards()?h.fromPoints(u,a):h.fromPoints(a,u)},s.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},s.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},s.prototype.setRange=function(a,u){var l=u?a.end:a.start,o=u?a.start:a.end;this.$setSelection(l.row,l.column,o.row,o.column)},s.prototype.$setSelection=function(a,u,l,o){if(!this.$silent){var c=this.$isEmpty,p=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,u),this.cursor.setPosition(l,o),this.$isEmpty=!h.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||c!=this.$isEmpty||p)&&this._emit("changeSelection")}},s.prototype.$moveSelection=function(a){var u=this.lead;this.$isEmpty&&this.setSelectionAnchor(u.row,u.column),a.call(this)},s.prototype.selectTo=function(a,u){this.$moveSelection(function(){this.moveCursorTo(a,u)})},s.prototype.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},s.prototype.moveTo=function(a,u){this.clearSelection(),this.moveCursorTo(a,u)},s.prototype.moveToPosition=function(a){this.clearSelection(),this.moveCursorToPosition(a)},s.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},s.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},s.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},s.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},s.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},s.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},s.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},s.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},s.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},s.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},s.prototype.getWordRange=function(a,u){if(typeof u>"u"){var l=a||this.lead;a=l.row,u=l.column}return this.session.getWordRange(a,u)},s.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},s.prototype.selectAWord=function(){var a=this.getCursor(),u=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(u)},s.prototype.getLineRange=function(a,u){var l=typeof a=="number"?a:this.lead.row,o,c=this.session.getFoldLine(l);return c?(l=c.start.row,o=c.end.row):o=l,u===!0?new h(l,0,o,this.session.getLine(o).length):new h(l,0,o+1,0)},s.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},s.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},s.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},s.prototype.wouldMoveIntoSoftTab=function(a,u,l){var o=a.column,c=a.column+u;return l<0&&(o=a.column-u,c=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(o,c).split(" ").length-1==u},s.prototype.moveCursorLeft=function(){var a=this.lead.getPosition(),u;if(u=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(u.start.row,u.start.column);else if(a.column===0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var l=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,l,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-l):this.moveCursorBy(0,-1)}},s.prototype.moveCursorRight=function(){var a=this.lead.getPosition(),u;if(u=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(u.end.row,u.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var l=this.session.getTabSize(),a=this.lead;this.wouldMoveIntoSoftTab(a,l,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,l):this.moveCursorBy(0,1)}},s.prototype.moveCursorLineStart=function(){var a=this.lead.row,u=this.lead.column,l=this.session.documentToScreenRow(a,u),o=this.session.screenToDocumentPosition(l,0),c=this.session.getDisplayLine(a,null,o.row,o.column),p=c.match(/^\s*/);p[0].length!=u&&!this.session.$useEmacsStyleLineStart&&(o.column+=p[0].length),this.moveCursorToPosition(o)},s.prototype.moveCursorLineEnd=function(){var a=this.lead,u=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==u.column){var l=this.session.getLine(u.row);if(u.column==l.length){var o=l.search(/\s+$/);o>0&&(u.column=o)}}this.moveCursorTo(u.row,u.column)},s.prototype.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,u=this.doc.getLine(a).length;this.moveCursorTo(a,u)},s.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},s.prototype.moveCursorLongWordRight=function(){var a=this.lead.row,u=this.lead.column,l=this.doc.getLine(a),o=l.substring(u);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var c=this.session.getFoldAt(a,u,1);if(c){this.moveCursorTo(c.end.row,c.end.column);return}if(this.session.nonTokenRe.exec(o)&&(u+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=l.substring(u)),u>=l.length){this.moveCursorTo(a,l.length),this.moveCursorRight(),a<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(o)&&(u+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,u)},s.prototype.moveCursorLongWordLeft=function(){var a=this.lead.row,u=this.lead.column,l;if(l=this.session.getFoldAt(a,u,-1)){this.moveCursorTo(l.start.row,l.start.column);return}var o=this.session.getFoldStringAt(a,u,-1);o==null&&(o=this.doc.getLine(a).substring(0,u));var c=y.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(c)&&(u-=this.session.nonTokenRe.lastIndex,c=c.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),u<=0){this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(c)&&(u-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,u)},s.prototype.$shortWordEndIndex=function(a){var u=0,l,o=/\s/,c=this.session.tokenRe;if(c.lastIndex=0,this.session.tokenRe.exec(a))u=this.session.tokenRe.lastIndex;else{for(;(l=a[u])&&o.test(l);)u++;if(u<1){for(c.lastIndex=0;(l=a[u])&&!c.test(l);)if(c.lastIndex=0,u++,o.test(l))if(u>2){u--;break}else{for(;(l=a[u])&&o.test(l);)u++;if(u>2)break}}}return c.lastIndex=0,u},s.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,u=this.lead.column,l=this.doc.getLine(a),o=l.substring(u),c=this.session.getFoldAt(a,u,1);if(c)return this.moveCursorTo(c.end.row,c.end.column);if(u==l.length){var p=this.doc.getLength();do a++,o=this.doc.getLine(a);while(a<p&&/^\s*$/.test(o));/^\s+/.test(o)||(o=""),u=0}var w=this.$shortWordEndIndex(o);this.moveCursorTo(a,u+w)},s.prototype.moveCursorShortWordLeft=function(){var a=this.lead.row,u=this.lead.column,l;if(l=this.session.getFoldAt(a,u,-1))return this.moveCursorTo(l.start.row,l.start.column);var o=this.session.getLine(a).substring(0,u);if(u===0){do a--,o=this.doc.getLine(a);while(a>0&&/^\s*$/.test(o));u=o.length,/\s+$/.test(o)||(o="")}var c=y.stringReverse(o),p=this.$shortWordEndIndex(c);return this.moveCursorTo(a,u-p)},s.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},s.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},s.prototype.moveCursorBy=function(a,u){var l=this.session.documentToScreenPosition(this.lead.row,this.lead.column),o;if(u===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(l.row,this.lead.row)?(o=this.session.$bidiHandler.getPosLeft(l.column),l.column=Math.round(o/this.session.$bidiHandler.charWidths[0])):o=l.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?l.column=this.$desiredColumn:this.$desiredColumn=l.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var c=this.session.lineWidgets[this.lead.row];a<0?a-=c.rowsAbove||0:a>0&&(a+=c.rowCount-(c.rowsAbove||0))}var p=this.session.screenToDocumentPosition(l.row+a,l.column,o);a!==0&&u===0&&p.row===this.lead.row&&(p.column,this.lead.column),this.moveCursorTo(p.row,p.column+u,u===0)},s.prototype.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},s.prototype.moveCursorTo=function(a,u,l){var o=this.session.getFoldAt(a,u,1);o&&(a=o.start.row,u=o.start.column),this.$keepDesiredColumnOnChange=!0;var c=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(c.charAt(u))&&c.charAt(u-1)&&(this.lead.row==a&&this.lead.column==u+1?u=u-1:u=u+1),this.lead.setPosition(a,u),this.$keepDesiredColumnOnChange=!1,l||(this.$desiredColumn=null)},s.prototype.moveCursorToScreen=function(a,u,l){var o=this.session.screenToDocumentPosition(a,u);this.moveCursorTo(o.row,o.column,l)},s.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},s.prototype.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},s.prototype.toOrientedRange=function(a){var u=this.getRange();return a?(a.start.column=u.start.column,a.start.row=u.start.row,a.end.column=u.end.column,a.end.row=u.end.row):a=u,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},s.prototype.getRangeOfMovements=function(a){var u=this.getCursor();try{a(this);var l=this.getCursor();return h.fromPoints(u,l)}catch{return h.fromPoints(u,u)}finally{this.moveCursorToPosition(u)}},s.prototype.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(u){var l=u.clone();return l.isBackwards=u.cursor==u.start,l});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},s.prototype.fromJSON=function(a){if(a.start==null)if(this.rangeList&&a.length>1){this.toSingleRange(a[0]);for(var u=a.length;u--;){var l=h.fromPoints(a[u].start,a[u].end);a[u].isBackwards&&(l.cursor=l.start),this.addRange(l,!0)}return}else a=a[0];this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},s.prototype.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var u=this.ranges.length;u--;)if(!this.ranges[u].isEqual(a[u]))return!1;return!0},s})();d.prototype.setSelectionAnchor=d.prototype.setAnchor,d.prototype.getSelectionAnchor=d.prototype.getAnchor,d.prototype.setSelectionRange=d.prototype.setRange,g.implement(d.prototype,x),r.Selection=d}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,r,m){var g=e("./lib/report_error").reportError,y=2e3,x=(function(){function h(d){this.splitRegex,this.states=d,this.regExps={},this.matchMappings={};for(var s in this.states){for(var a=this.states[s],u=[],l=0,o=this.matchMappings[s]={defaultToken:"text"},c="g",p=[],w=0;w<a.length;w++){var b=a[w];if(b.defaultToken&&(o.defaultToken=b.defaultToken),b.caseInsensitive&&c.indexOf("i")===-1&&(c+="i"),b.unicode&&c.indexOf("u")===-1&&(c+="u"),b.regex!=null){b.regex instanceof RegExp&&(b.regex=b.regex.toString().slice(1,-1));var L=b.regex,M=new RegExp("(?:("+L+")|(.))").exec("a").length-2;Array.isArray(b.token)?b.token.length==1||M==1?b.token=b.token[0]:M-1!=b.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:b,groupCount:M-1}),b.token=b.token[0]):(b.tokenArray=b.token,b.token=null,b.onMatch=this.$arrayTokens):typeof b.token=="function"&&!b.onMatch&&(M>1?b.onMatch=this.$applyToken:b.onMatch=b.token),M>1&&(/\\\d/.test(b.regex)?L=b.regex.replace(/\\([0-9]+)/g,function(k,C){return"\\"+(parseInt(C,10)+l+1)}):(M=1,L=this.removeCapturingGroups(b.regex)),!b.splitRegex&&typeof b.token!="string"&&p.push(b)),o[l]=w,l+=M,u.push(L),b.onMatch||(b.onMatch=null)}}u.length||(o[0]=0,u.push("$")),p.forEach(function(k){k.splitRegex=this.createSplitterRegexp(k.regex,c)},this),this.regExps[s]=new RegExp("("+u.join(")|(")+")|($)",c)}}return h.prototype.$setMaxTokenCount=function(d){y=d|0},h.prototype.$applyToken=function(d){var s=this.splitRegex.exec(d).slice(1),a=this.token.apply(this,s);if(typeof a=="string")return[{type:a,value:d}];for(var u=[],l=0,o=a.length;l<o;l++)s[l]&&(u[u.length]={type:a[l],value:s[l]});return u},h.prototype.$arrayTokens=function(d){if(!d)return[];var s=this.splitRegex.exec(d);if(!s)return"text";for(var a=[],u=this.tokenArray,l=0,o=u.length;l<o;l++)s[l+1]&&(a[a.length]={type:u[l],value:s[l+1]});return a},h.prototype.removeCapturingGroups=function(d){var s=d.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(a,u){return u?"(?:":a});return s},h.prototype.createSplitterRegexp=function(d,s){if(d.indexOf("(?=")!=-1){var a=0,u=!1,l={};d.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(o,c,p,w,b,L){return u?u=b!="]":b?u=!0:w?(a==l.stack&&(l.end=L+1,l.stack=-1),a--):p&&(a++,p.length!=1&&(l.stack=a,l.start=L)),o}),l.end!=null&&/^\)*$/.test(d.substr(l.end))&&(d=d.substring(0,l.start)+d.substr(l.end))}return d.charAt(0)!="^"&&(d="^"+d),d.charAt(d.length-1)!="$"&&(d+="$"),new RegExp(d,(s||"").replace("g",""))},h.prototype.getLineTokens=function(d,s){if(s&&typeof s!="string"){var a=s.slice(0);s=a[0],s==="#tmp"&&(a.shift(),s=a.shift())}else var a=[];var u=s||"start",l=this.states[u];l||(u="start",l=this.states[u]);var o=this.matchMappings[u],c=this.regExps[u];c.lastIndex=0;for(var p,w=[],b=0,L=0,M={type:null,value:""};p=c.exec(d);){var k=o.defaultToken,C=null,R=p[0],O=c.lastIndex;if(O-R.length>b){var E=d.substring(b,O-R.length);M.type==k?M.value+=E:(M.type&&w.push(M),M={type:k,value:E})}for(var I=0;I<p.length-2;I++)if(p[I+1]!==void 0){C=l[o[I]],C.onMatch?k=C.onMatch(R,u,a,d):k=C.token,C.next&&(typeof C.next=="string"?u=C.next:u=C.next(u,a),l=this.states[u],l||(this.reportError("state doesn't exist",u),u="start",l=this.states[u]),o=this.matchMappings[u],b=O,c=this.regExps[u],c.lastIndex=O),C.consumeLineEnd&&(b=O);break}if(R){if(typeof k=="string")(!C||C.merge!==!1)&&M.type===k?M.value+=R:(M.type&&w.push(M),M={type:k,value:R});else if(k){M.type&&w.push(M),M={type:null,value:""};for(var I=0;I<k.length;I++)w.push(k[I])}}if(b==d.length)break;if(b=O,L++>y){for(L>2*d.length&&this.reportError("infinite loop with in ace tokenizer",{startState:s,line:d});b<d.length;)M.type&&w.push(M),M={value:d.substring(b,b+=500),type:"overflow"};u="start",a=[];break}}return M.type&&w.push(M),a.length>1&&a[0]!==u&&a.unshift("#tmp",u),{tokens:w,state:a.length?a:u}},h})();x.prototype.reportError=g,r.Tokenizer=x}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,r,m){var g=e("../lib/deep_copy").deepCopy,y;y=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(d,s){if(!s){for(var a in d)this.$rules[a]=d[a];return}for(var a in d){for(var u=d[a],l=0;l<u.length;l++){var o=u[l];(o.next||o.onMatch)&&(typeof o.next=="string"&&o.next.indexOf(s)!==0&&(o.next=s+o.next),o.nextState&&o.nextState.indexOf(s)!==0&&(o.nextState=s+o.nextState))}this.$rules[s+a]=u}},this.getRules=function(){return this.$rules},this.embedRules=function(d,s,a,u,l){var o=typeof d=="function"?new d().getRules():d;if(u)for(var c=0;c<u.length;c++)u[c]=s+u[c];else{u=[];for(var p in o)u.push(s+p)}if(this.addRules(o,s),a)for(var w=Array.prototype[l?"push":"unshift"],c=0;c<u.length;c++)w.apply(this.$rules[u[c]],g(a));this.$embeds||(this.$embeds=[]),this.$embeds.push(s)},this.getEmbeds=function(){return this.$embeds};var x=function(d,s){return(d!="start"||s.length)&&s.unshift(this.nextState,d),this.nextState},h=function(d,s){return s.shift(),s.shift()||"start"};this.normalizeRules=function(){var d=0,s=this.$rules;function a(u){var l=s[u];l.processed=!0;for(var o=0;o<l.length;o++){var c=l[o],p=null;Array.isArray(c)&&(p=c,c={}),!c.regex&&c.start&&(c.regex=c.start,c.next||(c.next=[]),c.next.push({defaultToken:c.token},{token:c.token+".end",regex:c.end||c.start,next:"pop"}),c.token=c.token+".start",c.push=!0);var w=c.next||c.push;if(w&&Array.isArray(w)){var b=c.stateName;b||(b=c.token,typeof b!="string"&&(b=b[0]||""),s[b]&&(b+=d++)),s[b]=w,c.next=b,a(b)}else w=="pop"&&(c.next=h);if(c.push&&(c.nextState=c.next||c.push,c.next=x,delete c.push),c.rules)for(var L in c.rules)s[L]?s[L].push&&s[L].push.apply(s[L],c.rules[L]):s[L]=c.rules[L];var M=typeof c=="string"?c:c.include;if(M&&(M==="$self"&&(M="start"),Array.isArray(M)?p=M.map(function(C){return s[C]}):p=s[M]),p){var k=[o,1].concat(p);c.noEscape&&(k=k.filter(function(C){return!C.next})),l.splice.apply(l,k),o--}c.keywordMap&&(c.token=this.createKeywordMapper(c.keywordMap,c.defaultToken||"text",c.caseInsensitive),delete c.defaultToken)}}Object.keys(s).forEach(a,this)},this.createKeywordMapper=function(d,s,a,u){var l=Object.create(null);return this.$keywordList=[],Object.keys(d).forEach(function(o){for(var c=d[o],p=c.split(u||"|"),w=p.length;w--;){var b=p[w];this.$keywordList.push(b),a&&(b=b.toLowerCase()),l[b]=o}},this),d=null,a?function(o){return l[o.toLowerCase()]||s}:function(o){return l[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,m){var g;g=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(g.prototype),r.Behaviour=g}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,r,m){var g=e("./range").Range,y=(function(){function x(h,d,s){this.$session=h,this.$row=d,this.$rowTokens=h.getTokens(d);var a=h.getTokenAt(d,s);this.$tokenIndex=a?a.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,d=this.$tokenIndex,s=h[d].start;if(s!==void 0)return s;for(s=0;d>0;)d-=1,s+=h[d].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],d=this.getCurrentTokenColumn();return new g(this.$row,d,this.$row,d+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,m){var g=e("../../lib/oop"),y=e("../behaviour").Behaviour,x=e("../../token_iterator").TokenIterator,h=e("../../lib/lang"),d=["text","paren.rparen","rparen","paren","punctuation.operator"],s=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,u={},l={'"':'"',"'":"'"},o=function(w){var b=-1;if(w.multiSelect&&(b=w.selection.index,u.rangeCount!=w.multiSelect.rangeCount&&(u={rangeCount:w.multiSelect.rangeCount})),u[b])return a=u[b];a=u[b]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},c=function(w,b,L,M){var k=w.end.row-w.start.row;return{text:L+b+M,selection:[0,w.start.column+1,k,w.end.column+(k?0:1)]}},p;p=function(w){w=w||{},this.add("braces","insertion",function(b,L,M,k,C){var R=M.getCursorPosition(),O=k.doc.getLine(R.row);if(C=="{"){o(M);var E=M.getSelectionRange(),I=k.doc.getTextRange(E),z=k.getTokenAt(R.row,R.column);if(I!==""&&I!=="{"&&M.getWrapBehavioursEnabled())return c(E,I,"{","}");if(z&&/(?:string)\.quasi|\.xml/.test(z.type)){var P=[/tag\-(?:open|name)/,/attribute\-name/];return P.some(function(q){return q.test(z.type)})||/(string)\.quasi/.test(z.type)&&z.value[R.column-z.start-1]!=="$"?void 0:(p.recordAutoInsert(M,k,"}"),{text:"{}",selection:[1,1]})}else if(p.isSaneInsertion(M,k))return/[\]\}\)]/.test(O[R.column])||M.inMultiSelectMode||w.braces?(p.recordAutoInsert(M,k,"}"),{text:"{}",selection:[1,1]}):(p.recordMaybeInsert(M,k,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){o(M);var N=O.substring(R.column,R.column+1);if(N=="}"){var _=k.$findOpeningBracket("}",{column:R.column+1,row:R.row});if(_!==null&&p.isAutoInsertedClosing(R,O,C))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
|
180
|
+
`||C==`\r
|
181
|
+
`){o(M);var S="";p.isMaybeInsertedClosing(R,O)&&(S=h.stringRepeat("}",a.maybeInsertedBrackets),p.clearMaybeInsertedClosing());var N=O.substring(R.column,R.column+1);if(N==="}"){var D=k.findMatchingBracket({row:R.row,column:R.column+1},"}");if(!D)return null;var j=this.$getIndent(k.getLine(D.row))}else if(S)var j=this.$getIndent(O);else{p.clearMaybeInsertedClosing();return}var U=j+k.getTabString();return{text:`
|
182
|
+
`+U+`
|
183
|
+
`+j+S,selection:[1,U.length,1,U.length]}}else p.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(b,L,M,k,C){var R=k.doc.getTextRange(C);if(!C.isMultiLine()&&R=="{"){o(M);var O=k.doc.getLine(C.start.row),E=O.substring(C.end.column,C.end.column+1);if(E=="}")return C.end.column++,C;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(b,L,M,k,C){if(C=="("){o(M);var R=M.getSelectionRange(),O=k.doc.getTextRange(R);if(O!==""&&M.getWrapBehavioursEnabled())return c(R,O,"(",")");if(p.isSaneInsertion(M,k))return p.recordAutoInsert(M,k,")"),{text:"()",selection:[1,1]}}else if(C==")"){o(M);var E=M.getCursorPosition(),I=k.doc.getLine(E.row),z=I.substring(E.column,E.column+1);if(z==")"){var P=k.$findOpeningBracket(")",{column:E.column+1,row:E.row});if(P!==null&&p.isAutoInsertedClosing(E,I,C))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(b,L,M,k,C){var R=k.doc.getTextRange(C);if(!C.isMultiLine()&&R=="("){o(M);var O=k.doc.getLine(C.start.row),E=O.substring(C.start.column+1,C.start.column+2);if(E==")")return C.end.column++,C}}),this.add("brackets","insertion",function(b,L,M,k,C){if(C=="["){o(M);var R=M.getSelectionRange(),O=k.doc.getTextRange(R);if(O!==""&&M.getWrapBehavioursEnabled())return c(R,O,"[","]");if(p.isSaneInsertion(M,k))return p.recordAutoInsert(M,k,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){o(M);var E=M.getCursorPosition(),I=k.doc.getLine(E.row),z=I.substring(E.column,E.column+1);if(z=="]"){var P=k.$findOpeningBracket("]",{column:E.column+1,row:E.row});if(P!==null&&p.isAutoInsertedClosing(E,I,C))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(b,L,M,k,C){var R=k.doc.getTextRange(C);if(!C.isMultiLine()&&R=="["){o(M);var O=k.doc.getLine(C.start.row),E=O.substring(C.start.column+1,C.start.column+2);if(E=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(b,L,M,k,C){var R=k.$mode.$quotes||l;if(C.length==1&&R[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;o(M);var O=C,E=M.getSelectionRange(),I=k.doc.getTextRange(E);if(I!==""&&(I.length!=1||!R[I])&&M.getWrapBehavioursEnabled())return c(E,I,O,O);if(!I){var z=M.getCursorPosition(),P=k.doc.getLine(z.row),N=P.substring(z.column-1,z.column),_=P.substring(z.column,z.column+1),S=k.getTokenAt(z.row,z.column),D=k.getTokenAt(z.row,z.column+1);if(N=="\\"&&S&&/escape/.test(S.type))return null;var j=S&&/string|escape/.test(S.type),U=!D||/string|escape/.test(D.type),q;if(_==O)q=j!==U,q&&/string\.end/.test(D.type)&&(q=!1);else{if(j&&!U||j&&U)return null;var Z=k.$mode.tokenRe;Z.lastIndex=0;var te=Z.test(N);Z.lastIndex=0;var he=Z.test(_),ne=k.$mode.$pairQuotesAfter,le=ne&&ne[O]&&ne[O].test(N);if(!le&&te||he||_&&!/[\s;,.})\]\\]/.test(_))return null;var ue=P[z.column-2];if(N==O&&(ue==O||Z.test(ue)))return null;q=!0}return{text:q?O+O:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(b,L,M,k,C){var R=k.$mode.$quotes||l,O=k.doc.getTextRange(C);if(!C.isMultiLine()&&R.hasOwnProperty(O)){o(M);var E=k.doc.getLine(C.start.row),I=E.substring(C.start.column+1,C.start.column+2);if(I==O)return C.end.column++,C}}),w.closeDocComment!==!1&&this.add("doc comment end","insertion",function(b,L,M,k,C){if(b==="doc-start"&&(C===`
|
184
|
+
`||C===`\r
|
185
|
+
`)&&M.selection.isEmpty()){var R=M.getCursorPosition();if(R.column===0)return;for(var O=k.doc.getLine(R.row),E=k.doc.getLine(R.row+1),I=k.getTokens(R.row),z=0,P=0;P<I.length;P++){z+=I[P].value.length;var N=I[P];if(z>=R.column){if(z===R.column){if(!/\.doc/.test(N.type))return;if(/\*\//.test(N.value)){var _=I[P+1];if(!_||!/\.doc/.test(_.type))return}}var S=R.column-(z-N.value.length),D=N.value.indexOf("*/"),j=N.value.indexOf("/**",D>-1?D+2:0);if(j!==-1&&S>j&&S<j+3||D!==-1&&j!==-1&&S>=D&&S<=j||!/\.doc/.test(N.type))return;break}}var U=this.$getIndent(O);if(/\s*\*/.test(E))return/^\s*\*/.test(O)?{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(O.substring(0,R.column)))return{text:C+U+" * "+C+" "+U+"*/",selection:[1,4+U.length,1,4+U.length]}}})},p.isSaneInsertion=function(w,b){var L=w.getCursorPosition(),M=new x(b,L.row,L.column);if(!this.$matchTokenType(M.getCurrentToken()||"text",d)){if(/[)}\]]/.test(w.session.getLine(L.row)[L.column]))return!0;var k=new x(b,L.row,L.column+1);if(!this.$matchTokenType(k.getCurrentToken()||"text",d))return!1}return M.stepForward(),M.getCurrentTokenRow()!==L.row||this.$matchTokenType(M.getCurrentToken()||"text",s)},p.$matchTokenType=function(w,b){return b.indexOf(w.type||w)>-1},p.recordAutoInsert=function(w,b,L){var M=w.getCursorPosition(),k=b.doc.getLine(M.row);this.isAutoInsertedClosing(M,k,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=M.row,a.autoInsertedLineEnd=L+k.substr(M.column),a.autoInsertedBrackets++},p.recordMaybeInsert=function(w,b,L){var M=w.getCursorPosition(),k=b.doc.getLine(M.row);this.isMaybeInsertedClosing(M,k)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=M.row,a.maybeInsertedLineStart=k.substr(0,M.column)+L,a.maybeInsertedLineEnd=k.substr(M.column),a.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(w,b,L){return a.autoInsertedBrackets>0&&w.row===a.autoInsertedRow&&L===a.autoInsertedLineEnd[0]&&b.substr(w.column)===a.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(w,b){return a.maybeInsertedBrackets>0&&w.row===a.maybeInsertedRow&&b.substr(w.column)===a.maybeInsertedLineEnd&&b.substr(0,w.column)==a.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){a.autoInsertedLineEnd=a.autoInsertedLineEnd.substr(1),a.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){a&&(a.maybeInsertedBrackets=0,a.maybeInsertedRow=-1)},g.inherits(p,y),r.CstyleBehaviour=p}),ace.define("ace/unicode",["require","exports","module"],function(e,r,m){for(var g=[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<g.length;h+=2)x.push(y+=g[h]),g[h+1]&&x.push(45,y+=g[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,m){var g=e("../config"),y=e("../tokenizer").Tokenizer,x=e("./text_highlight_rules").TextHighlightRules,h=e("./behaviour/cstyle").CstyleBehaviour,d=e("../unicode"),s=e("../lib/lang"),a=e("../token_iterator").TokenIterator,u=e("../range").Range,l;l=function(){this.HighlightRules=x},(function(){this.$defaultBehaviour=new h,this.tokenRe=new RegExp("^["+d.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+d.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,c,p,w){var b=c.doc,L=!0,M=!0,k=1/0,C=c.getTabSize(),R=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var O=this.lineCommentStart.map(s.escapeRegExp).join("|"),E=this.lineCommentStart[0];else var O=s.escapeRegExp(this.lineCommentStart),E=this.lineCommentStart;O=new RegExp("^(\\s*)(?:"+O+") ?"),R=c.getUseSoftTabs();var I=function(q,Z){var te=q.match(O);if(te){var he=te[1].length,ne=te[0].length;!_(q,he,ne)&&te[0][ne-1]==" "&&ne--,b.removeInLine(Z,he,ne)}},z=E+" ",P=function(q,Z){(!L||/\S/.test(q))&&(_(q,k,k)?b.insertInLine({row:Z,column:k},z):b.insertInLine({row:Z,column:k},E))},N=function(q,Z){return O.test(q)},_=function(q,Z,te){for(var he=0;Z--&&q.charAt(Z)==" ";)he++;if(he%C!=0)return!1;for(var he=0;q.charAt(te++)==" ";)he++;return C>2?he%C!=C-1:he%C==0}}else{if(!this.blockComment)return!1;var E=this.blockComment.start,S=this.blockComment.end,O=new RegExp("^(\\s*)(?:"+s.escapeRegExp(E)+")"),D=new RegExp("(?:"+s.escapeRegExp(S)+")\\s*$"),P=function(le,ue){N(le,ue)||(!L||/\S/.test(le))&&(b.insertInLine({row:ue,column:le.length},S),b.insertInLine({row:ue,column:k},E))},I=function(le,ue){var ce;(ce=le.match(D))&&b.removeInLine(ue,le.length-ce[0].length,le.length),(ce=le.match(O))&&b.removeInLine(ue,ce[1].length,ce[0].length)},N=function(le,ue){if(O.test(le))return!0;for(var ce=c.getTokens(ue),fe=0;fe<ce.length;fe++)if(ce[fe].type==="comment")return!0}}function j(q){for(var Z=p;Z<=w;Z++)q(b.getLine(Z),Z)}var U=1/0;j(function(q,Z){var te=q.search(/\S/);te!==-1?(te<k&&(k=te),M&&!N(q,Z)&&(M=!1)):U>q.length&&(U=q.length)}),k==1/0&&(k=U,L=!1,M=!1),R&&k%C!=0&&(k=Math.floor(k/C)*C),j(M?I:P)},this.toggleBlockComment=function(o,c,p,w){var b=this.blockComment;if(b){!b.start&&b[0]&&(b=b[0]);var L=new a(c,w.row,w.column),M=L.getCurrentToken();c.selection;var k=c.selection.toOrientedRange(),C,R;if(M&&/comment/.test(M.type)){for(var O,E;M&&/comment/.test(M.type);){var I=M.value.indexOf(b.start);if(I!=-1){var z=L.getCurrentTokenRow(),P=L.getCurrentTokenColumn()+I;O=new u(z,P,z,P+b.start.length);break}M=L.stepBackward()}for(var L=new a(c,w.row,w.column),M=L.getCurrentToken();M&&/comment/.test(M.type);){var I=M.value.indexOf(b.end);if(I!=-1){var z=L.getCurrentTokenRow(),P=L.getCurrentTokenColumn()+I;E=new u(z,P,z,P+b.end.length);break}M=L.stepForward()}E&&c.remove(E),O&&(c.remove(O),C=O.start.row,R=-b.start.length)}else R=b.start.length,C=p.start.row,c.insert(p.end,b.end),c.insert(p.start,b.start);k.start.row==C&&(k.start.column+=R),k.end.row==C&&(k.end.column+=R),c.selection.fromOrientedRange(k)}},this.getNextLineIndent=function(o,c,p){return this.$getIndent(c)},this.checkOutdent=function(o,c,p){return!1},this.autoOutdent=function(o,c,p){},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 c in o)if(o[c]){var p=o[c],w=p.prototype.$id,b=g.$modes[w];b||(g.$modes[w]=b=new p),g.$modes[c]||(g.$modes[c]=b),this.$embeds.push(c),this.$modes[c]=b}for(var L=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],M=function(R){(function(O){var E=L[R],I=O[E];O[L[R]]=function(){return this.$delegator(E,arguments,I)}})(k)},k=this,c=0;c<L.length;c++)M(c)},this.$delegator=function(o,c,p){var w=c[0]||"start";if(typeof w!="string"){if(Array.isArray(w[2])){var b=w[2][w[2].length-1],L=this.$modes[b];if(L)return L[o].apply(L,[w[1]].concat([].slice.call(c,1)))}w=w[0]||"start"}for(var M=0;M<this.$embeds.length;M++)if(this.$modes[this.$embeds[M]]){var k=w.split(this.$embeds[M]);if(!k[0]&&k[1]){c[0]=k[1];var L=this.$modes[this.$embeds[M]];return L[o].apply(L,c)}}var C=p.apply(this,c);return p?C:void 0},this.transformAction=function(o,c,p,w,b){if(this.$behaviour){var L=this.$behaviour.getBehaviours();for(var M in L)if(L[M][c]){var k=L[M][c].apply(this,arguments);if(k)return k}}},this.getKeywords=function(o){if(!this.completionKeywords){var c=this.$tokenizer.rules,p=[];for(var w in c)for(var b=c[w],L=0,M=b.length;L<M;L++)if(typeof b[L].token=="string")/keyword|support|storage/.test(b[L].token)&&p.push(b[L].regex);else if(typeof b[L].token=="object"){for(var k=0,C=b[L].token.length;k<C;k++)if(/keyword|support|storage/.test(b[L].token[k])){var w=b[L].regex.match(/\(.+?\)/g)[k];p.push(w.substr(1,w.length-2))}}this.completionKeywords=p}return o?p.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(o,c,p,w){var b=this.$keywordList||this.$createKeywordList();return b.map(function(L){return{name:L,value:L,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(l.prototype),r.Mode=l}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,r,m){var g=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 d;return this.lineWidgets?d=this.lineWidgets[h]&&this.lineWidgets[h].rowCount||0:d=0,!this.$useWrapMode||!this.$wrapData[h]?1+d:this.$wrapData[h].length+1+d},x.prototype.$getWidgetScreenLength=function(){var h=0;return this.lineWidgets.forEach(function(d){d&&d.rowCount&&!d.hidden&&(h+=d.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 d=this.editor;if(d){this.editor=null,d.widgetManager=null,d.renderer.off("beforeRender",this.measureWidgets),d.renderer.off("afterRender",this.renderWidgets);var s=this.session.lineWidgets;s&&s.forEach(function(a){a&&a.el&&a.el.parentNode&&(a._inDocument=!1,a.el.parentNode.removeChild(a.el))})}},x.prototype.updateOnFold=function(h,d){var s=d.lineWidgets;if(!(!s||!h.action)){for(var a=h.data,u=a.start.row,l=a.end.row,o=h.action=="add",c=u+1;c<l;c++)s[c]&&(s[c].hidden=o);s[l]&&(o?s[u]?s[l].hidden=o:s[u]=s[l]:(s[u]==s[l]&&(s[u]=void 0),s[l].hidden=o))}},x.prototype.updateOnChange=function(h){var d=this.session.lineWidgets;if(d){var s=h.start.row,a=h.end.row-s;if(a!==0)if(h.action=="remove"){var u=d.splice(s+1,a);!d[s]&&u[u.length-1]&&(d[s]=u.pop()),u.forEach(function(o){o&&this.removeLineWidget(o)},this),this.$updateRows()}else{var l=new Array(a);d[s]&&d[s].column!=null&&h.start.column>d[s].column&&s++,l.unshift(s,0),d.splice.apply(d,l),this.$updateRows()}}},x.prototype.$updateRows=function(){var h=this.session.lineWidgets;if(h){var d=!0;h.forEach(function(s,a){if(s)for(d=!1,s.row=a;s.$oldWidget;)s.$oldWidget.row=a,s=s.$oldWidget}),d&&(this.session.lineWidgets=null)}},x.prototype.$registerLineWidget=function(h){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var d=this.session.lineWidgets[h.row];return d&&(h.$oldWidget=d,d.el&&d.el.parentNode&&(d.el.parentNode.removeChild(d.el),d._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 d=this.editor.renderer;h.html&&!h.el&&(h.el=g.createElement("div"),h.el.innerHTML=h.html),h.text&&!h.el&&(h.el=g.createElement("div"),h.el.textContent=h.text),h.el&&(g.addCssClass(h.el,"ace_lineWidgetContainer"),h.className&&g.addCssClass(h.el,h.className),h.el.style.position="absolute",h.el.style.zIndex="5",d.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/d.layerConfig.lineHeight);var s=this.session.getFoldAt(h.row,0);if(h.$fold=s,s){var a=this.session.lineWidgets;h.row==s.end.row&&!a[s.start.row]?a[s.start.row]=h:h.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:h.row}}}),this.$updateRows(),this.renderWidgets(null,d),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 d=this.session.lineWidgets[h.row];if(d==h)this.session.lineWidgets[h.row]=h.$oldWidget,h.$oldWidget&&this.onWidgetChanged(h.$oldWidget);else for(;d;){if(d.$oldWidget==h){d.$oldWidget=h.$oldWidget;break}d=d.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:h.row}}}),this.$updateRows()},x.prototype.getWidgetsAtRow=function(h){for(var d=this.session.lineWidgets,s=d&&d[h],a=[];s;)a.push(s),s=s.$oldWidget;return a},x.prototype.onWidgetChanged=function(h){this.session._changedWidgets.push(h),this.editor&&this.editor.renderer.updateFull()},x.prototype.measureWidgets=function(h,d){var s=this.session._changedWidgets,a=d.layerConfig;if(!(!s||!s.length)){for(var u=1/0,l=0;l<s.length;l++){var o=s[l];if(!(!o||!o.el)&&o.session==this.session){if(!o._inDocument){if(this.session.lineWidgets[o.row]!=o)continue;o._inDocument=!0,d.container.appendChild(o.el)}o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/a.characterWidth));var c=o.h/a.lineHeight;o.coverLine&&(c-=this.session.getRowLineCount(o.row),c<0&&(c=0)),o.rowCount!=c&&(o.rowCount=c,o.row<u&&(u=o.row))}}u!=1/0&&(this.session._emit("changeFold",{data:{start:{row:u}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},x.prototype.renderWidgets=function(h,d){var s=d.layerConfig,a=this.session.lineWidgets;if(a){for(var u=Math.min(this.firstRow,s.firstRow),l=Math.max(this.lastRow,s.lastRow,a.length);u>0&&!a[u];)u--;this.firstRow=s.firstRow,this.lastRow=s.lastRow,d.$cursorLayer.config=s;for(var o=u;o<=l;o++){var c=a[o];if(!(!c||!c.el)){if(c.hidden){c.el.style.top=-100-(c.pixelHeight||0)+"px";continue}c._inDocument||(c._inDocument=!0,d.container.appendChild(c.el));var p=d.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;c.coverLine||(p+=s.lineHeight*this.session.getRowLineCount(c.row)),c.el.style.top=p-s.offset+"px";var w=c.coverGutter?0:d.gutterWidth;c.fixedWidth||(w-=d.scrollLeft),c.el.style.left=w+"px",c.fullWidth&&c.screenWidth&&(c.el.style.minWidth=s.width+2*s.padding+"px"),c.fixedWidth?c.el.style.right=d.scrollBar.getWidth()+"px":c.el.style.right=""}}}},x})();r.LineWidgets=y}),ace.define("ace/apply_delta",["require","exports","module"],function(e,r,m){r.applyDelta=function(g,y,x){var h=y.start.row,d=y.start.column,s=g[h]||"";switch(y.action){case"insert":var a=y.lines;if(a.length===1)g[h]=s.substring(0,d)+y.lines[0]+s.substring(d);else{var u=[h,1].concat(y.lines);g.splice.apply(g,u),g[h]=s.substring(0,d)+g[h],g[h+y.lines.length-1]+=s.substring(d)}break;case"remove":var l=y.end.column,o=y.end.row;h===o?g[h]=s.substring(0,d)+s.substring(l):g.splice(h,o-h+1,s.substring(0,d)+g[o].substring(l));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,m){var g=e("./lib/oop"),y=e("./lib/event_emitter").EventEmitter,x=(function(){function s(a,u,l){this.$onChange=this.onChange.bind(this),this.attach(a),typeof u!="number"?this.setPosition(u.row,u.column):this.setPosition(u,l)}return s.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},s.prototype.getDocument=function(){return this.document},s.prototype.onChange=function(a){if(!(a.start.row==a.end.row&&a.start.row!=this.row)&&!(a.start.row>this.row)){var u=d(a,{row:this.row,column:this.column},this.$insertRight);this.setPosition(u.row,u.column,!0)}},s.prototype.setPosition=function(a,u,l){var o;if(l?o={row:a,column:u}:o=this.$clipPositionToDocument(a,u),!(this.row==o.row&&this.column==o.column)){var c={row:this.row,column:this.column};this.row=o.row,this.column=o.column,this._signal("change",{old:c,value:o})}},s.prototype.detach=function(){this.document.off("change",this.$onChange)},s.prototype.attach=function(a){this.document=a||this.document,this.document.on("change",this.$onChange)},s.prototype.$clipPositionToDocument=function(a,u){var l={};return a>=this.document.getLength()?(l.row=Math.max(0,this.document.getLength()-1),l.column=this.document.getLine(l.row).length):a<0?(l.row=0,l.column=0):(l.row=a,l.column=Math.min(this.document.getLine(l.row).length,Math.max(0,u))),u<0&&(l.column=0),l},s})();x.prototype.$insertRight=!1,g.implement(x.prototype,y);function h(s,a,u){var l=u?s.column<=a.column:s.column<a.column;return s.row<a.row||s.row==a.row&&l}function d(s,a,u){var l=s.action=="insert",o=(l?1:-1)*(s.end.row-s.start.row),c=(l?1:-1)*(s.end.column-s.start.column),p=s.start,w=l?p:s.end;return h(a,p,u)?{row:a.row,column:a.column}:h(w,a,!u)?{row:a.row+o,column:a.column+(a.row==w.row?c:0)}:{row:p.row,column:p.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,m){var g=e("./lib/oop"),y=e("./apply_delta").applyDelta,x=e("./lib/event_emitter").EventEmitter,h=e("./range").Range,d=e("./anchor").Anchor,s=(function(){function a(u){this.$lines=[""],u.length===0?this.$lines=[""]:Array.isArray(u)?this.insertMergedLines({row:0,column:0},u):this.insert({row:0,column:0},u)}return a.prototype.setValue=function(u){var l=this.getLength()-1;this.remove(new h(0,0,l,this.getLine(l).length)),this.insert({row:0,column:0},u||"")},a.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},a.prototype.createAnchor=function(u,l){return new d(this,u,l)},a.prototype.$detectNewLine=function(u){var l=u.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=l?l[1]:`
|
186
|
+
`,this._signal("changeNewLineMode")},a.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
187
|
+
`;case"unix":return`
|
188
|
+
`;default:return this.$autoNewLine||`
|
189
|
+
`}},a.prototype.setNewLineMode=function(u){this.$newLineMode!==u&&(this.$newLineMode=u,this._signal("changeNewLineMode"))},a.prototype.getNewLineMode=function(){return this.$newLineMode},a.prototype.isNewLine=function(u){return u==`\r
|
190
|
+
`||u=="\r"||u==`
|
191
|
+
`},a.prototype.getLine=function(u){return this.$lines[u]||""},a.prototype.getLines=function(u,l){return this.$lines.slice(u,l+1)},a.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},a.prototype.getLength=function(){return this.$lines.length},a.prototype.getTextRange=function(u){return this.getLinesForRange(u).join(this.getNewLineCharacter())},a.prototype.getLinesForRange=function(u){var l;if(u.start.row===u.end.row)l=[this.getLine(u.start.row).substring(u.start.column,u.end.column)];else{l=this.getLines(u.start.row,u.end.row),l[0]=(l[0]||"").substring(u.start.column);var o=l.length-1;u.end.row-u.start.row==o&&(l[o]=l[o].substring(0,u.end.column))}return l},a.prototype.insertLines=function(u,l){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(u,l)},a.prototype.removeLines=function(u,l){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(u,l)},a.prototype.insertNewLine=function(u){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(u,["",""])},a.prototype.insert=function(u,l){return this.getLength()<=1&&this.$detectNewLine(l),this.insertMergedLines(u,this.$split(l))},a.prototype.insertInLine=function(u,l){var o=this.clippedPos(u.row,u.column),c=this.pos(u.row,u.column+l.length);return this.applyDelta({start:o,end:c,action:"insert",lines:[l]},!0),this.clonePos(c)},a.prototype.clippedPos=function(u,l){var o=this.getLength();u===void 0?u=o:u<0?u=0:u>=o&&(u=o-1,l=void 0);var c=this.getLine(u);return l==null&&(l=c.length),l=Math.min(Math.max(l,0),c.length),{row:u,column:l}},a.prototype.clonePos=function(u){return{row:u.row,column:u.column}},a.prototype.pos=function(u,l){return{row:u,column:l}},a.prototype.$clipPosition=function(u){var l=this.getLength();return u.row>=l?(u.row=Math.max(0,l-1),u.column=this.getLine(l-1).length):(u.row=Math.max(0,u.row),u.column=Math.min(Math.max(u.column,0),this.getLine(u.row).length)),u},a.prototype.insertFullLines=function(u,l){u=Math.min(Math.max(u,0),this.getLength());var o=0;u<this.getLength()?(l=l.concat([""]),o=0):(l=[""].concat(l),u--,o=this.$lines[u].length),this.insertMergedLines({row:u,column:o},l)},a.prototype.insertMergedLines=function(u,l){var o=this.clippedPos(u.row,u.column),c={row:o.row+l.length-1,column:(l.length==1?o.column:0)+l[l.length-1].length};return this.applyDelta({start:o,end:c,action:"insert",lines:l}),this.clonePos(c)},a.prototype.remove=function(u){var l=this.clippedPos(u.start.row,u.start.column),o=this.clippedPos(u.end.row,u.end.column);return this.applyDelta({start:l,end:o,action:"remove",lines:this.getLinesForRange({start:l,end:o})}),this.clonePos(l)},a.prototype.removeInLine=function(u,l,o){var c=this.clippedPos(u,l),p=this.clippedPos(u,o);return this.applyDelta({start:c,end:p,action:"remove",lines:this.getLinesForRange({start:c,end:p})},!0),this.clonePos(c)},a.prototype.removeFullLines=function(u,l){u=Math.min(Math.max(0,u),this.getLength()-1),l=Math.min(Math.max(0,l),this.getLength()-1);var o=l==this.getLength()-1&&u>0,c=l<this.getLength()-1,p=o?u-1:u,w=o?this.getLine(p).length:0,b=c?l+1:l,L=c?0:this.getLine(b).length,M=new h(p,w,b,L),k=this.$lines.slice(u,l+1);return this.applyDelta({start:M.start,end:M.end,action:"remove",lines:this.getLinesForRange(M)}),k},a.prototype.removeNewLine=function(u){u<this.getLength()-1&&u>=0&&this.applyDelta({start:this.pos(u,this.getLine(u).length),end:this.pos(u+1,0),action:"remove",lines:["",""]})},a.prototype.replace=function(u,l){if(u instanceof h||(u=h.fromPoints(u.start,u.end)),l.length===0&&u.isEmpty())return u.start;if(l==this.getTextRange(u))return u.end;this.remove(u);var o;return l?o=this.insert(u.start,l):o=u.start,o},a.prototype.applyDeltas=function(u){for(var l=0;l<u.length;l++)this.applyDelta(u[l])},a.prototype.revertDeltas=function(u){for(var l=u.length-1;l>=0;l--)this.revertDelta(u[l])},a.prototype.applyDelta=function(u,l){var o=u.action=="insert";(o?u.lines.length<=1&&!u.lines[0]:!h.comparePoints(u.start,u.end))||(o&&u.lines.length>2e4?this.$splitAndapplyLargeDelta(u,2e4):(y(this.$lines,u,l),this._signal("change",u)))},a.prototype.$safeApplyDelta=function(u){var l=this.$lines.length;(u.action=="remove"&&u.start.row<l&&u.end.row<l||u.action=="insert"&&u.start.row<=l)&&this.applyDelta(u)},a.prototype.$splitAndapplyLargeDelta=function(u,l){for(var o=u.lines,c=o.length-l+1,p=u.start.row,w=u.start.column,b=0,L=0;b<c;b=L){L+=l-1;var M=o.slice(b,L);M.push(""),this.applyDelta({start:this.pos(p+b,w),end:this.pos(p+L,w=0),action:u.action,lines:M},!0)}u.lines=o.slice(b),u.start.row=p+b,u.start.column=w,this.applyDelta(u,!0)},a.prototype.revertDelta=function(u){this.$safeApplyDelta({start:this.clonePos(u.start),end:this.clonePos(u.end),action:u.action=="insert"?"remove":"insert",lines:u.lines.slice()})},a.prototype.indexToPosition=function(u,l){for(var o=this.$lines||this.getAllLines(),c=this.getNewLineCharacter().length,p=l||0,w=o.length;p<w;p++)if(u-=o[p].length+c,u<0)return{row:p,column:u+o[p].length+c};return{row:w-1,column:u+o[w-1].length+c}},a.prototype.positionToIndex=function(u,l){for(var o=this.$lines||this.getAllLines(),c=this.getNewLineCharacter().length,p=0,w=Math.min(u.row,o.length),b=l||0;b<w;++b)p+=o[b].length+c;return p+u.column},a.prototype.$split=function(u){return u.split(/\r\n|\r|\n/)},a})();s.prototype.$autoNewLine="",s.prototype.$newLineMode="auto",g.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,m){var g=e("./lib/oop"),y=e("./lib/event_emitter").EventEmitter,x=(function(){function h(d,s){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=d;var a=this;this.$worker=function(){if(a.running){for(var u=new Date,l=a.currentLine,o=-1,c=a.doc,p=l;a.lines[l];)l++;var w=c.getLength(),b=0;for(a.running=!1;l<w;){a.$tokenizeRow(l),o=l;do l++;while(a.lines[l]);if(b++,b%5===0&&new Date-u>20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=l,o==-1&&(o=l),p<=o&&a.fireUpdateEvent(p,o)}}}return h.prototype.setTokenizer=function(d){this.tokenizer=d,this.lines=[],this.states=[],this.start(0)},h.prototype.setDocument=function(d){this.doc=d,this.lines=[],this.states=[],this.stop()},h.prototype.fireUpdateEvent=function(d,s){var a={first:d,last:s};this._signal("update",{data:a})},h.prototype.start=function(d){this.currentLine=Math.min(d||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(d){var s=d.start.row,a=d.end.row-s;if(a===0)this.lines[s]=null;else if(d.action=="remove")this.lines.splice(s,a+1,null),this.states.splice(s,a+1,null);else{var u=Array(a+1);u.unshift(s,1),this.lines.splice.apply(this.lines,u),this.states.splice.apply(this.states,u)}this.currentLine=Math.min(s,this.currentLine,this.doc.getLength()),this.stop()},h.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},h.prototype.getTokens=function(d){return this.lines[d]||this.$tokenizeRow(d)},h.prototype.getState=function(d){return this.currentLine==d&&this.$tokenizeRow(d),this.states[d]||"start"},h.prototype.$tokenizeRow=function(d){var s=this.doc.getLine(d),a=this.states[d-1],u=this.tokenizer.getLineTokens(s,a,d);return this.states[d]+""!=u.state+""?(this.states[d]=u.state,this.lines[d+1]=null,this.currentLine>d+1&&(this.currentLine=d+1)):this.currentLine==d&&(this.currentLine=d+1),this.lines[d]=u.tokens},h.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},h})();g.implement(x.prototype,y),r.BackgroundTokenizer=x}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,r,m){var g=e("./lib/lang"),y=e("./range").Range,x=(function(){function h(d,s,a){a===void 0&&(a="text"),this.setRegexp(d),this.clazz=s,this.type=a,this.docLen=0}return h.prototype.setRegexp=function(d){this.regExp+""!=d+""&&(this.regExp=d,this.cache=[])},h.prototype.update=function(d,s,a,u){if(this.regExp){for(var l=u.firstRow,o=u.lastRow,c={},p=a.$editor&&a.$editor.$search,w=p&&p.$isMultilineSearch(a.$editor.getLastSearchOptions()),b=l;b<=o;b++){var L=this.cache[b];if(L==null||a.getValue().length!=this.docLen){if(w){L=[];var M=p.$multiLineForward(a,this.regExp,b,o);if(M){var k=M.endRow<=o?M.endRow-1:o;k>b&&(b=k),L.push(new y(M.startRow,M.startCol,M.endRow,M.endCol))}L.length>this.MAX_RANGES&&(L=L.slice(0,this.MAX_RANGES))}else L=g.getMatchOffsets(a.getLine(b),this.regExp),L.length>this.MAX_RANGES&&(L=L.slice(0,this.MAX_RANGES)),L=L.map(function(E){return new y(b,E.offset,b,E.offset+E.length)});this.cache[b]=L.length?L:""}if(L.length!==0)for(var C=L.length;C--;){var R=L[C].toScreenRange(a),O=R.toString();c[O]||(c[O]=!0,s.drawSingleLineMarker(d,R,this.clazz,u))}}this.docLen=a.getValue().length}},h})();x.prototype.MAX_RANGES=500,r.SearchHighlight=x}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,r,m){var g=(function(){function k(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return k.prototype.addSession=function(C){this.$session=C},k.prototype.add=function(C,R,O){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),R===!1||!this.lastDeltas){this.lastDeltas=[];var E=this.$undoStack.length;E>this.$undoDepth-1&&this.$undoStack.splice(0,E-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),C.id=this.$rev=++this.$maxRev}(C.action=="remove"||C.action=="insert")&&(this.$lastDelta=C),this.lastDeltas.push(C)}},k.prototype.addSelection=function(C,R){this.selections.push({value:C,rev:R||this.$rev})},k.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},k.prototype.markIgnored=function(C,R){R==null&&(R=this.$rev+1);for(var O=this.$undoStack,E=O.length;E--;){var I=O[E][0];if(I.id<=C)break;I.id<R&&(I.ignore=!0)}this.lastDeltas=null},k.prototype.getSelection=function(C,R){for(var O=this.selections,E=O.length;E--;){var I=O[E];if(I.rev<C)return R&&(I=O[E+1]),I}},k.prototype.getRevision=function(){return this.$rev},k.prototype.getDeltas=function(C,R){R==null&&(R=this.$rev+1);for(var O=this.$undoStack,E=null,I=0,z=O.length;z--;){var P=O[z][0];if(P.id<R&&!E&&(E=z+1),P.id<=C){I=z+1;break}}return O.slice(I,E)},k.prototype.getChangedRanges=function(C,R){R==null&&(R=this.$rev+1)},k.prototype.getChangedLines=function(C,R){R==null&&(R=this.$rev+1)},k.prototype.undo=function(C,R){this.lastDeltas=null;var O=this.$undoStack;if(y(O,O.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var E=O.pop(),I=null;return E&&(I=C.undoChanges(E,R),this.$redoStack.push(E),this.$syncRev()),this.$fromUndo=!1,I}},k.prototype.redo=function(C,R){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var O=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);M(this.$redoStack,O),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(z){z[0].id=++this.$maxRev},this)}var E=this.$redoStack.pop(),I=null;return E&&(I=C.redoChanges(E,R),this.$undoStack.push(E),this.$syncRev()),this.$fromUndo=!1,I},k.prototype.$syncRev=function(){var C=this.$undoStack,R=C[C.length-1],O=R&&R[0].id||0;this.$redoStackBaseRev=O,this.$rev=O},k.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},k.prototype.canUndo=function(){return this.$undoStack.length>0},k.prototype.canRedo=function(){return this.$redoStack.length>0},k.prototype.bookmark=function(C){C==null&&(C=this.$rev),this.mark=C},k.prototype.isAtBookmark=function(){return this.$rev===this.mark},k.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},k.prototype.fromJSON=function(C){this.reset(),this.$undoStack=C.$undoStack,this.$redoStack=C.$redoStack},k.prototype.$prettyPrint=function(C){return C?a(C):a(this.$undoStack)+`
|
192
|
+
---
|
193
|
+
`+a(this.$redoStack)},k})();g.prototype.hasUndo=g.prototype.canUndo,g.prototype.hasRedo=g.prototype.canRedo,g.prototype.isClean=g.prototype.isAtBookmark,g.prototype.markClean=g.prototype.bookmark;function y(k,C){for(var R=C;R--;){var O=k[R];if(O&&!O[0].ignore){for(;R<C-1;){var E=o(k[R],k[R+1]);k[R]=E[0],k[R+1]=E[1],R++}return!0}}}var x=e("./range").Range,h=x.comparePoints;x.comparePoints;function d(k){return{row:k.row,column:k.column}}function s(k){return{start:d(k.start),end:d(k.end),action:k.action,lines:k.lines.slice()}}function a(k){if(k=k||this,Array.isArray(k))return k.map(a).join(`
|
194
|
+
`);var C="";return k.action?(C=k.action=="insert"?"+":"-",C+="["+k.lines+"]"):k.value&&(Array.isArray(k.value)?C=k.value.map(u).join(`
|
195
|
+
`):C=u(k.value)),k.start&&(C+=u(k)),(k.id||k.rev)&&(C+=" ("+(k.id||k.rev)+")"),C}function u(k){return k.start.row+":"+k.start.column+"=>"+k.end.row+":"+k.end.column}function l(k,C){var R=k.action=="insert",O=C.action=="insert";if(R&&O)if(h(C.start,k.end)>=0)p(C,k,-1);else if(h(C.start,k.start)<=0)p(k,C,1);else return null;else if(R&&!O)if(h(C.start,k.end)>=0)p(C,k,-1);else if(h(C.end,k.start)<=0)p(k,C,-1);else return null;else if(!R&&O)if(h(C.start,k.start)>=0)p(C,k,1);else if(h(C.start,k.start)<=0)p(k,C,1);else return null;else if(!R&&!O)if(h(C.start,k.start)>=0)p(C,k,1);else if(h(C.end,k.start)<=0)p(k,C,-1);else return null;return[C,k]}function o(k,C){for(var R=k.length;R--;)for(var O=0;O<C.length;O++)if(!l(k[R],C[O])){for(;R<k.length;){for(;O--;)l(C[O],k[R]);O=C.length,R++}return[k,C]}return k.selectionBefore=C.selectionBefore=k.selectionAfter=C.selectionAfter=null,[C,k]}function c(k,C){var R=k.action=="insert",O=C.action=="insert";if(R&&O)h(k.start,C.start)<0?p(C,k,1):p(k,C,1);else if(R&&!O)h(k.start,C.end)>=0?p(k,C,-1):(h(k.start,C.start)<=0||p(k,x.fromPoints(C.start,k.start),-1),p(C,k,1));else if(!R&&O)h(C.start,k.end)>=0?p(C,k,-1):(h(C.start,k.start)<=0||p(C,x.fromPoints(k.start,C.start),-1),p(k,C,1));else if(!R&&!O)if(h(C.start,k.end)>=0)p(C,k,-1);else if(h(C.end,k.start)<=0)p(k,C,-1);else{var E,I;return h(k.start,C.start)<0&&(E=k,k=b(k,C.start)),h(k.end,C.end)>0&&(I=b(k,C.end)),w(C.end,k.start,k.end,-1),I&&!E&&(k.lines=I.lines,k.start=I.start,k.end=I.end,I=k),[C,E,I].filter(Boolean)}return[C,k]}function p(k,C,R){w(k.start,C.start,C.end,R),w(k.end,C.start,C.end,R)}function w(k,C,R,O){k.row==(O==1?C:R).row&&(k.column+=O*(R.column-C.column)),k.row+=O*(R.row-C.row)}function b(k,C){var R=k.lines,O=k.end;k.end=d(C);var E=k.end.row-k.start.row,I=R.splice(E,R.length),z=E?C.column:C.column-k.start.column;R.push(I[0].substring(0,z)),I[0]=I[0].substr(z);var P={start:d(C),end:O,lines:I,action:k.action};return P}function L(k,C){C=s(C);for(var R=k.length;R--;){for(var O=k[R],E=0;E<O.length;E++){var I=O[E],z=c(I,C);C=z[0],z.length!=2&&(z[2]?(O.splice(E+1,1,z[1],z[2]),E++):z[1]||(O.splice(E,1),E--))}O.length||k.splice(R,1)}return k}function M(k,C){for(var R=0;R<C.length;R++)for(var O=C[R],E=0;E<O.length;E++)L(k,O[E])}r.UndoManager=g}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,r,m){var g=e("../range").Range,y=(function(){function x(h,d){this.foldData=h,Array.isArray(d)?this.folds=d:d=this.folds=[d];var s=d[d.length-1];this.range=new g(d[0].start.row,d[0].start.column,s.end.row,s.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(a){a.setFoldLine(this)},this)}return x.prototype.shiftRow=function(h){this.start.row+=h,this.end.row+=h,this.folds.forEach(function(d){d.start.row+=h,d.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(d,s){return-d.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,d,s){var a=0,u=this.folds,l,o,c,p=!0;d==null&&(d=this.end.row,s=this.end.column);for(var w=0;w<u.length;w++){if(l=u[w],o=l.range.compareStart(d,s),o==-1){h(null,d,s,a,p);return}if(c=h(null,l.start.row,l.start.column,a,p),c=!c&&h(l.placeholder,l.start.row,l.start.column,a),c||o===0)return;p=!l.sameRow,a=l.end.column}h(null,d,s,a,p)},x.prototype.getNextFoldTo=function(h,d){for(var s,a,u=0;u<this.folds.length;u++){if(s=this.folds[u],a=s.range.compareEnd(h,d),a==-1)return{fold:s,kind:"after"};if(a===0)return{fold:s,kind:"inside"}}return null},x.prototype.addRemoveChars=function(h,d,s){var a=this.getNextFoldTo(h,d),u,l;if(a){if(u=a.fold,a.kind=="inside"&&u.start.column!=d&&u.start.row!=h)window.console&&window.console.log(h,d,u);else if(u.start.row==h){l=this.folds;var o=l.indexOf(u);for(o===0&&(this.start.column+=s),o;o<l.length;o++){if(u=l[o],u.start.column+=s,!u.sameRow)return;u.end.column+=s}this.end.column+=s}}},x.prototype.split=function(h,d){var s=this.getNextFoldTo(h,d);if(!s||s.kind=="inside")return null;var a=s.fold,u=this.folds,l=this.foldData,o=u.indexOf(a),c=u[o-1];this.end.row=c.end.row,this.end.column=c.end.column,u=u.splice(o,u.length-o);var p=new x(l,u);return l.splice(l.indexOf(this)+1,0,p),p},x.prototype.merge=function(h){for(var d=h.folds,s=0;s<d.length;s++)this.addFold(d[s]);var a=this.foldData;a.splice(a.indexOf(h),1)},x.prototype.toString=function(){var h=[this.range.toString()+": ["];return this.folds.forEach(function(d){h.push(" "+d.toString())}),h.push("]"),h.join(`
|
196
|
+
`)},x.prototype.idxToPosition=function(h){for(var d=0,s=0;s<this.folds.length;s++){var a=this.folds[s];if(h-=a.start.column-d,h<0)return{row:a.start.row,column:a.start.column+h};if(h-=a.placeholder.length,h<0)return a.start;d=a.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,m){var g=e("./range").Range,y=g.comparePoints,x=(function(){function h(){this.ranges=[],this.$bias=1}return h.prototype.pointIndex=function(d,s,a){for(var u=this.ranges,l=a||0;l<u.length;l++){var o=u[l],c=y(d,o.end);if(!(c>0)){var p=y(d,o.start);return c===0?s&&p!==0?-l-2:l:p>0||p===0&&!s?l:-l-1}}return-l-1},h.prototype.add=function(d){var s=!d.isEmpty(),a=this.pointIndex(d.start,s);a<0&&(a=-a-1);var u=this.pointIndex(d.end,s,a);return u<0?u=-u-1:u++,this.ranges.splice(a,u-a,d)},h.prototype.addList=function(d){for(var s=[],a=d.length;a--;)s.push.apply(s,this.add(d[a]));return s},h.prototype.substractPoint=function(d){var s=this.pointIndex(d);if(s>=0)return this.ranges.splice(s,1)},h.prototype.merge=function(){var d=[],s=this.ranges;s=s.sort(function(c,p){return y(c.start,p.start)});for(var a=s[0],u,l=1;l<s.length;l++){u=a,a=s[l];var o=y(u.end,a.start);o<0||o==0&&!u.isEmpty()&&!a.isEmpty()||(y(u.end,a.end)<0&&(u.end.row=a.end.row,u.end.column=a.end.column),s.splice(l,1),d.push(a),a=u,l--)}return this.ranges=s,d},h.prototype.contains=function(d,s){return this.pointIndex({row:d,column:s})>=0},h.prototype.containsPoint=function(d){return this.pointIndex(d)>=0},h.prototype.rangeAtPoint=function(d){var s=this.pointIndex(d);if(s>=0)return this.ranges[s]},h.prototype.clipRows=function(d,s){var a=this.ranges;if(a[0].start.row>s||a[a.length-1].start.row<d)return[];var u=this.pointIndex({row:d,column:0});u<0&&(u=-u-1);var l=this.pointIndex({row:s,column:0},u);l<0&&(l=-l-1);for(var o=[],c=u;c<l;c++)o.push(a[c]);return o},h.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},h.prototype.attach=function(d){this.session&&this.detach(),this.session=d,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(d){for(var s=d.start,a=d.end,u=s.row,l=a.row,o=this.ranges,c=0,p=o.length;c<p;c++){var w=o[c];if(w.end.row>=u)break}if(d.action=="insert")for(var b=l-u,L=-s.column+a.column;c<p;c++){var w=o[c];if(w.start.row>u)break;if(w.start.row==u&&w.start.column>=s.column&&(w.start.column==s.column&&this.$bias<=0||(w.start.column+=L,w.start.row+=b)),w.end.row==u&&w.end.column>=s.column){if(w.end.column==s.column&&this.$bias<0)continue;w.end.column==s.column&&L>0&&c<p-1&&w.end.column>w.start.column&&w.end.column==o[c+1].start.column&&(w.end.column-=L),w.end.column+=L,w.end.row+=b}}else for(var b=u-l,L=s.column-a.column;c<p;c++){var w=o[c];if(w.start.row>l)break;w.end.row<l&&(u<w.end.row||u==w.end.row&&s.column<w.end.column)?(w.end.row=u,w.end.column=s.column):w.end.row==l?w.end.column<=a.column?(b||w.end.column>s.column)&&(w.end.column=s.column,w.end.row=s.row):(w.end.column+=L,w.end.row+=b):w.end.row>l&&(w.end.row+=b),w.start.row<l&&(u<w.start.row||u==w.start.row&&s.column<w.start.column)?(w.start.row=u,w.start.column=s.column):w.start.row==l?w.start.column<=a.column?(b||w.start.column>s.column)&&(w.start.column=s.column,w.start.row=s.row):(w.start.column+=L,w.start.row+=b):w.start.row>l&&(w.start.row+=b)}if(b!=0&&c<p)for(;c<p;c++){var w=o[c];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,m){var g=this&&this.__extends||(function(){var u=function(l,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,p){c.__proto__=p}||function(c,p){for(var w in p)Object.prototype.hasOwnProperty.call(p,w)&&(c[w]=p[w])},u(l,o)};return function(l,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(l,o);function c(){this.constructor=l}l.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}})(),y=e("../range_list").RangeList,x=(function(u){g(l,u);function l(o,c){var p=u.call(this)||this;return p.foldLine=null,p.placeholder=c,p.range=o,p.start=o.start,p.end=o.end,p.sameRow=o.start.row==o.end.row,p.subFolds=p.ranges=[],p}return l.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},l.prototype.setFoldLine=function(o){this.foldLine=o,this.subFolds.forEach(function(c){c.setFoldLine(o)})},l.prototype.clone=function(){var o=this.range.clone(),c=new l(o,this.placeholder);return this.subFolds.forEach(function(p){c.subFolds.push(p.clone())}),c.collapseChildren=this.collapseChildren,c},l.prototype.addSubFold=function(o){if(!this.range.isEqual(o)){d(o,this.start);for(var c=o.start.row,p=o.start.column,w=0,b=-1;w<this.subFolds.length&&(b=this.subFolds[w].range.compare(c,p),b==1);w++);var L=this.subFolds[w],M=0;if(b==0){if(L.range.containsRange(o))return L.addSubFold(o);M=1}for(var c=o.range.end.row,p=o.range.end.column,k=w,b=-1;k<this.subFolds.length&&(b=this.subFolds[k].range.compare(c,p),b==1);k++);b==0&&k++;for(var C=this.subFolds.splice(w,k-w,o),R=b==0?C.length-1:C.length,O=M;O<R;O++)o.addSubFold(C[O]);return o.setFoldLine(this.foldLine),o}},l.prototype.restoreRange=function(o){return a(o,this.start)},l})(y);function h(u,l){u.row-=l.row,u.row==0&&(u.column-=l.column)}function d(u,l){h(u.start,l),h(u.end,l)}function s(u,l){u.row==0&&(u.column+=l.column),u.row+=l.row}function a(u,l){s(u.start,l),s(u.end,l)}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,m){var g=e("../range").Range,y=e("./fold_line").FoldLine,x=e("./fold").Fold,h=e("../token_iterator").TokenIterator,d=e("../mouse/mouse_event").MouseEvent;function s(){this.getFoldAt=function(a,u,l){var o=this.getFoldLine(a);if(!o)return null;for(var c=o.folds,p=0;p<c.length;p++){var w=c[p].range;if(w.contains(a,u)){if(l==1&&w.isEnd(a,u)&&!w.isEmpty()||l==-1&&w.isStart(a,u)&&!w.isEmpty())continue;return c[p]}}},this.getFoldsInRange=function(a){var u=a.start,l=a.end,o=this.$foldData,c=[];u.column+=1,l.column-=1;for(var p=0;p<o.length;p++){var w=o[p].range.compareRange(a);if(w!=2){if(w==-2)break;for(var b=o[p].folds,L=0;L<b.length;L++){var M=b[L];if(w=M.range.compareRange(a),w==-2)break;if(w!=2){if(w==42)break;c.push(M)}}}}return u.column-=1,l.column+=1,c},this.getFoldsInRangeList=function(a){if(Array.isArray(a)){var u=[];a.forEach(function(o){u=u.concat(this.getFoldsInRange(o))},this)}else var u=this.getFoldsInRange(a);return u},this.getAllFolds=function(){for(var a=[],u=this.$foldData,l=0;l<u.length;l++)for(var o=0;o<u[l].folds.length;o++)a.push(u[l].folds[o]);return a},this.getFoldStringAt=function(a,u,l,o){if(o=o||this.getFoldLine(a),!o)return null;for(var c={end:{column:0}},p,w,b=0;b<o.folds.length;b++){w=o.folds[b];var L=w.range.compareEnd(a,u);if(L==-1){p=this.getLine(w.start.row).substring(c.end.column,w.start.column);break}else if(L===0)return null;c=w}return p||(p=this.getLine(w.start.row).substring(c.end.column)),l==-1?p.substring(0,u-c.end.column):l==1?p.substring(u-c.end.column):p},this.getFoldLine=function(a,u){var l=this.$foldData,o=0;for(u&&(o=l.indexOf(u)),o==-1&&(o=0),o;o<l.length;o++){var c=l[o];if(c.start.row<=a&&c.end.row>=a)return c;if(c.end.row>a)return null}return null},this.getNextFoldLine=function(a,u){var l=this.$foldData,o=0;for(u&&(o=l.indexOf(u)),o==-1&&(o=0),o;o<l.length;o++){var c=l[o];if(c.end.row>=a)return c}return null},this.getFoldedRowCount=function(a,u){for(var l=this.$foldData,o=u-a+1,c=0;c<l.length;c++){var p=l[c],w=p.end.row,b=p.start.row;if(w>=u){b<u&&(b>=a?o-=u-b:o=0);break}else w>=a&&(b>=a?o-=w-b:o-=w-a+1)}return o},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(u,l){return u.start.row-l.start.row}),a},this.addFold=function(a,u){var l=this.$foldData,o=!1,c;a instanceof x?c=a:(c=new x(u,a),c.collapseChildren=u.collapseChildren),this.$clipRangeToDocument(c.range);var p=c.start.row,w=c.start.column,b=c.end.row,L=c.end.column,M=this.getFoldAt(p,w,1),k=this.getFoldAt(b,L,-1);if(M&&k==M)return M.addSubFold(c);M&&!M.range.isStart(p,w)&&this.removeFold(M),k&&!k.range.isEnd(b,L)&&this.removeFold(k);var C=this.getFoldsInRange(c.range);C.length>0&&(this.removeFolds(C),c.collapseChildren||C.forEach(function(I){c.addSubFold(I)}));for(var R=0;R<l.length;R++){var O=l[R];if(b==O.start.row){O.addFold(c),o=!0;break}else if(p==O.end.row){if(O.addFold(c),o=!0,!c.sameRow){var E=l[R+1];if(E&&E.start.row==b){O.merge(E);break}}break}else if(b<=O.start.row)break}return o||(O=this.$addFoldLine(new y(this.$foldData,c))),this.$useWrapMode?this.$updateWrapData(O.start.row,O.start.row):this.$updateRowLengthCache(O.start.row,O.start.row),this.$modified=!0,this._signal("changeFold",{data:c,action:"add"}),c},this.addFolds=function(a){a.forEach(function(u){this.addFold(u)},this)},this.removeFold=function(a){var u=a.foldLine,l=u.start.row,o=u.end.row,c=this.$foldData,p=u.folds;if(p.length==1)c.splice(c.indexOf(u),1);else if(u.range.isEnd(a.end.row,a.end.column))p.pop(),u.end.row=p[p.length-1].end.row,u.end.column=p[p.length-1].end.column;else if(u.range.isStart(a.start.row,a.start.column))p.shift(),u.start.row=p[0].start.row,u.start.column=p[0].start.column;else if(a.sameRow)p.splice(p.indexOf(a),1);else{var w=u.split(a.start.row,a.start.column);p=w.folds,p.shift(),w.start.row=p[0].start.row,w.start.column=p[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(l,o):this.$updateRowLengthCache(l,o)),this.$modified=!0,this._signal("changeFold",{data:a,action:"remove"})},this.removeFolds=function(a){for(var u=[],l=0;l<a.length;l++)u.push(a[l]);u.forEach(function(o){this.removeFold(o)},this),this.$modified=!0},this.expandFold=function(a){this.removeFold(a),a.subFolds.forEach(function(u){a.restoreRange(u),this.addFold(u)},this),a.collapseChildren>0&&this.foldAll(a.start.row+1,a.end.row,a.collapseChildren-1),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(u){this.expandFold(u)},this)},this.unfold=function(a,u){var l,o;if(a==null)l=new g(0,0,this.getLength(),0),u==null&&(u=!0);else if(typeof a=="number")l=new g(a,0,a,this.getLine(a).length);else if("row"in a)l=g.fromPoints(a,a);else{if(Array.isArray(a))return o=[],a.forEach(function(p){o=o.concat(this.unfold(p))},this),o;l=a}o=this.getFoldsInRangeList(l);for(var c=o;o.length==1&&g.comparePoints(o[0].start,l.start)<0&&g.comparePoints(o[0].end,l.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(l);if(u!=!1?this.removeFolds(o):this.expandFolds(o),c.length)return c},this.isRowFolded=function(a,u){return!!this.getFoldLine(a,u)},this.getRowFoldEnd=function(a,u){var l=this.getFoldLine(a,u);return l?l.end.row:a},this.getRowFoldStart=function(a,u){var l=this.getFoldLine(a,u);return l?l.start.row:a},this.getFoldDisplayLine=function(a,u,l,o,c){o==null&&(o=a.start.row),c==null&&(c=0),u==null&&(u=a.end.row),l==null&&(l=this.getLine(u).length);var p=this.doc,w="";return a.walk(function(b,L,M,k){if(!(L<o)){if(L==o){if(M<c)return;k=Math.max(c,k)}b!=null?w+=b:w+=p.getLine(L).substring(k,M)}},u,l),w},this.getDisplayLine=function(a,u,l,o){var c=this.getFoldLine(a);if(c)return this.getFoldDisplayLine(c,a,u,l,o);var p;return p=this.doc.getLine(a),p.substring(o||0,u||p.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(u){var l=u.folds.map(function(o){return o.clone()});return new y(a,l)}),a},this.toggleFold=function(a){var u=this.selection,l=u.getRange(),o,c;if(l.isEmpty()){var p=l.start;if(o=this.getFoldAt(p.row,p.column),o){this.expandFold(o);return}else if(a){var w=this.getFoldLine(p.row);w&&this.expandFolds(w.folds);return}else(c=this.findMatchingBracket(p))?l.comparePoint(c)==1?l.end=c:(l.start=c,l.start.column++,l.end.column--):(c=this.findMatchingBracket({row:p.row,column:p.column+1}))?(l.comparePoint(c)==1?l.end=c:l.start=c,l.start.column++):l=this.getCommentFoldRange(p.row,p.column)||l}else{var b=this.getFoldsInRange(l);if(a&&b.length){this.expandFolds(b);return}else b.length==1&&(o=b[0])}if(o||(o=this.getFoldAt(l.start.row,l.start.column)),o&&o.range.toString()==l.toString()){this.expandFold(o);return}var L="...";if(!l.isMultiLine()){if(L=this.getTextRange(l),L.length<4)return;L=L.trim().substring(0,2)+".."}this.addFold(L,l)},this.getCommentFoldRange=function(a,u,l){var o=new h(this,a,u),c=o.getCurrentToken(),p=c&&c.type;if(c&&/^comment|string/.test(p)){p=p.match(/comment|string/)[0],p=="comment"&&(p+="|doc-start|\\.doc");var w=new RegExp(p),b=new g;if(l!=1){do c=o.stepBackward();while(c&&w.test(c.type));c=o.stepForward()}b.start.row=o.getCurrentTokenRow(),b.start.column=o.getCurrentTokenColumn()+c.value.length,o=new h(this,a,u);var L=this.getState(o.$row);if(l!=-1){var M=-1;do if(c=o.stepForward(),M==-1){var k=this.getState(o.$row);L.toString()!==k.toString()&&(M=o.$row)}else if(o.$row>M)break;while(c&&w.test(c.type));c=o.stepBackward()}else c=o.getCurrentToken();return b.end.row=o.getCurrentTokenRow(),b.end.column=o.getCurrentTokenColumn(),b.start.row==b.end.row&&b.start.column>b.end.column?void 0:b}},this.foldAll=function(a,u,l,o){l==null&&(l=1e5);var c=this.foldWidgets;if(c){u=u||this.getLength(),a=a||0;for(var p=a;p<u;p++)if(c[p]==null&&(c[p]=this.getFoldWidget(p)),c[p]=="start"&&!(o&&!o(p))){var w=this.getFoldWidgetRange(p);w&&w.isMultiLine()&&w.end.row<=u&&w.start.row>=a&&(p=w.end.row,w.collapseChildren=l,this.addFold("...",w))}}},this.foldToLevel=function(a){for(this.foldAll();a-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var a=this;this.foldAll(null,null,null,function(u){for(var l=a.getTokens(u),o=0;o<l.length;o++){var c=l[o];if(!(c.type=="text"&&/^\s+$/.test(c.value)))return!!/comment/.test(c.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(a){if(!this.$foldStyles[a])throw new Error("invalid fold style: "+a+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=a){this.$foldStyle=a,a=="manual"&&this.unfold();var u=this.$foldMode;this.$setFolding(null),this.$setFolding(u)}},this.$setFolding=function(a){if(this.$foldMode!=a){if(this.$foldMode=a,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!a||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=a.getFoldWidget.bind(a,this,this.$foldStyle),this.getFoldWidgetRange=a.getFoldWidgetRange.bind(a,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(a,u){var l=this.foldWidgets;if(!l||u&&l[a])return{};for(var o=a-1,c;o>=0;){var p=l[o];if(p==null&&(p=l[o]=this.getFoldWidget(o)),p=="start"){var w=this.getFoldWidgetRange(o);if(c||(c=w),w&&w.end.row>=a)break}o--}return{range:o!==-1&&w,firstRange:c}},this.onFoldWidgetClick=function(a,u){u instanceof d&&(u=u.domEvent);var l={children:u.shiftKey,all:u.ctrlKey||u.metaKey,siblings:u.altKey},o=this.$toggleFoldWidget(a,l);if(!o){var c=u.target||u.srcElement;c&&/ace_fold-widget/.test(c.className)&&(c.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,u){if(this.getFoldWidget){var l=this.getFoldWidget(a),o=this.getLine(a),c=l==="end"?-1:1,p=this.getFoldAt(a,c===-1?0:o.length,c);if(p)return u.children||u.all?this.removeFold(p):this.expandFold(p),p;var w=this.getFoldWidgetRange(a,!0);if(w&&!w.isMultiLine()&&(p=this.getFoldAt(w.start.row,w.start.column,1),p&&w.isEqual(p.range)))return this.removeFold(p),p;if(u.siblings){var b=this.getParentFoldRangeData(a);if(b.range)var L=b.range.start.row+1,M=b.range.end.row;this.foldAll(L,M,u.all?1e4:0)}else u.children?(M=w?w.end.row:this.getLength(),this.foldAll(a+1,M,u.all?1e4:0)):w&&(u.all&&(w.collapseChildren=1e4),this.addFold("...",w));return w}},this.toggleFoldWidget=function(a){var u=this.selection.getCursor().row;u=this.getRowFoldStart(u);var l=this.$toggleFoldWidget(u,{});if(!l){var o=this.getParentFoldRangeData(u,!0);if(l=o.range||o.firstRange,l){u=l.start.row;var c=this.getFoldAt(u,this.getLine(u).length,1);c?this.removeFold(c):this.addFold("...",l)}}},this.updateFoldWidgets=function(a){var u=a.start.row,l=a.end.row-u;if(l===0)this.foldWidgets[u]=null;else if(a.action=="remove")this.foldWidgets.splice(u,l+1,null);else{var o=Array(l+1);o.unshift(u,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},this.tokenizerUpdateFoldWidgets=function(a){var u=a.data;u.first!=u.last&&this.foldWidgets.length>u.first&&this.foldWidgets.splice(u.first,this.foldWidgets.length)}}r.Folding=s}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,r,m){var g=e("../token_iterator").TokenIterator,y=e("../range").Range;function x(){this.findMatchingBracket=function(h,d){if(h.column==0)return null;var s=d||this.getLine(h.row).charAt(h.column-1);if(s=="")return null;var a=s.match(/([\(\[\{])|([\)\]\}])/);return a?a[1]?this.$findClosingBracket(a[1],h):this.$findOpeningBracket(a[2],h):null},this.getBracketRange=function(h){var d=this.getLine(h.row),s=!0,a,u=d.charAt(h.column-1),l=u&&u.match(/([\(\[\{])|([\)\]\}])/);if(l||(u=d.charAt(h.column),h={row:h.row,column:h.column+1},l=u&&u.match(/([\(\[\{])|([\)\]\}])/),s=!1),!l)return null;if(l[1]){var o=this.$findClosingBracket(l[1],h);if(!o)return null;a=y.fromPoints(h,o),s||(a.end.column++,a.start.column--),a.cursor=a.end}else{var o=this.$findOpeningBracket(l[2],h);if(!o)return null;a=y.fromPoints(o,h),s||(a.start.column++,a.end.column--),a.cursor=a.start}return a},this.getMatchingBracketRanges=function(h,d){var s=this.getLine(h.row),a=/([\(\[\{])|([\)\]\}])/,u=!d&&s.charAt(h.column-1),l=u&&u.match(a);if(l||(u=(d===void 0||d)&&s.charAt(h.column),h={row:h.row,column:h.column+1},l=u&&u.match(a)),!l)return null;var o=new y(h.row,h.column-1,h.row,h.column),c=l[1]?this.$findClosingBracket(l[1],h):this.$findOpeningBracket(l[2],h);if(!c)return[o];var p=new y(c.row,c.column,c.row,c.column+1);return[o,p]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(h,d,s){var a=this.$brackets[h],u=1,l=new g(this,d.row,d.column),o=l.getCurrentToken();if(o||(o=l.stepForward()),!!o){s||(s=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var c=d.column-l.getCurrentTokenColumn()-2,p=o.value;;){for(;c>=0;){var w=p.charAt(c);if(w==a){if(u-=1,u==0)return{row:l.getCurrentTokenRow(),column:c+l.getCurrentTokenColumn()}}else w==h&&(u+=1);c-=1}do o=l.stepBackward();while(o&&!s.test(o.type));if(o==null)break;p=o.value,c=p.length-1}return null}},this.$findClosingBracket=function(h,d,s){var a=this.$brackets[h],u=1,l=new g(this,d.row,d.column),o=l.getCurrentToken();if(o||(o=l.stepForward()),!!o){s||(s=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var c=d.column-l.getCurrentTokenColumn();;){for(var p=o.value,w=p.length;c<w;){var b=p.charAt(c);if(b==a){if(u-=1,u==0)return{row:l.getCurrentTokenRow(),column:c+l.getCurrentTokenColumn()}}else b==h&&(u+=1);c+=1}do o=l.stepForward();while(o&&!s.test(o.type));if(o==null)break;c=0}return null}},this.getMatchingTags=function(h){var d=new g(this,h.row,h.column),s=this.$findTagName(d);if(s){var a=d.stepBackward();return a.value==="<"?this.$findClosingTag(d,s):this.$findOpeningTag(d,s)}},this.$findTagName=function(h){var d=h.getCurrentToken(),s=!1,a=!1;if(d&&d.type.indexOf("tag-name")===-1)do a?d=h.stepBackward():d=h.stepForward(),d&&(d.value==="/>"?a=!0:d.type.indexOf("tag-name")!==-1&&(s=!0));while(d&&!s);return d},this.$findClosingTag=function(h,d){var s,a=d.value,u=d.value,l=0,o=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);d=h.stepForward();var c=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+d.value.length),p=!1;do{if(s=d,s.type.indexOf("tag-close")!==-1&&!p){var w=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);p=!0}if(d=h.stepForward(),d){if(d.value===">"&&!p){var w=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);p=!0}if(d.type.indexOf("tag-name")!==-1){if(a=d.value,u===a){if(s.value==="<")l++;else if(s.value==="</"&&(l--,l<0)){h.stepBackward();var b=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2);d=h.stepForward();var L=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+d.value.length);if(d.type.indexOf("tag-close")===-1&&(d=h.stepForward()),d&&d.value===">")var M=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);else return}}}else if(u===a&&d.value==="/>"&&(l--,l<0))var b=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2),L=b,M=L,w=new y(c.end.row,c.end.column,c.end.row,c.end.column+1)}}while(d&&l>=0);if(o&&w&&b&&M&&c&&L)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,M.end.row,M.end.column),openTagName:c,closeTagName:L}},this.$findOpeningTag=function(h,d){var s=h.getCurrentToken(),a=d.value,u=0,l=h.getCurrentTokenRow(),o=h.getCurrentTokenColumn(),c=o+2,p=new y(l,o,l,c);h.stepForward();var w=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+d.value.length);if(d.type.indexOf("tag-close")===-1&&(d=h.stepForward()),!(!d||d.value!==">")){var b=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);h.stepBackward(),h.stepBackward();do if(d=s,l=h.getCurrentTokenRow(),o=h.getCurrentTokenColumn(),c=o+d.value.length,s=h.stepBackward(),d){if(d.type.indexOf("tag-name")!==-1){if(a===d.value)if(s.value==="<"){if(u++,u>0){var L=new y(l,o,l,c),M=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);do d=h.stepForward();while(d&&d.value!==">");var k=new y(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1)}}else s.value==="</"&&u--}else if(d.value==="/>"){for(var C=0,R=s;R;){if(R.type.indexOf("tag-name")!==-1&&R.value===a){u--;break}else if(R.value==="<")break;R=h.stepBackward(),C++}for(var O=0;O<C;O++)h.stepForward()}}while(s&&u<=0);if(M&&k&&p&&b&&L&&w)return{openTag:new y(M.start.row,M.start.column,k.end.row,k.end.column),closeTag:new y(p.start.row,p.start.column,b.end.row,b.end.column),openTagName:L,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,m){var g=e("./lib/oop"),y=e("./lib/lang"),x=e("./bidihandler").BidiHandler,h=e("./config"),d=e("./lib/event_emitter").EventEmitter,s=e("./selection").Selection,a=e("./mode/text").Mode,u=e("./range").Range,l=e("./line_widgets").LineWidgets,o=e("./document").Document,c=e("./background_tokenizer").BackgroundTokenizer,p=e("./search_highlight").SearchHighlight,w=e("./undomanager").UndoManager,b=(function(){function P(N,_){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++P.$uid,this.$foldData.toString=function(){return this.join(`
|
197
|
+
`)},this.$gutterCustomWidgets={},this.bgTokenizer=new c(new a().getTokenizer(),this);var S=this;this.bgTokenizer.on("update",function(D){S._signal("tokenizerUpdate",D)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof N!="object"||!N.getLine)&&(N=new o(N)),this.setDocument(N),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(_),h._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return P.prototype.$initOperationListeners=function(){var N=this;this.curOp=null,this.on("change",function(){N.curOp||(N.startOperation(),N.curOp.selectionBefore=N.$lastSel),N.curOp.docChanged=!0},!0),this.on("changeSelection",function(){N.curOp||(N.startOperation(),N.curOp.selectionBefore=N.$lastSel),N.curOp.selectionChanged=!0},!0),this.$operationResetTimer=y.delayedCall(this.endOperation.bind(this,!0))},P.prototype.startOperation=function(N){if(this.curOp){if(!N||this.curOp.command)return;this.prevOp=this.curOp}N||(N={}),this.$operationResetTimer.schedule(),this.curOp={command:N.command||{},args:N.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",N)},P.prototype.endOperation=function(N){if(this.curOp){if(N&&N.returnValue===!1){this.curOp=null,this._signal("endOperation",N);return}if(N==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var _=this.selection.toJSON();this.curOp.selectionAfter=_,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(_),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",N)}},P.prototype.setDocument=function(N){this.doc&&this.doc.off("change",this.$onChange),this.doc=N,N.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 N=new l(this);return this.widgetManager=N,this.$editor&&N.attach(this.$editor),N},set:function(N){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:N})},enumerable:!1,configurable:!0}),P.prototype.$resetRowCache=function(N){if(!N){this.$docRowCache=[],this.$screenRowCache=[];return}var _=this.$docRowCache.length,S=this.$getRowCacheIndex(this.$docRowCache,N)+1;_>S&&(this.$docRowCache.splice(S,_),this.$screenRowCache.splice(S,_))},P.prototype.$getRowCacheIndex=function(N,_){for(var S=0,D=N.length-1;S<=D;){var j=S+D>>1,U=N[j];if(_>U)S=j+1;else if(_<U)D=j-1;else return j}return S-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(N){var _=N.data;this.$resetRowCache(_.start.row)},P.prototype.onChange=function(N){this.$modified=!0,this.$bidiHandler.onChange(N),this.$resetRowCache(N.start.row);var _=this.$updateInternalDataOnChange(N);!this.$fromUndo&&this.$undoManager&&(_&&_.length&&(this.$undoManager.add({action:"removeFolds",folds:_},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(N,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(N),this._signal("change",N)},P.prototype.onSelectionChange=function(){this._signal("changeSelection")},P.prototype.setValue=function(N){this.doc.setValue(N),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},P.fromJSON=function(N){typeof N=="string"&&(N=JSON.parse(N));var _=new w;_.$undoStack=N.history.undo,_.$redoStack=N.history.redo,_.mark=N.history.mark,_.$rev=N.history.rev;var S=new P(N.value);return N.folds.forEach(function(D){S.addFold("...",u.fromPoints(D.start,D.end))}),S.setAnnotations(N.annotations),S.setBreakpoints(N.breakpoints),S.setMode(N.mode),S.setScrollLeft(N.scrollLeft),S.setScrollTop(N.scrollTop),S.setUndoManager(_),S.selection.fromJSON(N.selection),S},P.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(N){return N.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(N){return this.bgTokenizer.getState(N)},P.prototype.getTokens=function(N){return this.bgTokenizer.getTokens(N)},P.prototype.getTokenAt=function(N,_){var S=this.bgTokenizer.getTokens(N),D,j=0;if(_==null){var U=S.length-1;j=this.getLine(N).length}else for(var U=0;U<S.length&&(j+=S[U].value.length,!(j>=_));U++);return D=S[U],D?(D.index=U,D.start=j-D.value.length,D):null},P.prototype.setUndoManager=function(N){if(this.$undoManager=N,this.$informUndoManager&&this.$informUndoManager.cancel(),N){var _=this;N.addSession(this),this.$syncInformUndoManager=function(){_.$informUndoManager.cancel(),_.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(N){this.setOption("useSoftTabs",N)},P.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},P.prototype.setTabSize=function(N){this.setOption("tabSize",N)},P.prototype.getTabSize=function(){return this.$tabSize},P.prototype.isTabStop=function(N){return this.$useSoftTabs&&N.column%this.$tabSize===0},P.prototype.setNavigateWithinSoftTabs=function(N){this.setOption("navigateWithinSoftTabs",N)},P.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},P.prototype.setOverwrite=function(N){this.setOption("overwrite",N)},P.prototype.getOverwrite=function(){return this.$overwrite},P.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},P.prototype.addGutterDecoration=function(N,_){this.$decorations[N]||(this.$decorations[N]=""),this.$decorations[N]+=" "+_,this._signal("changeBreakpoint",{})},P.prototype.removeGutterCustomWidget=function(N){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(N)},P.prototype.addGutterCustomWidget=function(N,_){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(N,_)},P.prototype.removeGutterDecoration=function(N,_){this.$decorations[N]=(this.$decorations[N]||"").replace(" "+_,""),this._signal("changeBreakpoint",{})},P.prototype.getBreakpoints=function(){return this.$breakpoints},P.prototype.setBreakpoints=function(N){this.$breakpoints=[];for(var _=0;_<N.length;_++)this.$breakpoints[N[_]]="ace_breakpoint";this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},P.prototype.setBreakpoint=function(N,_){_===void 0&&(_="ace_breakpoint"),_?this.$breakpoints[N]=_:delete this.$breakpoints[N],this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoint=function(N){delete this.$breakpoints[N],this._signal("changeBreakpoint",{})},P.prototype.addMarker=function(N,_,S,D){var j=this.$markerId++,U={range:N,type:S||"line",renderer:typeof S=="function"?S:null,clazz:_,inFront:!!D,id:j};return D?(this.$frontMarkers[j]=U,this._signal("changeFrontMarker")):(this.$backMarkers[j]=U,this._signal("changeBackMarker")),j},P.prototype.addDynamicMarker=function(N,_){if(N.update){var S=this.$markerId++;return N.id=S,N.inFront=!!_,_?(this.$frontMarkers[S]=N,this._signal("changeFrontMarker")):(this.$backMarkers[S]=N,this._signal("changeBackMarker")),N}},P.prototype.removeMarker=function(N){var _=this.$frontMarkers[N]||this.$backMarkers[N];if(_){var S=_.inFront?this.$frontMarkers:this.$backMarkers;delete S[N],this._signal(_.inFront?"changeFrontMarker":"changeBackMarker")}},P.prototype.getMarkers=function(N){return N?this.$frontMarkers:this.$backMarkers},P.prototype.highlight=function(N){if(!this.$searchHighlight){var _=new p(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(_)}this.$searchHighlight.setRegexp(N)},P.prototype.highlightLines=function(N,_,S,D){typeof _!="number"&&(S=_,_=N),S||(S="ace_step");var j=new u(N,0,_,1/0);return j.id=this.addMarker(j,S,"fullLine",D),j},P.prototype.setAnnotations=function(N){this.$annotations=N,this._signal("changeAnnotation",{})},P.prototype.getAnnotations=function(){return this.$annotations||[]},P.prototype.clearAnnotations=function(){this.setAnnotations([])},P.prototype.$detectNewLine=function(N){var _=N.match(/^.*?(\r?\n)/m);_?this.$autoNewLine=_[1]:this.$autoNewLine=`
|
198
|
+
`},P.prototype.getWordRange=function(N,_){var S=this.getLine(N),D=!1;if(_>0&&(D=!!S.charAt(_-1).match(this.tokenRe)),D||(D=!!S.charAt(_).match(this.tokenRe)),D)var j=this.tokenRe;else if(/^\s+$/.test(S.slice(_-1,_+1)))var j=/\s/;else var j=this.nonTokenRe;var U=_;if(U>0){do U--;while(U>=0&&S.charAt(U).match(j));U++}for(var q=_;q<S.length&&S.charAt(q).match(j);)q++;return new u(N,U,N,q)},P.prototype.getAWordRange=function(N,_){for(var S=this.getWordRange(N,_),D=this.getLine(S.end.row);D.charAt(S.end.column).match(/[ \t]/);)S.end.column+=1;return S},P.prototype.setNewLineMode=function(N){this.doc.setNewLineMode(N)},P.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},P.prototype.setUseWorker=function(N){this.setOption("useWorker",N)},P.prototype.getUseWorker=function(){return this.$useWorker},P.prototype.onReloadTokenizer=function(N){var _=N.data;this.bgTokenizer.start(_.first),this._signal("tokenizerUpdate",N)},P.prototype.setMode=function(N,_){if(N&&typeof N=="object"){if(N.getTokenizer)return this.$onChangeMode(N);var S=N,D=S.path}else D=N||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a),this.$modes[D]&&!S){this.$onChangeMode(this.$modes[D]),_&&_();return}this.$modeId=D,h.loadModule(["mode",D],(function(j){if(!this.destroyed){if(this.$modeId!==D)return _&&_();this.$modes[D]&&!S?this.$onChangeMode(this.$modes[D]):j&&j.Mode&&(j=new j.Mode(S),S||(this.$modes[D]=j,j.$id=D),this.$onChangeMode(j)),_&&_()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},P.prototype.$onChangeMode=function(N,_){if(_||(this.$modeId=N.$id),this.$mode!==N){var S=this.$mode;this.$mode=N,this.$stopWorker(),this.$useWorker&&this.$startWorker();var D=N.getTokenizer();if(D.on!==void 0){var j=this.onReloadTokenizer.bind(this);D.on("update",j)}this.bgTokenizer.setTokenizer(D),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=N.tokenRe,this.nonTokenRe=N.nonTokenRe,_||(N.attachToSession&&N.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(N.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:S,mode:N}))}},P.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},P.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(N){h.warn("Could not load worker",N),this.$worker=null}},P.prototype.getMode=function(){return this.$mode},P.prototype.setScrollTop=function(N){this.$scrollTop===N||isNaN(N)||(this.$scrollTop=N,this._signal("changeScrollTop",N))},P.prototype.getScrollTop=function(){return this.$scrollTop},P.prototype.setScrollLeft=function(N){this.$scrollLeft===N||isNaN(N)||(this.$scrollLeft=N,this._signal("changeScrollLeft",N))},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 N=0;return this.lineWidgets.forEach(function(_){_&&_.screenWidth>N&&(N=_.screenWidth)}),this.lineWidgetWidth=N},P.prototype.$computeWidth=function(N){if(this.$modified||N){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var _=this.doc.getAllLines(),S=this.$rowLengthCache,D=0,j=0,U=this.$foldData[j],q=U?U.start.row:1/0,Z=_.length,te=0;te<Z;te++){if(te>q){if(te=U.end.row+1,te>=Z)break;U=this.$foldData[j++],q=U?U.start.row:1/0}S[te]==null&&(S[te]=this.$getStringScreenWidth(_[te])[0]),S[te]>D&&(D=S[te])}this.screenWidth=D}},P.prototype.getLine=function(N){return this.doc.getLine(N)},P.prototype.getLines=function(N,_){return this.doc.getLines(N,_)},P.prototype.getLength=function(){return this.doc.getLength()},P.prototype.getTextRange=function(N){return this.doc.getTextRange(N||this.selection.getRange())},P.prototype.insert=function(N,_){return this.doc.insert(N,_)},P.prototype.remove=function(N){return this.doc.remove(N)},P.prototype.removeFullLines=function(N,_){return this.doc.removeFullLines(N,_)},P.prototype.undoChanges=function(N,_){if(N.length){this.$fromUndo=!0;for(var S=N.length-1;S!=-1;S--){var D=N[S];D.action=="insert"||D.action=="remove"?this.doc.revertDelta(D):D.folds&&this.addFolds(D.folds)}!_&&this.$undoSelect&&(N.selectionBefore?this.selection.fromJSON(N.selectionBefore):this.selection.setRange(this.$getUndoSelection(N,!0))),this.$fromUndo=!1}},P.prototype.redoChanges=function(N,_){if(N.length){this.$fromUndo=!0;for(var S=0;S<N.length;S++){var D=N[S];(D.action=="insert"||D.action=="remove")&&this.doc.$safeApplyDelta(D)}!_&&this.$undoSelect&&(N.selectionAfter?this.selection.fromJSON(N.selectionAfter):this.selection.setRange(this.$getUndoSelection(N,!1))),this.$fromUndo=!1}},P.prototype.setUndoSelect=function(N){this.$undoSelect=N},P.prototype.$getUndoSelection=function(N,_){function S(Z){return _?Z.action!=="insert":Z.action==="insert"}for(var D,j,U=0;U<N.length;U++){var q=N[U];if(q.start){if(!D){S(q)?D=u.fromPoints(q.start,q.end):D=u.fromPoints(q.start,q.start);continue}S(q)?(j=q.start,D.compare(j.row,j.column)==-1&&D.setStart(j),j=q.end,D.compare(j.row,j.column)==1&&D.setEnd(j)):(j=q.start,D.compare(j.row,j.column)==-1&&(D=u.fromPoints(q.start,q.start)))}}return D},P.prototype.replace=function(N,_){return this.doc.replace(N,_)},P.prototype.moveText=function(N,_,S){var D=this.getTextRange(N),j=this.getFoldsInRange(N),U=u.fromPoints(_,_);if(!S){this.remove(N);var q=N.start.row-N.end.row,Z=q?-N.end.column:N.start.column-N.end.column;Z&&(U.start.row==N.end.row&&U.start.column>N.end.column&&(U.start.column+=Z),U.end.row==N.end.row&&U.end.column>N.end.column&&(U.end.column+=Z)),q&&U.start.row>=N.end.row&&(U.start.row+=q,U.end.row+=q)}if(U.end=this.insert(U.start,D),j.length){var te=N.start,he=U.start,q=he.row-te.row,Z=he.column-te.column;this.addFolds(j.map(function(ue){return ue=ue.clone(),ue.start.row==te.row&&(ue.start.column+=Z),ue.end.row==te.row&&(ue.end.column+=Z),ue.start.row+=q,ue.end.row+=q,ue}))}return U},P.prototype.indentRows=function(N,_,S){S=S.replace(/\t/g,this.getTabString());for(var D=N;D<=_;D++)this.doc.insertInLine({row:D,column:0},S)},P.prototype.outdentRows=function(N){for(var _=N.collapseRows(),S=new u(0,0,0,0),D=this.getTabSize(),j=_.start.row;j<=_.end.row;++j){var U=this.getLine(j);S.start.row=j,S.end.row=j;for(var q=0;q<D&&U.charAt(q)==" ";++q);q<D&&U.charAt(q)==" "?(S.start.column=q,S.end.column=q+1):(S.start.column=0,S.end.column=q),this.remove(S)}},P.prototype.$moveLines=function(N,_,S){if(N=this.getRowFoldStart(N),_=this.getRowFoldEnd(_),S<0){var D=this.getRowFoldStart(N+S);if(D<0)return 0;var j=D-N}else if(S>0){var D=this.getRowFoldEnd(_+S);if(D>this.doc.getLength()-1)return 0;var j=D-_}else{N=this.$clipRowToDocument(N),_=this.$clipRowToDocument(_);var j=_-N+1}var U=new u(N,0,_,Number.MAX_VALUE),q=this.getFoldsInRange(U).map(function(te){return te=te.clone(),te.start.row+=j,te.end.row+=j,te}),Z=S==0?this.doc.getLines(N,_):this.doc.removeFullLines(N,_);return this.doc.insertFullLines(N+j,Z),q.length&&this.addFolds(q),j},P.prototype.moveLinesUp=function(N,_){return this.$moveLines(N,_,-1)},P.prototype.moveLinesDown=function(N,_){return this.$moveLines(N,_,1)},P.prototype.duplicateLines=function(N,_){return this.$moveLines(N,_,0)},P.prototype.$clipRowToDocument=function(N){return Math.max(0,Math.min(N,this.doc.getLength()-1))},P.prototype.$clipColumnToRow=function(N,_){return _<0?0:Math.min(this.doc.getLine(N).length,_)},P.prototype.$clipPositionToDocument=function(N,_){if(_=Math.max(0,_),N<0)N=0,_=0;else{var S=this.doc.getLength();N>=S?(N=S-1,_=this.doc.getLine(S-1).length):_=Math.min(this.doc.getLine(N).length,_)}return{row:N,column:_}},P.prototype.$clipRangeToDocument=function(N){N.start.row<0?(N.start.row=0,N.start.column=0):N.start.column=this.$clipColumnToRow(N.start.row,N.start.column);var _=this.doc.getLength()-1;return N.end.row>_?(N.end.row=_,N.end.column=this.doc.getLine(_).length):N.end.column=this.$clipColumnToRow(N.end.row,N.end.column),N},P.prototype.setUseWrapMode=function(N){if(N!=this.$useWrapMode){if(this.$useWrapMode=N,this.$modified=!0,this.$resetRowCache(0),N){var _=this.getLength();this.$wrapData=Array(_),this.$updateWrapData(0,_-1)}this._signal("changeWrapMode")}},P.prototype.getUseWrapMode=function(){return this.$useWrapMode},P.prototype.setWrapLimitRange=function(N,_){(this.$wrapLimitRange.min!==N||this.$wrapLimitRange.max!==_)&&(this.$wrapLimitRange={min:N,max:_},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},P.prototype.adjustWrapLimit=function(N,_){var S=this.$wrapLimitRange;S.max<0&&(S={min:_,max:_});var D=this.$constrainWrapLimit(N,S.min,S.max);return D!=this.$wrapLimit&&D>1?(this.$wrapLimit=D,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},P.prototype.$constrainWrapLimit=function(N,_,S){return _&&(N=Math.max(_,N)),S&&(N=Math.min(S,N)),N},P.prototype.getWrapLimit=function(){return this.$wrapLimit},P.prototype.setWrapLimit=function(N){this.setWrapLimitRange(N,N)},P.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},P.prototype.$updateInternalDataOnChange=function(N){var _=this.$useWrapMode,S=N.action,D=N.start,j=N.end,U=D.row,q=j.row,Z=q-U,te=null;if(this.$updating=!0,Z!=0)if(S==="remove"){this[_?"$wrapData":"$rowLengthCache"].splice(U,Z);var he=this.$foldData;te=this.getFoldsInRange(N),this.removeFolds(te);var ne=this.getFoldLine(j.row),le=0;if(ne){ne.addRemoveChars(j.row,j.column,D.column-j.column),ne.shiftRow(-Z);var ue=this.getFoldLine(U);ue&&ue!==ne&&(ue.merge(ne),ne=ue),le=he.indexOf(ne)+1}for(le;le<he.length;le++){var ne=he[le];ne.start.row>=j.row&&ne.shiftRow(-Z)}q=U}else{var ce=Array(Z);ce.unshift(U,0);var fe=_?this.$wrapData:this.$rowLengthCache;fe.splice.apply(fe,ce);var he=this.$foldData,ne=this.getFoldLine(U),le=0;if(ne){var _e=ne.range.compareInside(D.row,D.column);_e==0?(ne=ne.split(D.row,D.column),ne&&(ne.shiftRow(Z),ne.addRemoveChars(q,0,j.column-D.column))):_e==-1&&(ne.addRemoveChars(U,0,j.column-D.column),ne.shiftRow(Z)),le=he.indexOf(ne)+1}for(le;le<he.length;le++){var ne=he[le];ne.start.row>=U&&ne.shiftRow(Z)}}else{Z=Math.abs(N.start.column-N.end.column),S==="remove"&&(te=this.getFoldsInRange(N),this.removeFolds(te),Z=-Z);var ne=this.getFoldLine(U);ne&&ne.addRemoveChars(U,D.column,Z)}return _&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,_?this.$updateWrapData(U,q):this.$updateRowLengthCache(U,q),te},P.prototype.$updateRowLengthCache=function(N,_){this.$rowLengthCache[N]=null,this.$rowLengthCache[_]=null},P.prototype.$updateWrapData=function(N,_){var S=this.doc.getAllLines(),D=this.getTabSize(),j=this.$wrapData,U=this.$wrapLimit,q,Z,te=N;for(_=Math.min(_,S.length-1);te<=_;)Z=this.getFoldLine(te,Z),Z?(q=[],Z.walk((function(he,ne,le,ue){var ce;if(he!=null){ce=this.$getDisplayTokens(he,q.length),ce[0]=k;for(var fe=1;fe<ce.length;fe++)ce[fe]=C}else ce=this.$getDisplayTokens(S[ne].substring(ue,le),q.length);q=q.concat(ce)}).bind(this),Z.end.row,S[Z.end.row].length+1),j[Z.start.row]=this.$computeWrapSplits(q,U,D),te=Z.end.row+1):(q=this.$getDisplayTokens(S[te]),j[te]=this.$computeWrapSplits(q,U,D),te++)},P.prototype.$computeWrapSplits=function(N,_,S){if(N.length==0)return[];var D=[],j=N.length,U=0,q=0,Z=this.$wrapAsCode,te=this.$indentedSoftWrap,he=_<=Math.max(2*S,8)||te===!1?0:Math.floor(_/2);function ne(){var _e=0;if(he===0)return _e;if(te)for(var $e=0;$e<N.length;$e++){var Te=N[$e];if(Te==O)_e+=1;else if(Te==E)_e+=S;else{if(Te==I)continue;break}}return Z&&te!==!1&&(_e+=S),Math.min(_e,he)}function le(_e){for(var $e=_e-U,Te=U;Te<_e;Te++){var qe=N[Te];(qe===12||qe===2)&&($e-=1)}D.length||(ue=ne(),D.indent=ue),q+=$e,D.push(q),U=_e}for(var ue=0;j-U>_-ue;){var ce=U+_-ue;if(N[ce-1]>=O&&N[ce]>=O){le(ce);continue}if(N[ce]==k||N[ce]==C){for(ce;ce!=U-1&&N[ce]!=k;ce--);if(ce>U){le(ce);continue}for(ce=U+_,ce;ce<N.length&&N[ce]==C;ce++);if(ce==N.length)break;le(ce);continue}for(var fe=Math.max(ce-(_-(_>>2)),U-1);ce>fe&&N[ce]<k;)ce--;if(Z){for(;ce>fe&&N[ce]<k;)ce--;for(;ce>fe&&N[ce]==R;)ce--}else for(;ce>fe&&N[ce]<O;)ce--;if(ce>fe){le(++ce);continue}ce=U+_,N[ce]==M&&ce--,le(ce-ue)}return D},P.prototype.$getDisplayTokens=function(N,_){var S=[],D;_=_||0;for(var j=0;j<N.length;j++){var U=N.charCodeAt(j);if(U==9){D=this.getScreenTabSize(S.length+_),S.push(E);for(var q=1;q<D;q++)S.push(I)}else U==32?S.push(O):U>39&&U<48||U>57&&U<64?S.push(R):U>=4352&&z(U)?S.push(L,M):S.push(L)}return S},P.prototype.$getStringScreenWidth=function(N,_,S){if(_==0)return[0,0];_==null&&(_=1/0),S=S||0;var D,j;for(j=0;j<N.length&&(D=N.charCodeAt(j),D==9?S+=this.getScreenTabSize(S):D>=4352&&z(D)?S+=2:S+=1,!(S>_));j++);return[S,j]},P.prototype.getRowLength=function(N){var _=1;return this.lineWidgets&&(_+=this.lineWidgets[N]&&this.lineWidgets[N].rowCount||0),!this.$useWrapMode||!this.$wrapData[N]?_:this.$wrapData[N].length+_},P.prototype.getRowLineCount=function(N){return!this.$useWrapMode||!this.$wrapData[N]?1:this.$wrapData[N].length+1},P.prototype.getRowWrapIndent=function(N){if(this.$useWrapMode){var _=this.screenToDocumentPosition(N,Number.MAX_VALUE),S=this.$wrapData[_.row];return S.length&&S[0]<_.column?S.indent:0}else return 0},P.prototype.getScreenLastRowColumn=function(N){var _=this.screenToDocumentPosition(N,Number.MAX_VALUE);return this.documentToScreenColumn(_.row,_.column)},P.prototype.getDocumentLastRowColumn=function(N,_){var S=this.documentToScreenRow(N,_);return this.getScreenLastRowColumn(S)},P.prototype.getDocumentLastRowColumnPosition=function(N,_){var S=this.documentToScreenRow(N,_);return this.screenToDocumentPosition(S,Number.MAX_VALUE/10)},P.prototype.getRowSplitData=function(N){if(this.$useWrapMode)return this.$wrapData[N]},P.prototype.getScreenTabSize=function(N){return this.$tabSize-(N%this.$tabSize|0)},P.prototype.screenToDocumentRow=function(N,_){return this.screenToDocumentPosition(N,_).row},P.prototype.screenToDocumentColumn=function(N,_){return this.screenToDocumentPosition(N,_).column},P.prototype.screenToDocumentPosition=function(N,_,S){if(N<0)return{row:0,column:0};var D,le=0,j=0,U,ne=0,q=0,Z=this.$screenRowCache,te=this.$getRowCacheIndex(Z,N),he=Z.length;if(he&&te>=0)var ne=Z[te],le=this.$docRowCache[te],ue=N>Z[he-1];else var ue=!he;for(var ce=this.getLength()-1,fe=this.getNextFoldLine(le),_e=fe?fe.start.row:1/0;ne<=N&&(q=this.getRowLength(le),!(ne+q>N||le>=ce));)ne+=q,le++,le>_e&&(le=fe.end.row+1,fe=this.getNextFoldLine(le,fe),_e=fe?fe.start.row:1/0),ue&&(this.$docRowCache.push(le),this.$screenRowCache.push(ne));if(fe&&fe.start.row<=le)D=this.getFoldDisplayLine(fe),le=fe.start.row;else{if(ne+q<=N||le>ce)return{row:ce,column:this.getLine(ce).length};D=this.getLine(le),fe=null}var $e=0,Te=Math.floor(N-ne);if(this.$useWrapMode){var qe=this.$wrapData[le];qe&&(U=qe[Te],Te>0&&qe.length&&($e=qe.indent,j=qe[Te-1]||qe[qe.length-1],D=D.substring(j)))}return S!==void 0&&this.$bidiHandler.isBidiRow(ne+Te,le,Te)&&(_=this.$bidiHandler.offsetToCol(S)),j+=this.$getStringScreenWidth(D,_-$e)[1],this.$useWrapMode&&j>=U&&(j=U-1),fe?fe.idxToPosition(j):{row:le,column:j}},P.prototype.documentToScreenPosition=function(N,_){if(typeof _>"u")var S=this.$clipPositionToDocument(N.row,N.column);else S=this.$clipPositionToDocument(N,_);N=S.row,_=S.column;var ne=0,D=null,j=null;j=this.getFoldAt(N,_,1),j&&(N=j.start.row,_=j.start.column);var U,he=0,q=this.$docRowCache,Z=this.$getRowCacheIndex(q,N),te=q.length;if(te&&Z>=0)var he=q[Z],ne=this.$screenRowCache[Z],le=N>q[te-1];else var le=!te;for(var ue=this.getNextFoldLine(he),ce=ue?ue.start.row:1/0;he<N;){if(he>=ce){if(U=ue.end.row+1,U>N)break;ue=this.getNextFoldLine(U,ue),ce=ue?ue.start.row:1/0}else U=he+1;ne+=this.getRowLength(he),he=U,le&&(this.$docRowCache.push(he),this.$screenRowCache.push(ne))}var fe="";ue&&he>=ce?(fe=this.getFoldDisplayLine(ue,N,_),D=ue.start.row):(fe=this.getLine(N).substring(0,_),D=N);var _e=0;if(this.$useWrapMode){var $e=this.$wrapData[D];if($e){for(var Te=0;fe.length>=$e[Te];)ne++,Te++;fe=fe.substring($e[Te-1]||0,fe.length),_e=Te>0?$e.indent:0}}return this.lineWidgets&&this.lineWidgets[he]&&this.lineWidgets[he].rowsAbove&&(ne+=this.lineWidgets[he].rowsAbove),{row:ne,column:_e+this.$getStringScreenWidth(fe)[0]}},P.prototype.documentToScreenColumn=function(N,_){return this.documentToScreenPosition(N,_).column},P.prototype.documentToScreenRow=function(N,_){return this.documentToScreenPosition(N,_).row},P.prototype.getScreenLength=function(){var N=0,_=null;if(this.$useWrapMode)for(var S=this.$wrapData.length,D=0,j=0,_=this.$foldData[j++],U=_?_.start.row:1/0;D<S;){var q=this.$wrapData[D];N+=q?q.length+1:1,D++,D>U&&(D=_.end.row+1,_=this.$foldData[j++],U=_?_.start.row:1/0)}else{N=this.getLength();for(var Z=this.$foldData,j=0;j<Z.length;j++)_=Z[j],N-=_.end.row-_.start.row}return this.lineWidgets&&(N+=this.$getWidgetScreenLength()),N},P.prototype.$setFontMetrics=function(N){this.$enableVarChar&&(this.$getStringScreenWidth=function(_,S,D){if(S===0)return[0,0];S||(S=1/0),D=D||0;var j,U;for(U=0;U<_.length&&(j=_.charAt(U),j===" "?D+=this.getScreenTabSize(D):D+=N.getCharacterWidth(j),!(D>S));U++);return[D,U]})},P.prototype.getPrecedingCharacter=function(){var N=this.selection.getCursor();if(N.column===0)return N.row===0?"":this.doc.getNewLineCharacter();var _=this.getLine(N.row);return _[N.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=z,g.implement(b.prototype,d);var L=1,M=2,k=3,C=4,R=9,O=10,E=11,I=12;function z(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 N=typeof P=="number"?P:null;this.setWrapLimitRange(N,N),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,m){var g=e("./lib/lang"),y=e("./lib/oop"),x=e("./range").Range,h=(function(){function u(){this.$options={}}return u.prototype.set=function(l){return y.mixin(this.$options,l),this},u.prototype.getOptions=function(){return g.copyObject(this.$options)},u.prototype.setOptions=function(l){this.$options=l},u.prototype.find=function(l){var o=this.$options,c=this.$matchIterator(l,o);if(!c)return!1;var p=null;return c.forEach(function(w,b,L,M){return p=new x(w,b,L,M),b==M&&o.start&&o.start.start&&o.skipCurrent!=!1&&p.isEqual(o.start)?(p=null,!1):!0}),p},u.prototype.findAll=function(l){var o=this.$options;if(!o.needle)return[];this.$assembleRegExp(o);var c=o.range,p=c?l.getLines(c.start.row,c.end.row):l.doc.getAllLines(),w=[],b=o.re;if(o.$isMultiLine){var L=b.length,M=p.length-L,k;e:for(var C=b.offset||0;C<=M;C++){for(var R=0;R<L;R++)if(p[C+R].search(b[R])==-1)continue e;var O=p[C],E=p[C+L-1],I=O.length-O.match(b[0])[0].length,z=E.match(b[L-1])[0].length;k&&k.end.row===C&&k.end.column>I||(w.push(k=new x(C,I,C+L-1,z)),L>2&&(C=C+L-2))}}else for(var P,N=0;N<p.length;N++)if(this.$isMultilineSearch(o)){var _=p.length-1;if(P=this.$multiLineForward(l,b,N,_),P){var S=P.endRow<=_?P.endRow-1:_;S>N&&(N=S),w.push(new x(P.startRow,P.startCol,P.endRow,P.endCol))}}else{P=g.getMatchOffsets(p[N],b);for(var R=0;R<P.length;R++){var D=P[R];w.push(new x(N,D.offset,N,D.offset+D.length))}}if(c){for(var j=c.start.column,U=c.end.column,N=0,R=w.length-1;N<R&&w[N].start.column<j&&w[N].start.row==0;)N++;for(var q=c.end.row-c.start.row;N<R&&w[R].end.column>U&&w[R].end.row==q;)R--;for(w=w.slice(N,R+1),N=0,R=w.length;N<R;N++)w[N].start.row+=c.start.row,w[N].end.row+=c.start.row}return w},u.prototype.parseReplaceString=function(l){for(var o={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},c="",p=0,w=l.length;p<w;p++){var b=l.charCodeAt(p);if(b===o.Backslash){if(p++,p>=w){c+="\\";break}var L=l.charCodeAt(p);switch(L){case o.Backslash:c+="\\";break;case o.n:c+=`
|
199
|
+
`;break;case o.t:c+=" ";break}continue}if(b===o.DollarSign){if(p++,p>=w){c+="$";break}var M=l.charCodeAt(p);if(M===o.DollarSign){c+="$$";continue}if(M===o.Digit0||M===o.Ampersand){c+="$&";continue}if(o.Digit1<=M&&M<=o.Digit9){c+="$"+l[p];continue}}c+=l[p]}return c||l},u.prototype.replace=function(l,o){var c=this.$options,p=this.$assembleRegExp(c);if(c.$isMultiLine)return o;if(p){var w=this.$isMultilineSearch(c);w&&(l=l.replace(/\r\n|\r|\n/g,`
|
200
|
+
`));var b=p.exec(l);if(!b||!w&&b[0].length!=l.length)return null;if(o=c.regExp?this.parseReplaceString(o):o.replace(/\$/g,"$$$$"),o=l.replace(p,o),c.preserveCase){o=o.split("");for(var L=Math.min(l.length,l.length);L--;){var M=l[L];M&&M.toLowerCase()!=M?o[L]=o[L].toUpperCase():o[L]=o[L].toLowerCase()}o=o.join("")}return o}},u.prototype.$assembleRegExp=function(l,o){if(l.needle instanceof RegExp)return l.re=l.needle;var c=l.needle;if(!l.needle)return l.re=!1;l.regExp||(c=g.escapeRegExp(c));var p=l.caseSensitive?"gm":"gmi";try{new RegExp(c,"u"),l.$supportsUnicodeFlag=!0,p+="u"}catch{l.$supportsUnicodeFlag=!1}if(l.wholeWord&&(c=d(c,l)),l.$isMultiLine=!o&&/[\n\r]/.test(c),l.$isMultiLine)return l.re=this.$assembleMultilineRegExp(c,p);try{var w=new RegExp(c,p)}catch{w=!1}return l.re=w},u.prototype.$assembleMultilineRegExp=function(l,o){for(var c=l.replace(/\r\n|\r|\n/g,`$
|
201
|
+
^`).split(`
|
202
|
+
`),p=[],w=0;w<c.length;w++)try{p.push(new RegExp(c[w],o))}catch{return!1}return p},u.prototype.$isMultilineSearch=function(l){return l.re&&/\\r\\n|\\r|\\n/.test(l.re.source)&&l.regExp&&!l.$isMultiLine},u.prototype.$multiLineForward=function(l,o,c,p){for(var w,b=a(l,c),L=c;L<=p;){for(var M=0;M<b&&!(L>p);M++){var k=l.getLine(L++);w=w==null?k:w+`
|
203
|
+
`+k}var C=o.exec(w);if(o.lastIndex=0,C){var R=w.slice(0,C.index).split(`
|
204
|
+
`),O=C[0].split(`
|
205
|
+
`),E=c+R.length-1,I=R[R.length-1].length,z=E+O.length-1,P=O.length==1?I+O[0].length:O[O.length-1].length;return{startRow:E,startCol:I,endRow:z,endCol:P}}}return null},u.prototype.$multiLineBackward=function(l,o,c,p,w){for(var b,L=a(l,p),M=l.getLine(p).length-c,k=p;k>=w;){for(var C=0;C<L&&k>=w;C++){var R=l.getLine(k--);b=b==null?R:R+`
|
206
|
+
`+b}var O=s(b,o,M);if(O){var E=b.slice(0,O.index).split(`
|
207
|
+
`),I=O[0].split(`
|
208
|
+
`),z=k+E.length,P=E[E.length-1].length,N=z+I.length-1,_=I.length==1?P+I[0].length:I[I.length-1].length;return{startRow:z,startCol:P,endRow:N,endCol:_}}}return null},u.prototype.$matchIterator=function(l,o){var c=this.$assembleRegExp(o);if(!c)return!1;var p=this.$isMultilineSearch(o),w=this.$multiLineForward,b=this.$multiLineBackward,L=o.backwards==!0,M=o.skipCurrent!=!1,k=c.unicode,C=o.range,R=o.start;R||(R=C?C[L?"end":"start"]:l.selection.getRange()),R.start&&(R=R[M!=L?"end":"start"]);var O=C?C.start.row:0,E=C?C.end.row:l.getLength()-1;if(L)var I=function(N){var _=R.row;if(!P(_,R.column,N)){for(_--;_>=O;_--)if(P(_,Number.MAX_VALUE,N))return;if(o.wrap!=!1){for(_=E,O=R.row;_>=O;_--)if(P(_,Number.MAX_VALUE,N))return}}};else var I=function(N){var _=R.row;if(!P(_,R.column,N)){for(_=_+1;_<=E;_++)if(P(_,0,N))return;if(o.wrap!=!1){for(_=O,E=R.row;_<=E;_++)if(P(_,0,N))return}}};if(o.$isMultiLine)var z=c.length,P=function(N,_,S){var D=L?N-z+1:N;if(!(D<0||D+z>l.getLength())){var j=l.getLine(D),U=j.search(c[0]);if(!(!L&&U<_||U===-1)){for(var q=1;q<z;q++)if(j=l.getLine(D+q),j.search(c[q])==-1)return;var Z=j.match(c[z-1])[0].length;if(!(L&&Z>_)&&S(D,U,D+z-1,Z))return!0}}};else if(L)var P=function(N,_,S){if(p){var D=b(l,c,_,N,O);if(!D)return!1;if(S(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else{var j=l.getLine(N),U=[],q,Z=0;for(c.lastIndex=0;q=c.exec(j);){var te=q[0].length;if(Z=q.index,!te){if(Z>=j.length)break;c.lastIndex=Z+=g.skipEmptyMatch(j,Z,k)}if(q.index+te>_)break;U.push(q.index,te)}for(var he=U.length-1;he>=0;he-=2){var ne=U[he-1],te=U[he];if(S(N,ne,N,ne+te))return!0}}};else var P=function(N,_,S){if(c.lastIndex=_,p){var D=w(l,c,N,E);if(D){var j=D.endRow<=E?D.endRow-1:E;j>N&&(N=j)}if(!D)return!1;if(S(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else for(var U=l.getLine(N),q,Z;Z=c.exec(U);){var te=Z[0].length;if(q=Z.index,S(N,q,N,q+te))return!0;if(!te&&(c.lastIndex=q+=g.skipEmptyMatch(U,q,k),q>=U.length))return!1}};return{forEach:I}},u})();function d(u,l){var o=g.supportsLookbehind();function c(L,M){M===void 0&&(M=!0);var k=o&&l.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return k.test(L)||l.regExp?o&&l.$supportsUnicodeFlag?M?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var p=Array.from(u),w=p[0],b=p[p.length-1];return c(w)+u+c(b,!1)}function s(u,l,o){for(var c=null,p=0;p<=u.length;){l.lastIndex=p;var w=l.exec(u);if(!w)break;var b=w.index+w[0].length;if(b>u.length-o)break;(!c||b>c.index+c[0].length)&&(c=w),p=w.index+1}return c}function a(u,l){var o=5e3,c={row:l,column:0},p=u.doc.positionToIndex(c),w=p+o,b=u.doc.indexToPosition(w),L=b.row;return L+1}r.Search=h}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,m){var g=this&&this.__extends||(function(){var u=function(l,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,p){c.__proto__=p}||function(c,p){for(var w in p)Object.prototype.hasOwnProperty.call(p,w)&&(c[w]=p[w])},u(l,o)};return function(l,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(l,o);function c(){this.constructor=l}l.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)}})(),y=e("../lib/keys"),x=e("../lib/useragent"),h=y.KEY_MODS,d=(function(){function u(l,o){this.$init(l,o,!1)}return u.prototype.$init=function(l,o,c){this.platform=o||(x.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(l),this.$singleCommand=c},u.prototype.addCommand=function(l){this.commands[l.name]&&this.removeCommand(l),this.commands[l.name]=l,l.bindKey&&this._buildKeyHash(l)},u.prototype.removeCommand=function(l,o){var c=l&&(typeof l=="string"?l:l.name);l=this.commands[c],o||delete this.commands[c];var p=this.commandKeyBinding;for(var w in p){var b=p[w];if(b==l)delete p[w];else if(Array.isArray(b)){var L=b.indexOf(l);L!=-1&&(b.splice(L,1),b.length==1&&(p[w]=b[0]))}}},u.prototype.bindKey=function(l,o,c){if(typeof l=="object"&&l&&(c==null&&(c=l.position),l=l[this.platform]),!!l){if(typeof o=="function")return this.addCommand({exec:o,bindKey:l,name:o.name||l});l.split("|").forEach(function(p){var w="";if(p.indexOf(" ")!=-1){var b=p.split(/\s+/);p=b.pop(),b.forEach(function(k){var C=this.parseKeys(k),R=h[C.hashId]+C.key;w+=(w?" ":"")+R,this._addCommandToBinding(w,"chainKeys")},this),w+=" "}var L=this.parseKeys(p),M=h[L.hashId]+L.key;this._addCommandToBinding(w+M,o,c)},this)}},u.prototype._addCommandToBinding=function(l,o,c){var p=this.commandKeyBinding,w;if(!o)delete p[l];else if(!p[l]||this.$singleCommand)p[l]=o;else{Array.isArray(p[l])?(w=p[l].indexOf(o))!=-1&&p[l].splice(w,1):p[l]=[p[l]],typeof c!="number"&&(c=s(o));var b=p[l];for(w=0;w<b.length;w++){var L=b[w],M=s(L);if(M>c)break}b.splice(w,0,o)}},u.prototype.addCommands=function(l){l&&Object.keys(l).forEach(function(o){var c=l[o];if(c){if(typeof c=="string")return this.bindKey(c,o);typeof c=="function"&&(c={exec:c}),typeof c=="object"&&(c.name||(c.name=o),this.addCommand(c))}},this)},u.prototype.removeCommands=function(l){Object.keys(l).forEach(function(o){this.removeCommand(l[o])},this)},u.prototype.bindKeys=function(l){Object.keys(l).forEach(function(o){this.bindKey(o,l[o])},this)},u.prototype._buildKeyHash=function(l){this.bindKey(l.bindKey,l)},u.prototype.parseKeys=function(l){var o=l.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(M){return M}),c=o.pop(),p=y[c];if(y.FUNCTION_KEYS[p])c=y.FUNCTION_KEYS[p].toLowerCase();else if(o.length){if(o.length==1&&o[0]=="shift")return{key:c.toUpperCase(),hashId:-1}}else return{key:c,hashId:-1};for(var w=0,b=o.length;b--;){var L=y.KEY_MODS[o[b]];if(L==null)return typeof console<"u"&&console.error("invalid modifier "+o[b]+" in "+l),!1;w|=L}return{key:c,hashId:w}},u.prototype.findKeyCommand=function(l,o){var c=h[l]+o;return this.commandKeyBinding[c]},u.prototype.handleKeyboard=function(l,o,c,p){if(!(p<0)){var w=h[o]+c,b=this.commandKeyBinding[w];return l.$keyChain&&(l.$keyChain+=" "+w,b=this.commandKeyBinding[l.$keyChain]||b),b&&(b=="chainKeys"||b[b.length-1]=="chainKeys")?(l.$keyChain=l.$keyChain||w,{command:"null"}):(l.$keyChain&&((!o||o==4)&&c.length==1?l.$keyChain=l.$keyChain.slice(0,-w.length-1):(o==-1||p>0)&&(l.$keyChain="")),{command:b})}},u.prototype.getStatusText=function(l,o){return o.$keyChain||""},u})();function s(u){return typeof u=="object"&&u.bindKey&&u.bindKey.position||(u.isDefault?-100:0)}var a=(function(u){g(l,u);function l(o,c){var p=u.call(this,o,c)||this;return p.$singleCommand=!0,p}return l})(d);a.call=function(u,l,o){d.prototype.$init.call(u,l,o,!0)},d.call=function(u,l,o){d.prototype.$init.call(u,l,o,!1)},r.HashHandler=a,r.MultiHashHandler=d}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,r,m){var g=this&&this.__extends||(function(){var s=function(a,u){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(l[c]=o[c])},s(a,u)};return function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");s(a,u);function l(){this.constructor=a}a.prototype=u===null?Object.create(u):(l.prototype=u.prototype,new l)}})(),y=e("../lib/oop"),x=e("../keyboard/hash_handler").MultiHashHandler,h=e("../lib/event_emitter").EventEmitter,d=(function(s){g(a,s);function a(u,l){var o=s.call(this,l,u)||this;return o.byName=o.commands,o.setDefaultHandler("exec",function(c){return c.args?c.command.exec(c.editor,c.args,c.event,!1):c.command.exec(c.editor,{},c.event,!0)}),o}return a.prototype.exec=function(u,l,o){if(Array.isArray(u)){for(var c=u.length;c--;)if(this.exec(u[c],l,o))return!0;return!1}typeof u=="string"&&(u=this.commands[u]);var p={editor:l,command:u,args:o};return this.canExecute(u,l)?(p.returnValue=this._emit("exec",p),this._signal("afterExec",p),p.returnValue!==!1):(this._signal("commandUnavailable",p),!1)},a.prototype.canExecute=function(u,l){return typeof u=="string"&&(u=this.commands[u]),!(!u||l&&l.$readOnly&&!u.readOnly||this.$checkCommandState!=!1&&u.isAvailable&&!u.isAvailable(l))},a.prototype.toggleRecording=function(u){if(!this.$inReplay)return u&&u._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(l){this.macro.push([l.command,l.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},a.prototype.replay=function(u){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(u);try{this.$inReplay=!0,this.macro.forEach(function(l){typeof l=="string"?this.exec(l,u):this.exec(l[0],u,l[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function(u){return u.map(function(l){return typeof l[0]!="string"&&(l[0]=l[0].name),l[1]||(l=l[0]),l})},a})(x);y.implement(d.prototype,h),r.CommandManager=d}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,r,m){var g=e("../lib/lang"),y=e("../config"),x=e("../range").Range;function h(s,a){return{win:s,mac:a}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:h("Ctrl-,","Command-,"),exec:function(s){y.loadModule("ace/ext/settings_menu",function(a){a.init(s),s.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:h("Alt-E","F4"),exec:function(s){y.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(s,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:h("Alt-Shift-E","Shift-F4"),exec:function(s){y.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(s,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:h("Ctrl-A","Command-A"),exec:function(s){s.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:h(null,"Ctrl-L"),exec:function(s){s.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:h("Ctrl-L","Command-L"),exec:function(s,a){typeof a=="number"&&!isNaN(a)&&s.gotoLine(a),s.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:h("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(s){s.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:h("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(s){s.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:h("F2","F2"),exec:function(s){s.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:h("Alt-F2","Alt-F2"),exec:function(s){s.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:h(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:h(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:h("Alt-0","Command-Option-0"),exec:function(s){s.session.foldAll(),s.session.unfold(s.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:h("Alt-Shift-0","Command-Option-Shift-0"),exec:function(s){s.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:h("Ctrl-K","Command-G"),exec:function(s){s.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:h("Ctrl-Shift-K","Command-Shift-G"),exec:function(s){s.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:h("Alt-K","Ctrl-G"),exec:function(s){s.selection.isEmpty()?s.selection.selectWord():s.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:h("Alt-Shift-K","Ctrl-Shift-G"),exec:function(s){s.selection.isEmpty()?s.selection.selectWord():s.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:h("Ctrl-F","Command-F"),exec:function(s){y.loadModule("ace/ext/searchbox",function(a){a.Search(s)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(s){s.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:h("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(s){s.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:h("Ctrl-Home","Command-Home|Command-Up"),exec:function(s){s.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:h("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(s){s.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:h("Up","Up|Ctrl-P"),exec:function(s,a){s.navigateUp(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:h("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(s){s.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:h("Ctrl-End","Command-End|Command-Down"),exec:function(s){s.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:h("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(s){s.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:h("Down","Down|Ctrl-N"),exec:function(s,a){s.navigateDown(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:h("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(s){s.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:h("Ctrl-Left","Option-Left"),exec:function(s){s.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:h("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(s){s.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:h("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(s){s.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:h("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(s){s.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:h("Left","Left|Ctrl-B"),exec:function(s,a){s.navigateLeft(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:h("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(s){s.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:h("Ctrl-Right","Option-Right"),exec:function(s){s.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:h("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(s){s.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:h("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(s){s.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:h("Shift-Right","Shift-Right"),exec:function(s){s.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:h("Right","Right|Ctrl-F"),exec:function(s,a){s.navigateRight(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(s){s.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:h(null,"Option-PageDown"),exec:function(s){s.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:h("PageDown","PageDown|Ctrl-V"),exec:function(s){s.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(s){s.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:h(null,"Option-PageUp"),exec:function(s){s.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(s){s.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:h("Ctrl-Up",null),exec:function(s){s.renderer.scrollBy(0,-2*s.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:h("Ctrl-Down",null),exec:function(s){s.renderer.scrollBy(0,2*s.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(s){s.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(s){s.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:h("Ctrl-Alt-E","Command-Option-E"),exec:function(s){s.commands.toggleRecording(s)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:h("Ctrl-Shift-E","Command-Shift-E"),exec:function(s){s.commands.replay(s)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:h("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(s){s.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:h("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(s){s.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:h("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(s){s.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:h(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(s){},readOnly:!0},{name:"cut",description:"Cut",exec:function(s){var a=s.$copyWithEmptySelection&&s.selection.isEmpty(),u=a?s.selection.getLineRange():s.selection.getRange();s._emit("cut",u),u.isEmpty()||s.session.remove(u),s.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(s,a){s.$handlePaste(a)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:h("Ctrl-D","Command-D"),exec:function(s){s.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:h("Ctrl-Shift-D","Command-Shift-D"),exec:function(s){s.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:h("Ctrl-Alt-S","Command-Alt-S"),exec:function(s){s.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:h("Ctrl-/","Command-/"),exec:function(s){s.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:h("Ctrl-Shift-/","Command-Shift-/"),exec:function(s){s.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:h("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(s){s.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:h("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(s){s.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:h("Ctrl-H","Command-Option-F"),exec:function(s){y.loadModule("ace/ext/searchbox",function(a){a.Search(s,!0)})}},{name:"undo",description:"Undo",bindKey:h("Ctrl-Z","Command-Z"),exec:function(s){s.undo()}},{name:"redo",description:"Redo",bindKey:h("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(s){s.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:h("Alt-Shift-Up","Command-Option-Up"),exec:function(s){s.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:h("Alt-Up","Option-Up"),exec:function(s){s.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:h("Alt-Shift-Down","Command-Option-Down"),exec:function(s){s.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:h("Alt-Down","Option-Down"),exec:function(s){s.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:h("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(s){s.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:h("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(s){s.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:h("Shift-Delete",null),exec:function(s){if(s.selection.isEmpty())s.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:h("Alt-Backspace","Command-Backspace"),exec:function(s){s.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:h("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(s){s.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:h("Ctrl-Shift-Backspace",null),exec:function(s){var a=s.selection.getRange();a.start.column=0,s.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:h("Ctrl-Shift-Delete",null),exec:function(s){var a=s.selection.getRange();a.end.column=Number.MAX_VALUE,s.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:h("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(s){s.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:h("Ctrl-Delete","Alt-Delete"),exec:function(s){s.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:h("Shift-Tab","Shift-Tab"),exec:function(s){s.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:h("Tab","Tab"),exec:function(s){s.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:h("Ctrl-[","Ctrl-["),exec:function(s){s.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:h("Ctrl-]","Ctrl-]"),exec:function(s){s.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(s,a){s.insert(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(s,a){s.insert(g.stringRepeat(a.text||"",a.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:h(null,"Ctrl-O"),exec:function(s){s.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:h("Alt-Shift-X","Ctrl-T"),exec:function(s){s.transposeLetters()},multiSelectAction:function(s){s.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:h("Ctrl-U","Ctrl-U"),exec:function(s){s.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:h("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(s){s.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:h(null,null),exec:function(s){s.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:h("Ctrl-Shift-L","Command-Shift-L"),exec:function(s){var a=s.selection.getRange();a.start.column=a.end.column=0,a.end.row++,s.selection.setRange(a,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:h("Ctrl+F3","F3"),exec:function(s){s.openLink()}},{name:"joinlines",description:"Join lines",bindKey:h(null,null),exec:function(s){for(var a=s.selection.isBackwards(),u=a?s.selection.getSelectionLead():s.selection.getSelectionAnchor(),l=a?s.selection.getSelectionAnchor():s.selection.getSelectionLead(),o=s.session.doc.getLine(u.row).length,c=s.session.doc.getTextRange(s.selection.getRange()),p=c.replace(/\n\s*/," ").length,w=s.session.doc.getLine(u.row),b=u.row+1;b<=l.row+1;b++){var L=g.stringTrimLeft(g.stringTrimRight(s.session.doc.getLine(b)));L.length!==0&&(L=" "+L),w+=L}l.row+1<s.session.doc.getLength()-1&&(w+=s.session.doc.getNewLineCharacter()),s.clearSelection(),s.session.doc.replace(new x(u.row,0,l.row+2,0),w),p>0?(s.selection.moveCursorTo(u.row,u.column),s.selection.selectTo(u.row,u.column+p)):(o=s.session.doc.getLine(u.row).length>o?o+1:o,s.selection.moveCursorTo(u.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:h(null,null),exec:function(s){var a=s.session.doc.getLength()-1,u=s.session.doc.getLine(a).length,l=s.selection.rangeList.ranges,o=[];l.length<1&&(l=[s.selection.getRange()]);for(var c=0;c<l.length;c++)c==l.length-1&&(l[c].end.row===a&&l[c].end.column===u||o.push(new x(l[c].end.row,l[c].end.column,a,u))),c===0?l[c].start.row===0&&l[c].start.column===0||o.push(new x(0,0,l[c].start.row,l[c].start.column)):o.push(new x(l[c-1].end.row,l[c-1].end.column,l[c].start.row,l[c].start.column));s.exitMultiSelectMode(),s.clearSelection();for(var c=0;c<o.length;c++)s.selection.addRange(o[c],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(s){s.selection.clearSelection(),s.navigateLineEnd(),s.insert(`
|
209
|
+
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(s){s.selection.clearSelection();var a=s.getCursorPosition();s.selection.moveTo(a.row-1,Number.MAX_VALUE),s.insert(`
|
210
|
+
`),a.row===0&&s.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(s){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),s.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:h("F1","F1"),exec:function(s){s.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:h(null,null),exec:function(s){s.prompt({$type:"modes"})},readOnly:!0}];for(var d=1;d<9;d++)r.commands.push({name:"foldToLevel"+d,description:"Fold To Level "+d,level:d,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,m){var g=e("../lib/keys"),y=e("../mouse/default_gutter_handler").GutterTooltip,x=(function(){function d(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 d.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))},d.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))},d.prototype.$onGutterKeyDown=function(s){if(this.annotationTooltip.isOpen){s.preventDefault(),s.keyCode===g.escape&&this.annotationTooltip.hideTooltip();return}if(s.target===this.element){if(s.keyCode!=g.enter)return;s.preventDefault();var a=this.editor.getCursorPosition().row;this.editor.isRowVisible(a)||this.editor.scrollToLine(a,!0,!0),setTimeout((function(){var u=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),l=this.$findNearestFoldLaneWidget(u),o=this.$findNearestAnnotation(u);if(!(l===null&&o===null)){var c=this.$findClosestNumber(l,o,u);if(c===l)if(this.activeLane="fold",this.activeRowIndex=l,this.$isCustomWidgetVisible(l)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=o,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(s),setTimeout((function(){this.editor._signal("gutterkeydown",new h(s,this))}).bind(this),10)},d.prototype.$handleGutterKeyboardInteraction=function(s){if(s.keyCode===g.tab){s.preventDefault();return}if(s.keyCode===g.escape){s.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(s.keyCode===g.up){switch(s.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(s.keyCode===g.down){switch(s.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(s.keyCode===g.left){s.preventDefault(),this.$switchLane("annotation");return}if(s.keyCode===g.right){s.preventDefault(),this.$switchLane("fold");return}if(s.keyCode===g.enter||s.keyCode===g.space){switch(s.preventDefault(),this.activeLane){case"fold":var a=this.$rowIndexToRow(this.activeRowIndex),u=this.editor.session.$gutterCustomWidgets[a];if(u)u.callbacks&&u.callbacks.onClick&&u.callbacks.onClick(s,a);else if(this.gutterLayer.session.foldWidgets[a]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),s),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==a&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(a),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var l=this.lines.cells[this.activeRowIndex].element.childNodes[2],o=l.getBoundingClientRect(),c=this.annotationTooltip.getElement().style;c.left=o.right+"px",c.top=o.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},d.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},d.prototype.$isFoldWidgetVisible=function(s){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(s)),u=this.$getFoldWidget(s).style.display!=="none";return a&&u},d.prototype.$isCustomWidgetVisible=function(s){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(s)),u=!!this.$getCustomWidget(s);return a&&u},d.prototype.$isAnnotationVisible=function(s){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(s)),u=this.$getAnnotation(s).style.display!=="none";return a&&u},d.prototype.$getFoldWidget=function(s){var a=this.lines.get(s),u=a.element;return u.childNodes[1]},d.prototype.$getCustomWidget=function(s){var a=this.lines.get(s),u=a.element;return u.childNodes[3]},d.prototype.$getAnnotation=function(s){var a=this.lines.get(s),u=a.element;return u.childNodes[2]},d.prototype.$findNearestFoldLaneWidget=function(s){if(this.$isCustomWidgetVisible(s)||this.$isFoldWidgetVisible(s))return s;for(var a=0;s-a>0||s+a<this.lines.getLength()-1;){if(a++,s-a>=0&&this.$isCustomWidgetVisible(s-a))return s-a;if(s+a<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(s+a))return s+a;if(s-a>=0&&this.$isFoldWidgetVisible(s-a))return s-a;if(s+a<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(s+a))return s+a}return null},d.prototype.$findNearestAnnotation=function(s){if(this.$isAnnotationVisible(s))return s;for(var a=0;s-a>0||s+a<this.lines.getLength()-1;){if(a++,s-a>=0&&this.$isAnnotationVisible(s-a))return s-a;if(s+a<=this.lines.getLength()-1&&this.$isAnnotationVisible(s+a))return s+a}return null},d.prototype.$focusFoldWidget=function(s){if(s!=null){var a=this.$getFoldWidget(s);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},d.prototype.$focusCustomWidget=function(s){if(s!=null){var a=this.$getCustomWidget(s);a&&(a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus())}},d.prototype.$focusAnnotation=function(s){if(s!=null){var a=this.$getAnnotation(s);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},d.prototype.$blurFoldWidget=function(s){var a=this.$getFoldWidget(s);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},d.prototype.$blurCustomWidget=function(s){var a=this.$getCustomWidget(s);a&&(a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur())},d.prototype.$blurAnnotation=function(s){var a=this.$getAnnotation(s);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},d.prototype.$moveFoldWidgetUp=function(){for(var s=this.activeRowIndex;s>0;)if(s--,this.$isFoldWidgetVisible(s)||this.$isCustomWidgetVisible(s)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=s,this.$isFoldWidgetVisible(s)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},d.prototype.$moveFoldWidgetDown=function(){for(var s=this.activeRowIndex;s<this.lines.getLength()-1;)if(s++,this.$isFoldWidgetVisible(s)||this.$isCustomWidgetVisible(s)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=s,this.$isFoldWidgetVisible(s)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},d.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}},d.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}},d.prototype.$findClosestNumber=function(s,a,u){return s===null?a:a===null||Math.abs(u-s)<=Math.abs(u-a)?s:a},d.prototype.$switchLane=function(s){switch(s){case"annotation":if(this.activeLane==="annotation")break;var a=this.$findNearestAnnotation(this.activeRowIndex);if(a==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=a,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var u=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(u===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=u,this.$isCustomWidgetVisible(u)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},d.prototype.$rowIndexToRow=function(s){var a=this.lines.get(s);return a?a.row:null},d.prototype.$rowToRowIndex=function(s){for(var a=0;a<this.lines.getLength();a++){var u=this.lines.get(a);if(u.row==s)return a}return null},d})();r.GutterKeyboardHandler=x;var h=(function(){function d(s,a){this.gutterKeyboardHandler=a,this.domEvent=s}return d.prototype.getKey=function(){return g.keyCodeToString(this.domEvent.keyCode)},d.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},d.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},d.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},d})();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,m){var g=this&&this.__values||function(_){var S=typeof Symbol=="function"&&Symbol.iterator,D=S&&_[S],j=0;if(D)return D.call(_);if(_&&typeof _.length=="number")return{next:function(){return _&&j>=_.length&&(_=void 0),{value:_&&_[j++],done:!_}}};throw new TypeError(S?"Object is not iterable.":"Symbol.iterator is not defined.")},y=e("./lib/oop"),x=e("./lib/dom"),h=e("./lib/lang"),d=e("./lib/useragent"),s=e("./keyboard/textinput").TextInput,a=e("./mouse/mouse_handler").MouseHandler,u=e("./mouse/fold_handler").FoldHandler,l=e("./keyboard/keybinding").KeyBinding,o=e("./edit_session").EditSession,c=e("./search").Search,p=e("./range").Range,w=e("./lib/event_emitter").EventEmitter,b=e("./commands/command_manager").CommandManager,L=e("./commands/default_commands").commands,M=e("./config"),k=e("./token_iterator").TokenIterator,C=e("./keyboard/gutter_handler").GutterKeyboardHandler,R=e("./config").nls,O=e("./clipboard"),E=e("./lib/keys"),I=e("./lib/event"),z=e("./tooltip").HoverTooltip,P=(function(){function _(S,D,j){this.id="editor"+ ++_.$uid,this.session,this.$toDestroy=[];var U=S.getContainerElement();this.container=U,this.renderer=S,this.commands=new b(d.isMac?"mac":"win",L),typeof document=="object"&&(this.textInput=new s(S.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new u(this)),this.keyBinding=new l(this),this.$search=new c().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(q,Z){Z._$emitInputEvent.schedule(31)}),this.setSession(D||j&&j.session||new o("")),M.resetOptions(this),j&&this.setOptions(j),M._signal("editor",this)}return _.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},_.prototype.startOperation=function(S){this.session.startOperation(S)},_.prototype.endOperation=function(S){this.session.endOperation(S)},_.prototype.onStartOperation=function(S){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,S||(this.previousCommand=null)},_.prototype.onEndOperation=function(S){if(this.curOp&&this.session){if(S&&S.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var D=this.curOp.command,j=D&&D.scrollIntoView;if(j){switch(j){case"center-animate":j="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var U=this.selection.getRange(),q=this.renderer.layerConfig;(U.start.row>=q.lastRow||U.end.row<=q.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}j=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},_.prototype.$historyTracker=function(S){if(this.$mergeUndoDeltas){var D=this.prevOp,j=this.$mergeableCommands,U=D.command&&S.command.name==D.command.name;if(S.command.name=="insertstring"){var q=S.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),U=U&&this.mergeNextCommand&&(!/\s/.test(q)||/\s/.test(D.args)),this.mergeNextCommand=!0}else U=U&&j.indexOf(S.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(U=!1),U?this.session.mergeUndoDeltas=!0:j.indexOf(S.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},_.prototype.setKeyboardHandler=function(S,D){if(S&&typeof S=="string"&&S!="ace"){this.$keybindingId=S;var j=this;M.loadModule(["keybinding",S],function(U){j.$keybindingId==S&&j.keyBinding.setKeyboardHandler(U&&U.handler),D&&D()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(S),D&&D()},_.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},_.prototype.setSession=function(S){if(this.session!=S){this.curOp&&this.endOperation(),this.curOp={};var D=this.session;if(D){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var j=this.session.getSelection();j.off("changeCursor",this.$onCursorChange),j.off("changeSelection",this.$onSelectionChange)}this.session=S,S?(this.$onDocumentChange=this.onDocumentChange.bind(this),S.on("change",this.$onDocumentChange),this.renderer.setSession(S),this.$onChangeMode=this.onChangeMode.bind(this),S.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),S.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),S.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),S.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),S.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),S.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=S.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(S)),this._signal("changeSession",{session:S,oldSession:D}),this.curOp=null,D&&D._signal("changeEditor",{oldEditor:this}),D&&(D.$editor=null),S&&S._signal("changeEditor",{editor:this}),S&&(S.$editor=this),S&&!S.destroyed&&S.bgTokenizer.scheduleStart()}},_.prototype.getSession=function(){return this.session},_.prototype.setValue=function(S,D){return this.session.doc.setValue(S),D?D==1?this.navigateFileEnd():D==-1&&this.navigateFileStart():this.selectAll(),S},_.prototype.getValue=function(){return this.session.getValue()},_.prototype.getSelection=function(){return this.selection},_.prototype.resize=function(S){this.renderer.onResize(S)},_.prototype.setTheme=function(S,D){this.renderer.setTheme(S,D)},_.prototype.getTheme=function(){return this.renderer.getTheme()},_.prototype.setStyle=function(S,D){this.renderer.setStyle(S,D)},_.prototype.unsetStyle=function(S){this.renderer.unsetStyle(S)},_.prototype.getFontSize=function(){return this.getOption("fontSize")||x.computedStyle(this.container).fontSize},_.prototype.setFontSize=function(S){this.setOption("fontSize",S)},_.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var S=this;this.$highlightPending=!0,setTimeout(function(){S.$highlightPending=!1;var D=S.session;if(!(!D||D.destroyed)){D.$bracketHighlight&&(D.$bracketHighlight.markerIds.forEach(function(ue){D.removeMarker(ue)}),D.$bracketHighlight=null);var j=S.getCursorPosition(),U=S.getKeyboardHandler(),q=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(S),Z=D.getMatchingBracketRanges(j,q);if(!Z){var te=new k(D,j.row,j.column),he=te.getCurrentToken();if(he&&/\b(?:tag-open|tag-name)/.test(he.type)){var ne=D.getMatchingTags(j);ne&&(Z=[ne.openTagName.isEmpty()?ne.openTag:ne.openTagName,ne.closeTagName.isEmpty()?ne.closeTag:ne.closeTagName])}}if(!Z&&D.$mode.getMatching&&(Z=D.$mode.getMatching(S.session)),!Z){S.getHighlightIndentGuides()&&S.renderer.$textLayer.$highlightIndentGuide();return}var le="ace_bracket";Array.isArray(Z)?Z.length==1&&(le="ace_error_bracket"):Z=[Z],Z.length==2&&(p.comparePoints(Z[0].end,Z[1].start)==0?Z=[p.fromPoints(Z[0].start,Z[1].end)]:p.comparePoints(Z[0].start,Z[1].end)==0&&(Z=[p.fromPoints(Z[1].start,Z[0].end)])),D.$bracketHighlight={ranges:Z,markerIds:Z.map(function(ue){return D.addMarker(ue,le,"text")})},S.getHighlightIndentGuides()&&S.renderer.$textLayer.$highlightIndentGuide()}},50)}},_.prototype.focus=function(){this.textInput.focus()},_.prototype.isFocused=function(){return this.textInput.isFocused()},_.prototype.blur=function(){this.textInput.blur()},_.prototype.onFocus=function(S){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",S))},_.prototype.onBlur=function(S){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",S))},_.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},_.prototype.onDocumentChange=function(S){var D=this.session.$useWrapMode,j=S.start.row==S.end.row?S.end.row:1/0;this.renderer.updateLines(S.start.row,j,D),this._signal("change",S),this.$cursorChange()},_.prototype.onTokenizerUpdate=function(S){var D=S.data;this.renderer.updateLines(D.first,D.last)},_.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},_.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},_.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},_.prototype.$updateHighlightActiveLine=function(){var S=this.getSession(),D;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(D=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(D=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(D=!1)),S.$highlightLineMarker&&!D)S.removeMarker(S.$highlightLineMarker.id),S.$highlightLineMarker=null;else if(!S.$highlightLineMarker&&D){var j=new p(D.row,D.column,D.row,1/0);j.id=S.addMarker(j,"ace_active-line","screenLine"),S.$highlightLineMarker=j}else D&&(S.$highlightLineMarker.start.row=D.row,S.$highlightLineMarker.end.row=D.row,S.$highlightLineMarker.start.column=D.column,S._signal("changeBackMarker"))},_.prototype.onSelectionChange=function(S){var D=this.session;if(D.$selectionMarker&&D.removeMarker(D.$selectionMarker),D.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var j=this.selection.getRange(),U=this.getSelectionStyle();D.$selectionMarker=D.addMarker(j,"ace_selection",U)}var q=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(q),this._signal("changeSelection")},_.prototype.$getSelectionHighLightRegexp=function(){var S=this.session,D=this.getSelectionRange();if(!(D.isEmpty()||D.isMultiLine())){var j=D.start.column,U=D.end.column,q=S.getLine(D.start.row),Z=q.substring(j,U);if(!(Z.length>5e3||!/[\w\d]/.test(Z))){var te=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Z}),he=q.substring(j-1,U+1);if(te.test(he))return te}}},_.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},_.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},_.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},_.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},_.prototype.onChangeMode=function(S){this.renderer.updateText(),this._emit("changeMode",S)},_.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},_.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},_.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},_.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},_.prototype.getCopyText=function(){var S=this.getSelectedText(),D=this.session.doc.getNewLineCharacter(),j=!1;if(!S&&this.$copyWithEmptySelection){j=!0;for(var U=this.selection.getAllRanges(),q=0;q<U.length;q++){var Z=U[q];q&&U[q-1].start.row==Z.start.row||(S+=this.session.getLine(Z.start.row)+D)}}var te={text:S};return this._signal("copy",te),O.lineMode=j?te.text:!1,te.text},_.prototype.onCopy=function(){this.commands.exec("copy",this)},_.prototype.onCut=function(){this.commands.exec("cut",this)},_.prototype.onPaste=function(S,D){var j={text:S,event:D};this.commands.exec("paste",this,j)},_.prototype.$handlePaste=function(S){typeof S=="string"&&(S={text:S}),this._signal("paste",S);var D=S.text,j=D===O.lineMode,U=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)j?U.insert({row:this.selection.lead.row,column:0},D):this.insert(D);else if(j)this.selection.rangeList.ranges.forEach(function(le){U.insert({row:le.start.row,column:0},D)});else{var q=D.split(/\r\n|\r|\n/),Z=this.selection.rangeList.ranges,te=q.length==2&&(!q[0]||!q[1]);if(q.length!=Z.length||te)return this.commands.exec("insertstring",this,D);for(var he=Z.length;he--;){var ne=Z[he];ne.isEmpty()||U.remove(ne),U.insert(ne.start,q[he])}}},_.prototype.execCommand=function(S,D){return this.commands.exec(S,this,D)},_.prototype.insert=function(S,D){var j=this.session,U=j.getMode(),q=this.getCursorPosition();if(this.getBehavioursEnabled()&&!D){var Z=U.transformAction(j.getState(q.row),"insertion",this,j,S);Z&&(S!==Z.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),S=Z.text)}if(S==" "&&(S=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&S.indexOf(`
|
211
|
+
`)==-1){var te=p.fromPoints(q,q);te.end.column+=S.length,this.session.remove(te)}}else{var te=this.getSelectionRange();q=this.session.remove(te),this.clearSelection()}if(S==`
|
212
|
+
`||S==`\r
|
213
|
+
`){var ue=j.getLine(q.row);if(q.column>ue.search(/\S|$/)){var he=ue.substr(q.column).search(/\S|$/);j.doc.removeInLine(q.row,q.column,q.column+he)}}this.clearSelection();var ne=q.column,le=j.getState(q.row),ue=j.getLine(q.row),ce=U.checkOutdent(le,ue,S);if(j.insert(q,S),Z&&Z.selection&&(Z.selection.length==2?this.selection.setSelectionRange(new p(q.row,ne+Z.selection[0],q.row,ne+Z.selection[1])):this.selection.setSelectionRange(new p(q.row+Z.selection[0],Z.selection[1],q.row+Z.selection[2],Z.selection[3]))),this.$enableAutoIndent){if(j.getDocument().isNewLine(S)){var fe=U.getNextLineIndent(le,ue.slice(0,q.column),j.getTabString());j.insert({row:q.row+1,column:0},fe)}ce&&U.autoOutdent(le,j,q.row)}},_.prototype.autoIndent=function(){for(var S=this.session,D=S.getMode(),j=this.selection.isEmpty()?[new p(0,0,S.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",q="",Z="",te=S.getTabString(),he=0;he<j.length;he++)for(var ne=j[he].start.row,le=j[he].end.row,ue=ne;ue<=le;ue++){ue>0&&(U=S.getState(ue-1),q=S.getLine(ue-1),Z=D.getNextLineIndent(U,q,te));var ce=S.getLine(ue),fe=D.$getIndent(ce);if(Z!==fe){if(fe.length>0){var _e=new p(ue,0,ue,fe.length);S.remove(_e)}Z.length>0&&S.insert({row:ue,column:0},Z)}D.autoOutdent(U,S,ue)}},_.prototype.onTextInput=function(S,D){if(!D)return this.keyBinding.onTextInput(S);this.startOperation({command:{name:"insertstring"}});var j=this.applyComposition.bind(this,S,D);this.selection.rangeCount?this.forEachSelection(j):j(),this.endOperation()},_.prototype.applyComposition=function(S,D){if(D.extendLeft||D.extendRight){var j=this.selection.getRange();j.start.column-=D.extendLeft,j.end.column+=D.extendRight,j.start.column<0&&(j.start.row--,j.start.column+=this.session.getLine(j.start.row).length+1),this.selection.setRange(j),!S&&!j.isEmpty()&&this.remove()}if((S||!this.selection.isEmpty())&&this.insert(S,!0),D.restoreStart||D.restoreEnd){var j=this.selection.getRange();j.start.column-=D.restoreStart,j.end.column-=D.restoreEnd,this.selection.setRange(j)}},_.prototype.onCommandKey=function(S,D,j){return this.keyBinding.onCommandKey(S,D,j)},_.prototype.setOverwrite=function(S){this.session.setOverwrite(S)},_.prototype.getOverwrite=function(){return this.session.getOverwrite()},_.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},_.prototype.setScrollSpeed=function(S){this.setOption("scrollSpeed",S)},_.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},_.prototype.setDragDelay=function(S){this.setOption("dragDelay",S)},_.prototype.getDragDelay=function(){return this.getOption("dragDelay")},_.prototype.setSelectionStyle=function(S){this.setOption("selectionStyle",S)},_.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},_.prototype.setHighlightActiveLine=function(S){this.setOption("highlightActiveLine",S)},_.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},_.prototype.setHighlightGutterLine=function(S){this.setOption("highlightGutterLine",S)},_.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},_.prototype.setHighlightSelectedWord=function(S){this.setOption("highlightSelectedWord",S)},_.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},_.prototype.setAnimatedScroll=function(S){this.renderer.setAnimatedScroll(S)},_.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},_.prototype.setShowInvisibles=function(S){this.renderer.setShowInvisibles(S)},_.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},_.prototype.setDisplayIndentGuides=function(S){this.renderer.setDisplayIndentGuides(S)},_.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},_.prototype.setHighlightIndentGuides=function(S){this.renderer.setHighlightIndentGuides(S)},_.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},_.prototype.setShowPrintMargin=function(S){this.renderer.setShowPrintMargin(S)},_.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},_.prototype.setPrintMarginColumn=function(S){this.renderer.setPrintMarginColumn(S)},_.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},_.prototype.setReadOnly=function(S){this.setOption("readOnly",S)},_.prototype.getReadOnly=function(){return this.getOption("readOnly")},_.prototype.setBehavioursEnabled=function(S){this.setOption("behavioursEnabled",S)},_.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},_.prototype.setWrapBehavioursEnabled=function(S){this.setOption("wrapBehavioursEnabled",S)},_.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},_.prototype.setShowFoldWidgets=function(S){this.setOption("showFoldWidgets",S)},_.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},_.prototype.setFadeFoldWidgets=function(S){this.setOption("fadeFoldWidgets",S)},_.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},_.prototype.remove=function(S){this.selection.isEmpty()&&(S=="left"?this.selection.selectLeft():this.selection.selectRight());var D=this.getSelectionRange();if(this.getBehavioursEnabled()){var j=this.session,U=j.getState(D.start.row),q=j.getMode().transformAction(U,"deletion",this,j,D);if(D.end.column===0){var Z=j.getTextRange(D);if(Z[Z.length-1]==`
|
214
|
+
`){var te=j.getLine(D.end.row);/^\s+$/.test(te)&&(D.end.column=te.length)}}q&&(D=q)}this.session.remove(D),this.clearSelection()},_.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},_.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},_.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},_.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var S=this.getSelectionRange();S.start.column==S.end.column&&S.start.row==S.end.row&&(S.end.column=0,S.end.row++),this.session.remove(S),this.clearSelection()},_.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var S=this.getCursorPosition();this.insert(`
|
215
|
+
`),this.moveCursorToPosition(S)},_.prototype.setGhostText=function(S,D){this.renderer.setGhostText(S,D)},_.prototype.removeGhostText=function(){this.renderer.removeGhostText()},_.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var S=this.getCursorPosition(),D=S.column;if(D!==0){var j=this.session.getLine(S.row),U,q;D<j.length?(U=j.charAt(D)+j.charAt(D-1),q=new p(S.row,D-1,S.row,D+1)):(U=j.charAt(D-1)+j.charAt(D-2),q=new p(S.row,D-2,S.row,D)),this.session.replace(q,U),this.session.selection.moveToPosition(q.end)}}},_.prototype.toLowerCase=function(){var S=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),j=this.session.getTextRange(D);this.session.replace(D,j.toLowerCase()),this.selection.setSelectionRange(S)},_.prototype.toUpperCase=function(){var S=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),j=this.session.getTextRange(D);this.session.replace(D,j.toUpperCase()),this.selection.setSelectionRange(S)},_.prototype.indent=function(){var S=this.session,D=this.getSelectionRange();if(D.start.row<D.end.row){var j=this.$getSelectedRows();S.indentRows(j.first,j.last," ");return}else if(D.start.column<D.end.column){var U=S.getTextRange(D);if(!/^\s+$/.test(U)){var j=this.$getSelectedRows();S.indentRows(j.first,j.last," ");return}}var q=S.getLine(D.start.row),Z=D.start,te=S.getTabSize(),he=S.documentToScreenColumn(Z.row,Z.column);if(this.session.getUseSoftTabs())var ne=te-he%te,le=h.stringRepeat(" ",ne);else{for(var ne=he%te;q[D.start.column-1]==" "&≠)D.start.column--,ne--;this.selection.setSelectionRange(D),le=" "}return this.insert(le)},_.prototype.blockIndent=function(){var S=this.$getSelectedRows();this.session.indentRows(S.first,S.last," ")},_.prototype.blockOutdent=function(){var S=this.session.getSelection();this.session.outdentRows(S.getRange())},_.prototype.sortLines=function(){for(var S=this.$getSelectedRows(),D=this.session,j=[],U=S.first;U<=S.last;U++)j.push(D.getLine(U));j.sort(function(te,he){return te.toLowerCase()<he.toLowerCase()?-1:te.toLowerCase()>he.toLowerCase()?1:0});for(var q=new p(0,0,0,0),U=S.first;U<=S.last;U++){var Z=D.getLine(U);q.start.row=U,q.end.row=U,q.end.column=Z.length,D.replace(q,j[U-S.first])}},_.prototype.toggleCommentLines=function(){var S=this.session.getState(this.getCursorPosition().row),D=this.$getSelectedRows();this.session.getMode().toggleCommentLines(S,this.session,D.first,D.last)},_.prototype.toggleBlockComment=function(){var S=this.getCursorPosition(),D=this.session.getState(S.row),j=this.getSelectionRange();this.session.getMode().toggleBlockComment(D,this.session,j,S)},_.prototype.getNumberAt=function(S,D){var j=/[\-]?[0-9]+(?:\.[0-9]+)?/g;j.lastIndex=0;for(var U=this.session.getLine(S);j.lastIndex<D;){var q=j.exec(U);if(q.index<=D&&q.index+q[0].length>=D){var Z={value:q[0],start:q.index,end:q.index+q[0].length};return Z}}return null},_.prototype.modifyNumber=function(S){var D=this.selection.getCursor().row,j=this.selection.getCursor().column,U=new p(D,j-1,D,j),q=this.session.getTextRange(U);if(!isNaN(parseFloat(q))&&isFinite(q)){var Z=this.getNumberAt(D,j);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&&j<te?S*=Math.pow(10,Z.end-j-1):S*=Math.pow(10,Z.end-j),ne+=S,ne/=Math.pow(10,he);var le=ne.toFixed(he),ue=new p(D,Z.start,D,Z.end);this.session.replace(ue,le),this.moveCursorTo(D,Math.max(Z.start+1,j+le.length-Z.value.length))}}else this.toggleWord()},_.prototype.toggleWord=function(){var S=this.selection.getCursor().row,D=this.selection.getCursor().column;this.selection.selectWord();var j=this.getSelectedText(),U=this.selection.getWordRange().start.column,q=j.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),Z=D-U-1;Z<0&&(Z=0);var te=0,he=0,ne=this;j.match(/[A-Za-z0-9_]+/)&&q.forEach(function(Ve,lt){he=te+Ve.length,Z>=te&&Z<=he&&(j=Ve,ne.selection.clearSelection(),ne.moveCursorTo(S,te+U),ne.selection.selectTo(S,he+U)),te=he});for(var le=this.$toggleWordPairs,ue,ce=0;ce<le.length;ce++)for(var fe=le[ce],_e=0;_e<=1;_e++){var $e=+!_e,Te=j.match(new RegExp("^\\s?_?("+h.escapeRegExp(fe[_e])+")\\s?$","i"));if(Te){var qe=j.match(new RegExp("([_]|^|\\s)("+h.escapeRegExp(Te[1])+")($|\\s)","g"));qe&&(ue=j.replace(new RegExp(h.escapeRegExp(fe[_e]),"i"),function(Ve){var lt=fe[$e];return Ve.toUpperCase()==Ve?lt=lt.toUpperCase():Ve.charAt(0).toUpperCase()==Ve.charAt(0)&&(lt=lt.substr(0,0)+fe[$e].charAt(0).toUpperCase()+lt.substr(1)),lt}),this.insert(ue),ue="")}}},_.prototype.findLinkAt=function(S,D){var j,U,q=this.session.getLine(S),Z=q.split(/((?:https?|ftp):\/\/[\S]+)/),te=D;te<0&&(te=0);var he=0,ne=0,le;try{for(var ue=g(Z),ce=ue.next();!ce.done;ce=ue.next()){var fe=ce.value;if(ne=he+fe.length,te>=he&&te<=ne&&fe.match(/((?:https?|ftp):\/\/[\S]+)/)){le=fe.replace(/[\s:.,'";}\]]+$/,"");break}he=ne}}catch(_e){j={error:_e}}finally{try{ce&&!ce.done&&(U=ue.return)&&U.call(ue)}finally{if(j)throw j.error}}return le},_.prototype.openLink=function(){var S=this.selection.getCursor(),D=this.findLinkAt(S.row,S.column);return D&&window.open(D,"_blank"),D!=null},_.prototype.removeLines=function(){var S=this.$getSelectedRows();this.session.removeFullLines(S.first,S.last),this.clearSelection()},_.prototype.duplicateSelection=function(){var S=this.selection,D=this.session,j=S.getRange(),U=S.isBackwards();if(j.isEmpty()){var q=j.start.row;D.duplicateLines(q,q)}else{var Z=U?j.start:j.end,te=D.insert(Z,D.getTextRange(j));j.start=Z,j.end=te,S.setSelectionRange(j,U)}},_.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},_.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},_.prototype.moveText=function(S,D,j){return this.session.moveText(S,D,j)},_.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},_.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},_.prototype.$moveLines=function(S,D){var j,U,q=this.selection;if(!q.inMultiSelectMode||this.inVirtualSelectionMode){var Z=q.toOrientedRange();j=this.$getSelectedRows(Z),U=this.session.$moveLines(j.first,j.last,D?0:S),D&&S==-1&&(U=0),Z.moveBy(U,0),q.fromOrientedRange(Z)}else{var te=q.rangeList.ranges;q.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var he=0,ne=0,le=te.length,ue=0;ue<le;ue++){var ce=ue;te[ue].moveBy(he,0),j=this.$getSelectedRows(te[ue]);for(var fe=j.first,_e=j.last;++ue<le;){ne&&te[ue].moveBy(ne,0);var $e=this.$getSelectedRows(te[ue]);if(D&&$e.first!=_e||!D&&$e.first>_e+1)break;_e=$e.last}for(ue--,he=this.session.$moveLines(fe,_e,D?0:S),D&&S==-1&&(ce=ue+1);ce<=ue;)te[ce].moveBy(he,0),ce++;D||(he=0),ne+=he}q.fromOrientedRange(q.ranges[0]),q.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},_.prototype.$getSelectedRows=function(S){return S=(S||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(S.start.row),last:this.session.getRowFoldEnd(S.end.row)}},_.prototype.onCompositionStart=function(S){this.renderer.showComposition(S)},_.prototype.onCompositionUpdate=function(S){this.renderer.setCompositionText(S)},_.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},_.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},_.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},_.prototype.isRowVisible=function(S){return S>=this.getFirstVisibleRow()&&S<=this.getLastVisibleRow()},_.prototype.isRowFullyVisible=function(S){return S>=this.renderer.getFirstFullyVisibleRow()&&S<=this.renderer.getLastFullyVisibleRow()},_.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},_.prototype.$moveByPage=function(S,D){var j=this.renderer,U=this.renderer.layerConfig,q=S*Math.floor(U.height/U.lineHeight);D===!0?this.selection.$moveSelection(function(){this.moveCursorBy(q,0)}):D===!1&&(this.selection.moveCursorBy(q,0),this.selection.clearSelection());var Z=j.scrollTop;j.scrollBy(0,q*U.lineHeight),D!=null&&j.scrollCursorIntoView(null,.5),j.animateScrolling(Z)},_.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},_.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},_.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},_.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},_.prototype.scrollPageDown=function(){this.$moveByPage(1)},_.prototype.scrollPageUp=function(){this.$moveByPage(-1)},_.prototype.scrollToRow=function(S){this.renderer.scrollToRow(S)},_.prototype.scrollToLine=function(S,D,j,U){this.renderer.scrollToLine(S,D,j,U)},_.prototype.centerSelection=function(){var S=this.getSelectionRange(),D={row:Math.floor(S.start.row+(S.end.row-S.start.row)/2),column:Math.floor(S.start.column+(S.end.column-S.start.column)/2)};this.renderer.alignCursor(D,.5)},_.prototype.getCursorPosition=function(){return this.selection.getCursor()},_.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},_.prototype.getSelectionRange=function(){return this.selection.getRange()},_.prototype.selectAll=function(){this.selection.selectAll()},_.prototype.clearSelection=function(){this.selection.clearSelection()},_.prototype.moveCursorTo=function(S,D){this.selection.moveCursorTo(S,D)},_.prototype.moveCursorToPosition=function(S){this.selection.moveCursorToPosition(S)},_.prototype.jumpToMatching=function(S,D){var j=this.getCursorPosition(),U=new k(this.session,j.row,j.column),q=U.getCurrentToken(),Z=0;q&&q.type.indexOf("tag-name")!==-1&&(q=U.stepBackward());var te=q||U.stepForward();if(te){var he,ne=!1,le={},ue=j.column-te.start,ce,fe={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(te.value.match(/[{}()\[\]]/g)){for(;ue<te.value.length&&!ne;ue++)if(fe[te.value[ue]])switch(ce=fe[te.value[ue]]+"."+te.type.replace("rparen","lparen"),isNaN(le[ce])&&(le[ce]=0),te.value[ue]){case"(":case"[":case"{":le[ce]++;break;case")":case"]":case"}":le[ce]--,le[ce]===-1&&(he="bracket",ne=!0);break}}else te.type.indexOf("tag-name")!==-1&&(isNaN(le[te.value])&&(le[te.value]=0),q.value==="<"&&Z>1?le[te.value]++:q.value==="</"&&le[te.value]--,le[te.value]===-1&&(he="tag",ne=!0));ne||(q=te,Z++,te=U.stepForward(),ue=0)}while(te&&!ne);if(he){var _e,$e;if(he==="bracket")_e=this.session.getBracketRange(j),_e||(_e=new p(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ue-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ue-1),$e=_e.start,(D||$e.row===j.row&&Math.abs($e.column-j.column)<2)&&(_e=this.session.getBracketRange($e)));else if(he==="tag"){if(!te||te.type.indexOf("tag-name")===-1)return;if(_e=new p(U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2,U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2),_e.compare(j.row,j.column)===0){var Te=this.session.getMatchingTags(j);Te&&(Te.openTag.contains(j.row,j.column)?(_e=Te.closeTag,$e=_e.start):(_e=Te.openTag,Te.closeTag.start.row===j.row&&Te.closeTag.start.column===j.column?$e=_e.end:$e=_e.start))}$e=$e||_e.start}$e=_e&&_e.cursor||$e,$e&&(S?_e&&D?this.selection.setRange(_e):_e&&_e.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo($e.row,$e.column):this.selection.moveTo($e.row,$e.column))}}},_.prototype.gotoLine=function(S,D,j){this.selection.clearSelection(),this.session.unfold({row:S-1,column:D||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(S-1,D||0),this.isRowFullyVisible(S-1)||this.scrollToLine(S-1,!0,j)},_.prototype.navigateTo=function(S,D){this.selection.moveTo(S,D)},_.prototype.navigateUp=function(S){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(-S||-1,0)},_.prototype.navigateDown=function(S){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(S||1,0)},_.prototype.navigateLeft=function(S){if(this.selection.isEmpty())for(S=S||1;S--;)this.selection.moveCursorLeft();else{var D=this.getSelectionRange().start;this.moveCursorToPosition(D)}this.clearSelection()},_.prototype.navigateRight=function(S){if(this.selection.isEmpty())for(S=S||1;S--;)this.selection.moveCursorRight();else{var D=this.getSelectionRange().end;this.moveCursorToPosition(D)}this.clearSelection()},_.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},_.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},_.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},_.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},_.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},_.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},_.prototype.replace=function(S,D){D&&this.$search.set(D);var j=this.$search.find(this.session),U=0;return j&&(this.$tryReplace(j,S)&&(U=1),this.selection.setSelectionRange(j),this.renderer.scrollSelectionIntoView(j.start,j.end)),U},_.prototype.replaceAll=function(S,D){D&&this.$search.set(D);var j=this.$search.findAll(this.session),U=0;if(!j.length)return U;var q=this.getSelectionRange();this.selection.moveTo(0,0);for(var Z=j.length-1;Z>=0;--Z)this.$tryReplace(j[Z],S)&&U++;return this.selection.setSelectionRange(q),U},_.prototype.$tryReplace=function(S,D){var j=this.session.getTextRange(S);return D=this.$search.replace(j,D),D!==null?(S.end=this.session.replace(S,D),S):null},_.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},_.prototype.find=function(S,D,j){D||(D={}),typeof S=="string"||S instanceof RegExp?D.needle=S:typeof S=="object"&&y.mixin(D,S);var U=this.selection.getRange();D.needle==null&&(S=this.session.getTextRange(U)||this.$search.$options.needle,S||(U=this.session.getWordRange(U.start.row,U.start.column),S=this.session.getTextRange(U)),this.$search.set({needle:S})),this.$search.set(D),D.start||this.$search.set({start:U});var q=this.$search.find(this.session);if(D.preventScroll)return q;if(q)return this.revealRange(q,j),q;D.backwards?U.start=U.end:U.end=U.start,this.selection.setRange(U)},_.prototype.findNext=function(S,D){this.find({skipCurrent:!0,backwards:!1},S,D)},_.prototype.findPrevious=function(S,D){this.find(S,{skipCurrent:!0,backwards:!0},D)},_.prototype.revealRange=function(S,D){this.session.unfold(S),this.selection.setSelectionRange(S);var j=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(S.start,S.end,.5),D!==!1&&this.renderer.animateScrolling(j)},_.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},_.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},_.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(S){S.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},_.prototype.setAutoScrollEditorIntoView=function(S){if(S){var D,j=this,U=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var q=this.$scrollAnchor;q.style.cssText="position:absolute",this.container.insertBefore(q,this.container.firstChild);var Z=this.on("changeSelection",function(){U=!0}),te=this.renderer.on("beforeRender",function(){U&&(D=j.renderer.container.getBoundingClientRect())}),he=this.renderer.on("afterRender",function(){if(U&&D&&(j.isFocused()||j.searchBox&&j.searchBox.isFocused())){var ne=j.renderer,le=ne.$cursorLayer.$pixelPos,ue=ne.layerConfig,ce=le.top-ue.offset;le.top>=0&&ce+D.top<0?U=!0:le.top<ue.height&&le.top+D.top+ue.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(q.style.top=ce+"px",q.style.left=le.left+"px",q.style.height=ue.lineHeight+"px",q.scrollIntoView(U)),U=D=null}});this.setAutoScrollEditorIntoView=function(ne){ne||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Z),this.renderer.off("afterRender",he),this.renderer.off("beforeRender",te))}}},_.prototype.$resetCursorStyle=function(){var S=this.$cursorStyle||"ace",D=this.renderer.$cursorLayer;D&&(D.setSmoothBlinking(/smooth/.test(S)),D.isBlinking=!this.$readOnly&&S!="wide",x.setCssClass(D.element,"ace_slim-cursors",/slim/.test(S)))},_.prototype.prompt=function(S,D,j){var U=this;M.loadModule("ace/ext/prompt",function(q){q.prompt(U,S,D,j)})},_})();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),M.defineOptions(P.prototype,"editor",{selectionStyle:{set:function(_){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:_})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(_){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(_){var S=this;if(this.textInput.setReadOnly(_),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(j){var U=!1;if(j&&j.type=="keydown"){if(j&&j.key&&!j.ctrlKey&&!j.metaKey&&(j.key==" "&&j.preventDefault(),U=j.key.length==1),!U)return}else j&&j.type!=="exec"&&(U=!0);if(U){S.hoverTooltip||(S.hoverTooltip=new z);var q=x.createElement("div");q.textContent=R("editor.tooltip.disable-editing","Editing is disabled"),S.hoverTooltip.isOpen||S.hoverTooltip.showForRange(S,S.getSelectionRange(),q)}else S.hoverTooltip&&S.hoverTooltip.isOpen&&S.hoverTooltip.hide()});var D=this.textInput.getElement();_?(I.addListener(D,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(I.removeListener(D,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))}},initialValue:!1},copyWithEmptySelection:{set:function(_){this.textInput.setCopyWithEmptySelection(_)},initialValue:!1},cursorStyle:{set:function(_){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(_){this.setAutoScrollEditorIntoView(_)}},keyboardHandler:{set:function(_){this.setKeyboardHandler(_)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(_){this.session.setValue(_)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(_){this.setSession(_)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(_){this.renderer.$gutterLayer.setShowLineNumbers(_),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),_&&this.$relativeLineNumbers?N.attach(this):N.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(_){this.$showLineNumbers&&_?N.attach(this):N.detach(this)}},placeholder:{set:function(_){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var S=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(S&&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(!S&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),x.addCssClass(this.container,"ace_hasPlaceholder");var D=x.createElement("div");D.className="ace_placeholder",D.textContent=this.$placeholder||"",this.renderer.placeholderNode=D,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!S&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(_){var S={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(U){U.blur(),U.renderer.scroller.focus()},readOnly:!0},D=function(U){if(U.target==this.renderer.scroller&&U.keyCode===E.enter){U.preventDefault();var q=this.getCursorPosition().row;this.isRowVisible(q)||this.scrollToLine(q,!0,!0),this.focus()}},j;_?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(d.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",D.bind(this)),this.commands.addCommand(S),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),j||(j=new C(this)),j.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",D.bind(this)),this.commands.removeCommand(S),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),j&&j.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(_){this.$textInputAriaLabel=_},initialValue:""},enableMobileMenu:{set:function(_){this.$enableMobileMenu=_},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",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 N={getText:function(_,S){return(Math.abs(_.selection.lead.row-S)||S+1+(S<9?"·":""))+""},getWidth:function(_,S,D){return Math.max(S.toString().length,(D.lastRow+1).toString().length,2)*D.characterWidth},update:function(_,S){S.renderer.$loop.schedule(S.renderer.CHANGE_GUTTER)},attach:function(_){_.renderer.$gutterLayer.$renderer=this,_.on("changeSelection",this.update),this.update(null,_)},detach:function(_){_.renderer.$gutterLayer.$renderer==this&&(_.renderer.$gutterLayer.$renderer=null),_.off("changeSelection",this.update),this.update(null,_)}};r.Editor=P}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,r,m){var g=e("../lib/dom"),y=(function(){function x(h,d){this.element=h,this.canvasHeight=d||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return x.prototype.moveContainer=function(h){g.translate(this.element,0,-(h.firstRowScreen*h.lineHeight%this.canvasHeight)-h.offset*this.$offsetCoefficient)},x.prototype.pageChanged=function(h,d){return Math.floor(h.firstRowScreen*h.lineHeight/this.canvasHeight)!==Math.floor(d.firstRowScreen*d.lineHeight/this.canvasHeight)},x.prototype.computeLineTop=function(h,d,s){var a=d.firstRowScreen*d.lineHeight,u=Math.floor(a/this.canvasHeight),l=s.documentToScreenRow(h,0)*d.lineHeight;return l-u*this.canvasHeight},x.prototype.computeLineHeight=function(h,d,s){return d.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 d=g.createFragment(this.element),s=0;s<h.length;s++)d.appendChild(h[s].element);this.element.appendChild(d)}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 d=g.createFragment(this.element),s=0;s<h.length;s++)d.appendChild(h[s].element);this.element.firstChild?this.element.insertBefore(d,this.element.firstChild):this.element.appendChild(d)}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,d,s,a){var u=this.cellCache.pop();if(!u){var l=g.createElement("div");a&&a(l),this.element.appendChild(l),u={element:l,text:"",row:h}}return u.row=h,u},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,m){var g=e("../lib/dom"),y=e("../lib/oop"),x=e("../lib/lang"),h=e("../lib/event_emitter").EventEmitter,d=e("./lines").Lines,s=e("../config").nls,a=(function(){function l(o){this.element=g.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 d(this.element),this.$lines.$offsetCoefficient=1}return l.prototype.setSession=function(o){this.session&&this.session.off("change",this.$updateAnnotations),this.session=o,o&&o.on("change",this.$updateAnnotations)},l.prototype.addGutterDecoration=function(o,c){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(o,c)},l.prototype.removeGutterDecoration=function(o,c){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(o,c)},l.prototype.setAnnotations=function(o){this.$annotations=[];for(var c=0;c<o.length;c++){var p=o[c],w=p.row,b=this.$annotations[w];b||(b=this.$annotations[w]={text:[],type:[],displayText:[]});var L=p.text,M=p.text,k=p.type;L=L?x.escapeHTML(L):p.html||"",M=M||p.html||"",b.text.indexOf(L)===-1&&(b.text.push(L),b.type.push(k),b.displayText.push(M));var C=p.className;C?b.className=C:k==="error"?b.className=" ace_error":k==="security"&&!/\bace_error\b/.test(b.className)?b.className=" ace_security":k==="warning"&&!/\bace_(error|security)\b/.test(b.className)?b.className=" ace_warning":k==="info"&&!b.className?b.className=" ace_info":k==="hint"&&!b.className&&(b.className=" ace_hint")}},l.prototype.$updateAnnotations=function(o){if(this.$annotations.length){var c=o.start.row,p=o.end.row-c;if(p!==0)if(o.action=="remove")this.$annotations.splice(c,p+1,null);else{var w=new Array(p+1);w.unshift(c,1),this.$annotations.splice.apply(this.$annotations,w)}}},l.prototype.update=function(o){this.config=o;var c=this.session,p=o.firstRow,w=Math.min(o.lastRow+o.gutterOffset,c.getLength()-1);this.oldLastRow=w,this.config=o,this.$lines.moveContainer(o),this.$updateCursorRow();for(var b=c.getNextFoldLine(p),L=b?b.start.row:1/0,M=null,k=-1,C=p;;){if(C>L&&(C=b.end.row+1,b=c.getNextFoldLine(C,b),L=b?b.start.row:1/0),C>w){for(;this.$lines.getLength()>k+1;)this.$lines.pop();break}M=this.$lines.get(++k),M?M.row=C:(M=this.$lines.createCell(C,o,this.session,u),this.$lines.push(M)),this.$renderCell(M,o,b,C),C++}this._signal("afterRender"),this.$updateGutterWidth(o)},l.prototype.$updateGutterWidth=function(o){var c=this.session,p=c.gutterRenderer||this.$renderer,w=c.$firstLineNumber,b=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||c.$useWrapMode)&&(b=c.getLength()+w-1);var L=p?p.getWidth(c,b,o):b.toString().length*o.characterWidth,M=this.$padding||this.$computePadding();L+=M.left+M.right,L!==this.gutterWidth&&!isNaN(L)&&(this.gutterWidth=L,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",L))},l.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var o=this.session.selection.getCursor();this.$cursorRow!==o.row&&(this.$cursorRow=o.row)}},l.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var o=this.session.selection.cursor.row;if(this.$cursorRow=o,!(this.$cursorCell&&this.$cursorCell.row==o)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var c=this.$lines.cells;this.$cursorCell=null;for(var p=0;p<c.length;p++){var w=c[p];if(w.row>=this.$cursorRow){if(w.row>this.$cursorRow){var b=this.session.getFoldLine(this.$cursorRow);if(p>0&&b&&b.start.row==c[p-1].row)w=c[p-1];else break}w.element.className="ace_gutter-active-line "+w.element.className,this.$cursorCell=w;break}}}}},l.prototype.scrollLines=function(o){var c=this.config;if(this.config=o,this.$updateCursorRow(),this.$lines.pageChanged(c,o))return this.update(o);this.$lines.moveContainer(o);var p=Math.min(o.lastRow+o.gutterOffset,this.session.getLength()-1),w=this.oldLastRow;if(this.oldLastRow=p,!c||w<o.firstRow)return this.update(o);if(p<c.firstRow)return this.update(o);if(c.firstRow<o.firstRow)for(var b=this.session.getFoldedRowCount(c.firstRow,o.firstRow-1);b>0;b--)this.$lines.shift();if(w>p)for(var b=this.session.getFoldedRowCount(p+1,w);b>0;b--)this.$lines.pop();o.firstRow<c.firstRow&&this.$lines.unshift(this.$renderLines(o,o.firstRow,c.firstRow-1)),p>w&&this.$lines.push(this.$renderLines(o,w+1,p)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(o)},l.prototype.$renderLines=function(o,c,p){for(var w=[],b=c,L=this.session.getNextFoldLine(b),M=L?L.start.row:1/0;b>M&&(b=L.end.row+1,L=this.session.getNextFoldLine(b,L),M=L?L.start.row:1/0),!(b>p);){var k=this.$lines.createCell(b,o,this.session,u);this.$renderCell(k,o,L,b),w.push(k),b++}return w},l.prototype.$renderCell=function(o,c,p,w){var b=o.element,L=this.session,M=b.childNodes[0],k=b.childNodes[1],C=b.childNodes[2],R=b.childNodes[3],O=C.firstChild,E=L.$firstLineNumber,I=L.$breakpoints,z=L.$decorations,P=L.gutterRenderer||this.$renderer,N=this.$showFoldWidgets&&L.foldWidgets,_=p?p.start.row:Number.MAX_VALUE,S=c.lineHeight+"px",D=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",j=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",U=(P?P.getText(L,w):w+E).toString();if(this.$highlightGutterLine&&(w==this.$cursorRow||p&&w<this.$cursorRow&&w>=_&&this.$cursorRow<=p.end.row)&&(D+="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)),I[w]&&(D+=I[w]),z[w]&&(D+=z[w]),this.$annotations[w]&&w!==_&&(D+=this.$annotations[w].className),N){var q=N[w];q==null&&(q=N[w]=L.getFoldWidget(w))}if(q){var Z="ace_fold-widget ace_"+q,te=q=="start"&&w==_&&w<p.end.row;if(te){Z+=" ace_closed";for(var he="",ne=!1,le=w+1;le<=p.end.row;le++)if(this.$annotations[le]){if(this.$annotations[le].className===" ace_error"){ne=!0,he=" ace_error_fold";break}this.$annotations[le].className===" ace_security"?(ne=!0,he=" ace_security_fold"):this.$annotations[le].className===" ace_warning"&&he!==" ace_security_fold"&&(ne=!0,he=" ace_warning_fold")}D+=he}else Z+=" ace_open";k.className!=Z&&(k.className=Z),g.setStyle(k.style,"height",S),g.setStyle(k.style,"display","inline-block"),k.setAttribute("role","button"),k.setAttribute("tabindex","-1");var ue=L.getFoldWidgetRange(w);ue?k.setAttribute("aria-label",s("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[ue.start.row+1,ue.end.row+1])):p?k.setAttribute("aria-label",s("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[p.start.row+1,p.end.row+1])):k.setAttribute("aria-label",s("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[w+1])),te?(k.setAttribute("aria-expanded","false"),k.setAttribute("title",s("gutter.code-folding.closed.title","Unfold code"))):(k.setAttribute("aria-expanded","true"),k.setAttribute("title",s("gutter.code-folding.open.title","Fold code")))}else k&&(g.setStyle(k.style,"display","none"),k.setAttribute("tabindex","0"),k.removeAttribute("role"),k.removeAttribute("aria-label"));var ce=this.session.$gutterCustomWidgets[w];if(ce?this.$addCustomWidget(w,ce,o):R&&this.$removeCustomWidget(w,o),ne&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",O.className=j,O.className+=he,g.setStyle(O.style,"height",S),g.setStyle(C.style,"display","block"),g.setStyle(C.style,"height",S);var fe;switch(he){case" ace_error_fold":fe=s("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security_fold":fe=s("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning_fold":fe=s("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break}C.setAttribute("aria-label",fe),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else if(this.$annotations[w]){C.className="ace_gutter_annotation",O.className=j,this.$useSvgGutterIcons?O.className+=this.$annotations[w].className:b.classList.add(this.$annotations[w].className.replace(" ","")),g.setStyle(O.style,"height",S),g.setStyle(C.style,"display","block"),g.setStyle(C.style,"height",S);var fe;switch(this.$annotations[w].className){case" ace_error":fe=s("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security":fe=s("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning":fe=s("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break;case" ace_info":fe=s("gutter.annotation.aria-label.info","Info, read annotations row $0",[U]);break;case" ace_hint":fe=s("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[U]);break}C.setAttribute("aria-label",fe),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else g.setStyle(C.style,"display","none"),C.removeAttribute("aria-label"),C.removeAttribute("role"),C.setAttribute("tabindex","0");return U!==M.data&&(M.data=U),b.className!=D&&(b.className=D),g.setStyle(o.element.style,"height",this.$lines.computeLineHeight(w,c,L)+"px"),g.setStyle(o.element.style,"top",this.$lines.computeLineTop(w,c,L)+"px"),o.text=U,C.style.display==="none"&&k.style.display==="none"&&!ce?o.element.setAttribute("aria-hidden",!0):o.element.setAttribute("aria-hidden",!1),o},l.prototype.setHighlightGutterLine=function(o){this.$highlightGutterLine=o},l.prototype.setShowLineNumbers=function(o){this.$renderer=!o&&{getWidth:function(){return 0},getText:function(){return""}}},l.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},l.prototype.setShowFoldWidgets=function(o){o?g.addCssClass(this.element,"ace_folding-enabled"):g.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=o,this.$padding=null},l.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},l.prototype.$hideFoldWidget=function(o,c){var p=c||this.$getGutterCell(o);if(p&&p.element){var w=p.element.childNodes[1];w&&g.setStyle(w.style,"display","none")}},l.prototype.$showFoldWidget=function(o,c){var p=c||this.$getGutterCell(o);if(p&&p.element){var w=p.element.childNodes[1];w&&this.session.foldWidgets&&this.session.foldWidgets[p.row]&&g.setStyle(w.style,"display","inline-block")}},l.prototype.$getGutterCell=function(o){var c=this.$lines.cells,p=this.session.documentToScreenRow(o,0);return c[o-this.config.firstRowScreen-(o-p)]},l.prototype.$addCustomWidget=function(o,c,p){var w=c.className,b=c.label,L=c.title,M=c.callbacks;this.session.$gutterCustomWidgets[o]={className:w,label:b,title:L,callbacks:M},this.$hideFoldWidget(o,p);var k=p||this.$getGutterCell(o);if(k&&k.element){var C=k.element.querySelector(".ace_custom-widget");C&&C.remove(),C=g.createElement("span"),C.className="ace_custom-widget ".concat(w),C.setAttribute("tabindex","-1"),C.setAttribute("role","button"),C.setAttribute("aria-label",b),C.setAttribute("title",L),g.setStyle(C.style,"display","inline-block"),g.setStyle(C.style,"height","inherit"),M&&M.onClick&&C.addEventListener("click",function(R){M.onClick(R,o),R.stopPropagation()}),k.element.appendChild(C)}},l.prototype.$removeCustomWidget=function(o,c){delete this.session.$gutterCustomWidgets[o],this.$showFoldWidget(o,c);var p=c||this.$getGutterCell(o);if(p&&p.element){var w=p.element.querySelector(".ace_custom-widget");w&&p.element.removeChild(w)}},l.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var o=g.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(o.borderLeftWidth)||0)+(parseInt(o.paddingLeft)||0)+1,this.$padding.right=(parseInt(o.borderRightWidth)||0)+(parseInt(o.paddingRight)||0),this.$padding},l.prototype.getRegion=function(o){var c=this.$padding||this.$computePadding(),p=this.element.getBoundingClientRect();if(o.x<c.left+p.left)return"markers";if(this.$showFoldWidgets&&o.x>p.right-c.right)return"foldWidgets"},l})();a.prototype.$fixedWidth=!1,a.prototype.$highlightGutterLine=!0,a.prototype.$renderer="",a.prototype.$showLineNumbers=!0,a.prototype.$showFoldWidgets=!0,y.implement(a.prototype,h);function u(l){var o=document.createTextNode("");l.appendChild(o);var c=g.createElement("span");l.appendChild(c);var p=g.createElement("span");l.appendChild(p);var w=g.createElement("span");return p.appendChild(w),l}r.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,r,m){var g=e("../range").Range,y=e("../lib/dom"),x=(function(){function d(s){this.element=y.createElement("div"),this.element.className="ace_layer ace_marker-layer",s.appendChild(this.element)}return d.prototype.setPadding=function(s){this.$padding=s},d.prototype.setSession=function(s){this.session=s},d.prototype.setMarkers=function(s){this.markers=s},d.prototype.elt=function(s,a){var u=this.i!=-1&&this.element.childNodes[this.i];u?this.i++:(u=document.createElement("div"),this.element.appendChild(u),this.i=-1),u.style.cssText=a,u.className=s},d.prototype.update=function(s){if(s){this.config=s,this.i=0;var a;for(var u in this.markers){var l=this.markers[u];if(!l.range){l.update(a,this,this.session,s);continue}var o=l.range.clipRows(s.firstRow,s.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),l.renderer){var c=this.$getTop(o.start.row,s),p=this.$padding+o.start.column*s.characterWidth;l.renderer(a,o,p,c,s)}else l.type=="fullLine"?this.drawFullLineMarker(a,o,l.clazz,s):l.type=="screenLine"?this.drawScreenLineMarker(a,o,l.clazz,s):o.isMultiLine()?l.type=="text"?this.drawTextMarker(a,o,l.clazz,s):this.drawMultiLineMarker(a,o,l.clazz,s):this.drawSingleLineMarker(a,o,l.clazz+" ace_start ace_br15",s)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},d.prototype.$getTop=function(s,a){return(s-a.firstRowScreen)*a.lineHeight},d.prototype.drawTextMarker=function(s,a,u,l,o){for(var c=this.session,p=a.start.row,w=a.end.row,b=p,L=0,M=0,k=c.getScreenLastRowColumn(b),C=new g(b,a.start.column,b,M);b<=w;b++)C.start.row=C.end.row=b,C.start.column=b==p?a.start.column:c.getRowWrapIndent(b),C.end.column=k,L=M,M=k,k=b+1<w?c.getScreenLastRowColumn(b+1):b==w?0:a.end.column,this.drawSingleLineMarker(s,C,u+(b==p?" ace_start":"")+" ace_br"+h(b==p||b==p+1&&a.start.column,L<M,M>k,b==w),l,b==w?0:1,o)},d.prototype.drawMultiLineMarker=function(s,a,u,l,o){var c=this.$padding,p=l.lineHeight,w=this.$getTop(a.start.row,l),b=c+a.start.column*l.characterWidth;if(o=o||"",this.session.$bidiHandler.isBidiRow(a.start.row)){var L=a.clone();L.end.row=L.start.row,L.end.column=this.session.getLine(L.start.row).length,this.drawBidiSingleLineMarker(s,L,u+" ace_br1 ace_start",l,null,o)}else this.elt(u+" ace_br1 ace_start","height:"+p+"px;right:"+c+"px;top:"+w+"px;left:"+b+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var L=a.clone();L.start.row=L.end.row,L.start.column=0,this.drawBidiSingleLineMarker(s,L,u+" ace_br12",l,null,o)}else{w=this.$getTop(a.end.row,l);var M=a.end.column*l.characterWidth;this.elt(u+" ace_br12","height:"+p+"px;width:"+M+"px;top:"+w+"px;left:"+c+"px;"+(o||""))}if(p=(a.end.row-a.start.row-1)*l.lineHeight,!(p<=0)){w=this.$getTop(a.start.row+1,l);var k=(a.start.column?1:0)|(a.end.column?0:8);this.elt(u+(k?" ace_br"+k:""),"height:"+p+"px;right:"+c+"px;top:"+w+"px;left:"+c+"px;"+(o||""))}},d.prototype.drawSingleLineMarker=function(s,a,u,l,o,c){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(s,a,u,l,o,c);var p=l.lineHeight,w=(a.end.column+(o||0)-a.start.column)*l.characterWidth,b=this.$getTop(a.start.row,l),L=this.$padding+a.start.column*l.characterWidth;this.elt(u,"height:"+p+"px;width:"+w+"px;top:"+b+"px;left:"+L+"px;"+(c||""))},d.prototype.drawBidiSingleLineMarker=function(s,a,u,l,o,c){var p=l.lineHeight,w=this.$getTop(a.start.row,l),b=this.$padding,L=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);L.forEach(function(M){this.elt(u,"height:"+p+"px;width:"+(M.width+(o||0))+"px;top:"+w+"px;left:"+(b+M.left)+"px;"+(c||""))},this)},d.prototype.drawFullLineMarker=function(s,a,u,l,o){var c=this.$getTop(a.start.row,l),p=l.lineHeight;a.start.row!=a.end.row&&(p+=this.$getTop(a.end.row,l)-c),this.elt(u,"height:"+p+"px;top:"+c+"px;left:0;right:0;"+(o||""))},d.prototype.drawScreenLineMarker=function(s,a,u,l,o){var c=this.$getTop(a.start.row,l),p=l.lineHeight;this.elt(u,"height:"+p+"px;top:"+c+"px;left:0;right:0;"+(o||""))},d})();x.prototype.$padding=0;function h(d,s,a,u){return(d?1:0)|(s?2:0)|(a?4:0)|(u?8:0)}r.Marker=x}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,r,m){var g=new Set(["text","rparen","lparen"]);r.isTextToken=function(y){return g.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,m){var g=e("../lib/oop"),y=e("../lib/dom"),x=e("../lib/lang"),h=e("./lines").Lines,d=e("../lib/event_emitter").EventEmitter,s=e("../config").nls,a=e("./text_util").isTextToken,u=(function(){function l(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 l.prototype.$updateEolChar=function(){var o=this.session.doc,c=o.getNewLineCharacter()==`
|
216
|
+
`&&o.getNewLineMode()!="windows",p=c?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=p)return this.EOL_CHAR=p,!0},l.prototype.setPadding=function(o){this.$padding=o,this.element.style.margin="0 "+o+"px"},l.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},l.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},l.prototype.$setFontMetrics=function(o){this.$fontMetrics=o,this.$fontMetrics.on("changeCharacterSize",(function(c){this._signal("changeCharacterSize",c)}).bind(this)),this.$pollSizeChanges()},l.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},l.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},l.prototype.setSession=function(o){this.session=o,o&&this.$computeTabString()},l.prototype.setShowInvisibles=function(o){return this.showInvisibles==o?!1:(this.showInvisibles=o,typeof o=="string"?(this.showSpaces=/tab/i.test(o),this.showTabs=/space/i.test(o),this.showEOL=/eol/i.test(o)):this.showSpaces=this.showTabs=this.showEOL=o,this.$computeTabString(),!0)},l.prototype.setDisplayIndentGuides=function(o){return this.displayIndentGuides==o?!1:(this.displayIndentGuides=o,this.$computeTabString(),!0)},l.prototype.setHighlightIndentGuides=function(o){return this.$highlightIndentGuides===o?!1:(this.$highlightIndentGuides=o,o)},l.prototype.$computeTabString=function(){var o=this.session.getTabSize();this.tabSize=o;for(var c=this.$tabStrings=[0],p=1;p<o+1;p++)if(this.showTabs){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_tab",w.textContent=x.stringRepeat(this.TAB_CHAR,p),c.push(w)}else c.push(this.dom.createTextNode(x.stringRepeat(" ",p),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var b="ace_indent-guide",L=this.showSpaces?" ace_invisible ace_invisible_space":"",M=this.showSpaces?x.stringRepeat(this.SPACE_CHAR,this.tabSize):x.stringRepeat(" ",this.tabSize),k=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?x.stringRepeat(this.TAB_CHAR,this.tabSize):M,w=this.dom.createElement("span");w.className=b+L,w.textContent=M,this.$tabStrings[" "]=w;var w=this.dom.createElement("span");w.className=b+k,w.textContent=C,this.$tabStrings[" "]=w}},l.prototype.updateLines=function(o,c,p){if(this.config.lastRow!=o.lastRow||this.config.firstRow!=o.firstRow)return this.update(o);this.config=o;for(var w=Math.max(c,o.firstRow),b=Math.min(p,o.lastRow),L=this.element.childNodes,M=0,k=o.firstRow;k<w;k++){var C=this.session.getFoldLine(k);if(C)if(C.containsRow(w)){w=C.start.row;break}else k=C.end.row;M++}for(var R=!1,k=w,C=this.session.getNextFoldLine(k),O=C?C.start.row:1/0;k>O&&(k=C.end.row+1,C=this.session.getNextFoldLine(k,C),O=C?C.start.row:1/0),!(k>b);){var E=L[M++];if(E){this.dom.removeChildren(E),this.$renderLine(E,k,k==O?C:!1),R&&(E.style.top=this.$lines.computeLineTop(k,o,this.session)+"px");var I=o.lineHeight*this.session.getRowLength(k)+"px";E.style.height!=I&&(R=!0,E.style.height=I)}k++}if(R)for(;M<this.$lines.cells.length;){var z=this.$lines.cells[M++];z.element.style.top=this.$lines.computeLineTop(z.row,o,this.session)+"px"}},l.prototype.scrollLines=function(o){var c=this.config;if(this.config=o,this.$lines.pageChanged(c,o))return this.update(o);this.$lines.moveContainer(o);var p=o.lastRow,w=c?c.lastRow:-1;if(!c||w<o.firstRow)return this.update(o);if(p<c.firstRow)return this.update(o);if(!c||c.lastRow<o.firstRow)return this.update(o);if(o.lastRow<c.firstRow)return this.update(o);if(c.firstRow<o.firstRow)for(var b=this.session.getFoldedRowCount(c.firstRow,o.firstRow-1);b>0;b--)this.$lines.shift();if(c.lastRow>o.lastRow)for(var b=this.session.getFoldedRowCount(o.lastRow+1,c.lastRow);b>0;b--)this.$lines.pop();o.firstRow<c.firstRow&&this.$lines.unshift(this.$renderLinesFragment(o,o.firstRow,c.firstRow-1)),o.lastRow>c.lastRow&&this.$lines.push(this.$renderLinesFragment(o,c.lastRow+1,o.lastRow)),this.$highlightIndentGuide()},l.prototype.$renderLinesFragment=function(o,c,p){for(var w=[],b=c,L=this.session.getNextFoldLine(b),M=L?L.start.row:1/0;b>M&&(b=L.end.row+1,L=this.session.getNextFoldLine(b,L),M=L?L.start.row:1/0),!(b>p);){var k=this.$lines.createCell(b,o,this.session),C=k.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==M?L:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",w.push(k),b++}return w},l.prototype.update=function(o){this.$lines.moveContainer(o),this.config=o;for(var c=o.firstRow,p=o.lastRow,w=this.$lines;w.getLength();)w.pop();w.push(this.$renderLinesFragment(o,c,p))},l.prototype.$renderToken=function(o,c,p,w){for(var b=this,L=/(\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,M=this.dom.createFragment(this.element),k,C=0;k=L.exec(w);){var R=k[1],O=k[2],E=k[3],I=k[4],z=k[5];if(!(!b.showSpaces&&O)){var P=C!=k.index?w.slice(C,k.index):"";if(C=k.index+k[0].length,P&&M.appendChild(this.dom.createTextNode(P,this.element)),R){var N=b.session.getScreenTabSize(c+k.index),_=b.$tabStrings[N].cloneNode(!0);_.charCount=1,M.appendChild(_),c+=N-1}else if(O)if(b.showSpaces){var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_space",S.textContent=x.stringRepeat(b.SPACE_CHAR,O.length),M.appendChild(S)}else M.appendChild(this.dom.createTextNode(O,this.element));else if(E){var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_space ace_invalid",S.textContent=x.stringRepeat(b.SPACE_CHAR,E.length),M.appendChild(S)}else if(I){c+=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,M.appendChild(S)}else if(z){c+=1;var S=this.dom.createElement("span");S.style.width=b.config.characterWidth*2+"px",S.className="ace_cjk",S.textContent=z,M.appendChild(S)}}}if(M.appendChild(this.dom.createTextNode(C?w.slice(C):w,this.element)),a(p.type))o.appendChild(M);else{var D="ace_"+p.type.replace(/\./g," ace_"),S=this.dom.createElement("span");p.type=="fold"&&(S.style.width=p.value.length*this.config.characterWidth+"px",S.setAttribute("title",s("inline-fold.closed.title","Unfold code"))),S.className=D,S.appendChild(M),o.appendChild(S)}return c+w.length},l.prototype.renderIndentGuide=function(o,c,p){var w=c.search(this.$indentGuideRe);if(w<=0||w>=p)return c;if(c[0]==" "){w-=w%this.tabSize;for(var b=w/this.tabSize,L=0;L<b;L++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),c.substr(w)}else if(c[0]==" "){for(var L=0;L<w;L++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),c.substr(w)}return this.$highlightIndentGuide(),c},l.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var o=this.session.doc.$lines;if(o){var c=this.session.selection.getCursor(),p=/^\s*/.exec(this.session.doc.getLine(c.row))[0].length,w=Math.floor(p/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:w,start:c.row};var b=this.session.$bracketHighlight;if(b){for(var L=this.session.$bracketHighlight.ranges,M=0;M<L.length;M++)if(c.row!==L[M].start.row){this.$highlightIndentGuideMarker.end=L[M].start.row+1,c.row>L[M].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&o[c.row]!==""&&c.column===o[c.row].length){this.$highlightIndentGuideMarker.dir=1;for(var M=c.row+1;M<o.length;M++){var k=o[M],C=/^\s*/.exec(k)[0].length;if(k!==""&&(this.$highlightIndentGuideMarker.end=M,C<=p))break}}this.$renderHighlightIndentGuide()}}},l.prototype.$clearActiveIndentGuide=function(){for(var o=this.element.querySelectorAll(".ace_indent-guide-active"),c=0;c<o.length;c++)o[c].classList.remove("ace_indent-guide-active")},l.prototype.$setIndentGuideActive=function(o,c){var p=this.session.doc.getLine(o.row);if(p!==""){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 L=b[c-1];L&&L.classList&&L.classList.contains("ace_indent-guide")&&L.classList.add("ace_indent-guide-active")}}},l.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var o=this.$lines.cells;this.$clearActiveIndentGuide();var c=this.$highlightIndentGuideMarker.indentLevel;if(c!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var p=0;p<o.length;p++){var w=o[p];if(this.$highlightIndentGuideMarker.end&&w.row>=this.$highlightIndentGuideMarker.start+1){if(w.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,c)}}else for(var p=o.length-1;p>=0;p--){var w=o[p];if(this.$highlightIndentGuideMarker.end&&w.row<this.$highlightIndentGuideMarker.start){if(w.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,c)}}}},l.prototype.$createLineElement=function(o){var c=this.dom.createElement("div");return c.className="ace_line",c.style.height=this.config.lineHeight+"px",c},l.prototype.$renderWrappedLine=function(o,c,p){var w=0,b=0,L=p[0],M=0,k=this.$createLineElement();o.appendChild(k);for(var C=0;C<c.length;C++){var R=c[C],O=R.value;if(C==0&&this.displayIndentGuides){if(w=O.length,O=this.renderIndentGuide(k,O,L),!O)continue;w-=O.length}if(w+O.length<L)M=this.$renderToken(k,M,R,O),w+=O.length;else{for(;w+O.length>=L;){M=this.$renderToken(k,M,R,O.substring(0,L-w)),O=O.substring(L-w),w=L,k=this.$createLineElement(),o.appendChild(k);var E=this.dom.createTextNode(x.stringRepeat(" ",p.indent),this.element);E.charCount=0,k.appendChild(E),b++,M=0,L=p[b]||Number.MAX_VALUE}O.length!=0&&(w+=O.length,M=this.$renderToken(k,M,R,O))}}p[p.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(k,M,null,"",!0)},l.prototype.$renderSimpleLine=function(o,c){for(var p=0,w=0;w<c.length;w++){var b=c[w],L=b.value;if(!(w==0&&this.displayIndentGuides&&(L=this.renderIndentGuide(o,L),!L))){if(p+L.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(o,p,b,L);p=this.$renderToken(o,p,b,L)}}},l.prototype.$renderOverflowMessage=function(o,c,p,w,b){p&&this.$renderToken(o,c,p,w.slice(0,this.MAX_LINE_LENGTH-c));var L=this.dom.createElement("span");L.className="ace_inline_button ace_keyword ace_toggle_wrap",L.textContent=b?"<hide>":"<click to see more...>",o.appendChild(L)},l.prototype.$renderLine=function(o,c,p){if(!p&&p!=!1&&(p=this.session.getFoldLine(c)),p)var w=this.$getFoldLineTokens(c,p);else var w=this.session.getTokens(c);var b=o;if(w.length){var L=this.session.getRowSplitData(c);if(L&&L.length){this.$renderWrappedLine(o,w,L);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){p&&(c=p.end.row);var M=this.dom.createElement("span");M.className="ace_invisible ace_invisible_eol",M.textContent=c==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,b.appendChild(M)}},l.prototype.$getFoldLineTokens=function(o,c){var p=this.session,w=[];function b(M,k,C){for(var R=0,O=0;O+M[R].value.length<k;)if(O+=M[R].value.length,R++,R==M.length)return;if(O!=k){var E=M[R].value.substring(k-O);E.length>C-k&&(E=E.substring(0,C-k)),w.push({type:M[R].type,value:E}),O=k+E.length,R+=1}for(;O<C&&R<M.length;){var E=M[R].value;E.length+O>C?w.push({type:M[R].type,value:E.substring(0,C-O)}):w.push(M[R]),O+=E.length,R+=1}}var L=p.getTokens(o);return c.walk(function(M,k,C,R,O){M!=null?w.push({type:"fold",value:M}):(O&&(L=p.getTokens(k)),L.length&&b(L,R,C))},c.end.row,this.session.getLine(c.end.row).length),w},l.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},l})();u.prototype.EOF_CHAR="¶",u.prototype.EOL_CHAR_LF="¬",u.prototype.EOL_CHAR_CRLF="¤",u.prototype.EOL_CHAR=u.prototype.EOL_CHAR_LF,u.prototype.TAB_CHAR="—",u.prototype.SPACE_CHAR="·",u.prototype.$padding=0,u.prototype.MAX_LINE_LENGTH=1e4,u.prototype.showInvisibles=!1,u.prototype.showSpaces=!1,u.prototype.showTabs=!1,u.prototype.showEOL=!1,u.prototype.displayIndentGuides=!0,u.prototype.$highlightIndentGuides=!0,u.prototype.$tabStrings=[],u.prototype.destroy={},u.prototype.onChangeTabSize=u.prototype.$computeTabString,g.implement(u.prototype,d),r.Text=u}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,r,m){var g=e("../lib/dom"),y=(function(){function x(h){this.element=g.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(),g.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return x.prototype.$updateOpacity=function(h){for(var d=this.cursors,s=d.length;s--;)g.setStyle(d[s].style,"opacity",h?"":"0")},x.prototype.$startCssAnimation=function(){for(var h=this.cursors,d=h.length;d--;)h[d].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&g.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},x.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,g.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,g.setCssClass(this.element,"ace_smooth-blinking",h),this.$updateCursors(!0),this.restartTimer())},x.prototype.addCursor=function(){var h=g.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,g.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},x.prototype.showCursor=function(){this.isVisible=!0,g.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,g.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&&g.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),g.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var d=(function(){this.timeoutId=setTimeout(function(){h(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){h(!0),d()},this.blinkInterval),d()}},x.prototype.getPixelPosition=function(h,d){if(!this.config||!this.session)return{left:0,top:0};h||(h=this.session.selection.getCursor());var s=this.session.documentToScreenPosition(h),a=this.$padding+(this.session.$bidiHandler.isBidiRow(s.row,h.row)?this.session.$bidiHandler.getPosLeft(s.column):s.column*this.config.characterWidth),u=(s.row-(d?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:a,top:u}},x.prototype.isCursorInView=function(h,d){return h.top>=0&&h.top<d.maxHeight},x.prototype.update=function(h){this.config=h;var d=this.session.$selectionMarkers,s=0,a=0;(d===void 0||d.length===0)&&(d=[{cursor:null}]);for(var s=0,u=d.length;s<u;s++){var l=this.getPixelPosition(d[s].cursor,!0);if(!((l.top>h.height+h.offset||l.top<0)&&s>1)){var o=this.cursors[a++]||this.addCursor(),c=o.style;this.drawCursor?this.drawCursor(o,l,h,d[s],this.session):this.isCursorInView(l,h)?(g.setStyle(c,"display","block"),g.translate(o,l.left,l.top),g.setStyle(c,"width",Math.round(h.characterWidth)+"px"),g.setStyle(c,"height",h.lineHeight+"px")):g.setStyle(c,"display","none")}}for(;this.cursors.length>a;)this.removeCursor();var p=this.session.getOverwrite();this.$setOverwrite(p),this.$pixelPos=l,this.restartTimer()},x.prototype.$setOverwrite=function(h){h!=this.overwrite&&(this.overwrite=h,h?g.addCssClass(this.element,"ace_overwrite-cursors"):g.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,m){var g=this&&this.__extends||(function(){var o=function(c,p){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,b){w.__proto__=b}||function(w,b){for(var L in b)Object.prototype.hasOwnProperty.call(b,L)&&(w[L]=b[L])},o(c,p)};return function(c,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");o(c,p);function w(){this.constructor=c}c.prototype=p===null?Object.create(p):(w.prototype=p.prototype,new w)}})(),y=e("./lib/oop"),x=e("./lib/dom"),h=e("./lib/event"),d=e("./lib/event_emitter").EventEmitter,s=32768,a=(function(){function o(c,p){this.element=x.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+p,this.inner=x.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),c.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,h.addListener(this.element,"scroll",this.onScroll.bind(this)),h.addListener(this.element,"mousedown",h.preventDefault)}return o.prototype.setVisible=function(c){this.element.style.display=c?"":"none",this.isVisible=c,this.coeff=1},o})();y.implement(a.prototype,d);var u=(function(o){g(c,o);function c(p,w){var b=o.call(this,p,"-v")||this;return b.scrollTop=0,b.scrollHeight=0,w.$scrollbarWidth=b.width=x.scrollbarWidth(p.ownerDocument),b.inner.style.width=b.element.style.width=(b.width||15)+5+"px",b.$minWidth=0,b}return c.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var p=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-p)/(this.coeff-p)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},c.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},c.prototype.setHeight=function(p){this.element.style.height=p+"px"},c.prototype.setScrollHeight=function(p){this.scrollHeight=p,p>s?(this.coeff=s/p,p=s):this.coeff!=1&&(this.coeff=1),this.inner.style.height=p+"px"},c.prototype.setScrollTop=function(p){this.scrollTop!=p&&(this.skipEvent=!0,this.scrollTop=p,this.element.scrollTop=p*this.coeff)},c})(a);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var l=(function(o){g(c,o);function c(p,w){var b=o.call(this,p,"-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 c.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},c.prototype.getHeight=function(){return this.isVisible?this.height:0},c.prototype.setWidth=function(p){this.element.style.width=p+"px"},c.prototype.setInnerWidth=function(p){this.inner.style.width=p+"px"},c.prototype.setScrollWidth=function(p){this.inner.style.width=p+"px"},c.prototype.setScrollLeft=function(p){this.scrollLeft!=p&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=p)},c})(a);r.ScrollBar=u,r.ScrollBarV=u,r.ScrollBarH=l,r.VScrollBar=u,r.HScrollBar=l}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,m){var g=this&&this.__extends||(function(){var l=function(o,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,w){p.__proto__=w}||function(p,w){for(var b in w)Object.prototype.hasOwnProperty.call(w,b)&&(p[b]=w[b])},l(o,c)};return function(o,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(o,c);function p(){this.constructor=o}o.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p)}})(),y=e("./lib/oop"),x=e("./lib/dom"),h=e("./lib/event"),d=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 l(o,c){this.element=x.createElement("div"),this.element.className="ace_sb"+c,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 l.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1},l})();y.implement(s.prototype,d);var a=(function(l){g(o,l);function o(c,p){var w=l.call(this,c,"-v")||this;return w.scrollTop=0,w.scrollHeight=0,w.parent=c,w.width=w.VScrollWidth,w.renderer=p,w.inner.style.width=w.element.style.width=(w.width||15)+"px",w.$minWidth=0,w}return o.prototype.onMouseDown=function(c,p){if(c==="mousedown"&&!(h.getButton(p)!==0||p.detail===2)){if(p.target===this.inner){var w=this,b=p.clientY,L=function(I){b=I.clientY},M=function(){clearInterval(O)},k=p.clientY,C=this.thumbTop,R=function(){if(b!==void 0){var I=w.scrollTopFromThumbTop(C+b-k);I!==w.scrollTop&&w._emit("scroll",{data:I})}};h.capture(this.inner,L,M);var O=setInterval(R,20);return h.preventDefault(p)}var E=p.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(E)}),h.preventDefault(p)}},o.prototype.getHeight=function(){return this.height},o.prototype.scrollTopFromThumbTop=function(c){var p=c*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return p=p>>0,p<0?p=0:p>this.pageHeight-this.viewHeight&&(p=this.pageHeight-this.viewHeight),p},o.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},o.prototype.setHeight=function(c){this.height=Math.max(0,c),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},o.prototype.setScrollHeight=function(c,p){this.pageHeight===c&&!p||(this.pageHeight=c,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},o.prototype.setScrollTop=function(c){this.scrollTop=c,c<0&&(c=0),this.thumbTop=c*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},o})(s);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var u=(function(l){g(o,l);function o(c,p){var w=l.call(this,c,"-h")||this;return w.scrollLeft=0,w.scrollWidth=0,w.height=w.HScrollHeight,w.inner.style.height=w.element.style.height=(w.height||12)+"px",w.renderer=p,w}return o.prototype.onMouseDown=function(c,p){if(c==="mousedown"&&!(h.getButton(p)!==0||p.detail===2)){if(p.target===this.inner){var w=this,b=p.clientX,L=function(I){b=I.clientX},M=function(){clearInterval(O)},k=p.clientX,C=this.thumbLeft,R=function(){if(b!==void 0){var I=w.scrollLeftFromThumbLeft(C+b-k);I!==w.scrollLeft&&w._emit("scroll",{data:I})}};h.capture(this.inner,L,M);var O=setInterval(R,20);return h.preventDefault(p)}var E=p.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(E)}),h.preventDefault(p)}},o.prototype.getHeight=function(){return this.isVisible?this.height:0},o.prototype.scrollLeftFromThumbLeft=function(c){var p=c*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return p=p>>0,p<0?p=0:p>this.pageWidth-this.viewWidth&&(p=this.pageWidth-this.viewWidth),p},o.prototype.setWidth=function(c){this.width=Math.max(0,c),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},o.prototype.setScrollWidth=function(c,p){this.pageWidth===c&&!p||(this.pageWidth=c,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},o.prototype.setScrollLeft=function(c){this.scrollLeft=c,c<0&&(c=0),this.thumbLeft=c*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},o})(s);u.prototype.setInnerWidth=u.prototype.setScrollWidth,r.ScrollBar=a,r.ScrollBarV=a,r.ScrollBarH=u,r.VScrollBar=a,r.HScrollBar=u}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,r,m){var g=e("./lib/event"),y=(function(){function x(h,d){this.onRender=h,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=d||window;var s=this;this._flush=function(a){s.pending=!1;var u=s.changes;if(u&&(g.blockIdle(100),s.changes=0,s.onRender(u)),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&&(g.nextFrame(this._flush),this.pending=!0)},x.prototype.clear=function(h){var d=this.changes;return this.changes=0,d},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,m){var g=e("../lib/oop"),y=e("../lib/dom"),x=e("../lib/lang"),h=e("../lib/event"),d=e("../lib/useragent"),s=e("../lib/event_emitter").EventEmitter,a=512,u=typeof ResizeObserver=="function",l=200,o=(function(){function c(p){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),p.appendChild(this.el),this.$measureNode.textContent=x.stringRepeat("X",a),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()}return c.prototype.$setMeasureNodeStyles=function(p,w){p.width=p.height="auto",p.left=p.top="0px",p.visibility="hidden",p.position="absolute",p.whiteSpace="pre",d.isIE<8?p["font-family"]="inherit":p.font="inherit",p.overflow=w?"hidden":"visible"},c.prototype.checkForSizeChanges=function(p){if(p===void 0&&(p=this.$measureSizes()),p&&(this.$characterSize.width!==p.width||this.$characterSize.height!==p.height)){this.$measureNode.style.fontWeight="bold";var w=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=p,this.charSizes=Object.create(null),this.allowBoldFonts=w&&w.width===p.width&&w.height===p.height,this._emit("changeCharacterSize",{data:p})}},c.prototype.$addObserver=function(){var p=this;this.$observer=new window.ResizeObserver(function(w){p.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},c.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var p=this;return this.$pollSizeChangesTimer=h.onIdle(function w(){p.checkForSizeChanges(),h.onIdle(w,500)},500)},c.prototype.setPolling=function(p){p?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},c.prototype.$measureSizes=function(p){var w={height:(p||this.$measureNode).clientHeight,width:(p||this.$measureNode).clientWidth/a};return w.width===0||w.height===0?null:w},c.prototype.$measureCharWidth=function(p){this.$main.textContent=x.stringRepeat(p,a);var w=this.$main.getBoundingClientRect();return w.width/a},c.prototype.getCharacterWidth=function(p){var w=this.charSizes[p];return w===void 0&&(w=this.charSizes[p]=this.$measureCharWidth(p)/this.$characterSize.width),w},c.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},c.prototype.$getZoom=function(p){return!p||!p.parentElement?1:(Number(window.getComputedStyle(p).zoom)||1)*this.$getZoom(p.parentElement)},c.prototype.$initTransformMeasureNodes=function(){var p=function(w,b){return["div",{style:"position: absolute;top:"+w+"px;left:"+b+"px;"}]};this.els=y.buildDom([p(0,0),p(l,0),p(0,l),p(l,l)],this.el)},c.prototype.transformCoordinates=function(p,w){if(p){var b=this.$getZoom(this.el);p=C(1/b,p)}function L(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 M(Z,te){return[Z[0]-te[0],Z[1]-te[1]]}function k(Z,te){return[Z[0]+te[0],Z[1]+te[1]]}function C(Z,te){return[Z*te[0],Z*te[1]]}this.els||this.$initTransformMeasureNodes();function R(Z){var te=Z.getBoundingClientRect();return[te.left,te.top]}var O=R(this.els[0]),E=R(this.els[1]),I=R(this.els[2]),z=R(this.els[3]),P=L(M(z,E),M(z,I),M(k(E,I),k(z,O))),N=C(1+P[0],M(E,O)),_=C(1+P[1],M(I,O));if(w){var S=w,D=P[0]*S[0]/l+P[1]*S[1]/l+1,j=k(C(S[0],N),C(S[1],_));return k(C(1/D/l,j),O)}var U=M(p,O),q=L(M(N,C(P[0],U)),M(_,C(P[1],U)),U);return C(l,q)},c})();o.prototype.$characterSize={width:0,height:0},g.implement(o.prototype,s),r.FontMetrics=o}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,r,m){m.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: absolute;
|
706
|
+
z-index: 999999;
|
707
|
+
box-sizing: border-box;
|
708
|
+
cursor: default;
|
709
|
+
white-space: pre-wrap;
|
710
|
+
word-wrap: break-word;
|
711
|
+
line-height: normal;
|
712
|
+
font-style: normal;
|
713
|
+
font-weight: normal;
|
714
|
+
letter-spacing: normal;
|
715
|
+
pointer-events: none;
|
716
|
+
overflow: auto;
|
717
|
+
max-width: min(33em, 66vw);
|
718
|
+
overscroll-behavior: contain;
|
719
|
+
}
|
720
|
+
.ace_tooltip pre {
|
721
|
+
white-space: pre-wrap;
|
722
|
+
}
|
723
|
+
|
724
|
+
.ace_tooltip.ace_dark {
|
725
|
+
background-color: #636363;
|
726
|
+
color: #fff;
|
727
|
+
}
|
728
|
+
|
729
|
+
.ace_tooltip:focus {
|
730
|
+
outline: 1px solid #5E9ED6;
|
731
|
+
}
|
732
|
+
|
733
|
+
.ace_icon {
|
734
|
+
display: inline-block;
|
735
|
+
width: 18px;
|
736
|
+
vertical-align: top;
|
737
|
+
}
|
738
|
+
|
739
|
+
.ace_icon_svg {
|
740
|
+
display: inline-block;
|
741
|
+
width: 12px;
|
742
|
+
vertical-align: top;
|
743
|
+
-webkit-mask-repeat: no-repeat;
|
744
|
+
-webkit-mask-size: 12px;
|
745
|
+
-webkit-mask-position: center;
|
746
|
+
}
|
747
|
+
|
748
|
+
.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
|
749
|
+
padding-right: 13px;
|
750
|
+
}
|
751
|
+
|
752
|
+
.ace_fold-widget, .ace_custom-widget {
|
753
|
+
box-sizing: border-box;
|
754
|
+
|
755
|
+
margin: 0 -12px 0 1px;
|
756
|
+
display: none;
|
757
|
+
width: 11px;
|
758
|
+
vertical-align: top;
|
759
|
+
|
760
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
|
761
|
+
background-repeat: no-repeat;
|
762
|
+
background-position: center;
|
763
|
+
|
764
|
+
border-radius: 3px;
|
765
|
+
|
766
|
+
border: 1px solid transparent;
|
767
|
+
cursor: pointer;
|
768
|
+
pointer-events: auto;
|
769
|
+
}
|
770
|
+
|
771
|
+
.ace_custom-widget {
|
772
|
+
background: none;
|
773
|
+
}
|
774
|
+
|
775
|
+
.ace_folding-enabled .ace_fold-widget {
|
776
|
+
display: inline-block;
|
777
|
+
}
|
778
|
+
|
779
|
+
.ace_fold-widget.ace_end {
|
780
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
781
|
+
}
|
782
|
+
|
783
|
+
.ace_fold-widget.ace_closed {
|
784
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
785
|
+
}
|
786
|
+
|
787
|
+
.ace_fold-widget:hover {
|
788
|
+
border: 1px solid rgba(0, 0, 0, 0.3);
|
789
|
+
background-color: rgba(255, 255, 255, 0.2);
|
790
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
791
|
+
}
|
792
|
+
|
793
|
+
.ace_fold-widget:active {
|
794
|
+
border: 1px solid rgba(0, 0, 0, 0.4);
|
795
|
+
background-color: rgba(0, 0, 0, 0.05);
|
796
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
797
|
+
}
|
798
|
+
/**
|
799
|
+
* Dark version for fold widgets
|
800
|
+
*/
|
801
|
+
.ace_dark .ace_fold-widget {
|
802
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
803
|
+
}
|
804
|
+
.ace_dark .ace_fold-widget.ace_end {
|
805
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
806
|
+
}
|
807
|
+
.ace_dark .ace_fold-widget.ace_closed {
|
808
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
809
|
+
}
|
810
|
+
.ace_dark .ace_fold-widget:hover {
|
811
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
812
|
+
background-color: rgba(255, 255, 255, 0.1);
|
813
|
+
}
|
814
|
+
.ace_dark .ace_fold-widget:active {
|
815
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
816
|
+
}
|
817
|
+
|
818
|
+
.ace_inline_button {
|
819
|
+
border: 1px solid lightgray;
|
820
|
+
display: inline-block;
|
821
|
+
margin: -1px 8px;
|
822
|
+
padding: 0 5px;
|
823
|
+
pointer-events: auto;
|
824
|
+
cursor: pointer;
|
825
|
+
}
|
826
|
+
.ace_inline_button:hover {
|
827
|
+
border-color: gray;
|
828
|
+
background: rgba(200,200,200,0.2);
|
829
|
+
display: inline-block;
|
830
|
+
pointer-events: auto;
|
831
|
+
}
|
832
|
+
|
833
|
+
.ace_fold-widget.ace_invalid {
|
834
|
+
background-color: #FFB4B4;
|
835
|
+
border-color: #DE5555;
|
836
|
+
}
|
837
|
+
|
838
|
+
.ace_fade-fold-widgets .ace_fold-widget {
|
839
|
+
transition: opacity 0.4s ease 0.05s;
|
840
|
+
opacity: 0;
|
841
|
+
}
|
842
|
+
|
843
|
+
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
844
|
+
transition: opacity 0.05s ease 0.05s;
|
845
|
+
opacity:1;
|
846
|
+
}
|
847
|
+
|
848
|
+
.ace_underline {
|
849
|
+
text-decoration: underline;
|
850
|
+
}
|
851
|
+
|
852
|
+
.ace_bold {
|
853
|
+
font-weight: bold;
|
854
|
+
}
|
855
|
+
|
856
|
+
.ace_nobold .ace_bold {
|
857
|
+
font-weight: normal;
|
858
|
+
}
|
859
|
+
|
860
|
+
.ace_italic {
|
861
|
+
font-style: italic;
|
862
|
+
}
|
863
|
+
|
864
|
+
|
865
|
+
.ace_error-marker {
|
866
|
+
background-color: rgba(255, 0, 0,0.2);
|
867
|
+
position: absolute;
|
868
|
+
z-index: 9;
|
869
|
+
}
|
870
|
+
|
871
|
+
.ace_highlight-marker {
|
872
|
+
background-color: rgba(255, 255, 0,0.2);
|
873
|
+
position: absolute;
|
874
|
+
z-index: 8;
|
875
|
+
}
|
876
|
+
|
877
|
+
.ace_mobile-menu {
|
878
|
+
position: absolute;
|
879
|
+
line-height: 1.5;
|
880
|
+
border-radius: 4px;
|
881
|
+
-ms-user-select: none;
|
882
|
+
-moz-user-select: none;
|
883
|
+
-webkit-user-select: none;
|
884
|
+
user-select: none;
|
885
|
+
background: white;
|
886
|
+
box-shadow: 1px 3px 2px grey;
|
887
|
+
border: 1px solid #dcdcdc;
|
888
|
+
color: black;
|
889
|
+
}
|
890
|
+
.ace_dark > .ace_mobile-menu {
|
891
|
+
background: #333;
|
892
|
+
color: #ccc;
|
893
|
+
box-shadow: 1px 3px 2px grey;
|
894
|
+
border: 1px solid #444;
|
895
|
+
|
896
|
+
}
|
897
|
+
.ace_mobile-button {
|
898
|
+
padding: 2px;
|
899
|
+
cursor: pointer;
|
900
|
+
overflow: hidden;
|
901
|
+
}
|
902
|
+
.ace_mobile-button:hover {
|
903
|
+
background-color: #eee;
|
904
|
+
opacity:1;
|
905
|
+
}
|
906
|
+
.ace_mobile-button:active {
|
907
|
+
background-color: #ddd;
|
908
|
+
}
|
909
|
+
|
910
|
+
.ace_placeholder {
|
911
|
+
position: relative;
|
912
|
+
font-family: arial;
|
913
|
+
transform: scale(0.9);
|
914
|
+
transform-origin: left;
|
915
|
+
white-space: pre;
|
916
|
+
opacity: 0.7;
|
917
|
+
margin: 0 10px;
|
918
|
+
z-index: 1;
|
919
|
+
}
|
920
|
+
|
921
|
+
.ace_ghost_text {
|
922
|
+
opacity: 0.5;
|
923
|
+
font-style: italic;
|
924
|
+
}
|
925
|
+
|
926
|
+
.ace_ghost_text_container > div {
|
927
|
+
white-space: pre;
|
928
|
+
}
|
929
|
+
|
930
|
+
.ghost_text_line_wrapped::after {
|
931
|
+
content: "↩";
|
932
|
+
position: absolute;
|
933
|
+
}
|
934
|
+
|
935
|
+
.ace_lineWidgetContainer.ace_ghost_text {
|
936
|
+
margin: 0px 4px
|
937
|
+
}
|
938
|
+
|
939
|
+
.ace_screenreader-only {
|
940
|
+
position:absolute;
|
941
|
+
left:-10000px;
|
942
|
+
top:auto;
|
943
|
+
width:1px;
|
944
|
+
height:1px;
|
945
|
+
overflow:hidden;
|
946
|
+
}
|
947
|
+
|
948
|
+
.ace_hidden_token {
|
949
|
+
display: none;
|
950
|
+
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,r,m){var g=e("../lib/dom"),y=e("../lib/oop"),x=e("../lib/event_emitter").EventEmitter,h=(function(){function d(s,a){this.renderer=a,this.pixelRatio=1,this.maxHeight=a.layerConfig.maxHeight,this.lineHeight=a.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(s)}return d.prototype.$createCanvas=function(){this.canvas=g.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},d.prototype.setScrollBarV=function(s){this.$createCanvas(),this.scrollbarV=s,s.element.appendChild(this.canvas),this.setDimensions()},d.prototype.$updateDecorators=function(s){if(typeof this.canvas.getContext!="function")return;var a=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(s);var u=this.canvas.getContext("2d");function l(N,_){return N.priority<_.priority?-1:N.priority>_.priority?1:0}var o=this.renderer.session.$annotations;if(u.clearRect(0,0,this.canvas.width,this.canvas.height),o){var c={info:1,warning:2,error:3};o.forEach(function(N){N.priority=c[N.type]||null}),o=o.sort(l);for(var p=0;p<o.length;p++){var w=o[p].row,b=this.getVerticalOffsetForRow(w),L=b+this.lineHeight,M=Math.round(this.heightRatio*b),k=Math.round(this.heightRatio*L),C=Math.round((M+k)/2),R=k-C;R<this.halfMinDecorationHeight&&(R=this.halfMinDecorationHeight),C-R<0&&(C=R),C+R>this.canvasHeight&&(C=this.canvasHeight-R);var O=C-R,E=C+R,I=E-O;u.fillStyle=a[o[p].type]||null,u.fillRect(0,O,Math.round(this.oneZoneWidth-1),I)}}var z=this.renderer.session.selection.getCursor();if(z){var P=Math.round(this.getVerticalOffsetForRow(z.row)*this.heightRatio);u.fillStyle="rgba(0, 0, 0, 0.5)",u.fillRect(0,P,this.canvasWidth,2)}},d.prototype.getVerticalOffsetForRow=function(s){s=s|0;var a=this.renderer.session.documentToScreenRow(s,0)*this.lineHeight;return a},d.prototype.setDimensions=function(s){s=s||this.renderer.layerConfig,this.maxHeight=s.maxHeight,this.lineHeight=s.lineHeight,this.canvasHeight=s.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},d.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},d.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},d})();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,m){var g=e("./lib/oop"),y=e("./lib/dom"),x=e("./lib/lang"),h=e("./config"),d=e("./layer/gutter").Gutter,s=e("./layer/marker").Marker,a=e("./layer/text").Text,u=e("./layer/cursor").Cursor,l=e("./scrollbar").HScrollBar,o=e("./scrollbar").VScrollBar,c=e("./scrollbar_custom").HScrollBar,p=e("./scrollbar_custom").VScrollBar,w=e("./renderloop").RenderLoop,b=e("./layer/font_metrics").FontMetrics,L=e("./lib/event_emitter").EventEmitter,M=e("./css/editor-css"),k=e("./layer/decorators").Decorator,C=e("./lib/useragent"),R=e("./layer/text_util").isTextToken;y.importCssString(M,"ace_editor.css",!1);var O=(function(){function E(I,z){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(z),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 d(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new s(this.content);var N=this.$textLayer=new a(this.content);this.canvas=N.element,this.$markerFront=new s(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new o(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.on("scroll",function(_){P.$scrollAnimation||P.session.setScrollTop(_.data-P.scrollMargin.top)}),this.scrollBarH.on("scroll",function(_){P.$scrollAnimation||P.session.setScrollLeft(_.data-P.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new b(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(_){P.updateCharacterSize(),P.onResize(!0,P.gutterWidth,P.$size.width,P.$size.height),P._signal("changeCharacterSize",_)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!C.isIOS,this.$loop=new w(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),h.resetOptions(this),h._signal("renderer",this)}return E.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")},E.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))},E.prototype.updateLines=function(I,z,P){if(z===void 0&&(z=1/0),this.$changedLines?(this.$changedLines.firstRow>I&&(this.$changedLines.firstRow=I),this.$changedLines.lastRow<z&&(this.$changedLines.lastRow=z)):this.$changedLines={firstRow:I,lastRow:z},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)},E.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},E.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},E.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},E.prototype.updateFull=function(I){I?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},E.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},E.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},E.prototype.onResize=function(I,z,P,N){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=I?1:0;var _=this.container;N||(N=_.clientHeight||_.scrollHeight),!N&&this.$maxLines&&this.lineHeight>1&&(!_.style.height||_.style.height=="0px")&&(_.style.height="1px",N=_.clientHeight||_.scrollHeight),P||(P=_.clientWidth||_.scrollWidth);var S=this.$updateCachedSize(I,z,P,N);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!P&&!N)return this.resizing=0;I&&(this.$gutterLayer.$padding=null),I?this.$renderChanges(S|this.$changes,!0):this.$loop.schedule(S|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},E.prototype.$updateCachedSize=function(I,z,P,N){N-=this.$extraHeight||0;var _=0,S=this.$size,D={width:S.width,height:S.height,scrollerHeight:S.scrollerHeight,scrollerWidth:S.scrollerWidth};if(N&&(I||S.height!=N)&&(S.height=N,_|=this.CHANGE_SIZE,S.scrollerHeight=S.height,this.$horizScroll&&(S.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(S.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",_=_|this.CHANGE_SCROLL),P&&(I||S.width!=P)){_|=this.CHANGE_SIZE,S.width=P,z==null&&(z=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=z,y.setStyle(this.scrollBarH.element.style,"left",z+"px"),y.setStyle(this.scroller.style,"left",z+this.margin.left+"px"),S.scrollerWidth=Math.max(0,P-z-this.scrollBarV.getWidth()-this.margin.h),y.setStyle(this.$gutter.style,"left",this.margin.left+"px");var j=this.scrollBarV.getWidth()+"px";y.setStyle(this.scrollBarH.element.style,"right",j),y.setStyle(this.scroller.style,"right",j),y.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(S.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||I)&&(_|=this.CHANGE_FULL)}return S.$dirty=!P||!N,_&&this._signal("resize",D),_},E.prototype.onGutterResize=function(I){var z=this.$showGutter?I:0;z!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,z,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()},E.prototype.adjustWrapLimit=function(){var I=this.$size.scrollerWidth-this.$padding*2,z=Math.floor(I/this.characterWidth);return this.session.adjustWrapLimit(z,this.$showPrintMargin&&this.$printMarginColumn)},E.prototype.setAnimatedScroll=function(I){this.setOption("animatedScroll",I)},E.prototype.getAnimatedScroll=function(){return this.$animatedScroll},E.prototype.setShowInvisibles=function(I){this.setOption("showInvisibles",I),this.session.$bidiHandler.setShowInvisibles(I)},E.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},E.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},E.prototype.setDisplayIndentGuides=function(I){this.setOption("displayIndentGuides",I)},E.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},E.prototype.setHighlightIndentGuides=function(I){this.setOption("highlightIndentGuides",I)},E.prototype.setShowPrintMargin=function(I){this.setOption("showPrintMargin",I)},E.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},E.prototype.setPrintMarginColumn=function(I){this.setOption("printMarginColumn",I)},E.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},E.prototype.getShowGutter=function(){return this.getOption("showGutter")},E.prototype.setShowGutter=function(I){return this.setOption("showGutter",I)},E.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},E.prototype.setFadeFoldWidgets=function(I){this.setOption("fadeFoldWidgets",I)},E.prototype.setHighlightGutterLine=function(I){this.setOption("highlightGutterLine",I)},E.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},E.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 z=this.$printMarginEl.style;z.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",z.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},E.prototype.getContainerElement=function(){return this.container},E.prototype.getMouseEventTarget=function(){return this.scroller},E.prototype.getTextAreaContainer=function(){return this.container},E.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var I=this.textarea.style,z=this.$composition;if(!this.$keepTextAreaAtCursor&&!z){y.translate(this.textarea,-100,0);return}var P=this.$cursorLayer.$pixelPos;if(P){z&&z.markerRange&&(P=this.$cursorLayer.getPixelPosition(z.markerRange.start,!0));var N=this.layerConfig,_=P.top,S=P.left;_-=N.offset;var D=z&&z.useTextareaForIME||C.isMobile?this.lineHeight:1;if(_<0||_>N.height-D){y.translate(this.textarea,0,0);return}var j=1,U=this.$size.height-D;if(!z)_+=this.lineHeight;else if(z.useTextareaForIME){var q=this.textarea.value;j=this.characterWidth*this.session.$getStringScreenWidth(q)[0]}else _+=this.lineHeight+2;S-=this.scrollLeft,S>this.$size.scrollerWidth-j&&(S=this.$size.scrollerWidth-j),S+=this.gutterWidth+this.margin.left,y.setStyle(I,"height",D+"px"),y.setStyle(I,"width",j+"px"),y.translate(this.textarea,Math.min(S,this.$size.scrollerWidth-j),Math.min(_,U))}}},E.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},E.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},E.prototype.getLastFullyVisibleRow=function(){var I=this.layerConfig,z=I.lastRow,P=this.session.documentToScreenRow(z,0)*I.lineHeight;return P-this.session.getScrollTop()>I.height-I.lineHeight?z-1:z},E.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},E.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()},E.prototype.setScrollMargin=function(I,z,P,N){var _=this.scrollMargin;_.top=I|0,_.bottom=z|0,_.right=N|0,_.left=P|0,_.v=_.top+_.bottom,_.h=_.left+_.right,_.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-_.top),this.updateFull()},E.prototype.setMargin=function(I,z,P,N){var _=this.margin;_.top=I|0,_.bottom=z|0,_.right=N|0,_.left=P|0,_.v=_.top+_.bottom,_.h=_.left+_.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},E.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},E.prototype.setHScrollBarAlwaysVisible=function(I){this.setOption("hScrollBarAlwaysVisible",I)},E.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},E.prototype.setVScrollBarAlwaysVisible=function(I){this.setOption("vScrollBarAlwaysVisible",I)},E.prototype.$updateScrollBarV=function(){var I=this.layerConfig.maxHeight,z=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(I-=(z-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>I-z&&(I=this.scrollTop+z,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(I+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},E.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},E.prototype.freeze=function(){this.$frozen=!0},E.prototype.unfreeze=function(){this.$frozen=!1},E.prototype.$renderChanges=function(I,z){if(this.$changes&&(I|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!I&&!z){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 N=this.scrollTop+(P.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;N>0&&(this.scrollTop=N,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 _=P.width+2*this.$padding+"px",S=P.minHeight+"px";y.setStyle(this.content.style,"width",_),y.setStyle(this.content.style,"height",S)}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)},E.prototype.$autosize=function(){var I=this.session.getScreenLength()*this.lineHeight,z=this.$maxLines*this.lineHeight,P=Math.min(z,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 N=P<=2*this.lineHeight,_=!N&&I>z;if(P!=this.desiredHeight||this.$size.height!=this.desiredHeight||_!=this.$vScroll){_!=this.$vScroll&&(this.$vScroll=_,this.scrollBarV.setVisible(_));var S=this.container.clientWidth;this.container.style.height=P+"px",this.$updateCachedSize(!0,this.$gutterWidth,S,P),this.desiredHeight=P,this._signal("autosize")}},E.prototype.$computeLayerConfig=function(){var I=this.session,z=this.$size,P=z.height<=2*this.lineHeight,N=this.session.getScreenLength(),_=N*this.lineHeight,S=this.$getLongestLine(),D=!P&&(this.$hScrollBarAlwaysVisible||z.scrollerWidth-S-2*this.$padding<0),j=this.$horizScroll!==D;j&&(this.$horizScroll=D,this.scrollBarH.setVisible(D));var U=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),P=z.height<=2*this.lineHeight);var q=z.scrollerHeight+this.lineHeight,Z=!this.$maxLines&&this.$scrollPastEnd?(z.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;_+=Z;var te=this.scrollMargin;this.session.setScrollTop(Math.max(-te.top,Math.min(this.scrollTop,_-z.scrollerHeight+te.bottom))),this.session.setScrollLeft(Math.max(-te.left,Math.min(this.scrollLeft,S+2*this.$padding-z.scrollerWidth+te.right)));var he=!P&&(this.$vScrollBarAlwaysVisible||z.scrollerHeight-_+Z<0||this.scrollTop>te.top),ne=U!==he;ne&&(this.$vScroll=he,this.scrollBarV.setVisible(he));var le=this.scrollTop%this.lineHeight,ue=Math.ceil(q/this.lineHeight)-1,ce=Math.max(0,Math.round((this.scrollTop-le)/this.lineHeight)),fe=ce+ue,_e,$e,Te=this.lineHeight;ce=I.screenToDocumentRow(ce,0);var qe=I.getFoldLine(ce);qe&&(ce=qe.start.row),_e=I.documentToScreenRow(ce,0),$e=I.getRowLength(ce)*Te,fe=Math.min(I.screenToDocumentRow(fe,0),I.getLength()-1),q=z.scrollerHeight+I.getRowLength(fe)*Te+$e,le=this.scrollTop-_e*Te,le<0&&_e>0&&(_e=Math.max(0,_e+Math.floor(le/Te)),le=this.scrollTop-_e*Te);var Ve=0;return(this.layerConfig.width!=S||j)&&(Ve=this.CHANGE_H_SCROLL),(j||ne)&&(Ve|=this.$updateCachedSize(!0,this.gutterWidth,z.width,z.height),this._signal("scrollbarVisibilityChanged"),ne&&(S=this.$getLongestLine())),this.layerConfig={width:S,padding:this.$padding,firstRow:ce,firstRowScreen:_e,lastRow:fe,lineHeight:Te,characterWidth:this.characterWidth,minHeight:q,maxHeight:_,offset:le,gutterOffset:Te?Math.max(0,Math.ceil((le+z.height-z.scrollerHeight)/Te)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(S-this.$padding),Ve},E.prototype.$updateLines=function(){if(this.$changedLines){var I=this.$changedLines.firstRow,z=this.$changedLines.lastRow;this.$changedLines=null;var P=this.layerConfig;if(!(I>P.lastRow+1)&&!(z<P.firstRow)){if(z===1/0){this.$showGutter&&this.$gutterLayer.update(P),this.$textLayer.update(P);return}return this.$textLayer.updateLines(P,I,z),!0}}},E.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))},E.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},E.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},E.prototype.addGutterDecoration=function(I,z){this.$gutterLayer.addGutterDecoration(I,z)},E.prototype.removeGutterDecoration=function(I,z){this.$gutterLayer.removeGutterDecoration(I,z)},E.prototype.updateBreakpoints=function(I){this._rows=I,this.$loop.schedule(this.CHANGE_GUTTER)},E.prototype.setAnnotations=function(I){this.$gutterLayer.setAnnotations(I),this.$loop.schedule(this.CHANGE_GUTTER)},E.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},E.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},E.prototype.showCursor=function(){this.$cursorLayer.showCursor()},E.prototype.scrollSelectionIntoView=function(I,z,P){this.scrollCursorIntoView(I,P),this.scrollCursorIntoView(z,P)},E.prototype.scrollCursorIntoView=function(I,z,P){if(this.$size.scrollerHeight!==0){var N=this.$cursorLayer.getPixelPosition(I),_=N.left,S=N.top,D=P&&P.top||0,j=P&&P.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var U=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;U+D>S?(z&&U+D>S+this.lineHeight&&(S-=z*this.$size.scrollerHeight),S===0&&(S=-this.scrollMargin.top),this.session.setScrollTop(S)):U+this.$size.scrollerHeight-j<S+this.lineHeight&&(z&&U+this.$size.scrollerHeight-j<S-this.lineHeight&&(S+=z*this.$size.scrollerHeight),this.session.setScrollTop(S+this.lineHeight+j-this.$size.scrollerHeight));var q=this.scrollLeft,Z=2*this.layerConfig.characterWidth;_-Z<q?(_-=Z,_<this.$padding+Z&&(_=-this.scrollMargin.left),this.session.setScrollLeft(_)):(_+=Z,q+this.$size.scrollerWidth<_+this.characterWidth?this.session.setScrollLeft(Math.round(_+this.characterWidth-this.$size.scrollerWidth)):q<=this.$padding&&_-q<this.characterWidth&&this.session.setScrollLeft(0))}},E.prototype.getScrollTop=function(){return this.session.getScrollTop()},E.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},E.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},E.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},E.prototype.scrollToRow=function(I){this.session.setScrollTop(I*this.lineHeight)},E.prototype.alignCursor=function(I,z){typeof I=="number"&&(I={row:I,column:0});var P=this.$cursorLayer.getPixelPosition(I),N=this.$size.scrollerHeight-this.lineHeight,_=P.top-N*(z||0);return this.session.setScrollTop(_),_},E.prototype.$calcSteps=function(I,z){var P=0,N=this.STEPS,_=[],S=function(D,j,U){return U*(Math.pow(D-1,3)+1)+j};for(P=0;P<N;++P)_.push(S(P/this.STEPS,I,z-I));return _},E.prototype.scrollToLine=function(I,z,P,N){var _=this.$cursorLayer.getPixelPosition({row:I,column:0}),S=_.top;z&&(S-=this.$size.scrollerHeight/2);var D=this.scrollTop;this.session.setScrollTop(S),P!==!1&&this.animateScrolling(D,N)},E.prototype.animateScrolling=function(I,z){var P=this.scrollTop;if(!this.$animatedScroll)return;var N=this;if(I==P)return;if(this.$scrollAnimation){var _=this.$scrollAnimation.steps;if(_.length&&(I=_[0],I==P))return}var S=N.$calcSteps(I,P);this.$scrollAnimation={from:I,to:P,steps:S},clearInterval(this.$timer),N.session.setScrollTop(S.shift()),N.session.$scrollTop=P;function D(){N.$timer=clearInterval(N.$timer),N.$scrollAnimation=null,N.$stopAnimation=!1,z&&z()}this.$timer=setInterval(function(){if(N.$stopAnimation){D();return}if(!N.session)return clearInterval(N.$timer);S.length?(N.session.setScrollTop(S.shift()),N.session.$scrollTop=P):P!=null?(N.session.$scrollTop=-1,N.session.setScrollTop(P),P=null):D()},10)},E.prototype.scrollToY=function(I){this.scrollTop!==I&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=I)},E.prototype.scrollToX=function(I){this.scrollLeft!==I&&(this.scrollLeft=I),this.$loop.schedule(this.CHANGE_H_SCROLL)},E.prototype.scrollTo=function(I,z){this.session.setScrollTop(z),this.session.setScrollLeft(I)},E.prototype.scrollBy=function(I,z){z&&this.session.setScrollTop(this.session.getScrollTop()+z),I&&this.session.setScrollLeft(this.session.getScrollLeft()+I)},E.prototype.isScrollableBy=function(I,z){if(z<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||z>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},E.prototype.pixelToScreenCoordinates=function(I,z){var P;if(this.$hasCssTransforms){P={top:0,left:0};var N=this.$fontMetrics.transformCoordinates([I,z]);I=N[1]-this.gutterWidth-this.margin.left,z=N[0]}else P=this.scroller.getBoundingClientRect();var _=I+this.scrollLeft-P.left-this.$padding,S=_/this.characterWidth,D=Math.floor((z+this.scrollTop-P.top)/this.lineHeight),j=this.$blockCursor?Math.floor(S):Math.round(S);return{row:D,column:j,side:S-j>0?1:-1,offsetX:_}},E.prototype.screenToTextCoordinates=function(I,z){var P;if(this.$hasCssTransforms){P={top:0,left:0};var N=this.$fontMetrics.transformCoordinates([I,z]);I=N[1]-this.gutterWidth-this.margin.left,z=N[0]}else P=this.scroller.getBoundingClientRect();var _=I+this.scrollLeft-P.left-this.$padding,S=_/this.characterWidth,D=this.$blockCursor?Math.floor(S):Math.round(S),j=Math.floor((z+this.scrollTop-P.top)/this.lineHeight);return this.session.screenToDocumentPosition(j,Math.max(D,0),_)},E.prototype.textToScreenCoordinates=function(I,z){var P=this.scroller.getBoundingClientRect(),N=this.session.documentToScreenPosition(I,z),_=this.$padding+(this.session.$bidiHandler.isBidiRow(N.row,I)?this.session.$bidiHandler.getPosLeft(N.column):Math.round(N.column*this.characterWidth)),S=N.row*this.lineHeight;return{pageX:P.left+_-this.scrollLeft,pageY:P.top+S-this.scrollTop}},E.prototype.visualizeFocus=function(){y.addCssClass(this.container,"ace_focus")},E.prototype.visualizeBlur=function(){y.removeCssClass(this.container,"ace_focus")},E.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")},E.prototype.setCompositionText=function(I){var z=this.session.selection.cursor;this.addToken(I,"composition_placeholder",z.row,z.column),this.$moveTextAreaToCursor()},E.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=""}},E.prototype.setGhostText=function(I,z){var P=this.session.selection.cursor,N=z||{row:P.row,column:P.column};this.removeGhostText();var _=this.$calculateWrappedTextChunks(I,N);this.addToken(_[0].text,"ghost_text",N.row,N.column),this.$ghostText={text:I,position:{row:N.row,column:N.column}};var S=y.createElement("div");if(_.length>1){var D=this.hideTokensAfterPosition(N.row,N.column),j;_.slice(1).forEach(function(ne){var le=y.createElement("div"),ue=y.createElement("span");ue.className="ace_ghost_text",ne.wrapped&&(le.className="ghost_text_line_wrapped"),ne.text.length===0&&(ne.text=" "),ue.appendChild(y.createTextNode(ne.text)),le.appendChild(ue),S.appendChild(le),j=le}),D.forEach(function(ne){var le=y.createElement("span");R(ne.type)||(le.className="ace_"+ne.type.replace(/\./g," ace_")),le.appendChild(y.createTextNode(ne.value)),j.appendChild(le)}),this.$ghostTextWidget={el:S,row:N.row,column:N.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var U=this.$cursorLayer.getPixelPosition(N,!0),q=this.container,Z=q.getBoundingClientRect().height,te=_.length*this.lineHeight,he=te<Z-U.top;if(he)return;te<Z?this.scrollBy(0,(_.length-1)*this.lineHeight):this.scrollToRow(N.row)}},E.prototype.$calculateWrappedTextChunks=function(I,z){var P=this.$size.scrollerWidth-this.$padding*2,N=Math.floor(P/this.characterWidth)-2;N=N<=0?60:N;for(var _=I.split(/\r?\n/),S=[],D=0;D<_.length;D++){var j=this.session.$getDisplayTokens(_[D],z.column),U=this.session.$computeWrapSplits(j,N,this.session.$tabSize);if(U.length>0){var q=0;U.push(_[D].length);for(var Z=0;Z<U.length;Z++){var te=_[D].slice(q,U[Z]);S.push({text:te,wrapped:!0}),q=U[Z]}}else S.push({text:_[D],wrapped:!1})}return S},E.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}},E.prototype.addToken=function(I,z,P,N){var _=this.session;_.bgTokenizer.lines[P]=null;var S={type:z,value:I},D=_.getTokens(P);if(N==null||!D.length)D.push(S);else for(var j=0,U=0;U<D.length;U++){var q=D[U];if(j+=q.value.length,N<=j){var Z=q.value.length-(j-N),te=q.value.slice(0,Z),he=q.value.slice(Z);D.splice(U,1,{type:q.type,value:te},S,{type:q.type,value:he});break}}this.updateLines(P,P)},E.prototype.hideTokensAfterPosition=function(I,z){for(var P=this.session.getTokens(I),N=0,_=!1,S=[],D=0;D<P.length;D++){var j=P[D];if(N+=j.value.length,j.type!=="ghost_text"){if(_){S.push({type:j.type,value:j.value}),j.type="hidden_token";continue}N===z&&(_=!0)}}return this.updateLines(I,I),S},E.prototype.removeExtraToken=function(I,z){this.session.bgTokenizer.lines[I]=null,this.updateLines(I,I)},E.prototype.setTheme=function(I,z){var P=this;if(this.$themeId=I,P._dispatchEvent("themeChange",{theme:I}),!I||typeof I=="string"){var N=I||this.$options.theme.initialValue;h.loadModule(["theme",N],_)}else _(I);function _(S){if(P.$themeId!=I)return z&&z();if(!S||!S.cssClass)throw new Error("couldn't load module "+I+" or it didn't call define");S.$id&&(P.$themeId=S.$id),y.importCssString(S.cssText,S.cssClass,P.container),P.theme&&y.removeCssClass(P.container,P.theme.cssClass);var D="padding"in S?S.padding:"padding"in(P.theme||{})?4:P.$padding;P.$padding&&D!=P.$padding&&P.setPadding(D),P.$theme=S.cssClass,P.theme=S,y.addCssClass(P.container,S.cssClass),y.setCssClass(P.container,"ace_dark",S.isDark),P.$size&&(P.$size.width=0,P.$updateSizeAsync()),P._dispatchEvent("themeLoaded",{theme:S}),z&&z(),C.isSafari&&P.scroller&&(P.scroller.style.background="red",P.scroller.style.background="")}},E.prototype.getTheme=function(){return this.$themeId},E.prototype.setStyle=function(I,z){y.setCssClass(this.container,I,z!==!1)},E.prototype.unsetStyle=function(I){y.removeCssClass(this.container,I)},E.prototype.setCursorStyle=function(I){y.setStyle(this.scroller.style,"cursor",I)},E.prototype.setMouseCursor=function(I){y.setStyle(this.scroller.style,"cursor",I)},E.prototype.attachToShadowRoot=function(){y.importCssString(M,"ace_editor.css",this.container)},E.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},E.prototype.$updateCustomScrollbar=function(I){var z=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),I===!0?(this.scrollBarV=new p(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(P){z.$scrollAnimation||z.session.setScrollTop(P.data-z.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){z.$scrollAnimation||z.session.setScrollLeft(P.data-z.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new k(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new o(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.addEventListener("scroll",function(P){z.$scrollAnimation||z.session.setScrollTop(P.data-z.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){z.$scrollAnimation||z.session.setScrollLeft(P.data-z.scrollMargin.left)}))},E.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(z){var P=z[0].contentRect.width,N=z[0].contentRect.height;Math.abs(I.$size.width-P)>1||Math.abs(I.$size.height-N)>1?I.$resizeTimer.delay():I.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},E})();O.prototype.CHANGE_CURSOR=1,O.prototype.CHANGE_MARKER=2,O.prototype.CHANGE_GUTTER=4,O.prototype.CHANGE_SCROLL=8,O.prototype.CHANGE_LINES=16,O.prototype.CHANGE_TEXT=32,O.prototype.CHANGE_SIZE=64,O.prototype.CHANGE_MARKER_BACK=128,O.prototype.CHANGE_MARKER_FRONT=256,O.prototype.CHANGE_FULL=512,O.prototype.CHANGE_H_SCROLL=1024,O.prototype.$changes=0,O.prototype.$padding=null,O.prototype.$frozen=!1,O.prototype.STEPS=8,g.implement(O.prototype,L),h.defineOptions(O.prototype,"renderer",{useResizeObserver:{set:function(E){!E&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):E&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(E){this.$textLayer.setShowInvisibles(E)&&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(E){typeof E=="number"&&(this.$printMarginColumn=E),this.$showPrintMargin=!!E,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(E){this.$gutter.style.display=E?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(E){this.$gutterLayer.$useSvgGutterIcons=E},initialValue:!1},showFoldedAnnotations:{set:function(E){this.$gutterLayer.$showFoldedAnnotations=E},initialValue:!1},fadeFoldWidgets:{set:function(E){y.setCssClass(this.$gutter,"ace_fade-fold-widgets",E)},initialValue:!1},showFoldWidgets:{set:function(E){this.$gutterLayer.setShowFoldWidgets(E),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(E){this.$textLayer.setDisplayIndentGuides(E)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(E){this.$textLayer.setHighlightIndentGuides(E)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(E){this.$gutterLayer.setHighlightGutterLine(E),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(E){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(E){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(E){typeof E=="number"&&(E=E+"px"),this.container.style.fontSize=E,this.updateFontSize()},initialValue:12},fontFamily:{set:function(E){this.container.style.fontFamily=E,this.updateFontSize()}},maxLines:{set:function(E){this.updateFull()}},minLines:{set:function(E){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(E){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(E){E=+E||0,this.$scrollPastEnd!=E&&(this.$scrollPastEnd=E,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(E){this.$gutterLayer.$fixedWidth=!!E,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(E){this.$updateCustomScrollbar(E)},initialValue:!1},theme:{set:function(E){this.setTheme(E)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!C.isMobile&&!C.isIE}}),r.VirtualRenderer=O}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,r,m){var g=e("../lib/oop"),y=e("../lib/net"),x=e("../lib/event_emitter").EventEmitter,h=e("../config");function d(l){var o="importScripts('"+y.qualifyURL(l)+"');";try{return new Blob([o],{type:"application/javascript"})}catch{var c=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,p=new c;return p.append(o),p.getBlob("application/javascript")}}function s(l){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(h.get("loadWorkerFromBlob")){var o=d(l),c=window.URL||window.webkitURL,p=c.createObjectURL(o);return new Worker(p)}return new Worker(l)}var a=function(l){l.postMessage||(l=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=l,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){g.implement(this,x),this.$createWorkerFromOldConfig=function(l,o,c,p,w){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),h.get("packaged")||!e.toUrl)p=p||h.moduleUrl(o,"worker");else{var b=this.$normalizePath;p=p||b(e.toUrl("ace/worker/worker.js",null,"_"));var L={};l.forEach(function(M){L[M]=b(e.toUrl(M,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=s(p),w&&this.send("importScripts",w),this.$worker.postMessage({init:!0,tlns:L,module:o,classname:c}),this.$worker},this.onMessage=function(l){var o=l.data;switch(o.type){case"event":this._signal(o.name,{data:o.data});break;case"call":var c=this.callbacks[o.id];c&&(c(o.data),delete this.callbacks[o.id]);break;case"error":this.reportError(o.data);break;case"log":window.console&&console.log&&console.log.apply(console,o.data);break}},this.reportError=function(l){window.console&&console.error&&console.error(l)},this.$normalizePath=function(l){return y.qualifyURL(l)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(l){l.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(l,o){this.$worker.postMessage({command:l,args:o})},this.call=function(l,o,c){if(c){var p=this.callbackId++;this.callbacks[p]=c,o.push(p)}this.send(l,o)},this.emit=function(l,o){try{o.data&&o.data.err&&(o.data.err={message:o.data.err.message,stack:o.data.err.stack,code:o.data.err.code}),this.$worker&&this.$worker.postMessage({event:l,data:{data:o.data}})}catch(c){console.error(c.stack)}},this.attachToDocument=function(l){this.$doc&&this.terminate(),this.$doc=l,this.call("setValue",[l.getValue()]),l.on("change",this.changeListener,!0)},this.changeListener=function(l){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),l.action=="insert"?this.deltaQueue.push(l.start,l.lines):this.deltaQueue.push(l.start,l.end)},this.$sendDeltaQueue=function(){var l=this.deltaQueue;l&&(this.deltaQueue=null,l.length>50&&l.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:l}))}}).call(a.prototype);var u=function(l,o,c){var p=null,w=!1,b=Object.create(x),L=[],M=new a({messageBuffer:L,terminate:function(){},postMessage:function(C){L.push(C),p&&(w?setTimeout(k):k())}});M.setEmitSync=function(C){w=C};var k=function(){var C=L.shift();C.command?p[C.command].apply(p,C.args):C.event&&b._signal(C.event,C.data)};return b.postMessage=function(C){M.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(p=new C[c](b);L.length;)k()}),M};r.UIWorkerClient=u,r.WorkerClient=a,r.createWorker=s}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,r,m){var g=e("./range").Range,y=e("./lib/event_emitter").EventEmitter,x=e("./lib/oop"),h=(function(){function d(s,a,u,l,o,c){var p=this;this.length=a,this.session=s,this.doc=s.getDocument(),this.mainClass=o,this.othersClass=c,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=l,this.$onCursorChange=function(){setTimeout(function(){p.onCursorChange()})},this.$pos=u;var w=s.getUndoManager().$undoStack||s.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=w.length,this.setup(),s.selection.on("changeCursor",this.$onCursorChange)}return d.prototype.setup=function(){var s=this,a=this.doc,u=this.session;this.selectionBefore=u.selection.toJSON(),u.selection.inMultiSelectMode&&u.selection.toSingleRange(),this.pos=a.createAnchor(this.$pos.row,this.$pos.column);var l=this.pos;l.$insertRight=!0,l.detach(),l.markerId=u.addMarker(new g(l.row,l.column,l.row,l.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(o){var c=a.createAnchor(o.row,o.column);c.$insertRight=!0,c.detach(),s.others.push(c)}),u.setUndoSelect(!1)},d.prototype.showOtherMarkers=function(){if(!this.othersActive){var s=this.session,a=this;this.othersActive=!0,this.others.forEach(function(u){u.markerId=s.addMarker(new g(u.row,u.column,u.row,u.column+a.length),a.othersClass,null,!1)})}},d.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)}},d.prototype.onUpdate=function(s){if(this.$updating)return this.updateAnchors(s);var a=s;if(a.start.row===a.end.row&&a.start.row===this.pos.row){this.$updating=!0;var u=s.action==="insert"?a.end.column-a.start.column:a.start.column-a.end.column,l=a.start.column>=this.pos.column&&a.start.column<=this.pos.column+this.length+1,o=a.start.column-this.pos.column;if(this.updateAnchors(s),l&&(this.length+=u),l&&!this.session.$fromUndo){if(s.action==="insert")for(var c=this.others.length-1;c>=0;c--){var p=this.others[c],w={row:p.row,column:p.column+o};this.doc.insertMergedLines(w,s.lines)}else if(s.action==="remove")for(var c=this.others.length-1;c>=0;c--){var p=this.others[c],w={row:p.row,column:p.column+o};this.doc.remove(new g(w.row,w.column,w.row,w.column-u))}}this.$updating=!1,this.updateMarkers()}},d.prototype.updateAnchors=function(s){this.pos.onChange(s);for(var a=this.others.length;a--;)this.others[a].onChange(s);this.updateMarkers()},d.prototype.updateMarkers=function(){if(!this.$updating){var s=this,a=this.session,u=function(o,c){a.removeMarker(o.markerId),o.markerId=a.addMarker(new g(o.row,o.column,o.row,o.column+s.length),c,null,!1)};u(this.pos,this.mainClass);for(var l=this.others.length;l--;)u(this.others[l],this.othersClass)}},d.prototype.onCursorChange=function(s){if(!(this.$updating||!this.session)){var a=this.session.selection.getCursor();a.row===this.pos.row&&a.column>=this.pos.column&&a.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",s)):(this.hideOtherMarkers(),this._emit("cursorLeave",s))}},d.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},d.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var s=this.session.getUndoManager(),a=(s.$undoStack||s.$undostack).length-this.$undoStackDepth,u=0;u<a;u++)s.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},d})();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,m){var g=e("../lib/event"),y=e("../lib/useragent");function x(d,s){return d.row==s.row&&d.column==s.column}function h(d){var s=d.domEvent,a=s.altKey,u=s.shiftKey,l=s.ctrlKey,o=d.getAccelKey(),c=d.getButton();if(l&&y.isMac&&(c=s.button),d.editor.inMultiSelectMode&&c==2){d.editor.textInput.onContextMenu(d.domEvent);return}if(!l&&!a&&!o){c===0&&d.editor.inMultiSelectMode&&d.editor.exitMultiSelectMode();return}if(c===0){var p=d.editor,w=p.selection,b=p.inMultiSelectMode,L=d.getDocumentPosition(),M=w.getCursor(),k=d.inSelection()||w.isEmpty()&&x(L,M),C=d.x,R=d.y,O=function(te){C=te.clientX,R=te.clientY},E=p.session,I=p.renderer.pixelToScreenCoordinates(C,R),z=I,P;if(p.$mouseHandler.$enableJumpToDef)l&&a||o&&a?P=u?"block":"add":a&&p.$blockSelectEnabled&&(P="block");else if(o&&!a){if(P="add",!b&&u)return}else a&&p.$blockSelectEnabled&&(P="block");if(P&&y.isMac&&s.ctrlKey&&p.$mouseHandler.cancelContextMenu(),P=="add"){if(!b&&k)return;if(!b){var N=w.toOrientedRange();p.addSelectionMarker(N)}var _=w.rangeList.rangeAtPoint(L);p.inVirtualSelectionMode=!0,u&&(_=null,N=w.ranges[0]||N,p.removeSelectionMarker(N)),p.once("mouseup",function(){var te=w.toOrientedRange();_&&te.isEmpty()&&x(_.cursor,te.cursor)?w.substractPoint(te.cursor):(u?w.substractPoint(N.cursor):N&&(p.removeSelectionMarker(N),w.addRange(N)),w.addRange(te)),p.inVirtualSelectionMode=!1})}else if(P=="block"){d.stop(),p.inVirtualSelectionMode=!0;var S,D=[],j=function(){var te=p.renderer.pixelToScreenCoordinates(C,R),he=E.screenToDocumentPosition(te.row,te.column,te.offsetX);x(z,te)&&x(he,w.lead)||(z=te,p.selection.moveToPosition(he),p.renderer.scrollCursorIntoView(),p.removeSelectionMarkers(D),D=w.rectangularRangeBlock(z,I),p.$mouseHandler.$clickSelection&&D.length==1&&D[0].isEmpty()&&(D[0]=p.$mouseHandler.$clickSelection.clone()),D.forEach(p.addSelectionMarker,p),p.updateSelectionMarkers())};b&&!o?w.toSingleRange():!b&&o&&(S=w.toOrientedRange(),p.addSelectionMarker(S)),u?I=E.documentToScreenPosition(w.lead):w.moveToPosition(L),z={row:-1,column:-1};var U=function(te){j(),clearInterval(Z),p.removeSelectionMarkers(D),D.length||(D=[w.toOrientedRange()]),S&&(p.removeSelectionMarker(S),w.toSingleRange(S));for(var he=0;he<D.length;he++)w.addRange(D[he]);p.inVirtualSelectionMode=!1,p.$mouseHandler.$clickSelection=null},q=j;g.capture(p.container,O,U);var Z=setInterval(function(){q()},20);return d.preventDefault()}}}r.onMouseDown=h}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,r,m){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 g=e("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new g(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,m){var g=e("./range_list").RangeList,y=e("./range").Range,x=e("./selection").Selection,h=e("./mouse/multi_select_handler").onMouseDown,d=e("./lib/event"),s=e("./lib/lang"),a=e("./commands/multi_select_commands");r.commands=a.defaultCommands.concat(a.multiSelectCommands);var u=e("./search").Search,l=new u;function o(M,k,C){return l.$options.wrap=!0,l.$options.needle=k,l.$options.backwards=C==-1,l.find(M)}var c=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(c.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(M,k){if(M){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add(M),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),k||this.fromOrientedRange(M);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}M.cursor||(M.cursor=M.end);var R=this.rangeList.add(M);return this.$onAddRange(M),R.length&&this.$onRemoveRange(R),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),k||this.fromOrientedRange(M)}},this.toSingleRange=function(M){M=M||this.ranges[0];var k=this.rangeList.removeAll();k.length&&this.$onRemoveRange(k),M&&this.fromOrientedRange(M)},this.substractPoint=function(M){var k=this.rangeList.substractPoint(M);if(k)return this.$onRemoveRange(k),k[0]},this.mergeOverlappingRanges=function(){var M=this.rangeList.merge();M.length&&this.$onRemoveRange(M)},this.$onAddRange=function(M){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(M),this._signal("addRange",{range:M})},this.$onRemoveRange=function(M){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var k=this.rangeList.ranges.pop();M.push(k),this.rangeCount=0}for(var C=M.length;C--;){var R=this.ranges.indexOf(M[C]);this.ranges.splice(R,1)}this._signal("removeRange",{ranges:M}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),k=k||this.ranges[0],k&&!k.isEqual(this.getRange())&&this.fromOrientedRange(k)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new g,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var M=this.ranges.length?this.ranges:[this.getRange()],k=[],C=0;C<M.length;C++){var R=M[C],O=R.start.row,E=R.end.row;if(O===E)k.push(R.clone());else{for(k.push(new y(O,R.start.column,O,this.session.getLine(O).length));++O<E;)k.push(this.getLineRange(O,!0));k.push(new y(E,0,E,R.end.column))}C==0&&!this.isBackwards()&&(k=k.reverse())}this.toSingleRange();for(var C=k.length;C--;)this.addRange(k[C])},this.joinSelections=function(){var M=this.rangeList.ranges,k=M[M.length-1],C=y.fromPoints(M[0].start,k.end);this.toSingleRange(),this.setSelectionRange(C,k.cursor==k.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var M=this.rangeList.ranges,k=M[M.length-1],C=y.fromPoints(M[0].start,k.end);this.toSingleRange(),this.setSelectionRange(C,k.cursor==k.start)}else{var R=this.session.documentToScreenPosition(this.cursor),O=this.session.documentToScreenPosition(this.anchor),E=this.rectangularRangeBlock(R,O);E.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(M,k,C){var R=[],O=M.column<k.column;if(O)var E=M.column,I=k.column,z=M.offsetX,P=k.offsetX;else var E=k.column,I=M.column,z=k.offsetX,P=M.offsetX;var N=M.row<k.row;if(N)var _=M.row,S=k.row;else var _=k.row,S=M.row;E<0&&(E=0),_<0&&(_=0),_==S&&(C=!0);for(var D,j=_;j<=S;j++){var U=y.fromPoints(this.session.screenToDocumentPosition(j,E,z),this.session.screenToDocumentPosition(j,I,P));if(U.isEmpty()){if(D&&w(U.end,D))break;D=U.end}U.cursor=O?U.start:U.end,R.push(U)}if(N&&R.reverse(),!C){for(var q=R.length-1;R[q].isEmpty()&&q>0;)q--;if(q>0)for(var Z=0;R[Z].isEmpty();)Z++;for(var te=q;te>=Z;te--)R[te].isEmpty()&&R.splice(te,1)}return R}}).call(x.prototype);var p=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(M){M.cursor||(M.cursor=M.end);var k=this.getSelectionStyle();return M.marker=this.session.addMarker(M,"ace_selection",k),this.session.$selectionMarkers.push(M),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,M},this.removeSelectionMarker=function(M){if(M.marker){this.session.removeMarker(M.marker);var k=this.session.$selectionMarkers.indexOf(M);k!=-1&&this.session.$selectionMarkers.splice(k,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(M){for(var k=this.session.$selectionMarkers,C=M.length;C--;){var R=M[C];if(R.marker){this.session.removeMarker(R.marker);var O=k.indexOf(R);O!=-1&&k.splice(O,1)}}this.session.selectionMarkerCount=k.length},this.$onAddRange=function(M){this.addSelectionMarker(M.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(M){this.removeSelectionMarkers(M.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(M){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(a.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(M){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(a.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(M){var k=M.command,C=M.editor;if(C.multiSelect){if(k.multiSelectAction)k.multiSelectAction=="forEach"?R=C.forEachSelection(k,M.args):k.multiSelectAction=="forEachLine"?R=C.forEachSelection(k,M.args,!0):k.multiSelectAction=="single"?(C.exitMultiSelectMode(),R=k.exec(C,M.args||{})):R=k.multiSelectAction(C,M.args||{});else{var R=k.exec(C,M.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return R}},this.forEachSelection=function(M,k,C){if(!this.inVirtualSelectionMode){var R=C&&C.keepOrder,O=C==!0||C&&C.$byLines,E=this.session,I=this.selection,z=I.rangeList,P=(R?I:z).ranges,N;if(!P.length)return M.exec?M.exec(this,k||{}):M(this,k||{});var _=I._eventRegistry;I._eventRegistry={};var S=new x(E);this.inVirtualSelectionMode=!0;for(var D=P.length;D--;){if(O)for(;D>0&&P[D].start.row==P[D-1].end.row;)D--;S.fromOrientedRange(P[D]),S.index=D,this.selection=E.selection=S;var j=M.exec?M.exec(this,k||{}):M(this,k||{});!N&&j!==void 0&&(N=j),S.toOrientedRange(P[D])}S.detach(),this.selection=E.selection=I,this.inVirtualSelectionMode=!1,I._eventRegistry=_,I.mergeOverlappingRanges(),I.ranges[0]&&I.fromOrientedRange(I.ranges[0]);var U=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),U&&U.from==U.to&&this.renderer.animateScrolling(U.from),N}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var M="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var k=this.multiSelect.rangeList.ranges,C=[],R=0;R<k.length;R++)C.push(this.session.getTextRange(k[R]));var O=this.session.getDocument().getNewLineCharacter();M=C.join(O),M.length==(C.length-1)*O.length&&(M="")}else this.selection.isEmpty()||(M=this.session.getTextRange(this.getSelectionRange()));return M},this.$checkMultiselectChange=function(M,k){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&k==this.multiSelect.anchor)return;var R=k==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;R.row!=k.row||this.session.$clipPositionToDocument(R.row,R.column).column!=k.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(M,k,C){if(k=k||{},k.needle=M||k.needle,k.needle==null){var R=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();k.needle=this.session.getTextRange(R)}this.$search.set(k);var O=this.$search.findAll(this.session);if(!O.length)return 0;var E=this.multiSelect;C||E.toSingleRange(O[0]);for(var I=O.length;I--;)E.addRange(O[I],!0);return R&&E.rangeList.rangeAtPoint(R.start)&&E.addRange(R,!0),O.length},this.selectMoreLines=function(M,k){var C=this.selection.toOrientedRange(),R=C.cursor==C.end,O=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(O.column=this.selection.$desiredColumn);var E=this.session.screenToDocumentPosition(O.row+M,O.column);if(C.isEmpty())var z=E;else var I=this.session.documentToScreenPosition(R?C.end:C.start),z=this.session.screenToDocumentPosition(I.row+M,I.column);if(R){var P=y.fromPoints(E,z);P.cursor=P.start}else{var P=y.fromPoints(z,E);P.cursor=P.end}if(P.desiredColumn=O.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(k)var N=C.cursor;this.selection.addRange(P),N&&this.selection.substractPoint(N)},this.transposeSelections=function(M){for(var k=this.session,C=k.multiSelect,R=C.ranges,O=R.length;O--;){var E=R[O];if(E.isEmpty()){var I=k.getWordRange(E.start.row,E.start.column);E.start.row=I.start.row,E.start.column=I.start.column,E.end.row=I.end.row,E.end.column=I.end.column}}C.mergeOverlappingRanges();for(var z=[],O=R.length;O--;){var E=R[O];z.unshift(k.getTextRange(E))}M<0?z.unshift(z.pop()):z.push(z.shift());for(var O=R.length;O--;){var E=R[O],P=E.clone();k.replace(E,z[O]),E.start.row=P.start.row,E.start.column=P.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function(M,k,C){var R=this.session,O=R.multiSelect,E=O.toOrientedRange();if(!(E.isEmpty()&&(E=R.getWordRange(E.start.row,E.start.column),E.cursor=M==-1?E.start:E.end,this.multiSelect.addRange(E),C))){var I=R.getTextRange(E),z=o(R,I,M);z&&(z.cursor=M==-1?z.start:z.end,this.session.unfold(z),this.multiSelect.addRange(z),this.renderer.scrollCursorIntoView(null,.5)),k&&this.multiSelect.substractPoint(E.cursor)}},this.alignCursors=function(){var M=this.session,k=M.multiSelect,C=k.ranges,R=-1,O=C.filter(function(q){if(q.cursor.row==R)return!0;R=q.cursor.row});if(!C.length||O.length==C.length-1){var E=this.selection.getRange(),I=E.start.row,z=E.end.row,P=I==z;if(P){var N=this.session.getLength(),_;do _=this.session.getLine(z);while(/[=:]/.test(_)&&++z<N);do _=this.session.getLine(I);while(/[=:]/.test(_)&&--I>0);I<0&&(I=0),z>=N&&(z=N-1)}var S=this.session.removeFullLines(I,z);S=this.$reAlignText(S,P),this.session.insert({row:I,column:0},S.join(`
|
951
|
+
`)+`
|
952
|
+
`),P||(E.start.column=0,E.end.column=S[S.length-1].length),this.selection.setRange(E)}else{O.forEach(function(q){k.substractPoint(q.cursor)});var D=0,j=1/0,U=C.map(function(q){var Z=q.cursor,te=M.getLine(Z.row),he=te.substr(Z.column).search(/\S/g);return he==-1&&(he=0),Z.column>D&&(D=Z.column),he<j&&(j=he),he});C.forEach(function(q,Z){var te=q.cursor,he=D-te.column,ne=U[Z]-j;he>ne?M.insert(te,s.stringRepeat(" ",he-ne)):M.remove(new y(te.row,te.column,te.row,te.column-he+ne)),q.start.column=q.end.column=D,q.start.row=q.end.row=te.row,q.cursor=q.end}),k.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(M,k){var C=!0,R=!0,O,E,I;return M.map(function(S){var D=S.match(/(\s*)(.*?)(\s*)([=:].*)/);return D?O==null?(O=D[1].length,E=D[2].length,I=D[3].length,D):(O+E+I!=D[1].length+D[2].length+D[3].length&&(R=!1),O!=D[1].length&&(C=!1),O>D[1].length&&(O=D[1].length),E<D[2].length&&(E=D[2].length),I>D[3].length&&(I=D[3].length),D):[S]}).map(k?P:C?R?N:P:_);function z(S){return s.stringRepeat(" ",S)}function P(S){return S[2]?z(O)+S[2]+z(E-S[2].length+I)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}function N(S){return S[2]?z(O+E-S[2].length)+S[2]+z(I)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}function _(S){return S[2]?z(O)+S[2]+z(I)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}}}).call(p.prototype);function w(M,k){return M.row==k.row&&M.column==k.column}r.onSessionChange=function(M){var k=M.session;k&&!k.multiSelect&&(k.$selectionMarkers=[],k.selection.$initRangeList(),k.multiSelect=k.selection),this.multiSelect=k&&k.multiSelect;var C=M.oldSession;C&&(C.multiSelect.off("addRange",this.$onAddRange),C.multiSelect.off("removeRange",this.$onRemoveRange),C.multiSelect.off("multiSelect",this.$onMultiSelect),C.multiSelect.off("singleSelect",this.$onSingleSelect),C.multiSelect.lead.off("change",this.$checkMultiselectChange),C.multiSelect.anchor.off("change",this.$checkMultiselectChange)),k&&(k.multiSelect.on("addRange",this.$onAddRange),k.multiSelect.on("removeRange",this.$onRemoveRange),k.multiSelect.on("multiSelect",this.$onMultiSelect),k.multiSelect.on("singleSelect",this.$onSingleSelect),k.multiSelect.lead.on("change",this.$checkMultiselectChange),k.multiSelect.anchor.on("change",this.$checkMultiselectChange)),k&&this.inMultiSelectMode!=k.selection.inMultiSelectMode&&(k.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function b(M){M.$multiselectOnSessionChange||(M.$onAddRange=M.$onAddRange.bind(M),M.$onRemoveRange=M.$onRemoveRange.bind(M),M.$onMultiSelect=M.$onMultiSelect.bind(M),M.$onSingleSelect=M.$onSingleSelect.bind(M),M.$multiselectOnSessionChange=r.onSessionChange.bind(M),M.$checkMultiselectChange=M.$checkMultiselectChange.bind(M),M.$multiselectOnSessionChange(M),M.on("changeSession",M.$multiselectOnSessionChange),M.on("mousedown",h),M.commands.addCommands(a.defaultCommands),L(M))}function L(M){if(!M.textInput)return;var k=M.textInput.getElement(),C=!1;d.addListener(k,"keydown",function(O){var E=O.keyCode==18&&!(O.ctrlKey||O.shiftKey||O.metaKey);M.$blockSelectEnabled&&E?C||(M.renderer.setMouseCursor("crosshair"),C=!0):C&&R()},M),d.addListener(k,"keyup",R,M),d.addListener(k,"blur",R,M);function R(O){C&&(M.renderer.setMouseCursor(""),C=!1)}}r.MultiSelect=b,e("./config").defineOptions(p.prototype,"editor",{enableMultiselect:{set:function(M){b(this),M?this.on("mousedown",h):this.off("mousedown",h)},value:!0},enableBlockSelect:{set:function(M){this.$blockSelectEnabled=M},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,r,m){var g=e("../../range").Range,y=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(x,h,d){var s=x.getLine(d);return this.foldingStartMarker.test(s)?"start":h=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(s)?"end":""},this.getFoldWidgetRange=function(x,h,d){return null},this.indentationBlock=function(x,h,d){var s=/\S/,a=x.getLine(h),u=a.search(s);if(u!=-1){for(var l=d||a.length,o=x.getLength(),c=h,p=h;++h<o;){var w=x.getLine(h).search(s);if(w!=-1){if(w<=u){var b=x.getTokenAt(h,0);if(!b||b.type!=="string")break}p=h}}if(p>c){var L=x.getLine(p).length;return new g(c,l,p,L)}}},this.openingBracketBlock=function(x,h,d,s,a){var u={row:d,column:s+1},l=x.$findClosingBracket(h,u,a);if(l){var o=x.foldWidgets[l.row];return o==null&&(o=x.getFoldWidget(l.row)),o=="start"&&l.row>u.row&&(l.row--,l.column=x.getLine(l.row).length),g.fromPoints(u,l)}},this.closingBracketBlock=function(x,h,d,s,a){var u={row:d,column:s},l=x.$findOpeningBracket(h,u);if(l)return l.column++,u.column--,g.fromPoints(l,u)}}).call(y.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,r,m){var g=e("../lib/dom"),y=e("../range").Range,x=e("../config").nls;function h(s,a,u){for(var l=0,o=s.length-1;l<=o;){var c=l+o>>1,p=u(a,s[c]);if(p>0)l=c+1;else if(p<0)o=c-1;else return c}return-(l+1)}function d(s,a,u){var l=s.getAnnotations().sort(y.comparePoints);if(l.length){var o=h(l,{row:a,column:-1},y.comparePoints);o<0&&(o=-o-1),o>=l.length?o=u>0?0:l.length-1:o===0&&u<0&&(o=l.length-1);var c=l[o];if(!(!c||!u)){if(c.row===a){do c=l[o+=u];while(c&&c.row===a);if(!c)return l.slice()}var p=[];a=c.row;do p[u<0?"unshift":"push"](c),c=l[o+=u];while(c&&c.row==a);return p.length&&p}}}r.showErrorMarker=function(s,a){var u=s.session,l=s.getCursorPosition(),o=l.row,c=u.widgetManager.getWidgetsAtRow(o).filter(function(O){return O.type=="errorMarker"})[0];c?c.destroy():o-=a;var p=d(u,o,a),w;if(p){var b=p[0];l.column=(b.pos&&typeof b.column!="number"?b.pos.sc:b.column)||0,l.row=b.row,w=s.renderer.$gutterLayer.$annotations[l.row]}else{if(c)return;w={displayText:[x("error-marker.good-state","Looks good!")],className:"ace_ok"}}s.session.unfold(l.row),s.selection.moveToPosition(l);var L={row:l.row,fixedWidth:!0,coverGutter:!0,el:g.createElement("div"),type:"errorMarker"},M=L.el.appendChild(g.createElement("div")),k=L.el.appendChild(g.createElement("div"));k.className="error_widget_arrow "+w.className;var C=s.renderer.$cursorLayer.getPixelPosition(l).left;k.style.left=C+s.renderer.gutterWidth-5+"px",L.el.className="error_widget_wrapper",M.className="error_widget "+w.className,w.displayText.forEach(function(O,E){M.appendChild(g.createTextNode(O)),E<w.displayText.length-1&&M.appendChild(g.createElement("br"))}),M.appendChild(g.createElement("div"));var R=function(O,E,I){if(E===0&&(I==="esc"||I==="return"))return L.destroy(),{command:"null"}};L.destroy=function(){s.$mouseHandler.isMousePressed||(s.keyBinding.removeKeyboardHandler(R),u.widgetManager.removeLineWidget(L),s.off("changeSelection",L.destroy),s.off("changeSession",L.destroy),s.off("mouseup",L.destroy),s.off("change",L.destroy))},s.keyBinding.addKeyboardHandler(R),s.on("changeSelection",L.destroy),s.on("changeSession",L.destroy),s.on("mouseup",L.destroy),s.on("change",L.destroy),s.session.widgetManager.addLineWidget(L),L.el.onmousedown=s.focus.bind(s),s.renderer.scrollCursorIntoView(null,.5,{bottom:L.el.offsetHeight})},g.importCssString(`
|
953
|
+
.error_widget_wrapper {
|
954
|
+
background: inherit;
|
955
|
+
color: inherit;
|
956
|
+
border:none
|
957
|
+
}
|
958
|
+
.error_widget {
|
959
|
+
border-top: solid 2px;
|
960
|
+
border-bottom: solid 2px;
|
961
|
+
margin: 5px 0;
|
962
|
+
padding: 10px 40px;
|
963
|
+
white-space: pre-wrap;
|
964
|
+
}
|
965
|
+
.error_widget.ace_error, .error_widget_arrow.ace_error{
|
966
|
+
border-color: #ff5a5a
|
967
|
+
}
|
968
|
+
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
|
969
|
+
border-color: #F1D817
|
970
|
+
}
|
971
|
+
.error_widget.ace_info, .error_widget_arrow.ace_info{
|
972
|
+
border-color: #5a5a5a
|
973
|
+
}
|
974
|
+
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
|
975
|
+
border-color: #5aaa5a
|
976
|
+
}
|
977
|
+
.error_widget_arrow {
|
978
|
+
position: absolute;
|
979
|
+
border: solid 5px;
|
980
|
+
border-top-color: transparent!important;
|
981
|
+
border-right-color: transparent!important;
|
982
|
+
border-left-color: transparent!important;
|
983
|
+
top: -5px;
|
984
|
+
}
|
985
|
+
`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(e,r,m){e("./loader_build")(r);var g=e("./lib/dom"),y=e("./range").Range,x=e("./editor").Editor,h=e("./edit_session").EditSession,d=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(u,l){if(typeof u=="string"){var o=u;if(u=document.getElementById(o),!u)throw new Error("ace.edit can't find div #"+o)}if(u&&u.env&&u.env.editor instanceof x)return u.env.editor;var c="";if(u&&/input|textarea/i.test(u.tagName)){var p=u;c=p.value,u=g.createElement("pre"),p.parentNode.replaceChild(u,p)}else u&&(c=u.textContent,u.innerHTML="");var w=r.createEditSession(c),b=new x(new s(u),w,l),L={document:w,editor:b,onResize:b.resize.bind(b,null)};return p&&(L.textarea=p),b.on("destroy",function(){L.editor.container.env=null}),b.container.env=b.env=L,b},r.createEditSession=function(u,l){var o=new h(u,l);return o.setUndoManager(new d),o},r.Range=y,r.Editor=x,r.EditSession=h,r.UndoManager=d,r.VirtualRenderer=s;var a=r.config.version;r.version=a}),(function(){ace.require(["ace/ace"],function(e){e&&(e.config.init(!0),e.define=ace.define);var r=(function(){return this})();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=e);for(var m in e)e.hasOwnProperty(m)&&(r.ace[m]=e[m]);r.ace.default=r.ace,n&&(n.exports=r.ace)})})()})(Dp)),Dp.exports}P0();var Pp={exports:{}},Wp;function W0(){return Wp||(Wp=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,m){var g=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"},d=r.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},s=r.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},a=r.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},u=r.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},l=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},o=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},c=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},p=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",L="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",M="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",k=this.$keywords=this.createKeywordMapper({keyword:b,"constant.language":L,"variable.language":M,"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(O,E,I){I.length&&(I=[]);var z=O[O.length-1];return I.unshift(z,E),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(O,E,I){I.length&&(I=[]);var z=O[O.length-1];return I.unshift(z,E),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(O,E,I){I.length&&(I=[]);var z=O[O.length-1];return I.unshift(z,E),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(O,E,I){I.length&&(I=[]);var z=O[O.length-1];return I.unshift(z,E),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(O,E,I){I.length&&(I=[]);var z=O[O.length-1];return I.unshift(z,E),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},c,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+C+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},u,l,x,h,o,d,s,a,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:k,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(O,E,I){var z=O[2]=="-"||O[2]=="~"?"indentedHeredoc":"heredoc",P=O.split(this.splitRegex);return I.push(z,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(O,E,I){return O===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(O,E,I){return O===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(O,E){return E[0]==="heredoc"||E[0]==="indentedHeredoc"?E[0]:O}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(O,E,I){return this.next="",O=="}"&&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(O,E,I){return I.length&&O===I[0]?(I.unshift(O,E),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(O,E,I){return I.length&&O===R[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(O,E,I){return I.length&&O===I[0]?(I.unshift(O,E),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(O,E,I){return I.length&&O===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(O,E,I){return I.length&&O===I[0]?(I.unshift(O,E),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(O,E,I){return I.length&&O===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(O,E,I){return I.length&&O===I[0]?(I.unshift(O,E),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(O,E,I){return I.length&&O===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(O,E,I){return I.length&&O===I[0]?(I.unshift(O,E),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(O,E,I){return I.length&&O[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()};g.inherits(p,y),r.RubyHighlightRules=p}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,m){var g=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 d=x.getLine(h),s=d.match(/^(\s*\})/);if(!s)return 0;var a=s[1].length,u=x.findMatchingBracket({row:h,column:a});if(!u||u.row==h)return 0;var l=this.$getIndent(x.getLine(u.row));x.replace(new g(h,0,h,a-1),l)},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,m){var g=e("../../lib/oop"),y=e("./fold_mode").FoldMode,x=e("../../range").Range,h=e("../../token_iterator").TokenIterator,d=r.FoldMode=function(){};g.inherits(d,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,a,u){var l=s.getLine(u),o=this.foldingStartMarker.test(l),c=this.foldingStopMarker.test(l);if(o&&!c){var p=l.match(this.foldingStartMarker);if(p[1]){if((p[1]=="if"||p[1]=="else"||p[1]=="while"||p[1]=="until"||p[1]=="unless")&&(p[1]=="else"&&/^\s*else\s*$/.test(l)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(l)===!1)||p[1]=="when"&&/\sthen\s/.test(l)===!0)return;if(s.getTokenAt(u,p.index+2).type==="keyword")return"start"}else if(!p[3]||s.getTokenAt(u,p.index+1).type==="comment.multiline")return"start"}if(a!="markbeginend"||!c||o&&c)return"";var p=l.match(this.foldingStopMarker);if(p[3]==="end"){if(s.getTokenAt(u,p.index+1).type==="keyword")return"end"}else if(!p[1]||s.getTokenAt(u,p.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(s,a,u){var l=s.doc.getLine(u),o=this.foldingStartMarker.exec(l);if(o)return o[1]||o[3]?this.rubyBlock(s,u,o.index+2):this.openingBracketBlock(s,"{",u,o.index);var o=this.foldingStopMarker.exec(l);if(o)return o[3]==="end"&&s.getTokenAt(u,o.index+1).type==="keyword"?this.rubyBlock(s,u,o.index+1):o[1]==="=end"&&s.getTokenAt(u,o.index+1).type==="comment.multiline"?this.rubyBlock(s,u,o.index+1):this.closingBracketBlock(s,"}",u,o.index+o[0].length)},this.rubyBlock=function(s,a,u,l){var o=new h(s,a,u),c=o.getCurrentToken();if(!(!c||c.type!="keyword"&&c.type!="comment.multiline")){var p=c.value,w=s.getLine(a);switch(c.value){case"if":case"unless":case"while":case"until":var b=new RegExp("^\\s*"+c.value);if(!b.test(w))return;var L=this.indentKeywords[p];break;case"when":if(/\sthen\s/.test(w))return;case"elsif":case"rescue":case"ensure":var L=1;break;case"else":var b=new RegExp("^\\s*"+c.value+"\\s*$");if(!b.test(w))return;var L=1;break;default:var L=this.indentKeywords[p]}var M=[p];if(L){var k=L===-1?s.getLine(a-1).length:s.getLine(a).length,C=a,R=[];if(R.push(o.getCurrentTokenRange()),o.step=L===-1?o.stepBackward:o.stepForward,c.type=="comment.multiline"){for(;c=o.step();)if(c.type==="comment.multiline"){if(L==1){if(k=6,c.value=="=end")break}else if(c.value=="=begin")break}}else for(;c=o.step();){var O=!1;if(c.type==="keyword"){var E=L*this.indentKeywords[c.value];switch(w=s.getLine(o.getCurrentTokenRow()),c.value){case"do":for(var I=o.$tokenIndex-1;I>=0;I--){var z=o.$rowTokens[I];if(z&&(z.value=="while"||z.value=="until"||z.value=="for")){E=0;break}}break;case"else":var b=new RegExp("^\\s*"+c.value+"\\s*$");(!b.test(w)||p=="case")&&(E=0,O=!0);break;case"if":case"unless":case"while":case"until":var b=new RegExp("^\\s*"+c.value);b.test(w)||(E=0,O=!0);break;case"when":(/\sthen\s/.test(w)||p=="case")&&(E=0,O=!0)}if(E>0)M.unshift(c.value);else if(E<=0&&O===!1){if(M.shift(),!M.length&&((p=="while"||p=="until"||p=="for")&&c.value!="do"||c.value=="do"&&L==-1&&E!=0||c.value!="do"))break;E===0&&M.unshift(c.value)}}}if(!c)return null;if(l)return R.push(o.getCurrentTokenRange()),R;var a=o.getCurrentTokenRow();if(L===-1){if(c.type==="comment.multiline")var P=6;else var P=s.getLine(a).length;return new x(a,P,C-1,k)}return new x(C,k,a-1,s.getLine(a-1).length)}}}}).call(d.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,m){var g=e("../lib/oop"),y=e("./text").Mode,x=e("./ruby_highlight_rules").RubyHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,d=e("../range").Range,s=e("./folding/ruby").FoldMode,a=function(){this.HighlightRules=x,this.$outdent=new h,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new s,this.indentKeywords=this.foldingRules.indentKeywords};g.inherits(a,y),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,l,o){var c=this.$getIndent(l),p=this.getTokenizer().getLineTokens(l,u),w=p.tokens;if(w.length&&w[w.length-1].type=="comment")return c;if(u=="start"){var b=l.match(/^.*[\{\(\[]\s*$/),L=l.match(/^\s*(class|def|module)\s.*$/),M=l.match(/.*do(\s*|\s+\|.*\|\s*)$/),k=l.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(b||L||M||k)&&(c+=o)}return c},this.checkOutdent=function(u,l,o){return/^\s+(end|else|rescue|ensure)$/.test(l+o)||this.$outdent.checkOutdent(l,o)},this.autoOutdent=function(u,l,o){var c=l.getLine(o);if(/}/.test(c))return this.$outdent.autoOutdent(l,o);var p=this.$getIndent(c),w=l.getLine(o-1),b=this.$getIndent(w),L=l.getTabString();b.length<=p.length&&p.slice(-L.length)==L&&l.remove(new d(o,p.length-L.length,o,p.length))},this.getMatching=function(u,l,o){if(l==null){var c=u.selection.lead;o=c.column,l=c.row}var p=u.getTokenAt(l,o);if(p&&p.value in this.indentKeywords)return this.foldingRules.rubyBlock(u,l,o,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/ruby"],function(e){n&&(n.exports=e)})})()})(Pp)),Pp.exports}W0();var Bp={exports:{}},zp;function B0(){return zp||(zp=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,m){var g=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",d="True|False|None|NotImplemented|Ellipsis|__debug__",s="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",a=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":s,"variable.language":"self|cls","constant.language":d,keyword:h},"identifier"),u="[uU]?",l="[rR]",o="[fF]",c="(?:[rR][fF]|[fF][rR])",p="(?:(?:[1-9]\\d*)|(?:0))",w="(?:0[oO]?[0-7]+)",b="(?:0[xX][\\dA-Fa-f]+)",L="(?:0[bB][01]+)",M="(?:"+p+"|"+w+"|"+b+"|"+L+")",k="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",R="(?:\\d+)",O="(?:(?:"+R+"?"+C+")|(?:"+R+"\\.))",E="(?:(?:"+O+"|"+R+")"+k+")",I="(?:"+E+"|"+O+")",z=`\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})`;this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:u+'"{3}',next:"qqstring3"},{token:"string",regex:u+'"(?=.)',next:"qqstring"},{token:"string",regex:u+"'{3}",next:"qstring3"},{token:"string",regex:u+"'(?=.)",next:"qstring"},{token:"string",regex:l+'"{3}',next:"rawqqstring3"},{token:"string",regex:l+'"(?=.)',next:"rawqqstring"},{token:"string",regex:l+"'{3}",next:"rawqstring3"},{token:"string",regex:l+"'(?=.)",next:"rawqstring"},{token:"string",regex:o+'"{3}',next:"fqqstring3"},{token:"string",regex:o+'"(?=.)',next:"fqqstring"},{token:"string",regex:o+"'{3}",next:"fqstring3"},{token:"string",regex:o+"'(?=.)",next:"fqstring"},{token:"string",regex:c+'"{3}',next:"rfqqstring3"},{token:"string",regex:c+'"(?=.)',next:"rfqqstring"},{token:"string",regex:c+"'{3}",next:"rfqstring3"},{token:"string",regex:c+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:["keyword","text","entity.name.function"],regex:"(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex:z},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:z},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:z},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:z},{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:z},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:z},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:z},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:z},{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:M+"[lL]\\b"},{token:"constant.numeric",regex:M+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};g.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,m){var g=e("../../lib/oop"),y=e("./fold_mode").FoldMode,x=r.FoldMode=function(h){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+h+")(?:\\s*)(?:#.*)?$")};g.inherits(x,y),(function(){this.getFoldWidgetRange=function(h,d,s){var a=h.getLine(s),u=a.match(this.foldingStartMarker);if(u)return u[1]?this.openingBracketBlock(h,u[1],s,u.index):u[2]?this.indentationBlock(h,s,u.index+u[2].length):this.indentationBlock(h,s)}}).call(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,m){var g=e("../lib/oop"),y=e("./text").Mode,x=e("./python_highlight_rules").PythonHighlightRules,h=e("./folding/pythonic").FoldMode,d=e("../range").Range,s=function(){this.HighlightRules=x,this.foldingRules=new h("\\:"),this.$behaviour=this.$defaultBehaviour};g.inherits(s,y),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(u,l,o){var c=this.$getIndent(l),p=this.getTokenizer().getLineTokens(l,u),w=p.tokens;if(w.length&&w[w.length-1].type=="comment")return c;if(u=="start"){var b=l.match(/^.*[\{\(\[:]\s*$/);b&&(c+=o)}return c};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,l,o){if(o!==`\r
|
986
|
+
`&&o!=="\r"&&o!==`
|
987
|
+
`)return!1;var c=this.getTokenizer().getLineTokens(l.trim(),u).tokens;if(!c)return!1;do var p=c.pop();while(p&&(p.type=="comment"||p.type=="text"&&p.value.match(/^\s+$/)));return p?p.type=="keyword"&&a[p.value]:!1},this.autoOutdent=function(u,l,o){o+=1;var c=this.$getIndent(l.getLine(o)),p=l.getTabString();c.slice(-p.length)==p&&l.remove(new d(o,c.length-p.length,o,c.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)})})()})(Bp)),Bp.exports}B0();var jp={exports:{}},Hp;function z0(){return Hp||(Hp=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,m){var g=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"}]}};g.inherits(x,y),r.JsonHighlightRules=x}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,m){var g=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 d=x.getLine(h),s=d.match(/^(\s*\})/);if(!s)return 0;var a=s[1].length,u=x.findMatchingBracket({row:h,column:a});if(!u||u.row==h)return 0;var l=this.$getIndent(x.getLine(u.row));x.replace(new g(h,0,h,a-1),l)},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,m){var g=e("../../lib/oop"),y=e("../../range").Range,x=e("./fold_mode").FoldMode,h=r.FoldMode=function(d){d&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+d.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+d.end)))};g.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(d,s,a){var u=d.getLine(a);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var l=this._getFoldWidgetBase(d,s,a);return!l&&this.startRegionRe.test(u)?"start":l},this.getFoldWidgetRange=function(d,s,a,u){var l=d.getLine(a);if(this.startRegionRe.test(l))return this.getCommentRegionBlock(d,l,a);var o=l.match(this.foldingStartMarker);if(o){var c=o.index;if(o[1])return this.openingBracketBlock(d,o[1],a,c);var p=d.getCommentFoldRange(a,c+o[0].length,1);return p&&!p.isMultiLine()&&(u?p=this.getSectionRange(d,a):s!="all"&&(p=null)),p}if(s!=="markbegin"){var o=l.match(this.foldingStopMarker);if(o){var c=o.index+o[0].length;return o[1]?this.closingBracketBlock(d,o[1],a,c):d.getCommentFoldRange(a,c,-1)}}},this.getSectionRange=function(d,s){var a=d.getLine(s),u=a.search(/\S/),l=s,o=a.length;s+=1;for(var c=s,p=d.getLength();++s<p;){a=d.getLine(s);var w=a.search(/\S/);if(w!==-1){if(u>w)break;var b=this.getFoldWidgetRange(d,"all",s);if(b){if(b.start.row<=l)break;if(b.isMultiLine())s=b.end.row;else if(u==w)break}c=s}}return new y(l,o,c,d.getLine(c).length)},this.getCommentRegionBlock=function(d,s,a){for(var u=s.search(/\s*$/),l=d.getLength(),o=a,c=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,p=1;++a<l;){s=d.getLine(a);var w=c.exec(s);if(w&&(w[1]?p--:p++,!p))break}var b=a;if(b>o)return new y(o,u,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,m){var g=e("../lib/oop"),y=e("./text").Mode,x=e("./json_highlight_rules").JsonHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,d=e("./folding/cstyle").FoldMode,s=e("../worker/worker_client").WorkerClient,a=function(){this.HighlightRules=x,this.$outdent=new h,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new d};g.inherits(a,y),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(u,l,o){var c=this.$getIndent(l);if(u=="start"){var p=l.match(/^.*[\{\(\[]\s*$/);p&&(c+=o)}return c},this.checkOutdent=function(u,l,o){return this.$outdent.checkOutdent(l,o)},this.autoOutdent=function(u,l,o){this.$outdent.autoOutdent(l,o)},this.createWorker=function(u){var l=new s(["ace"],"ace/mode/json_worker","JsonWorker");return l.attachToDocument(u.getDocument()),l.on("annotate",function(o){u.setAnnotations(o.data)}),l.on("terminate",function(){u.clearAnnotations()}),l},this.$id="ace/mode/json"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/json"],function(e){n&&(n.exports=e)})})()})(jp)),jp.exports}z0();var Up={exports:{}},Vp;function j0(){return Vp||(Vp=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,m){var g=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",d=r.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",s=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",a=r.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",u=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",l=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",o=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",c=function(){var p=this.createKeywordMapper({"support.function":h,"support.constant":d,"support.type":x,"support.constant.color":s,"support.constant.fonts":a},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:u},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+u+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:u},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:l},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:o},{include:"url"},{token:p,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()};g.inherits(c,y),r.CssHighlightRules=c}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var g=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()};g.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,m){function g(){var u=s.replace("\\d","\\d\\-"),l={onMatch:function(c,p,w){var b=c.charAt(1)=="/"?2:1;return b==1?(p!=this.nextState?w.unshift(this.next,this.nextState,0):w.unshift(this.next),w[2]++):b==2&&p==this.nextState&&(w[1]--,(!w[1]||w[1]<0)&&(w.shift(),w.shift())),[{type:"meta.tag.punctuation."+(b==1?"":"end-")+"tag-open.xml",value:c.slice(0,b)},{type:"meta.tag.tag-name.xml",value:c.substr(b)}]},regex:"</?(?:"+u+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(l);var o={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[o,l,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(c,p,w){return p==w[0]&&w.shift(),c.length==2&&(w[0]==this.nextState&&w[1]--,(!w[1]||w[1]<0)&&w.splice(0,2)),this.next=w[0]||"start",[{type:this.token,value:c}]},nextState:"jsx"},o,y("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:u},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},l],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function y(u){return[{token:"comment",regex:/\/\*/,next:[h.getTagRule(),{token:"comment",regex:"\\*\\/",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[h.getTagRule(),{token:"comment",regex:"$|^",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var x=e("../lib/oop"),h=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,d=e("./text_highlight_rules").TextHighlightRules,s="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*",a=function(u){var l={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},o=this.createKeywordMapper(l,"identifier"),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",p="\\\\(?: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(l).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:"(?:"+c+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token: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:p},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:p},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!u||!u.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(L,M,k){if(this.next=L=="{"?this.nextState:"",L=="{"&&k.length)k.unshift("start",M);else if(L=="}"&&k.length&&(k.shift(),this.next=k.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return L=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:p},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+s+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!u||u.jsx!=0)&&g.call(this)),this.embedRules(h,"doc-",[h.getEndRule("no_regex")]),this.normalizeRules()};x.inherits(a,d),r.JavaScriptHighlightRules=a}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var g=e("../lib/oop"),y=e("./text_highlight_rules").TextHighlightRules,x=function(h){var d="[_: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:"(<\\?)("+d+")",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:d},{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:"(<\\!)("+d+")",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:"(?:(<)|(</))((?:"+d+":)?"+d+")",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:d},{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,d,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:d+"start"}]}),this.$rules[s+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(a,u,l){return l.splice(0),this.token}}],this.embedRules(h,d,[{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),g.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,m){var g=e("../lib/oop"),y=e("../lib/lang"),x=e("./css_highlight_rules").CssHighlightRules,h=e("./javascript_highlight_rules").JavaScriptHighlightRules,d=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"}),a=function(){d.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(u,l){var o=s[l];return["meta.tag.punctuation."+(u=="<"?"":"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===a&&this.normalizeRules()};g.inherits(a,d),r.HtmlHighlightRules=a}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,r,m){var g=e("../config").$modes,y=e("../lib/oop"),x=e("../lib/lang"),h=e("./text_highlight_rules").TextHighlightRules,d=e("./html_highlight_rules").HtmlHighlightRules,s=function(u){return"(?:[^"+x.escapeRegExp(u)+"\\\\]|\\\\.)*"},a=function(){d.call(this);var u={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(o,c,p,w){var b=o.match(/^(\s*)([`~]+)(.*)/),L=/[\w-]+|$/.exec(b[3])[0];return g[L]||(L=""),p.unshift("githubblock",[],[b[1],b[2],L],c),this.token},next:"githubblock"},l=[{token:"support.function",regex:".*",onMatch:function(o,c,p,w){var b=p[1],L=p[2][0],M=p[2][1],k=p[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(o);if(C&&C[1].length<L.length+3&&C[2].length>=M.length&&C[2][0]==M[0])return p.splice(0,3),this.next=p.shift(),this.token;if(this.next="",k&&g[k]){var R=g[k].getTokenizer().getLineTokens(o,b.slice(0));return p[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"},u,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+s("]")+")(\\]\\s*\\[)("+s("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+s("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+s('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},u,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:l}),this.normalizeRules()};y.inherits(a,h),r.MarkdownHighlightRules=a}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,r,m){var g=e("../../lib/oop"),y=e("./fold_mode").FoldMode,x=e("../../range").Range,h=r.FoldMode=function(){};g.inherits(h,y),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(d,s,a){var u=d.getLine(a);return this.foldingStartMarker.test(u)?u[0]=="`"&&d.bgTokenizer.getState(a)=="start"?"end":"start":""},this.getFoldWidgetRange=function(d,s,a){function u(O){return L=d.getTokens(O)[0],L&&L.type.lastIndexOf(M,0)===0}function l(){var O=L.value[0];return O=="="?6:O=="-"?5:7-L.value.search(/[^#]|$/)}var o=d.getLine(a),c=o.length,p=d.getLength(),w=a,b=a;if(o.match(this.foldingStartMarker)){if(o[0]=="`"){if(d.bgTokenizer.getState(a)!=="start"){for(;++a<p&&(o=d.getLine(a),!(o[0]=="`"&o.substring(0,3)=="```")););return new x(w,c,a,0)}for(;a-- >0&&(o=d.getLine(a),!(o[0]=="`"&o.substring(0,3)=="```")););return new x(a,o.length,w,0)}var L,M="markup.heading";if(u(a)){for(var k=l();++a<p;)if(u(a)){var C=l();if(C>=k)break}if(b=a-(!L||["=","-"].indexOf(L.value[0])==-1?1:2),b>w)for(;b>w&&/^\s*$/.test(d.getLine(b));)b--;if(b>w){var R=d.getLine(b).length;return new x(w,c,b,R)}}}}}).call(h.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,m){var g=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 d=x.getLine(h),s=d.match(/^(\s*\})/);if(!s)return 0;var a=s[1].length,u=x.findMatchingBracket({row:h,column:a});if(!u||u.row==h)return 0;var l=this.$getIndent(x.getLine(u.row));x.replace(new g(h,0,h,a-1),l)},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,m){function g(s,a){return s&&s.type.lastIndexOf(a+".xml")>-1}var y=e("../../lib/oop"),x=e("../behaviour").Behaviour,h=e("../../token_iterator").TokenIterator,d=function(){this.add("string_dquotes","insertion",function(s,a,u,l,o){if(o=='"'||o=="'"){var c=o,p=l.doc.getTextRange(u.getSelectionRange());if(p!==""&&p!=="'"&&p!='"'&&u.getWrapBehavioursEnabled())return{text:c+p+c,selection:!1};var w=u.getCursorPosition(),b=l.doc.getLine(w.row),L=b.substring(w.column,w.column+1),M=new h(l,w.row,w.column),k=M.getCurrentToken();if(L==c&&(g(k,"attribute-value")||g(k,"string")))return{text:"",selection:[1,1]};if(k||(k=M.stepBackward()),!k)return;for(;g(k,"tag-whitespace")||g(k,"whitespace");)k=M.stepBackward();var C=!L||L.match(/\s/);if(g(k,"attribute-equals")&&(C||L==">")||g(k,"decl-attribute-equals")&&(C||L=="?"))return{text:c+c,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(s,a,u,l,o){var c=l.doc.getTextRange(o);if(!o.isMultiLine()&&(c=='"'||c=="'")){var p=l.doc.getLine(o.start.row),w=p.substring(o.start.column+1,o.start.column+2);if(w==c)return o.end.column++,o}}),this.add("autoclosing","insertion",function(s,a,u,l,o){if(o==">"){var c=u.getSelectionRange().start,p=new h(l,c.row,c.column),w=p.getCurrentToken()||p.stepBackward();if(!w||!(g(w,"tag-name")||g(w,"tag-whitespace")||g(w,"attribute-name")||g(w,"attribute-equals")||g(w,"attribute-value"))||g(w,"reference.attribute-value"))return;if(g(w,"attribute-value")){var b=p.getCurrentTokenColumn()+w.value.length;if(c.column<b)return;if(c.column==b){var L=p.stepForward();if(L&&g(L,"attribute-value"))return;p.stepBackward()}}if(/^\s*>/.test(l.getLine(c.row).slice(c.column)))return;for(;!g(w,"tag-name");)if(w=p.stepBackward(),w.value=="<"){w=p.stepForward();break}var M=p.getCurrentTokenRow(),k=p.getCurrentTokenColumn();if(g(p.stepBackward(),"end-tag-open"))return;var C=w.value;return M==c.row&&(C=C.substring(0,c.column-k)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(s,a,u,l,o){if(o==`
|
988
|
+
`){var c=u.getCursorPosition(),p=l.getLine(c.row),w=new h(l,c.row,c.column),b=w.getCurrentToken();if(g(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 L=b.value,M=w.getCurrentTokenRow();if(b=w.stepBackward(),!b||b.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[L]||!this.voidElements){var k=l.getTokenAt(c.row,c.column+1),p=l.getLine(M),C=this.$getIndent(p),R=C+l.getTabString();return k&&k.value==="</"?{text:`
|
989
|
+
`+R+`
|
990
|
+
`+C,selection:[1,R.length,1,R.length]}:{text:`
|
991
|
+
`+R}}}}})};y.inherits(d,x),r.XmlBehaviour=d}),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,m){var g=e("../../lib/oop"),y=e("../../token_iterator").TokenIterator,x=e("../behaviour/cstyle").CstyleBehaviour,h=e("../behaviour/xml").XmlBehaviour,d=function(){var s=new h({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(s),this.inherit(x),this.add("autoclosing-fragment","insertion",function(a,u,l,o,c){if(c==">"){var p=l.getSelectionRange().start,w=new y(o,p.row,p.column),b=w.getCurrentToken()||w.stepBackward();if(!b)return;if(b.value=="<")return{text:"></>",selection:[1,1]}}})};g.inherits(d,x),r.JavaScriptBehaviour=d}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,m){function g(a,u){return a&&a.type&&a.type.lastIndexOf(u+".xml")>-1}var y=e("../../lib/oop"),x=e("../../range").Range,h=e("./fold_mode").FoldMode,d=r.FoldMode=function(a,u){h.call(this),this.voidElements=a||{},this.optionalEndTags=y.mixin({},this.voidElements),u&&y.mixin(this.optionalEndTags,u)};y.inherits(d,h);var s=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(a,u,l){var o=this._getFirstTagInLine(a,l);return o?o.closing||!o.tagName&&o.selfClosing?u==="markbeginend"?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())||this._findEndTagInLine(a,l,o.tagName,o.end.column)?"":"start":this.getCommentFoldWidget(a,l)},this.getCommentFoldWidget=function(a,u){return/comment/.test(a.getState(u))&&/<!-/.test(a.getLine(u))?"start":""},this._getFirstTagInLine=function(a,u){for(var l=a.getTokens(u),o=new s,c=0;c<l.length;c++){var p=l[c];if(g(p,"tag-open")){if(o.end.column=o.start.column+p.value.length,o.closing=g(p,"end-tag-open"),p=l[++c],!p)return null;if(o.tagName=p.value,p.value===""){if(p=l[++c],!p)return null;o.tagName=p.value}for(o.end.column+=p.value.length,c++;c<l.length;c++)if(p=l[c],o.end.column+=p.value.length,g(p,"tag-close")){o.selfClosing=p.value=="/>";break}return o}if(g(p,"tag-close"))return o.selfClosing=p.value=="/>",o;o.start.column+=p.value.length}return null},this._findEndTagInLine=function(a,u,l,o){for(var c=a.getTokens(u),p=0,w=0;w<c.length;w++){var b=c[w];if(p+=b.value.length,!(p<o-1)&&g(b,"end-tag-open")&&(b=c[w+1],g(b,"tag-name")&&b.value===""&&(b=c[w+2]),b&&b.value==l))return!0}return!1},this.getFoldWidgetRange=function(a,u,l){var o=this._getFirstTagInLine(a,l);if(!o)return this.getCommentFoldWidget(a,l)&&a.getCommentFoldRange(l,a.getLine(l).length);var c=a.getMatchingTags({row:l,column:0});if(c)return new x(c.openTag.end.row,c.openTag.end.column,c.closeTag.start.row,c.closeTag.start.column)}}).call(d.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,m){var g=e("../../lib/oop"),y=e("../../range").Range,x=e("./fold_mode").FoldMode,h=r.FoldMode=function(d){d&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+d.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+d.end)))};g.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(d,s,a){var u=d.getLine(a);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var l=this._getFoldWidgetBase(d,s,a);return!l&&this.startRegionRe.test(u)?"start":l},this.getFoldWidgetRange=function(d,s,a,u){var l=d.getLine(a);if(this.startRegionRe.test(l))return this.getCommentRegionBlock(d,l,a);var o=l.match(this.foldingStartMarker);if(o){var c=o.index;if(o[1])return this.openingBracketBlock(d,o[1],a,c);var p=d.getCommentFoldRange(a,c+o[0].length,1);return p&&!p.isMultiLine()&&(u?p=this.getSectionRange(d,a):s!="all"&&(p=null)),p}if(s!=="markbegin"){var o=l.match(this.foldingStopMarker);if(o){var c=o.index+o[0].length;return o[1]?this.closingBracketBlock(d,o[1],a,c):d.getCommentFoldRange(a,c,-1)}}},this.getSectionRange=function(d,s){var a=d.getLine(s),u=a.search(/\S/),l=s,o=a.length;s+=1;for(var c=s,p=d.getLength();++s<p;){a=d.getLine(s);var w=a.search(/\S/);if(w!==-1){if(u>w)break;var b=this.getFoldWidgetRange(d,"all",s);if(b){if(b.start.row<=l)break;if(b.isMultiLine())s=b.end.row;else if(u==w)break}c=s}}return new y(l,o,c,d.getLine(c).length)},this.getCommentRegionBlock=function(d,s,a){for(var u=s.search(/\s*$/),l=d.getLength(),o=a,c=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,p=1;++a<l;){s=d.getLine(a);var w=c.exec(s);if(w&&(w[1]?p--:p++,!p))break}var b=a;if(b>o)return new y(o,u,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,m){var g=e("../../lib/oop"),y=e("./xml").FoldMode,x=e("./cstyle").FoldMode,h=r.FoldMode=function(d){d&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+d.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+d.end))),this.xmlFoldMode=new y};g.inherits(h,x),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(d,s,a){var u=this.getFoldWidgetBase(d,s,a);return u||this.xmlFoldMode.getFoldWidget(d,s,a)},this.getFoldWidgetRange=function(d,s,a,u){var l=this.getFoldWidgetRangeBase(d,s,a,u);return l||this.xmlFoldMode.getFoldWidgetRange(d,s,a)}}).call(h.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,r,m){var g=e("../lib/oop"),y=e("./text").Mode,x=e("./javascript_highlight_rules").JavaScriptHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,d=e("../worker/worker_client").WorkerClient,s=e("./behaviour/javascript").JavaScriptBehaviour,a=e("./folding/javascript").FoldMode,u=function(){this.HighlightRules=x,this.$outdent=new h,this.$behaviour=new s,this.foldingRules=new a};g.inherits(u,y),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(l,o,c){var p=this.$getIndent(o),w=this.getTokenizer().getLineTokens(o,l),b=w.tokens,L=w.state;if(b.length&&b[b.length-1].type=="comment")return p;if(l=="start"||l=="no_regex"){var M=o.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);M&&(p+=c)}else if(l=="doc-start"&&(L=="start"||L=="no_regex"))return"";return p},this.checkOutdent=function(l,o,c){return this.$outdent.checkOutdent(o,c)},this.autoOutdent=function(l,o,c){this.$outdent.autoOutdent(o,c)},this.createWorker=function(l){var o=new d(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return o.attachToDocument(l.getDocument()),o.on("annotate",function(c){l.setAnnotations(c.data)}),o.on("terminate",function(){l.clearAnnotations()}),o},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(u.prototype),r.Mode=u}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,r,m){var g={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 d=h.replace(/[A-Z]/g,function(s){return"-"+s.toLowerCase()});g.hasOwnProperty(d)||(g[d]=1)}}this.completionsDefined=!0},this.getCompletions=function(x,h,d,s){if(this.completionsDefined||this.defineCompletions(),x==="ruleset"||h.$mode.$id=="ace/mode/scss"){var a=h.getLine(d.row).substr(0,d.column),u=/\([^)]*$/.test(a);return u&&(a=a.substr(a.lastIndexOf("(")+1)),/:[^;]+$/.test(a)?this.getPropertyValueCompletions(x,h,d,s):this.getPropertyCompletions(x,h,d,s,u)}return[]},this.getPropertyCompletions=function(x,h,d,s,a){a=a||!1;var u=Object.keys(g);return u.map(function(l){return{caption:l,snippet:l+": $0"+(a?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(x,h,d,s){var a=h.getLine(d.row).substr(0,d.column),u=(/([\w\-]+):[^:]*$/.exec(a)||{})[1];if(!u)return[];var l=[];return u in g&&typeof g[u]=="object"&&(l=Object.keys(g[u])),l.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,m){var g=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(d,s,a,u,l){if(l===":"&&a.selection.isEmpty()){var o=a.getCursorPosition(),c=new x(u,o.row,o.column),p=c.getCurrentToken();if(p&&p.value.match(/\s+/)&&(p=c.stepBackward()),p&&p.type==="support.type"){var w=u.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(d,s,a,u,l){var o=u.doc.getTextRange(l);if(!l.isMultiLine()&&o===":"){var c=a.getCursorPosition(),p=new x(u,c.row,c.column),w=p.getCurrentToken();if(w&&w.value.match(/\s+/)&&(w=p.stepBackward()),w&&w.type==="support.type"){var b=u.doc.getLine(l.start.row),L=b.substring(l.end.column,l.end.column+1);if(L===";")return l.end.column++,l}}}),this.add("semicolon","insertion",function(d,s,a,u,l){if(l===";"&&a.selection.isEmpty()){var o=a.getCursorPosition(),c=u.doc.getLine(o.row),p=c.substring(o.column,o.column+1);if(p===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(d,s,a,u,l){if(l==="!"&&a.selection.isEmpty()){var o=a.getCursorPosition(),c=u.doc.getLine(o.row);if(/^\s*(;|}|$)/.test(c.substring(o.column)))return{text:"!important",selection:[10,10]}}})};g.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,m){var g=e("../lib/oop"),y=e("./text").Mode,x=e("./css_highlight_rules").CssHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,d=e("../worker/worker_client").WorkerClient,s=e("./css_completions").CssCompletions,a=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=x,this.$outdent=new h,this.$behaviour=new a,this.$completer=new s,this.foldingRules=new u};g.inherits(l,y),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(o,c,p){var w=this.$getIndent(c),b=this.getTokenizer().getLineTokens(c,o).tokens;if(b.length&&b[b.length-1].type=="comment")return w;var L=c.match(/^.*\{\s*$/);return L&&(w+=p),w},this.checkOutdent=function(o,c,p){return this.$outdent.checkOutdent(c,p)},this.autoOutdent=function(o,c,p){this.$outdent.autoOutdent(c,p)},this.getCompletions=function(o,c,p,w){return this.$completer.getCompletions(o,c,p,w)},this.createWorker=function(o){var c=new d(["ace"],"ace/mode/css_worker","Worker");return c.attachToDocument(o.getDocument()),c.on("annotate",function(p){o.setAnnotations(p.data)}),c.on("terminate",function(){o.clearAnnotations()}),c},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(l.prototype),r.Mode=l}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,m){var g=e("../../lib/oop"),y=e("./fold_mode").FoldMode,x=r.FoldMode=function(h,d){this.defaultMode=h,this.subModes=d};g.inherits(x,y),(function(){this.$getMode=function(h){typeof h!="string"&&(h=h[0]);for(var d in this.subModes)if(h.indexOf(d)===0)return this.subModes[d];return null},this.$tryMode=function(h,d,s,a){var u=this.$getMode(h);return u?u.getFoldWidget(d,s,a):""},this.getFoldWidget=function(h,d,s){return this.$tryMode(h.getState(s-1),h,d,s)||this.$tryMode(h.getState(s),h,d,s)||this.defaultMode.getFoldWidget(h,d,s)},this.getFoldWidgetRange=function(h,d,s){var a=this.$getMode(h.getState(s-1));return(!a||!a.getFoldWidget(h,d,s))&&(a=this.$getMode(h.getState(s))),(!a||!a.getFoldWidget(h,d,s))&&(a=this.defaultMode),a.getFoldWidgetRange(h,d,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,m){var g=e("../../lib/oop"),y=e("./mixed").FoldMode,x=e("./xml").FoldMode,h=e("./cstyle").FoldMode,d=r.FoldMode=function(s,a){y.call(this,new x(s,a),{"js-":new h,"css-":new h})};g.inherits(d,y)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,r,m){function g(c,p){return c.type.lastIndexOf(p+".xml")>-1}function y(c,p){for(var w=new h(c,p.row,p.column),b=w.getCurrentToken();b&&!g(b,"tag-name");)b=w.stepBackward();if(b)return b.value}function x(c,p){for(var w=new h(c,p.row,p.column),b=w.getCurrentToken();b&&!g(b,"attribute-name");)b=w.stepBackward();if(b)return b.value}var h=e("../token_iterator").TokenIterator,d=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],a=d.concat(s),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},l=Object.keys(u),o=function(){};(function(){this.getCompletions=function(c,p,w,b){var L=p.getTokenAt(w.row,w.column);if(!L)return[];if(g(L,"tag-name")||g(L,"tag-open")||g(L,"end-tag-open"))return this.getTagCompletions(c,p,w,b);if(g(L,"tag-whitespace")||g(L,"attribute-name"))return this.getAttributeCompletions(c,p,w,b);if(g(L,"attribute-value"))return this.getAttributeValueCompletions(c,p,w,b);var M=p.getLine(w.row).substr(0,w.column);return/&[a-z]*$/i.test(M)?this.getHTMLEntityCompletions(c,p,w,b):[]},this.getTagCompletions=function(c,p,w,b){return l.map(function(L){return{value:L,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(c,p,w,b){var L=y(p,w);if(!L)return[];var M=a;return L in u&&(M=M.concat(Object.keys(u[L]))),M.map(function(k){return{caption:k,snippet:k+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(c,p,w,b){var L=y(p,w),M=x(p,w);if(!L)return[];var k=[];return L in u&&M in u[L]&&typeof u[L][M]=="object"&&(k=Object.keys(u[L][M])),k.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(c,p,w,b){var L=["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 L.map(function(M){return{caption:M,snippet:M,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,m){var g=e("../lib/oop"),y=e("../lib/lang"),x=e("./text").Mode,h=e("./javascript").Mode,d=e("./css").Mode,s=e("./html_highlight_rules").HtmlHighlightRules,a=e("./behaviour/xml").XmlBehaviour,u=e("./folding/html").FoldMode,l=e("./html_completions").HtmlCompletions,o=e("../worker/worker_client").WorkerClient,c=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],p=["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 a,this.$completer=new l,this.createModeDelegates({"js-":h,"css-":d}),this.foldingRules=new u(this.voidElements,y.arrayToMap(p))};g.inherits(w,x),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=y.arrayToMap(c),this.getNextLineIndent=function(b,L,M){return this.$getIndent(L)},this.checkOutdent=function(b,L,M){return!1},this.getCompletions=function(b,L,M,k){return this.$completer.getCompletions(b,L,M,k)},this.createWorker=function(b){if(this.constructor==w){var L=new o(["ace"],"ace/mode/html_worker","Worker");return L.attachToDocument(b.getDocument()),this.fragmentContext&&L.call("setOptions",[{context:this.fragmentContext}]),L.on("error",function(M){b.setAnnotations(M.data)}),L.on("terminate",function(){b.clearAnnotations()}),L}},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,m){var g=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",d=function(){var s=this.createKeywordMapper({keyword:x,"support.function.builtin":h,"invalid.deprecated":"debugger"},"identifier"),a="(?:(?:[1-9]\\d*)|(?:0))",u="(?:\\.\\d+)",l="(?:\\d+)",o="(?:(?:"+l+"?"+u+")|(?:"+l+"\\.))",c="(?:(?:"+o+"|"+l+"))",p="(?:"+c+"|"+o+")",w="(?:&"+l+")",b="[a-zA-Z_][a-zA-Z0-9_]*",L="(?:"+b+"(?==))",M="(?:\\$(?:SHLVL|\\$|\\!|\\?))",k="(?:"+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,O){var E=C[2]=="-"?"indentedHeredoc":"heredoc",I=C.split(this.splitRegex);return O.push(E,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,O){return C===O[1]?(O.shift(),O.shift(),this.next=O[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(C,R,O){return C===O[1]?(O.shift(),O.shift(),this.next=O[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:M},{token:"variable",regex:L},{include:"variables"},{token:"support.function",regex:k},{token:"support.function",regex:w},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:p},{token:"constant.numeric",regex:a+"\\b"},{token:s,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};g.inherits(d,y),r.ShHighlightRules=d}),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,m){var g=e("../lib/oop"),y=e("./text").Mode,x=e("./sh_highlight_rules").ShHighlightRules,h=e("../range").Range,d=e("./folding/cstyle").FoldMode,s=function(){this.HighlightRules=x,this.foldingRules=new d,this.$behaviour=this.$defaultBehaviour};g.inherits(s,y),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,l,o){var c=this.$getIndent(l),p=this.getTokenizer().getLineTokens(l,u),w=p.tokens;if(w.length&&w[w.length-1].type=="comment")return c;if(u=="start"){var b=l.match(/^.*[\{\(\[:]\s*$/);b&&(c+=o)}return c};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,l,o){if(o!==`\r
|
992
|
+
`&&o!=="\r"&&o!==`
|
993
|
+
`)return!1;var c=this.getTokenizer().getLineTokens(l.trim(),u).tokens;if(!c)return!1;do var p=c.pop();while(p&&(p.type=="comment"||p.type=="text"&&p.value.match(/^\s+$/)));return p?p.type=="keyword"&&a[p.value]:!1},this.autoOutdent=function(u,l,o){o+=1;var c=this.$getIndent(l.getLine(o)),p=l.getTabString();c.slice(-p.length)==p&&l.remove(new h(o,c.length-p.length,o,c.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,m){var g=e("../lib/oop"),y=e("../lib/lang"),x=e("./text").Mode,h=e("./xml_highlight_rules").XmlHighlightRules,d=e("./behaviour/xml").XmlBehaviour,s=e("./folding/xml").FoldMode,a=e("../worker/worker_client").WorkerClient,u=function(){this.HighlightRules=h,this.$behaviour=new d,this.foldingRules=new s};g.inherits(u,x),(function(){this.voidElements=y.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(l){var o=new a(["ace"],"ace/mode/xml_worker","Worker");return o.attachToDocument(l.getDocument()),o.on("error",function(c){l.setAnnotations(c.data)}),o.on("terminate",function(){l.clearAnnotations()}),o},this.$id="ace/mode/xml"}).call(u.prototype),r.Mode=u}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(e,r,m){var g=e("../lib/oop"),y=e("./behaviour/cstyle").CstyleBehaviour,x=e("./text").Mode,h=e("./markdown_highlight_rules").MarkdownHighlightRules,d=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 d,this.$behaviour=new y({braces:!0})};g.inherits(s,x),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(a,u,l){if(a=="listblock"){var o=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(u);if(!o)return"";var c=o[2];return c||(c=parseInt(o[3],10)+1+"."),o[1]+c+o[4]}return this.$getIndent(u)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(s.prototype),r.Mode=s}),(function(){ace.require(["ace/mode/markdown"],function(e){n&&(n.exports=e)})})()})(Up)),Up.exports}j0();var Gp={exports:{}},Kp;function H0(){return Kp||(Kp=1,(function(n,t){ace.define("ace/theme/twilight-css",["require","exports","module"],function(e,r,m){m.exports=`.ace-twilight .ace_gutter {
|
994
|
+
background: #232323;
|
995
|
+
color: #E2E2E2
|
996
|
+
}
|
997
|
+
|
998
|
+
.ace-twilight .ace_print-margin {
|
999
|
+
width: 1px;
|
1000
|
+
background: #232323
|
1001
|
+
}
|
1002
|
+
|
1003
|
+
.ace-twilight {
|
1004
|
+
background-color: #141414;
|
1005
|
+
color: #F8F8F8
|
1006
|
+
}
|
1007
|
+
|
1008
|
+
.ace-twilight .ace_cursor {
|
1009
|
+
color: #A7A7A7
|
1010
|
+
}
|
1011
|
+
|
1012
|
+
.ace-twilight .ace_marker-layer .ace_selection {
|
1013
|
+
background: rgba(221, 240, 255, 0.20)
|
1014
|
+
}
|
1015
|
+
|
1016
|
+
.ace-twilight.ace_multiselect .ace_selection.ace_start {
|
1017
|
+
box-shadow: 0 0 3px 0px #141414;
|
1018
|
+
}
|
1019
|
+
|
1020
|
+
.ace-twilight .ace_marker-layer .ace_step {
|
1021
|
+
background: rgb(102, 82, 0)
|
1022
|
+
}
|
1023
|
+
|
1024
|
+
.ace-twilight .ace_marker-layer .ace_bracket {
|
1025
|
+
margin: -1px 0 0 -1px;
|
1026
|
+
border: 1px solid rgba(255, 255, 255, 0.25)
|
1027
|
+
}
|
1028
|
+
|
1029
|
+
.ace-twilight .ace_marker-layer .ace_active-line {
|
1030
|
+
background: rgba(255, 255, 255, 0.031)
|
1031
|
+
}
|
1032
|
+
|
1033
|
+
.ace-twilight .ace_gutter-active-line {
|
1034
|
+
background-color: rgba(255, 255, 255, 0.031)
|
1035
|
+
}
|
1036
|
+
|
1037
|
+
.ace-twilight .ace_marker-layer .ace_selected-word {
|
1038
|
+
border: 1px solid rgba(221, 240, 255, 0.20)
|
1039
|
+
}
|
1040
|
+
|
1041
|
+
.ace-twilight .ace_invisible {
|
1042
|
+
color: rgba(255, 255, 255, 0.25)
|
1043
|
+
}
|
1044
|
+
|
1045
|
+
.ace-twilight .ace_keyword,
|
1046
|
+
.ace-twilight .ace_meta {
|
1047
|
+
color: #CDA869
|
1048
|
+
}
|
1049
|
+
|
1050
|
+
.ace-twilight .ace_constant,
|
1051
|
+
.ace-twilight .ace_constant.ace_character,
|
1052
|
+
.ace-twilight .ace_constant.ace_character.ace_escape,
|
1053
|
+
.ace-twilight .ace_constant.ace_other,
|
1054
|
+
.ace-twilight .ace_heading,
|
1055
|
+
.ace-twilight .ace_markup.ace_heading,
|
1056
|
+
.ace-twilight .ace_support.ace_constant {
|
1057
|
+
color: #CF6A4C
|
1058
|
+
}
|
1059
|
+
|
1060
|
+
.ace-twilight .ace_invalid.ace_illegal {
|
1061
|
+
color: #F8F8F8;
|
1062
|
+
background-color: rgba(86, 45, 86, 0.75)
|
1063
|
+
}
|
1064
|
+
|
1065
|
+
.ace-twilight .ace_invalid.ace_deprecated {
|
1066
|
+
text-decoration: underline;
|
1067
|
+
font-style: italic;
|
1068
|
+
color: #D2A8A1
|
1069
|
+
}
|
1070
|
+
|
1071
|
+
.ace-twilight .ace_support {
|
1072
|
+
color: #9B859D
|
1073
|
+
}
|
1074
|
+
|
1075
|
+
.ace-twilight .ace_fold {
|
1076
|
+
background-color: #AC885B;
|
1077
|
+
border-color: #F8F8F8
|
1078
|
+
}
|
1079
|
+
|
1080
|
+
.ace-twilight .ace_support.ace_function {
|
1081
|
+
color: #DAD085
|
1082
|
+
}
|
1083
|
+
|
1084
|
+
.ace-twilight .ace_list,
|
1085
|
+
.ace-twilight .ace_markup.ace_list,
|
1086
|
+
.ace-twilight .ace_storage {
|
1087
|
+
color: #F9EE98
|
1088
|
+
}
|
1089
|
+
|
1090
|
+
.ace-twilight .ace_entity.ace_name.ace_function,
|
1091
|
+
.ace-twilight .ace_meta.ace_tag {
|
1092
|
+
color: #AC885B
|
1093
|
+
}
|
1094
|
+
|
1095
|
+
.ace-twilight .ace_string {
|
1096
|
+
color: #8F9D6A
|
1097
|
+
}
|
1098
|
+
|
1099
|
+
.ace-twilight .ace_string.ace_regexp {
|
1100
|
+
color: #E9C062
|
1101
|
+
}
|
1102
|
+
|
1103
|
+
.ace-twilight .ace_comment {
|
1104
|
+
font-style: italic;
|
1105
|
+
color: #5F5A60
|
1106
|
+
}
|
1107
|
+
|
1108
|
+
.ace-twilight .ace_variable {
|
1109
|
+
color: #7587A6
|
1110
|
+
}
|
1111
|
+
|
1112
|
+
.ace-twilight .ace_xml-pe {
|
1113
|
+
color: #494949
|
1114
|
+
}
|
1115
|
+
|
1116
|
+
.ace-twilight .ace_indent-guide {
|
1117
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
|
1118
|
+
}
|
1119
|
+
|
1120
|
+
.ace-twilight .ace_indent-guide-active {
|
1121
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
|
1122
|
+
}
|
1123
|
+
`}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(e,r,m){r.isDark=!0,r.cssClass="ace-twilight",r.cssText=e("./twilight-css");var g=e("../lib/dom");g.importCssString(r.cssText,r.cssClass,!1)}),(function(){ace.require(["ace/theme/twilight"],function(e){n&&(n.exports=e)})})()})(Gp)),Gp.exports}H0();var qp={exports:{}},Yp;function U0(){return Yp||(Yp=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,m){function g(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,d=e("./lib/lang"),s=e("./range").Range,a=e("./range_list").RangeList,u=e("./keyboard/hash_handler").HashHandler,l=e("./tokenizer").Tokenizer,o=e("./clipboard"),c={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,R,O){var E=C.session.getTextRange();return O?E.replace(/\n\r?([ \t]*\S)/g,`
|
1124
|
+
`+O+"$1"):E},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:g.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:g.bind(null,{year:"2-digit"}),CURRENT_MONTH:g.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:g.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:g.bind(null,{month:"short"}),CURRENT_DATE:g.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:g.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:g.bind(null,{weekday:"short"}),CURRENT_HOUR:g.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:g.bind(null,{minute:"2-digit"}),CURRENT_SECOND:g.bind(null,{second:"2-digit"})};c.SELECTED_TEXT=c.SELECTION;var p=(function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=c}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function R(I){return I=I.substr(1),/^\d+$/.test(I)?[{tabstopId:parseInt(I,10)}]:[{text:I}]}function O(I){return"(?:[^\\\\"+I+"]|\\\\.)"}var E={regex:"/("+O("/")+"+)/",onMatch:function(I,z,P){var N=P[0];return N.fmtString=!0,N.guard=I.slice(1,-1),N.flag="",""},next:"formatString"};return C.$tokenizer=new l({start:[{regex:/\\./,onMatch:function(I,z,P){var N=I[1];return(N=="}"&&P.length||"`$\\".indexOf(N)!=-1)&&(I=N),[I]}},{regex:/}/,onMatch:function(I,z,P){return[P.length?P.shift():I]}},{regex:/\$(?:\d+|\w+)/,onMatch:R},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(I,z,P){var N=R(I.substr(1));return P.unshift(N[0]),N},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+O("\\|")+"*\\|",onMatch:function(I,z,P){var N=I.slice(1,-1).replace(/\\[,|\\]|,/g,function(_){return _.length==2?_[1]:"\0"}).split("\0").map(function(_){return{value:_}});return P[0].choices=N,[N[0]]},next:"start"},E,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(I,z,P){return P.length&&P[0].expectElse?(P[0].expectElse=!1,P[0].ifEnd={elseEnd:P[0]},[P[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(I,z,P){var N=I[1];return N=="}"&&P.length||"`$\\".indexOf(N)!=-1?I=N:N=="n"?I=`
|
1125
|
+
`:N=="t"?I=" ":"ulULE".indexOf(N)!=-1&&(I={changeCase:N,local:N>"a"}),[I]}},{regex:"/\\w*}",onMatch:function(I,z,P){var N=P.shift();return N&&(N.flag=I.slice(1,-1)),this.next=N&&N.tabstopId?"start":"",[N||I]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(I,z,P){return[{text:I.slice(1)}]}},{regex:/\${\w+/,onMatch:function(I,z,P){var N={text:I.slice(2)};return P.unshift(N),[N]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(I,z,P){var N=P.shift();return this.next=N&&N.tabstopId?"start":"",[N||I]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(I,z,P){var N=P[0];return N.formatFunction=I.slice(2,-1),[P.shift()]},next:"formatString"},E,{regex:/:[\?\-+]?/,onMatch:function(I,z,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,O){return this.getTokenizer().getLineTokens(R,O).tokens.map(function(E){return E.value||E})},C.prototype.getVariableValue=function(R,O,E){if(/^\d+$/.test(O))return(this.variables.__||{})[O]||"";if(/^[A-Z]\d+$/.test(O))return(this.variables[O[0]+"__"]||{})[O.substr(1)]||"";if(O=O.replace(/^TM_/,""),!this.variables.hasOwnProperty(O))return"";var I=this.variables[O];return typeof I=="function"&&(I=this.variables[O](R,O,E)),I??""},C.prototype.tmStrFormat=function(R,O,E){if(!O.fmt)return R;var I=O.flag||"",z=O.guard;z=new RegExp(z,I.replace(/[^gim]/g,""));var P=typeof O.fmt=="string"?this.tokenizeTmSnippet(O.fmt,"formatString"):O.fmt,N=this,_=R.replace(z,function(){var S=N.variables.__;N.variables.__=[].slice.call(arguments);for(var D=N.resolveVariables(P,E),j="E",U=0;U<D.length;U++){var q=D[U];if(typeof q=="object")if(D[U]="",q.changeCase&&q.local){var Z=D[U+1];Z&&typeof Z=="string"&&(q.changeCase=="u"?D[U]=Z[0].toUpperCase():D[U]=Z[0].toLowerCase(),D[U+1]=Z.substr(1))}else q.changeCase&&(j=q.changeCase);else j=="U"?D[U]=q.toUpperCase():j=="L"&&(D[U]=q.toLowerCase())}return N.variables.__=S,D.join("")});return _},C.prototype.tmFormatFunction=function(R,O,E){return O.formatFunction=="upcase"?R.toUpperCase():O.formatFunction=="downcase"?R.toLowerCase():R},C.prototype.resolveVariables=function(R,O){function E(j){var U=R.indexOf(j,N+1);U!=-1&&(N=U)}for(var I=[],z="",P=!0,N=0;N<R.length;N++){var _=R[N];if(typeof _=="string"){I.push(_),_==`
|
1126
|
+
`?(P=!0,z=""):P&&(z=/^\t*/.exec(_)[0],P=/\S/.test(_));continue}if(_){if(P=!1,_.fmtString){var S=R.indexOf(_,N+1);S==-1&&(S=R.length),_.fmt=R.slice(N+1,S),N=S}if(_.text){var D=this.getVariableValue(O,_.text,z)+"";_.fmtString&&(D=this.tmStrFormat(D,_,O)),_.formatFunction&&(D=this.tmFormatFunction(D,_,O)),D&&!_.ifEnd?(I.push(D),E(_)):!D&&_.ifEnd&&E(_.ifEnd)}else _.elseEnd?E(_.elseEnd):(_.tabstopId!=null||_.changeCase!=null)&&I.push(_)}}return I},C.prototype.getDisplayTextForSnippet=function(R,O){var E=w.call(this,R,O);return E.text},C.prototype.insertSnippetForSelection=function(R,O,E){E===void 0&&(E={});var I=w.call(this,R,O,E),z=R.getSelectionRange(),P=R.session.replace(z,I.text),N=new b(R),_=R.inVirtualSelectionMode&&R.selection.index;N.addTabstops(I.tabstops,z.start,P,_)},C.prototype.insertSnippet=function(R,O,E){E===void 0&&(E={});var I=this;if(R.inVirtualSelectionMode)return I.insertSnippetForSelection(R,O,E);R.forEachSelection(function(){I.insertSnippetForSelection(R,O,E)},null,{keepOrder:!0}),R.tabstopManager&&R.tabstopManager.tabNext()},C.prototype.$getScope=function(R){var O=R.session.$mode.$id||"";if(O=O.split("/").pop(),O==="html"||O==="php"){O==="php"&&!R.session.$mode.inlinePhp&&(O="html");var E=R.getCursorPosition(),I=R.session.getState(E.row);typeof I=="object"&&(I=I[0]),I.substring&&(I.substring(0,3)=="js-"?O="javascript":I.substring(0,4)=="css-"?O="css":I.substring(0,4)=="php-"&&(O="php"))}return O},C.prototype.getActiveScopes=function(R){var O=this.$getScope(R),E=[O],I=this.snippetMap;return I[O]&&I[O].includeScopes&&E.push.apply(E,I[O].includeScopes),E.push("_"),E},C.prototype.expandWithTab=function(R,O){var E=this,I=R.forEachSelection(function(){return E.expandSnippetForSelection(R,O)},null,{keepOrder:!0});return I&&R.tabstopManager&&R.tabstopManager.tabNext(),I},C.prototype.expandSnippetForSelection=function(R,O){var E=R.getCursorPosition(),I=R.session.getLine(E.row),z=I.substring(0,E.column),P=I.substr(E.column),N=this.snippetMap,_;return this.getActiveScopes(R).some(function(S){var D=N[S];return D&&(_=this.findMatchingSnippet(D,z,P)),!!_},this),_?(O&&O.dryRun||(R.session.doc.removeInLine(E.row,E.column-_.replaceBefore.length,E.column+_.replaceAfter.length),this.variables.M__=_.matchBefore,this.variables.T__=_.matchAfter,this.insertSnippetForSelection(R,_.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(R,O,E){for(var I=R.length;I--;){var z=R[I];if(!(z.startRe&&!z.startRe.test(O))&&!(z.endRe&&!z.endRe.test(E))&&!(!z.startRe&&!z.endRe))return z.matchBefore=z.startRe?z.startRe.exec(O):[""],z.matchAfter=z.endRe?z.endRe.exec(E):[""],z.replaceBefore=z.triggerRe?z.triggerRe.exec(O)[0]:"",z.replaceAfter=z.endTriggerRe?z.endTriggerRe.exec(E)[0]:"",z}},C.prototype.register=function(R,O){function E(S){return S&&!/^\^?\(.*\)\$?$|^\\b$/.test(S)&&(S="(?:"+S+")"),S||""}function I(S,D,j){return S=E(S),D=E(D),S=D+S,S&&S[S.length-1]!="$"&&(S+="$"),new RegExp(S)}function z(S){S.scope||(S.scope=O||"_"),O=S.scope,P[O]||(P[O]=[],N[O]={});var D=N[O];if(S.name){var j=D[S.name];j&&_.unregister(j),D[S.name]=S}P[O].push(S),S.prefix&&(S.tabTrigger=S.prefix),!S.content&&S.body&&(S.content=Array.isArray(S.body)?S.body.join(`
|
1127
|
+
`):S.body),S.tabTrigger&&!S.trigger&&(!S.guard&&/^\w/.test(S.tabTrigger)&&(S.guard="\\b"),S.trigger=d.escapeRegExp(S.tabTrigger)),!(!S.trigger&&!S.guard&&!S.endTrigger&&!S.endGuard)&&(S.startRe=I(S.trigger,S.guard),S.triggerRe=new RegExp(S.trigger),S.endRe=I(S.endTrigger,S.endGuard),S.endTriggerRe=new RegExp(S.endTrigger))}var P=this.snippetMap,N=this.snippetNameMap,_=this;R||(R=[]),Array.isArray(R)?R.forEach(z):Object.keys(R).forEach(function(S){z(R[S])}),this._signal("registerSnippets",{scope:O})},C.prototype.unregister=function(R,O){function E(P){var N=z[P.scope||O];if(N&&N[P.name]){delete N[P.name];var _=I[P.scope||O],S=_&&_.indexOf(P);S>=0&&_.splice(S,1)}}var I=this.snippetMap,z=this.snippetNameMap;R.content?E(R):Array.isArray(R)&&R.forEach(E)},C.prototype.parseSnippetFile=function(R){R=R.replace(/\r/g,"");for(var O=[],E={},I=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,z;z=I.exec(R);){if(z[1])try{E=JSON.parse(z[1]),O.push(E)}catch{}if(z[4])E.content=z[4].replace(/^\t/gm,""),O.push(E),E={};else{var P=z[2],N=z[3];if(P=="regex"){var _=/\/((?:[^\/\\]|\\.)*)|$/g;E.guard=_.exec(N)[1],E.trigger=_.exec(N)[1],E.endTrigger=_.exec(N)[1],E.endGuard=_.exec(N)[1]}else P=="snippet"?(E.tabTrigger=N.match(/^\S*/)[0],E.name||(E.name=N)):P&&(E[P]=N)}}return O},C.prototype.getSnippetByName=function(R,O){var E=this.snippetNameMap,I;return this.getActiveScopes(O).some(function(z){var P=E[z];return P&&(I=P[R]),!!I},this),I},C})();x.implement(p.prototype,h);var w=function(C,R,O){function E(ce){for(var fe=[],_e=0;_e<ce.length;_e++){var $e=ce[_e];if(typeof $e=="object"){if(D[$e.tabstopId])continue;var Te=ce.lastIndexOf($e,_e-1);$e=fe[Te]||{tabstopId:$e.tabstopId}}fe[_e]=$e}return fe}O===void 0&&(O={});var I=C.getCursorPosition(),z=C.session.getLine(I.row),P=C.session.getTabString(),N=z.match(/^\s*/)[0];I.column<N.length&&(N=N.slice(0,I.column)),R=R.replace(/\r/g,"");var _=this.tokenizeTmSnippet(R);_=this.resolveVariables(_,C),_=_.map(function(ce){return ce==`
|
1128
|
+
`&&!O.excludeExtraIndent?ce+N:typeof ce=="string"?ce.replace(/\t/g,P):ce});var S=[];_.forEach(function(ce,fe){if(typeof ce=="object"){var _e=ce.tabstopId,$e=S[_e];if($e||($e=S[_e]=[],$e.index=_e,$e.value="",$e.parents={}),$e.indexOf(ce)===-1){ce.choices&&!$e.choices&&($e.choices=ce.choices),$e.push(ce);var Te=_.indexOf(ce,fe+1);if(Te!==-1){var qe=_.slice(fe+1,Te),Ve=qe.some(function(lt){return typeof lt=="object"});Ve&&!$e.value?$e.value=qe:qe.length&&(!$e.value||typeof $e.value!="string")&&($e.value=qe.join(""))}}}}),S.forEach(function(ce){ce.length=0});for(var D={},j=0;j<_.length;j++){var U=_[j];if(typeof U=="object"){var q=U.tabstopId,Z=S[q],te=_.indexOf(U,j+1);if(D[q]){D[q]===U&&(delete D[q],Object.keys(D).forEach(function(ce){Z.parents[ce]=!0}));continue}D[q]=U;var he=Z.value;typeof he!="string"?he=E(he):U.fmt&&(he=this.tmStrFormat(he,U,C)),_.splice.apply(_,[j+1,Math.max(0,te-j)].concat(he,U)),Z.indexOf(U)===-1&&Z.push(U)}}var ne=0,le=0,ue="";return _.forEach(function(ce){if(typeof ce=="string"){var fe=ce.split(`
|
1129
|
+
`);fe.length>1?(le=fe[fe.length-1].length,ne+=fe.length-1):le+=ce.length,ue+=ce}else ce&&(ce.start?ce.end={row:ne,column:le}:ce.start={row:ne,column:le})}),{text:ue,tabstops:S,tokens:_}},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=d.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 O=R.action[0]=="r",E=this.selectedTabstop||{},I=E.parents||{},z=this.tabstops.slice(),P=0;P<z.length;P++){var N=z[P],_=N==E||I[N.index];if(N.rangeList.$bias=_?0:1,R.action=="remove"&&N!==E){var S=N.parents&&N.parents[E.index],D=N.rangeList.pointIndex(R.start,S);D=D<0?-D-1:D+1;var j=N.rangeList.pointIndex(R.end,S);j=j<0?-j-1:j-1;for(var U=N.rangeList.ranges.slice(D,j),q=0;q<U.length;q++)this.removeRange(U[q])}N.rangeList.$onChange(R)}var Z=this.session;!this.$inChange&&O&&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 O=this.session,E=O.getTextRange(R.firstNonLinked),I=0;I<R.length;I++){var z=R[I];if(z.linked){var P=z.original,N=r.snippetManager.tmStrFormat(E,P,this.editor);O.replace(z,N)}}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,O=this.editor.selection.anchor,E=this.editor.selection.isEmpty(),I=0;I<this.ranges.length;I++)if(!this.ranges[I].linked){var z=this.ranges[I].contains(R.row,R.column),P=E||this.ranges[I].contains(O.row,O.column);if(z&&P)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(R){var O=this.tabstops.length,E=this.index+(R||1);E=Math.min(Math.max(E,1),O),E==O&&(E=0),this.selectTabstop(E),this.updateTabstopMarkers(),E===0&&this.detach()},C.prototype.selectTabstop=function(R){this.$openTabstops=null;var O=this.tabstops[this.index];if(O&&this.addTabstopMarkers(O),this.index=R,O=this.tabstops[this.index],!(!O||!O.length)){this.selectedTabstop=O;var E=O.firstNonLinked||O;if(O.choices&&(E.cursor=E.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(E);else{var I=this.editor.multiSelect;I.toSingleRange(E);for(var z=0;z<O.length;z++)O.hasLinkedRanges&&O[z].linked||I.addRange(O[z].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,O,E){var I=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!R[0]){var z=s.fromPoints(E,E);M(z.start,O),M(z.end,O),R[0]=[z],R[0].index=0}var P=this.index,N=[P+1,0],_=this.ranges,S=this.snippetId=(this.snippetId||0)+1;R.forEach(function(D,j){var U=this.$openTabstops[j]||D;U.snippetId=S;for(var q=0;q<D.length;q++){var Z=D[q],te=s.fromPoints(Z.start,Z.end||Z.start);L(te.start,O),L(te.end,O),te.original=Z,te.tabstop=U,_.push(te),U!=D?U.unshift(te):U[q]=te,Z.fmtString||U.firstNonLinked&&I?(te.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=te)}U.firstNonLinked||(U.hasLinkedRanges=!1),U===D&&(N.push(U),this.$openTabstops[j]=U),this.addTabstopMarkers(U),U.rangeList=U.rangeList||new a,U.rangeList.$bias=0,U.rangeList.addList(U)},this),N.length>2&&(this.tabstops.length&&N.push(N.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,N))},C.prototype.addTabstopMarkers=function(R){var O=this.session;R.forEach(function(E){E.markerId||(E.markerId=O.addMarker(E,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(R){var O=this.session;R.forEach(function(E){O.removeMarker(E.markerId),E.markerId=null})},C.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var R=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&R--,this.tabstops.forEach(function(O){O.snippetId===R?this.addTabstopMarkers(O):this.removeTabstopMarkers(O)},this)}},C.prototype.removeRange=function(R){var O=R.tabstop.indexOf(R);O!=-1&&R.tabstop.splice(O,1),O=this.ranges.indexOf(R),O!=-1&&this.ranges.splice(O,1),O=R.tabstop.rangeList.ranges.indexOf(R),O!=-1&&R.tabstop.splice(O,1),this.session.removeMarker(R.markerId),R.tabstop.length||(O=this.tabstops.indexOf(R.tabstop),O!=-1&&this.tabstops.splice(O,1),this.tabstops.length||this.detach())},C})();b.prototype.keyboardHandler=new u,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 L=function(C,R){C.row==0&&(C.column+=R.column),C.row+=R.row},M=function(C,R){C.row==R.row&&(C.column-=R.column),C.row-=R.row};y.importCssString(`
|
1130
|
+
.ace_snippet-marker {
|
1131
|
+
-moz-box-sizing: border-box;
|
1132
|
+
box-sizing: border-box;
|
1133
|
+
background: rgba(194, 193, 208, 0.09);
|
1134
|
+
border: 1px dotted rgba(211, 208, 235, 0.62);
|
1135
|
+
position: absolute;
|
1136
|
+
}`,"snippets.css",!1),r.snippetManager=new p;var k=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(k.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(e,r,m){var g=e("../virtual_renderer").VirtualRenderer,y=e("../editor").Editor,x=e("../range").Range,h=e("../lib/event"),d=e("../lib/lang"),s=e("../lib/dom"),a=e("../config").nls,u=e("./../lib/useragent"),l=function(L){return"suggest-aria-id:".concat(L)},o=u.isSafari?"menu":"listbox",c=u.isSafari?"menuitem":"option",p=u.isSafari?"aria-current":"aria-selected",w=function(L){var M=new g(L);M.$maxLines=4;var k=new y(M);return k.setHighlightActiveLine(!1),k.setShowPrintMargin(!1),k.renderer.setShowGutter(!1),k.renderer.setHighlightGutterLine(!1),k.$mouseHandler.$focusTimeout=0,k.$highlightTagPending=!0,k},b=(function(){function L(M){var k=s.createElement("div"),C=w(k);M&&M.appendChild(k),k.style.display="none",C.renderer.content.style.cursor="default",C.renderer.setStyle("ace_autocomplete"),C.renderer.$textLayer.element.setAttribute("role",o),C.renderer.$textLayer.element.setAttribute("aria-roledescription",a("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),C.renderer.$textLayer.element.setAttribute("aria-label",a("autocomplete.popup.aria-label","Autocomplete suggestions")),C.renderer.textarea.setAttribute("aria-hidden","true"),C.setOption("displayIndentGuides",!1),C.setOption("dragDelay",150);var R=function(){};C.focus=R,C.$isFocused=!0,C.renderer.$cursorLayer.restartTimer=R,C.renderer.$cursorLayer.element.style.opacity="0",C.renderer.$maxLines=8,C.renderer.$keepTextAreaAtCursor=!1,C.setHighlightActiveLine(!1),C.session.highlight(""),C.session.$searchHighlight.clazz="ace_highlight-marker",C.on("mousedown",function(_){var S=_.getDocumentPosition();C.selection.moveToPosition(S),I.start.row=I.end.row=S.row,_.stop()});var O,E=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(_){_?E.id&&(C.session.removeMarker(E.id),E.id=null):E.id=C.session.addMarker(E,"ace_line-hover","fullLine")},C.setSelectOnHover(!1),C.on("mousemove",function(_){if(!O){O=_;return}if(!(O.x==_.x&&O.y==_.y)){O=_,O.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var S=O.getDocumentPosition().row;E.start.row!=S&&(E.id||C.setRow(S),P(S))}}),C.renderer.on("beforeRender",function(){if(O&&E.start.row!=-1){O.$pos=null;var _=O.getDocumentPosition().row;E.id||C.setRow(_),P(_,!0)}}),C.renderer.on("afterRender",function(){for(var _=C.renderer.$textLayer,S=_.config.firstRow,D=_.config.lastRow;S<=D;S++){var j=_.element.childNodes[S-_.config.firstRow];j.setAttribute("role",c),j.setAttribute("aria-roledescription",a("autocomplete.popup.item.aria-roledescription","item")),j.setAttribute("aria-setsize",C.data.length),j.setAttribute("aria-describedby","doc-tooltip"),j.setAttribute("aria-posinset",S+1);var U=C.getData(S);if(U){var q="".concat(U.caption||U.value).concat(U.meta?", ".concat(U.meta):"");j.setAttribute("aria-label",q)}var Z=j.querySelectorAll(".ace_completion-highlight");Z.forEach(function(te){te.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var _=C.getRow(),S=C.renderer.$textLayer,D=S.element.childNodes[_-S.config.firstRow],j=document.activeElement;if(D!==C.selectedNode&&C.selectedNode&&(s.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(p),C.selectedNode.removeAttribute("id")),j.removeAttribute("aria-activedescendant"),C.selectedNode=D,D){var U=l(_);s.addCssClass(D,"ace_selected"),D.id=U,S.element.setAttribute("aria-activedescendant",U),j.setAttribute("aria-activedescendant",U),D.setAttribute(p,"true")}});var z=function(){P(-1)},P=function(_,S){_!==E.start.row&&(E.start.row=E.end.row=_,S||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return E.start.row},h.addListener(C.container,"mouseout",function(){C.isMouseOver=!1,z()}),C.on("hide",z),C.on("changeSelection",z),C.session.doc.getLength=function(){return C.data.length},C.session.doc.getLine=function(_){var S=C.data[_];return typeof S=="string"?S:S&&S.value||""};var N=C.session.bgTokenizer;return N.$tokenizeRow=function(_){function S(ce,fe){ce&&j.push({type:(D.className||"")+(fe||""),value:ce})}var D=C.data[_],j=[];if(!D)return j;typeof D=="string"&&(D={value:D});for(var U=D.caption||D.value||D.name,q=U.toLowerCase(),Z=(C.filterText||"").toLowerCase(),te=0,he=0,ne=0;ne<=Z.length;ne++)if(ne!=he&&(D.matchMask&1<<ne||ne==Z.length)){var le=Z.slice(he,ne);he=ne;var ue=q.indexOf(le,te);if(ue==-1)continue;S(U.slice(te,ue),""),te=ue+le.length,S(U.slice(ue,te),"completion-highlight")}return S(U.slice(te,U.length),""),j.push({type:"completion-spacer",value:" "}),D.meta&&j.push({type:"completion-meta",value:D.meta}),D.message&&j.push({type:"completion-message",value:D.message}),j},N.$updateOnChange=R,N.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){C.filterText=S||"",C.setValue(d.stringRepeat(`
|
1137
|
+
`,_.length),-1),C.data=_||[],C.setRow(0)},C.getData=function(_){return C.data[_]},C.getRow=function(){return I.start.row},C.setRow=function(_){_=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,_)),I.start.row!=_&&(C.selection.clearSelection(),I.start.row=I.end.row=_||0,C.session._emit("changeBackMarker"),C.moveCursorTo(_||0,0),C.isOpen&&C._signal("select"))},C.on("changeSelection",function(){C.isOpen&&C.setRow(C.selection.lead.row),C.renderer.scrollCursorIntoView()}),C.hide=function(){this.container.style.display="none",C.anchorPos=null,C.anchor=null,C.isOpen&&(C.isOpen=!1,this._signal("hide"))},C.tryShow=function(_,S,D,j){if(!j&&C.isOpen&&C.anchorPos&&C.anchor&&C.anchorPos.top===_.top&&C.anchorPos.left===_.left&&C.anchor===D)return!0;var U=this.container,q=this.renderer.scrollBar.width||10,Z=window.innerHeight-q,te=window.innerWidth-q,he=this.renderer,ne=he.$maxLines*S*1.4,le={top:0,bottom:0},ue=Z-_.top-3*this.$borderSize-S,ce=_.top-3*this.$borderSize;D||(ce<=ue||ue>=ne?D="bottom":D="top"),D==="top"?(le.bottom=_.top-this.$borderSize,le.top=le.bottom-ne):D==="bottom"&&(le.top=_.top+S+this.$borderSize,le.bottom=le.top+ne);var fe=le.top>=0&&le.bottom<=Z;if(!j&&!fe)return!1;fe?he.$maxPixelHeight=null:D==="top"?he.$maxPixelHeight=ce:he.$maxPixelHeight=ue,U.style.display="";var _e=U.offsetParent&&U.offsetParent.getBoundingClientRect();D==="top"?(U.style.top="",U.style.bottom=Z+q-le.bottom-(_e?Z+q-_e.bottom:0)+"px",C.isTopdown=!1):(U.style.top=le.top-(_e?_e.top:0)+"px",U.style.bottom="",C.isTopdown=!0);var $e=_.left;return $e+U.offsetWidth>te&&($e=te-U.offsetWidth),U.style.left=$e-(_e?_e.left:0)+"px",U.style.right="",C.isOpen||(C.isOpen=!0,this._signal("show"),O=null),C.anchorPos=_,C.anchor=D,!0},C.show=function(_,S,D){this.tryShow(_,S,D?"bottom":void 0,!0)},C.goTo=function(_){var S=this.getRow(),D=this.session.getLength()-1;switch(_){case"up":S=S<=0?D:S-1;break;case"down":S=S>=D?-1:S+1;break;case"start":S=0;break;case"end":S=D}this.setRow(S)},C.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},C.$imageSize=0,C.$borderSize=1,C}return L})();s.importCssString(`
|
1138
|
+
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
1139
|
+
background-color: #CAD6FA;
|
1140
|
+
z-index: 1;
|
1141
|
+
}
|
1142
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
1143
|
+
background-color: #3a674e;
|
1144
|
+
}
|
1145
|
+
.ace_editor.ace_autocomplete .ace_line-hover {
|
1146
|
+
border: 1px solid #abbffe;
|
1147
|
+
margin-top: -1px;
|
1148
|
+
background: rgba(233,233,253,0.4);
|
1149
|
+
position: absolute;
|
1150
|
+
z-index: 2;
|
1151
|
+
}
|
1152
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
|
1153
|
+
border: 1px solid rgba(109, 150, 13, 0.8);
|
1154
|
+
background: rgba(58, 103, 78, 0.62);
|
1155
|
+
}
|
1156
|
+
.ace_completion-meta {
|
1157
|
+
opacity: 0.5;
|
1158
|
+
margin-left: 0.9em;
|
1159
|
+
}
|
1160
|
+
.ace_completion-message {
|
1161
|
+
margin-left: 0.9em;
|
1162
|
+
color: blue;
|
1163
|
+
}
|
1164
|
+
.ace_editor.ace_autocomplete .ace_completion-highlight{
|
1165
|
+
color: #2d69c7;
|
1166
|
+
}
|
1167
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
|
1168
|
+
color: #93ca12;
|
1169
|
+
}
|
1170
|
+
.ace_editor.ace_autocomplete {
|
1171
|
+
width: 300px;
|
1172
|
+
z-index: 200000;
|
1173
|
+
border: 1px lightgray solid;
|
1174
|
+
position: absolute;
|
1175
|
+
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
1176
|
+
line-height: 1.4;
|
1177
|
+
background: #fefefe;
|
1178
|
+
color: #111;
|
1179
|
+
}
|
1180
|
+
.ace_dark.ace_editor.ace_autocomplete {
|
1181
|
+
border: 1px #484747 solid;
|
1182
|
+
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
|
1183
|
+
line-height: 1.4;
|
1184
|
+
background: #25282c;
|
1185
|
+
color: #c1c1c1;
|
1186
|
+
}
|
1187
|
+
.ace_autocomplete .ace_text-layer {
|
1188
|
+
width: calc(100% - 8px);
|
1189
|
+
}
|
1190
|
+
.ace_autocomplete .ace_line {
|
1191
|
+
display: flex;
|
1192
|
+
align-items: center;
|
1193
|
+
}
|
1194
|
+
.ace_autocomplete .ace_line > * {
|
1195
|
+
min-width: 0;
|
1196
|
+
flex: 0 0 auto;
|
1197
|
+
}
|
1198
|
+
.ace_autocomplete .ace_line .ace_ {
|
1199
|
+
flex: 0 1 auto;
|
1200
|
+
overflow: hidden;
|
1201
|
+
text-overflow: ellipsis;
|
1202
|
+
}
|
1203
|
+
.ace_autocomplete .ace_completion-spacer {
|
1204
|
+
flex: 1;
|
1205
|
+
}
|
1206
|
+
.ace_autocomplete.ace_loading:after {
|
1207
|
+
content: "";
|
1208
|
+
position: absolute;
|
1209
|
+
top: 0px;
|
1210
|
+
height: 2px;
|
1211
|
+
width: 8%;
|
1212
|
+
background: blue;
|
1213
|
+
z-index: 100;
|
1214
|
+
animation: ace_progress 3s infinite linear;
|
1215
|
+
animation-delay: 300ms;
|
1216
|
+
transform: translateX(-100%) scaleX(1);
|
1217
|
+
}
|
1218
|
+
@keyframes ace_progress {
|
1219
|
+
0% { transform: translateX(-100%) scaleX(1) }
|
1220
|
+
50% { transform: translateX(625%) scaleX(2) }
|
1221
|
+
100% { transform: translateX(1500%) scaleX(3) }
|
1222
|
+
}
|
1223
|
+
@media (prefers-reduced-motion) {
|
1224
|
+
.ace_autocomplete.ace_loading:after {
|
1225
|
+
transform: translateX(625%) scaleX(2);
|
1226
|
+
animation: none;
|
1227
|
+
}
|
1228
|
+
}
|
1229
|
+
`,"autocompletion.css",!1),r.AcePopup=b,r.$singleLineEditor=w,r.getAriaId=l}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,r,m){var g=(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 d=this.popup.getRow(),s=this.popup.renderer.$textLayer,a=s.element.childNodes[d-s.config.firstRow];if(a){for(var u="doc-tooltip ",l=0;l<this._lines.length;l++)u+="ace-inline-screenreader-line-".concat(l," ");a.setAttribute("aria-describedby",u)}}).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 d=document.createElement("code");d.setAttribute("id","ace-inline-screenreader-line-".concat(h));var s=document.createTextNode(this._lines[h]);d.appendChild(s),x.appendChild(d)}return x},y})();r.AceInlineScreenReader=g}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(e,r,m){var g=e("../snippets").snippetManager,y=e("./inline_screenreader").AceInlineScreenReader,x=(function(){function h(){this.editor=null}return h.prototype.show=function(d,s,a){if(a=a||"",d&&this.editor&&this.editor!==d&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!d||!s)return!1;this.inlineScreenReader||(this.inlineScreenReader=new y(d));var u=s.snippet?g.getDisplayTextForSnippet(d,s.snippet):s.value;return s.hideInlinePreview||!u||!u.startsWith(a)?!1:(this.editor=d,this.inlineScreenReader.setScreenReaderContent(u),u=u.slice(a.length),u===""?d.removeGhostText():d.setGhostText(u),!0)},h.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},h.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},h.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},h})();r.AceInline=x}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,r,m){r.parForEach=function(y,x,h){var d=0,s=y.length;s===0&&h();for(var a=0;a<s;a++)x(y[a],function(u,l){d++,d===s&&h(u,l)})};var g=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(y,x,h){h=h||g;for(var d=[],s=x-1;s>=0&&h.test(y[s]);s--)d.push(y[s]);return d.reverse().join("")},r.retrieveFollowingIdentifier=function(y,x,h){h=h||g;for(var d=[],s=x;s<y.length&&h.test(y[s]);s++)d.push(y[s]);return d},r.getCompletionPrefix=function(y){var x=y.getCursorPosition(),h=y.session.getLine(x.row),d;return y.completers.forEach((function(s){s.identifierRegexps&&s.identifierRegexps.forEach((function(a){!d&&a&&(d=this.retrievePrecedingIdentifier(h,x.column,a))}).bind(this))}).bind(this)),d||this.retrievePrecedingIdentifier(h,x.column)},r.triggerAutocomplete=function(y,h){var h=h??y.session.getPrecedingCharacter();return y.completers.some(function(d){if(d.triggerCharacters&&Array.isArray(d.triggerCharacters))return d.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,m){var g=e("./keyboard/hash_handler").HashHandler,y=e("./autocomplete/popup").AcePopup,x=e("./autocomplete/inline").AceInline,h=e("./autocomplete/popup").getAriaId,d=e("./autocomplete/util"),s=e("./lib/lang"),a=e("./lib/dom"),u=e("./snippets").snippetManager,l=e("./config"),o=e("./lib/event"),c=e("./lib/scroll").preventParentScroll,p=function(M,k){k.completer&&k.completer.destroy()},w=(function(){function M(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new g,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=s.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=s.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=s.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=s.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=s.delayedCall((function(){var k=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!k||this.editor.completers.length===0||(this.completions=new L(M.completionsForLoading),this.openPopup(this.editor,k.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty(M,"completionsForLoading",{get:function(){return[{caption:l.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),M.prototype.$init=function(){return this.popup=new y(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(k){this.insertMatch(),k.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),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},M.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new x,this.inlineRenderer},M.prototype.getPopup=function(){return this.popup||this.$init()},M.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},M.prototype.$seen=function(k){!this.hasSeen.has(k)&&k&&k.completer&&k.completer.onSeen&&typeof k.completer.onSeen=="function"&&(k.completer.onSeen(this.editor,k),this.hasSeen.add(k))},M.prototype.$onPopupChange=function(k){if(this.inlineRenderer&&this.inlineEnabled){var C=k?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(C),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},M.prototype.$updateGhostText=function(k){var C=this.base.row,R=this.base.column,O=this.editor.getCursorPosition().column,E=this.editor.session.getLine(C).slice(R,O);this.inlineRenderer.show(this.editor,k,E)?this.$seen(k):this.inlineRenderer.hide()},M.prototype.$onPopupRender=function(){var k=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var C=this.popup.getFirstVisibleRow();C<=this.popup.getLastVisibleRow();C++){var R=this.popup.getData(C);R&&(!k||R.hideInlinePreview)&&this.$seen(R)}},M.prototype.$onPopupShow=function(k){this.$onPopupChange(k),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},M.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var k=this.editor.container.parentNode,C=[];k;)C.push(k),k.addEventListener("scroll",this.onLayoutChange,{passive:!0}),k=k.parentNode;this.$elements=C}},M.prototype.unObserveLayoutChanges=function(){var k=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(C){C.removeEventListener("scroll",k.onLayoutChange,{passive:!0})}),this.$elements=null},M.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},M.prototype.$updatePopupPosition=function(){var k=this.editor,C=k.renderer,R=C.layerConfig.lineHeight,O=C.$cursorLayer.getPixelPosition(this.base,!0);O.left-=this.popup.getTextLeftOffset();var E=k.container.getBoundingClientRect();O.top+=E.top-C.layerConfig.offset,O.left+=E.left-k.renderer.scrollLeft,O.left+=C.gutterWidth;var I={top:O.top,left:O.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(I.top+=C.$ghostTextWidget.el.offsetHeight);var z=k.container.getBoundingClientRect().bottom-R,P=z<I.top?{top:z,left:I.left}:I;this.popup.tryShow(P,R,"bottom")||this.popup.tryShow(O,R,"top")||this.popup.show(O,R)},M.prototype.openPopup=function(k,C,R){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var O=this.popup.getRow(),E=this.popup.data[O];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:h(this.popup.getRow()),inline:this.inlineEnabled}),k.keyBinding.addKeyboardHandler(this.keyboardHandler);var I;this.stickySelection&&(I=this.popup.data.indexOf(E)),(!I||I===-1)&&(I=0),this.popup.setRow(this.autoSelect?I:-1),I===O&&E!==this.completions.filtered[I]&&this.$onPopupChange();var z=this.inlineRenderer&&this.inlineEnabled;if(I===O&&z){var P=this.popup.getData(this.popup.getRow());this.$updateGhostText(P)}R||(this.popup.setTheme(k.getTheme()),this.popup.setFontSize(k.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},M.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()},M.prototype.changeListener=function(k){var C=this.editor.selection.lead;(C.row!=this.base.row||C.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},M.prototype.blurListener=function(k){var C=document.activeElement,R=this.editor.textInput.getElement(),O=k.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(k.relatedTarget),E=this.popup&&this.popup.container;C!=R&&C.parentNode!=E&&!O&&C!=this.tooltipNode&&k.relatedTarget!=R&&this.detach()},M.prototype.mousedownListener=function(k){this.detach()},M.prototype.mousewheelListener=function(k){this.popup&&!this.popup.isMouseOver&&this.detach()},M.prototype.mouseOutListener=function(k){this.popup.isOpen&&this.$updatePopupPosition()},M.prototype.goTo=function(k){this.popup.goTo(k)},M.prototype.insertMatch=function(k,C){if(k||(k=this.popup.getData(this.popup.getRow())),!k)return!1;if(k.value==="")return this.detach();var R=this.completions,O=this.getCompletionProvider().insertMatch(this.editor,k,R.filterText,C);return this.completions==R&&this.detach(),O},M.prototype.showPopup=function(k,C){this.editor&&this.detach(),this.activated=!0,this.editor=k,k.completer!=this&&(k.completer&&k.completer.detach(),k.completer=this),k.on("changeSelection",this.changeListener),k.on("blur",this.blurListener),k.on("mousedown",this.mousedownListener),k.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,C)},M.prototype.getCompletionProvider=function(k){return this.completionProvider||(this.completionProvider=new b(k)),this.completionProvider},M.prototype.gatherCompletions=function(k,C){return this.getCompletionProvider().gatherCompletions(k,C)},M.prototype.updateCompletions=function(k,C){if(k&&this.base&&this.completions){var O=this.editor.getCursorPosition(),E=this.editor.session.getTextRange({start:this.base,end:O});if(E==this.completions.filterText)return;if(this.completions.setFilter(E),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==E&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,E,k);return}if(C&&C.matches){var O=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(O.row,O.column),this.base.$insertRight=!0,this.completions=new L(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",k)}var R=this.editor.getSession(),O=this.editor.getCursorPosition(),E=d.getCompletionPrefix(this.editor);this.base=R.doc.createAnchor(O.row,O.column-E.length),this.base.$insertRight=!0;var I={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:E,pos:O}).provideCompletions(this.editor,I,(function(z,P,N){var _=P.filtered,S=d.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),N){if(!_.length){var D=!this.autoShown&&this.emptyMessage;if(typeof D=="function"&&(D=this.emptyMessage(S)),D){var j=[{caption:D,value:""}];this.completions=new L(j),this.openPopup(this.editor,S,k),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(_.length==1&&_[0].value==S&&!_[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&_.length==1)return this.insertMatch(_[0])}this.completions=!N&&this.showLoadingState?new L(M.completionsForLoading.concat(_),P.filterText):P,this.openPopup(this.editor,S,k),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!N)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},M.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},M.prototype.updateDocTooltip=function(){var k=this.popup,C=this.completions&&this.completions.filtered,R=C&&(C[k.getHoveredRow()]||C[k.getRow()]),O=null;if(!R||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var E=this.editor.completers.length,I=0;I<E;I++){var z=this.editor.completers[I];if(z.getDocTooltip&&R.completerId===z.id){O=z.getDocTooltip(R);break}}if(!O&&typeof R!="string"&&(O=R),typeof O=="string"&&(O={docText:O}),!O||!O.docHTML&&!O.docText)return this.hideDocTooltip();this.showDocTooltip(O)},M.prototype.showDocTooltip=function(k){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",c));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var R=this.tooltipNode;k.docHTML?R.innerHTML=k.docHTML:k.docText&&(R.textContent=k.docText),R.parentNode||this.popup.container.appendChild(this.tooltipNode);var O=this.popup,E=O.container.getBoundingClientRect(),I=400,z=300,P=O.renderer.scrollBar.width||10,N=E.left,_=window.innerWidth-E.right-P,S=O.isTopdown?E.top:window.innerHeight-P-E.bottom,D=[Math.min(_/I,1),Math.min(N/I,1),Math.min(S/z*.9)],j=Math.max.apply(Math,D),U=R.style;U.display="block",j==D[0]?(U.left=E.right+1+"px",U.right="",U.maxWidth=I*j+"px",U.top=E.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-E.top,z)+"px"):j==D[1]?(U.right=window.innerWidth-E.left+"px",U.left="",U.maxWidth=I*j+"px",U.top=E.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-E.top,z)+"px"):j==D[2]&&(U.left=window.innerWidth-E.left+"px",U.maxWidth=Math.min(I,window.innerWidth)+"px",O.isTopdown?(U.top=E.bottom+"px",U.left=E.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-E.bottom,z)+"px"):(U.top=O.container.offsetTop-R.offsetHeight+"px",U.left=E.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(O.container.offsetTop,z)+"px"))},M.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var k=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==k&&this.editor.focus(),this.tooltipNode=null,k.parentNode&&k.parentNode.removeChild(k)}},M.prototype.onTooltipClick=function(k){for(var C=k.target;C&&C!=this.tooltipNode;){if(C.nodeName=="A"&&C.href){C.rel="noreferrer",C.target="_blank";break}C=C.parentNode}},M.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var k=this.popup.container;k&&k.parentNode&&k.parentNode.removeChild(k)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",p),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},M.for=function(k){return k.completer instanceof M||(k.completer&&(k.completer.destroy(),k.completer=null),l.get("sharedPopups")?(M.$sharedInstance||(M.$sharedInstance=new M),k.completer=M.$sharedInstance):(k.completer=new M,k.once("destroy",p))),k.completer},M})();w.prototype.commands={Up:function(M){M.completer.goTo("up")},Down:function(M){M.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(M){M.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(M){M.completer.goTo("end")},Esc:function(M){M.completer.detach()},Return:function(M){return M.completer.insertMatch()},"Shift-Return":function(M){M.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(M){var k=M.completer.insertMatch();if(k||M.tabstopManager)return k;M.completer.goTo("down")},Backspace:function(M){M.execCommand("backspace");var k=d.getCompletionPrefix(M);!k&&M.completer&&M.completer.detach()},PageUp:function(M){M.completer.popup.gotoPageUp()},PageDown:function(M){M.completer.popup.gotoPageDown()}},w.startCommand={name:"startAutocomplete",exec:function(M,k){var C=w.for(M);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup(M,k),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var b=(function(){function M(k){this.initialPosition=k,this.active=!0}return M.prototype.insertByIndex=function(k,C,R){return!this.completions||!this.completions.filtered?!1:this.insertMatch(k,this.completions.filtered[C],R)},M.prototype.insertMatch=function(k,C,R){if(!C)return!1;if(k.startOperation({command:{name:"insertMatch"}}),C.completer&&C.completer.insertMatch)C.completer.insertMatch(k,C);else{if(!this.completions)return!1;var O=this.completions.filterText.length,E=0;if(C.range&&C.range.start.row===C.range.end.row&&(O-=this.initialPosition.prefix.length,O+=this.initialPosition.pos.column-C.range.start.column,E+=C.range.end.column-this.initialPosition.pos.column),O||E){var I;k.selection.getAllRanges?I=k.selection.getAllRanges():I=[k.getSelectionRange()];for(var z=0,P;P=I[z];z++)P.start.column-=O,P.end.column+=E,k.session.remove(P)}C.snippet?u.insertSnippet(k,C.snippet):this.$insertString(k,C),C.completer&&C.completer.onInsert&&typeof C.completer.onInsert=="function"&&C.completer.onInsert(k,C),C.command&&C.command==="startAutocomplete"&&k.execCommand(C.command)}return k.endOperation(),!0},M.prototype.$insertString=function(k,C){var R=C.value||C;k.execCommand("insertstring",R)},M.prototype.gatherCompletions=function(k,C){var R=k.getSession(),O=k.getCursorPosition(),E=d.getCompletionPrefix(k),I=[];this.completers=k.completers;var z=k.completers.length;return k.completers.forEach(function(P,N){P.getCompletions(k,R,O,E,function(_,S){P.hideInlinePreview&&(S=S.map(function(D){return Object.assign(D,{hideInlinePreview:P.hideInlinePreview})})),!_&&S&&(I=I.concat(S)),C(null,{prefix:d.getCompletionPrefix(k),matches:I,finished:--z===0})})}),!0},M.prototype.provideCompletions=function(k,C,R){var O=(function(P){var N=P.prefix,_=P.matches;this.completions=new L(_),C.exactMatch&&(this.completions.exactMatch=!0),C.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(N),(P.finished||this.completions.filtered.length)&&R(null,this.completions,P.finished)}).bind(this),E=!0,I=null;if(this.gatherCompletions(k,(function(P,N){if(this.active){P&&(R(P,[],!0),this.detach());var _=N.prefix;if(_.indexOf(N.prefix)===0){if(E){I=N;return}O(N)}}}).bind(this)),E=!1,I){var z=I;I=null,O(z)}},M.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(k){typeof k.cancel=="function"&&k.cancel()})},M})(),L=(function(){function M(k,C){this.all=k,this.filtered=k,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return M.prototype.setFilter=function(k){if(k.length>this.filterText&&k.lastIndexOf(this.filterText,0)===0)var C=this.filtered;else var C=this.all;this.filterText=k,C=this.filterCompletions(C,this.filterText),C=C.sort(function(O,E){return E.exactMatch-O.exactMatch||E.$score-O.$score||(O.caption||O.value).localeCompare(E.caption||E.value)});var R=null;C=C.filter(function(O){var E=O.snippet||O.caption||O.value;return E===R?!1:(R=E,!0)}),this.filtered=C},M.prototype.filterCompletions=function(k,C){var R=[],O=C.toUpperCase(),E=C.toLowerCase();e:for(var I=0,z;z=k[I];I++){if(z.skipFilter){z.$score=z.score,R.push(z);continue}var P=!this.ignoreCaption&&z.caption||z.value||z.snippet;if(P){var N=-1,_=0,S=0,D,j;if(this.exactMatch){if(C!==P.substr(0,C.length))continue e}else{var U=P.toLowerCase().indexOf(E);if(U>-1)S=U;else for(var q=0;q<C.length;q++){var Z=P.indexOf(E[q],N+1),te=P.indexOf(O[q],N+1);if(D=Z>=0&&(te<0||Z<te)?Z:te,D<0)continue e;j=D-N-1,j>0&&(N===-1&&(S+=10),S+=j,_|=1<<q),N=D}}z.matchMask=_,z.exactMatch=S?0:1,z.$score=(z.score||0)-S,R.push(z)}}return R},M})();r.Autocomplete=w,r.CompletionProvider=b,r.FilteredList=L}),ace.define("ace/marker_group",["require","exports","module"],function(e,r,m){var g=(function(){function y(x,h){h&&(this.markerType=h.markerType),this.markers=[],this.session=x,x.addDynamicMarker(this)}return y.prototype.getMarkerAtPosition=function(x){return this.markers.find(function(h){return h.range.contains(x.row,x.column)})},y.prototype.markersComparator=function(x,h){return x.range.start.row-h.range.start.row},y.prototype.setMarkers=function(x){this.markers=x.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},y.prototype.update=function(x,h,d,s){if(!(!this.markers||!this.markers.length))for(var a=s.firstRow,u=s.lastRow,l,o=0,c=0,p=0;p<this.markers.length;p++){var w=this.markers[p];if(!(w.range.end.row<a)&&!(w.range.start.row>u)&&(w.range.start.row===c?o++:(c=w.range.start.row,o=0),!(o>200))){var b=w.range.clipRows(a,u);if(!(b.start.row===b.end.row&&b.start.column===b.end.column)){var L=b.toScreenRange(d);if(L.isEmpty()){l=d.getNextFoldLine(b.end.row,l),l&&l.end.row>b.end.row&&(a=l.end.row);continue}this.markerType==="fullLine"?h.drawFullLineMarker(x,L,w.className,s):L.isMultiLine()?this.markerType==="line"?h.drawMultiLineMarker(x,L,w.className,s):h.drawTextMarker(x,L,w.className,s):h.drawSingleLineMarker(x,L,w.className+" ace_br15",s)}}}},y})();g.prototype.MAX_MARKERS=1e4,r.MarkerGroup=g}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,r,m){function g(d,s){var a=d.getTextRange(x.fromPoints({row:0,column:0},s));return a.split(h).length-1}function y(d,s){var a=g(d,s),u=d.getValue().split(h),l=Object.create(null),o=u[a];return u.forEach(function(c,p){if(!(!c||c===o)){var w=Math.abs(a-p),b=u.length-w;l[c]?l[c]=Math.max(b,l[c]):l[c]=b}}),l}var x=e("../range").Range,h=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.getCompletions=function(d,s,a,u,l){var o=y(s,a),c=Object.keys(o);l(null,c.map(function(p){return{caption:p,value:p,score:o[p],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],function(e,r,m){var g=e("../snippets").snippetManager,y=e("../autocomplete").Autocomplete,x=e("../config"),h=e("../lib/lang"),d=e("../autocomplete/util"),s=e("../marker_group").MarkerGroup,a=e("../autocomplete/text_completer"),u={getCompletions:function(E,I,z,P,N){if(I.$mode.completer)return I.$mode.completer.getCompletions(E,I,z,P,N);var _=E.session.getState(z.row),S=I.$mode.getCompletions(_,I,z,P);S=S.map(function(D){return D.completerId=u.id,D}),N(null,S)},id:"keywordCompleter"},l=function(E){var I={};return E.replace(/\${(\d+)(:(.*?))?}/g,function(z,P,N,_){return I[P]=_||""}).replace(/\$(\d+?)/g,function(z,P){return I[P]})},o={getCompletions:function(E,I,z,P,N){var _=[],S=I.getTokenAt(z.row,z.column);S&&S.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?_.push("html-tag"):_=g.getActiveScopes(E);var D=g.snippetMap,j=[];_.forEach(function(U){for(var q=D[U]||[],Z=q.length;Z--;){var te=q[Z],he=te.name||te.tabTrigger;he&&j.push({caption:he,snippet:te.content,meta:te.tabTrigger&&!te.name?te.tabTrigger+"⇥ ":"snippet",completerId:o.id})}},this),N(null,j)},getDocTooltip:function(E){E.snippet&&!E.docHTML&&(E.docHTML=["<b>",h.escapeHTML(E.caption),"</b>","<hr></hr>",h.escapeHTML(l(E.snippet))].join(""))},id:"snippetCompleter"},c=[o,a,u];r.setCompleters=function(E){c.length=0,E&&c.push.apply(c,E)},r.addCompleter=function(E){c.push(E)},r.textCompleter=a,r.keyWordCompleter=u,r.snippetCompleter=o;var p={name:"expandSnippet",exec:function(E){return g.expandWithTab(E)},bindKey:"Tab"},w=function(E,I){b(I.session.$mode)},b=function(E){typeof E=="string"&&(E=x.$modes[E]),E&&(g.files||(g.files={}),L(E.$id,E.snippetFileId),E.modes&&E.modes.forEach(b))},L=function(E,I){!I||!E||g.files[E]||(g.files[E]={},x.loadModule(I,function(z){z&&(g.files[E]=z,!z.snippets&&z.snippetText&&(z.snippets=g.parseSnippetFile(z.snippetText)),g.register(z.snippets||[],z.scope),z.includeScopes&&(g.snippetMap[z.scope].includeScopes=z.includeScopes,z.includeScopes.forEach(function(P){b("ace/mode/"+P)})))}))},M=function(E){var I=E.editor,z=I.completer&&I.completer.activated;if(E.command.name==="backspace")z&&!d.getCompletionPrefix(I)&&I.completer.detach();else if(E.command.name==="insertstring"&&!z){k=E;var P=E.editor.$liveAutocompletionDelay;P?C.delay(P):R(E)}},k,C=h.delayedCall(function(){R(k)},0),R=function(E){var I=E.editor,z=d.getCompletionPrefix(I),P=E.args,N=d.triggerAutocomplete(I,P);if(z&&z.length>=I.$liveAutocompletionThreshold||N){var _=y.for(I);_.autoShown=!0,_.showPopup(I)}},O=e("../editor").Editor;e("../config").defineOptions(O.prototype,"editor",{enableBasicAutocompletion:{set:function(E){E?(y.for(this),this.completers||(this.completers=Array.isArray(E)?E:c),this.commands.addCommand(y.startCommand)):this.commands.removeCommand(y.startCommand)},value:!1},enableLiveAutocompletion:{set:function(E){E?(this.completers||(this.completers=Array.isArray(E)?E:c),this.commands.on("afterExec",M)):this.commands.off("afterExec",M)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(E){E?(this.commands.addCommand(p),this.on("changeMode",w),w(null,this)):(this.commands.removeCommand(p),this.off("changeMode",w))},value:!1}}),r.MarkerGroup=s}),(function(){ace.require(["ace/ext/language_tools"],function(e){n&&(n.exports=e)})})()})(qp)),qp.exports}U0();var Xp={exports:{}},Qp;function V0(){return Qp||(Qp=1,(function(n,t){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(e,r,m){m.exports=`
|
1230
|
+
|
1231
|
+
/* ------------------------------------------------------------------------------------------
|
1232
|
+
* Editor Search Form
|
1233
|
+
* --------------------------------------------------------------------------------------- */
|
1234
|
+
.ace_search {
|
1235
|
+
background-color: #ddd;
|
1236
|
+
color: #666;
|
1237
|
+
border: 1px solid #cbcbcb;
|
1238
|
+
border-top: 0 none;
|
1239
|
+
overflow: hidden;
|
1240
|
+
margin: 0;
|
1241
|
+
padding: 4px 6px 0 4px;
|
1242
|
+
position: absolute;
|
1243
|
+
top: 0;
|
1244
|
+
z-index: 99;
|
1245
|
+
white-space: normal;
|
1246
|
+
}
|
1247
|
+
.ace_search.left {
|
1248
|
+
border-left: 0 none;
|
1249
|
+
border-radius: 0px 0px 5px 0px;
|
1250
|
+
left: 0;
|
1251
|
+
}
|
1252
|
+
.ace_search.right {
|
1253
|
+
border-radius: 0px 0px 0px 5px;
|
1254
|
+
border-right: 0 none;
|
1255
|
+
right: 0;
|
1256
|
+
}
|
1257
|
+
|
1258
|
+
.ace_search_form, .ace_replace_form {
|
1259
|
+
margin: 0 20px 4px 0;
|
1260
|
+
overflow: hidden;
|
1261
|
+
line-height: 1.9;
|
1262
|
+
}
|
1263
|
+
.ace_replace_form {
|
1264
|
+
margin-right: 0;
|
1265
|
+
}
|
1266
|
+
.ace_search_form.ace_nomatch {
|
1267
|
+
outline: 1px solid red;
|
1268
|
+
}
|
1269
|
+
|
1270
|
+
.ace_search_field {
|
1271
|
+
border-radius: 3px 0 0 3px;
|
1272
|
+
background-color: white;
|
1273
|
+
color: black;
|
1274
|
+
border: 1px solid #cbcbcb;
|
1275
|
+
border-right: 0 none;
|
1276
|
+
outline: 0;
|
1277
|
+
padding: 0;
|
1278
|
+
font-size: inherit;
|
1279
|
+
margin: 0;
|
1280
|
+
line-height: inherit;
|
1281
|
+
padding: 0 6px;
|
1282
|
+
min-width: 17em;
|
1283
|
+
vertical-align: top;
|
1284
|
+
min-height: 1.8em;
|
1285
|
+
box-sizing: content-box;
|
1286
|
+
}
|
1287
|
+
.ace_searchbtn {
|
1288
|
+
border: 1px solid #cbcbcb;
|
1289
|
+
line-height: inherit;
|
1290
|
+
display: inline-block;
|
1291
|
+
padding: 0 6px;
|
1292
|
+
background: #fff;
|
1293
|
+
border-right: 0 none;
|
1294
|
+
border-left: 1px solid #dcdcdc;
|
1295
|
+
cursor: pointer;
|
1296
|
+
margin: 0;
|
1297
|
+
position: relative;
|
1298
|
+
color: #666;
|
1299
|
+
}
|
1300
|
+
.ace_searchbtn:last-child {
|
1301
|
+
border-radius: 0 3px 3px 0;
|
1302
|
+
border-right: 1px solid #cbcbcb;
|
1303
|
+
}
|
1304
|
+
.ace_searchbtn:disabled {
|
1305
|
+
background: none;
|
1306
|
+
cursor: default;
|
1307
|
+
}
|
1308
|
+
.ace_searchbtn:hover {
|
1309
|
+
background-color: #eef1f6;
|
1310
|
+
}
|
1311
|
+
.ace_searchbtn.prev, .ace_searchbtn.next {
|
1312
|
+
padding: 0px 0.7em
|
1313
|
+
}
|
1314
|
+
.ace_searchbtn.prev:after, .ace_searchbtn.next:after {
|
1315
|
+
content: "";
|
1316
|
+
border: solid 2px #888;
|
1317
|
+
width: 0.5em;
|
1318
|
+
height: 0.5em;
|
1319
|
+
border-width: 2px 0 0 2px;
|
1320
|
+
display:inline-block;
|
1321
|
+
transform: rotate(-45deg);
|
1322
|
+
}
|
1323
|
+
.ace_searchbtn.next:after {
|
1324
|
+
border-width: 0 2px 2px 0 ;
|
1325
|
+
}
|
1326
|
+
.ace_searchbtn_close {
|
1327
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
|
1328
|
+
border-radius: 50%;
|
1329
|
+
border: 0 none;
|
1330
|
+
color: #656565;
|
1331
|
+
cursor: pointer;
|
1332
|
+
font: 16px/16px Arial;
|
1333
|
+
padding: 0;
|
1334
|
+
height: 14px;
|
1335
|
+
width: 14px;
|
1336
|
+
top: 9px;
|
1337
|
+
right: 7px;
|
1338
|
+
position: absolute;
|
1339
|
+
}
|
1340
|
+
.ace_searchbtn_close:hover {
|
1341
|
+
background-color: #656565;
|
1342
|
+
background-position: 50% 100%;
|
1343
|
+
color: white;
|
1344
|
+
}
|
1345
|
+
|
1346
|
+
.ace_button {
|
1347
|
+
margin-left: 2px;
|
1348
|
+
cursor: pointer;
|
1349
|
+
-webkit-user-select: none;
|
1350
|
+
-moz-user-select: none;
|
1351
|
+
-o-user-select: none;
|
1352
|
+
-ms-user-select: none;
|
1353
|
+
user-select: none;
|
1354
|
+
overflow: hidden;
|
1355
|
+
opacity: 0.7;
|
1356
|
+
border: 1px solid rgba(100,100,100,0.23);
|
1357
|
+
padding: 1px;
|
1358
|
+
box-sizing: border-box!important;
|
1359
|
+
color: black;
|
1360
|
+
}
|
1361
|
+
|
1362
|
+
.ace_button:hover {
|
1363
|
+
background-color: #eee;
|
1364
|
+
opacity:1;
|
1365
|
+
}
|
1366
|
+
.ace_button:active {
|
1367
|
+
background-color: #ddd;
|
1368
|
+
}
|
1369
|
+
|
1370
|
+
.ace_button.checked {
|
1371
|
+
border-color: #3399ff;
|
1372
|
+
opacity:1;
|
1373
|
+
}
|
1374
|
+
|
1375
|
+
.ace_search_options{
|
1376
|
+
margin-bottom: 3px;
|
1377
|
+
text-align: right;
|
1378
|
+
-webkit-user-select: none;
|
1379
|
+
-moz-user-select: none;
|
1380
|
+
-o-user-select: none;
|
1381
|
+
-ms-user-select: none;
|
1382
|
+
user-select: none;
|
1383
|
+
clear: both;
|
1384
|
+
}
|
1385
|
+
|
1386
|
+
.ace_search_counter {
|
1387
|
+
float: left;
|
1388
|
+
font-family: arial;
|
1389
|
+
padding: 0 8px;
|
1390
|
+
}`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/ext/searchbox","ace/ext/searchbox","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(e,r,m){var g=e("../lib/dom"),y=e("../lib/lang"),x=e("../lib/event"),h=e("./searchbox-css"),d=e("../keyboard/hash_handler").HashHandler,s=e("../lib/keys"),a=e("../config").nls,u=999;g.importCssString(h,"ace_searchbox",!1);var l=(function(){function p(w,b,L){this.activeInput,this.element=g.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:a("search-box.find.placeholder","Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},""],["span",{action:"findNext",class:"ace_searchbtn next"},""],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},a("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:a("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},a("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},a("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:a("search-box.toggle-replace.title","Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:a("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:a("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:a("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:a("search-box.toggle-in-selection.title","Search In Selection")},"S"]]]),this.setSession=this.setSession.bind(this),this.$onEditorInput=this.onEditorInput.bind(this),this.$init(),this.setEditor(w),g.importCssString(h,"ace_searchbox",w.container),x.addListener(this.element,"touchstart",function(M){M.stopPropagation()},w)}return p.prototype.setEditor=function(w){w.searchBox=this,w.renderer.scroller.appendChild(this.element),this.editor=w},p.prototype.setSession=function(w){this.searchRange=null,this.$syncOptions(!0)},p.prototype.onEditorInput=function(){this.find(!1,!1,!0)},p.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")},p.prototype.$init=function(){var w=this.element;this.$initElements(w);var b=this;x.addListener(w,"mousedown",function(L){setTimeout(function(){b.activeInput.focus()},0),x.stopPropagation(L)}),x.addListener(w,"click",function(L){var M=L.target||L.srcElement,k=M.getAttribute("action");k&&b[k]?b[k]():b.$searchBarKb.commands[k]&&b.$searchBarKb.commands[k].exec(b),x.stopPropagation(L)}),x.addCommandKeyListener(w,function(L,M,k){var C=s.keyCodeToString(k),R=b.$searchBarKb.findKeyCommand(M,C);R&&R.exec&&(R.exec(b),x.stopEvent(L))}),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()})},p.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)},p.prototype.$syncOptions=function(w){g.setCssClass(this.replaceOption,"checked",this.searchRange),g.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",g.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),g.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),g.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)},p.prototype.highlight=function(w){this.editor.session.highlight(w||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},p.prototype.find=function(w,b,L){if(this.editor.session){var M=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:L,range:this.searchRange}),k=!M&&this.searchInput.value;g.setCssClass(this.searchBox,"ace_nomatch",k),this.editor._emit("findSearchBox",{match:!k}),this.highlight(),this.updateCounter()}},p.prototype.updateCounter=function(){var w=this.editor,b=w.$search.$options.re,L=b.unicode,M=0,k=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,`
|
1391
|
+
`),w.session.doc.$autoNewLine=`
|
1392
|
+
`);var R=w.session.doc.positionToIndex(w.selection.anchor);this.searchRange&&(R-=w.session.doc.positionToIndex(this.searchRange.start));for(var O=b.lastIndex=0,E;(E=b.exec(C))&&(M++,O=E.index,O<=R&&k++,!(M>u||!E[0]&&(b.lastIndex=O+=y.skipEmptyMatch(C,O,L),O>=C.length))););}this.searchCounter.textContent=a("search-box.search-counter","$0 of $1",[k,M>u?u+"+":M])},p.prototype.findNext=function(){this.find(!0,!1)},p.prototype.findPrev=function(){this.find(!0,!0)},p.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;g.setCssClass(this.searchBox,"ace_nomatch",b),this.editor._emit("findSearchBox",{match:!b}),this.highlight(),this.hide()},p.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},p.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},p.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},p.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()},p.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!=null&&(this.searchInput.value=w),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},p.prototype.isFocused=function(){var w=document.activeElement;return w==this.searchInput||w==this.replaceInput},p})(),o=new d;o.bindKeys({"Ctrl-f|Command-f":function(p){var w=p.isReplace=!p.isReplace;p.replaceBox.style.display=w?"":"none",p.replaceOption.checked=!1,p.$syncOptions(),p.searchInput.focus()},"Ctrl-H|Command-Option-F":function(p){p.editor.getReadOnly()||(p.replaceOption.checked=!0,p.$syncOptions(),p.replaceInput.focus())},"Ctrl-G|Command-G":function(p){p.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(p){p.findPrev()},esc:function(p){setTimeout(function(){p.hide()})},Return:function(p){p.activeInput==p.replaceInput&&p.replace(),p.findNext()},"Shift-Return":function(p){p.activeInput==p.replaceInput&&p.replace(),p.findPrev()},"Alt-Return":function(p){p.activeInput==p.replaceInput&&p.replaceAll(),p.findAll()},Tab:function(p){(p.activeInput==p.replaceInput?p.searchInput:p.replaceInput).focus()}}),o.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(p){p.regExpOption.checked=!p.regExpOption.checked,p.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(p){p.caseSensitiveOption.checked=!p.caseSensitiveOption.checked,p.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(p){p.wholeWordOption.checked=!p.wholeWordOption.checked,p.$syncOptions()}},{name:"toggleReplace",exec:function(p){p.replaceOption.checked=!p.replaceOption.checked,p.$syncOptions()}},{name:"searchInSelection",exec:function(p){p.searchOption.checked=!p.searchRange,p.setSearchRange(p.searchOption.checked&&p.editor.getSelectionRange()),p.$syncOptions()}}]);var c=new d([{bindKey:"Esc",name:"closeSearchBar",exec:function(p){p.searchBox.hide()}}]);l.prototype.$searchBarKb=o,l.prototype.$closeSearchBarKb=c,r.SearchBox=l,r.Search=function(p,w){var b=p.searchBox||new l(p),L=p.session.selection.getRange(),M=L.isMultiLine()?"":p.session.getTextRange(L);b.show(M,w)}}),(function(){ace.require(["ace/ext/searchbox"],function(e){n&&(n.exports=e)})})()})(Xp)),Xp.exports}V0();var G0=Object.defineProperty,K0=(n,t,e)=>t in n?G0(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,ml=(n,t,e)=>K0(n,typeof t!="symbol"?t+"":t,e);function Zp(n,t){return function(){return n.apply(t,arguments)}}const{toString:q0}=Object.prototype,{getPrototypeOf:iu}=Object,{iterator:vl,toStringTag:Jp}=Symbol,yl=(n=>t=>{const e=q0.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ai=n=>(n=n.toLowerCase(),t=>yl(t)===n),wl=n=>t=>typeof t===n,{isArray:Bs}=Array,ba=wl("undefined");function xa(n){return n!==null&&!ba(n)&&n.constructor!==null&&!ba(n.constructor)&&Fr(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const eg=Ai("ArrayBuffer");function Y0(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&eg(n.buffer),t}const X0=wl("string"),Fr=wl("function"),tg=wl("number"),Ca=n=>n!==null&&typeof n=="object",Q0=n=>n===!0||n===!1,bl=n=>{if(yl(n)!=="object")return!1;const t=iu(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Jp in n)&&!(vl in n)},Z0=n=>{if(!Ca(n)||xa(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},J0=Ai("Date"),ex=Ai("File"),tx=Ai("Blob"),nx=Ai("FileList"),rx=n=>Ca(n)&&Fr(n.pipe),ix=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Fr(n.append)&&((t=yl(n))==="formdata"||t==="object"&&Fr(n.toString)&&n.toString()==="[object FormData]"))},ox=Ai("URLSearchParams"),[sx,ax,lx,cx]=["ReadableStream","Request","Response","Headers"].map(Ai),ux=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ka(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,m;if(typeof n!="object"&&(n=[n]),Bs(n))for(r=0,m=n.length;r<m;r++)t.call(null,n[r],r,n);else{if(xa(n))return;const g=e?Object.getOwnPropertyNames(n):Object.keys(n),y=g.length;let x;for(r=0;r<y;r++)x=g[r],t.call(null,n[x],x,n)}}function ng(n,t){if(xa(n))return null;t=t.toLowerCase();const e=Object.keys(n);let r=e.length,m;for(;r-- >0;)if(m=e[r],t===m.toLowerCase())return m;return null}const rs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,rg=n=>!ba(n)&&n!==rs;function ou(){const{caseless:n}=rg(this)&&this||{},t={},e=(r,m)=>{const g=n&&ng(t,m)||m;bl(t[g])&&bl(r)?t[g]=ou(t[g],r):bl(r)?t[g]=ou({},r):Bs(r)?t[g]=r.slice():t[g]=r};for(let r=0,m=arguments.length;r<m;r++)arguments[r]&&ka(arguments[r],e);return t}const hx=(n,t,e,{allOwnKeys:r}={})=>(ka(t,(m,g)=>{e&&Fr(m)?n[g]=Zp(m,e):n[g]=m},{allOwnKeys:r}),n),dx=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),px=(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)},gx=(n,t,e,r)=>{let m,g,y;const x={};if(t=t||{},n==null)return t;do{for(m=Object.getOwnPropertyNames(n),g=m.length;g-- >0;)y=m[g],(!r||r(y,n,t))&&!x[y]&&(t[y]=n[y],x[y]=!0);n=e!==!1&&iu(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},fx=(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},mx=n=>{if(!n)return null;if(Bs(n))return n;let t=n.length;if(!tg(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},vx=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&iu(Uint8Array)),yx=(n,t)=>{const e=(n&&n[vl]).call(n);let r;for(;(r=e.next())&&!r.done;){const m=r.value;t.call(n,m[0],m[1])}},wx=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},bx=Ai("HTMLFormElement"),xx=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),ig=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),Cx=Ai("RegExp"),og=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};ka(e,(m,g)=>{let y;(y=t(m,g,n))!==!1&&(r[g]=y||m)}),Object.defineProperties(n,r)},kx=n=>{og(n,(t,e)=>{if(Fr(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(Fr(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+"'")})}})},Sx=(n,t)=>{const e={},r=m=>{m.forEach(g=>{e[g]=!0})};return Bs(n)?r(n):r(String(n).split(t)),e},Ax=()=>{},_x=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function $x(n){return!!(n&&Fr(n.append)&&n[Jp]==="FormData"&&n[vl])}const Mx=n=>{const t=new Array(10),e=(r,m)=>{if(Ca(r)){if(t.indexOf(r)>=0)return;if(xa(r))return r;if(!("toJSON"in r)){t[m]=r;const g=Bs(r)?[]:{};return ka(r,(y,x)=>{const h=e(y,m+1);!ba(h)&&(g[x]=h)}),t[m]=void 0,g}}return r};return e(n,0)},Tx=Ai("AsyncFunction"),Ix=n=>n&&(Ca(n)||Fr(n))&&Fr(n.then)&&Fr(n.catch),sg=((n,t)=>n?setImmediate:t?((e,r)=>(rs.addEventListener("message",({source:m,data:g})=>{m===rs&&g===e&&r.length&&r.shift()()},!1),m=>{r.push(m),rs.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Fr(rs.postMessage)),Lx=typeof queueMicrotask<"u"?queueMicrotask.bind(rs):typeof process<"u"&&process.nextTick||sg,Ex=n=>n!=null&&Fr(n[vl]),ke={isArray:Bs,isArrayBuffer:eg,isBuffer:xa,isFormData:ix,isArrayBufferView:Y0,isString:X0,isNumber:tg,isBoolean:Q0,isObject:Ca,isPlainObject:bl,isEmptyObject:Z0,isReadableStream:sx,isRequest:ax,isResponse:lx,isHeaders:cx,isUndefined:ba,isDate:J0,isFile:ex,isBlob:tx,isRegExp:Cx,isFunction:Fr,isStream:rx,isURLSearchParams:ox,isTypedArray:vx,isFileList:nx,forEach:ka,merge:ou,extend:hx,trim:ux,stripBOM:dx,inherits:px,toFlatObject:gx,kindOf:yl,kindOfTest:Ai,endsWith:fx,toArray:mx,forEachEntry:yx,matchAll:wx,isHTMLForm:bx,hasOwnProperty:ig,hasOwnProp:ig,reduceDescriptors:og,freezeMethods:kx,toObjectSet:Sx,toCamelCase:xx,noop:Ax,toFiniteNumber:_x,findKey:ng,global:rs,isContextDefined:rg,isSpecCompliantForm:$x,toJSONObject:Mx,isAsyncFn:Tx,isThenable:Ix,setImmediate:sg,asap:Lx,isIterable:Ex};function yt(n,t,e,r,m){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),m&&(this.response=m,this.status=m.status?m.status:null)}ke.inherits(yt,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:ke.toJSONObject(this.config),code:this.code,status:this.status}}});const ag=yt.prototype,lg={};["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=>{lg[n]={value:n}}),Object.defineProperties(yt,lg),Object.defineProperty(ag,"isAxiosError",{value:!0}),yt.from=(n,t,e,r,m,g)=>{const y=Object.create(ag);return ke.toFlatObject(n,y,function(x){return x!==Error.prototype},x=>x!=="isAxiosError"),yt.call(y,n.message,t,e,r,m),y.cause=n,y.name=n.name,g&&Object.assign(y,g),y};const Rx=null;function su(n){return ke.isPlainObject(n)||ke.isArray(n)}function cg(n){return ke.endsWith(n,"[]")?n.slice(0,-2):n}function ug(n,t,e){return n?n.concat(t).map(function(r,m){return r=cg(r),!e&&m?"["+r+"]":r}).join(e?".":""):t}function Ox(n){return ke.isArray(n)&&!n.some(su)}const Nx=ke.toFlatObject(ke,{},null,function(n){return/^is[A-Z]/.test(n)});function xl(n,t,e){if(!ke.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=ke.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(l,o){return!ke.isUndefined(o[l])});const r=e.metaTokens,m=e.visitor||d,g=e.dots,y=e.indexes,x=(e.Blob||typeof Blob<"u"&&Blob)&&ke.isSpecCompliantForm(t);if(!ke.isFunction(m))throw new TypeError("visitor must be a function");function h(l){if(l===null)return"";if(ke.isDate(l))return l.toISOString();if(ke.isBoolean(l))return l.toString();if(!x&&ke.isBlob(l))throw new yt("Blob is not supported. Use a Buffer instead.");return ke.isArrayBuffer(l)||ke.isTypedArray(l)?x&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function d(l,o,c){let p=l;if(l&&!c&&typeof l=="object"){if(ke.endsWith(o,"{}"))o=r?o:o.slice(0,-2),l=JSON.stringify(l);else if(ke.isArray(l)&&Ox(l)||(ke.isFileList(l)||ke.endsWith(o,"[]"))&&(p=ke.toArray(l)))return o=cg(o),p.forEach(function(w,b){!(ke.isUndefined(w)||w===null)&&t.append(y===!0?ug([o],b,g):y===null?o:o+"[]",h(w))}),!1}return su(l)?!0:(t.append(ug(c,o,g),h(l)),!1)}const s=[],a=Object.assign(Nx,{defaultVisitor:d,convertValue:h,isVisitable:su});function u(l,o){if(!ke.isUndefined(l)){if(s.indexOf(l)!==-1)throw Error("Circular reference detected in "+o.join("."));s.push(l),ke.forEach(l,function(c,p){(!(ke.isUndefined(c)||c===null)&&m.call(t,c,ke.isString(p)?p.trim():p,o,a))===!0&&u(c,o?o.concat(p):[p])}),s.pop()}}if(!ke.isObject(n))throw new TypeError("data must be an object");return u(n),t}function hg(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function au(n,t){this._pairs=[],n&&xl(n,this,t)}const dg=au.prototype;dg.append=function(n,t){this._pairs.push([n,t])},dg.toString=function(n){const t=n?function(e){return n.call(this,e,hg)}:hg;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function Dx(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function pg(n,t,e){if(!t)return n;const r=e&&e.encode||Dx;ke.isFunction(e)&&(e={serialize:e});const m=e&&e.serialize;let g;if(m?g=m(t,e):g=ke.isURLSearchParams(t)?t.toString():new au(t,e).toString(r),g){const y=n.indexOf("#");y!==-1&&(n=n.slice(0,y)),n+=(n.indexOf("?")===-1?"?":"&")+g}return n}class gg{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){ke.forEach(this.handlers,function(e){e!==null&&t(e)})}}const fg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Fx=typeof URLSearchParams<"u"?URLSearchParams:au,Px=typeof FormData<"u"?FormData:null,Wx=typeof Blob<"u"?Blob:null,Bx={isBrowser:!0,classes:{URLSearchParams:Fx,FormData:Px,Blob:Wx},protocols:["http","https","file","blob","url","data"]},lu=typeof window<"u"&&typeof document<"u",cu=typeof navigator=="object"&&navigator||void 0,zx=lu&&(!cu||["ReactNative","NativeScript","NS"].indexOf(cu.product)<0),jx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Hx=lu&&window.location.href||"http://localhost",Ux=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:lu,hasStandardBrowserEnv:zx,hasStandardBrowserWebWorkerEnv:jx,navigator:cu,origin:Hx},Symbol.toStringTag,{value:"Module"})),pr={...Ux,...Bx};function Vx(n,t){return xl(n,new pr.classes.URLSearchParams,{visitor:function(e,r,m,g){return pr.isNode&&ke.isBuffer(e)?(this.append(r,e.toString("base64")),!1):g.defaultVisitor.apply(this,arguments)},...t})}function Gx(n){return ke.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Kx(n){const t={},e=Object.keys(n);let r;const m=e.length;let g;for(r=0;r<m;r++)g=e[r],t[g]=n[g];return t}function mg(n){function t(e,r,m,g){let y=e[g++];if(y==="__proto__")return!0;const x=Number.isFinite(+y),h=g>=e.length;return y=!y&&ke.isArray(m)?m.length:y,h?(ke.hasOwnProp(m,y)?m[y]=[m[y],r]:m[y]=r,!x):((!m[y]||!ke.isObject(m[y]))&&(m[y]=[]),t(e,r,m[y],g)&&ke.isArray(m[y])&&(m[y]=Kx(m[y])),!x)}if(ke.isFormData(n)&&ke.isFunction(n.entries)){const e={};return ke.forEachEntry(n,(r,m)=>{t(Gx(r),m,e,0)}),e}return null}function qx(n,t,e){if(ke.isString(n))try{return(t||JSON.parse)(n),ke.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const Sa={transitional:fg,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,m=ke.isObject(n);if(m&&ke.isHTMLForm(n)&&(n=new FormData(n)),ke.isFormData(n))return r?JSON.stringify(mg(n)):n;if(ke.isArrayBuffer(n)||ke.isBuffer(n)||ke.isStream(n)||ke.isFile(n)||ke.isBlob(n)||ke.isReadableStream(n))return n;if(ke.isArrayBufferView(n))return n.buffer;if(ke.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let g;if(m){if(e.indexOf("application/x-www-form-urlencoded")>-1)return Vx(n,this.formSerializer).toString();if((g=ke.isFileList(n))||e.indexOf("multipart/form-data")>-1){const y=this.env&&this.env.FormData;return xl(g?{"files[]":n}:n,y&&new y,this.formSerializer)}}return m||r?(t.setContentType("application/json",!1),qx(n)):n}],transformResponse:[function(n){const t=this.transitional||Sa.transitional,e=t&&t.forcedJSONParsing,r=this.responseType==="json";if(ke.isResponse(n)||ke.isReadableStream(n))return n;if(n&&ke.isString(n)&&(e&&!this.responseType||r)){const m=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(g){if(m)throw g.name==="SyntaxError"?yt.from(g,yt.ERR_BAD_RESPONSE,this,null,this.response):g}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pr.classes.FormData,Blob:pr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ke.forEach(["delete","get","head","post","put","patch"],n=>{Sa.headers[n]={}});const Yx=ke.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"]),Xx=n=>{const t={};let e,r,m;return n&&n.split(`
|
1393
|
+
`).forEach(function(g){m=g.indexOf(":"),e=g.substring(0,m).trim().toLowerCase(),r=g.substring(m+1).trim(),!(!e||t[e]&&Yx[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},vg=Symbol("internals");function Aa(n){return n&&String(n).trim().toLowerCase()}function Cl(n){return n===!1||n==null?n:ke.isArray(n)?n.map(Cl):String(n)}function Qx(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 Zx=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function uu(n,t,e,r,m){if(ke.isFunction(r))return r.call(this,t,e);if(m&&(t=e),!!ke.isString(t)){if(ke.isString(r))return t.indexOf(r)!==-1;if(ke.isRegExp(r))return r.test(t)}}function Jx(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function e1(n,t){const e=ke.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{value:function(m,g,y){return this[r].call(this,t,m,g,y)},configurable:!0})})}let Pr=class{constructor(n){n&&this.set(n)}set(n,t,e){const r=this;function m(y,x,h){const d=Aa(x);if(!d)throw new Error("header name must be a non-empty string");const s=ke.findKey(r,d);(!s||r[s]===void 0||h===!0||h===void 0&&r[s]!==!1)&&(r[s||x]=Cl(y))}const g=(y,x)=>ke.forEach(y,(h,d)=>m(h,d,x));if(ke.isPlainObject(n)||n instanceof this.constructor)g(n,t);else if(ke.isString(n)&&(n=n.trim())&&!Zx(n))g(Xx(n),t);else if(ke.isObject(n)&&ke.isIterable(n)){let y={},x,h;for(const d of n){if(!ke.isArray(d))throw TypeError("Object iterator must return a key-value pair");y[h=d[0]]=(x=y[h])?ke.isArray(x)?[...x,d[1]]:[x,d[1]]:d[1]}g(y,t)}else n!=null&&m(t,n,e);return this}get(n,t){if(n=Aa(n),n){const e=ke.findKey(this,n);if(e){const r=this[e];if(!t)return r;if(t===!0)return Qx(r);if(ke.isFunction(t))return t.call(this,r,e);if(ke.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,t){if(n=Aa(n),n){const e=ke.findKey(this,n);return!!(e&&this[e]!==void 0&&(!t||uu(this,this[e],e,t)))}return!1}delete(n,t){const e=this;let r=!1;function m(g){if(g=Aa(g),g){const y=ke.findKey(e,g);y&&(!t||uu(e,e[y],y,t))&&(delete e[y],r=!0)}}return ke.isArray(n)?n.forEach(m):m(n),r}clear(n){const t=Object.keys(this);let e=t.length,r=!1;for(;e--;){const m=t[e];(!n||uu(this,this[m],m,n,!0))&&(delete this[m],r=!0)}return r}normalize(n){const t=this,e={};return ke.forEach(this,(r,m)=>{const g=ke.findKey(e,m);if(g){t[g]=Cl(r),delete t[m];return}const y=n?Jx(m):String(m).trim();y!==m&&delete t[m],t[y]=Cl(r),e[y]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const t=Object.create(null);return ke.forEach(this,(e,r)=>{e!=null&&e!==!1&&(t[r]=n&&ke.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(`
|
1394
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...t){const e=new this(n);return t.forEach(r=>e.set(r)),e}static accessor(n){const t=(this[vg]=this[vg]={accessors:{}}).accessors,e=this.prototype;function r(m){const g=Aa(m);t[g]||(e1(e,m),t[g]=!0)}return ke.isArray(n)?n.forEach(r):r(n),this}};Pr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ke.reduceDescriptors(Pr.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),ke.freezeMethods(Pr);function hu(n,t){const e=this||Sa,r=t||e,m=Pr.from(r.headers);let g=r.data;return ke.forEach(n,function(y){g=y.call(e,g,m.normalize(),t?t.status:void 0)}),m.normalize(),g}function yg(n){return!!(n&&n.__CANCEL__)}function zs(n,t,e){yt.call(this,n??"canceled",yt.ERR_CANCELED,t,e),this.name="CanceledError"}ke.inherits(zs,yt,{__CANCEL__:!0});function wg(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new yt("Request failed with status code "+e.status,[yt.ERR_BAD_REQUEST,yt.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function t1(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function n1(n,t){n=n||10;const e=new Array(n),r=new Array(n);let m=0,g=0,y;return t=t!==void 0?t:1e3,function(x){const h=Date.now(),d=r[g];y||(y=h),e[m]=x,r[m]=h;let s=g,a=0;for(;s!==m;)a+=e[s++],s=s%n;if(m=(m+1)%n,m===g&&(g=(g+1)%n),h-y<t)return;const u=d&&h-d;return u?Math.round(a*1e3/u):void 0}}function r1(n,t){let e=0,r=1e3/t,m,g;const y=(x,h=Date.now())=>{e=h,m=null,g&&(clearTimeout(g),g=null),n(...x)};return[(...x)=>{const h=Date.now(),d=h-e;d>=r?y(x,h):(m=x,g||(g=setTimeout(()=>{g=null,y(m)},r-d)))},()=>m&&y(m)]}const kl=(n,t,e=3)=>{let r=0;const m=n1(50,250);return r1(g=>{const y=g.loaded,x=g.lengthComputable?g.total:void 0,h=y-r,d=m(h),s=y<=x;r=y;const a={loaded:y,total:x,progress:x?y/x:void 0,bytes:h,rate:d||void 0,estimated:d&&x&&s?(x-y)/d:void 0,event:g,lengthComputable:x!=null,[t?"download":"upload"]:!0};n(a)},e)},bg=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},xg=n=>(...t)=>ke.asap(()=>n(...t)),i1=pr.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,pr.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(pr.origin),pr.navigator&&/(msie|trident)/i.test(pr.navigator.userAgent)):()=>!0,o1=pr.hasStandardBrowserEnv?{write(n,t,e,r,m,g){const y=[n+"="+encodeURIComponent(t)];ke.isNumber(e)&&y.push("expires="+new Date(e).toGMTString()),ke.isString(r)&&y.push("path="+r),ke.isString(m)&&y.push("domain="+m),g===!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 s1(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function a1(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function Cg(n,t,e){let r=!s1(t);return n&&(r||e==!1)?a1(n,t):t}const kg=n=>n instanceof Pr?{...n}:n;function is(n,t){t=t||{};const e={};function r(d,s,a,u){return ke.isPlainObject(d)&&ke.isPlainObject(s)?ke.merge.call({caseless:u},d,s):ke.isPlainObject(s)?ke.merge({},s):ke.isArray(s)?s.slice():s}function m(d,s,a,u){if(ke.isUndefined(s)){if(!ke.isUndefined(d))return r(void 0,d,a,u)}else return r(d,s,a,u)}function g(d,s){if(!ke.isUndefined(s))return r(void 0,s)}function y(d,s){if(ke.isUndefined(s)){if(!ke.isUndefined(d))return r(void 0,d)}else return r(void 0,s)}function x(d,s,a){if(a in t)return r(d,s);if(a in n)return r(void 0,d)}const h={url:g,method:g,data:g,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:(d,s,a)=>m(kg(d),kg(s),a,!0)};return ke.forEach(Object.keys({...n,...t}),function(d){const s=h[d]||m,a=s(n[d],t[d],d);ke.isUndefined(a)&&s!==x||(e[d]=a)}),e}const Sg=n=>{const t=is({},n);let{data:e,withXSRFToken:r,xsrfHeaderName:m,xsrfCookieName:g,headers:y,auth:x}=t;t.headers=y=Pr.from(y),t.url=pg(Cg(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(ke.isFormData(e)){if(pr.hasStandardBrowserEnv||pr.hasStandardBrowserWebWorkerEnv)y.setContentType(void 0);else if((h=y.getContentType())!==!1){const[d,...s]=h?h.split(";").map(a=>a.trim()).filter(Boolean):[];y.setContentType([d||"multipart/form-data",...s].join("; "))}}if(pr.hasStandardBrowserEnv&&(r&&ke.isFunction(r)&&(r=r(t)),r||r!==!1&&i1(t.url))){const d=m&&g&&o1.read(g);d&&y.set(m,d)}return t},l1=typeof XMLHttpRequest<"u",c1=l1&&function(n){return new Promise(function(t,e){const r=Sg(n);let m=r.data;const g=Pr.from(r.headers).normalize();let{responseType:y,onUploadProgress:x,onDownloadProgress:h}=r,d,s,a,u,l;function o(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let c=new XMLHttpRequest;c.open(r.method.toUpperCase(),r.url,!0),c.timeout=r.timeout;function p(){if(!c)return;const b=Pr.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),L={data:!y||y==="text"||y==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:b,config:n,request:c};wg(function(M){t(M),o()},function(M){e(M),o()},L),c=null}"onloadend"in c?c.onloadend=p:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(p)},c.onabort=function(){c&&(e(new yt("Request aborted",yt.ECONNABORTED,n,c)),c=null)},c.onerror=function(){e(new yt("Network Error",yt.ERR_NETWORK,n,c)),c=null},c.ontimeout=function(){let b=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const L=r.transitional||fg;r.timeoutErrorMessage&&(b=r.timeoutErrorMessage),e(new yt(b,L.clarifyTimeoutError?yt.ETIMEDOUT:yt.ECONNABORTED,n,c)),c=null},m===void 0&&g.setContentType(null),"setRequestHeader"in c&&ke.forEach(g.toJSON(),function(b,L){c.setRequestHeader(L,b)}),ke.isUndefined(r.withCredentials)||(c.withCredentials=!!r.withCredentials),y&&y!=="json"&&(c.responseType=r.responseType),h&&([a,l]=kl(h,!0),c.addEventListener("progress",a)),x&&c.upload&&([s,u]=kl(x),c.upload.addEventListener("progress",s),c.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(d=b=>{c&&(e(!b||b.type?new zs(null,n,c):b),c.abort(),c=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const w=t1(r.url);if(w&&pr.protocols.indexOf(w)===-1){e(new yt("Unsupported protocol "+w+":",yt.ERR_BAD_REQUEST,n));return}c.send(m||null)})},u1=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let r=new AbortController,m;const g=function(d){if(!m){m=!0,x();const s=d instanceof Error?d:this.reason;r.abort(s instanceof yt?s:new zs(s instanceof Error?s.message:s))}};let y=t&&setTimeout(()=>{y=null,g(new yt(`timeout ${t} of ms exceeded`,yt.ETIMEDOUT))},t);const x=()=>{n&&(y&&clearTimeout(y),y=null,n.forEach(d=>{d.unsubscribe?d.unsubscribe(g):d.removeEventListener("abort",g)}),n=null)};n.forEach(d=>d.addEventListener("abort",g));const{signal:h}=r;return h.unsubscribe=()=>ke.asap(x),h}},h1=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let r=0,m;for(;r<e;)m=r+t,yield n.slice(r,m),r=m},d1=async function*(n,t){for await(const e of p1(n))yield*h1(e,t)},p1=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()}},Ag=(n,t,e,r)=>{const m=d1(n,t);let g=0,y,x=h=>{y||(y=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:d,value:s}=await m.next();if(d){x(),h.close();return}let a=s.byteLength;if(e){let u=g+=a;e(u)}h.enqueue(new Uint8Array(s))}catch(d){throw x(d),d}},cancel(h){return x(h),m.return()}},{highWaterMark:2})},Sl=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",_g=Sl&&typeof ReadableStream=="function",g1=Sl&&(typeof TextEncoder=="function"?(n=>t=>n.encode(t))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),$g=(n,...t)=>{try{return!!n(...t)}catch{return!1}},f1=_g&&$g(()=>{let n=!1;const t=new Request(pr.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!t}),Mg=64*1024,du=_g&&$g(()=>ke.isReadableStream(new Response("").body)),Al={stream:du&&(n=>n.body)};Sl&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Al[t]&&(Al[t]=ke.isFunction(n[t])?e=>e[t]():(e,r)=>{throw new yt(`Response type '${t}' is not supported`,yt.ERR_NOT_SUPPORT,r)})})})(new Response);const m1=async n=>{if(n==null)return 0;if(ke.isBlob(n))return n.size;if(ke.isSpecCompliantForm(n))return(await new Request(pr.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(ke.isArrayBufferView(n)||ke.isArrayBuffer(n))return n.byteLength;if(ke.isURLSearchParams(n)&&(n=n+""),ke.isString(n))return(await g1(n)).byteLength},v1=async(n,t)=>ke.toFiniteNumber(n.getContentLength())??m1(t),y1=Sl&&(async n=>{let{url:t,method:e,data:r,signal:m,cancelToken:g,timeout:y,onDownloadProgress:x,onUploadProgress:h,responseType:d,headers:s,withCredentials:a="same-origin",fetchOptions:u}=Sg(n);d=d?(d+"").toLowerCase():"text";let l=u1([m,g&&g.toAbortSignal()],y),o;const c=l&&l.unsubscribe&&(()=>{l.unsubscribe()});let p;try{if(h&&f1&&e!=="get"&&e!=="head"&&(p=await v1(s,r))!==0){let k=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(ke.isFormData(r)&&(C=k.headers.get("content-type"))&&s.setContentType(C),k.body){const[R,O]=bg(p,kl(xg(h)));r=Ag(k.body,Mg,R,O)}}ke.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;o=new Request(t,{...u,signal:l,method:e.toUpperCase(),headers:s.normalize().toJSON(),body:r,duplex:"half",credentials:w?a:void 0});let b=await fetch(o,u);const L=du&&(d==="stream"||d==="response");if(du&&(x||L&&c)){const k={};["status","statusText","headers"].forEach(E=>{k[E]=b[E]});const C=ke.toFiniteNumber(b.headers.get("content-length")),[R,O]=x&&bg(C,kl(xg(x),!0))||[];b=new Response(Ag(b.body,Mg,R,()=>{O&&O(),c&&c()}),k)}d=d||"text";let M=await Al[ke.findKey(Al,d)||"text"](b,n);return!L&&c&&c(),await new Promise((k,C)=>{wg(k,C,{data:M,headers:Pr.from(b.headers),status:b.status,statusText:b.statusText,config:n,request:o})})}catch(w){throw c&&c(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new yt("Network Error",yt.ERR_NETWORK,n,o),{cause:w.cause||w}):yt.from(w,w&&w.code,n,o)}}),pu={http:Rx,xhr:c1,fetch:y1};ke.forEach(pu,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const Tg=n=>`- ${n}`,w1=n=>ke.isFunction(n)||n===null||n===!1,Ig={getAdapter:n=>{n=ke.isArray(n)?n:[n];const{length:t}=n;let e,r;const m={};for(let g=0;g<t;g++){e=n[g];let y;if(r=e,!w1(e)&&(r=pu[(y=String(e)).toLowerCase()],r===void 0))throw new yt(`Unknown adapter '${y}'`);if(r)break;m[y||"#"+g]=r}if(!r){const g=Object.entries(m).map(([x,h])=>`adapter ${x} `+(h===!1?"is not supported by the environment":"is not available in the build"));let y=t?g.length>1?`since :
|
1395
|
+
`+g.map(Tg).join(`
|
1396
|
+
`):" "+Tg(g[0]):"as no adapter specified";throw new yt("There is no suitable adapter to dispatch the request "+y,"ERR_NOT_SUPPORT")}return r},adapters:pu};function gu(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new zs(null,n)}function Lg(n){return gu(n),n.headers=Pr.from(n.headers),n.data=hu.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Ig.getAdapter(n.adapter||Sa.adapter)(n).then(function(t){return gu(n),t.data=hu.call(n,n.transformResponse,t),t.headers=Pr.from(t.headers),t},function(t){return yg(t)||(gu(n),t&&t.response&&(t.response.data=hu.call(n,n.transformResponse,t.response),t.response.headers=Pr.from(t.response.headers))),Promise.reject(t)})}const Eg="1.11.0",_l={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{_l[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const Rg={};_l.transitional=function(n,t,e){function r(m,g){return"[Axios v"+Eg+"] Transitional option '"+m+"'"+g+(e?". "+e:"")}return(m,g,y)=>{if(n===!1)throw new yt(r(g," has been removed"+(t?" in "+t:"")),yt.ERR_DEPRECATED);return t&&!Rg[g]&&(Rg[g]=!0,console.warn(r(g," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(m,g,y):!0}},_l.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function b1(n,t,e){if(typeof n!="object")throw new yt("options must be an object",yt.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let m=r.length;for(;m-- >0;){const g=r[m],y=t[g];if(y){const x=n[g],h=x===void 0||y(x,g,n);if(h!==!0)throw new yt("option "+g+" must be "+h,yt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new yt("Unknown option "+g,yt.ERR_BAD_OPTION)}}const $l={assertOptions:b1,validators:_l},Hi=$l.validators;let os=class{constructor(n){this.defaults=n||{},this.interceptors={request:new gg,response:new gg}}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 m=r.stack?r.stack.replace(/^.+\n/,""):"";try{e.stack?m&&!String(e.stack).endsWith(m.replace(/^.+\n.+\n/,""))&&(e.stack+=`
|
1397
|
+
`+m):e.stack=m}catch{}}throw e}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=is(this.defaults,t);const{transitional:e,paramsSerializer:r,headers:m}=t;e!==void 0&&$l.assertOptions(e,{silentJSONParsing:Hi.transitional(Hi.boolean),forcedJSONParsing:Hi.transitional(Hi.boolean),clarifyTimeoutError:Hi.transitional(Hi.boolean)},!1),r!=null&&(ke.isFunction(r)?t.paramsSerializer={serialize:r}:$l.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),$l.assertOptions(t,{baseUrl:Hi.spelling("baseURL"),withXsrfToken:Hi.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let g=m&&ke.merge(m.common,m[t.method]);m&&ke.forEach(["delete","get","head","post","put","patch","common"],l=>{delete m[l]}),t.headers=Pr.concat(g,m);const y=[];let x=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(t)===!1||(x=x&&l.synchronous,y.unshift(l.fulfilled,l.rejected))});const h=[];this.interceptors.response.forEach(function(l){h.push(l.fulfilled,l.rejected)});let d,s=0,a;if(!x){const l=[Lg.bind(this),void 0];for(l.unshift(...y),l.push(...h),a=l.length,d=Promise.resolve(t);s<a;)d=d.then(l[s++],l[s++]);return d}a=y.length;let u=t;for(s=0;s<a;){const l=y[s++],o=y[s++];try{u=l(u)}catch(c){o.call(this,c);break}}try{d=Lg.call(this,u)}catch(l){return Promise.reject(l)}for(s=0,a=h.length;s<a;)d=d.then(h[s++],h[s++]);return d}getUri(n){n=is(this.defaults,n);const t=Cg(n.baseURL,n.url,n.allowAbsoluteUrls);return pg(t,n.params,n.paramsSerializer)}};ke.forEach(["delete","get","head","options"],function(n){os.prototype[n]=function(t,e){return this.request(is(e||{},{method:n,url:t,data:(e||{}).data}))}}),ke.forEach(["post","put","patch"],function(n){function t(e){return function(r,m,g){return this.request(is(g||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:m}))}}os.prototype[n]=t(),os.prototype[n+"Form"]=t(!0)});let x1=class xb{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(m){e=m});const r=this;this.promise.then(m=>{if(!r._listeners)return;let g=r._listeners.length;for(;g-- >0;)r._listeners[g](m);r._listeners=null}),this.promise.then=m=>{let g;const y=new Promise(x=>{r.subscribe(x),g=x}).then(m);return y.cancel=function(){r.unsubscribe(g)},y},t(function(m,g,y){r.reason||(r.reason=new zs(m,g,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 xb(function(e){t=e}),cancel:t}}};function C1(n){return function(t){return n.apply(null,t)}}function k1(n){return ke.isObject(n)&&n.isAxiosError===!0}const fu={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(fu).forEach(([n,t])=>{fu[t]=n});function Og(n){const t=new os(n),e=Zp(os.prototype.request,t);return ke.extend(e,os.prototype,t,{allOwnKeys:!0}),ke.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Og(is(n,r))},e}const In=Og(Sa);In.Axios=os,In.CanceledError=zs,In.CancelToken=x1,In.isCancel=yg,In.VERSION=Eg,In.toFormData=xl,In.AxiosError=yt,In.Cancel=In.CanceledError,In.all=function(n){return Promise.all(n)},In.spread=C1,In.isAxiosError=k1,In.mergeConfig=is,In.AxiosHeaders=Pr,In.formToJSON=n=>mg(ke.isHTMLForm(n)?new FormData(n):n),In.getAdapter=Ig.getAdapter,In.HttpStatusCode=fu,In.default=In;const{Axios:V2,AxiosError:G2,CanceledError:K2,isCancel:q2,CancelToken:Y2,VERSION:X2,all:Q2,Cancel:Z2,isAxiosError:J2,spread:eN,toFormData:tN,AxiosHeaders:nN,HttpStatusCode:rN,formToJSON:iN,getAdapter:oN,mergeConfig:sN}=In,mu=In.create({baseURL:location.origin,timeout:6e4,params:{}});mu.interceptors.response.use(n=>n,n=>{var t,e,r,m,g,y,x,h,d,s,a;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 u=`HTTP ${n.response.status} - `;(t=n.response)!=null&&t.statusText&&(u+=`${n.response.statusText} `),(r=(e=n.response)==null?void 0:e.config)!=null&&r.data&&(u+=`${n.response.config.data} `),(g=(m=n.response)==null?void 0:m.data)!=null&&g.message?u+=`${n.response.data.message}`:(x=(y=n.response)==null?void 0:y.data)!=null&&x.exception?u+=`${n.response.data.exception}`:(s=(d=(h=n.response)==null?void 0:h.data)==null?void 0:d.error)!=null&&s.message?(n.response.data.error.class&&(u+=`${n.response.data.error.class} `),u+=`${n.response.data.error.message}`):u+=`${(a=n.response)==null?void 0:a.data}`;const{$cosmosNotify:l}=window;throw l&&l.serious({title:"Network error",body:u}),n}else throw n});const Ml=async function(n,t,{data:e,params:r={},headers:m,noAuth:g=!1,noScope:y=!1,onUploadProgress:x=!1}={}){if(!g){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}m.Authorization=localStorage.openc3Token}return m.manual=!0,!y&&!r.scope&&(r.scope=window.openc3Scope),mu({method:n,url:t,data:e,params:r,headers:m,onUploadProgress:x})},vu={Accept:"application/json"},Ng={...vu,"Content-Type":"application/json"},aN=dr("P",{get:function(n,{params:t,headers:e=vu,noScope:r,noAuth:m,onUploadProgress:g}={}){return Ml("get",n,{params:t,headers:e,noScope:r,noAuth:m,onUploadProgress:g})},put:function(n,{data:t,params:e,headers:r=Ng,noScope:m,noAuth:g,onUploadProgress:y}={}){return Ml("put",n,{data:t,params:e,headers:r,noScope:m,noAuth:g,onUploadProgress:y})},post:function(n,{data:t,params:e,headers:r=Ng,noScope:m,noAuth:g,onUploadProgress:y}={}){return Ml("post",n,{data:t,params:e,headers:r,noScope:m,noAuth:g,onUploadProgress:y})},delete:function(n,{params:t,headers:e=vu,noScope:r,noAuth:m,onUploadProgress:g}={}){return Ml("delete",n,{params:t,headers:e,noScope:r,noAuth:m,onUploadProgress:g})}});let Tl=()=>({emit(n,...t){for(let e=this.events[n]||[],r=0,m=e.length;r<m;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(m=>t!==m)}}});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 yu extends _a{constructor(t){super("Rejected",t),this.name="SubscriptionRejectedError"}}class S1 extends _a{constructor(t){super(t||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class _i extends _a{constructor(t,e){e?super(t,e):super("Disconnected",t),this.name="DisconnectedError"}}class A1 extends _i{constructor(t){super(t,"stale_connection"),this.name="StaleConnectionError"}}function Dg(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 _1{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:m})=>(e[r]=m,e),{})}}const ss=Symbol("state");class Fg{constructor(t={}){this.emitter=Tl(),this.params=Object.freeze(t),this.presence=new _1(this),this.initialConnect=!0,this[ss]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Dg({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ss]}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[ss]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ss]="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[ss]="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[ss]="disconnected",this.presence.reset(),this.emit("disconnect",t))}closed(t){this.state!=="closed"&&(this[ss]="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,(...m)=>{r(),e(...m)});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(m=>m()),t()})),r.push(this.on("close",m=>{r.forEach(g=>g()),e(m||new _a("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class $1{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(g=>{e=g}),intent:t,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),e(r)},canceled:!1,acquired:!1},m=this._pendingTop;return this._pendings.push(r),m&&await m.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 M1{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 T1{constructor(t){t.concurrentSubscribes===!1&&(this.glv=new M1),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(t){return this._subscriptions[t]}create(t,{subscribe:e,unsubscribe:r}){let m=this._subscriptions[t]=new $1(t);return m.remoteId=this._localToRemote[t],m.subscriber=e,m.unsubscriber=r,m.gvl=this.glv,m}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 I1{constructor(t={}){this.subscriptions=new T1(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 m=this._remoteToLocal[t];if(!m){this._pendingMessages.push([t,e,r]);return}let g=this.subscriptions.get(m);g&&g.channels.forEach(y=>{y.receive(e,r)})}notify(t,e,r){let m=this._remoteToLocal[t];if(!m)return;let g=this.subscriptions.get(m);g&&g.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 Pg={debug:0,info:1,warn:2,error:3};class Wg{constructor(t){this.level=t||"warn"}log(t,e,r){Pg[t]<Pg[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 $a extends Wg{writeLogEntry(){}}class L1{encode(t){return JSON.stringify(t)}decode(t){try{return JSON.parse(t)}catch{}}}let E1=0;class Bg{constructor(t={}){let{logger:e}=t;this.logger=e||new $a,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 m=Dg(r);if(this.pendingUnsubscriptions[m]){let y=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${y}`,m),new Promise(x=>{setTimeout(()=>{x(this.subscribe(t,e))},y)})}if(this.pendingSubscriptions[m])return this.logger.warn("subscription is already pending, skipping",m),Promise.reject(Error("Already subscribing"));let g=this.subscribeRetryInterval;return new Promise((y,x)=>{let h=++E1;this.pendingSubscriptions[m]={resolve:y,reject:x,id:h},this.cable.send(this.buildSubscribeRequest(m)),this.maybeRetrySubscribe(h,m,g)})}buildSubscribeRequest(t){return{command:"subscribe",identifier:t}}maybeRetrySubscribe(t,e,r){setTimeout(()=>{let m=this.pendingSubscriptions[e];m&&m.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 m=this.pendingSubscriptions[e];m&&m.id===t&&(delete this.pendingSubscriptions[e],m.reject(new S1(`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:m,reason:g,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 _i(g);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 yu)):this.logger.error("subscription not found",{type:e,identifier:r})}if(m)return{identifier:r,message:m};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 zg=()=>Date.now()/1e3|0;class R1 extends Bg{constructor(t={}){super(t),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=t.historyTimestamp,this.disableSessionRecovery=t.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=zg()),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:m}=t;if(e==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(t);if(e==="reject_subscription")return super.receive(t);if(e==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(t);if(e==="ping")return this.restoreSince&&(this.restoreSince=zg()),this.sendPongs&&this.sendPong(),this.cable.keepalive(t.message);if(this.cable.keepalive(),e==="confirm_history"){this.logger.debug("history result received",t),this.cable.notify("history_received",r);return}if(e==="reject_history"){this.logger.warn("failed to retrieve history",t),this.cable.notify("history_not_found",r);return}if(e==="welcome"){if(this.disableSessionRecovery||(this.sessionId=t.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),t.restored){let g=t.restored_ids||Object.keys(this.subscriptionStreams);for(let y of g)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(g)}return this.cable.connected(this.sessionId)}if(e==="presence"){let g=m.type;if(g==="info"){let y=this.pendingPresence[r];y&&(delete this.pendingPresence[r],y.resolve(m))}else if(g==="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:m}}if(m){let g=this.trackStreamPosition(r,t.stream_id,t.epoch,t.offset);return{identifier:r,message:m,meta:g}}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 m=this.presenceInfo[t];return m&&(e.presence=m),e}recoverableClosure(){return!!this.sessionId}historyRequestFor(t){let e={},r=!1;if(this.subscriptionStreams[t])for(let m of this.subscriptionStreams[t]){let g=this.streamsPositions[m];g&&(r=!0,e[m]=g)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:e}}trackStreamPosition(t,e,r,m){if(!(!e||!r))return this.subscriptionStreams[t]||(this.subscriptionStreams[t]=new Set),this.subscriptionStreams[t].add(e),this.streamsPositions[e]={epoch:r,offset:m},{stream:e,epoch:r,offset:m}}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,m)=>{this.pendingPresence[t]={resolve:r,reject:m},this.cable.send({command:"presence",identifier:t,data:e})})}}class O1 extends _a{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class wu extends Fg{constructor(t,e){super(e),this.channelId=t}set channelId(t){this._channelId=t}get channelId(){return this._channelId}}ml(wu,"identifier","__ghost__");const N1="$pubsub";class bu extends Fg{async perform(t,e){if(t.startsWith("$"))return super.perform(t,e);throw Error("not implemented")}}ml(bu,"identifier",N1);const as=Symbol("state");let D1=class{constructor({transport:n,protocol:t,encoder:e,logger:r,lazy:m,hubOptions:g,performFailures:y,transportConfigurator:x}){this.emitter=Tl(),this.transport=n,this.encoder=e,this.logger=r||new $a,this.protocol=t,this.performFailures=y||"throw",this.protocol.attached(this),this.hub=new I1(g||{}),this[as]="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,m===!1&&this.connect().catch(()=>{})}get state(){return this[as]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let n=this.state==="idle";this[as]="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[as]="connected",this.recovering&&this.hub.subscriptions.all().forEach(t=>t.notify("disconnected",new _i("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[as]="connected",this.hub.subscriptions.all().forEach(r=>{n&&r.remoteId&&n.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new _i("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 _i(n,"transport_closed"))}disconnected(n){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:n}),this[as]="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 _i?n:new _i(n,void 0)),this.logger.info("closed",{reason:n||"user"}),this[as]="closed";let e=t||new _i("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:m,message:g,meta:y}=e;r?this.hub.notify(m,r,g):this.hub.transmit(m,g,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 bu({stream_name:n});return this.subscribe(t)}streamFromSigned(n){let t=new bu({signed_stream_name:n});return this.subscribe(t)}subscribeTo(n,t){let e,r;return typeof n=="string"&&(r=n,n=wu),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 m=await n.acquire("subscribed");if(m.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),m.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),n.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),m.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),m.release();return}if(n.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),n.notify("connected"),m.release();return}let g={identifier:t,params:e};this.logger.debug("subscribing",g);try{let y=await this.protocol.subscribe(t,e);this.hub.subscribe(r,y),this.logger.debug("subscribed",{...g,remoteId:y}),n.notify("connected")}catch(y){if(y){if(y instanceof yu&&this.logger.warn("rejected",g),y instanceof _i){this.logger.debug("disconnected during subscription; will retry on connect",g),m.release();return}this.logger.error("failed to subscribe",{error:y,...g})}n.close(y),this.hub.unsubscribe(r)}m.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(m){m&&(m instanceof _i?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:t,error:m}):this.logger.error("unsubscribe failed",{id:t,error:m}))}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 O1;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 m=r.remoteId,g={id:m,action:t,payload:e};this.logger.debug("perform",g);try{let y=await this.protocol.perform(m,t,e);return y&&this.logger.debug("perform result",{message:y,request:g}),y}catch(y){throw this.logger.error("perform failed",{error:y,request:g}),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(m=>m()),t(r)})),e.push(this.on("disconnect",r=>{e.forEach(m=>m()),t(r)}))}),this._pendingConnect)}};const F1={maxMissingPings:2,maxReconnectAttempts:1/0},js=()=>Date.now(),jg=(n,t)=>{t=t||{};let{backoffRate:e,jitterRatio:r,maxInterval:m}=t;return e=e||2,r===void 0&&(r=.5),g=>{let y=n*e**g,x=y*e,h=y+(x-y)*Math.random(),d=2*(Math.random()-.5)*r;return h=h*(1+d),m&&m<h&&(h=m),h}};let Hg=class{constructor({pingInterval:n,...t}){if(this.pingInterval=n,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${n}`);if(t=Object.assign({},F1,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 $a,this.state="pending_connect",this.attempts=0,this.disconnectedAt=js()}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=js(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=js(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=js(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=js()})),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=js()-this.pingedAt;n>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${n}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new A1))}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 P1{constructor(t,e={}){this.transports=t,this.transport=null,this.emitter=Tl(),this.unbind=[],this.logger=e.logger||new $a}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,(...m)=>{r(),e(...m)});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 W1{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=Tl();let{format:m,subprotocol:g,authStrategy:y}=e;this.format=m||"text",this.connectionOptions=e.websocketOptions,this.authStrategy=y||"param",this.authProtocol="",this.subprotocol=g}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 m=[];m.push(this.once("open",()=>{m.forEach(g=>g()),e()})),m.push(this.once("close",()=>{m.forEach(g=>g()),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 m=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(m)}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(m=>m.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,(...m)=>{r(),e(...m)});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 Ug={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function B1(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({},Ug,t);let{protocol:e,websocketImplementation:r,websocketFormat:m,websocketOptions:g,websocketAuthStrategy:y,fallbacks:x,logLevel:h,logger:d,transport:s,encoder:a,lazy:u,monitor:l,pingInterval:o,reconnectStrategy:c,maxMissingPings:p,maxReconnectAttempts:w,subprotocol:b,tokenRefresher:L,historyTimestamp:M,protocolOptions:k,concurrentSubscribes:C,performFailures:R,transportConfigurator:O,auth:E}=t;if(d=d||new $a(h),typeof e=="string"){b=b||e;let P=e.substring(0,e.lastIndexOf("-")),N=e.substring(e.lastIndexOf("-")+1);if(k=k||{},P==="actioncable-v1")e=new Bg({logger:d,...k});else if(P==="actioncable-v1-ext")e=new R1({logger:d,historyTimestamp:M,...k});else throw Error(`Protocol is not supported yet: ${e}`);if(N==="json")a=a||new L1,m=m||"text";else if(N==="msgpack"){if(m="binary",!a)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(N==="protobuf"){if(m=m||"binary",!a)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${e}`)}if(!e)throw Error("Protocol must be specified");s=s||new W1(n,{websocketImplementation:r,websocketOptions:g,subprotocol:b,authStrategy:y,format:m}),x&&(s=new P1([s,...x],{logger:d})),E&&E.token&&s.setToken(E.token,E.param||"jid"),c=c||jg(o),l!==!1&&(l=l||new Hg({pingInterval:o,reconnectStrategy:c,maxMissingPings:p,maxReconnectAttempts:w,logger:d}));let I={concurrentSubscribes:C},z=new D1({protocol:e,transport:s,encoder:a,logger:d,lazy:u,hubOptions:I,performFailures:R,transportConfigurator:O});return l&&(l.watch(z),z.monitor=l),L&&z1(z,async()=>{try{await L(s)}catch(P){return d.error("Failed to refresh authentication token: "+P),!1}return z.connect().catch(()=>{}),!0}),z}function z1(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 j1{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 H1 extends wu{constructor(t,e,r){super(t,e),this.subscription=new j1(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:m})=>this.subscription.notify("connected",{reconnected:m})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",m=>this.subscription.notify("received",m)),this.on("close",m=>{m&&m instanceof yu?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class U1{constructor(t){this.cable=t}create(t,e){let r,m;typeof t=="object"?(r=t.channel,delete t.channel,m=t):(r=t,m={});let g=new H1(r,m,e);return g.subscription.notify("initialized"),this.cable.subscribe(g),g.subscription}findAll(t){return this.cable.hub.channels.filter(e=>e.identifier===t).map(e=>e.subscription)}}class V1{constructor(t){this.cable=t,this.subscriptions=new U1(t)}}class G1 extends Wg{writeLogEntry(t,e,r){r?console[t](e,r):console[t](e)}}class K1 extends Hg{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=m=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:m})},r=()=>this.disconnect(new _i("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 q1=["cable","action-cable"],Y1="/cable",Il=(n,t)=>{for(let e of q1){let r=n.head.querySelector(`meta[name='${e}-${t}']`);if(r)return r.getAttribute("content")}},Vg=n=>n.match(/wss?:\/\//)?n:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${n}`:n,X1=()=>{if(typeof document<"u"&&document.head){let n=Il(document,"url");if(n)return Vg(n)}return Vg(Y1)},Q1=()=>{if(typeof document<"u"&&document.head){let n=Il(document,"history-timestamp");if(n)return n|0}},Z1=()=>{if(typeof document<"u"&&document.head)return Il(document,"token")},J1=()=>{if(typeof document<"u"&&document.head)return Il(document,"token-param")};function eC(n,t){typeof n=="object"&&typeof t>"u"&&(t=n,n=void 0),n=n||X1(),t=t||{},t.historyTimestamp||(t.historyTimestamp=Q1());let e=Z1();if(e){let d=J1();t.auth=Object.assign({token:e,param:d},t.auth||{})}t=Object.assign({},Ug,t);let{logLevel:r,logger:m,pingInterval:g,reconnectStrategy:y,maxMissingPings:x,maxReconnectAttempts:h}=t;return m=t.logger=t.logger||new G1(r),y=t.reconnectStrategy=t.reconnectStrategy||jg(g),t.monitor!==!1&&(t.monitor=t.monitor||new K1({pingInterval:g,reconnectStrategy:y,maxMissingPings:x,maxReconnectAttempts:h,logger:m})),B1(n,t)}function tC(n,t){let e=eC(n,t);return new V1(e)}class Gg{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={},m={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(g=>{if(g&&OpenC3Auth.setTokens(),this._cable==null){let y=this._url+"?scope="+encodeURIComponent(e)+"&authorization="+encodeURIComponent(localStorage.openc3Token);y=new URL(y,document.baseURI).href,this._cable=tC(y)}return this._cable.subscriptions.create({channel:t,...m},r)})}recordPing(){}}dr("W",Gg);class nC{constructor(t,e,r="",m=""){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=m}}dr("S",nC);function Ma(n){return rC.test(n)}const rC=/^-?[0-9]+$/;function Kg(n){return iC.test(n)}const iC=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function qg(n,t){if(Ma(n))return Number.isSafeInteger(Number.parseInt(n,10));const e=Number.parseFloat(n),r=String(e);if(n===r)return!0;const m=Yg(n),g=Yg(r);return!!(m===g||(t==null?void 0:t.approx)===!0&&!Ma(n)&&g.length>=14&&m.startsWith(g.substring(0,14)))}let Ta=(function(n){return n.underflow="underflow",n.overflow="overflow",n.truncate_integer="truncate_integer",n.truncate_float="truncate_float",n})({});function oC(n){if(qg(n,{approx:!1}))return;if(Ma(n))return Ta.truncate_integer;const t=Number.parseFloat(n);return Number.isFinite(t)?t===0?Ta.underflow:Ta.truncate_float:Ta.overflow}function Yg(n){const{start:t,end:e}=sC(n),r=n.substring(t,e),m=r.indexOf(".");return m===-1?r:r.substring(0,m)+r.substring(m+1)}function sC(n){let t=0;for(n[0]==="-"&&t++;n[t]==="0"||n[t]===".";)t++;let e=n.lastIndexOf("e");for(e===-1&&(e=n.lastIndexOf("E")),e===-1&&(e=n.length);(n[e-1]==="0"||n[e-1]===".")&&e>t;)e--;return{start:t,end:e}}class aC{constructor(t){if(ml(this,"isLosslessNumber",!0),!Kg(t))throw new Error(`Invalid number (value: "${t}")`);this.value=t}valueOf(){const t=oC(this.value);if(t===void 0||t===Ta.truncate_float)return Number.parseFloat(this.value);if(Ma(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 lC(n){return n&&typeof n=="object"&&n.isLosslessNumber||!1}function cC(n){return new aC(n)}function uC(n,t){return xu({"":n},"",n,t)}function xu(n,t,e,r){return Array.isArray(e)?r.call(n,t,dC(e,r)):e&&typeof e=="object"&&!lC(e)?r.call(n,t,hC(e,r)):r.call(n,t,e)}function hC(n,t){for(const e of Object.keys(n)){const r=xu(n,e,n[e],t);r!==void 0?n[e]=r:delete n[e]}return n}function dC(n,t){for(let e=0;e<n.length;e++)n[e]=xu(n,String(e),n[e],t);return n}function pC(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:cC,r=0;const m=x();return o(m),p(),t?uC(m,t):m;function g(){if(n.charCodeAt(r)===wC){r++,d();const _={};let S=!0;for(;r<n.length&&n.charCodeAt(r)!==Qg;){S?S=!1:(u(),d());const D=r,j=s();if(j===void 0){L();return}d(),l();const U=x();if(U===void 0){E();return}Object.prototype.hasOwnProperty.call(_,j)&&!Cu(U,_[j])&&M(j,D+1),_[j]=U}return n.charCodeAt(r)!==Qg&&k(),r++,_}}function y(){if(n.charCodeAt(r)===bC){r++,d();const _=[];let S=!0;for(;r<n.length&&n.charCodeAt(r)!==Zg;){S?S=!1:u();const D=x();c(D),_.push(D)}return n.charCodeAt(r)!==Zg&&C(),r++,_}}function x(){d();const _=s()??a()??g()??y()??h("true",!0)??h("false",!1)??h("null",null);return d(),_}function h(_,S){if(n.slice(r,r+_.length)===_)return r+=_.length,S}function d(){for(;gC(n.charCodeAt(r));)r++}function s(){if(n.charCodeAt(r)===ku){r++;let _="";for(;r<n.length&&n.charCodeAt(r)!==ku;){if(n.charCodeAt(r)===yC){const S=n[r+1],D=vC[S];D!==void 0?(_+=D,r++):S==="u"?Ll(n.charCodeAt(r+2))&&Ll(n.charCodeAt(r+3))&&Ll(n.charCodeAt(r+4))&&Ll(n.charCodeAt(r+5))?(_+=String.fromCharCode(Number.parseInt(n.slice(r+2,r+6),16)),r+=5):I(r):O(r)}else mC(n.charCodeAt(r))?_+=n[r]:R(n[r]);r++}return b(),r++,_}}function a(){const _=r;if(n.charCodeAt(r)===Jg&&(r++,w(_)),n.charCodeAt(r)===Su)r++;else if(fC(n.charCodeAt(r)))for(r++;El(n.charCodeAt(r));)r++;if(n.charCodeAt(r)===MC)for(r++,w(_);El(n.charCodeAt(r));)r++;if(n.charCodeAt(r)===RC||n.charCodeAt(r)===EC)for(r++,(n.charCodeAt(r)===Jg||n.charCodeAt(r)===AC)&&r++,w(_);El(n.charCodeAt(r));)r++;if(r>_)return e(n.slice(_,r))}function u(){if(n.charCodeAt(r)!==$C)throw new SyntaxError(`Comma ',' expected after value ${N()}`);r++}function l(){if(n.charCodeAt(r)!==TC)throw new SyntaxError(`Colon ':' expected after property name ${N()}`);r++}function o(_){if(_===void 0)throw new SyntaxError(`JSON value expected ${N()}`)}function c(_){if(_===void 0)throw new SyntaxError(`Array item expected ${N()}`)}function p(){if(r<n.length)throw new SyntaxError(`Expected end of input ${N()}`)}function w(_){if(!El(n.charCodeAt(r))){const S=n.slice(_,r);throw new SyntaxError(`Invalid number '${S}', expecting a digit ${N()}`)}}function b(){if(n.charCodeAt(r)!==ku)throw new SyntaxError(`End of string '"' expected ${N()}`)}function L(){throw new SyntaxError(`Quoted object key expected ${N()}`)}function M(_,S){throw new SyntaxError(`Duplicate key '${_}' encountered at position ${S}`)}function k(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${N()}`)}function C(){throw new SyntaxError(`Array item or end of array ']' expected ${N()}`)}function R(_){throw new SyntaxError(`Invalid character '${_}' ${z()}`)}function O(_){const S=n.slice(_,_+2);throw new SyntaxError(`Invalid escape character '${S}' ${z()}`)}function E(){throw new SyntaxError(`Object value expected after ':' ${z()}`)}function I(_){const S=n.slice(_,_+6);throw new SyntaxError(`Invalid unicode character '${S}' ${z()}`)}function z(){return`at position ${r}`}function P(){return r<n.length?`but got '${n[r]}'`:"but reached end of input"}function N(){return`${P()} ${z()}`}}function gC(n){return n===xC||n===CC||n===kC||n===SC}function Ll(n){return n>=Su&&n<=Au||n>=IC&&n<=OC||n>=LC&&n<=NC}function El(n){return n>=Su&&n<=Au}function fC(n){return n>=_C&&n<=Au}function mC(n){return n>=32&&n<=1114111}function Cu(n,t){return n===t?!0:Array.isArray(n)&&Array.isArray(t)?n.length===t.length&&n.every((e,r)=>Cu(e,t[r])):Xg(n)&&Xg(t)?[...new Set([...Object.keys(n),...Object.keys(t)])].every(e=>Cu(n[e],t[e])):!1}function Xg(n){return typeof n=="object"&&n!==null}const vC={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
1398
|
+
`,r:"\r",t:" "},yC=92,wC=123,Qg=125,bC=91,Zg=93,xC=32,CC=10,kC=9,SC=13,ku=34,AC=43,Jg=45,Su=48,_C=49,Au=57,$C=44,MC=46,TC=58,IC=65,LC=97,EC=69,RC=101,OC=70,NC=102;function ef(n,t,e,r){return m(n);function m(h,d){if(Array.isArray(r)){const s=r.find(a=>a.test(h));if(s){const a=s.stringify(h);if(typeof a!="string"||!Kg(a))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${a})`);return a}}if(typeof h=="boolean"||typeof h=="number"||typeof h=="string"||h===null||h instanceof Date||h instanceof Boolean||h instanceof Number||h instanceof String)return JSON.stringify(h);if(h!=null&&h.isLosslessNumber||typeof h=="bigint")return h.toString();if(Array.isArray(h))return g(h);if(h&&typeof h=="object")return y(h)}function g(h,d){if(h.length===0)return"[]";let s="[";for(let a=0;a<h.length;a++){const u=h[a];typeof u<"u"&&typeof u!="function"?s+=m(u):s+="null",a<h.length-1&&(s+=",")}return s+="]",s}function y(h,d){if(typeof h.toJSON=="function")return ef(h.toJSON(),t,e,void 0);const s=Array.isArray(t)?t.map(String):Object.keys(h);if(s.length===0)return"{}";let a=!0,u="{";for(const l of s){const o=h[l];if(x(l,o)){a?a=!1:u+=",";const c=JSON.stringify(l);u+=`${c}:`,u+=m(o)}}return u+="}",u}function x(h,d){return typeof d<"u"&&typeof d!="function"&&typeof d!="symbol"}}function DC(n){return Ma(n)&&!qg(n)?BigInt(n):parseFloat(n)}class FC{constructor(){ml(this,"id",1)}async exec(t,e,r={},m={},g=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,m.manual=!0,(await mu.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",...m},timeout:g,transformRequest:[(y,x)=>ef(y)],transformResponse:[y=>pC(y,void 0,DC)]})).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=y,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,m=30){const g=await this.exec("get_tlm_packet",[t,e],{type:r,stale_time:m});if(g!=null){let y=g.length,x=null;for(let h=0;h<y;h++)x=this.decode_openc3_type(g[h][1]),x!==null&&(g[h][1]=x)}return g}get_packet_derived_items(t,e){return this.exec("get_packet_derived_items",[t,e])}get_tlm_buffer(t,e){return this.exec("get_tlm_buffer",[t,e])}get_tlm_available(t){return this.exec("get_tlm_available",[t])}async get_tlm_values(t,e=30,r=null,m=null,g=null){let y={stale_time:e};r!==null&&(y.cache_timeout=r),m!==null&&(y.start_time=m.toISOString()),g!==null&&(y.end_time=g.toISOString());const x=await this.exec("get_tlm_values",[t],y,{},1e4);if(x&&x.length>0){let h=x[0].length,d=null;for(let s=0;s<h;s++)d=this.decode_openc3_type(x[0][s]),d!==null&&(x[0][s]=d)}return x}get_limits(t,e,r){return this.exec("get_limits",[t,e,r])}async tlm(t,e,r,m="CONVERTED"){let g=null;if(e===void 0)g=await this.exec("tlm",[t]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(e))g=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 g=await this.exec("tlm",[t,e,r],{type:m});let y=this.decode_openc3_type(g);return y!==null&&(g=y),g}async inject_tlm(t,e,r=null,m="CONVERTED"){await this.exec("inject_tlm",[t,e,r],{type:m})}set_tlm(t,e,r,m){return this.exec("set_tlm",[t,e,r],{type:m})}override_tlm(t,e,r,m){return this.exec("override_tlm",[t,e,r],{type:m})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(t,e,r,m){return this.exec("normalize_tlm",[t,e,r],{type:m})}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,m="CONVERTED"){return this.exec("get_cmd_value",[t,e,r,m])}get_cmd_buffer(t,e){return this.exec("get_cmd_buffer",[t,e])}_cmd(t,e,r,m,g,y={}){let x=null;for(let h in m)Object.prototype.hasOwnProperty.call(m,h)&&(x=this.encode_openc3_type(m[h]),x!==null&&(m[h]=x));return this.exec(t,[e,r,m],y,g)}get_cmd_hazardous(t,e,r,m={}){return e===void 0?this.exec("get_cmd_hazardous",t,{},m):this._cmd("get_cmd_hazardous",t,e,r,m)}cmd(t,e,r,m={},g={}){return e===void 0?this.exec("cmd",t,{},m):this._cmd("cmd",t,e,r,m,g)}cmd_no_range_check(t,e,r,m={},g={}){return e===void 0?this.exec("cmd_no_range_check",t,{},m,g):this._cmd("cmd_no_range_check",t,e,r,m,g)}cmd_raw(t,e,r,m={},g={}){return e===void 0?this.exec("cmd_raw",t,{},m,g):this._cmd("cmd_raw",t,e,r,m,g)}cmd_raw_no_range_check(t,e,r,m={},g={}){return e===void 0?this.exec("cmd_raw_no_range_check",t,{},m,g):this._cmd("cmd_raw_no_range_check",t,e,r,m,g)}cmd_no_hazardous_check(t,e,r,m={},g={}){return e===void 0?this.exec("cmd_no_hazardous_check",t,{},m,g):this._cmd("cmd_no_hazardous_check",t,e,r,m,g)}cmd_no_checks(t,e,r,m={},g={}){return e===void 0?this.exec("cmd_no_checks",t,{},m,g):this._cmd("cmd_no_checks",t,e,r,m,g)}cmd_raw_no_hazardous_check(t,e,r,m={},g={}){return e===void 0?this.exec("cmd_raw_no_hazardous_check",t,{},m,g):this._cmd("cmd_raw_no_hazardous_check",t,e,r,m,g)}cmd_raw_no_checks(t,e,r,m={},g={}){return e===void 0?this.exec("cmd_raw_no_checks",t,{},m,g):this._cmd("cmd_raw_no_checks",t,e,r,m,g)}build_cmd(t,e,r,m={},g={}){return e===void 0?this.exec("build_cmd",t):this._cmd("build_cmd",t,e,r,m,g)}build_command(t,e,r,m={},g={}){return e===void 0?this.exec("build_cmd",t):this._cmd("build_cmd",t,e,r,m,g)}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,e){return this.exec("get_setting",[t],e)}get_settings(t,e){return this.exec("get_settings",t,e)}set_setting(t,e){return this.exec("set_setting",[t,e])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(t,e){return this.exec("set_setting",[t,e])}get_metrics(){return this.exec("get_metrics",[])}async hashString(t){if(window.isSecureContext){const e=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",e),m=new Uint8Array(r);return Array.from(m).map(g=>g.toString(16).padStart(2,"0")).join("")}}}dr("H",FC);var tf={exports:{}},nf;function PC(){return nf||(nf=1,(function(n,t){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,r,m){function g(d,s){function a(E,I,z){if(!(E.length<I)){var P=E.slice(0,I),N=E.slice(I),_=/^(?:(\s+)|(\S+)(\s+))/.exec(N),S=/(?:(\s+)|(\s+)(\S+))$/.exec(P),D=0,j=0;if(S&&!S[2]&&(D=I-S[1].length,j=I),_&&!_[2]&&(D||(D=I),j=I+_[1].length),D)return{start:D,end:j};if(S&&S[2]&&S.index>z)return{start:S.index,end:S.index+S[2].length};if(_&&_[2])return D=I+_[2].length,{start:D,end:D+_[3].length}}}for(var u=s.column||d.getOption("printMarginColumn"),l=s.allowMerge!=0,o=Math.min(s.startRow,s.endRow),c=Math.max(s.startRow,s.endRow),p=d.session;o<=c;){var w=p.getLine(o);if(w.length>u){var b=a(w,u,5);if(b){var L=/^\s*/.exec(w)[0];p.replace(new x(o,b.start,o,b.end),`
|
1399
|
+
`+L)}c++}else if(l&&/\S/.test(w)&&o!=c){var M=p.getLine(o+1);if(M&&/\S/.test(M)){var k=w.replace(/\s+$/,""),C=M.replace(/^\s+/,""),R=k+" "+C,b=a(R,u,5);if(b&&b.start>k.length||R.length<u){var O=new x(o,k.length,o+1,M.length-C.length);p.replace(O," "),o--,c--}else k.length<w.length&&p.remove(new x(o,k.length,o,w.length))}}o++}}function y(d){if(d.command.name=="insertstring"&&/\S/.test(d.args)){var s=d.editor,a=s.selection.cursor;if(a.column<=s.renderer.$printMarginColumn)return;var u=s.session.$undoManager.$lastDelta;g(s,{startRow:a.row,endRow:a.row,allowMerge:!1}),u!=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(d){d?this.commands.on("afterExec",y):this.commands.off("afterExec",y)},value:!1}}),r.hardWrap=g}),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,m){function g(v){return{row:v.line,column:v.ch}}function y(v){return new Oe(v.row,v.column)}function x(v,$,A){if($.line===A.line&&$.ch>=A.ch-1){var F=v.getLine($.line),W=F.charCodeAt($.ch);55296<=W&&W<=55551&&(A.ch+=1)}return{start:$,end:A}}function h(v){v.setOption("disableInput",!0),v.setOption("showCursorWhenSelecting",!1),Fe.signal(v,"vim-mode-change",{mode:"normal"}),v.on("cursorActivity",Bo),R(v),Fe.on(v.getInputField(),"paste",s(v))}function d(v){v.setOption("disableInput",!1),v.off("cursorActivity",Bo),Fe.off(v.getInputField(),"paste",s(v)),v.state.vim=null,ir&&clearTimeout(ir)}function s(v){var $=v.state.vim;return $.onPasteFn||($.onPasteFn=function(){$.insertMode||(v.setCursor(fe(v.getCursor(),0,1)),$n.enterInsertMode(v,{},$))}),$.onPasteFn}function a(v,$){return $>=v.firstLine()&&$<=v.lastLine()}function u(v){return/^[a-z]$/.test(v)}function l(v){return"()[]{}".indexOf(v)!=-1}function o(v){return ca.test(v)}function c(v){return Vt.test(v)}function p(v){return/^\s*$/.test(v)}function w(v){return".?!".indexOf(v)!=-1}function b(v,$){for(var A=0;A<$.length;A++)if($[A]==v)return!0;return!1}function L(v,$,A,F,W){if($===void 0&&!W)throw Error("defaultValue is required unless callback is provided");if(A||(A="string"),Et[v]={type:A,defaultValue:$,callback:W},F)for(var B=0;B<F.length;B++)Et[F[B]]=Et[v];$&&M(v,$)}function M(v,$,A,F){var W=Et[v];F=F||{};var B=F.scope;if(!W)return new Error("Unknown option: "+v);if(W.type=="boolean"){if($&&$!==!0)return new Error("Invalid argument: "+v+"="+$);$!==!1&&($=!0)}W.callback?(B!=="local"&&W.callback($,void 0),B!=="global"&&A&&W.callback($,A)):(B!=="local"&&(W.value=W.type=="boolean"?!!$:$),B!=="global"&&A&&(A.state.vim.options[v]={value:$}))}function k(v,$,A){var F=Et[v];A=A||{};var W=A.scope;if(!F)return new Error("Unknown option: "+v);if(F.callback){var B=$&&F.callback(void 0,$);return W!=="global"&&B!==void 0?B:W!=="local"?F.callback():void 0}var B=W!=="global"&&$&&$.state.vim.options[v];return(B||W!=="local"&&F||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=An()}function R(v){return v.state.vim||(v.state.vim={inputState:new _,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),v.state.vim}function O(){We={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:mi(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new q({}),searchHistoryController:new Z,exCommandHistoryController:new Z};for(var v in Et){var $=Et[v];$.value=$.defaultValue}}function E(v){function $(Y){typeof Y=="string"?un.value=Y:un=null}if(v[0]=="<"){var A=v.toLowerCase().slice(1,-1),F=A.split("-");if(A=F.pop()||"",A=="lt")v="<";else if(A=="space")v=" ";else if(A=="cr")v=`
|
1400
|
+
`;else if(vi[A]){var W=un.value,B={key:vi[A],target:{value:W,selectionEnd:W.length,selectionStart:W.length}};un.onKeyDown&&un.onKeyDown(B,un.value,$),un&&un.onKeyUp&&un.onKeyUp(B,un.value,$);return}}if(v==`
|
1401
|
+
`){var G=un;un=null,G.onClose&&G.onClose(G.value)}else un.value=(un.value||"")+v}function I(v,$,A){var F=Jt;if(A){if(Ir.indexOf(A)!=-1)return;Ir.push(A),Jt=A.noremap!=0}try{for(var W=R(v),B=/<(?:[CSMA]-)*\w+>|./gi,G;G=B.exec($);){var Y=G[0],Q=W.insertMode;if(un){E(Y);continue}var re=dt.handleKey(v,Y,"mapping");if(!re&&Q&&W.insertMode){if(Y[0]=="<"){var se=Y.toLowerCase().slice(1,-1),ye=se.split("-");if(se=ye.pop()||"",se=="lt")Y="<";else if(se=="space")Y=" ";else if(se=="cr")Y=`
|
1402
|
+
`;else{if(vi.hasOwnProperty(se)){Y=vi[se],jo(v,Y);continue}Y=Y[0],B.lastIndex=G.index+1}}v.replaceSelection(Y)}}}finally{if(Ir.pop(),Jt=Ir.length?F:!1,!Ir.length&&un){var Ce=un;un=null,wr(v,Ce)}}}function z(v,$){var A=v.key;if(!Lr[A]){A.length>1&&A[0]=="n"&&(A=A.replace("Numpad","")),A=Un[A]||A;var F="";if(v.ctrlKey&&(F+="C-"),v.altKey&&(F+="A-"),v.metaKey&&(F+="M-"),Fe.isMac&&v.altKey&&!v.metaKey&&!v.ctrlKey&&(F=F.slice(2)),(F||A.length>1)&&v.shiftKey&&(F+="S-"),$&&!$.expectLiteralNext&&A.length==1){if(Dn.keymap&&A in Dn.keymap)(Dn.remapCtrl!=0||!F)&&(A=Dn.keymap[A]);else if(A.charCodeAt(0)>255){var W=v.code&&v.code.slice(-1)||"";v.shiftKey||(W=W.toLowerCase()),W&&(A=W)}}return F+=A,F.length>1&&(F="<"+F+">"),F}}function P(v,$){Dn.string!==v&&(Dn=N(v)),Dn.remapCtrl=$}function N(v){function $(F){return F.split(/\\?(.)/).filter(Boolean)}var A={};return v?(v.split(/((?:[^\\,]|\\.)+),/).map(function(F){if(F){var W=F.split(/((?:[^\\;]|\\.)+);/);if(W.length==3){var B=$(W[1]),G=$(W[2]);if(B.length!==G.length)return;for(var Y=0;Y<B.length;++Y)A[B[Y]]=G[Y]}else if(W.length==1){var Q=$(F);if(Q.length%2!==0)return;for(var Y=0;Y<Q.length;Y+=2)A[Q[Y]]=Q[Y+1]}}}),{keymap:A,string:v}):{keymap:A,string:""}}function _(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}function S(v,$){v.state.vim.inputState=new _,v.state.vim.expectLiteralNext=!1,Fe.signal(v,"vim-command-done",$)}function D(){this.removed=[],this.inserted=""}function j(v,$,A){this.clear(),this.keyBuffer=[v||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!$,this.blockwise=!!A}function U(v,$){var A=We.registerController.registers;if(!v||v.length!=1)throw Error("Register name must be 1 character");A[v]=$,Ut.push(v)}function q(v){this.registers=v,this.unnamedRegister=v['"']=new j,v["."]=new j,v[":"]=new j,v["/"]=new j,v["+"]=new j}function Z(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function te(v,$){Hr[v]=$}function he(v,$){for(var A=[],F=0;F<$;F++)A.push(v);return A}function ne(v,$){Go[v]=$}function le(v,$){$n[v]=$}function ue(v,$,A){var F=v.state.vim,W=F.insertMode||F.visualMode,B=Math.min(Math.max(v.firstLine(),$.line),v.lastLine()),G=v.getLine(B),Y=G.length-1+ +!!W,Q=Math.min(Math.max(0,$.ch),Y),re=G.charCodeAt(Q);if(56320<=re&&re<=57343){var se=1;A&&A.line==B&&A.ch>Q&&(se=-1),Q+=se,Q>Y&&(Q-=2)}return new Oe(B,Q)}function ce(v){var $={};for(var A in v)v.hasOwnProperty(A)&&($[A]=v[A]);return $}function fe(v,$,A){return typeof $=="object"&&(A=$.ch,$=$.line),new Oe(v.line+$,v.ch+A)}function _e(v,$,A,F){F.operator&&(A="operatorPending");for(var W,B=[],G=[],Y=Jt?$.length-vo:0,Q=Y;Q<$.length;Q++){var re=$[Q];A=="insert"&&re.context!="insert"||re.context&&re.context!=A||F.operator&&re.type=="action"||!(W=$e(v,re.keys))||(W=="partial"&&B.push(re),W=="full"&&G.push(re))}return{partial:B.length&&B,full:G.length&&G}}function $e(v,$){var A=$.slice(-11)=="<character>",F=$.slice(-10)=="<register>";if(A||F){var W=$.length-(A?11:10),B=v.slice(0,W),G=$.slice(0,W);return B==G&&v.length>W?"full":G.indexOf(B)==0?"partial":!1}return v==$?"full":$.indexOf(v)==0?"partial":!1}function Te(v){var $=/^.*(<[^>]+>)$/.exec(v),A=$?$[1]:v.slice(-1);if(A.length>1)switch(A){case"<CR>":A=`
|
1403
|
+
`;break;case"<Space>":A=" ";break;default:A=""}return A}function qe(v,$,A){return function(){for(var F=0;F<A;F++)$(v)}}function Ve(v){return new Oe(v.line,v.ch)}function lt(v,$){return v.ch==$.ch&&v.line==$.line}function tt(v,$){return v.line<$.line?!0:v.line==$.line&&v.ch<$.ch}function ht(v,$){return arguments.length>2&&($=ht.apply(void 0,Array.prototype.slice.call(arguments,1))),tt(v,$)?v:$}function Xt(v,$){return arguments.length>2&&($=Xt.apply(void 0,Array.prototype.slice.call(arguments,1))),tt(v,$)?$:v}function Rn(v,$,A){var F=tt(v,$),W=tt($,A);return F&&W}function Kt(v,$){return v.getLine($).length}function Zr(v){return v.trim?v.trim():v.replace(/^\s+|\s+$/g,"")}function vn(v){return v.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function jn(v,$,A){var F=Kt(v,$),W=new Array(A-F+1).join(" ");v.setCursor(new Oe($,F)),v.replaceRange(W,v.getCursor())}function tr(v,$){var A=[],F=v.listSelections(),W=Ve(v.clipPos($)),B=!lt($,W),G=v.getCursor("head"),Y=gt(F,G),Q=lt(F[Y].head,F[Y].anchor),re=F.length-1,se=re-Y>Y?re:0,ye=F[se].anchor,Ce=Math.min(ye.line,W.line),me=Math.max(ye.line,W.line),we=ye.ch,Re=W.ch,Ee=F[se].head.ch-we,ze=Re-we;Ee>0&&ze<=0?(we++,B||Re--):Ee<0&&ze>=0?(we--,Q||Re++):Ee<0&&ze==-1&&(we--,Re++);for(var rt=Ce;rt<=me;rt++){var Ke={anchor:new Oe(rt,we),head:new Oe(rt,Re)};A.push(Ke)}return v.setSelections(A),$.ch=Re,ye.ch=we,ye}function Mr(v,$,A){for(var F=[],W=0;W<A;W++){var B=fe($,W,0);F.push({anchor:B,head:B})}v.setSelections(F,0)}function gt(v,$,A){for(var F=0;F<v.length;F++){var W=lt(v[F].anchor,$),B=lt(v[F].head,$);if(W||B)return F}return-1}function He(v,$){var A=$.lastSelection,F=function(){var B=v.listSelections(),G=B[0],Y=B[B.length-1],Q=tt(G.anchor,G.head)?G.anchor:G.head,re=tt(Y.anchor,Y.head)?Y.head:Y.anchor;return[Q,re]},W=function(){var B=v.getCursor(),G=v.getCursor(),Y=A.visualBlock;if(Y){var Q=Y.width,re=Y.height;G=new Oe(B.line+re,B.ch+Q);for(var se=[],ye=B.line;ye<G.line;ye++){var Ce=new Oe(ye,B.ch),me=new Oe(ye,G.ch),we={anchor:Ce,head:me};se.push(we)}v.setSelections(se)}else{var Re=A.anchorMark.find(),Ee=A.headMark.find(),ze=Ee.line-Re.line,rt=Ee.ch-Re.ch;G={line:G.line+ze,ch:ze?G.ch:rt+G.ch},A.visualLine&&(B=new Oe(B.line,0),G=new Oe(G.line,Kt(v,G.line))),v.setSelection(B,G)}return[B,G]};return $.visualMode?F():W()}function Wt(v,$){var A=$.sel.anchor,F=$.sel.head;$.lastPastedText&&(F=v.posFromIndex(v.indexFromPos(A)+$.lastPastedText.length),$.lastPastedText=null),$.lastSelection={anchorMark:v.setBookmark(A),headMark:v.setBookmark(F),anchor:Ve(A),head:Ve(F),visualMode:$.visualMode,visualLine:$.visualLine,visualBlock:$.visualBlock}}function cn(v,$,A,F){var W=v.state.vim.sel,B=F?$:W.head,G=F?$:W.anchor,Y;return tt(A,$)&&(Y=A,A=$,$=Y),tt(B,G)?(B=ht($,B),G=Xt(G,A)):(G=ht($,G),B=Xt(B,A),B=fe(B,0,-1),B.ch==-1&&B.line!=v.firstLine()&&(B=new Oe(B.line-1,Kt(v,B.line-1)))),[G,B]}function Hn(v,$,W){var F=v.state.vim;$=$||F.sel;var W=W||F.visualLine?"line":F.visualBlock?"block":"char",B=Tr(v,$,W);v.setSelections(B.ranges,B.primary)}function Tr(v,$,A,F){var W=Ve($.head),B=Ve($.anchor);if(A=="char"){var G=!F&&!tt($.head,$.anchor)?1:0,Y=tt($.head,$.anchor)?1:0;return W=fe($.head,0,G),B=fe($.anchor,0,Y),{ranges:[{anchor:B,head:W}],primary:0}}if(A=="line"){if(tt($.head,$.anchor))W.ch=0,B.ch=Kt(v,B.line);else{B.ch=0;var Q=v.lastLine();W.line>Q&&(W.line=Q),W.ch=Kt(v,W.line)}return{ranges:[{anchor:B,head:W}],primary:0}}if(A=="block"){var re=Math.min(B.line,W.line),se=B.ch,ye=Math.max(B.line,W.line),Ce=W.ch;se<Ce?Ce+=1:se+=1;for(var me=ye-re+1,we=W.line==re?0:me-1,Re=[],Ee=0;Ee<me;Ee++)Re.push({anchor:new Oe(re+Ee,se),head:new Oe(re+Ee,Ce)});return{ranges:Re,primary:we}}}function mr(v){var $=v.getCursor("head");return v.getSelection().length==1&&($=ht($,v.getCursor("anchor"))),$}function yn(v,$){var A=v.state.vim;$!==!1&&v.setCursor(ue(v,A.sel.head)),Wt(v,A),A.visualMode=!1,A.visualLine=!1,A.visualBlock=!1,A.insertMode||Fe.signal(v,"vim-mode-change",{mode:"normal"})}function Xn(v,$,A){var F=v.getRange($,A);if(/\n\s*$/.test(F)){var W=F.split(`
|
1404
|
+
`);W.pop();for(var B,B=W.pop();W.length>0&&B&&p(B);B=W.pop())A.line--,A.ch=0;B?(A.line--,A.ch=Kt(v,A.line)):A.ch=0}}function nr(v,$,A){$.ch=0,A.ch=0,A.line++}function Qt(v){if(!v)return 0;var $=v.search(/\S/);return $==-1?v.length:$}function Qn(v,$,A){var F=$.inclusive,W=$.innerWord,B=$.bigWord,G=$.noSymbol,Y=$.multiline,Q=A||mr(v),re=v.getLine(Q.line),se=re,ye=Q.line,Ce=ye,me=Q.ch,we,Re=G?yo[0]:fi[0];if(W&&/\s/.test(re.charAt(me)))Re=function(an){return/\s/.test(an)};else{for(;!Re(re.charAt(me));)if(me++,me>=re.length){if(!Y)return null;me--,we=lo(v,Q,!0,B,!0);break}B?Re=fi[0]:(Re=yo[0],Re(re.charAt(me))||(Re=yo[1]))}for(var Ee=me,ze=me;Re(re.charAt(ze))&&ze>=0;)ze--;if(ze++,we)Ee=we.to,Ce=we.line,se=v.getLine(Ce),!se&&Ee==0&&Ee++;else for(;Re(re.charAt(Ee))&&Ee<re.length;)Ee++;if(F){var rt=Ee,Ke=Q.ch<=ze&&/\s/.test(re.charAt(Q.ch));if(!Ke)for(;/\s/.test(se.charAt(Ee))&&Ee<se.length;)Ee++;if(rt==Ee||Ke){for(var Je=ze;/\s/.test(re.charAt(ze-1))&&ze>0;)ze--;!ze&&!Ke&&(ze=Je)}}return{start:new Oe(ye,ze),end:new Oe(Ce,Ee)}}function ao(v,$,A){var F=$;if(!Fe.findMatchingTag||!Fe.findEnclosingTag)return{start:F,end:F};var W=Fe.findMatchingTag(v,$)||Fe.findEnclosingTag(v,$);return!W||!W.open||!W.close?{start:F,end:F}:A?{start:W.open.from,end:W.close.to}:{start:W.open.to,end:W.close.from}}function Li(v,$,A){lt($,A)||We.jumpList.add(v,$,A)}function Ei(v,$){We.lastCharacterSearch.increment=v,We.lastCharacterSearch.forward=$.forward,We.lastCharacterSearch.selectedCharacter=$.selectedCharacter}function Ri(v,$,A,F){var W=Ve(v.getCursor()),B=A?1:-1,G=A?v.lineCount():-1,Y=W.ch,Q=W.line,re=v.getLine(Q),se={lineText:re,nextCh:re.charAt(Y),lastCh:null,index:Y,symb:F,reverseSymb:(A?{")":"(","}":"{"}:{"(":")","{":"}"})[F],forward:A,depth:0,curMoveThrough:!1},ye=ni[F];if(!ye)return W;var Ce=ri[ye].init,me=ri[ye].isComplete;for(Ce&&Ce(se);Q!==G&&$;){if(se.index+=B,se.nextCh=se.lineText.charAt(se.index),!se.nextCh){if(Q+=B,se.lineText=v.getLine(Q)||"",B>0)se.index=0;else{var we=se.lineText.length;se.index=we>0?we-1:0}se.nextCh=se.lineText.charAt(se.index)}me(se)&&(W.line=Q,W.ch=se.index,$--)}return se.nextCh||se.curMoveThrough?new Oe(Q,se.index):W}function lo(v,$,A,F,W){var B=$.line,G=$.ch,Y=v.getLine(B),Q=A?1:-1,re=F?fi:yo;if(W&&Y==""){if(B+=Q,Y=v.getLine(B),!a(v,B))return null;G=A?0:Y.length}for(;;){if(W&&Y=="")return{from:0,to:0,line:B};for(var se=Q>0?Y.length:-1,ye=se,Ce=se;G!=se;){for(var me=!1,we=0;we<re.length&&!me;++we)if(re[we](Y.charAt(G))){for(ye=G;G!=se&&re[we](Y.charAt(G));)G+=Q;if(Ce=G,me=ye!=Ce,ye==$.ch&&B==$.line&&Ce==ye+Q)continue;return{from:Math.min(ye,Ce+1),to:Math.max(ye,Ce),line:B}}me||(G+=Q)}if(B+=Q,!a(v,B))return null;Y=v.getLine(B),G=Q>0?0:Y.length}}function lr(v,$,A,F,W,B){var G=Ve($),Y=[];(F&&!W||!F&&W)&&A++;for(var Q=!F||!W,re=0;re<A;re++){var se=lo(v,$,F,B,Q);if(!se){var ye=Kt(v,v.lastLine());Y.push(F?{line:v.lastLine(),from:ye,to:ye}:{line:0,from:0,to:0});break}Y.push(se),$=new Oe(se.line,F?se.to-1:se.from)}var Ce=Y.length!=A,me=Y[0],we=Y.pop();return F&&!W?(!Ce&&(me.from!=G.ch||me.line!=G.line)&&(we=Y.pop()),new Oe(we.line,we.from)):F&&W?new Oe(we.line,we.to-1):!F&&W?(!Ce&&(me.to!=G.ch||me.line!=G.line)&&(we=Y.pop()),new Oe(we.line,we.to)):new Oe(we.line,we.from)}function co(v,$,A,F,W){var B=$,G=new Oe(B.line+A.repeat-1,1/0),Y=v.clipPos(G);return Y.ch--,W||(F.lastHPos=1/0,F.lastHSPos=v.charCoords(Y,"div").left),G}function No(v,$,A,F,W){for(var B=W||v.getCursor(),G=B.ch,Y,Q=0;Q<$;Q++){var re=v.getLine(B.line);if(Y=qa(G,re,F,A),Y==-1)return null;G=Y}return new Oe(v.getCursor().line,Y)}function Ka(v,$){var A=v.getCursor().line;return ue(v,new Oe(A,$-1))}function Jr(v,$,A,F){!b(A,Ji)&&!Bt.test(A)||($.marks[A]&&$.marks[A].clear(),$.marks[A]=v.setBookmark(F))}function qa(v,$,A,F,W){var B;return F?(B=$.indexOf(A,v+1),B!=-1):(B=$.lastIndexOf(A,v-1),B!=-1),B}function vs(v,$,A,F,W){function B(ze){return!/\S/.test(v.getLine(ze))}function G(ze,rt,Ke){return Ke?B(ze)!=B(ze+rt):!B(ze)&&B(ze+rt)}function Y(ze){F=F>0?1:-1;var rt=v.ace.session.getFoldLine(ze);rt&&ze+F>rt.start.row&&ze+F<rt.end.row&&(F=(F>0?rt.end.row:rt.start.row)-ze)}var Q=$.line,re=v.firstLine(),se=v.lastLine(),ye,Ce,me=Q;if(F){for(;re<=me&&me<=se&&A>0;)Y(me),G(me,F)&&A--,me+=F;return new Oe(me,0)}var we=v.state.vim;if(we.visualLine&&G(Q,1,!0)){var Re=we.sel.anchor;G(Re.line,-1,!0)&&(!W||Re.line!=Q)&&(Q+=1)}var Ee=B(Q);for(me=Q;me<=se&&A;me++)G(me,1,!0)&&(!W||B(me)!=Ee)&&A--;for(Ce=new Oe(me,0),me>se&&!Ee?Ee=!0:W=!1,me=Q;me>re&&!((!W||B(me)==Ee||me==Q)&&G(me,-1,!0));me--);return ye=new Oe(me,0),{start:ye,end:Ce}}function na(v,$,A,F,W){function B(re){re.pos+re.dir<0||re.pos+re.dir>=re.line.length?re.line=null:re.pos+=re.dir}function G(re,se,ye,Ce){var me=re.getLine(se),we={line:me,ln:se,pos:ye,dir:Ce};if(we.line==="")return{ln:we.ln,pos:we.pos};var Re=we.pos;for(B(we);we.line!==null;){if(Re=we.pos,w(we.line[we.pos])){if(!W)return{ln:we.ln,pos:we.pos+1};for(B(we);we.line!==null&&p(we.line[we.pos]);)Re=we.pos,B(we);return{ln:we.ln,pos:Re+1}}B(we)}return{ln:we.ln,pos:Re+1}}function Y(re,se,ye,Ce){var me=re.getLine(se),we={line:me,ln:se,pos:ye,dir:Ce};if(we.line==="")return{ln:we.ln,pos:we.pos};var Re=we.pos;for(B(we);we.line!==null;){if(!p(we.line[we.pos])&&!w(we.line[we.pos]))Re=we.pos;else if(w(we.line[we.pos]))return W?p(we.line[we.pos+1])?{ln:we.ln,pos:we.pos+1}:{ln:we.ln,pos:Re}:{ln:we.ln,pos:Re};B(we)}return we.line=me,W&&p(we.line[we.pos])?{ln:we.ln,pos:we.pos}:{ln:we.ln,pos:Re}}for(var Q={ln:$.line,pos:$.ch};A>0;)F<0?Q=Y(v,Q.ln,Q.pos,F):Q=G(v,Q.ln,Q.pos,F),A--;return new Oe(Q.ln,Q.pos)}function Oi(v,$,A,F){function W(Q,re){if(re.pos+re.dir<0||re.pos+re.dir>=re.line.length){if(re.ln+=re.dir,!a(Q,re.ln)){re.line=null,re.ln=null,re.pos=null;return}re.line=Q.getLine(re.ln),re.pos=re.dir>0?0:re.line.length-1}else re.pos+=re.dir}function B(Q,re,se,ye){var Ee=Q.getLine(re),Ce=Ee==="",me={line:Ee,ln:re,pos:se,dir:ye},we={ln:me.ln,pos:me.pos},Re=me.line==="";for(W(Q,me);me.line!==null;){if(we.ln=me.ln,we.pos=me.pos,me.line===""&&!Re)return{ln:me.ln,pos:me.pos};if(Ce&&me.line!==""&&!p(me.line[me.pos]))return{ln:me.ln,pos:me.pos};w(me.line[me.pos])&&!Ce&&(me.pos===me.line.length-1||p(me.line[me.pos+1]))&&(Ce=!0),W(Q,me)}var Ee=Q.getLine(we.ln);we.pos=0;for(var ze=Ee.length-1;ze>=0;--ze)if(!p(Ee[ze])){we.pos=ze;break}return we}function G(Q,re,se,ye){var Re=Q.getLine(re),Ce={line:Re,ln:re,pos:se,dir:ye},me={ln:Ce.ln,pos:null},we=Ce.line==="";for(W(Q,Ce);Ce.line!==null;){if(Ce.line===""&&!we)return me.pos!==null?me:{ln:Ce.ln,pos:Ce.pos};if(!(!w(Ce.line[Ce.pos])||me.pos===null||Ce.ln===me.ln&&Ce.pos+1===me.pos))return me;Ce.line!==""&&!p(Ce.line[Ce.pos])&&(we=!1,me={ln:Ce.ln,pos:Ce.pos}),W(Q,Ce)}var Re=Q.getLine(me.ln);me.pos=0;for(var Ee=0;Ee<Re.length;++Ee)if(!p(Re[Ee])){me.pos=Ee;break}return me}for(var Y={ln:$.line,pos:$.ch};A>0;)F<0?Y=G(v,Y.ln,Y.pos,F):Y=B(v,Y.ln,Y.pos,F),A--;return new Oe(Y.ln,Y.pos)}function On(v,$,A,F){var W=$,B,G,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[A],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[A],re=v.getLine(W.line).charAt(W.ch),se=re===Q?1:0;if(B=v.scanForBracket(new Oe(W.line,W.ch+se),-1,void 0,{bracketRegex:Y}),G=v.scanForBracket(new Oe(W.line,W.ch+se),1,void 0,{bracketRegex:Y}),!B||!G)return null;if(B=B.pos,G=G.pos,B.line==G.line&&B.ch>G.ch||B.line>G.line){var ye=B;B=G,G=ye}return F?G.ch+=1:B.ch+=1,{start:B,end:G}}function vr(v,$,A,F){var W=Ve($),B=v.getLine(W.line),G=B.split(""),Y,Q,re,se,ye=G.indexOf(A);if(W.ch<ye)W.ch=ye;else if(ye<W.ch&&G[W.ch]==A){var Ce=/string/.test(v.getTokenTypeAt(fe($,0,1))),me=/string/.test(v.getTokenTypeAt($)),we=Ce&&!me;we||(Q=W.ch,--W.ch)}if(G[W.ch]==A&&!Q)Y=W.ch+1;else for(re=W.ch;re>-1&&!Y;re--)G[re]==A&&(Y=re+1);if(Y&&!Q)for(re=Y,se=G.length;re<se&&!Q;re++)G[re]==A&&(Q=re);return!Y||!Q?{start:W,end:W}:(F&&(--Y,++Q),{start:new Oe(W.line,Y),end:new Oe(W.line,Q)})}function Ni(){}function wn(v){var $=v.state.vim;return $.searchState_||($.searchState_=new Ni)}function yr(v){return Di(v,"/")}function qi(v){return ys(v,"/")}function Di(v,$){var A=ys(v,$)||[];if(!A.length)return[];var F=[];if(A[0]===0){for(var W=0;W<A.length;W++)typeof A[W]=="number"&&F.push(v.substring(A[W]+1,A[W+1]));return F}}function ys(v,$){$||($="/");for(var A=!1,F=[],W=0;W<v.length;W++){var B=v.charAt(W);!A&&B==$&&F.push(W),A=!A&&B=="\\"}return F}function ra(v){for(var $="|(){",A="}",F=!1,W=[],B=-1;B<v.length;B++){var G=v.charAt(B)||"",Y=v.charAt(B+1)||"",Q=Y&&$.indexOf(Y)!=-1;F?((G!=="\\"||!Q)&&W.push(G),F=!1):G==="\\"?(F=!0,Y&&A.indexOf(Y)!=-1&&(Q=!0),(!Q||Y==="\\")&&W.push(G)):(W.push(G),Q&&Y!=="\\"&&W.push("\\"))}return W.join("")}function Ya(v){for(var $=!1,A=[],F=-1;F<v.length;F++){var W=v.charAt(F)||"",B=v.charAt(F+1)||"";yi[W+B]?(A.push(yi[W+B]),F++):$?(A.push(W),$=!1):W==="\\"?($=!0,o(B)||B==="$"?A.push("$"):B!=="/"&&B!=="\\"&&A.push("\\")):(W==="$"&&A.push("$"),A.push(W),B==="/"&&A.push("\\"))}return A.join("")}function Xa(v){for(var $=new Fe.StringStream(v),A=[];!$.eol();){for(;$.peek()&&$.peek()!="\\";)A.push($.next());var F=!1;for(var W in rr)if($.match(W,!0)){F=!0,A.push(rr[W]);break}F||A.push($.next())}return A.join("")}function Fi(v,$,A){var F=We.registerController.getRegister("/");if(F.setText(v),v instanceof RegExp)return v;var W=qi(v),B,G;if(!W.length)B=v;else{B=v.substring(0,W[0]);var Y=v.substring(W[0]);G=Y.indexOf("i")!=-1}if(!B)return null;k("pcre")||(B=ra(B)),A&&($=/^[^A-Z]*$/.test(B));var Q=new RegExp(B,$||G?"im":"m");return Q}function ei(v){typeof v=="string"&&(v=document.createElement(v));for(var $,A=1;A<arguments.length;A++)if($=arguments[A])if(typeof $!="object"&&($=document.createTextNode($)),$.nodeType)v.appendChild($);else for(var F in $)Object.prototype.hasOwnProperty.call($,F)&&(F[0]==="$"?v.style[F.slice(1)]=$[F]:v.setAttribute(F,$[F]));return v}function Lt(v,$){var A=ei("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},$);v.openNotification?v.openNotification(A,{bottom:!0,duration:5e3}):alert(A.innerText)}function ia(v,$){return ei("div",{$display:"flex"},ei("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},v,ei("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),$&&ei("span",{$color:"#888"},$))}function wr(v,$){if(Ir.length){$.value||($.value=""),un=$;return}var A=ia($.prefix,$.desc);if(v.openDialog)v.openDialog(A,$.onClose,{onKeyDown:$.onKeyDown,onKeyUp:$.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:$.value});else{var F="";typeof $.prefix!="string"&&$.prefix&&(F+=$.prefix.textContent),$.desc&&(F+=" "+$.desc),$.onClose(prompt(F,""))}}function Nn(v,$){if(v instanceof RegExp&&$ instanceof RegExp){for(var A=["global","multiline","ignoreCase","source"],F=0;F<A.length;F++){var W=A[F];if(v[W]!==$[W])return!1}return!0}return!1}function on(v,$,A,F){if($){var W=wn(v),B=Fi($,!!A,!!F);if(B)return di(v,B),Nn(B,W.getQuery())||W.setQuery(B),B}}function Sn(v){if(v.source.charAt(0)=="^")var $=!0;return{token:function(A){if($&&!A.sol()){A.skipToEnd();return}var F=A.match(v,!1);if(F)return F[0].length==0?(A.next(),"searching"):!A.sol()&&(A.backUp(1),!v.exec(A.next()+F[0]))?(A.next(),null):(A.match(v),"searching");for(;!A.eol()&&(A.next(),!A.match(v,!1)););},query:v}}function di(v,$){clearTimeout(ir);var A=wn(v);A.highlightTimeout=ir,ir=setTimeout(function(){if(v.state.vim){var F=wn(v);F.highlightTimeout=null;var W=F.getOverlay();(!W||$!=W.query)&&(W&&v.removeOverlay(W),W=Sn($),v.addOverlay(W),v.showMatchesOnScrollbar&&(F.getScrollbarAnnotate()&&F.getScrollbarAnnotate().clear(),F.setScrollbarAnnotate(v.showMatchesOnScrollbar($))),F.setOverlay(W))}},50)}function br(v,$,A,F){return F===void 0&&(F=1),v.operation(function(){for(var W=v.getCursor(),B=v.getSearchCursor(A,W),G=0;G<F;G++){var Y=B.find($);if(G==0&&Y&<(B.from(),W)){var Q=$?B.from():B.to();Y=B.find($),Y&&!Y[0]&<(B.from(),Q)&&v.getLine(Q.line).length==Q.ch&&(Y=B.find($))}if(!Y&&(B=v.getSearchCursor(A,$?new Oe(v.lastLine()):new Oe(v.firstLine(),0)),!B.find($)))return}return B.from()})}function pi(v,$,A,F,W){return F===void 0&&(F=1),v.operation(function(){var B=v.getCursor(),G=v.getSearchCursor(A,B),Y=G.find(!$);!W.visualMode&&Y&<(G.from(),B)&&G.find(!$);for(var Q=0;Q<F;Q++)if(Y=G.find($),!Y&&(G=v.getSearchCursor(A,$?new Oe(v.lastLine()):new Oe(v.firstLine(),0)),!G.find($)))return;return[G.from(),G.to()]})}function Do(v){var $=wn(v);$.highlightTimeout&&(clearTimeout($.highlightTimeout),$.highlightTimeout=null),v.removeOverlay(wn(v).getOverlay()),$.setOverlay(null),$.getScrollbarAnnotate()&&($.getScrollbarAnnotate().clear(),$.setScrollbarAnnotate(null))}function ws(v,$,A){return typeof v!="number"&&(v=v.line),$ instanceof Array?b(v,$):typeof A=="number"?v>=$&&v<=A:v==$}function Yi(v){var $=v.ace.renderer;return{top:$.getFirstFullyVisibleRow(),bottom:$.getLastFullyVisibleRow()}}function zr(v,$,A){if(A=="'"||A=="`")return We.jumpList.find(v,-1)||new Oe(0,0);if(A==".")return uo(v);var F=$.marks[A];return F&&F.find()}function uo(v){if(v.getLastEditEnd)return v.getLastEditEnd();for(var $=v.doc.history.done,A=$.length;A--;)if($[A].changes)return Ve($[A].changes[0].to)}function Fo(v,$,A,F,W,B,G,Y,Q){function re(){v.operation(function(){for(;!Re;)se(),Ce();me()})}function se(){var Ke=v.getRange(B.from(),B.to()),Je=Ke.replace(G,Y),an=B.to().line;B.replace(Je),ze=B.to().line,W+=ze-an,rt=ze<an}function ye(){var Ke=Ee&&Ve(B.to()),Je=B.findNext();return Je&&!Je[0]&&Ke&<(B.from(),Ke)&&(Je=B.findNext()),Je}function Ce(){for(;ye()&&ws(B.from(),F,W);)if(!(!A&&B.from().line==ze&&!rt)){v.scrollIntoView(B.from(),30),v.setSelection(B.from(),B.to()),Ee=B.from(),Re=!1;return}Re=!0}function me(Ke){if(Ke&&Ke(),v.focus(),Ee){v.setCursor(Ee);var Je=v.state.vim;Je.exMode=!1,Je.lastHPos=Je.lastHSPos=Ee.ch}Q&&Q()}function we(Ke,Je,an){Fe.e_stop(Ke);var it=z(Ke);switch(it){case"y":se(),Ce();break;case"n":Ce();break;case"a":var dn=Q;Q=void 0,v.operation(re),Q=dn;break;case"l":se();case"q":case"<Esc>":case"<C-c>":case"<C-[>":me(an)}return Re&&me(an),!0}v.state.vim.exMode=!0;var Re=!1,Ee,ze,rt;if(Ce(),Re){Lt(v,"No matches for "+G.source);return}if(!$){re(),Q&&Q();return}wr(v,{prefix:ei("span","replace with ",ei("strong",Y)," (y/n/a/q/l)"),onKeyDown:we})}function jr(v,$){var A=v.state.vim,F=We.macroModeState,W=We.registerController.getRegister("."),B=F.isPlaying,G=F.lastInsertModeChanges;B||(v.off("change",ho),A.insertEnd&&A.insertEnd.clear(),A.insertEnd=null,Fe.off(v.getInputField(),"keydown",ks)),!B&&A.insertModeRepeat>1&&(oa(v,A,A.insertModeRepeat-1,!0),A.lastEditInputState.repeatOverride=A.insertModeRepeat),delete A.insertModeRepeat,A.insertMode=!1,$||v.setCursor(v.getCursor().line,v.getCursor().ch-1),v.setOption("keyMap","vim"),v.setOption("disableInput",!0),v.toggleOverwrite(!1),W.setText(G.changes.join("")),Fe.signal(v,"vim-mode-change",{mode:"normal"}),F.isRecording&&Zn(F)}function Po(v){bn.unshift(v)}function bs(v,$,A,F,W){var B={keys:v,type:$};B[$]=A,B[$+"Args"]=F;for(var G in W)B[G]=W[G];Po(B)}function xs(v,$,A,F){var W=We.registerController.getRegister(F);if(F==":"){W.keyBuffer[0]&&ur.processCommand(v,W.keyBuffer[0]),A.isPlaying=!1;return}var B=W.keyBuffer,G=0;A.isPlaying=!0,A.replaySearchQueries=W.searchQueries.slice(0);for(var Y=0;Y<B.length;Y++)for(var Q=B[Y],re,se;Q;)if(re=/<\w+-.+?>|<\w+>|./.exec(Q),se=re[0],Q=Q.substring(re.index+se.length),dt.handleKey(v,se,"macro"),$.insertMode){var ye=W.insertModeChanges[G++].changes;We.macroModeState.lastInsertModeChanges.changes=ye,Ho(v,ye,1),jr(v)}A.isPlaying=!1}function Wo(v,$){if(!v.isPlaying){var A=v.latestRegister,F=We.registerController.getRegister(A);F&&F.pushText($)}}function Zn(v){if(!v.isPlaying){var $=v.latestRegister,A=We.registerController.getRegister($);A&&A.pushInsertModeChanges&&A.pushInsertModeChanges(v.lastInsertModeChanges)}}function Cs(v,$){if(!v.isPlaying){var A=v.latestRegister,F=We.registerController.getRegister(A);F&&F.pushSearchQuery&&F.pushSearchQuery($)}}function ho(v,$){var A=We.macroModeState,F=A.lastInsertModeChanges;if(!A.isPlaying)for(var W=v.state.vim;$;){if(F.expectCursorActivityForChange=!0,F.ignoreCount>1)F.ignoreCount--;else if($.origin=="+input"||$.origin=="paste"||$.origin===void 0){var B=v.listSelections().length;B>1&&(F.ignoreCount=B);var G=$.text.join(`
|
1405
|
+
`);if(F.maybeReset&&(F.changes=[],F.maybeReset=!1),G)if(v.state.overwrite&&!/\n/.test(G))F.changes.push([G]);else{if(G.length>1){var Y=W&&W.insertEnd&&W.insertEnd.find(),Q=v.getCursor();if(Y&&Y.line==Q.line){var re=Y.ch-Q.ch;re>0&&re<G.length&&(F.changes.push([G,re]),G="")}}G&&F.changes.push(G)}}$=$.next}}function Bo(v){var $=v.state.vim;if($.insertMode){var A=We.macroModeState;if(A.isPlaying)return;var F=A.lastInsertModeChanges;F.expectCursorActivityForChange?F.expectCursorActivityForChange=!1:(F.maybeReset=!0,$.insertEnd&&$.insertEnd.clear(),$.insertEnd=v.setBookmark(v.getCursor(),{insertLeft:!0}))}else v.curOp.isVimOp||zo(v,$)}function zo(v,$,A){var F=v.getCursor("anchor"),W=v.getCursor("head");if($.visualMode&&!v.somethingSelected()?yn(v,!1):!$.visualMode&&!$.insertMode&&v.somethingSelected()&&($.visualMode=!0,$.visualLine=!1,Fe.signal(v,"vim-mode-change",{mode:"visual"})),$.visualMode){var B=tt(W,F)?0:-1,G=tt(W,F)?-1:0;W=fe(W,0,B),F=fe(F,0,G),$.sel={anchor:F,head:W},Jr(v,$,"<",ht(W,F)),Jr(v,$,">",Xt(W,F))}else!$.insertMode&&!A&&($.lastHPos=v.getCursor().ch)}function Xi(v,$){this.keyName=v,this.key=$.key,this.ctrlKey=$.ctrlKey,this.altKey=$.altKey,this.metaKey=$.metaKey,this.shiftKey=$.shiftKey}function ks(v){var $=We.macroModeState,A=$.lastInsertModeChanges,F=Fe.keyName?Fe.keyName(v):v.key;F&&(F.indexOf("Delete")!=-1||F.indexOf("Backspace")!=-1)&&(A.maybeReset&&(A.changes=[],A.maybeReset=!1),A.changes.push(new Xi(F,v)))}function oa(v,$,A,F){function W(){Y?_n.processAction(v,$,$.lastEditActionCommand):_n.evalInput(v,$)}function B(se){if(G.lastInsertModeChanges.changes.length>0){se=$.lastEditActionCommand?se:1;var ye=G.lastInsertModeChanges;Ho(v,ye.changes,se)}}var G=We.macroModeState;G.isPlaying=!0;var Y=!!$.lastEditActionCommand,Q=$.inputState;if($.inputState=$.lastEditInputState,Y&&$.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<A;re++)W(),B(1);else F||W(),B(A);$.inputState=Q,$.insertMode&&!F&&jr(v),G.isPlaying=!1}function jo(v,$){Fe.lookupKey($,"vim-insert",function(A){return typeof A=="string"?Fe.commands[A](v):A(v),!0})}function Ho(v,$,A){var F=v.getCursor("head"),W=We.macroModeState.lastInsertModeChanges.visualBlock;W&&(Mr(v,F,W+1),A=v.listSelections().length,v.setCursor(F));for(var B=0;B<A;B++){W&&v.setCursor(fe(F,B,0));for(var G=0;G<$.length;G++){var Y=$[G];if(Y instanceof Xi)jo(v,Y.keyName);else if(typeof Y=="string")v.replaceSelection(Y);else{var Q=v.getCursor(),re=fe(Q,0,Y[0].length-(Y[1]||0));v.replaceRange(Y[0],Q,Y[1]?Q:re),v.setCursor(re)}}}W&&v.setCursor(fe(F,0,1))}function Ss(v,$,A,F){$.length>1&&$[0]=="n"&&($=$.replace("numpad","")),$=xr[$]||$;var W="";if(A.ctrlKey&&(W+="C-"),A.altKey&&(W+="A-"),(W||$.length>1)&&A.shiftKey&&(W+="S-"),F&&!F.expectLiteralNext&&$.length==1){if(Dn.keymap&&$ in Dn.keymap)(Dn.remapCtrl!==!1||!W)&&($=Dn.keymap[$]);else if($.charCodeAt(0)>255){var B=A.code&&A.code.slice(-1)||"";A.shiftKey||(B=B.toLowerCase()),B&&($=B)}}return W+=$,W.length>1&&(W="<"+W+">"),W}function Uo(v){var $=new v.constructor;return Object.keys(v).forEach(function(A){if(A!="insertEnd"){var F=v[A];Array.isArray(F)?F=F.slice():F&&typeof F=="object"&&F.constructor!=Object&&(F=Uo(F)),$[A]=F}}),v.sel&&($.sel={head:v.sel.head&&Ve(v.sel.head),anchor:v.sel.anchor&&Ve(v.sel.anchor)}),$}function po(v,$,A){var F=!1,W=dt.maybeInitVimState_(v),B=W.visualBlock||W.wasInVisualBlock,G=v.ace.inMultiSelectMode;if(W.wasInVisualBlock&&!G?W.wasInVisualBlock=!1:G&&W.visualBlock&&(W.wasInVisualBlock=!0),$=="<Esc>"&&!W.insertMode&&!W.visualMode&&G)v.ace.exitMultiSelectMode();else if(B||!G||v.ace.inVirtualSelectionMode)F=dt.handleKey(v,$,A);else{var Y=Uo(W),Q=W.inputState.changeQueueList||[];v.operation(function(){v.curOp.isVimOp=!0;var re=0;v.ace.forEachSelection(function(){var se=v.ace.selection;v.state.vim.lastHPos=se.$desiredColumn==null?se.lead.column:se.$desiredColumn,v.state.vim.inputState.changeQueue=Q[re];var ye=v.getCursor("head"),Ce=v.getCursor("anchor"),me=tt(ye,Ce)?0:-1,we=tt(ye,Ce)?-1:0;ye=fe(ye,0,me),Ce=fe(Ce,0,we),v.state.vim.sel.head=ye,v.state.vim.sel.anchor=Ce,F=ii(v,$,A),se.$desiredColumn=v.state.vim.lastHPos==-1?null:v.state.vim.lastHPos,v.ace.inVirtualSelectionMode&&(Q[re]=v.state.vim.inputState.changeQueue),v.virtualSelectionMode()&&(v.state.vim=Uo(Y)),re++}),v.curOp.cursorActivity&&!F&&(v.curOp.cursorActivity=!1),W.status=v.state.vim.status,v.state.vim=W,W.inputState.changeQueueList=Q,W.inputState.changeQueue=null},!0)}return F&&!W.visualMode&&!W.insert&&W.visualMode!=v.somethingSelected()&&zo(v,W,!0),F}function gi(v,$){$.off("beforeEndOperation",gi);var A=$.state.cm.vimCmd;A&&$.execCommand(A.exec?A:A.name,A.args),$.curOp=$.prevOp}var Jn=e("../range").Range,Qi=e("../lib/event_emitter").EventEmitter,Pi=e("../lib/dom"),sa=e("../lib/oop"),Qa=e("../lib/keys"),go=e("../lib/event"),Wi=e("../search").Search,fo=e("../lib/useragent"),Vo=e("../search_highlight").SearchHighlight,mo=e("../commands/multi_select_commands"),aa=e("../mode/text").Mode.prototype.tokenRe,Zi=e("../ext/hardwrap").hardWrap;e("../multi_select");var Fe=function(v){this.ace=v,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)};Fe.Pos=function(v,$){if(!(this instanceof Oe))return new Oe(v,$);this.line=v,this.ch=$},Fe.defineOption=function(v,$,A){},Fe.commands={redo:function(v){v.ace.redo()},undo:function(v){v.ace.undo()},newlineAndIndent:function(v){v.ace.insert(`
|
1406
|
+
`)},goLineLeft:function(v){v.ace.selection.moveCursorLineStart()},goLineRight:function(v){v.ace.selection.moveCursorLineEnd()}},Fe.keyMap={},Fe.addClass=Fe.rmClass=function(){},Fe.e_stop=Fe.e_preventDefault=go.stopEvent,Fe.keyName=function(v){var $=Qa[v.keyCode]||v.key||"";return $.length==1&&($=$.toUpperCase()),$=go.getModifierString(v).replace(/(^|-)\w/g,function(A){return A.toUpperCase()})+$,$},Fe.keyMap.default=function(v){return function($){var A=$.ace.commands.commandKeyBinding[v.toLowerCase()];return A&&$.ace.execCommand(A)!==!1}},Fe.lookupKey=function v($,A,F){A||(A="default"),typeof A=="string"&&(A=Fe.keyMap[A]||Fe.keyMap.default);var W=typeof A=="function"?A($):A[$];if(W===!1)return"nothing";if(W==="...")return"multi";if(W!=null&&F(W))return"handled";if(A.fallthrough){if(!Array.isArray(A.fallthrough))return v($,A.fallthrough,F);for(var B=0;B<A.fallthrough.length;B++){var G=v($,A.fallthrough[B],F);if(G)return G}}},Fe.findMatchingTag=function(v,$){return v.findMatchingTag($)},Fe.findEnclosingTag=function(v,$){},Fe.signal=function(v,$,A){return v._signal($,A)},Fe.on=go.addListener,Fe.off=go.removeListener,Fe.isWordChar=function(v){return v<""?/^\w$/.test(v):(aa.lastIndex=0,aa.test(v))},(function(){sa.implement(Fe.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(A){this.$lineHandleChanges&&this.$lineHandleChanges.push(A);var F={text:A.action[0]=="i"?A.lines:[]},W=this.curOp=this.curOp||{};W.changeHandlers||(W.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),W.lastChange?W.lastChange.next=W.lastChange=F:W.lastChange=W.change=F,this.$updateMarkers(A)},this.onSelectionChange=function(){var A=this.curOp=this.curOp||{};A.cursorActivityHandlers||(A.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(mo.keyboardHandler)},this.operation=function(A,F){if(!F&&this.curOp||F&&this.curOp&&this.curOp.force)return A();if((F||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var W=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var B=this.curOp=this.curOp||{};this.curOp.force=F;var G=A();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(),!B.cursorActivity&&!B.lastChange&&W&&(this.ace.prevOp=W)),(F||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),G},this.onBeforeEndOperation=function(){var A=this.curOp;A&&(A.change&&this.signal("change",A.change,A),A&&A.cursorActivity&&this.signal("cursorActivity",null,A),this.curOp=null)},this.signal=function(A,F,W){var B=W?W[A+"Handlers"]:(this._eventRegistry||{})[A];if(B){B=B.slice();for(var G=0;G<B.length;G++)B[G](this,F)}},this.firstLine=function(){return 0},this.lastLine=function(){return this.ace.session.getLength()-1},this.lineCount=function(){return this.ace.session.getLength()},this.setCursor=function(A,F){typeof A=="object"&&(F=A.ch,A=A.line);var W=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:A,column:F}),this.ace.selection.moveTo(A,F),W&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(A){var F=this.ace.selection,W=A=="anchor"?F.isEmpty()?F.lead:F.anchor:A=="head"||!A?F.lead:F.getRange()[A];return y(W)},this.listSelections=function(A){var F=this.ace.multiSelect.rangeList.ranges;return!F.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:F.map(function(W){return{anchor:this.clipPos(y(W.cursor==W.end?W.start:W.end)),head:this.clipPos(y(W.cursor))}},this)},this.setSelections=function(A,F){var W=this.ace.multiSelect,B=A.map(function(re){var se=g(re.anchor),ye=g(re.head),Ce=Jn.comparePoints(se,ye)<0?new Jn.fromPoints(se,ye):new Jn.fromPoints(ye,se);return Ce.cursor=Jn.comparePoints(Ce.start,ye)?Ce.end:Ce.start,Ce});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(B[0]);return}F?B[F]&&B.push(B.splice(F,1)[0]):B=B.reverse(),W.toSingleRange(B[0].clone());for(var G=this.ace.session,Y=0;Y<B.length;Y++){var Q=G.$clipRangeToDocument(B[Y]);W.addRange(Q)}},this.setSelection=function(A,F,W){var B=this.ace.selection;B.moveTo(A.line,A.ch),B.selectTo(F.line,F.ch),W&&W.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(A){return!this.ace.selection.isEmpty()},this.clipPos=function(A){var F=this.ace.session.$clipPositionToDocument(A.line,A.ch);return y(F)},this.foldCode=function(A){this.ace.session.$toggleFoldWidget(A.line,{})},this.markText=function(A){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(A){var F=A.action=="insert",W=A.start,B=A.end,G=(B.row-W.row)*(F?1:-1),Y=(B.column-W.column)*(F?1:-1);F&&(B=W);for(var Q in this.marks){var re=this.marks[Q],se=Jn.comparePoints(re,W);if(!(se<0)){if(se===0&&F)if(!re.$insertRight)se=1;else{if(re.bias!=1){re.bias=-1;continue}se=1}var ye=F?se:Jn.comparePoints(re,B);if(ye>0){re.row+=G,re.column+=re.row==B.row?Y:0;continue}!F&&ye<=0&&(re.row=W.row,re.column=W.column,ye===0&&(re.bias=1))}}};var v=function(A,F,W,B){this.cm=A,this.id=F,this.row=W,this.column=B,A.marks[this.id]=this};v.prototype.clear=function(){delete this.cm.marks[this.id]},v.prototype.find=function(){return y(this)},this.setBookmark=function(A,F){var W=new v(this,this.$uid++,A.line,A.ch);return(!F||!F.insertLeft)&&(W.$insertRight=!0),this.marks[W.id]=W,W},this.moveH=function(A,F){if(F=="char"){var W=this.ace.selection;W.clearSelection(),W.moveCursorBy(0,A)}},this.findPosV=function(A,F,W,B){if(W=="page"){var G=this.ace.renderer,Y=G.layerConfig;F*=Math.floor(Y.height/Y.lineHeight),W="line"}if(W=="line"){var Q=this.ace.session.documentToScreenPosition(A.line,A.ch);B!=null&&(Q.column=B),Q.row+=F,Q.row=Math.min(Math.max(0,Q.row),this.ace.session.getScreenLength()-1);var re=this.ace.session.screenToDocumentPosition(Q.row,Q.column);return y(re)}debugger},this.charCoords=function(A,F){if(F=="div"||!F){var W=this.ace.session.documentToScreenPosition(A.line,A.ch);return{left:W.column,top:W.row}}if(F=="local"){var B=this.ace.renderer,W=this.ace.session.documentToScreenPosition(A.line,A.ch),G=B.layerConfig.lineHeight,Y=B.layerConfig.characterWidth,Q=G*W.row;return{left:W.column*Y,top:Q,bottom:Q+G}}},this.coordsChar=function(A,F){var W=this.ace.renderer;if(F=="local"){var B=Math.max(0,Math.floor(A.top/W.lineHeight)),G=Math.max(0,Math.floor(A.left/W.characterWidth)),Y=W.session.screenToDocumentPosition(B,G);return y(Y)}if(F=="div")throw"not implemented"},this.getSearchCursor=function(A,F,W){var B=!1,G=!1;A instanceof RegExp&&!A.global&&(B=!A.ignoreCase,A=A.source,G=!0),A=="\\n"&&(A=`
|
1407
|
+
`,G=!1);var Y=new Wi;F.ch==null&&(F.ch=Number.MAX_VALUE);var Q={row:F.line,column:F.ch},re=this,se=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(ye){Y.setOptions({needle:A,caseSensitive:B,wrap:!1,backwards:ye,regExp:G,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(ye){se&&(se.end=re.ace.session.doc.replace(se,ye))}}},this.scrollTo=function(A,F){var W=this.ace.renderer,B=W.layerConfig,G=B.maxHeight;G-=(W.$size.scrollerHeight-W.lineHeight)*W.$scrollPastEnd,F!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(F,G))),A!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(A,B.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(A,F){if(A){var W=this.ace.renderer,B={top:0,bottom:F};W.scrollCursorIntoView(g(A),W.lineHeight*2/W.$size.scrollerHeight,B)}},this.getLine=function(A){return this.ace.session.getLine(A)},this.getRange=function(A,F){return this.ace.session.getTextRange(new Jn(A.line,A.ch,F.line,F.ch))},this.replaceRange=function(A,F,W){W||(W=F);var B=new Jn(F.line,F.ch,W.line,W.ch);return this.ace.session.$clipRangeToDocument(B),this.ace.session.replace(B,A)},this.replaceSelection=this.replaceSelections=function(A){var F=Array.isArray(A)&&A,W=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(W.getRange(),F?A[0]||"":A);return}W.inVirtualSelectionMode=!0;var B=W.rangeList.ranges;B.length||(B=[this.ace.multiSelect.getRange()]);for(var G=B.length;G--;)this.ace.session.replace(B[G],F?A[G]||"":A);W.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(A){return this.getRange(A.anchor,A.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var $={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(A,F){switch(this.state[A]=F,A){case"indentWithTabs":A=$[A],F=!F;break;case"keyMap":this.state.$keyMap=F;return;default:A=$[A]}A&&this.ace.setOption(A,F)},this.getOption=function(A){var F,W=$[A];switch(W&&(F=this.ace.getOption(W)),A){case"indentWithTabs":return A=$[A],!F;case"keyMap":return this.state.$keyMap||"vim"}return W?F:this.state[A]},this.toggleOverwrite=function(A){return this.state.overwrite=A,this.ace.setOverwrite(A)},this.addOverlay=function(A){if(!this.$searchHighlight||!this.$searchHighlight.session){var F=new Vo(null,"ace_highlight-marker","text"),W=this.ace.session.addDynamicMarker(F);F.id=W.id,F.session=this.ace.session,F.destroy=function(G){F.session.off("change",F.updateOnChange),F.session.off("changeEditor",F.destroy),F.session.removeMarker(F.id),F.session=null},F.updateOnChange=function(G){var Y=G.start.row;Y==G.end.row?F.cache[Y]=void 0:F.cache.splice(Y,F.cache.length)},F.session.on("changeEditor",F.destroy),F.session.on("change",F.updateOnChange)}var B=new RegExp(A.query.source,"gmi");this.$searchHighlight=A.highlight=F,this.$searchHighlight.setRegexp(B),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(A){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var A=this.ace.renderer,F=A.layerConfig;return{left:A.scrollLeft,top:A.scrollTop,height:F.maxHeight,width:F.width,clientHeight:F.height,clientWidth:F.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(A){return this.ace.setValue(A,-1)},this.getTokenTypeAt=function(A){var F=this.ace.session.getTokenAt(A.line,A.ch);return F&&/comment|string/.test(F.type)?"string":""},this.findMatchingBracket=function(A){var F=this.ace.session.findMatchingBracket(g(A));return{to:F&&y(F)}},this.findMatchingTag=function(A){var F=this.ace.session.getMatchingTags(g(A));if(F)return{open:{from:y(F.openTag.start),to:y(F.openTag.end)},close:{from:y(F.closeTag.start),to:y(F.closeTag.end)}}},this.indentLine=function(A,F){F===!0?this.ace.session.indentRows(A,A," "):F===!1&&this.ace.session.outdentRows(new Jn(A,0,A,0))},this.indexFromPos=function(A){return this.ace.session.doc.positionToIndex(g(A))},this.posFromIndex=function(A){return y(this.ace.session.doc.indexToPosition(A))},this.focus=function(A){return this.ace.textInput.focus()},this.blur=function(A){return this.ace.blur()},this.defaultTextHeight=function(A){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(A,F,W,B){var G=B.bracketRegex.source,Y=/paren|text|operator|tag/;if(F==1)var Q=this.ace.session.$findClosingBracket(G.slice(1,2),g(A),Y);else{var Q=this.ace.session.$findOpeningBracket(G.slice(-2,-1),{row:A.line,column:A.ch+1},Y);!Q&&B.bracketRegex&&B.bracketRegex.test(this.getLine(A.line)[A.ch-1])&&(Q={row:A.line,column:A.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(A){if(Fe.commands.hasOwnProperty(A))return Fe.commands[A](this);if(A=="indentAuto")return this.ace.execCommand("autoindent");console.log(A+" is not implemented")},this.getLineNumber=function(A){var F=this.$lineHandleChanges;if(!F)return null;for(var W=A.row,B=0;B<F.length;B++){var G=F[B];if(G.start.row!=G.end.row){if(G.action[0]=="i")G.start.row<W&&(W+=G.end.row-G.start.row);else if(G.start.row<W){if(W<G.end.row||W==G.end.row&&G.start.column>0)return null;W-=G.end.row-G.start.row}}}return W},this.getLineHandle=function(A){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(A),row:A}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var A=this.ace.session.$undoManager;if(A&&A.$lastDelta)return y(A.$lastDelta.end)}}).call(Fe.prototype);var la=Fe.StringStream=function(v,$){this.pos=this.start=0,this.string=v,this.tabSize=$||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};la.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(v){var $=this.string.charAt(this.pos);if(typeof v=="string")var A=$==v;else var A=$&&(v.test?v.test($):v($));if(A)return++this.pos,$},eatWhile:function(v){for(var $=this.pos;this.eat(v););return this.pos>$},eatSpace:function(){for(var v=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>v},skipToEnd:function(){this.pos=this.string.length},skipTo:function(v){var $=this.string.indexOf(v,this.pos);if($>-1)return this.pos=$,!0},backUp:function(v){this.pos-=v},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(v,$,A){if(typeof v!="string"){var F=this.string.slice(this.pos).match(v);return F&&F.index>0?null:(F&&$!==!1&&(this.pos+=F[0].length),F)}var W=function(G){return A?G.toLowerCase():G},B=this.string.substr(this.pos,v.length);if(W(B)==W(v))return $!==!1&&(this.pos+=v.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(v,$){this.lineStart+=v;try{return $()}finally{this.lineStart-=v}}},Fe.defineExtension=function(v,$){Fe.prototype[v]=$},Pi.importCssString(`.normal-mode .ace_cursor{
|
1408
|
+
border: none;
|
1409
|
+
background-color: rgba(255,0,0,0.5);
|
1410
|
+
}
|
1411
|
+
.normal-mode .ace_hidden-cursors .ace_cursor{
|
1412
|
+
background-color: transparent;
|
1413
|
+
border: 1px solid red;
|
1414
|
+
opacity: 0.7
|
1415
|
+
}
|
1416
|
+
.ace_dialog {
|
1417
|
+
position: absolute;
|
1418
|
+
left: 0; right: 0;
|
1419
|
+
background: inherit;
|
1420
|
+
z-index: 15;
|
1421
|
+
padding: .1em .8em;
|
1422
|
+
overflow: hidden;
|
1423
|
+
color: inherit;
|
1424
|
+
}
|
1425
|
+
.ace_dialog-top {
|
1426
|
+
border-bottom: 1px solid #444;
|
1427
|
+
top: 0;
|
1428
|
+
}
|
1429
|
+
.ace_dialog-bottom {
|
1430
|
+
border-top: 1px solid #444;
|
1431
|
+
bottom: 0;
|
1432
|
+
}
|
1433
|
+
.ace_dialog input {
|
1434
|
+
border: none;
|
1435
|
+
outline: none;
|
1436
|
+
background: transparent;
|
1437
|
+
width: 20em;
|
1438
|
+
color: inherit;
|
1439
|
+
font-family: monospace;
|
1440
|
+
}`,"vimMode",!1),(function(){function v(A,F,W){var B=A.ace.container,G;return G=B.appendChild(document.createElement("div")),W?G.className="ace_dialog ace_dialog-bottom":G.className="ace_dialog ace_dialog-top",typeof F=="string"?G.innerHTML=F:G.appendChild(F),G}function $(A,F){A.state.currentNotificationClose&&A.state.currentNotificationClose(),A.state.currentNotificationClose=F}Fe.defineExtension("openDialog",function(A,F,W){function B(ye){if(typeof ye=="string")re.value=ye;else{if(Y||ye&&ye.type=="blur"&&document.activeElement===re)return;Q.state.dialog==G&&(Q.state.dialog=null,Q.focus()),Y=!0,G.remove(),W.onClose&&W.onClose(G);var Ce=Q;Ce.state.vim&&(Ce.state.vim.status=null,Ce.ace._signal("changeStatus"),Ce.ace.renderer.$loop.schedule(Ce.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){W||(W={}),$(this,null);var G=v(this,A,W.bottom),Y=!1,Q=this;this.state.dialog=G;var re=G.getElementsByTagName("input")[0],se;return re?(W.value&&(re.value=W.value,W.selectValueOnOpen!==!1&&re.select()),W.onInput&&Fe.on(re,"input",function(ye){W.onInput(ye,re.value,B)}),W.onKeyUp&&Fe.on(re,"keyup",function(ye){W.onKeyUp(ye,re.value,B)}),Fe.on(re,"keydown",function(ye){W&&W.onKeyDown&&W.onKeyDown(ye,re.value,B)||(ye.keyCode==13&&F(re.value),(ye.keyCode==27||W.closeOnEnter!==!1&&ye.keyCode==13)&&(Fe.e_stop(ye),B()))}),W.closeOnBlur!==!1&&Fe.on(re,"blur",B),re.focus()):(se=G.getElementsByTagName("button")[0])&&(Fe.on(se,"click",function(){B(),Q.focus()}),W.closeOnBlur!==!1&&Fe.on(se,"blur",B),se.focus()),B}}),Fe.defineExtension("openNotification",function(A,F){function W(){G||(G=!0,clearTimeout(Y),B.remove())}if(!this.virtualSelectionMode()){$(this,W);var B=v(this,A,F&&F.bottom),G=!1,Y,Q=F&&typeof F.duration<"u"?F.duration:5e3;return Fe.on(B,"click",function(re){Fe.e_preventDefault(re),W()}),Q&&(Y=setTimeout(W,Q)),W}})})();var Oe=Fe.Pos,bn=[{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"}],vo=bn.length,ti=[{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"}],Dn=N(""),ca=/[\d]/,yo=[Fe.isWordChar,function(v){return v&&!Fe.isWordChar(v)&&!/\s/.test(v)}],fi=[function(v){return/\S/.test(v)}],Ji=["<",">"],Ut=["-",'"',".",":","_","/","+"],Bt=/^\w$/,Vt;try{Vt=new RegExp("^[\\p{Lu}]$","u")}catch{Vt=/^[A-Z]$/}var Et={};L("filetype",void 0,"string",["ft"],function(v,$){if($!==void 0){if(v===void 0){var A=$.getOption("mode");return A=="null"?"":A}var A=v==""?"null":v;$.setOption("mode",A)}}),L("textwidth",80,"number",["tw"],function(v,$){if($!==void 0){if(v===void 0){var A=$.getOption("textwidth");return A}var F=Math.round(v);F>1&&$.setOption("textwidth",F)}});var mi=function(){function v(Q,re,se){function ye(Re){var Ee=++W%F,ze=Y[Ee];ze&&ze.clear(),Y[Ee]=Q.setBookmark(Re)}var Ce=W%F,me=Y[Ce];if(me){var we=me.find();we&&!lt(we,re)&&ye(re)}else ye(re);ye(se),B=W,G=W-F+1,G<0&&(G=0)}function $(Q,re){W+=re,W>B?W=B:W<G&&(W=G);var se=Y[(F+W)%F];if(se&&!se.find()){var ye=re>0?1:-1,Ce,me=Q.getCursor();do if(W+=ye,se=Y[(F+W)%F],se&&(Ce=se.find())&&!lt(me,Ce))break;while(W<B&&W>G)}return se}function A(Q,re){var se=W,ye=$(Q,re);return W=se,ye&&ye.find()}var F=100,W=-1,B=0,G=0,Y=new Array(F);return{cachedCursor:void 0,add:v,find:A,move:$}},An=function(v){return v?{changes:v.changes,expectCursorActivityForChange:v.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var v=We.macroModeState;v.onRecordingDone&&v.onRecordingDone(),v.onRecordingDone=void 0,v.isRecording=!1},enterMacroRecordMode:function(v,$){var A=We.registerController.getRegister($);if(A){if(A.clear(),this.latestRegister=$,v.openDialog){var F=ei("span",{class:"cm-vim-message"},"recording @"+$);this.onRecordingDone=v.openDialog(F,null,{bottom:!0})}this.isRecording=!0}}};var We,sn,dt={enterVimMode:h,leaveVimMode:d,buildKeyMap:function(){},getRegisterController:function(){return We.registerController},resetVimGlobalState_:O,getVimGlobalState_:function(){return We},maybeInitVimState_:R,suppressErrorLogging:!1,InsertModeKey:Xi,map:function(v,$,A){ur.map(v,$,A)},unmap:function(v,$){return ur.unmap(v,$)},noremap:function(v,$,A){ur.map(v,$,A,!0)},mapclear:function(v){var $=bn.length,A=vo,F=bn.slice(0,$-A);if(bn=bn.slice($-A),v)for(var W=F.length-1;W>=0;W--){var B=F[W];if(v!==B.context)if(B.context)this._mapCommand(B);else{var G=["normal","insert","visual"];for(var Y in G)if(G[Y]!==v){var Q={};for(var re in B)Q[re]=B[re];Q.context=G[Y],this._mapCommand(Q)}}}},langmap:P,vimKeyFromEvent:z,setOption:M,getOption:k,defineOption:L,defineEx:function(v,$,A){if(!$)$=v;else if(v.indexOf($)!==0)throw new Error('(Vim.defineEx) "'+$+'" is not a prefix of "'+v+'", command not registered');As[v]=A,ur.commandMap_[$]={name:v,shortName:$,type:"api"}},handleKey:function(v,$,A){var F=this.findKey(v,$,A);if(typeof F=="function")return F()},multiSelectHandleKey:po,findKey:function(v,$,A){function F(){var re=We.macroModeState;if(re.isRecording){if($=="q")return re.exitMacroRecordMode(),S(v),!0;A!="mapping"&&Wo(re,$)}}function W(){if($=="<Esc>"){if(Y.visualMode)yn(v);else{if(!Y.insertMode)return;jr(v)}return S(v),!0}}function B(){if(W())return!0;Y.inputState.keyBuffer.push($);var re=Y.inputState.keyBuffer.join(""),se=$.length==1,ye=_n.matchCommand(re,bn,Y.inputState,"insert"),Ce=Y.inputState.changeQueue;if(ye.type=="none")return S(v),!1;if(ye.type=="partial"){if(ye.expectLiteralNext&&(Y.expectLiteralNext=!0),sn&&window.clearTimeout(sn),sn=se&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&S(v)},k("insertModeEscKeysTimeout")),se){var me=v.listSelections();(!Ce||Ce.removed.length!=me.length)&&(Ce=Y.inputState.changeQueue=new D),Ce.inserted+=$;for(var we=0;we<me.length;we++){var Re=ht(me[we].anchor,me[we].head),Ee=Xt(me[we].anchor,me[we].head),ze=v.getRange(Re,v.state.overwrite?fe(Ee,0,1):Ee);Ce.removed[we]=(Ce.removed[we]||"")+ze}}return!se}if(Y.expectLiteralNext=!1,sn&&window.clearTimeout(sn),ye.command&&Ce){for(var me=v.listSelections(),we=0;we<me.length;we++){var rt=me[we].head;v.replaceRange(Ce.removed[we]||"",fe(rt,0,-Ce.inserted.length),rt,"+input")}We.macroModeState.lastInsertModeChanges.changes.pop()}return ye.command||S(v),ye.command}function G(){if(F()||W())return!0;Y.inputState.keyBuffer.push($);var re=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var se=/^(\d*)(.*)$/.exec(re);if(!se)return S(v),!1;var ye=Y.visualMode?"visual":"normal",Ce=se[2]||se[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==Ce&&(Ce=Y.inputState.operatorShortcut);var me=_n.matchCommand(Ce,bn,Y.inputState,ye);return me.type=="none"?(S(v),!1):me.type=="partial"?(me.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):me.type=="clear"?(S(v),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,se=/^(\d*)(.*)$/.exec(re),se[1]&&se[1]!="0"&&Y.inputState.pushRepeatDigit(se[1]),me.command)}var Y=R(v),Q;return Y.insertMode?Q=B():Q=G(),Q===!1?!Y.insertMode&&$.length===1?function(){return!0}:void 0:Q===!0?function(){return!0}:function(){if(!((Q.operator||Q.isEdit)&&v.getOption("readOnly")))return v.operation(function(){v.curOp.isVimOp=!0;try{Q.type=="keyToKey"?I(v,Q.toKeys,Q):_n.processCommand(v,Y,Q)}catch(re){throw v.state.vim=void 0,R(v),dt.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(v,$){ur.processCommand(v,$)},defineMotion:te,defineAction:le,defineOperator:ne,mapCommand:bs,_mapCommand:Po,defineRegister:U,exitVisualMode:yn,exitInsertMode:jr},Ir=[],Jt=!1,un,Un={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},Lr={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},vi={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(Un)).forEach(function(v){vi[(Un[v]||"").toLowerCase()]=vi[v.toLowerCase()]=v}),L("langmap",void 0,"string",["lmap"],function(v,$){if(v===void 0)return Dn.string;P(v)}),_.prototype.pushRepeatDigit=function(v){this.operator?this.motionRepeat=this.motionRepeat.concat(v):this.prefixRepeat=this.prefixRepeat.concat(v)},_.prototype.getRepeat=function(){var v=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(v=1,this.prefixRepeat.length>0&&(v*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(v*=parseInt(this.motionRepeat.join(""),10))),v},j.prototype={setText:function(v,$,A){this.keyBuffer=[v||""],this.linewise=!!$,this.blockwise=!!A},pushText:function(v,$){$&&(this.linewise||this.keyBuffer.push(`
|
1441
|
+
`),this.linewise=!0),this.keyBuffer.push(v)},pushInsertModeChanges:function(v){this.insertModeChanges.push(An(v))},pushSearchQuery:function(v){this.searchQueries.push(v)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},q.prototype={pushText:function(v,$,A,F,W){if(v!=="_"){F&&A.charAt(A.length-1)!==`
|
1442
|
+
`&&(A+=`
|
1443
|
+
`);var B=this.isValidRegister(v)?this.getRegister(v):null;if(!B){switch($){case"yank":this.registers[0]=new j(A,F,W);break;case"delete":case"change":A.indexOf(`
|
1444
|
+
`)==-1?this.registers["-"]=new j(A,F):(this.shiftNumericRegisters_(),this.registers[1]=new j(A,F))}this.unnamedRegister.setText(A,F,W);return}var G=c(v);G?B.pushText(A,F):B.setText(A,F,W),v==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(A),this.unnamedRegister.setText(B.toString(),F)}},getRegister:function(v){return this.isValidRegister(v)?(v=v.toLowerCase(),this.registers[v]||(this.registers[v]=new j),this.registers[v]):this.unnamedRegister},isValidRegister:function(v){return v&&(b(v,Ut)||Bt.test(v))},shiftNumericRegisters_:function(){for(var v=9;v>=2;v--)this.registers[v]=this.getRegister(""+(v-1))}},Z.prototype={nextMatch:function(v,$){var A=this.historyBuffer,F=$?-1:1;this.initialPrefix===null&&(this.initialPrefix=v);for(var W=this.iterator+F;$?W>=0:W<A.length;W+=F)for(var B=A[W],G=0;G<=B.length;G++)if(this.initialPrefix==B.substring(0,G))return this.iterator=W,B;if(W>=A.length)return this.iterator=A.length,this.initialPrefix;if(W<0)return v},pushInput:function(v){var $=this.historyBuffer.indexOf(v);$>-1&&this.historyBuffer.splice($,1),v.length&&this.historyBuffer.push(v)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var _n={matchCommand:function(v,$,A,F){var W=_e(v,$,F,A);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 B,G=0;G<W.full.length;G++){var Y=W.full[G];B||(B=Y)}if(B.keys.slice(-11)=="<character>"||B.keys.slice(-10)=="<register>"){var Q=Te(v);if(!Q||Q.length>1)return{type:"clear"};A.selectedCharacter=Q}return{type:"full",command:B}},processCommand:function(v,$,A){switch($.inputState.repeatOverride=A.repeatOverride,A.type){case"motion":this.processMotion(v,$,A);break;case"operator":this.processOperator(v,$,A);break;case"operatorMotion":this.processOperatorMotion(v,$,A);break;case"action":this.processAction(v,$,A);break;case"search":this.processSearch(v,$,A);break;case"ex":case"keyToEx":this.processEx(v,$,A);break}},processMotion:function(v,$,A){$.inputState.motion=A.motion,$.inputState.motionArgs=ce(A.motionArgs),this.evalInput(v,$)},processOperator:function(v,$,A){var F=$.inputState;if(F.operator){if(F.operator==A.operator){F.motion="expandToLine",F.motionArgs={linewise:!0},this.evalInput(v,$);return}S(v)}F.operator=A.operator,F.operatorArgs=ce(A.operatorArgs),A.keys.length>1&&(F.operatorShortcut=A.keys),A.exitVisualBlock&&($.visualBlock=!1,Hn(v)),$.visualMode&&this.evalInput(v,$)},processOperatorMotion:function(v,$,A){var F=$.visualMode,W=ce(A.operatorMotionArgs);W&&F&&W.visualLine&&($.visualLine=!0),this.processOperator(v,$,A),F||this.processMotion(v,$,A)},processAction:function(v,$,A){var F=$.inputState,W=F.getRepeat(),B=!!W,G=ce(A.actionArgs)||{};F.selectedCharacter&&(G.selectedCharacter=F.selectedCharacter),A.operator&&this.processOperator(v,$,A),A.motion&&this.processMotion(v,$,A),(A.motion||A.operator)&&this.evalInput(v,$),G.repeat=W||1,G.repeatIsExplicit=B,G.registerName=F.registerName,S(v),$.lastMotion=null,A.isEdit&&this.recordLastEdit($,F,A),$n[A.action](v,G,$)},processSearch:function(v,$,A){function F(Ee,ze,rt){We.searchHistoryController.pushInput(Ee),We.searchHistoryController.reset();try{on(v,Ee,ze,rt)}catch{Lt(v,"Invalid regex: "+Ee),S(v);return}_n.processMotion(v,$,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:A.searchArgs.toJumplist}})}function W(Ee){F(Ee,!0,!0);var ze=We.macroModeState;ze.isRecording&&Cs(ze,Ee)}function B(Ee,ze,rt){var Ke=z(Ee),Je,an;Ke=="<Up>"||Ke=="<Down>"?(Je=Ke=="<Up>",an=Ee.target?Ee.target.selectionEnd:0,ze=We.searchHistoryController.nextMatch(ze,Je)||"",rt(ze),an&&Ee.target&&(Ee.target.selectionEnd=Ee.target.selectionStart=Math.min(an,Ee.target.value.length))):Ke&&Ke!="<Left>"&&Ke!="<Right>"&&We.searchHistoryController.reset();var it;try{it=on(v,ze,!0,!0)}catch{}it?v.scrollIntoView(br(v,!Y,it),30):(Do(v),v.scrollTo(ye.left,ye.top))}function G(Ee,ze,rt){var Ke=z(Ee);Ke=="<Esc>"||Ke=="<C-c>"||Ke=="<C-[>"||Ke=="<BS>"&&ze==""?(We.searchHistoryController.pushInput(ze),We.searchHistoryController.reset(),on(v,se),Do(v),v.scrollTo(ye.left,ye.top),Fe.e_stop(Ee),S(v),rt(),v.focus()):Ke=="<Up>"||Ke=="<Down>"?Fe.e_stop(Ee):Ke=="<C-u>"&&(Fe.e_stop(Ee),rt(""))}if(v.getSearchCursor){var Y=A.searchArgs.forward,Q=A.searchArgs.wholeWordOnly;wn(v).setReversed(!Y);var re=Y?"/":"?",se=wn(v).getQuery(),ye=v.getScrollInfo();switch(A.searchArgs.querySrc){case"prompt":var Ce=We.macroModeState;if(Ce.isPlaying){var Re=Ce.replaySearchQueries.shift();F(Re,!0,!1)}else wr(v,{onClose:W,prefix:re,desc:"(JavaScript regexp)",onKeyUp:B,onKeyDown:G});break;case"wordUnderCursor":var me=Qn(v,{noSymbol:!0}),we=!0;if(me||(me=Qn(v,{noSymbol:!1}),we=!1),!me){Lt(v,"No word under cursor"),S(v);return}var Re=v.getLine(me.start.line).substring(me.start.ch,me.end.ch);we&&Q?Re="\\b"+Re+"\\b":Re=vn(Re),We.jumpList.cachedCursor=v.getCursor(),v.setCursor(me.start),F(Re,!0,!1)}}},processEx:function(v,$,A){function F(B){We.exCommandHistoryController.pushInput(B),We.exCommandHistoryController.reset(),ur.processCommand(v,B),v.state.vim&&S(v)}function W(B,G,Y){var Q=z(B),re,se;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&G=="")&&(We.exCommandHistoryController.pushInput(G),We.exCommandHistoryController.reset(),Fe.e_stop(B),S(v),Y(),v.focus()),Q=="<Up>"||Q=="<Down>"?(Fe.e_stop(B),re=Q=="<Up>",se=B.target?B.target.selectionEnd:0,G=We.exCommandHistoryController.nextMatch(G,re)||"",Y(G),se&&B.target&&(B.target.selectionEnd=B.target.selectionStart=Math.min(se,B.target.value.length))):Q=="<C-u>"?(Fe.e_stop(B),Y("")):Q&&Q!="<Left>"&&Q!="<Right>"&&We.exCommandHistoryController.reset()}A.type=="keyToEx"?ur.processCommand(v,A.exArgs.input):$.visualMode?wr(v,{onClose:F,prefix:":",value:"'<,'>",onKeyDown:W,selectValueOnOpen:!1}):wr(v,{onClose:F,prefix:":",onKeyDown:W})},evalInput:function(v,$){var A=$.inputState,F=A.motion,W=A.motionArgs||{},B=A.operator,G=A.operatorArgs||{},Y=A.registerName,Q=$.sel,re=Ve($.visualMode?ue(v,Q.head):v.getCursor("head")),se=Ve($.visualMode?ue(v,Q.anchor):v.getCursor("anchor")),ye=Ve(re),Ce=Ve(se),me,we,Re;if(B&&this.recordLastEdit($,A),A.repeatOverride!==void 0?Re=A.repeatOverride:Re=A.getRepeat(),Re>0&&W.explicitRepeat?W.repeatIsExplicit=!0:(W.noRepeat||!W.explicitRepeat&&Re===0)&&(Re=1,W.repeatIsExplicit=!1),A.selectedCharacter&&(W.selectedCharacter=G.selectedCharacter=A.selectedCharacter),W.repeat=Re,S(v),F){var Ee=Hr[F](v,re,W,$,A);if($.lastMotion=Hr[F],!Ee)return;if(W.toJumplist){!B&&v.ace.curOp!=null&&(v.ace.curOp.command.scrollIntoView="center-animate");var ze=We.jumpList,rt=ze.cachedCursor;rt?(Li(v,rt,Ee),delete ze.cachedCursor):Li(v,re,Ee)}Ee instanceof Array?(we=Ee[0],me=Ee[1]):me=Ee,me||(me=Ve(re)),$.visualMode?((!$.visualBlock||me.ch!==1/0)&&(me=ue(v,me,ye)),we&&(we=ue(v,we)),we=we||Ce,Q.anchor=we,Q.head=me,Hn(v),Jr(v,$,"<",tt(we,me)?we:me),Jr(v,$,">",tt(we,me)?me:we)):B||(v.ace.curOp&&(v.ace.curOp.vimDialogScroll="center-animate"),me=ue(v,me,ye),v.setCursor(me.line,me.ch))}if(B){if(G.lastSel){we=Ce;var Ke=G.lastSel,Je=Math.abs(Ke.head.line-Ke.anchor.line),an=Math.abs(Ke.head.ch-Ke.anchor.ch);Ke.visualLine?me=new Oe(Ce.line+Je,Ce.ch):Ke.visualBlock?me=new Oe(Ce.line+Je,Ce.ch+an):Ke.head.line==Ke.anchor.line?me=new Oe(Ce.line,Ce.ch+an):me=new Oe(Ce.line+Je,Ce.ch),$.visualMode=!0,$.visualLine=Ke.visualLine,$.visualBlock=Ke.visualBlock,Q=$.sel={anchor:we,head:me},Hn(v)}else $.visualMode&&(G.lastSel={anchor:Ve(Q.anchor),head:Ve(Q.head),visualBlock:$.visualBlock,visualLine:$.visualLine});var it,dn,ft,bt,Vn;if($.visualMode){it=ht(Q.head,Q.anchor),dn=Xt(Q.head,Q.anchor),ft=$.visualLine||G.linewise,bt=$.visualBlock?"block":ft?"line":"char";var or=x(v,it,dn);if(Vn=Tr(v,{anchor:or.start,head:or.end},bt),ft){var pn=Vn.ranges;if(bt=="block")for(var V=0;V<pn.length;V++)pn[V].head.ch=Kt(v,pn[V].head.line);else bt=="line"&&(pn[0].head=new Oe(pn[0].head.line+1,0))}}else{if(it=Ve(we||Ce),dn=Ve(me||ye),tt(dn,it)){var X=it;it=dn,dn=X}ft=W.linewise||G.linewise,ft?nr(v,it,dn):W.forward&&Xn(v,it,dn),bt="char";var ie=!W.inclusive||ft,or=x(v,it,dn);Vn=Tr(v,{anchor:or.start,head:or.end},bt,ie)}v.setSelections(Vn.ranges,Vn.primary),$.lastMotion=null,G.repeat=Re,G.registerName=Y,G.linewise=ft;var oe=Go[B](v,G,Vn.ranges,Ce,me);$.visualMode&&yn(v,oe!=null),oe&&v.setCursor(oe)}},recordLastEdit:function(v,$,A){var F=We.macroModeState;F.isPlaying||(v.lastEditInputState=$,v.lastEditActionCommand=A,F.lastInsertModeChanges.changes=[],F.lastInsertModeChanges.expectCursorActivityForChange=!1,F.lastInsertModeChanges.visualBlock=v.visualBlock?v.sel.head.line-v.sel.anchor.line:0)}},Hr={moveToTopLine:function(v,$,A){var F=Yi(v).top+A.repeat-1;return new Oe(F,Qt(v.getLine(F)))},moveToMiddleLine:function(v){var $=Yi(v),A=Math.floor(($.top+$.bottom)*.5);return new Oe(A,Qt(v.getLine(A)))},moveToBottomLine:function(v,$,A){var F=Yi(v).bottom-A.repeat+1;return new Oe(F,Qt(v.getLine(F)))},expandToLine:function(v,$,A){var F=$;return new Oe(F.line+A.repeat-1,1/0)},findNext:function(v,$,A){var F=wn(v),W=F.getQuery();if(W){var B=!A.forward;return B=F.isReversed()?!B:B,di(v,W),br(v,B,W,A.repeat)}},findAndSelectNextInclusive:function(v,$,A,F,W){var B=wn(v),G=B.getQuery();if(G){var Y=!A.forward;Y=B.isReversed()?!Y:Y;var Q=pi(v,Y,G,A.repeat,F);if(Q){if(W.operator)return Q;var re=Q[0],se=new Oe(Q[1].line,Q[1].ch-1);if(F.visualMode){(F.visualLine||F.visualBlock)&&(F.visualLine=!1,F.visualBlock=!1,Fe.signal(v,"vim-mode-change",{mode:"visual",subMode:""}));var ye=F.sel.anchor;if(ye)return B.isReversed()?A.forward?[ye,re]:[ye,se]:A.forward?[ye,se]:[ye,re]}else F.visualMode=!0,F.visualLine=!1,F.visualBlock=!1,Fe.signal(v,"vim-mode-change",{mode:"visual",subMode:""});return Y?[se,re]:[re,se]}}},goToMark:function(v,$,A,F){var W=zr(v,F,A.selectedCharacter);return W?A.linewise?{line:W.line,ch:Qt(v.getLine(W.line))}:W:null},moveToOtherHighlightedEnd:function(v,$,A,F){if(F.visualBlock&&A.sameLine){var W=F.sel;return[ue(v,new Oe(W.anchor.line,W.head.ch)),ue(v,new Oe(W.head.line,W.anchor.ch))]}return[F.sel.head,F.sel.anchor]},jumpToMark:function(v,$,A,F){for(var W=$,B=0;B<A.repeat;B++){var G=W;for(var Y in F.marks)if(u(Y)){var Q=F.marks[Y].find(),re=A.forward?tt(Q,G):tt(G,Q);if(!re&&!(A.linewise&&Q.line==G.line)){var se=lt(G,W),ye=A.forward?Rn(G,Q,W):Rn(W,Q,G);(se||ye)&&(W=Q)}}}return A.linewise&&(W=new Oe(W.line,Qt(v.getLine(W.line)))),W},moveByCharacters:function(v,$,A){var F=$,W=A.repeat,B=A.forward?F.ch+W:F.ch-W;return new Oe(F.line,B)},moveByLines:function(v,$,A,F){var W=$,B=W.ch;switch(F.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:B=F.lastHPos;break;default:F.lastHPos=B}var G=A.repeat+(A.repeatOffset||0),Y=A.forward?W.line+G:W.line-G,Q=v.firstLine(),re=v.lastLine();if(Y<Q&&W.line==Q)return this.moveToStartOfLine(v,$,A,F);if(Y>re&&W.line==re)return co(v,$,A,F,!0);var se=v.ace.session.getFoldLine(Y);return se&&(A.forward?Y>se.start.row&&(Y=se.end.row+1):Y=se.start.row),A.toFirstChar&&(B=Qt(v.getLine(Y)),F.lastHPos=B),F.lastHSPos=v.charCoords(new Oe(Y,B),"div").left,new Oe(Y,B)},moveByDisplayLines:function(v,$,A,F){var W=$;switch(F.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:F.lastHSPos=v.charCoords(W,"div").left}var B=A.repeat,Q=v.findPosV(W,A.forward?B:-B,"line",F.lastHSPos);if(Q.hitSide)if(A.forward)var G=v.charCoords(Q,"div"),Y={top:G.top+8,left:F.lastHSPos},Q=v.coordsChar(Y,"div");else{var re=v.charCoords(new Oe(v.firstLine(),0),"div");re.left=F.lastHSPos,Q=v.coordsChar(re,"div")}return F.lastHPos=Q.ch,Q},moveByPage:function(v,$,A){var F=$,W=A.repeat;return v.findPosV(F,A.forward?W:-W,"page")},moveByParagraph:function(v,$,A){var F=A.forward?1:-1;return vs(v,$,A.repeat,F)},moveBySentence:function(v,$,A){var F=A.forward?1:-1;return Oi(v,$,A.repeat,F)},moveByScroll:function(v,$,A,F){var W=v.getScrollInfo(),B=null,G=A.repeat;G||(G=W.clientHeight/(2*v.defaultTextHeight()));var Y=v.charCoords($,"local");if(A.repeat=G,B=Hr.moveByDisplayLines(v,$,A,F),!B)return null;var Q=v.charCoords(B,"local");return v.scrollTo(null,W.top+Q.top-Y.top),B},moveByWords:function(v,$,A){return lr(v,$,A.repeat,!!A.forward,!!A.wordEnd,!!A.bigWord)},moveTillCharacter:function(v,$,A){var F=A.repeat,W=No(v,F,A.forward,A.selectedCharacter,$),B=A.forward?-1:1;return Ei(B,A),W?(W.ch+=B,W):null},moveToCharacter:function(v,$,A){var F=A.repeat;return Ei(0,A),No(v,F,A.forward,A.selectedCharacter,$)||$},moveToSymbol:function(v,$,A){var F=A.repeat;return Ri(v,F,A.forward,A.selectedCharacter)||$},moveToColumn:function(v,$,A,F){var W=A.repeat;return F.lastHPos=W-1,F.lastHSPos=v.charCoords($,"div").left,Ka(v,W)},moveToEol:function(v,$,A,F){return co(v,$,A,F,!1)},moveToFirstNonWhiteSpaceCharacter:function(v,$){var A=$;return new Oe(A.line,Qt(v.getLine(A.line)))},moveToMatchedSymbol:function(v,$){for(var A=$,F=A.line,W=A.ch,B=v.getLine(F),G;W<B.length;W++)if(G=B.charAt(W),G&&l(G)){var Y=v.getTokenTypeAt(new Oe(F,W+1));if(Y!=="string"&&Y!=="comment")break}if(W<B.length){var Q=/[<>]/.test(B[W])?/[(){}[\]<>]/:/[(){}[\]]/,re=v.findMatchingBracket(new Oe(F,W+1),{bracketRegex:Q});return re.to}return A},moveToStartOfLine:function(v,$){return new Oe($.line,0)},moveToLineOrEdgeOfDocument:function(v,$,A){var F=A.forward?v.lastLine():v.firstLine();return A.repeatIsExplicit&&(F=A.repeat-v.getOption("firstLineNumber")),new Oe(F,Qt(v.getLine(F)))},moveToStartOfDisplayLine:function(v){return v.execCommand("goLineLeft"),v.getCursor()},moveToEndOfDisplayLine:function(v){v.execCommand("goLineRight");var $=v.getCursor();return $.sticky=="before"&&$.ch--,$},textObjectManipulation:function(v,$,A,F){var W={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},B={"'":!0,'"':!0,"`":!0},G=A.selectedCharacter;G=="b"?G="(":G=="B"&&(G="{");var Y=!A.textObjectInner,Q,re;if(W[G]){if(re=!0,Q=On(v,$,G,Y),!Q){var se=v.getSearchCursor(new RegExp("\\"+G,"g"),$);se.find()&&(Q=On(v,se.from(),G,Y))}}else if(B[G])re=!0,Q=vr(v,$,G,Y);else if(G==="W"||G==="w")for(var ye=A.repeat||1;ye-- >0;){var Ce=Qn(v,{inclusive:Y,innerWord:!Y,bigWord:G==="W",noSymbol:G==="W",multiline:!0},Q&&Q.end);Ce&&(Q||(Q=Ce),Q.end=Ce.end)}else if(G==="p")if(Q=vs(v,$,A.repeat,0,Y),A.linewise=!0,F.visualMode)F.visualLine||(F.visualLine=!0);else{var me=F.inputState.operatorArgs;me&&(me.linewise=!0),Q.end.line--}else if(G==="t")Q=ao(v,$,Y);else if(G==="s"){var we=v.getLine($.line);$.ch>0&&w(we[$.ch])&&($.ch-=1);var Re=na(v,$,A.repeat,1,Y),Ee=na(v,$,A.repeat,-1,Y);p(v.getLine(Ee.line)[Ee.ch])&&p(v.getLine(Re.line)[Re.ch-1])&&(Ee={line:Ee.line,ch:Ee.ch+1}),Q={start:Ee,end:Re}}return Q?v.state.vim.visualMode?cn(v,Q.start,Q.end,re):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(v,$,A){var F=We.lastCharacterSearch,W=A.repeat,B=A.forward===F.forward,G=(F.increment?1:0)*(B?-1:1);v.moveH(-G,"char"),A.inclusive=!!B;var Y=No(v,W,B,F.selectedCharacter);return Y?(Y.ch+=G,Y):(v.moveH(G,"char"),$)}},Go={change:function(v,$,A){var F,W,B=v.state.vim,G=A[0].anchor,Y=A[0].head;if(B.visualMode)if($.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,v.setSelection(G,Y),W=v.getSelection(),v.replaceSelection(""),F=G;else{W=v.getSelection();var Q=he("",A.length);v.replaceSelections(Q),F=ht(A[0].head,A[0].anchor)}else{W=v.getRange(G,Y);var re=B.lastEditInputState||{};if(re.motion=="moveByWords"&&!p(W)){var se=/\s+$/.exec(W);se&&re.motionArgs&&re.motionArgs.forward&&(Y=fe(Y,0,-se[0].length),W=W.slice(0,-se[0].length))}$.linewise&&(G=new Oe(G.line,Qt(v.getLine(G.line))),Y.line>G.line&&(Y=new Oe(Y.line-1,Number.MAX_VALUE))),v.replaceRange("",G,Y),F=G}We.registerController.pushText($.registerName,"change",W,$.linewise,A.length>1),$n.enterInsertMode(v,{head:F},v.state.vim)},delete:function(v,$,A){var F,W,B=v.state.vim;if(B.visualBlock){W=v.getSelection();var G=he("",A.length);v.replaceSelections(G),F=ht(A[0].head,A[0].anchor)}else{var Y=A[0].anchor,Q=A[0].head;$.linewise&&Q.line!=v.firstLine()&&Y.line==v.lastLine()&&Y.line==Q.line-1&&(Y.line==v.firstLine()?Y.ch=0:Y=new Oe(Y.line-1,Kt(v,Y.line-1))),W=v.getRange(Y,Q),v.replaceRange("",Y,Q),F=Y,$.linewise&&(F=Hr.moveToFirstNonWhiteSpaceCharacter(v,Y))}return We.registerController.pushText($.registerName,"delete",W,$.linewise,B.visualBlock),ue(v,F)},indent:function(v,$,A){var F=v.state.vim,W=F.visualMode?$.repeat:1;if(F.visualBlock){for(var B=v.getOption("tabSize"),G=v.getOption("indentWithTabs")?" ":" ".repeat(B),Y,Q=A.length-1;Q>=0;Q--)if(Y=ht(A[Q].anchor,A[Q].head),$.indentRight)v.replaceRange(G.repeat(W),Y,Y);else{for(var re=v.getLine(Y.line),se=0,ye=0;ye<W;ye++){var Ce=re[Y.ch+se];if(Ce==" ")se++;else{if(Ce!=" ")break;se++;for(var me=1;me<G.length&&(Ce=re[Y.ch+se],Ce===" ");me++)se++}}v.replaceRange("",Y,fe(Y,0,se))}return Y}if(v.indentMore)for(var ye=0;ye<W;ye++)$.indentRight?v.indentMore():v.indentLess();else{var we=A[0].anchor.line,Re=F.visualBlock?A[A.length-1].anchor.line:A[0].head.line;$.linewise&&Re--;for(var Q=we;Q<=Re;Q++)for(var ye=0;ye<W;ye++)v.indentLine(Q,$.indentRight)}return Hr.moveToFirstNonWhiteSpaceCharacter(v,A[0].anchor)},indentAuto:function(v,$,A){return v.execCommand("indentAuto"),Hr.moveToFirstNonWhiteSpaceCharacter(v,A[0].anchor)},hardWrap:function(v,$,A,F,W){if(v.hardWrap){var B=A[0].anchor.line,G=A[0].head.line;$.linewise&&G--;var Y=v.hardWrap({from:B,to:G});return Y>B&&$.linewise&&Y--,$.keepCursor?F:new Oe(Y,0)}},changeCase:function(v,$,A,F,W){for(var B=v.getSelections(),G=[],Y=$.toLower,Q=0;Q<B.length;Q++){var re=B[Q],se="";if(Y===!0)se=re.toLowerCase();else if(Y===!1)se=re.toUpperCase();else for(var ye=0;ye<re.length;ye++){var Ce=re.charAt(ye);se+=c(Ce)?Ce.toLowerCase():Ce.toUpperCase()}G.push(se)}return v.replaceSelections(G),$.shouldMoveCursor?W:!v.state.vim.visualMode&&$.linewise&&A[0].anchor.line+1==A[0].head.line?Hr.moveToFirstNonWhiteSpaceCharacter(v,F):$.linewise?F:ht(A[0].anchor,A[0].head)},yank:function(v,$,A,F){var W=v.state.vim,B=v.getSelection(),G=W.visualMode?ht(W.sel.anchor,W.sel.head,A[0].head,A[0].anchor):F;return We.registerController.pushText($.registerName,"yank",B,$.linewise,W.visualBlock),G}},$n={jumpListWalk:function(v,$,A){if(!A.visualMode){var F=$.repeat,W=$.forward,B=We.jumpList,G=B.move(v,W?F:-F),Y=G?G.find():void 0;Y=Y||v.getCursor(),v.setCursor(Y),v.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(v,$,A){if(!A.visualMode){var F=$.repeat||1,W=v.defaultTextHeight(),B=v.getScrollInfo().top,G=W*F,Y=$.forward?B+G:B-G,Q=Ve(v.getCursor()),re=v.charCoords(Q,"local");if($.forward)Y>re.top?(Q.line+=(Y-re.top)/W,Q.line=Math.ceil(Q.line),v.setCursor(Q),re=v.charCoords(Q,"local"),v.scrollTo(null,re.top)):v.scrollTo(null,Y);else{var se=Y+v.getScrollInfo().clientHeight;se<re.bottom?(Q.line-=(re.bottom-se)/W,Q.line=Math.floor(Q.line),v.setCursor(Q),re=v.charCoords(Q,"local"),v.scrollTo(null,re.bottom-v.getScrollInfo().clientHeight)):v.scrollTo(null,Y)}}},scrollToCursor:function(v,$){var A=v.getCursor().line,F=v.charCoords(new Oe(A,0),"local"),W=v.getScrollInfo().clientHeight,B=F.top;switch($.position){case"center":B=F.bottom-W/2;break;case"bottom":var G=new Oe(A,v.getLine(A).length-1),Y=v.charCoords(G,"local"),Q=Y.bottom-B;B=B-W+Q}v.scrollTo(null,B)},replayMacro:function(v,$,A){var F=$.selectedCharacter,W=$.repeat,B=We.macroModeState;for(F=="@"?F=B.latestRegister:B.latestRegister=F;W--;)xs(v,A,B,F)},enterMacroRecordMode:function(v,$){var A=We.macroModeState,F=$.selectedCharacter;We.registerController.isValidRegister(F)&&A.enterMacroRecordMode(v,F)},toggleOverwrite:function(v){v.state.overwrite?(v.toggleOverwrite(!1),v.setOption("keyMap","vim-insert"),Fe.signal(v,"vim-mode-change",{mode:"insert"})):(v.toggleOverwrite(!0),v.setOption("keyMap","vim-replace"),Fe.signal(v,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(v,$,A){if(!v.getOption("readOnly")){A.insertMode=!0,A.insertModeRepeat=$&&$.repeat||1;var F=$?$.insertAt:null,W=A.sel,B=$.head||v.getCursor("head"),G=v.listSelections().length;if(F=="eol")B=new Oe(B.line,Kt(v,B.line));else if(F=="bol")B=new Oe(B.line,0);else if(F=="charAfter"){var Y=x(v,B,fe(B,0,1));B=Y.end}else if(F=="firstNonBlank"){var Y=x(v,B,Hr.moveToFirstNonWhiteSpaceCharacter(v,B));B=Y.end}else if(F=="startOfSelectedArea"){if(!A.visualMode)return;A.visualBlock?(B=new Oe(Math.min(W.head.line,W.anchor.line),Math.min(W.head.ch,W.anchor.ch)),G=Math.abs(W.head.line-W.anchor.line)+1):W.head.line<W.anchor.line?B=W.head:B=new Oe(W.anchor.line,0)}else if(F=="endOfSelectedArea"){if(!A.visualMode)return;A.visualBlock?(B=new Oe(Math.min(W.head.line,W.anchor.line),Math.max(W.head.ch,W.anchor.ch)+1),G=Math.abs(W.head.line-W.anchor.line)+1):W.head.line>=W.anchor.line?B=fe(W.head,0,1):B=new Oe(W.anchor.line,0)}else if(F=="inplace"){if(A.visualMode)return}else F=="lastEdit"&&(B=uo(v)||B);v.setOption("disableInput",!1),$&&$.replace?(v.toggleOverwrite(!0),v.setOption("keyMap","vim-replace"),Fe.signal(v,"vim-mode-change",{mode:"replace"})):(v.toggleOverwrite(!1),v.setOption("keyMap","vim-insert"),Fe.signal(v,"vim-mode-change",{mode:"insert"})),We.macroModeState.isPlaying||(v.on("change",ho),A.insertEnd&&A.insertEnd.clear(),A.insertEnd=v.setBookmark(B,{insertLeft:!0}),Fe.on(v.getInputField(),"keydown",ks)),A.visualMode&&yn(v),Mr(v,B,G)}},toggleVisualMode:function(v,$,A){var F=$.repeat,W=v.getCursor(),B;if(A.visualMode)A.visualLine^$.linewise||A.visualBlock^$.blockwise?(A.visualLine=!!$.linewise,A.visualBlock=!!$.blockwise,Fe.signal(v,"vim-mode-change",{mode:"visual",subMode:A.visualLine?"linewise":A.visualBlock?"blockwise":""}),Hn(v)):yn(v);else{A.visualMode=!0,A.visualLine=!!$.linewise,A.visualBlock=!!$.blockwise,B=ue(v,new Oe(W.line,W.ch+F-1));var G=x(v,W,B);A.sel={anchor:G.start,head:G.end},Fe.signal(v,"vim-mode-change",{mode:"visual",subMode:A.visualLine?"linewise":A.visualBlock?"blockwise":""}),Hn(v),Jr(v,A,"<",ht(W,B)),Jr(v,A,">",Xt(W,B))}},reselectLastSelection:function(v,$,A){var F=A.lastSelection;if(A.visualMode&&Wt(v,A),F){var W=F.anchorMark.find(),B=F.headMark.find();if(!W||!B)return;A.sel={anchor:W,head:B},A.visualMode=!0,A.visualLine=F.visualLine,A.visualBlock=F.visualBlock,Hn(v),Jr(v,A,"<",ht(W,B)),Jr(v,A,">",Xt(W,B)),Fe.signal(v,"vim-mode-change",{mode:"visual",subMode:A.visualLine?"linewise":A.visualBlock?"blockwise":""})}},joinLines:function(v,$,A){var F,W;if(A.visualMode){if(F=v.getCursor("anchor"),W=v.getCursor("head"),tt(W,F)){var B=W;W=F,F=B}W.ch=Kt(v,W.line)-1}else{var G=Math.max($.repeat,2);F=v.getCursor(),W=ue(v,new Oe(F.line+G-1,1/0))}for(var Y=0,Q=F.line;Q<W.line;Q++){Y=Kt(v,F.line);var re="",se=0;if(!$.keepSpaces){var ye=v.getLine(F.line+1);se=ye.search(/\S/),se==-1?se=ye.length:re=" "}v.replaceRange(re,new Oe(F.line,Y),new Oe(F.line+1,se))}var Ce=ue(v,new Oe(F.line,Y));A.visualMode&&yn(v,!1),v.setCursor(Ce)},newLineAndEnterInsertMode:function(v,$,A){A.insertMode=!0;var F=Ve(v.getCursor());if(F.line===v.firstLine()&&!$.after)v.replaceRange(`
|
1445
|
+
`,new Oe(v.firstLine(),0)),v.setCursor(v.firstLine(),0);else{F.line=$.after?F.line:F.line-1,F.ch=Kt(v,F.line),v.setCursor(F);var W=Fe.commands.newlineAndIndentContinueComment||Fe.commands.newlineAndIndent;W(v)}this.enterInsertMode(v,{repeat:$.repeat},A)},paste:function(v,$,A){var F=this,W=We.registerController.getRegister($.registerName),B=function(){var G=W.toString();F.continuePaste(v,$,A,G,W)};$.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(G){F.continuePaste(v,$,A,G,W)},function(){B()}):B()},continuePaste:function(v,$,A,F,W){var B=Ve(v.getCursor());if(F){if($.matchIndent){var G=v.getOption("tabSize"),Y=function(pn){var V=pn.split(" ").length-1,X=pn.split(" ").length-1;return V*G+X*1},Q=v.getLine(v.getCursor().line),re=Y(Q.match(/^\s*/)[0]),se=F.replace(/\n$/,""),ye=F!==se,Ce=Y(F.match(/^\s*/)[0]),F=se.replace(/^\s*/gm,function(pn){var V=re+(Y(pn)-Ce);if(V<0)return"";if(v.getOption("indentWithTabs")){var X=Math.floor(V/G);return Array(X+1).join(" ")}return Array(V+1).join(" ")});F+=ye?`
|
1446
|
+
`:""}if($.repeat>1)var F=Array($.repeat+1).join(F);var me=W.linewise,we=W.blockwise;if(we){F=F.split(`
|
1447
|
+
`),me&&F.pop();for(var Re=0;Re<F.length;Re++)F[Re]=F[Re]==""?" ":F[Re];B.ch+=$.after?1:0,B.ch=Math.min(Kt(v,B.line),B.ch)}else me?A.visualMode?F=A.visualLine?F.slice(0,-1):`
|
1448
|
+
`+F.slice(0,F.length-1)+`
|
1449
|
+
`:$.after?(F=`
|
1450
|
+
`+F.slice(0,F.length-1),B.ch=Kt(v,B.line)):B.ch=0:B.ch+=$.after?1:0;var Ee;if(A.visualMode){A.lastPastedText=F;var ze,rt=He(v,A),Ke=rt[0],Je=rt[1],an=v.getSelection(),it=v.listSelections(),dn=new Array(it.length).join("1").split("1");A.lastSelection&&(ze=A.lastSelection.headMark.find()),We.registerController.unnamedRegister.setText(an),we?(v.replaceSelections(dn),Je=new Oe(Ke.line+F.length-1,Ke.ch),v.setCursor(Ke),tr(v,Je),v.replaceSelections(F),Ee=Ke):A.visualBlock?(v.replaceSelections(dn),v.setCursor(Ke),v.replaceRange(F,Ke,Ke),Ee=Ke):(v.replaceRange(F,Ke,Je),Ee=v.posFromIndex(v.indexFromPos(Ke)+F.length-1)),ze&&(A.lastSelection.headMark=v.setBookmark(ze)),me&&(Ee.ch=0)}else if(we){v.setCursor(B);for(var Re=0;Re<F.length;Re++){var ft=B.line+Re;ft>v.lastLine()&&v.replaceRange(`
|
1451
|
+
`,new Oe(ft,0));var bt=Kt(v,ft);bt<B.ch&&jn(v,ft,B.ch)}v.setCursor(B),tr(v,new Oe(B.line+F.length-1,B.ch)),v.replaceSelections(F),Ee=B}else if(v.replaceRange(F,B),me){var ft=$.after?B.line+1:B.line;Ee=new Oe(ft,Qt(v.getLine(ft)))}else Ee=Ve(B),/\n/.test(F)||(Ee.ch+=F.length-($.after?1:0));A.visualMode&&yn(v,!1),v.setCursor(Ee)}},undo:function(v,$){v.operation(function(){qe(v,Fe.commands.undo,$.repeat)(),v.setCursor(ue(v,v.getCursor("start")))})},redo:function(v,$){qe(v,Fe.commands.redo,$.repeat)()},setRegister:function(v,$,A){A.inputState.registerName=$.selectedCharacter},insertRegister:function(v,$,A){var F=$.selectedCharacter,W=We.registerController.getRegister(F),B=W&&W.toString();B&&v.replaceSelection(B)},oneNormalCommand:function(v,$,A){jr(v,!0),A.insertModeReturn=!0,Fe.on(v,"vim-command-done",function F(){A.visualMode||(A.insertModeReturn&&(A.insertModeReturn=!1,A.insertMode||$n.enterInsertMode(v,{},A)),Fe.off(v,"vim-command-done",F))})},setMark:function(v,$,A){var F=$.selectedCharacter;Jr(v,A,F,v.getCursor())},replace:function(v,$,A){var F=$.selectedCharacter,W=v.getCursor(),B,G,Y=v.listSelections();if(A.visualMode)W=v.getCursor("start"),G=v.getCursor("end");else{var Q=v.getLine(W.line);B=W.ch+$.repeat,B>Q.length&&(B=Q.length),G=new Oe(W.line,B)}var re=x(v,W,G);if(W=re.start,G=re.end,F==`
|
1452
|
+
`)A.visualMode||v.replaceRange("",W,G),(Fe.commands.newlineAndIndentContinueComment||Fe.commands.newlineAndIndent)(v);else{var se=v.getRange(W,G);if(se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,F),se=se.replace(/[^\n]/g,F),A.visualBlock){var ye=new Array(v.getOption("tabSize")+1).join(" ");se=v.getSelection(),se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,F),se=se.replace(/\t/g,ye).replace(/[^\n]/g,F).split(`
|
1453
|
+
`),v.replaceSelections(se)}else v.replaceRange(se,W,G);A.visualMode?(W=tt(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,v.setCursor(W),yn(v,!1)):v.setCursor(fe(G,0,-1))}},incrementNumberToken:function(v,$){for(var A=v.getCursor(),F=v.getLine(A.line),W=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,B,G,Y,Q;(B=W.exec(F))!==null&&(G=B.index,Y=G+B[0].length,!(A.ch<Y)););if(!(!$.backtrack&&Y<=A.ch)&&B){var re=B[2]||B[4],se=B[3]||B[5],ye=$.increase?1:-1,Ce={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],me=parseInt(B[1]+se,Ce)+ye*$.repeat;Q=me.toString(Ce);var we=re?new Array(se.length-Q.length+1+B[1].length).join("0"):"";Q.charAt(0)==="-"?Q="-"+re+we+Q.substr(1):Q=re+we+Q;var Re=new Oe(A.line,G),Ee=new Oe(A.line,Y);v.replaceRange(Q,Re,Ee),v.setCursor(new Oe(A.line,G+Q.length-1))}},repeatLastEdit:function(v,$,A){var F=A.lastEditInputState;if(F){var W=$.repeat;W&&$.repeatIsExplicit?A.lastEditInputState.repeatOverride=W:W=A.lastEditInputState.repeatOverride||W,oa(v,A,W,!1)}},indent:function(v,$){v.indentLine(v.getCursor().line,$.indentRight)},exitInsertMode:jr},ni={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},ri={bracket:{isComplete:function(v){if(v.nextCh===v.symb){if(v.depth++,v.depth>=1)return!0}else v.nextCh===v.reverseSymb&&v.depth--;return!1}},section:{init:function(v){v.curMoveThrough=!0,v.symb=(v.forward?"]":"[")===v.symb?"{":"}"},isComplete:function(v){return v.index===0&&v.nextCh===v.symb}},comment:{isComplete:function(v){var $=v.lastCh==="*"&&v.nextCh==="/";return v.lastCh=v.nextCh,$}},method:{init:function(v){v.symb=v.symb==="m"?"{":"}",v.reverseSymb=v.symb==="{"?"}":"{"},isComplete:function(v){return v.nextCh===v.symb}},preprocess:{init:function(v){v.index=0},isComplete:function(v){if(v.nextCh==="#"){var $=v.lineText.match(/^#(\w+)/)[1];if($==="endif"){if(v.forward&&v.depth===0)return!0;v.depth++}else if($==="if"){if(!v.forward&&v.depth===0)return!0;v.depth--}if($==="else"&&v.depth===0)return!0}return!1}}};L("pcre",!0,"boolean"),Ni.prototype={getQuery:function(){return We.query},setQuery:function(v){We.query=v},getOverlay:function(){return this.searchOverlay},setOverlay:function(v){this.searchOverlay=v},isReversed:function(){return We.isReversed},setReversed:function(v){We.isReversed=v},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(v){this.annotate=v}};var yi={"\\n":`
|
1454
|
+
`,"\\r":"\r","\\t":" "},rr={"\\/":"/","\\\\":"\\","\\n":`
|
1455
|
+
`,"\\r":"\r","\\t":" ","\\&":"&"},ir=0,cr=function(){this.buildCommandMap_()};cr.prototype={processCommand:function(v,$,A){var F=this;v.operation(function(){v.curOp.isVimOp=!0,F._processCommand(v,$,A)})},_processCommand:function(v,$,A){var F=v.state.vim,W=We.registerController.getRegister(":"),B=W.toString(),G=new Fe.StringStream($);W.setText($);var Y=A||{};Y.input=$;try{this.parseInput_(v,G,Y)}catch(se){throw Lt(v,se.toString()),se}F.visualMode&&yn(v);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(B),this.parseCommandArgs_(G,Y,Q),Q.type=="exToKey"){I(v,Q.toKeys,Q);return}if(Q.type=="exToEx"){this.processCommand(v,Q.toInput);return}}if(!re){Lt(v,'Not an editor command ":'+$+'"');return}try{As[re](v,Y),(!Q||!Q.possiblyAsync)&&Y.callback&&Y.callback()}catch(se){throw Lt(v,se.toString()),se}},parseInput_:function(v,$,A){if($.eatWhile(":"),$.eat("%")?(A.line=v.firstLine(),A.lineEnd=v.lastLine()):(A.line=this.parseLineSpec_(v,$),A.line!==void 0&&$.eat(",")&&(A.lineEnd=this.parseLineSpec_(v,$))),A.line==null)if(v.state.vim.visualMode){var F=zr(v,v.state.vim,"<");A.selectionLine=F&&F.line,F=zr(v,v.state.vim,">"),A.selectionLineEnd=F&&F.line}else A.selectionLine=v.getCursor().line;else A.selectionLine=A.line,A.selectionLineEnd=A.lineEnd;var W=$.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return W?A.commandName=W[1]:A.commandName=$.match(/.*/)[0],A},parseLineSpec_:function(v,$){var A=$.match(/^(\d+)/);if(A)return parseInt(A[1],10)-1;switch($.next()){case".":return this.parseLineSpecOffset_($,v.getCursor().line);case"$":return this.parseLineSpecOffset_($,v.lastLine());case"'":var F=$.next(),W=zr(v,v.state.vim,F);if(!W)throw new Error("Mark not set");return this.parseLineSpecOffset_($,W.line);case"-":case"+":return $.backUp(1),this.parseLineSpecOffset_($,v.getCursor().line);default:return $.backUp(1),void 0}},parseLineSpecOffset_:function(v,$){var A=v.match(/^([+-])?(\d+)/);if(A){var F=parseInt(A[2],10);A[1]=="-"?$-=F:$+=F}return $},parseCommandArgs_:function(v,$,A){if(!v.eol()){$.argString=v.match(/.*/)[0];var F=A.argDelimiter||/\s+/,W=Zr($.argString).split(F);W.length&&W[0]&&($.args=W)}},matchCommand_:function(v){for(var $=v.length;$>0;$--){var A=v.substring(0,$);if(this.commandMap_[A]){var F=this.commandMap_[A];if(F.name.indexOf(v)===0)return F}}return null},buildCommandMap_:function(){this.commandMap_={};for(var v=0;v<ti.length;v++){var $=ti[v],A=$.shortName||$.name;this.commandMap_[A]=$}},map:function(v,$,A,F){if(v!=":"&&v.charAt(0)==":"){if(A)throw Error("Mode not supported for ex mappings");var W=v.substring(1);$!=":"&&$.charAt(0)==":"?this.commandMap_[W]={name:W,type:"exToEx",toInput:$.substring(1),user:!0}:this.commandMap_[W]={name:W,type:"exToKey",toKeys:$,user:!0}}else{var B={keys:v,type:"keyToKey",toKeys:$,noremap:!!F};A&&(B.context=A),bn.unshift(B)}},unmap:function(v,$){if(v!=":"&&v.charAt(0)==":"){if($)throw Error("Mode not supported for ex mappings");var A=v.substring(1);if(this.commandMap_[A]&&this.commandMap_[A].user)return delete this.commandMap_[A],!0}else for(var F=v,W=0;W<bn.length;W++)if(F==bn[W].keys&&bn[W].context===$)return bn.splice(W,1),!0}};var As={colorscheme:function(v,$){if(!$.args||$.args.length<1){Lt(v,v.getOption("theme"));return}v.setOption("theme",$.args[0])},map:function(v,$,A,F){var W=$.args;if(!W||W.length<2){v&&Lt(v,"Invalid mapping: "+$.input);return}ur.map(W[0],W[1],A,F)},imap:function(v,$){this.map(v,$,"insert")},nmap:function(v,$){this.map(v,$,"normal")},vmap:function(v,$){this.map(v,$,"visual")},omap:function(v,$){this.map(v,$,"operatorPending")},noremap:function(v,$){this.map(v,$,void 0,!0)},inoremap:function(v,$){this.map(v,$,"insert",!0)},nnoremap:function(v,$){this.map(v,$,"normal",!0)},vnoremap:function(v,$){this.map(v,$,"visual",!0)},onoremap:function(v,$){this.map(v,$,"operatorPending",!0)},unmap:function(v,$,A){var F=$.args;(!F||F.length<1||!ur.unmap(F[0],A))&&v&&Lt(v,"No such mapping: "+$.input)},mapclear:function(v,$){dt.mapclear()},imapclear:function(v,$){dt.mapclear("insert")},nmapclear:function(v,$){dt.mapclear("normal")},vmapclear:function(v,$){dt.mapclear("visual")},omapclear:function(v,$){dt.mapclear("operatorPending")},move:function(v,$){_n.processCommand(v,v.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:$.line+1})},set:function(v,$){var A=$.args,F=$.setCfg||{};if(!A||A.length<1){v&&Lt(v,"Invalid mapping: "+$.input);return}var W=A[0].split("="),B=W[0],G=W[1],Y=!1,Q=!1;if(B.charAt(B.length-1)=="?"){if(G)throw Error("Trailing characters: "+$.argString);B=B.substring(0,B.length-1),Y=!0}else B.charAt(B.length-1)=="!"&&(B=B.substring(0,B.length-1),Q=!0);G===void 0&&B.substring(0,2)=="no"&&(B=B.substring(2),G=!1);var re=Et[B]&&Et[B].type=="boolean";if(re&&(Q?G=!k(B,v,F):G==null&&(G=!0)),!re&&G===void 0||Y){var se=k(B,v,F);se instanceof Error?Lt(v,se.message):se===!0||se===!1?Lt(v," "+(se?"":"no")+B):Lt(v," "+B+"="+se)}else{var ye=M(B,G,v,F);ye instanceof Error&&Lt(v,ye.message)}},setlocal:function(v,$){$.setCfg={scope:"local"},this.set(v,$)},setglobal:function(v,$){$.setCfg={scope:"global"},this.set(v,$)},registers:function(v,$){var A=$.args,F=We.registerController.registers,W=`----------Registers----------
|
1456
|
+
|
1457
|
+
`;if(A){var B;A=A.join("");for(var G=0;G<A.length;G++)if(B=A.charAt(G),!!We.registerController.isValidRegister(B)){var Y=F[B]||new j;W+='"'+B+" "+Y.toString()+`
|
1458
|
+
`}}else for(var B in F){var Q=F[B].toString();Q.length&&(W+='"'+B+" "+Q+`
|
1459
|
+
`)}Lt(v,W)},sort:function(v,$){function A(){if($.argString){var ft=new Fe.StringStream($.argString);if(ft.eat("!")&&(B=!0),ft.eol())return;if(!ft.eatSpace())return"Invalid arguments";var bt=ft.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!bt&&!ft.eol())return"Invalid arguments";if(bt[1]){G=bt[1].indexOf("i")!=-1,Y=bt[1].indexOf("u")!=-1;var Vn=bt[1].indexOf("d")!=-1||bt[1].indexOf("n")!=-1&&1,or=bt[1].indexOf("x")!=-1&&1,pn=bt[1].indexOf("o")!=-1&&1;if(Vn+or+pn>1)return"Invalid arguments";Q=Vn&&"decimal"||or&&"hex"||pn&&"octal"}bt[2]&&(re=new RegExp(bt[2].substr(1,bt[2].length-2),G?"i":""))}}function F(ft,bt){if(B){var Vn;Vn=ft,ft=bt,bt=Vn}G&&(ft=ft.toLowerCase(),bt=bt.toLowerCase());var or=Q&&Ee.exec(ft),pn=Q&&Ee.exec(bt);return or?(or=parseInt((or[1]+or[2]).toLowerCase(),ze),pn=parseInt((pn[1]+pn[2]).toLowerCase(),ze),or-pn):ft<bt?-1:1}function W(ft,bt){if(B){var Vn;Vn=ft,ft=bt,bt=Vn}return G&&(ft[0]=ft[0].toLowerCase(),bt[0]=bt[0].toLowerCase()),ft[0]<bt[0]?-1:1}var B,G,Y,Q,re,se=A();if(se){Lt(v,se+": "+$.argString);return}var ye=$.line||v.firstLine(),Ce=$.lineEnd||$.line||v.lastLine();if(ye!=Ce){var me=new Oe(ye,0),we=new Oe(Ce,Kt(v,Ce)),Re=v.getRange(me,we).split(`
|
1460
|
+
`),Ee=re||(Q=="decimal"?/(-?)([\d]+)/:Q=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Q=="octal"?/([0-7]+)/:null),ze=Q=="decimal"?10:Q=="hex"?16:Q=="octal"?8:null,rt=[],Ke=[];if(Q||re)for(var Je=0;Je<Re.length;Je++){var an=re?Re[Je].match(re):null;an&&an[0]!=""?rt.push(an):!re&&Ee.exec(Re[Je])?rt.push(Re[Je]):Ke.push(Re[Je])}else Ke=Re;if(rt.sort(re?W:F),re)for(var Je=0;Je<rt.length;Je++)rt[Je]=rt[Je].input;else Q||Ke.sort(F);if(Re=B?rt.concat(Ke):Ke.concat(rt),Y){var it=Re,dn;Re=[];for(var Je=0;Je<it.length;Je++)it[Je]!=dn&&Re.push(it[Je]),dn=it[Je]}v.replaceRange(Re.join(`
|
1461
|
+
`),me,we)}},vglobal:function(v,$){this.global(v,$)},normal:function(v,$){var A=$.argString;if(A&&A[0]=="!"&&(A=A.slice(1),Jt=!0),A=A.trimStart(),!A){Lt(v,"Argument is required.");return}var F=$.line;if(typeof F=="number")for(var W=isNaN($.lineEnd)?F:$.lineEnd,B=F;B<=W;B++)v.setCursor(B,0),I(v,$.argString.trimStart()),v.state.vim.insertMode&&jr(v,!0);else I(v,$.argString.trimStart()),v.state.vim.insertMode&&jr(v,!0)},global:function(v,$){var A=$.argString;if(!A){Lt(v,"Regular Expression missing from global");return}var F=$.commandName[0]==="v";A[0]==="!"&&$.commandName[0]==="g"&&(F=!0,A=A.slice(1));var W=$.line!==void 0?$.line:v.firstLine(),B=$.lineEnd||$.line||v.lastLine(),G=yr(A),Y=A,Q;if(G.length&&(Y=G[0],Q=G.slice(1,G.length).join("/")),Y)try{on(v,Y,!0,!0)}catch{Lt(v,"Invalid regex: "+Y);return}for(var re=wn(v).getQuery(),se=[],ye=W;ye<=B;ye++){var Ce=v.getLine(ye),me=re.test(Ce);me!==F&&se.push(Q?v.getLineHandle(ye):Ce)}if(!Q){Lt(v,se.join(`
|
1462
|
+
`));return}var we=0,Re=function(){if(we<se.length){var Ee=se[we++],ze=v.getLineNumber(Ee);if(ze==null){Re();return}var rt=ze+1+Q;ur.processCommand(v,rt,{callback:Re})}else v.releaseLineHandles&&v.releaseLineHandles()};Re()},substitute:function(v,$){if(!v.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var A=$.argString,F=A?Di(A,A[0]):[],W,B="",G,Y,Q,re=!1,se=!1;if(F.length)W=F[0],k("pcre")&&W!==""&&(W=new RegExp(W).source),B=F[1],B!==void 0&&(k("pcre")?B=Xa(B.replace(/([^\\])&/g,"$1$$&")):B=Ya(B),We.lastSubstituteReplacePart=B),G=F[2]?F[2].split(" "):[];else if(A&&A.length){Lt(v,"Substitutions should be of the form :s/pattern/replace/");return}if(G&&(Y=G[0],Q=parseInt(G[1]),Y&&(Y.indexOf("c")!=-1&&(re=!0),Y.indexOf("g")!=-1&&(se=!0),k("pcre")?W=W+"/"+Y:W=W.replace(/\//g,"\\/")+"/"+Y)),W)try{on(v,W,!0,!0)}catch{Lt(v,"Invalid regex: "+W);return}if(B=B||We.lastSubstituteReplacePart,B===void 0){Lt(v,"No previous substitute regular expression");return}var ye=wn(v),Ce=ye.getQuery(),me=$.line!==void 0?$.line:v.getCursor().line,we=$.lineEnd||me;me==v.firstLine()&&we==v.lastLine()&&(we=1/0),Q&&(me=we,we=me+Q-1);var Re=ue(v,new Oe(me,0)),Ee=v.getSearchCursor(Ce,Re);Fo(v,re,se,me,we,Ee,Ce,B,$.callback)},startinsert:function(v,$){I(v,$.argString=="!"?"A":"i",{})},redo:Fe.commands.redo,undo:Fe.commands.undo,write:function(v){Fe.commands.save?Fe.commands.save(v):v.save&&v.save()},nohlsearch:function(v){Do(v)},yank:function(v){var $=Ve(v.getCursor()),A=$.line,F=v.getLine(A);We.registerController.pushText("0","yank",F,!0,!0)},delete:function(v,$){var A=$.selectionLine,F=isNaN($.selectionLineEnd)?A:$.selectionLineEnd;Go.delete(v,{linewise:!0},[{anchor:new Oe(A,0),head:new Oe(F+1,0)}])},join:function(v,$){var A=$.selectionLine,F=isNaN($.selectionLineEnd)?A:$.selectionLineEnd;v.setCursor(new Oe(A,0)),$n.joinLines(v,{repeat:F-A},v.state.vim)},delmarks:function(v,$){if(!$.argString||!Zr($.argString)){Lt(v,"Argument required");return}for(var A=v.state.vim,F=new Fe.StringStream(Zr($.argString));!F.eol();){F.eatSpace();var W=F.pos;if(!F.match(/[a-zA-Z]/,!1)){Lt(v,"Invalid argument: "+$.argString.substring(W));return}var B=F.next();if(F.match("-",!0)){if(!F.match(/[a-zA-Z]/,!1)){Lt(v,"Invalid argument: "+$.argString.substring(W));return}var G=B,Y=F.next();if(!(u(G)&&u(Y)||c(G)&&c(Y))){Lt(v,"Invalid argument: "+G+"-");return}var Q=G.charCodeAt(0),re=Y.charCodeAt(0);if(Q>=re){Lt(v,"Invalid argument: "+$.argString.substring(W));return}for(var se=0;se<=re-Q;se++){var ye=String.fromCharCode(Q+se);delete A.marks[ye]}}else delete A.marks[B]}}},ur=new cr;L("insertModeEscKeysTimeout",200,"number"),Fe.Vim=dt;var xr={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"},ii=dt.handleKey.bind(dt);dt.handleKey=function(v,$,A){return v.operation(function(){return ii(v,$,A)},!0)},O(),r.CodeMirror=Fe;var oi=dt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(v,$,A,F,W){var B=this.state.vim||{},G=A.characterWidth,Y=A.lineHeight,Q=$.top,re=$.left;if(!B.insertMode){var se=F.cursor?Jn.comparePoints(F.cursor,F.start)<=0:W.selection.isBackwards()||W.selection.isEmpty();!se&&re>G&&(re-=G)}!B.insertMode&&B.status&&(Y/=2,Q+=Y),Pi.translate(v,re,Q),Pi.setStyle(v.style,"width",G+"px"),Pi.setStyle(v.style,"height",Y+"px")},$getDirectionForHighlight:function(v){var $=v.state.cm,A=oi($);if(!A.insertMode)return v.session.selection.isBackwards()||v.session.selection.isEmpty()},handleKeyboard:function(v,$,A,F,W){var B=v.editor,G=B.state.cm,Y=oi(G);if(F!=-1){if(Y.insertMode||($==-1?(A.charCodeAt(0)>255&&v.inputKey&&(A=v.inputKey,A&&v.inputHash==4&&(A=A.toUpperCase())),v.inputChar=A):$==4||$==0?v.inputKey==A&&v.inputHash==$&&v.inputChar?(A=v.inputChar,$=-1):(v.inputChar=null,v.inputKey=A,v.inputHash=$):v.inputChar=v.inputKey=null),G.state.overwrite&&Y.insertMode&&A=="backspace"&&$==0)return{command:"gotoleft"};if(A=="c"&&$==1&&!fo.isMac&&B.getCopyText())return B.once("copy",function(){Y.insertMode?B.selection.clearSelection():G.operation(function(){yn(G)})}),{command:"null",passEvent:!0};if(A=="esc"&&!Y.insertMode&&!Y.visualMode&&!G.ace.inMultiSelectMode){var Q=wn(G),re=Q.getOverlay();re&&G.removeOverlay(re)}if($==-1||$&1||$===0&&A.length>1){var se=Y.insertMode,ye=Ss($,A,W||{},Y);Y.status==null&&(Y.status="");var Ce=po(G,ye,"user");return Y=oi(G),Ce&&Y.status!=null?Y.status+=ye:Y.status==null&&(Y.status=""),G._signal("changeStatus"),!Ce&&($!=-1||se)?void 0:{command:"null",passEvent:!Ce}}}},attach:function(v){function $(){var F=oi(A).insertMode;A.ace.renderer.setStyle("normal-mode",!F),v.textInput.setCommandMode(!F),v.renderer.$keepTextAreaAtCursor=F,v.renderer.$blockCursor=!F}v.state||(v.state={});var A=new Fe(v);v.state.cm=A,v.$vimModeHandler=this,h(A),oi(A).status=null,A.on("vim-command-done",function(){A.virtualSelectionMode()||(oi(A).status=null,A.ace._signal("changeStatus"),A.ace.session.markUndoGroup())}),A.on("changeStatus",function(){A.ace.renderer.updateCursor(),A.ace._signal("changeStatus")}),A.on("vim-mode-change",function(){A.virtualSelectionMode()||($(),A._signal("changeStatus"))}),$(),v.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(A)},detach:function(v){var $=v.state.cm;d($),$.destroy(),v.state.cm=null,v.$vimModeHandler=null,v.renderer.$cursorLayer.drawCursor=null,v.renderer.setStyle("normal-mode",!1),v.textInput.setCommandMode(!1),v.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(v){var $=v.state.cm,A=oi($);if(A.insertMode)return"INSERT";var F="";return A.visualMode&&(F+="VISUAL",A.visualLine&&(F+=" LINE"),A.visualBlock&&(F+=" BLOCK")),A.status&&(F+=(F?" ":"")+A.status),F}},dt.defineOption({name:"wrap",set:function(v,$){$&&$.ace.setOption("wrap",v)},type:"boolean"},!1),dt.defineEx("write","w",function(){console.log(":write is not implemented")}),bn.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"}}),bn.push({keys:"gq",type:"operator",operator:"hardWrap"}),dt.defineOperator("hardWrap",function(v,$,A,F,W){var B=A[0].anchor.line,G=A[0].head.line;return $.linewise&&G--,Zi(v.ace,{startRow:B,endRow:G}),Oe(G,0)}),L("textwidth",void 0,"number",["tw"],function(v,$){if($!==void 0){if(v===void 0){var A=$.ace.getOption("printMarginColumn");return A}var F=Math.round(v);F>1&&$.ace.setOption("printMarginColumn",F)}}),$n.aceCommand=function(v,$,A){v.vimCmd=$,v.ace.inVirtualSelectionMode?v.ace.on("beforeEndOperation",gi):gi(null,v.ace)},$n.fold=function(v,$,A){v.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][($.all?2:0)+($.open?1:0)])},vo=bn.length,r.handler.defaultKeymap=bn,r.handler.actions=$n,r.Vim=dt}),(function(){ace.require(["ace/keyboard/vim"],function(e){n&&(n.exports=e)})})()})(tf)),tf.exports}PC();var rf={},of;function WC(){return of||(of=1,(function(n){(function(){var t={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(x){return m(y(x),arguments)}function r(x,h){return e.apply(null,[x].concat(h||[]))}function m(x,h){var d=1,s=x.length,a,u="",l,o,c,p,w,b,L,M;for(l=0;l<s;l++)if(typeof x[l]=="string")u+=x[l];else if(typeof x[l]=="object"){if(c=x[l],c.keys)for(a=h[d],o=0;o<c.keys.length;o++){if(a==null)throw new Error(e('[sprintf] Cannot access property "%s" of undefined value "%s"',c.keys[o],c.keys[o-1]));a=a[c.keys[o]]}else c.param_no?a=h[c.param_no]:a=h[d++];if(t.not_type.test(c.type)&&t.not_primitive.test(c.type)&&a instanceof Function&&(a=a()),t.numeric_arg.test(c.type)&&typeof a!="number"&&isNaN(a))throw new TypeError(e("[sprintf] expecting number but found %T",a));switch(t.number.test(c.type)&&(L=a>=0),c.type){case"b":a=parseInt(a,10).toString(2);break;case"c":a=String.fromCharCode(parseInt(a,10));break;case"d":case"i":a=parseInt(a,10);break;case"j":a=JSON.stringify(a,null,c.width?parseInt(c.width):0);break;case"e":a=c.precision?parseFloat(a).toExponential(c.precision):parseFloat(a).toExponential();break;case"f":a=c.precision?parseFloat(a).toFixed(c.precision):parseFloat(a);break;case"g":a=c.precision?String(Number(a.toPrecision(c.precision))):parseFloat(a);break;case"o":a=(parseInt(a,10)>>>0).toString(8);break;case"s":a=String(a),a=c.precision?a.substring(0,c.precision):a;break;case"t":a=String(!!a),a=c.precision?a.substring(0,c.precision):a;break;case"T":a=Object.prototype.toString.call(a).slice(8,-1).toLowerCase(),a=c.precision?a.substring(0,c.precision):a;break;case"u":a=parseInt(a,10)>>>0;break;case"v":a=a.valueOf(),a=c.precision?a.substring(0,c.precision):a;break;case"x":a=(parseInt(a,10)>>>0).toString(16);break;case"X":a=(parseInt(a,10)>>>0).toString(16).toUpperCase();break}t.json.test(c.type)?u+=a:(t.number.test(c.type)&&(!L||c.sign)?(M=L?"+":"-",a=a.toString().replace(t.sign,"")):M="",w=c.pad_char?c.pad_char==="0"?"0":c.pad_char.charAt(1):" ",b=c.width-(M+a).length,p=c.width&&b>0?w.repeat(b):"",u+=c.align?M+a+p:w==="0"?M+p+a:p+M+a)}return u}var g=Object.create(null);function y(x){if(g[x])return g[x];for(var h=x,d,s=[],a=0;h;){if((d=t.text.exec(h))!==null)s.push(d[0]);else if((d=t.modulo.exec(h))!==null)s.push("%");else if((d=t.placeholder.exec(h))!==null){if(d[2]){a|=1;var u=[],l=d[2],o=[];if((o=t.key.exec(l))!==null)for(u.push(o[1]);(l=l.substring(o[0].length))!=="";)if((o=t.key_access.exec(l))!==null)u.push(o[1]);else if((o=t.index_access.exec(l))!==null)u.push(o[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");d[2]=u}else a|=2;if(a===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");s.push({placeholder:d[0],param_no:d[1],keys:d[2],sign:d[3],pad_char:d[4],align:d[5],width:d[6],precision:d[7],type:d[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");h=h.substring(d[0].length)}return g[x]=s}n.sprintf=e,n.vsprintf=r,typeof window<"u"&&(window.sprintf=e,window.vsprintf=r)})()})(rf)),rf}WC();var Rl={exports:{}};/**
|
1463
|
+
* @license
|
1464
|
+
* Lodash <https://lodash.com/>
|
1465
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
1466
|
+
* Released under MIT license <https://lodash.com/license>
|
1467
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
1468
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
1469
|
+
*/var BC=Rl.exports,sf;function zC(){return sf||(sf=1,(function(n,t){(function(){var e,r="4.17.21",m=200,g="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__",d=500,s="__lodash_placeholder__",a=1,u=2,l=4,o=1,c=2,p=1,w=2,b=4,L=8,M=16,k=32,C=64,R=128,O=256,E=512,I=30,z="...",P=800,N=16,_=1,S=2,D=3,j=1/0,U=9007199254740991,q=17976931348623157e292,Z=NaN,te=4294967295,he=te-1,ne=te>>>1,le=[["ary",R],["bind",p],["bindKey",w],["curry",L],["curryRight",M],["flip",E],["partial",k],["partialRight",C],["rearg",O]],ue="[object Arguments]",ce="[object Array]",fe="[object AsyncFunction]",_e="[object Boolean]",$e="[object Date]",Te="[object DOMException]",qe="[object Error]",Ve="[object Function]",lt="[object GeneratorFunction]",tt="[object Map]",ht="[object Number]",Xt="[object Null]",Rn="[object Object]",Kt="[object Promise]",Zr="[object Proxy]",vn="[object RegExp]",jn="[object Set]",tr="[object String]",Mr="[object Symbol]",gt="[object Undefined]",He="[object WeakMap]",Wt="[object WeakSet]",cn="[object ArrayBuffer]",Hn="[object DataView]",Tr="[object Float32Array]",mr="[object Float64Array]",yn="[object Int8Array]",Xn="[object Int16Array]",nr="[object Int32Array]",Qt="[object Uint8Array]",Qn="[object Uint8ClampedArray]",ao="[object Uint16Array]",Li="[object Uint32Array]",Ei=/\b__p \+= '';/g,Ri=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,lr=/&(?:amp|lt|gt|quot|#39);/g,co=/[&<>"']/g,No=RegExp(lr.source),Ka=RegExp(co.source),Jr=/<%-([\s\S]+?)%>/g,qa=/<%([\s\S]+?)%>/g,vs=/<%=([\s\S]+?)%>/g,na=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Oi=/^\w*$/,On=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vr=/[\\^$.*+?()[\]{}|]/g,Ni=RegExp(vr.source),wn=/^\s+/,yr=/\s/,qi=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Di=/\{\n\/\* \[wrapped with (.+)\] \*/,ys=/,? & /,ra=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ya=/[()=,{}\[\]\/\s]/,Xa=/\\(\\)?/g,Fi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ei=/\w*$/,Lt=/^[-+]0x[0-9a-f]+$/i,ia=/^0b[01]+$/i,wr=/^\[object .+?Constructor\]$/,Nn=/^0o[0-7]+$/i,on=/^(?:0|[1-9]\d*)$/,Sn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,di=/($^)/,br=/['\n\r\u2028\u2029\\]/g,pi="\\ud800-\\udfff",Do="\\u0300-\\u036f",ws="\\ufe20-\\ufe2f",Yi="\\u20d0-\\u20ff",zr=Do+ws+Yi,uo="\\u2700-\\u27bf",Fo="a-z\\xdf-\\xf6\\xf8-\\xff",jr="\\xac\\xb1\\xd7\\xf7",Po="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",bs="\\u2000-\\u206f",xs=" \\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",Wo="A-Z\\xc0-\\xd6\\xd8-\\xde",Zn="\\ufe0e\\ufe0f",Cs=jr+Po+bs+xs,ho="['’]",Bo="["+pi+"]",zo="["+Cs+"]",Xi="["+zr+"]",ks="\\d+",oa="["+uo+"]",jo="["+Fo+"]",Ho="[^"+pi+Cs+ks+uo+Fo+Wo+"]",Ss="\\ud83c[\\udffb-\\udfff]",Uo="(?:"+Xi+"|"+Ss+")",po="[^"+pi+"]",gi="(?:\\ud83c[\\udde6-\\uddff]){2}",Jn="[\\ud800-\\udbff][\\udc00-\\udfff]",Qi="["+Wo+"]",Pi="\\u200d",sa="(?:"+jo+"|"+Ho+")",Qa="(?:"+Qi+"|"+Ho+")",go="(?:"+ho+"(?:d|ll|m|re|s|t|ve))?",Wi="(?:"+ho+"(?:D|LL|M|RE|S|T|VE))?",fo=Uo+"?",Vo="["+Zn+"]?",mo="(?:"+Pi+"(?:"+[po,gi,Jn].join("|")+")"+Vo+fo+")*",aa="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Zi="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Fe=Vo+fo+mo,la="(?:"+[oa,gi,Jn].join("|")+")"+Fe,Oe="(?:"+[po+Xi+"?",Xi,gi,Jn,Bo].join("|")+")",bn=RegExp(ho,"g"),vo=RegExp(Xi,"g"),ti=RegExp(Ss+"(?="+Ss+")|"+Oe+Fe,"g"),Dn=RegExp([Qi+"?"+jo+"+"+go+"(?="+[zo,Qi,"$"].join("|")+")",Qa+"+"+Wi+"(?="+[zo,Qi+sa,"$"].join("|")+")",Qi+"?"+sa+"+"+go,Qi+"+"+Wi,Zi,aa,ks,la].join("|"),"g"),ca=RegExp("["+Pi+pi+zr+Zn+"]"),yo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,fi=["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,Ut={};Ut[Tr]=Ut[mr]=Ut[yn]=Ut[Xn]=Ut[nr]=Ut[Qt]=Ut[Qn]=Ut[ao]=Ut[Li]=!0,Ut[ue]=Ut[ce]=Ut[cn]=Ut[_e]=Ut[Hn]=Ut[$e]=Ut[qe]=Ut[Ve]=Ut[tt]=Ut[ht]=Ut[Rn]=Ut[vn]=Ut[jn]=Ut[tr]=Ut[He]=!1;var Bt={};Bt[ue]=Bt[ce]=Bt[cn]=Bt[Hn]=Bt[_e]=Bt[$e]=Bt[Tr]=Bt[mr]=Bt[yn]=Bt[Xn]=Bt[nr]=Bt[tt]=Bt[ht]=Bt[Rn]=Bt[vn]=Bt[jn]=Bt[tr]=Bt[Mr]=Bt[Qt]=Bt[Qn]=Bt[ao]=Bt[Li]=!0,Bt[qe]=Bt[Ve]=Bt[He]=!1;var Vt={À:"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"},Et={"&":"&","<":"<",">":">",'"':""","'":"'"},mi={"&":"&","<":"<",">":">",""":'"',"'":"'"},An={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},We=parseFloat,sn=parseInt,dt=typeof Eo=="object"&&Eo&&Eo.Object===Object&&Eo,Ir=typeof self=="object"&&self&&self.Object===Object&&self,Jt=dt||Ir||Function("return this")(),un=t&&!t.nodeType&&t,Un=un&&!0&&n&&!n.nodeType&&n,Lr=Un&&Un.exports===un,vi=Lr&&dt.process,_n=(function(){try{var pe=Un&&Un.require&&Un.require("util").types;return pe||vi&&vi.binding&&vi.binding("util")}catch{}})(),Hr=_n&&_n.isArrayBuffer,Go=_n&&_n.isDate,$n=_n&&_n.isMap,ni=_n&&_n.isRegExp,ri=_n&&_n.isSet,yi=_n&&_n.isTypedArray;function rr(pe,Ae,xe){switch(xe.length){case 0:return pe.call(Ae);case 1:return pe.call(Ae,xe[0]);case 2:return pe.call(Ae,xe[0],xe[1]);case 3:return pe.call(Ae,xe[0],xe[1],xe[2])}return pe.apply(Ae,xe)}function ir(pe,Ae,xe,Be){for(var ot=-1,xt=pe==null?0:pe.length;++ot<xt;){var Ft=pe[ot];Ae(Be,Ft,xe(Ft),pe)}return Be}function cr(pe,Ae){for(var xe=-1,Be=pe==null?0:pe.length;++xe<Be&&Ae(pe[xe],xe,pe)!==!1;);return pe}function As(pe,Ae){for(var xe=pe==null?0:pe.length;xe--&&Ae(pe[xe],xe,pe)!==!1;);return pe}function ur(pe,Ae){for(var xe=-1,Be=pe==null?0:pe.length;++xe<Be;)if(!Ae(pe[xe],xe,pe))return!1;return!0}function xr(pe,Ae){for(var xe=-1,Be=pe==null?0:pe.length,ot=0,xt=[];++xe<Be;){var Ft=pe[xe];Ae(Ft,xe,pe)&&(xt[ot++]=Ft)}return xt}function ii(pe,Ae){var xe=pe==null?0:pe.length;return!!xe&&se(pe,Ae,0)>-1}function oi(pe,Ae,xe){for(var Be=-1,ot=pe==null?0:pe.length;++Be<ot;)if(xe(Ae,pe[Be]))return!0;return!1}function v(pe,Ae){for(var xe=-1,Be=pe==null?0:pe.length,ot=Array(Be);++xe<Be;)ot[xe]=Ae(pe[xe],xe,pe);return ot}function $(pe,Ae){for(var xe=-1,Be=Ae.length,ot=pe.length;++xe<Be;)pe[ot+xe]=Ae[xe];return pe}function A(pe,Ae,xe,Be){var ot=-1,xt=pe==null?0:pe.length;for(Be&&xt&&(xe=pe[++ot]);++ot<xt;)xe=Ae(xe,pe[ot],ot,pe);return xe}function F(pe,Ae,xe,Be){var ot=pe==null?0:pe.length;for(Be&&ot&&(xe=pe[--ot]);ot--;)xe=Ae(xe,pe[ot],ot,pe);return xe}function W(pe,Ae){for(var xe=-1,Be=pe==null?0:pe.length;++xe<Be;)if(Ae(pe[xe],xe,pe))return!0;return!1}var B=we("length");function G(pe){return pe.split("")}function Y(pe){return pe.match(ra)||[]}function Q(pe,Ae,xe){var Be;return xe(pe,function(ot,xt,Ft){if(Ae(ot,xt,Ft))return Be=xt,!1}),Be}function re(pe,Ae,xe,Be){for(var ot=pe.length,xt=xe+(Be?1:-1);Be?xt--:++xt<ot;)if(Ae(pe[xt],xt,pe))return xt;return-1}function se(pe,Ae,xe){return Ae===Ae?Ye(pe,Ae,xe):re(pe,Ce,xe)}function ye(pe,Ae,xe,Be){for(var ot=xe-1,xt=pe.length;++ot<xt;)if(Be(pe[ot],Ae))return ot;return-1}function Ce(pe){return pe!==pe}function me(pe,Ae){var xe=pe==null?0:pe.length;return xe?rt(pe,Ae)/xe:Z}function we(pe){return function(Ae){return Ae==null?e:Ae[pe]}}function Re(pe){return function(Ae){return pe==null?e:pe[Ae]}}function Ee(pe,Ae,xe,Be,ot){return ot(pe,function(xt,Ft,St){xe=Be?(Be=!1,xt):Ae(xe,xt,Ft,St)}),xe}function ze(pe,Ae){var xe=pe.length;for(pe.sort(Ae);xe--;)pe[xe]=pe[xe].value;return pe}function rt(pe,Ae){for(var xe,Be=-1,ot=pe.length;++Be<ot;){var xt=Ae(pe[Be]);xt!==e&&(xe=xe===e?xt:xe+xt)}return xe}function Ke(pe,Ae){for(var xe=-1,Be=Array(pe);++xe<pe;)Be[xe]=Ae(xe);return Be}function Je(pe,Ae){return v(Ae,function(xe){return[xe,pe[xe]]})}function an(pe){return pe&&pe.slice(0,_t(pe)+1).replace(wn,"")}function it(pe){return function(Ae){return pe(Ae)}}function dn(pe,Ae){return v(Ae,function(xe){return pe[xe]})}function ft(pe,Ae){return pe.has(Ae)}function bt(pe,Ae){for(var xe=-1,Be=pe.length;++xe<Be&&se(Ae,pe[xe],0)>-1;);return xe}function Vn(pe,Ae){for(var xe=pe.length;xe--&&se(Ae,pe[xe],0)>-1;);return xe}function or(pe,Ae){for(var xe=pe.length,Be=0;xe--;)pe[xe]===Ae&&++Be;return Be}var pn=Re(Vt),V=Re(Et);function X(pe){return"\\"+An[pe]}function ie(pe,Ae){return pe==null?e:pe[Ae]}function oe(pe){return ca.test(pe)}function ge(pe){return yo.test(pe)}function be(pe){for(var Ae,xe=[];!(Ae=pe.next()).done;)xe.push(Ae.value);return xe}function Me(pe){var Ae=-1,xe=Array(pe.size);return pe.forEach(function(Be,ot){xe[++Ae]=[ot,Be]}),xe}function De(pe,Ae){return function(xe){return pe(Ae(xe))}}function Pe(pe,Ae){for(var xe=-1,Be=pe.length,ot=0,xt=[];++xe<Be;){var Ft=pe[xe];(Ft===Ae||Ft===s)&&(pe[xe]=s,xt[ot++]=xe)}return xt}function je(pe){var Ae=-1,xe=Array(pe.size);return pe.forEach(function(Be){xe[++Ae]=Be}),xe}function Ge(pe){var Ae=-1,xe=Array(pe.size);return pe.forEach(function(Be){xe[++Ae]=[Be,Be]}),xe}function Ye(pe,Ae,xe){for(var Be=xe-1,ot=pe.length;++Be<ot;)if(pe[Be]===Ae)return Be;return-1}function pt(pe,Ae,xe){for(var Be=xe+1;Be--;)if(pe[Be]===Ae)return Be;return Be}function Mt(pe){return oe(pe)?nt(pe):B(pe)}function mt(pe){return oe(pe)?rn(pe):G(pe)}function _t(pe){for(var Ae=pe.length;Ae--&&yr.test(pe.charAt(Ae)););return Ae}var st=Re(mi);function nt(pe){for(var Ae=ti.lastIndex=0;ti.test(pe);)++Ae;return Ae}function rn(pe){return pe.match(ti)||[]}function gn(pe){return pe.match(Dn)||[]}var Gn=(function pe(Ae){Ae=Ae==null?Jt:Ot.defaults(Jt.Object(),Ae,Ot.pick(Jt,fi));var xe=Ae.Array,Be=Ae.Date,ot=Ae.Error,xt=Ae.Function,Ft=Ae.Math,St=Ae.Object,Er=Ae.RegExp,wi=Ae.String,en=Ae.TypeError,sr=xe.prototype,wo=xt.prototype,Mn=St.prototype,_s=Ae["__core-js_shared__"],fc=wo.toString,Zt=Mn.hasOwnProperty,FT=0,Ey=(function(){var i=/[^.]+$/.exec(_s&&_s.keys&&_s.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),mc=Mn.toString,PT=fc.call(St),WT=Jt._,BT=Er("^"+fc.call(Zt).replace(vr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vc=Lr?Ae.Buffer:e,Ko=Ae.Symbol,yc=Ae.Uint8Array,Ry=vc?vc.allocUnsafe:e,wc=De(St.getPrototypeOf,St),Oy=St.create,Ny=Mn.propertyIsEnumerable,bc=sr.splice,Dy=Ko?Ko.isConcatSpreadable:e,Za=Ko?Ko.iterator:e,$s=Ko?Ko.toStringTag:e,xc=(function(){try{var i=Es(St,"defineProperty");return i({},"",{}),i}catch{}})(),zT=Ae.clearTimeout!==Jt.clearTimeout&&Ae.clearTimeout,jT=Be&&Be.now!==Jt.Date.now&&Be.now,HT=Ae.setTimeout!==Jt.setTimeout&&Ae.setTimeout,Cc=Ft.ceil,kc=Ft.floor,ad=St.getOwnPropertySymbols,UT=vc?vc.isBuffer:e,Fy=Ae.isFinite,VT=sr.join,GT=De(St.keys,St),er=Ft.max,Cr=Ft.min,KT=Be.now,qT=Ae.parseInt,Py=Ft.random,YT=sr.reverse,ld=Es(Ae,"DataView"),Ja=Es(Ae,"Map"),cd=Es(Ae,"Promise"),ua=Es(Ae,"Set"),el=Es(Ae,"WeakMap"),tl=Es(St,"create"),Sc=el&&new el,ha={},XT=Rs(ld),QT=Rs(Ja),ZT=Rs(cd),JT=Rs(ua),eI=Rs(el),Ac=Ko?Ko.prototype:e,nl=Ac?Ac.valueOf:e,Wy=Ac?Ac.toString:e;function J(i){if(Tn(i)&&!vt(i)&&!(i instanceof Rt)){if(i instanceof bi)return i;if(Zt.call(i,"__wrapped__"))return Bw(i)}return new bi(i)}var da=(function(){function i(){}return function(f){if(!xn(f))return{};if(Oy)return Oy(f);i.prototype=f;var T=new i;return i.prototype=e,T}})();function _c(){}function bi(i,f){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=e}J.templateSettings={escape:Jr,evaluate:qa,interpolate:vs,variable:"",imports:{_:J}},J.prototype=_c.prototype,J.prototype.constructor=J,bi.prototype=da(_c.prototype),bi.prototype.constructor=bi;function Rt(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=te,this.__views__=[]}function tI(){var i=new Rt(this.__wrapped__);return i.__actions__=Ur(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Ur(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Ur(this.__views__),i}function nI(){if(this.__filtered__){var i=new Rt(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function rI(){var i=this.__wrapped__.value(),f=this.__dir__,T=vt(i),H=f<0,K=T?i.length:0,ee=fL(0,K,this.__views__),ae=ee.start,de=ee.end,ve=de-ae,Ie=H?de:ae-1,Le=this.__iteratees__,Ne=Le.length,Ue=0,et=Cr(ve,this.__takeCount__);if(!T||!H&&K==ve&&et==ve)return cw(i,this.__actions__);var ct=[];e:for(;ve--&&Ue<et;){Ie+=f;for(var At=-1,ut=i[Ie];++At<Ne;){var Tt=Le[At],Nt=Tt.iteratee,li=Tt.type,Nr=Nt(ut);if(li==S)ut=Nr;else if(!Nr){if(li==_)continue e;break e}}ct[Ue++]=ut}return ct}Rt.prototype=da(_c.prototype),Rt.prototype.constructor=Rt;function Ms(i){var f=-1,T=i==null?0:i.length;for(this.clear();++f<T;){var H=i[f];this.set(H[0],H[1])}}function iI(){this.__data__=tl?tl(null):{},this.size=0}function oI(i){var f=this.has(i)&&delete this.__data__[i];return this.size-=f?1:0,f}function sI(i){var f=this.__data__;if(tl){var T=f[i];return T===h?e:T}return Zt.call(f,i)?f[i]:e}function aI(i){var f=this.__data__;return tl?f[i]!==e:Zt.call(f,i)}function lI(i,f){var T=this.__data__;return this.size+=this.has(i)?0:1,T[i]=tl&&f===e?h:f,this}Ms.prototype.clear=iI,Ms.prototype.delete=oI,Ms.prototype.get=sI,Ms.prototype.has=aI,Ms.prototype.set=lI;function bo(i){var f=-1,T=i==null?0:i.length;for(this.clear();++f<T;){var H=i[f];this.set(H[0],H[1])}}function cI(){this.__data__=[],this.size=0}function uI(i){var f=this.__data__,T=$c(f,i);if(T<0)return!1;var H=f.length-1;return T==H?f.pop():bc.call(f,T,1),--this.size,!0}function hI(i){var f=this.__data__,T=$c(f,i);return T<0?e:f[T][1]}function dI(i){return $c(this.__data__,i)>-1}function pI(i,f){var T=this.__data__,H=$c(T,i);return H<0?(++this.size,T.push([i,f])):T[H][1]=f,this}bo.prototype.clear=cI,bo.prototype.delete=uI,bo.prototype.get=hI,bo.prototype.has=dI,bo.prototype.set=pI;function xo(i){var f=-1,T=i==null?0:i.length;for(this.clear();++f<T;){var H=i[f];this.set(H[0],H[1])}}function gI(){this.size=0,this.__data__={hash:new Ms,map:new(Ja||bo),string:new Ms}}function fI(i){var f=Wc(this,i).delete(i);return this.size-=f?1:0,f}function mI(i){return Wc(this,i).get(i)}function vI(i){return Wc(this,i).has(i)}function yI(i,f){var T=Wc(this,i),H=T.size;return T.set(i,f),this.size+=T.size==H?0:1,this}xo.prototype.clear=gI,xo.prototype.delete=fI,xo.prototype.get=mI,xo.prototype.has=vI,xo.prototype.set=yI;function Ts(i){var f=-1,T=i==null?0:i.length;for(this.__data__=new xo;++f<T;)this.add(i[f])}function wI(i){return this.__data__.set(i,h),this}function bI(i){return this.__data__.has(i)}Ts.prototype.add=Ts.prototype.push=wI,Ts.prototype.has=bI;function Bi(i){var f=this.__data__=new bo(i);this.size=f.size}function xI(){this.__data__=new bo,this.size=0}function CI(i){var f=this.__data__,T=f.delete(i);return this.size=f.size,T}function kI(i){return this.__data__.get(i)}function SI(i){return this.__data__.has(i)}function AI(i,f){var T=this.__data__;if(T instanceof bo){var H=T.__data__;if(!Ja||H.length<m-1)return H.push([i,f]),this.size=++T.size,this;T=this.__data__=new xo(H)}return T.set(i,f),this.size=T.size,this}Bi.prototype.clear=xI,Bi.prototype.delete=CI,Bi.prototype.get=kI,Bi.prototype.has=SI,Bi.prototype.set=AI;function By(i,f){var T=vt(i),H=!T&&Os(i),K=!T&&!H&&Zo(i),ee=!T&&!H&&!K&&ma(i),ae=T||H||K||ee,de=ae?Ke(i.length,wi):[],ve=de.length;for(var Ie in i)(f||Zt.call(i,Ie))&&!(ae&&(Ie=="length"||K&&(Ie=="offset"||Ie=="parent")||ee&&(Ie=="buffer"||Ie=="byteLength"||Ie=="byteOffset")||Ao(Ie,ve)))&&de.push(Ie);return de}function zy(i){var f=i.length;return f?i[bd(0,f-1)]:e}function _I(i,f){return Bc(Ur(i),Is(f,0,i.length))}function $I(i){return Bc(Ur(i))}function ud(i,f,T){(T!==e&&!zi(i[f],T)||T===e&&!(f in i))&&Co(i,f,T)}function rl(i,f,T){var H=i[f];(!(Zt.call(i,f)&&zi(H,T))||T===e&&!(f in i))&&Co(i,f,T)}function $c(i,f){for(var T=i.length;T--;)if(zi(i[T][0],f))return T;return-1}function MI(i,f,T,H){return qo(i,function(K,ee,ae){f(H,K,T(K),ae)}),H}function jy(i,f){return i&&to(f,ar(f),i)}function TI(i,f){return i&&to(f,Gr(f),i)}function Co(i,f,T){f=="__proto__"&&xc?xc(i,f,{configurable:!0,enumerable:!0,value:T,writable:!0}):i[f]=T}function hd(i,f){for(var T=-1,H=f.length,K=xe(H),ee=i==null;++T<H;)K[T]=ee?e:Vd(i,f[T]);return K}function Is(i,f,T){return i===i&&(T!==e&&(i=i<=T?i:T),f!==e&&(i=i>=f?i:f)),i}function xi(i,f,T,H,K,ee){var ae,de=f&a,ve=f&u,Ie=f&l;if(T&&(ae=K?T(i,H,K,ee):T(i)),ae!==e)return ae;if(!xn(i))return i;var Le=vt(i);if(Le){if(ae=vL(i),!de)return Ur(i,ae)}else{var Ne=kr(i),Ue=Ne==Ve||Ne==lt;if(Zo(i))return dw(i,de);if(Ne==Rn||Ne==ue||Ue&&!K){if(ae=ve||Ue?{}:Lw(i),!de)return ve?sL(i,TI(ae,i)):oL(i,jy(ae,i))}else{if(!Bt[Ne])return K?i:{};ae=yL(i,Ne,de)}}ee||(ee=new Bi);var et=ee.get(i);if(et)return et;ee.set(i,ae),sb(i)?i.forEach(function(ut){ae.add(xi(ut,f,T,ut,i,ee))}):ib(i)&&i.forEach(function(ut,Tt){ae.set(Tt,xi(ut,f,T,Tt,i,ee))});var ct=Ie?ve?Ld:Id:ve?Gr:ar,At=Le?e:ct(i);return cr(At||i,function(ut,Tt){At&&(Tt=ut,ut=i[Tt]),rl(ae,Tt,xi(ut,f,T,Tt,i,ee))}),ae}function II(i){var f=ar(i);return function(T){return Hy(T,i,f)}}function Hy(i,f,T){var H=T.length;if(i==null)return!H;for(i=St(i);H--;){var K=T[H],ee=f[K],ae=i[K];if(ae===e&&!(K in i)||!ee(ae))return!1}return!0}function Uy(i,f,T){if(typeof i!="function")throw new en(y);return ul(function(){i.apply(e,T)},f)}function il(i,f,T,H){var K=-1,ee=ii,ae=!0,de=i.length,ve=[],Ie=f.length;if(!de)return ve;T&&(f=v(f,it(T))),H?(ee=oi,ae=!1):f.length>=m&&(ee=ft,ae=!1,f=new Ts(f));e:for(;++K<de;){var Le=i[K],Ne=T==null?Le:T(Le);if(Le=H||Le!==0?Le:0,ae&&Ne===Ne){for(var Ue=Ie;Ue--;)if(f[Ue]===Ne)continue e;ve.push(Le)}else ee(f,Ne,H)||ve.push(Le)}return ve}var qo=vw(eo),Vy=vw(pd,!0);function LI(i,f){var T=!0;return qo(i,function(H,K,ee){return T=!!f(H,K,ee),T}),T}function Mc(i,f,T){for(var H=-1,K=i.length;++H<K;){var ee=i[H],ae=f(ee);if(ae!=null&&(de===e?ae===ae&&!ai(ae):T(ae,de)))var de=ae,ve=ee}return ve}function EI(i,f,T,H){var K=i.length;for(T=Ct(T),T<0&&(T=-T>K?0:K+T),H=H===e||H>K?K:Ct(H),H<0&&(H+=K),H=T>H?0:lb(H);T<H;)i[T++]=f;return i}function Gy(i,f){var T=[];return qo(i,function(H,K,ee){f(H,K,ee)&&T.push(H)}),T}function hr(i,f,T,H,K){var ee=-1,ae=i.length;for(T||(T=bL),K||(K=[]);++ee<ae;){var de=i[ee];f>0&&T(de)?f>1?hr(de,f-1,T,H,K):$(K,de):H||(K[K.length]=de)}return K}var dd=yw(),Ky=yw(!0);function eo(i,f){return i&&dd(i,f,ar)}function pd(i,f){return i&&Ky(i,f,ar)}function Tc(i,f){return xr(f,function(T){return _o(i[T])})}function Ls(i,f){f=Xo(f,i);for(var T=0,H=f.length;i!=null&&T<H;)i=i[no(f[T++])];return T&&T==H?i:e}function qy(i,f,T){var H=f(i);return vt(i)?H:$(H,T(i))}function Rr(i){return i==null?i===e?gt:Xt:$s&&$s in St(i)?gL(i):$L(i)}function gd(i,f){return i>f}function RI(i,f){return i!=null&&Zt.call(i,f)}function OI(i,f){return i!=null&&f in St(i)}function NI(i,f,T){return i>=Cr(f,T)&&i<er(f,T)}function fd(i,f,T){for(var H=T?oi:ii,K=i[0].length,ee=i.length,ae=ee,de=xe(ee),ve=1/0,Ie=[];ae--;){var Le=i[ae];ae&&f&&(Le=v(Le,it(f))),ve=Cr(Le.length,ve),de[ae]=!T&&(f||K>=120&&Le.length>=120)?new Ts(ae&&Le):e}Le=i[0];var Ne=-1,Ue=de[0];e:for(;++Ne<K&&Ie.length<ve;){var et=Le[Ne],ct=f?f(et):et;if(et=T||et!==0?et:0,!(Ue?ft(Ue,ct):H(Ie,ct,T))){for(ae=ee;--ae;){var At=de[ae];if(!(At?ft(At,ct):H(i[ae],ct,T)))continue e}Ue&&Ue.push(ct),Ie.push(et)}}return Ie}function DI(i,f,T,H){return eo(i,function(K,ee,ae){f(H,T(K),ee,ae)}),H}function ol(i,f,T){f=Xo(f,i),i=Nw(i,f);var H=i==null?i:i[no(ki(f))];return H==null?e:rr(H,i,T)}function Yy(i){return Tn(i)&&Rr(i)==ue}function FI(i){return Tn(i)&&Rr(i)==cn}function PI(i){return Tn(i)&&Rr(i)==$e}function sl(i,f,T,H,K){return i===f?!0:i==null||f==null||!Tn(i)&&!Tn(f)?i!==i&&f!==f:WI(i,f,T,H,sl,K)}function WI(i,f,T,H,K,ee){var ae=vt(i),de=vt(f),ve=ae?ce:kr(i),Ie=de?ce:kr(f);ve=ve==ue?Rn:ve,Ie=Ie==ue?Rn:Ie;var Le=ve==Rn,Ne=Ie==Rn,Ue=ve==Ie;if(Ue&&Zo(i)){if(!Zo(f))return!1;ae=!0,Le=!1}if(Ue&&!Le)return ee||(ee=new Bi),ae||ma(i)?Mw(i,f,T,H,K,ee):dL(i,f,ve,T,H,K,ee);if(!(T&o)){var et=Le&&Zt.call(i,"__wrapped__"),ct=Ne&&Zt.call(f,"__wrapped__");if(et||ct){var At=et?i.value():i,ut=ct?f.value():f;return ee||(ee=new Bi),K(At,ut,T,H,ee)}}return Ue?(ee||(ee=new Bi),pL(i,f,T,H,K,ee)):!1}function BI(i){return Tn(i)&&kr(i)==tt}function md(i,f,T,H){var K=T.length,ee=K,ae=!H;if(i==null)return!ee;for(i=St(i);K--;){var de=T[K];if(ae&&de[2]?de[1]!==i[de[0]]:!(de[0]in i))return!1}for(;++K<ee;){de=T[K];var ve=de[0],Ie=i[ve],Le=de[1];if(ae&&de[2]){if(Ie===e&&!(ve in i))return!1}else{var Ne=new Bi;if(H)var Ue=H(Ie,Le,ve,i,f,Ne);if(!(Ue===e?sl(Le,Ie,o|c,H,Ne):Ue))return!1}}return!0}function Xy(i){if(!xn(i)||CL(i))return!1;var f=_o(i)?BT:wr;return f.test(Rs(i))}function zI(i){return Tn(i)&&Rr(i)==vn}function jI(i){return Tn(i)&&kr(i)==jn}function HI(i){return Tn(i)&&Gc(i.length)&&!!Ut[Rr(i)]}function Qy(i){return typeof i=="function"?i:i==null?Kr:typeof i=="object"?vt(i)?ew(i[0],i[1]):Jy(i):wb(i)}function vd(i){if(!cl(i))return GT(i);var f=[];for(var T in St(i))Zt.call(i,T)&&T!="constructor"&&f.push(T);return f}function UI(i){if(!xn(i))return _L(i);var f=cl(i),T=[];for(var H in i)H=="constructor"&&(f||!Zt.call(i,H))||T.push(H);return T}function yd(i,f){return i<f}function Zy(i,f){var T=-1,H=Vr(i)?xe(i.length):[];return qo(i,function(K,ee,ae){H[++T]=f(K,ee,ae)}),H}function Jy(i){var f=Rd(i);return f.length==1&&f[0][2]?Rw(f[0][0],f[0][1]):function(T){return T===i||md(T,i,f)}}function ew(i,f){return Nd(i)&&Ew(f)?Rw(no(i),f):function(T){var H=Vd(T,i);return H===e&&H===f?Gd(T,i):sl(f,H,o|c)}}function Ic(i,f,T,H,K){i!==f&&dd(f,function(ee,ae){if(K||(K=new Bi),xn(ee))VI(i,f,ae,T,Ic,H,K);else{var de=H?H(Fd(i,ae),ee,ae+"",i,f,K):e;de===e&&(de=ee),ud(i,ae,de)}},Gr)}function VI(i,f,T,H,K,ee,ae){var de=Fd(i,T),ve=Fd(f,T),Ie=ae.get(ve);if(Ie){ud(i,T,Ie);return}var Le=ee?ee(de,ve,T+"",i,f,ae):e,Ne=Le===e;if(Ne){var Ue=vt(ve),et=!Ue&&Zo(ve),ct=!Ue&&!et&&ma(ve);Le=ve,Ue||et||ct?vt(de)?Le=de:Fn(de)?Le=Ur(de):et?(Ne=!1,Le=dw(ve,!0)):ct?(Ne=!1,Le=pw(ve,!0)):Le=[]:hl(ve)||Os(ve)?(Le=de,Os(de)?Le=cb(de):(!xn(de)||_o(de))&&(Le=Lw(ve))):Ne=!1}Ne&&(ae.set(ve,Le),K(Le,ve,H,ee,ae),ae.delete(ve)),ud(i,T,Le)}function tw(i,f){var T=i.length;if(T)return f+=f<0?T:0,Ao(f,T)?i[f]:e}function nw(i,f,T){f.length?f=v(f,function(ee){return vt(ee)?function(ae){return Ls(ae,ee.length===1?ee[0]:ee)}:ee}):f=[Kr];var H=-1;f=v(f,it(at()));var K=Zy(i,function(ee,ae,de){var ve=v(f,function(Ie){return Ie(ee)});return{criteria:ve,index:++H,value:ee}});return ze(K,function(ee,ae){return iL(ee,ae,T)})}function GI(i,f){return rw(i,f,function(T,H){return Gd(i,H)})}function rw(i,f,T){for(var H=-1,K=f.length,ee={};++H<K;){var ae=f[H],de=Ls(i,ae);T(de,ae)&&al(ee,Xo(ae,i),de)}return ee}function KI(i){return function(f){return Ls(f,i)}}function wd(i,f,T,H){var K=H?ye:se,ee=-1,ae=f.length,de=i;for(i===f&&(f=Ur(f)),T&&(de=v(i,it(T)));++ee<ae;)for(var ve=0,Ie=f[ee],Le=T?T(Ie):Ie;(ve=K(de,Le,ve,H))>-1;)de!==i&&bc.call(de,ve,1),bc.call(i,ve,1);return i}function iw(i,f){for(var T=i?f.length:0,H=T-1;T--;){var K=f[T];if(T==H||K!==ee){var ee=K;Ao(K)?bc.call(i,K,1):kd(i,K)}}return i}function bd(i,f){return i+kc(Py()*(f-i+1))}function qI(i,f,T,H){for(var K=-1,ee=er(Cc((f-i)/(T||1)),0),ae=xe(ee);ee--;)ae[H?ee:++K]=i,i+=T;return ae}function xd(i,f){var T="";if(!i||f<1||f>U)return T;do f%2&&(T+=i),f=kc(f/2),f&&(i+=i);while(f);return T}function $t(i,f){return Pd(Ow(i,f,Kr),i+"")}function YI(i){return zy(va(i))}function XI(i,f){var T=va(i);return Bc(T,Is(f,0,T.length))}function al(i,f,T,H){if(!xn(i))return i;f=Xo(f,i);for(var K=-1,ee=f.length,ae=ee-1,de=i;de!=null&&++K<ee;){var ve=no(f[K]),Ie=T;if(ve==="__proto__"||ve==="constructor"||ve==="prototype")return i;if(K!=ae){var Le=de[ve];Ie=H?H(Le,ve,de):e,Ie===e&&(Ie=xn(Le)?Le:Ao(f[K+1])?[]:{})}rl(de,ve,Ie),de=de[ve]}return i}var ow=Sc?function(i,f){return Sc.set(i,f),i}:Kr,QI=xc?function(i,f){return xc(i,"toString",{configurable:!0,enumerable:!1,value:qd(f),writable:!0})}:Kr;function ZI(i){return Bc(va(i))}function Ci(i,f,T){var H=-1,K=i.length;f<0&&(f=-f>K?0:K+f),T=T>K?K:T,T<0&&(T+=K),K=f>T?0:T-f>>>0,f>>>=0;for(var ee=xe(K);++H<K;)ee[H]=i[H+f];return ee}function JI(i,f){var T;return qo(i,function(H,K,ee){return T=f(H,K,ee),!T}),!!T}function Lc(i,f,T){var H=0,K=i==null?H:i.length;if(typeof f=="number"&&f===f&&K<=ne){for(;H<K;){var ee=H+K>>>1,ae=i[ee];ae!==null&&!ai(ae)&&(T?ae<=f:ae<f)?H=ee+1:K=ee}return K}return Cd(i,f,Kr,T)}function Cd(i,f,T,H){var K=0,ee=i==null?0:i.length;if(ee===0)return 0;f=T(f);for(var ae=f!==f,de=f===null,ve=ai(f),Ie=f===e;K<ee;){var Le=kc((K+ee)/2),Ne=T(i[Le]),Ue=Ne!==e,et=Ne===null,ct=Ne===Ne,At=ai(Ne);if(ae)var ut=H||ct;else Ie?ut=ct&&(H||Ue):de?ut=ct&&Ue&&(H||!et):ve?ut=ct&&Ue&&!et&&(H||!At):et||At?ut=!1:ut=H?Ne<=f:Ne<f;ut?K=Le+1:ee=Le}return Cr(ee,he)}function sw(i,f){for(var T=-1,H=i.length,K=0,ee=[];++T<H;){var ae=i[T],de=f?f(ae):ae;if(!T||!zi(de,ve)){var ve=de;ee[K++]=ae===0?0:ae}}return ee}function aw(i){return typeof i=="number"?i:ai(i)?Z:+i}function si(i){if(typeof i=="string")return i;if(vt(i))return v(i,si)+"";if(ai(i))return Wy?Wy.call(i):"";var f=i+"";return f=="0"&&1/i==-j?"-0":f}function Yo(i,f,T){var H=-1,K=ii,ee=i.length,ae=!0,de=[],ve=de;if(T)ae=!1,K=oi;else if(ee>=m){var Ie=f?null:uL(i);if(Ie)return je(Ie);ae=!1,K=ft,ve=new Ts}else ve=f?[]:de;e:for(;++H<ee;){var Le=i[H],Ne=f?f(Le):Le;if(Le=T||Le!==0?Le:0,ae&&Ne===Ne){for(var Ue=ve.length;Ue--;)if(ve[Ue]===Ne)continue e;f&&ve.push(Ne),de.push(Le)}else K(ve,Ne,T)||(ve!==de&&ve.push(Ne),de.push(Le))}return de}function kd(i,f){return f=Xo(f,i),i=Nw(i,f),i==null||delete i[no(ki(f))]}function lw(i,f,T,H){return al(i,f,T(Ls(i,f)),H)}function Ec(i,f,T,H){for(var K=i.length,ee=H?K:-1;(H?ee--:++ee<K)&&f(i[ee],ee,i););return T?Ci(i,H?0:ee,H?ee+1:K):Ci(i,H?ee+1:0,H?K:ee)}function cw(i,f){var T=i;return T instanceof Rt&&(T=T.value()),A(f,function(H,K){return K.func.apply(K.thisArg,$([H],K.args))},T)}function Sd(i,f,T){var H=i.length;if(H<2)return H?Yo(i[0]):[];for(var K=-1,ee=xe(H);++K<H;)for(var ae=i[K],de=-1;++de<H;)de!=K&&(ee[K]=il(ee[K]||ae,i[de],f,T));return Yo(hr(ee,1),f,T)}function uw(i,f,T){for(var H=-1,K=i.length,ee=f.length,ae={};++H<K;){var de=H<ee?f[H]:e;T(ae,i[H],de)}return ae}function Ad(i){return Fn(i)?i:[]}function _d(i){return typeof i=="function"?i:Kr}function Xo(i,f){return vt(i)?i:Nd(i,f)?[i]:Ww(qt(i))}var eL=$t;function Qo(i,f,T){var H=i.length;return T=T===e?H:T,!f&&T>=H?i:Ci(i,f,T)}var hw=zT||function(i){return Jt.clearTimeout(i)};function dw(i,f){if(f)return i.slice();var T=i.length,H=Ry?Ry(T):new i.constructor(T);return i.copy(H),H}function $d(i){var f=new i.constructor(i.byteLength);return new yc(f).set(new yc(i)),f}function tL(i,f){var T=f?$d(i.buffer):i.buffer;return new i.constructor(T,i.byteOffset,i.byteLength)}function nL(i){var f=new i.constructor(i.source,ei.exec(i));return f.lastIndex=i.lastIndex,f}function rL(i){return nl?St(nl.call(i)):{}}function pw(i,f){var T=f?$d(i.buffer):i.buffer;return new i.constructor(T,i.byteOffset,i.length)}function gw(i,f){if(i!==f){var T=i!==e,H=i===null,K=i===i,ee=ai(i),ae=f!==e,de=f===null,ve=f===f,Ie=ai(f);if(!de&&!Ie&&!ee&&i>f||ee&&ae&&ve&&!de&&!Ie||H&&ae&&ve||!T&&ve||!K)return 1;if(!H&&!ee&&!Ie&&i<f||Ie&&T&&K&&!H&&!ee||de&&T&&K||!ae&&K||!ve)return-1}return 0}function iL(i,f,T){for(var H=-1,K=i.criteria,ee=f.criteria,ae=K.length,de=T.length;++H<ae;){var ve=gw(K[H],ee[H]);if(ve){if(H>=de)return ve;var Ie=T[H];return ve*(Ie=="desc"?-1:1)}}return i.index-f.index}function fw(i,f,T,H){for(var K=-1,ee=i.length,ae=T.length,de=-1,ve=f.length,Ie=er(ee-ae,0),Le=xe(ve+Ie),Ne=!H;++de<ve;)Le[de]=f[de];for(;++K<ae;)(Ne||K<ee)&&(Le[T[K]]=i[K]);for(;Ie--;)Le[de++]=i[K++];return Le}function mw(i,f,T,H){for(var K=-1,ee=i.length,ae=-1,de=T.length,ve=-1,Ie=f.length,Le=er(ee-de,0),Ne=xe(Le+Ie),Ue=!H;++K<Le;)Ne[K]=i[K];for(var et=K;++ve<Ie;)Ne[et+ve]=f[ve];for(;++ae<de;)(Ue||K<ee)&&(Ne[et+T[ae]]=i[K++]);return Ne}function Ur(i,f){var T=-1,H=i.length;for(f||(f=xe(H));++T<H;)f[T]=i[T];return f}function to(i,f,T,H){var K=!T;T||(T={});for(var ee=-1,ae=f.length;++ee<ae;){var de=f[ee],ve=H?H(T[de],i[de],de,T,i):e;ve===e&&(ve=i[de]),K?Co(T,de,ve):rl(T,de,ve)}return T}function oL(i,f){return to(i,Od(i),f)}function sL(i,f){return to(i,Tw(i),f)}function Rc(i,f){return function(T,H){var K=vt(T)?ir:MI,ee=f?f():{};return K(T,i,at(H,2),ee)}}function pa(i){return $t(function(f,T){var H=-1,K=T.length,ee=K>1?T[K-1]:e,ae=K>2?T[2]:e;for(ee=i.length>3&&typeof ee=="function"?(K--,ee):e,ae&&Or(T[0],T[1],ae)&&(ee=K<3?e:ee,K=1),f=St(f);++H<K;){var de=T[H];de&&i(f,de,H,ee)}return f})}function vw(i,f){return function(T,H){if(T==null)return T;if(!Vr(T))return i(T,H);for(var K=T.length,ee=f?K:-1,ae=St(T);(f?ee--:++ee<K)&&H(ae[ee],ee,ae)!==!1;);return T}}function yw(i){return function(f,T,H){for(var K=-1,ee=St(f),ae=H(f),de=ae.length;de--;){var ve=ae[i?de:++K];if(T(ee[ve],ve,ee)===!1)break}return f}}function aL(i,f,T){var H=f&p,K=ll(i);function ee(){var ae=this&&this!==Jt&&this instanceof ee?K:i;return ae.apply(H?T:this,arguments)}return ee}function ww(i){return function(f){f=qt(f);var T=oe(f)?mt(f):e,H=T?T[0]:f.charAt(0),K=T?Qo(T,1).join(""):f.slice(1);return H[i]()+K}}function ga(i){return function(f){return A(vb(mb(f).replace(bn,"")),i,"")}}function ll(i){return function(){var f=arguments;switch(f.length){case 0:return new i;case 1:return new i(f[0]);case 2:return new i(f[0],f[1]);case 3:return new i(f[0],f[1],f[2]);case 4:return new i(f[0],f[1],f[2],f[3]);case 5:return new i(f[0],f[1],f[2],f[3],f[4]);case 6:return new i(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new i(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var T=da(i.prototype),H=i.apply(T,f);return xn(H)?H:T}}function lL(i,f,T){var H=ll(i);function K(){for(var ee=arguments.length,ae=xe(ee),de=ee,ve=fa(K);de--;)ae[de]=arguments[de];var Ie=ee<3&&ae[0]!==ve&&ae[ee-1]!==ve?[]:Pe(ae,ve);if(ee-=Ie.length,ee<T)return Sw(i,f,Oc,K.placeholder,e,ae,Ie,e,e,T-ee);var Le=this&&this!==Jt&&this instanceof K?H:i;return rr(Le,this,ae)}return K}function bw(i){return function(f,T,H){var K=St(f);if(!Vr(f)){var ee=at(T,3);f=ar(f),T=function(de){return ee(K[de],de,K)}}var ae=i(f,T,H);return ae>-1?K[ee?f[ae]:ae]:e}}function xw(i){return So(function(f){var T=f.length,H=T,K=bi.prototype.thru;for(i&&f.reverse();H--;){var ee=f[H];if(typeof ee!="function")throw new en(y);if(K&&!ae&&Pc(ee)=="wrapper")var ae=new bi([],!0)}for(H=ae?H:T;++H<T;){ee=f[H];var de=Pc(ee),ve=de=="wrapper"?Ed(ee):e;ve&&Dd(ve[0])&&ve[1]==(R|L|k|O)&&!ve[4].length&&ve[9]==1?ae=ae[Pc(ve[0])].apply(ae,ve[3]):ae=ee.length==1&&Dd(ee)?ae[de]():ae.thru(ee)}return function(){var Ie=arguments,Le=Ie[0];if(ae&&Ie.length==1&&vt(Le))return ae.plant(Le).value();for(var Ne=0,Ue=T?f[Ne].apply(this,Ie):Le;++Ne<T;)Ue=f[Ne].call(this,Ue);return Ue}})}function Oc(i,f,T,H,K,ee,ae,de,ve,Ie){var Le=f&R,Ne=f&p,Ue=f&w,et=f&(L|M),ct=f&E,At=Ue?e:ll(i);function ut(){for(var Tt=arguments.length,Nt=xe(Tt),li=Tt;li--;)Nt[li]=arguments[li];if(et)var Nr=fa(ut),ci=or(Nt,Nr);if(H&&(Nt=fw(Nt,H,K,et)),ee&&(Nt=mw(Nt,ee,ae,et)),Tt-=ci,et&&Tt<Ie){var Pn=Pe(Nt,Nr);return Sw(i,f,Oc,ut.placeholder,T,Nt,Pn,de,ve,Ie-Tt)}var ji=Ne?T:this,Mo=Ue?ji[i]:i;return Tt=Nt.length,de?Nt=ML(Nt,de):ct&&Tt>1&&Nt.reverse(),Le&&ve<Tt&&(Nt.length=ve),this&&this!==Jt&&this instanceof ut&&(Mo=At||ll(Mo)),Mo.apply(ji,Nt)}return ut}function Cw(i,f){return function(T,H){return DI(T,i,f(H),{})}}function Nc(i,f){return function(T,H){var K;if(T===e&&H===e)return f;if(T!==e&&(K=T),H!==e){if(K===e)return H;typeof T=="string"||typeof H=="string"?(T=si(T),H=si(H)):(T=aw(T),H=aw(H)),K=i(T,H)}return K}}function Md(i){return So(function(f){return f=v(f,it(at())),$t(function(T){var H=this;return i(f,function(K){return rr(K,H,T)})})})}function Dc(i,f){f=f===e?" ":si(f);var T=f.length;if(T<2)return T?xd(f,i):f;var H=xd(f,Cc(i/Mt(f)));return oe(f)?Qo(mt(H),0,i).join(""):H.slice(0,i)}function cL(i,f,T,H){var K=f&p,ee=ll(i);function ae(){for(var de=-1,ve=arguments.length,Ie=-1,Le=H.length,Ne=xe(Le+ve),Ue=this&&this!==Jt&&this instanceof ae?ee:i;++Ie<Le;)Ne[Ie]=H[Ie];for(;ve--;)Ne[Ie++]=arguments[++de];return rr(Ue,K?T:this,Ne)}return ae}function kw(i){return function(f,T,H){return H&&typeof H!="number"&&Or(f,T,H)&&(T=H=e),f=$o(f),T===e?(T=f,f=0):T=$o(T),H=H===e?f<T?1:-1:$o(H),qI(f,T,H,i)}}function Fc(i){return function(f,T){return typeof f=="string"&&typeof T=="string"||(f=Si(f),T=Si(T)),i(f,T)}}function Sw(i,f,T,H,K,ee,ae,de,ve,Ie){var Le=f&L,Ne=Le?ae:e,Ue=Le?e:ae,et=Le?ee:e,ct=Le?e:ee;f|=Le?k:C,f&=~(Le?C:k),f&b||(f&=-4);var At=[i,f,K,et,Ne,ct,Ue,de,ve,Ie],ut=T.apply(e,At);return Dd(i)&&Dw(ut,At),ut.placeholder=H,Fw(ut,i,f)}function Td(i){var f=Ft[i];return function(T,H){if(T=Si(T),H=H==null?0:Cr(Ct(H),292),H&&Fy(T)){var K=(qt(T)+"e").split("e"),ee=f(K[0]+"e"+(+K[1]+H));return K=(qt(ee)+"e").split("e"),+(K[0]+"e"+(+K[1]-H))}return f(T)}}var uL=ua&&1/je(new ua([,-0]))[1]==j?function(i){return new ua(i)}:Qd;function Aw(i){return function(f){var T=kr(f);return T==tt?Me(f):T==jn?Ge(f):Je(f,i(f))}}function ko(i,f,T,H,K,ee,ae,de){var ve=f&w;if(!ve&&typeof i!="function")throw new en(y);var Ie=H?H.length:0;if(Ie||(f&=-97,H=K=e),ae=ae===e?ae:er(Ct(ae),0),de=de===e?de:Ct(de),Ie-=K?K.length:0,f&C){var Le=H,Ne=K;H=K=e}var Ue=ve?e:Ed(i),et=[i,f,T,H,K,Le,Ne,ee,ae,de];if(Ue&&AL(et,Ue),i=et[0],f=et[1],T=et[2],H=et[3],K=et[4],de=et[9]=et[9]===e?ve?0:i.length:er(et[9]-Ie,0),!de&&f&(L|M)&&(f&=-25),!f||f==p)var ct=aL(i,f,T);else f==L||f==M?ct=lL(i,f,de):(f==k||f==(p|k))&&!K.length?ct=cL(i,f,T,H):ct=Oc.apply(e,et);var At=Ue?ow:Dw;return Fw(At(ct,et),i,f)}function _w(i,f,T,H){return i===e||zi(i,Mn[T])&&!Zt.call(H,T)?f:i}function $w(i,f,T,H,K,ee){return xn(i)&&xn(f)&&(ee.set(f,i),Ic(i,f,e,$w,ee),ee.delete(f)),i}function hL(i){return hl(i)?e:i}function Mw(i,f,T,H,K,ee){var ae=T&o,de=i.length,ve=f.length;if(de!=ve&&!(ae&&ve>de))return!1;var Ie=ee.get(i),Le=ee.get(f);if(Ie&&Le)return Ie==f&&Le==i;var Ne=-1,Ue=!0,et=T&c?new Ts:e;for(ee.set(i,f),ee.set(f,i);++Ne<de;){var ct=i[Ne],At=f[Ne];if(H)var ut=ae?H(At,ct,Ne,f,i,ee):H(ct,At,Ne,i,f,ee);if(ut!==e){if(ut)continue;Ue=!1;break}if(et){if(!W(f,function(Tt,Nt){if(!ft(et,Nt)&&(ct===Tt||K(ct,Tt,T,H,ee)))return et.push(Nt)})){Ue=!1;break}}else if(!(ct===At||K(ct,At,T,H,ee))){Ue=!1;break}}return ee.delete(i),ee.delete(f),Ue}function dL(i,f,T,H,K,ee,ae){switch(T){case Hn:if(i.byteLength!=f.byteLength||i.byteOffset!=f.byteOffset)return!1;i=i.buffer,f=f.buffer;case cn:return!(i.byteLength!=f.byteLength||!ee(new yc(i),new yc(f)));case _e:case $e:case ht:return zi(+i,+f);case qe:return i.name==f.name&&i.message==f.message;case vn:case tr:return i==f+"";case tt:var de=Me;case jn:var ve=H&o;if(de||(de=je),i.size!=f.size&&!ve)return!1;var Ie=ae.get(i);if(Ie)return Ie==f;H|=c,ae.set(i,f);var Le=Mw(de(i),de(f),H,K,ee,ae);return ae.delete(i),Le;case Mr:if(nl)return nl.call(i)==nl.call(f)}return!1}function pL(i,f,T,H,K,ee){var ae=T&o,de=Id(i),ve=de.length,Ie=Id(f),Le=Ie.length;if(ve!=Le&&!ae)return!1;for(var Ne=ve;Ne--;){var Ue=de[Ne];if(!(ae?Ue in f:Zt.call(f,Ue)))return!1}var et=ee.get(i),ct=ee.get(f);if(et&&ct)return et==f&&ct==i;var At=!0;ee.set(i,f),ee.set(f,i);for(var ut=ae;++Ne<ve;){Ue=de[Ne];var Tt=i[Ue],Nt=f[Ue];if(H)var li=ae?H(Nt,Tt,Ue,f,i,ee):H(Tt,Nt,Ue,i,f,ee);if(!(li===e?Tt===Nt||K(Tt,Nt,T,H,ee):li)){At=!1;break}ut||(ut=Ue=="constructor")}if(At&&!ut){var Nr=i.constructor,ci=f.constructor;Nr!=ci&&"constructor"in i&&"constructor"in f&&!(typeof Nr=="function"&&Nr instanceof Nr&&typeof ci=="function"&&ci instanceof ci)&&(At=!1)}return ee.delete(i),ee.delete(f),At}function So(i){return Pd(Ow(i,e,Hw),i+"")}function Id(i){return qy(i,ar,Od)}function Ld(i){return qy(i,Gr,Tw)}var Ed=Sc?function(i){return Sc.get(i)}:Qd;function Pc(i){for(var f=i.name+"",T=ha[f],H=Zt.call(ha,f)?T.length:0;H--;){var K=T[H],ee=K.func;if(ee==null||ee==i)return K.name}return f}function fa(i){var f=Zt.call(J,"placeholder")?J:i;return f.placeholder}function at(){var i=J.iteratee||Yd;return i=i===Yd?Qy:i,arguments.length?i(arguments[0],arguments[1]):i}function Wc(i,f){var T=i.__data__;return xL(f)?T[typeof f=="string"?"string":"hash"]:T.map}function Rd(i){for(var f=ar(i),T=f.length;T--;){var H=f[T],K=i[H];f[T]=[H,K,Ew(K)]}return f}function Es(i,f){var T=ie(i,f);return Xy(T)?T:e}function gL(i){var f=Zt.call(i,$s),T=i[$s];try{i[$s]=e;var H=!0}catch{}var K=mc.call(i);return H&&(f?i[$s]=T:delete i[$s]),K}var Od=ad?function(i){return i==null?[]:(i=St(i),xr(ad(i),function(f){return Ny.call(i,f)}))}:Zd,Tw=ad?function(i){for(var f=[];i;)$(f,Od(i)),i=wc(i);return f}:Zd,kr=Rr;(ld&&kr(new ld(new ArrayBuffer(1)))!=Hn||Ja&&kr(new Ja)!=tt||cd&&kr(cd.resolve())!=Kt||ua&&kr(new ua)!=jn||el&&kr(new el)!=He)&&(kr=function(i){var f=Rr(i),T=f==Rn?i.constructor:e,H=T?Rs(T):"";if(H)switch(H){case XT:return Hn;case QT:return tt;case ZT:return Kt;case JT:return jn;case eI:return He}return f});function fL(i,f,T){for(var H=-1,K=T.length;++H<K;){var ee=T[H],ae=ee.size;switch(ee.type){case"drop":i+=ae;break;case"dropRight":f-=ae;break;case"take":f=Cr(f,i+ae);break;case"takeRight":i=er(i,f-ae);break}}return{start:i,end:f}}function mL(i){var f=i.match(Di);return f?f[1].split(ys):[]}function Iw(i,f,T){f=Xo(f,i);for(var H=-1,K=f.length,ee=!1;++H<K;){var ae=no(f[H]);if(!(ee=i!=null&&T(i,ae)))break;i=i[ae]}return ee||++H!=K?ee:(K=i==null?0:i.length,!!K&&Gc(K)&&Ao(ae,K)&&(vt(i)||Os(i)))}function vL(i){var f=i.length,T=new i.constructor(f);return f&&typeof i[0]=="string"&&Zt.call(i,"index")&&(T.index=i.index,T.input=i.input),T}function Lw(i){return typeof i.constructor=="function"&&!cl(i)?da(wc(i)):{}}function yL(i,f,T){var H=i.constructor;switch(f){case cn:return $d(i);case _e:case $e:return new H(+i);case Hn:return tL(i,T);case Tr:case mr:case yn:case Xn:case nr:case Qt:case Qn:case ao:case Li:return pw(i,T);case tt:return new H;case ht:case tr:return new H(i);case vn:return nL(i);case jn:return new H;case Mr:return rL(i)}}function wL(i,f){var T=f.length;if(!T)return i;var H=T-1;return f[H]=(T>1?"& ":"")+f[H],f=f.join(T>2?", ":" "),i.replace(qi,`{
|
1470
|
+
/* [wrapped with `+f+`] */
|
1471
|
+
`)}function bL(i){return vt(i)||Os(i)||!!(Dy&&i&&i[Dy])}function Ao(i,f){var T=typeof i;return f=f??U,!!f&&(T=="number"||T!="symbol"&&on.test(i))&&i>-1&&i%1==0&&i<f}function Or(i,f,T){if(!xn(T))return!1;var H=typeof f;return(H=="number"?Vr(T)&&Ao(f,T.length):H=="string"&&f in T)?zi(T[f],i):!1}function Nd(i,f){if(vt(i))return!1;var T=typeof i;return T=="number"||T=="symbol"||T=="boolean"||i==null||ai(i)?!0:Oi.test(i)||!na.test(i)||f!=null&&i in St(f)}function xL(i){var f=typeof i;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?i!=="__proto__":i===null}function Dd(i){var f=Pc(i),T=J[f];if(typeof T!="function"||!(f in Rt.prototype))return!1;if(i===T)return!0;var H=Ed(T);return!!H&&i===H[0]}function CL(i){return!!Ey&&Ey in i}var kL=_s?_o:Jd;function cl(i){var f=i&&i.constructor,T=typeof f=="function"&&f.prototype||Mn;return i===T}function Ew(i){return i===i&&!xn(i)}function Rw(i,f){return function(T){return T==null?!1:T[i]===f&&(f!==e||i in St(T))}}function SL(i){var f=Uc(i,function(H){return T.size===d&&T.clear(),H}),T=f.cache;return f}function AL(i,f){var T=i[1],H=f[1],K=T|H,ee=K<(p|w|R),ae=H==R&&T==L||H==R&&T==O&&i[7].length<=f[8]||H==(R|O)&&f[7].length<=f[8]&&T==L;if(!(ee||ae))return i;H&p&&(i[2]=f[2],K|=T&p?0:b);var de=f[3];if(de){var ve=i[3];i[3]=ve?fw(ve,de,f[4]):de,i[4]=ve?Pe(i[3],s):f[4]}return de=f[5],de&&(ve=i[5],i[5]=ve?mw(ve,de,f[6]):de,i[6]=ve?Pe(i[5],s):f[6]),de=f[7],de&&(i[7]=de),H&R&&(i[8]=i[8]==null?f[8]:Cr(i[8],f[8])),i[9]==null&&(i[9]=f[9]),i[0]=f[0],i[1]=K,i}function _L(i){var f=[];if(i!=null)for(var T in St(i))f.push(T);return f}function $L(i){return mc.call(i)}function Ow(i,f,T){return f=er(f===e?i.length-1:f,0),function(){for(var H=arguments,K=-1,ee=er(H.length-f,0),ae=xe(ee);++K<ee;)ae[K]=H[f+K];K=-1;for(var de=xe(f+1);++K<f;)de[K]=H[K];return de[f]=T(ae),rr(i,this,de)}}function Nw(i,f){return f.length<2?i:Ls(i,Ci(f,0,-1))}function ML(i,f){for(var T=i.length,H=Cr(f.length,T),K=Ur(i);H--;){var ee=f[H];i[H]=Ao(ee,T)?K[ee]:e}return i}function Fd(i,f){if(!(f==="constructor"&&typeof i[f]=="function")&&f!="__proto__")return i[f]}var Dw=Pw(ow),ul=HT||function(i,f){return Jt.setTimeout(i,f)},Pd=Pw(QI);function Fw(i,f,T){var H=f+"";return Pd(i,wL(H,TL(mL(H),T)))}function Pw(i){var f=0,T=0;return function(){var H=KT(),K=N-(H-T);if(T=H,K>0){if(++f>=P)return arguments[0]}else f=0;return i.apply(e,arguments)}}function Bc(i,f){var T=-1,H=i.length,K=H-1;for(f=f===e?H:f;++T<f;){var ee=bd(T,K),ae=i[ee];i[ee]=i[T],i[T]=ae}return i.length=f,i}var Ww=SL(function(i){var f=[];return i.charCodeAt(0)===46&&f.push(""),i.replace(On,function(T,H,K,ee){f.push(K?ee.replace(Xa,"$1"):H||T)}),f});function no(i){if(typeof i=="string"||ai(i))return i;var f=i+"";return f=="0"&&1/i==-j?"-0":f}function Rs(i){if(i!=null){try{return fc.call(i)}catch{}try{return i+""}catch{}}return""}function TL(i,f){return cr(le,function(T){var H="_."+T[0];f&T[1]&&!ii(i,H)&&i.push(H)}),i.sort()}function Bw(i){if(i instanceof Rt)return i.clone();var f=new bi(i.__wrapped__,i.__chain__);return f.__actions__=Ur(i.__actions__),f.__index__=i.__index__,f.__values__=i.__values__,f}function IL(i,f,T){(T?Or(i,f,T):f===e)?f=1:f=er(Ct(f),0);var H=i==null?0:i.length;if(!H||f<1)return[];for(var K=0,ee=0,ae=xe(Cc(H/f));K<H;)ae[ee++]=Ci(i,K,K+=f);return ae}function LL(i){for(var f=-1,T=i==null?0:i.length,H=0,K=[];++f<T;){var ee=i[f];ee&&(K[H++]=ee)}return K}function EL(){var i=arguments.length;if(!i)return[];for(var f=xe(i-1),T=arguments[0],H=i;H--;)f[H-1]=arguments[H];return $(vt(T)?Ur(T):[T],hr(f,1))}var RL=$t(function(i,f){return Fn(i)?il(i,hr(f,1,Fn,!0)):[]}),OL=$t(function(i,f){var T=ki(f);return Fn(T)&&(T=e),Fn(i)?il(i,hr(f,1,Fn,!0),at(T,2)):[]}),NL=$t(function(i,f){var T=ki(f);return Fn(T)&&(T=e),Fn(i)?il(i,hr(f,1,Fn,!0),e,T):[]});function DL(i,f,T){var H=i==null?0:i.length;return H?(f=T||f===e?1:Ct(f),Ci(i,f<0?0:f,H)):[]}function FL(i,f,T){var H=i==null?0:i.length;return H?(f=T||f===e?1:Ct(f),f=H-f,Ci(i,0,f<0?0:f)):[]}function PL(i,f){return i&&i.length?Ec(i,at(f,3),!0,!0):[]}function WL(i,f){return i&&i.length?Ec(i,at(f,3),!0):[]}function BL(i,f,T,H){var K=i==null?0:i.length;return K?(T&&typeof T!="number"&&Or(i,f,T)&&(T=0,H=K),EI(i,f,T,H)):[]}function zw(i,f,T){var H=i==null?0:i.length;if(!H)return-1;var K=T==null?0:Ct(T);return K<0&&(K=er(H+K,0)),re(i,at(f,3),K)}function jw(i,f,T){var H=i==null?0:i.length;if(!H)return-1;var K=H-1;return T!==e&&(K=Ct(T),K=T<0?er(H+K,0):Cr(K,H-1)),re(i,at(f,3),K,!0)}function Hw(i){var f=i==null?0:i.length;return f?hr(i,1):[]}function zL(i){var f=i==null?0:i.length;return f?hr(i,j):[]}function jL(i,f){var T=i==null?0:i.length;return T?(f=f===e?1:Ct(f),hr(i,f)):[]}function HL(i){for(var f=-1,T=i==null?0:i.length,H={};++f<T;){var K=i[f];H[K[0]]=K[1]}return H}function Uw(i){return i&&i.length?i[0]:e}function UL(i,f,T){var H=i==null?0:i.length;if(!H)return-1;var K=T==null?0:Ct(T);return K<0&&(K=er(H+K,0)),se(i,f,K)}function VL(i){var f=i==null?0:i.length;return f?Ci(i,0,-1):[]}var GL=$t(function(i){var f=v(i,Ad);return f.length&&f[0]===i[0]?fd(f):[]}),KL=$t(function(i){var f=ki(i),T=v(i,Ad);return f===ki(T)?f=e:T.pop(),T.length&&T[0]===i[0]?fd(T,at(f,2)):[]}),qL=$t(function(i){var f=ki(i),T=v(i,Ad);return f=typeof f=="function"?f:e,f&&T.pop(),T.length&&T[0]===i[0]?fd(T,e,f):[]});function YL(i,f){return i==null?"":VT.call(i,f)}function ki(i){var f=i==null?0:i.length;return f?i[f-1]:e}function XL(i,f,T){var H=i==null?0:i.length;if(!H)return-1;var K=H;return T!==e&&(K=Ct(T),K=K<0?er(H+K,0):Cr(K,H-1)),f===f?pt(i,f,K):re(i,Ce,K,!0)}function QL(i,f){return i&&i.length?tw(i,Ct(f)):e}var ZL=$t(Vw);function Vw(i,f){return i&&i.length&&f&&f.length?wd(i,f):i}function JL(i,f,T){return i&&i.length&&f&&f.length?wd(i,f,at(T,2)):i}function eE(i,f,T){return i&&i.length&&f&&f.length?wd(i,f,e,T):i}var tE=So(function(i,f){var T=i==null?0:i.length,H=hd(i,f);return iw(i,v(f,function(K){return Ao(K,T)?+K:K}).sort(gw)),H});function nE(i,f){var T=[];if(!(i&&i.length))return T;var H=-1,K=[],ee=i.length;for(f=at(f,3);++H<ee;){var ae=i[H];f(ae,H,i)&&(T.push(ae),K.push(H))}return iw(i,K),T}function Wd(i){return i==null?i:YT.call(i)}function rE(i,f,T){var H=i==null?0:i.length;return H?(T&&typeof T!="number"&&Or(i,f,T)?(f=0,T=H):(f=f==null?0:Ct(f),T=T===e?H:Ct(T)),Ci(i,f,T)):[]}function iE(i,f){return Lc(i,f)}function oE(i,f,T){return Cd(i,f,at(T,2))}function sE(i,f){var T=i==null?0:i.length;if(T){var H=Lc(i,f);if(H<T&&zi(i[H],f))return H}return-1}function aE(i,f){return Lc(i,f,!0)}function lE(i,f,T){return Cd(i,f,at(T,2),!0)}function cE(i,f){var T=i==null?0:i.length;if(T){var H=Lc(i,f,!0)-1;if(zi(i[H],f))return H}return-1}function uE(i){return i&&i.length?sw(i):[]}function hE(i,f){return i&&i.length?sw(i,at(f,2)):[]}function dE(i){var f=i==null?0:i.length;return f?Ci(i,1,f):[]}function pE(i,f,T){return i&&i.length?(f=T||f===e?1:Ct(f),Ci(i,0,f<0?0:f)):[]}function gE(i,f,T){var H=i==null?0:i.length;return H?(f=T||f===e?1:Ct(f),f=H-f,Ci(i,f<0?0:f,H)):[]}function fE(i,f){return i&&i.length?Ec(i,at(f,3),!1,!0):[]}function mE(i,f){return i&&i.length?Ec(i,at(f,3)):[]}var vE=$t(function(i){return Yo(hr(i,1,Fn,!0))}),yE=$t(function(i){var f=ki(i);return Fn(f)&&(f=e),Yo(hr(i,1,Fn,!0),at(f,2))}),wE=$t(function(i){var f=ki(i);return f=typeof f=="function"?f:e,Yo(hr(i,1,Fn,!0),e,f)});function bE(i){return i&&i.length?Yo(i):[]}function xE(i,f){return i&&i.length?Yo(i,at(f,2)):[]}function CE(i,f){return f=typeof f=="function"?f:e,i&&i.length?Yo(i,e,f):[]}function Bd(i){if(!(i&&i.length))return[];var f=0;return i=xr(i,function(T){if(Fn(T))return f=er(T.length,f),!0}),Ke(f,function(T){return v(i,we(T))})}function Gw(i,f){if(!(i&&i.length))return[];var T=Bd(i);return f==null?T:v(T,function(H){return rr(f,e,H)})}var kE=$t(function(i,f){return Fn(i)?il(i,f):[]}),SE=$t(function(i){return Sd(xr(i,Fn))}),AE=$t(function(i){var f=ki(i);return Fn(f)&&(f=e),Sd(xr(i,Fn),at(f,2))}),_E=$t(function(i){var f=ki(i);return f=typeof f=="function"?f:e,Sd(xr(i,Fn),e,f)}),$E=$t(Bd);function ME(i,f){return uw(i||[],f||[],rl)}function TE(i,f){return uw(i||[],f||[],al)}var IE=$t(function(i){var f=i.length,T=f>1?i[f-1]:e;return T=typeof T=="function"?(i.pop(),T):e,Gw(i,T)});function Kw(i){var f=J(i);return f.__chain__=!0,f}function LE(i,f){return f(i),i}function zc(i,f){return f(i)}var EE=So(function(i){var f=i.length,T=f?i[0]:0,H=this.__wrapped__,K=function(ee){return hd(ee,i)};return f>1||this.__actions__.length||!(H instanceof Rt)||!Ao(T)?this.thru(K):(H=H.slice(T,+T+(f?1:0)),H.__actions__.push({func:zc,args:[K],thisArg:e}),new bi(H,this.__chain__).thru(function(ee){return f&&!ee.length&&ee.push(e),ee}))});function RE(){return Kw(this)}function OE(){return new bi(this.value(),this.__chain__)}function NE(){this.__values__===e&&(this.__values__=ab(this.value()));var i=this.__index__>=this.__values__.length,f=i?e:this.__values__[this.__index__++];return{done:i,value:f}}function DE(){return this}function FE(i){for(var f,T=this;T instanceof _c;){var H=Bw(T);H.__index__=0,H.__values__=e,f?K.__wrapped__=H:f=H;var K=H;T=T.__wrapped__}return K.__wrapped__=i,f}function PE(){var i=this.__wrapped__;if(i instanceof Rt){var f=i;return this.__actions__.length&&(f=new Rt(this)),f=f.reverse(),f.__actions__.push({func:zc,args:[Wd],thisArg:e}),new bi(f,this.__chain__)}return this.thru(Wd)}function WE(){return cw(this.__wrapped__,this.__actions__)}var BE=Rc(function(i,f,T){Zt.call(i,T)?++i[T]:Co(i,T,1)});function zE(i,f,T){var H=vt(i)?ur:LI;return T&&Or(i,f,T)&&(f=e),H(i,at(f,3))}function jE(i,f){var T=vt(i)?xr:Gy;return T(i,at(f,3))}var HE=bw(zw),UE=bw(jw);function VE(i,f){return hr(jc(i,f),1)}function GE(i,f){return hr(jc(i,f),j)}function KE(i,f,T){return T=T===e?1:Ct(T),hr(jc(i,f),T)}function qw(i,f){var T=vt(i)?cr:qo;return T(i,at(f,3))}function Yw(i,f){var T=vt(i)?As:Vy;return T(i,at(f,3))}var qE=Rc(function(i,f,T){Zt.call(i,T)?i[T].push(f):Co(i,T,[f])});function YE(i,f,T,H){i=Vr(i)?i:va(i),T=T&&!H?Ct(T):0;var K=i.length;return T<0&&(T=er(K+T,0)),Kc(i)?T<=K&&i.indexOf(f,T)>-1:!!K&&se(i,f,T)>-1}var XE=$t(function(i,f,T){var H=-1,K=typeof f=="function",ee=Vr(i)?xe(i.length):[];return qo(i,function(ae){ee[++H]=K?rr(f,ae,T):ol(ae,f,T)}),ee}),QE=Rc(function(i,f,T){Co(i,T,f)});function jc(i,f){var T=vt(i)?v:Zy;return T(i,at(f,3))}function ZE(i,f,T,H){return i==null?[]:(vt(f)||(f=f==null?[]:[f]),T=H?e:T,vt(T)||(T=T==null?[]:[T]),nw(i,f,T))}var JE=Rc(function(i,f,T){i[T?0:1].push(f)},function(){return[[],[]]});function eR(i,f,T){var H=vt(i)?A:Ee,K=arguments.length<3;return H(i,at(f,4),T,K,qo)}function tR(i,f,T){var H=vt(i)?F:Ee,K=arguments.length<3;return H(i,at(f,4),T,K,Vy)}function nR(i,f){var T=vt(i)?xr:Gy;return T(i,Vc(at(f,3)))}function rR(i){var f=vt(i)?zy:YI;return f(i)}function iR(i,f,T){(T?Or(i,f,T):f===e)?f=1:f=Ct(f);var H=vt(i)?_I:XI;return H(i,f)}function oR(i){var f=vt(i)?$I:ZI;return f(i)}function sR(i){if(i==null)return 0;if(Vr(i))return Kc(i)?Mt(i):i.length;var f=kr(i);return f==tt||f==jn?i.size:vd(i).length}function aR(i,f,T){var H=vt(i)?W:JI;return T&&Or(i,f,T)&&(f=e),H(i,at(f,3))}var lR=$t(function(i,f){if(i==null)return[];var T=f.length;return T>1&&Or(i,f[0],f[1])?f=[]:T>2&&Or(f[0],f[1],f[2])&&(f=[f[0]]),nw(i,hr(f,1),[])}),Hc=jT||function(){return Jt.Date.now()};function cR(i,f){if(typeof f!="function")throw new en(y);return i=Ct(i),function(){if(--i<1)return f.apply(this,arguments)}}function Xw(i,f,T){return f=T?e:f,f=i&&f==null?i.length:f,ko(i,R,e,e,e,e,f)}function Qw(i,f){var T;if(typeof f!="function")throw new en(y);return i=Ct(i),function(){return--i>0&&(T=f.apply(this,arguments)),i<=1&&(f=e),T}}var zd=$t(function(i,f,T){var H=p;if(T.length){var K=Pe(T,fa(zd));H|=k}return ko(i,H,f,T,K)}),Zw=$t(function(i,f,T){var H=p|w;if(T.length){var K=Pe(T,fa(Zw));H|=k}return ko(f,H,i,T,K)});function Jw(i,f,T){f=T?e:f;var H=ko(i,L,e,e,e,e,e,f);return H.placeholder=Jw.placeholder,H}function eb(i,f,T){f=T?e:f;var H=ko(i,M,e,e,e,e,e,f);return H.placeholder=eb.placeholder,H}function tb(i,f,T){var H,K,ee,ae,de,ve,Ie=0,Le=!1,Ne=!1,Ue=!0;if(typeof i!="function")throw new en(y);f=Si(f)||0,xn(T)&&(Le=!!T.leading,Ne="maxWait"in T,ee=Ne?er(Si(T.maxWait)||0,f):ee,Ue="trailing"in T?!!T.trailing:Ue);function et(Pn){var ji=H,Mo=K;return H=K=e,Ie=Pn,ae=i.apply(Mo,ji),ae}function ct(Pn){return Ie=Pn,de=ul(Tt,f),Le?et(Pn):ae}function At(Pn){var ji=Pn-ve,Mo=Pn-Ie,bb=f-ji;return Ne?Cr(bb,ee-Mo):bb}function ut(Pn){var ji=Pn-ve,Mo=Pn-Ie;return ve===e||ji>=f||ji<0||Ne&&Mo>=ee}function Tt(){var Pn=Hc();if(ut(Pn))return Nt(Pn);de=ul(Tt,At(Pn))}function Nt(Pn){return de=e,Ue&&H?et(Pn):(H=K=e,ae)}function li(){de!==e&&hw(de),Ie=0,H=ve=K=de=e}function Nr(){return de===e?ae:Nt(Hc())}function ci(){var Pn=Hc(),ji=ut(Pn);if(H=arguments,K=this,ve=Pn,ji){if(de===e)return ct(ve);if(Ne)return hw(de),de=ul(Tt,f),et(ve)}return de===e&&(de=ul(Tt,f)),ae}return ci.cancel=li,ci.flush=Nr,ci}var uR=$t(function(i,f){return Uy(i,1,f)}),hR=$t(function(i,f,T){return Uy(i,Si(f)||0,T)});function dR(i){return ko(i,E)}function Uc(i,f){if(typeof i!="function"||f!=null&&typeof f!="function")throw new en(y);var T=function(){var H=arguments,K=f?f.apply(this,H):H[0],ee=T.cache;if(ee.has(K))return ee.get(K);var ae=i.apply(this,H);return T.cache=ee.set(K,ae)||ee,ae};return T.cache=new(Uc.Cache||xo),T}Uc.Cache=xo;function Vc(i){if(typeof i!="function")throw new en(y);return function(){var f=arguments;switch(f.length){case 0:return!i.call(this);case 1:return!i.call(this,f[0]);case 2:return!i.call(this,f[0],f[1]);case 3:return!i.call(this,f[0],f[1],f[2])}return!i.apply(this,f)}}function pR(i){return Qw(2,i)}var gR=eL(function(i,f){f=f.length==1&&vt(f[0])?v(f[0],it(at())):v(hr(f,1),it(at()));var T=f.length;return $t(function(H){for(var K=-1,ee=Cr(H.length,T);++K<ee;)H[K]=f[K].call(this,H[K]);return rr(i,this,H)})}),jd=$t(function(i,f){var T=Pe(f,fa(jd));return ko(i,k,e,f,T)}),nb=$t(function(i,f){var T=Pe(f,fa(nb));return ko(i,C,e,f,T)}),fR=So(function(i,f){return ko(i,O,e,e,e,f)});function mR(i,f){if(typeof i!="function")throw new en(y);return f=f===e?f:Ct(f),$t(i,f)}function vR(i,f){if(typeof i!="function")throw new en(y);return f=f==null?0:er(Ct(f),0),$t(function(T){var H=T[f],K=Qo(T,0,f);return H&&$(K,H),rr(i,this,K)})}function yR(i,f,T){var H=!0,K=!0;if(typeof i!="function")throw new en(y);return xn(T)&&(H="leading"in T?!!T.leading:H,K="trailing"in T?!!T.trailing:K),tb(i,f,{leading:H,maxWait:f,trailing:K})}function wR(i){return Xw(i,1)}function bR(i,f){return jd(_d(f),i)}function xR(){if(!arguments.length)return[];var i=arguments[0];return vt(i)?i:[i]}function CR(i){return xi(i,l)}function kR(i,f){return f=typeof f=="function"?f:e,xi(i,l,f)}function SR(i){return xi(i,a|l)}function AR(i,f){return f=typeof f=="function"?f:e,xi(i,a|l,f)}function _R(i,f){return f==null||Hy(i,f,ar(f))}function zi(i,f){return i===f||i!==i&&f!==f}var $R=Fc(gd),MR=Fc(function(i,f){return i>=f}),Os=Yy((function(){return arguments})())?Yy:function(i){return Tn(i)&&Zt.call(i,"callee")&&!Ny.call(i,"callee")},vt=xe.isArray,TR=Hr?it(Hr):FI;function Vr(i){return i!=null&&Gc(i.length)&&!_o(i)}function Fn(i){return Tn(i)&&Vr(i)}function IR(i){return i===!0||i===!1||Tn(i)&&Rr(i)==_e}var Zo=UT||Jd,LR=Go?it(Go):PI;function ER(i){return Tn(i)&&i.nodeType===1&&!hl(i)}function RR(i){if(i==null)return!0;if(Vr(i)&&(vt(i)||typeof i=="string"||typeof i.splice=="function"||Zo(i)||ma(i)||Os(i)))return!i.length;var f=kr(i);if(f==tt||f==jn)return!i.size;if(cl(i))return!vd(i).length;for(var T in i)if(Zt.call(i,T))return!1;return!0}function OR(i,f){return sl(i,f)}function NR(i,f,T){T=typeof T=="function"?T:e;var H=T?T(i,f):e;return H===e?sl(i,f,e,T):!!H}function Hd(i){if(!Tn(i))return!1;var f=Rr(i);return f==qe||f==Te||typeof i.message=="string"&&typeof i.name=="string"&&!hl(i)}function DR(i){return typeof i=="number"&&Fy(i)}function _o(i){if(!xn(i))return!1;var f=Rr(i);return f==Ve||f==lt||f==fe||f==Zr}function rb(i){return typeof i=="number"&&i==Ct(i)}function Gc(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=U}function xn(i){var f=typeof i;return i!=null&&(f=="object"||f=="function")}function Tn(i){return i!=null&&typeof i=="object"}var ib=$n?it($n):BI;function FR(i,f){return i===f||md(i,f,Rd(f))}function PR(i,f,T){return T=typeof T=="function"?T:e,md(i,f,Rd(f),T)}function WR(i){return ob(i)&&i!=+i}function BR(i){if(kL(i))throw new ot(g);return Xy(i)}function zR(i){return i===null}function jR(i){return i==null}function ob(i){return typeof i=="number"||Tn(i)&&Rr(i)==ht}function hl(i){if(!Tn(i)||Rr(i)!=Rn)return!1;var f=wc(i);if(f===null)return!0;var T=Zt.call(f,"constructor")&&f.constructor;return typeof T=="function"&&T instanceof T&&fc.call(T)==PT}var Ud=ni?it(ni):zI;function HR(i){return rb(i)&&i>=-U&&i<=U}var sb=ri?it(ri):jI;function Kc(i){return typeof i=="string"||!vt(i)&&Tn(i)&&Rr(i)==tr}function ai(i){return typeof i=="symbol"||Tn(i)&&Rr(i)==Mr}var ma=yi?it(yi):HI;function UR(i){return i===e}function VR(i){return Tn(i)&&kr(i)==He}function GR(i){return Tn(i)&&Rr(i)==Wt}var KR=Fc(yd),qR=Fc(function(i,f){return i<=f});function ab(i){if(!i)return[];if(Vr(i))return Kc(i)?mt(i):Ur(i);if(Za&&i[Za])return be(i[Za]());var f=kr(i),T=f==tt?Me:f==jn?je:va;return T(i)}function $o(i){if(!i)return i===0?i:0;if(i=Si(i),i===j||i===-j){var f=i<0?-1:1;return f*q}return i===i?i:0}function Ct(i){var f=$o(i),T=f%1;return f===f?T?f-T:f:0}function lb(i){return i?Is(Ct(i),0,te):0}function Si(i){if(typeof i=="number")return i;if(ai(i))return Z;if(xn(i)){var f=typeof i.valueOf=="function"?i.valueOf():i;i=xn(f)?f+"":f}if(typeof i!="string")return i===0?i:+i;i=an(i);var T=ia.test(i);return T||Nn.test(i)?sn(i.slice(2),T?2:8):Lt.test(i)?Z:+i}function cb(i){return to(i,Gr(i))}function YR(i){return i?Is(Ct(i),-U,U):i===0?i:0}function qt(i){return i==null?"":si(i)}var XR=pa(function(i,f){if(cl(f)||Vr(f)){to(f,ar(f),i);return}for(var T in f)Zt.call(f,T)&&rl(i,T,f[T])}),ub=pa(function(i,f){to(f,Gr(f),i)}),qc=pa(function(i,f,T,H){to(f,Gr(f),i,H)}),QR=pa(function(i,f,T,H){to(f,ar(f),i,H)}),ZR=So(hd);function JR(i,f){var T=da(i);return f==null?T:jy(T,f)}var eO=$t(function(i,f){i=St(i);var T=-1,H=f.length,K=H>2?f[2]:e;for(K&&Or(f[0],f[1],K)&&(H=1);++T<H;)for(var ee=f[T],ae=Gr(ee),de=-1,ve=ae.length;++de<ve;){var Ie=ae[de],Le=i[Ie];(Le===e||zi(Le,Mn[Ie])&&!Zt.call(i,Ie))&&(i[Ie]=ee[Ie])}return i}),tO=$t(function(i){return i.push(e,$w),rr(hb,e,i)});function nO(i,f){return Q(i,at(f,3),eo)}function rO(i,f){return Q(i,at(f,3),pd)}function iO(i,f){return i==null?i:dd(i,at(f,3),Gr)}function oO(i,f){return i==null?i:Ky(i,at(f,3),Gr)}function sO(i,f){return i&&eo(i,at(f,3))}function aO(i,f){return i&&pd(i,at(f,3))}function lO(i){return i==null?[]:Tc(i,ar(i))}function cO(i){return i==null?[]:Tc(i,Gr(i))}function Vd(i,f,T){var H=i==null?e:Ls(i,f);return H===e?T:H}function uO(i,f){return i!=null&&Iw(i,f,RI)}function Gd(i,f){return i!=null&&Iw(i,f,OI)}var hO=Cw(function(i,f,T){f!=null&&typeof f.toString!="function"&&(f=mc.call(f)),i[f]=T},qd(Kr)),dO=Cw(function(i,f,T){f!=null&&typeof f.toString!="function"&&(f=mc.call(f)),Zt.call(i,f)?i[f].push(T):i[f]=[T]},at),pO=$t(ol);function ar(i){return Vr(i)?By(i):vd(i)}function Gr(i){return Vr(i)?By(i,!0):UI(i)}function gO(i,f){var T={};return f=at(f,3),eo(i,function(H,K,ee){Co(T,f(H,K,ee),H)}),T}function fO(i,f){var T={};return f=at(f,3),eo(i,function(H,K,ee){Co(T,K,f(H,K,ee))}),T}var mO=pa(function(i,f,T){Ic(i,f,T)}),hb=pa(function(i,f,T,H){Ic(i,f,T,H)}),vO=So(function(i,f){var T={};if(i==null)return T;var H=!1;f=v(f,function(ee){return ee=Xo(ee,i),H||(H=ee.length>1),ee}),to(i,Ld(i),T),H&&(T=xi(T,a|u|l,hL));for(var K=f.length;K--;)kd(T,f[K]);return T});function yO(i,f){return db(i,Vc(at(f)))}var wO=So(function(i,f){return i==null?{}:GI(i,f)});function db(i,f){if(i==null)return{};var T=v(Ld(i),function(H){return[H]});return f=at(f),rw(i,T,function(H,K){return f(H,K[0])})}function bO(i,f,T){f=Xo(f,i);var H=-1,K=f.length;for(K||(K=1,i=e);++H<K;){var ee=i==null?e:i[no(f[H])];ee===e&&(H=K,ee=T),i=_o(ee)?ee.call(i):ee}return i}function xO(i,f,T){return i==null?i:al(i,f,T)}function CO(i,f,T,H){return H=typeof H=="function"?H:e,i==null?i:al(i,f,T,H)}var pb=Aw(ar),gb=Aw(Gr);function kO(i,f,T){var H=vt(i),K=H||Zo(i)||ma(i);if(f=at(f,4),T==null){var ee=i&&i.constructor;K?T=H?new ee:[]:xn(i)?T=_o(ee)?da(wc(i)):{}:T={}}return(K?cr:eo)(i,function(ae,de,ve){return f(T,ae,de,ve)}),T}function SO(i,f){return i==null?!0:kd(i,f)}function AO(i,f,T){return i==null?i:lw(i,f,_d(T))}function _O(i,f,T,H){return H=typeof H=="function"?H:e,i==null?i:lw(i,f,_d(T),H)}function va(i){return i==null?[]:dn(i,ar(i))}function $O(i){return i==null?[]:dn(i,Gr(i))}function MO(i,f,T){return T===e&&(T=f,f=e),T!==e&&(T=Si(T),T=T===T?T:0),f!==e&&(f=Si(f),f=f===f?f:0),Is(Si(i),f,T)}function TO(i,f,T){return f=$o(f),T===e?(T=f,f=0):T=$o(T),i=Si(i),NI(i,f,T)}function IO(i,f,T){if(T&&typeof T!="boolean"&&Or(i,f,T)&&(f=T=e),T===e&&(typeof f=="boolean"?(T=f,f=e):typeof i=="boolean"&&(T=i,i=e)),i===e&&f===e?(i=0,f=1):(i=$o(i),f===e?(f=i,i=0):f=$o(f)),i>f){var H=i;i=f,f=H}if(T||i%1||f%1){var K=Py();return Cr(i+K*(f-i+We("1e-"+((K+"").length-1))),f)}return bd(i,f)}var LO=ga(function(i,f,T){return f=f.toLowerCase(),i+(T?fb(f):f)});function fb(i){return Kd(qt(i).toLowerCase())}function mb(i){return i=qt(i),i&&i.replace(Sn,pn).replace(vo,"")}function EO(i,f,T){i=qt(i),f=si(f);var H=i.length;T=T===e?H:Is(Ct(T),0,H);var K=T;return T-=f.length,T>=0&&i.slice(T,K)==f}function RO(i){return i=qt(i),i&&Ka.test(i)?i.replace(co,V):i}function OO(i){return i=qt(i),i&&Ni.test(i)?i.replace(vr,"\\$&"):i}var NO=ga(function(i,f,T){return i+(T?"-":"")+f.toLowerCase()}),DO=ga(function(i,f,T){return i+(T?" ":"")+f.toLowerCase()}),FO=ww("toLowerCase");function PO(i,f,T){i=qt(i),f=Ct(f);var H=f?Mt(i):0;if(!f||H>=f)return i;var K=(f-H)/2;return Dc(kc(K),T)+i+Dc(Cc(K),T)}function WO(i,f,T){i=qt(i),f=Ct(f);var H=f?Mt(i):0;return f&&H<f?i+Dc(f-H,T):i}function BO(i,f,T){i=qt(i),f=Ct(f);var H=f?Mt(i):0;return f&&H<f?Dc(f-H,T)+i:i}function zO(i,f,T){return T||f==null?f=0:f&&(f=+f),qT(qt(i).replace(wn,""),f||0)}function jO(i,f,T){return(T?Or(i,f,T):f===e)?f=1:f=Ct(f),xd(qt(i),f)}function HO(){var i=arguments,f=qt(i[0]);return i.length<3?f:f.replace(i[1],i[2])}var UO=ga(function(i,f,T){return i+(T?"_":"")+f.toLowerCase()});function VO(i,f,T){return T&&typeof T!="number"&&Or(i,f,T)&&(f=T=e),T=T===e?te:T>>>0,T?(i=qt(i),i&&(typeof f=="string"||f!=null&&!Ud(f))&&(f=si(f),!f&&oe(i))?Qo(mt(i),0,T):i.split(f,T)):[]}var GO=ga(function(i,f,T){return i+(T?" ":"")+Kd(f)});function KO(i,f,T){return i=qt(i),T=T==null?0:Is(Ct(T),0,i.length),f=si(f),i.slice(T,T+f.length)==f}function qO(i,f,T){var H=J.templateSettings;T&&Or(i,f,T)&&(f=e),i=qt(i),f=qc({},f,H,_w);var K=qc({},f.imports,H.imports,_w),ee=ar(K),ae=dn(K,ee),de,ve,Ie=0,Le=f.interpolate||di,Ne="__p += '",Ue=Er((f.escape||di).source+"|"+Le.source+"|"+(Le===vs?Fi:di).source+"|"+(f.evaluate||di).source+"|$","g"),et="//# sourceURL="+(Zt.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ji+"]")+`
|
1472
|
+
`;i.replace(Ue,function(ut,Tt,Nt,li,Nr,ci){return Nt||(Nt=li),Ne+=i.slice(Ie,ci).replace(br,X),Tt&&(de=!0,Ne+=`' +
|
1473
|
+
__e(`+Tt+`) +
|
1474
|
+
'`),Nr&&(ve=!0,Ne+=`';
|
1475
|
+
`+Nr+`;
|
1476
|
+
__p += '`),Nt&&(Ne+=`' +
|
1477
|
+
((__t = (`+Nt+`)) == null ? '' : __t) +
|
1478
|
+
'`),Ie=ci+ut.length,ut}),Ne+=`';
|
1479
|
+
`;var ct=Zt.call(f,"variable")&&f.variable;if(!ct)Ne=`with (obj) {
|
1480
|
+
`+Ne+`
|
1481
|
+
}
|
1482
|
+
`;else if(Ya.test(ct))throw new ot(x);Ne=(ve?Ne.replace(Ei,""):Ne).replace(Ri,"$1").replace(lo,"$1;"),Ne="function("+(ct||"obj")+`) {
|
1483
|
+
`+(ct?"":`obj || (obj = {});
|
1484
|
+
`)+"var __t, __p = ''"+(de?", __e = _.escape":"")+(ve?`, __j = Array.prototype.join;
|
1485
|
+
function print() { __p += __j.call(arguments, '') }
|
1486
|
+
`:`;
|
1487
|
+
`)+Ne+`return __p
|
1488
|
+
}`;var At=yb(function(){return xt(ee,et+"return "+Ne).apply(e,ae)});if(At.source=Ne,Hd(At))throw At;return At}function YO(i){return qt(i).toLowerCase()}function XO(i){return qt(i).toUpperCase()}function QO(i,f,T){if(i=qt(i),i&&(T||f===e))return an(i);if(!i||!(f=si(f)))return i;var H=mt(i),K=mt(f),ee=bt(H,K),ae=Vn(H,K)+1;return Qo(H,ee,ae).join("")}function ZO(i,f,T){if(i=qt(i),i&&(T||f===e))return i.slice(0,_t(i)+1);if(!i||!(f=si(f)))return i;var H=mt(i),K=Vn(H,mt(f))+1;return Qo(H,0,K).join("")}function JO(i,f,T){if(i=qt(i),i&&(T||f===e))return i.replace(wn,"");if(!i||!(f=si(f)))return i;var H=mt(i),K=bt(H,mt(f));return Qo(H,K).join("")}function e2(i,f){var T=I,H=z;if(xn(f)){var K="separator"in f?f.separator:K;T="length"in f?Ct(f.length):T,H="omission"in f?si(f.omission):H}i=qt(i);var ee=i.length;if(oe(i)){var ae=mt(i);ee=ae.length}if(T>=ee)return i;var de=T-Mt(H);if(de<1)return H;var ve=ae?Qo(ae,0,de).join(""):i.slice(0,de);if(K===e)return ve+H;if(ae&&(de+=ve.length-de),Ud(K)){if(i.slice(de).search(K)){var Ie,Le=ve;for(K.global||(K=Er(K.source,qt(ei.exec(K))+"g")),K.lastIndex=0;Ie=K.exec(Le);)var Ne=Ie.index;ve=ve.slice(0,Ne===e?de:Ne)}}else if(i.indexOf(si(K),de)!=de){var Ue=ve.lastIndexOf(K);Ue>-1&&(ve=ve.slice(0,Ue))}return ve+H}function t2(i){return i=qt(i),i&&No.test(i)?i.replace(lr,st):i}var n2=ga(function(i,f,T){return i+(T?" ":"")+f.toUpperCase()}),Kd=ww("toUpperCase");function vb(i,f,T){return i=qt(i),f=T?e:f,f===e?ge(i)?gn(i):Y(i):i.match(f)||[]}var yb=$t(function(i,f){try{return rr(i,e,f)}catch(T){return Hd(T)?T:new ot(T)}}),r2=So(function(i,f){return cr(f,function(T){T=no(T),Co(i,T,zd(i[T],i))}),i});function i2(i){var f=i==null?0:i.length,T=at();return i=f?v(i,function(H){if(typeof H[1]!="function")throw new en(y);return[T(H[0]),H[1]]}):[],$t(function(H){for(var K=-1;++K<f;){var ee=i[K];if(rr(ee[0],this,H))return rr(ee[1],this,H)}})}function o2(i){return II(xi(i,a))}function qd(i){return function(){return i}}function s2(i,f){return i==null||i!==i?f:i}var a2=xw(),l2=xw(!0);function Kr(i){return i}function Yd(i){return Qy(typeof i=="function"?i:xi(i,a))}function c2(i){return Jy(xi(i,a))}function u2(i,f){return ew(i,xi(f,a))}var h2=$t(function(i,f){return function(T){return ol(T,i,f)}}),d2=$t(function(i,f){return function(T){return ol(i,T,f)}});function Xd(i,f,T){var H=ar(f),K=Tc(f,H);T==null&&!(xn(f)&&(K.length||!H.length))&&(T=f,f=i,i=this,K=Tc(f,ar(f)));var ee=!(xn(T)&&"chain"in T)||!!T.chain,ae=_o(i);return cr(K,function(de){var ve=f[de];i[de]=ve,ae&&(i.prototype[de]=function(){var Ie=this.__chain__;if(ee||Ie){var Le=i(this.__wrapped__),Ne=Le.__actions__=Ur(this.__actions__);return Ne.push({func:ve,args:arguments,thisArg:i}),Le.__chain__=Ie,Le}return ve.apply(i,$([this.value()],arguments))})}),i}function p2(){return Jt._===this&&(Jt._=WT),this}function Qd(){}function g2(i){return i=Ct(i),$t(function(f){return tw(f,i)})}var f2=Md(v),m2=Md(ur),v2=Md(W);function wb(i){return Nd(i)?we(no(i)):KI(i)}function y2(i){return function(f){return i==null?e:Ls(i,f)}}var w2=kw(),b2=kw(!0);function Zd(){return[]}function Jd(){return!1}function x2(){return{}}function C2(){return""}function k2(){return!0}function S2(i,f){if(i=Ct(i),i<1||i>U)return[];var T=te,H=Cr(i,te);f=at(f),i-=te;for(var K=Ke(H,f);++T<i;)f(T);return K}function A2(i){return vt(i)?v(i,no):ai(i)?[i]:Ur(Ww(qt(i)))}function _2(i){var f=++FT;return qt(i)+f}var $2=Nc(function(i,f){return i+f},0),M2=Td("ceil"),T2=Nc(function(i,f){return i/f},1),I2=Td("floor");function L2(i){return i&&i.length?Mc(i,Kr,gd):e}function E2(i,f){return i&&i.length?Mc(i,at(f,2),gd):e}function R2(i){return me(i,Kr)}function O2(i,f){return me(i,at(f,2))}function N2(i){return i&&i.length?Mc(i,Kr,yd):e}function D2(i,f){return i&&i.length?Mc(i,at(f,2),yd):e}var F2=Nc(function(i,f){return i*f},1),P2=Td("round"),W2=Nc(function(i,f){return i-f},0);function B2(i){return i&&i.length?rt(i,Kr):0}function z2(i,f){return i&&i.length?rt(i,at(f,2)):0}return J.after=cR,J.ary=Xw,J.assign=XR,J.assignIn=ub,J.assignInWith=qc,J.assignWith=QR,J.at=ZR,J.before=Qw,J.bind=zd,J.bindAll=r2,J.bindKey=Zw,J.castArray=xR,J.chain=Kw,J.chunk=IL,J.compact=LL,J.concat=EL,J.cond=i2,J.conforms=o2,J.constant=qd,J.countBy=BE,J.create=JR,J.curry=Jw,J.curryRight=eb,J.debounce=tb,J.defaults=eO,J.defaultsDeep=tO,J.defer=uR,J.delay=hR,J.difference=RL,J.differenceBy=OL,J.differenceWith=NL,J.drop=DL,J.dropRight=FL,J.dropRightWhile=PL,J.dropWhile=WL,J.fill=BL,J.filter=jE,J.flatMap=VE,J.flatMapDeep=GE,J.flatMapDepth=KE,J.flatten=Hw,J.flattenDeep=zL,J.flattenDepth=jL,J.flip=dR,J.flow=a2,J.flowRight=l2,J.fromPairs=HL,J.functions=lO,J.functionsIn=cO,J.groupBy=qE,J.initial=VL,J.intersection=GL,J.intersectionBy=KL,J.intersectionWith=qL,J.invert=hO,J.invertBy=dO,J.invokeMap=XE,J.iteratee=Yd,J.keyBy=QE,J.keys=ar,J.keysIn=Gr,J.map=jc,J.mapKeys=gO,J.mapValues=fO,J.matches=c2,J.matchesProperty=u2,J.memoize=Uc,J.merge=mO,J.mergeWith=hb,J.method=h2,J.methodOf=d2,J.mixin=Xd,J.negate=Vc,J.nthArg=g2,J.omit=vO,J.omitBy=yO,J.once=pR,J.orderBy=ZE,J.over=f2,J.overArgs=gR,J.overEvery=m2,J.overSome=v2,J.partial=jd,J.partialRight=nb,J.partition=JE,J.pick=wO,J.pickBy=db,J.property=wb,J.propertyOf=y2,J.pull=ZL,J.pullAll=Vw,J.pullAllBy=JL,J.pullAllWith=eE,J.pullAt=tE,J.range=w2,J.rangeRight=b2,J.rearg=fR,J.reject=nR,J.remove=nE,J.rest=mR,J.reverse=Wd,J.sampleSize=iR,J.set=xO,J.setWith=CO,J.shuffle=oR,J.slice=rE,J.sortBy=lR,J.sortedUniq=uE,J.sortedUniqBy=hE,J.split=VO,J.spread=vR,J.tail=dE,J.take=pE,J.takeRight=gE,J.takeRightWhile=fE,J.takeWhile=mE,J.tap=LE,J.throttle=yR,J.thru=zc,J.toArray=ab,J.toPairs=pb,J.toPairsIn=gb,J.toPath=A2,J.toPlainObject=cb,J.transform=kO,J.unary=wR,J.union=vE,J.unionBy=yE,J.unionWith=wE,J.uniq=bE,J.uniqBy=xE,J.uniqWith=CE,J.unset=SO,J.unzip=Bd,J.unzipWith=Gw,J.update=AO,J.updateWith=_O,J.values=va,J.valuesIn=$O,J.without=kE,J.words=vb,J.wrap=bR,J.xor=SE,J.xorBy=AE,J.xorWith=_E,J.zip=$E,J.zipObject=ME,J.zipObjectDeep=TE,J.zipWith=IE,J.entries=pb,J.entriesIn=gb,J.extend=ub,J.extendWith=qc,Xd(J,J),J.add=$2,J.attempt=yb,J.camelCase=LO,J.capitalize=fb,J.ceil=M2,J.clamp=MO,J.clone=CR,J.cloneDeep=SR,J.cloneDeepWith=AR,J.cloneWith=kR,J.conformsTo=_R,J.deburr=mb,J.defaultTo=s2,J.divide=T2,J.endsWith=EO,J.eq=zi,J.escape=RO,J.escapeRegExp=OO,J.every=zE,J.find=HE,J.findIndex=zw,J.findKey=nO,J.findLast=UE,J.findLastIndex=jw,J.findLastKey=rO,J.floor=I2,J.forEach=qw,J.forEachRight=Yw,J.forIn=iO,J.forInRight=oO,J.forOwn=sO,J.forOwnRight=aO,J.get=Vd,J.gt=$R,J.gte=MR,J.has=uO,J.hasIn=Gd,J.head=Uw,J.identity=Kr,J.includes=YE,J.indexOf=UL,J.inRange=TO,J.invoke=pO,J.isArguments=Os,J.isArray=vt,J.isArrayBuffer=TR,J.isArrayLike=Vr,J.isArrayLikeObject=Fn,J.isBoolean=IR,J.isBuffer=Zo,J.isDate=LR,J.isElement=ER,J.isEmpty=RR,J.isEqual=OR,J.isEqualWith=NR,J.isError=Hd,J.isFinite=DR,J.isFunction=_o,J.isInteger=rb,J.isLength=Gc,J.isMap=ib,J.isMatch=FR,J.isMatchWith=PR,J.isNaN=WR,J.isNative=BR,J.isNil=jR,J.isNull=zR,J.isNumber=ob,J.isObject=xn,J.isObjectLike=Tn,J.isPlainObject=hl,J.isRegExp=Ud,J.isSafeInteger=HR,J.isSet=sb,J.isString=Kc,J.isSymbol=ai,J.isTypedArray=ma,J.isUndefined=UR,J.isWeakMap=VR,J.isWeakSet=GR,J.join=YL,J.kebabCase=NO,J.last=ki,J.lastIndexOf=XL,J.lowerCase=DO,J.lowerFirst=FO,J.lt=KR,J.lte=qR,J.max=L2,J.maxBy=E2,J.mean=R2,J.meanBy=O2,J.min=N2,J.minBy=D2,J.stubArray=Zd,J.stubFalse=Jd,J.stubObject=x2,J.stubString=C2,J.stubTrue=k2,J.multiply=F2,J.nth=QL,J.noConflict=p2,J.noop=Qd,J.now=Hc,J.pad=PO,J.padEnd=WO,J.padStart=BO,J.parseInt=zO,J.random=IO,J.reduce=eR,J.reduceRight=tR,J.repeat=jO,J.replace=HO,J.result=bO,J.round=P2,J.runInContext=pe,J.sample=rR,J.size=sR,J.snakeCase=UO,J.some=aR,J.sortedIndex=iE,J.sortedIndexBy=oE,J.sortedIndexOf=sE,J.sortedLastIndex=aE,J.sortedLastIndexBy=lE,J.sortedLastIndexOf=cE,J.startCase=GO,J.startsWith=KO,J.subtract=W2,J.sum=B2,J.sumBy=z2,J.template=qO,J.times=S2,J.toFinite=$o,J.toInteger=Ct,J.toLength=lb,J.toLower=YO,J.toNumber=Si,J.toSafeInteger=YR,J.toString=qt,J.toUpper=XO,J.trim=QO,J.trimEnd=ZO,J.trimStart=JO,J.truncate=e2,J.unescape=t2,J.uniqueId=_2,J.upperCase=n2,J.upperFirst=Kd,J.each=qw,J.eachRight=Yw,J.first=Uw,Xd(J,(function(){var i={};return eo(J,function(f,T){Zt.call(J.prototype,T)||(i[T]=f)}),i})(),{chain:!1}),J.VERSION=r,cr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){J[i].placeholder=J}),cr(["drop","take"],function(i,f){Rt.prototype[i]=function(T){T=T===e?1:er(Ct(T),0);var H=this.__filtered__&&!f?new Rt(this):this.clone();return H.__filtered__?H.__takeCount__=Cr(T,H.__takeCount__):H.__views__.push({size:Cr(T,te),type:i+(H.__dir__<0?"Right":"")}),H},Rt.prototype[i+"Right"]=function(T){return this.reverse()[i](T).reverse()}}),cr(["filter","map","takeWhile"],function(i,f){var T=f+1,H=T==_||T==D;Rt.prototype[i]=function(K){var ee=this.clone();return ee.__iteratees__.push({iteratee:at(K,3),type:T}),ee.__filtered__=ee.__filtered__||H,ee}}),cr(["head","last"],function(i,f){var T="take"+(f?"Right":"");Rt.prototype[i]=function(){return this[T](1).value()[0]}}),cr(["initial","tail"],function(i,f){var T="drop"+(f?"":"Right");Rt.prototype[i]=function(){return this.__filtered__?new Rt(this):this[T](1)}}),Rt.prototype.compact=function(){return this.filter(Kr)},Rt.prototype.find=function(i){return this.filter(i).head()},Rt.prototype.findLast=function(i){return this.reverse().find(i)},Rt.prototype.invokeMap=$t(function(i,f){return typeof i=="function"?new Rt(this):this.map(function(T){return ol(T,i,f)})}),Rt.prototype.reject=function(i){return this.filter(Vc(at(i)))},Rt.prototype.slice=function(i,f){i=Ct(i);var T=this;return T.__filtered__&&(i>0||f<0)?new Rt(T):(i<0?T=T.takeRight(-i):i&&(T=T.drop(i)),f!==e&&(f=Ct(f),T=f<0?T.dropRight(-f):T.take(f-i)),T)},Rt.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Rt.prototype.toArray=function(){return this.take(te)},eo(Rt.prototype,function(i,f){var T=/^(?:filter|find|map|reject)|While$/.test(f),H=/^(?:head|last)$/.test(f),K=J[H?"take"+(f=="last"?"Right":""):f],ee=H||/^find/.test(f);K&&(J.prototype[f]=function(){var ae=this.__wrapped__,de=H?[1]:arguments,ve=ae instanceof Rt,Ie=de[0],Le=ve||vt(ae),Ne=function(Tt){var Nt=K.apply(J,$([Tt],de));return H&&Ue?Nt[0]:Nt};Le&&T&&typeof Ie=="function"&&Ie.length!=1&&(ve=Le=!1);var Ue=this.__chain__,et=!!this.__actions__.length,ct=ee&&!Ue,At=ve&&!et;if(!ee&&Le){ae=At?ae:new Rt(this);var ut=i.apply(ae,de);return ut.__actions__.push({func:zc,args:[Ne],thisArg:e}),new bi(ut,Ue)}return ct&&At?i.apply(this,de):(ut=this.thru(Ne),ct?H?ut.value()[0]:ut.value():ut)})}),cr(["pop","push","shift","sort","splice","unshift"],function(i){var f=sr[i],T=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",H=/^(?:pop|shift)$/.test(i);J.prototype[i]=function(){var K=arguments;if(H&&!this.__chain__){var ee=this.value();return f.apply(vt(ee)?ee:[],K)}return this[T](function(ae){return f.apply(vt(ae)?ae:[],K)})}}),eo(Rt.prototype,function(i,f){var T=J[f];if(T){var H=T.name+"";Zt.call(ha,H)||(ha[H]=[]),ha[H].push({name:f,func:T})}}),ha[Oc(e,w).name]=[{name:"wrapper",func:e}],Rt.prototype.clone=tI,Rt.prototype.reverse=nI,Rt.prototype.value=rI,J.prototype.at=EE,J.prototype.chain=RE,J.prototype.commit=OE,J.prototype.next=NE,J.prototype.plant=FE,J.prototype.reverse=PE,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=WE,J.prototype.first=J.prototype.head,Za&&(J.prototype[Za]=DE),J}),Ot=Gn();Un?((Un.exports=Ot)._=Ot,un._=Ot):Jt._=Ot}).call(BC)})(Rl,Rl.exports)),Rl.exports}var jC=zC();dr("D",fl(jC)).debounce(function(){this.rebuildDisplayText()},300);var af={exports:{}},lf;function HC(){return lf||(lf=1,(function(n,t){(function(){ace.require(["ace/mode/text"],function(e){n&&(n.exports=e)})})()})(af)),af.exports}HC();const UC=!0,Kn="u-",VC="uplot",GC=Kn+"hz",KC=Kn+"vt",qC=Kn+"title",YC=Kn+"wrap",XC=Kn+"under",QC=Kn+"over",ZC=Kn+"axis",ls=Kn+"off",JC=Kn+"select",ek=Kn+"cursor-x",tk=Kn+"cursor-y",nk=Kn+"cursor-pt",rk=Kn+"legend",ik=Kn+"live",ok=Kn+"inline",sk=Kn+"series",ak=Kn+"marker",cf=Kn+"label",lk=Kn+"value",Ia="width",La="height",Ea="top",uf="bottom",Hs="left",_u="right",$u="#000",hf=$u+"0",Mu="mousemove",df="mousedown",Tu="mouseup",pf="mouseenter",gf="mouseleave",ff="dblclick",ck="resize",uk="scroll",mf="change",Ol="dppxchange",Iu="--",Us=typeof window<"u",Lu=Us?document:null,Vs=Us?window:null,hk=Us?navigator:null;let jt,Nl;function Eu(){let n=devicePixelRatio;jt!=n&&(jt=n,Nl&&Nu(mf,Nl,Eu),Nl=matchMedia(`(min-resolution: ${jt-.001}dppx) and (max-resolution: ${jt+.001}dppx)`),cs(mf,Nl,Eu),Vs.dispatchEvent(new CustomEvent(Ol)))}function Yr(n,t){if(t!=null){let e=n.classList;!e.contains(t)&&e.add(t)}}function Ru(n,t){let e=n.classList;e.contains(t)&&e.remove(t)}function ln(n,t,e){n.style[t]=e+"px"}function $i(n,t,e,r){let m=Lu.createElement(n);return t!=null&&Yr(m,t),e!=null&&e.insertBefore(m,r),m}function ui(n,t){return $i("div",n,t)}const vf=new WeakMap;function Ui(n,t,e,r,m){let g="translate("+t+"px,"+e+"px)",y=vf.get(n);g!=y&&(n.style.transform=g,vf.set(n,g),t<0||e<0||t>r||e>m?Yr(n,ls):Ru(n,ls))}const yf=new WeakMap;function wf(n,t,e){let r=t+e,m=yf.get(n);r!=m&&(yf.set(n,r),n.style.background=t,n.style.borderColor=e)}const bf=new WeakMap;function xf(n,t,e,r){let m=t+""+e,g=bf.get(n);m!=g&&(bf.set(n,m),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 Ou={passive:!0},dk={...Ou,capture:!0};function cs(n,t,e,r){t.addEventListener(n,e,r?dk:Ou)}function Nu(n,t,e,r){t.removeEventListener(n,e,Ou)}Us&&Eu();function Mi(n,t,e,r){let m;e=e||0,r=r||t.length-1;let g=r<=2147483647;for(;r-e>1;)m=g?e+r>>1:Qr((e+r)/2),t[m]<n?e=m:r=m;return n-t[e]<=t[r]-n?e:r}function Cf(n){return(t,e,r)=>{let m=-1,g=-1;for(let y=e;y<=r;y++)if(n(t[y])){m=y;break}for(let y=r;y>=e;y--)if(n(t[y])){g=y;break}return[m,g]}}const kf=n=>n!=null,Sf=n=>n!=null&&n>0,Dl=Cf(kf),pk=Cf(Sf);function gk(n,t,e,r=0,m=!1){let g=m?pk:Dl,y=m?Sf:kf;[t,e]=g(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 d=t;d<=e;d++){let s=n[d];y(s)&&(s<x?x=s:s>h&&(h=s))}return[x??tn,h??-tn]}function Fl(n,t,e,r){let m=$f(n),g=$f(t);n==t&&(m==-1?(n*=e,t/=e):(n/=e,t*=e));let y=e==10?oo:Mf,x=m==1?Qr:hi,h=g==1?hi:Qr,d=x(y(qn(n))),s=h(y(qn(t))),a=Gs(e,d),u=Gs(e,s);return e==10&&(d<0&&(a=nn(a,-d)),s<0&&(u=nn(u,-s))),r||e==2?(n=a*m,t=u*g):(n=Nf(n,a),t=Bl(t,u)),[n,t]}function Du(n,t,e,r){let m=Fl(n,t,e,r);return n==0&&(m[0]=0),t==0&&(m[1]=0),m}const Fu=.1,Af={mode:3,pad:Fu},Ra={pad:0,soft:null,mode:0},fk={min:Ra,max:Ra};function Pl(n,t,e,r){return zl(e)?_f(n,t,e):(Ra.pad=e,Ra.soft=r?0:null,Ra.mode=r?3:0,_f(n,t,fk))}function Pt(n,t){return n??t}function mk(n,t,e){for(t=Pt(t,0),e=Pt(e,n.length-1);t<=e;){if(n[t]!=null)return!0;t++}return!1}function _f(n,t,e){let r=e.min,m=e.max,g=Pt(r.pad,0),y=Pt(m.pad,0),x=Pt(r.hard,-tn),h=Pt(m.hard,tn),d=Pt(r.soft,tn),s=Pt(m.soft,-tn),a=Pt(r.mode,0),u=Pt(m.mode,0),l=t-n,o=oo(l),c=_r(qn(n),qn(t)),p=oo(c),w=qn(p-o);(l<1e-24||w>10)&&(l=0,(n==0||t==0)&&(l=1e-24,a==2&&d!=tn&&(g=0),u==2&&s!=-tn&&(y=0)));let b=l||c||1e3,L=oo(b),M=Gs(10,Qr(L)),k=b*(l==0?n==0?.1:1:g),C=nn(Nf(n-k,M/10),24),R=n>=d&&(a==1||a==3&&C<=d||a==2&&C>=d)?d:tn,O=_r(x,C<R&&n>=R?R:Ti(R,C)),E=b*(l==0?t==0?.1:1:y),I=nn(Bl(t+E,M/10),24),z=t<=s&&(u==1||u==3&&I>=s||u==2&&I<=s)?s:-tn,P=Ti(h,I>z&&t<=z?z:_r(z,I));return O==P&&O==0&&(P=100),[O,P]}const vk=new Intl.NumberFormat(Us?hk.language:"en-US"),Pu=n=>vk.format(n),Xr=Math,Wl=Xr.PI,qn=Xr.abs,Qr=Xr.floor,Yn=Xr.round,hi=Xr.ceil,Ti=Xr.min,_r=Xr.max,Gs=Xr.pow,$f=Xr.sign,oo=Xr.log10,Mf=Xr.log2,yk=(n,t=1)=>Xr.sinh(n)*t,Wu=(n,t=1)=>Xr.asinh(n/t),tn=1/0;function Tf(n){return(oo((n^n>>31)-(n>>31))|0)+1}function Bu(n,t,e){return Ti(_r(n,t),e)}function If(n){return typeof n=="function"}function It(n){return If(n)?n:()=>n}const wk=()=>{},Lf=n=>n,Ef=(n,t)=>t,bk=n=>null,Rf=n=>!0,Of=(n,t)=>n==t,xk=/\.\d*?(?=9{6,}|0{6,})/gm,us=n=>{if(Ff(n)||Ro.has(n))return n;const t=`${n}`,e=t.match(xk);if(e==null)return n;let r=e[0].length-1;if(t.indexOf("e-")!=-1){let[m,g]=t.split("e");return+`${us(m)}e${g}`}return nn(n,r)};function hs(n,t){return us(nn(us(n/t))*t)}function Bl(n,t){return us(hi(us(n/t))*t)}function Nf(n,t){return us(Qr(us(n/t))*t)}function nn(n,t=0){if(Ff(n))return n;let e=10**t,r=n*e*(1+Number.EPSILON);return Yn(r)/e}const Ro=new Map;function Df(n){return((""+n).split(".")[1]||"").length}function Oa(n,t,e,r){let m=[],g=r.map(Df);for(let y=t;y<e;y++){let x=qn(y),h=nn(Gs(n,y),x);for(let d=0;d<r.length;d++){let s=n==10?+`${r[d]}e${y}`:r[d]*h,a=(y>=0?0:x)+(y>=g[d]?0:g[d]),u=n==10?s:nn(s,a);m.push(u),Ro.set(u,a)}}return m}const Na={},zu=[],Ks=[null,null],Oo=Array.isArray,Ff=Number.isInteger,Ck=n=>n===void 0;function Pf(n){return typeof n=="string"}function zl(n){let t=!1;if(n!=null){let e=n.constructor;t=e==null||e==Object}return t}function kk(n){return n!=null&&typeof n=="object"}const Sk=Object.getPrototypeOf(Uint8Array),Wf="__proto__";function qs(n,t=zl){let e;if(Oo(n)){let r=n.find(m=>m!=null);if(Oo(r)||t(r)){e=Array(n.length);for(let m=0;m<n.length;m++)e[m]=qs(n[m],t)}else e=n.slice()}else if(n instanceof Sk)e=n.slice();else if(t(n)){e={};for(let r in n)r!=Wf&&(e[r]=qs(n[r],t))}else e=n;return e}function Bn(n){let t=arguments;for(let e=1;e<t.length;e++){let r=t[e];for(let m in r)m!=Wf&&(zl(n[m])?Bn(n[m],qs(r[m])):n[m]=qs(r[m]))}return n}const Ak=0,_k=1,$k=2;function Mk(n,t,e){for(let r=0,m,g=-1;r<t.length;r++){let y=t[r];if(y>g){for(m=y-1;m>=0&&n[m]==null;)n[m--]=null;for(m=y+1;m<e&&n[m]==null;)n[g=m++]=null}}}function Tk(n,t){if(Ek(n)){let y=n[0].slice();for(let x=1;x<n.length;x++)y.push(...n[x].slice(1));return Rk(y[0])||(y=Lk(y)),y}let e=new Set;for(let y=0;y<n.length;y++){let x=n[y][0],h=x.length;for(let d=0;d<h;d++)e.add(x[d])}let r=[Array.from(e).sort((y,x)=>y-x)],m=r[0].length,g=new Map;for(let y=0;y<m;y++)g.set(r[0][y],y);for(let y=0;y<n.length;y++){let x=n[y],h=x[0];for(let d=1;d<x.length;d++){let s=x[d],a=Array(m).fill(void 0),u=t?t[y][d]:_k,l=[];for(let o=0;o<s.length;o++){let c=s[o],p=g.get(h[o]);c===null?u!=Ak&&(a[p]=c,u==$k&&l.push(p)):a[p]=c}Mk(a,l,m),r.push(a)}}return r}const Ik=typeof queueMicrotask>"u"?n=>Promise.resolve().then(n):queueMicrotask;function Lk(n){let t=n[0],e=t.length,r=Array(e);for(let g=0;g<r.length;g++)r[g]=g;r.sort((g,y)=>t[g]-t[y]);let m=[];for(let g=0;g<n.length;g++){let y=n[g],x=Array(e);for(let h=0;h<e;h++)x[h]=y[r[h]];m.push(x)}return m}function Ek(n){let t=n[0][0],e=t.length;for(let r=1;r<n.length;r++){let m=n[r][0];if(m.length!=e)return!1;if(m!=t){for(let g=0;g<e;g++)if(m[g]!=t[g])return!1}}return!0}function Rk(n,t=100){const e=n.length;if(e<=1)return!0;let r=0,m=e-1;for(;r<=m&&n[r]==null;)r++;for(;m>=r&&n[m]==null;)m--;if(m<=r)return!0;const g=_r(1,Qr((m-r+1)/t));for(let y=n[r],x=r+g;x<=m;x+=g){const h=n[x];if(h!=null){if(h<=y)return!1;y=h}}return!0}const Bf=["January","February","March","April","May","June","July","August","September","October","November","December"],zf=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function jf(n){return n.slice(0,3)}const Ok=zf.map(jf),Nk=Bf.map(jf),Dk={MMMM:Bf,MMM:Nk,WWWW:zf,WWW:Ok};function Da(n){return(n<10?"0":"")+n}function Fk(n){return(n<10?"00":n<100?"0":"")+n}const Pk={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=>Da(n.getMonth()+1),M:n=>n.getMonth()+1,DD:n=>Da(n.getDate()),D:n=>n.getDate(),WWWW:(n,t)=>t.WWWW[n.getDay()],WWW:(n,t)=>t.WWW[n.getDay()],HH:n=>Da(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=>Da(n.getMinutes()),m:n=>n.getMinutes(),ss:n=>Da(n.getSeconds()),s:n=>n.getSeconds(),fff:n=>Fk(n.getMilliseconds())};function ju(n,t){t=t||Dk;let e=[],r=/\{([a-z]+)\}|[^{]+/gi,m;for(;m=r.exec(n);)e.push(m[0][0]=="{"?Pk[m[1]]:m[0]);return g=>{let y="";for(let x=0;x<e.length;x++)y+=typeof e[x]=="string"?e[x]:e[x](g,t);return y}}const Wk=new Intl.DateTimeFormat().resolvedOptions().timeZone;function Bk(n,t){let e;return t=="UTC"||t=="Etc/UTC"?e=new Date(+n+n.getTimezoneOffset()*6e4):t==Wk?e=n:(e=new Date(n.toLocaleString("en-US",{timeZone:t})),e.setMilliseconds(n.getMilliseconds())),e}const Hf=n=>n%1==0,jl=[1,2,2.5,5],zk=Oa(10,-32,0,jl),Uf=Oa(10,0,32,jl),jk=Uf.filter(Hf),ds=zk.concat(Uf),Hu=`
|
1489
|
+
`,Vf="{YYYY}",Gf=Hu+Vf,Kf="{M}/{D}",Fa=Hu+Kf,Hl=Fa+"/{YY}",qf="{aa}",Hk="{h}:{mm}",Ys=Hk+qf,Yf=Hu+Ys,Xf=":{ss}",Gt=null;function Qf(n){let t=n*1e3,e=t*60,r=e*60,m=r*24,g=m*30,y=m*365,x=(n==1?Oa(10,0,3,jl).filter(Hf):Oa(10,-3,0,jl)).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,m,m*2,m*3,m*4,m*5,m*6,m*7,m*8,m*9,m*10,m*15,g,g*2,g*3,g*4,g*6,y,y*2,y*5,y*10,y*25,y*50,y*100]);const h=[[y,Vf,Gt,Gt,Gt,Gt,Gt,Gt,1],[m*28,"{MMM}",Gf,Gt,Gt,Gt,Gt,Gt,1],[m,Kf,Gf,Gt,Gt,Gt,Gt,Gt,1],[r,"{h}"+qf,Hl,Gt,Fa,Gt,Gt,Gt,1],[e,Ys,Hl,Gt,Fa,Gt,Gt,Gt,1],[t,Xf,Hl+" "+Ys,Gt,Fa+" "+Ys,Gt,Yf,Gt,1],[n,Xf+".{fff}",Hl+" "+Ys,Gt,Fa+" "+Ys,Gt,Yf,Gt,1]];function d(s){return(a,u,l,o,c,p)=>{let w=[],b=c>=y,L=c>=g&&c<y,M=s(l),k=nn(M*n,3),C=Uu(M.getFullYear(),b?0:M.getMonth(),L||b?1:M.getDate()),R=nn(C*n,3);if(L||b){let O=L?c/g:0,E=b?c/y:0,I=k==R?k:nn(Uu(C.getFullYear()+E,C.getMonth()+O,1)*n,3),z=new Date(Yn(I/n)),P=z.getFullYear(),N=z.getMonth();for(let _=0;I<=o;_++){let S=Uu(P+E*_,N+O*_,1),D=S-s(nn(S*n,3));I=nn((+S+D)*n,3),I<=o&&w.push(I)}}else{let O=c>=m?m:c,E=Qr(l)-Qr(k),I=R+E+Bl(k-R,O);w.push(I);let z=s(I),P=z.getHours()+z.getMinutes()/e+z.getSeconds()/r,N=c/r,_=a.axes[u]._space,S=p/_;for(;I=nn(I+c,n==1?0:3),!(I>o);)if(N>1){let D=Qr(nn(P+N,6))%24,j=s(I).getHours()-D;j>1&&(j=-1),I-=j*r,P=(P+N)%24;let U=w[w.length-1];nn((I-U)/c,3)*S>=.7&&w.push(I)}else w.push(I)}return w}}return[x,h,d]}const[Uk,Vk,Gk]=Qf(1),[Kk,qk,Yk]=Qf(.001);Oa(2,-53,53,[1]);function Zf(n,t){return n.map(e=>e.map((r,m)=>m==0||m==8||r==null?r:t(m==1||e[8]==0?r:e[1]+r)))}function Jf(n,t){return(e,r,m,g,y)=>{let x=t.find(o=>y>=o[0])||t[t.length-1],h,d,s,a,u,l;return r.map(o=>{let c=n(o),p=c.getFullYear(),w=c.getMonth(),b=c.getDate(),L=c.getHours(),M=c.getMinutes(),k=c.getSeconds(),C=p!=h&&x[2]||w!=d&&x[3]||b!=s&&x[4]||L!=a&&x[5]||M!=u&&x[6]||k!=l&&x[7]||x[1];return h=p,d=w,s=b,a=L,u=M,l=k,C(c)})}}function Xk(n,t){let e=ju(t);return(r,m,g,y,x)=>m.map(h=>e(n(h)))}function Uu(n,t,e){return new Date(n,t,e)}function em(n,t){return t(n)}const Qk="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function tm(n,t){return(e,r,m,g)=>g==null?Iu: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 eS={show:!0,live:!0,isolate:!1,mount:wk,markers:{show:!0,width:2,stroke:Zk,fill:Jk,dash:"solid"},idx:null,idxs:null,values:[]};function tS(n,t){let e=n.cursor.points,r=ui(),m=e.size(n,t);ln(r,Ia,m),ln(r,La,m);let g=m/-2;ln(r,"marginLeft",g),ln(r,"marginTop",g);let y=e.width(n,t,m);return y&&ln(r,"borderWidth",y),r}function nS(n,t){let e=n.series[t].points;return e._fill||e._stroke}function rS(n,t){let e=n.series[t].points;return e._stroke||e._fill}function iS(n,t){return n.series[t].points.size}const Vu=[0,0];function oS(n,t,e){return Vu[0]=t,Vu[1]=e,Vu}function Ul(n,t,e,r=!0){return m=>{m.button==0&&(!r||m.target==t)&&e(m)}}function Gu(n,t,e,r=!0){return m=>{(!r||m.target==t)&&e(m)}}const sS={show:!0,x:!0,y:!0,lock:!1,move:oS,points:{one:!1,show:tS,size:iS,width:0,stroke:rS,fill:nS},bind:{mousedown:Ul,mouseup:Ul,click:Ul,dblclick:Ul,mousemove:Gu,mouseleave:Gu,mouseenter:Gu},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,m)=>r-m,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},nm={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Ku=Bn({},nm,{filter:Ef}),rm=Bn({},Ku,{size:10}),im=Bn({},nm,{show:!1}),qu='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',om="bold "+qu,sm=1.5,am={show:!0,scale:"x",stroke:$u,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:om,side:2,grid:Ku,ticks:rm,border:im,font:qu,lineGap:sm,rotate:0},aS="Value",lS="Time",lm={show:!0,scale:"x",auto:!1,sorted:1,min:tn,max:-tn,idxs:[]};function cS(n,t,e,r,m){return t.map(g=>g==null?"":Pu(g))}function uS(n,t,e,r,m,g,y){let x=[],h=Ro.get(m)||0;e=y?e:nn(Bl(e,m),h);for(let d=e;d<=r;d=nn(d+m,h))x.push(Object.is(d,-0)?0:d);return x}function Yu(n,t,e,r,m,g,y){const x=[],h=n.scales[n.axes[t].scale].log,d=h==10?oo:Mf,s=Qr(d(e));m=Gs(h,s),h==10&&(m=ds[Mi(m,ds)]);let a=e,u=m*h;h==10&&(u=ds[Mi(u,ds)]);do x.push(a),a=a+m,h==10&&!Ro.has(a)&&(a=nn(a,Ro.get(m))),a>=u&&(m=a,u=m*h,h==10&&(u=ds[Mi(u,ds)]));while(a<=r);return x}function hS(n,t,e,r,m,g,y){let x=n.scales[n.axes[t].scale].asinh,h=r>x?Yu(n,t,_r(x,e),r,m):[x],d=r>=0&&e<=0?[0]:[];return(e<-x?Yu(n,t,_r(x,-r),-e,m):[x]).reverse().map(s=>-s).concat(d,h)}const cm=/./,dS=/[12357]/,pS=/[125]/,um=/1/,Xu=(n,t,e,r)=>n.map((m,g)=>t==4&&m==0||g%r==0&&e.test(m.toExponential()[m<0?1:0])?m:null);function gS(n,t,e,r,m){let g=n.axes[e],y=g.scale,x=n.scales[y],h=n.valToPos,d=g._space,s=h(10,y),a=h(9,y)-s>=d?cm:h(7,y)-s>=d?dS:h(5,y)-s>=d?pS:um;if(a==um){let u=qn(h(1,y)-s);if(u<d)return Xu(t.slice().reverse(),x.distr,a,hi(d/u)).reverse()}return Xu(t,x.distr,a,1)}function fS(n,t,e,r,m){let g=n.axes[e],y=g.scale,x=g._space,h=n.valToPos,d=qn(h(1,y)-h(2,y));return d<x?Xu(t.slice().reverse(),3,cm,hi(x/d)).reverse():t}function mS(n,t,e,r){return r==null?Iu:t==null?"":Pu(t)}const hm={show:!0,scale:"y",stroke:$u,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:om,side:3,grid:Ku,ticks:rm,border:im,font:qu,lineGap:sm,rotate:0};function vS(n,t){let e=3+(n||1)*2;return nn(e*t,3)}function yS(n,t){let{scale:e,idxs:r}=n.series[0],m=n._data[0],g=n.valToPos(m[r[0]],e,!0),y=n.valToPos(m[r[1]],e,!0),x=qn(y-g),h=n.series[t],d=x/(h.points.space*jt);return r[1]-r[0]<=d}const dm={scale:null,auto:!0,sorted:0,min:tn,max:-tn},pm=(n,t,e,r,m)=>m,gm={show:!0,auto:!0,sorted:0,gaps:pm,alpha:1,facets:[Bn({},dm,{scale:"x"}),Bn({},dm,{scale:"y"})]},fm={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:pm,alpha:1,points:{show:yS,filter:null},values:null,min:tn,max:-tn,idxs:[],path:null,clip:null};function wS(n,t,e,r,m){return e/10}const mm={time:UC,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},bS=Bn({},mm,{time:!1,ori:1}),vm={};function ym(n,t){let e=vm[n];return e||(e={key:n,plots:[],sub(r){e.plots.push(r)},unsub(r){e.plots=e.plots.filter(m=>m!=r)},pub(r,m,g,y,x,h,d){for(let s=0;s<e.plots.length;s++)e.plots[s]!=m&&e.plots[s].pub(r,m,g,y,x,h,d)}},n!=null&&(vm[n]=e)),e}const Xs=1,Qu=2;function ps(n,t,e){const r=n.mode,m=n.series[t],g=r==2?n._data[t]:n._data,y=n.scales,x=n.bbox;let h=g[0],d=r==2?g[1]:g[t],s=r==2?y[m.facets[0].scale]:y[n.series[0].scale],a=r==2?y[m.facets[1].scale]:y[m.scale],u=x.left,l=x.top,o=x.width,c=x.height,p=n.valToPosH,w=n.valToPosV;return s.ori==0?e(m,h,d,s,a,p,w,u,l,o,c,Gl,Qs,ql,xm,km):e(m,h,d,s,a,w,p,l,u,c,o,Kl,Zs,eh,Cm,Sm)}function Zu(n,t){let e=0,r=0,m=Pt(n.bands,zu);for(let g=0;g<m.length;g++){let y=m[g];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 xS(n,t,e,r,m){let g=n.mode,y=n.series[t],x=g==2?y.facets[1].scale:y.scale,h=n.scales[x];return m==-1?h.min:m==1?h.max:h.distr==3?h.dir==1?h.min:h.max:0}function so(n,t,e,r,m,g){return ps(n,t,(y,x,h,d,s,a,u,l,o,c,p)=>{let w=y.pxRound;const b=d.dir*(d.ori==0?1:-1),L=d.ori==0?Qs:Zs;let M,k;b==1?(M=e,k=r):(M=r,k=e);let C=w(a(x[M],d,c,l)),R=w(u(h[M],s,p,o)),O=w(a(x[k],d,c,l)),E=w(u(g==1?s.max:s.min,s,p,o)),I=new Path2D(m);return L(I,O,E),L(I,C,E),L(I,C,R),I})}function Vl(n,t,e,r,m,g){let y=null;if(n.length>0){y=new Path2D;const x=t==0?ql:eh;let h=e;for(let a=0;a<n.length;a++){let u=n[a];if(u[1]>u[0]){let l=u[0]-h;l>0&&x(y,h,r,l,r+g),h=u[1]}}let d=e+m-h,s=10;d>0&&x(y,h,r-s/2,d,r+g+s)}return y}function CS(n,t,e){let r=n[n.length-1];r&&r[0]==t?r[1]=e:n.push([t,e])}function Ju(n,t,e,r,m,g,y){let x=[],h=n.length;for(let d=m==1?e:r;d>=e&&d<=r;d+=m)if(t[d]===null){let s=d,a=d;if(m==1)for(;++d<=r&&t[d]===null;)a=d;else for(;--d>=e&&t[d]===null;)a=d;let u=g(n[s]),l=a==s?u:g(n[a]),o=s-m;u=y<=0&&o>=0&&o<h?g(n[o]):u;let c=a+m;l=y>=0&&c>=0&&c<h?g(n[c]):l,l>=u&&x.push([u,l])}return x}function wm(n){return n==0?Lf:n==1?Yn:t=>hs(t,n)}function bm(n){let t=n==0?Gl:Kl,e=n==0?(m,g,y,x,h,d)=>{m.arcTo(g,y,x,h,d)}:(m,g,y,x,h,d)=>{m.arcTo(y,g,h,x,d)},r=n==0?(m,g,y,x,h)=>{m.rect(g,y,x,h)}:(m,g,y,x,h)=>{m.rect(y,g,h,x)};return(m,g,y,x,h,d=0,s=0)=>{d==0&&s==0?r(m,g,y,x,h):(d=Ti(d,x/2,h/2),s=Ti(s,x/2,h/2),t(m,g+d,y),e(m,g+x,y,g+x,y+h,d),e(m,g+x,y+h,g,y+h,s),e(m,g,y+h,g,y,s),e(m,g,y,g+x,y,d),m.closePath())}}const Gl=(n,t,e)=>{n.moveTo(t,e)},Kl=(n,t,e)=>{n.moveTo(e,t)},Qs=(n,t,e)=>{n.lineTo(t,e)},Zs=(n,t,e)=>{n.lineTo(e,t)},ql=bm(0),eh=bm(1),xm=(n,t,e,r,m,g)=>{n.arc(t,e,r,m,g)},Cm=(n,t,e,r,m,g)=>{n.arc(e,t,r,m,g)},km=(n,t,e,r,m,g,y)=>{n.bezierCurveTo(t,e,r,m,g,y)},Sm=(n,t,e,r,m,g,y)=>{n.bezierCurveTo(e,t,m,r,y,g)};function Am(n){return(t,e,r,m,g)=>ps(t,e,(y,x,h,d,s,a,u,l,o,c,p)=>{let{pxRound:w,points:b}=y,L,M;d.ori==0?(L=Gl,M=xm):(L=Kl,M=Cm);const k=nn(b.width*jt,3);let C=(b.size-b.width)/2*jt,R=nn(C*2,3),O=new Path2D,E=new Path2D,{left:I,top:z,width:P,height:N}=t.bbox;ql(E,I-R,z-R,P+R*2,N+R*2);const _=S=>{if(h[S]!=null){let D=w(a(x[S],d,c,l)),j=w(u(h[S],s,p,o));L(O,D+C,j),M(O,D,j,C,0,Wl*2)}};if(g)g.forEach(_);else for(let S=r;S<=m;S++)_(S);return{stroke:k>0?O:null,fill:O,clip:E,flags:Xs|Qu}})}function _m(n){return(t,e,r,m,g,y)=>{r!=m&&(g!=r&&y!=r&&n(t,e,r),g!=m&&y!=m&&n(t,e,m),n(t,e,y))}}const kS=_m(Qs),SS=_m(Zs);function $m(n){const t=Pt(n==null?void 0:n.alignGaps,0);return(e,r,m,g)=>ps(e,r,(y,x,h,d,s,a,u,l,o,c,p)=>{[m,g]=Dl(h,m,g);let w=y.pxRound,b=P=>w(a(P,d,c,l)),L=P=>w(u(P,s,p,o)),M,k;d.ori==0?(M=Qs,k=kS):(M=Zs,k=SS);const C=d.dir*(d.ori==0?1:-1),R={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Xs},O=R.stroke;let E=!1;if(g-m>=c*4){let P=he=>e.posToVal(he,d.key,!0),N=null,_=null,S,D,j,U=b(x[C==1?m:g]),q=b(x[m]),Z=b(x[g]),te=P(C==1?q+1:Z-1);for(let he=C==1?m:g;he>=m&&he<=g;he+=C){let ne=x[he],le=(C==1?ne<te:ne>te)?U:b(ne),ue=h[he];le==U?ue!=null?(D=ue,N==null?(M(O,le,L(D)),S=N=_=D):D<N?N=D:D>_&&(_=D)):ue===null&&(E=!0):(N!=null&&k(O,U,L(N),L(_),L(S),L(D)),ue!=null?(D=ue,M(O,le,L(D)),N=_=S=D):(N=_=null,ue===null&&(E=!0)),U=le,te=P(U+C))}N!=null&&N!=_&&j!=U&&k(O,U,L(N),L(_),L(S),L(D))}else for(let P=C==1?m:g;P>=m&&P<=g;P+=C){let N=h[P];N===null?E=!0:N!=null&&M(O,b(x[P]),L(N))}let[I,z]=Zu(e,r);if(y.fill!=null||I!=0){let P=R.fill=new Path2D(O),N=y.fillTo(e,r,y.min,y.max,I),_=L(N),S=b(x[m]),D=b(x[g]);C==-1&&([D,S]=[S,D]),M(P,D,_),M(P,S,_)}if(!y.spanGaps){let P=[];E&&P.push(...Ju(x,h,m,g,C,b,t)),R.gaps=P=y.gaps(e,r,m,g,P),R.clip=Vl(P,d.ori,l,o,c,p)}return z!=0&&(R.band=z==2?[so(e,r,m,g,O,-1),so(e,r,m,g,O,1)]:so(e,r,m,g,O,z)),R})}function AS(n){const t=Pt(n.align,1),e=Pt(n.ascDesc,!1),r=Pt(n.alignGaps,0),m=Pt(n.extend,!1);return(g,y,x,h)=>ps(g,y,(d,s,a,u,l,o,c,p,w,b,L)=>{[x,h]=Dl(a,x,h);let M=d.pxRound,{left:k,width:C}=g.bbox,R=Z=>M(o(Z,u,b,p)),O=Z=>M(c(Z,l,L,w)),E=u.ori==0?Qs:Zs;const I={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Xs},z=I.stroke,P=u.dir*(u.ori==0?1:-1);let N=O(a[P==1?x:h]),_=R(s[P==1?x:h]),S=_,D=_;m&&t==-1&&(D=k,E(z,D,N)),E(z,_,N);for(let Z=P==1?x:h;Z>=x&&Z<=h;Z+=P){let te=a[Z];if(te==null)continue;let he=R(s[Z]),ne=O(te);t==1?E(z,he,N):E(z,S,ne),E(z,he,ne),N=ne,S=he}let j=S;m&&t==1&&(j=k+C,E(z,j,N));let[U,q]=Zu(g,y);if(d.fill!=null||U!=0){let Z=I.fill=new Path2D(z),te=d.fillTo(g,y,d.min,d.max,U),he=O(te);E(Z,j,he),E(Z,D,he)}if(!d.spanGaps){let Z=[];Z.push(...Ju(s,a,x,h,P,R,r));let te=d.width*jt/2,he=e||t==1?te:-te,ne=e||t==-1?-te:te;Z.forEach(le=>{le[0]+=he,le[1]+=ne}),I.gaps=Z=d.gaps(g,y,x,h,Z),I.clip=Vl(Z,u.ori,p,w,b,L)}return q!=0&&(I.band=q==2?[so(g,y,x,h,z,-1),so(g,y,x,h,z,1)]:so(g,y,x,h,z,q)),I})}function Mm(n,t,e,r,m,g,y=tn){if(n.length>1){let x=null;for(let h=0,d=1/0;h<n.length;h++)if(t[h]!==void 0){if(x!=null){let s=qn(n[h]-n[x]);s<d&&(d=s,y=qn(e(n[h],r,m,g)-e(n[x],r,m,g)))}x=h}}return y}function _S(n){n=n||Na;const t=Pt(n.size,[.6,tn,1]),e=n.align||0,r=n.gap||0;let m=n.radius;m=m==null?[0,0]:typeof m=="number"?[m,0]:m;const g=It(m),y=1-t[0],x=Pt(t[1],tn),h=Pt(t[2],1),d=Pt(n.disp,Na),s=Pt(n.each,l=>{}),{fill:a,stroke:u}=d;return(l,o,c,p)=>ps(l,o,(w,b,L,M,k,C,R,O,E,I,z)=>{let P=w.pxRound,N=e,_=r*jt,S=x*jt,D=h*jt,j,U;M.ori==0?[j,U]=g(l,o):[U,j]=g(l,o);const q=M.dir*(M.ori==0?1:-1);let Z=M.ori==0?ql:eh,te=M.ori==0?s:(He,Wt,cn,Hn,Tr,mr,yn)=>{s(He,Wt,cn,Tr,Hn,yn,mr)},he=Pt(l.bands,zu).find(He=>He.series[0]==o),ne=he!=null?he.dir:0,le=w.fillTo(l,o,w.min,w.max,ne),ue=P(R(le,k,z,E)),ce,fe,_e,$e=I,Te=P(w.width*jt),qe=!1,Ve=null,lt=null,tt=null,ht=null;a!=null&&(Te==0||u!=null)&&(qe=!0,Ve=a.values(l,o,c,p),lt=new Map,new Set(Ve).forEach(He=>{He!=null&<.set(He,new Path2D)}),Te>0&&(tt=u.values(l,o,c,p),ht=new Map,new Set(tt).forEach(He=>{He!=null&&ht.set(He,new Path2D)})));let{x0:Xt,size:Rn}=d;if(Xt!=null&&Rn!=null){N=1,b=Xt.values(l,o,c,p),Xt.unit==2&&(b=b.map(Wt=>l.posToVal(O+Wt*I,M.key,!0)));let He=Rn.values(l,o,c,p);Rn.unit==2?fe=He[0]*I:fe=C(He[0],M,I,O)-C(0,M,I,O),$e=Mm(b,L,C,M,I,O,$e),_e=$e-fe+_}else $e=Mm(b,L,C,M,I,O,$e),_e=$e*y+_,fe=$e-_e;_e<1&&(_e=0),Te>=fe/2&&(Te=0),_e<5&&(P=Lf);let Kt=_e>0,Zr=$e-_e-(Kt?Te:0);fe=P(Bu(Zr,D,S)),ce=(N==0?fe/2:N==q?0:fe)-N*q*((N==0?_/2:0)+(Kt?Te/2:0));const vn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},jn=qe?null:new Path2D;let tr=null;if(he!=null)tr=l.data[he.series[1]];else{let{y0:He,y1:Wt}=d;He!=null&&Wt!=null&&(L=Wt.values(l,o,c,p),tr=He.values(l,o,c,p))}let Mr=j*fe,gt=U*fe;for(let He=q==1?c:p;He>=c&&He<=p;He+=q){let Wt=L[He];if(Wt==null)continue;if(tr!=null){let Qt=tr[He]??0;if(Wt-Qt==0)continue;ue=R(Qt,k,z,E)}let cn=M.distr!=2||d!=null?b[He]:He,Hn=C(cn,M,I,O),Tr=R(Pt(Wt,le),k,z,E),mr=P(Hn-ce),yn=P(_r(Tr,ue)),Xn=P(Ti(Tr,ue)),nr=yn-Xn;if(Wt!=null){let Qt=Wt<0?gt:Mr,Qn=Wt<0?Mr:gt;qe?(Te>0&&tt[He]!=null&&Z(ht.get(tt[He]),mr,Xn+Qr(Te/2),fe,_r(0,nr-Te),Qt,Qn),Ve[He]!=null&&Z(lt.get(Ve[He]),mr,Xn+Qr(Te/2),fe,_r(0,nr-Te),Qt,Qn)):Z(jn,mr,Xn+Qr(Te/2),fe,_r(0,nr-Te),Qt,Qn),te(l,o,He,mr-Te/2,Xn,fe+Te,nr)}}return Te>0?vn.stroke=qe?ht:jn:qe||(vn._fill=w.width==0?w._fill:w._stroke??w._fill,vn.width=0),vn.fill=qe?lt:jn,vn})}function $S(n,t){const e=Pt(t==null?void 0:t.alignGaps,0);return(r,m,g,y)=>ps(r,m,(x,h,d,s,a,u,l,o,c,p,w)=>{[g,y]=Dl(d,g,y);let b=x.pxRound,L=j=>b(u(j,s,p,o)),M=j=>b(l(j,a,w,c)),k,C,R;s.ori==0?(k=Gl,R=Qs,C=km):(k=Kl,R=Zs,C=Sm);const O=s.dir*(s.ori==0?1:-1);let E=L(h[O==1?g:y]),I=E,z=[],P=[];for(let j=O==1?g:y;j>=g&&j<=y;j+=O)if(d[j]!=null){let U=h[j],q=L(U);z.push(I=q),P.push(M(d[j]))}const N={stroke:n(z,P,k,R,C,b),fill:null,clip:null,band:null,gaps:null,flags:Xs},_=N.stroke;let[S,D]=Zu(r,m);if(x.fill!=null||S!=0){let j=N.fill=new Path2D(_),U=x.fillTo(r,m,x.min,x.max,S),q=M(U);R(j,I,q),R(j,E,q)}if(!x.spanGaps){let j=[];j.push(...Ju(h,d,g,y,O,L,e)),N.gaps=j=x.gaps(r,m,g,y,j),N.clip=Vl(j,s.ori,o,c,p,w)}return D!=0&&(N.band=D==2?[so(r,m,g,y,_,-1),so(r,m,g,y,_,1)]:so(r,m,g,y,_,D)),N})}function MS(n){return $S(TS,n)}function TS(n,t,e,r,m,g){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),d=Array(y-1),s=Array(y-1),a=Array(y-1);for(let u=0;u<y-1;u++)s[u]=t[u+1]-t[u],a[u]=n[u+1]-n[u],d[u]=s[u]/a[u];h[0]=d[0];for(let u=1;u<y-1;u++)d[u]===0||d[u-1]===0||d[u-1]>0!=d[u]>0?h[u]=0:(h[u]=3*(a[u-1]+a[u])/((2*a[u]+a[u-1])/d[u-1]+(a[u]+2*a[u-1])/d[u]),isFinite(h[u])||(h[u]=0));h[y-1]=d[y-2];for(let u=0;u<y-1;u++)m(x,n[u]+a[u]/3,t[u]+h[u]*a[u]/3,n[u+1]-a[u]/3,t[u+1]-h[u+1]*a[u]/3,n[u+1],t[u+1])}return x}const th=new Set;function Tm(){for(let n of th)n.syncRect(!0)}Us&&(cs(ck,Vs,Tm),cs(uk,Vs,Tm,!0),cs(Ol,Vs,()=>{gr.pxRatio=jt}));const IS=$m(),LS=Am();function Im(n,t,e,r){return(r?[n[0],n[1]].concat(n.slice(2)):[n[0]].concat(n.slice(1))).map((m,g)=>nh(m,g,t,e))}function ES(n,t){return n.map((e,r)=>r==0?{}:Bn({},t,e))}function nh(n,t,e,r){return Bn({},t==0?e:r,n)}function Lm(n,t,e){return t==null?Ks:[t,e]}const RS=Lm;function OS(n,t,e){return t==null?Ks:Pl(t,e,Fu,!0)}function Em(n,t,e,r){return t==null?Ks:Fl(t,e,n.scales[r].log,!1)}const NS=Em;function Rm(n,t,e,r){return t==null?Ks:Du(t,e,n.scales[r].log,!1)}const DS=Rm;function FS(n,t,e,r,m){let g=_r(Tf(n),Tf(t)),y=t-n,x=Mi(m/r*y,e);do{let h=e[x],d=r*h/y;if(d>=m&&g+(h<5?Ro.get(h):0)<=17)return[h,d]}while(++x<e.length);return[0,0]}function Om(n){let t,e;return n=n.replace(/(\d+)px/,(r,m)=>(t=Yn((e=+m)*jt))+"px"),[n,t,e]}function PS(n){n.show&&[n.font,n.labelFont].forEach(t=>{let e=nn(t[2]*jt,1);t[0]=t[0].replace(/[0-9.]+px/,e+"px"),t[1]=e})}function gr(n,t,e){const r={mode:Pt(n.mode,1)},m=r.mode;function g(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?g(V,X,ie,oe):y(V,X,ie,oe)}r.valToPosH=g,r.valToPosV=y;let h=!1;r.status=0;const d=r.root=ui(VC);if(n.id!=null&&(d.id=n.id),Yr(d,n.class),n.title){let V=ui(qC,d);V.textContent=n.title}const s=$i("canvas"),a=r.ctx=s.getContext("2d"),u=ui(YC,d);cs("click",u,V=>{V.target===o&&(Vt!=fi||Et!=Ji)&&An.click(r,V)},!0);const l=r.under=ui(XC,u);u.appendChild(s);const o=r.over=ui(QC,u);n=qs(n);const c=+Pt(n.pxAlign,1),p=wm(c);(n.plugins||[]).forEach(V=>{V.opts&&(n=V.opts(r,n)||n)});const w=n.ms||.001,b=r.series=m==1?Im(n.series||[],lm,fm,!1):ES(n.series||[null],gm),L=r.axes=Im(n.axes||[],am,hm,!0),M=r.scales={},k=r.bands=n.bands||[];k.forEach(V=>{V.fill=It(V.fill||null),V.dir=Pt(V.dir,-1)});const C=m==2?b[1].facets[0].scale:b[0].scale,R={axes:go,series:oa},O=(n.drawOrder||["axes","series"]).map(V=>R[V]);function E(V){const X=V.distr==3?ie=>oo(ie>0?ie:V.clamp(r,ie,V.min,V.max,V.key)):V.distr==4?ie=>Wu(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=M[V];if(X==null){let ie=(n.scales||Na)[V]||Na;if(ie.from!=null){I(ie.from);let oe=Bn({},M[ie.from],ie,{key:V});oe.valToPct=E(oe),M[V]=oe}else{X=M[V]=Bn({},V==C?mm:bS,ie),X.key=V;let oe=X.time,ge=X.range,be=Oo(ge);if((V!=C||m==2&&!oe)&&(be&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?Af:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?Af:{mode:1,hard:ge[1],soft:ge[1]}},be=!1),!be&&zl(ge))){let Me=ge;ge=(De,Pe,je)=>Pe==null?Ks:Pl(Pe,je,Me)}X.range=It(ge||(oe?RS:V==C?X.distr==3?NS:X.distr==4?DS:Lm:X.distr==3?Em:X.distr==4?Rm:OS)),X.auto=It(be?!1:X.auto),X.clamp=It(X.clamp||wS),X._min=X._max=null,X.valToPct=E(X)}}}I("x"),I("y"),m==1&&b.forEach(V=>{I(V.scale)}),L.forEach(V=>{I(V.scale)});for(let V in n.scales)I(V);const z=M[C],P=z.distr;let N,_;z.ori==0?(Yr(d,GC),N=g,_=y):(Yr(d,KC),N=y,_=g);const S={};for(let V in M){let X=M[V];(X.min!=null||X.max!=null)&&(S[V]={min:X.min,max:X.max},X.min=X.max=null)}const D=n.tzDate||(V=>new Date(Yn(V/w))),j=n.fmtDate||ju,U=w==1?Gk(D):Yk(D),q=Jf(D,Zf(w==1?Vk:qk,j)),Z=tm(D,em(Qk,j)),te=[],he=r.legend=Bn({},eS,n.legend),ne=r.cursor=Bn({},sS,{drag:{y:m==2}},n.cursor),le=he.show,ue=ne.show,ce=he.markers;he.idxs=te,ce.width=It(ce.width),ce.dash=It(ce.dash),ce.stroke=It(ce.stroke),ce.fill=It(ce.fill);let fe,_e,$e,Te=[],qe=[],Ve,lt=!1,tt={};if(he.live){const V=b[1]?b[1].values:null;lt=V!=null,Ve=lt?V(r,1,0):{_:0};for(let X in Ve)tt[X]=Iu}if(le)if(fe=$i("table",rk,d),$e=$i("tbody",null,fe),he.mount(r,fe),lt){_e=$i("thead",null,fe,$e);let V=$i("tr",null,_e);$i("th",null,V);for(var ht in Ve)$i("th",cf,V).textContent=ht}else Yr(fe,ok),he.live&&Yr(fe,ik);const Xt={show:!0},Rn={show:!1};function Kt(V,X){if(X==0&&(lt||!he.live||m==2))return Ks;let ie=[],oe=$i("tr",sk,$e,$e.childNodes[X]);Yr(oe,V.class),V.show||Yr(oe,ls);let ge=$i("th",null,oe);if(ce.show){let De=ui(ak,ge);if(X>0){let Pe=ce.width(r,X);Pe&&(De.style.border=Pe+"px "+ce.dash(r,X)+" "+ce.stroke(r,X)),De.style.background=ce.fill(r,X)}}let be=ui(cf,ge);V.label instanceof HTMLElement?be.appendChild(V.label):be.textContent=V.label,X>0&&(ce.show||(be.style.color=V.width>0?ce.stroke(r,X):ce.fill(r,X)),vn("click",ge,De=>{if(ne._lock)return;Oi(De);let Pe=b.indexOf(V);if((De.ctrlKey||De.metaKey)!=he.isolate){let je=b.some((Ge,Ye)=>Ye>0&&Ye!=Pe&&Ge.show);b.forEach((Ge,Ye)=>{Ye>0&&Lr(Ye,je?Ye==Pe?Xt:Rn:Xt,!0,it.setSeries)})}else Lr(Pe,{show:!V.show},!0,it.setSeries)},!1),Ni&&vn(pf,ge,De=>{ne._lock||(Oi(De),Lr(b.indexOf(V),yi,!0,it.setSeries))},!1));for(var Me in Ve){let De=$i("td",lk,oe);De.textContent="--",ie.push(De)}return[oe,ie]}const Zr=new Map;function vn(V,X,ie,oe=!0){const ge=Zr.get(X)||{},be=ne.bind[V](r,X,ie,oe);be&&(cs(V,X,ge[V]=be),Zr.set(X,ge))}function jn(V,X,ie){const oe=Zr.get(X)||{};for(let ge in oe)(V==null||ge==V)&&(Nu(ge,X,oe[ge]),delete oe[ge]);V==null&&Zr.delete(X)}let tr=0,Mr=0,gt=0,He=0,Wt=0,cn=0,Hn=Wt,Tr=cn,mr=gt,yn=He,Xn=0,nr=0,Qt=0,Qn=0;r.bbox={};let ao=!1,Li=!1,Ei=!1,Ri=!1,lo=!1,lr=!1;function co(V,X,ie){(ie||V!=r.width||X!=r.height)&&No(V,X),Wi(!1),Ei=!0,Li=!0,Zi()}function No(V,X){r.width=tr=gt=V,r.height=Mr=He=X,Wt=cn=0,vs(),na();let ie=r.bbox;Xn=ie.left=hs(Wt*jt,.5),nr=ie.top=hs(cn*jt,.5),Qt=ie.width=hs(gt*jt,.5),Qn=ie.height=hs(He*jt,.5)}const Ka=3;function Jr(){let V=!1,X=0;for(;!V;){X++;let ie=sa(X),oe=Qa(X);V=X==Ka||ie&&oe,V||(No(r.width,r.height),Li=!0)}}function qa({width:V,height:X}){co(V,X)}r.setSize=qa;function vs(){let V=!1,X=!1,ie=!1,oe=!1;L.forEach((ge,be)=>{if(ge.show&&ge._show){let{side:Me,_size:De}=ge,Pe=Me%2,je=ge.label!=null?ge.labelSize:0,Ge=De+je;Ge>0&&(Pe?(gt-=Ge,Me==3?(Wt+=Ge,oe=!0):ie=!0):(He-=Ge,Me==0?(cn+=Ge,V=!0):X=!0))}}),Fi[0]=V,Fi[1]=ie,Fi[2]=X,Fi[3]=oe,gt-=wr[1]+wr[3],Wt+=wr[3],He-=wr[2]+wr[0],cn+=wr[0]}function na(){let V=Wt+gt,X=cn+He,ie=Wt,oe=cn;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}}L.forEach((be,Me)=>{if(be.show&&be._show){let De=be.side;be._pos=ge(De,be._size),be.label!=null&&(be._lpos=ge(De,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=It(V.prox),oe=V.bias??(V.bias=0);ne.dataIdx=(ge,be,Me,De)=>{if(be==0)return Me;let Pe=Me,je=ie(ge,be,Me,De)??tn,Ge=je>=0&&je<tn,Ye=z.ori==0?gt:He,pt=ne.left,Mt=t[0],mt=t[be];if(X.has(mt[Me])){Pe=null;let _t=null,st=null,nt;if(oe==0||oe==-1)for(nt=Me;_t==null&&nt-- >0;)X.has(mt[nt])||(_t=nt);if(oe==0||oe==1)for(nt=Me;st==null&&nt++<mt.length;)X.has(mt[nt])||(st=nt);if(_t!=null||st!=null)if(Ge){let rn=_t==null?-1/0:N(Mt[_t],z,Ye,0),gn=st==null?1/0:N(Mt[st],z,Ye,0),Gn=pt-rn,Ot=gn-pt;Gn<=Ot?Gn<=je&&(Pe=_t):Ot<=je&&(Pe=st)}else Pe=st==null?_t:_t==null?st:Me-_t<=st-Me?_t:st}else Ge&&qn(pt-N(Mt[Me],z,Ye,0))>je&&(Pe=null);return Pe}}const Oi=V=>{ne.event=V};ne.idxs=te,ne._lock=!1;let On=ne.points;On.show=It(On.show),On.size=It(On.size),On.stroke=It(On.stroke),On.width=It(On.width),On.fill=It(On.fill);const vr=r.focus=Bn({},n.focus||{alpha:.3},ne.focus),Ni=vr.prox>=0,wn=Ni&&On.one;let yr=[],qi=[],Di=[];function ys(V,X){let ie=On.show(r,X);if(ie instanceof HTMLElement)return Yr(ie,nk),Yr(ie,V.class),Ui(ie,-10,-10,gt,He),o.insertBefore(ie,yr[X]),ie}function ra(V,X){if(m==1||X>0){let ie=m==1&&M[V.scale].time,oe=V.value;V.value=ie?Pf(oe)?tm(D,em(oe,j)):oe||Z:oe||mS,V.label=V.label||(ie?lS:aS)}if(wn||X>0){V.width=V.width==null?1:V.width,V.paths=V.paths||IS||bk,V.fillTo=It(V.fillTo||xS),V.pxAlign=+Pt(V.pxAlign,c),V.pxRound=wm(V.pxAlign),V.stroke=It(V.stroke||null),V.fill=It(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let ie=vS(_r(1,V.width),1),oe=V.points=Bn({},{size:ie,width:_r(1,ie*.2),stroke:V.stroke,space:ie*2,paths:LS,_stroke:null,_fill:null},V.points);oe.show=It(oe.show),oe.filter=It(oe.filter),oe.fill=It(oe.fill),oe.stroke=It(oe.stroke),oe.paths=It(oe.paths),oe.pxAlign=V.pxAlign}if(le){let ie=Kt(V,X);Te.splice(X,0,ie[0]),qe.splice(X,0,ie[1]),he.values.push(null)}if(ue){te.splice(X,0,null);let ie=null;wn?X==0&&(ie=ys(V,X)):X>0&&(ie=ys(V,X)),yr.splice(X,0,ie),qi.splice(X,0,0),Di.splice(X,0,0)}Je("addSeries",X)}function Ya(V,X){X=X??b.length,V=m==1?nh(V,X,lm,fm):nh(V,X,{},gm),b.splice(X,0,V),ra(b[X],X)}r.addSeries=Ya;function Xa(V){if(b.splice(V,1),le){he.values.splice(V,1),qe.splice(V,1);let X=Te.splice(V,1)[0];jn(null,X.firstChild),X.remove()}ue&&(te.splice(V,1),yr.splice(V,1)[0].remove(),qi.splice(V,1),Di.splice(V,1)),Je("delSeries",V)}r.delSeries=Xa;const Fi=[!1,!1,!1,!1];function ei(V,X){if(V._show=V.show,V.show){let ie=V.side%2,oe=M[V.scale];oe==null&&(V.scale=ie?b[1].scale:C,oe=M[V.scale]);let ge=oe.time;V.size=It(V.size),V.space=It(V.space),V.rotate=It(V.rotate),Oo(V.incrs)&&V.incrs.forEach(Me=>{!Ro.has(Me)&&Ro.set(Me,Df(Me))}),V.incrs=It(V.incrs||(oe.distr==2?jk:ge?w==1?Uk:Kk:ds)),V.splits=It(V.splits||(ge&&oe.distr==1?U:oe.distr==3?Yu:oe.distr==4?hS:uS)),V.stroke=It(V.stroke),V.grid.stroke=It(V.grid.stroke),V.ticks.stroke=It(V.ticks.stroke),V.border.stroke=It(V.border.stroke);let be=V.values;V.values=Oo(be)&&!Oo(be[0])?It(be):ge?Oo(be)?Jf(D,Zf(be,j)):Pf(be)?Xk(D,be):be||q:be||cS,V.filter=It(V.filter||(oe.distr>=3&&oe.log==10?gS:oe.distr==3&&oe.log==2?fS:Ef)),V.font=Om(V.font),V.labelFont=Om(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&&(Fi[X]=!0,V._el=ui(ZC,u))}}function Lt(V,X,ie,oe){let[ge,be,Me,De]=ie,Pe=X%2,je=0;return Pe==0&&(De||be)&&(je=X==0&&!ge||X==2&&!Me?Yn(am.size/3):0),Pe==1&&(ge||Me)&&(je=X==1&&!be||X==3&&!De?Yn(hm.size/2):0),je}const ia=r.padding=(n.padding||[Lt,Lt,Lt,Lt]).map(V=>It(Pt(V,Lt))),wr=r._padding=ia.map((V,X)=>V(r,X,Fi,0));let Nn,on=null,Sn=null;const di=m==1?b[0].idxs:null;let br=null,pi=!1;function Do(V,X){if(t=V??[],r.data=r._data=t,m==2){Nn=0;for(let ie=1;ie<b.length;ie++)Nn+=t[ie][0].length}else{t.length==0&&(r.data=r._data=t=[[]]),br=t[0],Nn=br.length;let ie=t;if(P==2){ie=t.slice();let oe=ie[0]=Array(Nn);for(let ge=0;ge<Nn;ge++)oe[ge]=ge}r._data=t=ie}if(Wi(!0),Je("setData"),P==2&&(Ei=!0),X!==!1){let ie=z;ie.auto(r,pi)?ws():Un(C,ie.min,ie.max),Ri=Ri||ne.left>=0,lr=!0,Zi()}}r.setData=Do;function ws(){pi=!0;let V,X;m==1&&(Nn>0?(on=di[0]=0,Sn=di[1]=Nn-1,V=t[0][on],X=t[0][Sn],P==2?(V=on,X=Sn):V==X&&(P==3?[V,X]=Fl(V,V,z.log,!1):P==4?[V,X]=Du(V,V,z.log,!1):z.time?X=V+Yn(86400/w):[V,X]=Pl(V,X,Fu,!0))):(on=di[0]=V=null,Sn=di[1]=X=null)),Un(C,V,X)}let Yi,zr,uo,Fo,jr,Po,bs,xs,Wo,Zn;function Cs(V,X,ie,oe,ge,be){V??(V=hf),ie??(ie=zu),oe??(oe="butt"),ge??(ge=hf),be??(be="round"),V!=Yi&&(a.strokeStyle=Yi=V),ge!=zr&&(a.fillStyle=zr=ge),X!=uo&&(a.lineWidth=uo=X),be!=jr&&(a.lineJoin=jr=be),oe!=Po&&(a.lineCap=Po=oe),ie!=Fo&&a.setLineDash(Fo=ie)}function ho(V,X,ie,oe){X!=zr&&(a.fillStyle=zr=X),V!=bs&&(a.font=bs=V),ie!=xs&&(a.textAlign=xs=ie),oe!=Wo&&(a.textBaseline=Wo=oe)}function Bo(V,X,ie,oe,ge=0){if(oe.length>0&&V.auto(r,pi)&&(X==null||X.min==null)){let be=Pt(on,0),Me=Pt(Sn,oe.length-1),De=ie.min==null?gk(oe,be,Me,ge,V.distr==3):[ie.min,ie.max];V.min=Ti(V.min,ie.min=De[0]),V.max=_r(V.max,ie.max=De[1])}}const zo={min:null,max:null};function Xi(){for(let oe in M){let ge=M[oe];S[oe]==null&&(ge.min==null||S[C]!=null&&ge.auto(r,pi))&&(S[oe]=zo)}for(let oe in M){let ge=M[oe];S[oe]==null&&ge.from!=null&&S[ge.from]!=null&&(S[oe]=zo)}S[C]!=null&&Wi(!0);let V={};for(let oe in S){let ge=S[oe];if(ge!=null){let be=V[oe]=qs(M[oe],kk);if(ge.min!=null)Bn(be,ge);else if(oe!=C||m==2)if(Nn==0&&be.from==null){let Me=be.range(r,null,null,oe);be.min=Me[0],be.max=Me[1]}else be.min=tn,be.max=-tn}}if(Nn>0){b.forEach((oe,ge)=>{if(m==1){let be=oe.scale,Me=S[be];if(Me==null)return;let De=V[be];if(ge==0){let Pe=De.range(r,De.min,De.max,be);De.min=Pe[0],De.max=Pe[1],on=Mi(De.min,t[0]),Sn=Mi(De.max,t[0]),Sn-on>1&&(t[0][on]<De.min&&on++,t[0][Sn]>De.max&&Sn--),oe.min=br[on],oe.max=br[Sn]}else oe.show&&oe.auto&&Bo(De,Me,oe,t[ge],oe.sorted);oe.idxs[0]=on,oe.idxs[1]=Sn}else if(ge>0&&oe.show&&oe.auto){let[be,Me]=oe.facets,De=be.scale,Pe=Me.scale,[je,Ge]=t[ge],Ye=V[De],pt=V[Pe];Ye!=null&&Bo(Ye,S[De],be,je,be.sorted),pt!=null&&Bo(pt,S[Pe],Me,Ge,Me.sorted),oe.min=Me.min,oe.max=Me.max}});for(let oe in V){let ge=V[oe],be=S[oe];if(ge.from==null&&(be==null||be.min==null)){let Me=ge.range(r,ge.min==tn?null:ge.min,ge.max==-tn?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=M[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?oo(be.min):Me==4?Wu(be.min,be.asinh):Me==100?be.fwd(be.min):be.min,be._max=Me==3?oo(be.max):Me==4?Wu(be.max,be.asinh):Me==100?be.fwd(be.max):be.max,X[oe]=ie=!0}}if(ie){b.forEach((oe,ge)=>{m==2?ge>0&&X.y&&(oe._paths=null):X[oe.scale]&&(oe._paths=null)});for(let oe in X)Ei=!0,Je("setScale",oe);ue&&ne.left>=0&&(Ri=lr=!0)}for(let oe in S)S[oe]=null}function ks(V){let X=Bu(on-1,0,Nn-1),ie=Bu(Sn+1,0,Nn-1);for(;V[X]==null&&X>0;)X--;for(;V[ie]==null&&ie<Nn-1;)ie++;return[X,ie]}function oa(){if(Nn>0){let V=b.some(X=>X._focus)&&Zn!=vr.alpha;V&&(a.globalAlpha=Zn=vr.alpha),b.forEach((X,ie)=>{if(ie>0&&X.show&&(jo(ie,!1),jo(ie,!0),X._paths==null)){let oe=Zn;Zn!=X.alpha&&(a.globalAlpha=Zn=X.alpha);let ge=m==2?[0,t[ie][0].length-1]:ks(t[ie]);X._paths=X.paths(r,ie,ge[0],ge[1]),Zn!=oe&&(a.globalAlpha=Zn=oe)}}),b.forEach((X,ie)=>{if(ie>0&&X.show){let oe=Zn;Zn!=X.alpha&&(a.globalAlpha=Zn=X.alpha),X._paths!=null&&Ho(ie,!1);{let ge=X._paths!=null?X._paths.gaps:null,be=X.points.show(r,ie,on,Sn,ge),Me=X.points.filter(r,ie,be,ge);(be||Me)&&(X.points._paths=X.points.paths(r,ie,on,Sn,Me),Ho(ie,!0))}Zn!=oe&&(a.globalAlpha=Zn=oe),Je("drawSeries",ie)}}),V&&(a.globalAlpha=Zn=1)}}function jo(V,X){let ie=X?b[V].points:b[V];ie._stroke=ie.stroke(r,V),ie._fill=ie.fill(r,V)}function Ho(V,X){let ie=X?b[V].points:b[V],{stroke:oe,fill:ge,clip:be,flags:Me,_stroke:De=ie._stroke,_fill:Pe=ie._fill,_width:je=ie.width}=ie._paths;je=nn(je*jt,3);let Ge=null,Ye=je%2/2;X&&Pe==null&&(Pe=je>0?"#fff":De);let pt=ie.pxAlign==1&&Ye>0;if(pt&&a.translate(Ye,Ye),!X){let Mt=Xn-je/2,mt=nr-je/2,_t=Qt+je,st=Qn+je;Ge=new Path2D,Ge.rect(Mt,mt,_t,st)}X?po(De,je,ie.dash,ie.cap,Pe,oe,ge,Me,be):Ss(V,De,je,ie.dash,ie.cap,Pe,oe,ge,Me,Ge,be),pt&&a.translate(-Ye,-Ye)}function Ss(V,X,ie,oe,ge,be,Me,De,Pe,je,Ge){let Ye=!1;Pe!=0&&k.forEach((pt,Mt)=>{if(pt.series[0]==V){let mt=b[pt.series[1]],_t=t[pt.series[1]],st=(mt._paths||Na).band;Oo(st)&&(st=pt.dir==1?st[0]:st[1]);let nt,rn=null;mt.show&&st&&mk(_t,on,Sn)?(rn=pt.fill(r,Mt)||be,nt=mt._paths.clip):st=null,po(X,ie,oe,ge,rn,Me,De,Pe,je,Ge,nt,st),Ye=!0}}),Ye||po(X,ie,oe,ge,be,Me,De,Pe,je,Ge)}const Uo=Xs|Qu;function po(V,X,ie,oe,ge,be,Me,De,Pe,je,Ge,Ye){Cs(V,X,ie,oe,ge),(Pe||je||Ye)&&(a.save(),Pe&&a.clip(Pe),je&&a.clip(je)),Ye?(De&Uo)==Uo?(a.clip(Ye),Ge&&a.clip(Ge),Jn(ge,Me),gi(V,be,X)):De&Qu?(Jn(ge,Me),a.clip(Ye),gi(V,be,X)):De&Xs&&(a.save(),a.clip(Ye),Ge&&a.clip(Ge),Jn(ge,Me),a.restore(),gi(V,be,X)):(Jn(ge,Me),gi(V,be,X)),(Pe||je||Ye)&&a.restore()}function gi(V,X,ie){ie>0&&(X instanceof Map?X.forEach((oe,ge)=>{a.strokeStyle=Yi=ge,a.stroke(oe)}):X!=null&&V&&a.stroke(X))}function Jn(V,X){X instanceof Map?X.forEach((ie,oe)=>{a.fillStyle=zr=oe,a.fill(ie)}):X!=null&&V&&a.fill(X)}function Qi(V,X,ie,oe){let ge=L[V],be;if(oe<=0)be=[0,0];else{let Me=ge._space=ge.space(r,V,X,ie,oe),De=ge._incrs=ge.incrs(r,V,X,ie,oe,Me);be=FS(X,ie,De,oe,Me)}return ge._found=be}function Pi(V,X,ie,oe,ge,be,Me,De,Pe,je){let Ge=Me%2/2;c==1&&a.translate(Ge,Ge),Cs(De,Me,Pe,je,De),a.beginPath();let Ye,pt,Mt,mt,_t=ge+(oe==0||oe==3?-be:be);ie==0?(pt=ge,mt=_t):(Ye=ge,Mt=_t);for(let st=0;st<V.length;st++)X[st]!=null&&(ie==0?Ye=Mt=V[st]:pt=mt=V[st],a.moveTo(Ye,pt),a.lineTo(Mt,mt));a.stroke(),c==1&&a.translate(-Ge,-Ge)}function sa(V){let X=!0;return L.forEach((ie,oe)=>{if(!ie.show)return;let ge=M[ie.scale];if(ge.min==null){ie._show&&(X=!1,ie._show=!1,Wi(!1));return}else ie._show||(X=!1,ie._show=!0,Wi(!1));let be=ie.side,Me=be%2,{min:De,max:Pe}=ge,[je,Ge]=Qi(oe,De,Pe,Me==0?gt:He);if(Ge==0)return;let Ye=ge.distr==2,pt=ie._splits=ie.splits(r,oe,De,Pe,je,Ge,Ye),Mt=ge.distr==2?pt.map(nt=>br[nt]):pt,mt=ge.distr==2?br[pt[1]]-br[pt[0]]:je,_t=ie._values=ie.values(r,ie.filter(r,Mt,oe,Ge,mt),oe,Ge,mt);ie._rotate=be==2?ie.rotate(r,_t,oe,Ge):0;let st=ie._size;ie._size=hi(ie.size(r,_t,oe,V)),st!=null&&ie._size!=st&&(X=!1)}),X}function Qa(V){let X=!0;return ia.forEach((ie,oe)=>{let ge=ie(r,oe,Fi,V);ge!=wr[oe]&&(X=!1),wr[oe]=ge}),X}function go(){for(let V=0;V<L.length;V++){let X=L[V];if(!X.show||!X._show)continue;let ie=X.side,oe=ie%2,ge,be,Me=X.stroke(r,V),De=ie==0||ie==3?-1:1,[Pe,je]=X._found;if(X.label!=null){let en=X.labelGap*De,sr=Yn((X._lpos+en)*jt);ho(X.labelFont[0],Me,"center",ie==2?Ea:uf),a.save(),oe==1?(ge=be=0,a.translate(sr,Yn(nr+Qn/2)),a.rotate((ie==3?-Wl:Wl)/2)):(ge=Yn(Xn+Qt/2),be=sr);let wo=If(X.label)?X.label(r,V,Pe,je):X.label;a.fillText(wo,ge,be),a.restore()}if(je==0)continue;let Ge=M[X.scale],Ye=oe==0?Qt:Qn,pt=oe==0?Xn:nr,Mt=X._splits,mt=Ge.distr==2?Mt.map(en=>br[en]):Mt,_t=Ge.distr==2?br[Mt[1]]-br[Mt[0]]:Pe,st=X.ticks,nt=X.border,rn=st.show?st.size:0,gn=Yn(rn*jt),Gn=Yn((X.alignTo==2?X._size-rn-X.gap:X.gap)*jt),Ot=X._rotate*-Wl/180,pe=p(X._pos*jt),Ae=(gn+Gn)*De,xe=pe+Ae;be=oe==0?xe:0,ge=oe==1?xe:0;let Be=X.font[0],ot=X.align==1?Hs:X.align==2?_u:Ot>0?Hs:Ot<0?_u:oe==0?"center":ie==3?_u:Hs,xt=Ot||oe==1?"middle":ie==2?Ea:uf;ho(Be,Me,ot,xt);let Ft=X.font[1]*X.lineGap,St=Mt.map(en=>p(x(en,Ge,Ye,pt))),Er=X._values;for(let en=0;en<Er.length;en++){let sr=Er[en];if(sr!=null){oe==0?ge=St[en]:be=St[en],sr=""+sr;let wo=sr.indexOf(`
|
1490
|
+
`)==-1?[sr]:sr.split(/\n/gm);for(let Mn=0;Mn<wo.length;Mn++){let _s=wo[Mn];Ot?(a.save(),a.translate(ge,be+Mn*Ft),a.rotate(Ot),a.fillText(_s,0,0),a.restore()):a.fillText(_s,ge,be+Mn*Ft)}}}st.show&&Pi(St,st.filter(r,mt,V,je,_t),oe,ie,pe,gn,nn(st.width*jt,3),st.stroke(r,V),st.dash,st.cap);let wi=X.grid;wi.show&&Pi(St,wi.filter(r,mt,V,je,_t),oe,oe==0?2:1,oe==0?nr:Xn,oe==0?Qn:Qt,nn(wi.width*jt,3),wi.stroke(r,V),wi.dash,wi.cap),nt.show&&Pi([pe],[1],oe==0?1:0,oe==0?1:2,oe==1?nr:Xn,oe==1?Qn:Qt,nn(nt.width*jt,3),nt.stroke(r,V),nt.dash,nt.cap)}Je("drawAxes")}function Wi(V){b.forEach((X,ie)=>{ie>0&&(X._paths=null,V&&(m==1?(X.min=null,X.max=null):X.facets.forEach(oe=>{oe.min=null,oe.max=null})))})}let fo=!1,Vo=!1,mo=[];function aa(){Vo=!1;for(let V=0;V<mo.length;V++)Je(...mo[V]);mo.length=0}function Zi(){fo||(Ik(la),fo=!0)}function Fe(V,X=!1){fo=!0,Vo=X,V(r),la(),X&&mo.length>0&&queueMicrotask(aa)}r.batch=Fe;function la(){if(ao&&(Xi(),ao=!1),Ei&&(Jr(),Ei=!1),Li){if(ln(l,Hs,Wt),ln(l,Ea,cn),ln(l,Ia,gt),ln(l,La,He),ln(o,Hs,Wt),ln(o,Ea,cn),ln(o,Ia,gt),ln(o,La,He),ln(u,Ia,tr),ln(u,La,Mr),s.width=Yn(tr*jt),s.height=Yn(Mr*jt),L.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;ln(V,Me?"left":"top",oe-be),ln(V,Me?"width":"height",ie),ln(V,Me?"top":"left",Me?cn:Wt),ln(V,Me?"height":"width",Me?He:gt),Ru(V,ls)}else Yr(V,ls)}),Yi=zr=uo=jr=Po=bs=xs=Wo=Fo=null,Zn=1,W(!0),Wt!=Hn||cn!=Tr||gt!=mr||He!=yn){Wi(!1);let V=gt/mr,X=He/yn;if(ue&&!Ri&&ne.left>=0){ne.left*=V,ne.top*=X,ti&&Ui(ti,Yn(ne.left),0,gt,He),Dn&&Ui(Dn,0,Yn(ne.top),gt,He);for(let ie=0;ie<yr.length;ie++){let oe=yr[ie];oe!=null&&(qi[ie]*=V,Di[ie]*=X,Ui(oe,hi(qi[ie]),hi(Di[ie]),gt,He))}}if(dt.show&&!lo&&dt.left>=0&&dt.width>0){dt.left*=V,dt.width*=V,dt.top*=X,dt.height*=X;for(let ie in Y)ln(Ir,ie,dt[ie])}Hn=Wt,Tr=cn,mr=gt,yn=He}Je("setSize"),Li=!1}tr>0&&Mr>0&&(a.clearRect(0,0,s.width,s.height),Je("drawClear"),O.forEach(V=>V()),Je("draw")),dt.show&&lo&&(Jt(dt),lo=!1),ue&&Ri&&(A(null,!0,!1),Ri=!1),he.show&&he.live&&lr&&(v(),lr=!1),h||(h=!0,r.status=1,Je("ready")),pi=!1,fo=!1}r.redraw=(V,X)=>{Ei=X||!1,V!==!1?Un(C,z.min,z.max):Zi()};function Oe(V,X){let ie=M[V];if(ie.from==null){if(Nn==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(Nn>1&&X.min!=null&&X.max!=null&&X.max-X.min<1e-16)return;V==C&&ie.distr==2&&Nn>0&&(X.min=Mi(X.min,t[0]),X.max=Mi(X.max,t[0]),X.min==X.max&&X.max++),S[V]=X,ao=!0,Zi()}}r.setScale=Oe;let bn,vo,ti,Dn,ca,yo,fi,Ji,Ut,Bt,Vt,Et,mi=!1;const An=ne.drag;let We=An.x,sn=An.y;ue&&(ne.x&&(bn=ui(ek,o)),ne.y&&(vo=ui(tk,o)),z.ori==0?(ti=bn,Dn=vo):(ti=vo,Dn=bn),Vt=ne.left,Et=ne.top);const dt=r.select=Bn({show:!0,over:!0,left:0,width:0,top:0,height:0},n.select),Ir=dt.show?ui(JC,dt.over?o:l):null;function Jt(V,X){if(dt.show){for(let ie in V)dt[ie]=V[ie],ie in Y&&ln(Ir,ie,V[ie]);X!==!1&&Je("setSelect")}}r.setSelect=Jt;function un(V){if(b[V].show)le&&Ru(Te[V],ls);else if(le&&Yr(Te[V],ls),ue){let X=wn?yr[0]:yr[V];X!=null&&Ui(X,-10,-10,gt,He)}}function Un(V,X,ie){Oe(V,{min:X,max:ie})}function Lr(V,X,ie,oe){X.focus!=null&&rr(V),X.show!=null&&b.forEach((ge,be)=>{be>0&&(V==be||V==null)&&(ge.show=X.show,un(be),m==2?(Un(ge.facets[0].scale,null,null),Un(ge.facets[1].scale,null,null)):Un(ge.scale,null,null),Zi())}),ie!==!1&&Je("setSeries",V,X),oe&&bt("setSeries",r,V,X)}r.setSeries=Lr;function vi(V,X){Bn(k[V],X)}function _n(V,X){V.fill=It(V.fill||null),V.dir=Pt(V.dir,-1),X=X??k.length,k.splice(X,0,V)}function Hr(V){V==null?k.length=0:k.splice(V,1)}r.addBand=_n,r.setBand=vi,r.delBand=Hr;function Go(V,X){b[V].alpha=X,ue&&yr[V]!=null&&(yr[V].style.opacity=X),le&&Te[V]&&(Te[V].style.opacity=X)}let $n,ni,ri;const yi={focus:!0};function rr(V){if(V!=ri){let X=V==null,ie=vr.alpha!=1;b.forEach((oe,ge)=>{if(m==1||ge>0){let be=X||ge==0||ge==V;oe._focus=X?null:be,ie&&Go(ge,be?1:vr.alpha)}}),ri=V,ie&&Zi()}}le&&Ni&&vn(gf,fe,V=>{ne._lock||(Oi(V),ri!=null&&Lr(null,yi,!0,it.setSeries))});function ir(V,X,ie){let oe=M[X];ie&&(V=V/jt-(oe.ori==1?cn:Wt));let ge=gt;oe.ori==1&&(ge=He,V=ge-V),oe.dir==-1&&(V=ge-V);let be=oe._min,Me=oe._max,De=V/ge,Pe=be+(Me-be)*De,je=oe.distr;return je==3?Gs(10,Pe):je==4?yk(Pe,oe.asinh):je==100?oe.bwd(Pe):Pe}function cr(V,X){let ie=ir(V,C,X);return Mi(ie,t[0],on,Sn)}r.valToIdx=V=>Mi(V,t[0]),r.posToIdx=cr,r.posToVal=ir,r.valToPos=(V,X,ie)=>M[X].ori==0?g(V,M[X],ie?Qt:gt,ie?Xn:0):y(V,M[X],ie?Qn:He,ie?nr:0),r.setCursor=(V,X,ie)=>{Vt=V.left,Et=V.top,A(null,X,ie)};function As(V,X){ln(Ir,Hs,dt.left=V),ln(Ir,Ia,dt.width=X)}function ur(V,X){ln(Ir,Ea,dt.top=V),ln(Ir,La,dt.height=X)}let xr=z.ori==0?As:ur,ii=z.ori==1?As:ur;function oi(){if(le&&he.live)for(let V=m==2?1:0;V<b.length;V++){if(V==0&<)continue;let X=he.values[V],ie=0;for(let oe in X)qe[V][ie++].firstChild.nodeValue=X[oe]}}function v(V,X){if(V!=null&&(V.idxs?V.idxs.forEach((ie,oe)=>{te[oe]=ie}):Ck(V.idx)||te.fill(V.idx),he.idx=te[0]),le&&he.live){for(let ie=0;ie<b.length;ie++)(ie>0||m==1&&!lt)&&$(ie,te[ie]);oi()}lr=!1,X!==!1&&Je("setLegend")}r.setLegend=v;function $(V,X){let ie=b[V],oe=V==0&&P==2?br:t[V],ge;lt?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 A(V,X,ie){Ut=Vt,Bt=Et,[Vt,Et]=ne.move(r,Vt,Et),ne.left=Vt,ne.top=Et,ue&&(ti&&Ui(ti,Yn(Vt),0,gt,He),Dn&&Ui(Dn,0,Yn(Et),gt,He));let oe,ge=on>Sn;$n=tn,ni=null;let be=z.ori==0?gt:He,Me=z.ori==1?gt:He;if(Vt<0||Nn==0||ge){oe=ne.idx=null;for(let De=0;De<b.length;De++){let Pe=yr[De];Pe!=null&&Ui(Pe,-10,-10,gt,He)}Ni&&Lr(null,yi,!0,V==null&&it.setSeries),he.live&&(te.fill(oe),lr=!0)}else{let De,Pe,je;m==1&&(De=z.ori==0?Vt:Et,Pe=ir(De,C),oe=ne.idx=Mi(Pe,t[0],on,Sn),je=N(t[0][oe],z,be,0));let Ge=-10,Ye=-10,pt=0,Mt=0,mt=!0,_t="",st="";for(let nt=m==2?1:0;nt<b.length;nt++){let rn=b[nt],gn=te[nt],Gn=gn==null?null:m==1?t[nt][gn]:t[nt][1][gn],Ot=ne.dataIdx(r,nt,oe,Pe),pe=Ot==null?null:m==1?t[nt][Ot]:t[nt][1][Ot];if(lr=lr||pe!=Gn||Ot!=gn,te[nt]=Ot,nt>0&&rn.show){let Ae=Ot==null?-10:Ot==oe?je:N(m==1?t[0][Ot]:t[nt][0][Ot],z,be,0),xe=pe==null?-10:_(pe,m==1?M[rn.scale]:M[rn.facets[1].scale],Me,0);if(Ni&&pe!=null){let Be=z.ori==1?Vt:Et,ot=qn(vr.dist(r,nt,Ot,xe,Be));if(ot<$n){let xt=vr.bias;if(xt!=0){let Ft=ir(Be,rn.scale),St=pe>=0?1:-1,Er=Ft>=0?1:-1;Er==St&&(Er==1?xt==1?pe>=Ft:pe<=Ft:xt==1?pe<=Ft:pe>=Ft)&&($n=ot,ni=nt)}else $n=ot,ni=nt}}if(lr||wn){let Be,ot;z.ori==0?(Be=Ae,ot=xe):(Be=xe,ot=Ae);let xt,Ft,St,Er,wi,en,sr=!0,wo=On.bbox;if(wo!=null){sr=!1;let Mn=wo(r,nt);St=Mn.left,Er=Mn.top,xt=Mn.width,Ft=Mn.height}else St=Be,Er=ot,xt=Ft=On.size(r,nt);if(en=On.fill(r,nt),wi=On.stroke(r,nt),wn)nt==ni&&$n<=vr.prox&&(Ge=St,Ye=Er,pt=xt,Mt=Ft,mt=sr,_t=en,st=wi);else{let Mn=yr[nt];Mn!=null&&(qi[nt]=St,Di[nt]=Er,xf(Mn,xt,Ft,sr),wf(Mn,en,wi),Ui(Mn,hi(St),hi(Er),gt,He))}}}}if(wn){let nt=vr.prox,rn=ri==null?$n<=nt:$n>nt||ni!=ri;if(lr||rn){let gn=yr[0];gn!=null&&(qi[0]=Ge,Di[0]=Ye,xf(gn,pt,Mt,mt),wf(gn,_t,st),Ui(gn,hi(Ge),hi(Ye),gt,He))}}}if(dt.show&&mi)if(V!=null){let[De,Pe]=it.scales,[je,Ge]=it.match,[Ye,pt]=V.cursor.sync.scales,Mt=V.cursor.drag;if(We=Mt._x,sn=Mt._y,We||sn){let{left:mt,top:_t,width:st,height:nt}=V.select,rn=V.scales[Ye].ori,gn=V.posToVal,Gn,Ot,pe,Ae,xe,Be=De!=null&&je(De,Ye),ot=Pe!=null&&Ge(Pe,pt);Be&&We?(rn==0?(Gn=mt,Ot=st):(Gn=_t,Ot=nt),pe=M[De],Ae=N(gn(Gn,Ye),pe,be,0),xe=N(gn(Gn+Ot,Ye),pe,be,0),xr(Ti(Ae,xe),qn(xe-Ae))):xr(0,be),ot&&sn?(rn==1?(Gn=mt,Ot=st):(Gn=_t,Ot=nt),pe=M[Pe],Ae=_(gn(Gn,pt),pe,Me,0),xe=_(gn(Gn+Ot,pt),pe,Me,0),ii(Ti(Ae,xe),qn(xe-Ae))):ii(0,Me)}else Q()}else{let De=qn(Ut-ca),Pe=qn(Bt-yo);if(z.ori==1){let pt=De;De=Pe,Pe=pt}We=An.x&&De>=An.dist,sn=An.y&&Pe>=An.dist;let je=An.uni;je!=null?We&&sn&&(We=De>=je,sn=Pe>=je,!We&&!sn&&(Pe>De?sn=!0:We=!0)):An.x&&An.y&&(We||sn)&&(We=sn=!0);let Ge,Ye;We&&(z.ori==0?(Ge=fi,Ye=Vt):(Ge=Ji,Ye=Et),xr(Ti(Ge,Ye),qn(Ye-Ge)),sn||ii(0,Me)),sn&&(z.ori==1?(Ge=fi,Ye=Vt):(Ge=Ji,Ye=Et),ii(Ti(Ge,Ye),qn(Ye-Ge)),We||xr(0,be)),!We&&!sn&&(xr(0,0),ii(0,0))}if(An._x=We,An._y=sn,V==null){if(ie){if(dn!=null){let[De,Pe]=it.scales;it.values[0]=De!=null?ir(z.ori==0?Vt:Et,De):null,it.values[1]=Pe!=null?ir(z.ori==1?Vt:Et,Pe):null}bt(Mu,r,Vt,Et,gt,He,oe)}if(Ni){let De=ie&&it.setSeries,Pe=vr.prox;ri==null?$n<=Pe&&Lr(ni,yi,!0,De):$n>Pe?Lr(null,yi,!0,De):ni!=ri&&Lr(ni,yi,!0,De)}}lr&&(he.idx=oe,v()),X!==!1&&Je("setCursor")}let F=null;Object.defineProperty(r,"rect",{get(){return F==null&&W(!1),F}});function W(V=!1){V?F=null:(F=o.getBoundingClientRect(),Je("syncRect",F))}function B(V,X,ie,oe,ge,be,Me){ne._lock||mi&&V!=null&&V.movementX==0&&V.movementY==0||(G(V,X,ie,oe,ge,be,Me,!1,V!=null),V!=null?A(null,!0,!0):A(X,!0,!1))}function G(V,X,ie,oe,ge,be,Me,De,Pe){if(F==null&&W(!1),Oi(V),V!=null)ie=V.clientX-F.left,oe=V.clientY-F.top;else{if(ie<0||oe<0){Vt=-10,Et=-10;return}let[je,Ge]=it.scales,Ye=X.cursor.sync,[pt,Mt]=Ye.values,[mt,_t]=Ye.scales,[st,nt]=it.match,rn=X.axes[0].side%2==1,gn=z.ori==0?gt:He,Gn=z.ori==1?gt:He,Ot=rn?be:ge,pe=rn?ge:be,Ae=rn?oe:ie,xe=rn?ie:oe;if(mt!=null?ie=st(je,mt)?x(pt,M[je],gn,0):-10:ie=gn*(Ae/Ot),_t!=null?oe=nt(Ge,_t)?x(Mt,M[Ge],Gn,0):-10:oe=Gn*(xe/pe),z.ori==1){let Be=ie;ie=oe,oe=Be}}Pe&&(X==null||X.cursor.event.type==Mu)&&((ie<=1||ie>=gt-1)&&(ie=hs(ie,gt)),(oe<=1||oe>=He-1)&&(oe=hs(oe,He))),De?(ca=ie,yo=oe,[fi,Ji]=ne.move(r,ie,oe)):(Vt=ie,Et=oe)}const Y={width:0,height:0,left:0,top:0};function Q(){Jt(Y,!1)}let re,se,ye,Ce;function me(V,X,ie,oe,ge,be,Me){mi=!0,We=sn=An._x=An._y=!1,G(V,X,ie,oe,ge,be,Me,!0,!1),V!=null&&(vn(Tu,Lu,we,!1),bt(df,r,fi,Ji,gt,He,null));let{left:De,top:Pe,width:je,height:Ge}=dt;re=De,se=Pe,ye=je,Ce=Ge}function we(V,X,ie,oe,ge,be,Me){mi=An._x=An._y=!1,G(V,X,ie,oe,ge,be,Me,!1,!0);let{left:De,top:Pe,width:je,height:Ge}=dt,Ye=je>0||Ge>0,pt=re!=De||se!=Pe||ye!=je||Ce!=Ge;if(Ye&&pt&&Jt(dt),An.setScale&&Ye&&pt){let Mt=De,mt=je,_t=Pe,st=Ge;if(z.ori==1&&(Mt=Pe,mt=Ge,_t=De,st=je),We&&Un(C,ir(Mt,C),ir(Mt+mt,C)),sn)for(let nt in M){let rn=M[nt];nt!=C&&rn.from==null&&rn.min!=tn&&Un(nt,ir(_t+st,nt),ir(_t,nt))}Q()}else ne.lock&&(ne._lock=!ne._lock,A(X,!0,V!=null));V!=null&&(jn(Tu,Lu),bt(Tu,r,Vt,Et,gt,He,null))}function Re(V,X,ie,oe,ge,be,Me){if(ne._lock)return;Oi(V);let De=mi;if(mi){let Pe=!0,je=!0,Ge=10,Ye,pt;z.ori==0?(Ye=We,pt=sn):(Ye=sn,pt=We),Ye&&pt&&(Pe=Vt<=Ge||Vt>=gt-Ge,je=Et<=Ge||Et>=He-Ge),Ye&&Pe&&(Vt=Vt<fi?0:gt),pt&&je&&(Et=Et<Ji?0:He),A(null,!0,!0),mi=!1}Vt=-10,Et=-10,te.fill(null),A(null,!0,!0),De&&(mi=De)}function Ee(V,X,ie,oe,ge,be,Me){ne._lock||(Oi(V),ws(),Q(),V!=null&&bt(ff,r,Vt,Et,gt,He,null))}function ze(){L.forEach(PS),co(r.width,r.height,!0)}cs(Ol,Vs,ze);const rt={};rt.mousedown=me,rt.mousemove=B,rt.mouseup=we,rt.dblclick=Ee,rt.setSeries=(V,X,ie,oe)=>{let ge=it.match[2];ie=ge(r,X,ie),ie!=-1&&Lr(ie,oe,!0,!1)},ue&&(vn(df,o,me),vn(Mu,o,B),vn(pf,o,V=>{Oi(V),W(!1)}),vn(gf,o,Re),vn(ff,o,Ee),th.add(r),r.syncRect=W);const Ke=r.hooks=n.hooks||{};function Je(V,X,ie){Vo?mo.push([V,X,ie]):V in Ke&&Ke[V].forEach(oe=>{oe.call(null,r,X,ie)})}(n.plugins||[]).forEach(V=>{for(let X in V.hooks)Ke[X]=(Ke[X]||[]).concat(V.hooks[X])});const an=(V,X,ie)=>ie,it=Bn({key:null,setSeries:!1,filters:{pub:Rf,sub:Rf},scales:[C,b[1]?b[1].scale:null],match:[Of,Of,an],values:[null,null]},ne.sync);it.match.length==2&&it.match.push(an),ne.sync=it;const dn=it.key,ft=ym(dn);function bt(V,X,ie,oe,ge,be,Me){it.filters.pub(V,X,ie,oe,ge,be,Me)&&ft.pub(V,X,ie,oe,ge,be,Me)}ft.sub(r);function Vn(V,X,ie,oe,ge,be,Me){it.filters.sub(V,X,ie,oe,ge,be,Me)&&rt[V](null,X,ie,oe,ge,be,Me)}r.pub=Vn;function or(){ft.unsub(r),th.delete(r),Zr.clear(),Nu(Ol,Vs,ze),d.remove(),fe==null||fe.remove(),Je("destroy")}r.destroy=or;function pn(){Je("init",n,t),Do(t||n.data,!1),S[C]?Oe(C,S[C]):ws(),lo=dt.show&&(dt.width>0||dt.height>0),Ri=lr=!0,co(n.width,n.height)}return b.forEach(ra),L.forEach(ei),e?e instanceof HTMLElement?(e.appendChild(d),pn()):e(r,pn):pn(),r}gr.assign=Bn,gr.fmtNum=Pu,gr.rangeNum=Pl,gr.rangeLog=Fl,gr.rangeAsinh=Du,gr.orient=ps,gr.pxRatio=jt,gr.join=Tk,gr.fmtDate=ju,gr.tzDate=Bk,gr.sync=ym;{gr.addGap=CS,gr.clipGaps=Vl;let n=gr.paths={points:Am};n.linear=$m,n.stepped=AS,n.bars=_S,n.spline=MS}var Nm,Dm;function WS(){return Dm||(Dm=1,Nm=function(n,t,e,r,m){var g,y;if(r===void 0)r=0;else if(r=r|0,r<0||r>=n.length)throw new RangeError("invalid lower bound");if(m===void 0)m=n.length-1;else if(m=m|0,m<r||m>=n.length)throw new RangeError("invalid upper bound");for(;r<=m;)if(g=r+(m-r>>>1),y=+e(n[g],t,g,n),y<0)r=g+1;else if(y>0)m=g-1;else return g;return~r}),Nm}var BS=WS();const cN=dr("U",fl(BS));var rh,Fm;function zS(){if(Fm)return rh;Fm=1;function n(t,e,r){var m=-1,g=t.length;e<0&&(e=-e>g?0:g+e),r=r>g?g:r,r<0&&(r+=g),g=e>r?0:r-e>>>0,e>>>=0;for(var y=Array(g);++m<g;)y[m]=t[m+e];return y}return rh=n,rh}var ih,Pm;function jS(){if(Pm)return ih;Pm=1;var n=zS();function t(e,r,m){var g=e.length;return m=m===void 0?g:m,!r&&m>=g?e:n(e,r,m)}return ih=t,ih}var oh,Wm;function Bm(){if(Wm)return oh;Wm=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",m=t+e+r,g="\\ufe0e\\ufe0f",y="\\u200d",x=RegExp("["+y+n+m+g+"]");function h(d){return x.test(d)}return oh=h,oh}var sh,zm;function HS(){if(zm)return sh;zm=1;function n(t){return t.split("")}return sh=n,sh}var ah,jm;function US(){if(jm)return ah;jm=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",m=t+e+r,g="\\ufe0e\\ufe0f",y="["+n+"]",x="["+m+"]",h="\\ud83c[\\udffb-\\udfff]",d="(?:"+x+"|"+h+")",s="[^"+n+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",l="\\u200d",o=d+"?",c="["+g+"]?",p="(?:"+l+"(?:"+[s,a,u].join("|")+")"+c+o+")*",w=c+o+p,b="(?:"+[s+x+"?",x,a,u,y].join("|")+")",L=RegExp(h+"(?="+h+")|"+b+w,"g");function M(k){return k.match(L)||[]}return ah=M,ah}var lh,Hm;function VS(){if(Hm)return lh;Hm=1;var n=HS(),t=Bm(),e=US();function r(m){return t(m)?e(m):n(m)}return lh=r,lh}var ch,Um;function GS(){if(Um)return ch;Um=1;var n=typeof Eo=="object"&&Eo&&Eo.Object===Object&&Eo;return ch=n,ch}var uh,Vm;function KS(){if(Vm)return uh;Vm=1;var n=GS(),t=typeof self=="object"&&self&&self.Object===Object&&self,e=n||t||Function("return this")();return uh=e,uh}var hh,Gm;function dh(){if(Gm)return hh;Gm=1;var n=KS(),t=n.Symbol;return hh=t,hh}var ph,Km;function qS(){if(Km)return ph;Km=1;function n(t,e){for(var r=-1,m=t==null?0:t.length,g=Array(m);++r<m;)g[r]=e(t[r],r,t);return g}return ph=n,ph}var gh,qm;function YS(){if(qm)return gh;qm=1;var n=Array.isArray;return gh=n,gh}var fh,Ym;function XS(){if(Ym)return fh;Ym=1;var n=dh(),t=Object.prototype,e=t.hasOwnProperty,r=t.toString,m=n?n.toStringTag:void 0;function g(y){var x=e.call(y,m),h=y[m];try{y[m]=void 0;var d=!0}catch{}var s=r.call(y);return d&&(x?y[m]=h:delete y[m]),s}return fh=g,fh}var mh,Xm;function QS(){if(Xm)return mh;Xm=1;var n=Object.prototype,t=n.toString;function e(r){return t.call(r)}return mh=e,mh}var vh,Qm;function ZS(){if(Qm)return vh;Qm=1;var n=dh(),t=XS(),e=QS(),r="[object Null]",m="[object Undefined]",g=n?n.toStringTag:void 0;function y(x){return x==null?x===void 0?m:r:g&&g in Object(x)?t(x):e(x)}return vh=y,vh}var yh,Zm;function JS(){if(Zm)return yh;Zm=1;function n(t){return t!=null&&typeof t=="object"}return yh=n,yh}var wh,Jm;function eA(){if(Jm)return wh;Jm=1;var n=ZS(),t=JS(),e="[object Symbol]";function r(m){return typeof m=="symbol"||t(m)&&n(m)==e}return wh=r,wh}var bh,ev;function tA(){if(ev)return bh;ev=1;var n=dh(),t=qS(),e=YS(),r=eA(),m=n?n.prototype:void 0,g=m?m.toString:void 0;function y(x){if(typeof x=="string")return x;if(e(x))return t(x,y)+"";if(r(x))return g?g.call(x):"";var h=x+"";return h=="0"&&1/x==-1/0?"-0":h}return bh=y,bh}var xh,tv;function Yl(){if(tv)return xh;tv=1;var n=tA();function t(e){return e==null?"":n(e)}return xh=t,xh}var Ch,nv;function nA(){if(nv)return Ch;nv=1;var n=jS(),t=Bm(),e=VS(),r=Yl();function m(g){return function(y){y=r(y);var x=t(y)?e(y):void 0,h=x?x[0]:y.charAt(0),d=x?n(x,1).join(""):y.slice(1);return h[g]()+d}}return Ch=m,Ch}var kh,rv;function iv(){if(rv)return kh;rv=1;var n=nA(),t=n("toUpperCase");return kh=t,kh}var rA=iv();const iA=fl(rA);var Sh,ov;function oA(){if(ov)return Sh;ov=1;var n=Yl(),t=iv();function e(r){return t(n(r).toLowerCase())}return Sh=e,Sh}var Ah,sv;function sA(){if(sv)return Ah;sv=1;function n(t,e,r,m){var g=-1,y=t==null?0:t.length;for(m&&y&&(r=t[++g]);++g<y;)r=e(r,t[g],g,t);return r}return Ah=n,Ah}var _h,av;function aA(){if(av)return _h;av=1;function n(t){return function(e){return t==null?void 0:t[e]}}return _h=n,_h}var $h,lv;function lA(){if(lv)return $h;lv=1;var n=aA(),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 $h=e,$h}var Mh,cv;function cA(){if(cv)return Mh;cv=1;var n=lA(),t=Yl(),e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",m="\\ufe20-\\ufe2f",g="\\u20d0-\\u20ff",y=r+m+g,x="["+y+"]",h=RegExp(x,"g");function d(s){return s=t(s),s&&s.replace(e,n).replace(h,"")}return Mh=d,Mh}var Th,uv;function uA(){if(uv)return Th;uv=1;var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function t(e){return e.match(n)||[]}return Th=t,Th}var Ih,hv;function hA(){if(hv)return Ih;hv=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 Ih=t,Ih}var Lh,dv;function dA(){if(dv)return Lh;dv=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",m=t+e+r,g="\\u2700-\\u27bf",y="a-z\\xdf-\\xf6\\xf8-\\xff",x="\\xac\\xb1\\xd7\\xf7",h="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",d="\\u2000-\\u206f",s=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="A-Z\\xc0-\\xd6\\xd8-\\xde",u="\\ufe0e\\ufe0f",l=x+h+d+s,o="['’]",c="["+l+"]",p="["+m+"]",w="\\d+",b="["+g+"]",L="["+y+"]",M="[^"+n+l+w+g+y+a+"]",k="\\ud83c[\\udffb-\\udfff]",C="(?:"+p+"|"+k+")",R="[^"+n+"]",O="(?:\\ud83c[\\udde6-\\uddff]){2}",E="[\\ud800-\\udbff][\\udc00-\\udfff]",I="["+a+"]",z="\\u200d",P="(?:"+L+"|"+M+")",N="(?:"+I+"|"+M+")",_="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",S="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",D=C+"?",j="["+u+"]?",U="(?:"+z+"(?:"+[R,O,E].join("|")+")"+j+D+")*",q="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",te=j+D+U,he="(?:"+[b,O,E].join("|")+")"+te,ne=RegExp([I+"?"+L+"+"+_+"(?="+[c,I,"$"].join("|")+")",N+"+"+S+"(?="+[c,I+P,"$"].join("|")+")",I+"?"+P+"+"+_,I+"+"+S,Z,q,w,he].join("|"),"g");function le(ue){return ue.match(ne)||[]}return Lh=le,Lh}var Eh,pv;function pA(){if(pv)return Eh;pv=1;var n=uA(),t=hA(),e=Yl(),r=dA();function m(g,y,x){return g=e(g),y=x?void 0:y,y===void 0?t(g)?r(g):n(g):g.match(y)||[]}return Eh=m,Eh}var Rh,gv;function gA(){if(gv)return Rh;gv=1;var n=sA(),t=cA(),e=pA(),r="['’]",m=RegExp(r,"g");function g(y){return function(x){return n(e(t(x).replace(m,"")),y,"")}}return Rh=g,Rh}var Oh,fv;function fA(){if(fv)return Oh;fv=1;var n=oA(),t=gA(),e=t(function(r,m,g){return m=m.toLowerCase(),r+(g?n(m):m)});return Oh=e,Oh}var mA=fA();const vA=fl(mA),yA=Object.assign({"./ArrayWidget.vue":()=>Ze(()=>Qe.import("./ArrayWidget-j3ncPuPx-aa449c34e8f2de77f02d.js"),void 0),"./ArrayplotWidget.vue":()=>Ze(()=>Qe.import("./ArrayplotWidget-DuLaiGa9-77c1fd4a0e82123f179c.js"),void 0),"./BlockWidget.vue":()=>Ze(()=>Qe.import("./BlockWidget-Bf5Dd6Cr-2ff4d8de685d2f1a246d.js"),void 0),"./ButtonWidget.vue":()=>Ze(()=>Qe.import("./ButtonWidget-bl_mGFYh-23c6822c774698262466.js"),void 0),"./CanvasWidget.vue":()=>Ze(()=>Qe.import("./CanvasWidget-boDemgx1-5f50b097b6549e169840.js"),void 0),"./CanvasdotWidget.vue":()=>Ze(()=>Qe.import("./CanvasdotWidget-BZBbJcER-e2edd0c4fcd86c333a44.js"),void 0),"./CanvasimageWidget.vue":()=>Ze(()=>Qe.import("./CanvasimageWidget-6ywvT5jd-a799aa1aa433d6d88beb.js"),void 0),"./CanvasimagevalueWidget.vue":()=>Ze(()=>Qe.import("./CanvasimagevalueWidget-DjWrA3gX-230ce31ddbb0bafff228.js"),void 0),"./CanvaslabelWidget.vue":()=>Ze(()=>Qe.import("./CanvaslabelWidget-Bq4V2BQh-67022f223ae243ebffca.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>Ze(()=>Qe.import("./CanvaslabelvalueWidget-C8oNcFLi-13dedf0d20f2441be1d8.js"),void 0),"./CanvaslineWidget.vue":()=>Ze(()=>Qe.import("./CanvaslineWidget-nvbL2GoL-765e7124b8b7548dfe0a.js"),void 0),"./CanvaslinevalueWidget.vue":()=>Ze(()=>Qe.import("./CanvaslinevalueWidget-ZACQedKx-9552fa7149a798613862.js"),void 0),"./CheckbuttonWidget.vue":()=>Ze(()=>Qe.import("./CheckbuttonWidget-B82UE8AB-df0b5614bec6e1ccf335.js"),void 0),"./ComboboxWidget.vue":()=>Ze(()=>Qe.import("./ComboboxWidget-4OFiSkI6-7afa4829a51f955a8209.js"),void 0),"./DateWidget.vue":()=>Ze(()=>Qe.import("./DateWidget-BmwtdirF-bd6b72378049852005fe.js"),void 0),"./DynamicWidget.vue":()=>Ze(()=>Qe.import("./DynamicWidget-CfMtj7H8-c96aa4c168ed11bcf844.js"),void 0),"./FormatvalueWidget.vue":()=>Ze(()=>Qe.import("./FormatvalueWidget-C8exC3bj-8404db1fd5379699b37f.js"),void 0),"./HorizontalWidget.vue":()=>Ze(()=>Qe.import("./HorizontalWidget-Ck151zVw-ba2c7293de57b38ad084.js"),void 0),"./HorizontalboxWidget.vue":()=>Ze(()=>Qe.import("./HorizontalboxWidget-D3P-cl9V-8e77ae12037a5cad67c4.js"),void 0),"./HorizontallineWidget.vue":()=>Ze(()=>Qe.import("./HorizontallineWidget-BE1TjPU8-57fb772c196f8ef02c1d.js"),void 0),"./IframeWidget.vue":()=>Ze(()=>Qe.import("./IframeWidget-BgJCgues-7416bfc3527f97b9c518.js"),void 0),"./ImageviewerWidget.vue":()=>Ze(()=>Qe.import("./ImageviewerWidget-BlhFZD2f-91640482e9e639ceface.js"),void 0),"./LabelWidget.vue":()=>Ze(()=>Qe.import("./LabelWidget-Cwosk4x2-8785c02eedc9d37ce9f4.js"),void 0),"./LabelledWidget.vue":()=>Ze(()=>Qe.import("./LabelledWidget-Dl6rAFTQ-ffff6c8bc54996ff009b.js"),void 0),"./LabelprogressbarWidget.vue":()=>Ze(()=>Qe.import("./LabelprogressbarWidget-MuAKesOz-19ab339878f12d356862.js"),void 0),"./LabelsparklineWidget.vue":()=>Ze(()=>Qe.import("./LabelsparklineWidget-6LA6Ox3d-bcc296ae7aac37883cba.js"),void 0),"./LabelvalueWidget.vue":()=>Ze(()=>Qe.import("./LabelvalueWidget-BxAXx-Tf-2957105bfd285293b1ff.js"),void 0),"./LabelvaluedescWidget.vue":()=>Ze(()=>Qe.import("./LabelvaluedescWidget-Dwwlnd1g-977a71583eb59f6ca41e.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>Ze(()=>Qe.import("./LabelvaluelimitsbarWidget-Dv8Qk8kK-85033266a3796669f49a.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>Ze(()=>Qe.import("./LabelvaluelimitscolumnWidget-D-_gl6fq-fa9848f7143e5417a6e3.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>Ze(()=>Qe.import("./LabelvaluerangebarWidget-B3MKT-3Y-1d904e7150106be3691c.js"),void 0),"./LedWidget.vue":()=>Ze(()=>Qe.import("./LedWidget-DOuDD8LI-694fd994c9de77da0b0e.js"),void 0),"./LimitsbarWidget.vue":()=>Ze(()=>Qe.import("./LimitsbarWidget-D1U6SvVL-405a5d80bc0d24a6ea9c.js"),void 0),"./LimitscolorWidget.vue":()=>Ze(()=>Qe.import("./LimitscolorWidget-iSMGusqt-305f9af8f2126d808257.js"),void 0),"./LimitscolumnWidget.vue":()=>Ze(()=>Qe.import("./LimitscolumnWidget-DjxZTt_r-7884a5f80243d71a9d93.js"),void 0),"./LinegraphWidget.vue":()=>Ze(()=>Qe.import("./LinegraphWidget-BHKU6zlT-b11846e1d296fe9e737a.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>Ze(()=>Qe.import("./MatrixbycolumnsWidget-BKO-A2QD-b4a979b9575a554a8094.js"),void 0),"./ProgressbarWidget.vue":()=>Ze(()=>Qe.import("./ProgressbarWidget-fbr2qu_N-6859373386d079792a35.js"),void 0),"./RadiobuttonWidget.vue":()=>Ze(()=>Qe.import("./RadiobuttonWidget-DL08zcQT-5efcd58f0a02450b7a37.js"),void 0),"./RadiogroupWidget.vue":()=>Ze(()=>Qe.import("./RadiogroupWidget-DW9Xpj3c-d1707fe4a2c00fae25f9.js"),void 0),"./RangebarWidget.vue":()=>Ze(()=>Qe.import("./RangebarWidget-o9q55kjc-7aabb41ecc4ae9037d47.js"),void 0),"./RollupWidget.vue":()=>Ze(()=>Qe.import("./RollupWidget-BHnjj-DF-c74742451d37d9e097bd.js"),void 0),"./ScrollwindowWidget.vue":()=>Ze(()=>Qe.import("./ScrollwindowWidget-D-QVwztC-f20ac6f14a07bf25d9fc.js"),void 0),"./SignalWidget.vue":()=>Ze(()=>Qe.import("./SignalWidget-CsWuufdx-b3ad1e932e523a328af2.js"),void 0),"./SpacerWidget.vue":()=>Ze(()=>Qe.import("./SpacerWidget-Di9-qunj-f0576375735204748b60.js"),void 0),"./SparklineWidget.vue":()=>Ze(()=>Qe.import("./SparklineWidget-B6-zhdPW-f446460528d6a77569f4.js"),void 0),"./TabbookWidget.vue":()=>Ze(()=>Qe.import("./TabbookWidget-B1E1_mzA-271da99223fd0fe54877.js"),void 0),"./TextboxWidget.vue":()=>Ze(()=>Qe.import("./TextboxWidget-CBVEXPw_-e3310a030edd4860e1c6.js"),void 0),"./TextfieldWidget.vue":()=>Ze(()=>Qe.import("./TextfieldWidget-DZMHrtQa-5edfedfbe5434ac47fce.js"),void 0),"./TimeWidget.vue":()=>Ze(()=>Qe.import("./TimeWidget-K4MNmJ7J-e360ab888129cd54fdc0.js"),void 0),"./TitleWidget.vue":()=>Ze(()=>Qe.import("./TitleWidget-8IcwweFE-d7457335c820d6d08fce.js"),void 0),"./ValueWidget.vue":()=>Ze(()=>Qe.import("./ValueWidget-BvT1ASar-7d9cbd5e4e5c5145fb91.js"),void 0),"./ValuelimitsbarWidget.vue":()=>Ze(()=>Qe.import("./ValuelimitsbarWidget-C5lBnUmB-bfe696226d34e3ce4e48.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>Ze(()=>Qe.import("./ValuelimitscolumnWidget-DHYI0WBL-22923915e43f24541699.js"),void 0),"./ValuerangebarWidget.vue":()=>Ze(()=>Qe.import("./ValuerangebarWidget-BSszZhlE-e0a9426f1670a3078848.js"),void 0),"./VerticalWidget.vue":()=>Ze(()=>Qe.import("./VerticalWidget-1GhgYrC3-3c064edb22edbb46dba2.js"),void 0),"./VerticalboxWidget.vue":()=>Ze(()=>Qe.import("./VerticalboxWidget-DYHJqEzd-d0896602a919174a6de6.js"),void 0)}),wA=Object.entries(yA).reduce((n,[t,e])=>{t=t.split("/").pop();const r=iA(vA(t.replace(/\.\w+$/,"")));return{...n,[r]:tp(e)}},{}),uN=dr("j",{components:wA});function mv(){return Object.assign({},Fs())}function bA(n,t,e){const r=hn(n,void 0);return r.setTime(r.getTime()+t*pl),r}function xA(n,t){const e=()=>Wn(void 0,NaN),r=AA(n);let m;if(r.date){const h=_A(r.date,2);m=$A(h.restDateString,h.year)}if(!m||isNaN(+m))return e();const g=+m;let y=0,x;if(r.time&&(y=MA(r.time),isNaN(y)))return e();if(r.timezone){if(x=TA(r.timezone),isNaN(x))return e()}else{const h=new Date(g+y),d=hn(0,void 0);return d.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),d.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),d}return hn(g+y+x,void 0)}const Xl={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},CA=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,kA=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,SA=/^([+-])(\d{2})(?::?(\d{2}))?$/;function AA(n){const t={},e=n.split(Xl.dateTimeDelimiter);let r;if(e.length>2)return t;if(/:/.test(e[0])?r=e[0]:(t.date=e[0],r=e[1],Xl.timeZoneDelimiter.test(t.date)&&(t.date=n.split(Xl.timeZoneDelimiter)[0],r=n.substr(t.date.length,n.length))),r){const m=Xl.timezone.exec(r);m?(t.time=r.replace(m[1],""),t.timezone=m[1]):t.time=r}return t}function _A(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 m=r[1]?parseInt(r[1]):null,g=r[2]?parseInt(r[2]):null;return{year:g===null?m:g*100,restDateString:n.slice((r[1]||r[2]).length)}}function $A(n,t){if(t===null)return new Date(NaN);const e=n.match(CA);if(!e)return new Date(NaN);const r=!!e[4],m=Pa(e[1]),g=Pa(e[2])-1,y=Pa(e[3]),x=Pa(e[4]),h=Pa(e[5])-1;if(r)return OA(t,x,h)?IA(t,x,h):new Date(NaN);{const d=new Date(0);return!EA(t,g,y)||!RA(t,m)?new Date(NaN):(d.setUTCFullYear(t,g,Math.max(m,y)),d)}}function Pa(n){return n?parseInt(n):1}function MA(n){const t=n.match(kA);if(!t)return NaN;const e=Nh(t[1]),r=Nh(t[2]),m=Nh(t[3]);return NA(e,r,m)?e*Jc+r*pl+m*1e3:NaN}function Nh(n){return n&&parseFloat(n.replace(",","."))||0}function TA(n){if(n==="Z")return 0;const t=n.match(SA);if(!t)return 0;const e=t[1]==="+"?-1:1,r=parseInt(t[2]),m=t[3]&&parseInt(t[3])||0;return DA(r,m)?e*(r*Jc+m*pl):NaN}function IA(n,t,e){const r=new Date(0);r.setUTCFullYear(n,0,4);const m=r.getUTCDay()||7,g=(t-1)*7+e+1-m;return r.setUTCDate(r.getUTCDate()+g),r}const LA=[31,null,31,30,31,30,31,31,30,31,30,31];function vv(n){return n%400===0||n%4===0&&n%100!==0}function EA(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(LA[t]||(vv(n)?29:28))}function RA(n,t){return t>=1&&t<=(vv(n)?366:365)}function OA(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function NA(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function DA(n,t){return t>=0&&t<=59}function FA(n,t,e){return bA(n,-t)}function yv(n,t,e){const r=mv(),m=BA(n,e.timeZone,e.locale??r.locale);return"formatToParts"in m?PA(m,t):WA(m,t)}function PA(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 WA(n,t){const e=n.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(e);return r?r[0].substr(1):""}function BA(n,t,e){return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:t,timeZoneName:n})}function zA(n,t){const e=GA(t);return"formatToParts"in e?HA(e,n):UA(e,n)}const jA={year:0,month:1,day:2,hour:3,minute:4,second:5};function HA(n,t){try{const e=n.formatToParts(t),r=[];for(let m=0;m<e.length;m++){const g=jA[e[m].type];g!==void 0&&(r[g]=parseInt(e[m].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}function UA(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 Dh={},wv=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")),VA=wv==="06/25/2014, 00:00:00"||wv==="06/25/2014 00:00:00";function GA(n){return Dh[n]||(Dh[n]=VA?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"})),Dh[n]}function bv(n,t,e,r,m,g,y){const x=new Date(0);return x.setUTCFullYear(n,t,e),x.setUTCHours(r,m,g,y),x}const xv=36e5,KA=6e4,Fh={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Ph(n,t,e){if(!n)return 0;let r=Fh.timezoneZ.exec(n);if(r)return 0;let m,g;if(r=Fh.timezoneHH.exec(n),r)return m=parseInt(r[1],10),Cv(m)?-(m*xv):NaN;if(r=Fh.timezoneHHMM.exec(n),r){m=parseInt(r[2],10);const y=parseInt(r[3],10);return Cv(m,y)?(g=Math.abs(m)*xv+y*KA,r[1]==="+"?-g:g):NaN}if(XA(n)){t=new Date(t||Date.now());const y=e?t:qA(t),x=Wh(y,n);return-(e?x:YA(t,x,n))}return NaN}function qA(n){return bv(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function Wh(n,t){const e=zA(n,t),r=bv(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime();let m=n.getTime();const g=m%1e3;return m-=g>=0?g:1e3+g,r-m}function YA(n,t,e){let r=n.getTime()-t;const m=Wh(new Date(r),e);if(t===m)return t;r-=m-t;const g=Wh(new Date(r),e);return m===g?m:Math.max(m,g)}function Cv(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}const kv={};function XA(n){if(kv[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),kv[n]=!0,!0}catch{return!1}}const QA=60*1e3,ZA={X:function(n,t,e){const r=Bh(e.timeZone,n);if(r===0)return"Z";switch(t){case"X":return Sv(r);case"XXXX":case"XX":return Js(r);case"XXXXX":case"XXX":default:return Js(r,":")}},x:function(n,t,e){const r=Bh(e.timeZone,n);switch(t){case"x":return Sv(r);case"xxxx":case"xx":return Js(r);case"xxxxx":case"xxx":default:return Js(r,":")}},O:function(n,t,e){const r=Bh(e.timeZone,n);switch(t){case"O":case"OO":case"OOO":return"GMT"+JA(r,":");case"OOOO":default:return"GMT"+Js(r,":")}},z:function(n,t,e){switch(t){case"z":case"zz":case"zzz":return yv("short",n,e);case"zzzz":default:return yv("long",n,e)}}};function Bh(n,t){const e=n?Ph(n,t,!0)/QA:(t==null?void 0:t.getTimezoneOffset())??0;if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+n);return e}function Ql(n,t){const e=n<0?"-":"";let r=Math.abs(n).toString();for(;r.length<t;)r="0"+r;return e+r}function Js(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),m=Ql(Math.floor(r/60),2),g=Ql(Math.floor(r%60),2);return e+m+t+g}function Sv(n,t){return n%60===0?(n>0?"-":"+")+Ql(Math.abs(n)/60,2):Js(n,t)}function JA(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),m=Math.floor(r/60),g=r%60;return g===0?e+String(m):e+String(m)+t+Ql(g,2)}function Av(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 e_=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,zh=36e5,_v=6e4,t_=2,$r={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:e_};function $v(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?t_: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=n_(n),{year:m,restDateString:g}=r_(r.date,e),y=i_(g,m);if(y===null||isNaN(y.getTime()))return new Date(NaN);if(y){const x=y.getTime();let h=0,d;if(r.time&&(h=o_(r.time),h===null||isNaN(h)))return new Date(NaN);if(r.timeZone||t.timeZone){if(d=Ph(r.timeZone||t.timeZone,new Date(x+h)),isNaN(d))return new Date(NaN)}else d=Av(new Date(x+h)),d=Av(new Date(x+h+d));return new Date(x+h+d)}else return new Date(NaN)}function n_(n){const t={};let e=$r.dateTimePattern.exec(n),r;if(e?(t.date=e[1],r=e[3]):(e=$r.datePattern.exec(n),e?(t.date=e[1],r=e[2]):(t.date=null,r=n)),r){const m=$r.timeZone.exec(r);m?(t.time=r.replace(m[1],""),t.timeZone=m[1].trim()):t.time=r}return t}function r_(n,t){if(n){const e=$r.YYY[t],r=$r.YYYYY[t];let m=$r.YYYY.exec(n)||r.exec(n);if(m){const g=m[1];return{year:parseInt(g,10),restDateString:n.slice(g.length)}}if(m=$r.YY.exec(n)||e.exec(n),m){const g=m[1];return{year:parseInt(g,10)*100,restDateString:n.slice(g.length)}}}return{year:null}}function i_(n,t){if(t===null)return null;let e,r,m;if(!n||!n.length)return e=new Date(0),e.setUTCFullYear(t),e;let g=$r.MM.exec(n);if(g)return e=new Date(0),r=parseInt(g[1],10)-1,Iv(t,r)?(e.setUTCFullYear(t,r),e):new Date(NaN);if(g=$r.DDD.exec(n),g){e=new Date(0);const y=parseInt(g[1],10);return l_(t,y)?(e.setUTCFullYear(t,0,y),e):new Date(NaN)}if(g=$r.MMDD.exec(n),g){e=new Date(0),r=parseInt(g[1],10)-1;const y=parseInt(g[2],10);return Iv(t,r,y)?(e.setUTCFullYear(t,r,y),e):new Date(NaN)}if(g=$r.Www.exec(n),g)return m=parseInt(g[1],10)-1,Lv(m)?Mv(t,m):new Date(NaN);if(g=$r.WwwD.exec(n),g){m=parseInt(g[1],10)-1;const y=parseInt(g[2],10)-1;return Lv(m,y)?Mv(t,m,y):new Date(NaN)}return null}function o_(n){let t,e,r=$r.HH.exec(n);if(r)return t=parseFloat(r[1].replace(",",".")),jh(t)?t%24*zh:NaN;if(r=$r.HHMM.exec(n),r)return t=parseInt(r[1],10),e=parseFloat(r[2].replace(",",".")),jh(t,e)?t%24*zh+e*_v:NaN;if(r=$r.HHMMSS.exec(n),r){t=parseInt(r[1],10),e=parseInt(r[2],10);const m=parseFloat(r[3].replace(",","."));return jh(t,e,m)?t%24*zh+e*_v+m*1e3:NaN}return null}function Mv(n,t,e){t=t||0,e=e||0;const r=new Date(0);r.setUTCFullYear(n,0,4);const m=r.getUTCDay()||7,g=t*7+e+1-m;return r.setUTCDate(r.getUTCDate()+g),r}const s_=[31,28,31,30,31,30,31,31,30,31,30,31],a_=[31,29,31,30,31,30,31,31,30,31,30,31];function Tv(n){return n%400===0||n%4===0&&n%100!==0}function Iv(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;const r=Tv(n);if(r&&e>a_[t]||!r&&e>s_[t])return!1}return!0}function l_(n,t){if(t<1)return!1;const e=Tv(n);return!(e&&t>366||!e&&t>365)}function Lv(n,t){return!(n<0||n>52||t!=null&&(t<0||t>6))}function jh(n,t,e){return!(n<0||n>=25||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}const c_=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function u_(n,t,e={}){t=String(t);const r=t.match(c_);if(r){const m=$v(e.originalDate||n,e);t=r.reduce(function(g,y){if(y[0]==="'")return g;const x=g.indexOf(y),h=g[x-1]==="'",d=g.replace(y,"'"+ZA[y[0]](m,y,e)+"'");return h?d.substring(0,x-1)+d.substring(x+1):d},t)}return Lo(n,t,e)}function h_(n,t,e){n=$v(n,e);const r=Ph(t,n,!0),m=new Date(n.getTime()-r),g=new Date(0);return g.setFullYear(m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate()),g.setHours(m.getUTCHours(),m.getUTCMinutes(),m.getUTCSeconds(),m.getUTCMilliseconds()),g}function Zl(n,t,e,r){return r={...r,timeZone:t,originalDate:n},u_(h_(n,t,{timeZone:r.timeZone}),e,r)}const Jl="yyyy-MM-dd",Ev="HH:mm:ss.SSS",Rv="HH:mm:ss",ec=`${Jl} ${Ev}`,Ov=`${Jl} ${Rv}`,d_=dr("R",{methods:{parseDateTime(n,t){return n.includes(" ")&&(n=n.replace(" ","T")),t&&t==="UTC"&&(n+="Z"),Date.parse(n)},formatUtcToLocal(n,t){return Lo(!t||t==="local"?FA(n,n.getTimezoneOffset()):n,ec)},formatDateTime(n,t){return!t||t==="local"?Lo(n,ec):Zl(n,t,ec)},formatDateTimeHMS(n,t){return!t||t==="local"?Lo(n,Ov):Zl(n,t,Ov)},formatDate:function(n,t){return!t||t==="local"?Lo(n,Jl):Zl(n,this.timeZone,Jl)},formatTime:function(n,t,e=Ev){return!t||t==="local"?Lo(n,e):Zl(n,this.timeZone,e)},formatTimeHMS:function(n,t){return this.formatTime(n,t,Rv)},formatTimestamp(n,t){return this.formatDateTime(xA(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 p_=Object.defineProperty,g_=(n,t,e)=>t in n?p_(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Xe=(n,t,e)=>g_(n,typeof t!="symbol"?t+"":t,e);function Hh(n,t,e){const r=hn(n,e==null?void 0:e.in);return isNaN(t)?Wn((e==null?void 0:e.in)||n,NaN):(t&&r.setDate(r.getDate()+t),r)}function f_(n,t){const e=hn(n,void 0).getDay();return e===0?7:e}function m_(n,t){const e=v_(t)?new t(0):Wn(t,0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}function v_(n){var t;return typeof n=="function"&&((t=n.prototype)==null?void 0:t.constructor)===n}const y_=10;let Nv=class{constructor(){Xe(this,"subPriority",0)}validate(t,e){return!0}},w_=class extends Nv{constructor(t,e,r,m,g){super(),this.value=t,this.validateValue=e,this.setValue=r,this.priority=m,g&&(this.subPriority=g)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,r){return this.setValue(t,e,this.value,r)}},b_=class extends Nv{constructor(t,e){super(),Xe(this,"priority",y_),Xe(this,"subPriority",-1),this.context=t||(r=>Wn(e,r))}set(t,e){return e.timestampIsSet?t:Wn(t,m_(t,this.context))}};class Ht{run(t,e,r,m){const g=this.parse(t,e,r,m);return g?{setter:new w_(g.value,this.validate,this.set,this.priority,this.subPriority),rest:g.rest}:null}validate(t,e,r){return!0}}let x_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",140),Xe(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 Ln={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}/},Vi={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 En(n,t){return n&&{value:t(n.value),rest:n.rest}}function mn(n,t){const e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function Gi(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,m=e[2]?parseInt(e[2],10):0,g=e[3]?parseInt(e[3],10):0,y=e[5]?parseInt(e[5],10):0;return{value:r*(m*Jc+g*pl+y*Bb),rest:t.slice(e[0].length)}}function Dv(n){return mn(Ln.anyDigitsSigned,n)}function kn(n,t){switch(n){case 1:return mn(Ln.singleDigit,t);case 2:return mn(Ln.twoDigits,t);case 3:return mn(Ln.threeDigits,t);case 4:return mn(Ln.fourDigits,t);default:return mn(new RegExp("^\\d{1,"+n+"}"),t)}}function Fv(n,t){switch(n){case 1:return mn(Ln.singleDigitSigned,t);case 2:return mn(Ln.twoDigitsSigned,t);case 3:return mn(Ln.threeDigitsSigned,t);case 4:return mn(Ln.fourDigitsSigned,t);default:return mn(new RegExp("^-?\\d{1,"+n+"}"),t)}}function Uh(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 Pv(n,t){const e=t>0,r=e?t:1-t;let m;if(r<=50)m=n||100;else{const g=r+50,y=Math.trunc(g/100)*100,x=n>=g%100;m=n+y-(x?100:0)}return e?m:1-m}function Wv(n){return n%400===0||n%4===0&&n%100!==0}let C_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",130),Xe(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,e,r){const m=g=>({year:g,isTwoDigitYear:e==="yy"});switch(e){case"y":return En(kn(4,t),m);case"yo":return En(r.ordinalNumber(t,{unit:"year"}),m);default:return En(kn(e.length,t),m)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r){const m=t.getFullYear();if(r.isTwoDigitYear){const y=Pv(r.year,m);return t.setFullYear(y,0,1),t.setHours(0,0,0,0),t}const g=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(g,0,1),t.setHours(0,0,0,0),t}},k_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",130),Xe(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,e,r){const m=g=>({year:g,isTwoDigitYear:e==="YY"});switch(e){case"Y":return En(kn(4,t),m);case"Yo":return En(r.ordinalNumber(t,{unit:"year"}),m);default:return En(kn(e.length,t),m)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r,m){const g=tu(t,m);if(r.isTwoDigitYear){const x=Pv(r.year,g);return t.setFullYear(x,0,m.firstWeekContainsDate),t.setHours(0,0,0,0),To(t,m)}const y=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(y,0,m.firstWeekContainsDate),t.setHours(0,0,0,0),To(t,m)}},S_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",130),Xe(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,e){return Fv(e==="R"?4:e.length,t)}set(t,e,r){const m=Wn(t,0);return m.setFullYear(r,0,4),m.setHours(0,0,0,0),Ps(m)}},A_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",130),Xe(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,e){return Fv(e==="u"?4:e.length,t)}set(t,e,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}},__=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",120),Xe(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 kn(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 extends Ht{constructor(){super(...arguments),Xe(this,"priority",120),Xe(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 kn(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}},M_=class extends Ht{constructor(){super(...arguments),Xe(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Xe(this,"priority",110)}parse(t,e,r){const m=g=>g-1;switch(e){case"M":return En(mn(Ln.month,t),m);case"MM":return En(kn(2,t),m);case"Mo":return En(r.ordinalNumber(t,{unit:"month"}),m);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}},T_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",110),Xe(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,e,r){const m=g=>g-1;switch(e){case"L":return En(mn(Ln.month,t),m);case"LL":return En(kn(2,t),m);case"Lo":return En(r.ordinalNumber(t,{unit:"month"}),m);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 I_(n,t,e){const r=hn(n,e==null?void 0:e.in),m=Mp(r,e)-t;return r.setDate(r.getDate()-m*7),hn(r,e==null?void 0:e.in)}let L_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",100),Xe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,e,r){switch(e){case"w":return mn(Ln.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return kn(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r,m){return To(I_(t,r,m),m)}};function E_(n,t,e){const r=hn(n,void 0),m=$p(r)-t;return r.setDate(r.getDate()-m*7),r}let R_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",100),Xe(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 mn(Ln.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return kn(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r){return Ps(E_(t,r))}};const O_=[31,28,31,30,31,30,31,31,30,31,30,31],N_=[31,29,31,30,31,30,31,31,30,31,30,31];let D_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",90),Xe(this,"subPriority",1),Xe(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"d":return mn(Ln.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return kn(e.length,t)}}validate(t,e){const r=t.getFullYear(),m=Wv(r),g=t.getMonth();return m?e>=1&&e<=N_[g]:e>=1&&e<=O_[g]}set(t,e,r){return t.setDate(r),t.setHours(0,0,0,0),t}},F_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",90),Xe(this,"subpriority",1),Xe(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 mn(Ln.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return kn(e.length,t)}}validate(t,e){const r=t.getFullYear();return Wv(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 Vh(n,t,e){var r,m,g,y;const x=Fs(),h=(e==null?void 0:e.weekStartsOn)??((m=(r=e==null?void 0:e.locale)==null?void 0:r.options)==null?void 0:m.weekStartsOn)??x.weekStartsOn??((y=(g=x.locale)==null?void 0:g.options)==null?void 0:y.weekStartsOn)??0,d=hn(n,e==null?void 0:e.in),s=d.getDay(),a=(t%7+7)%7,u=7-h,l=t<0||t>6?t-(s+u)%7:(a+u)%7-(s+u)%7;return Hh(d,l,e)}let P_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",90),Xe(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,m){return t=Vh(t,r,m),t.setHours(0,0,0,0),t}},W_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",90),Xe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,e,r,m){const g=y=>{const x=Math.floor((y-1)/7)*7;return(y+m.weekStartsOn+6)%7+x};switch(e){case"e":case"ee":return En(kn(e.length,t),g);case"eo":return En(r.ordinalNumber(t,{unit:"day"}),g);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,m){return t=Vh(t,r,m),t.setHours(0,0,0,0),t}},B_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",90),Xe(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,e,r,m){const g=y=>{const x=Math.floor((y-1)/7)*7;return(y+m.weekStartsOn+6)%7+x};switch(e){case"c":case"cc":return En(kn(e.length,t),g);case"co":return En(r.ordinalNumber(t,{unit:"day"}),g);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,m){return t=Vh(t,r,m),t.setHours(0,0,0,0),t}};function z_(n,t,e){const r=hn(n,void 0),m=f_(r),g=t-m;return Hh(r,g,e)}let j_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",90),Xe(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,e,r){const m=g=>g===0?7:g;switch(e){case"i":case"ii":return kn(e.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return En(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),m);case"iiiii":return En(r.day(t,{width:"narrow",context:"formatting"}),m);case"iiiiii":return En(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),m);case"iiii":default:return En(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"}),m)}}validate(t,e){return e>=1&&e<=7}set(t,e,r){return t=z_(t,r),t.setHours(0,0,0,0),t}},H_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",80),Xe(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(Uh(r),0,0,0),t}},U_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",80),Xe(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(Uh(r),0,0,0),t}},V_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",80),Xe(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(Uh(r),0,0,0),t}},G_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",70),Xe(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,e,r){switch(e){case"h":return mn(Ln.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return kn(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(t,e,r){const m=t.getHours()>=12;return m&&r<12?t.setHours(r+12,0,0,0):!m&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}};class K_ extends Ht{constructor(){super(...arguments),Xe(this,"priority",70),Xe(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,e,r){switch(e){case"H":return mn(Ln.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return kn(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,r){return t.setHours(r,0,0,0),t}}let q_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",70),Xe(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,e,r){switch(e){case"K":return mn(Ln.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return kn(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}},Y_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",70),Xe(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,e,r){switch(e){case"k":return mn(Ln.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return kn(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,r){const m=r<=24?r%24:r;return t.setHours(m,0,0,0),t}},X_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",60),Xe(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"m":return mn(Ln.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return kn(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setMinutes(r,0,0),t}},Q_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",50),Xe(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"s":return mn(Ln.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return kn(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setSeconds(r,0),t}},Z_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",30),Xe(this,"incompatibleTokens",["t","T"])}parse(t,e){const r=m=>Math.trunc(m*Math.pow(10,-e.length+3));return En(kn(e.length,t),r)}set(t,e,r){return t.setMilliseconds(r),t}},J_=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",10),Xe(this,"incompatibleTokens",["t","T","x"])}parse(t,e){switch(e){case"X":return Gi(Vi.basicOptionalMinutes,t);case"XX":return Gi(Vi.basic,t);case"XXXX":return Gi(Vi.basicOptionalSeconds,t);case"XXXXX":return Gi(Vi.extendedOptionalSeconds,t);case"XXX":default:return Gi(Vi.extended,t)}}set(t,e,r){return e.timestampIsSet?t:Wn(t,t.getTime()-gl(t)-r)}},e$=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",10),Xe(this,"incompatibleTokens",["t","T","X"])}parse(t,e){switch(e){case"x":return Gi(Vi.basicOptionalMinutes,t);case"xx":return Gi(Vi.basic,t);case"xxxx":return Gi(Vi.basicOptionalSeconds,t);case"xxxxx":return Gi(Vi.extendedOptionalSeconds,t);case"xxx":default:return Gi(Vi.extended,t)}}set(t,e,r){return e.timestampIsSet?t:Wn(t,t.getTime()-gl(t)-r)}},t$=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",40),Xe(this,"incompatibleTokens","*")}parse(t){return Dv(t)}set(t,e,r){return[Wn(t,r*1e3),{timestampIsSet:!0}]}},n$=class extends Ht{constructor(){super(...arguments),Xe(this,"priority",20),Xe(this,"incompatibleTokens","*")}parse(t){return Dv(t)}set(t,e,r){return[Wn(t,r),{timestampIsSet:!0}]}};const r$={G:new x_,y:new C_,Y:new k_,R:new S_,u:new A_,Q:new __,q:new $_,M:new M_,L:new T_,w:new L_,I:new R_,d:new D_,D:new F_,E:new P_,e:new W_,c:new B_,i:new j_,a:new H_,b:new U_,B:new V_,h:new G_,H:new K_,K:new q_,k:new Y_,m:new X_,s:new Q_,S:new Z_,X:new J_,x:new e$,t:new t$,T:new n$},i$=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,o$=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,s$=/^'([^]*?)'?$/,a$=/''/g,l$=/\S/,c$=/[a-zA-Z]/;function u$(n,t,e,r){var m,g,y,x;const h=()=>Wn(e,NaN),d=mv(),s=d.locale??_p,a=d.firstWeekContainsDate??((g=(m=d.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??1,u=d.weekStartsOn??((x=(y=d.locale)==null?void 0:y.options)==null?void 0:x.weekStartsOn)??0;if(!t)return n?h():hn(e,void 0);const l={firstWeekContainsDate:a,weekStartsOn:u,locale:s},o=[new b_(void 0,e)],c=t.match(o$).map(M=>{const k=M[0];if(k in nu){const C=nu[k];return C(M,s.formatLong)}return M}).join("").match(i$),p=[];for(let M of c){Np(M)&&ru(M,t,n),Op(M)&&ru(M,t,n);const k=M[0],C=r$[k];if(C){const{incompatibleTokens:R}=C;if(Array.isArray(R)){const E=p.find(I=>R.includes(I.token)||I.token===k);if(E)throw new RangeError(`The format string mustn't contain \`${E.fullToken}\` and \`${M}\` at the same time`)}else if(C.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${M}\` and any other token at the same time`);p.push({token:k,fullToken:M});const O=C.run(n,M,s.match,l);if(!O)return h();o.push(O.setter),n=O.rest}else{if(k.match(c$))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");if(M==="''"?M="'":k==="'"&&(M=h$(M)),n.indexOf(M)===0)n=n.slice(M.length);else return h()}}if(n.length>0&&l$.test(n))return h();const w=o.map(M=>M.priority).sort((M,k)=>k-M).filter((M,k,C)=>C.indexOf(M)===k).map(M=>o.filter(k=>k.priority===M).sort((k,C)=>C.subPriority-k.subPriority)).map(M=>M[0]);let b=hn(e,void 0);if(isNaN(+b))return h();const L={};for(const M of w){if(!M.validate(b,l))return h();const k=M.set(b,L,l);Array.isArray(k)?(b=k[0],Object.assign(L,k[1])):b=k}return b}function h$(n){return n.match(s$)[1].replace(a$,"'")}function Bv(n,t){return function(){return n.apply(t,arguments)}}const{toString:d$}=Object.prototype,{getPrototypeOf:Gh}=Object,{iterator:tc,toStringTag:zv}=Symbol,nc=(n=>t=>{const e=d$.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ii=n=>(n=n.toLowerCase(),t=>nc(t)===n),rc=n=>t=>typeof t===n,{isArray:ea}=Array,Wa=rc("undefined");function Ba(n){return n!==null&&!Wa(n)&&n.constructor!==null&&!Wa(n.constructor)&&Wr(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const jv=Ii("ArrayBuffer");function p$(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&jv(n.buffer),t}const g$=rc("string"),Wr=rc("function"),Hv=rc("number"),za=n=>n!==null&&typeof n=="object",f$=n=>n===!0||n===!1,ic=n=>{if(nc(n)!=="object")return!1;const t=Gh(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(zv in n)&&!(tc in n)},m$=n=>{if(!za(n)||Ba(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},v$=Ii("Date"),y$=Ii("File"),w$=Ii("Blob"),b$=Ii("FileList"),x$=n=>za(n)&&Wr(n.pipe),C$=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Wr(n.append)&&((t=nc(n))==="formdata"||t==="object"&&Wr(n.toString)&&n.toString()==="[object FormData]"))},k$=Ii("URLSearchParams"),[S$,A$,_$,$$]=["ReadableStream","Request","Response","Headers"].map(Ii),M$=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ja(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,m;if(typeof n!="object"&&(n=[n]),ea(n))for(r=0,m=n.length;r<m;r++)t.call(null,n[r],r,n);else{if(Ba(n))return;const g=e?Object.getOwnPropertyNames(n):Object.keys(n),y=g.length;let x;for(r=0;r<y;r++)x=g[r],t.call(null,n[x],x,n)}}function Uv(n,t){if(Ba(n))return null;t=t.toLowerCase();const e=Object.keys(n);let r=e.length,m;for(;r-- >0;)if(m=e[r],t===m.toLowerCase())return m;return null}const gs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Vv=n=>!Wa(n)&&n!==gs;function Kh(){const{caseless:n}=Vv(this)&&this||{},t={},e=(r,m)=>{const g=n&&Uv(t,m)||m;ic(t[g])&&ic(r)?t[g]=Kh(t[g],r):ic(r)?t[g]=Kh({},r):ea(r)?t[g]=r.slice():t[g]=r};for(let r=0,m=arguments.length;r<m;r++)arguments[r]&&ja(arguments[r],e);return t}const T$=(n,t,e,{allOwnKeys:r}={})=>(ja(t,(m,g)=>{e&&Wr(m)?n[g]=Bv(m,e):n[g]=m},{allOwnKeys:r}),n),I$=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),L$=(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)},E$=(n,t,e,r)=>{let m,g,y;const x={};if(t=t||{},n==null)return t;do{for(m=Object.getOwnPropertyNames(n),g=m.length;g-- >0;)y=m[g],(!r||r(y,n,t))&&!x[y]&&(t[y]=n[y],x[y]=!0);n=e!==!1&&Gh(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},R$=(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},O$=n=>{if(!n)return null;if(ea(n))return n;let t=n.length;if(!Hv(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},N$=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Gh(Uint8Array)),D$=(n,t)=>{const e=(n&&n[tc]).call(n);let r;for(;(r=e.next())&&!r.done;){const m=r.value;t.call(n,m[0],m[1])}},F$=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},P$=Ii("HTMLFormElement"),W$=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),Gv=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),B$=Ii("RegExp"),Kv=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};ja(e,(m,g)=>{let y;(y=t(m,g,n))!==!1&&(r[g]=y||m)}),Object.defineProperties(n,r)},z$=n=>{Kv(n,(t,e)=>{if(Wr(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(Wr(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+"'")})}})},j$=(n,t)=>{const e={},r=m=>{m.forEach(g=>{e[g]=!0})};return ea(n)?r(n):r(String(n).split(t)),e},H$=()=>{},U$=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function V$(n){return!!(n&&Wr(n.append)&&n[zv]==="FormData"&&n[tc])}const G$=n=>{const t=new Array(10),e=(r,m)=>{if(za(r)){if(t.indexOf(r)>=0)return;if(Ba(r))return r;if(!("toJSON"in r)){t[m]=r;const g=ea(r)?[]:{};return ja(r,(y,x)=>{const h=e(y,m+1);!Wa(h)&&(g[x]=h)}),t[m]=void 0,g}}return r};return e(n,0)},K$=Ii("AsyncFunction"),q$=n=>n&&(za(n)||Wr(n))&&Wr(n.then)&&Wr(n.catch),qv=((n,t)=>n?setImmediate:t?((e,r)=>(gs.addEventListener("message",({source:m,data:g})=>{m===gs&&g===e&&r.length&&r.shift()()},!1),m=>{r.push(m),gs.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Wr(gs.postMessage)),Y$=typeof queueMicrotask<"u"?queueMicrotask.bind(gs):typeof process<"u"&&process.nextTick||qv,X$=n=>n!=null&&Wr(n[tc]),Se={isArray:ea,isArrayBuffer:jv,isBuffer:Ba,isFormData:C$,isArrayBufferView:p$,isString:g$,isNumber:Hv,isBoolean:f$,isObject:za,isPlainObject:ic,isEmptyObject:m$,isReadableStream:S$,isRequest:A$,isResponse:_$,isHeaders:$$,isUndefined:Wa,isDate:v$,isFile:y$,isBlob:w$,isRegExp:B$,isFunction:Wr,isStream:x$,isURLSearchParams:k$,isTypedArray:N$,isFileList:b$,forEach:ja,merge:Kh,extend:T$,trim:M$,stripBOM:I$,inherits:L$,toFlatObject:E$,kindOf:nc,kindOfTest:Ii,endsWith:R$,toArray:O$,forEachEntry:D$,matchAll:F$,isHTMLForm:P$,hasOwnProperty:Gv,hasOwnProp:Gv,reduceDescriptors:Kv,freezeMethods:z$,toObjectSet:j$,toCamelCase:W$,noop:H$,toFiniteNumber:U$,findKey:Uv,global:gs,isContextDefined:Vv,isSpecCompliantForm:V$,toJSONObject:G$,isAsyncFn:K$,isThenable:q$,setImmediate:qv,asap:Y$,isIterable:X$};function wt(n,t,e,r,m){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),m&&(this.response=m,this.status=m.status?m.status:null)}Se.inherits(wt,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 Yv=wt.prototype,Xv={};["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=>{Xv[n]={value:n}}),Object.defineProperties(wt,Xv),Object.defineProperty(Yv,"isAxiosError",{value:!0}),wt.from=(n,t,e,r,m,g)=>{const y=Object.create(Yv);return Se.toFlatObject(n,y,function(x){return x!==Error.prototype},x=>x!=="isAxiosError"),wt.call(y,n.message,t,e,r,m),y.cause=n,y.name=n.name,g&&Object.assign(y,g),y};const Q$=null;function qh(n){return Se.isPlainObject(n)||Se.isArray(n)}function Qv(n){return Se.endsWith(n,"[]")?n.slice(0,-2):n}function Zv(n,t,e){return n?n.concat(t).map(function(r,m){return r=Qv(r),!e&&m?"["+r+"]":r}).join(e?".":""):t}function Z$(n){return Se.isArray(n)&&!n.some(qh)}const J$=Se.toFlatObject(Se,{},null,function(n){return/^is[A-Z]/.test(n)});function oc(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(l,o){return!Se.isUndefined(o[l])});const r=e.metaTokens,m=e.visitor||d,g=e.dots,y=e.indexes,x=(e.Blob||typeof Blob<"u"&&Blob)&&Se.isSpecCompliantForm(t);if(!Se.isFunction(m))throw new TypeError("visitor must be a function");function h(l){if(l===null)return"";if(Se.isDate(l))return l.toISOString();if(Se.isBoolean(l))return l.toString();if(!x&&Se.isBlob(l))throw new wt("Blob is not supported. Use a Buffer instead.");return Se.isArrayBuffer(l)||Se.isTypedArray(l)?x&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function d(l,o,c){let p=l;if(l&&!c&&typeof l=="object"){if(Se.endsWith(o,"{}"))o=r?o:o.slice(0,-2),l=JSON.stringify(l);else if(Se.isArray(l)&&Z$(l)||(Se.isFileList(l)||Se.endsWith(o,"[]"))&&(p=Se.toArray(l)))return o=Qv(o),p.forEach(function(w,b){!(Se.isUndefined(w)||w===null)&&t.append(y===!0?Zv([o],b,g):y===null?o:o+"[]",h(w))}),!1}return qh(l)?!0:(t.append(Zv(c,o,g),h(l)),!1)}const s=[],a=Object.assign(J$,{defaultVisitor:d,convertValue:h,isVisitable:qh});function u(l,o){if(!Se.isUndefined(l)){if(s.indexOf(l)!==-1)throw Error("Circular reference detected in "+o.join("."));s.push(l),Se.forEach(l,function(c,p){(!(Se.isUndefined(c)||c===null)&&m.call(t,c,Se.isString(p)?p.trim():p,o,a))===!0&&u(c,o?o.concat(p):[p])}),s.pop()}}if(!Se.isObject(n))throw new TypeError("data must be an object");return u(n),t}function Jv(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Yh(n,t){this._pairs=[],n&&oc(n,this,t)}const ey=Yh.prototype;ey.append=function(n,t){this._pairs.push([n,t])},ey.toString=function(n){const t=n?function(e){return n.call(this,e,Jv)}:Jv;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function eM(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ty(n,t,e){if(!t)return n;const r=e&&e.encode||eM;Se.isFunction(e)&&(e={serialize:e});const m=e&&e.serialize;let g;if(m?g=m(t,e):g=Se.isURLSearchParams(t)?t.toString():new Yh(t,e).toString(r),g){const y=n.indexOf("#");y!==-1&&(n=n.slice(0,y)),n+=(n.indexOf("?")===-1?"?":"&")+g}return n}class ny{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 ry={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},tM=typeof URLSearchParams<"u"?URLSearchParams:Yh,nM=typeof FormData<"u"?FormData:null,rM=typeof Blob<"u"?Blob:null,iM={isBrowser:!0,classes:{URLSearchParams:tM,FormData:nM,Blob:rM},protocols:["http","https","file","blob","url","data"]},Xh=typeof window<"u"&&typeof document<"u",Qh=typeof navigator=="object"&&navigator||void 0,oM=Xh&&(!Qh||["ReactNative","NativeScript","NS"].indexOf(Qh.product)<0),sM=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",aM=Xh&&window.location.href||"http://localhost",lM=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xh,hasStandardBrowserEnv:oM,hasStandardBrowserWebWorkerEnv:sM,navigator:Qh,origin:aM},Symbol.toStringTag,{value:"Module"})),fr={...lM,...iM};function cM(n,t){return oc(n,new fr.classes.URLSearchParams,{visitor:function(e,r,m,g){return fr.isNode&&Se.isBuffer(e)?(this.append(r,e.toString("base64")),!1):g.defaultVisitor.apply(this,arguments)},...t})}function uM(n){return Se.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function hM(n){const t={},e=Object.keys(n);let r;const m=e.length;let g;for(r=0;r<m;r++)g=e[r],t[g]=n[g];return t}function iy(n){function t(e,r,m,g){let y=e[g++];if(y==="__proto__")return!0;const x=Number.isFinite(+y),h=g>=e.length;return y=!y&&Se.isArray(m)?m.length:y,h?(Se.hasOwnProp(m,y)?m[y]=[m[y],r]:m[y]=r,!x):((!m[y]||!Se.isObject(m[y]))&&(m[y]=[]),t(e,r,m[y],g)&&Se.isArray(m[y])&&(m[y]=hM(m[y])),!x)}if(Se.isFormData(n)&&Se.isFunction(n.entries)){const e={};return Se.forEachEntry(n,(r,m)=>{t(uM(r),m,e,0)}),e}return null}function dM(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 Ha={transitional:ry,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,m=Se.isObject(n);if(m&&Se.isHTMLForm(n)&&(n=new FormData(n)),Se.isFormData(n))return r?JSON.stringify(iy(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 g;if(m){if(e.indexOf("application/x-www-form-urlencoded")>-1)return cM(n,this.formSerializer).toString();if((g=Se.isFileList(n))||e.indexOf("multipart/form-data")>-1){const y=this.env&&this.env.FormData;return oc(g?{"files[]":n}:n,y&&new y,this.formSerializer)}}return m||r?(t.setContentType("application/json",!1),dM(n)):n}],transformResponse:[function(n){const t=this.transitional||Ha.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 m=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(g){if(m)throw g.name==="SyntaxError"?wt.from(g,wt.ERR_BAD_RESPONSE,this,null,this.response):g}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fr.classes.FormData,Blob:fr.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=>{Ha.headers[n]={}});const pM=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"]),gM=n=>{const t={};let e,r,m;return n&&n.split(`
|
1491
|
+
`).forEach(function(g){m=g.indexOf(":"),e=g.substring(0,m).trim().toLowerCase(),r=g.substring(m+1).trim(),!(!e||t[e]&&pM[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},oy=Symbol("internals");function Ua(n){return n&&String(n).trim().toLowerCase()}function sc(n){return n===!1||n==null?n:Se.isArray(n)?n.map(sc):String(n)}function fM(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 mM=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Zh(n,t,e,r,m){if(Se.isFunction(r))return r.call(this,t,e);if(m&&(t=e),!!Se.isString(t)){if(Se.isString(r))return t.indexOf(r)!==-1;if(Se.isRegExp(r))return r.test(t)}}function vM(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function yM(n,t){const e=Se.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{value:function(m,g,y){return this[r].call(this,t,m,g,y)},configurable:!0})})}let Br=class{constructor(n){n&&this.set(n)}set(n,t,e){const r=this;function m(y,x,h){const d=Ua(x);if(!d)throw new Error("header name must be a non-empty string");const s=Se.findKey(r,d);(!s||r[s]===void 0||h===!0||h===void 0&&r[s]!==!1)&&(r[s||x]=sc(y))}const g=(y,x)=>Se.forEach(y,(h,d)=>m(h,d,x));if(Se.isPlainObject(n)||n instanceof this.constructor)g(n,t);else if(Se.isString(n)&&(n=n.trim())&&!mM(n))g(gM(n),t);else if(Se.isObject(n)&&Se.isIterable(n)){let y={},x,h;for(const d of n){if(!Se.isArray(d))throw TypeError("Object iterator must return a key-value pair");y[h=d[0]]=(x=y[h])?Se.isArray(x)?[...x,d[1]]:[x,d[1]]:d[1]}g(y,t)}else n!=null&&m(t,n,e);return this}get(n,t){if(n=Ua(n),n){const e=Se.findKey(this,n);if(e){const r=this[e];if(!t)return r;if(t===!0)return fM(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=Ua(n),n){const e=Se.findKey(this,n);return!!(e&&this[e]!==void 0&&(!t||Zh(this,this[e],e,t)))}return!1}delete(n,t){const e=this;let r=!1;function m(g){if(g=Ua(g),g){const y=Se.findKey(e,g);y&&(!t||Zh(e,e[y],y,t))&&(delete e[y],r=!0)}}return Se.isArray(n)?n.forEach(m):m(n),r}clear(n){const t=Object.keys(this);let e=t.length,r=!1;for(;e--;){const m=t[e];(!n||Zh(this,this[m],m,n,!0))&&(delete this[m],r=!0)}return r}normalize(n){const t=this,e={};return Se.forEach(this,(r,m)=>{const g=Se.findKey(e,m);if(g){t[g]=sc(r),delete t[m];return}const y=n?vM(m):String(m).trim();y!==m&&delete t[m],t[y]=sc(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(`
|
1492
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...t){const e=new this(n);return t.forEach(r=>e.set(r)),e}static accessor(n){const t=(this[oy]=this[oy]={accessors:{}}).accessors,e=this.prototype;function r(m){const g=Ua(m);t[g]||(yM(e,m),t[g]=!0)}return Se.isArray(n)?n.forEach(r):r(n),this}};Br.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Se.reduceDescriptors(Br.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),Se.freezeMethods(Br);function Jh(n,t){const e=this||Ha,r=t||e,m=Br.from(r.headers);let g=r.data;return Se.forEach(n,function(y){g=y.call(e,g,m.normalize(),t?t.status:void 0)}),m.normalize(),g}function sy(n){return!!(n&&n.__CANCEL__)}function ta(n,t,e){wt.call(this,n??"canceled",wt.ERR_CANCELED,t,e),this.name="CanceledError"}Se.inherits(ta,wt,{__CANCEL__:!0});function ay(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new wt("Request failed with status code "+e.status,[wt.ERR_BAD_REQUEST,wt.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function wM(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function bM(n,t){n=n||10;const e=new Array(n),r=new Array(n);let m=0,g=0,y;return t=t!==void 0?t:1e3,function(x){const h=Date.now(),d=r[g];y||(y=h),e[m]=x,r[m]=h;let s=g,a=0;for(;s!==m;)a+=e[s++],s=s%n;if(m=(m+1)%n,m===g&&(g=(g+1)%n),h-y<t)return;const u=d&&h-d;return u?Math.round(a*1e3/u):void 0}}function xM(n,t){let e=0,r=1e3/t,m,g;const y=(x,h=Date.now())=>{e=h,m=null,g&&(clearTimeout(g),g=null),n(...x)};return[(...x)=>{const h=Date.now(),d=h-e;d>=r?y(x,h):(m=x,g||(g=setTimeout(()=>{g=null,y(m)},r-d)))},()=>m&&y(m)]}const ac=(n,t,e=3)=>{let r=0;const m=bM(50,250);return xM(g=>{const y=g.loaded,x=g.lengthComputable?g.total:void 0,h=y-r,d=m(h),s=y<=x;r=y;const a={loaded:y,total:x,progress:x?y/x:void 0,bytes:h,rate:d||void 0,estimated:d&&x&&s?(x-y)/d:void 0,event:g,lengthComputable:x!=null,[t?"download":"upload"]:!0};n(a)},e)},ly=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},cy=n=>(...t)=>Se.asap(()=>n(...t)),CM=fr.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,fr.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(fr.origin),fr.navigator&&/(msie|trident)/i.test(fr.navigator.userAgent)):()=>!0,kM=fr.hasStandardBrowserEnv?{write(n,t,e,r,m,g){const y=[n+"="+encodeURIComponent(t)];Se.isNumber(e)&&y.push("expires="+new Date(e).toGMTString()),Se.isString(r)&&y.push("path="+r),Se.isString(m)&&y.push("domain="+m),g===!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 SM(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function AM(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function uy(n,t,e){let r=!SM(t);return n&&(r||e==!1)?AM(n,t):t}const hy=n=>n instanceof Br?{...n}:n;function fs(n,t){t=t||{};const e={};function r(d,s,a,u){return Se.isPlainObject(d)&&Se.isPlainObject(s)?Se.merge.call({caseless:u},d,s):Se.isPlainObject(s)?Se.merge({},s):Se.isArray(s)?s.slice():s}function m(d,s,a,u){if(Se.isUndefined(s)){if(!Se.isUndefined(d))return r(void 0,d,a,u)}else return r(d,s,a,u)}function g(d,s){if(!Se.isUndefined(s))return r(void 0,s)}function y(d,s){if(Se.isUndefined(s)){if(!Se.isUndefined(d))return r(void 0,d)}else return r(void 0,s)}function x(d,s,a){if(a in t)return r(d,s);if(a in n)return r(void 0,d)}const h={url:g,method:g,data:g,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:(d,s,a)=>m(hy(d),hy(s),a,!0)};return Se.forEach(Object.keys({...n,...t}),function(d){const s=h[d]||m,a=s(n[d],t[d],d);Se.isUndefined(a)&&s!==x||(e[d]=a)}),e}const dy=n=>{const t=fs({},n);let{data:e,withXSRFToken:r,xsrfHeaderName:m,xsrfCookieName:g,headers:y,auth:x}=t;t.headers=y=Br.from(y),t.url=ty(uy(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(fr.hasStandardBrowserEnv||fr.hasStandardBrowserWebWorkerEnv)y.setContentType(void 0);else if((h=y.getContentType())!==!1){const[d,...s]=h?h.split(";").map(a=>a.trim()).filter(Boolean):[];y.setContentType([d||"multipart/form-data",...s].join("; "))}}if(fr.hasStandardBrowserEnv&&(r&&Se.isFunction(r)&&(r=r(t)),r||r!==!1&&CM(t.url))){const d=m&&g&&kM.read(g);d&&y.set(m,d)}return t},_M=typeof XMLHttpRequest<"u",$M=_M&&function(n){return new Promise(function(t,e){const r=dy(n);let m=r.data;const g=Br.from(r.headers).normalize();let{responseType:y,onUploadProgress:x,onDownloadProgress:h}=r,d,s,a,u,l;function o(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let c=new XMLHttpRequest;c.open(r.method.toUpperCase(),r.url,!0),c.timeout=r.timeout;function p(){if(!c)return;const b=Br.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),L={data:!y||y==="text"||y==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:b,config:n,request:c};ay(function(M){t(M),o()},function(M){e(M),o()},L),c=null}"onloadend"in c?c.onloadend=p:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(p)},c.onabort=function(){c&&(e(new wt("Request aborted",wt.ECONNABORTED,n,c)),c=null)},c.onerror=function(){e(new wt("Network Error",wt.ERR_NETWORK,n,c)),c=null},c.ontimeout=function(){let b=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const L=r.transitional||ry;r.timeoutErrorMessage&&(b=r.timeoutErrorMessage),e(new wt(b,L.clarifyTimeoutError?wt.ETIMEDOUT:wt.ECONNABORTED,n,c)),c=null},m===void 0&&g.setContentType(null),"setRequestHeader"in c&&Se.forEach(g.toJSON(),function(b,L){c.setRequestHeader(L,b)}),Se.isUndefined(r.withCredentials)||(c.withCredentials=!!r.withCredentials),y&&y!=="json"&&(c.responseType=r.responseType),h&&([a,l]=ac(h,!0),c.addEventListener("progress",a)),x&&c.upload&&([s,u]=ac(x),c.upload.addEventListener("progress",s),c.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(d=b=>{c&&(e(!b||b.type?new ta(null,n,c):b),c.abort(),c=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const w=wM(r.url);if(w&&fr.protocols.indexOf(w)===-1){e(new wt("Unsupported protocol "+w+":",wt.ERR_BAD_REQUEST,n));return}c.send(m||null)})},MM=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let r=new AbortController,m;const g=function(d){if(!m){m=!0,x();const s=d instanceof Error?d:this.reason;r.abort(s instanceof wt?s:new ta(s instanceof Error?s.message:s))}};let y=t&&setTimeout(()=>{y=null,g(new wt(`timeout ${t} of ms exceeded`,wt.ETIMEDOUT))},t);const x=()=>{n&&(y&&clearTimeout(y),y=null,n.forEach(d=>{d.unsubscribe?d.unsubscribe(g):d.removeEventListener("abort",g)}),n=null)};n.forEach(d=>d.addEventListener("abort",g));const{signal:h}=r;return h.unsubscribe=()=>Se.asap(x),h}},TM=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let r=0,m;for(;r<e;)m=r+t,yield n.slice(r,m),r=m},IM=async function*(n,t){for await(const e of LM(n))yield*TM(e,t)},LM=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()}},py=(n,t,e,r)=>{const m=IM(n,t);let g=0,y,x=h=>{y||(y=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:d,value:s}=await m.next();if(d){x(),h.close();return}let a=s.byteLength;if(e){let u=g+=a;e(u)}h.enqueue(new Uint8Array(s))}catch(d){throw x(d),d}},cancel(h){return x(h),m.return()}},{highWaterMark:2})},lc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",gy=lc&&typeof ReadableStream=="function",EM=lc&&(typeof TextEncoder=="function"?(n=>t=>n.encode(t))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),fy=(n,...t)=>{try{return!!n(...t)}catch{return!1}},RM=gy&&fy(()=>{let n=!1;const t=new Request(fr.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!t}),my=64*1024,ed=gy&&fy(()=>Se.isReadableStream(new Response("").body)),cc={stream:ed&&(n=>n.body)};lc&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!cc[t]&&(cc[t]=Se.isFunction(n[t])?e=>e[t]():(e,r)=>{throw new wt(`Response type '${t}' is not supported`,wt.ERR_NOT_SUPPORT,r)})})})(new Response);const OM=async n=>{if(n==null)return 0;if(Se.isBlob(n))return n.size;if(Se.isSpecCompliantForm(n))return(await new Request(fr.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 EM(n)).byteLength},NM=async(n,t)=>Se.toFiniteNumber(n.getContentLength())??OM(t),DM=lc&&(async n=>{let{url:t,method:e,data:r,signal:m,cancelToken:g,timeout:y,onDownloadProgress:x,onUploadProgress:h,responseType:d,headers:s,withCredentials:a="same-origin",fetchOptions:u}=dy(n);d=d?(d+"").toLowerCase():"text";let l=MM([m,g&&g.toAbortSignal()],y),o;const c=l&&l.unsubscribe&&(()=>{l.unsubscribe()});let p;try{if(h&&RM&&e!=="get"&&e!=="head"&&(p=await NM(s,r))!==0){let k=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(Se.isFormData(r)&&(C=k.headers.get("content-type"))&&s.setContentType(C),k.body){const[R,O]=ly(p,ac(cy(h)));r=py(k.body,my,R,O)}}Se.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;o=new Request(t,{...u,signal:l,method:e.toUpperCase(),headers:s.normalize().toJSON(),body:r,duplex:"half",credentials:w?a:void 0});let b=await fetch(o,u);const L=ed&&(d==="stream"||d==="response");if(ed&&(x||L&&c)){const k={};["status","statusText","headers"].forEach(E=>{k[E]=b[E]});const C=Se.toFiniteNumber(b.headers.get("content-length")),[R,O]=x&&ly(C,ac(cy(x),!0))||[];b=new Response(py(b.body,my,R,()=>{O&&O(),c&&c()}),k)}d=d||"text";let M=await cc[Se.findKey(cc,d)||"text"](b,n);return!L&&c&&c(),await new Promise((k,C)=>{ay(k,C,{data:M,headers:Br.from(b.headers),status:b.status,statusText:b.statusText,config:n,request:o})})}catch(w){throw c&&c(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new wt("Network Error",wt.ERR_NETWORK,n,o),{cause:w.cause||w}):wt.from(w,w&&w.code,n,o)}}),td={http:Q$,xhr:$M,fetch:DM};Se.forEach(td,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const vy=n=>`- ${n}`,FM=n=>Se.isFunction(n)||n===null||n===!1,yy={getAdapter:n=>{n=Se.isArray(n)?n:[n];const{length:t}=n;let e,r;const m={};for(let g=0;g<t;g++){e=n[g];let y;if(r=e,!FM(e)&&(r=td[(y=String(e)).toLowerCase()],r===void 0))throw new wt(`Unknown adapter '${y}'`);if(r)break;m[y||"#"+g]=r}if(!r){const g=Object.entries(m).map(([x,h])=>`adapter ${x} `+(h===!1?"is not supported by the environment":"is not available in the build"));let y=t?g.length>1?`since :
|
1493
|
+
`+g.map(vy).join(`
|
1494
|
+
`):" "+vy(g[0]):"as no adapter specified";throw new wt("There is no suitable adapter to dispatch the request "+y,"ERR_NOT_SUPPORT")}return r},adapters:td};function nd(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new ta(null,n)}function wy(n){return nd(n),n.headers=Br.from(n.headers),n.data=Jh.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),yy.getAdapter(n.adapter||Ha.adapter)(n).then(function(t){return nd(n),t.data=Jh.call(n,n.transformResponse,t),t.headers=Br.from(t.headers),t},function(t){return sy(t)||(nd(n),t&&t.response&&(t.response.data=Jh.call(n,n.transformResponse,t.response),t.response.headers=Br.from(t.response.headers))),Promise.reject(t)})}const by="1.11.0",uc={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{uc[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const xy={};uc.transitional=function(n,t,e){function r(m,g){return"[Axios v"+by+"] Transitional option '"+m+"'"+g+(e?". "+e:"")}return(m,g,y)=>{if(n===!1)throw new wt(r(g," has been removed"+(t?" in "+t:"")),wt.ERR_DEPRECATED);return t&&!xy[g]&&(xy[g]=!0,console.warn(r(g," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(m,g,y):!0}},uc.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function PM(n,t,e){if(typeof n!="object")throw new wt("options must be an object",wt.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let m=r.length;for(;m-- >0;){const g=r[m],y=t[g];if(y){const x=n[g],h=x===void 0||y(x,g,n);if(h!==!0)throw new wt("option "+g+" must be "+h,wt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new wt("Unknown option "+g,wt.ERR_BAD_OPTION)}}const hc={assertOptions:PM,validators:uc},Ki=hc.validators;let ms=class{constructor(n){this.defaults=n||{},this.interceptors={request:new ny,response:new ny}}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 m=r.stack?r.stack.replace(/^.+\n/,""):"";try{e.stack?m&&!String(e.stack).endsWith(m.replace(/^.+\n.+\n/,""))&&(e.stack+=`
|
1495
|
+
`+m):e.stack=m}catch{}}throw e}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=fs(this.defaults,t);const{transitional:e,paramsSerializer:r,headers:m}=t;e!==void 0&&hc.assertOptions(e,{silentJSONParsing:Ki.transitional(Ki.boolean),forcedJSONParsing:Ki.transitional(Ki.boolean),clarifyTimeoutError:Ki.transitional(Ki.boolean)},!1),r!=null&&(Se.isFunction(r)?t.paramsSerializer={serialize:r}:hc.assertOptions(r,{encode:Ki.function,serialize:Ki.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),hc.assertOptions(t,{baseUrl:Ki.spelling("baseURL"),withXsrfToken:Ki.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let g=m&&Se.merge(m.common,m[t.method]);m&&Se.forEach(["delete","get","head","post","put","patch","common"],l=>{delete m[l]}),t.headers=Br.concat(g,m);const y=[];let x=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(t)===!1||(x=x&&l.synchronous,y.unshift(l.fulfilled,l.rejected))});const h=[];this.interceptors.response.forEach(function(l){h.push(l.fulfilled,l.rejected)});let d,s=0,a;if(!x){const l=[wy.bind(this),void 0];for(l.unshift(...y),l.push(...h),a=l.length,d=Promise.resolve(t);s<a;)d=d.then(l[s++],l[s++]);return d}a=y.length;let u=t;for(s=0;s<a;){const l=y[s++],o=y[s++];try{u=l(u)}catch(c){o.call(this,c);break}}try{d=wy.call(this,u)}catch(l){return Promise.reject(l)}for(s=0,a=h.length;s<a;)d=d.then(h[s++],h[s++]);return d}getUri(n){n=fs(this.defaults,n);const t=uy(n.baseURL,n.url,n.allowAbsoluteUrls);return ty(t,n.params,n.paramsSerializer)}};Se.forEach(["delete","get","head","options"],function(n){ms.prototype[n]=function(t,e){return this.request(fs(e||{},{method:n,url:t,data:(e||{}).data}))}}),Se.forEach(["post","put","patch"],function(n){function t(e){return function(r,m,g){return this.request(fs(g||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:m}))}}ms.prototype[n]=t(),ms.prototype[n+"Form"]=t(!0)});let WM=class Cb{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(m){e=m});const r=this;this.promise.then(m=>{if(!r._listeners)return;let g=r._listeners.length;for(;g-- >0;)r._listeners[g](m);r._listeners=null}),this.promise.then=m=>{let g;const y=new Promise(x=>{r.subscribe(x),g=x}).then(m);return y.cancel=function(){r.unsubscribe(g)},y},t(function(m,g,y){r.reason||(r.reason=new ta(m,g,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 BM(n){return function(t){return n.apply(null,t)}}function zM(n){return Se.isObject(n)&&n.isAxiosError===!0}const rd={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(rd).forEach(([n,t])=>{rd[t]=n});function Cy(n){const t=new ms(n),e=Bv(ms.prototype.request,t);return Se.extend(e,ms.prototype,t,{allOwnKeys:!0}),Se.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Cy(fs(n,r))},e}const zn=dr("E",Cy(Ha));zn.Axios=ms,zn.CanceledError=ta,zn.CancelToken=WM,zn.isCancel=sy,zn.VERSION=by,zn.toFormData=oc,zn.AxiosError=wt,zn.Cancel=zn.CanceledError,zn.all=function(n){return Promise.all(n)},zn.spread=BM,zn.isAxiosError=zM,zn.mergeConfig=fs,zn.AxiosHeaders=Br,zn.formToJSON=n=>iy(Se.isHTMLForm(n)?new FormData(n):n),zn.getAdapter=yy.getAdapter,zn.HttpStatusCode=rd,zn.default=zn;const{Axios:hN,AxiosError:dN,CanceledError:pN,isCancel:gN,CancelToken:fN,VERSION:mN,all:vN,Cancel:yN,isAxiosError:wN,spread:bN,toFormData:xN,AxiosHeaders:CN,HttpStatusCode:kN,formToJSON:SN,getAdapter:AN,mergeConfig:_N}=zn,jM="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=",HM={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number}},computed:{icons:function(){return jM},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const n=XM.indexOf(dc[this.status]),t=1-(n-1)*.05,e=224*this.scaleFactor*t,r=32*this.scaleFactor*t,m=32*this.scaleFactor*t;return[`background-image: url(${this.icons});`,`background-position-x: -${n*m}px;`,`background-size: ${e}px ${r}px;`,`height: ${m}px;`,`width: ${m}px;`,`padding-top: ${n-1}px;`].join("")}}};function UM(n,t,e,r,m,g){return Cn(),Dr("div",{style:Ds(g.iconStyle)},null,4)}const VM=ts(HM,[["render",UM]]),GM={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function KM(n,t,e,r,m,g){const y=zt("rux-icon");return Cn(),ro(y,{size:e.size,icon:e.icon,style:Ds(g.colorStyle)},null,8,["size","icon","style"])}const qM=ts(GM,[["render",KM],["__scopeId","data-v-9af48e85"]]),dc={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"},Va={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},YM=function(n){const t="#000000",e="#ffffff",r=Va[dc[n]];if(r){const m=+`0x${r.slice(1,3)}`,g=+`0x${r.slice(3,5)}`,y=+`0x${r.slice(5,7)}`;if((m*299+g*587+y*114)/1e3>128)return t}return e},XM=Object.keys(Va),QM={astro:{component:n=>Ns(qM,{...n})},"astro-status":{component:n=>Ns(VM,{...n,status:n.icon})}},ZM={extras:{component:n=>Ns(Wb,{...n})}},JM={mixins:[d_],props:{historyCount:{type:Number,default:200},timeZone:{type:String,default:"local"}},data(){return{AstroStatusColors:Va,data:[],shownData:[],logLevels:["DEBUG","INFO","WARN","ERROR","FATAL"],logLevel:"INFO",search:"",headers:[{title:"Time",value:"timestamp",nowrap:!0},{title:"Level",value:"level"},{title:"Source",value:"microservice_name"},{title:"Message",value:"message"}],cable:new Gg,subscription:null,paused:!1}},computed:{buttonIcon:function(){return this.paused?"mdi-play":"mdi-pause"}},watch:{logLevel:function(n,t){this.createSubscription()}},created(){this.createSubscription()},unmounted(){this.subscription&&this.subscription.unsubscribe(),this.cable.disconnect()},methods:{pause:function(){this.paused=!this.paused},createSubscription(){this.subscription&&(this.subscription.unsubscribe(),this.data=[],this.shownData=this.data),this.cable.createSubscription("MessagesChannel",window.openc3Scope,{received:n=>{this.cable.recordPing(),n.length>this.historyCount&&n.splice(0,n.length-this.historyCount),n=n.filter(t=>{switch(this.logLevel){case"DEBUG":return!0;case"INFO":if(t.level!=="DEBUG")return!0;break;case"WARN":if(t.level!=="DEBUG"&&t.level!=="INFO")return!0;break;case"ERROR":if(t.level!=="DEBUG"&&t.level!=="INFO"&&t.level!=="WARN")return!0;break;case"FATAL":if(t.level!=="DEBUG"&&t.level!=="INFO"&&t.level!=="WARN"&&t.level!=="ERROR")return!0;break}return!1}),n.map(t=>{if(t.timestamp=this.formatTimestamp(t["@timestamp"],this.timeZone),t.message.raw&&t.message.json_class==="String"){let e="0x";for(let r=0;r<t.message.raw.length;r++){let m=t.message.raw[r].toString(16).toUpperCase();m.length<2&&(m="0"+m),e+=m}t.message=e}else t.message=t.message.replaceAll("\\n",`
|
1496
|
+
`)}),this.data=n.reverse().concat(this.data),this.data.length>this.historyCount&&(this.data.length=this.historyCount),this.paused||(this.shownData=this.data)}},{history_count:this.historyCount,types:["log","notification","alert"]}).then(n=>{this.subscription=n})},getColor(n){return Va[dc[n]]},getStatus(n){return dc[n]},downloadLog(){const n=this.shownData.map(r=>`${r.timestamp} | ${r.level} | ${r.microservice_name} | ${r.message}`).join(`
|
1497
|
+
`),t=new Blob([n],{type:"text/plain"}),e=document.createElement("a");e.href=URL.createObjectURL(t),e.setAttribute("download",Lo(Date.now(),"yyyy_MM_dd_HH_mm_ss")+"_message_log.txt"),e.click()},clearLog:function(){this.$dialog.confirm("Are you sure you want to clear the log?",{okText:"Clear",cancelText:"Cancel"}).then(n=>{this.data=[],this.shownData=[]}).catch(function(n){})}}},eT={class:"d-flex align-baseline"},tT=["title","datetime"],nT={style:{"white-space":"pre-wrap"}};function rT(n,t,e,r,m,g){const y=zt("v-btn"),x=zt("v-spacer"),h=zt("v-select"),d=zt("v-text-field"),s=zt("v-card-title"),a=zt("rux-status"),u=zt("v-data-table"),l=zt("v-card");return Cn(),ro(l,null,{default:fn(()=>[Dt(s,{class:"d-flex align-center justify-content-space-between"},{default:fn(()=>[Sr("div",eT,[Dt(y,{icon:"mdi-download",variant:"text",size:"small",class:"mr-2","data-test":"download-log",onClick:g.downloadLog},null,8,["onClick"]),t[2]||(t[2]=Sr("span",null," Log Messages ",-1)),Dt(y,{icon:g.buttonIcon,variant:"text","data-test":"pause",onClick:g.pause},null,8,["icon","onClick"])]),Dt(x),Dt(h,{modelValue:m.logLevel,"onUpdate:modelValue":t[0]||(t[0]=o=>m.logLevel=o),label:"Filter by log level","hide-details":"",variant:"outlined",density:"compact",items:m.logLevels,class:"mr-2",style:{"max-width":"150px"},"data-test":"log-messages-level"},null,8,["modelValue","items"]),Dt(x),Dt(d,{modelValue:m.search,"onUpdate:modelValue":t[1]||(t[1]=o=>m.search=o),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",style:{"max-width":"300px"},class:"search","data-test":"search-log-messages"},null,8,["modelValue"]),Dt(y,{icon:"mdi-delete-sweep",variant:"text",class:"ml-2","data-test":"clear-log",onClick:g.clearLog},null,8,["onClick"])]),_:1}),Dt(u,{headers:m.headers,items:m.shownData,search:m.search,"items-per-page":-1,"hide-default-footer":"","multi-sort":"",density:"compact",sticky:"",hover:"","data-test":"log-messages"},{"item.timestamp":fn(({item:o})=>[Sr("time",{title:o.timestamp,datetime:o.timestamp},Ar(o.timestamp),9,tT)]),"item.level":fn(({item:o})=>[Sr("span",{style:Ds("display: inline-flex; color:"+g.getColor(o.level))},[Dt(a,{class:"mr-1",status:g.getStatus(o.level)},null,8,["status"]),qr(" "+Ar(o.level),1)],4)]),"item.message":fn(({item:o})=>[Sr("div",nT,Ar(o.message),1)]),_:1},8,["headers","items","search"])]),_:1})}const $N=dr("M",ts(JM,[["render",rT],["__scopeId","data-v-081e936f"]])),iT=50,oT=2e3,ky="single-spa:app-change",sT={data(){return{appsMounted:!1,show:!1,hideSpinner:!1,pollInterval:null}},computed:{showSpinner:function(){return!this.hideSpinner&&!this.show}},created(){window.addEventListener(ky,this.handleAppChange)},mounted(){this.pollForMountedApps(),setTimeout(()=>{this.appsMounted||(this.show=!0,this.pollInterval&&clearInterval(this.pollInterval))},oT)},unmounted(){window.removeEventListener(ky,this.handleAppChange),this.pollInterval&&clearInterval(this.pollInterval)},methods:{handleAppChange:function(n){this.show=!n.detail.appsByNewStatus.MOUNTED},pollForMountedApps:function(){this.pollInterval=setInterval(()=>{this.appsMounted=Qc().length>0,Qc().length>0&&(this.hideSpinner=!0,clearInterval(this.pollInterval))},iT)}}},aT={class:"mx-1"},lT={key:1,class:"d-flex justify-center align-center"};function cT(n,t,e,r,m,g){const y=zt("v-card-title"),x=zt("v-card-text"),h=zt("v-card"),d=zt("v-progress-circular");return Cn(),Dr(dl,null,[m.show?(Cn(),ro(h,{key:0},{default:fn(()=>[Dt(y,null,{default:fn(()=>[...t[0]||(t[0]=[qr(" 404 Not Found ",-1)])]),_:1}),Dt(x,{class:"d-flex align-center mt-3"},{default:fn(()=>[t[1]||(t[1]=qr(" The requested URL ",-1)),Sr("code",aT,Ar(n.$route.fullPath),1),t[2]||(t[2]=qr(" was not routable. ",-1)),t[3]||(t[3]=Sr("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):io("",!0),g.showSpinner?(Cn(),Dr("div",lT,[Dt(d,{indeterminate:""})])):io("",!0)],64)}const Sy=[{path:"",component:()=>Ze(()=>Qe.import("./CmdTlmServer-5815c31ab60371d94b85.js"),void 0),children:[{component:()=>Ze(()=>Qe.import("./InterfacesTab-4bc1d83c4984c90c17de.js"),void 0),path:""},{component:()=>Ze(()=>Qe.import("./InterfacesTab-4bc1d83c4984c90c17de.js"),void 0),name:"InterfacesTab",path:"interfaces"},{component:()=>Ze(()=>Qe.import("./TargetsTab-d3f565722ca5bc06951c.js"),void 0),name:"TargetsTab",path:"targets"},{component:()=>Ze(()=>Qe.import("./CmdPacketsTab-7b1570af54437af5c0de.js"),void 0),name:"CmdPacketsTab",path:"cmd-packets"},{component:()=>Ze(()=>Qe.import("./TlmPacketsTab-f323eb4d9a40e8bf8fca.js"),void 0),name:"TlmPacketsTab",path:"tlm-packets"},{component:()=>Ze(()=>Qe.import("./RoutersTab-2b7966868bec8fc126c1.js"),void 0),name:"RoutersTab",path:"routers"},{component:()=>Ze(()=>Qe.import("./StatusTab-ae0b2c5be6cbf46600a1.js"),void 0),name:"StatusTab",props:{refreshInterval:5e3},path:"status"}]},{path:"/:pathMatch(.*)*",name:"NotFound",component:ts(sT,[["render",cT]])}];Sy.forEach(wp);const uT=gp({history:fp(),routes:Sy}),hT={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"}},dT={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=""}}},pT=["innerHTML"],gT={key:2},fT={key:3,class:"validate mt-4"};function mT(n,t,e,r,m,g){const y=zt("v-spacer"),x=zt("v-toolbar"),h=zt("v-icon"),d=zt("v-text-field"),s=zt("v-card-text"),a=zt("v-btn"),u=zt("v-card-actions"),l=zt("v-card"),o=zt("v-dialog"),c=zt("v-app");return Cn(),ro(c,null,{default:fn(()=>[Dt(o,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=p=>n.show=p),width:"600"},{default:fn(()=>[Dt(l,null,{default:fn(()=>[Dt(x,{height:"24"},{default:fn(()=>[Dt(y),Sr("span",null,Ar(n.params.title),1),Dt(y)]),_:1}),Dt(s,{class:"mt-4 pa-3"},{default:fn(()=>[n.params.validateText?(Cn(),ro(h,{key:0,class:"mr-2"},{default:fn(()=>[...t[2]||(t[2]=[qr(" mdi-alert ",-1)])]),_:1})):io("",!0),n.params.html?(Cn(),Dr("span",{key:1,innerHTML:n.params.text},null,8,pT)):(Cn(),Dr("span",gT,Ar(n.params.text),1)),n.params.validateText?(Cn(),Dr("div",fT,[qr(" Enter "+Ar(n.params.validateText)+" to confirm! ",1),Dt(d,{modelValue:n.validationText,"onUpdate:modelValue":t[0]||(t[0]=p=>n.validationText=p),variant:"solo",density:"compact","single-line":"",rules:[n.rules.required,n.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):io("",!0)]),_:1}),Dt(u,{class:"px-2"},{default:fn(()=>[Dt(y),n.params.cancelText?(Cn(),ro(a,{key:0,variant:"outlined","data-test":g.dataTestCancel,onClick:g.cancel},{default:fn(()=>[qr(Ar(n.params.cancelText),1)]),_:1},8,["data-test","onClick"])):io("",!0),Dt(a,{variant:"flat",color:n.params.okClass,"data-test":g.dataTestOk,onClick:g.ok},{default:fn(()=>[qr(Ar(n.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}const vT=ts(dT,[["render",mT],["__scopeId","data-v-de532a0f"]]);class yT{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const t=window.Vue.createApp(vT);t.use(od);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:m,validateText:g,cancelText:y,html:x}){return this.mount(),new Promise((h,d)=>{this.$root.dialog({title:t,text:e,okText:r,okClass:m,validateText:g,cancelText:y,html:x},h,d)})}confirm(t,{okText:e="Ok",cancelText:r="Cancel",okClass:m="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:m,validateText:null,cancelText:r,html:!1})}alert(t,{okText:e="Ok",html:r=!1,okClass:m="primary"}){return this.open({title:"Alert",text:t,okText:e,okClass:m,validateText:null,cancelText:null,html:r})}validate(t,{okText:e="Ok",validateText:r="CONFIRM",cancelText:m="Cancel",okClass:g="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:g,validateText:r,cancelText:m,html:!1})}}const wT={install(n,t){const e=new yT;n.provide("dialog",e),n.config.globalProperties.hasOwnProperty("$dialog")||(n.config.globalProperties.$dialog=e)}},bT={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`
|
1498
|
+
--toast-bg-color:${Va[this.toastNotification.level]};
|
1499
|
+
--toast-fg-color:${YM(this.toastNotification.level)};
|
1500
|
+
`},contentStyle:function(){return`
|
1501
|
+
white-space: ${this.expanded?"normal":"nowrap"};
|
1502
|
+
overflow-x: ${this.expanded?"visible":"hidden"};
|
1503
|
+
text-overflow: ${this.expanded?"unset":"ellipsis"};
|
1504
|
+
`}},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}}},xT={key:0,class:"text-subtitle-1 mr-1 notification-text"},CT={key:1,class:"text-body-2 notification-text"},kT={key:2,class:"text-body-2 notification-text"};function ST(n,t,e,r,m,g){const y=zt("v-icon"),x=zt("v-spacer"),h=zt("v-btn"),d=zt("v-sheet"),s=zt("v-slide-y-transition");return Cn(),ro(s,null,{default:fn(()=>[up(Dt(d,{style:Ds(g.toastStyle),class:"toast-notification",onClick:g.expand},{default:fn(()=>[Dt(y,{class:"mr-1 notification-text"},{default:fn(()=>[qr(Ar(g.toastNotificationIcon),1)]),_:1}),Sr("div",{class:"toast-content",style:Ds(g.contentStyle)},[n.toastNotification.title?(Cn(),Dr("span",xT,[n.toastNotification.body||n.toastNotification.message?(Cn(),Dr(dl,{key:0},[qr(Ar(n.toastNotification.title)+": ",1)],64)):(Cn(),Dr(dl,{key:1},[qr(Ar(n.toastNotification.title),1)],64))])):io("",!0),n.toastNotification.body?(Cn(),Dr("span",CT,Ar(n.toastNotification.body),1)):io("",!0),n.toastNotification.message?(Cn(),Dr("span",kT,Ar(n.toastNotification.message),1)):io("",!0)],4),Dt(x),Dt(h,{variant:"text",class:"notification-text",onClick:hp(g.hide,["stop"])},{default:fn(()=>[...t[0]||(t[0]=[qr(" Dismiss ",-1)])]),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[dp,n.showToast]])]),_:1})}const AT=ts(bT,[["render",ST],["__scopeId","data-v-84833581"]]);class _T{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=Xc(AT);t.use(od);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:m,level:g,duration:y,type:x="alert",logToConsole:h=!1,saveToHistory:d=!0}){this.mount(),h&&console.log(m?`${g.toUpperCase()} - ${m}`:`${g.toUpperCase()} - ${e}: ${r}`),d&&this.$store.commit("notifyAddHistory",{title:e,body:r,message:m,level:g}),this[t]({title:e,body:r,message:m,level:g,duration:y,type:x})}toast({title:t,body:e,message:r,level:m,duration:g,type:y}){this.$root.toast({title:t,body:e,message:r,level:m,type:y},g)}critical({title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"critical",title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x})}FATAL(t){this.critical(t)}ERROR(t){this.critical(t)}serious({title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"serious",title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x})}caution({title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"caution",title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x})}WARN(t){this.caution(t)}normal({title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"normal",title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x})}INFO(t){this.normal(t)}DEBUG(t){this.normal(t)}standby({title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"standby",title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x})}off({title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"off",title:t,body:e,message:r,type:m,duration:g,logToConsole:y,saveToHistory:x})}}const $T={install(n,t){const e=new _T(t);n.provide("notify",e),n.config.globalProperties.hasOwnProperty("$notify")||(n.config.globalProperties.$notify=e)}},Ay=100,_y=mp({state(){return{notifyHistory:[],namedWidgets:{},playback:{playbackMode:null,playbackDateTime:null,playbackStep:1}}},getters:{namedWidget:n=>t=>n.namedWidgets[t]},mutations:{notifyAddHistory(n,t){n.notifyHistory.length>=Ay&&(n.notifyHistory.length=Ay-1),n.notifyHistory.unshift(t)},notifyClearHistory(n){n.notifyHistory=[]},setNamedWidget(n,t){Object.assign(n.namedWidgets,t)},clearNamedWidget(n,t){delete n.namedWidgets[t]},playback(n,t){Object.assign(n.playback,t)}},modules:{}});function $y(n){let t;return n!==null&&typeof n=="object"&&((t=Object.getPrototypeOf(n))===Object.prototype||t===null)}function MT(n,t){const e={};for(const r of t)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}function My(){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 m in n)r[m]=n[m];for(const m in t){const g=n[m],y=t[m];if($y(g)&&$y(y)){r[m]=My(g,y,e);continue}if(e&&Array.isArray(g)&&Array.isArray(y)){r[m]=e(g,y);continue}r[m]=y}return r}function Ga(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Ga.cache.has(n))return Ga.cache.get(n);const t=n.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Ga.cache.set(n,t),t}Ga.cache=new Map;function TT(n){rp(`Vuetify: ${n}`)}function Ty(n,t){return e=>Object.keys(n).reduce((r,m)=>{const g=typeof n[m]=="object"&&n[m]!=null&&!Array.isArray(n[m])?n[m]:{type:n[m]};return e&&m in e?r[m]={...g,default:e[m]}:r[m]=g,t&&!r[m].source&&(r[m].source=t),r},{})}function Iy(n,t){const e=lp();if(!e)throw new Error(`[Vuetify] ${n} must be called from inside a setup function`);return e}function IT(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Iy("injectSelf");const{provides:e}=t;if(e&&n in e)return e[n]}const id=Symbol.for("vuetify:defaults");function Ly(){const n=ip(id);if(!n)throw new Error("[Vuetify] Could not find defaults instance");return n}function LT(n,t){return n.props&&(typeof n.props[t]<"u"||typeof n.props[Ga(t)]<"u")}function ET(){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]:Ly();const r=Iy("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const m=Yc(()=>{var h;return(h=e.value)==null?void 0:h[n._as??t]}),g=new Proxy(n,{get(h,d){var s,a,u,l;const o=Reflect.get(h,d);if(d==="class"||d==="style")return[(s=m.value)==null?void 0:s[d],o].filter(w=>w!=null);if(LT(r.vnode,d))return o;const c=(a=m.value)==null?void 0:a[d];if(c!==void 0)return c;const p=(l=(u=e.value)==null?void 0:u.global)==null?void 0:l[d];return p!==void 0?p:o}}),y=op();sp(()=>{if(m.value){const h=Object.entries(m.value).filter(d=>{let[s]=d;return s.startsWith(s[0].toUpperCase())});y.value=h.length?Object.fromEntries(h):void 0}else y.value=void 0});function x(){const h=IT(id,r);cp(id,Yc(()=>y.value?My((h==null?void 0:h.value)??{},y.value):h==null?void 0:h.value))}return{props:g,provideSubDefaults:x}}function pc(n){if(n._setup=n._setup??n.setup,!n.name)return TT("The component is missing an explicit name, unable to generate default prop value"),n;if(n._setup){n.props=Ty(n.props??{},n.name)();const t=Object.keys(n.props).filter(e=>e!=="class"&&e!=="style");n.filterProps=function(e){return MT(e,t)},n.props._as=String,n.setup=function(e,r){const m=Ly();if(!m.value)return n._setup(e,r);const{props:g,provideSubDefaults:y}=ET(e,e._as??n.name,m),x=n._setup(g,r);return y(),x}}return n}function RT(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(n?pc:np)(t)}const OT=[String,Function,Object,Array],gc=Ty({icon:{type:OT},tag:{type:[String,Object,Function],required:!0}},"icon");RT()({name:"VComponentIcon",props:gc(),setup(n,t){let{slots:e}=t;return()=>{const r=n.icon;return Dt(n.tag,null,{default:()=>{var m;return[n.icon?Dt(r,null,null):(m=e.default)==null?void 0:m.call(e)]}})}}}),pc({name:"VSvgIcon",inheritAttrs:!1,props:gc(),setup(n,t){let{attrs:e}=t;return()=>Dt(n.tag,pp(e,{style:null}),{default:()=>[Sr("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)?Sr("path",{d:r[0],"fill-opacity":r[1]},null):Sr("path",{d:r},null)):Sr("path",{d:n.icon},null)])]})}}),pc({name:"VLigatureIcon",props:gc(),setup(n){return()=>Dt(n.tag,null,{default:()=>[n.icon]})}});const NT=pc({name:"VClassIcon",props:gc(),setup(n){return()=>Dt(n.tag,{class:ap(n.icon)},null)}}),DT={component:n=>Ns(NT,{...n,class:"mdi"})},od=vp({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:hT}},icons:{defaultSet:"mdi",sets:{mdi:DT,...QM,...ZM}}}),sd=Ab({createApp:Xc,appOptions:{render(){return Ns(Rb,{})},el:"#openc3-tool"},handleInstance:n=>{n.use(uT),n.use(_y),n.use(od),n.use(wT),n.use($T,{store:_y})}}),TN=dr("b",sd.bootstrap),IN=dr("m",sd.mount),LN=dr("u",sd.unmount)})}}));
|