openc3-cosmos-tool-dataextractor 7.0.0 → 7.1.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.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/tools/dataextractor/ArrayWidget-CcQFJGCA-f76220cc11a39cef93d3.js +2 -0
  3. data/tools/dataextractor/{ArrayplotWidget-CDNRxI2F-a83801ded05b12f711f8.js → ArrayplotWidget-DGJEXAY0-2638e110104829429b7e.js} +1 -1
  4. data/tools/dataextractor/BarColumn-DwZmAe8g-87b5d97eefa9dd364079.js +1 -0
  5. data/tools/dataextractor/{BlockWidget-C-WB0Q2m-e1a936c86d9896422505.js → BlockWidget-BHtugveV-3a86c79f29993edbe557.js} +2 -2
  6. data/tools/dataextractor/{ButtonWidget-rS7sVb7m-dbf9f92372e6dff8e3d3.js → ButtonWidget-Cc9cYsg8-fa11db39baed1ca10dd9.js} +2 -2
  7. data/tools/dataextractor/{CanvasWidget-DuWolVCW-2bd38dd443fd2f303296.js → CanvasWidget-Bn70gBcc-9779d7c4a0937c4e2f70.js} +1 -1
  8. data/tools/dataextractor/CanvasdotWidget-CMROfW3O-f502b2d25ac1e3251128.js +1 -0
  9. data/tools/dataextractor/{CanvasimageWidget-DMHdDTSs-e3480e258876ee7d5ce8.js → CanvasimageWidget-BpM05v_m-6263bd6847c2e58b6b84.js} +1 -1
  10. data/tools/dataextractor/{CanvasimagevalueWidget-ns-5S1HA-984a3695590efe80a103.js → CanvasimagevalueWidget-E6G93iGc-49d367288d7991a84f17.js} +1 -1
  11. data/tools/dataextractor/CanvaslabelWidget-C074R2Fy-8fa147b0578e1ddd8e31.js +1 -0
  12. data/tools/dataextractor/{CanvaslabelvalueWidget-B2B5KlUm-04fa31c935f3aa224322.js → CanvaslabelvalueWidget-B0nJeS4X-b4d8b3e018abcec044ee.js} +1 -1
  13. data/tools/dataextractor/{CanvaslineWidget-DaHxgGyM-4b7e326afc628efa9af7.js → CanvaslineWidget-CxnNAqOX-d042686da706d5408c3e.js} +1 -1
  14. data/tools/dataextractor/{CanvaslinevalueWidget-CrtDsSOP-3dd527a40c656fd8d936.js → CanvaslinevalueWidget-BwfFyCwH-7997bd44b424ae4b1561.js} +1 -1
  15. data/tools/dataextractor/CheckbuttonWidget-yAm10oX0-e8125b88e4be2fc48dbf.js +1 -0
  16. data/tools/dataextractor/ComboboxWidget-BnWksnnp-c1d54211236c9e26a34b.js +1 -0
  17. data/tools/dataextractor/DataExtractor-4fdb57d1945b0887db0f.js +14 -0
  18. data/tools/dataextractor/{DateWidget-DwgQ3Jik-d443f1fdc2599de1735d.js → DateWidget-CAiG2FIl-c146fb495ef13560c452.js} +1 -1
  19. data/tools/dataextractor/{DetailsDialog-CspQjoR5-a13c819a71a18f3ba1f8.js → DetailsDialog-q5SDzw3R-7c15f8bc9d13be343b4a.js} +1 -1
  20. data/tools/dataextractor/{DynamicWidget-Bym87woV-24d53debe022dc41bdad.js → DynamicWidget-BuSbQVhf-86285e64782585bb8284.js} +1 -1
  21. data/tools/dataextractor/{FilechecksumWidget-BS281Q0h-aa51848ef542e86ad554.js → FilechecksumWidget-DeW9wy5d-248571c63dba27319b36.js} +1 -1
  22. data/tools/dataextractor/{FiledisplayWidget-C9YdXDdv-7048222386da1c6b8556.js → FiledisplayWidget-C_zPFu2E-2d17e2f1448559a44f05.js} +1 -1
  23. data/tools/dataextractor/{FormatvalueWidget-dfmQfrNA-43064fa838d0937da3ab.js → FormatvalueWidget-BrvPWwfN-e050d5adc896a68175ca.js} +1 -1
  24. data/tools/dataextractor/Graph-BCvaO4yI-a403dbd09e8a3025cceb.js +1 -0
  25. data/tools/dataextractor/{GraphWidget-CWJ4Yb26-15460f438f038901828a.js → GraphWidget-QS-VJoes-2024d5d6197b125514ef.js} +1 -1
  26. data/tools/dataextractor/{HorizontalWidget-DFAqF95S-4494e9bd7db85c2b3380.js → HorizontalWidget-cFSsdChw-d979f75547fda5fa7327.js} +1 -1
  27. data/tools/dataextractor/HorizontalboxWidget-CKA7rLGd-9f624ef7e0a8f5e8341a.js +1 -0
  28. data/tools/dataextractor/HorizontallineWidget-BqbLK0zc-032877ba9a30de523df1.js +1 -0
  29. data/tools/dataextractor/{IframeWidget-BsDu4b17-729d665632327b5613f4.js → IframeWidget-CITX8Es1-f88b11b4cb0abe9013a6.js} +1 -1
  30. data/tools/dataextractor/{ImageLoader-CT4rnwWn-5b50796341061a230f31.js → ImageLoader-DQV_11Vd-6bd51c2e0e35e48f84d3.js} +1 -1
  31. data/tools/dataextractor/{ImageviewerWidget-BQbrz2WL-708300227e9c554627dd.js → ImageviewerWidget-BIsSA7KD-27ebd6d54624aecc85c5.js} +1 -1
  32. data/tools/dataextractor/{LabelWidget-D5-IFUYW-5fcc7202ac2b5e9869c8.js → LabelWidget-FQI-cH_A-6ba874245f82dee1b5b4.js} +1 -1
  33. data/tools/dataextractor/LabelledWidget-KGXtQ4Zb-fd5dd58e0de56789b7b2.js +1 -0
  34. data/tools/dataextractor/LabelprogressbarWidget-72WyzD_Q-0c61a376a160ac8eabc1.js +1 -0
  35. data/tools/dataextractor/LabelsparklineWidget-DtWNf4mK-49ac92040f51acb6ad41.js +1 -0
  36. data/tools/dataextractor/LabelvalueWidget-D_JLdY7r-95bd967c8c4f6cb0fb1c.js +1 -0
  37. data/tools/dataextractor/LabelvaluedescWidget-BppM5vGp-e2eb8f62ec8b1edab5c7.js +1 -0
  38. data/tools/dataextractor/LabelvaluelimitsbarWidget-B69ogLif-bfa23b96929cba8117ff.js +1 -0
  39. data/tools/dataextractor/LabelvaluelimitscolumnWidget-DPYwFdgq-2159672e62922d671ff6.js +1 -0
  40. data/tools/dataextractor/LabelvaluerangebarWidget-BT0BcOoK-db30aa4c4f1abbb71f06.js +1 -0
  41. data/tools/dataextractor/{Layout-LSeXBY_W-523b3bdfa663af9d9dc2.js → Layout-d-vb0okO-5143877d6be73c3e6315.js} +1 -1
  42. data/tools/dataextractor/{LedWidget-CH4Il9R7-84f6b5b3f3604db94a1e.js → LedWidget-Cmr6eVG2-aa2c79bda6817327a734.js} +1 -1
  43. data/tools/dataextractor/{LimitsBar-BelAQFD0-1c800ecbee755a7c8180.js → LimitsBar-qMynDHYT-9ef33b1b3b889d3fab97.js} +1 -1
  44. data/tools/dataextractor/{LimitsbarWidget-PkPqlyxL-41cb2134202cfc229b0d.js → LimitsbarWidget-CMvcwa-m-d060dbaa92ea217695a7.js} +1 -1
  45. data/tools/dataextractor/{LimitscolorWidget-BlA15g4A-ac374db2daee985c3708.js → LimitscolorWidget-CZ9wMtcI-600a0d33cfdac9e606c6.js} +1 -1
  46. data/tools/dataextractor/{LimitscolumnWidget-PT917BA0-ec85efca8ebf5a868be1.js → LimitscolumnWidget-r84KJGU--63f1ce2e287b7e068fe3.js} +1 -1
  47. data/tools/dataextractor/LinegraphWidget-COGBGOjF-5c8d32bb60f274b053cd.js +1 -0
  48. data/tools/dataextractor/MatrixbycolumnsWidget-Dx2iz0YF-999d3afe43e2aa9db87e.js +1 -0
  49. data/tools/dataextractor/OpenC3TimePicker-C3vCnk72-b6adff64018a7923eb93.js +1 -0
  50. data/tools/dataextractor/{ProgressbarWidget-Cy_ad8mb-1df695c5267162e765d7.js → ProgressbarWidget-DPbAVjdC-2981b1af8af4da20b6d1.js} +1 -1
  51. data/tools/dataextractor/{RadiobuttonWidget-aJBIz45y-801a2c33babce797526f.js → RadiobuttonWidget-iXI9yCDk-59f850a8bd9d843024e5.js} +1 -1
  52. data/tools/dataextractor/{RadiogroupWidget-DNRlJnPE-a36bed855246f97bd481.js → RadiogroupWidget-CMM_p1eA-1a39ed7902af769f50d0.js} +1 -1
  53. data/tools/dataextractor/{RangebarWidget-h4YItqPF-280ea4eef24736bdbb85.js → RangebarWidget-DJXGUHAc-63d6cdc08c070ce2280c.js} +1 -1
  54. data/tools/dataextractor/{RollupWidget-CnxDQRQ0-6358e8358a580c5921d0.js → RollupWidget-BbWLSsTT-f862029486671e1966d7.js} +1 -1
  55. data/tools/dataextractor/ScrollwindowWidget-Dxhp7yKn-8b0ba7315cde67bcc9f6.js +1 -0
  56. data/tools/dataextractor/{SignalWidget-jYpXSIfD-c768dd15f02c955f8b39.js → SignalWidget-65q0tiuo-52c981c4470bf5006886.js} +1 -1
  57. data/tools/dataextractor/SpacerWidget-DFzbojmX-55a4d9330581f9b7285d.js +1 -0
  58. data/tools/dataextractor/SparklineWidget-Bu4I8zY0-d05e82f937b095333a15.js +1 -0
  59. data/tools/dataextractor/TabbookWidget-CELMWyx7-1d7b6a3a541b8b6cffb3.js +1 -0
  60. data/tools/dataextractor/TargetPacketItemChooser-BOdVLVbe-d94873f0ee88694988de.js +1 -0
  61. data/tools/dataextractor/TextboxWidget-DYsqXntS-d477d1867f2a65ae0699.js +1 -0
  62. data/tools/dataextractor/TextfieldWidget-BIUgV9Q4-7664df7a16deff334036.js +1 -0
  63. data/tools/dataextractor/TimeWidget-BPXcY1Wy-61008f558728b5f906d7.js +1 -0
  64. data/tools/dataextractor/{TitleWidget-BAq2LGJF-ae630acb77cf4c766ebc.js → TitleWidget-DJ9mHRLE-52e464994c49c45eae92.js} +1 -1
  65. data/tools/dataextractor/VWidget-BDy0211S-1ff9c9310d5fdbf00390.js +1 -0
  66. data/tools/dataextractor/ValueWidget-DzOSy7lp-92479ffa8015859984c7.js +1 -0
  67. data/tools/dataextractor/ValuelimitsbarWidget-D5dSlW6D-cae311a05073ff60ddb1.js +1 -0
  68. data/tools/dataextractor/ValuelimitscolumnWidget-7DXCsVW_-86690696d7ef52117561.js +1 -0
  69. data/tools/dataextractor/ValuerangebarWidget-BWjnpmyy-ef11d2ea672f2dbd1a8a.js +1 -0
  70. data/tools/dataextractor/{VerticalWidget-0UbbE2g3-adcb27032c4f6fa2fbfe.js → VerticalWidget-BOtXAhxt-19d6adff2d379742f886.js} +1 -1
  71. data/tools/dataextractor/VerticalboxWidget-RAsXfGdI-c0d18d921ac32d9c3bbe.js +1 -0
  72. data/tools/dataextractor/{Widget-CGePksBA-7989ab8fd0278679400c.js → Widget-BDsgRxuV-660e8eb4690c2793e6b6.js} +1 -1
  73. data/tools/dataextractor/main-cb94da8783ff5b6915d8.js +1496 -0
  74. data/tools/dataextractor/main.js +1 -1
  75. metadata +73 -73
  76. data/tools/dataextractor/ArrayWidget-D2UrA5Db-1c55b514e63b95e490f6.js +0 -2
  77. data/tools/dataextractor/BarColumn-nSFR2LZF-52aaa4252f2230353368.js +0 -1
  78. data/tools/dataextractor/CanvasdotWidget-B42YizA1-890ec798f4b45d558907.js +0 -1
  79. data/tools/dataextractor/CanvaslabelWidget-DElES3gU-9213b36fbadeb0359f4e.js +0 -1
  80. data/tools/dataextractor/CheckbuttonWidget-BK4SgIu7-773142e6557fb0f58a78.js +0 -1
  81. data/tools/dataextractor/ComboboxWidget-CciRWuKq-3f1ba4ec7db5de697819.js +0 -1
  82. data/tools/dataextractor/DataExtractor-e5f302088707d33752fd.js +0 -11
  83. data/tools/dataextractor/Graph-BTtGIbYG-52d7fea4217161d294a4.js +0 -1
  84. data/tools/dataextractor/HorizontalboxWidget-CL1xEhDj-2dd7af897f322c232db4.js +0 -1
  85. data/tools/dataextractor/HorizontallineWidget-DPiADCAy-d4be2847dc5bacd22c4c.js +0 -1
  86. data/tools/dataextractor/LabelledWidget-Dt9miRtB-bb76d04fcf2b737b5427.js +0 -1
  87. data/tools/dataextractor/LabelprogressbarWidget-BNFgTq4D-606ff758c918eb5b0223.js +0 -1
  88. data/tools/dataextractor/LabelsparklineWidget-BByxev6X-4dad3009fa3f0d9431c1.js +0 -1
  89. data/tools/dataextractor/LabelvalueWidget-BM6L9bVw-59a90e09c9e467c44e76.js +0 -1
  90. data/tools/dataextractor/LabelvaluedescWidget-DeBRjYXs-7d13f0625327ab080392.js +0 -1
  91. data/tools/dataextractor/LabelvaluelimitsbarWidget-CqV0-c3G-51ce8510c0eaa914f0b3.js +0 -1
  92. data/tools/dataextractor/LabelvaluelimitscolumnWidget-Bz0PKTIV-62a95b407e98ab69b8f0.js +0 -1
  93. data/tools/dataextractor/LabelvaluerangebarWidget-DKuAJHLm-4d25d7a8a2989a7f9778.js +0 -1
  94. data/tools/dataextractor/LinegraphWidget-BW7kS_6G-5ff2b791254cc5b7db2a.js +0 -1
  95. data/tools/dataextractor/MatrixbycolumnsWidget-BGNsZvjv-896c0c73f296fc47bc2b.js +0 -1
  96. data/tools/dataextractor/OpenC3TimePicker-CkaALgy9-f3da4082559cd932f4f8.js +0 -1
  97. data/tools/dataextractor/ScrollwindowWidget-DFkTJ2Ue-cb731315321666ce3bce.js +0 -1
  98. data/tools/dataextractor/SpacerWidget-CUqvml6o-de2112756e057c724689.js +0 -1
  99. data/tools/dataextractor/SparklineWidget-CVf1TtjV-1fe0a1f3a17091ff0b62.js +0 -1
  100. data/tools/dataextractor/TabbookWidget-CTUEpDnn-c73cbfe51c07bb486d65.js +0 -1
  101. data/tools/dataextractor/TargetPacketItemChooser-CS2Vvi2U-33c8290f414a2fa4a3d2.js +0 -1
  102. data/tools/dataextractor/TextboxWidget-B0Y1W7GP-1bcbf7550300c331597a.js +0 -1
  103. data/tools/dataextractor/TextfieldWidget-B8TAf9oU-2216d2290bef09e3d7ef.js +0 -1
  104. data/tools/dataextractor/TimeWidget-DewVXks0-da9657b4ea49f337b77c.js +0 -1
  105. data/tools/dataextractor/VWidget-0KwtSssI-de3422ba8381ba405cbe.js +0 -1
  106. data/tools/dataextractor/ValueWidget-BGNqaaRs-7f8ecf0b5a905c91d823.js +0 -1
  107. data/tools/dataextractor/ValuelimitsbarWidget-B6mH4PdF-4a0a3408f6142f31fece.js +0 -1
  108. data/tools/dataextractor/ValuelimitscolumnWidget-DlX90_-6-6ab61b02182d88318289.js +0 -1
  109. data/tools/dataextractor/ValuerangebarWidget-C9xyLOJO-a10f1bcce7dea09a14bb.js +0 -1
  110. data/tools/dataextractor/VerticalboxWidget-efbeOAKE-7cafb64c5c613da26835.js +0 -1
  111. data/tools/dataextractor/main-92b16557aa3a51ee770f.js +0 -1490
@@ -0,0 +1,1496 @@
1
+ System.register(["vue","vue-router","pinia","single-spa","vuetify"],(function(Tn,tt){"use strict";var St,En,io,Ot,ut,Qr,fr,yf,bf,js,Ma,_l,Rr,ei,wo,Al,Hs,Sl,$l,wf,xf,Cf,cu,kf,_f,Af,Sf,$f,uu,Rf,Mf,Tf,Ef,If,hu,Lf;return{setters:[Mt=>{St=Mt.resolveComponent,En=Mt.openBlock,io=Mt.createBlock,Ot=Mt.withCtx,ut=Mt.createVNode,Qr=Mt.createElementBlock,fr=Mt.createElementVNode,yf=Mt.useCssVars,bf=Mt.defineAsyncComponent,js=Mt.h,Ma=Mt.normalizeStyle,_l=Mt.Fragment,Rr=Mt.createTextVNode,ei=Mt.toDisplayString,wo=Mt.createCommentVNode,Al=Mt.withKeys,Hs=Mt.withModifiers,Sl=Mt.withDirectives,$l=Mt.vShow,wf=Mt.defineComponent,xf=Mt.warn,Cf=Mt.inject,cu=Mt.computed,kf=Mt.shallowRef,_f=Mt.watchEffect,Af=Mt.normalizeClass,Sf=Mt.getCurrentInstance,$f=Mt.provide,uu=Mt.createApp,Rf=Mt.mergeProps},Mt=>{Mf=Mt.createRouter,Tf=Mt.createWebHistory},Mt=>{Ef=Mt.defineStore,If=Mt.createPinia},Mt=>{hu=Mt.getMountedApps},Mt=>{Lf=Mt.createVuetify}],execute:(function(){Tn({$:Wr,C:Wa,E:ng,T:Gp,U:Ou,b:eg,e:oo,f:Ys,h:Du,i:qp,j:Kp,n:my,o:Tr,q:Ks,v:tg});var Mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Of(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(m){return Object.getOwnPropertyDescriptor(t,m).enumerable}))),e.push.apply(e,r)}return e}function rs(t){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?Of(Object(e),!0).forEach((function(r){tw(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Of(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}function tw(t,n,e){return(n=(function(r){var m=(function(p,g){if(is(p)!=="object"||p===null)return p;var w=p[Symbol.toPrimitive];if(w!==void 0){var h=w.call(p,g);if(is(h)!=="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(p)})(r,"string");return is(m)==="symbol"?m:String(m)})(n))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function is(t){return is=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},is(t)}(function(t){if(t.CSS&&t.CSS.escape)return t.CSS.escape;var n=function(e){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,m=String(e),p=m.length,g=-1,w="",h=m.charCodeAt(0);++g<p;)(r=m.charCodeAt(g))!=0?w+=r>=1&&r<=31||r==127||g==0&&r>=48&&r<=57||g==1&&r>=48&&r<=57&&h==45?"\\"+r.toString(16)+" ":g==0&&p==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+m.charAt(g):m.charAt(g):w+="�";return w};t.CSS||(t.CSS={}),t.CSS.escape=n})(Mt);var nw={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function rw(t){if(is(t)!=="object")throw new Error("single-spa-vue requires a configuration object");var n=rs(rs({},nw),t);if(!n.Vue&&!n.createApp)throw Error("single-spa-vue must be passed opts.Vue or opts.createApp");if(!n.appOptions)throw Error("single-spa-vue must be passed opts.appOptions");if(n.appOptions.el&&typeof n.appOptions.el!="string"&&!(n.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(is(n.appOptions.el)));n.createApp=n.createApp||n.Vue&&n.Vue.createApp;var e={};return{bootstrap:iw.bind(null,n,e),mount:ow.bind(null,n,e),unmount:aw.bind(null,n,e),update:sw.bind(null,n,e)}}function iw(t){return t.loadRootComponent?t.loadRootComponent().then((function(n){return t.rootComponent=n})):Promise.resolve()}function ow(t,n,e){var r={};return Promise.resolve().then((function(){return(function(m,p){return typeof m.appOptions=="function"?m.appOptions(p):Promise.resolve(rs({},m.appOptions))})(t,e).then((function(m){var p;if(e.domElement&&!m.el&&(m.el=e.domElement),m.el)if(typeof m.el=="string"){if(!(p=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(p=m.el).id||(p.id="single-spa-application:".concat(e.name)),m.el="#".concat(CSS.escape(p.id));else{var g="single-spa-application:".concat(e.name);m.el="#".concat(CSS.escape(g)),(p=document.getElementById(g))||((p=document.createElement("div")).id=g,document.body.appendChild(p))}if(!t.replaceMode&&(m.el=m.el+" .single-spa-container",!p.querySelector(".single-spa-container"))){var w=document.createElement("div");w.className="single-spa-container",p.appendChild(w)}r.domEl=p,m.render||m.template||!t.rootComponent||(m.render=function(d){return d(t.rootComponent)}),m.data||(m.data={});var h=m.data;if(m.data=function(){return rs(rs({},typeof h=="function"?h.call(this,this):h),e)},t.createApp){if(r.vueInstance=t.createApp(m),t.handleInstance)return Promise.resolve(t.handleInstance(r.vueInstance,e)).then((function(){return r.root=r.vueInstance.mount(m.el),n[e.name]=r,r.vueInstance}));r.root=r.vueInstance.mount(m.el)}else if(r.vueInstance=new t.Vue(m),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),t.handleInstance)return Promise.resolve(t.handleInstance(r.vueInstance,e)).then((function(){return n[e.name]=r,r.vueInstance}));return n[e.name]=r,r.vueInstance}))}))}function sw(t,n,e){return Promise.resolve().then((function(){var r=n[e.name],m=rs(rs({},t.appOptions.data||{}),e),p=r.root||r.vueInstance;for(var g in m)p[g]=m[g]}))}function aw(t,n,e){return Promise.resolve().then((function(){var r=n[e.name];t.createApp?r.vueInstance.unmount(r.domEl):(r.vueInstance.$destroy(),r.vueInstance.$el.innerHTML=""),delete r.vueInstance,r.domEl&&(r.domEl.innerHTML="",delete r.domEl)}))}const lw=Tn("_",(t,n)=>{const e=t.__vccOpts||t;for(const[r,m]of n)e[r]=m;return e}),cw={};function uw(t,n){const e=St("router-view"),r=St("v-app");return En(),io(r,{id:"innerapp"},{default:Ot(()=>[ut(e)]),_:1})}const hw=lw(cw,[["render",uw]]),c2="modulepreload",u2=function(t){return"/"+t},h2={},nt=function(n,e,r){let m=Promise.resolve();function p(g){const w=new Event("vite:preloadError",{cancelable:!0});if(w.payload=g,window.dispatchEvent(w),!w.defaultPrevented)throw g}return m.then(g=>{for(const w of g||[])w.status==="rejected"&&p(w.reason);return n().catch(p)})},Nf=function(t){!t.name!=="NotFound"&&(t.path=`/tools/dataextractor/${t.path.replace(/^\//,"")}`),t.children?.forEach(Nf)},zo=Tn("d",(t,n)=>{const e=t.__vccOpts||t;for(const[r,m]of n)e[r]=m;return e}),dw="/icons/customIcons.svg",du={props:{icon:{type:String,default:null},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return dw+"#"+this.icon}}},Df=()=>{yf(t=>({v4ccb3d08:t.color}))},Pf=du.setup;du.setup=Pf?(t,n)=>(Df(),Pf(t,n)):Df;const fw={class:"cosmos-custom-icon"},pw={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},gw=["href"];function mw(t,n,e,r,m,p){return En(),Qr("span",fw,[(En(),Qr("svg",pw,[fr("use",{href:p.iconSrc},null,8,gw)]))])}const vw=zo(du,[["render",mw],["__scopeId","data-v-54b83b01"]]);function Ff(t,n){return function(){return t.apply(n,arguments)}}const{toString:yw}=Object.prototype,{getPrototypeOf:Rl}=Object,{iterator:Ml,toStringTag:zf}=Symbol,Tl=(t=>n=>{const e=yw.call(n);return t[e]||(t[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Hi=t=>(t=t.toLowerCase(),n=>Tl(n)===t),El=t=>n=>typeof n===t,{isArray:Us}=Array,Vs=El("undefined");function Ta(t){return t!==null&&!Vs(t)&&t.constructor!==null&&!Vs(t.constructor)&&ti(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Wf=Hi("ArrayBuffer");function bw(t){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(t):n=t&&t.buffer&&Wf(t.buffer),n}const ww=El("string"),ti=El("function"),Bf=El("number"),Ea=t=>t!==null&&typeof t=="object",xw=t=>t===!0||t===!1,Il=t=>{if(Tl(t)!=="object")return!1;const n=Rl(t);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(zf in t)&&!(Ml in t)},Cw=t=>{if(!Ea(t)||Ta(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},kw=Hi("Date"),_w=Hi("File"),Aw=t=>!!(t&&typeof t.uri<"u"),Sw=t=>t&&typeof t.getParts<"u",$w=Hi("Blob"),Rw=Hi("FileList"),Mw=t=>Ea(t)&&ti(t.pipe);function Tw(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const jf=Tw(),Hf=typeof jf.FormData<"u"?jf.FormData:void 0,Ew=t=>{if(!t)return!1;if(Hf&&t instanceof Hf)return!0;const n=Rl(t);if(!n||n===Object.prototype||!ti(t.append))return!1;const e=Tl(t);return e==="formdata"||e==="object"&&ti(t.toString)&&t.toString()==="[object FormData]"},Iw=Hi("URLSearchParams"),[Lw,Ow,Nw,Dw]=["ReadableStream","Request","Response","Headers"].map(Hi),Pw=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ia(t,n,{allOwnKeys:e=!1}={}){if(t===null||typeof t>"u")return;let r,m;if(typeof t!="object"&&(t=[t]),Us(t))for(r=0,m=t.length;r<m;r++)n.call(null,t[r],r,t);else{if(Ta(t))return;const p=e?Object.getOwnPropertyNames(t):Object.keys(t),g=p.length;let w;for(r=0;r<g;r++)w=p[r],n.call(null,t[w],w,t)}}function Uf(t,n){if(Ta(t))return null;n=n.toLowerCase();const e=Object.keys(t);let r=e.length,m;for(;r-- >0;)if(m=e[r],n===m.toLowerCase())return m;return null}const os=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Vf=t=>!Vs(t)&&t!==os;function fu(){const{caseless:t,skipUndefined:n}=Vf(this)&&this||{},e={},r=(m,p)=>{if(p==="__proto__"||p==="constructor"||p==="prototype")return;const g=t&&Uf(e,p)||p;Il(e[g])&&Il(m)?e[g]=fu(e[g],m):Il(m)?e[g]=fu({},m):Us(m)?e[g]=m.slice():(!n||!Vs(m))&&(e[g]=m)};for(let m=0,p=arguments.length;m<p;m++)arguments[m]&&Ia(arguments[m],r);return e}const Fw=(t,n,e,{allOwnKeys:r}={})=>(Ia(n,(m,p)=>{e&&ti(m)?Object.defineProperty(t,p,{value:Ff(m,e),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,p,{value:m,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),zw=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Ww=(t,n,e,r)=>{t.prototype=Object.create(n.prototype,r),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:n.prototype}),e&&Object.assign(t.prototype,e)},Bw=(t,n,e,r)=>{let m,p,g;const w={};if(n=n||{},t==null)return n;do{for(m=Object.getOwnPropertyNames(t),p=m.length;p-- >0;)g=m[p],(!r||r(g,t,n))&&!w[g]&&(n[g]=t[g],w[g]=!0);t=e!==!1&&Rl(t)}while(t&&(!e||e(t,n))&&t!==Object.prototype);return n},jw=(t,n,e)=>{t=String(t),(e===void 0||e>t.length)&&(e=t.length),e-=n.length;const r=t.indexOf(n,e);return r!==-1&&r===e},Hw=t=>{if(!t)return null;if(Us(t))return t;let n=t.length;if(!Bf(n))return null;const e=new Array(n);for(;n-- >0;)e[n]=t[n];return e},Uw=(t=>n=>t&&n instanceof t)(typeof Uint8Array<"u"&&Rl(Uint8Array)),Vw=(t,n)=>{const e=(t&&t[Ml]).call(t);let r;for(;(r=e.next())&&!r.done;){const m=r.value;n.call(t,m[0],m[1])}},Gw=(t,n)=>{let e;const r=[];for(;(e=t.exec(n))!==null;)r.push(e);return r},qw=Hi("HTMLFormElement"),Kw=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,e,r){return e.toUpperCase()+r}),Gf=(({hasOwnProperty:t})=>(n,e)=>t.call(n,e))(Object.prototype),Yw=Hi("RegExp"),qf=(t,n)=>{const e=Object.getOwnPropertyDescriptors(t),r={};Ia(e,(m,p)=>{let g;(g=n(m,p,t))!==!1&&(r[p]=g||m)}),Object.defineProperties(t,r)},Jw=t=>{qf(t,(n,e)=>{if(ti(t)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=t[e];if(ti(r)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},Xw=(t,n)=>{const e={},r=m=>{m.forEach(p=>{e[p]=!0})};return Us(t)?r(t):r(String(t).split(n)),e},Zw=()=>{},Qw=(t,n)=>t!=null&&Number.isFinite(t=+t)?t:n;function ex(t){return!!(t&&ti(t.append)&&t[zf]==="FormData"&&t[Ml])}const tx=t=>{const n=new Array(10),e=(r,m)=>{if(Ea(r)){if(n.indexOf(r)>=0)return;if(Ta(r))return r;if(!("toJSON"in r)){n[m]=r;const p=Us(r)?[]:{};return Ia(r,(g,w)=>{const h=e(g,m+1);!Vs(h)&&(p[w]=h)}),n[m]=void 0,p}}return r};return e(t,0)},nx=Hi("AsyncFunction"),rx=t=>t&&(Ea(t)||ti(t))&&ti(t.then)&&ti(t.catch),Kf=((t,n)=>t?setImmediate:n?((e,r)=>(os.addEventListener("message",({source:m,data:p})=>{m===os&&p===e&&r.length&&r.shift()()},!1),m=>{r.push(m),os.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",ti(os.postMessage)),ix=typeof queueMicrotask<"u"?queueMicrotask.bind(os):typeof process<"u"&&process.nextTick||Kf,ox=t=>t!=null&&ti(t[Ml]),_e={isArray:Us,isArrayBuffer:Wf,isBuffer:Ta,isFormData:Ew,isArrayBufferView:bw,isString:ww,isNumber:Bf,isBoolean:xw,isObject:Ea,isPlainObject:Il,isEmptyObject:Cw,isReadableStream:Lw,isRequest:Ow,isResponse:Nw,isHeaders:Dw,isUndefined:Vs,isDate:kw,isFile:_w,isReactNativeBlob:Aw,isReactNative:Sw,isBlob:$w,isRegExp:Yw,isFunction:ti,isStream:Mw,isURLSearchParams:Iw,isTypedArray:Uw,isFileList:Rw,forEach:Ia,merge:fu,extend:Fw,trim:Pw,stripBOM:zw,inherits:Ww,toFlatObject:Bw,kindOf:Tl,kindOfTest:Hi,endsWith:jw,toArray:Hw,forEachEntry:Vw,matchAll:Gw,isHTMLForm:qw,hasOwnProperty:Gf,hasOwnProp:Gf,reduceDescriptors:qf,freezeMethods:Jw,toObjectSet:Xw,toCamelCase:Kw,noop:Zw,toFiniteNumber:Qw,findKey:Uf,global:os,isContextDefined:Vf,isSpecCompliantForm:ex,toJSONObject:tx,isAsyncFn:nx,isThenable:rx,setImmediate:Kf,asap:ix,isIterable:ox};let pt=class X0 extends Error{static from(n,e,r,m,p,g){const w=new X0(n.message,e||n.code,r,m,p);return w.cause=n,w.name=n.name,n.status!=null&&w.status==null&&(w.status=n.status),g&&Object.assign(w,g),w}constructor(n,e,r,m,p){super(n),Object.defineProperty(this,"message",{value:n,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),r&&(this.config=r),m&&(this.request=m),p&&(this.response=p,this.status=p.status)}toJSON(){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:_e.toJSONObject(this.config),code:this.code,status:this.status}}};pt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",pt.ERR_BAD_OPTION="ERR_BAD_OPTION",pt.ECONNABORTED="ECONNABORTED",pt.ETIMEDOUT="ETIMEDOUT",pt.ERR_NETWORK="ERR_NETWORK",pt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",pt.ERR_DEPRECATED="ERR_DEPRECATED",pt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",pt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",pt.ERR_CANCELED="ERR_CANCELED",pt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",pt.ERR_INVALID_URL="ERR_INVALID_URL",pt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const sx=null;function pu(t){return _e.isPlainObject(t)||_e.isArray(t)}function Yf(t){return _e.endsWith(t,"[]")?t.slice(0,-2):t}function gu(t,n,e){return t?t.concat(n).map(function(r,m){return r=Yf(r),!e&&m?"["+r+"]":r}).join(e?".":""):n}function ax(t){return _e.isArray(t)&&!t.some(pu)}const lx=_e.toFlatObject(_e,{},null,function(t){return/^is[A-Z]/.test(t)});function Ll(t,n,e){if(!_e.isObject(t))throw new TypeError("target must be an object");n=n||new FormData,e=_e.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(s,f){return!_e.isUndefined(f[s])});const r=e.metaTokens,m=e.visitor||l,p=e.dots,g=e.indexes,w=e.Blob||typeof Blob<"u"&&Blob,h=e.maxDepth===void 0?100:e.maxDepth,d=w&&_e.isSpecCompliantForm(n);if(!_e.isFunction(m))throw new TypeError("visitor must be a function");function a(s){if(s===null)return"";if(_e.isDate(s))return s.toISOString();if(_e.isBoolean(s))return s.toString();if(!d&&_e.isBlob(s))throw new pt("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(s)||_e.isTypedArray(s)?d&&typeof Blob=="function"?new Blob([s]):Buffer.from(s):s}function l(s,f,b){let x=s;if(_e.isReactNative(n)&&_e.isReactNativeBlob(s))return n.append(gu(b,f,p),a(s)),!1;if(s&&!b&&typeof s=="object"){if(_e.endsWith(f,"{}"))f=r?f:f.slice(0,-2),s=JSON.stringify(s);else if(_e.isArray(s)&&ax(s)||(_e.isFileList(s)||_e.endsWith(f,"[]"))&&(x=_e.toArray(s)))return f=Yf(f),x.forEach(function(I,R){!(_e.isUndefined(I)||I===null)&&n.append(g===!0?gu([f],R,p):g===null?f:f+"[]",a(I))}),!1}return pu(s)?!0:(n.append(gu(b,f,p),a(s)),!1)}const c=[],u=Object.assign(lx,{defaultVisitor:l,convertValue:a,isVisitable:pu});function i(s,f,b=0){if(!_e.isUndefined(s)){if(b>h)throw new pt("Object is too deeply nested ("+b+" levels). Max depth: "+h,pt.ERR_FORM_DATA_DEPTH_EXCEEDED);if(c.indexOf(s)!==-1)throw Error("Circular reference detected in "+f.join("."));c.push(s),_e.forEach(s,function(x,I){(!(_e.isUndefined(x)||x===null)&&m.call(n,x,_e.isString(I)?I.trim():I,f,u))===!0&&i(x,f?f.concat(I):[I],b+1)}),c.pop()}}if(!_e.isObject(t))throw new TypeError("data must be an object");return i(t),n}function Jf(t){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(e){return n[e]})}function mu(t,n){this._pairs=[],t&&Ll(t,this,n)}const Xf=mu.prototype;Xf.append=function(t,n){this._pairs.push([t,n])},Xf.toString=function(t){const n=t?function(e){return t.call(this,e,Jf)}:Jf;return this._pairs.map(function(e){return n(e[0])+"="+n(e[1])},"").join("&")};function cx(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Zf(t,n,e){if(!n)return t;const r=e&&e.encode||cx,m=_e.isFunction(e)?{serialize:e}:e,p=m&&m.serialize;let g;if(p?g=p(n,m):g=_e.isURLSearchParams(n)?n.toString():new mu(n,m).toString(r),g){const w=t.indexOf("#");w!==-1&&(t=t.slice(0,w)),t+=(t.indexOf("?")===-1?"?":"&")+g}return t}let Qf=class{constructor(){this.handlers=[]}use(n,e,r){return this.handlers.push({fulfilled:n,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){_e.forEach(this.handlers,function(e){e!==null&&n(e)})}};const vu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ux=typeof URLSearchParams<"u"?URLSearchParams:mu,hx=typeof FormData<"u"?FormData:null,dx=typeof Blob<"u"?Blob:null,fx={isBrowser:!0,classes:{URLSearchParams:ux,FormData:hx,Blob:dx},protocols:["http","https","file","blob","url","data"]},yu=typeof window<"u"&&typeof document<"u",bu=typeof navigator=="object"&&navigator||void 0,px=yu&&(!bu||["ReactNative","NativeScript","NS"].indexOf(bu.product)<0),gx=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",mx=yu&&window.location.href||"http://localhost",vx=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:yu,hasStandardBrowserEnv:px,hasStandardBrowserWebWorkerEnv:gx,navigator:bu,origin:mx},Symbol.toStringTag,{value:"Module"})),Mr={...vx,...fx};function yx(t,n){return Ll(t,new Mr.classes.URLSearchParams,{visitor:function(e,r,m,p){return Mr.isNode&&_e.isBuffer(e)?(this.append(r,e.toString("base64")),!1):p.defaultVisitor.apply(this,arguments)},...n})}function bx(t){return _e.matchAll(/\w+|\[(\w*)]/g,t).map(n=>n[0]==="[]"?"":n[1]||n[0])}function wx(t){const n={},e=Object.keys(t);let r;const m=e.length;let p;for(r=0;r<m;r++)p=e[r],n[p]=t[p];return n}function ep(t){function n(e,r,m,p){let g=e[p++];if(g==="__proto__")return!0;const w=Number.isFinite(+g),h=p>=e.length;return g=!g&&_e.isArray(m)?m.length:g,h?(_e.hasOwnProp(m,g)?m[g]=_e.isArray(m[g])?m[g].concat(r):[m[g],r]:m[g]=r,!w):((!m[g]||!_e.isObject(m[g]))&&(m[g]=[]),n(e,r,m[g],p)&&_e.isArray(m[g])&&(m[g]=wx(m[g])),!w)}if(_e.isFormData(t)&&_e.isFunction(t.entries)){const e={};return _e.forEachEntry(t,(r,m)=>{n(bx(r),m,e,0)}),e}return null}const Gs=(t,n)=>t!=null&&_e.hasOwnProp(t,n)?t[n]:void 0;function xx(t,n,e){if(_e.isString(t))try{return(n||JSON.parse)(t),_e.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(t)}const La={transitional:vu,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const e=n.getContentType()||"",r=e.indexOf("application/json")>-1,m=_e.isObject(t);if(m&&_e.isHTMLForm(t)&&(t=new FormData(t)),_e.isFormData(t))return r?JSON.stringify(ep(t)):t;if(_e.isArrayBuffer(t)||_e.isBuffer(t)||_e.isStream(t)||_e.isFile(t)||_e.isBlob(t)||_e.isReadableStream(t))return t;if(_e.isArrayBufferView(t))return t.buffer;if(_e.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let p;if(m){const g=Gs(this,"formSerializer");if(e.indexOf("application/x-www-form-urlencoded")>-1)return yx(t,g).toString();if((p=_e.isFileList(t))||e.indexOf("multipart/form-data")>-1){const w=Gs(this,"env"),h=w&&w.FormData;return Ll(p?{"files[]":t}:t,h&&new h,g)}}return m||r?(n.setContentType("application/json",!1),xx(t)):t}],transformResponse:[function(t){const n=Gs(this,"transitional")||La.transitional,e=n&&n.forcedJSONParsing,r=Gs(this,"responseType"),m=r==="json";if(_e.isResponse(t)||_e.isReadableStream(t))return t;if(t&&_e.isString(t)&&(e&&!r||m)){const p=!(n&&n.silentJSONParsing)&&m;try{return JSON.parse(t,Gs(this,"parseReviver"))}catch(g){if(p)throw g.name==="SyntaxError"?pt.from(g,pt.ERR_BAD_RESPONSE,this,null,Gs(this,"response")):g}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mr.classes.FormData,Blob:Mr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch"],t=>{La.headers[t]={}});const Cx=_e.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"]),kx=t=>{const n={};let e,r,m;return t&&t.split(`
2
+ `).forEach(function(p){m=p.indexOf(":"),e=p.substring(0,m).trim().toLowerCase(),r=p.substring(m+1).trim(),!(!e||n[e]&&Cx[e])&&(e==="set-cookie"?n[e]?n[e].push(r):n[e]=[r]:n[e]=n[e]?n[e]+", "+r:r)}),n},tp=Symbol("internals"),_x=/[^\x09\x20-\x7E\x80-\xFF]/g;function Ax(t){let n=0,e=t.length;for(;n<e;){const r=t.charCodeAt(n);if(r!==9&&r!==32)break;n+=1}for(;e>n;){const r=t.charCodeAt(e-1);if(r!==9&&r!==32)break;e-=1}return n===0&&e===t.length?t:t.slice(n,e)}function Oa(t){return t&&String(t).trim().toLowerCase()}function Sx(t){return Ax(t.replace(_x,""))}function Ol(t){return t===!1||t==null?t:_e.isArray(t)?t.map(Ol):Sx(String(t))}function $x(t){const n=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(t);)n[r[1]]=r[2];return n}const Rx=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function wu(t,n,e,r,m){if(_e.isFunction(r))return r.call(this,n,e);if(m&&(n=e),!!_e.isString(n)){if(_e.isString(r))return n.indexOf(r)!==-1;if(_e.isRegExp(r))return r.test(n)}}function Mx(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,e,r)=>e.toUpperCase()+r)}function Tx(t,n){const e=_e.toCamelCase(" "+n);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+e,{value:function(m,p,g){return this[r].call(this,n,m,p,g)},configurable:!0})})}let ni=class{constructor(n){n&&this.set(n)}set(n,e,r){const m=this;function p(w,h,d){const a=Oa(h);if(!a)throw new Error("header name must be a non-empty string");const l=_e.findKey(m,a);(!l||m[l]===void 0||d===!0||d===void 0&&m[l]!==!1)&&(m[l||h]=Ol(w))}const g=(w,h)=>_e.forEach(w,(d,a)=>p(d,a,h));if(_e.isPlainObject(n)||n instanceof this.constructor)g(n,e);else if(_e.isString(n)&&(n=n.trim())&&!Rx(n))g(kx(n),e);else if(_e.isObject(n)&&_e.isIterable(n)){let w={},h,d;for(const a of n){if(!_e.isArray(a))throw TypeError("Object iterator must return a key-value pair");w[d=a[0]]=(h=w[d])?_e.isArray(h)?[...h,a[1]]:[h,a[1]]:a[1]}g(w,e)}else n!=null&&p(e,n,r);return this}get(n,e){if(n=Oa(n),n){const r=_e.findKey(this,n);if(r){const m=this[r];if(!e)return m;if(e===!0)return $x(m);if(_e.isFunction(e))return e.call(this,m,r);if(_e.isRegExp(e))return e.exec(m);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,e){if(n=Oa(n),n){const r=_e.findKey(this,n);return!!(r&&this[r]!==void 0&&(!e||wu(this,this[r],r,e)))}return!1}delete(n,e){const r=this;let m=!1;function p(g){if(g=Oa(g),g){const w=_e.findKey(r,g);w&&(!e||wu(r,r[w],w,e))&&(delete r[w],m=!0)}}return _e.isArray(n)?n.forEach(p):p(n),m}clear(n){const e=Object.keys(this);let r=e.length,m=!1;for(;r--;){const p=e[r];(!n||wu(this,this[p],p,n,!0))&&(delete this[p],m=!0)}return m}normalize(n){const e=this,r={};return _e.forEach(this,(m,p)=>{const g=_e.findKey(r,p);if(g){e[g]=Ol(m),delete e[p];return}const w=n?Mx(p):String(p).trim();w!==p&&delete e[p],e[w]=Ol(m),r[w]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const e=Object.create(null);return _e.forEach(this,(r,m)=>{r!=null&&r!==!1&&(e[m]=n&&_e.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,e])=>n+": "+e).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...e){const r=new this(n);return e.forEach(m=>r.set(m)),r}static accessor(n){const e=(this[tp]=this[tp]={accessors:{}}).accessors,r=this.prototype;function m(p){const g=Oa(p);e[g]||(Tx(r,p),e[g]=!0)}return _e.isArray(n)?n.forEach(m):m(n),this}};ni.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_e.reduceDescriptors(ni.prototype,({value:t},n)=>{let e=n[0].toUpperCase()+n.slice(1);return{get:()=>t,set(r){this[e]=r}}}),_e.freezeMethods(ni);function xu(t,n){const e=this||La,r=n||e,m=ni.from(r.headers);let p=r.data;return _e.forEach(t,function(g){p=g.call(e,p,m.normalize(),n?n.status:void 0)}),m.normalize(),p}function np(t){return!!(t&&t.__CANCEL__)}let Na=class extends pt{constructor(n,e,r){super(n??"canceled",pt.ERR_CANCELED,e,r),this.name="CanceledError",this.__CANCEL__=!0}};function rp(t,n,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?t(e):n(new pt("Request failed with status code "+e.status,[pt.ERR_BAD_REQUEST,pt.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function Ex(t){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""}function Ix(t,n){t=t||10;const e=new Array(t),r=new Array(t);let m=0,p=0,g;return n=n!==void 0?n:1e3,function(w){const h=Date.now(),d=r[p];g||(g=h),e[m]=w,r[m]=h;let a=p,l=0;for(;a!==m;)l+=e[a++],a=a%t;if(m=(m+1)%t,m===p&&(p=(p+1)%t),h-g<n)return;const c=d&&h-d;return c?Math.round(l*1e3/c):void 0}}function Lx(t,n){let e=0,r=1e3/n,m,p;const g=(w,h=Date.now())=>{e=h,m=null,p&&(clearTimeout(p),p=null),t(...w)};return[(...w)=>{const h=Date.now(),d=h-e;d>=r?g(w,h):(m=w,p||(p=setTimeout(()=>{p=null,g(m)},r-d)))},()=>m&&g(m)]}const Nl=(t,n,e=3)=>{let r=0;const m=Ix(50,250);return Lx(p=>{const g=p.loaded,w=p.lengthComputable?p.total:void 0,h=w!=null?Math.min(g,w):g,d=Math.max(0,h-r),a=m(d);r=Math.max(r,h);const l={loaded:h,total:w,progress:w?h/w:void 0,bytes:d,rate:a||void 0,estimated:a&&w?(w-h)/a:void 0,event:p,lengthComputable:w!=null,[n?"download":"upload"]:!0};t(l)},e)},ip=(t,n)=>{const e=t!=null;return[r=>n[0]({lengthComputable:e,total:t,loaded:r}),n[1]]},op=t=>(...n)=>_e.asap(()=>t(...n)),Ox=Mr.hasStandardBrowserEnv?((t,n)=>e=>(e=new URL(e,Mr.origin),t.protocol===e.protocol&&t.host===e.host&&(n||t.port===e.port)))(new URL(Mr.origin),Mr.navigator&&/(msie|trident)/i.test(Mr.navigator.userAgent)):()=>!0,Nx=Mr.hasStandardBrowserEnv?{write(t,n,e,r,m,p,g){if(typeof document>"u")return;const w=[`${t}=${encodeURIComponent(n)}`];_e.isNumber(e)&&w.push(`expires=${new Date(e).toUTCString()}`),_e.isString(r)&&w.push(`path=${r}`),_e.isString(m)&&w.push(`domain=${m}`),p===!0&&w.push("secure"),_e.isString(g)&&w.push(`SameSite=${g}`),document.cookie=w.join("; ")},read(t){if(typeof document>"u")return null;const n=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return n?decodeURIComponent(n[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Dx(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Px(t,n){return n?t.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):t}function sp(t,n,e){let r=!Dx(n);return t&&(r||e===!1)?Px(t,n):n}const ap=t=>t instanceof ni?{...t}:t;function ss(t,n){n=n||{};const e=Object.create(null);Object.defineProperty(e,"hasOwnProperty",{value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(d,a,l,c){return _e.isPlainObject(d)&&_e.isPlainObject(a)?_e.merge.call({caseless:c},d,a):_e.isPlainObject(a)?_e.merge({},a):_e.isArray(a)?a.slice():a}function m(d,a,l,c){if(_e.isUndefined(a)){if(!_e.isUndefined(d))return r(void 0,d,l,c)}else return r(d,a,l,c)}function p(d,a){if(!_e.isUndefined(a))return r(void 0,a)}function g(d,a){if(_e.isUndefined(a)){if(!_e.isUndefined(d))return r(void 0,d)}else return r(void 0,a)}function w(d,a,l){if(_e.hasOwnProp(n,l))return r(d,a);if(_e.hasOwnProp(t,l))return r(void 0,d)}const h={url:p,method:p,data:p,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutMessage:g,withCredentials:g,withXSRFToken:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,allowedSocketPaths:g,responseEncoding:g,validateStatus:w,headers:(d,a,l)=>m(ap(d),ap(a),l,!0)};return _e.forEach(Object.keys({...t,...n}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const a=_e.hasOwnProp(h,d)?h[d]:m,l=_e.hasOwnProp(t,d)?t[d]:void 0,c=_e.hasOwnProp(n,d)?n[d]:void 0,u=a(l,c,d);_e.isUndefined(u)&&a!==w||(e[d]=u)}),e}const lp=t=>{const n=ss({},t),e=c=>_e.hasOwnProp(n,c)?n[c]:void 0,r=e("data");let m=e("withXSRFToken");const p=e("xsrfHeaderName"),g=e("xsrfCookieName");let w=e("headers");const h=e("auth"),d=e("baseURL"),a=e("allowAbsoluteUrls"),l=e("url");if(n.headers=w=ni.from(w),n.url=Zf(sp(d,l,a),t.params,t.paramsSerializer),h&&w.set("Authorization","Basic "+btoa((h.username||"")+":"+(h.password?unescape(encodeURIComponent(h.password)):""))),_e.isFormData(r)){if(Mr.hasStandardBrowserEnv||Mr.hasStandardBrowserWebWorkerEnv)w.setContentType(void 0);else if(_e.isFunction(r.getHeaders)){const c=r.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([i,s])=>{u.includes(i.toLowerCase())&&w.set(i,s)})}}if(Mr.hasStandardBrowserEnv&&(_e.isFunction(m)&&(m=m(n)),m===!0||m==null&&Ox(n.url))){const c=p&&g&&Nx.read(g);c&&w.set(p,c)}return n},Fx=typeof XMLHttpRequest<"u",zx=Fx&&function(t){return new Promise(function(n,e){const r=lp(t);let m=r.data;const p=ni.from(r.headers).normalize();let{responseType:g,onUploadProgress:w,onDownloadProgress:h}=r,d,a,l,c,u;function i(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let s=new XMLHttpRequest;s.open(r.method.toUpperCase(),r.url,!0),s.timeout=r.timeout;function f(){if(!s)return;const x=ni.from("getAllResponseHeaders"in s&&s.getAllResponseHeaders()),I={data:!g||g==="text"||g==="json"?s.responseText:s.response,status:s.status,statusText:s.statusText,headers:x,config:t,request:s};rp(function(R){n(R),i()},function(R){e(R),i()},I),s=null}"onloadend"in s?s.onloadend=f:s.onreadystatechange=function(){!s||s.readyState!==4||s.status===0&&!(s.responseURL&&s.responseURL.indexOf("file:")===0)||setTimeout(f)},s.onabort=function(){s&&(e(new pt("Request aborted",pt.ECONNABORTED,t,s)),s=null)},s.onerror=function(x){const I=x&&x.message?x.message:"Network Error",R=new pt(I,pt.ERR_NETWORK,t,s);R.event=x||null,e(R),s=null},s.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const I=r.transitional||vu;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),e(new pt(x,I.clarifyTimeoutError?pt.ETIMEDOUT:pt.ECONNABORTED,t,s)),s=null},m===void 0&&p.setContentType(null),"setRequestHeader"in s&&_e.forEach(p.toJSON(),function(x,I){s.setRequestHeader(I,x)}),_e.isUndefined(r.withCredentials)||(s.withCredentials=!!r.withCredentials),g&&g!=="json"&&(s.responseType=r.responseType),h&&([l,u]=Nl(h,!0),s.addEventListener("progress",l)),w&&s.upload&&([a,c]=Nl(w),s.upload.addEventListener("progress",a),s.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(d=x=>{s&&(e(!x||x.type?new Na(null,t,s):x),s.abort(),s=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const b=Ex(r.url);if(b&&Mr.protocols.indexOf(b)===-1){e(new pt("Unsupported protocol "+b+":",pt.ERR_BAD_REQUEST,t));return}s.send(m||null)})},Wx=(t,n)=>{const{length:e}=t=t?t.filter(Boolean):[];if(n||e){let r=new AbortController,m;const p=function(d){if(!m){m=!0,w();const a=d instanceof Error?d:this.reason;r.abort(a instanceof pt?a:new Na(a instanceof Error?a.message:a))}};let g=n&&setTimeout(()=>{g=null,p(new pt(`timeout of ${n}ms exceeded`,pt.ETIMEDOUT))},n);const w=()=>{t&&(g&&clearTimeout(g),g=null,t.forEach(d=>{d.unsubscribe?d.unsubscribe(p):d.removeEventListener("abort",p)}),t=null)};t.forEach(d=>d.addEventListener("abort",p));const{signal:h}=r;return h.unsubscribe=()=>_e.asap(w),h}},Bx=function*(t,n){let e=t.byteLength;if(e<n){yield t;return}let r=0,m;for(;r<e;)m=r+n,yield t.slice(r,m),r=m},jx=async function*(t,n){for await(const e of Hx(t))yield*Bx(e,n)},Hx=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const n=t.getReader();try{for(;;){const{done:e,value:r}=await n.read();if(e)break;yield r}}finally{await n.cancel()}},cp=(t,n,e,r)=>{const m=jx(t,n);let p=0,g,w=h=>{g||(g=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:d,value:a}=await m.next();if(d){w(),h.close();return}let l=a.byteLength;if(e){let c=p+=l;e(c)}h.enqueue(new Uint8Array(a))}catch(d){throw w(d),d}},cancel(h){return w(h),m.return()}},{highWaterMark:2})},up=64*1024,{isFunction:Dl}=_e,Ux=(({Request:t,Response:n})=>({Request:t,Response:n}))(_e.global),{ReadableStream:hp,TextEncoder:dp}=_e.global,fp=(t,...n)=>{try{return!!t(...n)}catch{return!1}},Vx=t=>{t=_e.merge.call({skipUndefined:!0},Ux,t);const{fetch:n,Request:e,Response:r}=t,m=n?Dl(n):typeof fetch=="function",p=Dl(e),g=Dl(r);if(!m)return!1;const w=m&&Dl(hp),h=m&&(typeof dp=="function"?(i=>s=>i.encode(s))(new dp):async i=>new Uint8Array(await new e(i).arrayBuffer())),d=p&&w&&fp(()=>{let i=!1;const s=new e(Mr.origin,{body:new hp,method:"POST",get duplex(){return i=!0,"half"}}),f=s.headers.has("Content-Type");return s.body!=null&&s.body.cancel(),i&&!f}),a=g&&w&&fp(()=>_e.isReadableStream(new r("").body)),l={stream:a&&(i=>i.body)};m&&["text","arrayBuffer","blob","formData","stream"].forEach(i=>{!l[i]&&(l[i]=(s,f)=>{let b=s&&s[i];if(b)return b.call(s);throw new pt(`Response type '${i}' is not supported`,pt.ERR_NOT_SUPPORT,f)})});const c=async i=>{if(i==null)return 0;if(_e.isBlob(i))return i.size;if(_e.isSpecCompliantForm(i))return(await new e(Mr.origin,{method:"POST",body:i}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(i)||_e.isArrayBuffer(i))return i.byteLength;if(_e.isURLSearchParams(i)&&(i=i+""),_e.isString(i))return(await h(i)).byteLength},u=async(i,s)=>_e.toFiniteNumber(i.getContentLength())??c(s);return async i=>{let{url:s,method:f,data:b,signal:x,cancelToken:I,timeout:R,onDownloadProgress:A,onUploadProgress:C,responseType:O,headers:D,withCredentials:E="same-origin",fetchOptions:T}=lp(i),B=n||fetch;O=O?(O+"").toLowerCase():"text";let F=Wx([x,I&&I.toAbortSignal()],R),N=null;const $=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let k;try{if(C&&d&&f!=="get"&&f!=="head"&&(k=await u(D,b))!==0){let Q=new e(s,{method:"POST",body:b,duplex:"half"}),le;if(_e.isFormData(b)&&(le=Q.headers.get("content-type"))&&D.setContentType(le),Q.body){const[ne,ce]=ip(k,Nl(op(C)));b=cp(Q.body,up,ne,ce)}}_e.isString(E)||(E=E?"include":"omit");const L=p&&"credentials"in e.prototype;if(_e.isFormData(b)){const Q=D.getContentType();Q&&/^multipart\/form-data/i.test(Q)&&!/boundary=/i.test(Q)&&D.delete("content-type")}const W={...T,signal:F,method:f.toUpperCase(),headers:D.normalize().toJSON(),body:b,duplex:"half",credentials:L?E:void 0};N=p&&new e(s,W);let U=await(p?B(N,T):B(s,W));const q=a&&(O==="stream"||O==="response");if(a&&(A||q&&$)){const Q={};["status","statusText","headers"].forEach(ae=>{Q[ae]=U[ae]});const le=_e.toFiniteNumber(U.headers.get("content-length")),[ne,ce]=A&&ip(le,Nl(op(A),!0))||[];U=new r(cp(U.body,up,ne,()=>{ce&&ce(),$&&$()}),Q)}O=O||"text";let Z=await l[_e.findKey(l,O)||"text"](U,i);return!q&&$&&$(),await new Promise((Q,le)=>{rp(Q,le,{data:Z,headers:ni.from(U.headers),status:U.status,statusText:U.statusText,config:i,request:N})})}catch(L){throw $&&$(),L&&L.name==="TypeError"&&/Load failed|fetch/i.test(L.message)?Object.assign(new pt("Network Error",pt.ERR_NETWORK,i,N,L&&L.response),{cause:L.cause||L}):pt.from(L,L&&L.code,i,N,L&&L.response)}}},Gx=new Map,pp=t=>{let n=t&&t.env||{};const{fetch:e,Request:r,Response:m}=n,p=[r,m,e];let g=p.length,w=g,h,d,a=Gx;for(;w--;)h=p[w],d=a.get(h),d===void 0&&a.set(h,d=w?new Map:Vx(n)),a=d;return d};pp();const Cu={http:sx,xhr:zx,fetch:{get:pp}};_e.forEach(Cu,(t,n)=>{if(t){try{Object.defineProperty(t,"name",{value:n})}catch{}Object.defineProperty(t,"adapterName",{value:n})}});const gp=t=>`- ${t}`,qx=t=>_e.isFunction(t)||t===null||t===!1;function Kx(t,n){t=_e.isArray(t)?t:[t];const{length:e}=t;let r,m;const p={};for(let g=0;g<e;g++){r=t[g];let w;if(m=r,!qx(r)&&(m=Cu[(w=String(r)).toLowerCase()],m===void 0))throw new pt(`Unknown adapter '${w}'`);if(m&&(_e.isFunction(m)||(m=m.get(n))))break;p[w||"#"+g]=m}if(!m){const g=Object.entries(p).map(([h,d])=>`adapter ${h} `+(d===!1?"is not supported by the environment":"is not available in the build"));let w=e?g.length>1?`since :
4
+ `+g.map(gp).join(`
5
+ `):" "+gp(g[0]):"as no adapter specified";throw new pt("There is no suitable adapter to dispatch the request "+w,"ERR_NOT_SUPPORT")}return m}const mp={getAdapter:Kx,adapters:Cu};function ku(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Na(null,t)}function vp(t){return ku(t),t.headers=ni.from(t.headers),t.data=xu.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),mp.getAdapter(t.adapter||La.adapter,t)(t).then(function(n){return ku(t),n.data=xu.call(t,t.transformResponse,n),n.headers=ni.from(n.headers),n},function(n){return np(n)||(ku(t),n&&n.response&&(n.response.data=xu.call(t,t.transformResponse,n.response),n.response.headers=ni.from(n.response.headers))),Promise.reject(n)})}const yp="1.15.2",Pl={};["object","boolean","number","function","string","symbol"].forEach((t,n)=>{Pl[t]=function(e){return typeof e===t||"a"+(n<1?"n ":" ")+t}});const bp={};Pl.transitional=function(t,n,e){function r(m,p){return"[Axios v"+yp+"] Transitional option '"+m+"'"+p+(e?". "+e:"")}return(m,p,g)=>{if(t===!1)throw new pt(r(p," has been removed"+(n?" in "+n:"")),pt.ERR_DEPRECATED);return n&&!bp[p]&&(bp[p]=!0,console.warn(r(p," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(m,p,g):!0}},Pl.spelling=function(t){return(n,e)=>(console.warn(`${e} is likely a misspelling of ${t}`),!0)};function Yx(t,n,e){if(typeof t!="object")throw new pt("options must be an object",pt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let m=r.length;for(;m-- >0;){const p=r[m],g=Object.prototype.hasOwnProperty.call(n,p)?n[p]:void 0;if(g){const w=t[p],h=w===void 0||g(w,p,t);if(h!==!0)throw new pt("option "+p+" must be "+h,pt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new pt("Unknown option "+p,pt.ERR_BAD_OPTION)}}const Fl={assertOptions:Yx,validators:Pl},Ri=Fl.validators;let as=class{constructor(n){this.defaults=n||{},this.interceptors={request:new Qf,response:new Qf}}async request(n,e){try{return await this._request(n,e)}catch(r){if(r instanceof Error){let m={};Error.captureStackTrace?Error.captureStackTrace(m):m=new Error;const p=(()=>{if(!m.stack)return"";const g=m.stack.indexOf(`
6
+ `);return g===-1?"":m.stack.slice(g+1)})();try{if(!r.stack)r.stack=p;else if(p){const g=p.indexOf(`
7
+ `),w=g===-1?-1:p.indexOf(`
8
+ `,g+1),h=w===-1?"":p.slice(w+1);String(r.stack).endsWith(h)||(r.stack+=`
9
+ `+p)}}catch{}}throw r}}_request(n,e){typeof n=="string"?(e=e||{},e.url=n):e=n||{},e=ss(this.defaults,e);const{transitional:r,paramsSerializer:m,headers:p}=e;r!==void 0&&Fl.assertOptions(r,{silentJSONParsing:Ri.transitional(Ri.boolean),forcedJSONParsing:Ri.transitional(Ri.boolean),clarifyTimeoutError:Ri.transitional(Ri.boolean),legacyInterceptorReqResOrdering:Ri.transitional(Ri.boolean)},!1),m!=null&&(_e.isFunction(m)?e.paramsSerializer={serialize:m}:Fl.assertOptions(m,{encode:Ri.function,serialize:Ri.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Fl.assertOptions(e,{baseUrl:Ri.spelling("baseURL"),withXsrfToken:Ri.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let g=p&&_e.merge(p.common,p[e.method]);p&&_e.forEach(["delete","get","head","post","put","patch","common"],i=>{delete p[i]}),e.headers=ni.concat(g,p);const w=[];let h=!0;this.interceptors.request.forEach(function(i){if(typeof i.runWhen=="function"&&i.runWhen(e)===!1)return;h=h&&i.synchronous;const s=e.transitional||vu;s&&s.legacyInterceptorReqResOrdering?w.unshift(i.fulfilled,i.rejected):w.push(i.fulfilled,i.rejected)});const d=[];this.interceptors.response.forEach(function(i){d.push(i.fulfilled,i.rejected)});let a,l=0,c;if(!h){const i=[vp.bind(this),void 0];for(i.unshift(...w),i.push(...d),c=i.length,a=Promise.resolve(e);l<c;)a=a.then(i[l++],i[l++]);return a}c=w.length;let u=e;for(;l<c;){const i=w[l++],s=w[l++];try{u=i(u)}catch(f){s.call(this,f);break}}try{a=vp.call(this,u)}catch(i){return Promise.reject(i)}for(l=0,c=d.length;l<c;)a=a.then(d[l++],d[l++]);return a}getUri(n){n=ss(this.defaults,n);const e=sp(n.baseURL,n.url,n.allowAbsoluteUrls);return Zf(e,n.params,n.paramsSerializer)}};_e.forEach(["delete","get","head","options"],function(t){as.prototype[t]=function(n,e){return this.request(ss(e||{},{method:t,url:n,data:(e||{}).data}))}}),_e.forEach(["post","put","patch"],function(t){function n(e){return function(r,m,p){return this.request(ss(p||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:m}))}}as.prototype[t]=n(),as.prototype[t+"Form"]=n(!0)});let Jx=class Z0{constructor(n){if(typeof n!="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 p=r._listeners.length;for(;p-- >0;)r._listeners[p](m);r._listeners=null}),this.promise.then=m=>{let p;const g=new Promise(w=>{r.subscribe(w),p=w}).then(m);return g.cancel=function(){r.unsubscribe(p)},g},n(function(m,p,g){r.reason||(r.reason=new Na(m,p,g),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const e=this._listeners.indexOf(n);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const n=new AbortController,e=r=>{n.abort(r)};return this.subscribe(e),n.signal.unsubscribe=()=>this.unsubscribe(e),n.signal}static source(){let n;return{token:new Z0(function(e){n=e}),cancel:n}}};function Xx(t){return function(n){return t.apply(null,n)}}function Zx(t){return _e.isObject(t)&&t.isAxiosError===!0}const _u={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(_u).forEach(([t,n])=>{_u[n]=t});function wp(t){const n=new as(t),e=Ff(as.prototype.request,n);return _e.extend(e,as.prototype,n,{allOwnKeys:!0}),_e.extend(e,n,null,{allOwnKeys:!0}),e.create=function(r){return wp(ss(t,r))},e}const Hn=wp(La);Hn.Axios=as,Hn.CanceledError=Na,Hn.CancelToken=Jx,Hn.isCancel=np,Hn.VERSION=yp,Hn.toFormData=Ll,Hn.AxiosError=pt,Hn.Cancel=Hn.CanceledError,Hn.all=function(t){return Promise.all(t)},Hn.spread=Xx,Hn.isAxiosError=Zx,Hn.mergeConfig=ss,Hn.AxiosHeaders=ni,Hn.formToJSON=t=>ep(_e.isHTMLForm(t)?new FormData(t):t),Hn.getAdapter=mp.getAdapter,Hn.HttpStatusCode=_u,Hn.default=Hn;const{Axios:d2,AxiosError:f2,CanceledError:p2,isCancel:g2,CancelToken:m2,VERSION:v2,all:y2,Cancel:b2,isAxiosError:w2,spread:x2,toFormData:C2,AxiosHeaders:k2,HttpStatusCode:_2,formToJSON:A2,getAdapter:S2,mergeConfig:$2}=Hn,Au=Hn.create({baseURL:location.origin,timeout:6e4,params:{}});Au.interceptors.response.use(t=>t,t=>{if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(r){r&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let n=`HTTP ${t.response.status} - `;t.response?.statusText&&(n+=`${t.response.statusText} `),t.response?.config?.data&&(n+=`${t.response.config.data} `),t.response?.data?.message?n+=`${t.response.data.message}`:t.response?.data?.exception?n+=`${t.response.data.exception}`:t.response?.data?.error?.message?(t.response.data.error.class&&(n+=`${t.response.data.error.class} `),n+=`${t.response.data.error.message}`):n+=`${t.response?.data}`;const{$cosmosNotify:e}=window;throw e&&e.serious({title:"Network error",body:n}),t}else throw t});const zl=async function(t,n,{data:e,params:r={},headers:m,noAuth:p=!1,noScope:g=!1,onUploadProgress:w=!1}={}){if(!p){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}m.Authorization=localStorage.openc3Token}return m.manual=!0,!g&&!r.scope&&(r.scope=window.openc3Scope),Au({method:t,url:n,data:e,params:r,headers:m,onUploadProgress:w})},Su={Accept:"application/json"},xp={...Su,"Content-Type":"application/json"},Qx=Tn("l",{get:function(t,{params:n,headers:e=Su,noScope:r,noAuth:m,onUploadProgress:p}={}){return zl("get",t,{params:n,headers:e,noScope:r,noAuth:m,onUploadProgress:p})},put:function(t,{data:n,params:e,headers:r=xp,noScope:m,noAuth:p,onUploadProgress:g}={}){return zl("put",t,{data:n,params:e,headers:r,noScope:m,noAuth:p,onUploadProgress:g})},post:function(t,{data:n,params:e,headers:r=xp,noScope:m,noAuth:p,onUploadProgress:g}={}){return zl("post",t,{data:n,params:e,headers:r,noScope:m,noAuth:p,onUploadProgress:g})},delete:function(t,{params:n,headers:e=Su,noScope:r,noAuth:m,onUploadProgress:p}={}){return zl("delete",t,{params:n,headers:e,noScope:r,noAuth:m,onUploadProgress:p})}});let Wl=()=>({emit(t,...n){for(let e=this.events[t]||[],r=0,m=e.length;r<m;r++)e[r](...n)},events:{},on(t,n){return(this.events[t]||=[]).push(n),()=>{this.events[t]=this.events[t]?.filter(e=>n!==e)}}}),Da=class extends Error{constructor(n,e){n instanceof Error?(super(n.message),this.cause=n):super(n),this.reason=e,this.name="ReasonError"}},$u=class extends Da{constructor(n){super("Rejected",n),this.name="SubscriptionRejectedError"}};class e1 extends Da{constructor(n){super(n||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class Ui extends Da{constructor(n,e){e?super(n,e):super("Disconnected",n),this.name="DisconnectedError"}}class t1 extends Ui{constructor(n){super(n,"stale_connection"),this.name="StaleConnectionError"}}function Cp(t){return t?`{${Object.keys(t).sort().filter(n=>t[n]!==void 0).map(n=>{let e=JSON.stringify(t[n]);return`${JSON.stringify(n)}:${e}`}).join(",")}}`:""}class n1{constructor(n){this.channel=n,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",n=>{if(n.type==="info"){this._state||(this._state=this.stateFromInfo(n));return}this._state&&(n.type==="join"?this._state[n.id]=n.info:n.type==="leave"&&delete this._state[n.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(n=>n()),this.listeners.length=0}async join(n,e){if(!this._info)return this._info={id:String(n),info:e},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let n=await this.channel.perform("$presence:leave");return delete this._info,n}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let n=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(n),this._state}finally{delete this._promise}}stateFromInfo(n){return n.records.reduce((e,{id:r,info:m})=>(e[r]=m,e),{})}}const ls=Symbol("state");let kp=class{constructor(n={}){this.emitter=Wl(),this.params=Object.freeze(n),this.presence=new n1(this),this.initialConnect=!0,this[ls]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Cp({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ls]}attached(n){if(this.receiver){if(this.receiver!==n)throw Error("Already connected to a different receiver");return!1}return this.receiver=n,!0}connecting(){this[ls]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ls]="connected";let n=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:n})):this.emit("connect",{reconnect:!0,restored:n})}restored(){if(this.state==="connected")throw Error("Already connected");this[ls]="connected";let n=!0,e=!0;this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:n})}disconnected(n){this.state==="disconnected"||this.state==="closed"||(this[ls]="disconnected",this.presence.reset(),this.emit("disconnect",n))}closed(n){this.state!=="closed"&&(this[ls]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",n))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(n,e){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,n,e)}async send(n){return this.perform(void 0,n)}async whisper(n){try{await this.perform("$whisper",n)}catch(e){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",e)}}receive(n,e){this.emit("message",n,e)}on(n,e){return this.emitter.on(n,e)}once(n,e){let r=this.emitter.on(n,(...m)=>{r(),e(...m)});return r}emit(n,...e){return this.emitter.emit(n,...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((n,e)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(m=>m()),n()})),r.push(this.on("close",m=>{r.forEach(p=>p()),e(m||new Da("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}};class r1{constructor(n){this.id=n,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(n){this.channels.includes(n)||this.channels.push(n)}remove(n){let e=this.channels.indexOf(n);e>-1&&this.channels.splice(e,1)}notify(n,...e){this.state=n==="restored"?"connected":n,e.length===1?this.channels.forEach(r=>r[n](e[0])):this.channels.forEach(r=>r[n]())}pending(n){this._checkIntent(n);let e=this._pendings[0];return!e||e.intent!==n?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(n){this._checkIntent(n);let e,r={promise:new Promise(p=>{e=p}),intent:n,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,n),r.acquired=!0,r}close(n){this.disposed=!0,this.intent=void 0,this.notify("closed",n)}_checkIntent(n){if(!(n==="unsubscribed"||n==="subscribed"))throw Error(`Unknown subscription intent: ${n}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(n){let e=this._pendingTop;return!e||e.acquired||e.intent!==n?!1:(this._pendings.pop(),e.canceled=!0,!0)}}class i1{constructor(){this.queue=[]}async acquire(n,e){e==="subscribed"&&(this.queue.push(n.promise.then(()=>{this.queue.splice(this.queue.indexOf(n),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class o1{constructor(n){n.concurrentSubscribes===!1&&(this.glv=new i1),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(n){return this._subscriptions[n]}create(n,{subscribe:e,unsubscribe:r}){let m=this._subscriptions[n]=new r1(n);return m.remoteId=this._localToRemote[n],m.subscriber=e,m.unsubscriber=r,m.gvl=this.glv,m}remove(n){delete this._subscriptions[n],delete this._localToRemote[n]}storeRemoteId(n,e){this._localToRemote[n]=e;let r=this.get(n);r&&(r.remoteId=e)}}class s1{constructor(n={}){this.subscriptions=new o1(n),this._pendingMessages=[],this._remoteToLocal={}}subscribe(n,e){this._remoteToLocal[e]=n,this.subscriptions.storeRemoteId(n,e),this.flush(e)}unsubscribe(n){let e=this.subscriptions.get(n);if(!e)return;let r=e.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(n)}transmit(n,e,r){let m=this._remoteToLocal[n];if(!m){this._pendingMessages.push([n,e,r]);return}let p=this.subscriptions.get(m);p&&p.channels.forEach(g=>{g.receive(e,r)})}notify(n,e,r){let m=this._remoteToLocal[n];if(!m)return;let p=this.subscriptions.get(m);p&&p.channels.forEach(g=>g.emit(e,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(n=>n.channels)}flush(n){let e=[];for(let r of this._pendingMessages)r[0]===n?this.transmit(r[0],r[1],r[2]):e.push(r);this._pendingMessages=e}}const _p={debug:0,info:1,warn:2,error:3};let Ap=class{constructor(n){this.level=n||"warn"}log(n,e,r){_p[n]<_p[this.level]||this.writeLogEntry(n,e,r)}writeLogEntry(){throw Error("Not implemented")}debug(n,e){this.log("debug",n,e)}info(n,e){this.log("info",n,e)}warn(n,e){this.log("warn",n,e)}error(n,e){this.log("error",n,e)}},Pa=class extends Ap{writeLogEntry(){}};class a1{encode(n){return JSON.stringify(n)}decode(n){try{return JSON.parse(n)}catch{}}}let l1=0;class Sp{constructor(n={}){let{logger:e}=n;this.logger=e||new Pa,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=n.subscribeCooldownInterval||250,this.subscribeRetryInterval=n.subscribeRetryInterval||5e3}attached(n){this.cable=n}subscribe(n,e){let r={channel:n};e&&Object.assign(r,e);let m=Cp(r);if(this.pendingUnsubscriptions[m]){let g=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${g}`,m),new Promise(w=>{setTimeout(()=>{w(this.subscribe(n,e))},g)})}if(this.pendingSubscriptions[m])return this.logger.warn("subscription is already pending, skipping",m),Promise.reject(Error("Already subscribing"));let p=this.subscribeRetryInterval;return new Promise((g,w)=>{let h=++l1;this.pendingSubscriptions[m]={resolve:g,reject:w,id:h},this.cable.send(this.buildSubscribeRequest(m)),this.maybeRetrySubscribe(h,m,p)})}buildSubscribeRequest(n){return{command:"subscribe",identifier:n}}maybeRetrySubscribe(n,e,r){setTimeout(()=>{let m=this.pendingSubscriptions[e];m&&m.id===n&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,e),this.cable.send(this.buildSubscribeRequest(e)),this.maybeExpireSubscribe(n,e,r))},r)}maybeExpireSubscribe(n,e,r){setTimeout(()=>{let m=this.pendingSubscriptions[e];m&&m.id===n&&(delete this.pendingSubscriptions[e],m.reject(new e1(`Haven't received subscription ack in ${r*2}ms for ${e}`)))},r)}unsubscribe(n){return this.cable.send({command:"unsubscribe",identifier:n}),this.pendingUnsubscriptions[n]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[n]},this.subscribeCooldownInterval),Promise.resolve()}perform(n,e,r){return e==="$whisper"?this.whisper(n,r):(r||(r={}),r.action||=e,this.cable.send({command:"message",identifier:n,data:JSON.stringify(r)}),Promise.resolve())}whisper(n,e){return this.cable.send({command:"whisper",identifier:n,data:e}),Promise.resolve()}receive(n){if(typeof n!="object"){this.logger.error("unsupported message format",{message:n});return}let{type:e,identifier:r,message:m,reason:p,reconnect:g}=n;if(e==="ping")return this.cable.keepalive(n.message);if(this.cable.keepalive(),e==="welcome"){let w=n.sid;return w&&this.cable.setSessionId(w),this.cable.connected()}if(e==="disconnect"){let w=new Ui(p);this.reset(w),g===!1?this.cable.closed(w):this.cable.disconnected(w);return}if(e==="confirm_subscription"){let w=this.pendingSubscriptions[r];if(!w){this.logger.error("subscription not found, unsubscribing",{type:e,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],w.resolve(r)}if(e==="reject_subscription"){let w=this.pendingSubscriptions[r];return w?(delete this.pendingSubscriptions[r],w.reject(new $u)):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:n})}reset(n){for(let e in this.pendingSubscriptions)this.pendingSubscriptions[e].reject(n);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const $p=()=>Date.now()/1e3|0;let c1=class extends Sp{constructor(n={}){super(n),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=n.historyTimestamp,this.disableSessionRecovery=n.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=$p()),this.sessionId=void 0,this.sendPongs=n.pongs}reset(n){for(let e in this.pendingPresence)this.pendingPresence[e].reject(n);return this.pendingPresence={},super.reset()}receive(n){if(typeof n!="object"){this.logger.error("unsupported message format",{message:n});return}let{type:e,identifier:r,message:m}=n;if(e==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(n);if(e==="reject_subscription")return super.receive(n);if(e==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(n);if(e==="ping")return this.restoreSince&&(this.restoreSince=$p()),this.sendPongs&&this.sendPong(),this.cable.keepalive(n.message);if(this.cable.keepalive(),e==="confirm_history"){this.logger.debug("history result received",n),this.cable.notify("history_received",r);return}if(e==="reject_history"){this.logger.warn("failed to retrieve history",n),this.cable.notify("history_not_found",r);return}if(e==="welcome"){if(this.disableSessionRecovery||(this.sessionId=n.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),n.restored){let p=n.restored_ids||Object.keys(this.subscriptionStreams);for(let g of p)this.cable.send({identifier:g,command:"history",history:this.historyRequestFor(g)}),this.presenceInfo[g]&&this.cable.send({identifier:g,command:"join",presence:this.presenceInfo[g]});return this.cable.restored(p)}return this.cable.connected(this.sessionId)}if(e==="presence"){let p=m.type;if(p==="info"){let g=this.pendingPresence[r];g&&(delete this.pendingPresence[r],g.resolve(m))}else if(p==="error"){let g=this.pendingPresence[r];g&&(delete this.pendingPresence[r],g.reject(new Error("failed to retrieve presence")))}return{type:e,identifier:r,message:m}}if(m){let p=this.trackStreamPosition(r,n.stream_id,n.epoch,n.offset);return{identifier:r,message:m,meta:p}}this.logger.warn(`unknown message type: ${e}`,{message:n})}perform(n,e,r){switch(e){case"$presence:join":return this.join(n,r);case"$presence:leave":return this.leave(n,r);case"$presence:info":return this.presence(n,r)}return super.perform(n,e,r)}unsubscribe(n){return delete this.presenceInfo[n],super.unsubscribe(n)}buildSubscribeRequest(n){let e=super.buildSubscribeRequest(n),r=this.historyRequestFor(n);r&&(e.history=r,this.pendingHistory[n]=!0);let m=this.presenceInfo[n];return m&&(e.presence=m),e}recoverableClosure(){return!!this.sessionId}historyRequestFor(n){let e={},r=!1;if(this.subscriptionStreams[n])for(let m of this.subscriptionStreams[n]){let p=this.streamsPositions[m];p&&(r=!0,e[m]=p)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:e}}trackStreamPosition(n,e,r,m){if(!(!e||!r))return this.subscriptionStreams[n]||(this.subscriptionStreams[n]=new Set),this.subscriptionStreams[n].add(e),this.streamsPositions[e]={epoch:r,offset:m},{stream:e,epoch:r,offset:m}}async sendPong(){await new Promise(n=>setTimeout(n,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(n,e){return this.presenceInfo[n]=e,this.cable.send({command:"join",identifier:n,presence:e}),Promise.resolve()}async leave(n,e){return delete this.presenceInfo[n],this.cable.send({command:"leave",identifier:n,presence:e}),Promise.resolve()}presence(n,e){return this.pendingPresence[n]?(this.logger.warn("presence is already pending, skipping",n),Promise.reject(Error("presence request is already pending"))):new Promise((r,m)=>{this.pendingPresence[n]={resolve:r,reject:m},this.cable.send({command:"presence",identifier:n,data:e})})}};class u1 extends Da{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Rp extends kp{static identifier="__ghost__";constructor(n,e){super(e),this.channelId=n}set channelId(n){this._channelId=n}get channelId(){return this._channelId}}const h1="$pubsub";let Mp=class extends kp{static identifier=h1;async perform(n,e){if(n.startsWith("$"))return super.perform(n,e);throw Error("not implemented")}};const cs=Symbol("state");let d1=class{constructor({transport:t,protocol:n,encoder:e,logger:r,lazy:m,hubOptions:p,performFailures:g,transportConfigurator:w}){this.emitter=Wl(),this.transport=t,this.encoder=e,this.logger=r||new Pa,this.protocol=n,this.performFailures=g||"throw",this.protocol.attached(this),this.hub=new s1(p||{}),this[cs]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=w,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[cs]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[cs]="connecting";let n=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(e){this.handleClose(e)}return n}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[cs]="connected",this.recovering&&this.hub.subscriptions.all().forEach(n=>n.notify("disconnected",new Ui("recovery_failed"))),this.hub.subscriptions.all().forEach(n=>this._resubscribe(n));let t=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(t){this.logger.info("connection recovered",{remoteIds:t}),this[cs]="connected",this.hub.subscriptions.all().forEach(r=>{t&&r.remoteId&&t.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new Ui("recovery_failed")),this._resubscribe(r))});let n=!this.initialConnect,e=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:n,restored:e})}notify(t,n,e){n&&typeof n!="string"&&(e=n,n=void 0),n?this.hub.notify(n,"info",{type:t,data:e}):this.emit("info",{type:t,data:e})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new Ui(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[cs]="disconnected",this.recovering=this.protocol.recoverableClosure(t),this.recovering?this.hub.subscriptions.all().forEach(n=>n.notify("connecting")):this.hub.subscriptions.all().forEach(n=>{n.notify("disconnected",t)}),this.protocol.reset(t),this.hub.close(),this.transport.close(),this.emit("disconnect",t))}closed(t){if(this.state==="closed"||this.state==="idle")return;let n;t&&(n=t instanceof Ui?t:new Ui(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[cs]="closed";let e=n||new Ui("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",n)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let n=this.encoder.decode(t);if(n===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",n);let e=this.protocol.receive(n);if(e){this.logger.debug("processed incoming message",e);let{type:r,identifier:m,message:p,meta:g}=e;r?this.hub.notify(m,r,p):this.hub.transmit(m,p,g)}}send(t){if(this.state==="closed")throw Error("Cable is closed");let n=this.encoder.encode(t);if(n===void 0){this.logger.error("failed to encode message",{message:t});return}this.logger.debug("outgoing message",t),this.transport.send(n)}keepalive(t){this.emit("keepalive",t)}streamFrom(t){let n=new Mp({stream_name:t});return this.subscribe(n)}streamFromSigned(t){let n=new Mp({signed_stream_name:t});return this.subscribe(n)}subscribeTo(t,n){let e,r;return typeof t=="string"&&(r=t,t=Rp),e=r?new t(r,n):new t(n),this.subscribe(e)}subscribe(t){if(!t.attached(this))return t;let n=t.identifier;t.connecting();let e=this.hub.subscriptions.get(n)||this.hub.subscriptions.create(n,{subscribe:r=>this._subscribe(r,t.channelId,t.params),unsubscribe:r=>this._unsubscribe(r)});return e.add(t),e.intent==="subscribed"&&e.state==="connected"&&t.connected(),e.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,n,e){let r=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let m=await t.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}),t.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(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),t.notify("connected"),m.release();return}let p={identifier:n,params:e};this.logger.debug("subscribing",p);try{let g=await this.protocol.subscribe(n,e);this.hub.subscribe(r,g),this.logger.debug("subscribed",{...p,remoteId:g}),t.notify("connected")}catch(g){if(g){if(g instanceof $u&&this.logger.warn("rejected",p),g instanceof Ui){this.logger.debug("disconnected during subscription; will retry on connect",p),m.release();return}this.logger.error("failed to subscribe",{error:g,...p})}t.close(g),this.hub.unsubscribe(r)}m.release()}unsubscribe(t){let n=t.identifier,e=this.hub.subscriptions.get(n);if(!e)throw Error(`Subscription not found: ${n}`);e.remove(t),t.closed(),e.maybeUnsubscribe()}async _unsubscribe(t){let n=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:n});let e=await t.acquire("unsubscribed");if(e.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:n}),e.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:n}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:n,intent:t.intent}),e.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:n}),e.release();return}let r=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:n}),t.close(),this.hub.unsubscribe(n),e.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:n})}catch(m){m&&(m instanceof Ui?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:n,error:m}):this.logger.error("unsubscribe failed",{id:n,error:m}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(n)):t.state="closed",e.release()}async perform(t,n,e){if(this.performFailures==="throw")return this._perform(t,n,e);try{return await this._perform(t,n,e)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(t,n,e){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new u1;let r=this.hub.subscriptions.get(t);if(!r)throw Error(`Subscription not found: ${t}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let m=r.remoteId,p={id:m,action:n,payload:e};this.logger.debug("perform",p);try{let g=await this.protocol.perform(m,n,e);return g&&this.logger.debug("perform result",{message:g,request:p}),g}catch(g){throw this.logger.error("perform failed",{error:g,request:p}),g}}on(t,n){return this.emitter.on(t,n)}once(t,n){let e=this.emitter.on(t,(...r)=>{e(),n(...r)});return e}emit(t,...n){return this.emitter.emit(t,...n)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,n)=>{let e=[()=>delete this._pendingConnect];e.push(this.on("connect",()=>{e.forEach(r=>r()),t()})),e.push(this.on("close",r=>{e.forEach(m=>m()),n(r)})),e.push(this.on("disconnect",r=>{e.forEach(m=>m()),n(r)}))}),this._pendingConnect)}};const f1={maxMissingPings:2,maxReconnectAttempts:1/0},qs=()=>Date.now(),Tp=(t,n)=>{n=n||{};let{backoffRate:e,jitterRatio:r,maxInterval:m}=n;return e=e||2,r===void 0&&(r=.5),p=>{let g=t*e**p,w=g*e,h=g+(w-g)*Math.random(),d=2*(Math.random()-.5)*r;return h=h*(1+d),m&&m<h&&(h=m),h}};let Ep=class{constructor({pingInterval:t,...n}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(n=Object.assign({},f1,n),this.strategy=n.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=n.maxMissingPings,this.maxReconnectAttempts=n.maxReconnectAttempts,this.logger=n.logger||new Pa,this.state="pending_connect",this.attempts=0,this.disconnectedAt=qs()}watch(t){this.target=t,this.initListeners()}reconnectNow(){return this.state==="connected"||this.state==="pending_connect"||this.state==="closed"?!1:(this.cancelReconnect(),this.state="pending_connect",this.target.connect().catch(t=>{this.logger.info("Failed at reconnecting: "+t)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=qs(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=qs(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=qs(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=qs()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(t=>t()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let t=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},t)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let t=qs()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new t1))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let t=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${t}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),t)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}};class p1{constructor(n,e={}){this.transports=n,this.transport=null,this.emitter=Wl(),this.unbind=[],this.logger=e.logger||new Pa}displayName(){return"fallbacked transport"}async open(){for(let n=0;n<this.transports.length;n++){let e=this.transports[n];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(n){if(!this.transport)throw new Error("No transport is open");this.transport.send(n)}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(n,e){this.transports.forEach(r=>{r.setParam(n,e)})}setToken(n,e){this.transports.forEach(r=>{r.setToken(n,e)})}on(n,e){return this.emitter.on(n,e)}once(n,e){let r=this.emitter.on(n,(...m)=>{r(),e(...m)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(n=>n()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",n=>{this.emitter.emit("data",n)}),this.transport.on("close",n=>{this.emitter.emit("close",n)}),this.transport.on("error",n=>{this.emitter.emit("error",n)}))}}let g1=class{constructor(n,e={}){this.url=n;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=Wl();let{format:m,subprotocol:p,authStrategy:g}=e;this.format=m||"text",this.connectionOptions=e.websocketOptions,this.authStrategy=g||"param",this.authProtocol="",this.subprotocol=p}displayName(){return"WebSocket("+this.url+")"}open(){let n=this.subprotocol;return this.authStrategy==="sub-protocol"&&(n=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,n,this.connectionOptions):this.ws=new this.Impl(this.url,n),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((e,r)=>{let m=[];m.push(this.once("open",()=>{m.forEach(p=>p()),e()})),m.push(this.once("close",()=>{m.forEach(p=>p()),r(Error("WS connection closed"))}))})}setURL(n){this.url=n}setParam(n,e){let r=new URL(this.url);r.searchParams.set(n,e);let m=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(m)}setToken(n,e="jid"){if(this.authStrategy==="param")this.setParam(e,n);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]=n}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${n}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(n){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(n)}close(){this.ws?this.onclose():this.connected=!1}on(n,e){return this.emitter.on(n,e)}once(n,e){let r=this.emitter.on(n,(...m)=>{r(),e(...m)});return r}initListeners(){this.ws.onerror=n=>{this.connected&&this.emitter.emit("error",n.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=n=>{let e=n.data;this.format==="binary"&&(e=new Uint8Array(e)),this.emitter.emit("data",e)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}};class m1{constructor(n){this.channel=n}notify(n,...e){typeof this[n]=="function"&&this[n](...e)}perform(n,e={}){this.channel.perform(n,e)}send(n){this.channel.send(n)}whisper(n){return this.channel.whisper(n)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class v1 extends Rp{constructor(n,e,r){super(n,e),this.subscription=new m1(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 $u?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}let y1=class{constructor(n){this.cable=n}create(n,e){let r,m;typeof n=="object"?(r=n.channel,delete n.channel,m=n):(r=n,m={});let p=new v1(r,m,e);return p.subscription.notify("initialized"),this.cable.subscribe(p),p.subscription}findAll(n){return this.cable.hub.channels.filter(e=>e.identifier===n).map(e=>e.subscription)}},b1=class{constructor(n){this.cable=n,this.subscriptions=new y1(n)}send(n){return this.cable.send(n)}connect(){return this.cable.connect()}disconnect(){return this.cable.disconnect()}ensureActiveConnection(){return this.cable.connect()}};const Ip={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function w1(t,n){if(typeof t=="object"&&typeof n>"u"&&(n=t,t=void 0),n=n||{},!t&&!n.transport)throw Error("URL or transport must be specified");n=Object.assign({},Ip,n);let{protocol:e,websocketImplementation:r,websocketFormat:m,websocketOptions:p,websocketAuthStrategy:g,fallbacks:w,logLevel:h,logger:d,transport:a,encoder:l,lazy:c,monitor:u,pingInterval:i,reconnectStrategy:s,maxMissingPings:f,maxReconnectAttempts:b,subprotocol:x,tokenRefresher:I,historyTimestamp:R,protocolOptions:A,concurrentSubscribes:C,performFailures:O,transportConfigurator:D,auth:E}=n;if(d=d||new Pa(h),typeof e=="string"){x=x||e;let F=e.substring(0,e.lastIndexOf("-")),N=e.substring(e.lastIndexOf("-")+1);if(A=A||{},F==="actioncable-v1")e=new Sp({logger:d,...A});else if(F==="actioncable-v1-ext")e=new c1({logger:d,historyTimestamp:R,...A});else throw Error(`Protocol is not supported yet: ${e}`);if(N==="json")l=l||new a1,m=m||"text";else if(N==="msgpack"){if(m="binary",!l)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",!l)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${e}`)}if(!e)throw Error("Protocol must be specified");a=a||new g1(t,{websocketImplementation:r,websocketOptions:p,subprotocol:x,authStrategy:g,format:m}),w&&(a=new p1([a,...w],{logger:d})),E&&E.token&&a.setToken(E.token,E.param||"jid"),s=s||Tp(i),u!==!1&&(u=u||new Ep({pingInterval:i,reconnectStrategy:s,maxMissingPings:f,maxReconnectAttempts:b,logger:d}));let T={concurrentSubscribes:C},B=new d1({protocol:e,transport:a,encoder:l,logger:d,lazy:c,hubOptions:T,performFailures:O,transportConfigurator:D});return u&&(u.watch(B),B.monitor=u),I&&x1(B,async()=>{try{await I(a)}catch(F){return d.error("Failed to refresh authentication token: "+F),!1}return B.connect().catch(()=>{}),!0}),B}function x1(t,n){let e=!1;t.on("connect",()=>e=!1),t.on("close",async r=>{if(r){if(e){t.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(e=!0,await n())}})}class C1 extends Ap{writeLogEntry(n,e,r){r?console[n](e,r):console[n](e)}}class k1 extends Ep{watch(n){super.watch(n),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let n=()=>{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 Ui("page_frozen"));document.addEventListener("visibilitychange",n,!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",n,!1),window.removeEventListener("focus",e,!1),window.removeEventListener("online",e,!1),window.removeEventListener("resume",e,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(n){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:n.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(n))}}const _1=["cable","action-cable"],A1="/cable",Bl=(t,n)=>{for(let e of _1){let r=t.head.querySelector(`meta[name='${e}-${n}']`);if(r)return r.getAttribute("content")}},Lp=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,S1=()=>{if(typeof document<"u"&&document.head){let t=Bl(document,"url");if(t)return Lp(t)}return Lp(A1)},$1=()=>{if(typeof document<"u"&&document.head){let t=Bl(document,"history-timestamp");if(t)return t|0}},R1=()=>{if(typeof document<"u"&&document.head)return Bl(document,"token")},M1=()=>{if(typeof document<"u"&&document.head)return Bl(document,"token-param")};function T1(t,n){typeof t=="object"&&typeof n>"u"&&(n=t,t=void 0),t=t||S1(),n=n||{},n.historyTimestamp||=$1();let e=R1();if(e){let d=M1();n.auth=Object.assign({token:e,param:d},n.auth||{})}n=Object.assign({},Ip,n);let{logLevel:r,logger:m,pingInterval:p,reconnectStrategy:g,maxMissingPings:w,maxReconnectAttempts:h}=n;return m=n.logger=n.logger||new C1(r),g=n.reconnectStrategy=n.reconnectStrategy||Tp(p),n.monitor!==!1&&(n.monitor=n.monitor||new k1({pingInterval:p,reconnectStrategy:g,maxMissingPings:w,maxReconnectAttempts:h,logger:m})),w1(t,n)}function E1(t,n){let e=T1(t,n);return new b1(e)}class I1{constructor(n="/openc3-api/cable",e="/openc3-api/auth/otp"){this._cable=null,this._url=n,this._otpUrl=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(n,e,r={},m={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(p=>(p&&OpenC3Auth.setTokens(),Qx.get(this._otpUrl,{params:{scope:e}}))).then(({data:p})=>{if(this._cable==null){const g=new URL(this._url,document.baseURI);g.searchParams.set("scope",e),g.searchParams.set("authorization",p),this._cable=E1(g.href)}return this._cable.subscriptions.create({channel:n,...m},r)})}recordPing(){}}Tn("z",I1),Tn("N",class{constructor(n,e,r="",m=""){this.keyword=n.keyword,this.parameters=n.parameters,this.filename=n.filename,this.line=n.line,this.lineNumber=n.lineNumber,this.message=e,this.usage=r,this.url=m}});function Fa(t){return L1.test(t)}const L1=/^-?[0-9]+$/;function Op(t){return O1.test(t)}const O1=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Np(t,n){if(Fa(t))return Number.isSafeInteger(Number.parseInt(t,10));const e=Number.parseFloat(t),r=String(e);if(t===r)return!0;const m=Dp(t),p=Dp(r);return!!(m===p||n?.approx===!0&&!Fa(t)&&p.length>=14&&m.startsWith(p.substring(0,14)))}let za=(function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t})({});function N1(t){if(Np(t,{approx:!1}))return;if(Fa(t))return za.truncate_integer;const n=Number.parseFloat(t);return Number.isFinite(n)?n===0?za.underflow:za.truncate_float:za.overflow}function Dp(t){const{start:n,end:e}=D1(t),r=t.substring(n,e),m=r.indexOf(".");return m===-1?r:r.substring(0,m)+r.substring(m+1)}function D1(t){let n=0;for(t[0]==="-"&&n++;t[n]==="0"||t[n]===".";)n++;let e=t.lastIndexOf("e");for(e===-1&&(e=t.lastIndexOf("E")),e===-1&&(e=t.length);(t[e-1]==="0"||t[e-1]===".")&&e>n;)e--;return{start:n,end:e}}class P1{isLosslessNumber=!0;constructor(n){if(!Op(n))throw new Error(`Invalid number (value: "${n}")`);this.value=n}valueOf(){const n=N1(this.value);if(n===void 0||n===za.truncate_float)return Number.parseFloat(this.value);if(Fa(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${n} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function F1(t){return t&&typeof t=="object"&&t.isLosslessNumber||!1}function z1(t){return new P1(t)}function W1(t,n){return Ru({"":t},"",t,n)}function Ru(t,n,e,r){return Array.isArray(e)?r.call(t,n,j1(e,r)):e&&typeof e=="object"&&!F1(e)?r.call(t,n,B1(e,r)):r.call(t,n,e)}function B1(t,n){for(const e of Object.keys(t)){const r=Ru(t,e,t[e],n);r!==void 0?t[e]=r:delete t[e]}return t}function j1(t,n){for(let e=0;e<t.length;e++)t[e]=Ru(t,String(e),t[e],n);return t}function H1(t,n,e){const r=typeof e=="function"?{parseNumber:e}:e,m=r?.parseNumber??z1,p=r?.onDuplicateKey??O;let g=0;const w=a();return b(w),I(),n?W1(w,n):w;function h(){if(t.charCodeAt(g)===Y1){g++,c();const W={};let U=!0;for(;g<t.length&&t.charCodeAt(g)!==Fp;){U?U=!1:(s(),c());const q=g,Z=u();if(Z===void 0){C();return}c(),f();const Q=a();if(Q===void 0){F();return}if(Object.prototype.hasOwnProperty.call(W,Z)&&!Mu(Q,W[Z])){const le=p({key:Z,position:q+1,oldValue:W[Z],newValue:Q});le!==void 0&&(W[Z]=le)}else W[Z]=Q}return t.charCodeAt(g)!==Fp&&D(),g++,W}}function d(){if(t.charCodeAt(g)===J1){g++,c();const W=[];let U=!0;for(;g<t.length&&t.charCodeAt(g)!==zp;){U?U=!1:s();const q=a();x(q),W.push(q)}return t.charCodeAt(g)!==zp&&E(),g++,W}}function a(){c();const W=u()??i()??h()??d()??l("true",!0)??l("false",!1)??l("null",null);return c(),W}function l(W,U){if(t.slice(g,g+W.length)===W)return g+=W.length,U}function c(){for(;U1(t.charCodeAt(g));)g++}function u(){if(t.charCodeAt(g)===Tu){g++;let W="";for(;g<t.length&&t.charCodeAt(g)!==Tu;){if(t.charCodeAt(g)===K1){const U=t[g+1],q=q1[U];q!==void 0?(W+=q,g++):U==="u"?jl(t.charCodeAt(g+2))&&jl(t.charCodeAt(g+3))&&jl(t.charCodeAt(g+4))&&jl(t.charCodeAt(g+5))?(W+=String.fromCharCode(Number.parseInt(t.slice(g+2,g+6),16)),g+=5):N(g):B(g)}else G1(t.charCodeAt(g))?W+=t[g]:T(t[g]);g++}return A(),g++,W}}function i(){const W=g;if(t.charCodeAt(g)===Wp&&(g++,R(W)),t.charCodeAt(g)===Eu)g++;else if(V1(t.charCodeAt(g)))for(g++;Hl(t.charCodeAt(g));)g++;if(t.charCodeAt(g)===iC)for(g++,R(W);Hl(t.charCodeAt(g));)g++;if(t.charCodeAt(g)===cC||t.charCodeAt(g)===lC)for(g++,(t.charCodeAt(g)===Wp||t.charCodeAt(g)===tC)&&g++,R(W);Hl(t.charCodeAt(g));)g++;if(g>W)return m(t.slice(W,g))}function s(){if(t.charCodeAt(g)!==rC)throw new SyntaxError(`Comma ',' expected after value ${L()}`);g++}function f(){if(t.charCodeAt(g)!==oC)throw new SyntaxError(`Colon ':' expected after property name ${L()}`);g++}function b(W){if(W===void 0)throw new SyntaxError(`JSON value expected ${L()}`)}function x(W){if(W===void 0)throw new SyntaxError(`Array item expected ${L()}`)}function I(){if(g<t.length)throw new SyntaxError(`Expected end of input ${L()}`)}function R(W){if(!Hl(t.charCodeAt(g))){const U=t.slice(W,g);throw new SyntaxError(`Invalid number '${U}', expecting a digit ${L()}`)}}function A(){if(t.charCodeAt(g)!==Tu)throw new SyntaxError(`End of string '"' expected ${L()}`)}function C(){throw new SyntaxError(`Quoted object key expected ${L()}`)}function O(W){let{key:U,position:q}=W;throw new SyntaxError(`Duplicate key '${U}' encountered at position ${q}`)}function D(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${L()}`)}function E(){throw new SyntaxError(`Array item or end of array ']' expected ${L()}`)}function T(W){throw new SyntaxError(`Invalid character '${W}' ${$()}`)}function B(W){const U=t.slice(W,W+2);throw new SyntaxError(`Invalid escape character '${U}' ${$()}`)}function F(){throw new SyntaxError(`Object value expected after ':' ${$()}`)}function N(W){const U=t.slice(W,W+6);throw new SyntaxError(`Invalid unicode character '${U}' ${$()}`)}function $(){return`at position ${g}`}function k(){return g<t.length?`but got '${t[g]}'`:"but reached end of input"}function L(){return`${k()} ${$()}`}}function U1(t){return t===X1||t===Z1||t===Q1||t===eC}function jl(t){return t>=Eu&&t<=Iu||t>=sC&&t<=uC||t>=aC&&t<=hC}function Hl(t){return t>=Eu&&t<=Iu}function V1(t){return t>=nC&&t<=Iu}function G1(t){return t>=32&&t<=1114111}function Mu(t,n){return t===n?!0:Array.isArray(t)&&Array.isArray(n)?t.length===n.length&&t.every((e,r)=>Mu(e,n[r])):Pp(t)&&Pp(n)?[...new Set([...Object.keys(t),...Object.keys(n)])].every(e=>Mu(t[e],n[e])):!1}function Pp(t){return typeof t=="object"&&t!==null}const q1={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
10
+ `,r:"\r",t:" "},K1=92,Y1=123,Fp=125,J1=91,zp=93,X1=32,Z1=10,Q1=9,eC=13,Tu=34,tC=43,Wp=45,Eu=48,nC=49,Iu=57,rC=44,iC=46,oC=58,sC=65,aC=97,lC=69,cC=101,uC=70,hC=102;function Bp(t,n,e,r){return m(t);function m(h,d){if(Array.isArray(r)){const a=r.find(l=>l.test(h));if(a){const l=a.stringify(h);if(typeof l!="string"||!Op(l))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${l})`);return l}}if(typeof h=="boolean"||typeof h=="number"||typeof h=="string"||h===null||h instanceof Date||h instanceof Boolean||h instanceof Number||h instanceof String)return JSON.stringify(h);if(h?.isLosslessNumber||typeof h=="bigint")return h.toString();if(Array.isArray(h))return p(h);if(h&&typeof h=="object")return g(h)}function p(h,d){if(h.length===0)return"[]";let a="[";for(let l=0;l<h.length;l++){const c=h[l];typeof c<"u"&&typeof c!="function"?a+=m(c):a+="null",l<h.length-1&&(a+=",")}return a+="]",a}function g(h,d){if(typeof h.toJSON=="function")return Bp(h.toJSON(),n,e,void 0);const a=Array.isArray(n)?n.map(String):Object.keys(h);if(a.length===0)return"{}";let l=!0,c="{";for(const u of a){const i=h[u];if(w(u,i)){l?l=!1:c+=",";const s=JSON.stringify(u);c+=`${s}:`,c+=m(i)}}return c+="}",c}function w(h,d){return typeof d<"u"&&typeof d!="function"&&typeof d!="symbol"}}function dC(t){return Fa(t)&&!Np(t)?BigInt(t):parseFloat(t)}let us=class{id=1;constructor(){}async exec(n,e,r={},m={},p=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 Au.post("/openc3-api/api",{jsonrpc:"2.0",method:n,params:e,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...m},timeout:p,transformRequest:[(g,w)=>Bp(g)],transformResponse:[g=>{try{return H1(g,void 0,dC)}catch{const w=typeof g=="string"?g.substring(0,200):String(g),h=new Error(`Server returned non-JSON response: ${w}`);throw h.name="ServerError",h}}]})).data.result}catch(g){let w=new Error;throw g.response?(w.name=g.response.data.error.data.class,w.message=g.response.data.error.data.message,w.object=g.response.data.error):g.request?(w.name="Request error",w.message="Request error, no response received"):w=g,w}}decode_openc3_type(n){if(n!==null&&typeof n=="object"&&n.json_class=="Float"&&n.raw){if(n.raw=="NaN")return NaN;if(n.raw=="Infinity")return 1/0;if(n.raw=="-Infinity")return-1/0}return null}encode_openc3_type(n){return Number.isNaN(n)?{json_class:"Float",raw:"NaN"}:n==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:n==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(n=>{n&&(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(n){return this.exec("set_offline_access",[n])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(n,e,r,m,p){return this.exec("map_target_to_interface",[n,e],{cmd_only:r,tlm_only:m,unmap_old:p})}unmap_target_from_interface(n,e,r,m){return this.exec("unmap_target_from_interface",[n,e],{cmd_only:r,tlm_only:m})}connect_interface(n,...e){return e.length>0?this.exec("connect_interface",[n,...e]):this.exec("connect_interface",[n])}disconnect_interface(n){return this.exec("disconnect_interface",[n])}interface_cmd(n,e,...r){return this.exec("interface_cmd",[n,e,...r])}interface_target_enable(n,e,r=!1,m=!1){return this.exec("interface_target_enable",[n,e],{cmd_only:r,tlm_only:m})}interface_target_disable(n,e,r=!1,m=!1){return this.exec("interface_target_disable",[n,e],{cmd_only:r,tlm_only:m})}interface_details(n){return this.exec("interface_details",[n])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(n,e,r,m,p){return this.exec("map_target_to_router",[n,e],{cmd_only:r,tlm_only:m,unmap_old:p})}unmap_target_from_router(n,e,r,m){return this.exec("unmap_target_from_router",[n,e],{cmd_only:r,tlm_only:m})}connect_router(n){return this.exec("connect_router",[n])}disconnect_router(n){return this.exec("disconnect_router",[n])}router_target_enable(n,e,r=!1,m=!1){return this.exec("router_target_enable",[n,e],{cmd_only:r,tlm_only:m})}router_target_disable(n,e,r=!1,m=!1){return this.exec("router_target_disable",[n,e],{cmd_only:r,tlm_only:m})}router_details(n){return this.exec("router_details",[n])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(n){return this.exec("get_tlm_cnts",[n])}get_item(n,e,r){return this.exec("get_item",[n,e,r])}get_param(n,e,r){return this.exec("get_param",[n,e,r])}get_parameter(n,e,r){return this.exec("get_param",[n,e,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(n){return this.exec("set_limits_set",[n])}get_target(n){return this.exec("get_target",[n])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(n,e){return this.exec("get_tlm",[n,e])}get_telemetry(n,e){return this.exec("get_tlm",[n,e])}get_all_tlm(n){return this.exec("get_all_tlm",[n])}get_all_telemetry(n){return this.exec("get_all_tlm",[n])}get_all_tlm_names(n,e=!1){return this.exec("get_all_tlm_names",[n],{hidden:e})}get_all_telemetry_names(n){return this.exec("get_all_tlm_names",[n])}get_all_tlm_item_names(n){return this.exec("get_all_tlm_item_names",[n])}async get_tlm_packet(n,e,r,m=30){const p=await this.exec("get_tlm_packet",[n,e],{type:r,stale_time:m});if(p!=null){let g=p.length,w=null;for(let h=0;h<g;h++)w=this.decode_openc3_type(p[h][1]),w!==null&&(p[h][1]=w)}return p}get_packet_derived_items(n,e){return this.exec("get_packet_derived_items",[n,e])}get_tlm_buffer(n,e){return this.exec("get_tlm_buffer",[n,e])}get_tlm_available(n){return this.exec("get_tlm_available",[n])}async get_tlm_values(n,e=30,r=null,m=null,p=null){let g={stale_time:e};r!==null&&(g.cache_timeout=r),m!==null&&(g.start_time=m.toISOString()),p!==null&&(g.end_time=p.toISOString());const w=await this.exec("get_tlm_values",[n],g,{},1e4);if(w&&w.length>0){let h=w.length,d=null;for(let a=0;a<h;a++)d=this.decode_openc3_type(w[a][0]),d!==null&&(w[a][0]=d)}return w}get_limits(n,e,r){return this.exec("get_limits",[n,e,r])}async tlm(n,e,r,m="CONVERTED"){let p=null;if(e===void 0)p=await this.exec("tlm",[n]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED"].includes(e))p=await this.exec("tlm",[n],{type:e});else{let w=new Error;throw w.name="TypeError",w.message=`Invalid data type ${e}. Valid options are RAW, CONVERTED or FORMATTED.`,w}else p=await this.exec("tlm",[n,e,r],{type:m});let g=this.decode_openc3_type(p);return g!==null&&(p=g),p}async inject_tlm(n,e,r=null,m="CONVERTED",p=!1){await this.exec("inject_tlm",[n,e,r],{type:m,stored:p})}set_tlm(n,e,r,m){return this.exec("set_tlm",[n,e,r],{type:m})}override_tlm(n,e,r,m){return this.exec("override_tlm",[n,e,r],{type:m})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(n,e,r,m){return this.exec("normalize_tlm",[n,e,r],{type:m})}get_all_cmds(n){return this.exec("get_all_cmds",[n])}get_all_commands(n){return this.exec("get_all_cmds",[n])}get_all_cmd_names(n,e=!1){return this.exec("get_all_cmd_names",[n],{hidden:e})}get_all_command_names(n){return this.exec("get_all_cmd_names",[n])}get_cmd(n,e){return this.exec("get_cmd",[n,e])}get_command(n,e){return this.exec("get_cmd",[n,e])}get_cmd_cnts(n){return this.exec("get_cmd_cnts",[n])}get_cmd_value(n,e,r,m="CONVERTED"){return this.exec("get_cmd_value",[n,e,r,m])}get_cmd_buffer(n,e){return this.exec("get_cmd_buffer",[n,e])}_cmd(n,e,r,m,p,g={}){let w=null;for(let h in m)Object.prototype.hasOwnProperty.call(m,h)&&(w=this.encode_openc3_type(m[h]),w!==null&&(m[h]=w));return this.exec(n,[e,r,m],g,p)}get_cmd_hazardous(n,e,r,m={}){return e===void 0?this.exec("get_cmd_hazardous",n,{},m):this._cmd("get_cmd_hazardous",n,e,r,m)}cmd(n,e,r,m={},p={}){return e===void 0?this.exec("cmd",n,p,m):this._cmd("cmd",n,e,r,m,p)}cmd_no_range_check(n,e,r,m={},p={}){return e===void 0?this.exec("cmd_no_range_check",n,p,m):this._cmd("cmd_no_range_check",n,e,r,m,p)}cmd_raw(n,e,r,m={},p={}){return e===void 0?this.exec("cmd_raw",n,p,m):this._cmd("cmd_raw",n,e,r,m,p)}cmd_raw_no_range_check(n,e,r,m={},p={}){return e===void 0?this.exec("cmd_raw_no_range_check",n,p,m):this._cmd("cmd_raw_no_range_check",n,e,r,m,p)}cmd_no_hazardous_check(n,e,r,m={},p={}){return e===void 0?this.exec("cmd_no_hazardous_check",n,p,m):this._cmd("cmd_no_hazardous_check",n,e,r,m,p)}cmd_no_checks(n,e,r,m={},p={}){return e===void 0?this.exec("cmd_no_checks",n,p,m):this._cmd("cmd_no_checks",n,e,r,m,p)}cmd_raw_no_hazardous_check(n,e,r,m={},p={}){return e===void 0?this.exec("cmd_raw_no_hazardous_check",n,p,m):this._cmd("cmd_raw_no_hazardous_check",n,e,r,m,p)}cmd_raw_no_checks(n,e,r,m={},p={}){return e===void 0?this.exec("cmd_raw_no_checks",n,p,m):this._cmd("cmd_raw_no_checks",n,e,r,m,p)}build_cmd(n,e,r,m={},p={}){return e===void 0?this.exec("build_cmd",n,p,m):this._cmd("build_cmd",n,e,r,m,p)}build_command(n,e,r,m={},p={}){return e===void 0?this.exec("build_cmd",n,p,m):this._cmd("build_cmd",n,e,r,m,p)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(n,e){return this.exec("send_raw",[n,e])}list_configs(n){return this.exec("list_configs",[n])}load_config(n,e){return this.exec("load_config",[n,e])}save_config(n,e,r){return this.exec("save_config",[n,e,r])}delete_config(n,e){return this.exec("delete_config",[n,e])}enable_limits(n,e,r){return this.exec("enable_limits",[n,e,r])}disable_limits(n,e,r){return this.exec("disable_limits",[n,e,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(n){return this.exec("get_overall_limits_state",[n])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(n,e){return this.exec("get_setting",[n],e)}get_settings(n,e){return this.exec("get_settings",n,e)}set_setting(n,e){return this.exec("set_setting",[n,e])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(n,e){return this.exec("set_setting",[n,e])}get_metrics(){return this.exec("get_metrics",[])}open_tab(n){window.open(n,"_blank")}async hashString(n){if(window.isSecureContext){const e=new TextEncoder().encode(n),r=await crypto.subtle.digest("SHA-256",e),m=new Uint8Array(r);return Array.from(m).map(p=>p.toString(16).padStart(2,"0")).join("")}}};Tn("J",us);const jp=6048e5,fC=864e5,Ul=6e4,Lu=36e5,pC=1e3,Hp=Symbol.for("constructDateFrom");Tn({X:Ul,Q:Lu,G:pC});function oo(t,n){return typeof t=="function"?t(n):t&&typeof t=="object"&&Hp in t?t[Hp](n):t instanceof Date?new t.constructor(n):new Date(n)}function Wr(t,n){return oo(n||t,t)}let gC={};function Ks(){return gC}function Ys(t,n){const e=Ks(),r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??e.weekStartsOn??e.locale?.options?.weekStartsOn??0,m=Wr(t,n?.in),p=m.getDay(),g=(p<r?7:0)+p-r;return m.setDate(m.getDate()-g),m.setHours(0,0,0,0),m}function Wa(t,n){return Ys(t,{...n,weekStartsOn:1})}function Up(t,n){const e=Wr(t,n?.in),r=e.getFullYear(),m=oo(e,0);m.setFullYear(r+1,0,4),m.setHours(0,0,0,0);const p=Wa(m),g=oo(e,0);g.setFullYear(r,0,4),g.setHours(0,0,0,0);const w=Wa(g);return e.getTime()>=p.getTime()?r+1:e.getTime()>=w.getTime()?r:r-1}function Ou(t){const n=Wr(t),e=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return e.setUTCFullYear(n.getFullYear()),+t-+e}function mC(t,...n){const e=oo.bind(null,n.find(r=>typeof r=="object"));return n.map(e)}function Vp(t,n){const e=Wr(t,n?.in);return e.setHours(0,0,0,0),e}function vC(t,n,e){const[r,m]=mC(e?.in,t,n),p=Vp(r),g=Vp(m),w=+p-Ou(p),h=+g-Ou(g);return Math.round((w-h)/fC)}function yC(t,n){const e=Up(t,n),r=oo(t,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),Wa(r)}function bC(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Gp(t){return!(!bC(t)&&typeof t!="number"||isNaN(+Wr(t)))}function wC(t,n){const e=Wr(t,n?.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const xC={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"}},CC=(t,n,e)=>{let r;const m=xC[t];return typeof m=="string"?r=m:n===1?r=m.one:r=m.other.replace("{{count}}",n.toString()),e?.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function Nu(t){return(n={})=>{const e=n.width?String(n.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}const kC={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},_C={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},AC={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},SC={date:Nu({formats:kC,defaultWidth:"full"}),time:Nu({formats:_C,defaultWidth:"full"}),dateTime:Nu({formats:AC,defaultWidth:"full"})},$C={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},RC=(t,n,e,r)=>$C[t];function Ba(t){return(n,e)=>{const r=e?.context?String(e.context):"standalone";let m;if(r==="formatting"&&t.formattingValues){const g=t.defaultFormattingWidth||t.defaultWidth,w=e?.width?String(e.width):g;m=t.formattingValues[w]||t.formattingValues[g]}else{const g=t.defaultWidth,w=e?.width?String(e.width):t.defaultWidth;m=t.values[w]||t.values[g]}const p=t.argumentCallback?t.argumentCallback(n):n;return m[p]}}const MC={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},TC={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},EC={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"]},IC={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"]},LC={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"}},OC={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"}},NC=(t,n)=>{const e=Number(t),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"},DC={ordinalNumber:NC,era:Ba({values:MC,defaultWidth:"wide"}),quarter:Ba({values:TC,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Ba({values:EC,defaultWidth:"wide"}),day:Ba({values:IC,defaultWidth:"wide"}),dayPeriod:Ba({values:LC,defaultWidth:"wide",formattingValues:OC,defaultFormattingWidth:"wide"})};function ja(t){return(n,e={})=>{const r=e.width,m=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],p=n.match(m);if(!p)return null;const g=p[0],w=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],h=Array.isArray(w)?FC(w,l=>l.test(g)):PC(w,l=>l.test(g));let d;d=t.valueCallback?t.valueCallback(h):h,d=e.valueCallback?e.valueCallback(d):d;const a=n.slice(g.length);return{value:d,rest:a}}}function PC(t,n){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&n(t[e]))return e}function FC(t,n){for(let e=0;e<t.length;e++)if(n(t[e]))return e}function zC(t){return(n,e={})=>{const r=n.match(t.matchPattern);if(!r)return null;const m=r[0],p=n.match(t.parsePattern);if(!p)return null;let g=t.valueCallback?t.valueCallback(p[0]):p[0];g=e.valueCallback?e.valueCallback(g):g;const w=n.slice(m.length);return{value:g,rest:w}}}const WC=/^(\d+)(th|st|nd|rd)?/i,BC=/\d+/i,jC={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},HC={any:[/^b/i,/^(a|c)/i]},UC={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},VC={any:[/1/i,/2/i,/3/i,/4/i]},GC={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},qC={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]},KC={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},YC={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]},JC={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},XC={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}},ZC={ordinalNumber:zC({matchPattern:WC,parsePattern:BC,valueCallback:t=>parseInt(t,10)}),era:ja({matchPatterns:jC,defaultMatchWidth:"wide",parsePatterns:HC,defaultParseWidth:"any"}),quarter:ja({matchPatterns:UC,defaultMatchWidth:"wide",parsePatterns:VC,defaultParseWidth:"any",valueCallback:t=>t+1}),month:ja({matchPatterns:GC,defaultMatchWidth:"wide",parsePatterns:qC,defaultParseWidth:"any"}),day:ja({matchPatterns:KC,defaultMatchWidth:"wide",parsePatterns:YC,defaultParseWidth:"any"}),dayPeriod:ja({matchPatterns:JC,defaultMatchWidth:"any",parsePatterns:XC,defaultParseWidth:"any"})},QC=Tn("u",{code:"en-US",formatDistance:CC,formatLong:SC,formatRelative:RC,localize:DC,match:ZC,options:{weekStartsOn:0,firstWeekContainsDate:1}});function ek(t,n){const e=Wr(t,n?.in);return vC(e,wC(e))+1}function qp(t,n){const e=Wr(t,n?.in),r=+Wa(e)-+yC(e);return Math.round(r/jp)+1}function Du(t,n){const e=Wr(t,n?.in),r=e.getFullYear(),m=Ks(),p=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??m.firstWeekContainsDate??m.locale?.options?.firstWeekContainsDate??1,g=oo(n?.in||t,0);g.setFullYear(r+1,0,p),g.setHours(0,0,0,0);const w=Ys(g,n),h=oo(n?.in||t,0);h.setFullYear(r,0,p),h.setHours(0,0,0,0);const d=Ys(h,n);return+e>=+w?r+1:+e>=+d?r:r-1}function tk(t,n){const e=Ks(),r=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??e.firstWeekContainsDate??e.locale?.options?.firstWeekContainsDate??1,m=Du(t,n),p=oo(n?.in||t,0);return p.setFullYear(m,0,r),p.setHours(0,0,0,0),Ys(p,n)}function Kp(t,n){const e=Wr(t,n?.in),r=+Ys(e,n)-+tk(e,n);return Math.round(r/jp)+1}function ln(t,n){const e=t<0?"-":"",r=Math.abs(t).toString().padStart(n,"0");return e+r}const Wo={y(t,n){const e=t.getFullYear(),r=e>0?e:1-e;return ln(n==="yy"?r%100:r,n.length)},M(t,n){const e=t.getMonth();return n==="M"?String(e+1):ln(e+1,2)},d(t,n){return ln(t.getDate(),n.length)},a(t,n){const e=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];default:return e==="am"?"a.m.":"p.m."}},h(t,n){return ln(t.getHours()%12||12,n.length)},H(t,n){return ln(t.getHours(),n.length)},m(t,n){return ln(t.getMinutes(),n.length)},s(t,n){return ln(t.getSeconds(),n.length)},S(t,n){const e=n.length,r=t.getMilliseconds(),m=Math.trunc(r*Math.pow(10,e-3));return ln(m,n.length)}},Js={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Yp={G:function(t,n,e){const r=t.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});default:return e.era(r,{width:"wide"})}},y:function(t,n,e){if(n==="yo"){const r=t.getFullYear(),m=r>0?r:1-r;return e.ordinalNumber(m,{unit:"year"})}return Wo.y(t,n)},Y:function(t,n,e,r){const m=Du(t,r),p=m>0?m:1-m;if(n==="YY"){const g=p%100;return ln(g,2)}return n==="Yo"?e.ordinalNumber(p,{unit:"year"}):ln(p,n.length)},R:function(t,n){const e=Up(t);return ln(e,n.length)},u:function(t,n){const e=t.getFullYear();return ln(e,n.length)},Q:function(t,n,e){const r=Math.ceil((t.getMonth()+1)/3);switch(n){case"Q":return String(r);case"QQ":return ln(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,n,e){const r=Math.ceil((t.getMonth()+1)/3);switch(n){case"q":return String(r);case"qq":return ln(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,n,e){const r=t.getMonth();switch(n){case"M":case"MM":return Wo.M(t,n);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(t,n,e){const r=t.getMonth();switch(n){case"L":return String(r+1);case"LL":return ln(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(t,n,e,r){const m=Kp(t,r);return n==="wo"?e.ordinalNumber(m,{unit:"week"}):ln(m,n.length)},I:function(t,n,e){const r=qp(t);return n==="Io"?e.ordinalNumber(r,{unit:"week"}):ln(r,n.length)},d:function(t,n,e){return n==="do"?e.ordinalNumber(t.getDate(),{unit:"date"}):Wo.d(t,n)},D:function(t,n,e){const r=ek(t);return n==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):ln(r,n.length)},E:function(t,n,e){const r=t.getDay();switch(n){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(t,n,e,r){const m=t.getDay(),p=(m-r.weekStartsOn+8)%7||7;switch(n){case"e":return String(p);case"ee":return ln(p,2);case"eo":return e.ordinalNumber(p,{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"});default:return e.day(m,{width:"wide",context:"formatting"})}},c:function(t,n,e,r){const m=t.getDay(),p=(m-r.weekStartsOn+8)%7||7;switch(n){case"c":return String(p);case"cc":return ln(p,n.length);case"co":return e.ordinalNumber(p,{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"});default:return e.day(m,{width:"wide",context:"standalone"})}},i:function(t,n,e){const r=t.getDay(),m=r===0?7:r;switch(n){case"i":return String(m);case"ii":return ln(m,n.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"});default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(t,n,e){const r=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(r,{width:"narrow",context:"formatting"});default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,n,e){const r=t.getHours();let m;switch(r===12?m=Js.noon:r===0?m=Js.midnight:m=r/12>=1?"pm":"am",n){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"});default:return e.dayPeriod(m,{width:"wide",context:"formatting"})}},B:function(t,n,e){const r=t.getHours();let m;switch(r>=17?m=Js.evening:r>=12?m=Js.afternoon:r>=4?m=Js.morning:m=Js.night,n){case"B":case"BB":case"BBB":return e.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(m,{width:"narrow",context:"formatting"});default:return e.dayPeriod(m,{width:"wide",context:"formatting"})}},h:function(t,n,e){if(n==="ho"){let r=t.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return Wo.h(t,n)},H:function(t,n,e){return n==="Ho"?e.ordinalNumber(t.getHours(),{unit:"hour"}):Wo.H(t,n)},K:function(t,n,e){const r=t.getHours()%12;return n==="Ko"?e.ordinalNumber(r,{unit:"hour"}):ln(r,n.length)},k:function(t,n,e){let r=t.getHours();return r===0&&(r=24),n==="ko"?e.ordinalNumber(r,{unit:"hour"}):ln(r,n.length)},m:function(t,n,e){return n==="mo"?e.ordinalNumber(t.getMinutes(),{unit:"minute"}):Wo.m(t,n)},s:function(t,n,e){return n==="so"?e.ordinalNumber(t.getSeconds(),{unit:"second"}):Wo.s(t,n)},S:function(t,n){return Wo.S(t,n)},X:function(t,n,e){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(n){case"X":return Xp(r);case"XXXX":case"XX":return hs(r);default:return hs(r,":")}},x:function(t,n,e){const r=t.getTimezoneOffset();switch(n){case"x":return Xp(r);case"xxxx":case"xx":return hs(r);default:return hs(r,":")}},O:function(t,n,e){const r=t.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Jp(r,":");default:return"GMT"+hs(r,":")}},z:function(t,n,e){const r=t.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Jp(r,":");default:return"GMT"+hs(r,":")}},t:function(t,n,e){const r=Math.trunc(+t/1e3);return ln(r,n.length)},T:function(t,n,e){return ln(+t,n.length)}};function Jp(t,n=""){const e=t>0?"-":"+",r=Math.abs(t),m=Math.trunc(r/60),p=r%60;return p===0?e+String(m):e+String(m)+n+ln(p,2)}function Xp(t,n){return t%60===0?(t>0?"-":"+")+ln(Math.abs(t)/60,2):hs(t,n)}function hs(t,n=""){const e=t>0?"-":"+",r=Math.abs(t),m=ln(Math.trunc(r/60),2),p=ln(r%60,2);return e+m+n+p}const Zp=(t,n)=>{switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});default:return n.date({width:"full"})}},Qp=(t,n)=>{switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});default:return n.time({width:"full"})}},nk=(t,n)=>{const e=t.match(/(P+)(p+)?/)||[],r=e[1],m=e[2];if(!m)return Zp(t,n);let p;switch(r){case"P":p=n.dateTime({width:"short"});break;case"PP":p=n.dateTime({width:"medium"});break;case"PPP":p=n.dateTime({width:"long"});break;default:p=n.dateTime({width:"full"});break}return p.replace("{{date}}",Zp(r,n)).replace("{{time}}",Qp(m,n))},rk=Tn("a",{p:Qp,P:nk}),ik=/^D+$/,ok=/^Y+$/,sk=["D","DD","YY","YYYY"];function eg(t){return ik.test(t)}function tg(t){return ok.test(t)}function ng(t,n,e){const r=ak(t,n,e);if(console.warn(r),sk.includes(t))throw new RangeError(r)}function ak(t,n,e){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${n}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const lk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ck=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,uk=/^'([^]*?)'?$/,hk=/''/g,dk=/[a-zA-Z]/;function ds(t,n,e){const r=Ks(),m=e?.locale??r.locale??QC,p=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,g=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,w=Wr(t,e?.in);if(!Gp(w))throw new RangeError("Invalid time value");let h=n.match(ck).map(a=>{const l=a[0];if(l==="p"||l==="P"){const c=rk[l];return c(a,m.formatLong)}return a}).join("").match(lk).map(a=>{if(a==="''")return{isToken:!1,value:"'"};const l=a[0];if(l==="'")return{isToken:!1,value:fk(a)};if(Yp[l])return{isToken:!0,value:a};if(l.match(dk))throw new RangeError("Format string contains an unescaped latin alphabet character `"+l+"`");return{isToken:!1,value:a}});m.localize.preprocessor&&(h=m.localize.preprocessor(w,h));const d={firstWeekContainsDate:p,weekStartsOn:g,locale:m};return h.map(a=>{if(!a.isToken)return a.value;const l=a.value;(!e?.useAdditionalWeekYearTokens&&tg(l)||!e?.useAdditionalDayOfYearTokens&&eg(l))&&ng(l,n,String(t));const c=Yp[l[0]];return c(w,l,m.localize,d)}).join("")}function fk(t){const n=t.match(uk);return n?n[1].replace(hk,"'"):t}var Bo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var rg={exports:{}},ig;function pk(){return ig||(ig=1,(function(t,n){(function(){var e="ace",r=(function(){return this})();!r&&typeof window<"u"&&(r=window);var m=function(a,l,c){if(typeof a!="string"){m.original?m.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(c=l),m.modules[a]||(m.payloads[a]=c,m.modules[a]=null)};m.modules={},m.payloads={};var p=function(a,l,c){if(typeof l=="string"){var u=h(a,l);if(u!=null)return c&&c(),u}else if(Object.prototype.toString.call(l)==="[object Array]"){for(var i=[],s=0,f=l.length;s<f;++s){var b=h(a,l[s]);if(b==null&&g.original)return;i.push(b)}return c&&c.apply(null,i)||!0}},g=function(a,l){var c=p("",a,l);return c==null&&g.original?g.original.apply(this,arguments):c},w=function(a,l){if(l.indexOf("!")!==-1){var c=l.split("!");return w(a,c[0])+"!"+w(a,c[1])}if(l.charAt(0)=="."){var u=a.split("/").slice(0,-1).join("/");for(l=u+"/"+l;l.indexOf(".")!==-1&&i!=l;){var i=l;l=l.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return l},h=function(a,l){l=w(a,l);var c=m.modules[l];if(!c){if(c=m.payloads[l],typeof c=="function"){var u={},i={id:l,uri:"",exports:u,packaged:!0},s=function(b,x){return p(l,b,x)},f=c(s,u,i);u=f||i.exports,m.modules[l]=u,delete m.payloads[l]}c=m.modules[l]=u||c}return c};function d(a){var l=r;r[a]||(r[a]={}),l=r[a],(!l.define||!l.define.packaged)&&(m.original=l.define,l.define=m,l.define.packaged=!0),(!l.require||!l.require.packaged)&&(g.original=l.require,l.require=g,l.require.packaged=!0)}d(e)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,r,m){function p(g,w,h){Object.defineProperty(g,w,{value:h,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||p(String.prototype,"startsWith",function(g,w){return w=w||0,this.lastIndexOf(g,w)===w}),String.prototype.endsWith||p(String.prototype,"endsWith",function(g,w){var h=this;(w===void 0||w>h.length)&&(w=h.length),w-=g.length;var d=h.indexOf(g,w);return d!==-1&&d===w}),String.prototype.repeat||p(String.prototype,"repeat",function(g){for(var w="",h=this;g>0;)g&1&&(w+=h),(g>>=1)&&(h+=h);return w}),String.prototype.includes||p(String.prototype,"includes",function(g,w){return this.indexOf(g,w)!=-1}),Object.assign||(Object.assign=function(g){if(g==null)throw new TypeError("Cannot convert undefined or null to object");for(var w=Object(g),h=1;h<arguments.length;h++){var d=arguments[h];d!=null&&Object.keys(d).forEach(function(a){w[a]=d[a]})}return w}),Object.values||(Object.values=function(g){return Object.keys(g).map(function(w){return g[w]})}),Array.prototype.find||p(Array.prototype,"find",function(g){for(var w=this.length,h=arguments[1],d=0;d<w;d++){var a=this[d];if(g.call(h,a,d,this))return a}}),Array.prototype.findIndex||p(Array.prototype,"findIndex",function(g){for(var w=this.length,h=arguments[1],d=0;d<w;d++){var a=this[d];if(g.call(h,a,d,this))return d}}),Array.prototype.includes||p(Array.prototype,"includes",function(g,w){return this.indexOf(g,w)!=-1}),Array.prototype.fill||p(Array.prototype,"fill",function(g){for(var w=this,h=w.length>>>0,d=arguments[1],a=d>>0,l=a<0?Math.max(h+a,0):Math.min(a,h),c=arguments[2],u=c===void 0?h:c>>0,i=u<0?Math.max(h+u,0):Math.min(u,h);l<i;)w[l]=g,l++;return w}),Array.of||p(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(e,r,m){e("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(e,r,m){r.deepCopy=function p(g){if(typeof g!="object"||!g)return g;var w;if(Array.isArray(g)){w=[];for(var h=0;h<g.length;h++)w[h]=p(g[h]);return w}if(Object.prototype.toString.call(g)!=="[object Object]")return g;w={};for(var h in g)w[h]=p(g[h]);return w}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(e,r,m){r.last=function(w){return w[w.length-1]},r.stringReverse=function(w){return w.split("").reverse().join("")},r.stringRepeat=function(w,h){for(var d="";h>0;)h&1&&(d+=w),(h>>=1)&&(w+=w);return d};var p=/^\s\s*/,g=/\s\s*$/;r.stringTrimLeft=function(w){return w.replace(p,"")},r.stringTrimRight=function(w){return w.replace(g,"")},r.copyObject=function(w){var h={};for(var d in w)h[d]=w[d];return h},r.copyArray=function(w){for(var h=[],d=0,a=w.length;d<a;d++)w[d]&&typeof w[d]=="object"?h[d]=this.copyObject(w[d]):h[d]=w[d];return h},r.deepCopy=e("./deep_copy").deepCopy,r.arrayToMap=function(w){for(var h={},d=0;d<w.length;d++)h[w[d]]=1;return h},r.createMap=function(w){var h=Object.create(null);for(var d in w)h[d]=w[d];return h},r.arrayRemove=function(w,h){for(var d=0;d<=w.length;d++)h===w[d]&&w.splice(d,1)},r.escapeRegExp=function(w){return w.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(w){return(""+w).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},r.getMatchOffsets=function(w,h){var d=[];return w.replace(h,function(a){d.push({offset:arguments[arguments.length-2],length:a.length})}),d},r.deferredCall=function(w){var h=null,d=function(){h=null,w()},a=function(l){return a.cancel(),h=setTimeout(d,l||0),a};return a.schedule=a,a.call=function(){return this.cancel(),w(),a},a.cancel=function(){return clearTimeout(h),h=null,a},a.isPending=function(){return h},a},r.delayedCall=function(w,h){var d=null,a=function(){d=null,w()},l=function(c){d==null&&(d=setTimeout(a,c||h))};return l.delay=function(c){d&&clearTimeout(d),d=setTimeout(a,c||h)},l.schedule=l,l.call=function(){this.cancel(),w()},l.cancel=function(){d&&clearTimeout(d),d=null},l.isPending=function(){return d},l},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(w,h,d){return d&&w.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 p=typeof navigator=="object"?navigator:{},g=(/mac|win|linux/i.exec(p.platform)||["other"])[0].toLowerCase(),w=p.userAgent||"",h=p.appName||"";r.isWin=g=="win",r.isMac=g=="mac",r.isLinux=g=="linux",r.isIE=h=="Microsoft Internet Explorer"||h.indexOf("MSAppHost")>=0?parseFloat((w.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((w.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=w.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(w.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(w.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(w.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(w.split(" Edge/")[1])||void 0,r.isAIR=w.indexOf("AdobeAIR")>=0,r.isAndroid=w.indexOf("Android")>=0,r.isChromeOS=w.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(w)&&!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 p=e("./useragent"),g="http://www.w3.org/1999/xhtml";r.buildDom=function c(u,i,s){if(typeof u=="string"&&u){var f=document.createTextNode(u);return i&&i.appendChild(f),f}if(!Array.isArray(u))return u&&u.appendChild&&i&&i.appendChild(u),u;if(typeof u[0]!="string"||!u[0]){for(var b=[],x=0;x<u.length;x++){var I=c(u[x],i,s);I&&b.push(I)}return b}var R=document.createElement(u[0]),A=u[1],C=1;A&&typeof A=="object"&&!Array.isArray(A)&&(C=2);for(var x=C;x<u.length;x++)c(u[x],R,s);return C==2&&Object.keys(A).forEach(function(O){var D=A[O];O==="class"?R.className=Array.isArray(D)?D.join(" "):D:typeof D=="function"||O=="value"||O[0]=="$"?R[O]=D:O==="ref"?s&&(s[D]=R):O==="style"?typeof D=="string"&&(R.style.cssText=D):D!=null&&R.setAttribute(O,D)}),i&&i.appendChild(R),R},r.getDocumentHead=function(c){return c||(c=document),c.head||c.getElementsByTagName("head")[0]||c.documentElement},r.createElement=function(c,u){return document.createElementNS?document.createElementNS(u||g,c):document.createElement(c)},r.removeChildren=function(c){c.innerHTML=""},r.createTextNode=function(c,u){var i=u?u.ownerDocument:document;return i.createTextNode(c)},r.createFragment=function(c){var u=c?c.ownerDocument:document;return u.createDocumentFragment()},r.hasCssClass=function(c,u){var i=(c.className+"").split(/\s+/g);return i.indexOf(u)!==-1},r.addCssClass=function(c,u){r.hasCssClass(c,u)||(c.className+=" "+u)},r.removeCssClass=function(c,u){for(var i=c.className.split(/\s+/g);;){var s=i.indexOf(u);if(s==-1)break;i.splice(s,1)}c.className=i.join(" ")},r.toggleCssClass=function(c,u){for(var i=c.className.split(/\s+/g),s=!0;;){var f=i.indexOf(u);if(f==-1)break;s=!1,i.splice(f,1)}return s&&i.push(u),c.className=i.join(" "),s},r.setCssClass=function(c,u,i){i?r.addCssClass(c,u):r.removeCssClass(c,u)},r.hasCssString=function(c,u){var i=0,s;if(u=u||document,s=u.querySelectorAll("style")){for(;i<s.length;)if(s[i++].id===c)return!0}},r.removeElementById=function(c,u){u=u||document,u.getElementById(c)&&u.getElementById(c).remove()};var w,h=[];r.useStrictCSP=function(c){w=c,c==!1?d():h||(h=[])};function d(){var c=h;h=null,c&&c.forEach(function(u){a(u[0],u[1])})}function a(c,u,i){if(!(typeof document>"u")){if(h){if(i)d();else if(i===!1)return h.push([c,u])}if(!w){var s=i;!i||!i.getRootNode?s=document:(s=i.getRootNode(),(!s||s==i)&&(s=document));var f=s.ownerDocument||s;if(u&&r.hasCssString(u,s))return null;u&&(c+=`
11
+ /*# sourceURL=ace/css/`+u+" */");var b=r.createElement("style");b.appendChild(f.createTextNode(c)),u&&(b.id=u),s==f&&(s=r.getDocumentHead(f)),s.insertBefore(b,s.firstChild)}}}if(r.importCssString=a,r.importCssStylsheet=function(c,u){r.buildDom(["link",{rel:"stylesheet",href:c}],r.getDocumentHead(u))},r.$fixPositionBug=function(c){var u=c.getBoundingClientRect();if(c.style.left){var i=parseFloat(c.style.left),s=+u.left;Math.abs(i-s)>1&&(c.style.left=2*i-s+"px")}if(c.style.right){var i=parseFloat(c.style.right),s=window.innerWidth-u.right;Math.abs(i-s)>1&&(c.style.right=2*i-s+"px")}if(c.style.top){var i=parseFloat(c.style.top),s=+u.top;Math.abs(i-s)>1&&(c.style.top=2*i-s+"px")}if(c.style.bottom){var i=parseFloat(c.style.bottom),s=window.innerHeight-u.bottom;Math.abs(i-s)>1&&(c.style.bottom=2*i-s+"px")}},r.scrollbarWidth=function(c){var u=r.createElement("ace_inner");u.style.width="100%",u.style.minWidth="0px",u.style.height="200px",u.style.display="block";var i=r.createElement("ace_outer"),s=i.style;s.position="absolute",s.left="-10000px",s.overflow="hidden",s.width="200px",s.minWidth="0px",s.height="150px",s.display="block",i.appendChild(u);var f=c&&c.documentElement||document&&document.documentElement;if(!f)return 0;f.appendChild(i);var b=u.offsetWidth;s.overflow="scroll";var x=u.offsetWidth;return b===x&&(x=i.clientWidth),f.removeChild(i),b-x},r.computedStyle=function(c,u){return window.getComputedStyle(c,"")||{}},r.setStyle=function(c,u,i){c[u]!==i&&(c[u]=i)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=p.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,p.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var l=document.createElement("div");r.HI_DPI&&l.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!p.isEdge&&typeof l.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),l=null}r.HAS_CSS_TRANSFORMS?r.translate=function(c,u,i){c.style.transform="translate("+Math.round(u)+"px, "+Math.round(i)+"px)"}:r.translate=function(c,u,i){c.style.top=Math.round(i)+"px",c.style.left=Math.round(u)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,r,m){var p=e("./dom");r.get=function(g,w){var h=new XMLHttpRequest;h.open("GET",g,!0),h.onreadystatechange=function(){h.readyState===4&&w(h.responseText)},h.send(null)},r.loadScript=function(g,w){var h=p.getDocumentHead(),d=document.createElement("script");d.src=g,h.appendChild(d),d.onload=d.onreadystatechange=function(a,l){(l||!d.readyState||d.readyState=="loaded"||d.readyState=="complete")&&(d=d.onload=d.onreadystatechange=null,l||w())}},r.qualifyURL=function(g){var w=document.createElement("a");return w.href=g,w.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,r,m){r.inherits=function(p,g){p.super_=g,p.prototype=Object.create(g.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(p,g){for(var w in g)p[w]=g[w];return p},r.implement=function(p,g){r.mixin(p,g)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,r,m){var p={},g=function(){this.propagationStopped=!0},w=function(){this.defaultPrevented=!0};p._emit=p._dispatchEvent=function(h,d){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var a=this._eventRegistry[h]||[],l=this._defaultHandlers[h];if(!(!a.length&&!l)){(typeof d!="object"||!d)&&(d={}),d.type||(d.type=h),d.stopPropagation||(d.stopPropagation=g),d.preventDefault||(d.preventDefault=w),a=a.slice();for(var c=0;c<a.length&&(a[c](d,this),!d.propagationStopped);c++);if(l&&!d.defaultPrevented)return l(d,this)}},p._signal=function(h,d){var a=(this._eventRegistry||{})[h];if(a){a=a.slice();for(var l=0;l<a.length;l++)a[l](d,this)}},p.once=function(h,d){var a=this;if(this.on(h,function l(){a.off(h,l),d.apply(null,arguments)}),!d)return new Promise(function(l){d=l})},p.setDefaultHandler=function(h,d){var a=this._defaultHandlers;if(a||(a=this._defaultHandlers={_disabled_:{}}),a[h]){var l=a[h],c=a._disabled_[h];c||(a._disabled_[h]=c=[]),c.push(l);var u=c.indexOf(d);u!=-1&&c.splice(u,1)}a[h]=d},p.removeDefaultHandler=function(h,d){var a=this._defaultHandlers;if(a){var l=a._disabled_[h];if(a[h]==d)l&&this.setDefaultHandler(h,l.pop());else if(l){var c=l.indexOf(d);c!=-1&&l.splice(c,1)}}},p.on=p.addEventListener=function(h,d,a){this._eventRegistry=this._eventRegistry||{};var l=this._eventRegistry[h];return l||(l=this._eventRegistry[h]=[]),l.indexOf(d)==-1&&l[a?"unshift":"push"](d),d},p.off=p.removeListener=p.removeEventListener=function(h,d){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[h];if(a){var l=a.indexOf(d);l!==-1&&a.splice(l,1)}},p.removeAllListeners=function(h){h||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[h]=void 0),this._defaultHandlers&&(this._defaultHandlers[h]=void 0)},r.EventEmitter=p}),ace.define("ace/lib/report_error",["require","exports","module"],function(e,r,m){r.reportError=function(p,g){var w=new Error(p);w.data=g,typeof console=="object"&&console.error&&console.error(w),setTimeout(function(){throw w})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(e,r,m){var p={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor gutter","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions","editor.tooltip.disable-editing":"Editing is disabled"};r.defaultEnglishMessages=p}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(e,r,m){"no use strict";var p=e("./oop"),g=e("./event_emitter").EventEmitter,w=e("./report_error").reportError,h=e("./default_english_messages").defaultEnglishMessages,d={setOptions:function(i){Object.keys(i).forEach(function(s){this.setOption(s,i[s])},this)},getOptions:function(i){var s={};if(i)Array.isArray(i)||(i=Object.keys(i));else{var f=this.$options;i=Object.keys(f).filter(function(b){return!f[b].hidden})}return i.forEach(function(b){s[b]=this.getOption(b)},this),s},setOption:function(i,s){if(this["$"+i]!==s){var f=this.$options[i];if(!f)return a('misspelled option "'+i+'"');if(f.forwardTo)return this[f.forwardTo]&&this[f.forwardTo].setOption(i,s);f.handlesSet||(this["$"+i]=s),f&&f.set&&f.set.call(this,s)}},getOption:function(i){var s=this.$options[i];return s?s.forwardTo?this[s.forwardTo]&&this[s.forwardTo].getOption(i):s&&s.get?s.get.call(this):this["$"+i]:a('misspelled option "'+i+'"')}};function a(i){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var l,c,u=(function(){function i(){this.$defaultOptions={},l=h,c="dollarSigns"}return i.prototype.defineOptions=function(s,f,b){return s.$options||(this.$defaultOptions[f]=s.$options={}),Object.keys(b).forEach(function(x){var I=b[x];typeof I=="string"&&(I={forwardTo:I}),I.name||(I.name=x),s.$options[I.name]=I,"initialValue"in I&&(s["$"+I.name]=I.initialValue)}),p.implement(s,d),this},i.prototype.resetOptions=function(s){Object.keys(s.$options).forEach(function(f){var b=s.$options[f];"value"in b&&s.setOption(f,b.value)})},i.prototype.setDefaultValue=function(s,f,b){if(!s){for(s in this.$defaultOptions)if(this.$defaultOptions[s][f])break;if(!this.$defaultOptions[s][f])return!1}var x=this.$defaultOptions[s]||(this.$defaultOptions[s]={});x[f]&&(x.forwardTo?this.setDefaultValue(x.forwardTo,f,b):x[f].value=b)},i.prototype.setDefaultValues=function(s,f){Object.keys(f).forEach(function(b){this.setDefaultValue(s,b,f[b])},this)},i.prototype.setMessages=function(s,f){l=s,f&&f.placeholders&&(c=f.placeholders)},i.prototype.nls=function(s,f,b){l[s]||(a("No message found for the key '"+s+"' in messages with id "+l.$id+", trying to find a translation for the default string '"+f+"'."),l[f]||a("No message found for the default string '"+f+"' in the provided messages. Falling back to the default English message."));var x=l[s]||l[f]||f;return b&&(c==="dollarSigns"&&(x=x.replace(/\$(\$|[\d]+)/g,function(I,R){return R=="$"?"$":b[R]})),c==="curlyBrackets"&&(x=x.replace(/\{([^\}]+)\}/g,function(I,R){return b[R]}))),x},i})();u.prototype.warn=a,u.prototype.reportError=w,p.implement(u.prototype,g),r.AppConfig=u}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(e,r,m){m.exports=`.ace-tm .ace_gutter {
12
+ background: #f0f0f0;
13
+ color: #333;
14
+ }
15
+
16
+ .ace-tm .ace_print-margin {
17
+ width: 1px;
18
+ background: #e8e8e8;
19
+ }
20
+
21
+ .ace-tm .ace_fold {
22
+ background-color: #6B72E6;
23
+ }
24
+
25
+ .ace-tm {
26
+ background-color: #FFFFFF;
27
+ color: black;
28
+ }
29
+
30
+ .ace-tm .ace_cursor {
31
+ color: black;
32
+ }
33
+
34
+ .ace-tm .ace_invisible {
35
+ color: rgb(191, 191, 191);
36
+ }
37
+
38
+ .ace-tm .ace_storage,
39
+ .ace-tm .ace_keyword {
40
+ color: blue;
41
+ }
42
+
43
+ .ace-tm .ace_constant {
44
+ color: rgb(197, 6, 11);
45
+ }
46
+
47
+ .ace-tm .ace_constant.ace_buildin {
48
+ color: rgb(88, 72, 246);
49
+ }
50
+
51
+ .ace-tm .ace_constant.ace_language {
52
+ color: rgb(88, 92, 246);
53
+ }
54
+
55
+ .ace-tm .ace_constant.ace_library {
56
+ color: rgb(6, 150, 14);
57
+ }
58
+
59
+ .ace-tm .ace_invalid {
60
+ background-color: rgba(255, 0, 0, 0.1);
61
+ color: red;
62
+ }
63
+
64
+ .ace-tm .ace_support.ace_function {
65
+ color: rgb(60, 76, 114);
66
+ }
67
+
68
+ .ace-tm .ace_support.ace_constant {
69
+ color: rgb(6, 150, 14);
70
+ }
71
+
72
+ .ace-tm .ace_support.ace_type,
73
+ .ace-tm .ace_support.ace_class {
74
+ color: rgb(109, 121, 222);
75
+ }
76
+
77
+ .ace-tm .ace_keyword.ace_operator {
78
+ color: rgb(104, 118, 135);
79
+ }
80
+
81
+ .ace-tm .ace_string {
82
+ color: rgb(3, 106, 7);
83
+ }
84
+
85
+ .ace-tm .ace_comment {
86
+ color: rgb(76, 136, 107);
87
+ }
88
+
89
+ .ace-tm .ace_comment.ace_doc {
90
+ color: rgb(0, 102, 255);
91
+ }
92
+
93
+ .ace-tm .ace_comment.ace_doc.ace_tag {
94
+ color: rgb(128, 159, 191);
95
+ }
96
+
97
+ .ace-tm .ace_constant.ace_numeric {
98
+ color: rgb(0, 0, 205);
99
+ }
100
+
101
+ .ace-tm .ace_variable {
102
+ color: rgb(49, 132, 149);
103
+ }
104
+
105
+ .ace-tm .ace_xml-pe {
106
+ color: rgb(104, 104, 91);
107
+ }
108
+
109
+ .ace-tm .ace_entity.ace_name.ace_function {
110
+ color: #0000A2;
111
+ }
112
+
113
+
114
+ .ace-tm .ace_heading {
115
+ color: rgb(12, 7, 255);
116
+ }
117
+
118
+ .ace-tm .ace_list {
119
+ color:rgb(185, 6, 144);
120
+ }
121
+
122
+ .ace-tm .ace_meta.ace_tag {
123
+ color:rgb(0, 22, 142);
124
+ }
125
+
126
+ .ace-tm .ace_string.ace_regex {
127
+ color: rgb(255, 0, 0)
128
+ }
129
+
130
+ .ace-tm .ace_marker-layer .ace_selection {
131
+ background: rgb(181, 213, 255);
132
+ }
133
+ .ace-tm.ace_multiselect .ace_selection.ace_start {
134
+ box-shadow: 0 0 3px 0px white;
135
+ }
136
+ .ace-tm .ace_marker-layer .ace_step {
137
+ background: rgb(252, 255, 0);
138
+ }
139
+
140
+ .ace-tm .ace_marker-layer .ace_stack {
141
+ background: rgb(164, 229, 101);
142
+ }
143
+
144
+ .ace-tm .ace_marker-layer .ace_bracket {
145
+ margin: -1px 0 0 -1px;
146
+ border: 1px solid rgb(192, 192, 192);
147
+ }
148
+
149
+ .ace-tm .ace_marker-layer .ace_active-line {
150
+ background: rgba(0, 0, 0, 0.07);
151
+ }
152
+
153
+ .ace-tm .ace_gutter-active-line {
154
+ background-color : #dcdcdc;
155
+ }
156
+
157
+ .ace-tm .ace_marker-layer .ace_selected-word {
158
+ background: rgb(250, 250, 255);
159
+ border: 1px solid rgb(200, 200, 250);
160
+ }
161
+
162
+ .ace-tm .ace_indent-guide {
163
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
164
+ }
165
+
166
+ .ace-tm .ace_indent-guide-active {
167
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
168
+ }
169
+ `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(e,r,m){r.isDark=!1,r.cssClass="ace-tm",r.cssText=e("./textmate-css"),r.$id="ace/theme/textmate";var p=e("../lib/dom");p.importCssString(r.cssText,r.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(e,r,m){"no use strict";var p=e("./lib/lang"),g=e("./lib/net"),w=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(u){if(!d.hasOwnProperty(u))throw new Error("Unknown config key: "+u);return d[u]},r.set=function(u,i){if(d.hasOwnProperty(u))d[u]=i;else if(this.setDefaultValue("",u,i)==!1)throw new Error("Unknown config key: "+u);u=="useStrictCSP"&&w.useStrictCSP(i)},r.all=function(){return p.copyObject(d)},r.$modes={},r.moduleUrl=function(u,i){if(d.$moduleUrls[u])return d.$moduleUrls[u];var s=u.split("/");i=i||s[s.length-2]||"";var f=i=="snippets"?"/":"-",b=s[s.length-1];if(i=="worker"&&f=="-"){var x=new RegExp("^"+i+"[\\-_]|[\\-_]"+i+"$","g");b=b.replace(x,"")}(!b||b==i)&&s.length>1&&(b=s[s.length-2]);var I=d[i+"Path"];return I==null?I=d.basePath:f=="/"&&(i=f=""),I&&I.slice(-1)!="/"&&(I+="/"),I+i+f+b+this.get("suffix")},r.setModuleUrl=function(u,i){return d.$moduleUrls[u]=i};var a=function(u,i){if(u==="ace/theme/textmate"||u==="./theme/textmate")return i(null,e("./theme/textmate"));if(l)return l(u,i);console.error("loader is not configured")},l;r.setLoader=function(u){l=u},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(u,i){var s;if(Array.isArray(u))var f=u[0],b=u[1];else if(typeof u=="string")var b=u;var x=function(I){if(I&&!r.$loading[b])return i&&i(I);if(r.$loading[b]||(r.$loading[b]=[]),r.$loading[b].push(i),!(r.$loading[b].length>1)){var R=function(){a(b,function(A,C){C&&(r.$loaded[b]=C),r._emit("load.module",{name:b,module:C});var O=r.$loading[b];r.$loading[b]=null,O.forEach(function(D){D&&D(C)})})};if(!r.get("packaged"))return R();g.loadScript(r.moduleUrl(b,f),R),c()}};if(r.dynamicModules[b])r.dynamicModules[b]().then(function(I){I.default?x(I.default):x(I)});else{try{s=this.$require(b)}catch{}x(s||r.$loaded[b])}},r.$require=function(u){if(typeof m.require=="function"){var i="require";return m[i](u)}},r.setModuleLoader=function(u,i){r.dynamicModules[u]=i};var c=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"),c=function(){})};r.version="1.43.6"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(e,r,m){e("./lib/fixoldbrowsers");var p=e("./config");p.setLoader(function(d,a){e([d],function(l){a(null,l)})});var g=(function(){return this||typeof window<"u"&&window})();m.exports=function(d){p.init=w,p.$require=e,d.require=e},w(!0);function w(d){if(!(!g||!g.document)){p.set("packaged",d||e.packaged||m.packaged||g.define&&(void 0).packaged);var a={},l="",c=document.currentScript||document._currentScript,u=c&&c.ownerDocument||document;c&&c.src&&(l=c.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var i=u.getElementsByTagName("script"),s=0;s<i.length;s++){var f=i[s],b=f.src||f.getAttribute("src");if(b){for(var x=f.attributes,I=0,R=x.length;I<R;I++){var A=x[I];A.name.indexOf("data-ace-")===0&&(a[h(A.name.replace(/^data-ace-/,""))]=A.value)}var C=b.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);C&&(l=C[1])}}l&&(a.base=a.base||l,a.packaged=!0),a.basePath=a.base,a.workerPath=a.workerPath||a.base,a.modePath=a.modePath||a.base,a.themePath=a.themePath||a.base,delete a.base;for(var O in a)typeof a[O]<"u"&&p.set(O,a[O])}}function h(d){return d.replace(/-(.)/g,function(a,l){return l.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(e,r,m){var p=(function(){function g(w,h,d,a){this.start={row:w,column:h},this.end={row:d,column:a}}return g.prototype.isEqual=function(w){return this.start.row===w.start.row&&this.end.row===w.end.row&&this.start.column===w.start.column&&this.end.column===w.end.column},g.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},g.prototype.contains=function(w,h){return this.compare(w,h)==0},g.prototype.compareRange=function(w){var h,d=w.end,a=w.start;return h=this.compare(d.row,d.column),h==1?(h=this.compare(a.row,a.column),h==1?2:h==0?1:0):h==-1?-2:(h=this.compare(a.row,a.column),h==-1?-1:h==1?42:0)},g.prototype.comparePoint=function(w){return this.compare(w.row,w.column)},g.prototype.containsRange=function(w){return this.comparePoint(w.start)==0&&this.comparePoint(w.end)==0},g.prototype.intersects=function(w){var h=this.compareRange(w);return h==-1||h==0||h==1},g.prototype.isEnd=function(w,h){return this.end.row==w&&this.end.column==h},g.prototype.isStart=function(w,h){return this.start.row==w&&this.start.column==h},g.prototype.setStart=function(w,h){typeof w=="object"?(this.start.column=w.column,this.start.row=w.row):(this.start.row=w,this.start.column=h)},g.prototype.setEnd=function(w,h){typeof w=="object"?(this.end.column=w.column,this.end.row=w.row):(this.end.row=w,this.end.column=h)},g.prototype.inside=function(w,h){return this.compare(w,h)==0?!(this.isEnd(w,h)||this.isStart(w,h)):!1},g.prototype.insideStart=function(w,h){return this.compare(w,h)==0?!this.isEnd(w,h):!1},g.prototype.insideEnd=function(w,h){return this.compare(w,h)==0?!this.isStart(w,h):!1},g.prototype.compare=function(w,h){return!this.isMultiLine()&&w===this.start.row?h<this.start.column?-1:h>this.end.column?1:0:w<this.start.row?-1:w>this.end.row?1:this.start.row===w?h>=this.start.column?0:-1:this.end.row===w?h<=this.end.column?0:1:0},g.prototype.compareStart=function(w,h){return this.start.row==w&&this.start.column==h?-1:this.compare(w,h)},g.prototype.compareEnd=function(w,h){return this.end.row==w&&this.end.column==h?1:this.compare(w,h)},g.prototype.compareInside=function(w,h){return this.end.row==w&&this.end.column==h?1:this.start.row==w&&this.start.column==h?-1:this.compare(w,h)},g.prototype.clipRows=function(w,h){if(this.end.row>h)var d={row:h+1,column:0};else if(this.end.row<w)var d={row:w,column:0};if(this.start.row>h)var a={row:h+1,column:0};else if(this.start.row<w)var a={row:w,column:0};return g.fromPoints(a||this.start,d||this.end)},g.prototype.extend=function(w,h){var d=this.compare(w,h);if(d==0)return this;if(d==-1)var a={row:w,column:h};else var l={row:w,column:h};return g.fromPoints(a||this.start,l||this.end)},g.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},g.prototype.isMultiLine=function(){return this.start.row!==this.end.row},g.prototype.clone=function(){return g.fromPoints(this.start,this.end)},g.prototype.collapseRows=function(){return this.end.column==0?new g(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new g(this.start.row,0,this.end.row,0)},g.prototype.toScreenRange=function(w){var h=w.documentToScreenPosition(this.start),d=w.documentToScreenPosition(this.end);return new g(h.row,h.column,d.row,d.column)},g.prototype.moveBy=function(w,h){this.start.row+=w,this.start.column+=h,this.end.row+=w,this.end.column+=h},g})();p.fromPoints=function(g,w){return new p(g.row,g.column,w.row,w.column)},p.comparePoints=function(g,w){return g.row-w.row||g.column-w.column},r.Range=p}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,r,m){for(var p=e("./oop"),g={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},w={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++)w["Digit"+h]=48+h,w["Numpad"+h]=96+h,g.PRINTABLE_KEYS[48+h]=""+h,g.FUNCTION_KEYS[96+h]="Numpad"+h;for(var h=65;h<91;h++){var d=String.fromCharCode(h+32);w["Key"+d.toUpperCase()]=h,g.PRINTABLE_KEYS[h]=d}for(var h=1;h<13;h++)w["F"+h]=111+h,g.FUNCTION_KEYS[111+h]="F"+h;var a={Shift:16,Control:17,Alt:18,Meta:224};for(var l in a)w[l]=w[l+"Left"]=w[l+"Right"]=a[l];r.$codeToKeyCode=w,g.PRINTABLE_KEYS[173]="-";for(var c in g.FUNCTION_KEYS){var u=g.FUNCTION_KEYS[c].toLowerCase();g[u]=parseInt(c,10)}for(var c in g.PRINTABLE_KEYS){var u=g.PRINTABLE_KEYS[c].toLowerCase();g[u]=parseInt(c,10)}p.mixin(g,g.MODIFIER_KEYS),p.mixin(g,g.PRINTABLE_KEYS),p.mixin(g,g.FUNCTION_KEYS),g.enter=g.return,g.escape=g.esc,g.del=g.delete,(function(){for(var i=["cmd","ctrl","alt","shift"],s=Math.pow(2,i.length);s--;)g.KEY_MODS[s]=i.filter(function(f){return s&g.KEY_MODS[f]}).join("-")+"-"})(),g.KEY_MODS[0]="",g.KEY_MODS[-1]="input-",p.mixin(r,g),r.default=r,r.keyCodeToString=function(i){var s=g[i];return typeof s!="string"&&(s=String.fromCharCode(i)),s.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,m){var p=e("./keys"),g=e("./useragent"),w=null,h=0,d;function a(){d=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return d={passive:!1},!0}})}catch{}}function l(){return d==null&&a(),d}function c(I,R,A){this.elem=I,this.type=R,this.callback=A}c.prototype.destroy=function(){i(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var u=r.addListener=function(I,R,A,C){I.addEventListener(R,A,l()),C&&C.$toDestroy.push(new c(I,R,A))},i=r.removeListener=function(I,R,A){I.removeEventListener(R,A,l())};r.stopEvent=function(I){return r.stopPropagation(I),r.preventDefault(I),!1},r.stopPropagation=function(I){I.stopPropagation&&I.stopPropagation()},r.preventDefault=function(I){I.preventDefault&&I.preventDefault()},r.getButton=function(I){return I.type=="dblclick"?0:I.type=="contextmenu"||g.isMac&&I.ctrlKey&&!I.altKey&&!I.shiftKey?2:I.button},r.capture=function(I,R,A){var C=I&&I.ownerDocument||document;function O(D){R&&R(D),A&&A(D),i(C,"mousemove",R),i(C,"mouseup",O),i(C,"dragstart",O)}return u(C,"mousemove",R),u(C,"mouseup",O),u(C,"dragstart",O),O},r.addMouseWheelListener=function(I,R,A){u(I,"wheel",function(C){var O=.15,D=C.deltaX||0,E=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=D*O,C.wheelY=E*O;break;case C.DOM_DELTA_LINE:var T=15;C.wheelX=D*T,C.wheelY=E*T;break;case C.DOM_DELTA_PAGE:var B=150;C.wheelX=D*B,C.wheelY=E*B;break}R(C)},A)},r.addMultiMouseDownListener=function(I,R,A,C,O){var D=0,E,T,B,F={2:"dblclick",3:"tripleclick",4:"quadclick"};function N($){if(r.getButton($)!==0?D=0:$.detail>1?(D++,D>4&&(D=1)):D=1,g.isIE){var k=Math.abs($.clientX-E)>5||Math.abs($.clientY-T)>5;(!B||k)&&(D=1),B&&clearTimeout(B),B=setTimeout(function(){B=null},R[D-1]||600),D==1&&(E=$.clientX,T=$.clientY)}if($._clicks=D,A[C]("mousedown",$),D>4)D=0;else if(D>1)return A[C](F[D],$)}Array.isArray(I)||(I=[I]),I.forEach(function($){u($,"mousedown",N,O)})};function s(I){return 0|(I.ctrlKey?1:0)|(I.altKey?2:0)|(I.shiftKey?4:0)|(I.metaKey?8:0)}r.getModifierString=function(I){return p.KEY_MODS[s(I)]};function f(I,R,A){var C=s(R);if(!A&&R.code&&(A=p.$codeToKeyCode[R.code]||A),!g.isMac&&w){if(R.getModifierState&&(R.getModifierState("OS")||R.getModifierState("Win"))&&(C|=8),w.altGr)if((3&C)!=3)w.altGr=0;else return;if(A===18||A===17){var O=R.location;if(A===17&&O===1)w[A]==1&&(h=R.timeStamp);else if(A===18&&C===3&&O===2){var D=R.timeStamp-h;D<50&&(w.altGr=!0)}}}if(A in p.MODIFIER_KEYS&&(A=-1),!(!C&&A===13&&R.location===3&&(I(R,C,-A),R.defaultPrevented))){if(g.isChromeOS&&C&8){if(I(R,C,A),R.defaultPrevented)return;C&=-9}return!C&&!(A in p.FUNCTION_KEYS)&&!(A in p.PRINTABLE_KEYS)?!1:I(R,C,A)}}r.addCommandKeyListener=function(I,R,A){var C=null;u(I,"keydown",function(O){w[O.keyCode]=(w[O.keyCode]||0)+1;var D=f(R,O,O.keyCode);return C=O.defaultPrevented,D},A),u(I,"keypress",function(O){C&&(O.ctrlKey||O.altKey||O.shiftKey||O.metaKey)&&(r.stopEvent(O),C=null)},A),u(I,"keyup",function(O){w[O.keyCode]=null},A),w||(b(),u(window,"focus",b))};function b(){w=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!g.isOldIE){var x=1;r.nextTick=function(I,R){R=R||window;var A="zero-timeout-message-"+x++,C=function(O){O.data==A&&(r.stopPropagation(O),i(R,"message",C),I())};u(R,"message",C),R.postMessage(A,"*")}}r.$idleBlocked=!1,r.onIdle=function(I,R){return setTimeout(function A(){r.$idleBlocked?setTimeout(A,100):I()},R)},r.$idleBlockId=null,r.blockIdle=function(I){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},I||100)},r.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),r.nextFrame?r.nextFrame=r.nextFrame.bind(window):r.nextFrame=function(I){setTimeout(I,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(e,r,m){var p;m.exports={lineMode:!1,pasteCancelled:function(){return p&&p>Date.now()-50?!0:p=!1},cancel:function(){p=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(e,r,m){var p=e("../lib/event"),g=e("../config").nls,w=e("../lib/useragent"),h=e("../lib/dom"),d=e("../lib/lang"),a=e("../clipboard"),l=w.isChrome<18,c=w.isIE,u=w.isChrome>63,i=400,s=e("../lib/keys"),f=s.KEY_MODS,b=w.isIOS,x=b?/\s/:/\n/,I=w.isMobile,R=(function(){function A(C,O){var D=this;this.host=O,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="",I||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),p.addListener(this.text,"blur",function(E){D.ignoreFocusEvents||(O.onBlur(E),D.$isFocused=!1)},O),p.addListener(this.text,"focus",function(E){if(!D.ignoreFocusEvents){if(D.$isFocused=!0,w.isEdge)try{if(!document.hasFocus())return}catch{}O.onFocus(E),w.isEdge?setTimeout(D.resetSelection.bind(D)):D.resetSelection()}},O),this.$focusScroll=!1,O.on("beforeEndOperation",function(){var E=O.curOp,T=E&&E.command&&E.command.name;if(T!="insertstring"){var B=T&&(E.docChanged||E.selectionChanged);D.inComposition&&B&&(D.lastValue=D.text.value="",D.onCompositionEnd()),D.resetSelection()}}),O.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=b?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&O.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,p.addCommandKeyListener(this.text,function(E,T,B){if(!D.inComposition)return O.onCommandKey(E,T,B)},O),p.addListener(this.text,"select",this.onSelect.bind(this),O),p.addListener(this.text,"input",this.onInput.bind(this),O),p.addListener(this.text,"cut",this.onCut.bind(this),O),p.addListener(this.text,"copy",this.onCopy.bind(this),O),p.addListener(this.text,"paste",this.onPaste.bind(this),O),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&p.addListener(C,"keydown",function(E){if(!(w.isMac&&!E.metaKey||!E.ctrlKey))switch(E.keyCode){case 67:D.onCopy(E);break;case 86:D.onPaste(E);break;case 88:D.onCut(E);break}},O),this.syncComposition=d.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),p.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),O),p.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),O),p.addListener(this.text,"keyup",this.onKeyup.bind(this),O),p.addListener(this.text,"keydown",this.syncComposition.bind(this),O),p.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),O),this.closeTimeout,p.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),O),p.addListener(this.text,"mousedown",function(E){E.preventDefault(),D.onContextMenuClose()},O),p.addListener(O.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),O),p.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),O),b&&this.addIosSelectionHandler(C,O,this.text)}return A.prototype.addIosSelectionHandler=function(C,O,D){var E=this,T=null,B=!1;D.addEventListener("keydown",function(N){T&&clearTimeout(T),B=!0},!0),D.addEventListener("keyup",function(N){T=setTimeout(function(){B=!1},100)},!0);var F=function(N){if(document.activeElement===D&&!(B||E.inComposition||O.$mouseHandler.isMousePressed)&&!E.copied){var $=D.selectionStart,k=D.selectionEnd,L=null,W=0;if($==0?L=s.up:$==1?L=s.home:k>E.lastSelectionEnd&&E.lastValue[k]==`
170
+ `?L=s.end:$<E.lastSelectionStart&&E.lastValue[$-1]==" "?(L=s.left,W=f.option):$<E.lastSelectionStart||$==E.lastSelectionStart&&E.lastSelectionEnd!=E.lastSelectionStart&&$==k?L=s.left:k>E.lastSelectionEnd&&E.lastValue.slice(0,k).split(`
171
+ `).length>2?L=s.down:k>E.lastSelectionEnd&&E.lastValue[k-1]==" "?(L=s.right,W=f.option):(k>E.lastSelectionEnd||k==E.lastSelectionEnd&&E.lastSelectionEnd!=E.lastSelectionStart&&$==k)&&(L=s.right),$!==k&&(W|=f.shift),L){var U=O.onCommandKey({},W,L);if(!U&&O.commands){L=s.keyCodeToString(L);var q=O.commands.findKeyCommand(W,L);q&&O.execCommand(q)}E.lastSelectionStart=$,E.lastSelectionEnd=k,E.resetSelection("")}}};document.addEventListener("selectionchange",F),O.on("destroy",function(){document.removeEventListener("selectionchange",F)})},A.prototype.onContextMenuClose=function(){var C=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){C.tempStyle&&(C.text.style.cssText=C.tempStyle,C.tempStyle=""),C.host.renderer.$isMousePressed=!1,C.host.renderer.$keepTextAreaAtCursor&&C.host.renderer.$moveTextAreaToCursor()},0)},A.prototype.$onContextMenu=function(C){this.host.textInput.onContextMenu(C),this.onContextMenuClose()},A.prototype.onKeyup=function(C){C.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},A.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},A.prototype.onCompositionStart=function(C){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){C.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var O=this.host.getSelectionRange();O.end.row=O.start.row,O.end.column=O.start.column,this.inComposition.markerRange=O,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},A.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var C=this.text.value;this.sendText(C),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},A.prototype.onCompositionEnd=function(C){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),C&&this.onInput())},A.prototype.onCut=function(C){this.doCopy(C,!0)},A.prototype.onCopy=function(C){this.doCopy(C,!1)},A.prototype.onPaste=function(C){var O=this.handleClipboardData(C);a.pasteCancelled()||(typeof O=="string"?(O&&this.host.onPaste(O,C),w.isIE&&setTimeout(this.resetSelection),p.preventDefault(C)):(this.text.value="",this.pasted=!0))},A.prototype.doCopy=function(C,O){var D=this,E=this.host.getCopyText();if(!E)return p.preventDefault(C);this.handleClipboardData(C,E)?(b&&(this.resetSelection(E),this.copied=E,setTimeout(function(){D.copied=!1},10)),O?this.host.onCut():this.host.onCopy(),p.preventDefault(C)):(this.copied=!0,this.text.value=E,this.text.select(),setTimeout(function(){D.copied=!1,D.resetSelection(),O?D.host.onCut():D.host.onCopy()}))},A.prototype.handleClipboardData=function(C,O,D){var E=C.clipboardData||window.clipboardData;if(!(!E||l)){var T=c||D?"Text":"text/plain";try{return O?E.setData(T,O)!==!1:E.getData(T)}catch(B){if(!D)return this.handleClipboardData(B,O,!0)}}},A.prototype.onInput=function(C){if(this.inComposition)return this.onCompositionUpdate();if(C&&C.inputType){if(C.inputType=="historyUndo")return this.host.execCommand("undo");if(C.inputType=="historyRedo")return this.host.execCommand("redo")}var O=this.text.value,D=this.sendText(O,!0);(O.length>i+100||x.test(D)||I&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},A.prototype.sendText=function(C,O){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),C&&this.host.onPaste(C),this.pasted=!1,"";for(var D=this.text.selectionStart,E=this.text.selectionEnd,T=this.lastSelectionStart,B=this.lastValue.length-this.lastSelectionEnd,F=C,N=C.length-D,$=C.length-E,k=0;T>0&&this.lastValue[k]==C[k];)k++,T--;for(F=F.slice(k),k=1;B>0&&this.lastValue.length-k>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-k]==C[C.length-k];)k++,B--;N-=k-1,$-=k-1;var L=F.length-k+1;if(L<0&&(T=-L,L=0),F=F.slice(0,L),!O&&!F&&!N&&!T&&!B&&!$)return"";this.sendingText=!0;var W=!1;return w.isAndroid&&F==". "&&(F=" ",W=!0),F&&!T&&!B&&!N&&!$||this.commandMode?this.host.onTextInput(F):this.host.onTextInput(F,{extendLeft:T,extendRight:B,restoreStart:N,restoreEnd:$}),this.sendingText=!1,this.lastValue=C,this.lastSelectionStart=D,this.lastSelectionEnd=E,this.lastRestoreEnd=$,W?`
172
+ `:F},A.prototype.onSelect=function(C){var O=this;if(!this.inComposition){var D=function(E){return E.selectionStart===0&&E.selectionEnd>=O.lastValue.length&&E.value===O.lastValue&&O.lastValue&&E.selectionEnd!==O.lastSelectionEnd};this.copied?this.copied=!1:D(this.text)?(this.host.selectAll(),this.resetSelection()):I&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},A.prototype.$resetSelectionIOS=function(C){if(!(!this.$isFocused||this.copied&&!C||this.sendingText)){C||(C="");var O=`
173
+ ab`+C+`cde fg
174
+ `;O!=this.text.value&&(this.text.value=this.lastValue=O);var D=4,E=4+(C.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=D||this.lastSelectionEnd!=E)&&this.text.setSelectionRange(D,E),this.lastSelectionStart=D,this.lastSelectionEnd=E}},A.prototype.$resetSelection=function(){var C=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var O=0,D=0,E="",T=function(q,Z){for(var Q=Z,le=1;le<=q-C.rowStart&&le<2*C.numberOfExtraLines+1;le++)Q+=C.host.session.getLine(q-le).length+1;return Q};if(this.host.session){var B=this.host.selection,F=B.getRange(),N=B.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 $=[],k=this.rowStart;k<=this.rowEnd;k++)$.push(this.host.session.getLine(k));if(E=$.join(`
175
+ `),O=T(F.start.row,F.start.column),D=T(F.end.row,F.end.column),F.start.row<this.rowStart){var L=this.host.session.getLine(this.rowStart-1);O=F.start.row<this.rowStart-1?0:O,D+=L.length+1,E=L+`
176
+ `+E}else if(F.end.row>this.rowEnd){var W=this.host.session.getLine(this.rowEnd+1);D=F.end.row>this.rowEnd+1?W.length:F.end.column,D+=E.length+1,E=E+`
177
+ `+W}else I&&N>0&&(E=`
178
+ `+E,D+=1,O+=1);E.length>i&&(O<i&&D<i?E=E.slice(0,i):(E=`
179
+ `,O==D?O=D=0:(O=0,D=1)));var U=E+`
180
+
181
+ `;U!=this.lastValue&&(this.text.value=this.lastValue=U,this.lastSelectionStart=this.lastSelectionEnd=U.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=D||this.lastSelectionStart!=O||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(O,D),this.lastSelectionStart=O,this.lastSelectionEnd=D}catch{}this.inComposition=!1}},A.prototype.setHost=function(C){this.host=C},A.prototype.setNumberOfExtraLines=function(C){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,C<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=C},A.prototype.setAriaLabel=function(){var C="";if(this.host.$textInputAriaLabel&&(C+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var O=this.host.session.selection.cursor.row;C+=g("text-input.aria-label","Cursor at row $0",[O+1])}this.text.setAttribute("aria-label",C)},A.prototype.setAriaOptions=function(C){C.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",C.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",C.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),C.role&&this.text.setAttribute("role",C.role),C.setLabel&&(this.text.setAttribute("aria-roledescription",g("text-input.aria-roledescription","editor")),this.setAriaLabel())},A.prototype.focus=function(){var C=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||u||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var O=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var D=this.text.getBoundingClientRect().top!=0}catch{return}var E=[];if(D)for(var T=this.text.parentElement;T&&T.nodeType==1;)E.push(T),T.setAttribute("ace_nocontext","true"),!T.parentElement&&T.getRootNode?T=T.getRootNode().host:T=T.parentElement;this.text.focus({preventScroll:!0}),D&&E.forEach(function(B){B.removeAttribute("ace_nocontext")}),setTimeout(function(){C.text.style.position="",C.text.style.top=="0px"&&(C.text.style.top=O)},0)},A.prototype.blur=function(){this.text.blur()},A.prototype.isFocused=function(){return this.$isFocused},A.prototype.setInputHandler=function(C){this.inputHandler=C},A.prototype.getInputHandler=function(){return this.inputHandler},A.prototype.getElement=function(){return this.text},A.prototype.setCommandMode=function(C){this.commandMode=C,this.text.readOnly=!1},A.prototype.setReadOnly=function(C){this.commandMode||(this.text.readOnly=C)},A.prototype.setCopyWithEmptySelection=function(C){},A.prototype.onContextMenu=function(C){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:C}),this.moveToMouse(C,!0)},A.prototype.moveToMouse=function(C,O){var D=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(O?"z-index:100000;":"")+(w.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var E=this.host.container.getBoundingClientRect(),T=h.computedStyle(this.host.container),B=E.top+(parseInt(T.borderTopWidth)||0),F=E.left+(parseInt(T.borderLeftWidth)||0),N=E.bottom-B-this.text.clientHeight-2,$=function(k){h.translate(D.text,k.clientX-F-2,Math.min(k.clientY-B-2,N))};$(C),C.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),w.isWin&&p.capture(this.host.container,$,this.onContextMenuClose.bind(this)))},A.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},A})();r.TextInput=R,r.$setUserAgentForTests=function(A,C){I=A,b=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,r,m){var p=e("../lib/useragent"),g=0,w=550,h=(function(){function l(c){c.$clickSelection=null;var u=c.editor;u.setDefaultHandler("mousedown",this.onMouseDown.bind(c)),u.setDefaultHandler("dblclick",this.onDoubleClick.bind(c)),u.setDefaultHandler("tripleclick",this.onTripleClick.bind(c)),u.setDefaultHandler("quadclick",this.onQuadClick.bind(c)),u.setDefaultHandler("mousewheel",this.onMouseWheel.bind(c));var i=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];i.forEach(function(s){c[s]=this[s]},this),c.selectByLines=this.extendSelectionBy.bind(c,"getLineRange"),c.selectByWords=this.extendSelectionBy.bind(c,"getWordRange")}return l.prototype.onMouseDown=function(c){var u=c.inSelection(),i=c.getDocumentPosition();this.mousedownEvent=c;var s=this.editor,f=c.getButton();if(f!==0){var b=s.getSelectionRange(),x=b.isEmpty();(x||f==1)&&s.selection.moveToPosition(i),f==2&&(s.textInput.onContextMenu(c.domEvent),p.isMozilla||c.preventDefault());return}if(this.mousedownEvent.time=Date.now(),u&&!s.isFocused()&&(s.focus(),this.$focusTimeout&&!this.$clickSelection&&!s.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(c);return}return this.captureMouse(c),this.startSelect(i,c.domEvent._clicks>1),c.preventDefault()},l.prototype.startSelect=function(c,u){c=c||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(c):u||i.selection.moveToPosition(c),u||this.select(),i.setStyle("ace_selecting"),this.setState("select"))},l.prototype.select=function(){var c,u=this.editor,i=u.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(i);if(s==-1)c=this.$clickSelection.end;else if(s==1)c=this.$clickSelection.start;else{var f=a(this.$clickSelection,i,u.session);i=f.cursor,c=f.anchor}u.selection.setSelectionAnchor(c.row,c.column)}u.selection.selectToPosition(i),u.renderer.scrollCursorIntoView()},l.prototype.extendSelectionBy=function(c){var u,i=this.editor,s=i.renderer.screenToTextCoordinates(this.x,this.y),f=i.selection[c](s.row,s.column);if(this.$clickSelection){var b=this.$clickSelection.comparePoint(f.start),x=this.$clickSelection.comparePoint(f.end);if(b==-1&&x<=0)u=this.$clickSelection.end,(f.end.row!=s.row||f.end.column!=s.column)&&(s=f.start);else if(x==1&&b>=0)u=this.$clickSelection.start,(f.start.row!=s.row||f.start.column!=s.column)&&(s=f.end);else if(b==-1&&x==1)s=f.end,u=f.start;else{var I=a(this.$clickSelection,s,i.session);s=I.cursor,u=I.anchor}i.selection.setSelectionAnchor(u.row,u.column)}i.selection.selectToPosition(s),i.renderer.scrollCursorIntoView()},l.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},l.prototype.focusWait=function(){var c=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),u=Date.now();(c>g||u-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},l.prototype.onDoubleClick=function(c){var u=c.getDocumentPosition(),i=this.editor,s=i.session,f=s.getBracketRange(u);f?(f.isEmpty()&&(f.start.column--,f.end.column++),this.setState("select")):(f=i.selection.getWordRange(u.row,u.column),this.setState("selectByWords")),this.$clickSelection=f,this.select()},l.prototype.onTripleClick=function(c){var u=c.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var s=i.getSelectionRange();s.isMultiLine()&&s.contains(u.row,u.column)?(this.$clickSelection=i.selection.getLineRange(s.start.row),this.$clickSelection.end=i.selection.getLineRange(s.end.row).end):this.$clickSelection=i.selection.getLineRange(u.row),this.select()},l.prototype.onQuadClick=function(c){var u=this.editor;u.selectAll(),this.$clickSelection=u.getSelectionRange(),this.setState("selectAll")},l.prototype.onMouseWheel=function(c){if(!c.getAccelKey()){c.getShiftKey()&&c.wheelY&&!c.wheelX&&(c.wheelX=c.wheelY,c.wheelY=0);var u=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var i=this.$lastScroll,s=c.domEvent.timeStamp,f=s-i.t,b=f?c.wheelX/f:i.vx,x=f?c.wheelY/f:i.vy;f<w&&(b=(b+i.vx)/2,x=(x+i.vy)/2);var I=Math.abs(b/x),R=!1;if(I>=1&&u.renderer.isScrollableBy(c.wheelX*c.speed,0)&&(R=!0),I<=1&&u.renderer.isScrollableBy(0,c.wheelY*c.speed)&&(R=!0),R)i.allowed=s;else if(s-i.allowed<w){var A=Math.abs(b)<=1.5*Math.abs(i.vx)&&Math.abs(x)<=1.5*Math.abs(i.vy);A?(R=!0,i.allowed=s):i.allowed=0}if(i.t=s,i.vx=b,i.vy=x,R)return u.renderer.scrollBy(c.wheelX*c.speed,c.wheelY*c.speed),c.stop()}},l})();h.prototype.selectEnd=h.prototype.selectByLinesEnd,h.prototype.selectAllEnd=h.prototype.selectByLinesEnd,h.prototype.selectByWordsEnd=h.prototype.selectByLinesEnd,r.DefaultHandlers=h;function d(l,c,u,i){return Math.sqrt(Math.pow(u-l,2)+Math.pow(i-c,2))}function a(l,c,u){if(l.start.row==l.end.row)var i=2*c.column-l.start.column-l.end.column;else if(l.start.row==l.end.row-1&&!l.start.column&&!l.end.column)var i=3*c.column-2*u.getLine(l.start.row).length;else var i=2*c.row-l.start.row-l.end.row;return i<0?{cursor:l.start,anchor:l.end}:{cursor:l.end,anchor:l.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,m){var p=e("../lib/event"),g=e("../lib/useragent"),w=(function(){function h(d,a){this.speed,this.wheelX,this.wheelY,this.domEvent=d,this.editor=a,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(){p.stopPropagation(this.domEvent),this.propagationStopped=!0},h.prototype.preventDefault=function(){p.preventDefault(this.domEvent),this.defaultPrevented=!0},h.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},h.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},h.prototype.getGutterRow=function(){var d=this.getDocumentPosition().row,a=this.editor.session.documentToScreenRow(d,0),l=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return a-l},h.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var d=this.editor,a=d.getSelectionRange();if(a.isEmpty())this.$inSelection=!1;else{var l=this.getDocumentPosition();this.$inSelection=a.contains(l.row,l.column)}return this.$inSelection},h.prototype.getButton=function(){return p.getButton(this.domEvent)},h.prototype.getShiftKey=function(){return this.domEvent.shiftKey},h.prototype.getAccelKey=function(){return g.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},h})();r.MouseEvent=w}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,r,m){r.preventParentScroll=function(p){p.stopPropagation();var g=p.currentTarget,w=g.scrollHeight>g.clientHeight;w||p.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,r,m){var p=this&&this.__extends||(function(){var s=function(f,b){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,I){x.__proto__=I}||function(x,I){for(var R in I)Object.prototype.hasOwnProperty.call(I,R)&&(x[R]=I[R])},s(f,b)};return function(f,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");s(f,b);function x(){this.constructor=f}f.prototype=b===null?Object.create(b):(x.prototype=b.prototype,new x)}})(),g=this&&this.__values||function(s){var f=typeof Symbol=="function"&&Symbol.iterator,b=f&&s[f],x=0;if(b)return b.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&x>=s.length&&(s=void 0),{value:s&&s[x++],done:!s}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")},w=e("./lib/dom");e("./lib/event");var h=e("./range").Range,d=e("./lib/scroll").preventParentScroll,a="ace_tooltip",l=(function(){function s(f){this.isOpen=!1,this.$element=null,this.$parentNode=f}return s.prototype.$init=function(){return this.$element=w.createElement("div"),this.$element.className=a,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},s.prototype.getElement=function(){return this.$element||this.$init()},s.prototype.setText=function(f){this.getElement().textContent=f},s.prototype.setHtml=function(f){this.getElement().innerHTML=f},s.prototype.setPosition=function(f,b){this.getElement().style.left=f+"px",this.getElement().style.top=b+"px"},s.prototype.setClassName=function(f){w.addCssClass(this.getElement(),f)},s.prototype.setTheme=function(f){this.theme&&(this.theme.isDark&&w.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&w.removeCssClass(this.getElement(),this.theme.cssClass)),f.isDark&&w.addCssClass(this.getElement(),"ace_dark"),f.cssClass&&w.addCssClass(this.getElement(),f.cssClass),this.theme={isDark:f.isDark,cssClass:f.cssClass}},s.prototype.show=function(f,b,x){f!=null&&this.setText(f),b!=null&&x!=null&&this.setPosition(b,x),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},s.prototype.hide=function(f){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=a,this.isOpen=!1)},s.prototype.getHeight=function(){return this.getElement().offsetHeight},s.prototype.getWidth=function(){return this.getElement().offsetWidth},s.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},s})(),c=(function(){function s(){this.popups=[]}return s.prototype.addPopup=function(f){this.popups.push(f),this.updatePopups()},s.prototype.removePopup=function(f){var b=this.popups.indexOf(f);b!==-1&&(this.popups.splice(b,1),this.updatePopups())},s.prototype.updatePopups=function(){var f,b,x,I;this.popups.sort(function(F,N){return N.priority-F.priority});var R=[];try{for(var A=g(this.popups),C=A.next();!C.done;C=A.next()){var O=C.value,D=!0;try{for(var E=(x=void 0,g(R)),T=E.next();!T.done;T=E.next()){var B=T.value;if(this.doPopupsOverlap(B,O)){D=!1;break}}}catch(F){x={error:F}}finally{try{T&&!T.done&&(I=E.return)&&I.call(E)}finally{if(x)throw x.error}}D?R.push(O):O.hide()}}catch(F){f={error:F}}finally{try{C&&!C.done&&(b=A.return)&&b.call(A)}finally{if(f)throw f.error}}},s.prototype.doPopupsOverlap=function(f,b){var x=f.getElement().getBoundingClientRect(),I=b.getElement().getBoundingClientRect();return x.left<I.right&&x.right>I.left&&x.top<I.bottom&&x.bottom>I.top},s})(),u=new c;r.popupManager=u,r.Tooltip=l;var i=(function(s){p(f,s);function f(b){b===void 0&&(b=document.body);var x=s.call(this,b)||this;x.timeout=void 0,x.lastT=0,x.idleTime=350,x.lastEvent=void 0,x.onMouseOut=x.onMouseOut.bind(x),x.onMouseMove=x.onMouseMove.bind(x),x.waitForHover=x.waitForHover.bind(x),x.hide=x.hide.bind(x);var I=x.getElement();return I.style.whiteSpace="pre-wrap",I.style.pointerEvents="auto",I.addEventListener("mouseout",x.onMouseOut),I.tabIndex=-1,I.addEventListener("blur",(function(){I.contains(document.activeElement)||this.hide()}).bind(x)),I.addEventListener("wheel",d),x}return f.prototype.addToEditor=function(b){b.on("mousemove",this.onMouseMove),b.on("mousedown",this.hide);var x=b.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.addEventListener("mouseout",this.onMouseOut,!0)},f.prototype.removeFromEditor=function(b){b.off("mousemove",this.onMouseMove),b.off("mousedown",this.hide);var x=b.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},f.prototype.onMouseMove=function(b,x){this.lastEvent=b,this.lastT=Date.now();var I=x.$mouseHandler.isMousePressed;if(this.isOpen){var R=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(R.row,R.column)||I||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||I||(this.lastEvent=b,this.timeout=setTimeout(this.waitForHover,this.idleTime))},f.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var b=Date.now()-this.lastT;if(this.idleTime-b>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-b);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},f.prototype.isOutsideOfText=function(b){var x=b.editor,I=b.getDocumentPosition(),R=x.session.getLine(I.row);if(I.column==R.length){var A=x.renderer.pixelToScreenCoordinates(b.clientX,b.clientY),C=x.session.documentToScreenPosition(I.row,I.column);if(C.column!=A.column||C.row!=A.row)return!0}return!1},f.prototype.setDataProvider=function(b){this.$gatherData=b},f.prototype.showForRange=function(b,x,I,R){if(!(R&&R!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var A=b.renderer;this.isOpen||(u.addPopup(this),this.$registerCloseEvents(),this.setTheme(A.theme)),this.isOpen=!0,this.range=h.fromPoints(x.start,x.end);var C=A.textToScreenCoordinates(x.start.row,x.start.column),O=A.scroller.getBoundingClientRect();C.pageX<O.left&&(C.pageX=O.left);var D=this.getElement();D.innerHTML="",D.appendChild(I),D.style.maxHeight="",D.style.display="block",this.$setPosition(b,C,!0,x),w.$fixPositionBug(D)}},f.prototype.$setPosition=function(b,x,I,R){var A=10;I&&this.addMarker(R,b.session);var C=b.renderer,O=this.getElement(),D=O.offsetHeight,E=O.offsetWidth,T=x.pageY,B=x.pageX,F=window.innerHeight-T-C.lineHeight,N=this.$shouldPlaceAbove(D,T,F-A);O.style.maxHeight=(N?T:F)-A+"px",O.style.top=N?"":T+C.lineHeight+"px",O.style.bottom=N?window.innerHeight-T+"px":"",O.style.left=Math.min(B,window.innerWidth-E-A)+"px"},f.prototype.$shouldPlaceAbove=function(b,x,I){return!(x-b<0&&x<I)},f.prototype.addMarker=function(b,x){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=x,this.marker=x&&x.addMarker(b,"ace_highlight-marker","text")},f.prototype.hide=function(b){b&&this.$fromKeyboard&&b.type=="keydown"&&b.code=="Escape"||!b&&document.activeElement==this.getElement()||b&&b.target&&(b.type!="keydown"||b.ctrlKey||b.metaKey)&&this.$element.contains(b.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,u.removePopup(this)))},f.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},f.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},f.prototype.onMouseOut=function(b){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!b.relatedTarget||this.getElement().contains(b.relatedTarget)||b&&b.currentTarget.contains(b.relatedTarget)||b.relatedTarget.classList.contains("ace_content")||this.hide())},f})(l);r.HoverTooltip=i}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(e,r,m){var p=this&&this.__extends||(function(){var i=function(s,f){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,x){b.__proto__=x}||function(b,x){for(var I in x)Object.prototype.hasOwnProperty.call(x,I)&&(b[I]=x[I])},i(s,f)};return function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");i(s,f);function b(){this.constructor=s}s.prototype=f===null?Object.create(f):(b.prototype=f.prototype,new b)}})(),g=this&&this.__values||function(i){var s=typeof Symbol=="function"&&Symbol.iterator,f=s&&i[s],b=0;if(f)return f.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&b>=i.length&&(i=void 0),{value:i&&i[b++],done:!i}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},w=e("../lib/dom"),h=e("./mouse_event").MouseEvent,d=e("../tooltip").HoverTooltip,a=e("../config").nls,l=e("../range").Range;function c(i){var s=i.editor,f=s.renderer.$gutterLayer;i.$tooltip=new u(s),i.$tooltip.addToEditor(s),i.$tooltip.setDataProvider(function(b,x){var I=b.getDocumentPosition().row;i.$tooltip.showTooltip(I)}),i.editor.setDefaultHandler("guttermousedown",function(b){if(!(!s.isFocused()||b.getButton()!=0)){var x=f.getRegion(b);if(x!="foldWidgets"){var I=b.getDocumentPosition().row,R=s.session.selection;if(b.getShiftKey())R.selectTo(I,0);else{if(b.domEvent.detail==2)return s.selectAll(),b.preventDefault();i.$clickSelection=s.selection.getLineRange(I)}return i.setState("selectByLines"),i.captureMouse(b),b.preventDefault()}}})}r.GutterHandler=c;var u=(function(i){p(s,i);function s(f){var b=i.call(this,f.container)||this;b.id="gt"+ ++s.$uid,b.editor=f,b.visibleTooltipRow;var x=b.getElement();return x.setAttribute("role","tooltip"),x.setAttribute("id",b.id),x.style.pointerEvents="auto",b.idleTime=50,b.onDomMouseMove=b.onDomMouseMove.bind(b),b.onDomMouseOut=b.onDomMouseOut.bind(b),b.setClassName("ace_gutter-tooltip"),b}return s.prototype.onDomMouseMove=function(f){var b=new h(f,this.editor);this.onMouseMove(b,this.editor)},s.prototype.onDomMouseOut=function(f){var b=new h(f,this.editor);this.onMouseOut(b)},s.prototype.addToEditor=function(f){var b=f.renderer.$gutter;b.addEventListener("mousemove",this.onDomMouseMove),b.addEventListener("mouseout",this.onDomMouseOut),i.prototype.addToEditor.call(this,f)},s.prototype.removeFromEditor=function(f){var b=f.renderer.$gutter;b.removeEventListener("mousemove",this.onDomMouseMove),b.removeEventListener("mouseout",this.onDomMouseOut),i.prototype.removeFromEditor.call(this,f)},s.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),i.prototype.destroy.call(this)},Object.defineProperty(s,"annotationLabels",{get:function(){return{error:{singular:a("gutter-tooltip.aria-label.error.singular","error"),plural:a("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:a("gutter-tooltip.aria-label.security.singular","security finding"),plural:a("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:a("gutter-tooltip.aria-label.warning.singular","warning"),plural:a("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:a("gutter-tooltip.aria-label.info.singular","information message"),plural:a("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:a("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:a("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),s.prototype.showTooltip=function(f){var b,x=this.editor.renderer.$gutterLayer,I=x.$annotations[f],R;I?R={displayText:Array.from(I.displayText),type:Array.from(I.type)}:R={displayText:[],type:[]};var A=x.session.getFoldLine(f);if(A&&x.$showFoldedAnnotations){for(var C={error:[],security:[],warning:[],info:[],hint:[]},O={error:1,security:2,warning:3,info:4,hint:5},D,E=f+1;E<=A.end.row;E++)if(x.$annotations[E])for(var T=0;T<x.$annotations[E].text.length;T++){var B=x.$annotations[E].type[T];C[B].push(x.$annotations[E].text[T]),(!D||O[B]<O[D])&&(D=B)}if(["error","security","warning"].includes(D)){var F="".concat(s.annotationsToSummaryString(C)," in folded code.");R.displayText.push(F),R.type.push(D+"_fold")}}if(R.displayText.length===0)return this.hide();for(var N={error:[],security:[],warning:[],info:[],hint:[]},$=x.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",E=0;E<R.displayText.length;E++){var k=w.createElement("span"),L=w.createElement("span");(b=L.classList).add.apply(b,["ace_".concat(R.type[E]),$]),L.setAttribute("aria-label","".concat(s.annotationLabels[R.type[E].replace("_fold","")].singular)),L.setAttribute("role","img"),L.appendChild(w.createTextNode(" ")),k.appendChild(L),k.appendChild(w.createTextNode(R.displayText[E])),k.appendChild(w.createElement("br")),N[R.type[E].replace("_fold","")].push(k)}var W=w.createElement("span");N.error.forEach(function(Z){return W.appendChild(Z)}),N.security.forEach(function(Z){return W.appendChild(Z)}),N.warning.forEach(function(Z){return W.appendChild(Z)}),N.info.forEach(function(Z){return W.appendChild(Z)}),N.hint.forEach(function(Z){return W.appendChild(Z)}),W.setAttribute("aria-live","polite");var U=this.$findLinkedAnnotationNode(f);U&&U.setAttribute("aria-describedby",this.id);var q=l.fromPoints({row:f,column:0},{row:f,column:0});this.showForRange(this.editor,q,W),this.visibleTooltipRow=f,this.editor._signal("showGutterTooltip",this)},s.prototype.$setPosition=function(f,b,x,I){var R=this.$findCellByRow(I.start.row);if(R){var A=R&&R.element,C=A&&A.querySelector(".ace_gutter_annotation");if(C){var O=C.getBoundingClientRect();if(O){var D={pageX:O.right,pageY:O.top};return i.prototype.$setPosition.call(this,f,D,!1,I)}}}},s.prototype.$shouldPlaceAbove=function(f,b,x){return x<f},s.prototype.$findLinkedAnnotationNode=function(f){var b=this.$findCellByRow(f);if(b){var x=b.element;if(x.childNodes.length>2)return x.childNodes[2]}},s.prototype.$findCellByRow=function(f){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(b){return b.row===f})},s.prototype.hide=function(f){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var b=this.$findLinkedAnnotationNode(this.visibleTooltipRow);b&&b.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),i.prototype.hide.call(this,f)}},s.annotationsToSummaryString=function(f){var b,x,I=[],R=["error","security","warning","info","hint"];try{for(var A=g(R),C=A.next();!C.done;C=A.next()){var O=C.value;if(f[O].length){var D=f[O].length===1?s.annotationLabels[O].singular:s.annotationLabels[O].plural;I.push("".concat(f[O].length," ").concat(D))}}}catch(E){b={error:E}}finally{try{C&&!C.done&&(x=A.return)&&x.call(A)}finally{if(b)throw b.error}}return I.join(", ")},s.prototype.isOutsideOfText=function(f){var b=f.editor,x=b.renderer.$gutter.getBoundingClientRect();return!(f.clientX>=x.left&&f.clientX<=x.right&&f.clientY>=x.top&&f.clientY<=x.bottom)},s})(d);u.$uid=0,r.GutterTooltip=u}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,r,m){var p=e("../lib/dom"),g=e("../lib/event"),w=e("../lib/useragent"),h=200,d=200,a=5;function l(u){var i=u.editor,s=p.createElement("div");s.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",s.textContent=" ";var f=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];f.forEach(function(ne){u[ne]=this[ne]},this),i.on("mousedown",this.onMouseDown.bind(u));var b=i.container,x,I,R,A,C,O,D=0,E,T,B,F,N;this.onDragStart=function(ne){if(this.cancelDrag||!b.draggable){var ce=this;return setTimeout(function(){ce.startSelect(),ce.captureMouse(ne)},0),ne.preventDefault()}C=i.getSelectionRange();var ae=ne.dataTransfer;ae.effectAllowed=i.getReadOnly()?"copy":"copyMove",i.container.appendChild(s),ae.setDragImage&&ae.setDragImage(s,0,0),setTimeout(function(){i.container.removeChild(s)}),ae.clearData(),ae.setData("Text",i.session.getTextRange()),T=!0,this.setState("drag")},this.onDragEnd=function(ne){if(b.draggable=!1,T=!1,this.setState(null),!i.getReadOnly()){var ce=ne.dataTransfer.dropEffect;!E&&ce=="move"&&i.session.remove(i.getSelectionRange()),i.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(i.getReadOnly()||!Q(ne.dataTransfer)))return I=ne.clientX,R=ne.clientY,x||W(),D++,ne.dataTransfer.dropEffect=E=le(ne),g.preventDefault(ne)},this.onDragOver=function(ne){if(!(i.getReadOnly()||!Q(ne.dataTransfer)))return I=ne.clientX,R=ne.clientY,x||(W(),D++),q!==null&&(q=null),ne.dataTransfer.dropEffect=E=le(ne),g.preventDefault(ne)},this.onDragLeave=function(ne){if(D--,D<=0&&x)return U(),E=null,g.preventDefault(ne)},this.onDrop=function(ne){if(O){var ce=ne.dataTransfer;if(T)switch(E){case"move":C.contains(O.row,O.column)?C={start:O,end:O}:C=i.moveText(C,O);break;case"copy":C=i.moveText(C,O,!0);break}else{var ae=ce.getData("Text");C={start:O,end:i.session.insert(O,ae)},i.focus(),E=null}return U(),g.preventDefault(ne)}},g.addListener(b,"dragstart",this.onDragStart.bind(u),i),g.addListener(b,"dragend",this.onDragEnd.bind(u),i),g.addListener(b,"dragenter",this.onDragEnter.bind(u),i),g.addListener(b,"dragover",this.onDragOver.bind(u),i),g.addListener(b,"dragleave",this.onDragLeave.bind(u),i),g.addListener(b,"drop",this.onDrop.bind(u),i);function $(ne,ce){var ae=Date.now(),de=!ce||ne.row!=ce.row,me=!ce||ne.column!=ce.column;if(!F||de||me)i.moveCursorToPosition(ne),F=ae,N={x:I,y:R};else{var $e=c(N.x,N.y,I,R);$e>a?F=null:ae-F>=d&&(i.renderer.scrollCursorIntoView(),F=null)}}function k(ne,ce){var ae=Date.now(),de=i.renderer.layerConfig.lineHeight,me=i.renderer.layerConfig.characterWidth,$e=i.renderer.scroller.getBoundingClientRect(),Re={x:{left:I-$e.left,right:$e.right-I},y:{top:R-$e.top,bottom:$e.bottom-R}},Me=Math.min(Re.x.left,Re.x.right),Xe=Math.min(Re.y.top,Re.y.bottom),qe={row:ne.row,column:ne.column};Me/me<=2&&(qe.column+=Re.x.left<Re.x.right?-3:2),Xe/de<=1&&(qe.row+=Re.y.top<Re.y.bottom?-1:1);var rt=ne.row!=qe.row,st=ne.column!=qe.column,et=!ce||ne.row!=ce.row;rt||st&&!et?B?ae-B>=h&&i.renderer.scrollCursorIntoView(qe):B=ae:B=null}function L(){var ne=O;O=i.renderer.screenToTextCoordinates(I,R),$(O,ne),k(O,ne)}function W(){C=i.selection.toOrientedRange(),x=i.session.addMarker(C,"ace_selection",i.getSelectionStyle()),i.clearSelection(),i.isFocused()&&i.renderer.$cursorLayer.setBlinking(!1),clearInterval(A),L(),A=setInterval(L,20),D=0,g.addListener(document,"mousemove",Z)}function U(){clearInterval(A),i.session.removeMarker(x),x=null,i.selection.fromOrientedRange(C),i.isFocused()&&!T&&i.$resetCursorStyle(),C=null,O=null,D=0,B=null,F=null,g.removeListener(document,"mousemove",Z)}var q=null;function Z(){q==null&&(q=setTimeout(function(){q!=null&&x&&U()},20))}function Q(ne){var ce=ne.types;return!ce||Array.prototype.some.call(ce,function(ae){return ae=="text/plain"||ae=="Text"})}function le(ne){var ce=["copy","copymove","all","uninitialized"],ae=["move","copymove","linkmove","all","uninitialized"],de=w.isMac?ne.altKey:ne.ctrlKey,me="uninitialized";try{me=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var $e="none";return de&&ce.indexOf(me)>=0?$e="copy":ae.indexOf(me)>=0?$e="move":ce.indexOf(me)>=0&&($e="copy"),$e}}(function(){this.dragWait=function(){var u=Date.now()-this.mousedownEvent.time;u>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var u=this.editor.container;u.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(u){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var u=this.editor,i=u.container;i.draggable=!0,u.renderer.$cursorLayer.setBlinking(!1),u.setStyle("ace_dragging");var s=w.isWin?"default":"move";u.renderer.setCursorStyle(s),this.setState("dragReady")},this.onMouseDrag=function(u){var i=this.editor.container;if(w.isIE&&this.state=="dragReady"){var s=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);s>3&&i.dragDrop()}if(this.state==="dragWait"){var s=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);s>0&&(i.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(u){if(this.$dragEnabled){this.mousedownEvent=u;var i=this.editor,s=u.inSelection(),f=u.getButton(),b=u.domEvent.detail||1;if(b===1&&f===0&&s){if(u.editor.inMultiSelectMode&&(u.getAccelKey()||u.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=u.domEvent.target||u.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),i.getDragDelay()){if(w.isWebKit){this.cancelDrag=!0;var I=i.container;I.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(u,this.onMouseDrag.bind(this)),u.defaultPrevented=!0}}}}).call(l.prototype);function c(u,i,s,f){return Math.sqrt(Math.pow(s-u,2)+Math.pow(f-i,2))}r.DragdropHandler=l}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,r,m){var p=e("./mouse_event").MouseEvent,g=e("../lib/event"),w=e("../lib/dom");r.addTouchListeners=function(h,d){var a="scroll",l,c,u,i,s,f,b=0,x,I=0,R=0,A=0,C,O;function D(){var $=window.navigator&&window.navigator.clipboard,k=!1,L=function(){var q=d.getCopyText(),Z=d.session.getUndoManager().hasUndo();O.replaceChild(w.buildDom(k?["span",!q&&W("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],q&&W("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],q&&W("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],$&&W("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Z&&W("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],W("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],W("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),O.firstChild)},W=function(q){return d.commands.canExecute(q,d)},U=function(q){var Z=q.target.getAttribute("action");if(Z=="more"||!k)return k=!k,L();Z=="paste"?$.readText().then(function(Q){d.execCommand(Z,Q)}):Z&&((Z=="cut"||Z=="copy")&&($?$.writeText(d.getCopyText()):document.execCommand("copy")),d.execCommand(Z)),O.firstChild.style.display="none",k=!1,Z!="openCommandPalette"&&d.focus()};O=w.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(q){a="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")){O&&T();return}O||D();var $=d.selection.cursor,k=d.renderer.textToScreenCoordinates($.row,$.column),L=d.renderer.textToScreenCoordinates(0,0).pageX,W=d.renderer.scrollLeft,U=d.container.getBoundingClientRect();O.style.top=k.pageY-U.top-3+"px",k.pageX-U.left<U.width-70?(O.style.left="",O.style.right="10px"):(O.style.right="",O.style.left=L+W-U.left+"px"),O.style.display="",O.firstChild.style.display="none",d.on("input",T)}function T($){O&&(O.style.display="none"),d.off("input",T)}function B(){s=null,clearTimeout(s);var $=d.selection.getRange(),k=$.contains(x.row,x.column);($.isEmpty()||!k)&&(d.selection.moveToPosition(x),d.selection.selectWord()),a="wait",E()}function F(){s=null,clearTimeout(s),d.selection.moveToPosition(x);var $=I>=2?d.selection.getLineRange(x.row):d.session.getBracketRange(x);$&&!$.isEmpty()?d.selection.setRange($):d.selection.selectWord(),a="wait"}g.addListener(h,"contextmenu",function($){if(C){var k=d.textInput.getElement();k.focus()}},d),g.addListener(h,"touchstart",function($){var k=$.touches;if(s||k.length>1){clearTimeout(s),s=null,u=-1,a="zoom";return}C=d.$mouseHandler.isMousePressed=!0;var L=d.renderer.layerConfig.lineHeight,W=d.renderer.layerConfig.lineHeight,U=$.timeStamp;i=U;var q=k[0],Z=q.clientX,Q=q.clientY;Math.abs(l-Z)+Math.abs(c-Q)>L&&(u=-1),l=$.clientX=Z,c=$.clientY=Q,R=A=0;var le=new p($,d);if(x=le.getDocumentPosition(),U-u<500&&k.length==1&&!b)I++,$.preventDefault(),$.button=0,F();else{I=0;var ne=d.selection.cursor,ce=d.selection.isEmpty()?ne:d.selection.anchor,ae=d.renderer.$cursorLayer.getPixelPosition(ne,!0),de=d.renderer.$cursorLayer.getPixelPosition(ce,!0),me=d.renderer.scroller.getBoundingClientRect(),$e=d.renderer.layerConfig.offset,Re=d.renderer.scrollLeft,Me=function(rt,st){return rt=rt/W,st=st/L-.75,rt*rt+st*st};if($.clientX<me.left){a="zoom";return}var Xe=Me($.clientX-me.left-ae.left+Re,$.clientY-me.top-ae.top+$e),qe=Me($.clientX-me.left-de.left+Re,$.clientY-me.top-de.top+$e);Xe<3.5&&qe<3.5&&(a=Xe>qe?"cursor":"anchor"),qe<3.5?a="anchor":Xe<3.5?a="cursor":a="scroll",s=setTimeout(B,450)}u=U},d),g.addListener(h,"touchend",function($){C=d.$mouseHandler.isMousePressed=!1,f&&clearInterval(f),a=="zoom"?(a="",b=0):s?(d.selection.moveToPosition(x),b=0,E()):a=="scroll"?(N(),T()):E(),clearTimeout(s),s=null},d),g.addListener(h,"touchmove",function($){s&&(clearTimeout(s),s=null);var k=$.touches;if(!(k.length>1||a=="zoom")){var L=k[0],W=l-L.clientX,U=c-L.clientY;if(a=="wait")if(W*W+U*U>4)a="cursor";else return $.preventDefault();l=L.clientX,c=L.clientY,$.clientX=L.clientX,$.clientY=L.clientY;var q=$.timeStamp,Z=q-i;if(i=q,a=="scroll"){var Q=new p($,d);Q.speed=1,Q.wheelX=W,Q.wheelY=U,10*Math.abs(W)<Math.abs(U)&&(W=0),10*Math.abs(U)<Math.abs(W)&&(U=0),Z!=0&&(R=W/Z,A=U/Z),d._emit("mousewheel",Q),Q.propagationStopped||(R=A=0)}else{var le=new p($,d),ne=le.getDocumentPosition();a=="cursor"?d.selection.moveCursorToPosition(ne):a=="anchor"&&d.selection.setSelectionAnchor(ne.row,ne.column),d.renderer.scrollCursorIntoView(ne),$.preventDefault()}}},d);function N(){b+=60,f=setInterval(function(){b--<=0&&(clearInterval(f),f=null),Math.abs(R)<.01&&(R=0),Math.abs(A)<.01&&(A=0),b<20&&(R=.9*R),b<20&&(A=.9*A);var $=d.session.getScrollTop();d.renderer.scrollBy(10*R,10*A),$==d.session.getScrollTop()&&(b=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 p=e("../lib/event"),g=e("../lib/useragent"),w=e("./default_handlers").DefaultHandlers,h=e("./default_gutter_handler").GutterHandler,d=e("./mouse_event").MouseEvent,a=e("./dragdrop_handler").DragdropHandler,l=e("./touch_handler").addTouchListeners,c=e("../config"),u=(function(){function i(s){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var f=this;this.editor=s,new w(this),new h(this),new a(this);var b=function(R){var A=!document.hasFocus||!document.hasFocus()||!s.isFocused()&&document.activeElement==(s.textInput&&s.textInput.getElement());A&&window.focus(),s.focus(),setTimeout(function(){s.isFocused()||s.focus()})},x=s.renderer.getMouseEventTarget();p.addListener(x,"click",this.onMouseEvent.bind(this,"click"),s),p.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),s),p.addMultiMouseDownListener([x,s.renderer.scrollBarV&&s.renderer.scrollBarV.inner,s.renderer.scrollBarH&&s.renderer.scrollBarH.inner,s.textInput&&s.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",s),p.addMouseWheelListener(s.container,this.onMouseWheel.bind(this,"mousewheel"),s),l(s.container,s);var I=s.renderer.$gutter;p.addListener(I,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),s),p.addListener(I,"click",this.onMouseEvent.bind(this,"gutterclick"),s),p.addListener(I,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),s),p.addListener(I,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),s),p.addListener(x,"mousedown",b,s),p.addListener(I,"mousedown",b,s),g.isIE&&s.renderer.scrollBarV&&(p.addListener(s.renderer.scrollBarV.element,"mousedown",b,s),p.addListener(s.renderer.scrollBarH.element,"mousedown",b,s)),s.on("mousemove",function(R){if(!(f.state||f.$dragDelay||!f.$dragEnabled)){var A=s.renderer.screenToTextCoordinates(R.x,R.y),C=s.session.selection.getRange(),O=s.renderer;!C.isEmpty()&&C.insideStart(A.row,A.column)?O.setCursorStyle("default"):O.setCursorStyle("")}},s)}return i.prototype.onMouseEvent=function(s,f){this.editor.session&&this.editor._emit(s,new d(f,this.editor))},i.prototype.onMouseMove=function(s,f){var b=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!b||!b.length||this.editor._emit(s,new d(f,this.editor))},i.prototype.onMouseWheel=function(s,f){var b=new d(f,this.editor);b.speed=this.$scrollSpeed*2,b.wheelX=f.wheelX,b.wheelY=f.wheelY,this.editor._emit(s,b)},i.prototype.setState=function(s){this.state=s},i.prototype.captureMouse=function(s,f){this.x=s.x,this.y=s.y,this.isMousePressed=!0;var b=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var I=this,R=!0,A=function(T){if(T){if(g.isWebKit&&!T.which&&I.releaseMouse)return I.releaseMouse();I.x=T.clientX,I.y=T.clientY,f&&f(T),I.mouseEvent=new d(T,I.editor),I.$mouseMoved=!0}},C=function(T){b.off("beforeEndOperation",E),R=!1,b.session&&O(),I[I.state+"End"]&&I[I.state+"End"](T),I.state="",I.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),I.$onCaptureMouseMove=I.releaseMouse=null,T&&I.onMouseEvent("mouseup",T),b.endOperation()},O=function(){I[I.state]&&I[I.state](),I.$mouseMoved=!1},D=function(){R&&(O(),p.nextFrame(D))};if(g.isOldIE&&s.domEvent.type=="dblclick")return setTimeout(function(){C(s)});var E=function(T){I.releaseMouse&&b.curOp.command.name&&b.curOp.selectionChanged&&(I[I.state+"End"]&&I[I.state+"End"](),I.state="",I.releaseMouse())};b.on("beforeEndOperation",E),b.startOperation({command:{name:"mouse"}}),I.$onCaptureMouseMove=A,I.releaseMouse=p.capture(this.editor.container,A,C),D()},i.prototype.cancelContextMenu=function(){var s=(function(f){f&&f.domEvent&&f.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",s),f&&f.domEvent&&p.stopEvent(f.domEvent))}).bind(this);setTimeout(s,10),this.editor.on("nativecontextmenu",s)},i.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},i})();u.prototype.releaseMouse=null,c.defineOptions(u.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:g.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),r.MouseHandler=u}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,r,m){var p=e("../lib/dom"),g=(function(){function w(h){h.on("click",function(d){var a=d.getDocumentPosition(),l=h.session,c=l.getFoldAt(a.row,a.column,1);c&&(d.getAccelKey()?l.removeFold(c):l.expandFold(c),d.stop());var u=d.domEvent&&d.domEvent.target;u&&p.hasCssClass(u,"ace_inline_button")&&p.hasCssClass(u,"ace_toggle_wrap")&&(l.setOption("wrap",!l.getUseWrapMode()),h.renderer.scrollCursorIntoView())}),h.on("gutterclick",function(d){var a=h.renderer.$gutterLayer.getRegion(d);if(a=="foldWidgets"){var l=d.getDocumentPosition().row,c=h.session;c.foldWidgets&&c.foldWidgets[l]&&h.session.onFoldWidgetClick(l,d),h.isFocused()||h.focus(),d.stop()}}),h.on("gutterdblclick",function(d){var a=h.renderer.$gutterLayer.getRegion(d);if(a=="foldWidgets"){var l=d.getDocumentPosition().row,c=h.session,u=c.getParentFoldRangeData(l,!0),i=u.range||u.firstRange;if(i){l=i.start.row;var s=c.getFoldAt(l,c.getLine(l).length,1);s?c.removeFold(s):(c.addFold("...",i),h.renderer.scrollCursorIntoView({row:i.start.row,column:0}))}d.stop()}})}return w})();r.FoldHandler=g}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,r,m){var p=e("../lib/keys"),g=e("../lib/event"),w=(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 a=this.$handlers;if(a[a.length-1]!=d){for(;a[a.length-1]&&a[a.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(a[a.length-1]);this.addKeyboardHandler(d,1)}},h.prototype.addKeyboardHandler=function(d,a){if(d){typeof d=="function"&&!d.handleKeyboard&&(d.handleKeyboard=d);var l=this.$handlers.indexOf(d);l!=-1&&this.$handlers.splice(l,1),a==null?this.$handlers.push(d):this.$handlers.splice(a,0,d),l==-1&&d.attach&&d.attach(this.$editor)}},h.prototype.removeKeyboardHandler=function(d){var a=this.$handlers.indexOf(d);return a==-1?!1:(this.$handlers.splice(a,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,a=d.editor;return this.$handlers.map(function(l){return l.getStatusText&&l.getStatusText(a,d)||""}).filter(Boolean).join(" ")},h.prototype.$callKeyboardHandlers=function(d,a,l,c){for(var u,i=!1,s=this.$editor.commands,f=this.$handlers.length;f--&&(u=this.$handlers[f].handleKeyboard(this.$data,d,a,l,c),!(!(!u||!u.command)&&(u.command=="null"?i=!0:i=s.exec(u.command,this.$editor,u.args,c),i&&c&&d!=-1&&u.passEvent!=!0&&u.command.passEvent!=!0&&g.stopEvent(c),i))););return!i&&d==-1&&(u={command:"insertstring"},i=s.exec("insertstring",this.$editor,a)),i&&this.$editor._signal&&this.$editor._signal("keyboardActivity",u),i},h.prototype.onCommandKey=function(d,a,l){var c=p.keyCodeToString(l);return this.$callKeyboardHandlers(a,c,l,d)},h.prototype.onTextInput=function(d){return this.$callKeyboardHandlers(-1,d)},h})();r.KeyBinding=w}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,r,m){var p=0,g=0,w=!1,h=!1,d=!1,a=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],l=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],c=0,u=1,i=0,s=1,f=2,b=3,x=4,I=5,R=6,A=7,C=8,O=9,D=10,E=11,T=12,B=13,F=14,N=15,$=16,k=17,L=18,W=[L,L,L,L,L,L,L,L,L,R,I,R,C,I,L,L,L,L,L,L,L,L,L,L,L,L,L,L,I,I,I,R,C,x,x,E,E,E,x,x,x,x,x,D,O,D,O,O,f,f,f,f,f,f,f,f,f,f,O,x,x,x,x,x,x,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,x,x,x,x,x,x,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,x,x,x,x,L,L,L,L,L,L,I,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,O,x,E,E,E,E,x,x,x,x,i,x,x,L,x,x,E,E,f,f,x,i,x,x,x,f,i,x,x,x,x,x],U=[C,C,C,C,C,C,C,C,C,C,C,L,L,L,i,s,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C,I,B,F,N,$,k,O,E,E,E,E,E,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,O,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C];function q(ne,ce,ae,de){var me=p?l:a,$e=null,Re=null,Me=null,Xe=0,qe=null,rt=null,st=-1,et=null,Wt=null,br=[];if(!de)for(et=0,de=[];et<ae;et++)de[et]=le(ne[et]);for(g=p,w=!1,h=!1,d=!1,Wt=0;Wt<ae;Wt++){if($e=Xe,br[Wt]=Re=Q(ne,de,br,Wt),Xe=me[$e][Re],qe=Xe&240,Xe&=15,ce[Wt]=Me=me[Xe][5],qe>0)if(qe==16){for(et=st;et<Wt;et++)ce[et]=1;st=-1}else st=-1;if(rt=me[Xe][6],rt)st==-1&&(st=Wt);else if(st>-1){for(et=st;et<Wt;et++)ce[et]=Me;st=-1}de[Wt]==I&&(ce[Wt]=0),g|=Me}if(d){for(et=0;et<ae;et++)if(de[et]==R){ce[et]=p;for(var At=et-1;At>=0&&de[At]==C;At--)ce[At]=p}}}function Z(ne,ce,ae){if(!(g<ne)){if(ne==1&&p==u&&!h){ae.reverse();return}for(var de=ae.length,me=0,$e,Re,Me,Xe;me<de;){if(ce[me]>=ne){for($e=me+1;$e<de&&ce[$e]>=ne;)$e++;for(Re=me,Me=$e-1;Re<Me;Re++,Me--)Xe=ae[Re],ae[Re]=ae[Me],ae[Me]=Xe;me=$e}me++}}}function Q(ne,ce,ae,de){var me=ce[de],$e,Re,Me,Xe;switch(me){case i:case s:w=!1;case x:case b:return me;case f:return w?b:f;case A:return w=!0,s;case C:return x;case O:return de<1||de+1>=ce.length||($e=ae[de-1])!=f&&$e!=b||(Re=ce[de+1])!=f&&Re!=b?x:(w&&(Re=b),Re==$e?Re:x);case D:return $e=de>0?ae[de-1]:I,$e==f&&de+1<ce.length&&ce[de+1]==f?f:x;case E:if(de>0&&ae[de-1]==f)return f;if(w)return x;for(Xe=de+1,Me=ce.length;Xe<Me&&ce[Xe]==E;)Xe++;return Xe<Me&&ce[Xe]==f?f:x;case T:for(Me=ce.length,Xe=de+1;Xe<Me&&ce[Xe]==T;)Xe++;if(Xe<Me){var qe=ne[de],rt=qe>=1425&&qe<=2303||qe==64286;if($e=ce[Xe],rt&&($e==s||$e==A))return s}return de<1||($e=ce[de-1])==I?x:ae[de-1];case I:return w=!1,h=!0,p;case R:return d=!0,x;case B:case F:case $:case k:case N:w=!1;case L:return x}}function le(ne){var ce=ne.charCodeAt(0),ae=ce>>8;return ae==0?ce>191?i:W[ce]:ae==5?/[\u0591-\u05f4]/.test(ne)?s:i:ae==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?T:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?b:ce==1642?E:/[\u06f0-\u06f9]/.test(ne)?f:A:ae==32&&ce<=8287?U[ce&255]:ae==254&&ce>=65136?A:x}r.L=i,r.R=s,r.EN=f,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(ne,ce,ae){if(ne.length<2)return{};var de=ne.split(""),me=new Array(de.length),$e=new Array(de.length),Re=[];p=ae?u:c,q(de,Re,de.length,ce);for(var Me=0;Me<me.length;me[Me]=Me,Me++);Z(2,Re,me),Z(1,Re,me);for(var Me=0;Me<me.length-1;Me++)ce[Me]===b?Re[Me]=r.AN:Re[Me]===s&&(ce[Me]>A&&ce[Me]<B||ce[Me]===x||ce[Me]===L)?Re[Me]=r.ON_R:Me>0&&de[Me-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(de[Me])&&(Re[Me-1]=Re[Me]=r.R_H,Me++);de[de.length-1]===r.DOT&&(Re[de.length-1]=r.B),de[0]==="‫"&&(Re[0]=r.RLE);for(var Me=0;Me<me.length;Me++)$e[Me]=Re[me[Me]];return{logicalFromVisual:me,bidiLevels:$e}},r.hasBidiCharacters=function(ne,ce){for(var ae=!1,de=0;de<ne.length;de++)ce[de]=le(ne.charAt(de)),!ae&&(ce[de]==s||ce[de]==A||ce[de]==b)&&(ae=!0);return ae},r.getVisualFromLogicalIdx=function(ne,ce){for(var ae=0;ae<ce.logicalFromVisual.length;ae++)if(ce.logicalFromVisual[ae]==ne)return ae;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,r,m){var p=e("./lib/bidiutil"),g=e("./lib/lang"),w=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,h=(function(){function d(a){this.session=a,this.bidiMap={},this.currentRow=null,this.bidiUtil=p,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="‫",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=w.test(a.getValue())}return d.prototype.isBidiRow=function(a,l,c){return this.seenBidi?(a!==this.currentRow&&(this.currentRow=a,this.updateRowLine(l,c),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},d.prototype.onChange=function(a){this.seenBidi?this.currentRow=null:a.action=="insert"&&w.test(a.lines.join(`
182
+ `))&&(this.seenBidi=!0,this.currentRow=null)},d.prototype.getDocumentRow=function(){var a=0,l=this.session.$screenRowCache;if(l.length){var c=this.session.$getRowCacheIndex(l,this.currentRow);c>=0&&(a=this.session.$docRowCache[c])}return a},d.prototype.getSplitIndex=function(){var a=0,l=this.session.$screenRowCache;if(l.length)for(var c,u=this.session.$getRowCacheIndex(l,this.currentRow);this.currentRow-a>0&&(c=this.session.$getRowCacheIndex(l,this.currentRow-a-1),c===u);)u=c,a++;else a=this.currentRow;return a},d.prototype.updateRowLine=function(a,l){a===void 0&&(a=this.getDocumentRow());var c=a===this.session.getLength()-1,u=c?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(a),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var i=this.session.$wrapData[a];i&&(l===void 0&&(l=this.getSplitIndex()),l>0&&i.length?(this.wrapIndent=i.indent,this.wrapOffset=this.wrapIndent*this.charWidths[p.L],this.line=l<i.length?this.line.substring(i[l-1],i[l]):this.line.substring(i[i.length-1])):this.line=this.line.substring(0,i[l]),l==i.length&&(this.line+=this.showInvisibles?u:p.DOT))}else this.line+=this.showInvisibles?u:p.DOT;var s=this.session,f=0,b;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(x,I){return x===" "||s.isFullWidth(x.charCodeAt(0))?(b=x===" "?s.getScreenTabSize(I+f):2,f+=b-1,g.stringRepeat(p.DOT,b)):x}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==p.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},d.prototype.updateBidiMap=function(){var a=[];p.hasBidiCharacters(this.line,a)||this.isRtlDir?this.bidiMap=p.doBidiReorder(this.line,a,this.isRtlDir):this.bidiMap={}},d.prototype.markAsDirty=function(){this.currentRow=null},d.prototype.updateCharacterWidths=function(a){if(this.characterWidth!==a.$characterSize.width){this.fontMetrics=a;var l=this.characterWidth=a.$characterSize.width,c=a.$measureCharWidth("ה");this.charWidths[p.L]=this.charWidths[p.EN]=this.charWidths[p.ON_R]=l,this.charWidths[p.R]=this.charWidths[p.AN]=c,this.charWidths[p.R_H]=c*.45,this.charWidths[p.B]=this.charWidths[p.RLE]=0,this.currentRow=null}},d.prototype.setShowInvisibles=function(a){this.showInvisibles=a,this.currentRow=null},d.prototype.setEolChar=function(a){this.EOL=a},d.prototype.setContentWidth=function(a){this.contentWidth=a},d.prototype.isRtlLine=function(a){return this.$isRtl?!0:a!=null?this.session.getLine(a).charAt(0)==this.RLE:this.isRtlDir},d.prototype.setRtlDirection=function(a,l){for(var c=a.getCursorPosition(),u=a.selection.getSelectionAnchor().row;u<=c.row;u++)!l&&a.session.getLine(u).charAt(0)===a.session.$bidiHandler.RLE?a.session.doc.removeInLine(u,0,1):l&&a.session.getLine(u).charAt(0)!==a.session.$bidiHandler.RLE&&a.session.doc.insert({column:0,row:u},a.session.$bidiHandler.RLE)},d.prototype.getPosLeft=function(a){a-=this.wrapIndent;var l=this.line.charAt(0)===this.RLE?1:0,c=a>l?this.session.getOverwrite()?a:a-1:l,u=p.getVisualFromLogicalIdx(c,this.bidiMap),i=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&a<=l&&i[u]%2!==0&&u++;for(var f=0;f<u;f++)s+=this.charWidths[i[f]];return!this.session.getOverwrite()&&a>l&&i[u]%2===0&&(s+=this.charWidths[i[u]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},d.prototype.getSelections=function(a,l){var c=this.bidiMap,u=c.bidiLevels,i,s=[],f=0,b=Math.min(a,l)-this.wrapIndent,x=Math.max(a,l)-this.wrapIndent,I=!1,R=!1,A=0;this.wrapIndent&&(f+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,O=0;O<u.length;O++)C=c.logicalFromVisual[O],i=u[O],I=C>=b&&C<x,I&&!R?A=f:!I&&R&&s.push({left:A,width:f-A}),f+=this.charWidths[i],R=I;if(I&&O===u.length&&s.push({left:A,width:f-A}),this.isRtlDir)for(var D=0;D<s.length;D++)s[D].left+=this.rtlLineOffset;return s},d.prototype.offsetToCol=function(c){this.isRtlDir&&(c-=this.rtlLineOffset);var l=0,c=Math.max(c,0),u=0,i=0,s=this.bidiMap.bidiLevels,f=this.charWidths[s[i]];for(this.wrapIndent&&(c-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);c>u+f/2;){if(u+=f,i===s.length-1){f=0;break}f=this.charWidths[s[++i]]}return i>0&&s[i-1]%2!==0&&s[i]%2===0?(c<u&&i--,l=this.bidiMap.logicalFromVisual[i]):i>0&&s[i-1]%2===0&&s[i]%2!==0?l=1+(c>u?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===s.length-1&&f===0&&s[i-1]%2===0||!this.isRtlDir&&i===0&&s[i]%2!==0?l=1+this.bidiMap.logicalFromVisual[i]:(i>0&&s[i-1]%2!==0&&f!==0&&i--,l=this.bidiMap.logicalFromVisual[i]),l===0&&this.isRtlDir&&l++,l+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 p=e("./lib/oop"),g=e("./lib/lang"),w=e("./lib/event_emitter").EventEmitter,h=e("./range").Range,d=(function(){function a(l){this.session=l,this.doc=l.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var c=this;this.cursor.on("change",function(u){c.$cursorChanged=!0,c.$silent||c._emit("changeCursor"),!c.$isEmpty&&!c.$silent&&c._emit("changeSelection"),!c.$keepDesiredColumnOnChange&&u.old.column!=u.value.column&&(c.$desiredColumn=null)}),this.anchor.on("change",function(){c.$anchorChanged=!0,!c.$isEmpty&&!c.$silent&&c._emit("changeSelection")})}return a.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},a.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},a.prototype.getCursor=function(){return this.lead.getPosition()},a.prototype.setAnchor=function(l,c){this.$isEmpty=!1,this.anchor.setPosition(l,c)},a.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},a.prototype.getSelectionLead=function(){return this.lead.getPosition()},a.prototype.isBackwards=function(){var l=this.anchor,c=this.lead;return l.row>c.row||l.row==c.row&&l.column>c.column},a.prototype.getRange=function(){var l=this.anchor,c=this.lead;return this.$isEmpty?h.fromPoints(c,c):this.isBackwards()?h.fromPoints(c,l):h.fromPoints(l,c)},a.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},a.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},a.prototype.setRange=function(l,c){var u=c?l.end:l.start,i=c?l.start:l.end;this.$setSelection(u.row,u.column,i.row,i.column)},a.prototype.$setSelection=function(l,c,u,i){if(!this.$silent){var s=this.$isEmpty,f=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(l,c),this.cursor.setPosition(u,i),this.$isEmpty=!h.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||s!=this.$isEmpty||f)&&this._emit("changeSelection")}},a.prototype.$moveSelection=function(l){var c=this.lead;this.$isEmpty&&this.setSelectionAnchor(c.row,c.column),l.call(this)},a.prototype.selectTo=function(l,c){this.$moveSelection(function(){this.moveCursorTo(l,c)})},a.prototype.selectToPosition=function(l){this.$moveSelection(function(){this.moveCursorToPosition(l)})},a.prototype.moveTo=function(l,c){this.clearSelection(),this.moveCursorTo(l,c)},a.prototype.moveToPosition=function(l){this.clearSelection(),this.moveCursorToPosition(l)},a.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},a.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},a.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},a.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},a.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},a.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},a.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},a.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},a.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},a.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},a.prototype.getWordRange=function(l,c){if(typeof c>"u"){var u=l||this.lead;l=u.row,c=u.column}return this.session.getWordRange(l,c)},a.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},a.prototype.selectAWord=function(){var l=this.getCursor(),c=this.session.getAWordRange(l.row,l.column);this.setSelectionRange(c)},a.prototype.getLineRange=function(l,c){var u=typeof l=="number"?l:this.lead.row,i,s=this.session.getFoldLine(u);return s?(u=s.start.row,i=s.end.row):i=u,c===!0?new h(u,0,i,this.session.getLine(i).length):new h(u,0,i+1,0)},a.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},a.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},a.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},a.prototype.wouldMoveIntoSoftTab=function(l,c,u){var i=l.column,s=l.column+c;return u<0&&(i=l.column-c,s=l.column),this.session.isTabStop(l)&&this.doc.getLine(l.row).slice(i,s).split(" ").length-1==c},a.prototype.moveCursorLeft=function(){var l=this.lead.getPosition(),c;if(c=this.session.getFoldAt(l.row,l.column,-1))this.moveCursorTo(c.start.row,c.start.column);else if(l.column===0)l.row>0&&this.moveCursorTo(l.row-1,this.doc.getLine(l.row-1).length);else{var u=this.session.getTabSize();this.wouldMoveIntoSoftTab(l,u,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-u):this.moveCursorBy(0,-1)}},a.prototype.moveCursorRight=function(){var l=this.lead.getPosition(),c;if(c=this.session.getFoldAt(l.row,l.column,1))this.moveCursorTo(c.end.row,c.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var u=this.session.getTabSize(),l=this.lead;this.wouldMoveIntoSoftTab(l,u,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,u):this.moveCursorBy(0,1)}},a.prototype.moveCursorLineStart=function(){var l=this.lead.row,c=this.lead.column,u=this.session.documentToScreenRow(l,c),i=this.session.screenToDocumentPosition(u,0),s=this.session.getDisplayLine(l,null,i.row,i.column),f=s.match(/^\s*/);f[0].length!=c&&!this.session.$useEmacsStyleLineStart&&(i.column+=f[0].length),this.moveCursorToPosition(i)},a.prototype.moveCursorLineEnd=function(){var l=this.lead,c=this.session.getDocumentLastRowColumnPosition(l.row,l.column);if(this.lead.column==c.column){var u=this.session.getLine(c.row);if(c.column==u.length){var i=u.search(/\s+$/);i>0&&(c.column=i)}}this.moveCursorTo(c.row,c.column)},a.prototype.moveCursorFileEnd=function(){var l=this.doc.getLength()-1,c=this.doc.getLine(l).length;this.moveCursorTo(l,c)},a.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},a.prototype.moveCursorLongWordRight=function(){var l=this.lead.row,c=this.lead.column,u=this.doc.getLine(l),i=u.substring(c);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var s=this.session.getFoldAt(l,c,1);if(s){this.moveCursorTo(s.end.row,s.end.column);return}if(this.session.nonTokenRe.exec(i)&&(c+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=u.substring(c)),c>=u.length){this.moveCursorTo(l,u.length),this.moveCursorRight(),l<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(i)&&(c+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(l,c)},a.prototype.moveCursorLongWordLeft=function(){var l=this.lead.row,c=this.lead.column,u;if(u=this.session.getFoldAt(l,c,-1)){this.moveCursorTo(u.start.row,u.start.column);return}var i=this.session.getFoldStringAt(l,c,-1);i==null&&(i=this.doc.getLine(l).substring(0,c));var s=g.stringReverse(i);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(s)&&(c-=this.session.nonTokenRe.lastIndex,s=s.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),c<=0){this.moveCursorTo(l,0),this.moveCursorLeft(),l>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(s)&&(c-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(l,c)},a.prototype.$shortWordEndIndex=function(l){var c=0,u,i=/\s/,s=this.session.tokenRe;if(s.lastIndex=0,this.session.tokenRe.exec(l))c=this.session.tokenRe.lastIndex;else{for(;(u=l[c])&&i.test(u);)c++;if(c<1){for(s.lastIndex=0;(u=l[c])&&!s.test(u);)if(s.lastIndex=0,c++,i.test(u))if(c>2){c--;break}else{for(;(u=l[c])&&i.test(u);)c++;if(c>2)break}}}return s.lastIndex=0,c},a.prototype.moveCursorShortWordRight=function(){var l=this.lead.row,c=this.lead.column,u=this.doc.getLine(l),i=u.substring(c),s=this.session.getFoldAt(l,c,1);if(s)return this.moveCursorTo(s.end.row,s.end.column);if(c==u.length){var f=this.doc.getLength();do l++,i=this.doc.getLine(l);while(l<f&&/^\s*$/.test(i));/^\s+/.test(i)||(i=""),c=0}var b=this.$shortWordEndIndex(i);this.moveCursorTo(l,c+b)},a.prototype.moveCursorShortWordLeft=function(){var l=this.lead.row,c=this.lead.column,u;if(u=this.session.getFoldAt(l,c,-1))return this.moveCursorTo(u.start.row,u.start.column);var i=this.session.getLine(l).substring(0,c);if(c===0){do l--,i=this.doc.getLine(l);while(l>0&&/^\s*$/.test(i));c=i.length,/\s+$/.test(i)||(i="")}var s=g.stringReverse(i),f=this.$shortWordEndIndex(s);return this.moveCursorTo(l,c-f)},a.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},a.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},a.prototype.moveCursorBy=function(l,c){var u=this.session.documentToScreenPosition(this.lead.row,this.lead.column),i;if(c===0&&(l!==0&&(this.session.$bidiHandler.isBidiRow(u.row,this.lead.row)?(i=this.session.$bidiHandler.getPosLeft(u.column),u.column=Math.round(i/this.session.$bidiHandler.charWidths[0])):i=u.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?u.column=this.$desiredColumn:this.$desiredColumn=u.column),l!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var s=this.session.lineWidgets[this.lead.row];l<0?l-=s.rowsAbove||0:l>0&&(l+=s.rowCount-(s.rowsAbove||0))}var f=this.session.screenToDocumentPosition(u.row+l,u.column,i);l!==0&&c===0&&f.row===this.lead.row&&(f.column,this.lead.column),this.moveCursorTo(f.row,f.column+c,c===0)},a.prototype.moveCursorToPosition=function(l){this.moveCursorTo(l.row,l.column)},a.prototype.moveCursorTo=function(l,c,u){var i=this.session.getFoldAt(l,c,1);i&&(l=i.start.row,c=i.start.column),this.$keepDesiredColumnOnChange=!0;var s=this.session.getLine(l);/[\uDC00-\uDFFF]/.test(s.charAt(c))&&s.charAt(c-1)&&(this.lead.row==l&&this.lead.column==c+1?c=c-1:c=c+1),this.lead.setPosition(l,c),this.$keepDesiredColumnOnChange=!1,u||(this.$desiredColumn=null)},a.prototype.moveCursorToScreen=function(l,c,u){var i=this.session.screenToDocumentPosition(l,c);this.moveCursorTo(i.row,i.column,u)},a.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},a.prototype.fromOrientedRange=function(l){this.setSelectionRange(l,l.cursor==l.start),this.$desiredColumn=l.desiredColumn||this.$desiredColumn},a.prototype.toOrientedRange=function(l){var c=this.getRange();return l?(l.start.column=c.start.column,l.start.row=c.start.row,l.end.column=c.end.column,l.end.row=c.end.row):l=c,l.cursor=this.isBackwards()?l.start:l.end,l.desiredColumn=this.$desiredColumn,l},a.prototype.getRangeOfMovements=function(l){var c=this.getCursor();try{l(this);var u=this.getCursor();return h.fromPoints(c,u)}catch{return h.fromPoints(c,c)}finally{this.moveCursorToPosition(c)}},a.prototype.toJSON=function(){if(this.rangeCount)var l=this.ranges.map(function(c){var u=c.clone();return u.isBackwards=c.cursor==c.start,u});else{var l=this.getRange();l.isBackwards=this.isBackwards()}return l},a.prototype.fromJSON=function(l){if(l.start==null)if(this.rangeList&&l.length>1){this.toSingleRange(l[0]);for(var c=l.length;c--;){var u=h.fromPoints(l[c].start,l[c].end);l[c].isBackwards&&(u.cursor=u.start),this.addRange(u,!0)}return}else l=l[0];this.rangeList&&this.toSingleRange(l),this.setSelectionRange(l,l.isBackwards)},a.prototype.isEqual=function(l){if((l.length||this.rangeCount)&&l.length!=this.rangeCount)return!1;if(!l.length||!this.ranges)return this.getRange().isEqual(l);for(var c=this.ranges.length;c--;)if(!this.ranges[c].isEqual(l[c]))return!1;return!0},a})();d.prototype.setSelectionAnchor=d.prototype.setAnchor,d.prototype.getSelectionAnchor=d.prototype.getAnchor,d.prototype.setSelectionRange=d.prototype.setRange,p.implement(d.prototype,w),r.Selection=d}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,r,m){var p=e("./lib/report_error").reportError,g=2e3,w=(function(){function h(d){this.splitRegex,this.states=d,this.regExps={},this.matchMappings={};for(var a in this.states){for(var l=this.states[a],c=[],u=0,i=this.matchMappings[a]={defaultToken:"text"},s="g",f=[],b=0;b<l.length;b++){var x=l[b];if(x.defaultToken&&(i.defaultToken=x.defaultToken),x.caseInsensitive&&s.indexOf("i")===-1&&(s+="i"),x.unicode&&s.indexOf("u")===-1&&(s+="u"),x.regex!=null){x.regex instanceof RegExp&&(x.regex=x.regex.toString().slice(1,-1));var I=x.regex,R=new RegExp("(?:("+I+")|(.))").exec("a").length-2;Array.isArray(x.token)?x.token.length==1||R==1?x.token=x.token[0]:R-1!=x.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:x,groupCount:R-1}),x.token=x.token[0]):(x.tokenArray=x.token,x.token=null,x.onMatch=this.$arrayTokens):typeof x.token=="function"&&!x.onMatch&&(R>1?x.onMatch=this.$applyToken:x.onMatch=x.token),R>1&&(/\\\d/.test(x.regex)?I=x.regex.replace(/\\([0-9]+)/g,function(A,C){return"\\"+(parseInt(C,10)+u+1)}):(R=1,I=this.removeCapturingGroups(x.regex)),!x.splitRegex&&typeof x.token!="string"&&f.push(x)),i[u]=b,u+=R,c.push(I),x.onMatch||(x.onMatch=null)}}c.length||(i[0]=0,c.push("$")),f.forEach(function(A){A.splitRegex=this.createSplitterRegexp(A.regex,s)},this),this.regExps[a]=new RegExp("("+c.join(")|(")+")|($)",s)}}return h.prototype.$setMaxTokenCount=function(d){g=d|0},h.prototype.$applyToken=function(d){var a=this.splitRegex.exec(d).slice(1),l=this.token.apply(this,a);if(typeof l=="string")return[{type:l,value:d}];for(var c=[],u=0,i=l.length;u<i;u++)a[u]&&(c[c.length]={type:l[u],value:a[u]});return c},h.prototype.$arrayTokens=function(d){if(!d)return[];var a=this.splitRegex.exec(d);if(!a)return"text";for(var l=[],c=this.tokenArray,u=0,i=c.length;u<i;u++)a[u+1]&&(l[l.length]={type:c[u],value:a[u+1]});return l},h.prototype.removeCapturingGroups=function(d){var a=d.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(l,c){return c?"(?:":l});return a},h.prototype.createSplitterRegexp=function(d,a){if(d.indexOf("(?=")!=-1){var l=0,c=!1,u={};d.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(i,s,f,b,x,I){return c?c=x!="]":x?c=!0:b?(l==u.stack&&(u.end=I+1,u.stack=-1),l--):f&&(l++,f.length!=1&&(u.stack=l,u.start=I)),i}),u.end!=null&&/^\)*$/.test(d.substr(u.end))&&(d=d.substring(0,u.start)+d.substr(u.end))}return d.charAt(0)!="^"&&(d="^"+d),d.charAt(d.length-1)!="$"&&(d+="$"),new RegExp(d,(a||"").replace("g",""))},h.prototype.getLineTokens=function(d,a){if(a&&typeof a!="string"){var l=a.slice(0);a=l[0],a==="#tmp"&&(l.shift(),a=l.shift())}else var l=[];var c=a||"start",u=this.states[c];u||(c="start",u=this.states[c]);var i=this.matchMappings[c],s=this.regExps[c];s.lastIndex=0;for(var f,b=[],x=0,I=0,R={type:null,value:""};f=s.exec(d);){var A=i.defaultToken,C=null,O=f[0],D=s.lastIndex;if(D-O.length>x){var E=d.substring(x,D-O.length);R.type==A?R.value+=E:(R.type&&b.push(R),R={type:A,value:E})}for(var T=0;T<f.length-2;T++)if(f[T+1]!==void 0){C=u[i[T]],C.onMatch?A=C.onMatch(O,c,l,d):A=C.token,C.next&&(typeof C.next=="string"?c=C.next:c=C.next(c,l),u=this.states[c],u||(this.reportError("state doesn't exist",c),c="start",u=this.states[c]),i=this.matchMappings[c],x=D,s=this.regExps[c],s.lastIndex=D),C.consumeLineEnd&&(x=D);break}if(O){if(typeof A=="string")(!C||C.merge!==!1)&&R.type===A?R.value+=O:(R.type&&b.push(R),R={type:A,value:O});else if(A){R.type&&b.push(R),R={type:null,value:""};for(var T=0;T<A.length;T++)b.push(A[T])}}if(x==d.length)break;if(x=D,I++>g){for(I>2*d.length&&this.reportError("infinite loop with in ace tokenizer",{startState:a,line:d});x<d.length;)R.type&&b.push(R),R={value:d.substring(x,x+=500),type:"overflow"};c="start",l=[];break}}return R.type&&b.push(R),l.length>1&&l[0]!==c&&l.unshift("#tmp",c),{tokens:b,state:l.length?l:c}},h})();w.prototype.reportError=p,r.Tokenizer=w}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,r,m){var p=e("../lib/deep_copy").deepCopy,g;g=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(d,a){if(!a){for(var l in d)this.$rules[l]=d[l];return}for(var l in d){for(var c=d[l],u=0;u<c.length;u++){var i=c[u];(i.next||i.onMatch)&&(typeof i.next=="string"&&i.next.indexOf(a)!==0&&(i.next=a+i.next),i.nextState&&i.nextState.indexOf(a)!==0&&(i.nextState=a+i.nextState))}this.$rules[a+l]=c}},this.getRules=function(){return this.$rules},this.embedRules=function(d,a,l,c,u){var i=typeof d=="function"?new d().getRules():d;if(c)for(var s=0;s<c.length;s++)c[s]=a+c[s];else{c=[];for(var f in i)c.push(a+f)}if(this.addRules(i,a),l)for(var b=Array.prototype[u?"push":"unshift"],s=0;s<c.length;s++)b.apply(this.$rules[c[s]],p(l));this.$embeds||(this.$embeds=[]),this.$embeds.push(a)},this.getEmbeds=function(){return this.$embeds};var w=function(d,a){return(d!="start"||a.length)&&a.unshift(this.nextState,d),this.nextState},h=function(d,a){return a.shift(),a.shift()||"start"};this.normalizeRules=function(){var d=0,a=this.$rules;function l(c){var u=a[c];u.processed=!0;for(var i=0;i<u.length;i++){var s=u[i],f=null;Array.isArray(s)&&(f=s,s={}),!s.regex&&s.start&&(s.regex=s.start,s.next||(s.next=[]),s.next.push({defaultToken:s.token},{token:s.token+".end",regex:s.end||s.start,next:"pop"}),s.token=s.token+".start",s.push=!0);var b=s.next||s.push;if(b&&Array.isArray(b)){var x=s.stateName;x||(x=s.token,typeof x!="string"&&(x=x[0]||""),a[x]&&(x+=d++)),a[x]=b,s.next=x,l(x)}else b=="pop"&&(s.next=h);if(s.push&&(s.nextState=s.next||s.push,s.next=w,delete s.push),s.rules)for(var I in s.rules)a[I]?a[I].push&&a[I].push.apply(a[I],s.rules[I]):a[I]=s.rules[I];var R=typeof s=="string"?s:s.include;if(R&&(R==="$self"&&(R="start"),Array.isArray(R)?f=R.map(function(C){return a[C]}):f=a[R]),f){var A=[i,1].concat(f);s.noEscape&&(A=A.filter(function(C){return!C.next})),u.splice.apply(u,A),i--}s.keywordMap&&(s.token=this.createKeywordMapper(s.keywordMap,s.defaultToken||"text",s.caseInsensitive),delete s.defaultToken)}}Object.keys(a).forEach(l,this)},this.createKeywordMapper=function(d,a,l,c){var u=Object.create(null);return this.$keywordList=[],Object.keys(d).forEach(function(i){for(var s=d[i],f=s.split(c||"|"),b=f.length;b--;){var x=f[b];this.$keywordList.push(x),l&&(x=x.toLowerCase()),u[x]=i}},this),d=null,l?function(i){return u[i.toLowerCase()]||a}:function(i){return u[i]||a}},this.getKeywords=function(){return this.$keywords}}).call(g.prototype),r.TextHighlightRules=g}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,r,m){var p;p=function(){this.$behaviours={}},(function(){this.add=function(g,w,h){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[g]:this.$behaviours[g]={}}this.$behaviours[g][w]=h},this.addBehaviours=function(g){for(var w in g)for(var h in g[w])this.add(w,h,g[w][h])},this.remove=function(g){this.$behaviours&&this.$behaviours[g]&&delete this.$behaviours[g]},this.inherit=function(g,w){if(typeof g=="function")var h=new g().getBehaviours(w);else var h=g.getBehaviours(w);this.addBehaviours(h)},this.getBehaviours=function(g){if(g){for(var w={},h=0;h<g.length;h++)this.$behaviours[g[h]]&&(w[g[h]]=this.$behaviours[g[h]]);return w}else return this.$behaviours}}).call(p.prototype),r.Behaviour=p}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,r,m){var p=e("./range").Range,g=(function(){function w(h,d,a){this.$session=h,this.$row=d,this.$rowTokens=h.getTokens(d);var l=h.getTokenAt(d,a);this.$tokenIndex=l?l.index:-1}return w.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]},w.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]},w.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},w.prototype.getCurrentTokenRow=function(){return this.$row},w.prototype.getCurrentTokenColumn=function(){var h=this.$rowTokens,d=this.$tokenIndex,a=h[d].start;if(a!==void 0)return a;for(a=0;d>0;)d-=1,a+=h[d].value.length;return a},w.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},w.prototype.getCurrentTokenRange=function(){var h=this.$rowTokens[this.$tokenIndex],d=this.getCurrentTokenColumn();return new p(this.$row,d,this.$row,d+h.value.length)},w})();r.TokenIterator=g}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,r,m){var p=e("../../lib/oop"),g=e("../behaviour").Behaviour,w=e("../../token_iterator").TokenIterator,h=e("../../lib/lang"),d=["text","paren.rparen","rparen","paren","punctuation.operator"],a=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],l,c={},u={'"':'"',"'":"'"},i=function(b){var x=-1;if(b.multiSelect&&(x=b.selection.index,c.rangeCount!=b.multiSelect.rangeCount&&(c={rangeCount:b.multiSelect.rangeCount})),c[x])return l=c[x];l=c[x]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},s=function(b,x,I,R){var A=b.end.row-b.start.row;return{text:I+x+R,selection:[0,b.start.column+1,A,b.end.column+(A?0:1)]}},f;f=function(b){b=b||{},this.add("braces","insertion",function(x,I,R,A,C){var O=R.getCursorPosition(),D=A.doc.getLine(O.row);if(C=="{"){i(R);var E=R.getSelectionRange(),T=A.doc.getTextRange(E),B=A.getTokenAt(O.row,O.column);if(T!==""&&T!=="{"&&R.getWrapBehavioursEnabled())return s(E,T,"{","}");if(B&&/(?:string)\.quasi|\.xml/.test(B.type)){var F=[/tag\-(?:open|name)/,/attribute\-name/];return F.some(function(q){return q.test(B.type)})||/(string)\.quasi/.test(B.type)&&B.value[O.column-B.start-1]!=="$"?void 0:(f.recordAutoInsert(R,A,"}"),{text:"{}",selection:[1,1]})}else if(f.isSaneInsertion(R,A))return/[\]\}\)]/.test(D[O.column])||R.inMultiSelectMode||b.braces?(f.recordAutoInsert(R,A,"}"),{text:"{}",selection:[1,1]}):(f.recordMaybeInsert(R,A,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){i(R);var N=D.substring(O.column,O.column+1);if(N=="}"){var $=A.$findOpeningBracket("}",{column:O.column+1,row:O.row});if($!==null&&f.isAutoInsertedClosing(O,D,C))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
183
+ `||C==`\r
184
+ `){i(R);var k="";f.isMaybeInsertedClosing(O,D)&&(k=h.stringRepeat("}",l.maybeInsertedBrackets),f.clearMaybeInsertedClosing());var N=D.substring(O.column,O.column+1);if(N==="}"){var L=A.findMatchingBracket({row:O.row,column:O.column+1},"}");if(!L)return null;var W=this.$getIndent(A.getLine(L.row))}else if(k)var W=this.$getIndent(D);else{f.clearMaybeInsertedClosing();return}var U=W+A.getTabString();return{text:`
185
+ `+U+`
186
+ `+W+k,selection:[1,U.length,1,U.length]}}else f.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(x,I,R,A,C){var O=A.doc.getTextRange(C);if(!C.isMultiLine()&&O=="{"){i(R);var D=A.doc.getLine(C.start.row),E=D.substring(C.end.column,C.end.column+1);if(E=="}")return C.end.column++,C;l.maybeInsertedBrackets--}}),this.add("parens","insertion",function(x,I,R,A,C){if(C=="("){i(R);var O=R.getSelectionRange(),D=A.doc.getTextRange(O);if(D!==""&&R.getWrapBehavioursEnabled())return s(O,D,"(",")");if(f.isSaneInsertion(R,A))return f.recordAutoInsert(R,A,")"),{text:"()",selection:[1,1]}}else if(C==")"){i(R);var E=R.getCursorPosition(),T=A.doc.getLine(E.row),B=T.substring(E.column,E.column+1);if(B==")"){var F=A.$findOpeningBracket(")",{column:E.column+1,row:E.row});if(F!==null&&f.isAutoInsertedClosing(E,T,C))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(x,I,R,A,C){var O=A.doc.getTextRange(C);if(!C.isMultiLine()&&O=="("){i(R);var D=A.doc.getLine(C.start.row),E=D.substring(C.start.column+1,C.start.column+2);if(E==")")return C.end.column++,C}}),this.add("brackets","insertion",function(x,I,R,A,C){if(C=="["){i(R);var O=R.getSelectionRange(),D=A.doc.getTextRange(O);if(D!==""&&R.getWrapBehavioursEnabled())return s(O,D,"[","]");if(f.isSaneInsertion(R,A))return f.recordAutoInsert(R,A,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){i(R);var E=R.getCursorPosition(),T=A.doc.getLine(E.row),B=T.substring(E.column,E.column+1);if(B=="]"){var F=A.$findOpeningBracket("]",{column:E.column+1,row:E.row});if(F!==null&&f.isAutoInsertedClosing(E,T,C))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(x,I,R,A,C){var O=A.doc.getTextRange(C);if(!C.isMultiLine()&&O=="["){i(R);var D=A.doc.getLine(C.start.row),E=D.substring(C.start.column+1,C.start.column+2);if(E=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(x,I,R,A,C){var O=A.$mode.$quotes||u;if(C.length==1&&O[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;i(R);var D=C,E=R.getSelectionRange(),T=A.doc.getTextRange(E);if(T!==""&&(T.length!=1||!O[T])&&R.getWrapBehavioursEnabled())return s(E,T,D,D);if(!T){var B=R.getCursorPosition(),F=A.doc.getLine(B.row),N=F.substring(B.column-1,B.column),$=F.substring(B.column,B.column+1),k=A.getTokenAt(B.row,B.column),L=A.getTokenAt(B.row,B.column+1);if(N=="\\"&&k&&/escape/.test(k.type))return null;var W=k&&/string|escape/.test(k.type),U=!L||/string|escape/.test(L.type),q;if($==D)q=W!==U,q&&/string\.end/.test(L.type)&&(q=!1);else{if(W&&!U||W&&U)return null;var Z=A.$mode.tokenRe;Z.lastIndex=0;var Q=Z.test(N);Z.lastIndex=0;var le=Z.test($),ne=A.$mode.$pairQuotesAfter,ce=ne&&ne[D]&&ne[D].test(N);if(!ce&&Q||le||$&&!/[\s;,.})\]\\]/.test($))return null;var ae=F[B.column-2];if(N==D&&(ae==D||Z.test(ae)))return null;q=!0}return{text:q?D+D:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(x,I,R,A,C){var O=A.$mode.$quotes||u,D=A.doc.getTextRange(C);if(!C.isMultiLine()&&O.hasOwnProperty(D)){i(R);var E=A.doc.getLine(C.start.row),T=E.substring(C.start.column+1,C.start.column+2);if(T==D)return C.end.column++,C}}),b.closeDocComment!==!1&&this.add("doc comment end","insertion",function(x,I,R,A,C){if(x==="doc-start"&&(C===`
187
+ `||C===`\r
188
+ `)&&R.selection.isEmpty()){var O=R.getCursorPosition();if(O.column===0)return;for(var D=A.doc.getLine(O.row),E=A.doc.getLine(O.row+1),T=A.getTokens(O.row),B=0,F=0;F<T.length;F++){B+=T[F].value.length;var N=T[F];if(B>=O.column){if(B===O.column){if(!/\.doc/.test(N.type))return;if(/\*\//.test(N.value)){var $=T[F+1];if(!$||!/\.doc/.test($.type))return}}var k=O.column-(B-N.value.length),L=N.value.indexOf("*/"),W=N.value.indexOf("/**",L>-1?L+2:0);if(W!==-1&&k>W&&k<W+3||L!==-1&&W!==-1&&k>=L&&k<=W||!/\.doc/.test(N.type))return;break}}var U=this.$getIndent(D);if(/\s*\*/.test(E))return/^\s*\*/.test(D)?{text:C+U+"* ",selection:[1,2+U.length,1,2+U.length]}:{text:C+U+" * ",selection:[1,3+U.length,1,3+U.length]};if(/\/\*\*/.test(D.substring(0,O.column)))return{text:C+U+" * "+C+" "+U+"*/",selection:[1,4+U.length,1,4+U.length]}}})},f.isSaneInsertion=function(b,x){var I=b.getCursorPosition(),R=new w(x,I.row,I.column);if(!this.$matchTokenType(R.getCurrentToken()||"text",d)){if(/[)}\]]/.test(b.session.getLine(I.row)[I.column]))return!0;var A=new w(x,I.row,I.column+1);if(!this.$matchTokenType(A.getCurrentToken()||"text",d))return!1}return R.stepForward(),R.getCurrentTokenRow()!==I.row||this.$matchTokenType(R.getCurrentToken()||"text",a)},f.$matchTokenType=function(b,x){return x.indexOf(b.type||b)>-1},f.recordAutoInsert=function(b,x,I){var R=b.getCursorPosition(),A=x.doc.getLine(R.row);this.isAutoInsertedClosing(R,A,l.autoInsertedLineEnd[0])||(l.autoInsertedBrackets=0),l.autoInsertedRow=R.row,l.autoInsertedLineEnd=I+A.substr(R.column),l.autoInsertedBrackets++},f.recordMaybeInsert=function(b,x,I){var R=b.getCursorPosition(),A=x.doc.getLine(R.row);this.isMaybeInsertedClosing(R,A)||(l.maybeInsertedBrackets=0),l.maybeInsertedRow=R.row,l.maybeInsertedLineStart=A.substr(0,R.column)+I,l.maybeInsertedLineEnd=A.substr(R.column),l.maybeInsertedBrackets++},f.isAutoInsertedClosing=function(b,x,I){return l.autoInsertedBrackets>0&&b.row===l.autoInsertedRow&&I===l.autoInsertedLineEnd[0]&&x.substr(b.column)===l.autoInsertedLineEnd},f.isMaybeInsertedClosing=function(b,x){return l.maybeInsertedBrackets>0&&b.row===l.maybeInsertedRow&&x.substr(b.column)===l.maybeInsertedLineEnd&&x.substr(0,b.column)==l.maybeInsertedLineStart},f.popAutoInsertedClosing=function(){l.autoInsertedLineEnd=l.autoInsertedLineEnd.substr(1),l.autoInsertedBrackets--},f.clearMaybeInsertedClosing=function(){l&&(l.maybeInsertedBrackets=0,l.maybeInsertedRow=-1)},p.inherits(f,g),r.CstyleBehaviour=f}),ace.define("ace/unicode",["require","exports","module"],function(e,r,m){for(var p=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],g=0,w=[],h=0;h<p.length;h+=2)w.push(g+=p[h]),p[h+1]&&w.push(45,g+=p[h+1]);r.wordChars=String.fromCharCode.apply(null,w)}),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 p=e("../config"),g=e("../tokenizer").Tokenizer,w=e("./text_highlight_rules").TextHighlightRules,h=e("./behaviour/cstyle").CstyleBehaviour,d=e("../unicode"),a=e("../lib/lang"),l=e("../token_iterator").TokenIterator,c=e("../range").Range,u;u=function(){this.HighlightRules=w},(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 g(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(i,s,f,b){var x=s.doc,I=!0,R=!0,A=1/0,C=s.getTabSize(),O=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var D=this.lineCommentStart.map(a.escapeRegExp).join("|"),E=this.lineCommentStart[0];else var D=a.escapeRegExp(this.lineCommentStart),E=this.lineCommentStart;D=new RegExp("^(\\s*)(?:"+D+") ?"),O=s.getUseSoftTabs();var T=function(q,Z){var Q=q.match(D);if(Q){var le=Q[1].length,ne=Q[0].length;!$(q,le,ne)&&Q[0][ne-1]==" "&&ne--,x.removeInLine(Z,le,ne)}},B=E+" ",F=function(q,Z){(!I||/\S/.test(q))&&($(q,A,A)?x.insertInLine({row:Z,column:A},B):x.insertInLine({row:Z,column:A},E))},N=function(q,Z){return D.test(q)},$=function(q,Z,Q){for(var le=0;Z--&&q.charAt(Z)==" ";)le++;if(le%C!=0)return!1;for(var le=0;q.charAt(Q++)==" ";)le++;return C>2?le%C!=C-1:le%C==0}}else{if(!this.blockComment)return!1;var E=this.blockComment.start,k=this.blockComment.end,D=new RegExp("^(\\s*)(?:"+a.escapeRegExp(E)+")"),L=new RegExp("(?:"+a.escapeRegExp(k)+")\\s*$"),F=function(ce,ae){N(ce,ae)||(!I||/\S/.test(ce))&&(x.insertInLine({row:ae,column:ce.length},k),x.insertInLine({row:ae,column:A},E))},T=function(ce,ae){var de;(de=ce.match(L))&&x.removeInLine(ae,ce.length-de[0].length,ce.length),(de=ce.match(D))&&x.removeInLine(ae,de[1].length,de[0].length)},N=function(ce,ae){if(D.test(ce))return!0;for(var de=s.getTokens(ae),me=0;me<de.length;me++)if(de[me].type==="comment")return!0}}function W(q){for(var Z=f;Z<=b;Z++)q(x.getLine(Z),Z)}var U=1/0;W(function(q,Z){var Q=q.search(/\S/);Q!==-1?(Q<A&&(A=Q),R&&!N(q,Z)&&(R=!1)):U>q.length&&(U=q.length)}),A==1/0&&(A=U,I=!1,R=!1),O&&A%C!=0&&(A=Math.floor(A/C)*C),W(R?T:F)},this.toggleBlockComment=function(i,s,f,b){var x=this.blockComment;if(x){!x.start&&x[0]&&(x=x[0]);var I=new l(s,b.row,b.column),R=I.getCurrentToken();s.selection;var A=s.selection.toOrientedRange(),C,O;if(R&&/comment/.test(R.type)){for(var D,E;R&&/comment/.test(R.type);){var T=R.value.indexOf(x.start);if(T!=-1){var B=I.getCurrentTokenRow(),F=I.getCurrentTokenColumn()+T;D=new c(B,F,B,F+x.start.length);break}R=I.stepBackward()}for(var I=new l(s,b.row,b.column),R=I.getCurrentToken();R&&/comment/.test(R.type);){var T=R.value.indexOf(x.end);if(T!=-1){var B=I.getCurrentTokenRow(),F=I.getCurrentTokenColumn()+T;E=new c(B,F,B,F+x.end.length);break}R=I.stepForward()}E&&s.remove(E),D&&(s.remove(D),C=D.start.row,O=-x.start.length)}else O=x.start.length,C=f.start.row,s.insert(f.end,x.end),s.insert(f.start,x.start);A.start.row==C&&(A.start.column+=O),A.end.row==C&&(A.end.column+=O),s.selection.fromOrientedRange(A)}},this.getNextLineIndent=function(i,s,f){return this.$getIndent(s)},this.checkOutdent=function(i,s,f){return!1},this.autoOutdent=function(i,s,f){},this.$getIndent=function(i){return i.match(/^\s*/)[0]},this.createWorker=function(i){return null},this.createModeDelegates=function(i){this.$embeds=[],this.$modes={};for(var s in i)if(i[s]){var f=i[s],b=f.prototype.$id,x=p.$modes[b];x||(p.$modes[b]=x=new f),p.$modes[s]||(p.$modes[s]=x),this.$embeds.push(s),this.$modes[s]=x}for(var I=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],R=function(O){(function(D){var E=I[O],T=D[E];D[I[O]]=function(){return this.$delegator(E,arguments,T)}})(A)},A=this,s=0;s<I.length;s++)R(s)},this.$delegator=function(i,s,f){var b=s[0]||"start";if(typeof b!="string"){if(Array.isArray(b[2])){var x=b[2][b[2].length-1],I=this.$modes[x];if(I)return I[i].apply(I,[b[1]].concat([].slice.call(s,1)))}b=b[0]||"start"}for(var R=0;R<this.$embeds.length;R++)if(this.$modes[this.$embeds[R]]){var A=b.split(this.$embeds[R]);if(!A[0]&&A[1]){s[0]=A[1];var I=this.$modes[this.$embeds[R]];return I[i].apply(I,s)}}var C=f.apply(this,s);return f?C:void 0},this.transformAction=function(i,s,f,b,x){if(this.$behaviour){var I=this.$behaviour.getBehaviours();for(var R in I)if(I[R][s]){var A=I[R][s].apply(this,arguments);if(A)return A}}},this.getKeywords=function(i){if(!this.completionKeywords){var s=this.$tokenizer.rules,f=[];for(var b in s)for(var x=s[b],I=0,R=x.length;I<R;I++)if(typeof x[I].token=="string")/keyword|support|storage/.test(x[I].token)&&f.push(x[I].regex);else if(typeof x[I].token=="object"){for(var A=0,C=x[I].token.length;A<C;A++)if(/keyword|support|storage/.test(x[I].token[A])){var b=x[I].regex.match(/\(.+?\)/g)[A];f.push(b.substr(1,b.length-2))}}this.completionKeywords=f}return i?f.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(i,s,f,b){var x=this.$keywordList||this.$createKeywordList();return x.map(function(I){return{name:I,value:I,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(u.prototype),r.Mode=u}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,r,m){var p=e("./lib/dom"),g=(function(){function w(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 w.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},w.prototype.$getWidgetScreenLength=function(){var h=0;return this.lineWidgets.forEach(function(d){d&&d.rowCount&&!d.hidden&&(h+=d.rowCount)}),h},w.prototype.$onChangeEditor=function(h){this.attach(h.editor)},w.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)))},w.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 a=this.session.lineWidgets;a&&a.forEach(function(l){l&&l.el&&l.el.parentNode&&(l._inDocument=!1,l.el.parentNode.removeChild(l.el))})}},w.prototype.updateOnFold=function(h,d){var a=d.lineWidgets;if(!(!a||!h.action)){for(var l=h.data,c=l.start.row,u=l.end.row,i=h.action=="add",s=c+1;s<u;s++)a[s]&&(a[s].hidden=i);a[u]&&(i?a[c]?a[u].hidden=i:a[c]=a[u]:(a[c]==a[u]&&(a[c]=void 0),a[u].hidden=i))}},w.prototype.updateOnChange=function(h){var d=this.session.lineWidgets;if(d){var a=h.start.row,l=h.end.row-a;if(l!==0)if(h.action=="remove"){var c=d.splice(a+1,l);!d[a]&&c[c.length-1]&&(d[a]=c.pop()),c.forEach(function(i){i&&this.removeLineWidget(i)},this),this.$updateRows()}else{var u=new Array(l);d[a]&&d[a].column!=null&&h.start.column>d[a].column&&a++,u.unshift(a,0),d.splice.apply(d,u),this.$updateRows()}}},w.prototype.$updateRows=function(){var h=this.session.lineWidgets;if(h){var d=!0;h.forEach(function(a,l){if(a)for(d=!1,a.row=l;a.$oldWidget;)a.$oldWidget.row=l,a=a.$oldWidget}),d&&(this.session.lineWidgets=null)}},w.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},w.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=p.createElement("div"),h.el.innerHTML=h.html),h.text&&!h.el&&(h.el=p.createElement("div"),h.el.textContent=h.text),h.el&&(p.addCssClass(h.el,"ace_lineWidgetContainer"),h.className&&p.addCssClass(h.el,h.className),h.el.style.position="absolute",h.el.style.zIndex="5",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 a=this.session.getFoldAt(h.row,0);if(h.$fold=a,a){var l=this.session.lineWidgets;h.row==a.end.row&&!l[a.start.row]?l[a.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},w.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()},w.prototype.getWidgetsAtRow=function(h){for(var d=this.session.lineWidgets,a=d&&d[h],l=[];a;)l.push(a),a=a.$oldWidget;return l},w.prototype.onWidgetChanged=function(h){this.session._changedWidgets.push(h),this.editor&&this.editor.renderer.updateFull()},w.prototype.measureWidgets=function(h,d){var a=this.session._changedWidgets,l=d.layerConfig;if(!(!a||!a.length)){for(var c=1/0,u=0;u<a.length;u++){var i=a[u];if(!(!i||!i.el)&&i.session==this.session){if(!i._inDocument){if(this.session.lineWidgets[i.row]!=i)continue;i._inDocument=!0,d.container.appendChild(i.el)}i.h=i.el.offsetHeight,i.fixedWidth||(i.w=i.el.offsetWidth,i.screenWidth=Math.ceil(i.w/l.characterWidth));var s=i.h/l.lineHeight;i.coverLine&&(s-=this.session.getRowLineCount(i.row),s<0&&(s=0)),i.rowCount!=s&&(i.rowCount=s,i.row<c&&(c=i.row))}}c!=1/0&&(this.session._emit("changeFold",{data:{start:{row:c}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},w.prototype.renderWidgets=function(h,d){var a=d.layerConfig,l=this.session.lineWidgets;if(l){for(var c=Math.min(this.firstRow,a.firstRow),u=Math.max(this.lastRow,a.lastRow,l.length);c>0&&!l[c];)c--;this.firstRow=a.firstRow,this.lastRow=a.lastRow,d.$cursorLayer.config=a;for(var i=c;i<=u;i++){var s=l[i];if(!(!s||!s.el)){if(s.hidden){s.el.style.top=-100-(s.pixelHeight||0)+"px";continue}s._inDocument||(s._inDocument=!0,d.container.appendChild(s.el));var f=d.$cursorLayer.getPixelPosition({row:i,column:0},!0).top;s.coverLine||(f+=a.lineHeight*this.session.getRowLineCount(s.row)),s.el.style.top=f-a.offset+"px";var b=s.coverGutter?0:d.gutterWidth;s.fixedWidth||(b-=d.scrollLeft),s.el.style.left=b+"px",s.fullWidth&&s.screenWidth&&(s.el.style.minWidth=a.width+2*a.padding+"px"),s.fixedWidth?s.el.style.right=d.scrollBar.getWidth()+"px":s.el.style.right=""}}}},w})();r.LineWidgets=g}),ace.define("ace/apply_delta",["require","exports","module"],function(e,r,m){r.applyDelta=function(p,g,w){var h=g.start.row,d=g.start.column,a=p[h]||"";switch(g.action){case"insert":var l=g.lines;if(l.length===1)p[h]=a.substring(0,d)+g.lines[0]+a.substring(d);else{var c=[h,1].concat(g.lines);p.splice.apply(p,c),p[h]=a.substring(0,d)+p[h],p[h+g.lines.length-1]+=a.substring(d)}break;case"remove":var u=g.end.column,i=g.end.row;h===i?p[h]=a.substring(0,d)+a.substring(u):p.splice(h,i-h+1,a.substring(0,d)+p[i].substring(u));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,m){var p=e("./lib/oop"),g=e("./lib/event_emitter").EventEmitter,w=(function(){function a(l,c,u){this.$onChange=this.onChange.bind(this),this.attach(l),typeof c!="number"?this.setPosition(c.row,c.column):this.setPosition(c,u)}return a.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},a.prototype.getDocument=function(){return this.document},a.prototype.onChange=function(l){if(!(l.start.row==l.end.row&&l.start.row!=this.row)&&!(l.start.row>this.row)){var c=d(l,{row:this.row,column:this.column},this.$insertRight);this.setPosition(c.row,c.column,!0)}},a.prototype.setPosition=function(l,c,u){var i;if(u?i={row:l,column:c}:i=this.$clipPositionToDocument(l,c),!(this.row==i.row&&this.column==i.column)){var s={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:s,value:i})}},a.prototype.detach=function(){this.document.off("change",this.$onChange)},a.prototype.attach=function(l){this.document=l||this.document,this.document.on("change",this.$onChange)},a.prototype.$clipPositionToDocument=function(l,c){var u={};return l>=this.document.getLength()?(u.row=Math.max(0,this.document.getLength()-1),u.column=this.document.getLine(u.row).length):l<0?(u.row=0,u.column=0):(u.row=l,u.column=Math.min(this.document.getLine(u.row).length,Math.max(0,c))),c<0&&(u.column=0),u},a})();w.prototype.$insertRight=!1,p.implement(w.prototype,g);function h(a,l,c){var u=c?a.column<=l.column:a.column<l.column;return a.row<l.row||a.row==l.row&&u}function d(a,l,c){var u=a.action=="insert",i=(u?1:-1)*(a.end.row-a.start.row),s=(u?1:-1)*(a.end.column-a.start.column),f=a.start,b=u?f:a.end;return h(l,f,c)?{row:l.row,column:l.column}:h(b,l,!c)?{row:l.row+i,column:l.column+(l.row==b.row?s:0)}:{row:f.row,column:f.column}}r.Anchor=w}),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 p=e("./lib/oop"),g=e("./apply_delta").applyDelta,w=e("./lib/event_emitter").EventEmitter,h=e("./range").Range,d=e("./anchor").Anchor,a=(function(){function l(c){this.$lines=[""],c.length===0?this.$lines=[""]:Array.isArray(c)?this.insertMergedLines({row:0,column:0},c):this.insert({row:0,column:0},c)}return l.prototype.setValue=function(c){var u=this.getLength()-1;this.remove(new h(0,0,u,this.getLine(u).length)),this.insert({row:0,column:0},c||"")},l.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},l.prototype.createAnchor=function(c,u){return new d(this,c,u)},l.prototype.$detectNewLine=function(c){var u=c.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=u?u[1]:`
189
+ `,this._signal("changeNewLineMode")},l.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
190
+ `;case"unix":return`
191
+ `;default:return this.$autoNewLine||`
192
+ `}},l.prototype.setNewLineMode=function(c){this.$newLineMode!==c&&(this.$newLineMode=c,this._signal("changeNewLineMode"))},l.prototype.getNewLineMode=function(){return this.$newLineMode},l.prototype.isNewLine=function(c){return c==`\r
193
+ `||c=="\r"||c==`
194
+ `},l.prototype.getLine=function(c){return this.$lines[c]||""},l.prototype.getLines=function(c,u){return this.$lines.slice(c,u+1)},l.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},l.prototype.getLength=function(){return this.$lines.length},l.prototype.getTextRange=function(c){return this.getLinesForRange(c).join(this.getNewLineCharacter())},l.prototype.getLinesForRange=function(c){var u;if(c.start.row===c.end.row)u=[this.getLine(c.start.row).substring(c.start.column,c.end.column)];else{u=this.getLines(c.start.row,c.end.row),u[0]=(u[0]||"").substring(c.start.column);var i=u.length-1;c.end.row-c.start.row==i&&(u[i]=u[i].substring(0,c.end.column))}return u},l.prototype.insertLines=function(c,u){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(c,u)},l.prototype.removeLines=function(c,u){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(c,u)},l.prototype.insertNewLine=function(c){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(c,["",""])},l.prototype.insert=function(c,u){return this.getLength()<=1&&this.$detectNewLine(u),this.insertMergedLines(c,this.$split(u))},l.prototype.insertInLine=function(c,u){var i=this.clippedPos(c.row,c.column),s=this.pos(c.row,c.column+u.length);return this.applyDelta({start:i,end:s,action:"insert",lines:[u]},!0),this.clonePos(s)},l.prototype.clippedPos=function(c,u){var i=this.getLength();c===void 0?c=i:c<0?c=0:c>=i&&(c=i-1,u=void 0);var s=this.getLine(c);return u==null&&(u=s.length),u=Math.min(Math.max(u,0),s.length),{row:c,column:u}},l.prototype.clonePos=function(c){return{row:c.row,column:c.column}},l.prototype.pos=function(c,u){return{row:c,column:u}},l.prototype.$clipPosition=function(c){var u=this.getLength();return c.row>=u?(c.row=Math.max(0,u-1),c.column=this.getLine(u-1).length):(c.row=Math.max(0,c.row),c.column=Math.min(Math.max(c.column,0),this.getLine(c.row).length)),c},l.prototype.insertFullLines=function(c,u){c=Math.min(Math.max(c,0),this.getLength());var i=0;c<this.getLength()?(u=u.concat([""]),i=0):(u=[""].concat(u),c--,i=this.$lines[c].length),this.insertMergedLines({row:c,column:i},u)},l.prototype.insertMergedLines=function(c,u){var i=this.clippedPos(c.row,c.column),s={row:i.row+u.length-1,column:(u.length==1?i.column:0)+u[u.length-1].length};return this.applyDelta({start:i,end:s,action:"insert",lines:u}),this.clonePos(s)},l.prototype.remove=function(c){var u=this.clippedPos(c.start.row,c.start.column),i=this.clippedPos(c.end.row,c.end.column);return this.applyDelta({start:u,end:i,action:"remove",lines:this.getLinesForRange({start:u,end:i})}),this.clonePos(u)},l.prototype.removeInLine=function(c,u,i){var s=this.clippedPos(c,u),f=this.clippedPos(c,i);return this.applyDelta({start:s,end:f,action:"remove",lines:this.getLinesForRange({start:s,end:f})},!0),this.clonePos(s)},l.prototype.removeFullLines=function(c,u){c=Math.min(Math.max(0,c),this.getLength()-1),u=Math.min(Math.max(0,u),this.getLength()-1);var i=u==this.getLength()-1&&c>0,s=u<this.getLength()-1,f=i?c-1:c,b=i?this.getLine(f).length:0,x=s?u+1:u,I=s?0:this.getLine(x).length,R=new h(f,b,x,I),A=this.$lines.slice(c,u+1);return this.applyDelta({start:R.start,end:R.end,action:"remove",lines:this.getLinesForRange(R)}),A},l.prototype.removeNewLine=function(c){c<this.getLength()-1&&c>=0&&this.applyDelta({start:this.pos(c,this.getLine(c).length),end:this.pos(c+1,0),action:"remove",lines:["",""]})},l.prototype.replace=function(c,u){if(c instanceof h||(c=h.fromPoints(c.start,c.end)),u.length===0&&c.isEmpty())return c.start;if(u==this.getTextRange(c))return c.end;this.remove(c);var i;return u?i=this.insert(c.start,u):i=c.start,i},l.prototype.applyDeltas=function(c){for(var u=0;u<c.length;u++)this.applyDelta(c[u])},l.prototype.revertDeltas=function(c){for(var u=c.length-1;u>=0;u--)this.revertDelta(c[u])},l.prototype.applyDelta=function(c,u){var i=c.action=="insert";(i?c.lines.length<=1&&!c.lines[0]:!h.comparePoints(c.start,c.end))||(i&&c.lines.length>2e4?this.$splitAndapplyLargeDelta(c,2e4):(g(this.$lines,c,u),this._signal("change",c)))},l.prototype.$safeApplyDelta=function(c){var u=this.$lines.length;(c.action=="remove"&&c.start.row<u&&c.end.row<u||c.action=="insert"&&c.start.row<=u)&&this.applyDelta(c)},l.prototype.$splitAndapplyLargeDelta=function(c,u){for(var i=c.lines,s=i.length-u+1,f=c.start.row,b=c.start.column,x=0,I=0;x<s;x=I){I+=u-1;var R=i.slice(x,I);R.push(""),this.applyDelta({start:this.pos(f+x,b),end:this.pos(f+I,b=0),action:c.action,lines:R},!0)}c.lines=i.slice(x),c.start.row=f+x,c.start.column=b,this.applyDelta(c,!0)},l.prototype.revertDelta=function(c){this.$safeApplyDelta({start:this.clonePos(c.start),end:this.clonePos(c.end),action:c.action=="insert"?"remove":"insert",lines:c.lines.slice()})},l.prototype.indexToPosition=function(c,u){for(var i=this.$lines||this.getAllLines(),s=this.getNewLineCharacter().length,f=u||0,b=i.length;f<b;f++)if(c-=i[f].length+s,c<0)return{row:f,column:c+i[f].length+s};return{row:b-1,column:c+i[b-1].length+s}},l.prototype.positionToIndex=function(c,u){for(var i=this.$lines||this.getAllLines(),s=this.getNewLineCharacter().length,f=0,b=Math.min(c.row,i.length),x=u||0;x<b;++x)f+=i[x].length+s;return f+c.column},l.prototype.$split=function(c){return c.split(/\r\n|\r|\n/)},l})();a.prototype.$autoNewLine="",a.prototype.$newLineMode="auto",p.implement(a.prototype,w),r.Document=a}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,r,m){var p=e("./lib/oop"),g=e("./lib/event_emitter").EventEmitter,w=(function(){function h(d,a){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=d;var l=this;this.$worker=function(){if(l.running){for(var c=new Date,u=l.currentLine,i=-1,s=l.doc,f=u;l.lines[u];)u++;var b=s.getLength(),x=0;for(l.running=!1;u<b;){l.$tokenizeRow(u),i=u;do u++;while(l.lines[u]);if(x++,x%5===0&&new Date-c>20){l.running=setTimeout(l.$worker,20);break}}l.currentLine=u,i==-1&&(i=u),f<=i&&l.fireUpdateEvent(f,i)}}}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,a){var l={first:d,last:a};this._signal("update",{data:l})},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 a=d.start.row,l=d.end.row-a;if(l===0)this.lines[a]=null;else if(d.action=="remove")this.lines.splice(a,l+1,null),this.states.splice(a,l+1,null);else{var c=Array(l+1);c.unshift(a,1),this.lines.splice.apply(this.lines,c),this.states.splice.apply(this.states,c)}this.currentLine=Math.min(a,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 a=this.doc.getLine(d),l=this.states[d-1],c=this.tokenizer.getLineTokens(a,l,d);return this.states[d]+""!=c.state+""?(this.states[d]=c.state,this.lines[d+1]=null,this.currentLine>d+1&&(this.currentLine=d+1)):this.currentLine==d&&(this.currentLine=d+1),this.lines[d]=c.tokens},h.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},h})();p.implement(w.prototype,g),r.BackgroundTokenizer=w}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,r,m){var p=e("./lib/lang"),g=e("./range").Range,w=(function(){function h(d,a,l){l===void 0&&(l="text"),this.setRegexp(d),this.clazz=a,this.type=l,this.docLen=0}return h.prototype.setRegexp=function(d){this.regExp+""!=d+""&&(this.regExp=d,this.cache=[])},h.prototype.update=function(d,a,l,c){if(this.regExp){for(var u=c.firstRow,i=c.lastRow,s={},f=l.$editor&&l.$editor.$search,b=f&&f.$isMultilineSearch(l.$editor.getLastSearchOptions()),x=u;x<=i;x++){var I=this.cache[x];if(I==null||l.getValue().length!=this.docLen){if(b){I=[];var R=f.$multiLineForward(l,this.regExp,x,i);if(R){var A=R.endRow<=i?R.endRow-1:i;A>x&&(x=A),I.push(new g(R.startRow,R.startCol,R.endRow,R.endCol))}I.length>this.MAX_RANGES&&(I=I.slice(0,this.MAX_RANGES))}else I=p.getMatchOffsets(l.getLine(x),this.regExp),I.length>this.MAX_RANGES&&(I=I.slice(0,this.MAX_RANGES)),I=I.map(function(E){return new g(x,E.offset,x,E.offset+E.length)});this.cache[x]=I.length?I:""}if(I.length!==0)for(var C=I.length;C--;){var O=I[C].toScreenRange(l),D=O.toString();s[D]||(s[D]=!0,a.drawSingleLineMarker(d,O,this.clazz,c))}}this.docLen=l.getValue().length}},h})();w.prototype.MAX_RANGES=500,r.SearchHighlight=w}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,r,m){var p=(function(){function A(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return A.prototype.addSession=function(C){this.$session=C},A.prototype.add=function(C,O,D){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),O===!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)}},A.prototype.addSelection=function(C,O){this.selections.push({value:C,rev:O||this.$rev})},A.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},A.prototype.markIgnored=function(C,O){O==null&&(O=this.$rev+1);for(var D=this.$undoStack,E=D.length;E--;){var T=D[E][0];if(T.id<=C)break;T.id<O&&(T.ignore=!0)}this.lastDeltas=null},A.prototype.getSelection=function(C,O){for(var D=this.selections,E=D.length;E--;){var T=D[E];if(T.rev<C)return O&&(T=D[E+1]),T}},A.prototype.getRevision=function(){return this.$rev},A.prototype.getDeltas=function(C,O){O==null&&(O=this.$rev+1);for(var D=this.$undoStack,E=null,T=0,B=D.length;B--;){var F=D[B][0];if(F.id<O&&!E&&(E=B+1),F.id<=C){T=B+1;break}}return D.slice(T,E)},A.prototype.getChangedRanges=function(C,O){O==null&&(O=this.$rev+1)},A.prototype.getChangedLines=function(C,O){O==null&&(O=this.$rev+1)},A.prototype.undo=function(C,O){this.lastDeltas=null;var D=this.$undoStack;if(g(D,D.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var E=D.pop(),T=null;return E&&(T=C.undoChanges(E,O),this.$redoStack.push(E),this.$syncRev()),this.$fromUndo=!1,T}},A.prototype.redo=function(C,O){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var D=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);R(this.$redoStack,D),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(B){B[0].id=++this.$maxRev},this)}var E=this.$redoStack.pop(),T=null;return E&&(T=C.redoChanges(E,O),this.$undoStack.push(E),this.$syncRev()),this.$fromUndo=!1,T},A.prototype.$syncRev=function(){var C=this.$undoStack,O=C[C.length-1],D=O&&O[0].id||0;this.$redoStackBaseRev=D,this.$rev=D},A.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},A.prototype.canUndo=function(){return this.$undoStack.length>0},A.prototype.canRedo=function(){return this.$redoStack.length>0},A.prototype.bookmark=function(C){C==null&&(C=this.$rev),this.mark=C},A.prototype.isAtBookmark=function(){return this.$rev===this.mark},A.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},A.prototype.fromJSON=function(C){this.reset(),this.$undoStack=C.$undoStack,this.$redoStack=C.$redoStack},A.prototype.$prettyPrint=function(C){return C?l(C):l(this.$undoStack)+`
195
+ ---
196
+ `+l(this.$redoStack)},A})();p.prototype.hasUndo=p.prototype.canUndo,p.prototype.hasRedo=p.prototype.canRedo,p.prototype.isClean=p.prototype.isAtBookmark,p.prototype.markClean=p.prototype.bookmark;function g(A,C){for(var O=C;O--;){var D=A[O];if(D&&!D[0].ignore){for(;O<C-1;){var E=i(A[O],A[O+1]);A[O]=E[0],A[O+1]=E[1],O++}return!0}}}var w=e("./range").Range,h=w.comparePoints;w.comparePoints;function d(A){return{row:A.row,column:A.column}}function a(A){return{start:d(A.start),end:d(A.end),action:A.action,lines:A.lines.slice()}}function l(A){if(A=A||this,Array.isArray(A))return A.map(l).join(`
197
+ `);var C="";return A.action?(C=A.action=="insert"?"+":"-",C+="["+A.lines+"]"):A.value&&(Array.isArray(A.value)?C=A.value.map(c).join(`
198
+ `):C=c(A.value)),A.start&&(C+=c(A)),(A.id||A.rev)&&(C+=" ("+(A.id||A.rev)+")"),C}function c(A){return A.start.row+":"+A.start.column+"=>"+A.end.row+":"+A.end.column}function u(A,C){var O=A.action=="insert",D=C.action=="insert";if(O&&D)if(h(C.start,A.end)>=0)f(C,A,-1);else if(h(C.start,A.start)<=0)f(A,C,1);else return null;else if(O&&!D)if(h(C.start,A.end)>=0)f(C,A,-1);else if(h(C.end,A.start)<=0)f(A,C,-1);else return null;else if(!O&&D)if(h(C.start,A.start)>=0)f(C,A,1);else if(h(C.start,A.start)<=0)f(A,C,1);else return null;else if(!O&&!D)if(h(C.start,A.start)>=0)f(C,A,1);else if(h(C.end,A.start)<=0)f(A,C,-1);else return null;return[C,A]}function i(A,C){for(var O=A.length;O--;)for(var D=0;D<C.length;D++)if(!u(A[O],C[D])){for(;O<A.length;){for(;D--;)u(C[D],A[O]);D=C.length,O++}return[A,C]}return A.selectionBefore=C.selectionBefore=A.selectionAfter=C.selectionAfter=null,[C,A]}function s(A,C){var O=A.action=="insert",D=C.action=="insert";if(O&&D)h(A.start,C.start)<0?f(C,A,1):f(A,C,1);else if(O&&!D)h(A.start,C.end)>=0?f(A,C,-1):(h(A.start,C.start)<=0||f(A,w.fromPoints(C.start,A.start),-1),f(C,A,1));else if(!O&&D)h(C.start,A.end)>=0?f(C,A,-1):(h(C.start,A.start)<=0||f(C,w.fromPoints(A.start,C.start),-1),f(A,C,1));else if(!O&&!D)if(h(C.start,A.end)>=0)f(C,A,-1);else if(h(C.end,A.start)<=0)f(A,C,-1);else{var E,T;return h(A.start,C.start)<0&&(E=A,A=x(A,C.start)),h(A.end,C.end)>0&&(T=x(A,C.end)),b(C.end,A.start,A.end,-1),T&&!E&&(A.lines=T.lines,A.start=T.start,A.end=T.end,T=A),[C,E,T].filter(Boolean)}return[C,A]}function f(A,C,O){b(A.start,C.start,C.end,O),b(A.end,C.start,C.end,O)}function b(A,C,O,D){A.row==(D==1?C:O).row&&(A.column+=D*(O.column-C.column)),A.row+=D*(O.row-C.row)}function x(A,C){var O=A.lines,D=A.end;A.end=d(C);var E=A.end.row-A.start.row,T=O.splice(E,O.length),B=E?C.column:C.column-A.start.column;O.push(T[0].substring(0,B)),T[0]=T[0].substr(B);var F={start:d(C),end:D,lines:T,action:A.action};return F}function I(A,C){C=a(C);for(var O=A.length;O--;){for(var D=A[O],E=0;E<D.length;E++){var T=D[E],B=s(T,C);C=B[0],B.length!=2&&(B[2]?(D.splice(E+1,1,B[1],B[2]),E++):B[1]||(D.splice(E,1),E--))}D.length||A.splice(O,1)}return A}function R(A,C){for(var O=0;O<C.length;O++)for(var D=C[O],E=0;E<D.length;E++)I(A,D[E])}r.UndoManager=p}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,r,m){var p=e("../range").Range,g=(function(){function w(h,d){this.foldData=h,Array.isArray(d)?this.folds=d:d=this.folds=[d];var a=d[d.length-1];this.range=new p(d[0].start.row,d[0].start.column,a.end.row,a.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(l){l.setFoldLine(this)},this)}return w.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})},w.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,a){return-d.range.compareEnd(a.start.row,a.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},w.prototype.containsRow=function(h){return h>=this.start.row&&h<=this.end.row},w.prototype.walk=function(h,d,a){var l=0,c=this.folds,u,i,s,f=!0;d==null&&(d=this.end.row,a=this.end.column);for(var b=0;b<c.length;b++){if(u=c[b],i=u.range.compareStart(d,a),i==-1){h(null,d,a,l,f);return}if(s=h(null,u.start.row,u.start.column,l,f),s=!s&&h(u.placeholder,u.start.row,u.start.column,l),s||i===0)return;f=!u.sameRow,l=u.end.column}h(null,d,a,l,f)},w.prototype.getNextFoldTo=function(h,d){for(var a,l,c=0;c<this.folds.length;c++){if(a=this.folds[c],l=a.range.compareEnd(h,d),l==-1)return{fold:a,kind:"after"};if(l===0)return{fold:a,kind:"inside"}}return null},w.prototype.addRemoveChars=function(h,d,a){var l=this.getNextFoldTo(h,d),c,u;if(l){if(c=l.fold,l.kind=="inside"&&c.start.column!=d&&c.start.row!=h)window.console&&window.console.log(h,d,c);else if(c.start.row==h){u=this.folds;var i=u.indexOf(c);for(i===0&&(this.start.column+=a),i;i<u.length;i++){if(c=u[i],c.start.column+=a,!c.sameRow)return;c.end.column+=a}this.end.column+=a}}},w.prototype.split=function(h,d){var a=this.getNextFoldTo(h,d);if(!a||a.kind=="inside")return null;var l=a.fold,c=this.folds,u=this.foldData,i=c.indexOf(l),s=c[i-1];this.end.row=s.end.row,this.end.column=s.end.column,c=c.splice(i,c.length-i);var f=new w(u,c);return u.splice(u.indexOf(this)+1,0,f),f},w.prototype.merge=function(h){for(var d=h.folds,a=0;a<d.length;a++)this.addFold(d[a]);var l=this.foldData;l.splice(l.indexOf(h),1)},w.prototype.toString=function(){var h=[this.range.toString()+": ["];return this.folds.forEach(function(d){h.push(" "+d.toString())}),h.push("]"),h.join(`
199
+ `)},w.prototype.idxToPosition=function(h){for(var d=0,a=0;a<this.folds.length;a++){var l=this.folds[a];if(h-=l.start.column-d,h<0)return{row:l.start.row,column:l.start.column+h};if(h-=l.placeholder.length,h<0)return l.start;d=l.end.column}return{row:this.end.row,column:this.end.column+h}},w})();r.FoldLine=g}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,r,m){var p=e("./range").Range,g=p.comparePoints,w=(function(){function h(){this.ranges=[],this.$bias=1}return h.prototype.pointIndex=function(d,a,l){for(var c=this.ranges,u=l||0;u<c.length;u++){var i=c[u],s=g(d,i.end);if(!(s>0)){var f=g(d,i.start);return s===0?a&&f!==0?-u-2:u:f>0||f===0&&!a?u:-u-1}}return-u-1},h.prototype.add=function(d){var a=!d.isEmpty(),l=this.pointIndex(d.start,a);l<0&&(l=-l-1);var c=this.pointIndex(d.end,a,l);return c<0?c=-c-1:c++,this.ranges.splice(l,c-l,d)},h.prototype.addList=function(d){for(var a=[],l=d.length;l--;)a.push.apply(a,this.add(d[l]));return a},h.prototype.substractPoint=function(d){var a=this.pointIndex(d);if(a>=0)return this.ranges.splice(a,1)},h.prototype.merge=function(){var d=[],a=this.ranges;a=a.sort(function(s,f){return g(s.start,f.start)});for(var l=a[0],c,u=1;u<a.length;u++){c=l,l=a[u];var i=g(c.end,l.start);i<0||i==0&&!c.isEmpty()&&!l.isEmpty()||(g(c.end,l.end)<0&&(c.end.row=l.end.row,c.end.column=l.end.column),a.splice(u,1),d.push(l),l=c,u--)}return this.ranges=a,d},h.prototype.contains=function(d,a){return this.pointIndex({row:d,column:a})>=0},h.prototype.containsPoint=function(d){return this.pointIndex(d)>=0},h.prototype.rangeAtPoint=function(d){var a=this.pointIndex(d);if(a>=0)return this.ranges[a]},h.prototype.clipRows=function(d,a){var l=this.ranges;if(l[0].start.row>a||l[l.length-1].start.row<d)return[];var c=this.pointIndex({row:d,column:0});c<0&&(c=-c-1);var u=this.pointIndex({row:a,column:0},c);u<0&&(u=-u-1);for(var i=[],s=c;s<u;s++)i.push(l[s]);return i},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 a=d.start,l=d.end,c=a.row,u=l.row,i=this.ranges,s=0,f=i.length;s<f;s++){var b=i[s];if(b.end.row>=c)break}if(d.action=="insert")for(var x=u-c,I=-a.column+l.column;s<f;s++){var b=i[s];if(b.start.row>c)break;if(b.start.row==c&&b.start.column>=a.column&&(b.start.column==a.column&&this.$bias<=0||(b.start.column+=I,b.start.row+=x)),b.end.row==c&&b.end.column>=a.column){if(b.end.column==a.column&&this.$bias<0)continue;b.end.column==a.column&&I>0&&s<f-1&&b.end.column>b.start.column&&b.end.column==i[s+1].start.column&&(b.end.column-=I),b.end.column+=I,b.end.row+=x}}else for(var x=c-u,I=a.column-l.column;s<f;s++){var b=i[s];if(b.start.row>u)break;b.end.row<u&&(c<b.end.row||c==b.end.row&&a.column<b.end.column)?(b.end.row=c,b.end.column=a.column):b.end.row==u?b.end.column<=l.column?(x||b.end.column>a.column)&&(b.end.column=a.column,b.end.row=a.row):(b.end.column+=I,b.end.row+=x):b.end.row>u&&(b.end.row+=x),b.start.row<u&&(c<b.start.row||c==b.start.row&&a.column<b.start.column)?(b.start.row=c,b.start.column=a.column):b.start.row==u?b.start.column<=l.column?(x||b.start.column>a.column)&&(b.start.column=a.column,b.start.row=a.row):(b.start.column+=I,b.start.row+=x):b.start.row>u&&(b.start.row+=x)}if(x!=0&&s<f)for(;s<f;s++){var b=i[s];b.start.row+=x,b.end.row+=x}},h})();w.prototype.comparePoints=g,r.RangeList=w}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(e,r,m){var p=this&&this.__extends||(function(){var c=function(u,i){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,f){s.__proto__=f}||function(s,f){for(var b in f)Object.prototype.hasOwnProperty.call(f,b)&&(s[b]=f[b])},c(u,i)};return function(u,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");c(u,i);function s(){this.constructor=u}u.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)}})(),g=e("../range_list").RangeList,w=(function(c){p(u,c);function u(i,s){var f=c.call(this)||this;return f.foldLine=null,f.placeholder=s,f.range=i,f.start=i.start,f.end=i.end,f.sameRow=i.start.row==i.end.row,f.subFolds=f.ranges=[],f}return u.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},u.prototype.setFoldLine=function(i){this.foldLine=i,this.subFolds.forEach(function(s){s.setFoldLine(i)})},u.prototype.clone=function(){var i=this.range.clone(),s=new u(i,this.placeholder);return this.subFolds.forEach(function(f){s.subFolds.push(f.clone())}),s.collapseChildren=this.collapseChildren,s},u.prototype.addSubFold=function(i){if(!this.range.isEqual(i)){d(i,this.start);for(var s=i.start.row,f=i.start.column,b=0,x=-1;b<this.subFolds.length&&(x=this.subFolds[b].range.compare(s,f),x==1);b++);var I=this.subFolds[b],R=0;if(x==0){if(I.range.containsRange(i))return I.addSubFold(i);R=1}for(var s=i.range.end.row,f=i.range.end.column,A=b,x=-1;A<this.subFolds.length&&(x=this.subFolds[A].range.compare(s,f),x==1);A++);x==0&&A++;for(var C=this.subFolds.splice(b,A-b,i),O=x==0?C.length-1:C.length,D=R;D<O;D++)i.addSubFold(C[D]);return i.setFoldLine(this.foldLine),i}},u.prototype.restoreRange=function(i){return l(i,this.start)},u})(g);function h(c,u){c.row-=u.row,c.row==0&&(c.column-=u.column)}function d(c,u){h(c.start,u),h(c.end,u)}function a(c,u){c.row==0&&(c.column+=u.column),c.row+=u.row}function l(c,u){a(c.start,u),a(c.end,u)}r.Fold=w}),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 p=e("../range").Range,g=e("./fold_line").FoldLine,w=e("./fold").Fold,h=e("../token_iterator").TokenIterator,d=e("../mouse/mouse_event").MouseEvent;function a(){this.getFoldAt=function(l,c,u){var i=this.getFoldLine(l);if(!i)return null;for(var s=i.folds,f=0;f<s.length;f++){var b=s[f].range;if(b.contains(l,c)){if(u==1&&b.isEnd(l,c)&&!b.isEmpty()||u==-1&&b.isStart(l,c)&&!b.isEmpty())continue;return s[f]}}},this.getFoldsInRange=function(l){var c=l.start,u=l.end,i=this.$foldData,s=[];c.column+=1,u.column-=1;for(var f=0;f<i.length;f++){var b=i[f].range.compareRange(l);if(b!=2){if(b==-2)break;for(var x=i[f].folds,I=0;I<x.length;I++){var R=x[I];if(b=R.range.compareRange(l),b==-2)break;if(b!=2){if(b==42)break;s.push(R)}}}}return c.column-=1,u.column+=1,s},this.getFoldsInRangeList=function(l){if(Array.isArray(l)){var c=[];l.forEach(function(i){c=c.concat(this.getFoldsInRange(i))},this)}else var c=this.getFoldsInRange(l);return c},this.getAllFolds=function(){for(var l=[],c=this.$foldData,u=0;u<c.length;u++)for(var i=0;i<c[u].folds.length;i++)l.push(c[u].folds[i]);return l},this.getFoldStringAt=function(l,c,u,i){if(i=i||this.getFoldLine(l),!i)return null;for(var s={end:{column:0}},f,b,x=0;x<i.folds.length;x++){b=i.folds[x];var I=b.range.compareEnd(l,c);if(I==-1){f=this.getLine(b.start.row).substring(s.end.column,b.start.column);break}else if(I===0)return null;s=b}return f||(f=this.getLine(b.start.row).substring(s.end.column)),u==-1?f.substring(0,c-s.end.column):u==1?f.substring(c-s.end.column):f},this.getFoldLine=function(l,c){var u=this.$foldData,i=0;for(c&&(i=u.indexOf(c)),i==-1&&(i=0),i;i<u.length;i++){var s=u[i];if(s.start.row<=l&&s.end.row>=l)return s;if(s.end.row>l)return null}return null},this.getNextFoldLine=function(l,c){var u=this.$foldData,i=0;for(c&&(i=u.indexOf(c)),i==-1&&(i=0),i;i<u.length;i++){var s=u[i];if(s.end.row>=l)return s}return null},this.getFoldedRowCount=function(l,c){for(var u=this.$foldData,i=c-l+1,s=0;s<u.length;s++){var f=u[s],b=f.end.row,x=f.start.row;if(b>=c){x<c&&(x>=l?i-=c-x:i=0);break}else b>=l&&(x>=l?i-=b-x:i-=b-l+1)}return i},this.$addFoldLine=function(l){return this.$foldData.push(l),this.$foldData.sort(function(c,u){return c.start.row-u.start.row}),l},this.addFold=function(l,c){var u=this.$foldData,i=!1,s;l instanceof w?s=l:(s=new w(c,l),s.collapseChildren=c.collapseChildren),this.$clipRangeToDocument(s.range);var f=s.start.row,b=s.start.column,x=s.end.row,I=s.end.column,R=this.getFoldAt(f,b,1),A=this.getFoldAt(x,I,-1);if(R&&A==R)return R.addSubFold(s);R&&!R.range.isStart(f,b)&&this.removeFold(R),A&&!A.range.isEnd(x,I)&&this.removeFold(A);var C=this.getFoldsInRange(s.range);C.length>0&&(this.removeFolds(C),s.collapseChildren||C.forEach(function(T){s.addSubFold(T)}));for(var O=0;O<u.length;O++){var D=u[O];if(x==D.start.row){D.addFold(s),i=!0;break}else if(f==D.end.row){if(D.addFold(s),i=!0,!s.sameRow){var E=u[O+1];if(E&&E.start.row==x){D.merge(E);break}}break}else if(x<=D.start.row)break}return i||(D=this.$addFoldLine(new g(this.$foldData,s))),this.$useWrapMode?this.$updateWrapData(D.start.row,D.start.row):this.$updateRowLengthCache(D.start.row,D.start.row),this.$modified=!0,this._signal("changeFold",{data:s,action:"add"}),s},this.addFolds=function(l){l.forEach(function(c){this.addFold(c)},this)},this.removeFold=function(l){var c=l.foldLine,u=c.start.row,i=c.end.row,s=this.$foldData,f=c.folds;if(f.length==1)s.splice(s.indexOf(c),1);else if(c.range.isEnd(l.end.row,l.end.column))f.pop(),c.end.row=f[f.length-1].end.row,c.end.column=f[f.length-1].end.column;else if(c.range.isStart(l.start.row,l.start.column))f.shift(),c.start.row=f[0].start.row,c.start.column=f[0].start.column;else if(l.sameRow)f.splice(f.indexOf(l),1);else{var b=c.split(l.start.row,l.start.column);f=b.folds,f.shift(),b.start.row=f[0].start.row,b.start.column=f[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(u,i):this.$updateRowLengthCache(u,i)),this.$modified=!0,this._signal("changeFold",{data:l,action:"remove"})},this.removeFolds=function(l){for(var c=[],u=0;u<l.length;u++)c.push(l[u]);c.forEach(function(i){this.removeFold(i)},this),this.$modified=!0},this.expandFold=function(l){this.removeFold(l),l.subFolds.forEach(function(c){l.restoreRange(c),this.addFold(c)},this),l.collapseChildren>0&&this.foldAll(l.start.row+1,l.end.row,l.collapseChildren-1),l.subFolds=[]},this.expandFolds=function(l){l.forEach(function(c){this.expandFold(c)},this)},this.unfold=function(l,c){var u,i;if(l==null)u=new p(0,0,this.getLength(),0),c==null&&(c=!0);else if(typeof l=="number")u=new p(l,0,l,this.getLine(l).length);else if("row"in l)u=p.fromPoints(l,l);else{if(Array.isArray(l))return i=[],l.forEach(function(f){i=i.concat(this.unfold(f))},this),i;u=l}i=this.getFoldsInRangeList(u);for(var s=i;i.length==1&&p.comparePoints(i[0].start,u.start)<0&&p.comparePoints(i[0].end,u.end)>0;)this.expandFolds(i),i=this.getFoldsInRangeList(u);if(c!=!1?this.removeFolds(i):this.expandFolds(i),s.length)return s},this.isRowFolded=function(l,c){return!!this.getFoldLine(l,c)},this.getRowFoldEnd=function(l,c){var u=this.getFoldLine(l,c);return u?u.end.row:l},this.getRowFoldStart=function(l,c){var u=this.getFoldLine(l,c);return u?u.start.row:l},this.getFoldDisplayLine=function(l,c,u,i,s){i==null&&(i=l.start.row),s==null&&(s=0),c==null&&(c=l.end.row),u==null&&(u=this.getLine(c).length);var f=this.doc,b="";return l.walk(function(x,I,R,A){if(!(I<i)){if(I==i){if(R<s)return;A=Math.max(s,A)}x!=null?b+=x:b+=f.getLine(I).substring(A,R)}},c,u),b},this.getDisplayLine=function(l,c,u,i){var s=this.getFoldLine(l);if(s)return this.getFoldDisplayLine(s,l,c,u,i);var f;return f=this.doc.getLine(l),f.substring(i||0,c||f.length)},this.$cloneFoldData=function(){var l=[];return l=this.$foldData.map(function(c){var u=c.folds.map(function(i){return i.clone()});return new g(l,u)}),l},this.toggleFold=function(l){var c=this.selection,u=c.getRange(),i,s;if(u.isEmpty()){var f=u.start;if(i=this.getFoldAt(f.row,f.column),i){this.expandFold(i);return}else if(l){var b=this.getFoldLine(f.row);b&&this.expandFolds(b.folds);return}else(s=this.findMatchingBracket(f))?u.comparePoint(s)==1?u.end=s:(u.start=s,u.start.column++,u.end.column--):(s=this.findMatchingBracket({row:f.row,column:f.column+1}))?(u.comparePoint(s)==1?u.end=s:u.start=s,u.start.column++):u=this.getCommentFoldRange(f.row,f.column)||u}else{var x=this.getFoldsInRange(u);if(l&&x.length){this.expandFolds(x);return}else x.length==1&&(i=x[0])}if(i||(i=this.getFoldAt(u.start.row,u.start.column)),i&&i.range.toString()==u.toString()){this.expandFold(i);return}var I="...";if(!u.isMultiLine()){if(I=this.getTextRange(u),I.length<4)return;I=I.trim().substring(0,2)+".."}this.addFold(I,u)},this.getCommentFoldRange=function(l,c,u){var i=new h(this,l,c),s=i.getCurrentToken(),f=s&&s.type;if(s&&/^comment|string/.test(f)){f=f.match(/comment|string/)[0],f=="comment"&&(f+="|doc-start|\\.doc");var b=new RegExp(f),x=new p;if(u!=1){do s=i.stepBackward();while(s&&b.test(s.type));s=i.stepForward()}x.start.row=i.getCurrentTokenRow(),x.start.column=i.getCurrentTokenColumn()+s.value.length,i=new h(this,l,c);var I=this.getState(i.$row);if(u!=-1){var R=-1;do if(s=i.stepForward(),R==-1){var A=this.getState(i.$row);I.toString()!==A.toString()&&(R=i.$row)}else if(i.$row>R)break;while(s&&b.test(s.type));s=i.stepBackward()}else s=i.getCurrentToken();return x.end.row=i.getCurrentTokenRow(),x.end.column=i.getCurrentTokenColumn(),x.start.row==x.end.row&&x.start.column>x.end.column?void 0:x}},this.foldAll=function(l,c,u,i){u==null&&(u=1e5);var s=this.foldWidgets;if(s){c=c||this.getLength(),l=l||0;for(var f=l;f<c;f++)if(s[f]==null&&(s[f]=this.getFoldWidget(f)),s[f]=="start"&&!(i&&!i(f))){var b=this.getFoldWidgetRange(f);b&&b.isMultiLine()&&b.end.row<=c&&b.start.row>=l&&(f=b.end.row,b.collapseChildren=u,this.addFold("...",b))}}},this.foldToLevel=function(l){for(this.foldAll();l-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var l=this;this.foldAll(null,null,null,function(c){for(var u=l.getTokens(c),i=0;i<u.length;i++){var s=u[i];if(!(s.type=="text"&&/^\s+$/.test(s.value)))return!!/comment/.test(s.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(l){if(!this.$foldStyles[l])throw new Error("invalid fold style: "+l+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=l){this.$foldStyle=l,l=="manual"&&this.unfold();var c=this.$foldMode;this.$setFolding(null),this.$setFolding(c)}},this.$setFolding=function(l){if(this.$foldMode!=l){if(this.$foldMode=l,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!l||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=l.getFoldWidget.bind(l,this,this.$foldStyle),this.getFoldWidgetRange=l.getFoldWidgetRange.bind(l,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(l,c){var u=this.foldWidgets;if(!u||c&&u[l])return{};for(var i=l-1,s;i>=0;){var f=u[i];if(f==null&&(f=u[i]=this.getFoldWidget(i)),f=="start"){var b=this.getFoldWidgetRange(i);if(s||(s=b),b&&b.end.row>=l)break}i--}return{range:i!==-1&&b,firstRange:s}},this.onFoldWidgetClick=function(l,c){c instanceof d&&(c=c.domEvent);var u={children:c.shiftKey,all:c.ctrlKey||c.metaKey,siblings:c.altKey},i=this.$toggleFoldWidget(l,u);if(!i){var s=c.target||c.srcElement;s&&/ace_fold-widget/.test(s.className)&&(s.className+=" ace_invalid")}},this.$toggleFoldWidget=function(l,c){if(this.getFoldWidget){var u=this.getFoldWidget(l),i=this.getLine(l),s=u==="end"?-1:1,f=this.getFoldAt(l,s===-1?0:i.length,s);if(f)return c.children||c.all?this.removeFold(f):this.expandFold(f),f;var b=this.getFoldWidgetRange(l,!0);if(b&&!b.isMultiLine()&&(f=this.getFoldAt(b.start.row,b.start.column,1),f&&b.isEqual(f.range)))return this.removeFold(f),f;if(c.siblings){var x=this.getParentFoldRangeData(l);if(x.range)var I=x.range.start.row+1,R=x.range.end.row;this.foldAll(I,R,c.all?1e4:0)}else c.children?(R=b?b.end.row:this.getLength(),this.foldAll(l+1,R,c.all?1e4:0)):b&&(c.all&&(b.collapseChildren=1e4),this.addFold("...",b));return b}},this.toggleFoldWidget=function(l){var c=this.selection.getCursor().row;c=this.getRowFoldStart(c);var u=this.$toggleFoldWidget(c,{});if(!u){var i=this.getParentFoldRangeData(c,!0);if(u=i.range||i.firstRange,u){c=u.start.row;var s=this.getFoldAt(c,this.getLine(c).length,1);s?this.removeFold(s):this.addFold("...",u)}}},this.updateFoldWidgets=function(l){var c=l.start.row,u=l.end.row-c;if(u===0)this.foldWidgets[c]=null;else if(l.action=="remove")this.foldWidgets.splice(c,u+1,null);else{var i=Array(u+1);i.unshift(c,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(l){var c=l.data;c.first!=c.last&&this.foldWidgets.length>c.first&&this.foldWidgets.splice(c.first,this.foldWidgets.length)}}r.Folding=a}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,r,m){var p=e("../token_iterator").TokenIterator,g=e("../range").Range;function w(){this.findMatchingBracket=function(h,d){if(h.column==0)return null;var a=d||this.getLine(h.row).charAt(h.column-1);if(a=="")return null;var l=a.match(/([\(\[\{])|([\)\]\}])/);return l?l[1]?this.$findClosingBracket(l[1],h):this.$findOpeningBracket(l[2],h):null},this.getBracketRange=function(h){var d=this.getLine(h.row),a=!0,l,c=d.charAt(h.column-1),u=c&&c.match(/([\(\[\{])|([\)\]\}])/);if(u||(c=d.charAt(h.column),h={row:h.row,column:h.column+1},u=c&&c.match(/([\(\[\{])|([\)\]\}])/),a=!1),!u)return null;if(u[1]){var i=this.$findClosingBracket(u[1],h);if(!i)return null;l=g.fromPoints(h,i),a||(l.end.column++,l.start.column--),l.cursor=l.end}else{var i=this.$findOpeningBracket(u[2],h);if(!i)return null;l=g.fromPoints(i,h),a||(l.start.column++,l.end.column--),l.cursor=l.start}return l},this.getMatchingBracketRanges=function(h,d){var a=this.getLine(h.row),l=/([\(\[\{])|([\)\]\}])/,c=!d&&a.charAt(h.column-1),u=c&&c.match(l);if(u||(c=(d===void 0||d)&&a.charAt(h.column),h={row:h.row,column:h.column+1},u=c&&c.match(l)),!u)return null;var i=new g(h.row,h.column-1,h.row,h.column),s=u[1]?this.$findClosingBracket(u[1],h):this.$findOpeningBracket(u[2],h);if(!s)return[i];var f=new g(s.row,s.column,s.row,s.column+1);return[i,f]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(h,d,a){var l=this.$brackets[h],c=1,u=new p(this,d.row,d.column),i=u.getCurrentToken();if(i||(i=u.stepForward()),!!i){a||(a=new RegExp("(\\.?"+i.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var s=d.column-u.getCurrentTokenColumn()-2,f=i.value;;){for(;s>=0;){var b=f.charAt(s);if(b==l){if(c-=1,c==0)return{row:u.getCurrentTokenRow(),column:s+u.getCurrentTokenColumn()}}else b==h&&(c+=1);s-=1}do i=u.stepBackward();while(i&&!a.test(i.type));if(i==null)break;f=i.value,s=f.length-1}return null}},this.$findClosingBracket=function(h,d,a){var l=this.$brackets[h],c=1,u=new p(this,d.row,d.column),i=u.getCurrentToken();if(i||(i=u.stepForward()),!!i){a||(a=new RegExp("(\\.?"+i.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var s=d.column-u.getCurrentTokenColumn();;){for(var f=i.value,b=f.length;s<b;){var x=f.charAt(s);if(x==l){if(c-=1,c==0)return{row:u.getCurrentTokenRow(),column:s+u.getCurrentTokenColumn()}}else x==h&&(c+=1);s+=1}do i=u.stepForward();while(i&&!a.test(i.type));if(i==null)break;s=0}return null}},this.getMatchingTags=function(h){var d=new p(this,h.row,h.column),a=this.$findTagName(d);if(a){var l=d.stepBackward();return l.value==="<"?this.$findClosingTag(d,a):this.$findOpeningTag(d,a)}},this.$findTagName=function(h){var d=h.getCurrentToken(),a=!1,l=!1;if(d&&d.type.indexOf("tag-name")===-1)do l?d=h.stepBackward():d=h.stepForward(),d&&(d.value==="/>"?l=!0:d.type.indexOf("tag-name")!==-1&&(a=!0));while(d&&!a);return d},this.$findClosingTag=function(h,d){var a,l=d.value,c=d.value,u=0,i=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);d=h.stepForward();var s=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+d.value.length),f=!1;do{if(a=d,a.type.indexOf("tag-close")!==-1&&!f){var b=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);f=!0}if(d=h.stepForward(),d){if(d.value===">"&&!f){var b=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);f=!0}if(d.type.indexOf("tag-name")!==-1){if(l=d.value,c===l){if(a.value==="<")u++;else if(a.value==="</"&&(u--,u<0)){h.stepBackward();var x=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2);d=h.stepForward();var I=new g(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 R=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);else return}}}else if(c===l&&d.value==="/>"&&(u--,u<0))var x=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+2),I=x,R=I,b=new g(s.end.row,s.end.column,s.end.row,s.end.column+1)}}while(d&&u>=0);if(i&&b&&x&&R&&s&&I)return{openTag:new g(i.start.row,i.start.column,b.end.row,b.end.column),closeTag:new g(x.start.row,x.start.column,R.end.row,R.end.column),openTagName:s,closeTagName:I}},this.$findOpeningTag=function(h,d){var a=h.getCurrentToken(),l=d.value,c=0,u=h.getCurrentTokenRow(),i=h.getCurrentTokenColumn(),s=i+2,f=new g(u,i,u,s);h.stepForward();var b=new g(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 x=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);h.stepBackward(),h.stepBackward();do if(d=a,u=h.getCurrentTokenRow(),i=h.getCurrentTokenColumn(),s=i+d.value.length,a=h.stepBackward(),d){if(d.type.indexOf("tag-name")!==-1){if(l===d.value)if(a.value==="<"){if(c++,c>0){var I=new g(u,i,u,s),R=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1);do d=h.stepForward();while(d&&d.value!==">");var A=new g(h.getCurrentTokenRow(),h.getCurrentTokenColumn(),h.getCurrentTokenRow(),h.getCurrentTokenColumn()+1)}}else a.value==="</"&&c--}else if(d.value==="/>"){for(var C=0,O=a;O;){if(O.type.indexOf("tag-name")!==-1&&O.value===l){c--;break}else if(O.value==="<")break;O=h.stepBackward(),C++}for(var D=0;D<C;D++)h.stepForward()}}while(a&&c<=0);if(R&&A&&f&&x&&I&&b)return{openTag:new g(R.start.row,R.start.column,A.end.row,A.end.column),closeTag:new g(f.start.row,f.start.column,x.end.row,x.end.column),openTagName:I,closeTagName:b}}}}r.BracketMatch=w}),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 p=e("./lib/oop"),g=e("./lib/lang"),w=e("./bidihandler").BidiHandler,h=e("./config"),d=e("./lib/event_emitter").EventEmitter,a=e("./selection").Selection,l=e("./mode/text").Mode,c=e("./range").Range,u=e("./line_widgets").LineWidgets,i=e("./document").Document,s=e("./background_tokenizer").BackgroundTokenizer,f=e("./search_highlight").SearchHighlight,b=e("./undomanager").UndoManager,x=(function(){function F(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"+ ++F.$uid,this.$foldData.toString=function(){return this.join(`
200
+ `)},this.$gutterCustomWidgets={},this.bgTokenizer=new s(new l().getTokenizer(),this);var k=this;this.bgTokenizer.on("update",function(L){k._signal("tokenizerUpdate",L)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof N!="object"||!N.getLine)&&(N=new i(N)),this.setDocument(N),this.selection=new a(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new w(this),h.resetOptions(this),this.setMode($),h._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return F.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=g.delayedCall(this.endOperation.bind(this,!0))},F.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)},F.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)}},F.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()},F.prototype.getDocument=function(){return this.doc},Object.defineProperty(F.prototype,"widgetManager",{get:function(){var N=new u(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}),F.prototype.$resetRowCache=function(N){if(!N){this.$docRowCache=[],this.$screenRowCache=[];return}var $=this.$docRowCache.length,k=this.$getRowCacheIndex(this.$docRowCache,N)+1;$>k&&(this.$docRowCache.splice(k,$),this.$screenRowCache.splice(k,$))},F.prototype.$getRowCacheIndex=function(N,$){for(var k=0,L=N.length-1;k<=L;){var W=k+L>>1,U=N[W];if($>U)k=W+1;else if($<U)L=W-1;else return W}return k-1},F.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},F.prototype.onChangeFold=function(N){var $=N.data;this.$resetRowCache($.start.row)},F.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)},F.prototype.onSelectionChange=function(){this._signal("changeSelection")},F.prototype.setValue=function(N){this.doc.setValue(N),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},F.fromJSON=function(N){typeof N=="string"&&(N=JSON.parse(N));var $=new b;$.$undoStack=N.history.undo,$.$redoStack=N.history.redo,$.mark=N.history.mark,$.$rev=N.history.rev;var k=new F(N.value);return N.folds.forEach(function(L){k.addFold("...",c.fromPoints(L.start,L.end))}),k.setAnnotations(N.annotations),k.setBreakpoints(N.breakpoints),k.setMode(N.mode),k.setScrollLeft(N.scrollLeft),k.setScrollTop(N.scrollTop),k.setUndoManager($),k.selection.fromJSON(N.selection),k},F.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()}},F.prototype.toString=function(){return this.doc.getValue()},F.prototype.getSelection=function(){return this.selection},F.prototype.getState=function(N){return this.bgTokenizer.getState(N)},F.prototype.getTokens=function(N){return this.bgTokenizer.getTokens(N)},F.prototype.getTokenAt=function(N,$){var k=this.bgTokenizer.getTokens(N),L,W=0;if($==null){var U=k.length-1;W=this.getLine(N).length}else for(var U=0;U<k.length&&(W+=k[U].value.length,!(W>=$));U++);return L=k[U],L?(L.index=U,L.start=W-L.value.length,L):null},F.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=g.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},F.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},F.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},F.prototype.getTabString=function(){return this.getUseSoftTabs()?g.stringRepeat(" ",this.getTabSize()):" "},F.prototype.setUseSoftTabs=function(N){this.setOption("useSoftTabs",N)},F.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},F.prototype.setTabSize=function(N){this.setOption("tabSize",N)},F.prototype.getTabSize=function(){return this.$tabSize},F.prototype.isTabStop=function(N){return this.$useSoftTabs&&N.column%this.$tabSize===0},F.prototype.setNavigateWithinSoftTabs=function(N){this.setOption("navigateWithinSoftTabs",N)},F.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},F.prototype.setOverwrite=function(N){this.setOption("overwrite",N)},F.prototype.getOverwrite=function(){return this.$overwrite},F.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},F.prototype.addGutterDecoration=function(N,$){this.$decorations[N]||(this.$decorations[N]=""),this.$decorations[N]+=" "+$,this._signal("changeBreakpoint",{})},F.prototype.removeGutterCustomWidget=function(N){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(N)},F.prototype.addGutterCustomWidget=function(N,$){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(N,$)},F.prototype.removeGutterDecoration=function(N,$){this.$decorations[N]=(this.$decorations[N]||"").replace(" "+$,""),this._signal("changeBreakpoint",{})},F.prototype.getBreakpoints=function(){return this.$breakpoints},F.prototype.setBreakpoints=function(N){this.$breakpoints=[];for(var $=0;$<N.length;$++)this.$breakpoints[N[$]]="ace_breakpoint";this._signal("changeBreakpoint",{})},F.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},F.prototype.setBreakpoint=function(N,$){$===void 0&&($="ace_breakpoint"),$?this.$breakpoints[N]=$:delete this.$breakpoints[N],this._signal("changeBreakpoint",{})},F.prototype.clearBreakpoint=function(N){delete this.$breakpoints[N],this._signal("changeBreakpoint",{})},F.prototype.addMarker=function(N,$,k,L){var W=this.$markerId++,U={range:N,type:k||"line",renderer:typeof k=="function"?k:null,clazz:$,inFront:!!L,id:W};return L?(this.$frontMarkers[W]=U,this._signal("changeFrontMarker")):(this.$backMarkers[W]=U,this._signal("changeBackMarker")),W},F.prototype.addDynamicMarker=function(N,$){if(N.update){var k=this.$markerId++;return N.id=k,N.inFront=!!$,$?(this.$frontMarkers[k]=N,this._signal("changeFrontMarker")):(this.$backMarkers[k]=N,this._signal("changeBackMarker")),N}},F.prototype.removeMarker=function(N){var $=this.$frontMarkers[N]||this.$backMarkers[N];if($){var k=$.inFront?this.$frontMarkers:this.$backMarkers;delete k[N],this._signal($.inFront?"changeFrontMarker":"changeBackMarker")}},F.prototype.getMarkers=function(N){return N?this.$frontMarkers:this.$backMarkers},F.prototype.highlight=function(N){if(!this.$searchHighlight){var $=new f(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker($)}this.$searchHighlight.setRegexp(N)},F.prototype.highlightLines=function(N,$,k,L){typeof $!="number"&&(k=$,$=N),k||(k="ace_step");var W=new c(N,0,$,1/0);return W.id=this.addMarker(W,k,"fullLine",L),W},F.prototype.setAnnotations=function(N){this.$annotations=N,this._signal("changeAnnotation",{})},F.prototype.getAnnotations=function(){return this.$annotations||[]},F.prototype.clearAnnotations=function(){this.setAnnotations([])},F.prototype.$detectNewLine=function(N){var $=N.match(/^.*?(\r?\n)/m);$?this.$autoNewLine=$[1]:this.$autoNewLine=`
201
+ `},F.prototype.getWordRange=function(N,$){var k=this.getLine(N),L=!1;if($>0&&(L=!!k.charAt($-1).match(this.tokenRe)),L||(L=!!k.charAt($).match(this.tokenRe)),L)var W=this.tokenRe;else if(/^\s+$/.test(k.slice($-1,$+1)))var W=/\s/;else var W=this.nonTokenRe;var U=$;if(U>0){do U--;while(U>=0&&k.charAt(U).match(W));U++}for(var q=$;q<k.length&&k.charAt(q).match(W);)q++;return new c(N,U,N,q)},F.prototype.getAWordRange=function(N,$){for(var k=this.getWordRange(N,$),L=this.getLine(k.end.row);L.charAt(k.end.column).match(/[ \t]/);)k.end.column+=1;return k},F.prototype.setNewLineMode=function(N){this.doc.setNewLineMode(N)},F.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},F.prototype.setUseWorker=function(N){this.setOption("useWorker",N)},F.prototype.getUseWorker=function(){return this.$useWorker},F.prototype.onReloadTokenizer=function(N){var $=N.data;this.bgTokenizer.start($.first),this._signal("tokenizerUpdate",N)},F.prototype.setMode=function(N,$){if(N&&typeof N=="object"){if(N.getTokenizer)return this.$onChangeMode(N);var k=N,L=k.path}else L=N||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new l),this.$modes[L]&&!k){this.$onChangeMode(this.$modes[L]),$&&$();return}this.$modeId=L,h.loadModule(["mode",L],(function(W){if(!this.destroyed){if(this.$modeId!==L)return $&&$();this.$modes[L]&&!k?this.$onChangeMode(this.$modes[L]):W&&W.Mode&&(W=new W.Mode(k),k||(this.$modes[L]=W,W.$id=L),this.$onChangeMode(W)),$&&$()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},F.prototype.$onChangeMode=function(N,$){if($||(this.$modeId=N.$id),this.$mode!==N){var k=this.$mode;this.$mode=N,this.$stopWorker(),this.$useWorker&&this.$startWorker();var L=N.getTokenizer();if(L.on!==void 0){var W=this.onReloadTokenizer.bind(this);L.on("update",W)}this.bgTokenizer.setTokenizer(L),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:k,mode:N}))}},F.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},F.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(N){h.warn("Could not load worker",N),this.$worker=null}},F.prototype.getMode=function(){return this.$mode},F.prototype.setScrollTop=function(N){this.$scrollTop===N||isNaN(N)||(this.$scrollTop=N,this._signal("changeScrollTop",N))},F.prototype.getScrollTop=function(){return this.$scrollTop},F.prototype.setScrollLeft=function(N){this.$scrollLeft===N||isNaN(N)||(this.$scrollLeft=N,this._signal("changeScrollLeft",N))},F.prototype.getScrollLeft=function(){return this.$scrollLeft},F.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},F.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var N=0;return this.lineWidgets.forEach(function($){$&&$.screenWidth>N&&(N=$.screenWidth)}),this.lineWidgetWidth=N},F.prototype.$computeWidth=function(N){if(this.$modified||N){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var $=this.doc.getAllLines(),k=this.$rowLengthCache,L=0,W=0,U=this.$foldData[W],q=U?U.start.row:1/0,Z=$.length,Q=0;Q<Z;Q++){if(Q>q){if(Q=U.end.row+1,Q>=Z)break;U=this.$foldData[W++],q=U?U.start.row:1/0}k[Q]==null&&(k[Q]=this.$getStringScreenWidth($[Q])[0]),k[Q]>L&&(L=k[Q])}this.screenWidth=L}},F.prototype.getLine=function(N){return this.doc.getLine(N)},F.prototype.getLines=function(N,$){return this.doc.getLines(N,$)},F.prototype.getLength=function(){return this.doc.getLength()},F.prototype.getTextRange=function(N){return this.doc.getTextRange(N||this.selection.getRange())},F.prototype.insert=function(N,$){return this.doc.insert(N,$)},F.prototype.remove=function(N){return this.doc.remove(N)},F.prototype.removeFullLines=function(N,$){return this.doc.removeFullLines(N,$)},F.prototype.undoChanges=function(N,$){if(N.length){this.$fromUndo=!0;for(var k=N.length-1;k!=-1;k--){var L=N[k];L.action=="insert"||L.action=="remove"?this.doc.revertDelta(L):L.folds&&this.addFolds(L.folds)}!$&&this.$undoSelect&&(N.selectionBefore?this.selection.fromJSON(N.selectionBefore):this.selection.setRange(this.$getUndoSelection(N,!0))),this.$fromUndo=!1}},F.prototype.redoChanges=function(N,$){if(N.length){this.$fromUndo=!0;for(var k=0;k<N.length;k++){var L=N[k];(L.action=="insert"||L.action=="remove")&&this.doc.$safeApplyDelta(L)}!$&&this.$undoSelect&&(N.selectionAfter?this.selection.fromJSON(N.selectionAfter):this.selection.setRange(this.$getUndoSelection(N,!1))),this.$fromUndo=!1}},F.prototype.setUndoSelect=function(N){this.$undoSelect=N},F.prototype.$getUndoSelection=function(N,$){function k(Z){return $?Z.action!=="insert":Z.action==="insert"}for(var L,W,U=0;U<N.length;U++){var q=N[U];if(q.start){if(!L){k(q)?L=c.fromPoints(q.start,q.end):L=c.fromPoints(q.start,q.start);continue}k(q)?(W=q.start,L.compare(W.row,W.column)==-1&&L.setStart(W),W=q.end,L.compare(W.row,W.column)==1&&L.setEnd(W)):(W=q.start,L.compare(W.row,W.column)==-1&&(L=c.fromPoints(q.start,q.start)))}}return L},F.prototype.replace=function(N,$){return this.doc.replace(N,$)},F.prototype.moveText=function(N,$,k){var L=this.getTextRange(N),W=this.getFoldsInRange(N),U=c.fromPoints($,$);if(!k){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,L),W.length){var Q=N.start,le=U.start,q=le.row-Q.row,Z=le.column-Q.column;this.addFolds(W.map(function(ae){return ae=ae.clone(),ae.start.row==Q.row&&(ae.start.column+=Z),ae.end.row==Q.row&&(ae.end.column+=Z),ae.start.row+=q,ae.end.row+=q,ae}))}return U},F.prototype.indentRows=function(N,$,k){k=k.replace(/\t/g,this.getTabString());for(var L=N;L<=$;L++)this.doc.insertInLine({row:L,column:0},k)},F.prototype.outdentRows=function(N){for(var $=N.collapseRows(),k=new c(0,0,0,0),L=this.getTabSize(),W=$.start.row;W<=$.end.row;++W){var U=this.getLine(W);k.start.row=W,k.end.row=W;for(var q=0;q<L&&U.charAt(q)==" ";++q);q<L&&U.charAt(q)==" "?(k.start.column=q,k.end.column=q+1):(k.start.column=0,k.end.column=q),this.remove(k)}},F.prototype.$moveLines=function(N,$,k){if(N=this.getRowFoldStart(N),$=this.getRowFoldEnd($),k<0){var L=this.getRowFoldStart(N+k);if(L<0)return 0;var W=L-N}else if(k>0){var L=this.getRowFoldEnd($+k);if(L>this.doc.getLength()-1)return 0;var W=L-$}else{N=this.$clipRowToDocument(N),$=this.$clipRowToDocument($);var W=$-N+1}var U=new c(N,0,$,Number.MAX_VALUE),q=this.getFoldsInRange(U).map(function(Q){return Q=Q.clone(),Q.start.row+=W,Q.end.row+=W,Q}),Z=k==0?this.doc.getLines(N,$):this.doc.removeFullLines(N,$);return this.doc.insertFullLines(N+W,Z),q.length&&this.addFolds(q),W},F.prototype.moveLinesUp=function(N,$){return this.$moveLines(N,$,-1)},F.prototype.moveLinesDown=function(N,$){return this.$moveLines(N,$,1)},F.prototype.duplicateLines=function(N,$){return this.$moveLines(N,$,0)},F.prototype.$clipRowToDocument=function(N){return Math.max(0,Math.min(N,this.doc.getLength()-1))},F.prototype.$clipColumnToRow=function(N,$){return $<0?0:Math.min(this.doc.getLine(N).length,$)},F.prototype.$clipPositionToDocument=function(N,$){if($=Math.max(0,$),N<0)N=0,$=0;else{var k=this.doc.getLength();N>=k?(N=k-1,$=this.doc.getLine(k-1).length):$=Math.min(this.doc.getLine(N).length,$)}return{row:N,column:$}},F.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},F.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")}},F.prototype.getUseWrapMode=function(){return this.$useWrapMode},F.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"))},F.prototype.adjustWrapLimit=function(N,$){var k=this.$wrapLimitRange;k.max<0&&(k={min:$,max:$});var L=this.$constrainWrapLimit(N,k.min,k.max);return L!=this.$wrapLimit&&L>1?(this.$wrapLimit=L,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},F.prototype.$constrainWrapLimit=function(N,$,k){return $&&(N=Math.max($,N)),k&&(N=Math.min(k,N)),N},F.prototype.getWrapLimit=function(){return this.$wrapLimit},F.prototype.setWrapLimit=function(N){this.setWrapLimitRange(N,N)},F.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},F.prototype.$updateInternalDataOnChange=function(N){var $=this.$useWrapMode,k=N.action,L=N.start,W=N.end,U=L.row,q=W.row,Z=q-U,Q=null;if(this.$updating=!0,Z!=0)if(k==="remove"){this[$?"$wrapData":"$rowLengthCache"].splice(U,Z);var le=this.$foldData;Q=this.getFoldsInRange(N),this.removeFolds(Q);var ne=this.getFoldLine(W.row),ce=0;if(ne){ne.addRemoveChars(W.row,W.column,L.column-W.column),ne.shiftRow(-Z);var ae=this.getFoldLine(U);ae&&ae!==ne&&(ae.merge(ne),ne=ae),ce=le.indexOf(ne)+1}for(ce;ce<le.length;ce++){var ne=le[ce];ne.start.row>=W.row&&ne.shiftRow(-Z)}q=U}else{var de=Array(Z);de.unshift(U,0);var me=$?this.$wrapData:this.$rowLengthCache;me.splice.apply(me,de);var le=this.$foldData,ne=this.getFoldLine(U),ce=0;if(ne){var $e=ne.range.compareInside(L.row,L.column);$e==0?(ne=ne.split(L.row,L.column),ne&&(ne.shiftRow(Z),ne.addRemoveChars(q,0,W.column-L.column))):$e==-1&&(ne.addRemoveChars(U,0,W.column-L.column),ne.shiftRow(Z)),ce=le.indexOf(ne)+1}for(ce;ce<le.length;ce++){var ne=le[ce];ne.start.row>=U&&ne.shiftRow(Z)}}else{Z=Math.abs(N.start.column-N.end.column),k==="remove"&&(Q=this.getFoldsInRange(N),this.removeFolds(Q),Z=-Z);var ne=this.getFoldLine(U);ne&&ne.addRemoveChars(U,L.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),Q},F.prototype.$updateRowLengthCache=function(N,$){this.$rowLengthCache[N]=null,this.$rowLengthCache[$]=null},F.prototype.$updateWrapData=function(N,$){var k=this.doc.getAllLines(),L=this.getTabSize(),W=this.$wrapData,U=this.$wrapLimit,q,Z,Q=N;for($=Math.min($,k.length-1);Q<=$;)Z=this.getFoldLine(Q,Z),Z?(q=[],Z.walk((function(le,ne,ce,ae){var de;if(le!=null){de=this.$getDisplayTokens(le,q.length),de[0]=A;for(var me=1;me<de.length;me++)de[me]=C}else de=this.$getDisplayTokens(k[ne].substring(ae,ce),q.length);q=q.concat(de)}).bind(this),Z.end.row,k[Z.end.row].length+1),W[Z.start.row]=this.$computeWrapSplits(q,U,L),Q=Z.end.row+1):(q=this.$getDisplayTokens(k[Q]),W[Q]=this.$computeWrapSplits(q,U,L),Q++)},F.prototype.$computeWrapSplits=function(N,$,k){if(N.length==0)return[];var L=[],W=N.length,U=0,q=0,Z=this.$wrapAsCode,Q=this.$indentedSoftWrap,le=$<=Math.max(2*k,8)||Q===!1?0:Math.floor($/2);function ne(){var $e=0;if(le===0)return $e;if(Q)for(var Re=0;Re<N.length;Re++){var Me=N[Re];if(Me==D)$e+=1;else if(Me==E)$e+=k;else{if(Me==T)continue;break}}return Z&&Q!==!1&&($e+=k),Math.min($e,le)}function ce($e){for(var Re=$e-U,Me=U;Me<$e;Me++){var Xe=N[Me];(Xe===12||Xe===2)&&(Re-=1)}L.length||(ae=ne(),L.indent=ae),q+=Re,L.push(q),U=$e}for(var ae=0;W-U>$-ae;){var de=U+$-ae;if(N[de-1]>=D&&N[de]>=D){ce(de);continue}if(N[de]==A||N[de]==C){for(de;de!=U-1&&N[de]!=A;de--);if(de>U){ce(de);continue}for(de=U+$,de;de<N.length&&N[de]==C;de++);if(de==N.length)break;ce(de);continue}for(var me=Math.max(de-($-($>>2)),U-1);de>me&&N[de]<A;)de--;if(Z){for(;de>me&&N[de]<A;)de--;for(;de>me&&N[de]==O;)de--}else for(;de>me&&N[de]<D;)de--;if(de>me){ce(++de);continue}de=U+$,N[de]==R&&de--,ce(de-ae)}return L},F.prototype.$getDisplayTokens=function(N,$){var k=[],L;$=$||0;for(var W=0;W<N.length;W++){var U=N.charCodeAt(W);if(U==9){L=this.getScreenTabSize(k.length+$),k.push(E);for(var q=1;q<L;q++)k.push(T)}else U==32?k.push(D):U>39&&U<48||U>57&&U<64?k.push(O):U>=4352&&B(U)?k.push(I,R):k.push(I)}return k},F.prototype.$getStringScreenWidth=function(N,$,k){if($==0)return[0,0];$==null&&($=1/0),k=k||0;var L,W;for(W=0;W<N.length&&(L=N.charCodeAt(W),L==9?k+=this.getScreenTabSize(k):L>=4352&&B(L)?k+=2:k+=1,!(k>$));W++);return[k,W]},F.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+$},F.prototype.getRowLineCount=function(N){return!this.$useWrapMode||!this.$wrapData[N]?1:this.$wrapData[N].length+1},F.prototype.getRowWrapIndent=function(N){if(this.$useWrapMode){var $=this.screenToDocumentPosition(N,Number.MAX_VALUE),k=this.$wrapData[$.row];return k.length&&k[0]<$.column?k.indent:0}else return 0},F.prototype.getScreenLastRowColumn=function(N){var $=this.screenToDocumentPosition(N,Number.MAX_VALUE);return this.documentToScreenColumn($.row,$.column)},F.prototype.getDocumentLastRowColumn=function(N,$){var k=this.documentToScreenRow(N,$);return this.getScreenLastRowColumn(k)},F.prototype.getDocumentLastRowColumnPosition=function(N,$){var k=this.documentToScreenRow(N,$);return this.screenToDocumentPosition(k,Number.MAX_VALUE/10)},F.prototype.getRowSplitData=function(N){if(this.$useWrapMode)return this.$wrapData[N]},F.prototype.getScreenTabSize=function(N){return this.$tabSize-(N%this.$tabSize|0)},F.prototype.screenToDocumentRow=function(N,$){return this.screenToDocumentPosition(N,$).row},F.prototype.screenToDocumentColumn=function(N,$){return this.screenToDocumentPosition(N,$).column},F.prototype.screenToDocumentPosition=function(N,$,k){if(N<0)return{row:0,column:0};var L,ce=0,W=0,U,ne=0,q=0,Z=this.$screenRowCache,Q=this.$getRowCacheIndex(Z,N),le=Z.length;if(le&&Q>=0)var ne=Z[Q],ce=this.$docRowCache[Q],ae=N>Z[le-1];else var ae=!le;for(var de=this.getLength()-1,me=this.getNextFoldLine(ce),$e=me?me.start.row:1/0;ne<=N&&(q=this.getRowLength(ce),!(ne+q>N||ce>=de));)ne+=q,ce++,ce>$e&&(ce=me.end.row+1,me=this.getNextFoldLine(ce,me),$e=me?me.start.row:1/0),ae&&(this.$docRowCache.push(ce),this.$screenRowCache.push(ne));if(me&&me.start.row<=ce)L=this.getFoldDisplayLine(me),ce=me.start.row;else{if(ne+q<=N||ce>de)return{row:de,column:this.getLine(de).length};L=this.getLine(ce),me=null}var Re=0,Me=Math.floor(N-ne);if(this.$useWrapMode){var Xe=this.$wrapData[ce];Xe&&(U=Xe[Me],Me>0&&Xe.length&&(Re=Xe.indent,W=Xe[Me-1]||Xe[Xe.length-1],L=L.substring(W)))}return k!==void 0&&this.$bidiHandler.isBidiRow(ne+Me,ce,Me)&&($=this.$bidiHandler.offsetToCol(k)),W+=this.$getStringScreenWidth(L,$-Re)[1],this.$useWrapMode&&W>=U&&(W=U-1),me?me.idxToPosition(W):{row:ce,column:W}},F.prototype.documentToScreenPosition=function(N,$){if(typeof $>"u")var k=this.$clipPositionToDocument(N.row,N.column);else k=this.$clipPositionToDocument(N,$);N=k.row,$=k.column;var ne=0,L=null,W=null;W=this.getFoldAt(N,$,1),W&&(N=W.start.row,$=W.start.column);var U,le=0,q=this.$docRowCache,Z=this.$getRowCacheIndex(q,N),Q=q.length;if(Q&&Z>=0)var le=q[Z],ne=this.$screenRowCache[Z],ce=N>q[Q-1];else var ce=!Q;for(var ae=this.getNextFoldLine(le),de=ae?ae.start.row:1/0;le<N;){if(le>=de){if(U=ae.end.row+1,U>N)break;ae=this.getNextFoldLine(U,ae),de=ae?ae.start.row:1/0}else U=le+1;ne+=this.getRowLength(le),le=U,ce&&(this.$docRowCache.push(le),this.$screenRowCache.push(ne))}var me="";ae&&le>=de?(me=this.getFoldDisplayLine(ae,N,$),L=ae.start.row):(me=this.getLine(N).substring(0,$),L=N);var $e=0;if(this.$useWrapMode){var Re=this.$wrapData[L];if(Re){for(var Me=0;me.length>=Re[Me];)ne++,Me++;me=me.substring(Re[Me-1]||0,me.length),$e=Me>0?Re.indent:0}}return this.lineWidgets&&this.lineWidgets[le]&&this.lineWidgets[le].rowsAbove&&(ne+=this.lineWidgets[le].rowsAbove),{row:ne,column:$e+this.$getStringScreenWidth(me)[0]}},F.prototype.documentToScreenColumn=function(N,$){return this.documentToScreenPosition(N,$).column},F.prototype.documentToScreenRow=function(N,$){return this.documentToScreenPosition(N,$).row},F.prototype.getScreenLength=function(){var N=0,$=null;if(this.$useWrapMode)for(var k=this.$wrapData.length,L=0,W=0,$=this.$foldData[W++],U=$?$.start.row:1/0;L<k;){var q=this.$wrapData[L];N+=q?q.length+1:1,L++,L>U&&(L=$.end.row+1,$=this.$foldData[W++],U=$?$.start.row:1/0)}else{N=this.getLength();for(var Z=this.$foldData,W=0;W<Z.length;W++)$=Z[W],N-=$.end.row-$.start.row}return this.lineWidgets&&(N+=this.$getWidgetScreenLength()),N},F.prototype.$setFontMetrics=function(N){this.$enableVarChar&&(this.$getStringScreenWidth=function($,k,L){if(k===0)return[0,0];k||(k=1/0),L=L||0;var W,U;for(U=0;U<$.length&&(W=$.charAt(U),W===" "?L+=this.getScreenTabSize(L):L+=N.getCharacterWidth(W),!(L>k));U++);return[L,U]})},F.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]},F.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},F})();x.$uid=0,x.prototype.$modes=h.$modes,x.prototype.getValue=x.prototype.toString,x.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},x.prototype.$overwrite=!1,x.prototype.$mode=null,x.prototype.$modeId=null,x.prototype.$scrollTop=0,x.prototype.$scrollLeft=0,x.prototype.$wrapLimit=80,x.prototype.$useWrapMode=!1,x.prototype.$wrapLimitRange={min:null,max:null},x.prototype.lineWidgets=null,x.prototype.isFullWidth=B,p.implement(x.prototype,d);var I=1,R=2,A=3,C=4,O=9,D=10,E=11,T=12;function B(F){return F<4352?!1:F>=4352&&F<=4447||F>=4515&&F<=4519||F>=4602&&F<=4607||F>=9001&&F<=9002||F>=11904&&F<=11929||F>=11931&&F<=12019||F>=12032&&F<=12245||F>=12272&&F<=12283||F>=12288&&F<=12350||F>=12353&&F<=12438||F>=12441&&F<=12543||F>=12549&&F<=12589||F>=12593&&F<=12686||F>=12688&&F<=12730||F>=12736&&F<=12771||F>=12784&&F<=12830||F>=12832&&F<=12871||F>=12880&&F<=13054||F>=13056&&F<=19903||F>=19968&&F<=42124||F>=42128&&F<=42182||F>=43360&&F<=43388||F>=44032&&F<=55203||F>=55216&&F<=55238||F>=55243&&F<=55291||F>=63744&&F<=64255||F>=65040&&F<=65049||F>=65072&&F<=65106||F>=65108&&F<=65126||F>=65128&&F<=65131||F>=65281&&F<=65376||F>=65504&&F<=65510}e("./edit_session/folding").Folding.call(x.prototype),e("./edit_session/bracket_match").BracketMatch.call(x.prototype),h.defineOptions(x.prototype,"session",{wrap:{set:function(F){if(!F||F=="off"?F=!1:F=="free"?F=!0:F=="printMargin"?F=-1:typeof F=="string"&&(F=parseInt(F,10)||!1),this.$wrap!=F)if(this.$wrap=F,!F)this.setUseWrapMode(!1);else{var N=typeof F=="number"?F: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(F){F=F=="auto"?this.$mode.type!="text":F!="text",F!=this.$wrapAsCode&&(this.$wrapAsCode=F,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(F){this.$useWorker=F,this.$stopWorker(),F&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(F){F=parseInt(F),F>0&&this.$tabSize!==F&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=F,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(F){this.setFoldStyle(F)},handlesSet:!0},overwrite:{set:function(F){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(F){this.doc.setNewLineMode(F)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(F){this.setMode(F)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=x}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,r,m){var p=e("./lib/lang"),g=e("./lib/oop"),w=e("./range").Range,h=(function(){function c(){this.$options={}}return c.prototype.set=function(u){return g.mixin(this.$options,u),this},c.prototype.getOptions=function(){return p.copyObject(this.$options)},c.prototype.setOptions=function(u){this.$options=u},c.prototype.find=function(u){var i=this.$options,s=this.$matchIterator(u,i);if(!s)return!1;var f=null;return s.forEach(function(b,x,I,R){return f=new w(b,x,I,R),x==R&&i.start&&i.start.start&&i.skipCurrent!=!1&&f.isEqual(i.start)?(f=null,!1):!0}),f},c.prototype.findAll=function(u){var i=this.$options;if(!i.needle)return[];this.$assembleRegExp(i);var s=i.range,f=s?u.getLines(s.start.row,s.end.row):u.doc.getAllLines(),b=[],x=i.re;if(i.$isMultiLine){var I=x.length,R=f.length-I,A;e:for(var C=x.offset||0;C<=R;C++){for(var O=0;O<I;O++)if(f[C+O].search(x[O])==-1)continue e;var D=f[C],E=f[C+I-1],T=D.length-D.match(x[0])[0].length,B=E.match(x[I-1])[0].length;A&&A.end.row===C&&A.end.column>T||(b.push(A=new w(C,T,C+I-1,B)),I>2&&(C=C+I-2))}}else for(var F,N=0;N<f.length;N++)if(this.$isMultilineSearch(i)){var $=f.length-1;if(F=this.$multiLineForward(u,x,N,$),F){var k=F.endRow<=$?F.endRow-1:$;k>N&&(N=k),b.push(new w(F.startRow,F.startCol,F.endRow,F.endCol))}}else{F=p.getMatchOffsets(f[N],x);for(var O=0;O<F.length;O++){var L=F[O];b.push(new w(N,L.offset,N,L.offset+L.length))}}if(s){for(var W=s.start.column,U=s.end.column,N=0,O=b.length-1;N<O&&b[N].start.column<W&&b[N].start.row==0;)N++;for(var q=s.end.row-s.start.row;N<O&&b[O].end.column>U&&b[O].end.row==q;)O--;for(b=b.slice(N,O+1),N=0,O=b.length;N<O;N++)b[N].start.row+=s.start.row,b[N].end.row+=s.start.row}return b},c.prototype.parseReplaceString=function(u){for(var i={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},s="",f=0,b=u.length;f<b;f++){var x=u.charCodeAt(f);if(x===i.Backslash){if(f++,f>=b){s+="\\";break}var I=u.charCodeAt(f);switch(I){case i.Backslash:s+="\\";break;case i.n:s+=`
202
+ `;break;case i.t:s+=" ";break}continue}if(x===i.DollarSign){if(f++,f>=b){s+="$";break}var R=u.charCodeAt(f);if(R===i.DollarSign){s+="$$";continue}if(R===i.Digit0||R===i.Ampersand){s+="$&";continue}if(i.Digit1<=R&&R<=i.Digit9){s+="$"+u[f];continue}}s+=u[f]}return s||u},c.prototype.replace=function(u,i){var s=this.$options,f=this.$assembleRegExp(s);if(s.$isMultiLine)return i;if(f){var b=this.$isMultilineSearch(s);b&&(u=u.replace(/\r\n|\r|\n/g,`
203
+ `));var x=f.exec(u);if(!x||!b&&x[0].length!=u.length)return null;if(i=s.regExp?this.parseReplaceString(i):i.replace(/\$/g,"$$$$"),i=u.replace(f,i),s.preserveCase){i=i.split("");for(var I=Math.min(u.length,u.length);I--;){var R=u[I];R&&R.toLowerCase()!=R?i[I]=i[I].toUpperCase():i[I]=i[I].toLowerCase()}i=i.join("")}return i}},c.prototype.$assembleRegExp=function(u,i){if(u.needle instanceof RegExp)return u.re=u.needle;var s=u.needle;if(!u.needle)return u.re=!1;u.regExp||(s=p.escapeRegExp(s));var f=u.caseSensitive?"gm":"gmi";try{new RegExp(s,"u"),u.$supportsUnicodeFlag=!0,f+="u"}catch{u.$supportsUnicodeFlag=!1}if(u.wholeWord&&(s=d(s,u)),u.$isMultiLine=!i&&/[\n\r]/.test(s),u.$isMultiLine)return u.re=this.$assembleMultilineRegExp(s,f);try{var b=new RegExp(s,f)}catch{b=!1}return u.re=b},c.prototype.$assembleMultilineRegExp=function(u,i){for(var s=u.replace(/\r\n|\r|\n/g,`$
204
+ ^`).split(`
205
+ `),f=[],b=0;b<s.length;b++)try{f.push(new RegExp(s[b],i))}catch{return!1}return f},c.prototype.$isMultilineSearch=function(u){return u.re&&/\\r\\n|\\r|\\n/.test(u.re.source)&&u.regExp&&!u.$isMultiLine},c.prototype.$multiLineForward=function(u,i,s,f){for(var b,x=l(u,s),I=s;I<=f;){for(var R=0;R<x&&!(I>f);R++){var A=u.getLine(I++);b=b==null?A:b+`
206
+ `+A}var C=i.exec(b);if(i.lastIndex=0,C){var O=b.slice(0,C.index).split(`
207
+ `),D=C[0].split(`
208
+ `),E=s+O.length-1,T=O[O.length-1].length,B=E+D.length-1,F=D.length==1?T+D[0].length:D[D.length-1].length;return{startRow:E,startCol:T,endRow:B,endCol:F}}}return null},c.prototype.$multiLineBackward=function(u,i,s,f,b){for(var x,I=l(u,f),R=u.getLine(f).length-s,A=f;A>=b;){for(var C=0;C<I&&A>=b;C++){var O=u.getLine(A--);x=x==null?O:O+`
209
+ `+x}var D=a(x,i,R);if(D){var E=x.slice(0,D.index).split(`
210
+ `),T=D[0].split(`
211
+ `),B=A+E.length,F=E[E.length-1].length,N=B+T.length-1,$=T.length==1?F+T[0].length:T[T.length-1].length;return{startRow:B,startCol:F,endRow:N,endCol:$}}}return null},c.prototype.$matchIterator=function(u,i){var s=this.$assembleRegExp(i);if(!s)return!1;var f=this.$isMultilineSearch(i),b=this.$multiLineForward,x=this.$multiLineBackward,I=i.backwards==!0,R=i.skipCurrent!=!1,A=s.unicode,C=i.range,O=i.start;O||(O=C?C[I?"end":"start"]:u.selection.getRange()),O.start&&(O=O[R!=I?"end":"start"]);var D=C?C.start.row:0,E=C?C.end.row:u.getLength()-1;if(I)var T=function(N){var $=O.row;if(!F($,O.column,N)){for($--;$>=D;$--)if(F($,Number.MAX_VALUE,N))return;if(i.wrap!=!1){for($=E,D=O.row;$>=D;$--)if(F($,Number.MAX_VALUE,N))return}}};else var T=function(N){var $=O.row;if(!F($,O.column,N)){for($=$+1;$<=E;$++)if(F($,0,N))return;if(i.wrap!=!1){for($=D,E=O.row;$<=E;$++)if(F($,0,N))return}}};if(i.$isMultiLine)var B=s.length,F=function(N,$,k){var L=I?N-B+1:N;if(!(L<0||L+B>u.getLength())){var W=u.getLine(L),U=W.search(s[0]);if(!(!I&&U<$||U===-1)){for(var q=1;q<B;q++)if(W=u.getLine(L+q),W.search(s[q])==-1)return;var Z=W.match(s[B-1])[0].length;if(!(I&&Z>$)&&k(L,U,L+B-1,Z))return!0}}};else if(I)var F=function(N,$,k){if(f){var L=x(u,s,$,N,D);if(!L)return!1;if(k(L.startRow,L.startCol,L.endRow,L.endCol))return!0}else{var W=u.getLine(N),U=[],q,Z=0;for(s.lastIndex=0;q=s.exec(W);){var Q=q[0].length;if(Z=q.index,!Q){if(Z>=W.length)break;s.lastIndex=Z+=p.skipEmptyMatch(W,Z,A)}if(q.index+Q>$)break;U.push(q.index,Q)}for(var le=U.length-1;le>=0;le-=2){var ne=U[le-1],Q=U[le];if(k(N,ne,N,ne+Q))return!0}}};else var F=function(N,$,k){if(s.lastIndex=$,f){var L=b(u,s,N,E);if(L){var W=L.endRow<=E?L.endRow-1:E;W>N&&(N=W)}if(!L)return!1;if(k(L.startRow,L.startCol,L.endRow,L.endCol))return!0}else for(var U=u.getLine(N),q,Z;Z=s.exec(U);){var Q=Z[0].length;if(q=Z.index,k(N,q,N,q+Q))return!0;if(!Q&&(s.lastIndex=q+=p.skipEmptyMatch(U,q,A),q>=U.length))return!1}};return{forEach:T}},c})();function d(c,u){var i=p.supportsLookbehind();function s(I,R){R===void 0&&(R=!0);var A=i&&u.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return A.test(I)||u.regExp?i&&u.$supportsUnicodeFlag?R?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var f=Array.from(c),b=f[0],x=f[f.length-1];return s(b)+c+s(x,!1)}function a(c,u,i){for(var s=null,f=0;f<=c.length;){u.lastIndex=f;var b=u.exec(c);if(!b)break;var x=b.index+b[0].length;if(x>c.length-i)break;(!s||x>s.index+s[0].length)&&(s=b),f=b.index+1}return s}function l(c,u){var i=5e3,s={row:u,column:0},f=c.doc.positionToIndex(s),b=f+i,x=c.doc.indexToPosition(b),I=x.row;return I+1}r.Search=h}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,r,m){var p=this&&this.__extends||(function(){var c=function(u,i){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,f){s.__proto__=f}||function(s,f){for(var b in f)Object.prototype.hasOwnProperty.call(f,b)&&(s[b]=f[b])},c(u,i)};return function(u,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");c(u,i);function s(){this.constructor=u}u.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)}})(),g=e("../lib/keys"),w=e("../lib/useragent"),h=g.KEY_MODS,d=(function(){function c(u,i){this.$init(u,i,!1)}return c.prototype.$init=function(u,i,s){this.platform=i||(w.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(u),this.$singleCommand=s},c.prototype.addCommand=function(u){this.commands[u.name]&&this.removeCommand(u),this.commands[u.name]=u,u.bindKey&&this._buildKeyHash(u)},c.prototype.removeCommand=function(u,i){var s=u&&(typeof u=="string"?u:u.name);u=this.commands[s],i||delete this.commands[s];var f=this.commandKeyBinding;for(var b in f){var x=f[b];if(x==u)delete f[b];else if(Array.isArray(x)){var I=x.indexOf(u);I!=-1&&(x.splice(I,1),x.length==1&&(f[b]=x[0]))}}},c.prototype.bindKey=function(u,i,s){if(typeof u=="object"&&u&&(s==null&&(s=u.position),u=u[this.platform]),!!u){if(typeof i=="function")return this.addCommand({exec:i,bindKey:u,name:i.name||u});u.split("|").forEach(function(f){var b="";if(f.indexOf(" ")!=-1){var x=f.split(/\s+/);f=x.pop(),x.forEach(function(A){var C=this.parseKeys(A),O=h[C.hashId]+C.key;b+=(b?" ":"")+O,this._addCommandToBinding(b,"chainKeys")},this),b+=" "}var I=this.parseKeys(f),R=h[I.hashId]+I.key;this._addCommandToBinding(b+R,i,s)},this)}},c.prototype._addCommandToBinding=function(u,i,s){var f=this.commandKeyBinding,b;if(!i)delete f[u];else if(!f[u]||this.$singleCommand)f[u]=i;else{Array.isArray(f[u])?(b=f[u].indexOf(i))!=-1&&f[u].splice(b,1):f[u]=[f[u]],typeof s!="number"&&(s=a(i));var x=f[u];for(b=0;b<x.length;b++){var I=x[b],R=a(I);if(R>s)break}x.splice(b,0,i)}},c.prototype.addCommands=function(u){u&&Object.keys(u).forEach(function(i){var s=u[i];if(s){if(typeof s=="string")return this.bindKey(s,i);typeof s=="function"&&(s={exec:s}),typeof s=="object"&&(s.name||(s.name=i),this.addCommand(s))}},this)},c.prototype.removeCommands=function(u){Object.keys(u).forEach(function(i){this.removeCommand(u[i])},this)},c.prototype.bindKeys=function(u){Object.keys(u).forEach(function(i){this.bindKey(i,u[i])},this)},c.prototype._buildKeyHash=function(u){this.bindKey(u.bindKey,u)},c.prototype.parseKeys=function(u){var i=u.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(R){return R}),s=i.pop(),f=g[s];if(g.FUNCTION_KEYS[f])s=g.FUNCTION_KEYS[f].toLowerCase();else if(i.length){if(i.length==1&&i[0]=="shift")return{key:s.toUpperCase(),hashId:-1}}else return{key:s,hashId:-1};for(var b=0,x=i.length;x--;){var I=g.KEY_MODS[i[x]];if(I==null)return typeof console<"u"&&console.error("invalid modifier "+i[x]+" in "+u),!1;b|=I}return{key:s,hashId:b}},c.prototype.findKeyCommand=function(u,i){var s=h[u]+i;return this.commandKeyBinding[s]},c.prototype.handleKeyboard=function(u,i,s,f){if(!(f<0)){var b=h[i]+s,x=this.commandKeyBinding[b];return u.$keyChain&&(u.$keyChain+=" "+b,x=this.commandKeyBinding[u.$keyChain]||x),x&&(x=="chainKeys"||x[x.length-1]=="chainKeys")?(u.$keyChain=u.$keyChain||b,{command:"null"}):(u.$keyChain&&((!i||i==4)&&s.length==1?u.$keyChain=u.$keyChain.slice(0,-b.length-1):(i==-1||f>0)&&(u.$keyChain="")),{command:x})}},c.prototype.getStatusText=function(u,i){return i.$keyChain||""},c})();function a(c){return typeof c=="object"&&c.bindKey&&c.bindKey.position||(c.isDefault?-100:0)}var l=(function(c){p(u,c);function u(i,s){var f=c.call(this,i,s)||this;return f.$singleCommand=!0,f}return u})(d);l.call=function(c,u,i){d.prototype.$init.call(c,u,i,!0)},d.call=function(c,u,i){d.prototype.$init.call(c,u,i,!1)},r.HashHandler=l,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 p=this&&this.__extends||(function(){var a=function(l,c){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,i){u.__proto__=i}||function(u,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(u[s]=i[s])},a(l,c)};return function(l,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");a(l,c);function u(){this.constructor=l}l.prototype=c===null?Object.create(c):(u.prototype=c.prototype,new u)}})(),g=e("../lib/oop"),w=e("../keyboard/hash_handler").MultiHashHandler,h=e("../lib/event_emitter").EventEmitter,d=(function(a){p(l,a);function l(c,u){var i=a.call(this,u,c)||this;return i.byName=i.commands,i.setDefaultHandler("exec",function(s){return s.args?s.command.exec(s.editor,s.args,s.event,!1):s.command.exec(s.editor,{},s.event,!0)}),i}return l.prototype.exec=function(c,u,i){if(Array.isArray(c)){for(var s=c.length;s--;)if(this.exec(c[s],u,i))return!0;return!1}typeof c=="string"&&(c=this.commands[c]);var f={editor:u,command:c,args:i};return this.canExecute(c,u)?(f.returnValue=this._emit("exec",f),this._signal("afterExec",f),f.returnValue!==!1):(this._signal("commandUnavailable",f),!1)},l.prototype.canExecute=function(c,u){return typeof c=="string"&&(c=this.commands[c]),!(!c||u&&u.$readOnly&&!c.readOnly||this.$checkCommandState!=!1&&c.isAvailable&&!c.isAvailable(u))},l.prototype.toggleRecording=function(c){if(!this.$inReplay)return c&&c._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(u){this.macro.push([u.command,u.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},l.prototype.replay=function(c){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(c);try{this.$inReplay=!0,this.macro.forEach(function(u){typeof u=="string"?this.exec(u,c):this.exec(u[0],c,u[1])},this)}finally{this.$inReplay=!1}}},l.prototype.trimMacro=function(c){return c.map(function(u){return typeof u[0]!="string"&&(u[0]=u[0].name),u[1]||(u=u[0]),u})},l})(w);g.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 p=e("../lib/lang"),g=e("../config"),w=e("../range").Range;function h(a,l){return{win:a,mac:l}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:h("Ctrl-,","Command-,"),exec:function(a){g.loadModule("ace/ext/settings_menu",function(l){l.init(a),a.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:h("Alt-E","F4"),exec:function(a){g.loadModule("ace/ext/error_marker",function(l){l.showErrorMarker(a,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:h("Alt-Shift-E","Shift-F4"),exec:function(a){g.loadModule("ace/ext/error_marker",function(l){l.showErrorMarker(a,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:h("Ctrl-A","Command-A"),exec:function(a){a.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:h(null,"Ctrl-L"),exec:function(a){a.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:h("Ctrl-L","Command-L"),exec:function(a,l){typeof l=="number"&&!isNaN(l)&&a.gotoLine(l),a.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:h("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(a){a.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(a){a.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:h("F2","F2"),exec:function(a){a.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:h("Alt-F2","Alt-F2"),exec:function(a){a.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:h(null,"Ctrl-Command-Option-0"),exec:function(a){a.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:h(null,"Ctrl-Command-Option-0"),exec:function(a){a.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:h("Alt-0","Command-Option-0"),exec:function(a){a.session.foldAll(),a.session.unfold(a.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:h("Alt-Shift-0","Command-Option-Shift-0"),exec:function(a){a.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:h("Ctrl-K","Command-G"),exec:function(a){a.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:h("Ctrl-Shift-K","Command-Shift-G"),exec:function(a){a.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:h("Alt-K","Ctrl-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:h("Alt-Shift-K","Ctrl-Shift-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:h("Ctrl-F","Command-F"),exec:function(a){g.loadModule("ace/ext/searchbox",function(l){l.Search(a)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(a){a.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:h("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(a){a.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(a){a.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(a){a.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:h("Up","Up|Ctrl-P"),exec:function(a,l){a.navigateUp(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:h("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(a){a.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(a){a.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(a){a.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:h("Down","Down|Ctrl-N"),exec:function(a,l){a.navigateDown(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:h("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(a){a.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:h("Ctrl-Left","Option-Left"),exec:function(a){a.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(a){a.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(a){a.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:h("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(a){a.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:h("Left","Left|Ctrl-B"),exec:function(a,l){a.navigateLeft(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:h("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(a){a.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:h("Ctrl-Right","Option-Right"),exec:function(a){a.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(a){a.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(a){a.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:h("Shift-Right","Shift-Right"),exec:function(a){a.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:h("Right","Right|Ctrl-F"),exec:function(a,l){a.navigateRight(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(a){a.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:h(null,"Option-PageDown"),exec:function(a){a.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:h("PageDown","PageDown|Ctrl-V"),exec:function(a){a.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(a){a.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:h(null,"Option-PageUp"),exec:function(a){a.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(a){a.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:h("Ctrl-Up",null),exec:function(a){a.renderer.scrollBy(0,-2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:h("Ctrl-Down",null),exec:function(a){a.renderer.scrollBy(0,2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:h("Ctrl-Alt-E","Command-Option-E"),exec:function(a){a.commands.toggleRecording(a)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:h("Ctrl-Shift-E","Command-Shift-E"),exec:function(a){a.commands.replay(a)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:h("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(a){a.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:h("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(a){a.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:h("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(a){a.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(a){},readOnly:!0},{name:"cut",description:"Cut",exec:function(a){var l=a.$copyWithEmptySelection&&a.selection.isEmpty(),c=l?a.selection.getLineRange():a.selection.getRange();a._emit("cut",c),c.isEmpty()||a.session.remove(c),a.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(a,l){a.$handlePaste(l)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:h("Ctrl-D","Command-D"),exec:function(a){a.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:h("Ctrl-Shift-D","Command-Shift-D"),exec:function(a){a.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:h("Ctrl-Alt-S","Command-Alt-S"),exec:function(a){a.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:h("Ctrl-/","Command-/"),exec:function(a){a.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:h("Ctrl-Shift-/","Command-Shift-/"),exec:function(a){a.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:h("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(a){a.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:h("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(a){a.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:h("Ctrl-H","Command-Option-F"),exec:function(a){g.loadModule("ace/ext/searchbox",function(l){l.Search(a,!0)})}},{name:"undo",description:"Undo",bindKey:h("Ctrl-Z","Command-Z"),exec:function(a){a.undo()}},{name:"redo",description:"Redo",bindKey:h("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(a){a.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:h("Alt-Shift-Up","Command-Option-Up"),exec:function(a){a.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:h("Alt-Up","Option-Up"),exec:function(a){a.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:h("Alt-Shift-Down","Command-Option-Down"),exec:function(a){a.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:h("Alt-Down","Option-Down"),exec:function(a){a.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:h("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(a){a.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:h("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(a){a.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:h("Shift-Delete",null),exec:function(a){if(a.selection.isEmpty())a.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:h("Alt-Backspace","Command-Backspace"),exec:function(a){a.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:h("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(a){a.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:h("Ctrl-Shift-Backspace",null),exec:function(a){var l=a.selection.getRange();l.start.column=0,a.session.remove(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:h("Ctrl-Shift-Delete",null),exec:function(a){var l=a.selection.getRange();l.end.column=Number.MAX_VALUE,a.session.remove(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:h("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(a){a.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:h("Ctrl-Delete","Alt-Delete"),exec:function(a){a.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:h("Shift-Tab","Shift-Tab"),exec:function(a){a.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:h("Tab","Tab"),exec:function(a){a.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:h("Ctrl-[","Ctrl-["),exec:function(a){a.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:h("Ctrl-]","Ctrl-]"),exec:function(a){a.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(a,l){a.insert(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(a,l){a.insert(p.stringRepeat(l.text||"",l.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:h(null,"Ctrl-O"),exec:function(a){a.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:h("Alt-Shift-X","Ctrl-T"),exec:function(a){a.transposeLetters()},multiSelectAction:function(a){a.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:h("Ctrl-U","Ctrl-U"),exec:function(a){a.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:h("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(a){a.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:h(null,null),exec:function(a){a.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:h("Ctrl-Shift-L","Command-Shift-L"),exec:function(a){var l=a.selection.getRange();l.start.column=l.end.column=0,l.end.row++,a.selection.setRange(l,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:h("Ctrl+F3","F3"),exec:function(a){a.openLink()}},{name:"joinlines",description:"Join lines",bindKey:h(null,null),exec:function(a){for(var l=a.selection.isBackwards(),c=l?a.selection.getSelectionLead():a.selection.getSelectionAnchor(),u=l?a.selection.getSelectionAnchor():a.selection.getSelectionLead(),i=a.session.doc.getLine(c.row).length,s=a.session.doc.getTextRange(a.selection.getRange()),f=s.replace(/\n\s*/," ").length,b=a.session.doc.getLine(c.row),x=c.row+1;x<=u.row+1;x++){var I=p.stringTrimLeft(p.stringTrimRight(a.session.doc.getLine(x)));I.length!==0&&(I=" "+I),b+=I}u.row+1<a.session.doc.getLength()-1&&(b+=a.session.doc.getNewLineCharacter()),a.clearSelection(),a.session.doc.replace(new w(c.row,0,u.row+2,0),b),f>0?(a.selection.moveCursorTo(c.row,c.column),a.selection.selectTo(c.row,c.column+f)):(i=a.session.doc.getLine(c.row).length>i?i+1:i,a.selection.moveCursorTo(c.row,i))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:h(null,null),exec:function(a){var l=a.session.doc.getLength()-1,c=a.session.doc.getLine(l).length,u=a.selection.rangeList.ranges,i=[];u.length<1&&(u=[a.selection.getRange()]);for(var s=0;s<u.length;s++)s==u.length-1&&(u[s].end.row===l&&u[s].end.column===c||i.push(new w(u[s].end.row,u[s].end.column,l,c))),s===0?u[s].start.row===0&&u[s].start.column===0||i.push(new w(0,0,u[s].start.row,u[s].start.column)):i.push(new w(u[s-1].end.row,u[s-1].end.column,u[s].start.row,u[s].start.column));a.exitMultiSelectMode(),a.clearSelection();for(var s=0;s<i.length;s++)a.selection.addRange(i[s],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(a){a.selection.clearSelection(),a.navigateLineEnd(),a.insert(`
212
+ `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(a){a.selection.clearSelection();var l=a.getCursorPosition();a.selection.moveTo(l.row-1,Number.MAX_VALUE),a.insert(`
213
+ `),l.row===0&&a.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(a){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),a.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:h("F1","F1"),exec:function(a){a.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:h(null,null),exec:function(a){a.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(a){a.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(e,r,m){var p=e("../lib/keys"),g=(function(){function h(d){this.editor=d,this.gutterLayer=d.renderer.$gutterLayer,this.element=d.renderer.$gutter,this.lines=d.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return h.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},h.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},h.prototype.$onGutterKeyDown=function(d){if(this.annotationTooltip.isOpen){d.preventDefault(),d.keyCode===p.escape&&this.annotationTooltip.hide();return}if(d.target===this.element){if(d.keyCode!=p.enter)return;d.preventDefault();var a=this.editor.getCursorPosition().row;this.editor.isRowVisible(a)||this.editor.scrollToLine(a,!0,!0),setTimeout((function(){var l=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),c=this.$findNearestFoldLaneWidget(l),u=this.$findNearestAnnotation(l);if(!(c===null&&u===null)){var i=this.$findClosestNumber(c,u,l);if(i===c)if(this.activeLane="fold",this.activeRowIndex=c,this.$isCustomWidgetVisible(c)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=u,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(d),setTimeout((function(){this.editor._signal("gutterkeydown",new w(d,this))}).bind(this),10)},h.prototype.$handleGutterKeyboardInteraction=function(d){if(d.keyCode===p.tab){d.preventDefault();return}if(d.keyCode===p.escape){d.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(d.keyCode===p.up){switch(d.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(d.keyCode===p.down){switch(d.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(d.keyCode===p.left){d.preventDefault(),this.$switchLane("annotation");return}if(d.keyCode===p.right){d.preventDefault(),this.$switchLane("fold");return}if(d.keyCode===p.enter||d.keyCode===p.space){switch(d.preventDefault(),this.activeLane){case"fold":var a=this.$rowIndexToRow(this.activeRowIndex),l=this.editor.session.$gutterCustomWidgets[a];if(l)l.callbacks&&l.callbacks.onClick&&l.callbacks.onClick(d,a);else if(this.gutterLayer.session.foldWidgets[a]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),d),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":this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex)),this.annotationTooltip.$fromKeyboard=!0;break}return}},h.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},h.prototype.$isFoldWidgetVisible=function(d){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(d)),l=this.$getFoldWidget(d).style.display!=="none";return a&&l},h.prototype.$isCustomWidgetVisible=function(d){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(d)),l=!!this.$getCustomWidget(d);return a&&l},h.prototype.$isAnnotationVisible=function(d){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(d)),l=this.$getAnnotation(d).style.display!=="none";return a&&l},h.prototype.$getFoldWidget=function(d){var a=this.lines.get(d),l=a.element;return l.childNodes[1]},h.prototype.$getCustomWidget=function(d){var a=this.lines.get(d),l=a.element;return l.childNodes[3]},h.prototype.$getAnnotation=function(d){var a=this.lines.get(d),l=a.element;return l.childNodes[2]},h.prototype.$findNearestFoldLaneWidget=function(d){if(this.$isCustomWidgetVisible(d)||this.$isFoldWidgetVisible(d))return d;for(var a=0;d-a>0||d+a<this.lines.getLength()-1;){if(a++,d-a>=0&&this.$isCustomWidgetVisible(d-a))return d-a;if(d+a<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(d+a))return d+a;if(d-a>=0&&this.$isFoldWidgetVisible(d-a))return d-a;if(d+a<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(d+a))return d+a}return null},h.prototype.$findNearestAnnotation=function(d){if(this.$isAnnotationVisible(d))return d;for(var a=0;d-a>0||d+a<this.lines.getLength()-1;){if(a++,d-a>=0&&this.$isAnnotationVisible(d-a))return d-a;if(d+a<=this.lines.getLength()-1&&this.$isAnnotationVisible(d+a))return d+a}return null},h.prototype.$focusFoldWidget=function(d){if(d!=null){var a=this.$getFoldWidget(d);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},h.prototype.$focusCustomWidget=function(d){if(d!=null){var a=this.$getCustomWidget(d);a&&(a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus())}},h.prototype.$focusAnnotation=function(d){if(d!=null){var a=this.$getAnnotation(d);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},h.prototype.$blurFoldWidget=function(d){var a=this.$getFoldWidget(d);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},h.prototype.$blurCustomWidget=function(d){var a=this.$getCustomWidget(d);a&&(a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur())},h.prototype.$blurAnnotation=function(d){var a=this.$getAnnotation(d);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},h.prototype.$moveFoldWidgetUp=function(){for(var d=this.activeRowIndex;d>0;)if(d--,this.$isFoldWidgetVisible(d)||this.$isCustomWidgetVisible(d)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=d,this.$isFoldWidgetVisible(d)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},h.prototype.$moveFoldWidgetDown=function(){for(var d=this.activeRowIndex;d<this.lines.getLength()-1;)if(d++,this.$isFoldWidgetVisible(d)||this.$isCustomWidgetVisible(d)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=d,this.$isFoldWidgetVisible(d)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},h.prototype.$moveAnnotationUp=function(){for(var d=this.activeRowIndex;d>0;)if(d--,this.$isAnnotationVisible(d)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=d,this.$focusAnnotation(this.activeRowIndex);return}},h.prototype.$moveAnnotationDown=function(){for(var d=this.activeRowIndex;d<this.lines.getLength()-1;)if(d++,this.$isAnnotationVisible(d)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=d,this.$focusAnnotation(this.activeRowIndex);return}},h.prototype.$findClosestNumber=function(d,a,l){return d===null?a:a===null||Math.abs(l-d)<=Math.abs(l-a)?d:a},h.prototype.$switchLane=function(d){switch(d){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 l=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(l===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=l,this.$isCustomWidgetVisible(l)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},h.prototype.$rowIndexToRow=function(d){var a=this.lines.get(d);return a?a.row:null},h.prototype.$rowToRowIndex=function(d){for(var a=0;a<this.lines.getLength();a++){var l=this.lines.get(a);if(l.row==d)return a}return null},h})();r.GutterKeyboardHandler=g;var w=(function(){function h(d,a){this.gutterKeyboardHandler=a,this.domEvent=d}return h.prototype.getKey=function(){return p.keyCodeToString(this.domEvent.keyCode)},h.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},h.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},h.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},h})();r.GutterKeyboardEvent=w}),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 p=this&&this.__values||function($){var k=typeof Symbol=="function"&&Symbol.iterator,L=k&&$[k],W=0;if(L)return L.call($);if($&&typeof $.length=="number")return{next:function(){return $&&W>=$.length&&($=void 0),{value:$&&$[W++],done:!$}}};throw new TypeError(k?"Object is not iterable.":"Symbol.iterator is not defined.")},g=e("./lib/oop"),w=e("./lib/dom"),h=e("./lib/lang"),d=e("./lib/useragent"),a=e("./keyboard/textinput").TextInput,l=e("./mouse/mouse_handler").MouseHandler,c=e("./mouse/fold_handler").FoldHandler,u=e("./keyboard/keybinding").KeyBinding,i=e("./edit_session").EditSession,s=e("./search").Search,f=e("./range").Range,b=e("./lib/event_emitter").EventEmitter,x=e("./commands/command_manager").CommandManager,I=e("./commands/default_commands").commands,R=e("./config"),A=e("./token_iterator").TokenIterator,C=e("./keyboard/gutter_handler").GutterKeyboardHandler,O=e("./config").nls,D=e("./clipboard"),E=e("./lib/keys"),T=e("./lib/event"),B=e("./tooltip").HoverTooltip,F=(function(){function $(k,L,W){this.id="editor"+ ++$.$uid,this.session,this.$toDestroy=[];var U=k.getContainerElement();this.container=U,this.renderer=k,this.commands=new x(d.isMac?"mac":"win",I),typeof document=="object"&&(this.textInput=new a(k.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new l(this),new c(this)),this.keyBinding=new u(this),this.$search=new s().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(L||W&&W.session||new i("")),R.resetOptions(this),W&&this.setOptions(W),R._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(k){this.session.startOperation(k)},$.prototype.endOperation=function(k){this.session.endOperation(k)},$.prototype.onStartOperation=function(k){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,k||(this.previousCommand=null)},$.prototype.onEndOperation=function(k){if(this.curOp&&this.session){if(k&&k.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var L=this.curOp.command,W=L&&L.scrollIntoView;if(W){switch(W){case"center-animate":W="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}W=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},$.prototype.$historyTracker=function(k){if(this.$mergeUndoDeltas){var L=this.prevOp,W=this.$mergeableCommands,U=L.command&&k.command.name==L.command.name;if(k.command.name=="insertstring"){var q=k.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),U=U&&this.mergeNextCommand&&(!/\s/.test(q)||/\s/.test(L.args)),this.mergeNextCommand=!0}else U=U&&W.indexOf(k.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(U=!1),U?this.session.mergeUndoDeltas=!0:W.indexOf(k.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},$.prototype.setKeyboardHandler=function(k,L){if(k&&typeof k=="string"&&k!="ace"){this.$keybindingId=k;var W=this;R.loadModule(["keybinding",k],function(U){W.$keybindingId==k&&W.keyBinding.setKeyboardHandler(U&&U.handler),L&&L()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(k),L&&L()},$.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},$.prototype.setSession=function(k){if(this.session!=k){this.curOp&&this.endOperation(),this.curOp={};var L=this.session;if(L){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 W=this.session.getSelection();W.off("changeCursor",this.$onCursorChange),W.off("changeSelection",this.$onSelectionChange)}this.session=k,k?(this.$onDocumentChange=this.onDocumentChange.bind(this),k.on("change",this.$onDocumentChange),this.renderer.setSession(k),this.$onChangeMode=this.onChangeMode.bind(this),k.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),k.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),k.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),k.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),k.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),k.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=k.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(k)),this._signal("changeSession",{session:k,oldSession:L}),this.curOp=null,L&&L._signal("changeEditor",{oldEditor:this}),L&&(L.$editor=null),k&&k._signal("changeEditor",{editor:this}),k&&(k.$editor=this),k&&!k.destroyed&&k.bgTokenizer.scheduleStart()}},$.prototype.getSession=function(){return this.session},$.prototype.setValue=function(k,L){return this.session.doc.setValue(k),L?L==1?this.navigateFileEnd():L==-1&&this.navigateFileStart():this.selectAll(),k},$.prototype.getValue=function(){return this.session.getValue()},$.prototype.getSelection=function(){return this.selection},$.prototype.resize=function(k){this.renderer.onResize(k)},$.prototype.setTheme=function(k,L){this.renderer.setTheme(k,L)},$.prototype.getTheme=function(){return this.renderer.getTheme()},$.prototype.setStyle=function(k,L){this.renderer.setStyle(k,L)},$.prototype.unsetStyle=function(k){this.renderer.unsetStyle(k)},$.prototype.getFontSize=function(){return this.getOption("fontSize")||w.computedStyle(this.container).fontSize},$.prototype.setFontSize=function(k){this.setOption("fontSize",k)},$.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var k=this;this.$highlightPending=!0,setTimeout(function(){k.$highlightPending=!1;var L=k.session;if(!(!L||L.destroyed)){L.$bracketHighlight&&(L.$bracketHighlight.markerIds.forEach(function(ae){L.removeMarker(ae)}),L.$bracketHighlight=null);var W=k.getCursorPosition(),U=k.getKeyboardHandler(),q=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(k),Z=L.getMatchingBracketRanges(W,q);if(!Z){var Q=new A(L,W.row,W.column),le=Q.getCurrentToken();if(le&&/\b(?:tag-open|tag-name)/.test(le.type)){var ne=L.getMatchingTags(W);ne&&(Z=[ne.openTagName.isEmpty()?ne.openTag:ne.openTagName,ne.closeTagName.isEmpty()?ne.closeTag:ne.closeTagName])}}if(!Z&&L.$mode.getMatching&&(Z=L.$mode.getMatching(k.session)),!Z){k.getHighlightIndentGuides()&&k.renderer.$textLayer.$highlightIndentGuide();return}var ce="ace_bracket";Array.isArray(Z)?Z.length==1&&(ce="ace_error_bracket"):Z=[Z],Z.length==2&&(f.comparePoints(Z[0].end,Z[1].start)==0?Z=[f.fromPoints(Z[0].start,Z[1].end)]:f.comparePoints(Z[0].start,Z[1].end)==0&&(Z=[f.fromPoints(Z[1].start,Z[0].end)])),L.$bracketHighlight={ranges:Z,markerIds:Z.map(function(ae){return L.addMarker(ae,ce,"text")})},k.getHighlightIndentGuides()&&k.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(k){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",k))},$.prototype.onBlur=function(k){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",k))},$.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},$.prototype.onDocumentChange=function(k){var L=this.session.$useWrapMode,W=k.start.row==k.end.row?k.end.row:1/0;this.renderer.updateLines(k.start.row,W,L),this._signal("change",k),this.$cursorChange()},$.prototype.onTokenizerUpdate=function(k){var L=k.data;this.renderer.updateLines(L.first,L.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 k=this.getSession(),L;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(L=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(L=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(L=!1)),k.$highlightLineMarker&&!L)k.removeMarker(k.$highlightLineMarker.id),k.$highlightLineMarker=null;else if(!k.$highlightLineMarker&&L){var W=new f(L.row,L.column,L.row,1/0);W.id=k.addMarker(W,"ace_active-line","screenLine"),k.$highlightLineMarker=W}else L&&(k.$highlightLineMarker.start.row=L.row,k.$highlightLineMarker.end.row=L.row,k.$highlightLineMarker.start.column=L.column,k._signal("changeBackMarker"))},$.prototype.onSelectionChange=function(k){var L=this.session;if(L.$selectionMarker&&L.removeMarker(L.$selectionMarker),L.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var W=this.selection.getRange(),U=this.getSelectionStyle();L.$selectionMarker=L.addMarker(W,"ace_selection",U)}var q=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(q),this._signal("changeSelection")},$.prototype.$getSelectionHighLightRegexp=function(){var k=this.session,L=this.getSelectionRange();if(!(L.isEmpty()||L.isMultiLine())){var W=L.start.column,U=L.end.column,q=k.getLine(L.start.row),Z=q.substring(W,U);if(!(Z.length>5e3||!/[\w\d]/.test(Z))){var Q=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Z}),le=q.substring(W-1,U+1);if(Q.test(le))return Q}}},$.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(k){this.renderer.updateText(),this._emit("changeMode",k)},$.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 k=this.getSelectedText(),L=this.session.doc.getNewLineCharacter(),W=!1;if(!k&&this.$copyWithEmptySelection){W=!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||(k+=this.session.getLine(Z.start.row)+L)}}var Q={text:k};return this._signal("copy",Q),D.lineMode=W?Q.text:!1,Q.text},$.prototype.onCopy=function(){this.commands.exec("copy",this)},$.prototype.onCut=function(){this.commands.exec("cut",this)},$.prototype.onPaste=function(k,L){var W={text:k,event:L};this.commands.exec("paste",this,W)},$.prototype.$handlePaste=function(k){typeof k=="string"&&(k={text:k}),this._signal("paste",k);var L=k.text,W=L===D.lineMode,U=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)W?U.insert({row:this.selection.lead.row,column:0},L):this.insert(L);else if(W)this.selection.rangeList.ranges.forEach(function(ce){U.insert({row:ce.start.row,column:0},L)});else{var q=L.split(/\r\n|\r|\n/),Z=this.selection.rangeList.ranges,Q=q.length==2&&(!q[0]||!q[1]);if(q.length!=Z.length||Q)return this.commands.exec("insertstring",this,L);for(var le=Z.length;le--;){var ne=Z[le];ne.isEmpty()||U.remove(ne),U.insert(ne.start,q[le])}}},$.prototype.execCommand=function(k,L){return this.commands.exec(k,this,L)},$.prototype.insert=function(k,L){var W=this.session,U=W.getMode(),q=this.getCursorPosition();if(this.getBehavioursEnabled()&&!L){var Z=U.transformAction(W.getState(q.row),"insertion",this,W,k);Z&&(k!==Z.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),k=Z.text)}if(k==" "&&(k=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&k.indexOf(`
214
+ `)==-1){var Q=f.fromPoints(q,q);Q.end.column+=k.length,this.session.remove(Q)}}else{var Q=this.getSelectionRange();q=this.session.remove(Q),this.clearSelection()}if(k==`
215
+ `||k==`\r
216
+ `){var ae=W.getLine(q.row);if(q.column>ae.search(/\S|$/)){var le=ae.substr(q.column).search(/\S|$/);W.doc.removeInLine(q.row,q.column,q.column+le)}}this.clearSelection();var ne=q.column,ce=W.getState(q.row),ae=W.getLine(q.row),de=U.checkOutdent(ce,ae,k);if(W.insert(q,k),Z&&Z.selection&&(Z.selection.length==2?this.selection.setSelectionRange(new f(q.row,ne+Z.selection[0],q.row,ne+Z.selection[1])):this.selection.setSelectionRange(new f(q.row+Z.selection[0],Z.selection[1],q.row+Z.selection[2],Z.selection[3]))),this.$enableAutoIndent){if(W.getDocument().isNewLine(k)){var me=U.getNextLineIndent(ce,ae.slice(0,q.column),W.getTabString());W.insert({row:q.row+1,column:0},me)}de&&U.autoOutdent(ce,W,q.row)}},$.prototype.autoIndent=function(){for(var k=this.session,L=k.getMode(),W=this.selection.isEmpty()?[new f(0,0,k.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",q="",Z="",Q=k.getTabString(),le=0;le<W.length;le++)for(var ne=W[le].start.row,ce=W[le].end.row,ae=ne;ae<=ce;ae++){ae>0&&(U=k.getState(ae-1),q=k.getLine(ae-1),Z=L.getNextLineIndent(U,q,Q));var de=k.getLine(ae),me=L.$getIndent(de);if(Z!==me){if(me.length>0){var $e=new f(ae,0,ae,me.length);k.remove($e)}Z.length>0&&k.insert({row:ae,column:0},Z)}L.autoOutdent(U,k,ae)}},$.prototype.onTextInput=function(k,L){if(!L)return this.keyBinding.onTextInput(k);this.startOperation({command:{name:"insertstring"}});var W=this.applyComposition.bind(this,k,L);this.selection.rangeCount?this.forEachSelection(W):W(),this.endOperation()},$.prototype.applyComposition=function(k,L){if(L.extendLeft||L.extendRight){var W=this.selection.getRange();W.start.column-=L.extendLeft,W.end.column+=L.extendRight,W.start.column<0&&(W.start.row--,W.start.column+=this.session.getLine(W.start.row).length+1),this.selection.setRange(W),!k&&!W.isEmpty()&&this.remove()}if((k||!this.selection.isEmpty())&&this.insert(k,!0),L.restoreStart||L.restoreEnd){var W=this.selection.getRange();W.start.column-=L.restoreStart,W.end.column-=L.restoreEnd,this.selection.setRange(W)}},$.prototype.onCommandKey=function(k,L,W){return this.keyBinding.onCommandKey(k,L,W)},$.prototype.setOverwrite=function(k){this.session.setOverwrite(k)},$.prototype.getOverwrite=function(){return this.session.getOverwrite()},$.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},$.prototype.setScrollSpeed=function(k){this.setOption("scrollSpeed",k)},$.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},$.prototype.setDragDelay=function(k){this.setOption("dragDelay",k)},$.prototype.getDragDelay=function(){return this.getOption("dragDelay")},$.prototype.setSelectionStyle=function(k){this.setOption("selectionStyle",k)},$.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},$.prototype.setHighlightActiveLine=function(k){this.setOption("highlightActiveLine",k)},$.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},$.prototype.setHighlightGutterLine=function(k){this.setOption("highlightGutterLine",k)},$.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},$.prototype.setHighlightSelectedWord=function(k){this.setOption("highlightSelectedWord",k)},$.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},$.prototype.setAnimatedScroll=function(k){this.renderer.setAnimatedScroll(k)},$.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},$.prototype.setShowInvisibles=function(k){this.renderer.setShowInvisibles(k)},$.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},$.prototype.setDisplayIndentGuides=function(k){this.renderer.setDisplayIndentGuides(k)},$.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},$.prototype.setHighlightIndentGuides=function(k){this.renderer.setHighlightIndentGuides(k)},$.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},$.prototype.setShowPrintMargin=function(k){this.renderer.setShowPrintMargin(k)},$.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},$.prototype.setPrintMarginColumn=function(k){this.renderer.setPrintMarginColumn(k)},$.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},$.prototype.setReadOnly=function(k){this.setOption("readOnly",k)},$.prototype.getReadOnly=function(){return this.getOption("readOnly")},$.prototype.setBehavioursEnabled=function(k){this.setOption("behavioursEnabled",k)},$.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},$.prototype.setWrapBehavioursEnabled=function(k){this.setOption("wrapBehavioursEnabled",k)},$.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},$.prototype.setShowFoldWidgets=function(k){this.setOption("showFoldWidgets",k)},$.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},$.prototype.setFadeFoldWidgets=function(k){this.setOption("fadeFoldWidgets",k)},$.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},$.prototype.remove=function(k){this.selection.isEmpty()&&(k=="left"?this.selection.selectLeft():this.selection.selectRight());var L=this.getSelectionRange();if(this.getBehavioursEnabled()){var W=this.session,U=W.getState(L.start.row),q=W.getMode().transformAction(U,"deletion",this,W,L);if(L.end.column===0){var Z=W.getTextRange(L);if(Z[Z.length-1]==`
217
+ `){var Q=W.getLine(L.end.row);/^\s+$/.test(Q)&&(L.end.column=Q.length)}}q&&(L=q)}this.session.remove(L),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 k=this.getSelectionRange();k.start.column==k.end.column&&k.start.row==k.end.row&&(k.end.column=0,k.end.row++),this.session.remove(k),this.clearSelection()},$.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var k=this.getCursorPosition();this.insert(`
218
+ `),this.moveCursorToPosition(k)},$.prototype.setGhostText=function(k,L){this.renderer.setGhostText(k,L)},$.prototype.removeGhostText=function(){this.renderer.removeGhostText()},$.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var k=this.getCursorPosition(),L=k.column;if(L!==0){var W=this.session.getLine(k.row),U,q;L<W.length?(U=W.charAt(L)+W.charAt(L-1),q=new f(k.row,L-1,k.row,L+1)):(U=W.charAt(L-1)+W.charAt(L-2),q=new f(k.row,L-2,k.row,L)),this.session.replace(q,U),this.session.selection.moveToPosition(q.end)}}},$.prototype.toLowerCase=function(){var k=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var L=this.getSelectionRange(),W=this.session.getTextRange(L);this.session.replace(L,W.toLowerCase()),this.selection.setSelectionRange(k)},$.prototype.toUpperCase=function(){var k=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var L=this.getSelectionRange(),W=this.session.getTextRange(L);this.session.replace(L,W.toUpperCase()),this.selection.setSelectionRange(k)},$.prototype.indent=function(){var k=this.session,L=this.getSelectionRange();if(L.start.row<L.end.row){var W=this.$getSelectedRows();k.indentRows(W.first,W.last," ");return}else if(L.start.column<L.end.column){var U=k.getTextRange(L);if(!/^\s+$/.test(U)){var W=this.$getSelectedRows();k.indentRows(W.first,W.last," ");return}}var q=k.getLine(L.start.row),Z=L.start,Q=k.getTabSize(),le=k.documentToScreenColumn(Z.row,Z.column);if(this.session.getUseSoftTabs())var ne=Q-le%Q,ce=h.stringRepeat(" ",ne);else{for(var ne=le%Q;q[L.start.column-1]==" "&&ne;)L.start.column--,ne--;this.selection.setSelectionRange(L),ce=" "}return this.insert(ce)},$.prototype.blockIndent=function(){var k=this.$getSelectedRows();this.session.indentRows(k.first,k.last," ")},$.prototype.blockOutdent=function(){var k=this.session.getSelection();this.session.outdentRows(k.getRange())},$.prototype.sortLines=function(){for(var k=this.$getSelectedRows(),L=this.session,W=[],U=k.first;U<=k.last;U++)W.push(L.getLine(U));W.sort(function(Q,le){return Q.toLowerCase()<le.toLowerCase()?-1:Q.toLowerCase()>le.toLowerCase()?1:0});for(var q=new f(0,0,0,0),U=k.first;U<=k.last;U++){var Z=L.getLine(U);q.start.row=U,q.end.row=U,q.end.column=Z.length,L.replace(q,W[U-k.first])}},$.prototype.toggleCommentLines=function(){var k=this.session.getState(this.getCursorPosition().row),L=this.$getSelectedRows();this.session.getMode().toggleCommentLines(k,this.session,L.first,L.last)},$.prototype.toggleBlockComment=function(){var k=this.getCursorPosition(),L=this.session.getState(k.row),W=this.getSelectionRange();this.session.getMode().toggleBlockComment(L,this.session,W,k)},$.prototype.getNumberAt=function(k,L){var W=/[\-]?[0-9]+(?:\.[0-9]+)?/g;W.lastIndex=0;for(var U=this.session.getLine(k);W.lastIndex<L;){var q=W.exec(U);if(q.index<=L&&q.index+q[0].length>=L){var Z={value:q[0],start:q.index,end:q.index+q[0].length};return Z}}return null},$.prototype.modifyNumber=function(k){var L=this.selection.getCursor().row,W=this.selection.getCursor().column,U=new f(L,W-1,L,W),q=this.session.getTextRange(U);if(!isNaN(parseFloat(q))&&isFinite(q)){var Z=this.getNumberAt(L,W);if(Z){var Q=Z.value.indexOf(".")>=0?Z.start+Z.value.indexOf(".")+1:Z.end,le=Z.start+Z.value.length-Q,ne=parseFloat(Z.value);ne*=Math.pow(10,le),Q!==Z.end&&W<Q?k*=Math.pow(10,Z.end-W-1):k*=Math.pow(10,Z.end-W),ne+=k,ne/=Math.pow(10,le);var ce=ne.toFixed(le),ae=new f(L,Z.start,L,Z.end);this.session.replace(ae,ce),this.moveCursorTo(L,Math.max(Z.start+1,W+ce.length-Z.value.length))}}else this.toggleWord()},$.prototype.toggleWord=function(){var k=this.selection.getCursor().row,L=this.selection.getCursor().column;this.selection.selectWord();var W=this.getSelectedText(),U=this.selection.getWordRange().start.column,q=W.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),Z=L-U-1;Z<0&&(Z=0);var Q=0,le=0,ne=this;W.match(/[A-Za-z0-9_]+/)&&q.forEach(function(qe,rt){le=Q+qe.length,Z>=Q&&Z<=le&&(W=qe,ne.selection.clearSelection(),ne.moveCursorTo(k,Q+U),ne.selection.selectTo(k,le+U)),Q=le});for(var ce=this.$toggleWordPairs,ae,de=0;de<ce.length;de++)for(var me=ce[de],$e=0;$e<=1;$e++){var Re=+!$e,Me=W.match(new RegExp("^\\s?_?("+h.escapeRegExp(me[$e])+")\\s?$","i"));if(Me){var Xe=W.match(new RegExp("([_]|^|\\s)("+h.escapeRegExp(Me[1])+")($|\\s)","g"));Xe&&(ae=W.replace(new RegExp(h.escapeRegExp(me[$e]),"i"),function(qe){var rt=me[Re];return qe.toUpperCase()==qe?rt=rt.toUpperCase():qe.charAt(0).toUpperCase()==qe.charAt(0)&&(rt=rt.substr(0,0)+me[Re].charAt(0).toUpperCase()+rt.substr(1)),rt}),this.insert(ae),ae="")}}},$.prototype.findLinkAt=function(k,L){var W,U,q=this.session.getLine(k),Z=q.split(/((?:https?|ftp):\/\/[\S]+)/),Q=L;Q<0&&(Q=0);var le=0,ne=0,ce;try{for(var ae=p(Z),de=ae.next();!de.done;de=ae.next()){var me=de.value;if(ne=le+me.length,Q>=le&&Q<=ne&&me.match(/((?:https?|ftp):\/\/[\S]+)/)){ce=me.replace(/[\s:.,'";}\]]+$/,"");break}le=ne}}catch($e){W={error:$e}}finally{try{de&&!de.done&&(U=ae.return)&&U.call(ae)}finally{if(W)throw W.error}}return ce},$.prototype.openLink=function(){var k=this.selection.getCursor(),L=this.findLinkAt(k.row,k.column);return L&&window.open(L,"_blank"),L!=null},$.prototype.removeLines=function(){var k=this.$getSelectedRows();this.session.removeFullLines(k.first,k.last),this.clearSelection()},$.prototype.duplicateSelection=function(){var k=this.selection,L=this.session,W=k.getRange(),U=k.isBackwards();if(W.isEmpty()){var q=W.start.row;L.duplicateLines(q,q)}else{var Z=U?W.start:W.end,Q=L.insert(Z,L.getTextRange(W));W.start=Z,W.end=Q,k.setSelectionRange(W,U)}},$.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},$.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},$.prototype.moveText=function(k,L,W){return this.session.moveText(k,L,W)},$.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},$.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},$.prototype.$moveLines=function(k,L){var W,U,q=this.selection;if(!q.inMultiSelectMode||this.inVirtualSelectionMode){var Z=q.toOrientedRange();W=this.$getSelectedRows(Z),U=this.session.$moveLines(W.first,W.last,L?0:k),L&&k==-1&&(U=0),Z.moveBy(U,0),q.fromOrientedRange(Z)}else{var Q=q.rangeList.ranges;q.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var le=0,ne=0,ce=Q.length,ae=0;ae<ce;ae++){var de=ae;Q[ae].moveBy(le,0),W=this.$getSelectedRows(Q[ae]);for(var me=W.first,$e=W.last;++ae<ce;){ne&&Q[ae].moveBy(ne,0);var Re=this.$getSelectedRows(Q[ae]);if(L&&Re.first!=$e||!L&&Re.first>$e+1)break;$e=Re.last}for(ae--,le=this.session.$moveLines(me,$e,L?0:k),L&&k==-1&&(de=ae+1);de<=ae;)Q[de].moveBy(le,0),de++;L||(le=0),ne+=le}q.fromOrientedRange(q.ranges[0]),q.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},$.prototype.$getSelectedRows=function(k){return k=(k||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(k.start.row),last:this.session.getRowFoldEnd(k.end.row)}},$.prototype.onCompositionStart=function(k){this.renderer.showComposition(k)},$.prototype.onCompositionUpdate=function(k){this.renderer.setCompositionText(k)},$.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},$.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},$.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},$.prototype.isRowVisible=function(k){return k>=this.getFirstVisibleRow()&&k<=this.getLastVisibleRow()},$.prototype.isRowFullyVisible=function(k){return k>=this.renderer.getFirstFullyVisibleRow()&&k<=this.renderer.getLastFullyVisibleRow()},$.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},$.prototype.$moveByPage=function(k,L){var W=this.renderer,U=this.renderer.layerConfig,q=k*Math.floor(U.height/U.lineHeight);L===!0?this.selection.$moveSelection(function(){this.moveCursorBy(q,0)}):L===!1&&(this.selection.moveCursorBy(q,0),this.selection.clearSelection());var Z=W.scrollTop;W.scrollBy(0,q*U.lineHeight),L!=null&&W.scrollCursorIntoView(null,.5),W.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(k){this.renderer.scrollToRow(k)},$.prototype.scrollToLine=function(k,L,W,U){this.renderer.scrollToLine(k,L,W,U)},$.prototype.centerSelection=function(){var k=this.getSelectionRange(),L={row:Math.floor(k.start.row+(k.end.row-k.start.row)/2),column:Math.floor(k.start.column+(k.end.column-k.start.column)/2)};this.renderer.alignCursor(L,.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(k,L){this.selection.moveCursorTo(k,L)},$.prototype.moveCursorToPosition=function(k){this.selection.moveCursorToPosition(k)},$.prototype.jumpToMatching=function(k,L){var W=this.getCursorPosition(),U=new A(this.session,W.row,W.column),q=U.getCurrentToken(),Z=0;q&&q.type.indexOf("tag-name")!==-1&&(q=U.stepBackward());var Q=q||U.stepForward();if(Q){var le,ne=!1,ce={},ae=W.column-Q.start,de,me={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(Q.value.match(/[{}()\[\]]/g)){for(;ae<Q.value.length&&!ne;ae++)if(me[Q.value[ae]])switch(de=me[Q.value[ae]]+"."+Q.type.replace("rparen","lparen"),isNaN(ce[de])&&(ce[de]=0),Q.value[ae]){case"(":case"[":case"{":ce[de]++;break;case")":case"]":case"}":ce[de]--,ce[de]===-1&&(le="bracket",ne=!0);break}}else Q.type.indexOf("tag-name")!==-1&&(isNaN(ce[Q.value])&&(ce[Q.value]=0),q.value==="<"&&Z>1?ce[Q.value]++:q.value==="</"&&ce[Q.value]--,ce[Q.value]===-1&&(le="tag",ne=!0));ne||(q=Q,Z++,Q=U.stepForward(),ae=0)}while(Q&&!ne);if(le){var $e,Re;if(le==="bracket")$e=this.session.getBracketRange(W),$e||($e=new f(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ae-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ae-1),Re=$e.start,(L||Re.row===W.row&&Math.abs(Re.column-W.column)<2)&&($e=this.session.getBracketRange(Re)));else if(le==="tag"){if(!Q||Q.type.indexOf("tag-name")===-1)return;if($e=new f(U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2,U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2),$e.compare(W.row,W.column)===0){var Me=this.session.getMatchingTags(W);Me&&(Me.openTag.contains(W.row,W.column)?($e=Me.closeTag,Re=$e.start):($e=Me.openTag,Me.closeTag.start.row===W.row&&Me.closeTag.start.column===W.column?Re=$e.end:Re=$e.start))}Re=Re||$e.start}Re=$e&&$e.cursor||Re,Re&&(k?$e&&L?this.selection.setRange($e):$e&&$e.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Re.row,Re.column):this.selection.moveTo(Re.row,Re.column))}}},$.prototype.gotoLine=function(k,L,W){this.selection.clearSelection(),this.session.unfold({row:k-1,column:L||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(k-1,L||0),this.isRowFullyVisible(k-1)||this.scrollToLine(k-1,!0,W)},$.prototype.navigateTo=function(k,L){this.selection.moveTo(k,L)},$.prototype.navigateUp=function(k){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var L=this.selection.anchor.getPosition();return this.moveCursorToPosition(L)}this.selection.clearSelection(),this.selection.moveCursorBy(-k||-1,0)},$.prototype.navigateDown=function(k){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var L=this.selection.anchor.getPosition();return this.moveCursorToPosition(L)}this.selection.clearSelection(),this.selection.moveCursorBy(k||1,0)},$.prototype.navigateLeft=function(k){if(this.selection.isEmpty())for(k=k||1;k--;)this.selection.moveCursorLeft();else{var L=this.getSelectionRange().start;this.moveCursorToPosition(L)}this.clearSelection()},$.prototype.navigateRight=function(k){if(this.selection.isEmpty())for(k=k||1;k--;)this.selection.moveCursorRight();else{var L=this.getSelectionRange().end;this.moveCursorToPosition(L)}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(k,L){L&&this.$search.set(L);var W=this.$search.find(this.session),U=0;return W&&(this.$tryReplace(W,k)&&(U=1),this.selection.setSelectionRange(W),this.renderer.scrollSelectionIntoView(W.start,W.end)),U},$.prototype.replaceAll=function(k,L){L&&this.$search.set(L);var W=this.$search.findAll(this.session),U=0;if(!W.length)return U;var q=this.getSelectionRange();this.selection.moveTo(0,0);for(var Z=W.length-1;Z>=0;--Z)this.$tryReplace(W[Z],k)&&U++;return this.selection.setSelectionRange(q),U},$.prototype.$tryReplace=function(k,L){var W=this.session.getTextRange(k);return L=this.$search.replace(W,L),L!==null?(k.end=this.session.replace(k,L),k):null},$.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},$.prototype.find=function(k,L,W){L||(L={}),typeof k=="string"||k instanceof RegExp?L.needle=k:typeof k=="object"&&g.mixin(L,k);var U=this.selection.getRange();L.needle==null&&(k=this.session.getTextRange(U)||this.$search.$options.needle,k||(U=this.session.getWordRange(U.start.row,U.start.column),k=this.session.getTextRange(U)),this.$search.set({needle:k})),this.$search.set(L),L.start||this.$search.set({start:U});var q=this.$search.find(this.session);if(L.preventScroll)return q;if(q)return this.revealRange(q,W),q;L.backwards?U.start=U.end:U.end=U.start,this.selection.setRange(U)},$.prototype.findNext=function(k,L){this.find({skipCurrent:!0,backwards:!1},k,L)},$.prototype.findPrevious=function(k,L){this.find(k,{skipCurrent:!0,backwards:!0},L)},$.prototype.revealRange=function(k,L){this.session.unfold(k),this.selection.setSelectionRange(k);var W=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(k.start,k.end,.5),L!==!1&&this.renderer.animateScrolling(W)},$.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(k){k.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(k){if(k){var L,W=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}),Q=this.renderer.on("beforeRender",function(){U&&(L=W.renderer.container.getBoundingClientRect())}),le=this.renderer.on("afterRender",function(){if(U&&L&&(W.isFocused()||W.searchBox&&W.searchBox.isFocused())){var ne=W.renderer,ce=ne.$cursorLayer.$pixelPos,ae=ne.layerConfig,de=ce.top-ae.offset;ce.top>=0&&de+L.top<0?U=!0:ce.top<ae.height&&ce.top+L.top+ae.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(q.style.top=de+"px",q.style.left=ce.left+"px",q.style.height=ae.lineHeight+"px",q.scrollIntoView(U)),U=L=null}});this.setAutoScrollEditorIntoView=function(ne){ne||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Z),this.renderer.off("afterRender",le),this.renderer.off("beforeRender",Q))}}},$.prototype.$resetCursorStyle=function(){var k=this.$cursorStyle||"ace",L=this.renderer.$cursorLayer;L&&(L.setSmoothBlinking(/smooth/.test(k)),L.isBlinking=!this.$readOnly&&k!="wide",w.setCssClass(L.element,"ace_slim-cursors",/slim/.test(k)))},$.prototype.prompt=function(k,L,W){var U=this;R.loadModule("ace/ext/prompt",function(q){q.prompt(U,k,L,W)})},Object.defineProperty($.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||(this.$hoverTooltip=new B(this.container))},set:function(k){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=k},enumerable:!1,configurable:!0}),$})();F.$uid=0,F.prototype.curOp=null,F.prototype.prevOp={},F.prototype.$mergeableCommands=["backspace","del","insertstring"],F.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],g.implement(F.prototype,b),R.defineOptions(F.prototype,"editor",{selectionStyle:{set:function($){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:$})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function($){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function($){var k=this;if(this.textInput.setReadOnly($),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(W){var U=!1;if(W&&W.type=="keydown"){if(W&&W.key&&!W.ctrlKey&&!W.metaKey&&(W.key==" "&&W.preventDefault(),U=W.key.length==1),!U)return}else W&&W.type!=="exec"&&(U=!0);if(U){var q=w.createElement("div");q.textContent=O("editor.tooltip.disable-editing","Editing is disabled"),k.hoverTooltip.isOpen||k.hoverTooltip.showForRange(k,k.getSelectionRange(),q)}else k.hoverTooltip&&k.hoverTooltip.isOpen&&k.hoverTooltip.hide()});var L=this.textInput.getElement();$?(T.addListener(L,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(T.removeListener(L,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function($){this.textInput.setCopyWithEmptySelection($)},initialValue:!1},cursorStyle:{set:function($){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function($){this.setAutoScrollEditorIntoView($)}},keyboardHandler:{set:function($){this.setKeyboardHandler($)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function($){this.session.setValue($)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function($){this.setSession($)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function($){this.renderer.$gutterLayer.setShowLineNumbers($),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),$&&this.$relativeLineNumbers?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 k=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(k&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),w.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!k&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),w.addCssClass(this.container,"ace_hasPlaceholder");var L=w.createElement("div");L.className="ace_placeholder",L.textContent=this.$placeholder||"",this.renderer.placeholderNode=L,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!k&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function($){var k={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},L=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()}},W;$?(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",O("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",O("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",L.bind(this)),this.commands.addCommand(k),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",O("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",O("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),W||(W=new C(this)),W.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",L.bind(this)),this.commands.removeCommand(k),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),W&&W.removeListener())},initialValue:!1},textInputAriaLabel:{set:function($){this.$textInputAriaLabel=$},initialValue:""},enableMobileMenu:{set:function($){this.$enableMobileMenu=$},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var N={getText:function($,k){return(Math.abs($.selection.lead.row-k)||k+1+(k<9?"·":""))+""},getWidth:function($,k,L){return Math.max(k.toString().length,(L.lastRow+1).toString().length,2)*L.characterWidth},update:function($,k){k.renderer.$loop.schedule(k.renderer.CHANGE_GUTTER)},attach:function($){$.renderer.$gutterLayer.$renderer=this,$.on("changeSelection",this.update),this.update(null,$)},detach:function($){$.renderer.$gutterLayer.$renderer==this&&($.renderer.$gutterLayer.$renderer=null),$.off("changeSelection",this.update),this.update(null,$)}};r.Editor=F}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,r,m){var p=e("../lib/dom"),g=(function(){function w(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 w.prototype.moveContainer=function(h){p.translate(this.element,0,-(h.firstRowScreen*h.lineHeight%this.canvasHeight)-h.offset*this.$offsetCoefficient)},w.prototype.pageChanged=function(h,d){return Math.floor(h.firstRowScreen*h.lineHeight/this.canvasHeight)!==Math.floor(d.firstRowScreen*d.lineHeight/this.canvasHeight)},w.prototype.computeLineTop=function(h,d,a){var l=d.firstRowScreen*d.lineHeight,c=Math.floor(l/this.canvasHeight),u=a.documentToScreenRow(h,0)*d.lineHeight;return u-c*this.canvasHeight},w.prototype.computeLineHeight=function(h,d,a){return d.lineHeight*a.getRowLineCount(h)},w.prototype.getLength=function(){return this.cells.length},w.prototype.get=function(h){return this.cells[h]},w.prototype.shift=function(){this.$cacheCell(this.cells.shift())},w.prototype.pop=function(){this.$cacheCell(this.cells.pop())},w.prototype.push=function(h){if(Array.isArray(h)){this.cells.push.apply(this.cells,h);for(var d=p.createFragment(this.element),a=0;a<h.length;a++)d.appendChild(h[a].element);this.element.appendChild(d)}else this.cells.push(h),this.element.appendChild(h.element)},w.prototype.unshift=function(h){if(Array.isArray(h)){this.cells.unshift.apply(this.cells,h);for(var d=p.createFragment(this.element),a=0;a<h.length;a++)d.appendChild(h[a].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)},w.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},w.prototype.$cacheCell=function(h){h&&(h.element.remove(),this.cellCache.push(h))},w.prototype.createCell=function(h,d,a,l){var c=this.cellCache.pop();if(!c){var u=p.createElement("div");l&&l(u),this.element.appendChild(u),c={element:u,text:"",row:h}}return c.row=h,c},w})();r.Lines=g}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(e,r,m){var p=e("../lib/dom"),g=e("../lib/oop"),w=e("../lib/lang"),h=e("../lib/event_emitter").EventEmitter,d=e("./lines").Lines,a=e("../config").nls,l=(function(){function u(i){this.$showCursorMarker=null,this.element=p.createElement("div"),this.element.className="ace_layer ace_gutter-layer",i.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new d(this.element),this.$lines.$offsetCoefficient=1}return u.prototype.setSession=function(i){this.session&&this.session.off("change",this.$updateAnnotations),this.session=i,i&&i.on("change",this.$updateAnnotations)},u.prototype.addGutterDecoration=function(i,s){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(i,s)},u.prototype.removeGutterDecoration=function(i,s){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(i,s)},u.prototype.setAnnotations=function(i){this.$annotations=[];for(var s=0;s<i.length;s++){var f=i[s],b=f.row,x=this.$annotations[b];x||(x=this.$annotations[b]={text:[],type:[],displayText:[]});var I=f.text,R=f.text,A=f.type;I=I?w.escapeHTML(I):f.html||"",R=R||f.html||"",x.text.indexOf(I)===-1&&(x.text.push(I),x.type.push(A),x.displayText.push(R));var C=f.className;C?x.className=C:A==="error"?x.className=" ace_error":A==="security"&&!/\bace_error\b/.test(x.className)?x.className=" ace_security":A==="warning"&&!/\bace_(error|security)\b/.test(x.className)?x.className=" ace_warning":A==="info"&&!x.className?x.className=" ace_info":A==="hint"&&!x.className&&(x.className=" ace_hint")}},u.prototype.$updateAnnotations=function(i){if(this.$annotations.length){var s=i.start.row,f=i.end.row-s;if(f!==0)if(i.action=="remove")this.$annotations.splice(s,f+1,null);else{var b=new Array(f+1);b.unshift(s,1),this.$annotations.splice.apply(this.$annotations,b)}}},u.prototype.update=function(i){this.config=i;var s=this.session,f=i.firstRow,b=Math.min(i.lastRow+i.gutterOffset,s.getLength()-1);this.oldLastRow=b,this.config=i,this.$lines.moveContainer(i),this.$updateCursorRow();for(var x=s.getNextFoldLine(f),I=x?x.start.row:1/0,R=null,A=-1,C=f;;){if(C>I&&(C=x.end.row+1,x=s.getNextFoldLine(C,x),I=x?x.start.row:1/0),C>b){for(;this.$lines.getLength()>A+1;)this.$lines.pop();break}R=this.$lines.get(++A),R?R.row=C:(R=this.$lines.createCell(C,i,this.session,c),this.$lines.push(R)),this.$renderCell(R,i,x,C),C++}this._signal("afterRender"),this.$updateGutterWidth(i),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},u.prototype.$updateGutterWidth=function(i){var s=this.session,f=s.gutterRenderer||this.$renderer,b=s.$firstLineNumber,x=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||s.$useWrapMode)&&(x=s.getLength()+b-1);var I=f?f.getWidth(s,x,i):x.toString().length*i.characterWidth,R=this.$padding||this.$computePadding();I+=R.left+R.right,I!==this.gutterWidth&&!isNaN(I)&&(this.gutterWidth=I,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",I))},u.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var i=this.session.selection.getCursor();this.$cursorRow!==i.row&&(this.$cursorRow=i.row)}},u.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var i=this.session.selection.cursor.row;if(this.$cursorRow=i,!(this.$cursorCell&&this.$cursorCell.row==i)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var s=this.$lines.cells;this.$cursorCell=null;for(var f=0;f<s.length;f++){var b=s[f];if(b.row>=this.$cursorRow){if(b.row>this.$cursorRow){var x=this.session.getFoldLine(this.$cursorRow);if(f>0&&x&&x.start.row==s[f-1].row)b=s[f-1];else break}b.element.className="ace_gutter-active-line "+b.element.className,this.$cursorCell=b;break}}}}},u.prototype.$updateCursorMarker=function(){if(this.session){var i=this.session;this.$highlightElement||(this.$highlightElement=p.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var s=i.selection.cursor,f=this.config,b=this.$lines,x=f.firstRowScreen*f.lineHeight,I=Math.floor(x/b.canvasHeight),R=i.documentToScreenRow(s)*f.lineHeight,A=R-I*b.canvasHeight;p.setStyle(this.$highlightElement.style,"height",f.lineHeight+"px"),p.setStyle(this.$highlightElement.style,"top",A+"px")}},u.prototype.scrollLines=function(i){var s=this.config;if(this.config=i,this.$updateCursorRow(),this.$lines.pageChanged(s,i))return this.update(i);this.$lines.moveContainer(i);var f=Math.min(i.lastRow+i.gutterOffset,this.session.getLength()-1),b=this.oldLastRow;if(this.oldLastRow=f,!s||b<i.firstRow)return this.update(i);if(f<s.firstRow)return this.update(i);if(s.firstRow<i.firstRow)for(var x=this.session.getFoldedRowCount(s.firstRow,i.firstRow-1);x>0;x--)this.$lines.shift();if(b>f)for(var x=this.session.getFoldedRowCount(f+1,b);x>0;x--)this.$lines.pop();i.firstRow<s.firstRow&&this.$lines.unshift(this.$renderLines(i,i.firstRow,s.firstRow-1)),f>b&&this.$lines.push(this.$renderLines(i,b+1,f)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(i)},u.prototype.$renderLines=function(i,s,f){for(var b=[],x=s,I=this.session.getNextFoldLine(x),R=I?I.start.row:1/0;x>R&&(x=I.end.row+1,I=this.session.getNextFoldLine(x,I),R=I?I.start.row:1/0),!(x>f);){var A=this.$lines.createCell(x,i,this.session,c);this.$renderCell(A,i,I,x),b.push(A),x++}return b},u.prototype.$renderCell=function(i,s,f,b){var x=i.element,I=this.session,R=x.childNodes[0],A=x.childNodes[1],C=x.childNodes[2],O=x.childNodes[3],D=C.firstChild,E=I.$firstLineNumber,T=I.$breakpoints,B=I.$decorations,F=I.gutterRenderer||this.$renderer,N=this.$showFoldWidgets&&I.foldWidgets,$=f?f.start.row:Number.MAX_VALUE,k=s.lineHeight+"px",L=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",W=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",U=(F?F.getText(I,b):b+E).toString();if(this.$highlightGutterLine&&(b==this.$cursorRow||f&&b<this.$cursorRow&&b>=$&&this.$cursorRow<=f.end.row)&&(L+="ace_gutter-active-line ",this.$cursorCell!=i&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=i)),T[b]&&(L+=T[b]),B[b]&&(L+=B[b]),this.$annotations[b]&&b!==$&&(L+=this.$annotations[b].className),N){var q=N[b];q==null&&(q=N[b]=I.getFoldWidget(b))}if(q){var Z="ace_fold-widget ace_"+q,Q=q=="start"&&b==$&&b<f.end.row;if(Q){Z+=" ace_closed";for(var le="",ne=!1,ce=b+1;ce<=f.end.row;ce++)if(this.$annotations[ce]){if(this.$annotations[ce].className===" ace_error"){ne=!0,le=" ace_error_fold";break}this.$annotations[ce].className===" ace_security"?(ne=!0,le=" ace_security_fold"):this.$annotations[ce].className===" ace_warning"&&le!==" ace_security_fold"&&(ne=!0,le=" ace_warning_fold")}L+=le}else Z+=" ace_open";A.className!=Z&&(A.className=Z),p.setStyle(A.style,"height",k),p.setStyle(A.style,"display","inline-block"),A.setAttribute("role","button"),A.setAttribute("tabindex","-1");var ae=I.getFoldWidgetRange(b);ae?A.setAttribute("aria-label",a("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[ae.start.row+1,ae.end.row+1])):f?A.setAttribute("aria-label",a("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[f.start.row+1,f.end.row+1])):A.setAttribute("aria-label",a("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[b+1])),Q?(A.setAttribute("aria-expanded","false"),A.setAttribute("title",a("gutter.code-folding.closed.title","Unfold code"))):(A.setAttribute("aria-expanded","true"),A.setAttribute("title",a("gutter.code-folding.open.title","Fold code")))}else A&&(p.setStyle(A.style,"display","none"),A.setAttribute("tabindex","0"),A.removeAttribute("role"),A.removeAttribute("aria-label"));var de=this.session.$gutterCustomWidgets[b];if(de?this.$addCustomWidget(b,de,i):O&&this.$removeCustomWidget(b,i),ne&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",D.className=W,D.className+=le,p.setStyle(D.style,"height",k),p.setStyle(C.style,"display","block"),p.setStyle(C.style,"height",k);var me;switch(le){case" ace_error_fold":me=a("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security_fold":me=a("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning_fold":me=a("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break}C.setAttribute("aria-label",me),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else if(this.$annotations[b]){C.className="ace_gutter_annotation",D.className=W,this.$useSvgGutterIcons?D.className+=this.$annotations[b].className:x.classList.add(this.$annotations[b].className.replace(" ","")),p.setStyle(D.style,"height",k),p.setStyle(C.style,"display","block"),p.setStyle(C.style,"height",k);var me;switch(this.$annotations[b].className){case" ace_error":me=a("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security":me=a("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning":me=a("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break;case" ace_info":me=a("gutter.annotation.aria-label.info","Info, read annotations row $0",[U]);break;case" ace_hint":me=a("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[U]);break}C.setAttribute("aria-label",me),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else p.setStyle(C.style,"display","none"),C.removeAttribute("aria-label"),C.removeAttribute("role"),C.setAttribute("tabindex","0");return U!==R.data&&(R.data=U),x.className!=L&&(x.className=L),p.setStyle(i.element.style,"height",this.$lines.computeLineHeight(b,s,I)+"px"),p.setStyle(i.element.style,"top",this.$lines.computeLineTop(b,s,I)+"px"),i.text=U,C.style.display==="none"&&A.style.display==="none"&&!de?i.element.setAttribute("aria-hidden",!0):i.element.setAttribute("aria-hidden",!1),i},u.prototype.setHighlightGutterLine=function(i){this.$highlightGutterLine=i,!i&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},u.prototype.setShowLineNumbers=function(i){this.$renderer=!i&&{getWidth:function(){return 0},getText:function(){return""}}},u.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},u.prototype.setShowFoldWidgets=function(i){i?p.addCssClass(this.element,"ace_folding-enabled"):p.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=i,this.$padding=null},u.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},u.prototype.$hideFoldWidget=function(i,s){var f=s||this.$getGutterCell(i);if(f&&f.element){var b=f.element.childNodes[1];b&&p.setStyle(b.style,"display","none")}},u.prototype.$showFoldWidget=function(i,s){var f=s||this.$getGutterCell(i);if(f&&f.element){var b=f.element.childNodes[1];b&&this.session.foldWidgets&&this.session.foldWidgets[f.row]&&p.setStyle(b.style,"display","inline-block")}},u.prototype.$getGutterCell=function(i){var s=this.$lines.cells,f=0,b=s.length-1;if(!(i<s[0].row||i>s[b].row)){for(;f<=b;){var x=Math.floor((f+b)/2),I=s[x];if(I.row>i)b=x-1;else if(I.row<i)f=x+1;else return I}return I}},u.prototype.$addCustomWidget=function(i,s,f){var b=s.className,x=s.label,I=s.title,R=s.callbacks;this.session.$gutterCustomWidgets[i]={className:b,label:x,title:I,callbacks:R},this.$hideFoldWidget(i,f);var A=f||this.$getGutterCell(i);if(A&&A.element){var C=A.element.querySelector(".ace_custom-widget");C&&C.remove(),C=p.createElement("span"),C.className="ace_custom-widget ".concat(b),C.setAttribute("tabindex","-1"),C.setAttribute("role","button"),C.setAttribute("aria-label",x),C.setAttribute("title",I),p.setStyle(C.style,"display","inline-block"),p.setStyle(C.style,"height","inherit"),R&&R.onClick&&C.addEventListener("click",function(O){R.onClick(O,i),O.stopPropagation()}),A.element.appendChild(C)}},u.prototype.$removeCustomWidget=function(i,s){delete this.session.$gutterCustomWidgets[i],this.$showFoldWidget(i,s);var f=s||this.$getGutterCell(i);if(f&&f.element){var b=f.element.querySelector(".ace_custom-widget");b&&f.element.removeChild(b)}},u.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var i=p.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(i.borderLeftWidth)||0)+(parseInt(i.paddingLeft)||0)+1,this.$padding.right=(parseInt(i.borderRightWidth)||0)+(parseInt(i.paddingRight)||0),this.$padding},u.prototype.getRegion=function(i){var s=this.$padding||this.$computePadding(),f=this.element.getBoundingClientRect();if(i.x<s.left+f.left)return"markers";if(this.$showFoldWidgets&&i.x>f.right-s.right)return"foldWidgets"},u})();l.prototype.$fixedWidth=!1,l.prototype.$highlightGutterLine=!0,l.prototype.$renderer=void 0,l.prototype.$showLineNumbers=!0,l.prototype.$showFoldWidgets=!0,g.implement(l.prototype,h);function c(u){var i=document.createTextNode("");u.appendChild(i);var s=p.createElement("span");u.appendChild(s);var f=p.createElement("span");u.appendChild(f);var b=p.createElement("span");return f.appendChild(b),u}r.Gutter=l}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,r,m){var p=e("../range").Range,g=e("../lib/dom"),w=(function(){function d(a){this.element=g.createElement("div"),this.element.className="ace_layer ace_marker-layer",a.appendChild(this.element)}return d.prototype.setPadding=function(a){this.$padding=a},d.prototype.setSession=function(a){this.session=a},d.prototype.setMarkers=function(a){this.markers=a},d.prototype.elt=function(a,l){var c=this.i!=-1&&this.element.childNodes[this.i];c?this.i++:(c=document.createElement("div"),this.element.appendChild(c),this.i=-1),c.style.cssText=l,c.className=a},d.prototype.update=function(a){if(a){this.config=a,this.i=0;var l;for(var c in this.markers){var u=this.markers[c];if(!u.range){u.update(l,this,this.session,a);continue}var i=u.range.clipRows(a.firstRow,a.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),u.renderer){var s=this.$getTop(i.start.row,a),f=this.$padding+i.start.column*a.characterWidth;u.renderer(l,i,f,s,a)}else u.type=="fullLine"?this.drawFullLineMarker(l,i,u.clazz,a):u.type=="screenLine"?this.drawScreenLineMarker(l,i,u.clazz,a):i.isMultiLine()?u.type=="text"?this.drawTextMarker(l,i,u.clazz,a):this.drawMultiLineMarker(l,i,u.clazz,a):this.drawSingleLineMarker(l,i,u.clazz+" ace_start ace_br15",a)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},d.prototype.$getTop=function(a,l){return(a-l.firstRowScreen)*l.lineHeight},d.prototype.drawTextMarker=function(a,l,c,u,i){for(var s=this.session,f=l.start.row,b=l.end.row,x=f,I=0,R=0,A=s.getScreenLastRowColumn(x),C=new p(x,l.start.column,x,R);x<=b;x++)C.start.row=C.end.row=x,C.start.column=x==f?l.start.column:s.getRowWrapIndent(x),C.end.column=A,I=R,R=A,A=x+1<b?s.getScreenLastRowColumn(x+1):x==b?0:l.end.column,this.drawSingleLineMarker(a,C,c+(x==f?" ace_start":"")+" ace_br"+h(x==f||x==f+1&&l.start.column,I<R,R>A,x==b),u,x==b?0:1,i)},d.prototype.drawMultiLineMarker=function(a,l,c,u,i){var s=this.$padding,f=u.lineHeight,b=this.$getTop(l.start.row,u),x=s+l.start.column*u.characterWidth;if(i=i||"",this.session.$bidiHandler.isBidiRow(l.start.row)){var I=l.clone();I.end.row=I.start.row,I.end.column=this.session.getLine(I.start.row).length,this.drawBidiSingleLineMarker(a,I,c+" ace_br1 ace_start",u,null,i)}else this.elt(c+" ace_br1 ace_start","height:"+f+"px;right:"+s+"px;top:"+b+"px;left:"+x+"px;"+(i||""));if(this.session.$bidiHandler.isBidiRow(l.end.row)){var I=l.clone();I.start.row=I.end.row,I.start.column=0,this.drawBidiSingleLineMarker(a,I,c+" ace_br12",u,null,i)}else{b=this.$getTop(l.end.row,u);var R=l.end.column*u.characterWidth;this.elt(c+" ace_br12","height:"+f+"px;width:"+R+"px;top:"+b+"px;left:"+s+"px;"+(i||""))}if(f=(l.end.row-l.start.row-1)*u.lineHeight,!(f<=0)){b=this.$getTop(l.start.row+1,u);var A=(l.start.column?1:0)|(l.end.column?0:8);this.elt(c+(A?" ace_br"+A:""),"height:"+f+"px;right:"+s+"px;top:"+b+"px;left:"+s+"px;"+(i||""))}},d.prototype.drawSingleLineMarker=function(a,l,c,u,i,s){if(this.session.$bidiHandler.isBidiRow(l.start.row))return this.drawBidiSingleLineMarker(a,l,c,u,i,s);var f=u.lineHeight,b=(l.end.column+(i||0)-l.start.column)*u.characterWidth,x=this.$getTop(l.start.row,u),I=this.$padding+l.start.column*u.characterWidth;this.elt(c,"height:"+f+"px;width:"+b+"px;top:"+x+"px;left:"+I+"px;"+(s||""))},d.prototype.drawBidiSingleLineMarker=function(a,l,c,u,i,s){var f=u.lineHeight,b=this.$getTop(l.start.row,u),x=this.$padding,I=this.session.$bidiHandler.getSelections(l.start.column,l.end.column);I.forEach(function(R){this.elt(c,"height:"+f+"px;width:"+(R.width+(i||0))+"px;top:"+b+"px;left:"+(x+R.left)+"px;"+(s||""))},this)},d.prototype.drawFullLineMarker=function(a,l,c,u,i){var s=this.$getTop(l.start.row,u),f=u.lineHeight;l.start.row!=l.end.row&&(f+=this.$getTop(l.end.row,u)-s),this.elt(c,"height:"+f+"px;top:"+s+"px;left:0;right:0;"+(i||""))},d.prototype.drawScreenLineMarker=function(a,l,c,u,i){var s=this.$getTop(l.start.row,u),f=u.lineHeight;this.elt(c,"height:"+f+"px;top:"+s+"px;left:0;right:0;"+(i||""))},d})();w.prototype.$padding=0;function h(d,a,l,c){return(d?1:0)|(a?2:0)|(l?4:0)|(c?8:0)}r.Marker=w}),ace.define("ace/layer/text_util",["require","exports","module"],function(e,r,m){var p=new Set(["text","rparen","lparen"]);r.isTextToken=function(g){return p.has(g)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(e,r,m){var p=e("../lib/oop"),g=e("../lib/dom"),w=e("../lib/lang"),h=e("./lines").Lines,d=e("../lib/event_emitter").EventEmitter,a=e("../config").nls,l=e("./text_util").isTextToken,c=(function(){function u(i){this.dom=g,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",i.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new h(this.element)}return u.prototype.$updateEolChar=function(){var i=this.session.doc,s=i.getNewLineCharacter()==`
219
+ `&&i.getNewLineMode()!="windows",f=s?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=f)return this.EOL_CHAR=f,!0},u.prototype.setPadding=function(i){this.$padding=i,this.element.style.margin="0 "+i+"px"},u.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},u.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},u.prototype.$setFontMetrics=function(i){this.$fontMetrics=i,this.$fontMetrics.on("changeCharacterSize",(function(s){this._signal("changeCharacterSize",s)}).bind(this)),this.$pollSizeChanges()},u.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},u.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},u.prototype.setSession=function(i){this.session=i,i&&this.$computeTabString()},u.prototype.setShowInvisibles=function(i){return this.showInvisibles==i?!1:(this.showInvisibles=i,typeof i=="string"?(this.showSpaces=/tab/i.test(i),this.showTabs=/space/i.test(i),this.showEOL=/eol/i.test(i)):this.showSpaces=this.showTabs=this.showEOL=i,this.$computeTabString(),!0)},u.prototype.setDisplayIndentGuides=function(i){return this.displayIndentGuides==i?!1:(this.displayIndentGuides=i,this.$computeTabString(),!0)},u.prototype.setHighlightIndentGuides=function(i){return this.$highlightIndentGuides===i?!1:(this.$highlightIndentGuides=i,i)},u.prototype.$computeTabString=function(){var i=this.session.getTabSize();this.tabSize=i;for(var s=this.$tabStrings=[0],f=1;f<i+1;f++)if(this.showTabs){var b=this.dom.createElement("span");b.className="ace_invisible ace_invisible_tab",b.textContent=w.stringRepeat(this.TAB_CHAR,f),s.push(b)}else s.push(this.dom.createTextNode(w.stringRepeat(" ",f),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var x="ace_indent-guide",I=this.showSpaces?" ace_invisible ace_invisible_space":"",R=this.showSpaces?w.stringRepeat(this.SPACE_CHAR,this.tabSize):w.stringRepeat(" ",this.tabSize),A=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?w.stringRepeat(this.TAB_CHAR,this.tabSize):R,b=this.dom.createElement("span");b.className=x+I,b.textContent=R,this.$tabStrings[" "]=b;var b=this.dom.createElement("span");b.className=x+A,b.textContent=C,this.$tabStrings[" "]=b}},u.prototype.updateLines=function(i,s,f){if(this.config.lastRow!=i.lastRow||this.config.firstRow!=i.firstRow)return this.update(i);this.config=i;for(var b=Math.max(s,i.firstRow),x=Math.min(f,i.lastRow),I=this.element.childNodes,R=0,A=i.firstRow;A<b;A++){var C=this.session.getFoldLine(A);if(C)if(C.containsRow(b)){b=C.start.row;break}else A=C.end.row;R++}for(var O=!1,A=b,C=this.session.getNextFoldLine(A),D=C?C.start.row:1/0;A>D&&(A=C.end.row+1,C=this.session.getNextFoldLine(A,C),D=C?C.start.row:1/0),!(A>x);){var E=I[R++];if(E){this.dom.removeChildren(E),this.$renderLine(E,A,A==D?C:!1),O&&(E.style.top=this.$lines.computeLineTop(A,i,this.session)+"px");var T=i.lineHeight*this.session.getRowLength(A)+"px";E.style.height!=T&&(O=!0,E.style.height=T)}A++}if(O)for(;R<this.$lines.cells.length;){var B=this.$lines.cells[R++];B.element.style.top=this.$lines.computeLineTop(B.row,i,this.session)+"px"}},u.prototype.scrollLines=function(i){var s=this.config;if(this.config=i,this.$lines.pageChanged(s,i))return this.update(i);this.$lines.moveContainer(i);var f=i.lastRow,b=s?s.lastRow:-1;if(!s||b<i.firstRow)return this.update(i);if(f<s.firstRow)return this.update(i);if(!s||s.lastRow<i.firstRow)return this.update(i);if(i.lastRow<s.firstRow)return this.update(i);if(s.firstRow<i.firstRow)for(var x=this.session.getFoldedRowCount(s.firstRow,i.firstRow-1);x>0;x--)this.$lines.shift();if(s.lastRow>i.lastRow)for(var x=this.session.getFoldedRowCount(i.lastRow+1,s.lastRow);x>0;x--)this.$lines.pop();i.firstRow<s.firstRow&&this.$lines.unshift(this.$renderLinesFragment(i,i.firstRow,s.firstRow-1)),i.lastRow>s.lastRow&&this.$lines.push(this.$renderLinesFragment(i,s.lastRow+1,i.lastRow)),this.$highlightIndentGuide()},u.prototype.$renderLinesFragment=function(i,s,f){for(var b=[],x=s,I=this.session.getNextFoldLine(x),R=I?I.start.row:1/0;x>R&&(x=I.end.row+1,I=this.session.getNextFoldLine(x,I),R=I?I.start.row:1/0),!(x>f);){var A=this.$lines.createCell(x,i,this.session),C=A.element;this.dom.removeChildren(C),g.setStyle(C.style,"height",this.$lines.computeLineHeight(x,i,this.session)+"px"),g.setStyle(C.style,"top",this.$lines.computeLineTop(x,i,this.session)+"px"),this.$renderLine(C,x,x==R?I:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",b.push(A),x++}return b},u.prototype.update=function(i){this.$lines.moveContainer(i),this.config=i;for(var s=i.firstRow,f=i.lastRow,b=this.$lines;b.getLength();)b.pop();b.push(this.$renderLinesFragment(i,s,f))},u.prototype.$renderToken=function(i,s,f,b){for(var x=this,I=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,R=this.dom.createFragment(this.element),A,C=0;A=I.exec(b);){var O=A[1],D=A[2],E=A[3],T=A[4],B=A[5];if(!(!x.showSpaces&&D)){var F=C!=A.index?b.slice(C,A.index):"";if(C=A.index+A[0].length,F&&R.appendChild(this.dom.createTextNode(F,this.element)),O){var N=x.session.getScreenTabSize(s+A.index),$=x.$tabStrings[N].cloneNode(!0);$.charCount=1,R.appendChild($),s+=N-1}else if(D)if(x.showSpaces){var k=this.dom.createElement("span");k.className="ace_invisible ace_invisible_space",k.textContent=w.stringRepeat(x.SPACE_CHAR,D.length),R.appendChild(k)}else R.appendChild(this.dom.createTextNode(D,this.element));else if(E){var k=this.dom.createElement("span");k.className="ace_invisible ace_invisible_space ace_invalid",k.textContent=w.stringRepeat(x.SPACE_CHAR,E.length),R.appendChild(k)}else if(T){s+=1;var k=this.dom.createElement("span");k.style.width=x.config.characterWidth*2+"px",k.className=x.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",k.textContent=x.showSpaces?x.SPACE_CHAR:T,R.appendChild(k)}else if(B){s+=1;var k=this.dom.createElement("span");k.style.width=x.config.characterWidth*2+"px",k.className="ace_cjk",k.textContent=B,R.appendChild(k)}}}if(R.appendChild(this.dom.createTextNode(C?b.slice(C):b,this.element)),l(f.type))i.appendChild(R);else{var L="ace_"+f.type.replace(/\./g," ace_"),k=this.dom.createElement("span");f.type=="fold"&&(k.style.width=f.value.length*this.config.characterWidth+"px",k.setAttribute("title",a("inline-fold.closed.title","Unfold code"))),k.className=L,k.appendChild(R),i.appendChild(k)}return s+b.length},u.prototype.renderIndentGuide=function(i,s,f){var b=s.search(this.$indentGuideRe);if(b<=0||b>=f)return s;if(s[0]==" "){b-=b%this.tabSize;for(var x=b/this.tabSize,I=0;I<x;I++)i.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),s.substr(b)}else if(s[0]==" "){for(var I=0;I<b;I++)i.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),s.substr(b)}return this.$highlightIndentGuide(),s},u.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var i=this.session.doc.$lines;if(i){var s=this.session.selection.getCursor(),f=/^\s*/.exec(this.session.doc.getLine(s.row))[0].length,b=Math.floor(f/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:b,start:s.row};var x=this.session.$bracketHighlight;if(x){for(var I=this.session.$bracketHighlight.ranges,R=0;R<I.length;R++)if(s.row!==I[R].start.row){this.$highlightIndentGuideMarker.end=I[R].start.row+1,s.row>I[R].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&i[s.row]!==""&&s.column===i[s.row].length){this.$highlightIndentGuideMarker.dir=1;for(var R=s.row+1;R<i.length;R++){var A=i[R],C=/^\s*/.exec(A)[0].length;if(A!==""&&(this.$highlightIndentGuideMarker.end=R,C<=f))break}}this.$renderHighlightIndentGuide()}}},u.prototype.$clearActiveIndentGuide=function(){for(var i=this.element.querySelectorAll(".ace_indent-guide-active"),s=0;s<i.length;s++)i[s].classList.remove("ace_indent-guide-active")},u.prototype.$setIndentGuideActive=function(i,s){var f=this.session.doc.getLine(i.row);if(f!==""){var b=i.element;if(i.element.classList&&i.element.classList.contains("ace_line_group"))if(i.element.childNodes.length>0)b=i.element.childNodes[0];else return;var x=b.childNodes;if(x){var I=x[s-1];I&&I.classList&&I.classList.contains("ace_indent-guide")&&I.classList.add("ace_indent-guide-active")}}},u.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var i=this.$lines.cells;this.$clearActiveIndentGuide();var s=this.$highlightIndentGuideMarker.indentLevel;if(s!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var f=0;f<i.length;f++){var b=i[f];if(this.$highlightIndentGuideMarker.end&&b.row>=this.$highlightIndentGuideMarker.start+1){if(b.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(b,s)}}else for(var f=i.length-1;f>=0;f--){var b=i[f];if(this.$highlightIndentGuideMarker.end&&b.row<this.$highlightIndentGuideMarker.start){if(b.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(b,s)}}}},u.prototype.$createLineElement=function(i){var s=this.dom.createElement("div");return s.className="ace_line",s.style.height=this.config.lineHeight+"px",s},u.prototype.$renderWrappedLine=function(i,s,f){var b=0,x=0,I=f[0],R=0,A=this.$createLineElement();i.appendChild(A);for(var C=0;C<s.length;C++){var O=s[C],D=O.value;if(C==0&&this.displayIndentGuides){if(b=D.length,D=this.renderIndentGuide(A,D,I),!D)continue;b-=D.length}if(b+D.length<I)R=this.$renderToken(A,R,O,D),b+=D.length;else{for(;b+D.length>=I;){R=this.$renderToken(A,R,O,D.substring(0,I-b)),D=D.substring(I-b),b=I,A=this.$createLineElement(),i.appendChild(A);var E=this.dom.createTextNode(w.stringRepeat(" ",f.indent),this.element);E.charCount=0,A.appendChild(E),x++,R=0,I=f[x]||Number.MAX_VALUE}D.length!=0&&(b+=D.length,R=this.$renderToken(A,R,O,D))}}f[f.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(A,R,null,"",!0)},u.prototype.$renderSimpleLine=function(i,s){for(var f=0,b=0;b<s.length;b++){var x=s[b],I=x.value;if(!(b==0&&this.displayIndentGuides&&(I=this.renderIndentGuide(i,I),!I))){if(f+I.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(i,f,x,I);f=this.$renderToken(i,f,x,I)}}},u.prototype.$renderOverflowMessage=function(i,s,f,b,x){f&&this.$renderToken(i,s,f,b.slice(0,this.MAX_LINE_LENGTH-s));var I=this.dom.createElement("span");I.className="ace_inline_button ace_keyword ace_toggle_wrap",I.textContent=x?"<hide>":"<click to see more...>",i.appendChild(I)},u.prototype.$renderLine=function(i,s,f){if(!f&&f!=!1&&(f=this.session.getFoldLine(s)),f)var b=this.$getFoldLineTokens(s,f);else var b=this.session.getTokens(s);var x=i;if(b.length){var I=this.session.getRowSplitData(s);if(I&&I.length){this.$renderWrappedLine(i,b,I);var x=i.lastChild}else{var x=i;this.$useLineGroups()&&(x=this.$createLineElement(),i.appendChild(x)),this.$renderSimpleLine(x,b)}}else this.$useLineGroups()&&(x=this.$createLineElement(),i.appendChild(x));if(this.showEOL&&x){f&&(s=f.end.row);var R=this.dom.createElement("span");R.className="ace_invisible ace_invisible_eol",R.textContent=s==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,x.appendChild(R)}},u.prototype.$getFoldLineTokens=function(i,s){var f=this.session,b=[];function x(R,A,C){for(var O=0,D=0;D+R[O].value.length<A;)if(D+=R[O].value.length,O++,O==R.length)return;if(D!=A){var E=R[O].value.substring(A-D);E.length>C-A&&(E=E.substring(0,C-A)),b.push({type:R[O].type,value:E}),D=A+E.length,O+=1}for(;D<C&&O<R.length;){var E=R[O].value;E.length+D>C?b.push({type:R[O].type,value:E.substring(0,C-D)}):b.push(R[O]),D+=E.length,O+=1}}var I=f.getTokens(i);return s.walk(function(R,A,C,O,D){R!=null?b.push({type:"fold",value:R}):(D&&(I=f.getTokens(A)),I.length&&x(I,O,C))},s.end.row,this.session.getLine(s.end.row).length),b},u.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},u})();c.prototype.EOF_CHAR="¶",c.prototype.EOL_CHAR_LF="¬",c.prototype.EOL_CHAR_CRLF="¤",c.prototype.EOL_CHAR=c.prototype.EOL_CHAR_LF,c.prototype.TAB_CHAR="—",c.prototype.SPACE_CHAR="·",c.prototype.$padding=0,c.prototype.MAX_LINE_LENGTH=1e4,c.prototype.showInvisibles=!1,c.prototype.showSpaces=!1,c.prototype.showTabs=!1,c.prototype.showEOL=!1,c.prototype.displayIndentGuides=!0,c.prototype.$highlightIndentGuides=!0,c.prototype.$tabStrings=[],c.prototype.destroy={},c.prototype.onChangeTabSize=c.prototype.$computeTabString,p.implement(c.prototype,d),r.Text=c}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,r,m){var p=e("../lib/dom"),g=(function(){function w(h){this.element=p.createElement("div"),this.element.className="ace_layer ace_cursor-layer",h.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),p.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return w.prototype.$updateOpacity=function(h){for(var d=this.cursors,a=d.length;a--;)p.setStyle(d[a].style,"opacity",h?"":"0")},w.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&&p.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},w.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,p.removeCssClass(this.element,"ace_animate-blinking")},w.prototype.setPadding=function(h){this.$padding=h},w.prototype.setSession=function(h){this.session=h},w.prototype.setBlinking=function(h){h!=this.isBlinking&&(this.isBlinking=h,this.restartTimer())},w.prototype.setBlinkInterval=function(h){h!=this.blinkInterval&&(this.blinkInterval=h,this.restartTimer())},w.prototype.setSmoothBlinking=function(h){h!=this.smoothBlinking&&(this.smoothBlinking=h,p.setCssClass(this.element,"ace_smooth-blinking",h),this.$updateCursors(!0),this.restartTimer())},w.prototype.addCursor=function(){var h=p.createElement("div");return h.className="ace_cursor",this.element.appendChild(h),this.cursors.push(h),h},w.prototype.removeCursor=function(){if(this.cursors.length>1){var h=this.cursors.pop();return h.parentNode.removeChild(h),h}},w.prototype.hideCursor=function(){this.isVisible=!1,p.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},w.prototype.showCursor=function(){this.isVisible=!0,p.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},w.prototype.restartTimer=function(){var h=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,p.removeCssClass(this.element,"ace_smooth-blinking")),h(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&p.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),p.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var d=(function(){this.timeoutId=setTimeout(function(){h(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){h(!0),d()},this.blinkInterval),d()}},w.prototype.getPixelPosition=function(h,d){if(!this.config||!this.session)return{left:0,top:0};h||(h=this.session.selection.getCursor());var a=this.session.documentToScreenPosition(h),l=this.$padding+(this.session.$bidiHandler.isBidiRow(a.row,h.row)?this.session.$bidiHandler.getPosLeft(a.column):a.column*this.config.characterWidth),c=(a.row-(d?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:l,top:c}},w.prototype.isCursorInView=function(h,d){return h.top>=0&&h.top<d.maxHeight},w.prototype.update=function(h){this.config=h;var d=this.session.$selectionMarkers,a=0,l=0;(d===void 0||d.length===0)&&(d=[{cursor:null}]);for(var a=0,c=d.length;a<c;a++){var u=this.getPixelPosition(d[a].cursor,!0);if(!((u.top>h.height+h.offset||u.top<0)&&a>1)){var i=this.cursors[l++]||this.addCursor(),s=i.style;this.drawCursor?this.drawCursor(i,u,h,d[a],this.session):this.isCursorInView(u,h)?(p.setStyle(s,"display","block"),p.translate(i,u.left,u.top),p.setStyle(s,"width",Math.round(h.characterWidth)+"px"),p.setStyle(s,"height",h.lineHeight+"px")):p.setStyle(s,"display","none")}}for(;this.cursors.length>l;)this.removeCursor();var f=this.session.getOverwrite();this.$setOverwrite(f),this.$pixelPos=u,this.restartTimer()},w.prototype.$setOverwrite=function(h){h!=this.overwrite&&(this.overwrite=h,h?p.addCssClass(this.element,"ace_overwrite-cursors"):p.removeCssClass(this.element,"ace_overwrite-cursors"))},w.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},w})();g.prototype.$padding=0,g.prototype.drawCursor=null,r.Cursor=g}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,r,m){var p=this&&this.__extends||(function(){var i=function(s,f){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,x){b.__proto__=x}||function(b,x){for(var I in x)Object.prototype.hasOwnProperty.call(x,I)&&(b[I]=x[I])},i(s,f)};return function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");i(s,f);function b(){this.constructor=s}s.prototype=f===null?Object.create(f):(b.prototype=f.prototype,new b)}})(),g=e("./lib/oop"),w=e("./lib/dom"),h=e("./lib/event"),d=e("./lib/event_emitter").EventEmitter,a=32768,l=(function(){function i(s,f){this.element=w.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+f,this.inner=w.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),s.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,h.addListener(this.element,"scroll",this.onScroll.bind(this)),h.addListener(this.element,"mousedown",h.preventDefault)}return i.prototype.setVisible=function(s){this.element.style.display=s?"":"none",this.isVisible=s,this.coeff=1},i})();g.implement(l.prototype,d);var c=(function(i){p(s,i);function s(f,b){var x=i.call(this,f,"-v")||this;return x.scrollTop=0,x.scrollHeight=0,b.$scrollbarWidth=x.width=w.scrollbarWidth(f.ownerDocument),x.inner.style.width=x.element.style.width=(x.width||15)+5+"px",x.$minWidth=0,x}return s.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var f=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-f)/(this.coeff-f)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},s.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},s.prototype.setHeight=function(f){this.element.style.height=f+"px"},s.prototype.setScrollHeight=function(f){this.scrollHeight=f,f>a?(this.coeff=a/f,f=a):this.coeff!=1&&(this.coeff=1),this.inner.style.height=f+"px"},s.prototype.setScrollTop=function(f){this.scrollTop!=f&&(this.skipEvent=!0,this.scrollTop=f,this.element.scrollTop=f*this.coeff)},s})(l);c.prototype.setInnerHeight=c.prototype.setScrollHeight;var u=(function(i){p(s,i);function s(f,b){var x=i.call(this,f,"-h")||this;return x.scrollLeft=0,x.height=b.$scrollbarWidth,x.inner.style.height=x.element.style.height=(x.height||15)+5+"px",x}return s.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},s.prototype.getHeight=function(){return this.isVisible?this.height:0},s.prototype.setWidth=function(f){this.element.style.width=f+"px"},s.prototype.setInnerWidth=function(f){this.inner.style.width=f+"px"},s.prototype.setScrollWidth=function(f){this.inner.style.width=f+"px"},s.prototype.setScrollLeft=function(f){this.scrollLeft!=f&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=f)},s})(l);r.ScrollBar=c,r.ScrollBarV=c,r.ScrollBarH=u,r.VScrollBar=c,r.HScrollBar=u}),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 p=this&&this.__extends||(function(){var u=function(i,s){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,b){f.__proto__=b}||function(f,b){for(var x in b)Object.prototype.hasOwnProperty.call(b,x)&&(f[x]=b[x])},u(i,s)};return function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");u(i,s);function f(){this.constructor=i}i.prototype=s===null?Object.create(s):(f.prototype=s.prototype,new f)}})(),g=e("./lib/oop"),w=e("./lib/dom"),h=e("./lib/event"),d=e("./lib/event_emitter").EventEmitter;w.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
220
+ position: absolute;
221
+ background: rgba(128, 128, 128, 0.6);
222
+ -moz-box-sizing: border-box;
223
+ box-sizing: border-box;
224
+ border: 1px solid #bbb;
225
+ border-radius: 2px;
226
+ z-index: 8;
227
+ }
228
+ .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
229
+ position: absolute;
230
+ z-index: 6;
231
+ background: none;
232
+ overflow: hidden!important;
233
+ }
234
+ .ace_editor>.ace_sb-v {
235
+ z-index: 6;
236
+ right: 0;
237
+ top: 0;
238
+ width: 12px;
239
+ }
240
+ .ace_editor>.ace_sb-v div {
241
+ z-index: 8;
242
+ right: 0;
243
+ width: 100%;
244
+ }
245
+ .ace_editor>.ace_sb-h {
246
+ bottom: 0;
247
+ left: 0;
248
+ height: 12px;
249
+ }
250
+ .ace_editor>.ace_sb-h div {
251
+ bottom: 0;
252
+ height: 100%;
253
+ }
254
+ .ace_editor>.ace_sb_grabbed {
255
+ z-index: 8;
256
+ background: #000;
257
+ }`,"ace_scrollbar.css",!1);var a=(function(){function u(i,s){this.element=w.createElement("div"),this.element.className="ace_sb"+s,this.inner=w.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,i.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,h.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return u.prototype.setVisible=function(i){this.element.style.display=i?"":"none",this.isVisible=i,this.coeff=1},u})();g.implement(a.prototype,d);var l=(function(u){p(i,u);function i(s,f){var b=u.call(this,s,"-v")||this;return b.scrollTop=0,b.scrollHeight=0,b.parent=s,b.width=b.VScrollWidth,b.renderer=f,b.inner.style.width=b.element.style.width=(b.width||15)+"px",b.$minWidth=0,b}return i.prototype.onMouseDown=function(s,f){if(s==="mousedown"&&!(h.getButton(f)!==0||f.detail===2)){if(f.target===this.inner){var b=this,x=f.clientY,I=function(T){x=T.clientY},R=function(){clearInterval(D)},A=f.clientY,C=this.thumbTop,O=function(){if(x!==void 0){var T=b.scrollTopFromThumbTop(C+x-A);T!==b.scrollTop&&b._emit("scroll",{data:T})}};h.capture(this.inner,I,R);var D=setInterval(O,20);return h.preventDefault(f)}var E=f.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(E)}),h.preventDefault(f)}},i.prototype.getHeight=function(){return this.height},i.prototype.scrollTopFromThumbTop=function(s){var f=s*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return f=f>>0,f<0?f=0:f>this.pageHeight-this.viewHeight&&(f=this.pageHeight-this.viewHeight),f},i.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},i.prototype.setHeight=function(s){this.height=Math.max(0,s),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},i.prototype.setScrollHeight=function(s,f){this.pageHeight===s&&!f||(this.pageHeight=s,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},i.prototype.setScrollTop=function(s){this.scrollTop=s,s<0&&(s=0),this.thumbTop=s*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},i})(a);l.prototype.setInnerHeight=l.prototype.setScrollHeight;var c=(function(u){p(i,u);function i(s,f){var b=u.call(this,s,"-h")||this;return b.scrollLeft=0,b.scrollWidth=0,b.height=b.HScrollHeight,b.inner.style.height=b.element.style.height=(b.height||12)+"px",b.renderer=f,b}return i.prototype.onMouseDown=function(s,f){if(s==="mousedown"&&!(h.getButton(f)!==0||f.detail===2)){if(f.target===this.inner){var b=this,x=f.clientX,I=function(T){x=T.clientX},R=function(){clearInterval(D)},A=f.clientX,C=this.thumbLeft,O=function(){if(x!==void 0){var T=b.scrollLeftFromThumbLeft(C+x-A);T!==b.scrollLeft&&b._emit("scroll",{data:T})}};h.capture(this.inner,I,R);var D=setInterval(O,20);return h.preventDefault(f)}var E=f.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(E)}),h.preventDefault(f)}},i.prototype.getHeight=function(){return this.isVisible?this.height:0},i.prototype.scrollLeftFromThumbLeft=function(s){var f=s*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return f=f>>0,f<0?f=0:f>this.pageWidth-this.viewWidth&&(f=this.pageWidth-this.viewWidth),f},i.prototype.setWidth=function(s){this.width=Math.max(0,s),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},i.prototype.setScrollWidth=function(s,f){this.pageWidth===s&&!f||(this.pageWidth=s,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},i.prototype.setScrollLeft=function(s){this.scrollLeft=s,s<0&&(s=0),this.thumbLeft=s*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},i})(a);c.prototype.setInnerWidth=c.prototype.setScrollWidth,r.ScrollBar=l,r.ScrollBarV=l,r.ScrollBarH=c,r.VScrollBar=l,r.HScrollBar=c}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,r,m){var p=e("./lib/event"),g=(function(){function w(h,d){this.onRender=h,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=d||window;var a=this;this._flush=function(l){a.pending=!1;var c=a.changes;if(c&&(p.blockIdle(100),a.changes=0,a.onRender(c)),a.changes){if(a.$recursionLimit--<0)return;a.schedule()}else a.$recursionLimit=2}}return w.prototype.schedule=function(h){this.changes=this.changes|h,this.changes&&!this.pending&&(p.nextFrame(this._flush),this.pending=!0)},w.prototype.clear=function(h){var d=this.changes;return this.changes=0,d},w})();r.RenderLoop=g}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(e,r,m){var p=e("../lib/oop"),g=e("../lib/dom"),w=e("../lib/lang"),h=e("../lib/event"),d=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,l=512,c=typeof ResizeObserver=="function",u=200,i=(function(){function s(f){this.el=g.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=g.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=g.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),f.appendChild(this.el),this.$measureNode.textContent=w.stringRepeat("X",l),this.$characterSize={width:0,height:0},c?this.$addObserver():this.checkForSizeChanges()}return s.prototype.$setMeasureNodeStyles=function(f,b){f.width=f.height="auto",f.left=f.top="0px",f.visibility="hidden",f.position="absolute",f.whiteSpace="pre",d.isIE<8?f["font-family"]="inherit":f.font="inherit",f.overflow=b?"hidden":"visible"},s.prototype.checkForSizeChanges=function(f){if(f===void 0&&(f=this.$measureSizes()),f&&(this.$characterSize.width!==f.width||this.$characterSize.height!==f.height)){this.$measureNode.style.fontWeight="bold";var b=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=f,this.charSizes=Object.create(null),this.allowBoldFonts=b&&b.width===f.width&&b.height===f.height,this._emit("changeCharacterSize",{data:f})}},s.prototype.$addObserver=function(){var f=this;this.$observer=new window.ResizeObserver(function(b){f.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},s.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var f=this;return this.$pollSizeChangesTimer=h.onIdle(function b(){f.checkForSizeChanges(),h.onIdle(b,500)},500)},s.prototype.setPolling=function(f){f?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},s.prototype.$measureSizes=function(f){var b={height:(f||this.$measureNode).clientHeight,width:(f||this.$measureNode).clientWidth/l};return b.width===0||b.height===0?null:b},s.prototype.$measureCharWidth=function(f){this.$main.textContent=w.stringRepeat(f,l);var b=this.$main.getBoundingClientRect();return b.width/l},s.prototype.getCharacterWidth=function(f){var b=this.charSizes[f];return b===void 0&&(b=this.charSizes[f]=this.$measureCharWidth(f)/this.$characterSize.width),b},s.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},s.prototype.$getZoom=function(f){return!f||!f.parentElement?1:(Number(window.getComputedStyle(f).zoom)||1)*this.$getZoom(f.parentElement)},s.prototype.$initTransformMeasureNodes=function(){var f=function(b,x){return["div",{style:"position: absolute;top:"+b+"px;left:"+x+"px;"}]};this.els=g.buildDom([f(0,0),f(u,0),f(0,u),f(u,u)],this.el)},s.prototype.transformCoordinates=function(f,b){if(f){var x=this.$getZoom(this.el);f=C(1/x,f)}function I(Z,Q,le){var ne=Z[1]*Q[0]-Z[0]*Q[1];return[(-Q[1]*le[0]+Q[0]*le[1])/ne,(+Z[1]*le[0]-Z[0]*le[1])/ne]}function R(Z,Q){return[Z[0]-Q[0],Z[1]-Q[1]]}function A(Z,Q){return[Z[0]+Q[0],Z[1]+Q[1]]}function C(Z,Q){return[Z*Q[0],Z*Q[1]]}this.els||this.$initTransformMeasureNodes();function O(Z){var Q=Z.getBoundingClientRect();return[Q.left,Q.top]}var D=O(this.els[0]),E=O(this.els[1]),T=O(this.els[2]),B=O(this.els[3]),F=I(R(B,E),R(B,T),R(A(E,T),A(B,D))),N=C(1+F[0],R(E,D)),$=C(1+F[1],R(T,D));if(b){var k=b,L=F[0]*k[0]/u+F[1]*k[1]/u+1,W=A(C(k[0],N),C(k[1],$));return A(C(1/L/u,W),D)}var U=R(f,D),q=I(R(N,C(F[0],U)),R($,C(F[1],U)),U);return C(u,q)},s})();i.prototype.$characterSize={width:0,height:0},p.implement(i.prototype,a),r.FontMetrics=i}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,r,m){m.exports=`
258
+ .ace_br1 {border-top-left-radius : 3px;}
259
+ .ace_br2 {border-top-right-radius : 3px;}
260
+ .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
261
+ .ace_br4 {border-bottom-right-radius: 3px;}
262
+ .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
263
+ .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
264
+ .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
265
+ .ace_br8 {border-bottom-left-radius : 3px;}
266
+ .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
267
+ .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
268
+ .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
269
+ .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
270
+ .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
271
+ .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
272
+ .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
273
+
274
+
275
+ .ace_editor {
276
+ position: relative;
277
+ overflow: hidden;
278
+ padding: 0;
279
+ font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
280
+ direction: ltr;
281
+ text-align: left;
282
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
283
+ forced-color-adjust: none;
284
+ }
285
+
286
+ .ace_scroller {
287
+ position: absolute;
288
+ overflow: hidden;
289
+ top: 0;
290
+ bottom: 0;
291
+ background-color: inherit;
292
+ -ms-user-select: none;
293
+ -moz-user-select: none;
294
+ -webkit-user-select: none;
295
+ user-select: none;
296
+ cursor: text;
297
+ }
298
+
299
+ .ace_content {
300
+ position: absolute;
301
+ box-sizing: border-box;
302
+ min-width: 100%;
303
+ contain: style size layout;
304
+ font-variant-ligatures: no-common-ligatures;
305
+ }
306
+ .ace_invisible {
307
+ font-variant-ligatures: none;
308
+ }
309
+
310
+ .ace_keyboard-focus:focus {
311
+ box-shadow: inset 0 0 0 2px #5E9ED6;
312
+ outline: none;
313
+ }
314
+
315
+ .ace_dragging .ace_scroller:before{
316
+ position: absolute;
317
+ top: 0;
318
+ left: 0;
319
+ right: 0;
320
+ bottom: 0;
321
+ content: '';
322
+ background: rgba(250, 250, 250, 0.01);
323
+ z-index: 1000;
324
+ }
325
+ .ace_dragging.ace_dark .ace_scroller:before{
326
+ background: rgba(0, 0, 0, 0.01);
327
+ }
328
+
329
+ .ace_gutter {
330
+ position: absolute;
331
+ overflow : hidden;
332
+ width: auto;
333
+ top: 0;
334
+ bottom: 0;
335
+ left: 0;
336
+ cursor: default;
337
+ z-index: 4;
338
+ -ms-user-select: none;
339
+ -moz-user-select: none;
340
+ -webkit-user-select: none;
341
+ user-select: none;
342
+ contain: style size layout;
343
+ }
344
+
345
+ .ace_gutter-active-line {
346
+ position: absolute;
347
+ left: 0;
348
+ right: 0;
349
+ }
350
+
351
+ .ace_scroller.ace_scroll-left:after {
352
+ content: "";
353
+ position: absolute;
354
+ top: 0;
355
+ right: 0;
356
+ bottom: 0;
357
+ left: 0;
358
+ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
359
+ pointer-events: none;
360
+ }
361
+
362
+ .ace_gutter-cell, .ace_gutter-cell_svg-icons {
363
+ position: absolute;
364
+ top: 0;
365
+ left: 0;
366
+ right: 0;
367
+ padding-left: 19px;
368
+ padding-right: 6px;
369
+ background-repeat: no-repeat;
370
+ }
371
+
372
+ .ace_gutter-cell_svg-icons .ace_gutter_annotation {
373
+ margin-left: -14px;
374
+ float: left;
375
+ }
376
+
377
+ .ace_gutter-cell .ace_gutter_annotation {
378
+ margin-left: -19px;
379
+ float: left;
380
+ }
381
+
382
+ .ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {
383
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
384
+ background-repeat: no-repeat;
385
+ background-position: 2px center;
386
+ }
387
+
388
+ .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
389
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
390
+ background-repeat: no-repeat;
391
+ background-position: 2px center;
392
+ }
393
+
394
+ .ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
395
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
396
+ background-repeat: no-repeat;
397
+ background-position: 2px center;
398
+ }
399
+
400
+ .ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {
401
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
402
+ }
403
+
404
+ .ace_icon_svg.ace_error {
405
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
406
+ background-color: crimson;
407
+ }
408
+ .ace_icon_svg.ace_security {
409
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
410
+ background-color: crimson;
411
+ }
412
+ .ace_icon_svg.ace_warning {
413
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
414
+ background-color: darkorange;
415
+ }
416
+ .ace_icon_svg.ace_info {
417
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
418
+ background-color: royalblue;
419
+ }
420
+ .ace_icon_svg.ace_hint {
421
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
422
+ background-color: silver;
423
+ }
424
+
425
+ .ace_icon_svg.ace_error_fold {
426
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
427
+ background-color: crimson;
428
+ }
429
+ .ace_icon_svg.ace_security_fold {
430
+ -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
431
+ background-color: crimson;
432
+ }
433
+ .ace_icon_svg.ace_warning_fold {
434
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
435
+ background-color: darkorange;
436
+ }
437
+
438
+ .ace_scrollbar {
439
+ contain: strict;
440
+ position: absolute;
441
+ right: 0;
442
+ bottom: 0;
443
+ z-index: 6;
444
+ }
445
+
446
+ .ace_scrollbar-inner {
447
+ position: absolute;
448
+ cursor: text;
449
+ left: 0;
450
+ top: 0;
451
+ }
452
+
453
+ .ace_scrollbar-v{
454
+ overflow-x: hidden;
455
+ overflow-y: scroll;
456
+ top: 0;
457
+ }
458
+
459
+ .ace_scrollbar-h {
460
+ overflow-x: scroll;
461
+ overflow-y: hidden;
462
+ left: 0;
463
+ }
464
+
465
+ .ace_print-margin {
466
+ position: absolute;
467
+ height: 100%;
468
+ }
469
+
470
+ .ace_text-input {
471
+ position: absolute;
472
+ z-index: 0;
473
+ width: 0.5em;
474
+ height: 1em;
475
+ opacity: 0;
476
+ background: transparent;
477
+ -moz-appearance: none;
478
+ appearance: none;
479
+ border: none;
480
+ resize: none;
481
+ outline: none;
482
+ overflow: hidden;
483
+ font: inherit;
484
+ padding: 0 1px;
485
+ margin: 0 -1px;
486
+ contain: strict;
487
+ -ms-user-select: text;
488
+ -moz-user-select: text;
489
+ -webkit-user-select: text;
490
+ user-select: text;
491
+ /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
492
+ white-space: pre!important;
493
+ }
494
+ .ace_text-input.ace_composition {
495
+ background: transparent;
496
+ color: inherit;
497
+ z-index: 1000;
498
+ opacity: 1;
499
+ }
500
+ .ace_composition_placeholder { color: transparent }
501
+ .ace_composition_marker {
502
+ border-bottom: 1px solid;
503
+ position: absolute;
504
+ border-radius: 0;
505
+ margin-top: 1px;
506
+ }
507
+
508
+ [ace_nocontext=true] {
509
+ transform: none!important;
510
+ filter: none!important;
511
+ clip-path: none!important;
512
+ mask : none!important;
513
+ contain: none!important;
514
+ perspective: none!important;
515
+ mix-blend-mode: initial!important;
516
+ z-index: auto;
517
+ }
518
+
519
+ .ace_layer {
520
+ z-index: 1;
521
+ position: absolute;
522
+ overflow: hidden;
523
+ /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
524
+ word-wrap: normal;
525
+ white-space: pre;
526
+ height: 100%;
527
+ width: 100%;
528
+ box-sizing: border-box;
529
+ /* setting pointer-events: auto; on node under the mouse, which changes
530
+ during scroll, will break mouse wheel scrolling in Safari */
531
+ pointer-events: none;
532
+ }
533
+
534
+ .ace_gutter-layer {
535
+ position: relative;
536
+ width: auto;
537
+ text-align: right;
538
+ pointer-events: auto;
539
+ height: 1000000px;
540
+ contain: style size layout;
541
+ }
542
+
543
+ .ace_text-layer {
544
+ font: inherit !important;
545
+ position: absolute;
546
+ height: 1000000px;
547
+ width: 1000000px;
548
+ contain: style size layout;
549
+ }
550
+
551
+ .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
552
+ contain: style size layout;
553
+ position: absolute;
554
+ top: 0;
555
+ left: 0;
556
+ right: 0;
557
+ }
558
+
559
+ .ace_hidpi .ace_text-layer,
560
+ .ace_hidpi .ace_gutter-layer,
561
+ .ace_hidpi .ace_content,
562
+ .ace_hidpi .ace_gutter {
563
+ contain: strict;
564
+ }
565
+ .ace_hidpi .ace_text-layer > .ace_line,
566
+ .ace_hidpi .ace_text-layer > .ace_line_group {
567
+ contain: strict;
568
+ }
569
+
570
+ .ace_cjk {
571
+ display: inline-block;
572
+ text-align: center;
573
+ }
574
+
575
+ .ace_cursor-layer {
576
+ z-index: 4;
577
+ }
578
+
579
+ .ace_cursor {
580
+ z-index: 4;
581
+ position: absolute;
582
+ box-sizing: border-box;
583
+ border-left: 2px solid;
584
+ /* workaround for smooth cursor repaintng whole screen in chrome */
585
+ transform: translatez(0);
586
+ }
587
+
588
+ .ace_multiselect .ace_cursor {
589
+ border-left-width: 1px;
590
+ }
591
+
592
+ .ace_slim-cursors .ace_cursor {
593
+ border-left-width: 1px;
594
+ }
595
+
596
+ .ace_overwrite-cursors .ace_cursor {
597
+ border-left-width: 0;
598
+ border-bottom: 1px solid;
599
+ }
600
+
601
+ .ace_hidden-cursors .ace_cursor {
602
+ opacity: 0.2;
603
+ }
604
+
605
+ .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
606
+ opacity: 0;
607
+ }
608
+
609
+ .ace_smooth-blinking .ace_cursor {
610
+ transition: opacity 0.18s;
611
+ }
612
+
613
+ .ace_animate-blinking .ace_cursor {
614
+ animation-duration: 1000ms;
615
+ animation-timing-function: step-end;
616
+ animation-name: blink-ace-animate;
617
+ animation-iteration-count: infinite;
618
+ }
619
+
620
+ .ace_animate-blinking.ace_smooth-blinking .ace_cursor {
621
+ animation-duration: 1000ms;
622
+ animation-timing-function: ease-in-out;
623
+ animation-name: blink-ace-animate-smooth;
624
+ }
625
+
626
+ @keyframes blink-ace-animate {
627
+ from, to { opacity: 1; }
628
+ 60% { opacity: 0; }
629
+ }
630
+
631
+ @keyframes blink-ace-animate-smooth {
632
+ from, to { opacity: 1; }
633
+ 45% { opacity: 1; }
634
+ 60% { opacity: 0; }
635
+ 85% { opacity: 0; }
636
+ }
637
+
638
+ .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
639
+ position: absolute;
640
+ z-index: 3;
641
+ }
642
+
643
+ .ace_marker-layer .ace_selection {
644
+ position: absolute;
645
+ z-index: 5;
646
+ }
647
+
648
+ .ace_marker-layer .ace_bracket {
649
+ position: absolute;
650
+ z-index: 6;
651
+ }
652
+
653
+ .ace_marker-layer .ace_error_bracket {
654
+ position: absolute;
655
+ border-bottom: 1px solid #DE5555;
656
+ border-radius: 0;
657
+ }
658
+
659
+ .ace_marker-layer .ace_active-line {
660
+ position: absolute;
661
+ z-index: 2;
662
+ }
663
+
664
+ .ace_marker-layer .ace_selected-word {
665
+ position: absolute;
666
+ z-index: 4;
667
+ box-sizing: border-box;
668
+ }
669
+
670
+ .ace_line .ace_fold {
671
+ box-sizing: border-box;
672
+
673
+ display: inline-block;
674
+ height: 11px;
675
+ margin-top: -2px;
676
+ vertical-align: middle;
677
+
678
+ background-image:
679
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
680
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
681
+ background-repeat: no-repeat, repeat-x;
682
+ background-position: center center, top left;
683
+ color: transparent;
684
+
685
+ border: 1px solid black;
686
+ border-radius: 2px;
687
+
688
+ cursor: pointer;
689
+ pointer-events: auto;
690
+ }
691
+
692
+ .ace_dark .ace_fold {
693
+ }
694
+
695
+ .ace_fold:hover{
696
+ background-image:
697
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
698
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
699
+ }
700
+
701
+ .ace_tooltip {
702
+ background-color: #f5f5f5;
703
+ border: 1px solid gray;
704
+ border-radius: 1px;
705
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
706
+ color: black;
707
+ padding: 3px 4px;
708
+ position: fixed;
709
+ z-index: 999999;
710
+ box-sizing: border-box;
711
+ cursor: default;
712
+ white-space: pre-wrap;
713
+ word-wrap: break-word;
714
+ line-height: normal;
715
+ font-style: normal;
716
+ font-weight: normal;
717
+ letter-spacing: normal;
718
+ pointer-events: none;
719
+ overflow: auto;
720
+ max-width: min(33em, 66vw);
721
+ overscroll-behavior: contain;
722
+ }
723
+ .ace_tooltip pre {
724
+ white-space: pre-wrap;
725
+ }
726
+
727
+ .ace_tooltip.ace_dark {
728
+ background-color: #636363;
729
+ color: #fff;
730
+ }
731
+
732
+ .ace_tooltip:focus {
733
+ outline: 1px solid #5E9ED6;
734
+ }
735
+
736
+ .ace_icon {
737
+ display: inline-block;
738
+ width: 18px;
739
+ vertical-align: top;
740
+ }
741
+
742
+ .ace_icon_svg {
743
+ display: inline-block;
744
+ width: 12px;
745
+ vertical-align: top;
746
+ -webkit-mask-repeat: no-repeat;
747
+ -webkit-mask-size: 12px;
748
+ -webkit-mask-position: center;
749
+ }
750
+
751
+ .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
752
+ padding-right: 13px;
753
+ }
754
+
755
+ .ace_fold-widget, .ace_custom-widget {
756
+ box-sizing: border-box;
757
+
758
+ margin: 0 -12px 0 1px;
759
+ display: none;
760
+ width: 11px;
761
+ vertical-align: top;
762
+
763
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
764
+ background-repeat: no-repeat;
765
+ background-position: center;
766
+
767
+ border-radius: 3px;
768
+
769
+ border: 1px solid transparent;
770
+ cursor: pointer;
771
+ pointer-events: auto;
772
+ }
773
+
774
+ .ace_custom-widget {
775
+ background: none;
776
+ }
777
+
778
+ .ace_folding-enabled .ace_fold-widget {
779
+ display: inline-block;
780
+ }
781
+
782
+ .ace_fold-widget.ace_end {
783
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
784
+ }
785
+
786
+ .ace_fold-widget.ace_closed {
787
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
788
+ }
789
+
790
+ .ace_fold-widget:hover {
791
+ border: 1px solid rgba(0, 0, 0, 0.3);
792
+ background-color: rgba(255, 255, 255, 0.2);
793
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
794
+ }
795
+
796
+ .ace_fold-widget:active {
797
+ border: 1px solid rgba(0, 0, 0, 0.4);
798
+ background-color: rgba(0, 0, 0, 0.05);
799
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
800
+ }
801
+ /**
802
+ * Dark version for fold widgets
803
+ */
804
+ .ace_dark .ace_fold-widget {
805
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
806
+ }
807
+ .ace_dark .ace_fold-widget.ace_end {
808
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
809
+ }
810
+ .ace_dark .ace_fold-widget.ace_closed {
811
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
812
+ }
813
+ .ace_dark .ace_fold-widget:hover {
814
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
815
+ background-color: rgba(255, 255, 255, 0.1);
816
+ }
817
+ .ace_dark .ace_fold-widget:active {
818
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
819
+ }
820
+
821
+ .ace_inline_button {
822
+ border: 1px solid lightgray;
823
+ display: inline-block;
824
+ margin: -1px 8px;
825
+ padding: 0 5px;
826
+ pointer-events: auto;
827
+ cursor: pointer;
828
+ }
829
+ .ace_inline_button:hover {
830
+ border-color: gray;
831
+ background: rgba(200,200,200,0.2);
832
+ display: inline-block;
833
+ pointer-events: auto;
834
+ }
835
+
836
+ .ace_fold-widget.ace_invalid {
837
+ background-color: #FFB4B4;
838
+ border-color: #DE5555;
839
+ }
840
+
841
+ .ace_fade-fold-widgets .ace_fold-widget {
842
+ transition: opacity 0.4s ease 0.05s;
843
+ opacity: 0;
844
+ }
845
+
846
+ .ace_fade-fold-widgets:hover .ace_fold-widget {
847
+ transition: opacity 0.05s ease 0.05s;
848
+ opacity:1;
849
+ }
850
+
851
+ .ace_underline {
852
+ text-decoration: underline;
853
+ }
854
+
855
+ .ace_bold {
856
+ font-weight: bold;
857
+ }
858
+
859
+ .ace_nobold .ace_bold {
860
+ font-weight: normal;
861
+ }
862
+
863
+ .ace_italic {
864
+ font-style: italic;
865
+ }
866
+
867
+
868
+ .ace_error-marker {
869
+ background-color: rgba(255, 0, 0,0.2);
870
+ position: absolute;
871
+ z-index: 9;
872
+ }
873
+
874
+ .ace_highlight-marker {
875
+ background-color: rgba(255, 255, 0,0.2);
876
+ position: absolute;
877
+ z-index: 8;
878
+ }
879
+
880
+ .ace_mobile-menu {
881
+ position: absolute;
882
+ line-height: 1.5;
883
+ border-radius: 4px;
884
+ -ms-user-select: none;
885
+ -moz-user-select: none;
886
+ -webkit-user-select: none;
887
+ user-select: none;
888
+ background: white;
889
+ box-shadow: 1px 3px 2px grey;
890
+ border: 1px solid #dcdcdc;
891
+ color: black;
892
+ }
893
+ .ace_dark > .ace_mobile-menu {
894
+ background: #333;
895
+ color: #ccc;
896
+ box-shadow: 1px 3px 2px grey;
897
+ border: 1px solid #444;
898
+
899
+ }
900
+ .ace_mobile-button {
901
+ padding: 2px;
902
+ cursor: pointer;
903
+ overflow: hidden;
904
+ }
905
+ .ace_mobile-button:hover {
906
+ background-color: #eee;
907
+ opacity:1;
908
+ }
909
+ .ace_mobile-button:active {
910
+ background-color: #ddd;
911
+ }
912
+
913
+ .ace_placeholder {
914
+ position: relative;
915
+ font-family: arial;
916
+ transform: scale(0.9);
917
+ transform-origin: left;
918
+ white-space: pre;
919
+ opacity: 0.7;
920
+ margin: 0 10px;
921
+ z-index: 1;
922
+ }
923
+
924
+ .ace_ghost_text {
925
+ opacity: 0.5;
926
+ font-style: italic;
927
+ }
928
+
929
+ .ace_ghost_text_container > div {
930
+ white-space: pre;
931
+ }
932
+
933
+ .ghost_text_line_wrapped::after {
934
+ content: "↩";
935
+ position: absolute;
936
+ }
937
+
938
+ .ace_lineWidgetContainer.ace_ghost_text {
939
+ margin: 0px 4px
940
+ }
941
+
942
+ .ace_screenreader-only {
943
+ position:absolute;
944
+ left:-10000px;
945
+ top:auto;
946
+ width:1px;
947
+ height:1px;
948
+ overflow:hidden;
949
+ }
950
+
951
+ .ace_hidden_token {
952
+ display: none;
953
+ }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,r,m){var p=e("../lib/dom"),g=e("../lib/oop"),w=e("../lib/event_emitter").EventEmitter,h=(function(){function d(a,l){this.renderer=l,this.pixelRatio=1,this.maxHeight=l.layerConfig.maxHeight,this.lineHeight=l.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(a)}return d.prototype.$createCanvas=function(){this.canvas=p.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},d.prototype.setScrollBarV=function(a){this.$createCanvas(),this.scrollbarV=a,a.element.appendChild(this.canvas),this.setDimensions()},d.prototype.$updateDecorators=function(a){if(typeof this.canvas.getContext!="function")return;var l=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(a);var c=this.canvas.getContext("2d");function u(N,$){return N.priority<$.priority?-1:N.priority>$.priority?1:0}var i=this.renderer.session.$annotations;if(c.clearRect(0,0,this.canvas.width,this.canvas.height),i){var s={info:1,warning:2,error:3};i.forEach(function(N){N.priority=s[N.type]||null}),i=i.sort(u);for(var f=0;f<i.length;f++){var b=i[f].row,x=this.getVerticalOffsetForRow(b),I=x+this.lineHeight,R=Math.round(this.heightRatio*x),A=Math.round(this.heightRatio*I),C=Math.round((R+A)/2),O=A-C;O<this.halfMinDecorationHeight&&(O=this.halfMinDecorationHeight),C-O<0&&(C=O),C+O>this.canvasHeight&&(C=this.canvasHeight-O);var D=C-O,E=C+O,T=E-D;c.fillStyle=l[i[f].type]||null,c.fillRect(0,D,Math.round(this.oneZoneWidth-1),T)}}var B=this.renderer.session.selection.getCursor();if(B){var F=Math.round(this.getVerticalOffsetForRow(B.row)*this.heightRatio);c.fillStyle="rgba(0, 0, 0, 0.5)",c.fillRect(0,F,this.canvasWidth,2)}},d.prototype.getVerticalOffsetForRow=function(a){a=a|0;var l=this.renderer.session.documentToScreenRow(a,0)*this.lineHeight;return l},d.prototype.setDimensions=function(a){a=a||this.renderer.layerConfig,this.maxHeight=a.maxHeight,this.lineHeight=a.lineHeight,this.canvasHeight=a.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})();g.implement(h.prototype,w),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 p=e("./lib/oop"),g=e("./lib/dom"),w=e("./lib/lang"),h=e("./config"),d=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,l=e("./layer/text").Text,c=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,i=e("./scrollbar").VScrollBar,s=e("./scrollbar_custom").HScrollBar,f=e("./scrollbar_custom").VScrollBar,b=e("./renderloop").RenderLoop,x=e("./layer/font_metrics").FontMetrics,I=e("./lib/event_emitter").EventEmitter,R=e("./css/editor-css"),A=e("./layer/decorators").Decorator,C=e("./lib/useragent"),O=e("./layer/text_util").isTextToken;g.importCssString(R,"ace_editor.css",!1);var D=(function(){function E(T,B){var F=this;this.container=T||g.createElement("div"),g.addCssClass(this.container,"ace_editor"),g.HI_DPI&&g.addCssClass(this.container,"ace_hidpi"),this.setTheme(B),h.get("useStrictCSP")==null&&h.set("useStrictCSP",!1),this.$gutter=g.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=g.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=g.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new d(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var N=this.$textLayer=new l(this.content);this.canvas=N.element,this.$markerFront=new a(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new i(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",function($){F.$scrollAnimation||F.session.setScrollTop($.data-F.scrollMargin.top)}),this.scrollBarH.on("scroll",function($){F.$scrollAnimation||F.session.setScrollLeft($.data-F.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new x(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function($){F.updateCharacterSize(),F.onResize(!0,F.gutterWidth,F.$size.width,F.$size.height),F._signal("changeCharacterSize",$)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!C.isIOS,this.$loop=new b(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(),g.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},E.prototype.setSession=function(T){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=T,T&&this.scrollMargin.top&&T.getScrollTop()<=0&&T.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(T),this.$markerBack.setSession(T),this.$markerFront.setSession(T),this.$gutterLayer.setSession(T),this.$textLayer.setSession(T),T&&(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(T,B,F){if(B===void 0&&(B=1/0),this.$changedLines?(this.$changedLines.firstRow>T&&(this.$changedLines.firstRow=T),this.$changedLines.lastRow<B&&(this.$changedLines.lastRow=B)):this.$changedLines={firstRow:T,lastRow:B},this.$changedLines.lastRow<this.layerConfig.firstRow)if(F)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},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(T){T?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(T,B,F,N){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=T?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),F||(F=$.clientWidth||$.scrollWidth);var k=this.$updateCachedSize(T,B,F,N);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!F&&!N)return this.resizing=0;T&&(this.$gutterLayer.$padding=null),T?this.$renderChanges(k|this.$changes,!0):this.$loop.schedule(k|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},E.prototype.$updateCachedSize=function(T,B,F,N){N-=this.$extraHeight||0;var $=0,k=this.$size,L={width:k.width,height:k.height,scrollerHeight:k.scrollerHeight,scrollerWidth:k.scrollerWidth};if(N&&(T||k.height!=N)&&(k.height=N,$|=this.CHANGE_SIZE,k.scrollerHeight=k.height,this.$horizScroll&&(k.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(k.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",$=$|this.CHANGE_SCROLL),F&&(T||k.width!=F)){$|=this.CHANGE_SIZE,k.width=F,B==null&&(B=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=B,g.setStyle(this.scrollBarH.element.style,"left",B+"px"),g.setStyle(this.scroller.style,"left",B+this.margin.left+"px"),k.scrollerWidth=Math.max(0,F-B-this.scrollBarV.getWidth()-this.margin.h),g.setStyle(this.$gutter.style,"left",this.margin.left+"px");var W=this.scrollBarV.getWidth()+"px";g.setStyle(this.scrollBarH.element.style,"right",W),g.setStyle(this.scroller.style,"right",W),g.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(k.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||T)&&($|=this.CHANGE_FULL)}return k.$dirty=!F||!N,$&&this._signal("resize",L),$},E.prototype.onGutterResize=function(T){var B=this.$showGutter?T:0;B!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,B,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 T=this.$size.scrollerWidth-this.$padding*2,B=Math.floor(T/this.characterWidth);return this.session.adjustWrapLimit(B,this.$showPrintMargin&&this.$printMarginColumn)},E.prototype.setAnimatedScroll=function(T){this.setOption("animatedScroll",T)},E.prototype.getAnimatedScroll=function(){return this.$animatedScroll},E.prototype.setShowInvisibles=function(T){this.setOption("showInvisibles",T),this.session.$bidiHandler.setShowInvisibles(T)},E.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},E.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},E.prototype.setDisplayIndentGuides=function(T){this.setOption("displayIndentGuides",T)},E.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},E.prototype.setHighlightIndentGuides=function(T){this.setOption("highlightIndentGuides",T)},E.prototype.setShowPrintMargin=function(T){this.setOption("showPrintMargin",T)},E.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},E.prototype.setPrintMarginColumn=function(T){this.setOption("printMarginColumn",T)},E.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},E.prototype.getShowGutter=function(){return this.getOption("showGutter")},E.prototype.setShowGutter=function(T){return this.setOption("showGutter",T)},E.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},E.prototype.setFadeFoldWidgets=function(T){this.setOption("fadeFoldWidgets",T)},E.prototype.setHighlightGutterLine=function(T){this.setOption("highlightGutterLine",T)},E.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},E.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var T=g.createElement("div");T.className="ace_layer ace_print-margin-layer",this.$printMarginEl=g.createElement("div"),this.$printMarginEl.className="ace_print-margin",T.appendChild(this.$printMarginEl),this.content.insertBefore(T,this.content.firstChild)}var B=this.$printMarginEl.style;B.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",B.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 T=this.textarea.style,B=this.$composition;if(!this.$keepTextAreaAtCursor&&!B){g.translate(this.textarea,-100,0);return}var F=this.$cursorLayer.$pixelPos;if(F){B&&B.markerRange&&(F=this.$cursorLayer.getPixelPosition(B.markerRange.start,!0));var N=this.layerConfig,$=F.top,k=F.left;$-=N.offset;var L=B&&B.useTextareaForIME||C.isMobile?this.lineHeight:1;if($<0||$>N.height-L){g.translate(this.textarea,0,0);return}var W=1,U=this.$size.height-L;if(!B)$+=this.lineHeight;else if(B.useTextareaForIME){var q=this.textarea.value;W=this.characterWidth*this.session.$getStringScreenWidth(q)[0]}else $+=this.lineHeight+2;k-=this.scrollLeft,k>this.$size.scrollerWidth-W&&(k=this.$size.scrollerWidth-W),k+=this.gutterWidth+this.margin.left,g.setStyle(T,"height",L+"px"),g.setStyle(T,"width",W+"px"),g.translate(this.textarea,Math.min(k,this.$size.scrollerWidth-W),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 T=this.layerConfig,B=T.lastRow,F=this.session.documentToScreenRow(B,0)*T.lineHeight;return F-this.session.getScrollTop()>T.height-T.lineHeight?B-1:B},E.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},E.prototype.setPadding=function(T){this.$padding=T,this.$textLayer.setPadding(T),this.$cursorLayer.setPadding(T),this.$markerFront.setPadding(T),this.$markerBack.setPadding(T),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},E.prototype.setScrollMargin=function(T,B,F,N){var $=this.scrollMargin;$.top=T|0,$.bottom=B|0,$.right=N|0,$.left=F|0,$.v=$.top+$.bottom,$.h=$.left+$.right,$.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-$.top),this.updateFull()},E.prototype.setMargin=function(T,B,F,N){var $=this.margin;$.top=T|0,$.bottom=B|0,$.right=N|0,$.left=F|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(T){this.setOption("hScrollBarAlwaysVisible",T)},E.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},E.prototype.setVScrollBarAlwaysVisible=function(T){this.setOption("vScrollBarAlwaysVisible",T)},E.prototype.$updateScrollBarV=function(){var T=this.layerConfig.maxHeight,B=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(T-=(B-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>T-B&&(T=this.scrollTop+B,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(T+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(T,B){if(this.$changes&&(T|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!T&&!B){this.$changes|=T;return}if(this.$size.$dirty)return this.$changes|=T,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",T),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var F=this.layerConfig;if(T&this.CHANGE_FULL||T&this.CHANGE_SIZE||T&this.CHANGE_TEXT||T&this.CHANGE_LINES||T&this.CHANGE_SCROLL||T&this.CHANGE_H_SCROLL){if(T|=this.$computeLayerConfig()|this.$loop.clear(),F.firstRow!=this.layerConfig.firstRow&&F.firstRowScreen==this.layerConfig.firstRowScreen){var N=this.scrollTop+(F.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;N>0&&(this.scrollTop=N,T=T|this.CHANGE_SCROLL,T|=this.$computeLayerConfig()|this.$loop.clear())}F=this.layerConfig,this.$updateScrollBarV(),T&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),g.translate(this.content,-this.scrollLeft,-F.offset);var $=F.width+2*this.$padding+"px",k=F.minHeight+"px";g.setStyle(this.content.style,"width",$),g.setStyle(this.content.style,"height",k)}if(T&this.CHANGE_H_SCROLL&&(g.translate(this.content,-this.scrollLeft,-F.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),T&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F),this.$markerBack.update(F),this.$markerFront.update(F),this.$cursorLayer.update(F),this.$moveTextAreaToCursor(),this._signal("afterRender",T);return}if(T&this.CHANGE_SCROLL){this.$changedLines=null,T&this.CHANGE_TEXT||T&this.CHANGE_LINES?this.$textLayer.update(F):this.$textLayer.scrollLines(F),this.$showGutter&&(T&this.CHANGE_GUTTER||T&this.CHANGE_LINES?this.$gutterLayer.update(F):this.$gutterLayer.scrollLines(F)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F),this.$markerBack.update(F),this.$markerFront.update(F),this.$cursorLayer.update(F),this.$moveTextAreaToCursor(),this._signal("afterRender",T);return}T&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):T&this.CHANGE_LINES?((this.$updateLines()||T&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):T&this.CHANGE_TEXT||T&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):T&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)),T&this.CHANGE_CURSOR&&(this.$cursorLayer.update(F),this.$moveTextAreaToCursor()),T&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(F),T&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(F),this._signal("afterRender",T)},E.prototype.$autosize=function(){var T=this.session.getScreenLength()*this.lineHeight,B=this.$maxLines*this.lineHeight,F=Math.min(B,Math.max((this.$minLines||1)*this.lineHeight,T))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(F+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&F>this.$maxPixelHeight&&(F=this.$maxPixelHeight);var N=F<=2*this.lineHeight,$=!N&&T>B;if(F!=this.desiredHeight||this.$size.height!=this.desiredHeight||$!=this.$vScroll){$!=this.$vScroll&&(this.$vScroll=$,this.scrollBarV.setVisible($));var k=this.container.clientWidth;this.container.style.height=F+"px",this.$updateCachedSize(!0,this.$gutterWidth,k,F),this.desiredHeight=F,this._signal("autosize")}},E.prototype.$computeLayerConfig=function(){var T=this.session,B=this.$size,F=B.height<=2*this.lineHeight,N=this.session.getScreenLength(),$=N*this.lineHeight,k=this.$getLongestLine(),L=!F&&(this.$hScrollBarAlwaysVisible||B.scrollerWidth-k-2*this.$padding<0),W=this.$horizScroll!==L;W&&(this.$horizScroll=L,this.scrollBarH.setVisible(L));var U=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),F=B.height<=2*this.lineHeight);var q=B.scrollerHeight+this.lineHeight,Z=!this.$maxLines&&this.$scrollPastEnd?(B.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;$+=Z;var Q=this.scrollMargin;this.session.setScrollTop(Math.max(-Q.top,Math.min(this.scrollTop,$-B.scrollerHeight+Q.bottom))),this.session.setScrollLeft(Math.max(-Q.left,Math.min(this.scrollLeft,k+2*this.$padding-B.scrollerWidth+Q.right)));var le=!F&&(this.$vScrollBarAlwaysVisible||B.scrollerHeight-$+Z<0||this.scrollTop>Q.top),ne=U!==le;ne&&(this.$vScroll=le,this.scrollBarV.setVisible(le));var ce=this.scrollTop%this.lineHeight,ae=Math.ceil(q/this.lineHeight)-1,de=Math.max(0,Math.round((this.scrollTop-ce)/this.lineHeight)),me=de+ae,$e,Re,Me=this.lineHeight;de=T.screenToDocumentRow(de,0);var Xe=T.getFoldLine(de);Xe&&(de=Xe.start.row),$e=T.documentToScreenRow(de,0),Re=T.getRowLength(de)*Me,me=Math.min(T.screenToDocumentRow(me,0),T.getLength()-1),q=B.scrollerHeight+T.getRowLength(me)*Me+Re,ce=this.scrollTop-$e*Me,ce<0&&$e>0&&($e=Math.max(0,$e+Math.floor(ce/Me)),ce=this.scrollTop-$e*Me);var qe=0;return(this.layerConfig.width!=k||W)&&(qe=this.CHANGE_H_SCROLL),(W||ne)&&(qe|=this.$updateCachedSize(!0,this.gutterWidth,B.width,B.height),this._signal("scrollbarVisibilityChanged"),ne&&(k=this.$getLongestLine())),this.layerConfig={width:k,padding:this.$padding,firstRow:de,firstRowScreen:$e,lastRow:me,lineHeight:Me,characterWidth:this.characterWidth,minHeight:q,maxHeight:$,offset:ce,gutterOffset:Me?Math.max(0,Math.ceil((ce+B.height-B.scrollerHeight)/Me)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(k-this.$padding),qe},E.prototype.$updateLines=function(){if(this.$changedLines){var T=this.$changedLines.firstRow,B=this.$changedLines.lastRow;this.$changedLines=null;var F=this.layerConfig;if(!(T>F.lastRow+1)&&!(B<F.firstRow)){if(B===1/0){this.$showGutter&&this.$gutterLayer.update(F),this.$textLayer.update(F);return}return this.$textLayer.updateLines(F,T,B),!0}}},E.prototype.$getLongestLine=function(){var T=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(T+=1),this.$textLayer&&T>this.$textLayer.MAX_LINE_LENGTH&&(T=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(T*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(T,B){this.$gutterLayer.addGutterDecoration(T,B)},E.prototype.removeGutterDecoration=function(T,B){this.$gutterLayer.removeGutterDecoration(T,B)},E.prototype.updateBreakpoints=function(T){this._rows=T,this.$loop.schedule(this.CHANGE_GUTTER)},E.prototype.setAnnotations=function(T){this.$gutterLayer.setAnnotations(T),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(T,B,F){this.scrollCursorIntoView(T,F),this.scrollCursorIntoView(B,F)},E.prototype.scrollCursorIntoView=function(T,B,F){if(this.$size.scrollerHeight!==0){var N=this.$cursorLayer.getPixelPosition(T),$=N.left,k=N.top,L=F&&F.top||0,W=F&&F.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var U=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;U+L>k?(B&&U+L>k+this.lineHeight&&(k-=B*this.$size.scrollerHeight),k===0&&(k=-this.scrollMargin.top),this.session.setScrollTop(k)):U+this.$size.scrollerHeight-W<k+this.lineHeight&&(B&&U+this.$size.scrollerHeight-W<k-this.lineHeight&&(k+=B*this.$size.scrollerHeight),this.session.setScrollTop(k+this.lineHeight+W-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(T){this.session.setScrollTop(T*this.lineHeight)},E.prototype.alignCursor=function(T,B){typeof T=="number"&&(T={row:T,column:0});var F=this.$cursorLayer.getPixelPosition(T),N=this.$size.scrollerHeight-this.lineHeight,$=F.top-N*(B||0);return this.session.setScrollTop($),$},E.prototype.$calcSteps=function(T,B){var F=0,N=this.STEPS,$=[],k=function(L,W,U){return U*(Math.pow(L-1,3)+1)+W};for(F=0;F<N;++F)$.push(k(F/this.STEPS,T,B-T));return $},E.prototype.scrollToLine=function(T,B,F,N){var $=this.$cursorLayer.getPixelPosition({row:T,column:0}),k=$.top;B&&(k-=this.$size.scrollerHeight/2);var L=this.scrollTop;this.session.setScrollTop(k),F!==!1&&this.animateScrolling(L,N)},E.prototype.animateScrolling=function(T,B){var F=this.scrollTop;if(!this.$animatedScroll)return;var N=this;if(T==F)return;if(this.$scrollAnimation){var $=this.$scrollAnimation.steps;if($.length&&(T=$[0],T==F))return}var k=N.$calcSteps(T,F);this.$scrollAnimation={from:T,to:F,steps:k},clearInterval(this.$timer),N.session.setScrollTop(k.shift()),N.session.$scrollTop=F;function L(){N.$timer=clearInterval(N.$timer),N.$scrollAnimation=null,N.$stopAnimation=!1,B&&B()}this.$timer=setInterval(function(){if(N.$stopAnimation){L();return}if(!N.session)return clearInterval(N.$timer);k.length?(N.session.setScrollTop(k.shift()),N.session.$scrollTop=F):F!=null?(N.session.$scrollTop=-1,N.session.setScrollTop(F),F=null):L()},10)},E.prototype.scrollToY=function(T){this.scrollTop!==T&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=T)},E.prototype.scrollToX=function(T){this.scrollLeft!==T&&(this.scrollLeft=T),this.$loop.schedule(this.CHANGE_H_SCROLL)},E.prototype.scrollTo=function(T,B){this.session.setScrollTop(B),this.session.setScrollLeft(T)},E.prototype.scrollBy=function(T,B){B&&this.session.setScrollTop(this.session.getScrollTop()+B),T&&this.session.setScrollLeft(this.session.getScrollLeft()+T)},E.prototype.isScrollableBy=function(T,B){if(B<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||B>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||T<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||T>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},E.prototype.pixelToScreenCoordinates=function(T,B){var F;if(this.$hasCssTransforms){F={top:0,left:0};var N=this.$fontMetrics.transformCoordinates([T,B]);T=N[1]-this.gutterWidth-this.margin.left,B=N[0]}else F=this.scroller.getBoundingClientRect();var $=T+this.scrollLeft-F.left-this.$padding,k=$/this.characterWidth,L=Math.floor((B+this.scrollTop-F.top)/this.lineHeight),W=this.$blockCursor?Math.floor(k):Math.round(k);return{row:L,column:W,side:k-W>0?1:-1,offsetX:$}},E.prototype.screenToTextCoordinates=function(T,B){var F;if(this.$hasCssTransforms){F={top:0,left:0};var N=this.$fontMetrics.transformCoordinates([T,B]);T=N[1]-this.gutterWidth-this.margin.left,B=N[0]}else F=this.scroller.getBoundingClientRect();var $=T+this.scrollLeft-F.left-this.$padding,k=$/this.characterWidth,L=this.$blockCursor?Math.floor(k):Math.round(k),W=Math.floor((B+this.scrollTop-F.top)/this.lineHeight);return this.session.screenToDocumentPosition(W,Math.max(L,0),$)},E.prototype.textToScreenCoordinates=function(T,B){var F=this.scroller.getBoundingClientRect(),N=this.session.documentToScreenPosition(T,B),$=this.$padding+(this.session.$bidiHandler.isBidiRow(N.row,T)?this.session.$bidiHandler.getPosLeft(N.column):Math.round(N.column*this.characterWidth)),k=N.row*this.lineHeight;return{pageX:F.left+$-this.scrollLeft,pageY:F.top+k-this.scrollTop}},E.prototype.visualizeFocus=function(){g.addCssClass(this.container,"ace_focus")},E.prototype.visualizeBlur=function(){g.removeCssClass(this.container,"ace_focus")},E.prototype.showComposition=function(T){this.$composition=T,T.cssText||(T.cssText=this.textarea.style.cssText),T.useTextareaForIME==null&&(T.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(g.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):T.markerId=this.session.addMarker(T.markerRange,"ace_composition_marker","text")},E.prototype.setCompositionText=function(T){var B=this.session.selection.cursor;this.addToken(T,"composition_placeholder",B.row,B.column),this.$moveTextAreaToCursor()},E.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),g.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var T=this.session.selection.cursor;this.removeExtraToken(T.row,T.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},E.prototype.setGhostText=function(T,B){var F=this.session.selection.cursor,N=B||{row:F.row,column:F.column};this.removeGhostText();var $=this.$calculateWrappedTextChunks(T,N);this.addToken($[0].text,"ghost_text",N.row,N.column),this.$ghostText={text:T,position:{row:N.row,column:N.column}};var k=g.createElement("div");if($.length>1){var L=this.hideTokensAfterPosition(N.row,N.column),W;$.slice(1).forEach(function(ne){var ce=g.createElement("div"),ae=g.createElement("span");ae.className="ace_ghost_text",ne.wrapped&&(ce.className="ghost_text_line_wrapped"),ne.text.length===0&&(ne.text=" "),ae.appendChild(g.createTextNode(ne.text)),ce.appendChild(ae),k.appendChild(ce),W=ce}),L.forEach(function(ne){var ce=g.createElement("span");O(ne.type)||(ce.className="ace_"+ne.type.replace(/\./g," ace_")),ce.appendChild(g.createTextNode(ne.value)),W.appendChild(ce)}),this.$ghostTextWidget={el:k,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,Q=$.length*this.lineHeight,le=Q<Z-U.top;if(le)return;Q<Z?this.scrollBy(0,($.length-1)*this.lineHeight):this.scrollToRow(N.row)}},E.prototype.$calculateWrappedTextChunks=function(T,B){var F=this.$size.scrollerWidth-this.$padding*2,N=Math.floor(F/this.characterWidth)-2;N=N<=0?60:N;for(var $=T.split(/\r?\n/),k=[],L=0;L<$.length;L++){var W=this.session.$getDisplayTokens($[L],B.column),U=this.session.$computeWrapSplits(W,N,this.session.$tabSize);if(U.length>0){var q=0;U.push($[L].length);for(var Z=0;Z<U.length;Z++){var Q=$[L].slice(q,U[Z]);k.push({text:Q,wrapped:!0}),q=U[Z]}}else k.push({text:$[L],wrapped:!1})}return k},E.prototype.removeGhostText=function(){if(this.$ghostText){var T=this.$ghostText.position;this.removeExtraToken(T.row,T.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},E.prototype.addToken=function(T,B,F,N){var $=this.session;$.bgTokenizer.lines[F]=null;var k={type:B,value:T},L=$.getTokens(F);if(N==null||!L.length)L.push(k);else for(var W=0,U=0;U<L.length;U++){var q=L[U];if(W+=q.value.length,N<=W){var Z=q.value.length-(W-N),Q=q.value.slice(0,Z),le=q.value.slice(Z);L.splice(U,1,{type:q.type,value:Q},k,{type:q.type,value:le});break}}this.updateLines(F,F)},E.prototype.hideTokensAfterPosition=function(T,B){for(var F=this.session.getTokens(T),N=0,$=!1,k=[],L=0;L<F.length;L++){var W=F[L];if(N+=W.value.length,W.type!=="ghost_text"){if($){k.push({type:W.type,value:W.value}),W.type="hidden_token";continue}N===B&&($=!0)}}return this.updateLines(T,T),k},E.prototype.removeExtraToken=function(T,B){this.session.bgTokenizer.lines[T]=null,this.updateLines(T,T)},E.prototype.setTheme=function(T,B){var F=this;if(this.$themeId=T,F._dispatchEvent("themeChange",{theme:T}),!T||typeof T=="string"){var N=T||this.$options.theme.initialValue;h.loadModule(["theme",N],$)}else $(T);function $(k){if(F.$themeId!=T)return B&&B();if(!k||!k.cssClass)throw new Error("couldn't load module "+T+" or it didn't call define");k.$id&&(F.$themeId=k.$id),g.importCssString(k.cssText,k.cssClass,F.container),F.theme&&g.removeCssClass(F.container,F.theme.cssClass);var L="padding"in k?k.padding:"padding"in(F.theme||{})?4:F.$padding;if(F.$padding&&L!=F.$padding&&F.setPadding(L),F.$gutterLayer){var W=k.$showGutterCursorMarker;W&&!F.$gutterLayer.$showCursorMarker?F.$gutterLayer.$showCursorMarker="theme":!W&&F.$gutterLayer.$showCursorMarker=="theme"&&(F.$gutterLayer.$showCursorMarker=null)}F.$theme=k.cssClass,F.theme=k,g.addCssClass(F.container,k.cssClass),g.setCssClass(F.container,"ace_dark",k.isDark),F.$size&&(F.$size.width=0,F.$updateSizeAsync()),F._dispatchEvent("themeLoaded",{theme:k}),B&&B(),C.isSafari&&F.scroller&&(F.scroller.style.background="red",F.scroller.style.background="")}},E.prototype.getTheme=function(){return this.$themeId},E.prototype.setStyle=function(T,B){g.setCssClass(this.container,T,B!==!1)},E.prototype.unsetStyle=function(T){g.removeCssClass(this.container,T)},E.prototype.setCursorStyle=function(T){g.setStyle(this.scroller.style,"cursor",T)},E.prototype.setMouseCursor=function(T){g.setStyle(this.scroller.style,"cursor",T)},E.prototype.attachToShadowRoot=function(){g.importCssString(R,"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(T){var B=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),T===!0?(this.scrollBarV=new f(this.container,this),this.scrollBarH=new s(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(F){B.$scrollAnimation||B.session.setScrollTop(F.data-B.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(F){B.$scrollAnimation||B.session.setScrollLeft(F.data-B.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new A(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new i(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.addEventListener("scroll",function(F){B.$scrollAnimation||B.session.setScrollTop(F.data-B.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(F){B.$scrollAnimation||B.session.setScrollLeft(F.data-B.scrollMargin.left)}))},E.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var T=this;this.$resizeTimer=w.delayedCall(function(){T.destroyed||T.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(B){var F=B[0].contentRect.width,N=B[0].contentRect.height;Math.abs(T.$size.width-F)>1||Math.abs(T.$size.height-N)>1?T.$resizeTimer.delay():T.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},E})();D.prototype.CHANGE_CURSOR=1,D.prototype.CHANGE_MARKER=2,D.prototype.CHANGE_GUTTER=4,D.prototype.CHANGE_SCROLL=8,D.prototype.CHANGE_LINES=16,D.prototype.CHANGE_TEXT=32,D.prototype.CHANGE_SIZE=64,D.prototype.CHANGE_MARKER_BACK=128,D.prototype.CHANGE_MARKER_FRONT=256,D.prototype.CHANGE_FULL=512,D.prototype.CHANGE_H_SCROLL=1024,D.prototype.$changes=0,D.prototype.$padding=null,D.prototype.$frozen=!1,D.prototype.STEPS=8,p.implement(D.prototype,I),h.defineOptions(D.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){g.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=D}),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 p=e("../lib/oop"),g=e("../lib/net"),w=e("../lib/event_emitter").EventEmitter,h=e("../config");function d(u){var i="importScripts('"+g.qualifyURL(u)+"');";try{return new Blob([i],{type:"application/javascript"})}catch{var s=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,f=new s;return f.append(i),f.getBlob("application/javascript")}}function a(u){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(h.get("loadWorkerFromBlob")){var i=d(u),s=window.URL||window.webkitURL,f=s.createObjectURL(i);return new Worker(f)}return new Worker(u)}var l=function(u){u.postMessage||(u=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=u,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){p.implement(this,w),this.$createWorkerFromOldConfig=function(u,i,s,f,b){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),h.get("packaged")||!e.toUrl)f=f||h.moduleUrl(i,"worker");else{var x=this.$normalizePath;f=f||x(e.toUrl("ace/worker/worker.js",null,"_"));var I={};u.forEach(function(R){I[R]=x(e.toUrl(R,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=a(f),b&&this.send("importScripts",b),this.$worker.postMessage({init:!0,tlns:I,module:i,classname:s}),this.$worker},this.onMessage=function(u){var i=u.data;switch(i.type){case"event":this._signal(i.name,{data:i.data});break;case"call":var s=this.callbacks[i.id];s&&(s(i.data),delete this.callbacks[i.id]);break;case"error":this.reportError(i.data);break;case"log":window.console&&console.log&&console.log.apply(console,i.data);break}},this.reportError=function(u){window.console&&console.error&&console.error(u)},this.$normalizePath=function(u){return g.qualifyURL(u)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(u){u.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(u,i){this.$worker.postMessage({command:u,args:i})},this.call=function(u,i,s){if(s){var f=this.callbackId++;this.callbacks[f]=s,i.push(f)}this.send(u,i)},this.emit=function(u,i){try{i.data&&i.data.err&&(i.data.err={message:i.data.err.message,stack:i.data.err.stack,code:i.data.err.code}),this.$worker&&this.$worker.postMessage({event:u,data:{data:i.data}})}catch(s){console.error(s.stack)}},this.attachToDocument=function(u){this.$doc&&this.terminate(),this.$doc=u,this.call("setValue",[u.getValue()]),u.on("change",this.changeListener,!0)},this.changeListener=function(u){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),u.action=="insert"?this.deltaQueue.push(u.start,u.lines):this.deltaQueue.push(u.start,u.end)},this.$sendDeltaQueue=function(){var u=this.deltaQueue;u&&(this.deltaQueue=null,u.length>50&&u.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:u}))}}).call(l.prototype);var c=function(u,i,s){var f=null,b=!1,x=Object.create(w),I=[],R=new l({messageBuffer:I,terminate:function(){},postMessage:function(C){I.push(C),f&&(b?setTimeout(A):A())}});R.setEmitSync=function(C){b=C};var A=function(){var C=I.shift();C.command?f[C.command].apply(f,C.args):C.event&&x._signal(C.event,C.data)};return x.postMessage=function(C){R.onMessage({data:C})},x.callback=function(C,O){this.postMessage({type:"call",id:O,data:C})},x.emit=function(C,O){this.postMessage({type:"event",name:C,data:O})},h.loadModule(["worker",i],function(C){for(f=new C[s](x);I.length;)A()}),R};r.UIWorkerClient=c,r.WorkerClient=l,r.createWorker=a}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,r,m){var p=e("./range").Range,g=e("./lib/event_emitter").EventEmitter,w=e("./lib/oop"),h=(function(){function d(a,l,c,u,i,s){var f=this;this.length=l,this.session=a,this.doc=a.getDocument(),this.mainClass=i,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=u,this.$onCursorChange=function(){setTimeout(function(){f.onCursorChange()})},this.$pos=c;var b=a.getUndoManager().$undoStack||a.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=b.length,this.setup(),a.selection.on("changeCursor",this.$onCursorChange)}return d.prototype.setup=function(){var a=this,l=this.doc,c=this.session;this.selectionBefore=c.selection.toJSON(),c.selection.inMultiSelectMode&&c.selection.toSingleRange(),this.pos=l.createAnchor(this.$pos.row,this.$pos.column);var u=this.pos;u.$insertRight=!0,u.detach(),u.markerId=c.addMarker(new p(u.row,u.column,u.row,u.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(i){var s=l.createAnchor(i.row,i.column);s.$insertRight=!0,s.detach(),a.others.push(s)}),c.setUndoSelect(!1)},d.prototype.showOtherMarkers=function(){if(!this.othersActive){var a=this.session,l=this;this.othersActive=!0,this.others.forEach(function(c){c.markerId=a.addMarker(new p(c.row,c.column,c.row,c.column+l.length),l.othersClass,null,!1)})}},d.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var a=0;a<this.others.length;a++)this.session.removeMarker(this.others[a].markerId)}},d.prototype.onUpdate=function(a){if(this.$updating)return this.updateAnchors(a);var l=a;if(l.start.row===l.end.row&&l.start.row===this.pos.row){this.$updating=!0;var c=a.action==="insert"?l.end.column-l.start.column:l.start.column-l.end.column,u=l.start.column>=this.pos.column&&l.start.column<=this.pos.column+this.length+1,i=l.start.column-this.pos.column;if(this.updateAnchors(a),u&&(this.length+=c),u&&!this.session.$fromUndo){if(a.action==="insert")for(var s=this.others.length-1;s>=0;s--){var f=this.others[s],b={row:f.row,column:f.column+i};this.doc.insertMergedLines(b,a.lines)}else if(a.action==="remove")for(var s=this.others.length-1;s>=0;s--){var f=this.others[s],b={row:f.row,column:f.column+i};this.doc.remove(new p(b.row,b.column,b.row,b.column-c))}}this.$updating=!1,this.updateMarkers()}},d.prototype.updateAnchors=function(a){this.pos.onChange(a);for(var l=this.others.length;l--;)this.others[l].onChange(a);this.updateMarkers()},d.prototype.updateMarkers=function(){if(!this.$updating){var a=this,l=this.session,c=function(i,s){l.removeMarker(i.markerId),i.markerId=l.addMarker(new p(i.row,i.column,i.row,i.column+a.length),s,null,!1)};c(this.pos,this.mainClass);for(var u=this.others.length;u--;)c(this.others[u],this.othersClass)}},d.prototype.onCursorChange=function(a){if(!(this.$updating||!this.session)){var l=this.session.selection.getCursor();l.row===this.pos.row&&l.column>=this.pos.column&&l.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",a)):(this.hideOtherMarkers(),this._emit("cursorLeave",a))}},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 a=this.session.getUndoManager(),l=(a.$undoStack||a.$undostack).length-this.$undoStackDepth,c=0;c<l;c++)a.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},d})();w.implement(h.prototype,g),r.PlaceHolder=h}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,m){var p=e("../lib/event"),g=e("../lib/useragent");function w(d,a){return d.row==a.row&&d.column==a.column}function h(d){var a=d.domEvent,l=a.altKey,c=a.shiftKey,u=a.ctrlKey,i=d.getAccelKey(),s=d.getButton();if(u&&g.isMac&&(s=a.button),d.editor.inMultiSelectMode&&s==2){d.editor.textInput.onContextMenu(d.domEvent);return}if(!u&&!l&&!i){s===0&&d.editor.inMultiSelectMode&&d.editor.exitMultiSelectMode();return}if(s===0){var f=d.editor,b=f.selection,x=f.inMultiSelectMode,I=d.getDocumentPosition(),R=b.getCursor(),A=d.inSelection()||b.isEmpty()&&w(I,R),C=d.x,O=d.y,D=function(Q){C=Q.clientX,O=Q.clientY},E=f.session,T=f.renderer.pixelToScreenCoordinates(C,O),B=T,F;if(f.$mouseHandler.$enableJumpToDef)u&&l||i&&l?F=c?"block":"add":l&&f.$blockSelectEnabled&&(F="block");else if(i&&!l){if(F="add",!x&&c)return}else l&&f.$blockSelectEnabled&&(F="block");if(F&&g.isMac&&a.ctrlKey&&f.$mouseHandler.cancelContextMenu(),F=="add"){if(!x&&A)return;if(!x){var N=b.toOrientedRange();f.addSelectionMarker(N)}var $=b.rangeList.rangeAtPoint(I);f.inVirtualSelectionMode=!0,c&&($=null,N=b.ranges[0]||N,f.removeSelectionMarker(N)),f.once("mouseup",function(){var Q=b.toOrientedRange();$&&Q.isEmpty()&&w($.cursor,Q.cursor)?b.substractPoint(Q.cursor):(c?b.substractPoint(N.cursor):N&&(f.removeSelectionMarker(N),b.addRange(N)),b.addRange(Q)),f.inVirtualSelectionMode=!1})}else if(F=="block"){d.stop(),f.inVirtualSelectionMode=!0;var k,L=[],W=function(){var Q=f.renderer.pixelToScreenCoordinates(C,O),le=E.screenToDocumentPosition(Q.row,Q.column,Q.offsetX);w(B,Q)&&w(le,b.lead)||(B=Q,f.selection.moveToPosition(le),f.renderer.scrollCursorIntoView(),f.removeSelectionMarkers(L),L=b.rectangularRangeBlock(B,T),f.$mouseHandler.$clickSelection&&L.length==1&&L[0].isEmpty()&&(L[0]=f.$mouseHandler.$clickSelection.clone()),L.forEach(f.addSelectionMarker,f),f.updateSelectionMarkers())};x&&!i?b.toSingleRange():!x&&i&&(k=b.toOrientedRange(),f.addSelectionMarker(k)),c?T=E.documentToScreenPosition(b.lead):b.moveToPosition(I),B={row:-1,column:-1};var U=function(Q){W(),clearInterval(Z),f.removeSelectionMarkers(L),L.length||(L=[b.toOrientedRange()]),k&&(f.removeSelectionMarker(k),b.toSingleRange(k));for(var le=0;le<L.length;le++)b.addRange(L[le]);f.inVirtualSelectionMode=!1,f.$mouseHandler.$clickSelection=null},q=W;p.capture(f.container,D,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(g){g.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(g){g.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(g){g.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(g){g.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(g){g.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(g){g.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(g){g.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(g){g.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(g){g.multiSelect.rangeCount>1?g.multiSelect.joinSelections():g.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(g){g.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(g){g.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(g){g.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],r.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(g){g.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(g){return g&&g.inMultiSelectMode}}];var p=e("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new p(r.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,r,m){var p=e("./range_list").RangeList,g=e("./range").Range,w=e("./selection").Selection,h=e("./mouse/multi_select_handler").onMouseDown,d=e("./lib/event"),a=e("./lib/lang"),l=e("./commands/multi_select_commands");r.commands=l.defaultCommands.concat(l.multiSelectCommands);var c=e("./search").Search,u=new c;function i(R,A,C){return u.$options.wrap=!0,u.$options.needle=A,u.$options.backwards=C==-1,u.find(R)}var s=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(s.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(R,A){if(R){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add(R),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),A||this.fromOrientedRange(R);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}R.cursor||(R.cursor=R.end);var O=this.rangeList.add(R);return this.$onAddRange(R),O.length&&this.$onRemoveRange(O),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),A||this.fromOrientedRange(R)}},this.toSingleRange=function(R){R=R||this.ranges[0];var A=this.rangeList.removeAll();A.length&&this.$onRemoveRange(A),R&&this.fromOrientedRange(R)},this.substractPoint=function(R){var A=this.rangeList.substractPoint(R);if(A)return this.$onRemoveRange(A),A[0]},this.mergeOverlappingRanges=function(){var R=this.rangeList.merge();R.length&&this.$onRemoveRange(R)},this.$onAddRange=function(R){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(R),this._signal("addRange",{range:R})},this.$onRemoveRange=function(R){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var A=this.rangeList.ranges.pop();R.push(A),this.rangeCount=0}for(var C=R.length;C--;){var O=this.ranges.indexOf(R[C]);this.ranges.splice(O,1)}this._signal("removeRange",{ranges:R}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),A=A||this.ranges[0],A&&!A.isEqual(this.getRange())&&this.fromOrientedRange(A)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new p,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var R=this.ranges.length?this.ranges:[this.getRange()],A=[],C=0;C<R.length;C++){var O=R[C],D=O.start.row,E=O.end.row;if(D===E)A.push(O.clone());else{for(A.push(new g(D,O.start.column,D,this.session.getLine(D).length));++D<E;)A.push(this.getLineRange(D,!0));A.push(new g(E,0,E,O.end.column))}C==0&&!this.isBackwards()&&(A=A.reverse())}this.toSingleRange();for(var C=A.length;C--;)this.addRange(A[C])},this.joinSelections=function(){var R=this.rangeList.ranges,A=R[R.length-1],C=g.fromPoints(R[0].start,A.end);this.toSingleRange(),this.setSelectionRange(C,A.cursor==A.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var R=this.rangeList.ranges,A=R[R.length-1],C=g.fromPoints(R[0].start,A.end);this.toSingleRange(),this.setSelectionRange(C,A.cursor==A.start)}else{var O=this.session.documentToScreenPosition(this.cursor),D=this.session.documentToScreenPosition(this.anchor),E=this.rectangularRangeBlock(O,D);E.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(R,A,C){var O=[],D=R.column<A.column;if(D)var E=R.column,T=A.column,B=R.offsetX,F=A.offsetX;else var E=A.column,T=R.column,B=A.offsetX,F=R.offsetX;var N=R.row<A.row;if(N)var $=R.row,k=A.row;else var $=A.row,k=R.row;E<0&&(E=0),$<0&&($=0),$==k&&(C=!0);for(var L,W=$;W<=k;W++){var U=g.fromPoints(this.session.screenToDocumentPosition(W,E,B),this.session.screenToDocumentPosition(W,T,F));if(U.isEmpty()){if(L&&b(U.end,L))break;L=U.end}U.cursor=D?U.start:U.end,O.push(U)}if(N&&O.reverse(),!C){for(var q=O.length-1;O[q].isEmpty()&&q>0;)q--;if(q>0)for(var Z=0;O[Z].isEmpty();)Z++;for(var Q=q;Q>=Z;Q--)O[Q].isEmpty()&&O.splice(Q,1)}return O}}).call(w.prototype);var f=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(R){R.cursor||(R.cursor=R.end);var A=this.getSelectionStyle();return R.marker=this.session.addMarker(R,"ace_selection",A),this.session.$selectionMarkers.push(R),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,R},this.removeSelectionMarker=function(R){if(R.marker){this.session.removeMarker(R.marker);var A=this.session.$selectionMarkers.indexOf(R);A!=-1&&this.session.$selectionMarkers.splice(A,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(R){for(var A=this.session.$selectionMarkers,C=R.length;C--;){var O=R[C];if(O.marker){this.session.removeMarker(O.marker);var D=A.indexOf(O);D!=-1&&A.splice(D,1)}}this.session.selectionMarkerCount=A.length},this.$onAddRange=function(R){this.addSelectionMarker(R.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(R){this.removeSelectionMarkers(R.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(R){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(l.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(R){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(l.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(R){var A=R.command,C=R.editor;if(C.multiSelect){if(A.multiSelectAction)A.multiSelectAction=="forEach"?O=C.forEachSelection(A,R.args):A.multiSelectAction=="forEachLine"?O=C.forEachSelection(A,R.args,!0):A.multiSelectAction=="single"?(C.exitMultiSelectMode(),O=A.exec(C,R.args||{})):O=A.multiSelectAction(C,R.args||{});else{var O=A.exec(C,R.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return O}},this.forEachSelection=function(R,A,C){if(!this.inVirtualSelectionMode){var O=C&&C.keepOrder,D=C==!0||C&&C.$byLines,E=this.session,T=this.selection,B=T.rangeList,F=(O?T:B).ranges,N;if(!F.length)return R.exec?R.exec(this,A||{}):R(this,A||{});var $=T._eventRegistry;T._eventRegistry={};var k=new w(E);this.inVirtualSelectionMode=!0;for(var L=F.length;L--;){if(D)for(;L>0&&F[L].start.row==F[L-1].end.row;)L--;k.fromOrientedRange(F[L]),k.index=L,this.selection=E.selection=k;var W=R.exec?R.exec(this,A||{}):R(this,A||{});!N&&W!==void 0&&(N=W),k.toOrientedRange(F[L])}k.detach(),this.selection=E.selection=T,this.inVirtualSelectionMode=!1,T._eventRegistry=$,T.mergeOverlappingRanges(),T.ranges[0]&&T.fromOrientedRange(T.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 R="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var A=this.multiSelect.rangeList.ranges,C=[],O=0;O<A.length;O++)C.push(this.session.getTextRange(A[O]));var D=this.session.getDocument().getNewLineCharacter();R=C.join(D),R.length==(C.length-1)*D.length&&(R="")}else this.selection.isEmpty()||(R=this.session.getTextRange(this.getSelectionRange()));return R},this.$checkMultiselectChange=function(R,A){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&A==this.multiSelect.anchor)return;var O=A==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;O.row!=A.row||this.session.$clipPositionToDocument(O.row,O.column).column!=A.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(R,A,C){if(A=A||{},A.needle=R||A.needle,A.needle==null){var O=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();A.needle=this.session.getTextRange(O)}this.$search.set(A);var D=this.$search.findAll(this.session);if(!D.length)return 0;var E=this.multiSelect;C||E.toSingleRange(D[0]);for(var T=D.length;T--;)E.addRange(D[T],!0);return O&&E.rangeList.rangeAtPoint(O.start)&&E.addRange(O,!0),D.length},this.selectMoreLines=function(R,A){var C=this.selection.toOrientedRange(),O=C.cursor==C.end,D=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(D.column=this.selection.$desiredColumn);var E=this.session.screenToDocumentPosition(D.row+R,D.column);if(C.isEmpty())var B=E;else var T=this.session.documentToScreenPosition(O?C.end:C.start),B=this.session.screenToDocumentPosition(T.row+R,T.column);if(O){var F=g.fromPoints(E,B);F.cursor=F.start}else{var F=g.fromPoints(B,E);F.cursor=F.end}if(F.desiredColumn=D.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(A)var N=C.cursor;this.selection.addRange(F),N&&this.selection.substractPoint(N)},this.transposeSelections=function(R){for(var A=this.session,C=A.multiSelect,O=C.ranges,D=O.length;D--;){var E=O[D];if(E.isEmpty()){var T=A.getWordRange(E.start.row,E.start.column);E.start.row=T.start.row,E.start.column=T.start.column,E.end.row=T.end.row,E.end.column=T.end.column}}C.mergeOverlappingRanges();for(var B=[],D=O.length;D--;){var E=O[D];B.unshift(A.getTextRange(E))}R<0?B.unshift(B.pop()):B.push(B.shift());for(var D=O.length;D--;){var E=O[D],F=E.clone();A.replace(E,B[D]),E.start.row=F.start.row,E.start.column=F.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function(R,A,C){var O=this.session,D=O.multiSelect,E=D.toOrientedRange();if(!(E.isEmpty()&&(E=O.getWordRange(E.start.row,E.start.column),E.cursor=R==-1?E.start:E.end,this.multiSelect.addRange(E),C))){var T=O.getTextRange(E),B=i(O,T,R);B&&(B.cursor=R==-1?B.start:B.end,this.session.unfold(B),this.multiSelect.addRange(B),this.renderer.scrollCursorIntoView(null,.5)),A&&this.multiSelect.substractPoint(E.cursor)}},this.alignCursors=function(){var R=this.session,A=R.multiSelect,C=A.ranges,O=-1,D=C.filter(function(q){if(q.cursor.row==O)return!0;O=q.cursor.row});if(!C.length||D.length==C.length-1){var E=this.selection.getRange(),T=E.start.row,B=E.end.row,F=T==B;if(F){var N=this.session.getLength(),$;do $=this.session.getLine(B);while(/[=:]/.test($)&&++B<N);do $=this.session.getLine(T);while(/[=:]/.test($)&&--T>0);T<0&&(T=0),B>=N&&(B=N-1)}var k=this.session.removeFullLines(T,B);k=this.$reAlignText(k,F),this.session.insert({row:T,column:0},k.join(`
954
+ `)+`
955
+ `),F||(E.start.column=0,E.end.column=k[k.length-1].length),this.selection.setRange(E)}else{D.forEach(function(q){A.substractPoint(q.cursor)});var L=0,W=1/0,U=C.map(function(q){var Z=q.cursor,Q=R.getLine(Z.row),le=Q.substr(Z.column).search(/\S/g);return le==-1&&(le=0),Z.column>L&&(L=Z.column),le<W&&(W=le),le});C.forEach(function(q,Z){var Q=q.cursor,le=L-Q.column,ne=U[Z]-W;le>ne?R.insert(Q,a.stringRepeat(" ",le-ne)):R.remove(new g(Q.row,Q.column,Q.row,Q.column-le+ne)),q.start.column=q.end.column=L,q.start.row=q.end.row=Q.row,q.cursor=q.end}),A.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(R,A){var C=!0,O=!0,D,E,T;return R.map(function(k){var L=k.match(/(\s*)(.*?)(\s*)([=:].*)/);return L?D==null?(D=L[1].length,E=L[2].length,T=L[3].length,L):(D+E+T!=L[1].length+L[2].length+L[3].length&&(O=!1),D!=L[1].length&&(C=!1),D>L[1].length&&(D=L[1].length),E<L[2].length&&(E=L[2].length),T>L[3].length&&(T=L[3].length),L):[k]}).map(A?F:C?O?N:F:$);function B(k){return a.stringRepeat(" ",k)}function F(k){return k[2]?B(D)+k[2]+B(E-k[2].length+T)+k[4].replace(/^([=:])\s+/,"$1 "):k[0]}function N(k){return k[2]?B(D+E-k[2].length)+k[2]+B(T)+k[4].replace(/^([=:])\s+/,"$1 "):k[0]}function $(k){return k[2]?B(D)+k[2]+B(T)+k[4].replace(/^([=:])\s+/,"$1 "):k[0]}}}).call(f.prototype);function b(R,A){return R.row==A.row&&R.column==A.column}r.onSessionChange=function(R){var A=R.session;A&&!A.multiSelect&&(A.$selectionMarkers=[],A.selection.$initRangeList(),A.multiSelect=A.selection),this.multiSelect=A&&A.multiSelect;var C=R.oldSession;C&&(C.multiSelect.off("addRange",this.$onAddRange),C.multiSelect.off("removeRange",this.$onRemoveRange),C.multiSelect.off("multiSelect",this.$onMultiSelect),C.multiSelect.off("singleSelect",this.$onSingleSelect),C.multiSelect.lead.off("change",this.$checkMultiselectChange),C.multiSelect.anchor.off("change",this.$checkMultiselectChange)),A&&(A.multiSelect.on("addRange",this.$onAddRange),A.multiSelect.on("removeRange",this.$onRemoveRange),A.multiSelect.on("multiSelect",this.$onMultiSelect),A.multiSelect.on("singleSelect",this.$onSingleSelect),A.multiSelect.lead.on("change",this.$checkMultiselectChange),A.multiSelect.anchor.on("change",this.$checkMultiselectChange)),A&&this.inMultiSelectMode!=A.selection.inMultiSelectMode&&(A.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function x(R){R.$multiselectOnSessionChange||(R.$onAddRange=R.$onAddRange.bind(R),R.$onRemoveRange=R.$onRemoveRange.bind(R),R.$onMultiSelect=R.$onMultiSelect.bind(R),R.$onSingleSelect=R.$onSingleSelect.bind(R),R.$multiselectOnSessionChange=r.onSessionChange.bind(R),R.$checkMultiselectChange=R.$checkMultiselectChange.bind(R),R.$multiselectOnSessionChange(R),R.on("changeSession",R.$multiselectOnSessionChange),R.on("mousedown",h),R.commands.addCommands(l.defaultCommands),I(R))}function I(R){if(!R.textInput)return;var A=R.textInput.getElement(),C=!1;d.addListener(A,"keydown",function(D){var E=D.keyCode==18&&!(D.ctrlKey||D.shiftKey||D.metaKey);R.$blockSelectEnabled&&E?C||(R.renderer.setMouseCursor("crosshair"),C=!0):C&&O()},R),d.addListener(A,"keyup",O,R),d.addListener(A,"blur",O,R);function O(D){C&&(R.renderer.setMouseCursor(""),C=!1)}}r.MultiSelect=x,e("./config").defineOptions(f.prototype,"editor",{enableMultiselect:{set:function(R){x(this),R?this.on("mousedown",h):this.off("mousedown",h)},value:!0},enableBlockSelect:{set:function(R){this.$blockSelectEnabled=R},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,r,m){var p=e("../../range").Range,g=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(w,h,d){var a=w.getLine(d);return this.foldingStartMarker.test(a)?"start":h=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(a)?"end":""},this.getFoldWidgetRange=function(w,h,d){return null},this.indentationBlock=function(w,h,d){var a=/\S/,l=w.getLine(h),c=l.search(a);if(c!=-1){for(var u=d||l.length,i=w.getLength(),s=h,f=h;++h<i;){var b=w.getLine(h).search(a);if(b!=-1){if(b<=c){var x=w.getTokenAt(h,0);if(!x||x.type!=="string")break}f=h}}if(f>s){var I=w.getLine(f).length;return new p(s,u,f,I)}}},this.openingBracketBlock=function(w,h,d,a,l){var c={row:d,column:a+1},u=w.$findClosingBracket(h,c,l);if(u){var i=w.foldWidgets[u.row];return i==null&&(i=w.getFoldWidget(u.row)),i=="start"&&u.row>c.row&&(u.row--,u.column=w.getLine(u.row).length),p.fromPoints(c,u)}},this.closingBracketBlock=function(w,h,d,a,l){var c={row:d,column:a},u=w.$findOpeningBracket(h,c);if(u)return u.column++,c.column--,p.fromPoints(u,c)}}).call(g.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(e,r,m){var p=e("../lib/dom"),g=e("../range").Range,w=e("../config").nls;function h(a,l,c){for(var u=0,i=a.length-1;u<=i;){var s=u+i>>1,f=c(l,a[s]);if(f>0)u=s+1;else if(f<0)i=s-1;else return s}return-(u+1)}function d(a,l,c){var u=a.getAnnotations().sort(g.comparePoints);if(u.length){var i=h(u,{row:l,column:-1},g.comparePoints);i<0&&(i=-i-1),i>=u.length?i=c>0?0:u.length-1:i===0&&c<0&&(i=u.length-1);var s=u[i];if(!(!s||!c)){if(s.row===l){do s=u[i+=c];while(s&&s.row===l);if(!s)return u.slice()}var f=[];l=s.row;do f[c<0?"unshift":"push"](s),s=u[i+=c];while(s&&s.row==l);return f.length&&f}}}r.showErrorMarker=function(a,l){var c=a.session,u=a.getCursorPosition(),i=u.row,s=c.widgetManager.getWidgetsAtRow(i).filter(function(D){return D.type=="errorMarker"})[0];s?s.destroy():i-=l;var f=d(c,i,l),b;if(f){var x=f[0];u.column=(x.pos&&typeof x.column!="number"?x.pos.sc:x.column)||0,u.row=x.row,b=a.renderer.$gutterLayer.$annotations[u.row]}else{if(s)return;b={displayText:[w("error-marker.good-state","Looks good!")],className:"ace_ok"}}a.session.unfold(u.row),a.selection.moveToPosition(u);var I={row:u.row,fixedWidth:!0,coverGutter:!0,el:p.createElement("div"),type:"errorMarker"},R=I.el.appendChild(p.createElement("div")),A=I.el.appendChild(p.createElement("div"));A.className="error_widget_arrow "+b.className;var C=a.renderer.$cursorLayer.getPixelPosition(u).left;A.style.left=C+a.renderer.gutterWidth-5+"px",I.el.className="error_widget_wrapper",R.className="error_widget "+b.className,b.displayText.forEach(function(D,E){R.appendChild(p.createTextNode(D)),E<b.displayText.length-1&&R.appendChild(p.createElement("br"))}),R.appendChild(p.createElement("div"));var O=function(D,E,T){if(E===0&&(T==="esc"||T==="return"))return I.destroy(),{command:"null"}};I.destroy=function(){a.$mouseHandler.isMousePressed||(a.keyBinding.removeKeyboardHandler(O),c.widgetManager.removeLineWidget(I),a.off("changeSelection",I.destroy),a.off("changeSession",I.destroy),a.off("mouseup",I.destroy),a.off("change",I.destroy))},a.keyBinding.addKeyboardHandler(O),a.on("changeSelection",I.destroy),a.on("changeSession",I.destroy),a.on("mouseup",I.destroy),a.on("change",I.destroy),a.session.widgetManager.addLineWidget(I),I.el.onmousedown=a.focus.bind(a),a.renderer.scrollCursorIntoView(null,.5,{bottom:I.el.offsetHeight})},p.importCssString(`
956
+ .error_widget_wrapper {
957
+ background: inherit;
958
+ color: inherit;
959
+ border:none
960
+ }
961
+ .error_widget {
962
+ border-top: solid 2px;
963
+ border-bottom: solid 2px;
964
+ margin: 5px 0;
965
+ padding: 10px 40px;
966
+ white-space: pre-wrap;
967
+ }
968
+ .error_widget.ace_error, .error_widget_arrow.ace_error{
969
+ border-color: #ff5a5a
970
+ }
971
+ .error_widget.ace_warning, .error_widget_arrow.ace_warning{
972
+ border-color: #F1D817
973
+ }
974
+ .error_widget.ace_info, .error_widget_arrow.ace_info{
975
+ border-color: #5a5a5a
976
+ }
977
+ .error_widget.ace_ok, .error_widget_arrow.ace_ok{
978
+ border-color: #5aaa5a
979
+ }
980
+ .error_widget_arrow {
981
+ position: absolute;
982
+ border: solid 5px;
983
+ border-top-color: transparent!important;
984
+ border-right-color: transparent!important;
985
+ border-left-color: transparent!important;
986
+ top: -5px;
987
+ }
988
+ `,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(e,r,m){e("./loader_build")(r);var p=e("./lib/dom"),g=e("./range").Range,w=e("./editor").Editor,h=e("./edit_session").EditSession,d=e("./undomanager").UndoManager,a=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),r.config=e("./config"),r.edit=function(c,u){if(typeof c=="string"){var i=c;if(c=document.getElementById(i),!c)throw new Error("ace.edit can't find div #"+i)}if(c&&c.env&&c.env.editor instanceof w)return c.env.editor;var s="";if(c&&/input|textarea/i.test(c.tagName)){var f=c;s=f.value,c=p.createElement("pre"),f.parentNode.replaceChild(c,f)}else c&&(s=c.textContent,c.innerHTML="");var b=r.createEditSession(s),x=new w(new a(c),b,u),I={document:b,editor:x,onResize:x.resize.bind(x,null)};return f&&(I.textarea=f),x.on("destroy",function(){I.editor.container.env=null}),x.container.env=x.env=I,x},r.createEditSession=function(c,u){var i=new h(c,u);return i.setUndoManager(new d),i},r.Range=g,r.Editor=w,r.EditSession=h,r.UndoManager=d,r.VirtualRenderer=a;var l=r.config.version;r.version=l}),(function(){ace.require(["ace/ace"],function(e){e&&(e.config.init(!0),e.define=ace.define);var r=(function(){return this})();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=e);for(var m in e)e.hasOwnProperty(m)&&(r.ace[m]=e[m]);r.ace.default=r.ace,t&&(t.exports=r.ace)})})()})(rg)),rg.exports}var M2=Tn("m",pk()),og={exports:{}},sg;function gk(){return sg||(sg=1,(function(t,n){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var p=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,w=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/},a=r.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},l=r.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},c=r.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},u=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},i=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},s=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},f=function(){var b="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",x="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",I="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",R="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",A=this.$keywords=this.createKeywordMapper({keyword:x,"constant.language":I,"variable.language":R,"support.function":b,"invalid.deprecated":"debugger"},"identifier"),C=`\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})`,O={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:C},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(D,E,T){T.length&&(T=[]);var B=D[D.length-1];return T.unshift(B,E),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(D,E,T){T.length&&(T=[]);var B=D[D.length-1];return T.unshift(B,E),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(D,E,T){T.length&&(T=[]);var B=D[D.length-1];return T.unshift(B,E),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(D,E,T){T.length&&(T=[]);var B=D[D.length-1];return T.unshift(B,E),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(D,E,T){T.length&&(T=[]);var B=D[D.length-1];return T.unshift(B,E),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},s,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+C+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},c,u,w,h,i,d,a,l,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:A,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(D,E,T){var B=D[2]=="-"||D[2]=="~"?"indentedHeredoc":"heredoc",F=D.split(this.splitRegex);return T.push(B,F[3]),[{type:"constant",value:F[1]},{type:"string",value:F[2]},{type:"support.class",value:F[3]},{type:"string",value:F[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(D,E,T){return D===T[1]?(T.shift(),T.shift(),this.next=T[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(D,E,T){return D===T[1]?(T.shift(),T.shift(),this.next=T[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(D,E){return E[0]==="heredoc"||E[0]==="indentedHeredoc"?E[0]:D}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(D,E,T){return this.next="",D=="}"&&T.length>1&&T[1]!="start"&&(T.shift(),this.next=T.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(D,E,T){return T.length&&D===T[0]?(T.unshift(D,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(D,E,T){return T.length&&D===O[T[0]]?(T.shift(),this.next=T.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(D,E,T){return T.length&&D===T[0]?(T.unshift(D,E),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(D,E,T){return T.length&&D===O[T[0]]?(T.shift(),this.next=T.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(D,E,T){return T.length&&D===T[0]?(T.unshift(D,E),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(D,E,T){return T.length&&D===O[T[0]]?(T.shift(),this.next=T.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(D,E,T){return T.length&&D===T[0]?(T.unshift(D,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(D,E,T){return T.length&&D===O[T[0]]?(T.shift(),this.next=T.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(D,E,T){return T.length&&D===T[0]?(T.unshift(D,E),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(D,E,T){return T.length&&D[0]===O[T[0]]?(T.shift(),this.next=T.shift(),this.token):(this.next="","constant.language.escape")}},{include:"regex"},{defaultToken:"string.regexp"}],regex:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"constant.language.escape",regex:/\\[AGbBzZ]/},{token:"constant.language.escape",regex:/\\g<[a-zA-Z0-9]*>/},{token:["constant.language.escape","regexp.keyword","constant.language.escape"],regex:/(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/},{token:["constant.language.escape","invalid","constant.language.escape"],regex:/(\\p{\^?)([^/]*)(})/},{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:/[/][imxouesn]*/,next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"regexp.keyword",regex:/\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/},{token:"constant.language.escape",regex:/\[\^?/,push:"regex_character_class"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:/&?&?\[\^?/,push:"regex_character_class"},{token:"constant.language.escape",regex:"]",next:"pop"},{token:"constant.language.escape",regex:"-"},{defaultToken:"string.regexp.characterclass"}]},this.normalizeRules()};p.inherits(f,g),r.RubyHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,m){var p=e("../range").Range,g=function(){};(function(){this.checkOutdent=function(w,h){return/^\s+$/.test(w)?/^\s*\}/.test(h):!1},this.autoOutdent=function(w,h){var d=w.getLine(h),a=d.match(/^(\s*\})/);if(!a)return 0;var l=a[1].length,c=w.findMatchingBracket({row:h,column:l});if(!c||c.row==h)return 0;var u=this.$getIndent(w.getLine(c.row));w.replace(new p(h,0,h,l-1),u)},this.$getIndent=function(w){return w.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,r,m){var p=e("../../lib/oop"),g=e("./fold_mode").FoldMode,w=e("../../range").Range,h=e("../../token_iterator").TokenIterator,d=r.FoldMode=function(){};p.inherits(d,g),(function(){this.indentKeywords={class:1,def:1,module:1,do:1,unless:1,if:1,while:1,for:1,until:1,begin:1,else:0,elsif:0,rescue:0,ensure:0,when:0,end:-1,case:1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(a,l,c){var u=a.getLine(c),i=this.foldingStartMarker.test(u),s=this.foldingStopMarker.test(u);if(i&&!s){var f=u.match(this.foldingStartMarker);if(f[1]){if((f[1]=="if"||f[1]=="else"||f[1]=="while"||f[1]=="until"||f[1]=="unless")&&(f[1]=="else"&&/^\s*else\s*$/.test(u)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(u)===!1)||f[1]=="when"&&/\sthen\s/.test(u)===!0)return;if(a.getTokenAt(c,f.index+2).type==="keyword")return"start"}else if(!f[3]||a.getTokenAt(c,f.index+1).type==="comment.multiline")return"start"}if(l!="markbeginend"||!s||i&&s)return"";var f=u.match(this.foldingStopMarker);if(f[3]==="end"){if(a.getTokenAt(c,f.index+1).type==="keyword")return"end"}else if(!f[1]||a.getTokenAt(c,f.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(a,l,c){var u=a.doc.getLine(c),i=this.foldingStartMarker.exec(u);if(i)return i[1]||i[3]?this.rubyBlock(a,c,i.index+2):this.openingBracketBlock(a,"{",c,i.index);var i=this.foldingStopMarker.exec(u);if(i)return i[3]==="end"&&a.getTokenAt(c,i.index+1).type==="keyword"?this.rubyBlock(a,c,i.index+1):i[1]==="=end"&&a.getTokenAt(c,i.index+1).type==="comment.multiline"?this.rubyBlock(a,c,i.index+1):this.closingBracketBlock(a,"}",c,i.index+i[0].length)},this.rubyBlock=function(a,l,c,u){var i=new h(a,l,c),s=i.getCurrentToken();if(!(!s||s.type!="keyword"&&s.type!="comment.multiline")){var f=s.value,b=a.getLine(l);switch(s.value){case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+s.value);if(!x.test(b))return;var I=this.indentKeywords[f];break;case"when":if(/\sthen\s/.test(b))return;case"elsif":case"rescue":case"ensure":var I=1;break;case"else":var x=new RegExp("^\\s*"+s.value+"\\s*$");if(!x.test(b))return;var I=1;break;default:var I=this.indentKeywords[f]}var R=[f];if(I){var A=I===-1?a.getLine(l-1).length:a.getLine(l).length,C=l,O=[];if(O.push(i.getCurrentTokenRange()),i.step=I===-1?i.stepBackward:i.stepForward,s.type=="comment.multiline"){for(;s=i.step();)if(s.type==="comment.multiline"){if(I==1){if(A=6,s.value=="=end")break}else if(s.value=="=begin")break}}else for(;s=i.step();){var D=!1;if(s.type==="keyword"){var E=I*this.indentKeywords[s.value];switch(b=a.getLine(i.getCurrentTokenRow()),s.value){case"do":for(var T=i.$tokenIndex-1;T>=0;T--){var B=i.$rowTokens[T];if(B&&(B.value=="while"||B.value=="until"||B.value=="for")){E=0;break}}break;case"else":var x=new RegExp("^\\s*"+s.value+"\\s*$");(!x.test(b)||f=="case")&&(E=0,D=!0);break;case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+s.value);x.test(b)||(E=0,D=!0);break;case"when":(/\sthen\s/.test(b)||f=="case")&&(E=0,D=!0)}if(E>0)R.unshift(s.value);else if(E<=0&&D===!1){if(R.shift(),!R.length&&((f=="while"||f=="until"||f=="for")&&s.value!="do"||s.value=="do"&&I==-1&&E!=0||s.value!="do"))break;E===0&&R.unshift(s.value)}}}if(!s)return null;if(u)return O.push(i.getCurrentTokenRange()),O;var l=i.getCurrentTokenRow();if(I===-1){if(s.type==="comment.multiline")var F=6;else var F=a.getLine(l).length;return new w(l,F,C-1,A)}return new w(C,A,l-1,a.getLine(l-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 p=e("../lib/oop"),g=e("./text").Mode,w=e("./ruby_highlight_rules").RubyHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,d=e("../range").Range,a=e("./folding/ruby").FoldMode,l=function(){this.HighlightRules=w,this.$outdent=new h,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new a,this.indentKeywords=this.foldingRules.indentKeywords};p.inherits(l,g),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(c,u,i){var s=this.$getIndent(u),f=this.getTokenizer().getLineTokens(u,c),b=f.tokens;if(b.length&&b[b.length-1].type=="comment")return s;if(c=="start"){var x=u.match(/^.*[\{\(\[]\s*$/),I=u.match(/^\s*(class|def|module)\s.*$/),R=u.match(/.*do(\s*|\s+\|.*\|\s*)$/),A=u.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(x||I||R||A)&&(s+=i)}return s},this.checkOutdent=function(c,u,i){return/^\s+(end|else|rescue|ensure)$/.test(u+i)||this.$outdent.checkOutdent(u,i)},this.autoOutdent=function(c,u,i){var s=u.getLine(i);if(/}/.test(s))return this.$outdent.autoOutdent(u,i);var f=this.$getIndent(s),b=u.getLine(i-1),x=this.$getIndent(b),I=u.getTabString();x.length<=f.length&&f.slice(-I.length)==I&&u.remove(new d(i,f.length-I.length,i,f.length))},this.getMatching=function(c,u,i){if(u==null){var s=c.selection.lead;i=s.column,u=s.row}var f=c.getTokenAt(u,i);if(f&&f.value in this.indentKeywords)return this.foldingRules.rubyBlock(c,u,i,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(l.prototype),r.Mode=l}),(function(){ace.require(["ace/mode/ruby"],function(e){t&&(t.exports=e)})})()})(og)),og.exports}gk();var ag={exports:{}},lg;function mk(){return lg||(lg=1,(function(t,n){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var p=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,w=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__",a="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",l=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":a,"variable.language":"self|cls","constant.language":d,keyword:h},"identifier"),c="[uU]?",u="[rR]",i="[fF]",s="(?:[rR][fF]|[fF][rR])",f="(?:(?:[1-9]\\d*)|(?:0))",b="(?:0[oO]?[0-7]+)",x="(?:0[xX][\\dA-Fa-f]+)",I="(?:0[bB][01]+)",R="(?:"+f+"|"+b+"|"+x+"|"+I+")",A="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",O="(?:\\d+)",D="(?:(?:"+O+"?"+C+")|(?:"+O+"\\.))",E="(?:(?:"+D+"|"+O+")"+A+")",T="(?:"+E+"|"+D+")",B=`\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})`;this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:c+'"{3}',next:"qqstring3"},{token:"string",regex:c+'"(?=.)',next:"qqstring"},{token:"string",regex:c+"'{3}",next:"qstring3"},{token:"string",regex:c+"'(?=.)",next:"qstring"},{token:"string",regex:u+'"{3}',next:"rawqqstring3"},{token:"string",regex:u+'"(?=.)',next:"rawqqstring"},{token:"string",regex:u+"'{3}",next:"rawqstring3"},{token:"string",regex:u+"'(?=.)",next:"rawqstring"},{token:"string",regex:i+'"{3}',next:"fqqstring3"},{token:"string",regex:i+'"(?=.)',next:"fqqstring"},{token:"string",regex:i+"'{3}",next:"fqstring3"},{token:"string",regex:i+"'(?=.)",next:"fqstring"},{token:"string",regex:s+'"{3}',next:"rfqqstring3"},{token:"string",regex:s+'"(?=.)',next:"rfqqstring"},{token:"string",regex:s+"'{3}",next:"rfqstring3"},{token:"string",regex:s+"'(?=.)",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:B},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:B},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:B},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:B},{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:B},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:B},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:B},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:B},{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:"(?:"+T+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:T},{token:"constant.numeric",regex:R+"[lL]\\b"},{token:"constant.numeric",regex:R+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:l,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};p.inherits(w,g),r.PythonHighlightRules=w}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,m){var p=e("../../lib/oop"),g=e("./fold_mode").FoldMode,w=r.FoldMode=function(h){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+h+")(?:\\s*)(?:#.*)?$")};p.inherits(w,g),(function(){this.getFoldWidgetRange=function(h,d,a){var l=h.getLine(a),c=l.match(this.foldingStartMarker);if(c)return c[1]?this.openingBracketBlock(h,c[1],a,c.index):c[2]?this.indentationBlock(h,a,c.index+c[2].length):this.indentationBlock(h,a)}}).call(w.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 p=e("../lib/oop"),g=e("./text").Mode,w=e("./python_highlight_rules").PythonHighlightRules,h=e("./folding/pythonic").FoldMode,d=e("../range").Range,a=function(){this.HighlightRules=w,this.foldingRules=new h("\\:"),this.$behaviour=this.$defaultBehaviour};p.inherits(a,g),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(c,u,i){var s=this.$getIndent(u),f=this.getTokenizer().getLineTokens(u,c),b=f.tokens;if(b.length&&b[b.length-1].type=="comment")return s;if(c=="start"){var x=u.match(/^.*[\{\(\[:]\s*$/);x&&(s+=i)}return s};var l={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(c,u,i){if(i!==`\r
989
+ `&&i!=="\r"&&i!==`
990
+ `)return!1;var s=this.getTokenizer().getLineTokens(u.trim(),c).tokens;if(!s)return!1;do var f=s.pop();while(f&&(f.type=="comment"||f.type=="text"&&f.value.match(/^\s+$/)));return f?f.type=="keyword"&&l[f.value]:!1},this.autoOutdent=function(c,u,i){i+=1;var s=this.$getIndent(u.getLine(i)),f=u.getTabString();s.slice(-f.length)==f&&u.remove(new d(i,s.length-f.length,i,s.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/python"],function(e){t&&(t.exports=e)})})()})(ag)),ag.exports}mk();var cg={exports:{}},ug;function vk(){return ug||(ug=1,(function(t,n){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var p=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,w=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};p.inherits(w,g),r.JsonHighlightRules=w}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,m){var p=e("../range").Range,g=function(){};(function(){this.checkOutdent=function(w,h){return/^\s+$/.test(w)?/^\s*\}/.test(h):!1},this.autoOutdent=function(w,h){var d=w.getLine(h),a=d.match(/^(\s*\})/);if(!a)return 0;var l=a[1].length,c=w.findMatchingBracket({row:h,column:l});if(!c||c.row==h)return 0;var u=this.$getIndent(w.getLine(c.row));w.replace(new p(h,0,h,l-1),u)},this.$getIndent=function(w){return w.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,r,m){var p=e("../../lib/oop"),g=e("../../range").Range,w=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)))};p.inherits(h,w),(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,a,l){var c=d.getLine(l);if(this.singleLineBlockCommentRe.test(c)&&!this.startRegionRe.test(c)&&!this.tripleStarBlockCommentRe.test(c))return"";var u=this._getFoldWidgetBase(d,a,l);return!u&&this.startRegionRe.test(c)?"start":u},this.getFoldWidgetRange=function(d,a,l,c){var u=d.getLine(l);if(this.startRegionRe.test(u))return this.getCommentRegionBlock(d,u,l);var i=u.match(this.foldingStartMarker);if(i){var s=i.index;if(i[1])return this.openingBracketBlock(d,i[1],l,s);var f=d.getCommentFoldRange(l,s+i[0].length,1);return f&&!f.isMultiLine()&&(c?f=this.getSectionRange(d,l):a!="all"&&(f=null)),f}if(a!=="markbegin"){var i=u.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(d,i[1],l,s):d.getCommentFoldRange(l,s,-1)}}},this.getSectionRange=function(d,a){var l=d.getLine(a),c=l.search(/\S/),u=a,i=l.length;a+=1;for(var s=a,f=d.getLength();++a<f;){l=d.getLine(a);var b=l.search(/\S/);if(b!==-1){if(c>b)break;var x=this.getFoldWidgetRange(d,"all",a);if(x){if(x.start.row<=u)break;if(x.isMultiLine())a=x.end.row;else if(c==b)break}s=a}}return new g(u,i,s,d.getLine(s).length)},this.getCommentRegionBlock=function(d,a,l){for(var c=a.search(/\s*$/),u=d.getLength(),i=l,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,f=1;++l<u;){a=d.getLine(l);var b=s.exec(a);if(b&&(b[1]?f--:f++,!f))break}var x=l;if(x>i)return new g(i,c,x,a.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 p=e("../lib/oop"),g=e("./text").Mode,w=e("./json_highlight_rules").JsonHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,d=e("./folding/cstyle").FoldMode,a=e("../worker/worker_client").WorkerClient,l=function(){this.HighlightRules=w,this.$outdent=new h,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new d};p.inherits(l,g),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(c,u,i){var s=this.$getIndent(u);if(c=="start"){var f=u.match(/^.*[\{\(\[]\s*$/);f&&(s+=i)}return s},this.checkOutdent=function(c,u,i){return this.$outdent.checkOutdent(u,i)},this.autoOutdent=function(c,u,i){this.$outdent.autoOutdent(u,i)},this.createWorker=function(c){var u=new a(["ace"],"ace/mode/json_worker","JsonWorker");return u.attachToDocument(c.getDocument()),u.on("annotate",function(i){c.setAnnotations(i.data)}),u.on("terminate",function(){c.clearAnnotations()}),u},this.$id="ace/mode/json"}).call(l.prototype),r.Mode=l}),(function(){ace.require(["ace/mode/json"],function(e){t&&(t.exports=e)})})()})(cg)),cg.exports}vk();var hg={exports:{}},dg;function yk(){return dg||(dg=1,(function(t,n){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 p=e("../lib/oop");e("../lib/lang");var g=e("./text_highlight_rules").TextHighlightRules,w=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",a=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",l=r.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",u=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",i=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",s=function(){var f=this.createKeywordMapper({"support.function":h,"support.constant":d,"support.type":w,"support.constant.color":a,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:u},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:i},{include:"url"},{token:f,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};p.inherits(s,g),r.CssHighlightRules=s}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var p=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,w=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|$)"},w.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};p.inherits(w,g),w.getTagRule=function(h){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},w.getStartRule=function(h){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:h}},w.getEndRule=function(h){return{token:"comment.doc",regex:"\\*\\/",next:h}},r.JsDocCommentHighlightRules=w}),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 p(){var c=a.replace("\\d","\\d\\-"),u={onMatch:function(s,f,b){var x=s.charAt(1)=="/"?2:1;return x==1?(f!=this.nextState?b.unshift(this.next,this.nextState,0):b.unshift(this.next),b[2]++):x==2&&f==this.nextState&&(b[1]--,(!b[1]||b[1]<0)&&(b.shift(),b.shift())),[{type:"meta.tag.punctuation."+(x==1?"":"end-")+"tag-open.xml",value:s.slice(0,x)},{type:"meta.tag.tag-name.xml",value:s.substr(x)}]},regex:"</?(?:"+c+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(u);var i={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[i,u,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(s,f,b){return f==b[0]&&b.shift(),s.length==2&&(b[0]==this.nextState&&b[1]--,(!b[1]||b[1]<0)&&b.splice(0,2)),this.next=b[0]||"start",[{type:this.token,value:s}]},nextState:"jsx"},i,g("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:c},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},u],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function g(c){return[{token:"comment",regex:/\/\*/,next:[h.getTagRule(),{token:"comment",regex:"\\*\\/",next:c||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[h.getTagRule(),{token:"comment",regex:"$|^",next:c||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var w=e("../lib/oop"),h=e("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,d=e("./text_highlight_rules").TextHighlightRules,a="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",l=function(c){var u={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},i=this.createKeywordMapper(u,"identifier"),s="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",f="\\\\(?: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]?|.)",b="(function)(\\s*)(\\*?)",x={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(u).join("|")+"\\b)"+a+")(\\s*)(\\()"};this.$rules={no_regex:[h.getStartRule("doc-start"),g("no_regex"),x,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(=)(\\s*)"+b+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+a+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(:)(\\s*)"+b+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+b+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+s+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:i,regex:a},{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:b+"(\\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:a},{regex:"",token:"empty",next:"no_regex"}],start:[h.getStartRule("doc-start"),g("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[g("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:f},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:f},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!c||!c.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(I,R,A){if(this.next=I=="{"?this.nextState:"",I=="{"&&A.length)A.unshift("start",R);else if(I=="}"&&A.length&&(A.shift(),this.next=A.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return I=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:f},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!c||c.jsx!=0)&&p.call(this)),this.embedRules(h,"doc-",[h.getEndRule("no_regex")]),this.normalizeRules()};w.inherits(l,d),r.JavaScriptHighlightRules=l}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var p=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,w=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===w&&this.normalizeRules()};(function(){this.embedTagRules=function(h,d,a){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+a+".tag-name.xml"],regex:"(<)("+a+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:d+"start"}]}),this.$rules[a+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(l,c,u){return u.splice(0),this.token}}],this.embedRules(h,d,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+a+".tag-name.xml"],regex:"(</)("+a+"(?=\\s|>|$))",next:a+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(g.prototype),p.inherits(w,g),r.XmlHighlightRules=w}),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 p=e("../lib/oop"),g=e("../lib/lang"),w=e("./css_highlight_rules").CssHighlightRules,h=e("./javascript_highlight_rules").JavaScriptHighlightRules,d=e("./xml_highlight_rules").XmlHighlightRules,a=g.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),l=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(c,u){var i=a[u];return["meta.tag.punctuation."+(c=="<"?"":"end-")+"tag-open.xml","meta.tag"+(i?"."+i:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(w,"css-","style"),this.embedTagRules(new h({jsx:!1}).getRules(),"js-","script"),this.constructor===l&&this.normalizeRules()};p.inherits(l,d),r.HtmlHighlightRules=l}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,r,m){var p=e("../config").$modes,g=e("../lib/oop"),w=e("../lib/lang"),h=e("./text_highlight_rules").TextHighlightRules,d=e("./html_highlight_rules").HtmlHighlightRules,a=function(c){return"(?:[^"+w.escapeRegExp(c)+"\\\\]|\\\\.)*"},l=function(){d.call(this);var c={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(i,s,f,b){var x=i.match(/^(\s*)([`~]+)(.*)/),I=/[\w-]+|$/.exec(x[3])[0];return p[I]||(I=""),f.unshift("githubblock",[],[x[1],x[2],I],s),this.token},next:"githubblock"},u=[{token:"support.function",regex:".*",onMatch:function(i,s,f,b){var x=f[1],I=f[2][0],R=f[2][1],A=f[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(i);if(C&&C[1].length<I.length+3&&C[2].length>=R.length&&C[2][0]==R[0])return f.splice(0,3),this.next=f.shift(),this.token;if(this.next="",A&&p[A]){var O=p[A].getTokenizer().getLineTokens(i,x.slice(0));return f[1]=O.state,O.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(i){return"markup.heading."+i.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},c,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+a("]")+")(\\]\\s*\\[)("+a("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+a("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+a('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},c,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:u}),this.normalizeRules()};g.inherits(l,h),r.MarkdownHighlightRules=l}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,r,m){var p=e("../../lib/oop"),g=e("./fold_mode").FoldMode,w=e("../../range").Range,h=r.FoldMode=function(){};p.inherits(h,g),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(d,a,l){var c=d.getLine(l);return this.foldingStartMarker.test(c)?c[0]=="`"&&d.bgTokenizer.getState(l)=="start"?"end":"start":""},this.getFoldWidgetRange=function(d,a,l){function c(D){return I=d.getTokens(D)[0],I&&I.type.lastIndexOf(R,0)===0}function u(){var D=I.value[0];return D=="="?6:D=="-"?5:7-I.value.search(/[^#]|$/)}var i=d.getLine(l),s=i.length,f=d.getLength(),b=l,x=l;if(i.match(this.foldingStartMarker)){if(i[0]=="`"){if(d.bgTokenizer.getState(l)!=="start"){for(;++l<f&&(i=d.getLine(l),!(i[0]=="`"&i.substring(0,3)=="```")););return new w(b,s,l,0)}for(;l-- >0&&(i=d.getLine(l),!(i[0]=="`"&i.substring(0,3)=="```")););return new w(l,i.length,b,0)}var I,R="markup.heading";if(c(l)){for(var A=u();++l<f;)if(c(l)){var C=u();if(C>=A)break}if(x=l-(!I||["=","-"].indexOf(I.value[0])==-1?1:2),x>b)for(;x>b&&/^\s*$/.test(d.getLine(x));)x--;if(x>b){var O=d.getLine(x).length;return new w(b,s,x,O)}}}}}).call(h.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,r,m){var p=e("../range").Range,g=function(){};(function(){this.checkOutdent=function(w,h){return/^\s+$/.test(w)?/^\s*\}/.test(h):!1},this.autoOutdent=function(w,h){var d=w.getLine(h),a=d.match(/^(\s*\})/);if(!a)return 0;var l=a[1].length,c=w.findMatchingBracket({row:h,column:l});if(!c||c.row==h)return 0;var u=this.$getIndent(w.getLine(c.row));w.replace(new p(h,0,h,l-1),u)},this.$getIndent=function(w){return w.match(/^\s*/)[0]}}).call(g.prototype),r.MatchingBraceOutdent=g}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(e,r,m){function p(a,l){return a&&a.type.lastIndexOf(l+".xml")>-1}var g=e("../../lib/oop"),w=e("../behaviour").Behaviour,h=e("../../token_iterator").TokenIterator,d=function(){this.add("string_dquotes","insertion",function(a,l,c,u,i){if(i=='"'||i=="'"){var s=i,f=u.doc.getTextRange(c.getSelectionRange());if(f!==""&&f!=="'"&&f!='"'&&c.getWrapBehavioursEnabled())return{text:s+f+s,selection:!1};var b=c.getCursorPosition(),x=u.doc.getLine(b.row),I=x.substring(b.column,b.column+1),R=new h(u,b.row,b.column),A=R.getCurrentToken();if(I==s&&(p(A,"attribute-value")||p(A,"string")))return{text:"",selection:[1,1]};if(A||(A=R.stepBackward()),!A)return;for(;p(A,"tag-whitespace")||p(A,"whitespace");)A=R.stepBackward();var C=!I||I.match(/\s/);if(p(A,"attribute-equals")&&(C||I==">")||p(A,"decl-attribute-equals")&&(C||I=="?"))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(a,l,c,u,i){var s=u.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var f=u.doc.getLine(i.start.row),b=f.substring(i.start.column+1,i.start.column+2);if(b==s)return i.end.column++,i}}),this.add("autoclosing","insertion",function(a,l,c,u,i){if(i==">"){var s=c.getSelectionRange().start,f=new h(u,s.row,s.column),b=f.getCurrentToken()||f.stepBackward();if(!b||!(p(b,"tag-name")||p(b,"tag-whitespace")||p(b,"attribute-name")||p(b,"attribute-equals")||p(b,"attribute-value"))||p(b,"reference.attribute-value"))return;if(p(b,"attribute-value")){var x=f.getCurrentTokenColumn()+b.value.length;if(s.column<x)return;if(s.column==x){var I=f.stepForward();if(I&&p(I,"attribute-value"))return;f.stepBackward()}}if(/^\s*>/.test(u.getLine(s.row).slice(s.column)))return;for(;!p(b,"tag-name");)if(b=f.stepBackward(),b.value=="<"){b=f.stepForward();break}var R=f.getCurrentTokenRow(),A=f.getCurrentTokenColumn();if(p(f.stepBackward(),"end-tag-open"))return;var C=b.value;return R==s.row&&(C=C.substring(0,s.column-A)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(a,l,c,u,i){if(i==`
991
+ `){var s=c.getCursorPosition(),f=u.getLine(s.row),b=new h(u,s.row,s.column),x=b.getCurrentToken();if(p(x,"")&&x.type.indexOf("tag-close")!==-1){if(x.value=="/>")return;for(;x&&x.type.indexOf("tag-name")===-1;)x=b.stepBackward();if(!x)return;var I=x.value,R=b.getCurrentTokenRow();if(x=b.stepBackward(),!x||x.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[I]||!this.voidElements){var A=u.getTokenAt(s.row,s.column+1),f=u.getLine(R),C=this.$getIndent(f),O=C+u.getTabString();return A&&A.value==="</"?{text:`
992
+ `+O+`
993
+ `+C,selection:[1,O.length,1,O.length]}:{text:`
994
+ `+O}}}}})};g.inherits(d,w),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 p=e("../../lib/oop"),g=e("../../token_iterator").TokenIterator,w=e("../behaviour/cstyle").CstyleBehaviour,h=e("../behaviour/xml").XmlBehaviour,d=function(){var a=new h({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(a),this.inherit(w),this.add("autoclosing-fragment","insertion",function(l,c,u,i,s){if(s==">"){var f=u.getSelectionRange().start,b=new g(i,f.row,f.column),x=b.getCurrentToken()||b.stepBackward();if(!x)return;if(x.value=="<")return{text:"></>",selection:[1,1]}}})};p.inherits(d,w),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 p(l,c){return l&&l.type&&l.type.lastIndexOf(c+".xml")>-1}var g=e("../../lib/oop"),w=e("../../range").Range,h=e("./fold_mode").FoldMode,d=r.FoldMode=function(l,c){h.call(this),this.voidElements=l||{},this.optionalEndTags=g.mixin({},this.voidElements),c&&g.mixin(this.optionalEndTags,c)};g.inherits(d,h);var a=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(l,c,u){var i=this._getFirstTagInLine(l,u);return i?i.closing||!i.tagName&&i.selfClosing?c==="markbeginend"?"end":"":!i.tagName||i.selfClosing||this.voidElements.hasOwnProperty(i.tagName.toLowerCase())||this._findEndTagInLine(l,u,i.tagName,i.end.column)?"":"start":this.getCommentFoldWidget(l,u)},this.getCommentFoldWidget=function(l,c){return/comment/.test(l.getState(c))&&/<!-/.test(l.getLine(c))?"start":""},this._getFirstTagInLine=function(l,c){for(var u=l.getTokens(c),i=new a,s=0;s<u.length;s++){var f=u[s];if(p(f,"tag-open")){if(i.end.column=i.start.column+f.value.length,i.closing=p(f,"end-tag-open"),f=u[++s],!f)return null;if(i.tagName=f.value,f.value===""){if(f=u[++s],!f)return null;i.tagName=f.value}for(i.end.column+=f.value.length,s++;s<u.length;s++)if(f=u[s],i.end.column+=f.value.length,p(f,"tag-close")){i.selfClosing=f.value=="/>";break}return i}if(p(f,"tag-close"))return i.selfClosing=f.value=="/>",i;i.start.column+=f.value.length}return null},this._findEndTagInLine=function(l,c,u,i){for(var s=l.getTokens(c),f=0,b=0;b<s.length;b++){var x=s[b];if(f+=x.value.length,!(f<i-1)&&p(x,"end-tag-open")&&(x=s[b+1],p(x,"tag-name")&&x.value===""&&(x=s[b+2]),x&&x.value==u))return!0}return!1},this.getFoldWidgetRange=function(l,c,u){var i=this._getFirstTagInLine(l,u);if(!i)return this.getCommentFoldWidget(l,u)&&l.getCommentFoldRange(u,l.getLine(u).length);var s=l.getMatchingTags({row:u,column:0});if(s)return new w(s.openTag.end.row,s.openTag.end.column,s.closeTag.start.row,s.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 p=e("../../lib/oop"),g=e("../../range").Range,w=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)))};p.inherits(h,w),(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,a,l){var c=d.getLine(l);if(this.singleLineBlockCommentRe.test(c)&&!this.startRegionRe.test(c)&&!this.tripleStarBlockCommentRe.test(c))return"";var u=this._getFoldWidgetBase(d,a,l);return!u&&this.startRegionRe.test(c)?"start":u},this.getFoldWidgetRange=function(d,a,l,c){var u=d.getLine(l);if(this.startRegionRe.test(u))return this.getCommentRegionBlock(d,u,l);var i=u.match(this.foldingStartMarker);if(i){var s=i.index;if(i[1])return this.openingBracketBlock(d,i[1],l,s);var f=d.getCommentFoldRange(l,s+i[0].length,1);return f&&!f.isMultiLine()&&(c?f=this.getSectionRange(d,l):a!="all"&&(f=null)),f}if(a!=="markbegin"){var i=u.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(d,i[1],l,s):d.getCommentFoldRange(l,s,-1)}}},this.getSectionRange=function(d,a){var l=d.getLine(a),c=l.search(/\S/),u=a,i=l.length;a+=1;for(var s=a,f=d.getLength();++a<f;){l=d.getLine(a);var b=l.search(/\S/);if(b!==-1){if(c>b)break;var x=this.getFoldWidgetRange(d,"all",a);if(x){if(x.start.row<=u)break;if(x.isMultiLine())a=x.end.row;else if(c==b)break}s=a}}return new g(u,i,s,d.getLine(s).length)},this.getCommentRegionBlock=function(d,a,l){for(var c=a.search(/\s*$/),u=d.getLength(),i=l,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,f=1;++l<u;){a=d.getLine(l);var b=s.exec(a);if(b&&(b[1]?f--:f++,!f))break}var x=l;if(x>i)return new g(i,c,x,a.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 p=e("../../lib/oop"),g=e("./xml").FoldMode,w=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 g};p.inherits(h,w),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(d,a,l){var c=this.getFoldWidgetBase(d,a,l);return c||this.xmlFoldMode.getFoldWidget(d,a,l)},this.getFoldWidgetRange=function(d,a,l,c){var u=this.getFoldWidgetRangeBase(d,a,l,c);return u||this.xmlFoldMode.getFoldWidgetRange(d,a,l)}}).call(h.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(e,r,m){var p=e("../lib/oop"),g=e("./text").Mode,w=e("./javascript_highlight_rules").JavaScriptHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,d=e("../worker/worker_client").WorkerClient,a=e("./behaviour/javascript").JavaScriptBehaviour,l=e("./folding/javascript").FoldMode,c=function(){this.HighlightRules=w,this.$outdent=new h,this.$behaviour=new a,this.foldingRules=new l};p.inherits(c,g),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(u,i,s){var f=this.$getIndent(i),b=this.getTokenizer().getLineTokens(i,u),x=b.tokens,I=b.state;if(x.length&&x[x.length-1].type=="comment")return f;if(u=="start"||u=="no_regex"){var R=i.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);R&&(f+=s)}else if(u=="doc-start"&&(I=="start"||I=="no_regex"))return"";return f},this.checkOutdent=function(u,i,s){return this.$outdent.checkOutdent(i,s)},this.autoOutdent=function(u,i,s){this.$outdent.autoOutdent(i,s)},this.createWorker=function(u){var i=new d(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return i.attachToDocument(u.getDocument()),i.on("annotate",function(s){u.setAnnotations(s.data)}),i.on("terminate",function(){u.clearAnnotations()}),i},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,r,m){var p={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},g=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var w=document.createElement("c").style;for(var h in w)if(typeof w[h]=="string"){var d=h.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()});p.hasOwnProperty(d)||(p[d]=1)}}this.completionsDefined=!0},this.getCompletions=function(w,h,d,a){if(this.completionsDefined||this.defineCompletions(),w==="ruleset"||h.$mode.$id=="ace/mode/scss"){var l=h.getLine(d.row).substr(0,d.column),c=/\([^)]*$/.test(l);return c&&(l=l.substr(l.lastIndexOf("(")+1)),/:[^;]+$/.test(l)?this.getPropertyValueCompletions(w,h,d,a):this.getPropertyCompletions(w,h,d,a,c)}return[]},this.getPropertyCompletions=function(w,h,d,a,l){l=l||!1;var c=Object.keys(p);return c.map(function(u){return{caption:u,snippet:u+": $0"+(l?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(w,h,d,a){var l=h.getLine(d.row).substr(0,d.column),c=(/([\w\-]+):[^:]*$/.exec(l)||{})[1];if(!c)return[];var u=[];return c in p&&typeof p[c]=="object"&&(u=Object.keys(p[c])),u.map(function(i){return{caption:i,snippet:i,meta:"property value",score:1e6}})}}).call(g.prototype),r.CssCompletions=g}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,r,m){var p=e("../../lib/oop");e("../behaviour").Behaviour;var g=e("./cstyle").CstyleBehaviour,w=e("../../token_iterator").TokenIterator,h=function(){this.inherit(g),this.add("colon","insertion",function(d,a,l,c,u){if(u===":"&&l.selection.isEmpty()){var i=l.getCursorPosition(),s=new w(c,i.row,i.column),f=s.getCurrentToken();if(f&&f.value.match(/\s+/)&&(f=s.stepBackward()),f&&f.type==="support.type"){var b=c.doc.getLine(i.row),x=b.substring(i.column,i.column+1);if(x===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(b.substring(i.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(d,a,l,c,u){var i=c.doc.getTextRange(u);if(!u.isMultiLine()&&i===":"){var s=l.getCursorPosition(),f=new w(c,s.row,s.column),b=f.getCurrentToken();if(b&&b.value.match(/\s+/)&&(b=f.stepBackward()),b&&b.type==="support.type"){var x=c.doc.getLine(u.start.row),I=x.substring(u.end.column,u.end.column+1);if(I===";")return u.end.column++,u}}}),this.add("semicolon","insertion",function(d,a,l,c,u){if(u===";"&&l.selection.isEmpty()){var i=l.getCursorPosition(),s=c.doc.getLine(i.row),f=s.substring(i.column,i.column+1);if(f===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(d,a,l,c,u){if(u==="!"&&l.selection.isEmpty()){var i=l.getCursorPosition(),s=c.doc.getLine(i.row);if(/^\s*(;|}|$)/.test(s.substring(i.column)))return{text:"!important",selection:[10,10]}}})};p.inherits(h,g),r.CssBehaviour=h}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,r,m){var p=e("../lib/oop"),g=e("./text").Mode,w=e("./css_highlight_rules").CssHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,d=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,l=e("./behaviour/css").CssBehaviour,c=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=w,this.$outdent=new h,this.$behaviour=new l,this.$completer=new a,this.foldingRules=new c};p.inherits(u,g),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(i,s,f){var b=this.$getIndent(s),x=this.getTokenizer().getLineTokens(s,i).tokens;if(x.length&&x[x.length-1].type=="comment")return b;var I=s.match(/^.*\{\s*$/);return I&&(b+=f),b},this.checkOutdent=function(i,s,f){return this.$outdent.checkOutdent(s,f)},this.autoOutdent=function(i,s,f){this.$outdent.autoOutdent(s,f)},this.getCompletions=function(i,s,f,b){return this.$completer.getCompletions(i,s,f,b)},this.createWorker=function(i){var s=new d(["ace"],"ace/mode/css_worker","Worker");return s.attachToDocument(i.getDocument()),s.on("annotate",function(f){i.setAnnotations(f.data)}),s.on("terminate",function(){i.clearAnnotations()}),s},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(u.prototype),r.Mode=u}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,r,m){var p=e("../../lib/oop"),g=e("./fold_mode").FoldMode,w=r.FoldMode=function(h,d){this.defaultMode=h,this.subModes=d};p.inherits(w,g),(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,a,l){var c=this.$getMode(h);return c?c.getFoldWidget(d,a,l):""},this.getFoldWidget=function(h,d,a){return this.$tryMode(h.getState(a-1),h,d,a)||this.$tryMode(h.getState(a),h,d,a)||this.defaultMode.getFoldWidget(h,d,a)},this.getFoldWidgetRange=function(h,d,a){var l=this.$getMode(h.getState(a-1));return(!l||!l.getFoldWidget(h,d,a))&&(l=this.$getMode(h.getState(a))),(!l||!l.getFoldWidget(h,d,a))&&(l=this.defaultMode),l.getFoldWidgetRange(h,d,a)}}).call(w.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 p=e("../../lib/oop"),g=e("./mixed").FoldMode,w=e("./xml").FoldMode,h=e("./cstyle").FoldMode,d=r.FoldMode=function(a,l){g.call(this,new w(a,l),{"js-":new h,"css-":new h})};p.inherits(d,g)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,r,m){function p(s,f){return s.type.lastIndexOf(f+".xml")>-1}function g(s,f){for(var b=new h(s,f.row,f.column),x=b.getCurrentToken();x&&!p(x,"tag-name");)x=b.stepBackward();if(x)return x.value}function w(s,f){for(var b=new h(s,f.row,f.column),x=b.getCurrentToken();x&&!p(x,"attribute-name");)x=b.stepBackward();if(x)return x.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"],a=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],l=d.concat(a),c={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},u=Object.keys(c),i=function(){};(function(){this.getCompletions=function(s,f,b,x){var I=f.getTokenAt(b.row,b.column);if(!I)return[];if(p(I,"tag-name")||p(I,"tag-open")||p(I,"end-tag-open"))return this.getTagCompletions(s,f,b,x);if(p(I,"tag-whitespace")||p(I,"attribute-name"))return this.getAttributeCompletions(s,f,b,x);if(p(I,"attribute-value"))return this.getAttributeValueCompletions(s,f,b,x);var R=f.getLine(b.row).substr(0,b.column);return/&[a-z]*$/i.test(R)?this.getHTMLEntityCompletions(s,f,b,x):[]},this.getTagCompletions=function(s,f,b,x){return u.map(function(I){return{value:I,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(s,f,b,x){var I=g(f,b);if(!I)return[];var R=l;return I in c&&(R=R.concat(Object.keys(c[I]))),R.map(function(A){return{caption:A,snippet:A+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(s,f,b,x){var I=g(f,b),R=w(f,b);if(!I)return[];var A=[];return I in c&&R in c[I]&&typeof c[I][R]=="object"&&(A=Object.keys(c[I][R])),A.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(s,f,b,x){var I=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return I.map(function(R){return{caption:R,snippet:R,meta:"html entity",score:1e6}})}}).call(i.prototype),r.HtmlCompletions=i}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,r,m){var p=e("../lib/oop"),g=e("../lib/lang"),w=e("./text").Mode,h=e("./javascript").Mode,d=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,l=e("./behaviour/xml").XmlBehaviour,c=e("./folding/html").FoldMode,u=e("./html_completions").HtmlCompletions,i=e("../worker/worker_client").WorkerClient,s=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],f=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],b=function(x){this.fragmentContext=x&&x.fragmentContext,this.HighlightRules=a,this.$behaviour=new l,this.$completer=new u,this.createModeDelegates({"js-":h,"css-":d}),this.foldingRules=new c(this.voidElements,g.arrayToMap(f))};p.inherits(b,w),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=g.arrayToMap(s),this.getNextLineIndent=function(x,I,R){return this.$getIndent(I)},this.checkOutdent=function(x,I,R){return!1},this.getCompletions=function(x,I,R,A){return this.$completer.getCompletions(x,I,R,A)},this.createWorker=function(x){if(this.constructor==b){var I=new i(["ace"],"ace/mode/html_worker","Worker");return I.attachToDocument(x.getDocument()),this.fragmentContext&&I.call("setOptions",[{context:this.fragmentContext}]),I.on("error",function(R){x.setAnnotations(R.data)}),I.on("terminate",function(){x.clearAnnotations()}),I}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(b.prototype),r.Mode=b}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,r,m){var p=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,w=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 a=this.createKeywordMapper({keyword:w,"support.function.builtin":h,"invalid.deprecated":"debugger"},"identifier"),l="(?:(?:[1-9]\\d*)|(?:0))",c="(?:\\.\\d+)",u="(?:\\d+)",i="(?:(?:"+u+"?"+c+")|(?:"+u+"\\.))",s="(?:(?:"+i+"|"+u+"))",f="(?:"+s+"|"+i+")",b="(?:&"+u+")",x="[a-zA-Z_][a-zA-Z0-9_]*",I="(?:"+x+"(?==))",R="(?:\\$(?:SHLVL|\\$|\\!|\\?))",A="(?:"+x+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(C,O,D){var E=C[2]=="-"?"indentedHeredoc":"heredoc",T=C.split(this.splitRegex);return D.push(E,T[4]),[{type:"constant",value:T[1]},{type:"text",value:T[2]},{type:"string",value:T[3]},{type:"support.class",value:T[4]},{type:"string",value:T[5]}]},rules:{heredoc:[{onMatch:function(C,O,D){return C===D[1]?(D.shift(),D.shift(),this.next=D[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(C,O,D){return C===D[1]?(D.shift(),D.shift(),this.next=D[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(C,O){return O[0]==="heredoc"||O[0]==="indentedHeredoc"?O[0]:C}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:R},{token:"variable",regex:I},{include:"variables"},{token:"support.function",regex:A},{token:"support.function",regex:b},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:f},{token:"constant.numeric",regex:l+"\\b"},{token:a,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};p.inherits(d,g),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 p=e("../lib/oop"),g=e("./text").Mode,w=e("./sh_highlight_rules").ShHighlightRules,h=e("../range").Range,d=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=w,this.foldingRules=new d,this.$behaviour=this.$defaultBehaviour};p.inherits(a,g),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(c,u,i){var s=this.$getIndent(u),f=this.getTokenizer().getLineTokens(u,c),b=f.tokens;if(b.length&&b[b.length-1].type=="comment")return s;if(c=="start"){var x=u.match(/^.*[\{\(\[:]\s*$/);x&&(s+=i)}return s};var l={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(c,u,i){if(i!==`\r
995
+ `&&i!=="\r"&&i!==`
996
+ `)return!1;var s=this.getTokenizer().getLineTokens(u.trim(),c).tokens;if(!s)return!1;do var f=s.pop();while(f&&(f.type=="comment"||f.type=="text"&&f.value.match(/^\s+$/)));return f?f.type=="keyword"&&l[f.value]:!1},this.autoOutdent=function(c,u,i){i+=1;var s=this.$getIndent(u.getLine(i)),f=u.getTabString();s.slice(-f.length)==f&&u.remove(new h(i,s.length-f.length,i,s.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(a.prototype),r.Mode=a}),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 p=e("../lib/oop"),g=e("../lib/lang"),w=e("./text").Mode,h=e("./xml_highlight_rules").XmlHighlightRules,d=e("./behaviour/xml").XmlBehaviour,a=e("./folding/xml").FoldMode,l=e("../worker/worker_client").WorkerClient,c=function(){this.HighlightRules=h,this.$behaviour=new d,this.foldingRules=new a};p.inherits(c,w),(function(){this.voidElements=g.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(u){var i=new l(["ace"],"ace/mode/xml_worker","Worker");return i.attachToDocument(u.getDocument()),i.on("error",function(s){u.setAnnotations(s.data)}),i.on("terminate",function(){u.clearAnnotations()}),i},this.$id="ace/mode/xml"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(e,r,m){var p=e("../lib/oop"),g=e("./behaviour/cstyle").CstyleBehaviour,w=e("./text").Mode,h=e("./markdown_highlight_rules").MarkdownHighlightRules,d=e("./folding/markdown").FoldMode,a=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 g({braces:!0})};p.inherits(a,w),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(l,c,u){if(l=="listblock"){var i=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(c);if(!i)return"";var s=i[2];return s||(s=parseInt(i[3],10)+1+"."),i[1]+s+i[4]}return this.$getIndent(c)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/markdown"],function(e){t&&(t.exports=e)})})()})(hg)),hg.exports}yk();var fg={exports:{}},pg;function bk(){return pg||(pg=1,(function(t,n){ace.define("ace/theme/twilight-css",["require","exports","module"],function(e,r,m){m.exports=`.ace-twilight .ace_gutter {
997
+ background: #232323;
998
+ color: #E2E2E2
999
+ }
1000
+
1001
+ .ace-twilight .ace_print-margin {
1002
+ width: 1px;
1003
+ background: #232323
1004
+ }
1005
+
1006
+ .ace-twilight {
1007
+ background-color: #141414;
1008
+ color: #F8F8F8
1009
+ }
1010
+
1011
+ .ace-twilight .ace_cursor {
1012
+ color: #A7A7A7
1013
+ }
1014
+
1015
+ .ace-twilight .ace_marker-layer .ace_selection {
1016
+ background: rgba(221, 240, 255, 0.20)
1017
+ }
1018
+
1019
+ .ace-twilight.ace_multiselect .ace_selection.ace_start {
1020
+ box-shadow: 0 0 3px 0px #141414;
1021
+ }
1022
+
1023
+ .ace-twilight .ace_marker-layer .ace_step {
1024
+ background: rgb(102, 82, 0)
1025
+ }
1026
+
1027
+ .ace-twilight .ace_marker-layer .ace_bracket {
1028
+ margin: -1px 0 0 -1px;
1029
+ border: 1px solid rgba(255, 255, 255, 0.25)
1030
+ }
1031
+
1032
+ .ace-twilight .ace_marker-layer .ace_active-line {
1033
+ background: rgba(255, 255, 255, 0.031)
1034
+ }
1035
+
1036
+ .ace-twilight .ace_gutter-active-line {
1037
+ background-color: rgba(255, 255, 255, 0.031)
1038
+ }
1039
+
1040
+ .ace-twilight .ace_marker-layer .ace_selected-word {
1041
+ border: 1px solid rgba(221, 240, 255, 0.20)
1042
+ }
1043
+
1044
+ .ace-twilight .ace_invisible {
1045
+ color: rgba(255, 255, 255, 0.25)
1046
+ }
1047
+
1048
+ .ace-twilight .ace_keyword,
1049
+ .ace-twilight .ace_meta {
1050
+ color: #CDA869
1051
+ }
1052
+
1053
+ .ace-twilight .ace_constant,
1054
+ .ace-twilight .ace_constant.ace_character,
1055
+ .ace-twilight .ace_constant.ace_character.ace_escape,
1056
+ .ace-twilight .ace_constant.ace_other,
1057
+ .ace-twilight .ace_heading,
1058
+ .ace-twilight .ace_markup.ace_heading,
1059
+ .ace-twilight .ace_support.ace_constant {
1060
+ color: #CF6A4C
1061
+ }
1062
+
1063
+ .ace-twilight .ace_invalid.ace_illegal {
1064
+ color: #F8F8F8;
1065
+ background-color: rgba(86, 45, 86, 0.75)
1066
+ }
1067
+
1068
+ .ace-twilight .ace_invalid.ace_deprecated {
1069
+ text-decoration: underline;
1070
+ font-style: italic;
1071
+ color: #D2A8A1
1072
+ }
1073
+
1074
+ .ace-twilight .ace_support {
1075
+ color: #9B859D
1076
+ }
1077
+
1078
+ .ace-twilight .ace_fold {
1079
+ background-color: #AC885B;
1080
+ border-color: #F8F8F8
1081
+ }
1082
+
1083
+ .ace-twilight .ace_support.ace_function {
1084
+ color: #DAD085
1085
+ }
1086
+
1087
+ .ace-twilight .ace_list,
1088
+ .ace-twilight .ace_markup.ace_list,
1089
+ .ace-twilight .ace_storage {
1090
+ color: #F9EE98
1091
+ }
1092
+
1093
+ .ace-twilight .ace_entity.ace_name.ace_function,
1094
+ .ace-twilight .ace_meta.ace_tag {
1095
+ color: #AC885B
1096
+ }
1097
+
1098
+ .ace-twilight .ace_string {
1099
+ color: #8F9D6A
1100
+ }
1101
+
1102
+ .ace-twilight .ace_string.ace_regexp {
1103
+ color: #E9C062
1104
+ }
1105
+
1106
+ .ace-twilight .ace_comment {
1107
+ font-style: italic;
1108
+ color: #5F5A60
1109
+ }
1110
+
1111
+ .ace-twilight .ace_variable {
1112
+ color: #7587A6
1113
+ }
1114
+
1115
+ .ace-twilight .ace_xml-pe {
1116
+ color: #494949
1117
+ }
1118
+
1119
+ .ace-twilight .ace_indent-guide {
1120
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
1121
+ }
1122
+
1123
+ .ace-twilight .ace_indent-guide-active {
1124
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
1125
+ }
1126
+ `}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(e,r,m){r.isDark=!0,r.cssClass="ace-twilight",r.cssText=e("./twilight-css");var p=e("../lib/dom");p.importCssString(r.cssText,r.cssClass,!1)}),(function(){ace.require(["ace/theme/twilight"],function(e){t&&(t.exports=e)})})()})(fg)),fg.exports}bk();var gg={exports:{}},mg;function wk(){return mg||(mg=1,(function(t,n){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 p(C){var O=new Date().toLocaleString("en-us",C);return O.length==1?"0"+O:O}var g=e("./lib/dom"),w=e("./lib/oop"),h=e("./lib/event_emitter").EventEmitter,d=e("./lib/lang"),a=e("./range").Range,l=e("./range_list").RangeList,c=e("./keyboard/hash_handler").HashHandler,u=e("./tokenizer").Tokenizer,i=e("./clipboard"),s={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,O,D){var E=C.session.getTextRange();return D?E.replace(/\n\r?([ \t]*\S)/g,`
1127
+ `+D+"$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 i.getText&&i.getText()},FILENAME:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0]},FILENAME_BASE:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(C){return this.FILEPATH(C).replace(/[^/\\]*$/,"")},FILEPATH:function(C){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(C){var O=C.session.$mode||{};return O.blockComment&&O.blockComment.start||""},BLOCK_COMMENT_END:function(C){var O=C.session.$mode||{};return O.blockComment&&O.blockComment.end||""},LINE_COMMENT:function(C){var O=C.session.$mode||{};return O.lineCommentStart||""},CURRENT_YEAR:p.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:p.bind(null,{year:"2-digit"}),CURRENT_MONTH:p.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:p.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:p.bind(null,{month:"short"}),CURRENT_DATE:p.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:p.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:p.bind(null,{weekday:"short"}),CURRENT_HOUR:p.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:p.bind(null,{minute:"2-digit"}),CURRENT_SECOND:p.bind(null,{second:"2-digit"})};s.SELECTED_TEXT=s.SELECTION;var f=(function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=s}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function O(T){return T=T.substr(1),/^\d+$/.test(T)?[{tabstopId:parseInt(T,10)}]:[{text:T}]}function D(T){return"(?:[^\\\\"+T+"]|\\\\.)"}var E={regex:"/("+D("/")+"+)/",onMatch:function(T,B,F){var N=F[0];return N.fmtString=!0,N.guard=T.slice(1,-1),N.flag="",""},next:"formatString"};return C.$tokenizer=new u({start:[{regex:/\\./,onMatch:function(T,B,F){var N=T[1];return(N=="}"&&F.length||"`$\\".indexOf(N)!=-1)&&(T=N),[T]}},{regex:/}/,onMatch:function(T,B,F){return[F.length?F.shift():T]}},{regex:/\$(?:\d+|\w+)/,onMatch:O},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(T,B,F){var N=O(T.substr(1));return F.unshift(N[0]),N},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+D("\\|")+"*\\|",onMatch:function(T,B,F){var N=T.slice(1,-1).replace(/\\[,|\\]|,/g,function($){return $.length==2?$[1]:"\0"}).split("\0").map(function($){return{value:$}});return F[0].choices=N,[N[0]]},next:"start"},E,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(T,B,F){return F.length&&F[0].expectElse?(F[0].expectElse=!1,F[0].ifEnd={elseEnd:F[0]},[F[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(T,B,F){var N=T[1];return N=="}"&&F.length||"`$\\".indexOf(N)!=-1?T=N:N=="n"?T=`
1128
+ `:N=="t"?T=" ":"ulULE".indexOf(N)!=-1&&(T={changeCase:N,local:N>"a"}),[T]}},{regex:"/\\w*}",onMatch:function(T,B,F){var N=F.shift();return N&&(N.flag=T.slice(1,-1)),this.next=N&&N.tabstopId?"start":"",[N||T]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(T,B,F){return[{text:T.slice(1)}]}},{regex:/\${\w+/,onMatch:function(T,B,F){var N={text:T.slice(2)};return F.unshift(N),[N]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(T,B,F){var N=F.shift();return this.next=N&&N.tabstopId?"start":"",[N||T]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(T,B,F){var N=F[0];return N.formatFunction=T.slice(2,-1),[F.shift()]},next:"formatString"},E,{regex:/:[\?\-+]?/,onMatch:function(T,B,F){T[1]=="+"&&(F[0].ifEnd=F[0]),T[1]=="?"&&(F[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),C.$tokenizer},C.prototype.tokenizeTmSnippet=function(O,D){return this.getTokenizer().getLineTokens(O,D).tokens.map(function(E){return E.value||E})},C.prototype.getVariableValue=function(O,D,E){if(/^\d+$/.test(D))return(this.variables.__||{})[D]||"";if(/^[A-Z]\d+$/.test(D))return(this.variables[D[0]+"__"]||{})[D.substr(1)]||"";if(D=D.replace(/^TM_/,""),!this.variables.hasOwnProperty(D))return"";var T=this.variables[D];return typeof T=="function"&&(T=this.variables[D](O,D,E)),T??""},C.prototype.tmStrFormat=function(O,D,E){if(!D.fmt)return O;var T=D.flag||"",B=D.guard;B=new RegExp(B,T.replace(/[^gim]/g,""));var F=typeof D.fmt=="string"?this.tokenizeTmSnippet(D.fmt,"formatString"):D.fmt,N=this,$=O.replace(B,function(){var k=N.variables.__;N.variables.__=[].slice.call(arguments);for(var L=N.resolveVariables(F,E),W="E",U=0;U<L.length;U++){var q=L[U];if(typeof q=="object")if(L[U]="",q.changeCase&&q.local){var Z=L[U+1];Z&&typeof Z=="string"&&(q.changeCase=="u"?L[U]=Z[0].toUpperCase():L[U]=Z[0].toLowerCase(),L[U+1]=Z.substr(1))}else q.changeCase&&(W=q.changeCase);else W=="U"?L[U]=q.toUpperCase():W=="L"&&(L[U]=q.toLowerCase())}return N.variables.__=k,L.join("")});return $},C.prototype.tmFormatFunction=function(O,D,E){return D.formatFunction=="upcase"?O.toUpperCase():D.formatFunction=="downcase"?O.toLowerCase():O},C.prototype.resolveVariables=function(O,D){function E(W){var U=O.indexOf(W,N+1);U!=-1&&(N=U)}for(var T=[],B="",F=!0,N=0;N<O.length;N++){var $=O[N];if(typeof $=="string"){T.push($),$==`
1129
+ `?(F=!0,B=""):F&&(B=/^\t*/.exec($)[0],F=/\S/.test($));continue}if($){if(F=!1,$.fmtString){var k=O.indexOf($,N+1);k==-1&&(k=O.length),$.fmt=O.slice(N+1,k),N=k}if($.text){var L=this.getVariableValue(D,$.text,B)+"";$.fmtString&&(L=this.tmStrFormat(L,$,D)),$.formatFunction&&(L=this.tmFormatFunction(L,$,D)),L&&!$.ifEnd?(T.push(L),E($)):!L&&$.ifEnd&&E($.ifEnd)}else $.elseEnd?E($.elseEnd):($.tabstopId!=null||$.changeCase!=null)&&T.push($)}}return T},C.prototype.getDisplayTextForSnippet=function(O,D){var E=b.call(this,O,D);return E.text},C.prototype.insertSnippetForSelection=function(O,D,E){E===void 0&&(E={});var T=b.call(this,O,D,E),B=O.getSelectionRange(),F=O.session.replace(B,T.text),N=new x(O),$=O.inVirtualSelectionMode&&O.selection.index;N.addTabstops(T.tabstops,B.start,F,$)},C.prototype.insertSnippet=function(O,D,E){E===void 0&&(E={});var T=this;if(O.inVirtualSelectionMode)return T.insertSnippetForSelection(O,D,E);O.forEachSelection(function(){T.insertSnippetForSelection(O,D,E)},null,{keepOrder:!0}),O.tabstopManager&&O.tabstopManager.tabNext()},C.prototype.$getScope=function(O){var D=O.session.$mode.$id||"";if(D=D.split("/").pop(),D==="html"||D==="php"){D==="php"&&!O.session.$mode.inlinePhp&&(D="html");var E=O.getCursorPosition(),T=O.session.getState(E.row);typeof T=="object"&&(T=T[0]),T.substring&&(T.substring(0,3)=="js-"?D="javascript":T.substring(0,4)=="css-"?D="css":T.substring(0,4)=="php-"&&(D="php"))}return D},C.prototype.getActiveScopes=function(O){var D=this.$getScope(O),E=[D],T=this.snippetMap;return T[D]&&T[D].includeScopes&&E.push.apply(E,T[D].includeScopes),E.push("_"),E},C.prototype.expandWithTab=function(O,D){var E=this,T=O.forEachSelection(function(){return E.expandSnippetForSelection(O,D)},null,{keepOrder:!0});return T&&O.tabstopManager&&O.tabstopManager.tabNext(),T},C.prototype.expandSnippetForSelection=function(O,D){var E=O.getCursorPosition(),T=O.session.getLine(E.row),B=T.substring(0,E.column),F=T.substr(E.column),N=this.snippetMap,$;return this.getActiveScopes(O).some(function(k){var L=N[k];return L&&($=this.findMatchingSnippet(L,B,F)),!!$},this),$?(D&&D.dryRun||(O.session.doc.removeInLine(E.row,E.column-$.replaceBefore.length,E.column+$.replaceAfter.length),this.variables.M__=$.matchBefore,this.variables.T__=$.matchAfter,this.insertSnippetForSelection(O,$.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(O,D,E){for(var T=O.length;T--;){var B=O[T];if(!(B.startRe&&!B.startRe.test(D))&&!(B.endRe&&!B.endRe.test(E))&&!(!B.startRe&&!B.endRe))return B.matchBefore=B.startRe?B.startRe.exec(D):[""],B.matchAfter=B.endRe?B.endRe.exec(E):[""],B.replaceBefore=B.triggerRe?B.triggerRe.exec(D)[0]:"",B.replaceAfter=B.endTriggerRe?B.endTriggerRe.exec(E)[0]:"",B}},C.prototype.register=function(O,D){function E(k){return k&&!/^\^?\(.*\)\$?$|^\\b$/.test(k)&&(k="(?:"+k+")"),k||""}function T(k,L,W){return k=E(k),L=E(L),k=L+k,k&&k[k.length-1]!="$"&&(k+="$"),new RegExp(k)}function B(k){k.scope||(k.scope=D||"_"),D=k.scope,F[D]||(F[D]=[],N[D]={});var L=N[D];if(k.name){var W=L[k.name];W&&$.unregister(W),L[k.name]=k}F[D].push(k),k.prefix&&(k.tabTrigger=k.prefix),!k.content&&k.body&&(k.content=Array.isArray(k.body)?k.body.join(`
1130
+ `):k.body),k.tabTrigger&&!k.trigger&&(!k.guard&&/^\w/.test(k.tabTrigger)&&(k.guard="\\b"),k.trigger=d.escapeRegExp(k.tabTrigger)),!(!k.trigger&&!k.guard&&!k.endTrigger&&!k.endGuard)&&(k.startRe=T(k.trigger,k.guard),k.triggerRe=new RegExp(k.trigger),k.endRe=T(k.endTrigger,k.endGuard),k.endTriggerRe=new RegExp(k.endTrigger))}var F=this.snippetMap,N=this.snippetNameMap,$=this;O||(O=[]),Array.isArray(O)?O.forEach(B):Object.keys(O).forEach(function(k){B(O[k])}),this._signal("registerSnippets",{scope:D})},C.prototype.unregister=function(O,D){function E(F){var N=B[F.scope||D];if(N&&N[F.name]){delete N[F.name];var $=T[F.scope||D],k=$&&$.indexOf(F);k>=0&&$.splice(k,1)}}var T=this.snippetMap,B=this.snippetNameMap;O.content?E(O):Array.isArray(O)&&O.forEach(E)},C.prototype.parseSnippetFile=function(O){O=O.replace(/\r/g,"");for(var D=[],E={},T=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,B;B=T.exec(O);){if(B[1])try{E=JSON.parse(B[1]),D.push(E)}catch{}if(B[4])E.content=B[4].replace(/^\t/gm,""),D.push(E),E={};else{var F=B[2],N=B[3];if(F=="regex"){var $=/\/((?:[^\/\\]|\\.)*)|$/g;E.guard=$.exec(N)[1],E.trigger=$.exec(N)[1],E.endTrigger=$.exec(N)[1],E.endGuard=$.exec(N)[1]}else F=="snippet"?(E.tabTrigger=N.match(/^\S*/)[0],E.name||(E.name=N)):F&&(E[F]=N)}}return D},C.prototype.getSnippetByName=function(O,D){var E=this.snippetNameMap,T;return this.getActiveScopes(D).some(function(B){var F=E[B];return F&&(T=F[O]),!!T},this),T},C})();w.implement(f.prototype,h);var b=function(C,O,D){function E(de){for(var me=[],$e=0;$e<de.length;$e++){var Re=de[$e];if(typeof Re=="object"){if(L[Re.tabstopId])continue;var Me=de.lastIndexOf(Re,$e-1);Re=me[Me]||{tabstopId:Re.tabstopId}}me[$e]=Re}return me}D===void 0&&(D={});var T=C.getCursorPosition(),B=C.session.getLine(T.row),F=C.session.getTabString(),N=B.match(/^\s*/)[0];T.column<N.length&&(N=N.slice(0,T.column)),O=O.replace(/\r/g,"");var $=this.tokenizeTmSnippet(O);$=this.resolveVariables($,C),$=$.map(function(de){return de==`
1131
+ `&&!D.excludeExtraIndent?de+N:typeof de=="string"?de.replace(/\t/g,F):de});var k=[];$.forEach(function(de,me){if(typeof de=="object"){var $e=de.tabstopId,Re=k[$e];if(Re||(Re=k[$e]=[],Re.index=$e,Re.value="",Re.parents={}),Re.indexOf(de)===-1){de.choices&&!Re.choices&&(Re.choices=de.choices),Re.push(de);var Me=$.indexOf(de,me+1);if(Me!==-1){var Xe=$.slice(me+1,Me),qe=Xe.some(function(rt){return typeof rt=="object"});qe&&!Re.value?Re.value=Xe:Xe.length&&(!Re.value||typeof Re.value!="string")&&(Re.value=Xe.join(""))}}}}),k.forEach(function(de){de.length=0});for(var L={},W=0;W<$.length;W++){var U=$[W];if(typeof U=="object"){var q=U.tabstopId,Z=k[q],Q=$.indexOf(U,W+1);if(L[q]){L[q]===U&&(delete L[q],Object.keys(L).forEach(function(de){Z.parents[de]=!0}));continue}L[q]=U;var le=Z.value;typeof le!="string"?le=E(le):U.fmt&&(le=this.tmStrFormat(le,U,C)),$.splice.apply($,[W+1,Math.max(0,Q-W)].concat(le,U)),Z.indexOf(U)===-1&&Z.push(U)}}var ne=0,ce=0,ae="";return $.forEach(function(de){if(typeof de=="string"){var me=de.split(`
1132
+ `);me.length>1?(ce=me[me.length-1].length,ne+=me.length-1):ce+=de.length,ae+=de}else de&&(de.start?de.end={row:ne,column:ce}:de.start={row:ne,column:ce})}),{text:ae,tabstops:k,tokens:$}},x=(function(){function C(O){if(this.index=0,this.ranges=[],this.tabstops=[],O.tabstopManager)return O.tabstopManager;O.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=d.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(O)}return C.prototype.attach=function(O){this.$openTabstops=null,this.selectedTabstop=null,this.editor=O,this.session=O.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},C.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},C.prototype.onChange=function(O){for(var D=O.action[0]=="r",E=this.selectedTabstop||{},T=E.parents||{},B=this.tabstops.slice(),F=0;F<B.length;F++){var N=B[F],$=N==E||T[N.index];if(N.rangeList.$bias=$?0:1,O.action=="remove"&&N!==E){var k=N.parents&&N.parents[E.index],L=N.rangeList.pointIndex(O.start,k);L=L<0?-L-1:L+1;var W=N.rangeList.pointIndex(O.end,k);W=W<0?-W-1:W-1;for(var U=N.rangeList.ranges.slice(L,W),q=0;q<U.length;q++)this.removeRange(U[q])}N.rangeList.$onChange(O)}var Z=this.session;!this.$inChange&&D&&Z.getLength()==1&&!Z.getValue()&&this.detach()},C.prototype.updateLinkedFields=function(){var O=this.selectedTabstop;if(!(!O||!O.hasLinkedRanges||!O.firstNonLinked)){this.$inChange=!0;for(var D=this.session,E=D.getTextRange(O.firstNonLinked),T=0;T<O.length;T++){var B=O[T];if(B.linked){var F=B.original,N=r.snippetManager.tmStrFormat(E,F,this.editor);D.replace(B,N)}}this.$inChange=!1}},C.prototype.onAfterExec=function(O){O.command&&!O.command.readOnly&&this.updateLinkedFields()},C.prototype.onChangeSelection=function(){if(this.editor){for(var O=this.editor.selection.lead,D=this.editor.selection.anchor,E=this.editor.selection.isEmpty(),T=0;T<this.ranges.length;T++)if(!this.ranges[T].linked){var B=this.ranges[T].contains(O.row,O.column),F=E||this.ranges[T].contains(D.row,D.column);if(B&&F)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(O){var D=this.tabstops.length,E=this.index+(O||1);E=Math.min(Math.max(E,1),D),E==D&&(E=0),this.selectTabstop(E),this.updateTabstopMarkers(),E===0&&this.detach()},C.prototype.selectTabstop=function(O){this.$openTabstops=null;var D=this.tabstops[this.index];if(D&&this.addTabstopMarkers(D),this.index=O,D=this.tabstops[this.index],!(!D||!D.length)){this.selectedTabstop=D;var E=D.firstNonLinked||D;if(D.choices&&(E.cursor=E.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(E);else{var T=this.editor.multiSelect;T.toSingleRange(E);for(var B=0;B<D.length;B++)D.hasLinkedRanges&&D[B].linked||T.addRange(D[B].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},C.prototype.addTabstops=function(O,D,E){var T=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!O[0]){var B=a.fromPoints(E,E);R(B.start,D),R(B.end,D),O[0]=[B],O[0].index=0}var F=this.index,N=[F+1,0],$=this.ranges,k=this.snippetId=(this.snippetId||0)+1;O.forEach(function(L,W){var U=this.$openTabstops[W]||L;U.snippetId=k;for(var q=0;q<L.length;q++){var Z=L[q],Q=a.fromPoints(Z.start,Z.end||Z.start);I(Q.start,D),I(Q.end,D),Q.original=Z,Q.tabstop=U,$.push(Q),U!=L?U.unshift(Q):U[q]=Q,Z.fmtString||U.firstNonLinked&&T?(Q.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=Q)}U.firstNonLinked||(U.hasLinkedRanges=!1),U===L&&(N.push(U),this.$openTabstops[W]=U),this.addTabstopMarkers(U),U.rangeList=U.rangeList||new l,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(O){var D=this.session;O.forEach(function(E){E.markerId||(E.markerId=D.addMarker(E,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(O){var D=this.session;O.forEach(function(E){D.removeMarker(E.markerId),E.markerId=null})},C.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var O=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&O--,this.tabstops.forEach(function(D){D.snippetId===O?this.addTabstopMarkers(D):this.removeTabstopMarkers(D)},this)}},C.prototype.removeRange=function(O){var D=O.tabstop.indexOf(O);D!=-1&&O.tabstop.splice(D,1),D=this.ranges.indexOf(O),D!=-1&&this.ranges.splice(D,1),D=O.tabstop.rangeList.ranges.indexOf(O),D!=-1&&O.tabstop.splice(D,1),this.session.removeMarker(O.markerId),O.tabstop.length||(D=this.tabstops.indexOf(O.tabstop),D!=-1&&this.tabstops.splice(D,1),this.tabstops.length||this.detach())},C})();x.prototype.keyboardHandler=new c,x.prototype.keyboardHandler.bindKeys({Tab:function(C){r.snippetManager&&r.snippetManager.expandWithTab(C)||(C.tabstopManager.tabNext(1),C.renderer.scrollCursorIntoView())},"Shift-Tab":function(C){C.tabstopManager.tabNext(-1),C.renderer.scrollCursorIntoView()},Esc:function(C){C.tabstopManager.detach()}});var I=function(C,O){C.row==0&&(C.column+=O.column),C.row+=O.row},R=function(C,O){C.row==O.row&&(C.column-=O.column),C.row-=O.row};g.importCssString(`
1133
+ .ace_snippet-marker {
1134
+ -moz-box-sizing: border-box;
1135
+ box-sizing: border-box;
1136
+ background: rgba(194, 193, 208, 0.09);
1137
+ border: 1px dotted rgba(211, 208, 235, 0.62);
1138
+ position: absolute;
1139
+ }`,"snippets.css",!1),r.snippetManager=new f;var A=e("./editor").Editor;(function(){this.insertSnippet=function(C,O){return r.snippetManager.insertSnippet(this,C,O)},this.expandSnippet=function(C){return r.snippetManager.expandWithTab(this,C)}}).call(A.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(e,r,m){var p=e("../virtual_renderer").VirtualRenderer,g=e("../editor").Editor,w=e("../range").Range,h=e("../lib/event"),d=e("../lib/lang"),a=e("../lib/dom"),l=e("../config").nls,c=e("./../lib/useragent"),u=function(I){return"suggest-aria-id:".concat(I)},i=c.isSafari?"menu":"listbox",s=c.isSafari?"menuitem":"option",f=c.isSafari?"aria-current":"aria-selected",b=function(I){var R=new p(I);R.$maxLines=4;var A=new g(R);return A.setHighlightActiveLine(!1),A.setShowPrintMargin(!1),A.renderer.setShowGutter(!1),A.renderer.setHighlightGutterLine(!1),A.$mouseHandler.$focusTimeout=0,A.$highlightTagPending=!0,A},x=(function(){function I(R){var A=a.createElement("div"),C=b(A);R&&R.appendChild(A),A.style.display="none",C.renderer.content.style.cursor="default",C.renderer.setStyle("ace_autocomplete"),C.renderer.$textLayer.element.setAttribute("role",i),C.renderer.$textLayer.element.setAttribute("aria-roledescription",l("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),C.renderer.$textLayer.element.setAttribute("aria-label",l("autocomplete.popup.aria-label","Autocomplete suggestions")),C.renderer.textarea.setAttribute("aria-hidden","true"),C.setOption("displayIndentGuides",!1),C.setOption("dragDelay",150);var O=function(){};C.focus=O,C.$isFocused=!0,C.renderer.$cursorLayer.restartTimer=O,C.renderer.$cursorLayer.element.style.opacity="0",C.renderer.$maxLines=8,C.renderer.$keepTextAreaAtCursor=!1,C.setHighlightActiveLine(!1),C.session.highlight(""),C.session.$searchHighlight.clazz="ace_highlight-marker",C.on("mousedown",function($){var k=$.getDocumentPosition();C.selection.moveToPosition(k),T.start.row=T.end.row=k.row,$.stop()});var D,E=new w(-1,0,-1,1/0),T=new w(-1,0,-1,1/0);T.id=C.session.addMarker(T,"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(!D){D=$;return}if(!(D.x==$.x&&D.y==$.y)){D=$,D.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var k=D.getDocumentPosition().row;E.start.row!=k&&(E.id||C.setRow(k),F(k))}}),C.renderer.on("beforeRender",function(){if(D&&E.start.row!=-1){D.$pos=null;var $=D.getDocumentPosition().row;E.id||C.setRow($),F($,!0)}}),C.renderer.on("afterRender",function(){for(var $=C.renderer.$textLayer,k=$.config.firstRow,L=$.config.lastRow;k<=L;k++){var W=$.element.childNodes[k-$.config.firstRow];W.setAttribute("role",s),W.setAttribute("aria-roledescription",l("autocomplete.popup.item.aria-roledescription","item")),W.setAttribute("aria-setsize",C.data.length),W.setAttribute("aria-describedby","doc-tooltip"),W.setAttribute("aria-posinset",k+1);var U=C.getData(k);if(U){var q="".concat(U.caption||U.value).concat(U.meta?", ".concat(U.meta):"");W.setAttribute("aria-label",q)}var Z=W.querySelectorAll(".ace_completion-highlight");Z.forEach(function(Q){Q.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var $=C.getRow(),k=C.renderer.$textLayer,L=k.element.childNodes[$-k.config.firstRow],W=document.activeElement;if(L!==C.selectedNode&&C.selectedNode&&(a.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(f),C.selectedNode.removeAttribute("id")),W.removeAttribute("aria-activedescendant"),C.selectedNode=L,L){var U=u($);a.addCssClass(L,"ace_selected"),L.id=U,k.element.setAttribute("aria-activedescendant",U),W.setAttribute("aria-activedescendant",U),L.setAttribute(f,"true")}});var B=function(){F(-1)},F=function($,k){$!==E.start.row&&(E.start.row=E.end.row=$,k||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return E.start.row},h.addListener(C.container,"mouseout",function(){C.isMouseOver=!1,B()}),C.on("hide",B),C.on("changeSelection",B),C.session.doc.getLength=function(){return C.data.length},C.session.doc.getLine=function($){var k=C.data[$];return typeof k=="string"?k:k&&k.value||""};var N=C.session.bgTokenizer;return N.$tokenizeRow=function($){function k(de,me){de&&W.push({type:(L.className||"")+(me||""),value:de})}var L=C.data[$],W=[];if(!L)return W;typeof L=="string"&&(L={value:L});for(var U=L.caption||L.value||L.name,q=U.toLowerCase(),Z=(C.filterText||"").toLowerCase(),Q=0,le=0,ne=0;ne<=Z.length;ne++)if(ne!=le&&(L.matchMask&1<<ne||ne==Z.length)){var ce=Z.slice(le,ne);le=ne;var ae=q.indexOf(ce,Q);if(ae==-1)continue;k(U.slice(Q,ae),""),Q=ae+ce.length,k(U.slice(ae,Q),"completion-highlight")}return k(U.slice(Q,U.length),""),W.push({type:"completion-spacer",value:" "}),L.meta&&W.push({type:"completion-meta",value:L.meta}),L.message&&W.push({type:"completion-message",value:L.message}),W},N.$updateOnChange=O,N.start=O,C.session.$computeWidth=function(){return this.screenWidth=0},C.isOpen=!1,C.isTopdown=!1,C.autoSelect=!0,C.filterText="",C.isMouseOver=!1,C.data=[],C.setData=function($,k){C.filterText=k||"",C.setValue(d.stringRepeat(`
1140
+ `,$.length),-1),C.data=$||[],C.setRow(0)},C.getData=function($){return C.data[$]},C.getRow=function(){return T.start.row},C.setRow=function($){$=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,$)),T.start.row!=$&&(C.selection.clearSelection(),T.start.row=T.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($,k,L,W){if(!W&&C.isOpen&&C.anchorPos&&C.anchor&&C.anchorPos.top===$.top&&C.anchorPos.left===$.left&&C.anchor===L)return!0;var U=this.container,q=this.renderer.scrollBar.width||10,Z=window.innerHeight-q,Q=window.innerWidth-q,le=this.renderer,ne=le.$maxLines*k*1.4,ce={top:0,bottom:0},ae=Z-$.top-3*this.$borderSize-k,de=$.top-3*this.$borderSize;L||(de<=ae||ae>=ne?L="bottom":L="top"),L==="top"?(ce.bottom=$.top-this.$borderSize,ce.top=ce.bottom-ne):L==="bottom"&&(ce.top=$.top+k+this.$borderSize,ce.bottom=ce.top+ne);var me=ce.top>=0&&ce.bottom<=Z;if(!W&&!me)return!1;me?le.$maxPixelHeight=null:L==="top"?le.$maxPixelHeight=de:le.$maxPixelHeight=ae,L==="top"?(U.style.top="",U.style.bottom=Z+q-ce.bottom+"px",C.isTopdown=!1):(U.style.top=ce.top+"px",U.style.bottom="",C.isTopdown=!0),U.style.display="";var $e=$.left;return $e+U.offsetWidth>Q&&($e=Q-U.offsetWidth),U.style.left=$e+"px",U.style.right="",a.$fixPositionBug(U),C.isOpen||(C.isOpen=!0,this._signal("show"),D=null),C.anchorPos=$,C.anchor=L,!0},C.show=function($,k,L){this.tryShow($,k,L?"bottom":void 0,!0)},C.goTo=function($){var k=this.getRow(),L=this.session.getLength()-1;switch($){case"up":k=k<=0?L:k-1;break;case"down":k=k>=L?-1:k+1;break;case"start":k=0;break;case"end":k=L}this.setRow(k)},C.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},C.$imageSize=0,C.$borderSize=1,C}return I})();a.importCssString(`
1141
+ .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1142
+ background-color: #CAD6FA;
1143
+ z-index: 1;
1144
+ }
1145
+ .ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1146
+ background-color: #3a674e;
1147
+ }
1148
+ .ace_editor.ace_autocomplete .ace_line-hover {
1149
+ border: 1px solid #abbffe;
1150
+ margin-top: -1px;
1151
+ background: rgba(233,233,253,0.4);
1152
+ position: absolute;
1153
+ z-index: 2;
1154
+ }
1155
+ .ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
1156
+ border: 1px solid rgba(109, 150, 13, 0.8);
1157
+ background: rgba(58, 103, 78, 0.62);
1158
+ }
1159
+ .ace_completion-meta {
1160
+ opacity: 0.5;
1161
+ margin-left: 0.9em;
1162
+ }
1163
+ .ace_completion-message {
1164
+ margin-left: 0.9em;
1165
+ color: blue;
1166
+ }
1167
+ .ace_editor.ace_autocomplete .ace_completion-highlight{
1168
+ color: #2d69c7;
1169
+ }
1170
+ .ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
1171
+ color: #93ca12;
1172
+ }
1173
+ .ace_editor.ace_autocomplete {
1174
+ width: 300px;
1175
+ z-index: 200000;
1176
+ border: 1px lightgray solid;
1177
+ position: fixed;
1178
+ box-shadow: 2px 3px 5px rgba(0,0,0,.2);
1179
+ line-height: 1.4;
1180
+ background: #fefefe;
1181
+ color: #111;
1182
+ }
1183
+ .ace_dark.ace_editor.ace_autocomplete {
1184
+ border: 1px #484747 solid;
1185
+ box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
1186
+ line-height: 1.4;
1187
+ background: #25282c;
1188
+ color: #c1c1c1;
1189
+ }
1190
+ .ace_autocomplete .ace_text-layer {
1191
+ width: calc(100% - 8px);
1192
+ }
1193
+ .ace_autocomplete .ace_line {
1194
+ display: flex;
1195
+ align-items: center;
1196
+ }
1197
+ .ace_autocomplete .ace_line > * {
1198
+ min-width: 0;
1199
+ flex: 0 0 auto;
1200
+ }
1201
+ .ace_autocomplete .ace_line .ace_ {
1202
+ flex: 0 1 auto;
1203
+ overflow: hidden;
1204
+ text-overflow: ellipsis;
1205
+ }
1206
+ .ace_autocomplete .ace_completion-spacer {
1207
+ flex: 1;
1208
+ }
1209
+ .ace_autocomplete.ace_loading:after {
1210
+ content: "";
1211
+ position: absolute;
1212
+ top: 0px;
1213
+ height: 2px;
1214
+ width: 8%;
1215
+ background: blue;
1216
+ z-index: 100;
1217
+ animation: ace_progress 3s infinite linear;
1218
+ animation-delay: 300ms;
1219
+ transform: translateX(-100%) scaleX(1);
1220
+ }
1221
+ @keyframes ace_progress {
1222
+ 0% { transform: translateX(-100%) scaleX(1) }
1223
+ 50% { transform: translateX(625%) scaleX(2) }
1224
+ 100% { transform: translateX(1500%) scaleX(3) }
1225
+ }
1226
+ @media (prefers-reduced-motion) {
1227
+ .ace_autocomplete.ace_loading:after {
1228
+ transform: translateX(625%) scaleX(2);
1229
+ animation: none;
1230
+ }
1231
+ }
1232
+ `,"autocompletion.css",!1),r.AcePopup=x,r.$singleLineEditor=b,r.getAriaId=u}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,r,m){var p=(function(){function g(w){this.editor=w,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return g.prototype.setScreenReaderContent=function(w){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(),a=this.popup.renderer.$textLayer,l=a.element.childNodes[d-a.config.firstRow];if(l){for(var c="doc-tooltip ",u=0;u<this._lines.length;u++)c+="ace-inline-screenreader-line-".concat(u," ");l.setAttribute("aria-describedby",c)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=w.split(/\r\n|\r|\n/);var h=this.createCodeBlock();this.screenReaderDiv.appendChild(h)},g.prototype.destroy=function(){this.screenReaderDiv.remove()},g.prototype.createCodeBlock=function(){var w=document.createElement("pre");w.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 a=document.createTextNode(this._lines[h]);d.appendChild(a),w.appendChild(d)}return w},g})();r.AceInlineScreenReader=p}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(e,r,m){var p=e("../snippets").snippetManager,g=e("./inline_screenreader").AceInlineScreenReader,w=(function(){function h(){this.editor=null}return h.prototype.show=function(d,a,l){if(l=l||"",d&&this.editor&&this.editor!==d&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!d||!a)return!1;this.inlineScreenReader||(this.inlineScreenReader=new g(d));var c=a.snippet?p.getDisplayTextForSnippet(d,a.snippet):a.value;return a.hideInlinePreview||!c||!c.startsWith(l)?!1:(this.editor=d,this.inlineScreenReader.setScreenReaderContent(c),c=c.slice(l.length),c===""?d.removeGhostText():d.setGhostText(c),!0)},h.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},h.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},h.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},h})();r.AceInline=w}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,r,m){r.parForEach=function(g,w,h){var d=0,a=g.length;a===0&&h();for(var l=0;l<a;l++)w(g[l],function(c,u){d++,d===a&&h(c,u)})};var p=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(g,w,h){h=h||p;for(var d=[],a=w-1;a>=0&&h.test(g[a]);a--)d.push(g[a]);return d.reverse().join("")},r.retrieveFollowingIdentifier=function(g,w,h){h=h||p;for(var d=[],a=w;a<g.length&&h.test(g[a]);a++)d.push(g[a]);return d},r.getCompletionPrefix=function(g){var w=g.getCursorPosition(),h=g.session.getLine(w.row),d;return g.completers.forEach((function(a){a.identifierRegexps&&a.identifierRegexps.forEach((function(l){!d&&l&&(d=this.retrievePrecedingIdentifier(h,w.column,l))}).bind(this))}).bind(this)),d||this.retrievePrecedingIdentifier(h,w.column)},r.triggerAutocomplete=function(g,h){var h=h??g.session.getPrecedingCharacter();return g.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 p=e("./keyboard/hash_handler").HashHandler,g=e("./autocomplete/popup").AcePopup,w=e("./autocomplete/inline").AceInline,h=e("./autocomplete/popup").getAriaId,d=e("./autocomplete/util"),a=e("./lib/lang"),l=e("./lib/dom"),c=e("./snippets").snippetManager,u=e("./config"),i=e("./lib/event"),s=e("./lib/scroll").preventParentScroll,f=function(R,A){A.completer&&A.completer.destroy()},b=(function(){function R(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new p,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=a.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=a.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=a.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=a.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=a.delayedCall((function(){var A=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!A||this.editor.completers.length===0||(this.completions=new I(R.completionsForLoading),this.openPopup(this.editor,A.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty(R,"completionsForLoading",{get:function(){return[{caption:u.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),R.prototype.$init=function(){return this.popup=new g(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(A){this.insertMatch(),A.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),i.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},R.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new w,this.inlineRenderer},R.prototype.getPopup=function(){return this.popup||this.$init()},R.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},R.prototype.$seen=function(A){!this.hasSeen.has(A)&&A&&A.completer&&A.completer.onSeen&&typeof A.completer.onSeen=="function"&&(A.completer.onSeen(this.editor,A),this.hasSeen.add(A))},R.prototype.$onPopupChange=function(A){if(this.inlineRenderer&&this.inlineEnabled){var C=A?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(C),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},R.prototype.$updateGhostText=function(A){var C=this.base.row,O=this.base.column,D=this.editor.getCursorPosition().column,E=this.editor.session.getLine(C).slice(O,D);this.inlineRenderer.show(this.editor,A,E)?this.$seen(A):this.inlineRenderer.hide()},R.prototype.$onPopupRender=function(){var A=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var C=this.popup.getFirstVisibleRow();C<=this.popup.getLastVisibleRow();C++){var O=this.popup.getData(C);O&&(!A||O.hideInlinePreview)&&this.$seen(O)}},R.prototype.$onPopupShow=function(A){this.$onPopupChange(A),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},R.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var A=this.editor.container.parentNode,C=[];A;)C.push(A),A.addEventListener("scroll",this.onLayoutChange,{passive:!0}),A=A.parentNode;this.$elements=C}},R.prototype.unObserveLayoutChanges=function(){var A=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(C){C.removeEventListener("scroll",A.onLayoutChange,{passive:!0})}),this.$elements=null},R.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},R.prototype.$updatePopupPosition=function(){var A=this.editor,C=A.renderer,O=C.layerConfig.lineHeight,D=C.$cursorLayer.getPixelPosition(this.base,!0);D.left-=this.popup.getTextLeftOffset();var E=A.container.getBoundingClientRect();D.top+=E.top-C.layerConfig.offset,D.left+=E.left-A.renderer.scrollLeft,D.left+=C.gutterWidth;var T={top:D.top,left:D.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(T.top+=C.$ghostTextWidget.el.offsetHeight);var B=A.container.getBoundingClientRect().bottom-O,F=B<T.top?{top:B,left:T.left}:T;this.popup.tryShow(F,O,"bottom")||this.popup.tryShow(D,O,"top")||this.popup.show(D,O)},R.prototype.openPopup=function(A,C,O){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var D=this.popup.getRow(),E=this.popup.data[D];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:h(this.popup.getRow()),inline:this.inlineEnabled}),A.keyBinding.addKeyboardHandler(this.keyboardHandler);var T;this.stickySelection&&(T=this.popup.data.indexOf(E)),(!T||T===-1)&&(T=0),this.popup.setRow(this.autoSelect?T:-1),T===D&&E!==this.completions.filtered[T]&&this.$onPopupChange();var B=this.inlineRenderer&&this.inlineEnabled;if(T===D&&B){var F=this.popup.getData(this.popup.getRow());this.$updateGhostText(F)}O||(this.popup.setTheme(A.getTheme()),this.popup.setFontSize(A.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},R.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()},R.prototype.changeListener=function(A){var C=this.editor.selection.lead;(C.row!=this.base.row||C.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},R.prototype.blurListener=function(A){var C=document.activeElement,O=this.editor.textInput.getElement(),D=A.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(A.relatedTarget),E=this.popup&&this.popup.container;C!=O&&C.parentNode!=E&&!D&&C!=this.tooltipNode&&A.relatedTarget!=O&&this.detach()},R.prototype.mousedownListener=function(A){this.detach()},R.prototype.mousewheelListener=function(A){this.popup&&!this.popup.isMouseOver&&this.detach()},R.prototype.mouseOutListener=function(A){this.popup.isOpen&&this.$updatePopupPosition()},R.prototype.goTo=function(A){this.popup.goTo(A)},R.prototype.insertMatch=function(A,C){if(A||(A=this.popup.getData(this.popup.getRow())),!A)return!1;if(A.value==="")return this.detach();var O=this.completions,D=this.getCompletionProvider().insertMatch(this.editor,A,O.filterText,C);return this.completions==O&&this.detach(),D},R.prototype.showPopup=function(A,C){this.editor&&this.detach(),this.activated=!0,this.editor=A,A.completer!=this&&(A.completer&&A.completer.detach(),A.completer=this),A.on("changeSelection",this.changeListener),A.on("blur",this.blurListener),A.on("mousedown",this.mousedownListener),A.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,C)},R.prototype.getCompletionProvider=function(A){return this.completionProvider||(this.completionProvider=new x(A)),this.completionProvider},R.prototype.gatherCompletions=function(A,C){return this.getCompletionProvider().gatherCompletions(A,C)},R.prototype.updateCompletions=function(A,C){if(A&&this.base&&this.completions){var D=this.editor.getCursorPosition(),E=this.editor.session.getTextRange({start:this.base,end:D});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,A);return}if(C&&C.matches){var D=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(D.row,D.column),this.base.$insertRight=!0,this.completions=new I(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",A)}var O=this.editor.getSession(),D=this.editor.getCursorPosition(),E=d.getCompletionPrefix(this.editor);this.base=O.doc.createAnchor(D.row,D.column-E.length),this.base.$insertRight=!0;var T={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:E,pos:D}).provideCompletions(this.editor,T,(function(B,F,N){var $=F.filtered,k=d.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),N){if(!$.length){var L=!this.autoShown&&this.emptyMessage;if(typeof L=="function"&&(L=this.emptyMessage(k)),L){var W=[{caption:L,value:""}];this.completions=new I(W),this.openPopup(this.editor,k,A),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if($.length==1&&$[0].value==k&&!$[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&$.length==1)return this.insertMatch($[0])}this.completions=!N&&this.showLoadingState?new I(R.completionsForLoading.concat($),F.filterText):F,this.openPopup(this.editor,k,A),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)},R.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},R.prototype.updateDocTooltip=function(){var A=this.popup,C=this.completions&&this.completions.filtered,O=C&&(C[A.getHoveredRow()]||C[A.getRow()]),D=null;if(!O||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var E=this.editor.completers.length,T=0;T<E;T++){var B=this.editor.completers[T];if(B.getDocTooltip&&O.completerId===B.id){D=B.getDocTooltip(O);break}}if(!D&&typeof O!="string"&&(D=O),typeof D=="string"&&(D={docText:D}),!D||!D.docHTML&&!D.docText)return this.hideDocTooltip();this.showDocTooltip(D)},R.prototype.showDocTooltip=function(A){this.tooltipNode||(this.tooltipNode=l.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",s));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var O=this.tooltipNode;A.docHTML?O.innerHTML=A.docHTML:A.docText&&(O.textContent=A.docText),O.parentNode||this.popup.container.appendChild(this.tooltipNode);var D=this.popup,E=D.container.getBoundingClientRect(),T=400,B=300,F=D.renderer.scrollBar.width||10,N=E.left,$=window.innerWidth-E.right-F,k=D.isTopdown?window.innerHeight-F-E.bottom:E.top,L=[Math.min($/T,1),Math.min(N/T,1),Math.min(k/B,1)*.9],W=Math.max.apply(Math,L),U=O.style;U.display="block",W==L[0]||L[0]>=1?(U.left=E.right+1+"px",U.right="",U.maxWidth=T*W+"px",U.top=E.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-F-E.top,B)+"px"):W==L[1]||L[1]>=1?(U.right=window.innerWidth-E.left+"px",U.left="",U.maxWidth=T*W+"px",U.top=E.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-F-E.top,B)+"px"):W==L[2]&&(U.left=E.left+"px",U.right="",U.maxWidth=Math.min(T,window.innerWidth-E.left)+"px",D.isTopdown?(U.top=E.bottom+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-F-E.bottom,B)+"px"):(U.top="",U.bottom=window.innerHeight-E.top+"px",U.maxHeight=Math.min(E.top,B)+"px")),l.$fixPositionBug(O)},R.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var A=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==A&&this.editor.focus(),this.tooltipNode=null,A.parentNode&&A.parentNode.removeChild(A)}},R.prototype.onTooltipClick=function(A){for(var C=A.target;C&&C!=this.tooltipNode;){if(C.nodeName=="A"&&C.href){C.rel="noreferrer",C.target="_blank";break}C=C.parentNode}},R.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var A=this.popup.container;A&&A.parentNode&&A.parentNode.removeChild(A)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",f),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},R.for=function(A){return A.completer instanceof R||(A.completer&&(A.completer.destroy(),A.completer=null),u.get("sharedPopups")?(R.$sharedInstance||(R.$sharedInstance=new R),A.completer=R.$sharedInstance):(A.completer=new R,A.once("destroy",f))),A.completer},R})();b.prototype.commands={Up:function(R){R.completer.goTo("up")},Down:function(R){R.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(R){R.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(R){R.completer.goTo("end")},Esc:function(R){R.completer.detach()},Return:function(R){return R.completer.insertMatch()},"Shift-Return":function(R){R.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(R){var A=R.completer.insertMatch();if(A||R.tabstopManager)return A;R.completer.goTo("down")},Backspace:function(R){R.execCommand("backspace");var A=d.getCompletionPrefix(R);!A&&R.completer&&R.completer.detach()},PageUp:function(R){R.completer.popup.gotoPageUp()},PageDown:function(R){R.completer.popup.gotoPageDown()}},b.startCommand={name:"startAutocomplete",exec:function(R,A){var C=b.for(R);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup(R,A),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var x=(function(){function R(A){this.initialPosition=A,this.active=!0}return R.prototype.insertByIndex=function(A,C,O){return!this.completions||!this.completions.filtered?!1:this.insertMatch(A,this.completions.filtered[C],O)},R.prototype.insertMatch=function(A,C,O){if(!C)return!1;if(A.startOperation({command:{name:"insertMatch"}}),C.completer&&C.completer.insertMatch)C.completer.insertMatch(A,C);else{if(!this.completions)return!1;var D=this.completions.filterText.length,E=0;if(C.range&&C.range.start.row===C.range.end.row&&(D-=this.initialPosition.prefix.length,D+=this.initialPosition.pos.column-C.range.start.column,E+=C.range.end.column-this.initialPosition.pos.column),D||E){var T;A.selection.getAllRanges?T=A.selection.getAllRanges():T=[A.getSelectionRange()];for(var B=0,F;F=T[B];B++)F.start.column-=D,F.end.column+=E,A.session.remove(F)}C.snippet?c.insertSnippet(A,C.snippet):this.$insertString(A,C),C.completer&&C.completer.onInsert&&typeof C.completer.onInsert=="function"&&C.completer.onInsert(A,C),C.command&&C.command==="startAutocomplete"&&A.execCommand(C.command)}return A.endOperation(),!0},R.prototype.$insertString=function(A,C){var O=C.value||C;A.execCommand("insertstring",O)},R.prototype.gatherCompletions=function(A,C){var O=A.getSession(),D=A.getCursorPosition(),E=d.getCompletionPrefix(A),T=[];this.completers=A.completers;var B=A.completers.length;return A.completers.forEach(function(F,N){F.getCompletions(A,O,D,E,function($,k){F.hideInlinePreview&&(k=k.map(function(L){return Object.assign(L,{hideInlinePreview:F.hideInlinePreview})})),!$&&k&&(T=T.concat(k)),C(null,{prefix:d.getCompletionPrefix(A),matches:T,finished:--B===0})})}),!0},R.prototype.provideCompletions=function(A,C,O){var D=(function(F){var N=F.prefix,$=F.matches;this.completions=new I($),C.exactMatch&&(this.completions.exactMatch=!0),C.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(N),(F.finished||this.completions.filtered.length)&&O(null,this.completions,F.finished)}).bind(this),E=!0,T=null;if(this.gatherCompletions(A,(function(F,N){if(this.active){F&&(O(F,[],!0),this.detach());var $=N.prefix;if($.indexOf(N.prefix)===0){if(E){T=N;return}D(N)}}}).bind(this)),E=!1,T){var B=T;T=null,D(B)}},R.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(A){typeof A.cancel=="function"&&A.cancel()})},R})(),I=(function(){function R(A,C){this.all=A,this.filtered=A,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return R.prototype.setFilter=function(A){if(A.length>this.filterText&&A.lastIndexOf(this.filterText,0)===0)var C=this.filtered;else var C=this.all;this.filterText=A,C=this.filterCompletions(C,this.filterText),C=C.sort(function(D,E){return E.exactMatch-D.exactMatch||E.$score-D.$score||(D.caption||D.value).localeCompare(E.caption||E.value)});var O=null;C=C.filter(function(D){var E=D.snippet||D.caption||D.value;return E===O?!1:(O=E,!0)}),this.filtered=C},R.prototype.filterCompletions=function(A,C){var O=[],D=C.toUpperCase(),E=C.toLowerCase();e:for(var T=0,B;B=A[T];T++){if(B.skipFilter){B.$score=B.score,O.push(B);continue}var F=!this.ignoreCaption&&B.caption||B.value||B.snippet;if(F){var N=-1,$=0,k=0,L,W;if(this.exactMatch){if(C!==F.substr(0,C.length))continue e}else{var U=F.toLowerCase().indexOf(E);if(U>-1)k=U;else for(var q=0;q<C.length;q++){var Z=F.indexOf(E[q],N+1),Q=F.indexOf(D[q],N+1);if(L=Z>=0&&(Q<0||Z<Q)?Z:Q,L<0)continue e;W=L-N-1,W>0&&(N===-1&&(k+=10),k+=W,$|=1<<q),N=L}}B.matchMask=$,B.exactMatch=k?0:1,B.$score=(B.score||0)-k,O.push(B)}}return O},R})();r.Autocomplete=b,r.CompletionProvider=x,r.FilteredList=I}),ace.define("ace/marker_group",["require","exports","module"],function(e,r,m){var p=(function(){function g(w,h){h&&(this.markerType=h.markerType),this.markers=[],this.session=w,w.addDynamicMarker(this)}return g.prototype.getMarkerAtPosition=function(w){return this.markers.find(function(h){return h.range.contains(w.row,w.column)})},g.prototype.markersComparator=function(w,h){return w.range.start.row-h.range.start.row},g.prototype.setMarkers=function(w){this.markers=w.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},g.prototype.update=function(w,h,d,a){if(!(!this.markers||!this.markers.length))for(var l=a.firstRow,c=a.lastRow,u,i=0,s=0,f=0;f<this.markers.length;f++){var b=this.markers[f];if(!(b.range.end.row<l)&&!(b.range.start.row>c)&&(b.range.start.row===s?i++:(s=b.range.start.row,i=0),!(i>200))){var x=b.range.clipRows(l,c);if(!(x.start.row===x.end.row&&x.start.column===x.end.column)){var I=x.toScreenRange(d);if(I.isEmpty()){u=d.getNextFoldLine(x.end.row,u),u&&u.end.row>x.end.row&&(l=u.end.row);continue}this.markerType==="fullLine"?h.drawFullLineMarker(w,I,b.className,a):I.isMultiLine()?this.markerType==="line"?h.drawMultiLineMarker(w,I,b.className,a):h.drawTextMarker(w,I,b.className,a):h.drawSingleLineMarker(w,I,b.className+" ace_br15",a)}}}},g})();p.prototype.MAX_MARKERS=1e4,r.MarkerGroup=p}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,r,m){function p(d,a){var l=d.getTextRange(w.fromPoints({row:0,column:0},a));return l.split(h).length-1}function g(d,a){var l=p(d,a),c=d.getValue().split(h),u=Object.create(null),i=c[l];return c.forEach(function(s,f){if(!(!s||s===i)){var b=Math.abs(l-f),x=c.length-b;u[s]?u[s]=Math.max(x,u[s]):u[s]=x}}),u}var w=e("../range").Range,h=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.id="textCompleter",r.getCompletions=function(d,a,l,c,u){var i=g(a,l),s=Object.keys(i);u(null,s.map(function(f){return{caption:f,value:f,score:i[f],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 p=e("../snippets").snippetManager,g=e("../autocomplete").Autocomplete,w=e("../config"),h=e("../lib/lang"),d=e("../autocomplete/util"),a=e("../marker_group").MarkerGroup,l=e("../autocomplete/text_completer"),c={getCompletions:function(E,T,B,F,N){if(T.$mode.completer)return T.$mode.completer.getCompletions(E,T,B,F,N);var $=E.session.getState(B.row),k=T.$mode.getCompletions($,T,B,F);k=k.map(function(L){return L.completerId=c.id,L}),N(null,k)},id:"keywordCompleter"},u=function(E){var T={};return E.replace(/\${(\d+)(:(.*?))?}/g,function(B,F,N,$){return T[F]=$||""}).replace(/\$(\d+?)/g,function(B,F){return T[F]})},i={getCompletions:function(E,T,B,F,N){var $=[],k=T.getTokenAt(B.row,B.column);k&&k.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?$.push("html-tag"):$=p.getActiveScopes(E);var L=p.snippetMap,W=[];$.forEach(function(U){for(var q=L[U]||[],Z=q.length;Z--;){var Q=q[Z],le=Q.name||Q.tabTrigger;le&&W.push({caption:le,snippet:Q.content,meta:Q.tabTrigger&&!Q.name?Q.tabTrigger+"⇥ ":"snippet",completerId:i.id})}},this),N(null,W)},getDocTooltip:function(E){E.snippet&&!E.docHTML&&(E.docHTML=["<b>",h.escapeHTML(E.caption),"</b>","<hr></hr>",h.escapeHTML(u(E.snippet))].join(""))},id:"snippetCompleter"},s=[i,l,c];r.setCompleters=function(E){s.length=0,E&&s.push.apply(s,E)},r.addCompleter=function(E){s.push(E)},r.textCompleter=l,r.keyWordCompleter=c,r.snippetCompleter=i;var f={name:"expandSnippet",exec:function(E){return p.expandWithTab(E)},bindKey:"Tab"},b=function(E,T){x(T.session.$mode)},x=function(E){typeof E=="string"&&(E=w.$modes[E]),E&&(p.files||(p.files={}),I(E.$id,E.snippetFileId),E.modes&&E.modes.forEach(x))},I=function(E,T){!T||!E||p.files[E]||(p.files[E]={},w.loadModule(T,function(B){B&&(p.files[E]=B,!B.snippets&&B.snippetText&&(B.snippets=p.parseSnippetFile(B.snippetText)),p.register(B.snippets||[],B.scope),B.includeScopes&&(p.snippetMap[B.scope].includeScopes=B.includeScopes,B.includeScopes.forEach(function(F){x("ace/mode/"+F)})))}))},R=function(E){var T=E.editor,B=T.completer&&T.completer.activated;if(E.command.name==="backspace")B&&!d.getCompletionPrefix(T)&&T.completer.detach();else if(E.command.name==="insertstring"&&!B){A=E;var F=E.editor.$liveAutocompletionDelay;F?C.delay(F):O(E)}},A,C=h.delayedCall(function(){O(A)},0),O=function(E){var T=E.editor,B=d.getCompletionPrefix(T),F=E.args,N=d.triggerAutocomplete(T,F);if(B&&B.length>=T.$liveAutocompletionThreshold||N){var $=g.for(T);$.autoShown=!0,$.showPopup(T)}},D=e("../editor").Editor;e("../config").defineOptions(D.prototype,"editor",{enableBasicAutocompletion:{set:function(E){E?(g.for(this),this.completers||(this.completers=Array.isArray(E)?E:s),this.commands.addCommand(g.startCommand)):this.commands.removeCommand(g.startCommand)},value:!1},enableLiveAutocompletion:{set:function(E){E?(this.completers||(this.completers=Array.isArray(E)?E:s),this.commands.on("afterExec",R)):this.commands.off("afterExec",R)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(E){E?(this.commands.addCommand(f),this.on("changeMode",b),b(null,this)):(this.commands.removeCommand(f),this.off("changeMode",b))},value:!1}}),r.MarkerGroup=a}),(function(){ace.require(["ace/ext/language_tools"],function(e){t&&(t.exports=e)})})()})(gg)),gg.exports}wk();var vg={exports:{}},yg;function xk(){return yg||(yg=1,(function(t,n){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(e,r,m){m.exports=`
1233
+
1234
+ /* ------------------------------------------------------------------------------------------
1235
+ * Editor Search Form
1236
+ * --------------------------------------------------------------------------------------- */
1237
+ .ace_search {
1238
+ background-color: #ddd;
1239
+ color: #666;
1240
+ border: 1px solid #cbcbcb;
1241
+ border-top: 0 none;
1242
+ overflow: hidden;
1243
+ margin: 0;
1244
+ padding: 4px 6px 0 4px;
1245
+ position: absolute;
1246
+ top: 0;
1247
+ z-index: 99;
1248
+ white-space: normal;
1249
+ }
1250
+ .ace_search.left {
1251
+ border-left: 0 none;
1252
+ border-radius: 0px 0px 5px 0px;
1253
+ left: 0;
1254
+ }
1255
+ .ace_search.right {
1256
+ border-radius: 0px 0px 0px 5px;
1257
+ border-right: 0 none;
1258
+ right: 0;
1259
+ }
1260
+
1261
+ .ace_search_form, .ace_replace_form {
1262
+ margin: 0 20px 4px 0;
1263
+ overflow: hidden;
1264
+ line-height: 1.9;
1265
+ }
1266
+ .ace_replace_form {
1267
+ margin-right: 0;
1268
+ }
1269
+ .ace_search_form.ace_nomatch {
1270
+ outline: 1px solid red;
1271
+ }
1272
+
1273
+ .ace_search_field {
1274
+ border-radius: 3px 0 0 3px;
1275
+ background-color: white;
1276
+ color: black;
1277
+ border: 1px solid #cbcbcb;
1278
+ border-right: 0 none;
1279
+ outline: 0;
1280
+ padding: 0;
1281
+ font-size: inherit;
1282
+ margin: 0;
1283
+ line-height: inherit;
1284
+ padding: 0 6px;
1285
+ min-width: 17em;
1286
+ vertical-align: top;
1287
+ min-height: 1.8em;
1288
+ box-sizing: content-box;
1289
+ }
1290
+ .ace_searchbtn {
1291
+ border: 1px solid #cbcbcb;
1292
+ line-height: inherit;
1293
+ display: inline-block;
1294
+ padding: 0 6px;
1295
+ background: #fff;
1296
+ border-right: 0 none;
1297
+ border-left: 1px solid #dcdcdc;
1298
+ cursor: pointer;
1299
+ margin: 0;
1300
+ position: relative;
1301
+ color: #666;
1302
+ }
1303
+ .ace_searchbtn:last-child {
1304
+ border-radius: 0 3px 3px 0;
1305
+ border-right: 1px solid #cbcbcb;
1306
+ }
1307
+ .ace_searchbtn:disabled {
1308
+ background: none;
1309
+ cursor: default;
1310
+ }
1311
+ .ace_searchbtn:hover {
1312
+ background-color: #eef1f6;
1313
+ }
1314
+ .ace_searchbtn.prev, .ace_searchbtn.next {
1315
+ padding: 0px 0.7em
1316
+ }
1317
+ .ace_searchbtn.prev:after, .ace_searchbtn.next:after {
1318
+ content: "";
1319
+ border: solid 2px #888;
1320
+ width: 0.5em;
1321
+ height: 0.5em;
1322
+ border-width: 2px 0 0 2px;
1323
+ display:inline-block;
1324
+ transform: rotate(-45deg);
1325
+ }
1326
+ .ace_searchbtn.next:after {
1327
+ border-width: 0 2px 2px 0 ;
1328
+ }
1329
+ .ace_searchbtn_close {
1330
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
1331
+ border-radius: 50%;
1332
+ border: 0 none;
1333
+ color: #656565;
1334
+ cursor: pointer;
1335
+ font: 16px/16px Arial;
1336
+ padding: 0;
1337
+ height: 14px;
1338
+ width: 14px;
1339
+ top: 9px;
1340
+ right: 7px;
1341
+ position: absolute;
1342
+ }
1343
+ .ace_searchbtn_close:hover {
1344
+ background-color: #656565;
1345
+ background-position: 50% 100%;
1346
+ color: white;
1347
+ }
1348
+
1349
+ .ace_button {
1350
+ margin-left: 2px;
1351
+ cursor: pointer;
1352
+ -webkit-user-select: none;
1353
+ -moz-user-select: none;
1354
+ -o-user-select: none;
1355
+ -ms-user-select: none;
1356
+ user-select: none;
1357
+ overflow: hidden;
1358
+ opacity: 0.7;
1359
+ border: 1px solid rgba(100,100,100,0.23);
1360
+ padding: 1px;
1361
+ box-sizing: border-box!important;
1362
+ color: black;
1363
+ }
1364
+
1365
+ .ace_button:hover {
1366
+ background-color: #eee;
1367
+ opacity:1;
1368
+ }
1369
+ .ace_button:active {
1370
+ background-color: #ddd;
1371
+ }
1372
+
1373
+ .ace_button.checked {
1374
+ border-color: #3399ff;
1375
+ opacity:1;
1376
+ }
1377
+
1378
+ .ace_search_options{
1379
+ margin-bottom: 3px;
1380
+ text-align: right;
1381
+ -webkit-user-select: none;
1382
+ -moz-user-select: none;
1383
+ -o-user-select: none;
1384
+ -ms-user-select: none;
1385
+ user-select: none;
1386
+ clear: both;
1387
+ }
1388
+
1389
+ .ace_search_counter {
1390
+ float: left;
1391
+ font-family: arial;
1392
+ padding: 0 8px;
1393
+ }`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/ext/searchbox","ace/ext/searchbox","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(e,r,m){var p=e("../lib/dom"),g=e("../lib/lang"),w=e("../lib/event"),h=e("./searchbox-css"),d=e("../keyboard/hash_handler").HashHandler,a=e("../lib/keys"),l=e("../config").nls,c=999;p.importCssString(h,"ace_searchbox",!1);var u=(function(){function f(b,x,I){this.activeInput,this.element=p.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:l("search-box.find.placeholder","Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},"​"],["span",{action:"findNext",class:"ace_searchbtn next"},"​"],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},l("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:l("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},l("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},l("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:l("search-box.toggle-replace.title","Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:l("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:l("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:l("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:l("search-box.toggle-in-selection.title","Search In Selection")},"S"]]]),this.setSession=this.setSession.bind(this),this.$onEditorInput=this.onEditorInput.bind(this),this.$init(),this.setEditor(b),p.importCssString(h,"ace_searchbox",b.container),w.addListener(this.element,"touchstart",function(R){R.stopPropagation()},b)}return f.prototype.setEditor=function(b){b.searchBox=this,b.renderer.scroller.appendChild(this.element),this.editor=b},f.prototype.setSession=function(b){this.searchRange=null,this.$syncOptions(!0)},f.prototype.onEditorInput=function(){this.find(!1,!1,!0)},f.prototype.$initElements=function(b){this.searchBox=b.querySelector(".ace_search_form"),this.replaceBox=b.querySelector(".ace_replace_form"),this.searchOption=b.querySelector("[action=searchInSelection]"),this.replaceOption=b.querySelector("[action=toggleReplace]"),this.regExpOption=b.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=b.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=b.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=b.querySelector(".ace_search_counter")},f.prototype.$init=function(){var b=this.element;this.$initElements(b);var x=this;w.addListener(b,"mousedown",function(I){setTimeout(function(){x.activeInput.focus()},0),w.stopPropagation(I)}),w.addListener(b,"click",function(I){var R=I.target||I.srcElement,A=R.getAttribute("action");A&&x[A]?x[A]():x.$searchBarKb.commands[A]&&x.$searchBarKb.commands[A].exec(x),w.stopPropagation(I)}),w.addCommandKeyListener(b,function(I,R,A){var C=a.keyCodeToString(A),O=x.$searchBarKb.findKeyCommand(R,C);O&&O.exec&&(O.exec(x),w.stopEvent(I))}),this.$onChange=g.delayedCall(function(){x.find(!1,!1)}),w.addListener(this.searchInput,"input",function(){x.$onChange.schedule(20)}),w.addListener(this.searchInput,"focus",function(){x.activeInput=x.searchInput,x.searchInput.value&&x.highlight()}),w.addListener(this.replaceInput,"focus",function(){x.activeInput=x.replaceInput,x.searchInput.value&&x.highlight()})},f.prototype.setSearchRange=function(b){this.searchRange=b,b?this.searchRangeMarker=this.editor.session.addMarker(b,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},f.prototype.$syncOptions=function(b){p.setCssClass(this.replaceOption,"checked",this.searchRange),p.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",p.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),p.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),p.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var x=this.editor.getReadOnly();this.replaceOption.style.display=x?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!x?"":"none",this.find(!1,!1,b)},f.prototype.highlight=function(b){this.editor.session.highlight(b||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},f.prototype.find=function(b,x,I){if(this.editor.session){var R=this.editor.find(this.searchInput.value,{skipCurrent:b,backwards:x,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:I,range:this.searchRange}),A=!R&&this.searchInput.value;p.setCssClass(this.searchBox,"ace_nomatch",A),this.editor._emit("findSearchBox",{match:!A}),this.highlight(),this.updateCounter()}},f.prototype.updateCounter=function(){var b=this.editor,x=b.$search.$options.re,I=x.unicode,R=0,A=0;if(x){var C=this.searchRange?b.session.getTextRange(this.searchRange):b.getValue();b.$search.$isMultilineSearch(b.getLastSearchOptions())&&(C=C.replace(/\r\n|\r|\n/g,`
1394
+ `),b.session.doc.$autoNewLine=`
1395
+ `);var O=b.session.doc.positionToIndex(b.selection.anchor);this.searchRange&&(O-=b.session.doc.positionToIndex(this.searchRange.start));for(var D=x.lastIndex=0,E;(E=x.exec(C))&&(R++,D=E.index,D<=O&&A++,!(R>c||!E[0]&&(x.lastIndex=D+=g.skipEmptyMatch(C,D,I),D>=C.length))););}this.searchCounter.textContent=l("search-box.search-counter","$0 of $1",[A,R>c?c+"+":R])},f.prototype.findNext=function(){this.find(!0,!1)},f.prototype.findPrev=function(){this.find(!0,!0)},f.prototype.findAll=function(){var b=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),x=!b&&this.searchInput.value;p.setCssClass(this.searchBox,"ace_nomatch",x),this.editor._emit("findSearchBox",{match:!x}),this.highlight(),this.hide()},f.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},f.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},f.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},f.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()},f.prototype.show=function(b,x){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=x,this.editor.$search.$options.regExp&&(b=g.escapeRegExp(b)),b!=null&&(this.searchInput.value=b),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},f.prototype.isFocused=function(){var b=document.activeElement;return b==this.searchInput||b==this.replaceInput},f})(),i=new d;i.bindKeys({"Ctrl-f|Command-f":function(f){var b=f.isReplace=!f.isReplace;f.replaceBox.style.display=b?"":"none",f.replaceOption.checked=!1,f.$syncOptions(),f.searchInput.focus()},"Ctrl-H|Command-Option-F":function(f){f.editor.getReadOnly()||(f.replaceOption.checked=!0,f.$syncOptions(),f.replaceInput.focus())},"Ctrl-G|Command-G":function(f){f.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(f){f.findPrev()},esc:function(f){setTimeout(function(){f.hide()})},Return:function(f){f.activeInput==f.replaceInput&&f.replace(),f.findNext()},"Shift-Return":function(f){f.activeInput==f.replaceInput&&f.replace(),f.findPrev()},"Alt-Return":function(f){f.activeInput==f.replaceInput&&f.replaceAll(),f.findAll()},Tab:function(f){(f.activeInput==f.replaceInput?f.searchInput:f.replaceInput).focus()}}),i.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(f){f.regExpOption.checked=!f.regExpOption.checked,f.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(f){f.caseSensitiveOption.checked=!f.caseSensitiveOption.checked,f.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(f){f.wholeWordOption.checked=!f.wholeWordOption.checked,f.$syncOptions()}},{name:"toggleReplace",exec:function(f){f.replaceOption.checked=!f.replaceOption.checked,f.$syncOptions()}},{name:"searchInSelection",exec:function(f){f.searchOption.checked=!f.searchRange,f.setSearchRange(f.searchOption.checked&&f.editor.getSelectionRange()),f.$syncOptions()}}]);var s=new d([{bindKey:"Esc",name:"closeSearchBar",exec:function(f){f.searchBox.hide()}}]);u.prototype.$searchBarKb=i,u.prototype.$closeSearchBarKb=s,r.SearchBox=u,r.Search=function(f,b){var x=f.searchBox||new u(f),I=f.session.selection.getRange(),R=I.isMultiLine()?"":f.session.getTextRange(I);x.show(R,b)}}),(function(){ace.require(["ace/ext/searchbox"],function(e){t&&(t.exports=e)})})()})(vg)),vg.exports}xk();var bg={exports:{}},wg;function Ck(){return wg||(wg=1,(function(t,n){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,r,m){function p(d,a){function l(E,T,B){if(!(E.length<T)){var F=E.slice(0,T),N=E.slice(T),$=/^(?:(\s+)|(\S+)(\s+))/.exec(N),k=/(?:(\s+)|(\s+)(\S+))$/.exec(F),L=0,W=0;if(k&&!k[2]&&(L=T-k[1].length,W=T),$&&!$[2]&&(L||(L=T),W=T+$[1].length),L)return{start:L,end:W};if(k&&k[2]&&k.index>B)return{start:k.index,end:k.index+k[2].length};if($&&$[2])return L=T+$[2].length,{start:L,end:L+$[3].length}}}for(var c=a.column||d.getOption("printMarginColumn"),u=a.allowMerge!=0,i=Math.min(a.startRow,a.endRow),s=Math.max(a.startRow,a.endRow),f=d.session;i<=s;){var b=f.getLine(i);if(b.length>c){var x=l(b,c,5);if(x){var I=/^\s*/.exec(b)[0];f.replace(new w(i,x.start,i,x.end),`
1396
+ `+I)}s++}else if(u&&/\S/.test(b)&&i!=s){var R=f.getLine(i+1);if(R&&/\S/.test(R)){var A=b.replace(/\s+$/,""),C=R.replace(/^\s+/,""),O=A+" "+C,x=l(O,c,5);if(x&&x.start>A.length||O.length<c){var D=new w(i,A.length,i+1,R.length-C.length);f.replace(D," "),i--,s--}else A.length<b.length&&f.remove(new w(i,A.length,i,b.length))}}i++}}function g(d){if(d.command.name=="insertstring"&&/\S/.test(d.args)){var a=d.editor,l=a.selection.cursor;if(l.column<=a.renderer.$printMarginColumn)return;var c=a.session.$undoManager.$lastDelta;p(a,{startRow:l.row,endRow:l.row,allowMerge:!1}),c!=a.session.$undoManager.$lastDelta&&a.session.markUndoGroup()}}var w=e("../range").Range,h=e("../editor").Editor;e("../config").defineOptions(h.prototype,"editor",{hardWrap:{set:function(d){d?this.commands.on("afterExec",g):this.commands.off("afterExec",g)},value:!1}}),r.hardWrap=p}),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],function(e,r,m){function p(y){return{row:y.line,column:y.ch}}function g(y){return new De(y.row,y.column)}function w(y,S,_){if(S.line===_.line&&S.ch>=_.ch-1){var P=y.getLine(S.line),z=P.charCodeAt(S.ch);55296<=z&&z<=55551&&(_.ch+=1)}return{start:S,end:_}}function h(y){y.setOption("disableInput",!0),y.setOption("showCursorWhenSelecting",!1),ze.signal(y,"vim-mode-change",{mode:"normal"}),y.on("cursorActivity",uo),O(y),ze.on(y.getInputField(),"paste",a(y))}function d(y){y.setOption("disableInput",!1),y.off("cursorActivity",uo),ze.off(y.getInputField(),"paste",a(y)),y.state.vim=null,rn&&clearTimeout(rn)}function a(y){var S=y.state.vim;return S.onPasteFn||(S.onPasteFn=function(){S.insertMode||(y.setCursor(me(y.getCursor(),0,1)),Bn.enterInsertMode(y,{},S))}),S.onPasteFn}function l(y,S){return S>=y.firstLine()&&S<=y.lastLine()}function c(y){return/^[a-z]$/.test(y)}function u(y){return"()[]{}".indexOf(y)!=-1}function i(y){return ba.test(y)}function s(y){return at.test(y)}function f(y){return/^\s*$/.test(y)}function b(y){return".?!".indexOf(y)!=-1}function x(y,S){for(var _=0;_<S.length;_++)if(S[_]==y)return!0;return!1}function I(y,S,_,P,z){if(S===void 0&&!z)throw Error("defaultValue is required unless callback is provided");if(_||(_="string"),Ht[y]={type:_,defaultValue:S,callback:z},P)for(var j=0;j<P.length;j++)Ht[P[j]]=Ht[y];S&&R(y,S)}function R(y,S,_,P){var z=Ht[y];P=P||{};var j=P.scope;if(!z)return new Error("Unknown option: "+y);if(z.type=="boolean"){if(S&&S!==!0)return new Error("Invalid argument: "+y+"="+S);S!==!1&&(S=!0)}z.callback?(j!=="local"&&z.callback(S,void 0),j!=="global"&&_&&z.callback(S,_)):(j!=="local"&&(z.value=z.type=="boolean"?!!S:S),j!=="global"&&_&&(_.state.vim.options[y]={value:S}))}function A(y,S,_){var P=Ht[y];_=_||{};var z=_.scope;if(!P)return new Error("Unknown option: "+y);if(P.callback){var j=S&&P.callback(void 0,S);return z!=="global"&&j!==void 0?j:z!=="local"?P.callback():void 0}var j=z!=="global"&&S&&S.state.vim.options[y];return(j||z!=="local"&&P||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Wn()}function O(y){return y.state.vim||(y.state.vim={inputState:new $,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),y.state.vim}function D(){je={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Oi(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new q({}),searchHistoryController:new Z,exCommandHistoryController:new Z};for(var y in Ht){var S=Ht[y];S.value=S.defaultValue}}function E(y){function S(Y){typeof Y=="string"?Dt.value=Y:Dt=null}if(y[0]=="<"){var _=y.toLowerCase().slice(1,-1),P=_.split("-");if(_=P.pop()||"",_=="lt")y="<";else if(_=="space")y=" ";else if(_=="cr")y=`
1397
+ `;else if(Qi[_]){var z=Dt.value,j={key:Qi[_],target:{value:z,selectionEnd:z.length,selectionStart:z.length}};Dt.onKeyDown&&Dt.onKeyDown(j,Dt.value,S),Dt&&Dt.onKeyUp&&Dt.onKeyUp(j,Dt.value,S);return}}if(y==`
1398
+ `){var G=Dt;Dt=null,G.onClose&&G.onClose(G.value)}else Dt.value=(Dt.value||"")+y}function T(y,S,_){var P=Ni;if(_){if(Nr.indexOf(_)!=-1)return;Nr.push(_),Ni=_.noremap!=0}try{for(var z=O(y),j=/<(?:[CSMA]-)*\w+>|./gi,G;G=j.exec(S);){var Y=G[0],X=z.insertMode;if(Dt){E(Y);continue}var re=wt.handleKey(y,Y,"mapping");if(!re&&X&&z.insertMode){if(Y[0]=="<"){var ue=Y.toLowerCase().slice(1,-1),ye=ue.split("-");if(ue=ye.pop()||"",ue=="lt")Y="<";else if(ue=="space")Y=" ";else if(ue=="cr")Y=`
1399
+ `;else{if(Qi.hasOwnProperty(ue)){Y=Qi[ue],Ms(y,Y);continue}Y=Y[0],j.lastIndex=G.index+1}}y.replaceSelection(Y)}}}finally{if(Nr.pop(),Ni=Nr.length?P:!1,!Nr.length&&Dt){var Ce=Dt;Dt=null,ar(y,Ce)}}}function B(y,S){var _=y.key;if(!Zn[_]){_.length>1&&_[0]=="n"&&(_=_.replace("Numpad","")),_=Dr[_]||_;var P="";if(y.ctrlKey&&(P+="C-"),y.altKey&&(P+="A-"),y.metaKey&&(P+="M-"),ze.isMac&&y.altKey&&!y.metaKey&&!y.ctrlKey&&(P=P.slice(2)),(P||_.length>1)&&y.shiftKey&&(P+="S-"),S&&!S.expectLiteralNext&&_.length==1){if(Dn.keymap&&_ in Dn.keymap)(Dn.remapCtrl!=0||!P)&&(_=Dn.keymap[_]);else if(_.charCodeAt(0)>255){var z=y.code&&y.code.slice(-1)||"";y.shiftKey||(z=z.toLowerCase()),z&&(_=z)}}return P+=_,P.length>1&&(P="<"+P+">"),P}}function F(y,S){Dn.string!==y&&(Dn=N(y)),Dn.remapCtrl=S}function N(y){function S(P){return P.split(/\\?(.)/).filter(Boolean)}var _={};return y?(y.split(/((?:[^\\,]|\\.)+),/).map(function(P){if(P){var z=P.split(/((?:[^\\;]|\\.)+);/);if(z.length==3){var j=S(z[1]),G=S(z[2]);if(j.length!==G.length)return;for(var Y=0;Y<j.length;++Y)_[j[Y]]=G[Y]}else if(z.length==1){var X=S(P);if(X.length%2!==0)return;for(var Y=0;Y<X.length;Y+=2)_[X[Y]]=X[Y+1]}}}),{keymap:_,string:y}):{keymap:_,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 k(y,S){y.state.vim.inputState=new $,y.state.vim.expectLiteralNext=!1,ze.signal(y,"vim-command-done",S)}function L(){this.removed=[],this.inserted=""}function W(y,S,_){this.clear(),this.keyBuffer=[y||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!S,this.blockwise=!!_}function U(y,S){var _=je.registerController.registers;if(!y||y.length!=1)throw Error("Register name must be 1 character");_[y]=S,Is.push(y)}function q(y){this.registers=y,this.unnamedRegister=y['"']=new W,y["."]=new W,y[":"]=new W,y["/"]=new W,y["+"]=new W}function Z(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function Q(y,S){$n[y]=S}function le(y,S){for(var _=[],P=0;P<S;P++)_.push(y);return _}function ne(y,S){Jo[y]=S}function ce(y,S){Bn[y]=S}function ae(y,S,_){var P=y.state.vim,z=P.insertMode||P.visualMode,j=Math.min(Math.max(y.firstLine(),S.line),y.lastLine()),G=y.getLine(j),Y=G.length-1+ +!!z,X=Math.min(Math.max(0,S.ch),Y),re=G.charCodeAt(X);if(56320<=re&&re<=57343){var ue=1;_&&_.line==j&&_.ch>X&&(ue=-1),X+=ue,X>Y&&(X-=2)}return new De(j,X)}function de(y){var S={};for(var _ in y)y.hasOwnProperty(_)&&(S[_]=y[_]);return S}function me(y,S,_){return typeof S=="object"&&(_=S.ch,S=S.line),new De(y.line+S,y.ch+_)}function $e(y,S,_,P){P.operator&&(_="operatorPending");for(var z,j=[],G=[],Y=Ni?S.length-Ro:0,X=Y;X<S.length;X++){var re=S[X];_=="insert"&&re.context!="insert"||re.context&&re.context!=_||P.operator&&re.type=="action"||!(z=Re(y,re.keys))||(z=="partial"&&j.push(re),z=="full"&&G.push(re))}return{partial:j.length&&j,full:G.length&&G}}function Re(y,S){var _=S.slice(-11)=="<character>",P=S.slice(-10)=="<register>";if(_||P){var z=S.length-(_?11:10),j=y.slice(0,z),G=S.slice(0,z);return j==G&&y.length>z?"full":G.indexOf(j)==0?"partial":!1}return y==S?"full":S.indexOf(y)==0?"partial":!1}function Me(y){var S=/^.*(<[^>]+>)$/.exec(y),_=S?S[1]:y.slice(-1);if(_.length>1)switch(_){case"<CR>":_=`
1400
+ `;break;case"<Space>":_=" ";break;default:_=""}return _}function Xe(y,S,_){return function(){for(var P=0;P<_;P++)S(y)}}function qe(y){return new De(y.line,y.ch)}function rt(y,S){return y.ch==S.ch&&y.line==S.line}function st(y,S){return y.line<S.line?!0:y.line==S.line&&y.ch<S.ch}function et(y,S){return arguments.length>2&&(S=et.apply(void 0,Array.prototype.slice.call(arguments,1))),st(y,S)?y:S}function Wt(y,S){return arguments.length>2&&(S=Wt.apply(void 0,Array.prototype.slice.call(arguments,1))),st(y,S)?S:y}function br(y,S,_){var P=st(y,S),z=st(S,_);return P&&z}function At(y,S){return y.getLine(S).length}function ir(y){return y.trim?y.trim():y.replace(/^\s+|\s+$/g,"")}function An(y){return y.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function wr(y,S,_){var P=At(y,S),z=new Array(_-P+1).join(" ");y.setCursor(new De(S,P)),y.replaceRange(z,y.getCursor())}function fn(y,S){var _=[],P=y.listSelections(),z=qe(y.clipPos(S)),j=!rt(S,z),G=y.getCursor("head"),Y=ht(P,G),X=rt(P[Y].head,P[Y].anchor),re=P.length-1,ue=re-Y>Y?re:0,ye=P[ue].anchor,Ce=Math.min(ye.line,z.line),ve=Math.max(ye.line,z.line),we=ye.ch,Oe=z.ch,Ie=P[ue].head.ch-we,Ve=Oe-we;Ie>0&&Ve<=0?(we++,j||Oe--):Ie<0&&Ve>=0?(we--,X||Oe++):Ie<0&&Ve==-1&&(we--,Oe++);for(var lt=Ce;lt<=ve;lt++){var Je={anchor:new De(lt,we),head:new De(lt,Oe)};_.push(Je)}return y.setSelections(_),S.ch=Oe,ye.ch=we,ye}function or(y,S,_){for(var P=[],z=0;z<_;z++){var j=me(S,z,0);P.push({anchor:j,head:j})}y.setSelections(P,0)}function ht(y,S,_){for(var P=0;P<y.length;P++){var z=rt(y[P].anchor,S),j=rt(y[P].head,S);if(z||j)return P}return-1}function Ge(y,S){var _=S.lastSelection,P=function(){var j=y.listSelections(),G=j[0],Y=j[j.length-1],X=st(G.anchor,G.head)?G.anchor:G.head,re=st(Y.anchor,Y.head)?Y.head:Y.anchor;return[X,re]},z=function(){var j=y.getCursor(),G=y.getCursor(),Y=_.visualBlock;if(Y){var X=Y.width,re=Y.height;G=new De(j.line+re,j.ch+X);for(var ue=[],ye=j.line;ye<G.line;ye++){var Ce=new De(ye,j.ch),ve=new De(ye,G.ch),we={anchor:Ce,head:ve};ue.push(we)}y.setSelections(ue)}else{var Oe=_.anchorMark.find(),Ie=_.headMark.find(),Ve=Ie.line-Oe.line,lt=Ie.ch-Oe.ch;G={line:G.line+Ve,ch:Ve?G.ch:lt+G.ch},_.visualLine&&(j=new De(j.line,0),G=new De(G.line,At(y,G.line))),y.setSelection(j,G)}return[j,G]};return S.visualMode?P():z()}function $t(y,S){var _=S.sel.anchor,P=S.sel.head;S.lastPastedText&&(P=y.posFromIndex(y.indexFromPos(_)+S.lastPastedText.length),S.lastPastedText=null),S.lastSelection={anchorMark:y.setBookmark(_),headMark:y.setBookmark(P),anchor:qe(_),head:qe(P),visualMode:S.visualMode,visualLine:S.visualLine,visualBlock:S.visualBlock}}function Xt(y,S,_,P){var z=y.state.vim.sel,j=P?S:z.head,G=P?S:z.anchor,Y;return st(_,S)&&(Y=_,_=S,S=Y),st(j,G)?(j=et(S,j),G=Wt(G,_)):(G=et(S,G),j=Wt(j,_),j=me(j,0,-1),j.ch==-1&&j.line!=y.firstLine()&&(j=new De(j.line-1,At(y,j.line-1)))),[G,j]}function In(y,S,z){var P=y.state.vim;S=S||P.sel;var z=z||P.visualLine?"line":P.visualBlock?"block":"char",j=Un(y,S,z);y.setSelections(j.ranges,j.primary)}function Un(y,S,_,P){var z=qe(S.head),j=qe(S.anchor);if(_=="char"){var G=!P&&!st(S.head,S.anchor)?1:0,Y=st(S.head,S.anchor)?1:0;return z=me(S.head,0,G),j=me(S.anchor,0,Y),{ranges:[{anchor:j,head:z}],primary:0}}if(_=="line"){if(st(S.head,S.anchor))z.ch=0,j.ch=At(y,j.line);else{j.ch=0;var X=y.lastLine();z.line>X&&(z.line=X),z.ch=At(y,z.line)}return{ranges:[{anchor:j,head:z}],primary:0}}if(_=="block"){var re=Math.min(j.line,z.line),ue=j.ch,ye=Math.max(j.line,z.line),Ce=z.ch;ue<Ce?Ce+=1:ue+=1;for(var ve=ye-re+1,we=z.line==re?0:ve-1,Oe=[],Ie=0;Ie<ve;Ie++)Oe.push({anchor:new De(re+Ie,ue),head:new De(re+Ie,Ce)});return{ranges:Oe,primary:we}}}function sr(y){var S=y.getCursor("head");return y.getSelection().length==1&&(S=et(S,y.getCursor("anchor"))),S}function pn(y,S){var _=y.state.vim;S!==!1&&y.setCursor(ae(y,_.sel.head)),$t(y,_),_.visualMode=!1,_.visualLine=!1,_.visualBlock=!1,_.insertMode||ze.signal(y,"vim-mode-change",{mode:"normal"})}function zn(y,S,_){var P=y.getRange(S,_);if(/\n\s*$/.test(P)){var z=P.split(`
1401
+ `);z.pop();for(var j,j=z.pop();z.length>0&&j&&f(j);j=z.pop())_.line--,_.ch=0;j?(_.line--,_.ch=At(y,_.line)):_.ch=0}}function Ln(y,S,_){S.ch=0,_.ch=0,_.line++}function qt(y){if(!y)return 0;var S=y.search(/\S/);return S==-1?y.length:S}function nn(y,S,_){var P=S.inclusive,z=S.innerWord,j=S.bigWord,G=S.noSymbol,Y=S.multiline,X=_||sr(y),re=y.getLine(X.line),ue=re,ye=X.line,Ce=ye,ve=X.ch,we,Oe=G?Mo[0]:Li[0];if(z&&/\s/.test(re.charAt(ve)))Oe=function(_n){return/\s/.test(_n)};else{for(;!Oe(re.charAt(ve));)if(ve++,ve>=re.length){if(!Y)return null;ve--,we=bi(y,X,!0,j,!0);break}j?Oe=Li[0]:(Oe=Mo[0],Oe(re.charAt(ve))||(Oe=Mo[1]))}for(var Ie=ve,Ve=ve;Oe(re.charAt(Ve))&&Ve>=0;)Ve--;if(Ve++,we)Ie=we.to,Ce=we.line,ue=y.getLine(Ce),!ue&&Ie==0&&Ie++;else for(;Oe(re.charAt(Ie))&&Ie<re.length;)Ie++;if(P){var lt=Ie,Je=X.ch<=Ve&&/\s/.test(re.charAt(X.ch));if(!Je)for(;/\s/.test(ue.charAt(Ie))&&Ie<ue.length;)Ie++;if(lt==Ie||Je){for(var Qe=Ve;/\s/.test(re.charAt(Ve-1))&&Ve>0;)Ve--;!Ve&&!Je&&(Ve=Qe)}}return{start:new De(ye,Ve),end:new De(Ce,Ie)}}function Ir(y,S,_){var P=S;if(!ze.findMatchingTag||!ze.findEnclosingTag)return{start:P,end:P};var z=ze.findMatchingTag(y,S)||ze.findEnclosingTag(y,S);return!z||!z.open||!z.close?{start:P,end:P}:_?{start:z.open.from,end:z.close.to}:{start:z.open.to,end:z.close.from}}function Vr(y,S,_){rt(S,_)||je.jumpList.add(y,S,_)}function xr(y,S){je.lastCharacterSearch.increment=y,je.lastCharacterSearch.forward=S.forward,je.lastCharacterSearch.selectedCharacter=S.selectedCharacter}function yi(y,S,_,P){var z=qe(y.getCursor()),j=_?1:-1,G=_?y.lineCount():-1,Y=z.ch,X=z.line,re=y.getLine(X),ue={lineText:re,nextCh:re.charAt(Y),lastCh:null,index:Y,symb:P,reverseSymb:(_?{")":"(","}":"{"}:{"(":")","{":"}"})[P],forward:_,depth:0,curMoveThrough:!1},ye=Ci[P];if(!ye)return z;var Ce=ki[ye].init,ve=ki[ye].isComplete;for(Ce&&Ce(ue);X!==G&&S;){if(ue.index+=j,ue.nextCh=ue.lineText.charAt(ue.index),!ue.nextCh){if(X+=j,ue.lineText=y.getLine(X)||"",j>0)ue.index=0;else{var we=ue.lineText.length;ue.index=we>0?we-1:0}ue.nextCh=ue.lineText.charAt(ue.index)}ve(ue)&&(z.line=X,z.ch=ue.index,S--)}return ue.nextCh||ue.curMoveThrough?new De(X,ue.index):z}function bi(y,S,_,P,z){var j=S.line,G=S.ch,Y=y.getLine(j),X=_?1:-1,re=P?Li:Mo;if(z&&Y==""){if(j+=X,Y=y.getLine(j),!l(y,j))return null;G=_?0:Y.length}for(;;){if(z&&Y=="")return{from:0,to:0,line:j};for(var ue=X>0?Y.length:-1,ye=ue,Ce=ue;G!=ue;){for(var ve=!1,we=0;we<re.length&&!ve;++we)if(re[we](Y.charAt(G))){for(ye=G;G!=ue&&re[we](Y.charAt(G));)G+=X;if(Ce=G,ve=ye!=Ce,ye==S.ch&&j==S.line&&Ce==ye+X)continue;return{from:Math.min(ye,Ce+1),to:Math.max(ye,Ce),line:j}}ve||(G+=X)}if(j+=X,!l(y,j))return null;Y=y.getLine(j),G=X>0?0:Y.length}}function Xn(y,S,_,P,z,j){var G=qe(S),Y=[];(P&&!z||!P&&z)&&_++;for(var X=!P||!z,re=0;re<_;re++){var ue=bi(y,S,P,j,X);if(!ue){var ye=At(y,y.lastLine());Y.push(P?{line:y.lastLine(),from:ye,to:ye}:{line:0,from:0,to:0});break}Y.push(ue),S=new De(ue.line,P?ue.to-1:ue.from)}var Ce=Y.length!=_,ve=Y[0],we=Y.pop();return P&&!z?(!Ce&&(ve.from!=G.ch||ve.line!=G.line)&&(we=Y.pop()),new De(we.line,we.from)):P&&z?new De(we.line,we.to-1):!P&&z?(!Ce&&(ve.to!=G.ch||ve.line!=G.line)&&(we=Y.pop()),new De(we.line,we.to)):new De(we.line,we.from)}function Yi(y,S,_,P,z){var j=S,G=new De(j.line+_.repeat-1,1/0),Y=y.clipPos(G);return Y.ch--,z||(P.lastHPos=1/0,P.lastHSPos=y.charCoords(Y,"div").left),G}function Gr(y,S,_,P,z){for(var j=z||y.getCursor(),G=j.ch,Y,X=0;X<S;X++){var re=y.getLine(j.line);if(Y=Cn(G,re,P,_),Y==-1)return null;G=Y}return new De(y.getCursor().line,Y)}function Cs(y,S){var _=y.getCursor().line;return ae(y,new De(_,S-1))}function qr(y,S,_,P){!x(_,go)&&!en.test(_)||(S.marks[_]&&S.marks[_].clear(),S.marks[_]=y.setBookmark(P))}function Cn(y,S,_,P,z){var j;return P?(j=S.indexOf(_,y+1),j!=-1):(j=S.lastIndexOf(_,y-1),j!=-1),j}function wi(y,S,_,P,z){function j(Ve){return!/\S/.test(y.getLine(Ve))}function G(Ve,lt,Je){return Je?j(Ve)!=j(Ve+lt):!j(Ve)&&j(Ve+lt)}function Y(Ve){P=P>0?1:-1;var lt=y.ace.session.getFoldLine(Ve);lt&&Ve+P>lt.start.row&&Ve+P<lt.end.row&&(P=(P>0?lt.end.row:lt.start.row)-Ve)}var X=S.line,re=y.firstLine(),ue=y.lastLine(),ye,Ce,ve=X;if(P){for(;re<=ve&&ve<=ue&&_>0;)Y(ve),G(ve,P)&&_--,ve+=P;return new De(ve,0)}var we=y.state.vim;if(we.visualLine&&G(X,1,!0)){var Oe=we.sel.anchor;G(Oe.line,-1,!0)&&(!z||Oe.line!=X)&&(X+=1)}var Ie=j(X);for(ve=X;ve<=ue&&_;ve++)G(ve,1,!0)&&(!z||j(ve)!=Ie)&&_--;for(Ce=new De(ve,0),ve>ue&&!Ie?Ie=!0:z=!1,ve=X;ve>re&&!((!z||j(ve)==Ie||ve==X)&&G(ve,-1,!0));ve--);return ye=new De(ve,0),{start:ye,end:Ce}}function ko(y,S,_,P,z){function j(re){re.pos+re.dir<0||re.pos+re.dir>=re.line.length?re.line=null:re.pos+=re.dir}function G(re,ue,ye,Ce){var ve=re.getLine(ue),we={line:ve,ln:ue,pos:ye,dir:Ce};if(we.line==="")return{ln:we.ln,pos:we.pos};var Oe=we.pos;for(j(we);we.line!==null;){if(Oe=we.pos,b(we.line[we.pos])){if(!z)return{ln:we.ln,pos:we.pos+1};for(j(we);we.line!==null&&f(we.line[we.pos]);)Oe=we.pos,j(we);return{ln:we.ln,pos:Oe+1}}j(we)}return{ln:we.ln,pos:Oe+1}}function Y(re,ue,ye,Ce){var ve=re.getLine(ue),we={line:ve,ln:ue,pos:ye,dir:Ce};if(we.line==="")return{ln:we.ln,pos:we.pos};var Oe=we.pos;for(j(we);we.line!==null;){if(!f(we.line[we.pos])&&!b(we.line[we.pos]))Oe=we.pos;else if(b(we.line[we.pos]))return z?f(we.line[we.pos+1])?{ln:we.ln,pos:we.pos+1}:{ln:we.ln,pos:Oe}:{ln:we.ln,pos:Oe};j(we)}return we.line=ve,z&&f(we.line[we.pos])?{ln:we.ln,pos:we.pos}:{ln:we.ln,pos:Oe}}for(var X={ln:S.line,pos:S.ch};_>0;)P<0?X=Y(y,X.ln,X.pos,P):X=G(y,X.ln,X.pos,P),_--;return new De(X.ln,X.pos)}function si(y,S,_,P){function z(X,re){if(re.pos+re.dir<0||re.pos+re.dir>=re.line.length){if(re.ln+=re.dir,!l(X,re.ln)){re.line=null,re.ln=null,re.pos=null;return}re.line=X.getLine(re.ln),re.pos=re.dir>0?0:re.line.length-1}else re.pos+=re.dir}function j(X,re,ue,ye){var Ie=X.getLine(re),Ce=Ie==="",ve={line:Ie,ln:re,pos:ue,dir:ye},we={ln:ve.ln,pos:ve.pos},Oe=ve.line==="";for(z(X,ve);ve.line!==null;){if(we.ln=ve.ln,we.pos=ve.pos,ve.line===""&&!Oe)return{ln:ve.ln,pos:ve.pos};if(Ce&&ve.line!==""&&!f(ve.line[ve.pos]))return{ln:ve.ln,pos:ve.pos};b(ve.line[ve.pos])&&!Ce&&(ve.pos===ve.line.length-1||f(ve.line[ve.pos+1]))&&(Ce=!0),z(X,ve)}var Ie=X.getLine(we.ln);we.pos=0;for(var Ve=Ie.length-1;Ve>=0;--Ve)if(!f(Ie[Ve])){we.pos=Ve;break}return we}function G(X,re,ue,ye){var Oe=X.getLine(re),Ce={line:Oe,ln:re,pos:ue,dir:ye},ve={ln:Ce.ln,pos:null},we=Ce.line==="";for(z(X,Ce);Ce.line!==null;){if(Ce.line===""&&!we)return ve.pos!==null?ve:{ln:Ce.ln,pos:Ce.pos};if(!(!b(Ce.line[Ce.pos])||ve.pos===null||Ce.ln===ve.ln&&Ce.pos+1===ve.pos))return ve;Ce.line!==""&&!f(Ce.line[Ce.pos])&&(we=!1,ve={ln:Ce.ln,pos:Ce.pos}),z(X,Ce)}var Oe=X.getLine(ve.ln);ve.pos=0;for(var Ie=0;Ie<Oe.length;++Ie)if(!f(Oe[Ie])){ve.pos=Ie;break}return ve}for(var Y={ln:S.line,pos:S.ch};_>0;)P<0?Y=G(y,Y.ln,Y.pos,P):Y=j(y,Y.ln,Y.pos,P),_--;return new De(Y.ln,Y.pos)}function kn(y,S,_,P){var z=S,j,G,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[_],X={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[_],re=y.getLine(z.line).charAt(z.ch),ue=re===X?1:0;if(j=y.scanForBracket(new De(z.line,z.ch+ue),-1,void 0,{bracketRegex:Y}),G=y.scanForBracket(new De(z.line,z.ch+ue),1,void 0,{bracketRegex:Y}),!j||!G)return null;if(j=j.pos,G=G.pos,j.line==G.line&&j.ch>G.ch||j.line>G.line){var ye=j;j=G,G=ye}return P?G.ch+=1:j.ch+=1,{start:j,end:G}}function Cr(y,S,_,P){var z=qe(S),j=y.getLine(z.line),G=j.split(""),Y,X,re,ue,ye=G.indexOf(_);if(z.ch<ye)z.ch=ye;else if(ye<z.ch&&G[z.ch]==_){var Ce=/string/.test(y.getTokenTypeAt(me(S,0,1))),ve=/string/.test(y.getTokenTypeAt(S)),we=Ce&&!ve;we||(X=z.ch,--z.ch)}if(G[z.ch]==_&&!X)Y=z.ch+1;else for(re=z.ch;re>-1&&!Y;re--)G[re]==_&&(Y=re+1);if(Y&&!X)for(re=Y,ue=G.length;re<ue&&!X;re++)G[re]==_&&(X=re);return!Y||!X?{start:z,end:z}:(P&&(--Y,++X),{start:new De(z.line,Y),end:new De(z.line,X)})}function Lr(){}function On(y){var S=y.state.vim;return S.searchState_||(S.searchState_=new Lr)}function yn(y){return ai(y,"/")}function pr(y){return ao(y,"/")}function ai(y,S){var _=ao(y,S)||[];if(!_.length)return[];var P=[];if(_[0]===0){for(var z=0;z<_.length;z++)typeof _[z]=="number"&&P.push(y.substring(_[z]+1,_[z+1]));return P}}function ao(y,S){S||(S="/");for(var _=!1,P=[],z=0;z<y.length;z++){var j=y.charAt(z);!_&&j==S&&P.push(z),_=!_&&j=="\\"}return P}function lo(y){for(var S="|(){",_="}",P=!1,z=[],j=-1;j<y.length;j++){var G=y.charAt(j)||"",Y=y.charAt(j+1)||"",X=Y&&S.indexOf(Y)!=-1;P?((G!=="\\"||!X)&&z.push(G),P=!1):G==="\\"?(P=!0,Y&&_.indexOf(Y)!=-1&&(X=!0),(!X||Y==="\\")&&z.push(G)):(z.push(G),X&&Y!=="\\"&&z.push("\\"))}return z.join("")}function _o(y){for(var S=!1,_=[],P=-1;P<y.length;P++){var z=y.charAt(P)||"",j=y.charAt(P+1)||"";Di[z+j]?(_.push(Di[z+j]),P++):S?(_.push(z),S=!1):z==="\\"?(S=!0,i(j)||j==="$"?_.push("$"):j!=="/"&&j!=="\\"&&_.push("\\")):(z==="$"&&_.push("$"),_.push(z),j==="/"&&_.push("\\"))}return _.join("")}function Or(y){for(var S=new ze.StringStream(y),_=[];!S.eol();){for(;S.peek()&&S.peek()!="\\";)_.push(S.next());var P=!1;for(var z in Ls)if(S.match(z,!0)){P=!0,_.push(Ls[z]);break}P||_.push(S.next())}return _.join("")}function li(y,S,_){var P=je.registerController.getRegister("/");if(P.setText(y),y instanceof RegExp)return y;var z=pr(y),j,G;if(!z.length)j=y;else{j=y.substring(0,z[0]);var Y=y.substring(z[0]);G=Y.indexOf("i")!=-1}if(!j)return null;A("pcre")||(j=lo(j)),_&&(S=/^[^A-Z]*$/.test(j));var X=new RegExp(j,S||G?"im":"m");return X}function Kr(y){typeof y=="string"&&(y=document.createElement(y));for(var S,_=1;_<arguments.length;_++)if(S=arguments[_])if(typeof S!="object"&&(S=document.createTextNode(S)),S.nodeType)y.appendChild(S);else for(var P in S)Object.prototype.hasOwnProperty.call(S,P)&&(P[0]==="$"?y.style[P.slice(1)]=S[P]:y.setAttribute(P,S[P]));return y}function Nt(y,S){var _=Kr("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},S);y.openNotification?y.openNotification(_,{bottom:!0,duration:5e3}):alert(_.innerText)}function Ao(y,S){return Kr("div",{$display:"flex"},Kr("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},y,Kr("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),S&&Kr("span",{$color:"#888"},S))}function ar(y,S){if(Nr.length){S.value||(S.value=""),Dt=S;return}var _=Ao(S.prefix,S.desc);if(y.openDialog)y.openDialog(_,S.onClose,{onKeyDown:S.onKeyDown,onKeyUp:S.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:S.value});else{var P="";typeof S.prefix!="string"&&S.prefix&&(P+=S.prefix.textContent),S.desc&&(P+=" "+S.desc),S.onClose(prompt(P,""))}}function Sn(y,S){if(y instanceof RegExp&&S instanceof RegExp){for(var _=["global","multiline","ignoreCase","source"],P=0;P<_.length;P++){var z=_[P];if(y[z]!==S[z])return!1}return!0}return!1}function oe(y,S,_,P){if(S){var z=On(y),j=li(S,!!_,!!P);if(j)return Be(y,j),Sn(j,z.getQuery())||z.setQuery(j),j}}function Ne(y){if(y.source.charAt(0)=="^")var S=!0;return{token:function(_){if(S&&!_.sol()){_.skipToEnd();return}var P=_.match(y,!1);if(P)return P[0].length==0?(_.next(),"searching"):!_.sol()&&(_.backUp(1),!y.exec(_.next()+P[0]))?(_.next(),null):(_.match(y),"searching");for(;!_.eol()&&(_.next(),!_.match(y,!1)););},query:y}}function Be(y,S){clearTimeout(rn);var _=On(y);_.highlightTimeout=rn,rn=setTimeout(function(){if(y.state.vim){var P=On(y);P.highlightTimeout=null;var z=P.getOverlay();(!z||S!=z.query)&&(z&&y.removeOverlay(z),z=Ne(S),y.addOverlay(z),y.showMatchesOnScrollbar&&(P.getScrollbarAnnotate()&&P.getScrollbarAnnotate().clear(),P.setScrollbarAnnotate(y.showMatchesOnScrollbar(S))),P.setOverlay(z))}},50)}function bt(y,S,_,P){return P===void 0&&(P=1),y.operation(function(){for(var z=y.getCursor(),j=y.getSearchCursor(_,z),G=0;G<P;G++){var Y=j.find(S);if(G==0&&Y&&rt(j.from(),z)){var X=S?j.from():j.to();Y=j.find(S),Y&&!Y[0]&&rt(j.from(),X)&&y.getLine(X.line).length==X.ch&&(Y=j.find(S))}if(!Y&&(j=y.getSearchCursor(_,S?new De(y.lastLine()):new De(y.firstLine(),0)),!j.find(S)))return}return j.from()})}function gn(y,S,_,P,z){return P===void 0&&(P=1),y.operation(function(){var j=y.getCursor(),G=y.getSearchCursor(_,j),Y=G.find(!S);!z.visualMode&&Y&&rt(G.from(),j)&&G.find(!S);for(var X=0;X<P;X++)if(Y=G.find(S),!Y&&(G=y.getSearchCursor(_,S?new De(y.lastLine()):new De(y.firstLine(),0)),!G.find(S)))return;return[G.from(),G.to()]})}function Vt(y){var S=On(y);S.highlightTimeout&&(clearTimeout(S.highlightTimeout),S.highlightTimeout=null),y.removeOverlay(On(y).getOverlay()),S.setOverlay(null),S.getScrollbarAnnotate()&&(S.getScrollbarAnnotate().clear(),S.setScrollbarAnnotate(null))}function kr(y,S,_){return typeof y!="number"&&(y=y.line),S instanceof Array?x(y,S):typeof _=="number"?y>=S&&y<=_:y==S}function Vn(y){var S=y.ace.renderer;return{top:S.getFirstFullyVisibleRow(),bottom:S.getLastFullyVisibleRow()}}function cn(y,S,_){if(_=="'"||_=="`")return je.jumpList.find(y,-1)||new De(0,0);if(_==".")return gr(y);var P=S.marks[_];return P&&P.find()}function gr(y){if(y.getLastEditEnd)return y.getLastEditEnd();for(var S=y.doc.history.done,_=S.length;_--;)if(S[_].changes)return qe(S[_].changes[0].to)}function mn(y,S,_,P,z,j,G,Y,X){function re(){y.operation(function(){for(;!Oe;)ue(),Ce();ve()})}function ue(){var Je=y.getRange(j.from(),j.to()),Qe=Je.replace(G,Y),_n=j.to().line;j.replace(Qe),Ve=j.to().line,z+=Ve-_n,lt=Ve<_n}function ye(){var Je=Ie&&qe(j.to()),Qe=j.findNext();return Qe&&!Qe[0]&&Je&&rt(j.from(),Je)&&(Qe=j.findNext()),Qe}function Ce(){for(;ye()&&kr(j.from(),P,z);)if(!(!_&&j.from().line==Ve&&!lt)){y.scrollIntoView(j.from(),30),y.setSelection(j.from(),j.to()),Ie=j.from(),Oe=!1;return}Oe=!0}function ve(Je){if(Je&&Je(),y.focus(),Ie){y.setCursor(Ie);var Qe=y.state.vim;Qe.exMode=!1,Qe.lastHPos=Qe.lastHSPos=Ie.ch}X&&X()}function we(Je,Qe,_n){ze.e_stop(Je);var Ct=B(Je);switch(Ct){case"y":ue(),Ce();break;case"n":Ce();break;case"a":var Kt=X;X=void 0,y.operation(re),X=Kt;break;case"l":ue();case"q":case"<Esc>":case"<C-c>":case"<C-[>":ve(_n)}return Oe&&ve(_n),!0}y.state.vim.exMode=!0;var Oe=!1,Ie,Ve,lt;if(Ce(),Oe){Nt(y,"No matches for "+G.source);return}if(!S){re(),X&&X();return}ar(y,{prefix:Kr("span","replace with ",Kr("strong",Y)," (y/n/a/q/l)"),onKeyDown:we})}function mr(y,S){var _=y.state.vim,P=je.macroModeState,z=je.registerController.getRegister("."),j=P.isPlaying,G=P.lastInsertModeChanges;j||(y.off("change",Uo),_.insertEnd&&_.insertEnd.clear(),_.insertEnd=null,ze.off(y.getInputField(),"keydown",So)),!j&&_.insertModeRepeat>1&&(Rs(y,_,_.insertModeRepeat-1,!0),_.lastEditInputState.repeatOverride=_.insertModeRepeat),delete _.insertModeRepeat,_.insertMode=!1,S||y.setCursor(y.getCursor().line,y.getCursor().ch-1),y.setOption("keyMap","vim"),y.setOption("disableInput",!0),y.toggleOverwrite(!1),z.setText(G.changes.join("")),ze.signal(y,"vim-mode-change",{mode:"normal"}),P.isRecording&&lr(P)}function co(y){Nn.unshift(y)}function ks(y,S,_,P,z){var j={keys:y,type:S};j[S]=_,j[S+"Args"]=P;for(var G in z)j[G]=z[G];co(j)}function _s(y,S,_,P){var z=je.registerController.getRegister(P);if(P==":"){z.keyBuffer[0]&&Pr.processCommand(y,z.keyBuffer[0]),_.isPlaying=!1;return}var j=z.keyBuffer,G=0;_.isPlaying=!0,_.replaySearchQueries=z.searchQueries.slice(0);for(var Y=0;Y<j.length;Y++)for(var X=j[Y],re,ue;X;)if(re=/<\w+-.+?>|<\w+>|./.exec(X),ue=re[0],X=X.substring(re.index+ue.length),wt.handleKey(y,ue,"macro"),S.insertMode){var ye=z.insertModeChanges[G++].changes;je.macroModeState.lastInsertModeChanges.changes=ye,Go(y,ye,1),mr(y)}_.isPlaying=!1}function As(y,S){if(!y.isPlaying){var _=y.latestRegister,P=je.registerController.getRegister(_);P&&P.pushText(S)}}function lr(y){if(!y.isPlaying){var S=y.latestRegister,_=je.registerController.getRegister(S);_&&_.pushInsertModeChanges&&_.pushInsertModeChanges(y.lastInsertModeChanges)}}function Ss(y,S){if(!y.isPlaying){var _=y.latestRegister,P=je.registerController.getRegister(_);P&&P.pushSearchQuery&&P.pushSearchQuery(S)}}function Uo(y,S){var _=je.macroModeState,P=_.lastInsertModeChanges;if(!_.isPlaying)for(var z=y.state.vim;S;){if(P.expectCursorActivityForChange=!0,P.ignoreCount>1)P.ignoreCount--;else if(S.origin=="+input"||S.origin=="paste"||S.origin===void 0){var j=y.listSelections().length;j>1&&(P.ignoreCount=j);var G=S.text.join(`
1402
+ `);if(P.maybeReset&&(P.changes=[],P.maybeReset=!1),G)if(y.state.overwrite&&!/\n/.test(G))P.changes.push([G]);else{if(G.length>1){var Y=z&&z.insertEnd&&z.insertEnd.find(),X=y.getCursor();if(Y&&Y.line==X.line){var re=Y.ch-X.ch;re>0&&re<G.length&&(P.changes.push([G,re]),G="")}}G&&P.changes.push(G)}}S=S.next}}function uo(y){var S=y.state.vim;if(S.insertMode){var _=je.macroModeState;if(_.isPlaying)return;var P=_.lastInsertModeChanges;P.expectCursorActivityForChange?P.expectCursorActivityForChange=!1:(P.maybeReset=!0,S.insertEnd&&S.insertEnd.clear(),S.insertEnd=y.setBookmark(y.getCursor(),{insertLeft:!0}))}else y.curOp.isVimOp||$s(y,S)}function $s(y,S,_){var P=y.getCursor("anchor"),z=y.getCursor("head");if(S.visualMode&&!y.somethingSelected()?pn(y,!1):!S.visualMode&&!S.insertMode&&y.somethingSelected()&&(S.visualMode=!0,S.visualLine=!1,ze.signal(y,"vim-mode-change",{mode:"visual"})),S.visualMode){var j=st(z,P)?0:-1,G=st(z,P)?-1:0;z=me(z,0,j),P=me(P,0,G),S.sel={anchor:P,head:z},qr(y,S,"<",et(z,P)),qr(y,S,">",Wt(z,P))}else!S.insertMode&&!_&&(S.lastHPos=y.getCursor().ch)}function Vo(y,S){this.keyName=y,this.key=S.key,this.ctrlKey=S.ctrlKey,this.altKey=S.altKey,this.metaKey=S.metaKey,this.shiftKey=S.shiftKey}function So(y){var S=je.macroModeState,_=S.lastInsertModeChanges,P=ze.keyName?ze.keyName(y):y.key;P&&(P.indexOf("Delete")!=-1||P.indexOf("Backspace")!=-1)&&(_.maybeReset&&(_.changes=[],_.maybeReset=!1),_.changes.push(new Vo(P,y)))}function Rs(y,S,_,P){function z(){Y?xi.processAction(y,S,S.lastEditActionCommand):xi.evalInput(y,S)}function j(ue){if(G.lastInsertModeChanges.changes.length>0){ue=S.lastEditActionCommand?ue:1;var ye=G.lastInsertModeChanges;Go(y,ye.changes,ue)}}var G=je.macroModeState;G.isPlaying=!0;var Y=!!S.lastEditActionCommand,X=S.inputState;if(S.inputState=S.lastEditInputState,Y&&S.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<_;re++)z(),j(1);else P||z(),j(_);S.inputState=X,S.insertMode&&!P&&mr(y),G.isPlaying=!1}function Ms(y,S){ze.lookupKey(S,"vim-insert",function(_){return typeof _=="string"?ze.commands[_](y):_(y),!0})}function Go(y,S,_){var P=y.getCursor("head"),z=je.macroModeState.lastInsertModeChanges.visualBlock;z&&(or(y,P,z+1),_=y.listSelections().length,y.setCursor(P));for(var j=0;j<_;j++){z&&y.setCursor(me(P,j,0));for(var G=0;G<S.length;G++){var Y=S[G];if(Y instanceof Vo)Ms(y,Y.keyName);else if(typeof Y=="string")y.replaceSelection(Y);else{var X=y.getCursor(),re=me(X,0,Y[0].length-(Y[1]||0));y.replaceRange(Y[0],X,Y[1]?X:re),y.setCursor(re)}}}z&&y.setCursor(me(P,0,1))}function ga(y,S,_,P){S.length>1&&S[0]=="n"&&(S=S.replace("numpad","")),S=mo[S]||S;var z="";if(_.ctrlKey&&(z+="C-"),_.altKey&&(z+="A-"),(z||S.length>1)&&_.shiftKey&&(z+="S-"),P&&!P.expectLiteralNext&&S.length==1){if(Dn.keymap&&S in Dn.keymap)(Dn.remapCtrl!==!1||!z)&&(S=Dn.keymap[S]);else if(S.charCodeAt(0)>255){var j=_.code&&_.code.slice(-1)||"";_.shiftKey||(j=j.toLowerCase()),j&&(S=j)}}return z+=S,z.length>1&&(z="<"+z+">"),z}function ho(y){var S=new y.constructor;return Object.keys(y).forEach(function(_){if(_!="insertEnd"){var P=y[_];Array.isArray(P)?P=P.slice():P&&typeof P=="object"&&P.constructor!=Object&&(P=ho(P)),S[_]=P}}),y.sel&&(S.sel={head:y.sel.head&&qe(y.sel.head),anchor:y.sel.anchor&&qe(y.sel.anchor)}),S}function qo(y,S,_){var P=!1,z=wt.maybeInitVimState_(y),j=z.visualBlock||z.wasInVisualBlock,G=y.ace.inMultiSelectMode;if(z.wasInVisualBlock&&!G?z.wasInVisualBlock=!1:G&&z.visualBlock&&(z.wasInVisualBlock=!0),S=="<Esc>"&&!z.insertMode&&!z.visualMode&&G)y.ace.exitMultiSelectMode();else if(j||!G||y.ace.inVirtualSelectionMode)P=wt.handleKey(y,S,_);else{var Y=ho(z),X=z.inputState.changeQueueList||[];y.operation(function(){y.curOp.isVimOp=!0;var re=0;y.ace.forEachSelection(function(){var ue=y.ace.selection;y.state.vim.lastHPos=ue.$desiredColumn==null?ue.lead.column:ue.$desiredColumn,y.state.vim.inputState.changeQueue=X[re];var ye=y.getCursor("head"),Ce=y.getCursor("anchor"),ve=st(ye,Ce)?0:-1,we=st(ye,Ce)?-1:0;ye=me(ye,0,ve),Ce=me(Ce,0,we),y.state.vim.sel.head=ye,y.state.vim.sel.anchor=Ce,P=_r(y,S,_),ue.$desiredColumn=y.state.vim.lastHPos==-1?null:y.state.vim.lastHPos,y.ace.inVirtualSelectionMode&&(X[re]=y.state.vim.inputState.changeQueue),y.virtualSelectionMode()&&(y.state.vim=ho(Y)),re++}),y.curOp.cursorActivity&&!P&&(y.curOp.cursorActivity=!1),z.status=y.state.vim.status,y.state.vim=z,z.inputState.changeQueueList=X,z.inputState.changeQueue=null},!0)}return P&&!z.visualMode&&!z.insert&&z.visualMode!=y.somethingSelected()&&$s(y,z,!0),P}function Ji(y,S){S.off("beforeEndOperation",Ji);var _=S.state.cm.vimCmd;_&&S.execCommand(_.exec?_:_.name,_.args),S.curOp=S.prevOp}var cr=e("../range").Range,Ts=e("../lib/event_emitter").EventEmitter,Yr=e("../lib/dom"),ma=e("../lib/oop"),va=e("../lib/keys"),Ko=e("../lib/event"),Xi=e("../search").Search,$o=e("../lib/useragent"),Yo=e("../search_highlight").SearchHighlight,fo=e("../commands/multi_select_commands"),ya=e("../mode/text").Mode.prototype.tokenRe,po=e("../ext/hardwrap").hardWrap;e("../multi_select");var ze=function(y){this.ace=y,this.state={},this.marks={},this.options={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};ze.Pos=function(y,S){if(!(this instanceof De))return new De(y,S);this.line=y,this.ch=S},ze.defineOption=function(y,S,_){},ze.commands={redo:function(y){y.ace.redo()},undo:function(y){y.ace.undo()},newlineAndIndent:function(y){y.ace.insert(`
1403
+ `)},goLineLeft:function(y){y.ace.selection.moveCursorLineStart()},goLineRight:function(y){y.ace.selection.moveCursorLineEnd()}},ze.keyMap={},ze.addClass=ze.rmClass=function(){},ze.e_stop=ze.e_preventDefault=Ko.stopEvent,ze.keyName=function(y){var S=va[y.keyCode]||y.key||"";return S.length==1&&(S=S.toUpperCase()),S=Ko.getModifierString(y).replace(/(^|-)\w/g,function(_){return _.toUpperCase()})+S,S},ze.keyMap.default=function(y){return function(S){var _=S.ace.commands.commandKeyBinding[y.toLowerCase()];return _&&S.ace.execCommand(_)!==!1}},ze.lookupKey=function y(S,_,P){_||(_="default"),typeof _=="string"&&(_=ze.keyMap[_]||ze.keyMap.default);var z=typeof _=="function"?_(S):_[S];if(z===!1)return"nothing";if(z==="...")return"multi";if(z!=null&&P(z))return"handled";if(_.fallthrough){if(!Array.isArray(_.fallthrough))return y(S,_.fallthrough,P);for(var j=0;j<_.fallthrough.length;j++){var G=y(S,_.fallthrough[j],P);if(G)return G}}},ze.findMatchingTag=function(y,S){return y.findMatchingTag(S)},ze.findEnclosingTag=function(y,S){},ze.signal=function(y,S,_){return y._signal(S,_)},ze.on=Ko.addListener,ze.off=Ko.removeListener,ze.isWordChar=function(y){return y<""?/^\w$/.test(y):(ya.lastIndex=0,ya.test(y))},(function(){ma.implement(ze.prototype,Ts),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(_){this.$lineHandleChanges&&this.$lineHandleChanges.push(_);var P={text:_.action[0]=="i"?_.lines:[]},z=this.curOp=this.curOp||{};z.changeHandlers||(z.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),z.lastChange?z.lastChange.next=z.lastChange=P:z.lastChange=z.change=P,this.$updateMarkers(_)},this.onSelectionChange=function(){var _=this.curOp=this.curOp||{};_.cursorActivityHandlers||(_.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(fo.keyboardHandler)},this.operation=function(_,P){if(!P&&this.curOp||P&&this.curOp&&this.curOp.force)return _();if((P||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var z=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var j=this.curOp=this.curOp||{};this.curOp.force=P;var G=_();return this.ace.curOp&&this.ace.curOp.command.name=="vim"&&(this.state.dialog&&(this.ace.curOp.command.scrollIntoView=this.ace.curOp.vimDialogScroll),this.ace.endOperation(),!j.cursorActivity&&!j.lastChange&&z&&(this.ace.prevOp=z)),(P||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),G},this.onBeforeEndOperation=function(){var _=this.curOp;_&&(_.change&&this.signal("change",_.change,_),_&&_.cursorActivity&&this.signal("cursorActivity",null,_),this.curOp=null)},this.signal=function(_,P,z){var j=z?z[_+"Handlers"]:(this._eventRegistry||{})[_];if(j){j=j.slice();for(var G=0;G<j.length;G++)j[G](this,P)}},this.firstLine=function(){return 0},this.lastLine=function(){return this.ace.session.getLength()-1},this.lineCount=function(){return this.ace.session.getLength()},this.setCursor=function(_,P){typeof _=="object"&&(P=_.ch,_=_.line);var z=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:_,column:P}),this.ace.selection.moveTo(_,P),z&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(_){var P=this.ace.selection,z=_=="anchor"?P.isEmpty()?P.lead:P.anchor:_=="head"||!_?P.lead:P.getRange()[_];return g(z)},this.listSelections=function(_){var P=this.ace.multiSelect.rangeList.ranges;return!P.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:P.map(function(z){return{anchor:this.clipPos(g(z.cursor==z.end?z.start:z.end)),head:this.clipPos(g(z.cursor))}},this)},this.setSelections=function(_,P){var z=this.ace.multiSelect,j=_.map(function(re){var ue=p(re.anchor),ye=p(re.head),Ce=cr.comparePoints(ue,ye)<0?new cr.fromPoints(ue,ye):new cr.fromPoints(ye,ue);return Ce.cursor=cr.comparePoints(Ce.start,ye)?Ce.end:Ce.start,Ce});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(j[0]);return}P?j[P]&&j.push(j.splice(P,1)[0]):j=j.reverse(),z.toSingleRange(j[0].clone());for(var G=this.ace.session,Y=0;Y<j.length;Y++){var X=G.$clipRangeToDocument(j[Y]);z.addRange(X)}},this.setSelection=function(_,P,z){var j=this.ace.selection;j.moveTo(_.line,_.ch),j.selectTo(P.line,P.ch),z&&z.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(_){return!this.ace.selection.isEmpty()},this.clipPos=function(_){var P=this.ace.session.$clipPositionToDocument(_.line,_.ch);return g(P)},this.foldCode=function(_){this.ace.session.$toggleFoldWidget(_.line,{})},this.markText=function(_){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(_){var P=_.action=="insert",z=_.start,j=_.end,G=(j.row-z.row)*(P?1:-1),Y=(j.column-z.column)*(P?1:-1);P&&(j=z);for(var X in this.marks){var re=this.marks[X],ue=cr.comparePoints(re,z);if(!(ue<0)){if(ue===0&&P)if(!re.$insertRight)ue=1;else{if(re.bias!=1){re.bias=-1;continue}ue=1}var ye=P?ue:cr.comparePoints(re,j);if(ye>0){re.row+=G,re.column+=re.row==j.row?Y:0;continue}!P&&ye<=0&&(re.row=z.row,re.column=z.column,ye===0&&(re.bias=1))}}};var y=function(_,P,z,j){this.cm=_,this.id=P,this.row=z,this.column=j,_.marks[this.id]=this};y.prototype.clear=function(){delete this.cm.marks[this.id]},y.prototype.find=function(){return g(this)},this.setBookmark=function(_,P){var z=new y(this,this.$uid++,_.line,_.ch);return(!P||!P.insertLeft)&&(z.$insertRight=!0),this.marks[z.id]=z,z},this.moveH=function(_,P){if(P=="char"){var z=this.ace.selection;z.clearSelection(),z.moveCursorBy(0,_)}},this.findPosV=function(_,P,z,j){if(z=="page"){var G=this.ace.renderer,Y=G.layerConfig;P*=Math.floor(Y.height/Y.lineHeight),z="line"}if(z=="line"){var X=this.ace.session.documentToScreenPosition(_.line,_.ch);j!=null&&(X.column=j),X.row+=P,X.row=Math.min(Math.max(0,X.row),this.ace.session.getScreenLength()-1);var re=this.ace.session.screenToDocumentPosition(X.row,X.column);return g(re)}debugger},this.charCoords=function(_,P){if(P=="div"||!P){var z=this.ace.session.documentToScreenPosition(_.line,_.ch);return{left:z.column,top:z.row}}if(P=="local"){var j=this.ace.renderer,z=this.ace.session.documentToScreenPosition(_.line,_.ch),G=j.layerConfig.lineHeight,Y=j.layerConfig.characterWidth,X=G*z.row;return{left:z.column*Y,top:X,bottom:X+G}}},this.coordsChar=function(_,P){var z=this.ace.renderer;if(P=="local"){var j=Math.max(0,Math.floor(_.top/z.lineHeight)),G=Math.max(0,Math.floor(_.left/z.characterWidth)),Y=z.session.screenToDocumentPosition(j,G);return g(Y)}if(P=="div")throw"not implemented"},this.getSearchCursor=function(_,P,z){var j=!1,G=!1;_ instanceof RegExp&&!_.global&&(j=!_.ignoreCase,_=_.source,G=!0),_=="\\n"&&(_=`
1404
+ `,G=!1);var Y=new Xi;P.ch==null&&(P.ch=Number.MAX_VALUE);var X={row:P.line,column:P.ch},re=this,ue=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(ye){Y.setOptions({needle:_,caseSensitive:j,wrap:!1,backwards:ye,regExp:G,start:ue||X});var Ce=Y.find(re.ace.session);return ue=Ce,ue&&[!ue.isEmpty()]},from:function(){return ue&&g(ue.start)},to:function(){return ue&&g(ue.end)},replace:function(ye){ue&&(ue.end=re.ace.session.doc.replace(ue,ye))}}},this.scrollTo=function(_,P){var z=this.ace.renderer,j=z.layerConfig,G=j.maxHeight;G-=(z.$size.scrollerHeight-z.lineHeight)*z.$scrollPastEnd,P!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(P,G))),_!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(_,j.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(_,P){if(_){var z=this.ace.renderer,j={top:0,bottom:P};z.scrollCursorIntoView(p(_),z.lineHeight*2/z.$size.scrollerHeight,j)}},this.getLine=function(_){return this.ace.session.getLine(_)},this.getRange=function(_,P){return this.ace.session.getTextRange(new cr(_.line,_.ch,P.line,P.ch))},this.replaceRange=function(_,P,z){z||(z=P);var j=new cr(P.line,P.ch,z.line,z.ch);return this.ace.session.$clipRangeToDocument(j),this.ace.session.replace(j,_)},this.replaceSelection=this.replaceSelections=function(_){var P=Array.isArray(_)&&_,z=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(z.getRange(),P?_[0]||"":_);return}z.inVirtualSelectionMode=!0;var j=z.rangeList.ranges;j.length||(j=[this.ace.multiSelect.getRange()]);for(var G=j.length;G--;)this.ace.session.replace(j[G],P?_[G]||"":_);z.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(_){return this.getRange(_.anchor,_.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var S={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(_,P){switch(this.state[_]=P,_){case"indentWithTabs":_=S[_],P=!P;break;case"keyMap":this.state.$keyMap=P;return;default:_=S[_]}_&&this.ace.setOption(_,P)},this.getOption=function(_){var P,z=S[_];switch(z&&(P=this.ace.getOption(z)),_){case"indentWithTabs":return _=S[_],!P;case"keyMap":return this.state.$keyMap||"vim"}return z?P:this.state[_]},this.toggleOverwrite=function(_){return this.state.overwrite=_,this.ace.setOverwrite(_)},this.addOverlay=function(_){if(!this.$searchHighlight||!this.$searchHighlight.session){var P=new Yo(null,"ace_highlight-marker","text"),z=this.ace.session.addDynamicMarker(P);P.id=z.id,P.session=this.ace.session,P.destroy=function(G){P.session.off("change",P.updateOnChange),P.session.off("changeEditor",P.destroy),P.session.removeMarker(P.id),P.session=null},P.updateOnChange=function(G){var Y=G.start.row;Y==G.end.row?P.cache[Y]=void 0:P.cache.splice(Y,P.cache.length)},P.session.on("changeEditor",P.destroy),P.session.on("change",P.updateOnChange)}var j=new RegExp(_.query.source,"gmi");this.$searchHighlight=_.highlight=P,this.$searchHighlight.setRegexp(j),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(_){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var _=this.ace.renderer,P=_.layerConfig;return{left:_.scrollLeft,top:_.scrollTop,height:P.maxHeight,width:P.width,clientHeight:P.height,clientWidth:P.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(_){return this.ace.setValue(_,-1)},this.getTokenTypeAt=function(_){var P=this.ace.session.getTokenAt(_.line,_.ch);return P&&/comment|string/.test(P.type)?"string":""},this.findMatchingBracket=function(_){var P=this.ace.session.findMatchingBracket(p(_));return{to:P&&g(P)}},this.findMatchingTag=function(_){var P=this.ace.session.getMatchingTags(p(_));if(P)return{open:{from:g(P.openTag.start),to:g(P.openTag.end)},close:{from:g(P.closeTag.start),to:g(P.closeTag.end)}}},this.indentLine=function(_,P){P===!0?this.ace.session.indentRows(_,_," "):P===!1&&this.ace.session.outdentRows(new cr(_,0,_,0))},this.indexFromPos=function(_){return this.ace.session.doc.positionToIndex(p(_))},this.posFromIndex=function(_){return g(this.ace.session.doc.indexToPosition(_))},this.focus=function(_){return this.ace.textInput.focus()},this.blur=function(_){return this.ace.blur()},this.defaultTextHeight=function(_){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(_,P,z,j){var G=j.bracketRegex.source,Y=/paren|text|operator|tag/;if(P==1)var X=this.ace.session.$findClosingBracket(G.slice(1,2),p(_),Y);else{var X=this.ace.session.$findOpeningBracket(G.slice(-2,-1),{row:_.line,column:_.ch+1},Y);!X&&j.bracketRegex&&j.bracketRegex.test(this.getLine(_.line)[_.ch-1])&&(X={row:_.line,column:_.ch-1})}return X&&{pos:g(X)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(_){if(ze.commands.hasOwnProperty(_))return ze.commands[_](this);if(_=="indentAuto")return this.ace.execCommand("autoindent");console.log(_+" is not implemented")},this.getLineNumber=function(_){var P=this.$lineHandleChanges;if(!P)return null;for(var z=_.row,j=0;j<P.length;j++){var G=P[j];if(G.start.row!=G.end.row){if(G.action[0]=="i")G.start.row<z&&(z+=G.end.row-G.start.row);else if(G.start.row<z){if(z<G.end.row||z==G.end.row&&G.start.column>0)return null;z-=G.end.row-G.start.row}}}return z},this.getLineHandle=function(_){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(_),row:_}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var _=this.ace.session.$undoManager;if(_&&_.$lastDelta)return g(_.$lastDelta.end)}}).call(ze.prototype);var Es=ze.StringStream=function(y,S){this.pos=this.start=0,this.string=y,this.tabSize=S||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Es.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(y){var S=this.string.charAt(this.pos);if(typeof y=="string")var _=S==y;else var _=S&&(y.test?y.test(S):y(S));if(_)return++this.pos,S},eatWhile:function(y){for(var S=this.pos;this.eat(y););return this.pos>S},eatSpace:function(){for(var y=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>y},skipToEnd:function(){this.pos=this.string.length},skipTo:function(y){var S=this.string.indexOf(y,this.pos);if(S>-1)return this.pos=S,!0},backUp:function(y){this.pos-=y},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(y,S,_){if(typeof y!="string"){var P=this.string.slice(this.pos).match(y);return P&&P.index>0?null:(P&&S!==!1&&(this.pos+=P[0].length),P)}var z=function(G){return _?G.toLowerCase():G},j=this.string.substr(this.pos,y.length);if(z(j)==z(y))return S!==!1&&(this.pos+=y.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(y,S){this.lineStart+=y;try{return S()}finally{this.lineStart-=y}}},ze.defineExtension=function(y,S){ze.prototype[y]=S},Yr.importCssString(`.normal-mode .ace_cursor{
1405
+ border: none;
1406
+ background-color: rgba(255,0,0,0.5);
1407
+ }
1408
+ .normal-mode .ace_hidden-cursors .ace_cursor{
1409
+ background-color: transparent;
1410
+ border: 1px solid red;
1411
+ opacity: 0.7
1412
+ }
1413
+ .ace_dialog {
1414
+ position: absolute;
1415
+ left: 0; right: 0;
1416
+ background: inherit;
1417
+ z-index: 15;
1418
+ padding: .1em .8em;
1419
+ overflow: hidden;
1420
+ color: inherit;
1421
+ }
1422
+ .ace_dialog-top {
1423
+ border-bottom: 1px solid #444;
1424
+ top: 0;
1425
+ }
1426
+ .ace_dialog-bottom {
1427
+ border-top: 1px solid #444;
1428
+ bottom: 0;
1429
+ }
1430
+ .ace_dialog input {
1431
+ border: none;
1432
+ outline: none;
1433
+ background: transparent;
1434
+ width: 20em;
1435
+ color: inherit;
1436
+ font-family: monospace;
1437
+ }`,"vimMode",!1),(function(){function y(_,P,z){var j=_.ace.container,G;return G=j.appendChild(document.createElement("div")),z?G.className="ace_dialog ace_dialog-bottom":G.className="ace_dialog ace_dialog-top",typeof P=="string"?G.innerHTML=P:G.appendChild(P),G}function S(_,P){_.state.currentNotificationClose&&_.state.currentNotificationClose(),_.state.currentNotificationClose=P}ze.defineExtension("openDialog",function(_,P,z){function j(ye){if(typeof ye=="string")re.value=ye;else{if(Y||ye&&ye.type=="blur"&&document.activeElement===re)return;X.state.dialog==G&&(X.state.dialog=null,X.focus()),Y=!0,G.remove(),z.onClose&&z.onClose(G);var Ce=X;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()){z||(z={}),S(this,null);var G=y(this,_,z.bottom),Y=!1,X=this;this.state.dialog=G;var re=G.getElementsByTagName("input")[0],ue;return re?(z.value&&(re.value=z.value,z.selectValueOnOpen!==!1&&re.select()),z.onInput&&ze.on(re,"input",function(ye){z.onInput(ye,re.value,j)}),z.onKeyUp&&ze.on(re,"keyup",function(ye){z.onKeyUp(ye,re.value,j)}),ze.on(re,"keydown",function(ye){z&&z.onKeyDown&&z.onKeyDown(ye,re.value,j)||(ye.keyCode==13&&P(re.value),(ye.keyCode==27||z.closeOnEnter!==!1&&ye.keyCode==13)&&(ze.e_stop(ye),j()))}),z.closeOnBlur!==!1&&ze.on(re,"blur",j),re.focus()):(ue=G.getElementsByTagName("button")[0])&&(ze.on(ue,"click",function(){j(),X.focus()}),z.closeOnBlur!==!1&&ze.on(ue,"blur",j),ue.focus()),j}}),ze.defineExtension("openNotification",function(_,P){function z(){G||(G=!0,clearTimeout(Y),j.remove())}if(!this.virtualSelectionMode()){S(this,z);var j=y(this,_,P&&P.bottom),G=!1,Y,X=P&&typeof P.duration<"u"?P.duration:5e3;return ze.on(j,"click",function(re){ze.e_preventDefault(re),z()}),X&&(Y=setTimeout(z,X)),z}})})();var De=ze.Pos,Nn=[{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"}],Ro=Nn.length,Zi=[{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(""),ba=/[\d]/,Mo=[ze.isWordChar,function(y){return y&&!ze.isWordChar(y)&&!/\s/.test(y)}],Li=[function(y){return/\S/.test(y)}],go=["<",">"],Is=["-",'"',".",":","_","/","+"],en=/^\w$/,at;try{at=new RegExp("^[\\p{Lu}]$","u")}catch{at=/^[A-Z]$/}var Ht={};I("filetype",void 0,"string",["ft"],function(y,S){if(S!==void 0){if(y===void 0){var _=S.getOption("mode");return _=="null"?"":_}var _=y==""?"null":y;S.setOption("mode",_)}}),I("textwidth",80,"number",["tw"],function(y,S){if(S!==void 0){if(y===void 0){var _=S.getOption("textwidth");return _}var P=Math.round(y);P>1&&S.setOption("textwidth",P)}});var Oi=function(){function y(X,re,ue){function ye(Oe){var Ie=++z%P,Ve=Y[Ie];Ve&&Ve.clear(),Y[Ie]=X.setBookmark(Oe)}var Ce=z%P,ve=Y[Ce];if(ve){var we=ve.find();we&&!rt(we,re)&&ye(re)}else ye(re);ye(ue),j=z,G=z-P+1,G<0&&(G=0)}function S(X,re){z+=re,z>j?z=j:z<G&&(z=G);var ue=Y[(P+z)%P];if(ue&&!ue.find()){var ye=re>0?1:-1,Ce,ve=X.getCursor();do if(z+=ye,ue=Y[(P+z)%P],ue&&(Ce=ue.find())&&!rt(ve,Ce))break;while(z<j&&z>G)}return ue}function _(X,re){var ue=z,ye=S(X,re);return z=ue,ye&&ye.find()}var P=100,z=-1,j=0,G=0,Y=new Array(P);return{cachedCursor:void 0,add:y,find:_,move:S}},Wn=function(y){return y?{changes:y.changes,expectCursorActivityForChange:y.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var y=je.macroModeState;y.onRecordingDone&&y.onRecordingDone(),y.onRecordingDone=void 0,y.isRecording=!1},enterMacroRecordMode:function(y,S){var _=je.registerController.getRegister(S);if(_){if(_.clear(),this.latestRegister=S,y.openDialog){var P=Kr("span",{class:"cm-vim-message"},"recording @"+S);this.onRecordingDone=y.openDialog(P,null,{bottom:!0})}this.isRecording=!0}}};var je,bn,wt={enterVimMode:h,leaveVimMode:d,buildKeyMap:function(){},getRegisterController:function(){return je.registerController},resetVimGlobalState_:D,getVimGlobalState_:function(){return je},maybeInitVimState_:O,suppressErrorLogging:!1,InsertModeKey:Vo,map:function(y,S,_){Pr.map(y,S,_)},unmap:function(y,S){return Pr.unmap(y,S)},noremap:function(y,S,_){Pr.map(y,S,_,!0)},mapclear:function(y){var S=Nn.length,_=Ro,P=Nn.slice(0,S-_);if(Nn=Nn.slice(S-_),y)for(var z=P.length-1;z>=0;z--){var j=P[z];if(y!==j.context)if(j.context)this._mapCommand(j);else{var G=["normal","insert","visual"];for(var Y in G)if(G[Y]!==y){var X={};for(var re in j)X[re]=j[re];X.context=G[Y],this._mapCommand(X)}}}},langmap:F,vimKeyFromEvent:B,setOption:R,getOption:A,defineOption:I,defineEx:function(y,S,_){if(!S)S=y;else if(y.indexOf(S)!==0)throw new Error('(Vim.defineEx) "'+S+'" is not a prefix of "'+y+'", command not registered');ur[y]=_,Pr.commandMap_[S]={name:y,shortName:S,type:"api"}},handleKey:function(y,S,_){var P=this.findKey(y,S,_);if(typeof P=="function")return P()},multiSelectHandleKey:qo,findKey:function(y,S,_){function P(){var re=je.macroModeState;if(re.isRecording){if(S=="q")return re.exitMacroRecordMode(),k(y),!0;_!="mapping"&&As(re,S)}}function z(){if(S=="<Esc>"){if(Y.visualMode)pn(y);else{if(!Y.insertMode)return;mr(y)}return k(y),!0}}function j(){if(z())return!0;Y.inputState.keyBuffer.push(S);var re=Y.inputState.keyBuffer.join(""),ue=S.length==1,ye=xi.matchCommand(re,Nn,Y.inputState,"insert"),Ce=Y.inputState.changeQueue;if(ye.type=="none")return k(y),!1;if(ye.type=="partial"){if(ye.expectLiteralNext&&(Y.expectLiteralNext=!0),bn&&window.clearTimeout(bn),bn=ue&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&k(y)},A("insertModeEscKeysTimeout")),ue){var ve=y.listSelections();(!Ce||Ce.removed.length!=ve.length)&&(Ce=Y.inputState.changeQueue=new L),Ce.inserted+=S;for(var we=0;we<ve.length;we++){var Oe=et(ve[we].anchor,ve[we].head),Ie=Wt(ve[we].anchor,ve[we].head),Ve=y.getRange(Oe,y.state.overwrite?me(Ie,0,1):Ie);Ce.removed[we]=(Ce.removed[we]||"")+Ve}}return!ue}if(Y.expectLiteralNext=!1,bn&&window.clearTimeout(bn),ye.command&&Ce){for(var ve=y.listSelections(),we=0;we<ve.length;we++){var lt=ve[we].head;y.replaceRange(Ce.removed[we]||"",me(lt,0,-Ce.inserted.length),lt,"+input")}je.macroModeState.lastInsertModeChanges.changes.pop()}return ye.command||k(y),ye.command}function G(){if(P()||z())return!0;Y.inputState.keyBuffer.push(S);var re=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var ue=/^(\d*)(.*)$/.exec(re);if(!ue)return k(y),!1;var ye=Y.visualMode?"visual":"normal",Ce=ue[2]||ue[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==Ce&&(Ce=Y.inputState.operatorShortcut);var ve=xi.matchCommand(Ce,Nn,Y.inputState,ye);return ve.type=="none"?(k(y),!1):ve.type=="partial"?(ve.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):ve.type=="clear"?(k(y),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,ue=/^(\d*)(.*)$/.exec(re),ue[1]&&ue[1]!="0"&&Y.inputState.pushRepeatDigit(ue[1]),ve.command)}var Y=O(y),X;return Y.insertMode?X=j():X=G(),X===!1?!Y.insertMode&&S.length===1?function(){return!0}:void 0:X===!0?function(){return!0}:function(){if(!((X.operator||X.isEdit)&&y.getOption("readOnly")))return y.operation(function(){y.curOp.isVimOp=!0;try{X.type=="keyToKey"?T(y,X.toKeys,X):xi.processCommand(y,Y,X)}catch(re){throw y.state.vim=void 0,O(y),wt.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(y,S){Pr.processCommand(y,S)},defineMotion:Q,defineAction:ce,defineOperator:ne,mapCommand:ks,_mapCommand:co,defineRegister:U,exitVisualMode:pn,exitInsertMode:mr},Nr=[],Ni=!1,Dt,Dr={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},Zn={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},Qi={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(Dr)).forEach(function(y){Qi[(Dr[y]||"").toLowerCase()]=Qi[y.toLowerCase()]=y}),I("langmap",void 0,"string",["lmap"],function(y,S){if(y===void 0)return Dn.string;F(y)}),$.prototype.pushRepeatDigit=function(y){this.operator?this.motionRepeat=this.motionRepeat.concat(y):this.prefixRepeat=this.prefixRepeat.concat(y)},$.prototype.getRepeat=function(){var y=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(y=1,this.prefixRepeat.length>0&&(y*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(y*=parseInt(this.motionRepeat.join(""),10))),y},W.prototype={setText:function(y,S,_){this.keyBuffer=[y||""],this.linewise=!!S,this.blockwise=!!_},pushText:function(y,S){S&&(this.linewise||this.keyBuffer.push(`
1438
+ `),this.linewise=!0),this.keyBuffer.push(y)},pushInsertModeChanges:function(y){this.insertModeChanges.push(Wn(y))},pushSearchQuery:function(y){this.searchQueries.push(y)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},q.prototype={pushText:function(y,S,_,P,z){if(y!=="_"){P&&_.charAt(_.length-1)!==`
1439
+ `&&(_+=`
1440
+ `);var j=this.isValidRegister(y)?this.getRegister(y):null;if(!j){switch(S){case"yank":this.registers[0]=new W(_,P,z);break;case"delete":case"change":_.indexOf(`
1441
+ `)==-1?this.registers["-"]=new W(_,P):(this.shiftNumericRegisters_(),this.registers[1]=new W(_,P))}this.unnamedRegister.setText(_,P,z);return}var G=s(y);G?j.pushText(_,P):j.setText(_,P,z),y==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(_),this.unnamedRegister.setText(j.toString(),P)}},getRegister:function(y){return this.isValidRegister(y)?(y=y.toLowerCase(),this.registers[y]||(this.registers[y]=new W),this.registers[y]):this.unnamedRegister},isValidRegister:function(y){return y&&(x(y,Is)||en.test(y))},shiftNumericRegisters_:function(){for(var y=9;y>=2;y--)this.registers[y]=this.getRegister(""+(y-1))}},Z.prototype={nextMatch:function(y,S){var _=this.historyBuffer,P=S?-1:1;this.initialPrefix===null&&(this.initialPrefix=y);for(var z=this.iterator+P;S?z>=0:z<_.length;z+=P)for(var j=_[z],G=0;G<=j.length;G++)if(this.initialPrefix==j.substring(0,G))return this.iterator=z,j;if(z>=_.length)return this.iterator=_.length,this.initialPrefix;if(z<0)return y},pushInput:function(y){var S=this.historyBuffer.indexOf(y);S>-1&&this.historyBuffer.splice(S,1),y.length&&this.historyBuffer.push(y)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var xi={matchCommand:function(y,S,_,P){var z=$e(y,S,P,_);if(!z.full&&!z.partial)return{type:"none"};if(!z.full&&z.partial)return{type:"partial",expectLiteralNext:z.partial.length==1&&z.partial[0].keys.slice(-11)=="<character>"};for(var j,G=0;G<z.full.length;G++){var Y=z.full[G];j||(j=Y)}if(j.keys.slice(-11)=="<character>"||j.keys.slice(-10)=="<register>"){var X=Me(y);if(!X||X.length>1)return{type:"clear"};_.selectedCharacter=X}return{type:"full",command:j}},processCommand:function(y,S,_){switch(S.inputState.repeatOverride=_.repeatOverride,_.type){case"motion":this.processMotion(y,S,_);break;case"operator":this.processOperator(y,S,_);break;case"operatorMotion":this.processOperatorMotion(y,S,_);break;case"action":this.processAction(y,S,_);break;case"search":this.processSearch(y,S,_);break;case"ex":case"keyToEx":this.processEx(y,S,_);break}},processMotion:function(y,S,_){S.inputState.motion=_.motion,S.inputState.motionArgs=de(_.motionArgs),this.evalInput(y,S)},processOperator:function(y,S,_){var P=S.inputState;if(P.operator){if(P.operator==_.operator){P.motion="expandToLine",P.motionArgs={linewise:!0},this.evalInput(y,S);return}k(y)}P.operator=_.operator,P.operatorArgs=de(_.operatorArgs),_.keys.length>1&&(P.operatorShortcut=_.keys),_.exitVisualBlock&&(S.visualBlock=!1,In(y)),S.visualMode&&this.evalInput(y,S)},processOperatorMotion:function(y,S,_){var P=S.visualMode,z=de(_.operatorMotionArgs);z&&P&&z.visualLine&&(S.visualLine=!0),this.processOperator(y,S,_),P||this.processMotion(y,S,_)},processAction:function(y,S,_){var P=S.inputState,z=P.getRepeat(),j=!!z,G=de(_.actionArgs)||{};P.selectedCharacter&&(G.selectedCharacter=P.selectedCharacter),_.operator&&this.processOperator(y,S,_),_.motion&&this.processMotion(y,S,_),(_.motion||_.operator)&&this.evalInput(y,S),G.repeat=z||1,G.repeatIsExplicit=j,G.registerName=P.registerName,k(y),S.lastMotion=null,_.isEdit&&this.recordLastEdit(S,P,_),Bn[_.action](y,G,S)},processSearch:function(y,S,_){function P(Ie,Ve,lt){je.searchHistoryController.pushInput(Ie),je.searchHistoryController.reset();try{oe(y,Ie,Ve,lt)}catch{Nt(y,"Invalid regex: "+Ie),k(y);return}xi.processMotion(y,S,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:_.searchArgs.toJumplist}})}function z(Ie){P(Ie,!0,!0);var Ve=je.macroModeState;Ve.isRecording&&Ss(Ve,Ie)}function j(Ie,Ve,lt){var Je=B(Ie),Qe,_n;Je=="<Up>"||Je=="<Down>"?(Qe=Je=="<Up>",_n=Ie.target?Ie.target.selectionEnd:0,Ve=je.searchHistoryController.nextMatch(Ve,Qe)||"",lt(Ve),_n&&Ie.target&&(Ie.target.selectionEnd=Ie.target.selectionStart=Math.min(_n,Ie.target.value.length))):Je&&Je!="<Left>"&&Je!="<Right>"&&je.searchHistoryController.reset();var Ct;try{Ct=oe(y,Ve,!0,!0)}catch{}Ct?y.scrollIntoView(bt(y,!Y,Ct),30):(Vt(y),y.scrollTo(ye.left,ye.top))}function G(Ie,Ve,lt){var Je=B(Ie);Je=="<Esc>"||Je=="<C-c>"||Je=="<C-[>"||Je=="<BS>"&&Ve==""?(je.searchHistoryController.pushInput(Ve),je.searchHistoryController.reset(),oe(y,ue),Vt(y),y.scrollTo(ye.left,ye.top),ze.e_stop(Ie),k(y),lt(),y.focus()):Je=="<Up>"||Je=="<Down>"?ze.e_stop(Ie):Je=="<C-u>"&&(ze.e_stop(Ie),lt(""))}if(y.getSearchCursor){var Y=_.searchArgs.forward,X=_.searchArgs.wholeWordOnly;On(y).setReversed(!Y);var re=Y?"/":"?",ue=On(y).getQuery(),ye=y.getScrollInfo();switch(_.searchArgs.querySrc){case"prompt":var Ce=je.macroModeState;if(Ce.isPlaying){var Oe=Ce.replaySearchQueries.shift();P(Oe,!0,!1)}else ar(y,{onClose:z,prefix:re,desc:"(JavaScript regexp)",onKeyUp:j,onKeyDown:G});break;case"wordUnderCursor":var ve=nn(y,{noSymbol:!0}),we=!0;if(ve||(ve=nn(y,{noSymbol:!1}),we=!1),!ve){Nt(y,"No word under cursor"),k(y);return}var Oe=y.getLine(ve.start.line).substring(ve.start.ch,ve.end.ch);we&&X?Oe="\\b"+Oe+"\\b":Oe=An(Oe),je.jumpList.cachedCursor=y.getCursor(),y.setCursor(ve.start),P(Oe,!0,!1)}}},processEx:function(y,S,_){function P(j){je.exCommandHistoryController.pushInput(j),je.exCommandHistoryController.reset(),Pr.processCommand(y,j),y.state.vim&&k(y)}function z(j,G,Y){var X=B(j),re,ue;(X=="<Esc>"||X=="<C-c>"||X=="<C-[>"||X=="<BS>"&&G=="")&&(je.exCommandHistoryController.pushInput(G),je.exCommandHistoryController.reset(),ze.e_stop(j),k(y),Y(),y.focus()),X=="<Up>"||X=="<Down>"?(ze.e_stop(j),re=X=="<Up>",ue=j.target?j.target.selectionEnd:0,G=je.exCommandHistoryController.nextMatch(G,re)||"",Y(G),ue&&j.target&&(j.target.selectionEnd=j.target.selectionStart=Math.min(ue,j.target.value.length))):X=="<C-u>"?(ze.e_stop(j),Y("")):X&&X!="<Left>"&&X!="<Right>"&&je.exCommandHistoryController.reset()}_.type=="keyToEx"?Pr.processCommand(y,_.exArgs.input):S.visualMode?ar(y,{onClose:P,prefix:":",value:"'<,'>",onKeyDown:z,selectValueOnOpen:!1}):ar(y,{onClose:P,prefix:":",onKeyDown:z})},evalInput:function(y,S){var _=S.inputState,P=_.motion,z=_.motionArgs||{},j=_.operator,G=_.operatorArgs||{},Y=_.registerName,X=S.sel,re=qe(S.visualMode?ae(y,X.head):y.getCursor("head")),ue=qe(S.visualMode?ae(y,X.anchor):y.getCursor("anchor")),ye=qe(re),Ce=qe(ue),ve,we,Oe;if(j&&this.recordLastEdit(S,_),_.repeatOverride!==void 0?Oe=_.repeatOverride:Oe=_.getRepeat(),Oe>0&&z.explicitRepeat?z.repeatIsExplicit=!0:(z.noRepeat||!z.explicitRepeat&&Oe===0)&&(Oe=1,z.repeatIsExplicit=!1),_.selectedCharacter&&(z.selectedCharacter=G.selectedCharacter=_.selectedCharacter),z.repeat=Oe,k(y),P){var Ie=$n[P](y,re,z,S,_);if(S.lastMotion=$n[P],!Ie)return;if(z.toJumplist){!j&&y.ace.curOp!=null&&(y.ace.curOp.command.scrollIntoView="center-animate");var Ve=je.jumpList,lt=Ve.cachedCursor;lt?(Vr(y,lt,Ie),delete Ve.cachedCursor):Vr(y,re,Ie)}Ie instanceof Array?(we=Ie[0],ve=Ie[1]):ve=Ie,ve||(ve=qe(re)),S.visualMode?((!S.visualBlock||ve.ch!==1/0)&&(ve=ae(y,ve,ye)),we&&(we=ae(y,we)),we=we||Ce,X.anchor=we,X.head=ve,In(y),qr(y,S,"<",st(we,ve)?we:ve),qr(y,S,">",st(we,ve)?ve:we)):j||(y.ace.curOp&&(y.ace.curOp.vimDialogScroll="center-animate"),ve=ae(y,ve,ye),y.setCursor(ve.line,ve.ch))}if(j){if(G.lastSel){we=Ce;var Je=G.lastSel,Qe=Math.abs(Je.head.line-Je.anchor.line),_n=Math.abs(Je.head.ch-Je.anchor.ch);Je.visualLine?ve=new De(Ce.line+Qe,Ce.ch):Je.visualBlock?ve=new De(Ce.line+Qe,Ce.ch+_n):Je.head.line==Je.anchor.line?ve=new De(Ce.line,Ce.ch+_n):ve=new De(Ce.line+Qe,Ce.ch),S.visualMode=!0,S.visualLine=Je.visualLine,S.visualBlock=Je.visualBlock,X=S.sel={anchor:we,head:ve},In(y)}else S.visualMode&&(G.lastSel={anchor:qe(X.anchor),head:qe(X.head),visualBlock:S.visualBlock,visualLine:S.visualLine});var Ct,Kt,Tt,kt,Qn;if(S.visualMode){Ct=et(X.head,X.anchor),Kt=Wt(X.head,X.anchor),Tt=S.visualLine||G.linewise,kt=S.visualBlock?"block":Tt?"line":"char";var hr=w(y,Ct,Kt);if(Qn=Un(y,{anchor:hr.start,head:hr.end},kt),Tt){var Rn=Qn.ranges;if(kt=="block")for(var V=0;V<Rn.length;V++)Rn[V].head.ch=At(y,Rn[V].head.line);else kt=="line"&&(Rn[0].head=new De(Rn[0].head.line+1,0))}}else{if(Ct=qe(we||Ce),Kt=qe(ve||ye),st(Kt,Ct)){var J=Ct;Ct=Kt,Kt=J}Tt=z.linewise||G.linewise,Tt?Ln(y,Ct,Kt):z.forward&&zn(y,Ct,Kt),kt="char";var ie=!z.inclusive||Tt,hr=w(y,Ct,Kt);Qn=Un(y,{anchor:hr.start,head:hr.end},kt,ie)}y.setSelections(Qn.ranges,Qn.primary),S.lastMotion=null,G.repeat=Oe,G.registerName=Y,G.linewise=Tt;var se=Jo[j](y,G,Qn.ranges,Ce,ve);S.visualMode&&pn(y,se!=null),se&&y.setCursor(se)}},recordLastEdit:function(y,S,_){var P=je.macroModeState;P.isPlaying||(y.lastEditInputState=S,y.lastEditActionCommand=_,P.lastInsertModeChanges.changes=[],P.lastInsertModeChanges.expectCursorActivityForChange=!1,P.lastInsertModeChanges.visualBlock=y.visualBlock?y.sel.head.line-y.sel.anchor.line:0)}},$n={moveToTopLine:function(y,S,_){var P=Vn(y).top+_.repeat-1;return new De(P,qt(y.getLine(P)))},moveToMiddleLine:function(y){var S=Vn(y),_=Math.floor((S.top+S.bottom)*.5);return new De(_,qt(y.getLine(_)))},moveToBottomLine:function(y,S,_){var P=Vn(y).bottom-_.repeat+1;return new De(P,qt(y.getLine(P)))},expandToLine:function(y,S,_){var P=S;return new De(P.line+_.repeat-1,1/0)},findNext:function(y,S,_){var P=On(y),z=P.getQuery();if(z){var j=!_.forward;return j=P.isReversed()?!j:j,Be(y,z),bt(y,j,z,_.repeat)}},findAndSelectNextInclusive:function(y,S,_,P,z){var j=On(y),G=j.getQuery();if(G){var Y=!_.forward;Y=j.isReversed()?!Y:Y;var X=gn(y,Y,G,_.repeat,P);if(X){if(z.operator)return X;var re=X[0],ue=new De(X[1].line,X[1].ch-1);if(P.visualMode){(P.visualLine||P.visualBlock)&&(P.visualLine=!1,P.visualBlock=!1,ze.signal(y,"vim-mode-change",{mode:"visual",subMode:""}));var ye=P.sel.anchor;if(ye)return j.isReversed()?_.forward?[ye,re]:[ye,ue]:_.forward?[ye,ue]:[ye,re]}else P.visualMode=!0,P.visualLine=!1,P.visualBlock=!1,ze.signal(y,"vim-mode-change",{mode:"visual",subMode:""});return Y?[ue,re]:[re,ue]}}},goToMark:function(y,S,_,P){var z=cn(y,P,_.selectedCharacter);return z?_.linewise?{line:z.line,ch:qt(y.getLine(z.line))}:z:null},moveToOtherHighlightedEnd:function(y,S,_,P){if(P.visualBlock&&_.sameLine){var z=P.sel;return[ae(y,new De(z.anchor.line,z.head.ch)),ae(y,new De(z.head.line,z.anchor.ch))]}return[P.sel.head,P.sel.anchor]},jumpToMark:function(y,S,_,P){for(var z=S,j=0;j<_.repeat;j++){var G=z;for(var Y in P.marks)if(c(Y)){var X=P.marks[Y].find(),re=_.forward?st(X,G):st(G,X);if(!re&&!(_.linewise&&X.line==G.line)){var ue=rt(G,z),ye=_.forward?br(G,X,z):br(z,X,G);(ue||ye)&&(z=X)}}}return _.linewise&&(z=new De(z.line,qt(y.getLine(z.line)))),z},moveByCharacters:function(y,S,_){var P=S,z=_.repeat,j=_.forward?P.ch+z:P.ch-z;return new De(P.line,j)},moveByLines:function(y,S,_,P){var z=S,j=z.ch;switch(P.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:j=P.lastHPos;break;default:P.lastHPos=j}var G=_.repeat+(_.repeatOffset||0),Y=_.forward?z.line+G:z.line-G,X=y.firstLine(),re=y.lastLine();if(Y<X&&z.line==X)return this.moveToStartOfLine(y,S,_,P);if(Y>re&&z.line==re)return Yi(y,S,_,P,!0);var ue=y.ace.session.getFoldLine(Y);return ue&&(_.forward?Y>ue.start.row&&(Y=ue.end.row+1):Y=ue.start.row),_.toFirstChar&&(j=qt(y.getLine(Y)),P.lastHPos=j),P.lastHSPos=y.charCoords(new De(Y,j),"div").left,new De(Y,j)},moveByDisplayLines:function(y,S,_,P){var z=S;switch(P.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:P.lastHSPos=y.charCoords(z,"div").left}var j=_.repeat,X=y.findPosV(z,_.forward?j:-j,"line",P.lastHSPos);if(X.hitSide)if(_.forward)var G=y.charCoords(X,"div"),Y={top:G.top+8,left:P.lastHSPos},X=y.coordsChar(Y,"div");else{var re=y.charCoords(new De(y.firstLine(),0),"div");re.left=P.lastHSPos,X=y.coordsChar(re,"div")}return P.lastHPos=X.ch,X},moveByPage:function(y,S,_){var P=S,z=_.repeat;return y.findPosV(P,_.forward?z:-z,"page")},moveByParagraph:function(y,S,_){var P=_.forward?1:-1;return wi(y,S,_.repeat,P)},moveBySentence:function(y,S,_){var P=_.forward?1:-1;return si(y,S,_.repeat,P)},moveByScroll:function(y,S,_,P){var z=y.getScrollInfo(),j=null,G=_.repeat;G||(G=z.clientHeight/(2*y.defaultTextHeight()));var Y=y.charCoords(S,"local");if(_.repeat=G,j=$n.moveByDisplayLines(y,S,_,P),!j)return null;var X=y.charCoords(j,"local");return y.scrollTo(null,z.top+X.top-Y.top),j},moveByWords:function(y,S,_){return Xn(y,S,_.repeat,!!_.forward,!!_.wordEnd,!!_.bigWord)},moveTillCharacter:function(y,S,_){var P=_.repeat,z=Gr(y,P,_.forward,_.selectedCharacter,S),j=_.forward?-1:1;return xr(j,_),z?(z.ch+=j,z):null},moveToCharacter:function(y,S,_){var P=_.repeat;return xr(0,_),Gr(y,P,_.forward,_.selectedCharacter,S)||S},moveToSymbol:function(y,S,_){var P=_.repeat;return yi(y,P,_.forward,_.selectedCharacter)||S},moveToColumn:function(y,S,_,P){var z=_.repeat;return P.lastHPos=z-1,P.lastHSPos=y.charCoords(S,"div").left,Cs(y,z)},moveToEol:function(y,S,_,P){return Yi(y,S,_,P,!1)},moveToFirstNonWhiteSpaceCharacter:function(y,S){var _=S;return new De(_.line,qt(y.getLine(_.line)))},moveToMatchedSymbol:function(y,S){for(var _=S,P=_.line,z=_.ch,j=y.getLine(P),G;z<j.length;z++)if(G=j.charAt(z),G&&u(G)){var Y=y.getTokenTypeAt(new De(P,z+1));if(Y!=="string"&&Y!=="comment")break}if(z<j.length){var X=/[<>]/.test(j[z])?/[(){}[\]<>]/:/[(){}[\]]/,re=y.findMatchingBracket(new De(P,z+1),{bracketRegex:X});return re.to}return _},moveToStartOfLine:function(y,S){return new De(S.line,0)},moveToLineOrEdgeOfDocument:function(y,S,_){var P=_.forward?y.lastLine():y.firstLine();return _.repeatIsExplicit&&(P=_.repeat-y.getOption("firstLineNumber")),new De(P,qt(y.getLine(P)))},moveToStartOfDisplayLine:function(y){return y.execCommand("goLineLeft"),y.getCursor()},moveToEndOfDisplayLine:function(y){y.execCommand("goLineRight");var S=y.getCursor();return S.sticky=="before"&&S.ch--,S},textObjectManipulation:function(y,S,_,P){var z={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},j={"'":!0,'"':!0,"`":!0},G=_.selectedCharacter;G=="b"?G="(":G=="B"&&(G="{");var Y=!_.textObjectInner,X,re;if(z[G]){if(re=!0,X=kn(y,S,G,Y),!X){var ue=y.getSearchCursor(new RegExp("\\"+G,"g"),S);ue.find()&&(X=kn(y,ue.from(),G,Y))}}else if(j[G])re=!0,X=Cr(y,S,G,Y);else if(G==="W"||G==="w")for(var ye=_.repeat||1;ye-- >0;){var Ce=nn(y,{inclusive:Y,innerWord:!Y,bigWord:G==="W",noSymbol:G==="W",multiline:!0},X&&X.end);Ce&&(X||(X=Ce),X.end=Ce.end)}else if(G==="p")if(X=wi(y,S,_.repeat,0,Y),_.linewise=!0,P.visualMode)P.visualLine||(P.visualLine=!0);else{var ve=P.inputState.operatorArgs;ve&&(ve.linewise=!0),X.end.line--}else if(G==="t")X=Ir(y,S,Y);else if(G==="s"){var we=y.getLine(S.line);S.ch>0&&b(we[S.ch])&&(S.ch-=1);var Oe=ko(y,S,_.repeat,1,Y),Ie=ko(y,S,_.repeat,-1,Y);f(y.getLine(Ie.line)[Ie.ch])&&f(y.getLine(Oe.line)[Oe.ch-1])&&(Ie={line:Ie.line,ch:Ie.ch+1}),X={start:Ie,end:Oe}}return X?y.state.vim.visualMode?Xt(y,X.start,X.end,re):[X.start,X.end]:null},repeatLastCharacterSearch:function(y,S,_){var P=je.lastCharacterSearch,z=_.repeat,j=_.forward===P.forward,G=(P.increment?1:0)*(j?-1:1);y.moveH(-G,"char"),_.inclusive=!!j;var Y=Gr(y,z,j,P.selectedCharacter);return Y?(Y.ch+=G,Y):(y.moveH(G,"char"),S)}},Jo={change:function(y,S,_){var P,z,j=y.state.vim,G=_[0].anchor,Y=_[0].head;if(j.visualMode)if(S.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,y.setSelection(G,Y),z=y.getSelection(),y.replaceSelection(""),P=G;else{z=y.getSelection();var X=le("",_.length);y.replaceSelections(X),P=et(_[0].head,_[0].anchor)}else{z=y.getRange(G,Y);var re=j.lastEditInputState||{};if(re.motion=="moveByWords"&&!f(z)){var ue=/\s+$/.exec(z);ue&&re.motionArgs&&re.motionArgs.forward&&(Y=me(Y,0,-ue[0].length),z=z.slice(0,-ue[0].length))}S.linewise&&(G=new De(G.line,qt(y.getLine(G.line))),Y.line>G.line&&(Y=new De(Y.line-1,Number.MAX_VALUE))),y.replaceRange("",G,Y),P=G}je.registerController.pushText(S.registerName,"change",z,S.linewise,_.length>1),Bn.enterInsertMode(y,{head:P},y.state.vim)},delete:function(y,S,_){var P,z,j=y.state.vim;if(j.visualBlock){z=y.getSelection();var G=le("",_.length);y.replaceSelections(G),P=et(_[0].head,_[0].anchor)}else{var Y=_[0].anchor,X=_[0].head;S.linewise&&X.line!=y.firstLine()&&Y.line==y.lastLine()&&Y.line==X.line-1&&(Y.line==y.firstLine()?Y.ch=0:Y=new De(Y.line-1,At(y,Y.line-1))),z=y.getRange(Y,X),y.replaceRange("",Y,X),P=Y,S.linewise&&(P=$n.moveToFirstNonWhiteSpaceCharacter(y,Y))}return je.registerController.pushText(S.registerName,"delete",z,S.linewise,j.visualBlock),ae(y,P)},indent:function(y,S,_){var P=y.state.vim,z=P.visualMode?S.repeat:1;if(P.visualBlock){for(var j=y.getOption("tabSize"),G=y.getOption("indentWithTabs")?" ":" ".repeat(j),Y,X=_.length-1;X>=0;X--)if(Y=et(_[X].anchor,_[X].head),S.indentRight)y.replaceRange(G.repeat(z),Y,Y);else{for(var re=y.getLine(Y.line),ue=0,ye=0;ye<z;ye++){var Ce=re[Y.ch+ue];if(Ce==" ")ue++;else{if(Ce!=" ")break;ue++;for(var ve=1;ve<G.length&&(Ce=re[Y.ch+ue],Ce===" ");ve++)ue++}}y.replaceRange("",Y,me(Y,0,ue))}return Y}if(y.indentMore)for(var ye=0;ye<z;ye++)S.indentRight?y.indentMore():y.indentLess();else{var we=_[0].anchor.line,Oe=P.visualBlock?_[_.length-1].anchor.line:_[0].head.line;S.linewise&&Oe--;for(var X=we;X<=Oe;X++)for(var ye=0;ye<z;ye++)y.indentLine(X,S.indentRight)}return $n.moveToFirstNonWhiteSpaceCharacter(y,_[0].anchor)},indentAuto:function(y,S,_){return y.execCommand("indentAuto"),$n.moveToFirstNonWhiteSpaceCharacter(y,_[0].anchor)},hardWrap:function(y,S,_,P,z){if(y.hardWrap){var j=_[0].anchor.line,G=_[0].head.line;S.linewise&&G--;var Y=y.hardWrap({from:j,to:G});return Y>j&&S.linewise&&Y--,S.keepCursor?P:new De(Y,0)}},changeCase:function(y,S,_,P,z){for(var j=y.getSelections(),G=[],Y=S.toLower,X=0;X<j.length;X++){var re=j[X],ue="";if(Y===!0)ue=re.toLowerCase();else if(Y===!1)ue=re.toUpperCase();else for(var ye=0;ye<re.length;ye++){var Ce=re.charAt(ye);ue+=s(Ce)?Ce.toLowerCase():Ce.toUpperCase()}G.push(ue)}return y.replaceSelections(G),S.shouldMoveCursor?z:!y.state.vim.visualMode&&S.linewise&&_[0].anchor.line+1==_[0].head.line?$n.moveToFirstNonWhiteSpaceCharacter(y,P):S.linewise?P:et(_[0].anchor,_[0].head)},yank:function(y,S,_,P){var z=y.state.vim,j=y.getSelection(),G=z.visualMode?et(z.sel.anchor,z.sel.head,_[0].head,_[0].anchor):P;return je.registerController.pushText(S.registerName,"yank",j,S.linewise,z.visualBlock),G}},Bn={jumpListWalk:function(y,S,_){if(!_.visualMode){var P=S.repeat,z=S.forward,j=je.jumpList,G=j.move(y,z?P:-P),Y=G?G.find():void 0;Y=Y||y.getCursor(),y.setCursor(Y),y.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(y,S,_){if(!_.visualMode){var P=S.repeat||1,z=y.defaultTextHeight(),j=y.getScrollInfo().top,G=z*P,Y=S.forward?j+G:j-G,X=qe(y.getCursor()),re=y.charCoords(X,"local");if(S.forward)Y>re.top?(X.line+=(Y-re.top)/z,X.line=Math.ceil(X.line),y.setCursor(X),re=y.charCoords(X,"local"),y.scrollTo(null,re.top)):y.scrollTo(null,Y);else{var ue=Y+y.getScrollInfo().clientHeight;ue<re.bottom?(X.line-=(re.bottom-ue)/z,X.line=Math.floor(X.line),y.setCursor(X),re=y.charCoords(X,"local"),y.scrollTo(null,re.bottom-y.getScrollInfo().clientHeight)):y.scrollTo(null,Y)}}},scrollToCursor:function(y,S){var _=y.getCursor().line,P=y.charCoords(new De(_,0),"local"),z=y.getScrollInfo().clientHeight,j=P.top;switch(S.position){case"center":j=P.bottom-z/2;break;case"bottom":var G=new De(_,y.getLine(_).length-1),Y=y.charCoords(G,"local"),X=Y.bottom-j;j=j-z+X}y.scrollTo(null,j)},replayMacro:function(y,S,_){var P=S.selectedCharacter,z=S.repeat,j=je.macroModeState;for(P=="@"?P=j.latestRegister:j.latestRegister=P;z--;)_s(y,_,j,P)},enterMacroRecordMode:function(y,S){var _=je.macroModeState,P=S.selectedCharacter;je.registerController.isValidRegister(P)&&_.enterMacroRecordMode(y,P)},toggleOverwrite:function(y){y.state.overwrite?(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),ze.signal(y,"vim-mode-change",{mode:"insert"})):(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),ze.signal(y,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(y,S,_){if(!y.getOption("readOnly")){_.insertMode=!0,_.insertModeRepeat=S&&S.repeat||1;var P=S?S.insertAt:null,z=_.sel,j=S.head||y.getCursor("head"),G=y.listSelections().length;if(P=="eol")j=new De(j.line,At(y,j.line));else if(P=="bol")j=new De(j.line,0);else if(P=="charAfter"){var Y=w(y,j,me(j,0,1));j=Y.end}else if(P=="firstNonBlank"){var Y=w(y,j,$n.moveToFirstNonWhiteSpaceCharacter(y,j));j=Y.end}else if(P=="startOfSelectedArea"){if(!_.visualMode)return;_.visualBlock?(j=new De(Math.min(z.head.line,z.anchor.line),Math.min(z.head.ch,z.anchor.ch)),G=Math.abs(z.head.line-z.anchor.line)+1):z.head.line<z.anchor.line?j=z.head:j=new De(z.anchor.line,0)}else if(P=="endOfSelectedArea"){if(!_.visualMode)return;_.visualBlock?(j=new De(Math.min(z.head.line,z.anchor.line),Math.max(z.head.ch,z.anchor.ch)+1),G=Math.abs(z.head.line-z.anchor.line)+1):z.head.line>=z.anchor.line?j=me(z.head,0,1):j=new De(z.anchor.line,0)}else if(P=="inplace"){if(_.visualMode)return}else P=="lastEdit"&&(j=gr(y)||j);y.setOption("disableInput",!1),S&&S.replace?(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),ze.signal(y,"vim-mode-change",{mode:"replace"})):(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),ze.signal(y,"vim-mode-change",{mode:"insert"})),je.macroModeState.isPlaying||(y.on("change",Uo),_.insertEnd&&_.insertEnd.clear(),_.insertEnd=y.setBookmark(j,{insertLeft:!0}),ze.on(y.getInputField(),"keydown",So)),_.visualMode&&pn(y),or(y,j,G)}},toggleVisualMode:function(y,S,_){var P=S.repeat,z=y.getCursor(),j;if(_.visualMode)_.visualLine^S.linewise||_.visualBlock^S.blockwise?(_.visualLine=!!S.linewise,_.visualBlock=!!S.blockwise,ze.signal(y,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""}),In(y)):pn(y);else{_.visualMode=!0,_.visualLine=!!S.linewise,_.visualBlock=!!S.blockwise,j=ae(y,new De(z.line,z.ch+P-1));var G=w(y,z,j);_.sel={anchor:G.start,head:G.end},ze.signal(y,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""}),In(y),qr(y,_,"<",et(z,j)),qr(y,_,">",Wt(z,j))}},reselectLastSelection:function(y,S,_){var P=_.lastSelection;if(_.visualMode&&$t(y,_),P){var z=P.anchorMark.find(),j=P.headMark.find();if(!z||!j)return;_.sel={anchor:z,head:j},_.visualMode=!0,_.visualLine=P.visualLine,_.visualBlock=P.visualBlock,In(y),qr(y,_,"<",et(z,j)),qr(y,_,">",Wt(z,j)),ze.signal(y,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""})}},joinLines:function(y,S,_){var P,z;if(_.visualMode){if(P=y.getCursor("anchor"),z=y.getCursor("head"),st(z,P)){var j=z;z=P,P=j}z.ch=At(y,z.line)-1}else{var G=Math.max(S.repeat,2);P=y.getCursor(),z=ae(y,new De(P.line+G-1,1/0))}for(var Y=0,X=P.line;X<z.line;X++){Y=At(y,P.line);var re="",ue=0;if(!S.keepSpaces){var ye=y.getLine(P.line+1);ue=ye.search(/\S/),ue==-1?ue=ye.length:re=" "}y.replaceRange(re,new De(P.line,Y),new De(P.line+1,ue))}var Ce=ae(y,new De(P.line,Y));_.visualMode&&pn(y,!1),y.setCursor(Ce)},newLineAndEnterInsertMode:function(y,S,_){_.insertMode=!0;var P=qe(y.getCursor());if(P.line===y.firstLine()&&!S.after)y.replaceRange(`
1442
+ `,new De(y.firstLine(),0)),y.setCursor(y.firstLine(),0);else{P.line=S.after?P.line:P.line-1,P.ch=At(y,P.line),y.setCursor(P);var z=ze.commands.newlineAndIndentContinueComment||ze.commands.newlineAndIndent;z(y)}this.enterInsertMode(y,{repeat:S.repeat},_)},paste:function(y,S,_){var P=this,z=je.registerController.getRegister(S.registerName),j=function(){var G=z.toString();P.continuePaste(y,S,_,G,z)};S.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(G){P.continuePaste(y,S,_,G,z)},function(){j()}):j()},continuePaste:function(y,S,_,P,z){var j=qe(y.getCursor());if(P){if(S.matchIndent){var G=y.getOption("tabSize"),Y=function(Rn){var V=Rn.split(" ").length-1,J=Rn.split(" ").length-1;return V*G+J*1},X=y.getLine(y.getCursor().line),re=Y(X.match(/^\s*/)[0]),ue=P.replace(/\n$/,""),ye=P!==ue,Ce=Y(P.match(/^\s*/)[0]),P=ue.replace(/^\s*/gm,function(Rn){var V=re+(Y(Rn)-Ce);if(V<0)return"";if(y.getOption("indentWithTabs")){var J=Math.floor(V/G);return Array(J+1).join(" ")}return Array(V+1).join(" ")});P+=ye?`
1443
+ `:""}if(S.repeat>1)var P=Array(S.repeat+1).join(P);var ve=z.linewise,we=z.blockwise;if(we){P=P.split(`
1444
+ `),ve&&P.pop();for(var Oe=0;Oe<P.length;Oe++)P[Oe]=P[Oe]==""?" ":P[Oe];j.ch+=S.after?1:0,j.ch=Math.min(At(y,j.line),j.ch)}else ve?_.visualMode?P=_.visualLine?P.slice(0,-1):`
1445
+ `+P.slice(0,P.length-1)+`
1446
+ `:S.after?(P=`
1447
+ `+P.slice(0,P.length-1),j.ch=At(y,j.line)):j.ch=0:j.ch+=S.after?1:0;var Ie;if(_.visualMode){_.lastPastedText=P;var Ve,lt=Ge(y,_),Je=lt[0],Qe=lt[1],_n=y.getSelection(),Ct=y.listSelections(),Kt=new Array(Ct.length).join("1").split("1");_.lastSelection&&(Ve=_.lastSelection.headMark.find()),je.registerController.unnamedRegister.setText(_n),we?(y.replaceSelections(Kt),Qe=new De(Je.line+P.length-1,Je.ch),y.setCursor(Je),fn(y,Qe),y.replaceSelections(P),Ie=Je):_.visualBlock?(y.replaceSelections(Kt),y.setCursor(Je),y.replaceRange(P,Je,Je),Ie=Je):(y.replaceRange(P,Je,Qe),Ie=y.posFromIndex(y.indexFromPos(Je)+P.length-1)),Ve&&(_.lastSelection.headMark=y.setBookmark(Ve)),ve&&(Ie.ch=0)}else if(we){y.setCursor(j);for(var Oe=0;Oe<P.length;Oe++){var Tt=j.line+Oe;Tt>y.lastLine()&&y.replaceRange(`
1448
+ `,new De(Tt,0));var kt=At(y,Tt);kt<j.ch&&wr(y,Tt,j.ch)}y.setCursor(j),fn(y,new De(j.line+P.length-1,j.ch)),y.replaceSelections(P),Ie=j}else if(y.replaceRange(P,j),ve){var Tt=S.after?j.line+1:j.line;Ie=new De(Tt,qt(y.getLine(Tt)))}else Ie=qe(j),/\n/.test(P)||(Ie.ch+=P.length-(S.after?1:0));_.visualMode&&pn(y,!1),y.setCursor(Ie)}},undo:function(y,S){y.operation(function(){Xe(y,ze.commands.undo,S.repeat)(),y.setCursor(ae(y,y.getCursor("start")))})},redo:function(y,S){Xe(y,ze.commands.redo,S.repeat)()},setRegister:function(y,S,_){_.inputState.registerName=S.selectedCharacter},insertRegister:function(y,S,_){var P=S.selectedCharacter,z=je.registerController.getRegister(P),j=z&&z.toString();j&&y.replaceSelection(j)},oneNormalCommand:function(y,S,_){mr(y,!0),_.insertModeReturn=!0,ze.on(y,"vim-command-done",function P(){_.visualMode||(_.insertModeReturn&&(_.insertModeReturn=!1,_.insertMode||Bn.enterInsertMode(y,{},_)),ze.off(y,"vim-command-done",P))})},setMark:function(y,S,_){var P=S.selectedCharacter;qr(y,_,P,y.getCursor())},replace:function(y,S,_){var P=S.selectedCharacter,z=y.getCursor(),j,G,Y=y.listSelections();if(_.visualMode)z=y.getCursor("start"),G=y.getCursor("end");else{var X=y.getLine(z.line);j=z.ch+S.repeat,j>X.length&&(j=X.length),G=new De(z.line,j)}var re=w(y,z,G);if(z=re.start,G=re.end,P==`
1449
+ `)_.visualMode||y.replaceRange("",z,G),(ze.commands.newlineAndIndentContinueComment||ze.commands.newlineAndIndent)(y);else{var ue=y.getRange(z,G);if(ue=ue.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),ue=ue.replace(/[^\n]/g,P),_.visualBlock){var ye=new Array(y.getOption("tabSize")+1).join(" ");ue=y.getSelection(),ue=ue.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),ue=ue.replace(/\t/g,ye).replace(/[^\n]/g,P).split(`
1450
+ `),y.replaceSelections(ue)}else y.replaceRange(ue,z,G);_.visualMode?(z=st(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,y.setCursor(z),pn(y,!1)):y.setCursor(me(G,0,-1))}},incrementNumberToken:function(y,S){for(var _=y.getCursor(),P=y.getLine(_.line),z=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,j,G,Y,X;(j=z.exec(P))!==null&&(G=j.index,Y=G+j[0].length,!(_.ch<Y)););if(!(!S.backtrack&&Y<=_.ch)&&j){var re=j[2]||j[4],ue=j[3]||j[5],ye=S.increase?1:-1,Ce={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],ve=parseInt(j[1]+ue,Ce)+ye*S.repeat;X=ve.toString(Ce);var we=re?new Array(ue.length-X.length+1+j[1].length).join("0"):"";X.charAt(0)==="-"?X="-"+re+we+X.substr(1):X=re+we+X;var Oe=new De(_.line,G),Ie=new De(_.line,Y);y.replaceRange(X,Oe,Ie),y.setCursor(new De(_.line,G+X.length-1))}},repeatLastEdit:function(y,S,_){var P=_.lastEditInputState;if(P){var z=S.repeat;z&&S.repeatIsExplicit?_.lastEditInputState.repeatOverride=z:z=_.lastEditInputState.repeatOverride||z,Rs(y,_,z,!1)}},indent:function(y,S){y.indentLine(y.getCursor().line,S.indentRight)},exitInsertMode:mr},Ci={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},ki={bracket:{isComplete:function(y){if(y.nextCh===y.symb){if(y.depth++,y.depth>=1)return!0}else y.nextCh===y.reverseSymb&&y.depth--;return!1}},section:{init:function(y){y.curMoveThrough=!0,y.symb=(y.forward?"]":"[")===y.symb?"{":"}"},isComplete:function(y){return y.index===0&&y.nextCh===y.symb}},comment:{isComplete:function(y){var S=y.lastCh==="*"&&y.nextCh==="/";return y.lastCh=y.nextCh,S}},method:{init:function(y){y.symb=y.symb==="m"?"{":"}",y.reverseSymb=y.symb==="{"?"}":"{"},isComplete:function(y){return y.nextCh===y.symb}},preprocess:{init:function(y){y.index=0},isComplete:function(y){if(y.nextCh==="#"){var S=y.lineText.match(/^#(\w+)/)[1];if(S==="endif"){if(y.forward&&y.depth===0)return!0;y.depth++}else if(S==="if"){if(!y.forward&&y.depth===0)return!0;y.depth--}if(S==="else"&&y.depth===0)return!0}return!1}}};I("pcre",!0,"boolean"),Lr.prototype={getQuery:function(){return je.query},setQuery:function(y){je.query=y},getOverlay:function(){return this.searchOverlay},setOverlay:function(y){this.searchOverlay=y},isReversed:function(){return je.isReversed},setReversed:function(y){je.isReversed=y},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(y){this.annotate=y}};var Di={"\\n":`
1451
+ `,"\\r":"\r","\\t":" "},Ls={"\\/":"/","\\\\":"\\","\\n":`
1452
+ `,"\\r":"\r","\\t":" ","\\&":"&"},rn=0,wa=function(){this.buildCommandMap_()};wa.prototype={processCommand:function(y,S,_){var P=this;y.operation(function(){y.curOp.isVimOp=!0,P._processCommand(y,S,_)})},_processCommand:function(y,S,_){var P=y.state.vim,z=je.registerController.getRegister(":"),j=z.toString(),G=new ze.StringStream(S);z.setText(S);var Y=_||{};Y.input=S;try{this.parseInput_(y,G,Y)}catch(ue){throw Nt(y,ue.toString()),ue}P.visualMode&&pn(y);var X,re;if(!Y.commandName)Y.line!==void 0&&(re="move");else if(X=this.matchCommand_(Y.commandName),X){if(re=X.name,X.excludeFromCommandHistory&&z.setText(j),this.parseCommandArgs_(G,Y,X),X.type=="exToKey"){T(y,X.toKeys,X);return}if(X.type=="exToEx"){this.processCommand(y,X.toInput);return}}if(!re){Nt(y,'Not an editor command ":'+S+'"');return}try{ur[re](y,Y),(!X||!X.possiblyAsync)&&Y.callback&&Y.callback()}catch(ue){throw Nt(y,ue.toString()),ue}},parseInput_:function(y,S,_){if(S.eatWhile(":"),S.eat("%")?(_.line=y.firstLine(),_.lineEnd=y.lastLine()):(_.line=this.parseLineSpec_(y,S),_.line!==void 0&&S.eat(",")&&(_.lineEnd=this.parseLineSpec_(y,S))),_.line==null)if(y.state.vim.visualMode){var P=cn(y,y.state.vim,"<");_.selectionLine=P&&P.line,P=cn(y,y.state.vim,">"),_.selectionLineEnd=P&&P.line}else _.selectionLine=y.getCursor().line;else _.selectionLine=_.line,_.selectionLineEnd=_.lineEnd;var z=S.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return z?_.commandName=z[1]:_.commandName=S.match(/.*/)[0],_},parseLineSpec_:function(y,S){var _=S.match(/^(\d+)/);if(_)return parseInt(_[1],10)-1;switch(S.next()){case".":return this.parseLineSpecOffset_(S,y.getCursor().line);case"$":return this.parseLineSpecOffset_(S,y.lastLine());case"'":var P=S.next(),z=cn(y,y.state.vim,P);if(!z)throw new Error("Mark not set");return this.parseLineSpecOffset_(S,z.line);case"-":case"+":return S.backUp(1),this.parseLineSpecOffset_(S,y.getCursor().line);default:return S.backUp(1),void 0}},parseLineSpecOffset_:function(y,S){var _=y.match(/^([+-])?(\d+)/);if(_){var P=parseInt(_[2],10);_[1]=="-"?S-=P:S+=P}return S},parseCommandArgs_:function(y,S,_){if(!y.eol()){S.argString=y.match(/.*/)[0];var P=_.argDelimiter||/\s+/,z=ir(S.argString).split(P);z.length&&z[0]&&(S.args=z)}},matchCommand_:function(y){for(var S=y.length;S>0;S--){var _=y.substring(0,S);if(this.commandMap_[_]){var P=this.commandMap_[_];if(P.name.indexOf(y)===0)return P}}return null},buildCommandMap_:function(){this.commandMap_={};for(var y=0;y<Zi.length;y++){var S=Zi[y],_=S.shortName||S.name;this.commandMap_[_]=S}},map:function(y,S,_,P){if(y!=":"&&y.charAt(0)==":"){if(_)throw Error("Mode not supported for ex mappings");var z=y.substring(1);S!=":"&&S.charAt(0)==":"?this.commandMap_[z]={name:z,type:"exToEx",toInput:S.substring(1),user:!0}:this.commandMap_[z]={name:z,type:"exToKey",toKeys:S,user:!0}}else{var j={keys:y,type:"keyToKey",toKeys:S,noremap:!!P};_&&(j.context=_),Nn.unshift(j)}},unmap:function(y,S){if(y!=":"&&y.charAt(0)==":"){if(S)throw Error("Mode not supported for ex mappings");var _=y.substring(1);if(this.commandMap_[_]&&this.commandMap_[_].user)return delete this.commandMap_[_],!0}else for(var P=y,z=0;z<Nn.length;z++)if(P==Nn[z].keys&&Nn[z].context===S)return Nn.splice(z,1),!0}};var ur={colorscheme:function(y,S){if(!S.args||S.args.length<1){Nt(y,y.getOption("theme"));return}y.setOption("theme",S.args[0])},map:function(y,S,_,P){var z=S.args;if(!z||z.length<2){y&&Nt(y,"Invalid mapping: "+S.input);return}Pr.map(z[0],z[1],_,P)},imap:function(y,S){this.map(y,S,"insert")},nmap:function(y,S){this.map(y,S,"normal")},vmap:function(y,S){this.map(y,S,"visual")},omap:function(y,S){this.map(y,S,"operatorPending")},noremap:function(y,S){this.map(y,S,void 0,!0)},inoremap:function(y,S){this.map(y,S,"insert",!0)},nnoremap:function(y,S){this.map(y,S,"normal",!0)},vnoremap:function(y,S){this.map(y,S,"visual",!0)},onoremap:function(y,S){this.map(y,S,"operatorPending",!0)},unmap:function(y,S,_){var P=S.args;(!P||P.length<1||!Pr.unmap(P[0],_))&&y&&Nt(y,"No such mapping: "+S.input)},mapclear:function(y,S){wt.mapclear()},imapclear:function(y,S){wt.mapclear("insert")},nmapclear:function(y,S){wt.mapclear("normal")},vmapclear:function(y,S){wt.mapclear("visual")},omapclear:function(y,S){wt.mapclear("operatorPending")},move:function(y,S){xi.processCommand(y,y.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:S.line+1})},set:function(y,S){var _=S.args,P=S.setCfg||{};if(!_||_.length<1){y&&Nt(y,"Invalid mapping: "+S.input);return}var z=_[0].split("="),j=z[0],G=z[1],Y=!1,X=!1;if(j.charAt(j.length-1)=="?"){if(G)throw Error("Trailing characters: "+S.argString);j=j.substring(0,j.length-1),Y=!0}else j.charAt(j.length-1)=="!"&&(j=j.substring(0,j.length-1),X=!0);G===void 0&&j.substring(0,2)=="no"&&(j=j.substring(2),G=!1);var re=Ht[j]&&Ht[j].type=="boolean";if(re&&(X?G=!A(j,y,P):G==null&&(G=!0)),!re&&G===void 0||Y){var ue=A(j,y,P);ue instanceof Error?Nt(y,ue.message):ue===!0||ue===!1?Nt(y," "+(ue?"":"no")+j):Nt(y," "+j+"="+ue)}else{var ye=R(j,G,y,P);ye instanceof Error&&Nt(y,ye.message)}},setlocal:function(y,S){S.setCfg={scope:"local"},this.set(y,S)},setglobal:function(y,S){S.setCfg={scope:"global"},this.set(y,S)},registers:function(y,S){var _=S.args,P=je.registerController.registers,z=`----------Registers----------
1453
+
1454
+ `;if(_){var j;_=_.join("");for(var G=0;G<_.length;G++)if(j=_.charAt(G),!!je.registerController.isValidRegister(j)){var Y=P[j]||new W;z+='"'+j+" "+Y.toString()+`
1455
+ `}}else for(var j in P){var X=P[j].toString();X.length&&(z+='"'+j+" "+X+`
1456
+ `)}Nt(y,z)},sort:function(y,S){function _(){if(S.argString){var Tt=new ze.StringStream(S.argString);if(Tt.eat("!")&&(j=!0),Tt.eol())return;if(!Tt.eatSpace())return"Invalid arguments";var kt=Tt.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!kt&&!Tt.eol())return"Invalid arguments";if(kt[1]){G=kt[1].indexOf("i")!=-1,Y=kt[1].indexOf("u")!=-1;var Qn=kt[1].indexOf("d")!=-1||kt[1].indexOf("n")!=-1&&1,hr=kt[1].indexOf("x")!=-1&&1,Rn=kt[1].indexOf("o")!=-1&&1;if(Qn+hr+Rn>1)return"Invalid arguments";X=Qn&&"decimal"||hr&&"hex"||Rn&&"octal"}kt[2]&&(re=new RegExp(kt[2].substr(1,kt[2].length-2),G?"i":""))}}function P(Tt,kt){if(j){var Qn;Qn=Tt,Tt=kt,kt=Qn}G&&(Tt=Tt.toLowerCase(),kt=kt.toLowerCase());var hr=X&&Ie.exec(Tt),Rn=X&&Ie.exec(kt);return hr?(hr=parseInt((hr[1]+hr[2]).toLowerCase(),Ve),Rn=parseInt((Rn[1]+Rn[2]).toLowerCase(),Ve),hr-Rn):Tt<kt?-1:1}function z(Tt,kt){if(j){var Qn;Qn=Tt,Tt=kt,kt=Qn}return G&&(Tt[0]=Tt[0].toLowerCase(),kt[0]=kt[0].toLowerCase()),Tt[0]<kt[0]?-1:1}var j,G,Y,X,re,ue=_();if(ue){Nt(y,ue+": "+S.argString);return}var ye=S.line||y.firstLine(),Ce=S.lineEnd||S.line||y.lastLine();if(ye!=Ce){var ve=new De(ye,0),we=new De(Ce,At(y,Ce)),Oe=y.getRange(ve,we).split(`
1457
+ `),Ie=re||(X=="decimal"?/(-?)([\d]+)/:X=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:X=="octal"?/([0-7]+)/:null),Ve=X=="decimal"?10:X=="hex"?16:X=="octal"?8:null,lt=[],Je=[];if(X||re)for(var Qe=0;Qe<Oe.length;Qe++){var _n=re?Oe[Qe].match(re):null;_n&&_n[0]!=""?lt.push(_n):!re&&Ie.exec(Oe[Qe])?lt.push(Oe[Qe]):Je.push(Oe[Qe])}else Je=Oe;if(lt.sort(re?z:P),re)for(var Qe=0;Qe<lt.length;Qe++)lt[Qe]=lt[Qe].input;else X||Je.sort(P);if(Oe=j?lt.concat(Je):Je.concat(lt),Y){var Ct=Oe,Kt;Oe=[];for(var Qe=0;Qe<Ct.length;Qe++)Ct[Qe]!=Kt&&Oe.push(Ct[Qe]),Kt=Ct[Qe]}y.replaceRange(Oe.join(`
1458
+ `),ve,we)}},vglobal:function(y,S){this.global(y,S)},normal:function(y,S){var _=S.argString;if(_&&_[0]=="!"&&(_=_.slice(1),Ni=!0),_=_.trimStart(),!_){Nt(y,"Argument is required.");return}var P=S.line;if(typeof P=="number")for(var z=isNaN(S.lineEnd)?P:S.lineEnd,j=P;j<=z;j++)y.setCursor(j,0),T(y,S.argString.trimStart()),y.state.vim.insertMode&&mr(y,!0);else T(y,S.argString.trimStart()),y.state.vim.insertMode&&mr(y,!0)},global:function(y,S){var _=S.argString;if(!_){Nt(y,"Regular Expression missing from global");return}var P=S.commandName[0]==="v";_[0]==="!"&&S.commandName[0]==="g"&&(P=!0,_=_.slice(1));var z=S.line!==void 0?S.line:y.firstLine(),j=S.lineEnd||S.line||y.lastLine(),G=yn(_),Y=_,X;if(G.length&&(Y=G[0],X=G.slice(1,G.length).join("/")),Y)try{oe(y,Y,!0,!0)}catch{Nt(y,"Invalid regex: "+Y);return}for(var re=On(y).getQuery(),ue=[],ye=z;ye<=j;ye++){var Ce=y.getLine(ye),ve=re.test(Ce);ve!==P&&ue.push(X?y.getLineHandle(ye):Ce)}if(!X){Nt(y,ue.join(`
1459
+ `));return}var we=0,Oe=function(){if(we<ue.length){var Ie=ue[we++],Ve=y.getLineNumber(Ie);if(Ve==null){Oe();return}var lt=Ve+1+X;Pr.processCommand(y,lt,{callback:Oe})}else y.releaseLineHandles&&y.releaseLineHandles()};Oe()},substitute:function(y,S){if(!y.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var _=S.argString,P=_?ai(_,_[0]):[],z,j="",G,Y,X,re=!1,ue=!1;if(P.length)z=P[0],A("pcre")&&z!==""&&(z=new RegExp(z).source),j=P[1],j!==void 0&&(A("pcre")?j=Or(j.replace(/([^\\])&/g,"$1$$&")):j=_o(j),je.lastSubstituteReplacePart=j),G=P[2]?P[2].split(" "):[];else if(_&&_.length){Nt(y,"Substitutions should be of the form :s/pattern/replace/");return}if(G&&(Y=G[0],X=parseInt(G[1]),Y&&(Y.indexOf("c")!=-1&&(re=!0),Y.indexOf("g")!=-1&&(ue=!0),A("pcre")?z=z+"/"+Y:z=z.replace(/\//g,"\\/")+"/"+Y)),z)try{oe(y,z,!0,!0)}catch{Nt(y,"Invalid regex: "+z);return}if(j=j||je.lastSubstituteReplacePart,j===void 0){Nt(y,"No previous substitute regular expression");return}var ye=On(y),Ce=ye.getQuery(),ve=S.line!==void 0?S.line:y.getCursor().line,we=S.lineEnd||ve;ve==y.firstLine()&&we==y.lastLine()&&(we=1/0),X&&(ve=we,we=ve+X-1);var Oe=ae(y,new De(ve,0)),Ie=y.getSearchCursor(Ce,Oe);mn(y,re,ue,ve,we,Ie,Ce,j,S.callback)},startinsert:function(y,S){T(y,S.argString=="!"?"A":"i",{})},redo:ze.commands.redo,undo:ze.commands.undo,write:function(y){ze.commands.save?ze.commands.save(y):y.save&&y.save()},nohlsearch:function(y){Vt(y)},yank:function(y){var S=qe(y.getCursor()),_=S.line,P=y.getLine(_);je.registerController.pushText("0","yank",P,!0,!0)},delete:function(y,S){var _=S.selectionLine,P=isNaN(S.selectionLineEnd)?_:S.selectionLineEnd;Jo.delete(y,{linewise:!0},[{anchor:new De(_,0),head:new De(P+1,0)}])},join:function(y,S){var _=S.selectionLine,P=isNaN(S.selectionLineEnd)?_:S.selectionLineEnd;y.setCursor(new De(_,0)),Bn.joinLines(y,{repeat:P-_},y.state.vim)},delmarks:function(y,S){if(!S.argString||!ir(S.argString)){Nt(y,"Argument required");return}for(var _=y.state.vim,P=new ze.StringStream(ir(S.argString));!P.eol();){P.eatSpace();var z=P.pos;if(!P.match(/[a-zA-Z]/,!1)){Nt(y,"Invalid argument: "+S.argString.substring(z));return}var j=P.next();if(P.match("-",!0)){if(!P.match(/[a-zA-Z]/,!1)){Nt(y,"Invalid argument: "+S.argString.substring(z));return}var G=j,Y=P.next();if(!(c(G)&&c(Y)||s(G)&&s(Y))){Nt(y,"Invalid argument: "+G+"-");return}var X=G.charCodeAt(0),re=Y.charCodeAt(0);if(X>=re){Nt(y,"Invalid argument: "+S.argString.substring(z));return}for(var ue=0;ue<=re-X;ue++){var ye=String.fromCharCode(X+ue);delete _.marks[ye]}}else delete _.marks[j]}}},Pr=new wa;I("insertModeEscKeysTimeout",200,"number"),ze.Vim=wt;var mo={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"},_r=wt.handleKey.bind(wt);wt.handleKey=function(y,S,_){return y.operation(function(){return _r(y,S,_)},!0)},D(),r.CodeMirror=ze;var ci=wt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(y,S,_,P,z){var j=this.state.vim||{},G=_.characterWidth,Y=_.lineHeight,X=S.top,re=S.left;if(!j.insertMode){var ue=P.cursor?cr.comparePoints(P.cursor,P.start)<=0:z.selection.isBackwards()||z.selection.isEmpty();!ue&&re>G&&(re-=G)}!j.insertMode&&j.status&&(Y/=2,X+=Y),Yr.translate(y,re,X),Yr.setStyle(y.style,"width",G+"px"),Yr.setStyle(y.style,"height",Y+"px")},$getDirectionForHighlight:function(y){var S=y.state.cm,_=ci(S);if(!_.insertMode)return y.session.selection.isBackwards()||y.session.selection.isEmpty()},handleKeyboard:function(y,S,_,P,z){var j=y.editor,G=j.state.cm,Y=ci(G);if(P!=-1){if(Y.insertMode||(S==-1?(_.charCodeAt(0)>255&&y.inputKey&&(_=y.inputKey,_&&y.inputHash==4&&(_=_.toUpperCase())),y.inputChar=_):S==4||S==0?y.inputKey==_&&y.inputHash==S&&y.inputChar?(_=y.inputChar,S=-1):(y.inputChar=null,y.inputKey=_,y.inputHash=S):y.inputChar=y.inputKey=null),G.state.overwrite&&Y.insertMode&&_=="backspace"&&S==0)return{command:"gotoleft"};if(_=="c"&&S==1&&!$o.isMac&&j.getCopyText())return j.once("copy",function(){Y.insertMode?j.selection.clearSelection():G.operation(function(){pn(G)})}),{command:"null",passEvent:!0};if(_=="esc"&&!Y.insertMode&&!Y.visualMode&&!G.ace.inMultiSelectMode){var X=On(G),re=X.getOverlay();re&&G.removeOverlay(re)}if(S==-1||S&1||S===0&&_.length>1){var ue=Y.insertMode,ye=ga(S,_,z||{},Y);Y.status==null&&(Y.status="");var Ce=qo(G,ye,"user");return Y=ci(G),Ce&&Y.status!=null?Y.status+=ye:Y.status==null&&(Y.status=""),G._signal("changeStatus"),!Ce&&(S!=-1||ue)?void 0:{command:"null",passEvent:!Ce}}}},attach:function(y){function S(){var P=ci(_).insertMode;_.ace.renderer.setStyle("normal-mode",!P),y.textInput.setCommandMode(!P),y.renderer.$keepTextAreaAtCursor=P,y.renderer.$blockCursor=!P}y.state||(y.state={});var _=new ze(y);y.state.cm=_,y.$vimModeHandler=this,h(_),ci(_).status=null,_.on("vim-command-done",function(){_.virtualSelectionMode()||(ci(_).status=null,_.ace._signal("changeStatus"),_.ace.session.markUndoGroup())}),_.on("changeStatus",function(){_.ace.renderer.updateCursor(),_.ace._signal("changeStatus")}),_.on("vim-mode-change",function(){_.virtualSelectionMode()||(S(),_._signal("changeStatus"))}),S(),y.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(_)},detach:function(y){var S=y.state.cm;d(S),S.destroy(),y.state.cm=null,y.$vimModeHandler=null,y.renderer.$cursorLayer.drawCursor=null,y.renderer.setStyle("normal-mode",!1),y.textInput.setCommandMode(!1),y.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(y){var S=y.state.cm,_=ci(S);if(_.insertMode)return"INSERT";var P="";return _.visualMode&&(P+="VISUAL",_.visualLine&&(P+=" LINE"),_.visualBlock&&(P+=" BLOCK")),_.status&&(P+=(P?" ":"")+_.status),P}},wt.defineOption({name:"wrap",set:function(y,S){S&&S.ace.setOption("wrap",y)},type:"boolean"},!1),wt.defineEx("write","w",function(){console.log(":write is not implemented")}),Nn.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"}}),Nn.push({keys:"gq",type:"operator",operator:"hardWrap"}),wt.defineOperator("hardWrap",function(y,S,_,P,z){var j=_[0].anchor.line,G=_[0].head.line;return S.linewise&&G--,po(y.ace,{startRow:j,endRow:G}),De(G,0)}),I("textwidth",void 0,"number",["tw"],function(y,S){if(S!==void 0){if(y===void 0){var _=S.ace.getOption("printMarginColumn");return _}var P=Math.round(y);P>1&&S.ace.setOption("printMarginColumn",P)}}),Bn.aceCommand=function(y,S,_){y.vimCmd=S,y.ace.inVirtualSelectionMode?y.ace.on("beforeEndOperation",Ji):Ji(null,y.ace)},Bn.fold=function(y,S,_){y.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(S.all?2:0)+(S.open?1:0)])},Ro=Nn.length,r.handler.defaultKeymap=Nn,r.handler.actions=Bn,r.Vim=wt}),(function(){ace.require(["ace/keyboard/vim"],function(e){t&&(t.exports=e)})})()})(bg)),bg.exports}Ck();var xg={},Cg;function kk(){return Cg||(Cg=1,(function(t){(function(){var n={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(w){return m(g(w),arguments)}function r(w,h){return e.apply(null,[w].concat(h||[]))}function m(w,h){var d=1,a=w.length,l,c="",u,i,s,f,b,x,I,R;for(u=0;u<a;u++)if(typeof w[u]=="string")c+=w[u];else if(typeof w[u]=="object"){if(s=w[u],s.keys)for(l=h[d],i=0;i<s.keys.length;i++){if(l==null)throw new Error(e('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[i],s.keys[i-1]));l=l[s.keys[i]]}else s.param_no?l=h[s.param_no]:l=h[d++];if(n.not_type.test(s.type)&&n.not_primitive.test(s.type)&&l instanceof Function&&(l=l()),n.numeric_arg.test(s.type)&&typeof l!="number"&&isNaN(l))throw new TypeError(e("[sprintf] expecting number but found %T",l));switch(n.number.test(s.type)&&(I=l>=0),s.type){case"b":l=parseInt(l,10).toString(2);break;case"c":l=String.fromCharCode(parseInt(l,10));break;case"d":case"i":l=parseInt(l,10);break;case"j":l=JSON.stringify(l,null,s.width?parseInt(s.width):0);break;case"e":l=s.precision?parseFloat(l).toExponential(s.precision):parseFloat(l).toExponential();break;case"f":l=s.precision?parseFloat(l).toFixed(s.precision):parseFloat(l);break;case"g":l=s.precision?String(Number(l.toPrecision(s.precision))):parseFloat(l);break;case"o":l=(parseInt(l,10)>>>0).toString(8);break;case"s":l=String(l),l=s.precision?l.substring(0,s.precision):l;break;case"t":l=String(!!l),l=s.precision?l.substring(0,s.precision):l;break;case"T":l=Object.prototype.toString.call(l).slice(8,-1).toLowerCase(),l=s.precision?l.substring(0,s.precision):l;break;case"u":l=parseInt(l,10)>>>0;break;case"v":l=l.valueOf(),l=s.precision?l.substring(0,s.precision):l;break;case"x":l=(parseInt(l,10)>>>0).toString(16);break;case"X":l=(parseInt(l,10)>>>0).toString(16).toUpperCase();break}n.json.test(s.type)?c+=l:(n.number.test(s.type)&&(!I||s.sign)?(R=I?"+":"-",l=l.toString().replace(n.sign,"")):R="",b=s.pad_char?s.pad_char==="0"?"0":s.pad_char.charAt(1):" ",x=s.width-(R+l).length,f=s.width&&x>0?b.repeat(x):"",c+=s.align?R+l+f:b==="0"?R+f+l:f+R+l)}return c}var p=Object.create(null);function g(w){if(p[w])return p[w];for(var h=w,d,a=[],l=0;h;){if((d=n.text.exec(h))!==null)a.push(d[0]);else if((d=n.modulo.exec(h))!==null)a.push("%");else if((d=n.placeholder.exec(h))!==null){if(d[2]){l|=1;var c=[],u=d[2],i=[];if((i=n.key.exec(u))!==null)for(c.push(i[1]);(u=u.substring(i[0].length))!=="";)if((i=n.key_access.exec(u))!==null)c.push(i[1]);else if((i=n.index_access.exec(u))!==null)c.push(i[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");d[2]=c}else l|=2;if(l===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");a.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 p[w]=a}t.sprintf=e,t.vsprintf=r,typeof window<"u"&&(window.sprintf=e,window.vsprintf=r)})()})(xg)),xg}kk();var Gl={exports:{}},_k=Gl.exports,kg;function Ak(){return kg||(kg=1,(function(t,n){(function(){var e,r="4.18.1",m=200,p="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",g="Expected a function",w="Invalid `variable` option passed into `_.template`",h="Invalid `imports` option passed into `_.template`",d="__lodash_hash_undefined__",a=500,l="__lodash_placeholder__",c=1,u=2,i=4,s=1,f=2,b=1,x=2,I=4,R=8,A=16,C=32,O=64,D=128,E=256,T=512,B=30,F="...",N=800,$=16,k=1,L=2,W=3,U=1/0,q=9007199254740991,Z=17976931348623157e292,Q=NaN,le=4294967295,ne=le-1,ce=le>>>1,ae=[["ary",D],["bind",b],["bindKey",x],["curry",R],["curryRight",A],["flip",T],["partial",C],["partialRight",O],["rearg",E]],de="[object Arguments]",me="[object Array]",$e="[object AsyncFunction]",Re="[object Boolean]",Me="[object Date]",Xe="[object DOMException]",qe="[object Error]",rt="[object Function]",st="[object GeneratorFunction]",et="[object Map]",Wt="[object Number]",br="[object Null]",At="[object Object]",ir="[object Promise]",An="[object Proxy]",wr="[object RegExp]",fn="[object Set]",or="[object String]",ht="[object Symbol]",Ge="[object Undefined]",$t="[object WeakMap]",Xt="[object WeakSet]",In="[object ArrayBuffer]",Un="[object DataView]",sr="[object Float32Array]",pn="[object Float64Array]",zn="[object Int8Array]",Ln="[object Int16Array]",qt="[object Int32Array]",nn="[object Uint8Array]",Ir="[object Uint8ClampedArray]",Vr="[object Uint16Array]",xr="[object Uint32Array]",yi=/\b__p \+= '';/g,bi=/\b(__p \+=) '' \+/g,Xn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Yi=/&(?:amp|lt|gt|quot|#39);/g,Gr=/[&<>"']/g,Cs=RegExp(Yi.source),qr=RegExp(Gr.source),Cn=/<%-([\s\S]+?)%>/g,wi=/<%([\s\S]+?)%>/g,ko=/<%=([\s\S]+?)%>/g,si=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kn=/^\w*$/,Cr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Lr=/[\\^$.*+?()[\]{}|]/g,On=RegExp(Lr.source),yn=/^\s+/,pr=/\s/,ai=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ao=/\{\n\/\* \[wrapped with (.+)\] \*/,lo=/,? & /,_o=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Or=/[()=,{}\[\]\/\s]/,li=/\\(\\)?/g,Kr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Nt=/\w*$/,Ao=/^[-+]0x[0-9a-f]+$/i,ar=/^0b[01]+$/i,Sn=/^\[object .+?Constructor\]$/,oe=/^0o[0-7]+$/i,Ne=/^(?:0|[1-9]\d*)$/,Be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,gn=/['\n\r\u2028\u2029\\]/g,Vt="\\ud800-\\udfff",kr="\\u0300-\\u036f",Vn="\\ufe20-\\ufe2f",cn="\\u20d0-\\u20ff",gr=kr+Vn+cn,mn="\\u2700-\\u27bf",mr="a-z\\xdf-\\xf6\\xf8-\\xff",co="\\xac\\xb1\\xd7\\xf7",ks="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",_s="\\u2000-\\u206f",As=" \\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",lr="A-Z\\xc0-\\xd6\\xd8-\\xde",Ss="\\ufe0e\\ufe0f",Uo=co+ks+_s+As,uo="['’]",$s="["+Vt+"]",Vo="["+Uo+"]",So="["+gr+"]",Rs="\\d+",Ms="["+mn+"]",Go="["+mr+"]",ga="[^"+Vt+Uo+Rs+mn+mr+lr+"]",ho="\\ud83c[\\udffb-\\udfff]",qo="(?:"+So+"|"+ho+")",Ji="[^"+Vt+"]",cr="(?:\\ud83c[\\udde6-\\uddff]){2}",Ts="[\\ud800-\\udbff][\\udc00-\\udfff]",Yr="["+lr+"]",ma="\\u200d",va="(?:"+Go+"|"+ga+")",Ko="(?:"+Yr+"|"+ga+")",Xi="(?:"+uo+"(?:d|ll|m|re|s|t|ve))?",$o="(?:"+uo+"(?:D|LL|M|RE|S|T|VE))?",Yo=qo+"?",fo="["+Ss+"]?",ya="(?:"+ma+"(?:"+[Ji,cr,Ts].join("|")+")"+fo+Yo+")*",po="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ze="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Es=fo+Yo+ya,De="(?:"+[Ms,cr,Ts].join("|")+")"+Es,Nn="(?:"+[Ji+So+"?",So,cr,Ts,$s].join("|")+")",Ro=RegExp(uo,"g"),Zi=RegExp(So,"g"),Dn=RegExp(ho+"(?="+ho+")|"+Nn+Es,"g"),ba=RegExp([Yr+"?"+Go+"+"+Xi+"(?="+[Vo,Yr,"$"].join("|")+")",Ko+"+"+$o+"(?="+[Vo,Yr+va,"$"].join("|")+")",Yr+"?"+va+"+"+Xi,Yr+"+"+$o,ze,po,Rs,De].join("|"),"g"),Mo=RegExp("["+ma+Vt+gr+Ss+"]"),Li=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,go=["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"],Is=-1,en={};en[sr]=en[pn]=en[zn]=en[Ln]=en[qt]=en[nn]=en[Ir]=en[Vr]=en[xr]=!0,en[de]=en[me]=en[In]=en[Re]=en[Un]=en[Me]=en[qe]=en[rt]=en[et]=en[Wt]=en[At]=en[wr]=en[fn]=en[or]=en[$t]=!1;var at={};at[de]=at[me]=at[In]=at[Un]=at[Re]=at[Me]=at[sr]=at[pn]=at[zn]=at[Ln]=at[qt]=at[et]=at[Wt]=at[At]=at[wr]=at[fn]=at[or]=at[ht]=at[nn]=at[Ir]=at[Vr]=at[xr]=!0,at[qe]=at[rt]=at[$t]=!1;var Ht={À:"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"},Oi={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Wn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},je={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},bn=parseFloat,wt=parseInt,Nr=typeof Bo=="object"&&Bo&&Bo.Object===Object&&Bo,Ni=typeof self=="object"&&self&&self.Object===Object&&self,Dt=Nr||Ni||Function("return this")(),Dr=n&&!n.nodeType&&n,Zn=Dr&&!0&&t&&!t.nodeType&&t,Qi=Zn&&Zn.exports===Dr,xi=Qi&&Nr.process,$n=(function(){try{var ge=Zn&&Zn.require&&Zn.require("util").types;return ge||xi&&xi.binding&&xi.binding("util")}catch{}})(),Jo=$n&&$n.isArrayBuffer,Bn=$n&&$n.isDate,Ci=$n&&$n.isMap,ki=$n&&$n.isRegExp,Di=$n&&$n.isSet,Ls=$n&&$n.isTypedArray;function rn(ge,Se,ke){switch(ke.length){case 0:return ge.call(Se);case 1:return ge.call(Se,ke[0]);case 2:return ge.call(Se,ke[0],ke[1]);case 3:return ge.call(Se,ke[0],ke[1],ke[2])}return ge.apply(Se,ke)}function wa(ge,Se,ke,Ue){for(var ct=-1,_t=ge==null?0:ge.length;++ct<_t;){var Zt=ge[ct];Se(Ue,Zt,ke(Zt),ge)}return Ue}function ur(ge,Se){for(var ke=-1,Ue=ge==null?0:ge.length;++ke<Ue&&Se(ge[ke],ke,ge)!==!1;);return ge}function Pr(ge,Se){for(var ke=ge==null?0:ge.length;ke--&&Se(ge[ke],ke,ge)!==!1;);return ge}function mo(ge,Se){for(var ke=-1,Ue=ge==null?0:ge.length;++ke<Ue;)if(!Se(ge[ke],ke,ge))return!1;return!0}function _r(ge,Se){for(var ke=-1,Ue=ge==null?0:ge.length,ct=0,_t=[];++ke<Ue;){var Zt=ge[ke];Se(Zt,ke,ge)&&(_t[ct++]=Zt)}return _t}function ci(ge,Se){var ke=ge==null?0:ge.length;return!!ke&&ye(ge,Se,0)>-1}function y(ge,Se,ke){for(var Ue=-1,ct=ge==null?0:ge.length;++Ue<ct;)if(ke(Se,ge[Ue]))return!0;return!1}function S(ge,Se){for(var ke=-1,Ue=ge==null?0:ge.length,ct=Array(Ue);++ke<Ue;)ct[ke]=Se(ge[ke],ke,ge);return ct}function _(ge,Se){for(var ke=-1,Ue=Se.length,ct=ge.length;++ke<Ue;)ge[ct+ke]=Se[ke];return ge}function P(ge,Se,ke,Ue){var ct=-1,_t=ge==null?0:ge.length;for(Ue&&_t&&(ke=ge[++ct]);++ct<_t;)ke=Se(ke,ge[ct],ct,ge);return ke}function z(ge,Se,ke,Ue){var ct=ge==null?0:ge.length;for(Ue&&ct&&(ke=ge[--ct]);ct--;)ke=Se(ke,ge[ct],ct,ge);return ke}function j(ge,Se){for(var ke=-1,Ue=ge==null?0:ge.length;++ke<Ue;)if(Se(ge[ke],ke,ge))return!0;return!1}var G=Oe("length");function Y(ge){return ge.split("")}function X(ge){return ge.match(_o)||[]}function re(ge,Se,ke){var Ue;return ke(ge,function(ct,_t,Zt){if(Se(ct,_t,Zt))return Ue=_t,!1}),Ue}function ue(ge,Se,ke,Ue){for(var ct=ge.length,_t=ke+(Ue?1:-1);Ue?_t--:++_t<ct;)if(Se(ge[_t],_t,ge))return _t;return-1}function ye(ge,Se,ke){return Se===Se?xt(ge,Se,ke):ue(ge,ve,ke)}function Ce(ge,Se,ke,Ue){for(var ct=ke-1,_t=ge.length;++ct<_t;)if(Ue(ge[ct],Se))return ct;return-1}function ve(ge){return ge!==ge}function we(ge,Se){var ke=ge==null?0:ge.length;return ke?Je(ge,Se)/ke:Q}function Oe(ge){return function(Se){return Se==null?e:Se[ge]}}function Ie(ge){return function(Se){return ge==null?e:ge[Se]}}function Ve(ge,Se,ke,Ue,ct){return ct(ge,function(_t,Zt,Ft){ke=Ue?(Ue=!1,_t):Se(ke,_t,Zt,Ft)}),ke}function lt(ge,Se){var ke=ge.length;for(ge.sort(Se);ke--;)ge[ke]=ge[ke].value;return ge}function Je(ge,Se){for(var ke,Ue=-1,ct=ge.length;++Ue<ct;){var _t=Se(ge[Ue]);_t!==e&&(ke=ke===e?_t:ke+_t)}return ke}function Qe(ge,Se){for(var ke=-1,Ue=Array(ge);++ke<ge;)Ue[ke]=Se(ke);return Ue}function _n(ge,Se){return S(Se,function(ke){return[ke,ge[ke]]})}function Ct(ge){return ge&&ge.slice(0,dt(ge)+1).replace(yn,"")}function Kt(ge){return function(Se){return ge(Se)}}function Tt(ge,Se){return S(Se,function(ke){return ge[ke]})}function kt(ge,Se){return ge.has(Se)}function Qn(ge,Se){for(var ke=-1,Ue=ge.length;++ke<Ue&&ye(Se,ge[ke],0)>-1;);return ke}function hr(ge,Se){for(var ke=ge.length;ke--&&ye(Se,ge[ke],0)>-1;);return ke}function Rn(ge,Se){for(var ke=ge.length,Ue=0;ke--;)ge[ke]===Se&&++Ue;return Ue}var V=Ie(Ht),J=Ie(Oi);function ie(ge){return"\\"+je[ge]}function se(ge,Se){return ge==null?e:ge[Se]}function pe(ge){return Mo.test(ge)}function xe(ge){return Li.test(ge)}function Te(ge){for(var Se,ke=[];!(Se=ge.next()).done;)ke.push(Se.value);return ke}function Fe(ge){var Se=-1,ke=Array(ge.size);return ge.forEach(function(Ue,ct){ke[++Se]=[ct,Ue]}),ke}function We(ge,Se){return function(ke){return ge(Se(ke))}}function He(ge,Se){for(var ke=-1,Ue=ge.length,ct=0,_t=[];++ke<Ue;){var Zt=ge[ke];(Zt===Se||Zt===l)&&(ge[ke]=l,_t[ct++]=ke)}return _t}function Ke(ge){var Se=-1,ke=Array(ge.size);return ge.forEach(function(Ue){ke[++Se]=Ue}),ke}function Ze(ge){var Se=-1,ke=Array(ge.size);return ge.forEach(function(Ue){ke[++Se]=[Ue,Ue]}),ke}function xt(ge,Se,ke){for(var Ue=ke-1,ct=ge.length;++Ue<ct;)if(ge[Ue]===Se)return Ue;return-1}function Yt(ge,Se,ke){for(var Ue=ke+1;Ue--;)if(ge[Ue]===Se)return Ue;return Ue}function Pt(ge){return pe(ge)?vn(ge):G(ge)}function yt(ge){return pe(ge)?Mn(ge):Y(ge)}function dt(ge){for(var Se=ge.length;Se--&&pr.test(ge.charAt(Se)););return Se}var ot=Ie(Wn);function vn(ge){for(var Se=Dn.lastIndex=0;Dn.test(ge);)++Se;return Se}function Mn(ge){return ge.match(Dn)||[]}function er(ge){return ge.match(ba)||[]}var on=(function ge(Se){Se=Se==null?Dt:un.defaults(Dt.Object(),Se,un.pick(Dt,go));var ke=Se.Array,Ue=Se.Date,ct=Se.Error,_t=Se.Function,Zt=Se.Math,Ft=Se.Object,ui=Se.RegExp,Ar=Se.String,wn=Se.TypeError,Pi=ke.prototype,Sr=_t.prototype,To=Ft.prototype,Mc=Se["__core-js_shared__"],Tc=Sr.toString,sn=To.hasOwnProperty,oT=0,ab=(function(){var o=/[^.]+$/.exec(Mc&&Mc.keys&&Mc.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),Ec=To.toString,sT=Tc.call(Ft),aT=Dt._,lT=ui("^"+Tc.call(sn).replace(Lr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ic=Qi?Se.Buffer:e,Xo=Se.Symbol,Lc=Se.Uint8Array,lb=Ic?Ic.allocUnsafe:e,Oc=We(Ft.getPrototypeOf,Ft),cb=Ft.create,ub=To.propertyIsEnumerable,Nc=Pi.splice,hb=Xo?Xo.isConcatSpreadable:e,ul=Xo?Xo.iterator:e,Os=Xo?Xo.toStringTag:e,Dc=(function(){try{var o=zs(Ft,"defineProperty");return o({},"",{}),o}catch{}})(),cT=Se.clearTimeout!==Dt.clearTimeout&&Se.clearTimeout,uT=Ue&&Ue.now!==Dt.Date.now&&Ue.now,hT=Se.setTimeout!==Dt.setTimeout&&Se.setTimeout,Pc=Zt.ceil,Fc=Zt.floor,kd=Ft.getOwnPropertySymbols,dT=Ic?Ic.isBuffer:e,db=Se.isFinite,fT=Pi.join,pT=We(Ft.keys,Ft),dr=Zt.max,Fr=Zt.min,gT=Ue.now,mT=Se.parseInt,fb=Zt.random,vT=Pi.reverse,_d=zs(Se,"DataView"),hl=zs(Se,"Map"),Ad=zs(Se,"Promise"),xa=zs(Se,"Set"),dl=zs(Se,"WeakMap"),fl=zs(Ft,"create"),zc=dl&&new dl,Ca={},yT=Ws(_d),bT=Ws(hl),wT=Ws(Ad),xT=Ws(xa),CT=Ws(dl),Wc=Xo?Xo.prototype:e,pl=Wc?Wc.valueOf:e,pb=Wc?Wc.toString:e;function ee(o){if(jn(o)&&!Rt(o)&&!(o instanceof Ut)){if(o instanceof Fi)return o;if(sn.call(o,"__wrapped__"))return g0(o)}return new Fi(o)}var ka=(function(){function o(){}return function(v){if(!Pn(v))return{};if(cb)return cb(v);o.prototype=v;var M=new o;return o.prototype=e,M}})();function Bc(){}function Fi(o,v){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!v,this.__index__=0,this.__values__=e}ee.templateSettings={escape:Cn,evaluate:wi,interpolate:ko,variable:"",imports:{_:ee}},ee.prototype=Bc.prototype,ee.prototype.constructor=ee,Fi.prototype=ka(Bc.prototype),Fi.prototype.constructor=Fi;function Ut(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=le,this.__views__=[]}function kT(){var o=new Ut(this.__wrapped__);return o.__actions__=hi(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=hi(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=hi(this.__views__),o}function _T(){if(this.__filtered__){var o=new Ut(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function AT(){var o=this.__wrapped__.value(),v=this.__dir__,M=Rt(o),H=v<0,K=M?o.length:0,te=PE(0,K,this.__views__),he=te.start,fe=te.end,be=fe-he,Ee=H?fe:he-1,Le=this.__iteratees__,Pe=Le.length,Ye=0,it=Fr(be,this.__takeCount__);if(!M||!H&&K==be&&it==be)return Fb(o,this.__actions__);var vt=[];e:for(;be--&&Ye<it;){Ee+=v;for(var Lt=-1,ft=o[Ee];++Lt<Pe;){var Bt=Le[Lt],Gt=Bt.iteratee,Si=Bt.type,Zr=Gt(ft);if(Si==L)ft=Zr;else if(!Zr){if(Si==k)continue e;break e}}vt[Ye++]=ft}return vt}Ut.prototype=ka(Bc.prototype),Ut.prototype.constructor=Ut;function Ns(o){var v=-1,M=o==null?0:o.length;for(this.clear();++v<M;){var H=o[v];this.set(H[0],H[1])}}function ST(){this.__data__=fl?fl(null):{},this.size=0}function $T(o){var v=this.has(o)&&delete this.__data__[o];return this.size-=v?1:0,v}function RT(o){var v=this.__data__;if(fl){var M=v[o];return M===d?e:M}return sn.call(v,o)?v[o]:e}function MT(o){var v=this.__data__;return fl?v[o]!==e:sn.call(v,o)}function TT(o,v){var M=this.__data__;return this.size+=this.has(o)?0:1,M[o]=fl&&v===e?d:v,this}Ns.prototype.clear=ST,Ns.prototype.delete=$T,Ns.prototype.get=RT,Ns.prototype.has=MT,Ns.prototype.set=TT;function Eo(o){var v=-1,M=o==null?0:o.length;for(this.clear();++v<M;){var H=o[v];this.set(H[0],H[1])}}function ET(){this.__data__=[],this.size=0}function IT(o){var v=this.__data__,M=jc(v,o);if(M<0)return!1;var H=v.length-1;return M==H?v.pop():Nc.call(v,M,1),--this.size,!0}function LT(o){var v=this.__data__,M=jc(v,o);return M<0?e:v[M][1]}function OT(o){return jc(this.__data__,o)>-1}function NT(o,v){var M=this.__data__,H=jc(M,o);return H<0?(++this.size,M.push([o,v])):M[H][1]=v,this}Eo.prototype.clear=ET,Eo.prototype.delete=IT,Eo.prototype.get=LT,Eo.prototype.has=OT,Eo.prototype.set=NT;function Io(o){var v=-1,M=o==null?0:o.length;for(this.clear();++v<M;){var H=o[v];this.set(H[0],H[1])}}function DT(){this.size=0,this.__data__={hash:new Ns,map:new(hl||Eo),string:new Ns}}function PT(o){var v=eu(this,o).delete(o);return this.size-=v?1:0,v}function FT(o){return eu(this,o).get(o)}function zT(o){return eu(this,o).has(o)}function WT(o,v){var M=eu(this,o),H=M.size;return M.set(o,v),this.size+=M.size==H?0:1,this}Io.prototype.clear=DT,Io.prototype.delete=PT,Io.prototype.get=FT,Io.prototype.has=zT,Io.prototype.set=WT;function Ds(o){var v=-1,M=o==null?0:o.length;for(this.__data__=new Io;++v<M;)this.add(o[v])}function BT(o){return this.__data__.set(o,d),this}function jT(o){return this.__data__.has(o)}Ds.prototype.add=Ds.prototype.push=BT,Ds.prototype.has=jT;function eo(o){var v=this.__data__=new Eo(o);this.size=v.size}function HT(){this.__data__=new Eo,this.size=0}function UT(o){var v=this.__data__,M=v.delete(o);return this.size=v.size,M}function VT(o){return this.__data__.get(o)}function GT(o){return this.__data__.has(o)}function qT(o,v){var M=this.__data__;if(M instanceof Eo){var H=M.__data__;if(!hl||H.length<m-1)return H.push([o,v]),this.size=++M.size,this;M=this.__data__=new Io(H)}return M.set(o,v),this.size=M.size,this}eo.prototype.clear=HT,eo.prototype.delete=UT,eo.prototype.get=VT,eo.prototype.has=GT,eo.prototype.set=qT;function gb(o,v){var M=Rt(o),H=!M&&Bs(o),K=!M&&!H&&ns(o),te=!M&&!H&&!K&&$a(o),he=M||H||K||te,fe=he?Qe(o.length,Ar):[],be=fe.length;for(var Ee in o)(v||sn.call(o,Ee))&&!(he&&(Ee=="length"||K&&(Ee=="offset"||Ee=="parent")||te&&(Ee=="buffer"||Ee=="byteLength"||Ee=="byteOffset")||No(Ee,be)))&&fe.push(Ee);return fe}function mb(o){var v=o.length;return v?o[Dd(0,v-1)]:e}function KT(o,v){return tu(hi(o),Ps(v,0,o.length))}function YT(o){return tu(hi(o))}function Sd(o,v,M){(M!==e&&!no(o[v],M)||M===e&&!(v in o))&&vo(o,v,M)}function gl(o,v,M){var H=o[v];(!(sn.call(o,v)&&no(H,M))||M===e&&!(v in o))&&vo(o,v,M)}function jc(o,v){for(var M=o.length;M--;)if(no(o[M][0],v))return M;return-1}function JT(o,v,M,H){return Zo(o,function(K,te,he){v(H,K,M(K),he)}),H}function vb(o,v){return o&&bo(v,vr(v),o)}function XT(o,v){return o&&bo(v,fi(v),o)}function vo(o,v,M){v=="__proto__"&&Dc?Dc(o,v,{configurable:!0,enumerable:!0,value:M,writable:!0}):o[v]=M}function $d(o,v){for(var M=-1,H=v.length,K=ke(H),te=o==null;++M<H;)K[M]=te?e:cf(o,v[M]);return K}function Ps(o,v,M){return o===o&&(M!==e&&(o=o<=M?o:M),v!==e&&(o=o>=v?o:v)),o}function zi(o,v,M,H,K,te){var he,fe=v&c,be=v&u,Ee=v&i;if(M&&(he=K?M(o,H,K,te):M(o)),he!==e)return he;if(!Pn(o))return o;var Le=Rt(o);if(Le){if(he=zE(o),!fe)return hi(o,he)}else{var Pe=zr(o),Ye=Pe==rt||Pe==st;if(ns(o))return Bb(o,fe);if(Pe==At||Pe==de||Ye&&!K){if(he=be||Ye?{}:s0(o),!fe)return be?RE(o,XT(he,o)):$E(o,vb(he,o))}else{if(!at[Pe])return K?o:{};he=WE(o,Pe,fe)}}te||(te=new eo);var it=te.get(o);if(it)return it;te.set(o,he),N0(o)?o.forEach(function(ft){he.add(zi(ft,v,M,ft,o,te))}):L0(o)&&o.forEach(function(ft,Bt){he.set(Bt,zi(ft,v,M,Bt,o,te))});var vt=Ee?be?qd:Gd:be?fi:vr,Lt=Le?e:vt(o);return ur(Lt||o,function(ft,Bt){Lt&&(Bt=ft,ft=o[Bt]),gl(he,Bt,zi(ft,v,M,Bt,o,te))}),he}function ZT(o){var v=vr(o);return function(M){return yb(M,o,v)}}function yb(o,v,M){var H=M.length;if(o==null)return!H;for(o=Ft(o);H--;){var K=M[H],te=v[K],he=o[K];if(he===e&&!(K in o)||!te(he))return!1}return!0}function bb(o,v,M){if(typeof o!="function")throw new wn(g);return Cl(function(){o.apply(e,M)},v)}function ml(o,v,M,H){var K=-1,te=ci,he=!0,fe=o.length,be=[],Ee=v.length;if(!fe)return be;M&&(v=S(v,Kt(M))),H?(te=y,he=!1):v.length>=m&&(te=kt,he=!1,v=new Ds(v));e:for(;++K<fe;){var Le=o[K],Pe=M==null?Le:M(Le);if(Le=H||Le!==0?Le:0,he&&Pe===Pe){for(var Ye=Ee;Ye--;)if(v[Ye]===Pe)continue e;be.push(Le)}else te(v,Pe,H)||be.push(Le)}return be}var Zo=Gb(yo),wb=Gb(Md,!0);function QT(o,v){var M=!0;return Zo(o,function(H,K,te){return M=!!v(H,K,te),M}),M}function Hc(o,v,M){for(var H=-1,K=o.length;++H<K;){var te=o[H],he=v(te);if(he!=null&&(fe===e?he===he&&!Ai(he):M(he,fe)))var fe=he,be=te}return be}function eE(o,v,M,H){var K=o.length;for(M=It(M),M<0&&(M=-M>K?0:K+M),H=H===e||H>K?K:It(H),H<0&&(H+=K),H=M>H?0:P0(H);M<H;)o[M++]=v;return o}function xb(o,v){var M=[];return Zo(o,function(H,K,te){v(H,K,te)&&M.push(H)}),M}function $r(o,v,M,H,K){var te=-1,he=o.length;for(M||(M=jE),K||(K=[]);++te<he;){var fe=o[te];v>0&&M(fe)?v>1?$r(fe,v-1,M,H,K):_(K,fe):H||(K[K.length]=fe)}return K}var Rd=qb(),Cb=qb(!0);function yo(o,v){return o&&Rd(o,v,vr)}function Md(o,v){return o&&Cb(o,v,vr)}function Uc(o,v){return _r(v,function(M){return Do(o[M])})}function Fs(o,v){v=es(v,o);for(var M=0,H=v.length;o!=null&&M<H;)o=o[to(v[M++])];return M&&M==H?o:e}function kb(o,v,M){var H=v(o);return Rt(o)?H:_(H,M(o))}function Jr(o){return o==null?o===e?Ge:br:Os&&Os in Ft(o)?DE(o):YE(o)}function Td(o,v){return o>v}function tE(o,v){return o!=null&&sn.call(o,v)}function nE(o,v){return o!=null&&v in Ft(o)}function rE(o,v,M){return o>=Fr(v,M)&&o<dr(v,M)}function Ed(o,v,M){for(var H=M?y:ci,K=o[0].length,te=o.length,he=te,fe=ke(te),be=1/0,Ee=[];he--;){var Le=o[he];he&&v&&(Le=S(Le,Kt(v))),be=Fr(Le.length,be),fe[he]=!M&&(v||K>=120&&Le.length>=120)?new Ds(he&&Le):e}Le=o[0];var Pe=-1,Ye=fe[0];e:for(;++Pe<K&&Ee.length<be;){var it=Le[Pe],vt=v?v(it):it;if(it=M||it!==0?it:0,!(Ye?kt(Ye,vt):H(Ee,vt,M))){for(he=te;--he;){var Lt=fe[he];if(!(Lt?kt(Lt,vt):H(o[he],vt,M)))continue e}Ye&&Ye.push(vt),Ee.push(it)}}return Ee}function iE(o,v,M,H){return yo(o,function(K,te,he){v(H,M(K),te,he)}),H}function vl(o,v,M){v=es(v,o),o=u0(o,v);var H=o==null?o:o[to(Bi(v))];return H==null?e:rn(H,o,M)}function _b(o){return jn(o)&&Jr(o)==de}function oE(o){return jn(o)&&Jr(o)==In}function sE(o){return jn(o)&&Jr(o)==Me}function yl(o,v,M,H,K){return o===v?!0:o==null||v==null||!jn(o)&&!jn(v)?o!==o&&v!==v:aE(o,v,M,H,yl,K)}function aE(o,v,M,H,K,te){var he=Rt(o),fe=Rt(v),be=he?me:zr(o),Ee=fe?me:zr(v);be=be==de?At:be,Ee=Ee==de?At:Ee;var Le=be==At,Pe=Ee==At,Ye=be==Ee;if(Ye&&ns(o)){if(!ns(v))return!1;he=!0,Le=!1}if(Ye&&!Le)return te||(te=new eo),he||$a(o)?r0(o,v,M,H,K,te):OE(o,v,be,M,H,K,te);if(!(M&s)){var it=Le&&sn.call(o,"__wrapped__"),vt=Pe&&sn.call(v,"__wrapped__");if(it||vt){var Lt=it?o.value():o,ft=vt?v.value():v;return te||(te=new eo),K(Lt,ft,M,H,te)}}return Ye?(te||(te=new eo),NE(o,v,M,H,K,te)):!1}function lE(o){return jn(o)&&zr(o)==et}function Id(o,v,M,H){var K=M.length,te=K,he=!H;if(o==null)return!te;for(o=Ft(o);K--;){var fe=M[K];if(he&&fe[2]?fe[1]!==o[fe[0]]:!(fe[0]in o))return!1}for(;++K<te;){fe=M[K];var be=fe[0],Ee=o[be],Le=fe[1];if(he&&fe[2]){if(Ee===e&&!(be in o))return!1}else{var Pe=new eo;if(H)var Ye=H(Ee,Le,be,o,v,Pe);if(!(Ye===e?yl(Le,Ee,s|f,H,Pe):Ye))return!1}}return!0}function Ab(o){if(!Pn(o)||UE(o))return!1;var v=Do(o)?lT:Sn;return v.test(Ws(o))}function cE(o){return jn(o)&&Jr(o)==wr}function uE(o){return jn(o)&&zr(o)==fn}function hE(o){return jn(o)&&au(o.length)&&!!en[Jr(o)]}function Sb(o){return typeof o=="function"?o:o==null?pi:typeof o=="object"?Rt(o)?Mb(o[0],o[1]):Rb(o):Y0(o)}function Ld(o){if(!xl(o))return pT(o);var v=[];for(var M in Ft(o))sn.call(o,M)&&M!="constructor"&&v.push(M);return v}function dE(o){if(!Pn(o))return KE(o);var v=xl(o),M=[];for(var H in o)H=="constructor"&&(v||!sn.call(o,H))||M.push(H);return M}function Od(o,v){return o<v}function $b(o,v){var M=-1,H=di(o)?ke(o.length):[];return Zo(o,function(K,te,he){H[++M]=v(K,te,he)}),H}function Rb(o){var v=Yd(o);return v.length==1&&v[0][2]?l0(v[0][0],v[0][1]):function(M){return M===o||Id(M,o,v)}}function Mb(o,v){return Xd(o)&&a0(v)?l0(to(o),v):function(M){var H=cf(M,o);return H===e&&H===v?uf(M,o):yl(v,H,s|f)}}function Vc(o,v,M,H,K){o!==v&&Rd(v,function(te,he){if(K||(K=new eo),Pn(te))fE(o,v,he,M,Vc,H,K);else{var fe=H?H(Qd(o,he),te,he+"",o,v,K):e;fe===e&&(fe=te),Sd(o,he,fe)}},fi)}function fE(o,v,M,H,K,te,he){var fe=Qd(o,M),be=Qd(v,M),Ee=he.get(be);if(Ee){Sd(o,M,Ee);return}var Le=te?te(fe,be,M+"",o,v,he):e,Pe=Le===e;if(Pe){var Ye=Rt(be),it=!Ye&&ns(be),vt=!Ye&&!it&&$a(be);Le=be,Ye||it||vt?Rt(fe)?Le=fe:Gn(fe)?Le=hi(fe):it?(Pe=!1,Le=Bb(be,!0)):vt?(Pe=!1,Le=jb(be,!0)):Le=[]:kl(be)||Bs(be)?(Le=fe,Bs(fe)?Le=F0(fe):(!Pn(fe)||Do(fe))&&(Le=s0(be))):Pe=!1}Pe&&(he.set(be,Le),K(Le,be,H,te,he),he.delete(be)),Sd(o,M,Le)}function Tb(o,v){var M=o.length;if(M)return v+=v<0?M:0,No(v,M)?o[v]:e}function Eb(o,v,M){v.length?v=S(v,function(te){return Rt(te)?function(he){return Fs(he,te.length===1?te[0]:te)}:te}):v=[pi];var H=-1;v=S(v,Kt(mt()));var K=$b(o,function(te,he,fe){var be=S(v,function(Ee){return Ee(te)});return{criteria:be,index:++H,value:te}});return lt(K,function(te,he){return SE(te,he,M)})}function pE(o,v){return Ib(o,v,function(M,H){return uf(o,H)})}function Ib(o,v,M){for(var H=-1,K=v.length,te={};++H<K;){var he=v[H],fe=Fs(o,he);M(fe,he)&&bl(te,es(he,o),fe)}return te}function gE(o){return function(v){return Fs(v,o)}}function Nd(o,v,M,H){var K=H?Ce:ye,te=-1,he=v.length,fe=o;for(o===v&&(v=hi(v)),M&&(fe=S(o,Kt(M)));++te<he;)for(var be=0,Ee=v[te],Le=M?M(Ee):Ee;(be=K(fe,Le,be,H))>-1;)fe!==o&&Nc.call(fe,be,1),Nc.call(o,be,1);return o}function Lb(o,v){for(var M=o?v.length:0,H=M-1;M--;){var K=v[M];if(M==H||K!==te){var te=K;No(K)?Nc.call(o,K,1):zd(o,K)}}return o}function Dd(o,v){return o+Fc(fb()*(v-o+1))}function mE(o,v,M,H){for(var K=-1,te=dr(Pc((v-o)/(M||1)),0),he=ke(te);te--;)he[H?te:++K]=o,o+=M;return he}function Pd(o,v){var M="";if(!o||v<1||v>q)return M;do v%2&&(M+=o),v=Fc(v/2),v&&(o+=o);while(v);return M}function zt(o,v){return ef(c0(o,v,pi),o+"")}function vE(o){return mb(Ra(o))}function yE(o,v){var M=Ra(o);return tu(M,Ps(v,0,M.length))}function bl(o,v,M,H){if(!Pn(o))return o;v=es(v,o);for(var K=-1,te=v.length,he=te-1,fe=o;fe!=null&&++K<te;){var be=to(v[K]),Ee=M;if(be==="__proto__"||be==="constructor"||be==="prototype")return o;if(K!=he){var Le=fe[be];Ee=H?H(Le,be,fe):e,Ee===e&&(Ee=Pn(Le)?Le:No(v[K+1])?[]:{})}gl(fe,be,Ee),fe=fe[be]}return o}var Ob=zc?function(o,v){return zc.set(o,v),o}:pi,bE=Dc?function(o,v){return Dc(o,"toString",{configurable:!0,enumerable:!1,value:df(v),writable:!0})}:pi;function wE(o){return tu(Ra(o))}function Wi(o,v,M){var H=-1,K=o.length;v<0&&(v=-v>K?0:K+v),M=M>K?K:M,M<0&&(M+=K),K=v>M?0:M-v>>>0,v>>>=0;for(var te=ke(K);++H<K;)te[H]=o[H+v];return te}function xE(o,v){var M;return Zo(o,function(H,K,te){return M=v(H,K,te),!M}),!!M}function Gc(o,v,M){var H=0,K=o==null?H:o.length;if(typeof v=="number"&&v===v&&K<=ce){for(;H<K;){var te=H+K>>>1,he=o[te];he!==null&&!Ai(he)&&(M?he<=v:he<v)?H=te+1:K=te}return K}return Fd(o,v,pi,M)}function Fd(o,v,M,H){var K=0,te=o==null?0:o.length;if(te===0)return 0;v=M(v);for(var he=v!==v,fe=v===null,be=Ai(v),Ee=v===e;K<te;){var Le=Fc((K+te)/2),Pe=M(o[Le]),Ye=Pe!==e,it=Pe===null,vt=Pe===Pe,Lt=Ai(Pe);if(he)var ft=H||vt;else Ee?ft=vt&&(H||Ye):fe?ft=vt&&Ye&&(H||!it):be?ft=vt&&Ye&&!it&&(H||!Lt):it||Lt?ft=!1:ft=H?Pe<=v:Pe<v;ft?K=Le+1:te=Le}return Fr(te,ne)}function Nb(o,v){for(var M=-1,H=o.length,K=0,te=[];++M<H;){var he=o[M],fe=v?v(he):he;if(!M||!no(fe,be)){var be=fe;te[K++]=he===0?0:he}}return te}function Db(o){return typeof o=="number"?o:Ai(o)?Q:+o}function _i(o){if(typeof o=="string")return o;if(Rt(o))return S(o,_i)+"";if(Ai(o))return pb?pb.call(o):"";var v=o+"";return v=="0"&&1/o==-U?"-0":v}function Qo(o,v,M){var H=-1,K=ci,te=o.length,he=!0,fe=[],be=fe;if(M)he=!1,K=y;else if(te>=m){var Ee=v?null:IE(o);if(Ee)return Ke(Ee);he=!1,K=kt,be=new Ds}else be=v?[]:fe;e:for(;++H<te;){var Le=o[H],Pe=v?v(Le):Le;if(Le=M||Le!==0?Le:0,he&&Pe===Pe){for(var Ye=be.length;Ye--;)if(be[Ye]===Pe)continue e;v&&be.push(Pe),fe.push(Le)}else K(be,Pe,M)||(be!==fe&&be.push(Pe),fe.push(Le))}return fe}function zd(o,v){v=es(v,o);var M=-1,H=v.length;if(!H)return!0;for(;++M<H;){var K=to(v[M]);if(K==="__proto__"&&!sn.call(o,"__proto__")||(K==="constructor"||K==="prototype")&&M<H-1)return!1}var te=u0(o,v);return te==null||delete te[to(Bi(v))]}function Pb(o,v,M,H){return bl(o,v,M(Fs(o,v)),H)}function qc(o,v,M,H){for(var K=o.length,te=H?K:-1;(H?te--:++te<K)&&v(o[te],te,o););return M?Wi(o,H?0:te,H?te+1:K):Wi(o,H?te+1:0,H?K:te)}function Fb(o,v){var M=o;return M instanceof Ut&&(M=M.value()),P(v,function(H,K){return K.func.apply(K.thisArg,_([H],K.args))},M)}function Wd(o,v,M){var H=o.length;if(H<2)return H?Qo(o[0]):[];for(var K=-1,te=ke(H);++K<H;)for(var he=o[K],fe=-1;++fe<H;)fe!=K&&(te[K]=ml(te[K]||he,o[fe],v,M));return Qo($r(te,1),v,M)}function zb(o,v,M){for(var H=-1,K=o.length,te=v.length,he={};++H<K;){var fe=H<te?v[H]:e;M(he,o[H],fe)}return he}function Bd(o){return Gn(o)?o:[]}function jd(o){return typeof o=="function"?o:pi}function es(o,v){return Rt(o)?o:Xd(o,v)?[o]:p0(an(o))}var CE=zt;function ts(o,v,M){var H=o.length;return M=M===e?H:M,!v&&M>=H?o:Wi(o,v,M)}var Wb=cT||function(o){return Dt.clearTimeout(o)};function Bb(o,v){if(v)return o.slice();var M=o.length,H=lb?lb(M):new o.constructor(M);return o.copy(H),H}function Hd(o){var v=new o.constructor(o.byteLength);return new Lc(v).set(new Lc(o)),v}function kE(o,v){var M=v?Hd(o.buffer):o.buffer;return new o.constructor(M,o.byteOffset,o.byteLength)}function _E(o){var v=new o.constructor(o.source,Nt.exec(o));return v.lastIndex=o.lastIndex,v}function AE(o){return pl?Ft(pl.call(o)):{}}function jb(o,v){var M=v?Hd(o.buffer):o.buffer;return new o.constructor(M,o.byteOffset,o.length)}function Hb(o,v){if(o!==v){var M=o!==e,H=o===null,K=o===o,te=Ai(o),he=v!==e,fe=v===null,be=v===v,Ee=Ai(v);if(!fe&&!Ee&&!te&&o>v||te&&he&&be&&!fe&&!Ee||H&&he&&be||!M&&be||!K)return 1;if(!H&&!te&&!Ee&&o<v||Ee&&M&&K&&!H&&!te||fe&&M&&K||!he&&K||!be)return-1}return 0}function SE(o,v,M){for(var H=-1,K=o.criteria,te=v.criteria,he=K.length,fe=M.length;++H<he;){var be=Hb(K[H],te[H]);if(be){if(H>=fe)return be;var Ee=M[H];return be*(Ee=="desc"?-1:1)}}return o.index-v.index}function Ub(o,v,M,H){for(var K=-1,te=o.length,he=M.length,fe=-1,be=v.length,Ee=dr(te-he,0),Le=ke(be+Ee),Pe=!H;++fe<be;)Le[fe]=v[fe];for(;++K<he;)(Pe||K<te)&&(Le[M[K]]=o[K]);for(;Ee--;)Le[fe++]=o[K++];return Le}function Vb(o,v,M,H){for(var K=-1,te=o.length,he=-1,fe=M.length,be=-1,Ee=v.length,Le=dr(te-fe,0),Pe=ke(Le+Ee),Ye=!H;++K<Le;)Pe[K]=o[K];for(var it=K;++be<Ee;)Pe[it+be]=v[be];for(;++he<fe;)(Ye||K<te)&&(Pe[it+M[he]]=o[K++]);return Pe}function hi(o,v){var M=-1,H=o.length;for(v||(v=ke(H));++M<H;)v[M]=o[M];return v}function bo(o,v,M,H){var K=!M;M||(M={});for(var te=-1,he=v.length;++te<he;){var fe=v[te],be=H?H(M[fe],o[fe],fe,M,o):e;be===e&&(be=o[fe]),K?vo(M,fe,be):gl(M,fe,be)}return M}function $E(o,v){return bo(o,Jd(o),v)}function RE(o,v){return bo(o,i0(o),v)}function Kc(o,v){return function(M,H){var K=Rt(M)?wa:JT,te=v?v():{};return K(M,o,mt(H,2),te)}}function _a(o){return zt(function(v,M){var H=-1,K=M.length,te=K>1?M[K-1]:e,he=K>2?M[2]:e;for(te=o.length>3&&typeof te=="function"?(K--,te):e,he&&Xr(M[0],M[1],he)&&(te=K<3?e:te,K=1),v=Ft(v);++H<K;){var fe=M[H];fe&&o(v,fe,H,te)}return v})}function Gb(o,v){return function(M,H){if(M==null)return M;if(!di(M))return o(M,H);for(var K=M.length,te=v?K:-1,he=Ft(M);(v?te--:++te<K)&&H(he[te],te,he)!==!1;);return M}}function qb(o){return function(v,M,H){for(var K=-1,te=Ft(v),he=H(v),fe=he.length;fe--;){var be=he[o?fe:++K];if(M(te[be],be,te)===!1)break}return v}}function ME(o,v,M){var H=v&b,K=wl(o);function te(){var he=this&&this!==Dt&&this instanceof te?K:o;return he.apply(H?M:this,arguments)}return te}function Kb(o){return function(v){v=an(v);var M=pe(v)?yt(v):e,H=M?M[0]:v.charAt(0),K=M?ts(M,1).join(""):v.slice(1);return H[o]()+K}}function Aa(o){return function(v){return P(q0(G0(v).replace(Ro,"")),o,"")}}function wl(o){return function(){var v=arguments;switch(v.length){case 0:return new o;case 1:return new o(v[0]);case 2:return new o(v[0],v[1]);case 3:return new o(v[0],v[1],v[2]);case 4:return new o(v[0],v[1],v[2],v[3]);case 5:return new o(v[0],v[1],v[2],v[3],v[4]);case 6:return new o(v[0],v[1],v[2],v[3],v[4],v[5]);case 7:return new o(v[0],v[1],v[2],v[3],v[4],v[5],v[6])}var M=ka(o.prototype),H=o.apply(M,v);return Pn(H)?H:M}}function TE(o,v,M){var H=wl(o);function K(){for(var te=arguments.length,he=ke(te),fe=te,be=Sa(K);fe--;)he[fe]=arguments[fe];var Ee=te<3&&he[0]!==be&&he[te-1]!==be?[]:He(he,be);if(te-=Ee.length,te<M)return Qb(o,v,Yc,K.placeholder,e,he,Ee,e,e,M-te);var Le=this&&this!==Dt&&this instanceof K?H:o;return rn(Le,this,he)}return K}function Yb(o){return function(v,M,H){var K=Ft(v);if(!di(v)){var te=mt(M,3);v=vr(v),M=function(fe){return te(K[fe],fe,K)}}var he=o(v,M,H);return he>-1?K[te?v[he]:he]:e}}function Jb(o){return Oo(function(v){var M=v.length,H=M,K=Fi.prototype.thru;for(o&&v.reverse();H--;){var te=v[H];if(typeof te!="function")throw new wn(g);if(K&&!he&&Qc(te)=="wrapper")var he=new Fi([],!0)}for(H=he?H:M;++H<M;){te=v[H];var fe=Qc(te),be=fe=="wrapper"?Kd(te):e;be&&Zd(be[0])&&be[1]==(D|R|C|E)&&!be[4].length&&be[9]==1?he=he[Qc(be[0])].apply(he,be[3]):he=te.length==1&&Zd(te)?he[fe]():he.thru(te)}return function(){var Ee=arguments,Le=Ee[0];if(he&&Ee.length==1&&Rt(Le))return he.plant(Le).value();for(var Pe=0,Ye=M?v[Pe].apply(this,Ee):Le;++Pe<M;)Ye=v[Pe].call(this,Ye);return Ye}})}function Yc(o,v,M,H,K,te,he,fe,be,Ee){var Le=v&D,Pe=v&b,Ye=v&x,it=v&(R|A),vt=v&T,Lt=Ye?e:wl(o);function ft(){for(var Bt=arguments.length,Gt=ke(Bt),Si=Bt;Si--;)Gt[Si]=arguments[Si];if(it)var Zr=Sa(ft),$i=Rn(Gt,Zr);if(H&&(Gt=Ub(Gt,H,K,it)),te&&(Gt=Vb(Gt,te,he,it)),Bt-=$i,it&&Bt<Ee){var qn=He(Gt,Zr);return Qb(o,v,Yc,ft.placeholder,M,Gt,qn,fe,be,Ee-Bt)}var ro=Pe?M:this,Fo=Ye?ro[o]:o;return Bt=Gt.length,fe?Gt=JE(Gt,fe):vt&&Bt>1&&Gt.reverse(),Le&&be<Bt&&(Gt.length=be),this&&this!==Dt&&this instanceof ft&&(Fo=Lt||wl(Fo)),Fo.apply(ro,Gt)}return ft}function Xb(o,v){return function(M,H){return iE(M,o,v(H),{})}}function Jc(o,v){return function(M,H){var K;if(M===e&&H===e)return v;if(M!==e&&(K=M),H!==e){if(K===e)return H;typeof M=="string"||typeof H=="string"?(M=_i(M),H=_i(H)):(M=Db(M),H=Db(H)),K=o(M,H)}return K}}function Ud(o){return Oo(function(v){return v=S(v,Kt(mt())),zt(function(M){var H=this;return o(v,function(K){return rn(K,H,M)})})})}function Xc(o,v){v=v===e?" ":_i(v);var M=v.length;if(M<2)return M?Pd(v,o):v;var H=Pd(v,Pc(o/Pt(v)));return pe(v)?ts(yt(H),0,o).join(""):H.slice(0,o)}function EE(o,v,M,H){var K=v&b,te=wl(o);function he(){for(var fe=-1,be=arguments.length,Ee=-1,Le=H.length,Pe=ke(Le+be),Ye=this&&this!==Dt&&this instanceof he?te:o;++Ee<Le;)Pe[Ee]=H[Ee];for(;be--;)Pe[Ee++]=arguments[++fe];return rn(Ye,K?M:this,Pe)}return he}function Zb(o){return function(v,M,H){return H&&typeof H!="number"&&Xr(v,M,H)&&(M=H=e),v=Po(v),M===e?(M=v,v=0):M=Po(M),H=H===e?v<M?1:-1:Po(H),mE(v,M,H,o)}}function Zc(o){return function(v,M){return typeof v=="string"&&typeof M=="string"||(v=ji(v),M=ji(M)),o(v,M)}}function Qb(o,v,M,H,K,te,he,fe,be,Ee){var Le=v&R,Pe=Le?he:e,Ye=Le?e:he,it=Le?te:e,vt=Le?e:te;v|=Le?C:O,v&=~(Le?O:C),v&I||(v&=-4);var Lt=[o,v,K,it,Pe,vt,Ye,fe,be,Ee],ft=M.apply(e,Lt);return Zd(o)&&h0(ft,Lt),ft.placeholder=H,d0(ft,o,v)}function Vd(o){var v=Zt[o];return function(M,H){if(M=ji(M),H=H==null?0:Fr(It(H),292),H&&db(M)){var K=(an(M)+"e").split("e"),te=v(K[0]+"e"+(+K[1]+H));return K=(an(te)+"e").split("e"),+(K[0]+"e"+(+K[1]-H))}return v(M)}}var IE=xa&&1/Ke(new xa([,-0]))[1]==U?function(o){return new xa(o)}:gf;function e0(o){return function(v){var M=zr(v);return M==et?Fe(v):M==fn?Ze(v):_n(v,o(v))}}function Lo(o,v,M,H,K,te,he,fe){var be=v&x;if(!be&&typeof o!="function")throw new wn(g);var Ee=H?H.length:0;if(Ee||(v&=-97,H=K=e),he=he===e?he:dr(It(he),0),fe=fe===e?fe:It(fe),Ee-=K?K.length:0,v&O){var Le=H,Pe=K;H=K=e}var Ye=be?e:Kd(o),it=[o,v,M,H,K,Le,Pe,te,he,fe];if(Ye&&qE(it,Ye),o=it[0],v=it[1],M=it[2],H=it[3],K=it[4],fe=it[9]=it[9]===e?be?0:o.length:dr(it[9]-Ee,0),!fe&&v&(R|A)&&(v&=-25),!v||v==b)var vt=ME(o,v,M);else v==R||v==A?vt=TE(o,v,fe):(v==C||v==(b|C))&&!K.length?vt=EE(o,v,M,H):vt=Yc.apply(e,it);var Lt=Ye?Ob:h0;return d0(Lt(vt,it),o,v)}function t0(o,v,M,H){return o===e||no(o,To[M])&&!sn.call(H,M)?v:o}function n0(o,v,M,H,K,te){return Pn(o)&&Pn(v)&&(te.set(v,o),Vc(o,v,e,n0,te),te.delete(v)),o}function LE(o){return kl(o)?e:o}function r0(o,v,M,H,K,te){var he=M&s,fe=o.length,be=v.length;if(fe!=be&&!(he&&be>fe))return!1;var Ee=te.get(o),Le=te.get(v);if(Ee&&Le)return Ee==v&&Le==o;var Pe=-1,Ye=!0,it=M&f?new Ds:e;for(te.set(o,v),te.set(v,o);++Pe<fe;){var vt=o[Pe],Lt=v[Pe];if(H)var ft=he?H(Lt,vt,Pe,v,o,te):H(vt,Lt,Pe,o,v,te);if(ft!==e){if(ft)continue;Ye=!1;break}if(it){if(!j(v,function(Bt,Gt){if(!kt(it,Gt)&&(vt===Bt||K(vt,Bt,M,H,te)))return it.push(Gt)})){Ye=!1;break}}else if(!(vt===Lt||K(vt,Lt,M,H,te))){Ye=!1;break}}return te.delete(o),te.delete(v),Ye}function OE(o,v,M,H,K,te,he){switch(M){case Un:if(o.byteLength!=v.byteLength||o.byteOffset!=v.byteOffset)return!1;o=o.buffer,v=v.buffer;case In:return!(o.byteLength!=v.byteLength||!te(new Lc(o),new Lc(v)));case Re:case Me:case Wt:return no(+o,+v);case qe:return o.name==v.name&&o.message==v.message;case wr:case or:return o==v+"";case et:var fe=Fe;case fn:var be=H&s;if(fe||(fe=Ke),o.size!=v.size&&!be)return!1;var Ee=he.get(o);if(Ee)return Ee==v;H|=f,he.set(o,v);var Le=r0(fe(o),fe(v),H,K,te,he);return he.delete(o),Le;case ht:if(pl)return pl.call(o)==pl.call(v)}return!1}function NE(o,v,M,H,K,te){var he=M&s,fe=Gd(o),be=fe.length,Ee=Gd(v),Le=Ee.length;if(be!=Le&&!he)return!1;for(var Pe=be;Pe--;){var Ye=fe[Pe];if(!(he?Ye in v:sn.call(v,Ye)))return!1}var it=te.get(o),vt=te.get(v);if(it&&vt)return it==v&&vt==o;var Lt=!0;te.set(o,v),te.set(v,o);for(var ft=he;++Pe<be;){Ye=fe[Pe];var Bt=o[Ye],Gt=v[Ye];if(H)var Si=he?H(Gt,Bt,Ye,v,o,te):H(Bt,Gt,Ye,o,v,te);if(!(Si===e?Bt===Gt||K(Bt,Gt,M,H,te):Si)){Lt=!1;break}ft||(ft=Ye=="constructor")}if(Lt&&!ft){var Zr=o.constructor,$i=v.constructor;Zr!=$i&&"constructor"in o&&"constructor"in v&&!(typeof Zr=="function"&&Zr instanceof Zr&&typeof $i=="function"&&$i instanceof $i)&&(Lt=!1)}return te.delete(o),te.delete(v),Lt}function Oo(o){return ef(c0(o,e,y0),o+"")}function Gd(o){return kb(o,vr,Jd)}function qd(o){return kb(o,fi,i0)}var Kd=zc?function(o){return zc.get(o)}:gf;function Qc(o){for(var v=o.name+"",M=Ca[v],H=sn.call(Ca,v)?M.length:0;H--;){var K=M[H],te=K.func;if(te==null||te==o)return K.name}return v}function Sa(o){var v=sn.call(ee,"placeholder")?ee:o;return v.placeholder}function mt(){var o=ee.iteratee||ff;return o=o===ff?Sb:o,arguments.length?o(arguments[0],arguments[1]):o}function eu(o,v){var M=o.__data__;return HE(v)?M[typeof v=="string"?"string":"hash"]:M.map}function Yd(o){for(var v=vr(o),M=v.length;M--;){var H=v[M],K=o[H];v[M]=[H,K,a0(K)]}return v}function zs(o,v){var M=se(o,v);return Ab(M)?M:e}function DE(o){var v=sn.call(o,Os),M=o[Os];try{o[Os]=e;var H=!0}catch{}var K=Ec.call(o);return H&&(v?o[Os]=M:delete o[Os]),K}var Jd=kd?function(o){return o==null?[]:(o=Ft(o),_r(kd(o),function(v){return ub.call(o,v)}))}:mf,i0=kd?function(o){for(var v=[];o;)_(v,Jd(o)),o=Oc(o);return v}:mf,zr=Jr;(_d&&zr(new _d(new ArrayBuffer(1)))!=Un||hl&&zr(new hl)!=et||Ad&&zr(Ad.resolve())!=ir||xa&&zr(new xa)!=fn||dl&&zr(new dl)!=$t)&&(zr=function(o){var v=Jr(o),M=v==At?o.constructor:e,H=M?Ws(M):"";if(H)switch(H){case yT:return Un;case bT:return et;case wT:return ir;case xT:return fn;case CT:return $t}return v});function PE(o,v,M){for(var H=-1,K=M.length;++H<K;){var te=M[H],he=te.size;switch(te.type){case"drop":o+=he;break;case"dropRight":v-=he;break;case"take":v=Fr(v,o+he);break;case"takeRight":o=dr(o,v-he);break}}return{start:o,end:v}}function FE(o){var v=o.match(ao);return v?v[1].split(lo):[]}function o0(o,v,M){v=es(v,o);for(var H=-1,K=v.length,te=!1;++H<K;){var he=to(v[H]);if(!(te=o!=null&&M(o,he)))break;o=o[he]}return te||++H!=K?te:(K=o==null?0:o.length,!!K&&au(K)&&No(he,K)&&(Rt(o)||Bs(o)))}function zE(o){var v=o.length,M=new o.constructor(v);return v&&typeof o[0]=="string"&&sn.call(o,"index")&&(M.index=o.index,M.input=o.input),M}function s0(o){return typeof o.constructor=="function"&&!xl(o)?ka(Oc(o)):{}}function WE(o,v,M){var H=o.constructor;switch(v){case In:return Hd(o);case Re:case Me:return new H(+o);case Un:return kE(o,M);case sr:case pn:case zn:case Ln:case qt:case nn:case Ir:case Vr:case xr:return jb(o,M);case et:return new H;case Wt:case or:return new H(o);case wr:return _E(o);case fn:return new H;case ht:return AE(o)}}function BE(o,v){var M=v.length;if(!M)return o;var H=M-1;return v[H]=(M>1?"& ":"")+v[H],v=v.join(M>2?", ":" "),o.replace(ai,`{
1460
+ /* [wrapped with `+v+`] */
1461
+ `)}function jE(o){return Rt(o)||Bs(o)||!!(hb&&o&&o[hb])}function No(o,v){var M=typeof o;return v=v??q,!!v&&(M=="number"||M!="symbol"&&Ne.test(o))&&o>-1&&o%1==0&&o<v}function Xr(o,v,M){if(!Pn(M))return!1;var H=typeof v;return(H=="number"?di(M)&&No(v,M.length):H=="string"&&v in M)?no(M[v],o):!1}function Xd(o,v){if(Rt(o))return!1;var M=typeof o;return M=="number"||M=="symbol"||M=="boolean"||o==null||Ai(o)?!0:kn.test(o)||!si.test(o)||v!=null&&o in Ft(v)}function HE(o){var v=typeof o;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?o!=="__proto__":o===null}function Zd(o){var v=Qc(o),M=ee[v];if(typeof M!="function"||!(v in Ut.prototype))return!1;if(o===M)return!0;var H=Kd(M);return!!H&&o===H[0]}function UE(o){return!!ab&&ab in o}var VE=Mc?Do:vf;function xl(o){var v=o&&o.constructor,M=typeof v=="function"&&v.prototype||To;return o===M}function a0(o){return o===o&&!Pn(o)}function l0(o,v){return function(M){return M==null?!1:M[o]===v&&(v!==e||o in Ft(M))}}function GE(o){var v=ou(o,function(H){return M.size===a&&M.clear(),H}),M=v.cache;return v}function qE(o,v){var M=o[1],H=v[1],K=M|H,te=K<(b|x|D),he=H==D&&M==R||H==D&&M==E&&o[7].length<=v[8]||H==(D|E)&&v[7].length<=v[8]&&M==R;if(!(te||he))return o;H&b&&(o[2]=v[2],K|=M&b?0:I);var fe=v[3];if(fe){var be=o[3];o[3]=be?Ub(be,fe,v[4]):fe,o[4]=be?He(o[3],l):v[4]}return fe=v[5],fe&&(be=o[5],o[5]=be?Vb(be,fe,v[6]):fe,o[6]=be?He(o[5],l):v[6]),fe=v[7],fe&&(o[7]=fe),H&D&&(o[8]=o[8]==null?v[8]:Fr(o[8],v[8])),o[9]==null&&(o[9]=v[9]),o[0]=v[0],o[1]=K,o}function KE(o){var v=[];if(o!=null)for(var M in Ft(o))v.push(M);return v}function YE(o){return Ec.call(o)}function c0(o,v,M){return v=dr(v===e?o.length-1:v,0),function(){for(var H=arguments,K=-1,te=dr(H.length-v,0),he=ke(te);++K<te;)he[K]=H[v+K];K=-1;for(var fe=ke(v+1);++K<v;)fe[K]=H[K];return fe[v]=M(he),rn(o,this,fe)}}function u0(o,v){return v.length<2?o:Fs(o,Wi(v,0,-1))}function JE(o,v){for(var M=o.length,H=Fr(v.length,M),K=hi(o);H--;){var te=v[H];o[H]=No(te,M)?K[te]:e}return o}function Qd(o,v){if(!(v==="constructor"&&typeof o[v]=="function")&&v!="__proto__")return o[v]}var h0=f0(Ob),Cl=hT||function(o,v){return Dt.setTimeout(o,v)},ef=f0(bE);function d0(o,v,M){var H=v+"";return ef(o,BE(H,XE(FE(H),M)))}function f0(o){var v=0,M=0;return function(){var H=gT(),K=$-(H-M);if(M=H,K>0){if(++v>=N)return arguments[0]}else v=0;return o.apply(e,arguments)}}function tu(o,v){var M=-1,H=o.length,K=H-1;for(v=v===e?H:v;++M<v;){var te=Dd(M,K),he=o[te];o[te]=o[M],o[M]=he}return o.length=v,o}var p0=GE(function(o){var v=[];return o.charCodeAt(0)===46&&v.push(""),o.replace(Cr,function(M,H,K,te){v.push(K?te.replace(li,"$1"):H||M)}),v});function to(o){if(typeof o=="string"||Ai(o))return o;var v=o+"";return v=="0"&&1/o==-U?"-0":v}function Ws(o){if(o!=null){try{return Tc.call(o)}catch{}try{return o+""}catch{}}return""}function XE(o,v){return ur(ae,function(M){var H="_."+M[0];v&M[1]&&!ci(o,H)&&o.push(H)}),o.sort()}function g0(o){if(o instanceof Ut)return o.clone();var v=new Fi(o.__wrapped__,o.__chain__);return v.__actions__=hi(o.__actions__),v.__index__=o.__index__,v.__values__=o.__values__,v}function ZE(o,v,M){(M?Xr(o,v,M):v===e)?v=1:v=dr(It(v),0);var H=o==null?0:o.length;if(!H||v<1)return[];for(var K=0,te=0,he=ke(Pc(H/v));K<H;)he[te++]=Wi(o,K,K+=v);return he}function QE(o){for(var v=-1,M=o==null?0:o.length,H=0,K=[];++v<M;){var te=o[v];te&&(K[H++]=te)}return K}function eI(){var o=arguments.length;if(!o)return[];for(var v=ke(o-1),M=arguments[0],H=o;H--;)v[H-1]=arguments[H];return _(Rt(M)?hi(M):[M],$r(v,1))}var tI=zt(function(o,v){return Gn(o)?ml(o,$r(v,1,Gn,!0)):[]}),nI=zt(function(o,v){var M=Bi(v);return Gn(M)&&(M=e),Gn(o)?ml(o,$r(v,1,Gn,!0),mt(M,2)):[]}),rI=zt(function(o,v){var M=Bi(v);return Gn(M)&&(M=e),Gn(o)?ml(o,$r(v,1,Gn,!0),e,M):[]});function iI(o,v,M){var H=o==null?0:o.length;return H?(v=M||v===e?1:It(v),Wi(o,v<0?0:v,H)):[]}function oI(o,v,M){var H=o==null?0:o.length;return H?(v=M||v===e?1:It(v),v=H-v,Wi(o,0,v<0?0:v)):[]}function sI(o,v){return o&&o.length?qc(o,mt(v,3),!0,!0):[]}function aI(o,v){return o&&o.length?qc(o,mt(v,3),!0):[]}function lI(o,v,M,H){var K=o==null?0:o.length;return K?(M&&typeof M!="number"&&Xr(o,v,M)&&(M=0,H=K),eE(o,v,M,H)):[]}function m0(o,v,M){var H=o==null?0:o.length;if(!H)return-1;var K=M==null?0:It(M);return K<0&&(K=dr(H+K,0)),ue(o,mt(v,3),K)}function v0(o,v,M){var H=o==null?0:o.length;if(!H)return-1;var K=H-1;return M!==e&&(K=It(M),K=M<0?dr(H+K,0):Fr(K,H-1)),ue(o,mt(v,3),K,!0)}function y0(o){var v=o==null?0:o.length;return v?$r(o,1):[]}function cI(o){var v=o==null?0:o.length;return v?$r(o,U):[]}function uI(o,v){var M=o==null?0:o.length;return M?(v=v===e?1:It(v),$r(o,v)):[]}function hI(o){for(var v=-1,M=o==null?0:o.length,H={};++v<M;){var K=o[v];vo(H,K[0],K[1])}return H}function b0(o){return o&&o.length?o[0]:e}function dI(o,v,M){var H=o==null?0:o.length;if(!H)return-1;var K=M==null?0:It(M);return K<0&&(K=dr(H+K,0)),ye(o,v,K)}function fI(o){var v=o==null?0:o.length;return v?Wi(o,0,-1):[]}var pI=zt(function(o){var v=S(o,Bd);return v.length&&v[0]===o[0]?Ed(v):[]}),gI=zt(function(o){var v=Bi(o),M=S(o,Bd);return v===Bi(M)?v=e:M.pop(),M.length&&M[0]===o[0]?Ed(M,mt(v,2)):[]}),mI=zt(function(o){var v=Bi(o),M=S(o,Bd);return v=typeof v=="function"?v:e,v&&M.pop(),M.length&&M[0]===o[0]?Ed(M,e,v):[]});function vI(o,v){return o==null?"":fT.call(o,v)}function Bi(o){var v=o==null?0:o.length;return v?o[v-1]:e}function yI(o,v,M){var H=o==null?0:o.length;if(!H)return-1;var K=H;return M!==e&&(K=It(M),K=K<0?dr(H+K,0):Fr(K,H-1)),v===v?Yt(o,v,K):ue(o,ve,K,!0)}function bI(o,v){return o&&o.length?Tb(o,It(v)):e}var wI=zt(w0);function w0(o,v){return o&&o.length&&v&&v.length?Nd(o,v):o}function xI(o,v,M){return o&&o.length&&v&&v.length?Nd(o,v,mt(M,2)):o}function CI(o,v,M){return o&&o.length&&v&&v.length?Nd(o,v,e,M):o}var kI=Oo(function(o,v){var M=o==null?0:o.length,H=$d(o,v);return Lb(o,S(v,function(K){return No(K,M)?+K:K}).sort(Hb)),H});function _I(o,v){var M=[];if(!(o&&o.length))return M;var H=-1,K=[],te=o.length;for(v=mt(v,3);++H<te;){var he=o[H];v(he,H,o)&&(M.push(he),K.push(H))}return Lb(o,K),M}function tf(o){return o==null?o:vT.call(o)}function AI(o,v,M){var H=o==null?0:o.length;return H?(M&&typeof M!="number"&&Xr(o,v,M)?(v=0,M=H):(v=v==null?0:It(v),M=M===e?H:It(M)),Wi(o,v,M)):[]}function SI(o,v){return Gc(o,v)}function $I(o,v,M){return Fd(o,v,mt(M,2))}function RI(o,v){var M=o==null?0:o.length;if(M){var H=Gc(o,v);if(H<M&&no(o[H],v))return H}return-1}function MI(o,v){return Gc(o,v,!0)}function TI(o,v,M){return Fd(o,v,mt(M,2),!0)}function EI(o,v){var M=o==null?0:o.length;if(M){var H=Gc(o,v,!0)-1;if(no(o[H],v))return H}return-1}function II(o){return o&&o.length?Nb(o):[]}function LI(o,v){return o&&o.length?Nb(o,mt(v,2)):[]}function OI(o){var v=o==null?0:o.length;return v?Wi(o,1,v):[]}function NI(o,v,M){return o&&o.length?(v=M||v===e?1:It(v),Wi(o,0,v<0?0:v)):[]}function DI(o,v,M){var H=o==null?0:o.length;return H?(v=M||v===e?1:It(v),v=H-v,Wi(o,v<0?0:v,H)):[]}function PI(o,v){return o&&o.length?qc(o,mt(v,3),!1,!0):[]}function FI(o,v){return o&&o.length?qc(o,mt(v,3)):[]}var zI=zt(function(o){return Qo($r(o,1,Gn,!0))}),WI=zt(function(o){var v=Bi(o);return Gn(v)&&(v=e),Qo($r(o,1,Gn,!0),mt(v,2))}),BI=zt(function(o){var v=Bi(o);return v=typeof v=="function"?v:e,Qo($r(o,1,Gn,!0),e,v)});function jI(o){return o&&o.length?Qo(o):[]}function HI(o,v){return o&&o.length?Qo(o,mt(v,2)):[]}function UI(o,v){return v=typeof v=="function"?v:e,o&&o.length?Qo(o,e,v):[]}function nf(o){if(!(o&&o.length))return[];var v=0;return o=_r(o,function(M){if(Gn(M))return v=dr(M.length,v),!0}),Qe(v,function(M){return S(o,Oe(M))})}function x0(o,v){if(!(o&&o.length))return[];var M=nf(o);return v==null?M:S(M,function(H){return rn(v,e,H)})}var VI=zt(function(o,v){return Gn(o)?ml(o,v):[]}),GI=zt(function(o){return Wd(_r(o,Gn))}),qI=zt(function(o){var v=Bi(o);return Gn(v)&&(v=e),Wd(_r(o,Gn),mt(v,2))}),KI=zt(function(o){var v=Bi(o);return v=typeof v=="function"?v:e,Wd(_r(o,Gn),e,v)}),YI=zt(nf);function JI(o,v){return zb(o||[],v||[],gl)}function XI(o,v){return zb(o||[],v||[],bl)}var ZI=zt(function(o){var v=o.length,M=v>1?o[v-1]:e;return M=typeof M=="function"?(o.pop(),M):e,x0(o,M)});function C0(o){var v=ee(o);return v.__chain__=!0,v}function QI(o,v){return v(o),o}function nu(o,v){return v(o)}var eL=Oo(function(o){var v=o.length,M=v?o[0]:0,H=this.__wrapped__,K=function(te){return $d(te,o)};return v>1||this.__actions__.length||!(H instanceof Ut)||!No(M)?this.thru(K):(H=H.slice(M,+M+(v?1:0)),H.__actions__.push({func:nu,args:[K],thisArg:e}),new Fi(H,this.__chain__).thru(function(te){return v&&!te.length&&te.push(e),te}))});function tL(){return C0(this)}function nL(){return new Fi(this.value(),this.__chain__)}function rL(){this.__values__===e&&(this.__values__=D0(this.value()));var o=this.__index__>=this.__values__.length,v=o?e:this.__values__[this.__index__++];return{done:o,value:v}}function iL(){return this}function oL(o){for(var v,M=this;M instanceof Bc;){var H=g0(M);H.__index__=0,H.__values__=e,v?K.__wrapped__=H:v=H;var K=H;M=M.__wrapped__}return K.__wrapped__=o,v}function sL(){var o=this.__wrapped__;if(o instanceof Ut){var v=o;return this.__actions__.length&&(v=new Ut(this)),v=v.reverse(),v.__actions__.push({func:nu,args:[tf],thisArg:e}),new Fi(v,this.__chain__)}return this.thru(tf)}function aL(){return Fb(this.__wrapped__,this.__actions__)}var lL=Kc(function(o,v,M){sn.call(o,M)?++o[M]:vo(o,M,1)});function cL(o,v,M){var H=Rt(o)?mo:QT;return M&&Xr(o,v,M)&&(v=e),H(o,mt(v,3))}function uL(o,v){var M=Rt(o)?_r:xb;return M(o,mt(v,3))}var hL=Yb(m0),dL=Yb(v0);function fL(o,v){return $r(ru(o,v),1)}function pL(o,v){return $r(ru(o,v),U)}function gL(o,v,M){return M=M===e?1:It(M),$r(ru(o,v),M)}function k0(o,v){var M=Rt(o)?ur:Zo;return M(o,mt(v,3))}function _0(o,v){var M=Rt(o)?Pr:wb;return M(o,mt(v,3))}var mL=Kc(function(o,v,M){sn.call(o,M)?o[M].push(v):vo(o,M,[v])});function vL(o,v,M,H){o=di(o)?o:Ra(o),M=M&&!H?It(M):0;var K=o.length;return M<0&&(M=dr(K+M,0)),lu(o)?M<=K&&o.indexOf(v,M)>-1:!!K&&ye(o,v,M)>-1}var yL=zt(function(o,v,M){var H=-1,K=typeof v=="function",te=di(o)?ke(o.length):[];return Zo(o,function(he){te[++H]=K?rn(v,he,M):vl(he,v,M)}),te}),bL=Kc(function(o,v,M){vo(o,M,v)});function ru(o,v){var M=Rt(o)?S:$b;return M(o,mt(v,3))}function wL(o,v,M,H){return o==null?[]:(Rt(v)||(v=v==null?[]:[v]),M=H?e:M,Rt(M)||(M=M==null?[]:[M]),Eb(o,v,M))}var xL=Kc(function(o,v,M){o[M?0:1].push(v)},function(){return[[],[]]});function CL(o,v,M){var H=Rt(o)?P:Ve,K=arguments.length<3;return H(o,mt(v,4),M,K,Zo)}function kL(o,v,M){var H=Rt(o)?z:Ve,K=arguments.length<3;return H(o,mt(v,4),M,K,wb)}function _L(o,v){var M=Rt(o)?_r:xb;return M(o,su(mt(v,3)))}function AL(o){var v=Rt(o)?mb:vE;return v(o)}function SL(o,v,M){(M?Xr(o,v,M):v===e)?v=1:v=It(v);var H=Rt(o)?KT:yE;return H(o,v)}function $L(o){var v=Rt(o)?YT:wE;return v(o)}function RL(o){if(o==null)return 0;if(di(o))return lu(o)?Pt(o):o.length;var v=zr(o);return v==et||v==fn?o.size:Ld(o).length}function ML(o,v,M){var H=Rt(o)?j:xE;return M&&Xr(o,v,M)&&(v=e),H(o,mt(v,3))}var TL=zt(function(o,v){if(o==null)return[];var M=v.length;return M>1&&Xr(o,v[0],v[1])?v=[]:M>2&&Xr(v[0],v[1],v[2])&&(v=[v[0]]),Eb(o,$r(v,1),[])}),iu=uT||function(){return Dt.Date.now()};function EL(o,v){if(typeof v!="function")throw new wn(g);return o=It(o),function(){if(--o<1)return v.apply(this,arguments)}}function A0(o,v,M){return v=M?e:v,v=o&&v==null?o.length:v,Lo(o,D,e,e,e,e,v)}function S0(o,v){var M;if(typeof v!="function")throw new wn(g);return o=It(o),function(){return--o>0&&(M=v.apply(this,arguments)),o<=1&&(v=e),M}}var rf=zt(function(o,v,M){var H=b;if(M.length){var K=He(M,Sa(rf));H|=C}return Lo(o,H,v,M,K)}),$0=zt(function(o,v,M){var H=b|x;if(M.length){var K=He(M,Sa($0));H|=C}return Lo(v,H,o,M,K)});function R0(o,v,M){v=M?e:v;var H=Lo(o,R,e,e,e,e,e,v);return H.placeholder=R0.placeholder,H}function M0(o,v,M){v=M?e:v;var H=Lo(o,A,e,e,e,e,e,v);return H.placeholder=M0.placeholder,H}function T0(o,v,M){var H,K,te,he,fe,be,Ee=0,Le=!1,Pe=!1,Ye=!0;if(typeof o!="function")throw new wn(g);v=ji(v)||0,Pn(M)&&(Le=!!M.leading,Pe="maxWait"in M,te=Pe?dr(ji(M.maxWait)||0,v):te,Ye="trailing"in M?!!M.trailing:Ye);function it(qn){var ro=H,Fo=K;return H=K=e,Ee=qn,he=o.apply(Fo,ro),he}function vt(qn){return Ee=qn,fe=Cl(Bt,v),Le?it(qn):he}function Lt(qn){var ro=qn-be,Fo=qn-Ee,J0=v-ro;return Pe?Fr(J0,te-Fo):J0}function ft(qn){var ro=qn-be,Fo=qn-Ee;return be===e||ro>=v||ro<0||Pe&&Fo>=te}function Bt(){var qn=iu();if(ft(qn))return Gt(qn);fe=Cl(Bt,Lt(qn))}function Gt(qn){return fe=e,Ye&&H?it(qn):(H=K=e,he)}function Si(){fe!==e&&Wb(fe),Ee=0,H=be=K=fe=e}function Zr(){return fe===e?he:Gt(iu())}function $i(){var qn=iu(),ro=ft(qn);if(H=arguments,K=this,be=qn,ro){if(fe===e)return vt(be);if(Pe)return Wb(fe),fe=Cl(Bt,v),it(be)}return fe===e&&(fe=Cl(Bt,v)),he}return $i.cancel=Si,$i.flush=Zr,$i}var IL=zt(function(o,v){return bb(o,1,v)}),LL=zt(function(o,v,M){return bb(o,ji(v)||0,M)});function OL(o){return Lo(o,T)}function ou(o,v){if(typeof o!="function"||v!=null&&typeof v!="function")throw new wn(g);var M=function(){var H=arguments,K=v?v.apply(this,H):H[0],te=M.cache;if(te.has(K))return te.get(K);var he=o.apply(this,H);return M.cache=te.set(K,he)||te,he};return M.cache=new(ou.Cache||Io),M}ou.Cache=Io;function su(o){if(typeof o!="function")throw new wn(g);return function(){var v=arguments;switch(v.length){case 0:return!o.call(this);case 1:return!o.call(this,v[0]);case 2:return!o.call(this,v[0],v[1]);case 3:return!o.call(this,v[0],v[1],v[2])}return!o.apply(this,v)}}function NL(o){return S0(2,o)}var DL=CE(function(o,v){v=v.length==1&&Rt(v[0])?S(v[0],Kt(mt())):S($r(v,1),Kt(mt()));var M=v.length;return zt(function(H){for(var K=-1,te=Fr(H.length,M);++K<te;)H[K]=v[K].call(this,H[K]);return rn(o,this,H)})}),of=zt(function(o,v){var M=He(v,Sa(of));return Lo(o,C,e,v,M)}),E0=zt(function(o,v){var M=He(v,Sa(E0));return Lo(o,O,e,v,M)}),PL=Oo(function(o,v){return Lo(o,E,e,e,e,v)});function FL(o,v){if(typeof o!="function")throw new wn(g);return v=v===e?v:It(v),zt(o,v)}function zL(o,v){if(typeof o!="function")throw new wn(g);return v=v==null?0:dr(It(v),0),zt(function(M){var H=M[v],K=ts(M,0,v);return H&&_(K,H),rn(o,this,K)})}function WL(o,v,M){var H=!0,K=!0;if(typeof o!="function")throw new wn(g);return Pn(M)&&(H="leading"in M?!!M.leading:H,K="trailing"in M?!!M.trailing:K),T0(o,v,{leading:H,maxWait:v,trailing:K})}function BL(o){return A0(o,1)}function jL(o,v){return of(jd(v),o)}function HL(){if(!arguments.length)return[];var o=arguments[0];return Rt(o)?o:[o]}function UL(o){return zi(o,i)}function VL(o,v){return v=typeof v=="function"?v:e,zi(o,i,v)}function GL(o){return zi(o,c|i)}function qL(o,v){return v=typeof v=="function"?v:e,zi(o,c|i,v)}function KL(o,v){return v==null||yb(o,v,vr(v))}function no(o,v){return o===v||o!==o&&v!==v}var YL=Zc(Td),JL=Zc(function(o,v){return o>=v}),Bs=_b((function(){return arguments})())?_b:function(o){return jn(o)&&sn.call(o,"callee")&&!ub.call(o,"callee")},Rt=ke.isArray,XL=Jo?Kt(Jo):oE;function di(o){return o!=null&&au(o.length)&&!Do(o)}function Gn(o){return jn(o)&&di(o)}function ZL(o){return o===!0||o===!1||jn(o)&&Jr(o)==Re}var ns=dT||vf,QL=Bn?Kt(Bn):sE;function eO(o){return jn(o)&&o.nodeType===1&&!kl(o)}function tO(o){if(o==null)return!0;if(di(o)&&(Rt(o)||typeof o=="string"||typeof o.splice=="function"||ns(o)||$a(o)||Bs(o)))return!o.length;var v=zr(o);if(v==et||v==fn)return!o.size;if(xl(o))return!Ld(o).length;for(var M in o)if(sn.call(o,M))return!1;return!0}function nO(o,v){return yl(o,v)}function rO(o,v,M){M=typeof M=="function"?M:e;var H=M?M(o,v):e;return H===e?yl(o,v,e,M):!!H}function sf(o){if(!jn(o))return!1;var v=Jr(o);return v==qe||v==Xe||typeof o.message=="string"&&typeof o.name=="string"&&!kl(o)}function iO(o){return typeof o=="number"&&db(o)}function Do(o){if(!Pn(o))return!1;var v=Jr(o);return v==rt||v==st||v==$e||v==An}function I0(o){return typeof o=="number"&&o==It(o)}function au(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=q}function Pn(o){var v=typeof o;return o!=null&&(v=="object"||v=="function")}function jn(o){return o!=null&&typeof o=="object"}var L0=Ci?Kt(Ci):lE;function oO(o,v){return o===v||Id(o,v,Yd(v))}function sO(o,v,M){return M=typeof M=="function"?M:e,Id(o,v,Yd(v),M)}function aO(o){return O0(o)&&o!=+o}function lO(o){if(VE(o))throw new ct(p);return Ab(o)}function cO(o){return o===null}function uO(o){return o==null}function O0(o){return typeof o=="number"||jn(o)&&Jr(o)==Wt}function kl(o){if(!jn(o)||Jr(o)!=At)return!1;var v=Oc(o);if(v===null)return!0;var M=sn.call(v,"constructor")&&v.constructor;return typeof M=="function"&&M instanceof M&&Tc.call(M)==sT}var af=ki?Kt(ki):cE;function hO(o){return I0(o)&&o>=-q&&o<=q}var N0=Di?Kt(Di):uE;function lu(o){return typeof o=="string"||!Rt(o)&&jn(o)&&Jr(o)==or}function Ai(o){return typeof o=="symbol"||jn(o)&&Jr(o)==ht}var $a=Ls?Kt(Ls):hE;function dO(o){return o===e}function fO(o){return jn(o)&&zr(o)==$t}function pO(o){return jn(o)&&Jr(o)==Xt}var gO=Zc(Od),mO=Zc(function(o,v){return o<=v});function D0(o){if(!o)return[];if(di(o))return lu(o)?yt(o):hi(o);if(ul&&o[ul])return Te(o[ul]());var v=zr(o),M=v==et?Fe:v==fn?Ke:Ra;return M(o)}function Po(o){if(!o)return o===0?o:0;if(o=ji(o),o===U||o===-U){var v=o<0?-1:1;return v*Z}return o===o?o:0}function It(o){var v=Po(o),M=v%1;return v===v?M?v-M:v:0}function P0(o){return o?Ps(It(o),0,le):0}function ji(o){if(typeof o=="number")return o;if(Ai(o))return Q;if(Pn(o)){var v=typeof o.valueOf=="function"?o.valueOf():o;o=Pn(v)?v+"":v}if(typeof o!="string")return o===0?o:+o;o=Ct(o);var M=ar.test(o);return M||oe.test(o)?wt(o.slice(2),M?2:8):Ao.test(o)?Q:+o}function F0(o){return bo(o,fi(o))}function vO(o){return o?Ps(It(o),-q,q):o===0?o:0}function an(o){return o==null?"":_i(o)}var yO=_a(function(o,v){if(xl(v)||di(v)){bo(v,vr(v),o);return}for(var M in v)sn.call(v,M)&&gl(o,M,v[M])}),z0=_a(function(o,v){bo(v,fi(v),o)}),W0=_a(function(o,v,M,H){bo(v,fi(v),o,H)}),lf=_a(function(o,v,M,H){bo(v,vr(v),o,H)}),bO=Oo($d);function wO(o,v){var M=ka(o);return v==null?M:vb(M,v)}var xO=zt(function(o,v){o=Ft(o);var M=-1,H=v.length,K=H>2?v[2]:e;for(K&&Xr(v[0],v[1],K)&&(H=1);++M<H;)for(var te=v[M],he=fi(te),fe=-1,be=he.length;++fe<be;){var Ee=he[fe],Le=o[Ee];(Le===e||no(Le,To[Ee])&&!sn.call(o,Ee))&&(o[Ee]=te[Ee])}return o}),CO=zt(function(o){return o.push(e,n0),rn(B0,e,o)});function kO(o,v){return re(o,mt(v,3),yo)}function _O(o,v){return re(o,mt(v,3),Md)}function AO(o,v){return o==null?o:Rd(o,mt(v,3),fi)}function SO(o,v){return o==null?o:Cb(o,mt(v,3),fi)}function $O(o,v){return o&&yo(o,mt(v,3))}function RO(o,v){return o&&Md(o,mt(v,3))}function MO(o){return o==null?[]:Uc(o,vr(o))}function TO(o){return o==null?[]:Uc(o,fi(o))}function cf(o,v,M){var H=o==null?e:Fs(o,v);return H===e?M:H}function EO(o,v){return o!=null&&o0(o,v,tE)}function uf(o,v){return o!=null&&o0(o,v,nE)}var IO=Xb(function(o,v,M){v!=null&&typeof v.toString!="function"&&(v=Ec.call(v)),o[v]=M},df(pi)),LO=Xb(function(o,v,M){v!=null&&typeof v.toString!="function"&&(v=Ec.call(v)),sn.call(o,v)?o[v].push(M):o[v]=[M]},mt),OO=zt(vl);function vr(o){return di(o)?gb(o):Ld(o)}function fi(o){return di(o)?gb(o,!0):dE(o)}function NO(o,v){var M={};return v=mt(v,3),yo(o,function(H,K,te){vo(M,v(H,K,te),H)}),M}function DO(o,v){var M={};return v=mt(v,3),yo(o,function(H,K,te){vo(M,K,v(H,K,te))}),M}var PO=_a(function(o,v,M){Vc(o,v,M)}),B0=_a(function(o,v,M,H){Vc(o,v,M,H)}),FO=Oo(function(o,v){var M={};if(o==null)return M;var H=!1;v=S(v,function(te){return te=es(te,o),H||(H=te.length>1),te}),bo(o,qd(o),M),H&&(M=zi(M,c|u|i,LE));for(var K=v.length;K--;)zd(M,v[K]);return M});function zO(o,v){return j0(o,su(mt(v)))}var WO=Oo(function(o,v){return o==null?{}:pE(o,v)});function j0(o,v){if(o==null)return{};var M=S(qd(o),function(H){return[H]});return v=mt(v),Ib(o,M,function(H,K){return v(H,K[0])})}function BO(o,v,M){v=es(v,o);var H=-1,K=v.length;for(K||(K=1,o=e);++H<K;){var te=o==null?e:o[to(v[H])];te===e&&(H=K,te=M),o=Do(te)?te.call(o):te}return o}function jO(o,v,M){return o==null?o:bl(o,v,M)}function HO(o,v,M,H){return H=typeof H=="function"?H:e,o==null?o:bl(o,v,M,H)}var H0=e0(vr),U0=e0(fi);function UO(o,v,M){var H=Rt(o),K=H||ns(o)||$a(o);if(v=mt(v,4),M==null){var te=o&&o.constructor;K?M=H?new te:[]:Pn(o)?M=Do(te)?ka(Oc(o)):{}:M={}}return(K?ur:yo)(o,function(he,fe,be){return v(M,he,fe,be)}),M}function VO(o,v){return o==null?!0:zd(o,v)}function GO(o,v,M){return o==null?o:Pb(o,v,jd(M))}function qO(o,v,M,H){return H=typeof H=="function"?H:e,o==null?o:Pb(o,v,jd(M),H)}function Ra(o){return o==null?[]:Tt(o,vr(o))}function KO(o){return o==null?[]:Tt(o,fi(o))}function YO(o,v,M){return M===e&&(M=v,v=e),M!==e&&(M=ji(M),M=M===M?M:0),v!==e&&(v=ji(v),v=v===v?v:0),Ps(ji(o),v,M)}function JO(o,v,M){return v=Po(v),M===e?(M=v,v=0):M=Po(M),o=ji(o),rE(o,v,M)}function XO(o,v,M){if(M&&typeof M!="boolean"&&Xr(o,v,M)&&(v=M=e),M===e&&(typeof v=="boolean"?(M=v,v=e):typeof o=="boolean"&&(M=o,o=e)),o===e&&v===e?(o=0,v=1):(o=Po(o),v===e?(v=o,o=0):v=Po(v)),o>v){var H=o;o=v,v=H}if(M||o%1||v%1){var K=fb();return Fr(o+K*(v-o+bn("1e-"+((K+"").length-1))),v)}return Dd(o,v)}var ZO=Aa(function(o,v,M){return v=v.toLowerCase(),o+(M?V0(v):v)});function V0(o){return hf(an(o).toLowerCase())}function G0(o){return o=an(o),o&&o.replace(Be,V).replace(Zi,"")}function QO(o,v,M){o=an(o),v=_i(v);var H=o.length;M=M===e?H:Ps(It(M),0,H);var K=M;return M-=v.length,M>=0&&o.slice(M,K)==v}function eN(o){return o=an(o),o&&qr.test(o)?o.replace(Gr,J):o}function tN(o){return o=an(o),o&&On.test(o)?o.replace(Lr,"\\$&"):o}var nN=Aa(function(o,v,M){return o+(M?"-":"")+v.toLowerCase()}),rN=Aa(function(o,v,M){return o+(M?" ":"")+v.toLowerCase()}),iN=Kb("toLowerCase");function oN(o,v,M){o=an(o),v=It(v);var H=v?Pt(o):0;if(!v||H>=v)return o;var K=(v-H)/2;return Xc(Fc(K),M)+o+Xc(Pc(K),M)}function sN(o,v,M){o=an(o),v=It(v);var H=v?Pt(o):0;return v&&H<v?o+Xc(v-H,M):o}function aN(o,v,M){o=an(o),v=It(v);var H=v?Pt(o):0;return v&&H<v?Xc(v-H,M)+o:o}function lN(o,v,M){return M||v==null?v=0:v&&(v=+v),mT(an(o).replace(yn,""),v||0)}function cN(o,v,M){return(M?Xr(o,v,M):v===e)?v=1:v=It(v),Pd(an(o),v)}function uN(){var o=arguments,v=an(o[0]);return o.length<3?v:v.replace(o[1],o[2])}var hN=Aa(function(o,v,M){return o+(M?"_":"")+v.toLowerCase()});function dN(o,v,M){return M&&typeof M!="number"&&Xr(o,v,M)&&(v=M=e),M=M===e?le:M>>>0,M?(o=an(o),o&&(typeof v=="string"||v!=null&&!af(v))&&(v=_i(v),!v&&pe(o))?ts(yt(o),0,M):o.split(v,M)):[]}var fN=Aa(function(o,v,M){return o+(M?" ":"")+hf(v)});function pN(o,v,M){return o=an(o),M=M==null?0:Ps(It(M),0,o.length),v=_i(v),o.slice(M,M+v.length)==v}function gN(o,v,M){var H=ee.templateSettings;M&&Xr(o,v,M)&&(v=e),o=an(o),v=lf({},v,H,t0);var K=lf({},v.imports,H.imports,t0),te=vr(K),he=Tt(K,te);ur(te,function(ft){if(Or.test(ft))throw new ct(h)});var fe,be,Ee=0,Le=v.interpolate||bt,Pe="__p += '",Ye=ui((v.escape||bt).source+"|"+Le.source+"|"+(Le===ko?Kr:bt).source+"|"+(v.evaluate||bt).source+"|$","g"),it="//# sourceURL="+(sn.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Is+"]")+`
1462
+ `;o.replace(Ye,function(ft,Bt,Gt,Si,Zr,$i){return Gt||(Gt=Si),Pe+=o.slice(Ee,$i).replace(gn,ie),Bt&&(fe=!0,Pe+=`' +
1463
+ __e(`+Bt+`) +
1464
+ '`),Zr&&(be=!0,Pe+=`';
1465
+ `+Zr+`;
1466
+ __p += '`),Gt&&(Pe+=`' +
1467
+ ((__t = (`+Gt+`)) == null ? '' : __t) +
1468
+ '`),Ee=$i+ft.length,ft}),Pe+=`';
1469
+ `;var vt=sn.call(v,"variable")&&v.variable;if(!vt)Pe=`with (obj) {
1470
+ `+Pe+`
1471
+ }
1472
+ `;else if(Or.test(vt))throw new ct(w);Pe=(be?Pe.replace(yi,""):Pe).replace(bi,"$1").replace(Xn,"$1;"),Pe="function("+(vt||"obj")+`) {
1473
+ `+(vt?"":`obj || (obj = {});
1474
+ `)+"var __t, __p = ''"+(fe?", __e = _.escape":"")+(be?`, __j = Array.prototype.join;
1475
+ function print() { __p += __j.call(arguments, '') }
1476
+ `:`;
1477
+ `)+Pe+`return __p
1478
+ }`;var Lt=K0(function(){return _t(te,it+"return "+Pe).apply(e,he)});if(Lt.source=Pe,sf(Lt))throw Lt;return Lt}function mN(o){return an(o).toLowerCase()}function vN(o){return an(o).toUpperCase()}function yN(o,v,M){if(o=an(o),o&&(M||v===e))return Ct(o);if(!o||!(v=_i(v)))return o;var H=yt(o),K=yt(v),te=Qn(H,K),he=hr(H,K)+1;return ts(H,te,he).join("")}function bN(o,v,M){if(o=an(o),o&&(M||v===e))return o.slice(0,dt(o)+1);if(!o||!(v=_i(v)))return o;var H=yt(o),K=hr(H,yt(v))+1;return ts(H,0,K).join("")}function wN(o,v,M){if(o=an(o),o&&(M||v===e))return o.replace(yn,"");if(!o||!(v=_i(v)))return o;var H=yt(o),K=Qn(H,yt(v));return ts(H,K).join("")}function xN(o,v){var M=B,H=F;if(Pn(v)){var K="separator"in v?v.separator:K;M="length"in v?It(v.length):M,H="omission"in v?_i(v.omission):H}o=an(o);var te=o.length;if(pe(o)){var he=yt(o);te=he.length}if(M>=te)return o;var fe=M-Pt(H);if(fe<1)return H;var be=he?ts(he,0,fe).join(""):o.slice(0,fe);if(K===e)return be+H;if(he&&(fe+=be.length-fe),af(K)){if(o.slice(fe).search(K)){var Ee,Le=be;for(K.global||(K=ui(K.source,an(Nt.exec(K))+"g")),K.lastIndex=0;Ee=K.exec(Le);)var Pe=Ee.index;be=be.slice(0,Pe===e?fe:Pe)}}else if(o.indexOf(_i(K),fe)!=fe){var Ye=be.lastIndexOf(K);Ye>-1&&(be=be.slice(0,Ye))}return be+H}function CN(o){return o=an(o),o&&Cs.test(o)?o.replace(Yi,ot):o}var kN=Aa(function(o,v,M){return o+(M?" ":"")+v.toUpperCase()}),hf=Kb("toUpperCase");function q0(o,v,M){return o=an(o),v=M?e:v,v===e?xe(o)?er(o):X(o):o.match(v)||[]}var K0=zt(function(o,v){try{return rn(o,e,v)}catch(M){return sf(M)?M:new ct(M)}}),_N=Oo(function(o,v){return ur(v,function(M){M=to(M),vo(o,M,rf(o[M],o))}),o});function AN(o){var v=o==null?0:o.length,M=mt();return o=v?S(o,function(H){if(typeof H[1]!="function")throw new wn(g);return[M(H[0]),H[1]]}):[],zt(function(H){for(var K=-1;++K<v;){var te=o[K];if(rn(te[0],this,H))return rn(te[1],this,H)}})}function SN(o){return ZT(zi(o,c))}function df(o){return function(){return o}}function $N(o,v){return o==null||o!==o?v:o}var RN=Jb(),MN=Jb(!0);function pi(o){return o}function ff(o){return Sb(typeof o=="function"?o:zi(o,c))}function TN(o){return Rb(zi(o,c))}function EN(o,v){return Mb(o,zi(v,c))}var IN=zt(function(o,v){return function(M){return vl(M,o,v)}}),LN=zt(function(o,v){return function(M){return vl(o,M,v)}});function pf(o,v,M){var H=vr(v),K=Uc(v,H);M==null&&!(Pn(v)&&(K.length||!H.length))&&(M=v,v=o,o=this,K=Uc(v,vr(v)));var te=!(Pn(M)&&"chain"in M)||!!M.chain,he=Do(o);return ur(K,function(fe){var be=v[fe];o[fe]=be,he&&(o.prototype[fe]=function(){var Ee=this.__chain__;if(te||Ee){var Le=o(this.__wrapped__),Pe=Le.__actions__=hi(this.__actions__);return Pe.push({func:be,args:arguments,thisArg:o}),Le.__chain__=Ee,Le}return be.apply(o,_([this.value()],arguments))})}),o}function ON(){return Dt._===this&&(Dt._=aT),this}function gf(){}function NN(o){return o=It(o),zt(function(v){return Tb(v,o)})}var DN=Ud(S),PN=Ud(mo),FN=Ud(j);function Y0(o){return Xd(o)?Oe(to(o)):gE(o)}function zN(o){return function(v){return o==null?e:Fs(o,v)}}var WN=Zb(),BN=Zb(!0);function mf(){return[]}function vf(){return!1}function jN(){return{}}function HN(){return""}function UN(){return!0}function VN(o,v){if(o=It(o),o<1||o>q)return[];var M=le,H=Fr(o,le);v=mt(v),o-=le;for(var K=Qe(H,v);++M<o;)v(M);return K}function GN(o){return Rt(o)?S(o,to):Ai(o)?[o]:hi(p0(an(o)))}function qN(o){var v=++oT;return an(o)+v}var KN=Jc(function(o,v){return o+v},0),YN=Vd("ceil"),JN=Jc(function(o,v){return o/v},1),XN=Vd("floor");function ZN(o){return o&&o.length?Hc(o,pi,Td):e}function QN(o,v){return o&&o.length?Hc(o,mt(v,2),Td):e}function e2(o){return we(o,pi)}function t2(o,v){return we(o,mt(v,2))}function n2(o){return o&&o.length?Hc(o,pi,Od):e}function r2(o,v){return o&&o.length?Hc(o,mt(v,2),Od):e}var i2=Jc(function(o,v){return o*v},1),o2=Vd("round"),s2=Jc(function(o,v){return o-v},0);function a2(o){return o&&o.length?Je(o,pi):0}function l2(o,v){return o&&o.length?Je(o,mt(v,2)):0}return ee.after=EL,ee.ary=A0,ee.assign=yO,ee.assignIn=z0,ee.assignInWith=W0,ee.assignWith=lf,ee.at=bO,ee.before=S0,ee.bind=rf,ee.bindAll=_N,ee.bindKey=$0,ee.castArray=HL,ee.chain=C0,ee.chunk=ZE,ee.compact=QE,ee.concat=eI,ee.cond=AN,ee.conforms=SN,ee.constant=df,ee.countBy=lL,ee.create=wO,ee.curry=R0,ee.curryRight=M0,ee.debounce=T0,ee.defaults=xO,ee.defaultsDeep=CO,ee.defer=IL,ee.delay=LL,ee.difference=tI,ee.differenceBy=nI,ee.differenceWith=rI,ee.drop=iI,ee.dropRight=oI,ee.dropRightWhile=sI,ee.dropWhile=aI,ee.fill=lI,ee.filter=uL,ee.flatMap=fL,ee.flatMapDeep=pL,ee.flatMapDepth=gL,ee.flatten=y0,ee.flattenDeep=cI,ee.flattenDepth=uI,ee.flip=OL,ee.flow=RN,ee.flowRight=MN,ee.fromPairs=hI,ee.functions=MO,ee.functionsIn=TO,ee.groupBy=mL,ee.initial=fI,ee.intersection=pI,ee.intersectionBy=gI,ee.intersectionWith=mI,ee.invert=IO,ee.invertBy=LO,ee.invokeMap=yL,ee.iteratee=ff,ee.keyBy=bL,ee.keys=vr,ee.keysIn=fi,ee.map=ru,ee.mapKeys=NO,ee.mapValues=DO,ee.matches=TN,ee.matchesProperty=EN,ee.memoize=ou,ee.merge=PO,ee.mergeWith=B0,ee.method=IN,ee.methodOf=LN,ee.mixin=pf,ee.negate=su,ee.nthArg=NN,ee.omit=FO,ee.omitBy=zO,ee.once=NL,ee.orderBy=wL,ee.over=DN,ee.overArgs=DL,ee.overEvery=PN,ee.overSome=FN,ee.partial=of,ee.partialRight=E0,ee.partition=xL,ee.pick=WO,ee.pickBy=j0,ee.property=Y0,ee.propertyOf=zN,ee.pull=wI,ee.pullAll=w0,ee.pullAllBy=xI,ee.pullAllWith=CI,ee.pullAt=kI,ee.range=WN,ee.rangeRight=BN,ee.rearg=PL,ee.reject=_L,ee.remove=_I,ee.rest=FL,ee.reverse=tf,ee.sampleSize=SL,ee.set=jO,ee.setWith=HO,ee.shuffle=$L,ee.slice=AI,ee.sortBy=TL,ee.sortedUniq=II,ee.sortedUniqBy=LI,ee.split=dN,ee.spread=zL,ee.tail=OI,ee.take=NI,ee.takeRight=DI,ee.takeRightWhile=PI,ee.takeWhile=FI,ee.tap=QI,ee.throttle=WL,ee.thru=nu,ee.toArray=D0,ee.toPairs=H0,ee.toPairsIn=U0,ee.toPath=GN,ee.toPlainObject=F0,ee.transform=UO,ee.unary=BL,ee.union=zI,ee.unionBy=WI,ee.unionWith=BI,ee.uniq=jI,ee.uniqBy=HI,ee.uniqWith=UI,ee.unset=VO,ee.unzip=nf,ee.unzipWith=x0,ee.update=GO,ee.updateWith=qO,ee.values=Ra,ee.valuesIn=KO,ee.without=VI,ee.words=q0,ee.wrap=jL,ee.xor=GI,ee.xorBy=qI,ee.xorWith=KI,ee.zip=YI,ee.zipObject=JI,ee.zipObjectDeep=XI,ee.zipWith=ZI,ee.entries=H0,ee.entriesIn=U0,ee.extend=z0,ee.extendWith=W0,pf(ee,ee),ee.add=KN,ee.attempt=K0,ee.camelCase=ZO,ee.capitalize=V0,ee.ceil=YN,ee.clamp=YO,ee.clone=UL,ee.cloneDeep=GL,ee.cloneDeepWith=qL,ee.cloneWith=VL,ee.conformsTo=KL,ee.deburr=G0,ee.defaultTo=$N,ee.divide=JN,ee.endsWith=QO,ee.eq=no,ee.escape=eN,ee.escapeRegExp=tN,ee.every=cL,ee.find=hL,ee.findIndex=m0,ee.findKey=kO,ee.findLast=dL,ee.findLastIndex=v0,ee.findLastKey=_O,ee.floor=XN,ee.forEach=k0,ee.forEachRight=_0,ee.forIn=AO,ee.forInRight=SO,ee.forOwn=$O,ee.forOwnRight=RO,ee.get=cf,ee.gt=YL,ee.gte=JL,ee.has=EO,ee.hasIn=uf,ee.head=b0,ee.identity=pi,ee.includes=vL,ee.indexOf=dI,ee.inRange=JO,ee.invoke=OO,ee.isArguments=Bs,ee.isArray=Rt,ee.isArrayBuffer=XL,ee.isArrayLike=di,ee.isArrayLikeObject=Gn,ee.isBoolean=ZL,ee.isBuffer=ns,ee.isDate=QL,ee.isElement=eO,ee.isEmpty=tO,ee.isEqual=nO,ee.isEqualWith=rO,ee.isError=sf,ee.isFinite=iO,ee.isFunction=Do,ee.isInteger=I0,ee.isLength=au,ee.isMap=L0,ee.isMatch=oO,ee.isMatchWith=sO,ee.isNaN=aO,ee.isNative=lO,ee.isNil=uO,ee.isNull=cO,ee.isNumber=O0,ee.isObject=Pn,ee.isObjectLike=jn,ee.isPlainObject=kl,ee.isRegExp=af,ee.isSafeInteger=hO,ee.isSet=N0,ee.isString=lu,ee.isSymbol=Ai,ee.isTypedArray=$a,ee.isUndefined=dO,ee.isWeakMap=fO,ee.isWeakSet=pO,ee.join=vI,ee.kebabCase=nN,ee.last=Bi,ee.lastIndexOf=yI,ee.lowerCase=rN,ee.lowerFirst=iN,ee.lt=gO,ee.lte=mO,ee.max=ZN,ee.maxBy=QN,ee.mean=e2,ee.meanBy=t2,ee.min=n2,ee.minBy=r2,ee.stubArray=mf,ee.stubFalse=vf,ee.stubObject=jN,ee.stubString=HN,ee.stubTrue=UN,ee.multiply=i2,ee.nth=bI,ee.noConflict=ON,ee.noop=gf,ee.now=iu,ee.pad=oN,ee.padEnd=sN,ee.padStart=aN,ee.parseInt=lN,ee.random=XO,ee.reduce=CL,ee.reduceRight=kL,ee.repeat=cN,ee.replace=uN,ee.result=BO,ee.round=o2,ee.runInContext=ge,ee.sample=AL,ee.size=RL,ee.snakeCase=hN,ee.some=ML,ee.sortedIndex=SI,ee.sortedIndexBy=$I,ee.sortedIndexOf=RI,ee.sortedLastIndex=MI,ee.sortedLastIndexBy=TI,ee.sortedLastIndexOf=EI,ee.startCase=fN,ee.startsWith=pN,ee.subtract=s2,ee.sum=a2,ee.sumBy=l2,ee.template=gN,ee.times=VN,ee.toFinite=Po,ee.toInteger=It,ee.toLength=P0,ee.toLower=mN,ee.toNumber=ji,ee.toSafeInteger=vO,ee.toString=an,ee.toUpper=vN,ee.trim=yN,ee.trimEnd=bN,ee.trimStart=wN,ee.truncate=xN,ee.unescape=CN,ee.uniqueId=qN,ee.upperCase=kN,ee.upperFirst=hf,ee.each=k0,ee.eachRight=_0,ee.first=b0,pf(ee,(function(){var o={};return yo(ee,function(v,M){sn.call(ee.prototype,M)||(o[M]=v)}),o})(),{chain:!1}),ee.VERSION=r,ur(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){ee[o].placeholder=ee}),ur(["drop","take"],function(o,v){Ut.prototype[o]=function(M){M=M===e?1:dr(It(M),0);var H=this.__filtered__&&!v?new Ut(this):this.clone();return H.__filtered__?H.__takeCount__=Fr(M,H.__takeCount__):H.__views__.push({size:Fr(M,le),type:o+(H.__dir__<0?"Right":"")}),H},Ut.prototype[o+"Right"]=function(M){return this.reverse()[o](M).reverse()}}),ur(["filter","map","takeWhile"],function(o,v){var M=v+1,H=M==k||M==W;Ut.prototype[o]=function(K){var te=this.clone();return te.__iteratees__.push({iteratee:mt(K,3),type:M}),te.__filtered__=te.__filtered__||H,te}}),ur(["head","last"],function(o,v){var M="take"+(v?"Right":"");Ut.prototype[o]=function(){return this[M](1).value()[0]}}),ur(["initial","tail"],function(o,v){var M="drop"+(v?"":"Right");Ut.prototype[o]=function(){return this.__filtered__?new Ut(this):this[M](1)}}),Ut.prototype.compact=function(){return this.filter(pi)},Ut.prototype.find=function(o){return this.filter(o).head()},Ut.prototype.findLast=function(o){return this.reverse().find(o)},Ut.prototype.invokeMap=zt(function(o,v){return typeof o=="function"?new Ut(this):this.map(function(M){return vl(M,o,v)})}),Ut.prototype.reject=function(o){return this.filter(su(mt(o)))},Ut.prototype.slice=function(o,v){o=It(o);var M=this;return M.__filtered__&&(o>0||v<0)?new Ut(M):(o<0?M=M.takeRight(-o):o&&(M=M.drop(o)),v!==e&&(v=It(v),M=v<0?M.dropRight(-v):M.take(v-o)),M)},Ut.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Ut.prototype.toArray=function(){return this.take(le)},yo(Ut.prototype,function(o,v){var M=/^(?:filter|find|map|reject)|While$/.test(v),H=/^(?:head|last)$/.test(v),K=ee[H?"take"+(v=="last"?"Right":""):v],te=H||/^find/.test(v);K&&(ee.prototype[v]=function(){var he=this.__wrapped__,fe=H?[1]:arguments,be=he instanceof Ut,Ee=fe[0],Le=be||Rt(he),Pe=function(Bt){var Gt=K.apply(ee,_([Bt],fe));return H&&Ye?Gt[0]:Gt};Le&&M&&typeof Ee=="function"&&Ee.length!=1&&(be=Le=!1);var Ye=this.__chain__,it=!!this.__actions__.length,vt=te&&!Ye,Lt=be&&!it;if(!te&&Le){he=Lt?he:new Ut(this);var ft=o.apply(he,fe);return ft.__actions__.push({func:nu,args:[Pe],thisArg:e}),new Fi(ft,Ye)}return vt&&Lt?o.apply(this,fe):(ft=this.thru(Pe),vt?H?ft.value()[0]:ft.value():ft)})}),ur(["pop","push","shift","sort","splice","unshift"],function(o){var v=Pi[o],M=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",H=/^(?:pop|shift)$/.test(o);ee.prototype[o]=function(){var K=arguments;if(H&&!this.__chain__){var te=this.value();return v.apply(Rt(te)?te:[],K)}return this[M](function(he){return v.apply(Rt(he)?he:[],K)})}}),yo(Ut.prototype,function(o,v){var M=ee[v];if(M){var H=M.name+"";sn.call(Ca,H)||(Ca[H]=[]),Ca[H].push({name:v,func:M})}}),Ca[Yc(e,x).name]=[{name:"wrapper",func:e}],Ut.prototype.clone=kT,Ut.prototype.reverse=_T,Ut.prototype.value=AT,ee.prototype.at=eL,ee.prototype.chain=tL,ee.prototype.commit=nL,ee.prototype.next=rL,ee.prototype.plant=oL,ee.prototype.reverse=sL,ee.prototype.toJSON=ee.prototype.valueOf=ee.prototype.value=aL,ee.prototype.first=ee.prototype.head,ul&&(ee.prototype[ul]=iL),ee}),un=on();Zn?((Zn.exports=un)._=un,Dr._=un):Dt._=un}).call(_k)})(Gl,Gl.exports)),Gl.exports}var Sk=Ak();Tn("p",Vl(Sk)).debounce(function(){this.rebuildDisplayText()},300);var _g={exports:{}},Ag;function $k(){return Ag||(Ag=1,(function(t,n){(function(){ace.require(["ace/mode/text"],function(e){t&&(t.exports=e)})})()})(_g)),_g.exports}$k();const Rk=!0,tr="u-",Mk="uplot",Tk=tr+"hz",Ek=tr+"vt",Ik=tr+"title",Lk=tr+"wrap",Ok=tr+"under",Nk=tr+"over",Dk=tr+"axis",fs=tr+"off",Pk=tr+"select",Fk=tr+"cursor-x",zk=tr+"cursor-y",Wk=tr+"cursor-pt",Bk=tr+"legend",jk=tr+"live",Hk=tr+"inline",Uk=tr+"series",Vk=tr+"marker",Sg=tr+"label",Gk=tr+"value",Ha="width",Ua="height",Va="top",$g="bottom",Xs="left",Pu="right",Fu="#000",Rg=Fu+"0",zu="mousemove",Mg="mousedown",Wu="mouseup",Tg="mouseenter",Eg="mouseleave",Ig="dblclick",qk="resize",Kk="scroll",Lg="change",ql="dppxchange",Bu="--",Zs=typeof window<"u",ju=Zs?document:null,Qs=Zs?window:null,Yk=Zs?navigator:null;let Qt,Kl;function Hu(){let t=devicePixelRatio;Qt!=t&&(Qt=t,Kl&&Gu(Lg,Kl,Hu),Kl=matchMedia(`(min-resolution: ${Qt-.001}dppx) and (max-resolution: ${Qt+.001}dppx)`),ps(Lg,Kl,Hu),Qs.dispatchEvent(new CustomEvent(ql)))}function gi(t,n){if(n!=null){let e=t.classList;!e.contains(n)&&e.add(n)}}function Uu(t,n){let e=t.classList;e.contains(n)&&e.remove(n)}function xn(t,n,e){t.style[n]=e+"px"}function Vi(t,n,e,r){let m=ju.createElement(t);return n!=null&&gi(m,n),e?.insertBefore(m,r),m}function Mi(t,n){return Vi("div",t,n)}const Og=new WeakMap;function so(t,n,e,r,m){let p="translate("+n+"px,"+e+"px)",g=Og.get(t);p!=g&&(t.style.transform=p,Og.set(t,p),n<0||e<0||n>r||e>m?gi(t,fs):Uu(t,fs))}const Ng=new WeakMap;function Dg(t,n,e){let r=n+e,m=Ng.get(t);r!=m&&(Ng.set(t,r),t.style.background=n,t.style.borderColor=e)}const Pg=new WeakMap;function Fg(t,n,e,r){let m=n+""+e,p=Pg.get(t);m!=p&&(Pg.set(t,m),t.style.height=e+"px",t.style.width=n+"px",t.style.marginLeft=r?-n/2+"px":0,t.style.marginTop=r?-e/2+"px":0)}const Vu={passive:!0},Jk={...Vu,capture:!0};function ps(t,n,e,r){n.addEventListener(t,e,r?Jk:Vu)}function Gu(t,n,e,r){n.removeEventListener(t,e,Vu)}Zs&&Hu();function Gi(t,n,e,r){let m;e=e||0,r=r||n.length-1;let p=r<=2147483647;for(;r-e>1;)m=p?e+r>>1:vi((e+r)/2),n[m]<t?e=m:r=m;return t-n[e]<=n[r]-t?e:r}function zg(t){return(n,e,r)=>{let m=-1,p=-1;for(let g=e;g<=r;g++)if(t(n[g])){m=g;break}for(let g=r;g>=e;g--)if(t(n[g])){p=g;break}return[m,p]}}const Wg=t=>t!=null,Bg=t=>t!=null&&t>0,Yl=zg(Wg),Xk=zg(Bg);function Zk(t,n,e,r=0,m=!1){let p=m?Xk:Yl,g=m?Bg:Wg;[n,e]=p(t,n,e);let w=t[n],h=t[n];if(n>-1)if(r==1)w=t[n],h=t[e];else if(r==-1)w=t[e],h=t[n];else for(let d=n;d<=e;d++){let a=t[d];g(a)&&(a<w?w=a:a>h&&(h=a))}return[w??hn,h??-hn]}function Jl(t,n,e,r){let m=Ug(t),p=Ug(n);t==n&&(m==-1?(t*=e,n/=e):(t/=e,n*=e));let g=e==10?xo:Vg,w=m==1?vi:Ti,h=p==1?Ti:vi,d=w(g(nr(t))),a=h(g(nr(n))),l=ea(e,d),c=ea(e,a);return e==10&&(d<0&&(l=dn(l,-d)),a<0&&(c=dn(c,-a))),r||e==2?(t=l*m,n=c*p):(t=Zg(t,l),n=Ql(n,c)),[t,n]}function qu(t,n,e,r){let m=Jl(t,n,e,r);return t==0&&(m[0]=0),n==0&&(m[1]=0),m}const Ku=.1,jg={mode:3,pad:Ku},Ga={pad:0,soft:null,mode:0},Qk={min:Ga,max:Ga};function Xl(t,n,e,r){return ec(e)?Hg(t,n,e):(Ga.pad=e,Ga.soft=r?0:null,Ga.mode=r?3:0,Hg(t,n,Qk))}function Jt(t,n){return t??n}function e_(t,n,e){for(n=Jt(n,0),e=Jt(e,t.length-1);n<=e;){if(t[n]!=null)return!0;n++}return!1}function Hg(t,n,e){let r=e.min,m=e.max,p=Jt(r.pad,0),g=Jt(m.pad,0),w=Jt(r.hard,-hn),h=Jt(m.hard,hn),d=Jt(r.soft,hn),a=Jt(m.soft,-hn),l=Jt(r.mode,0),c=Jt(m.mode,0),u=n-t,i=xo(u),s=Br(nr(t),nr(n)),f=xo(s),b=nr(f-i);(u<1e-24||b>10)&&(u=0,(t==0||n==0)&&(u=1e-24,l==2&&d!=hn&&(p=0),c==2&&a!=-hn&&(g=0)));let x=u||s||1e3,I=xo(x),R=ea(10,vi(I)),A=x*(u==0?t==0?.1:1:p),C=dn(Zg(t-A,R/10),24),O=t>=d&&(l==1||l==3&&C<=d||l==2&&C>=d)?d:hn,D=Br(w,C<O&&t>=O?O:qi(O,C)),E=x*(u==0?n==0?.1:1:g),T=dn(Ql(n+E,R/10),24),B=n<=a&&(c==1||c==3&&T>=a||c==2&&T<=a)?a:-hn,F=qi(h,T>B&&n<=B?B:Br(B,T));return D==F&&D==0&&(F=100),[D,F]}const t_=new Intl.NumberFormat(Zs?Yk.language:"en-US"),Yu=t=>t_.format(t),mi=Math,Zl=mi.PI,nr=mi.abs,vi=mi.floor,rr=mi.round,Ti=mi.ceil,qi=mi.min,Br=mi.max,ea=mi.pow,Ug=mi.sign,xo=mi.log10,Vg=mi.log2,n_=(t,n=1)=>mi.sinh(t)*n,Ju=(t,n=1)=>mi.asinh(t/n),hn=1/0;function Gg(t){return(xo((t^t>>31)-(t>>31))|0)+1}function Xu(t,n,e){return qi(Br(t,n),e)}function qg(t){return typeof t=="function"}function jt(t){return qg(t)?t:()=>t}const r_=()=>{},Kg=t=>t,Yg=(t,n)=>n,i_=t=>null,Jg=t=>!0,Xg=(t,n)=>t==n,o_=/\.\d*?(?=9{6,}|0{6,})/gm,gs=t=>{if(em(t)||jo.has(t))return t;const n=`${t}`,e=n.match(o_);if(e==null)return t;let r=e[0].length-1;if(n.indexOf("e-")!=-1){let[m,p]=n.split("e");return+`${gs(m)}e${p}`}return dn(t,r)};function ms(t,n){return gs(dn(gs(t/n))*n)}function Ql(t,n){return gs(Ti(gs(t/n))*n)}function Zg(t,n){return gs(vi(gs(t/n))*n)}function dn(t,n=0){if(em(t))return t;let e=10**n,r=t*e*(1+Number.EPSILON);return rr(r)/e}const jo=new Map;function Qg(t){return((""+t).split(".")[1]||"").length}function qa(t,n,e,r){let m=[],p=r.map(Qg);for(let g=n;g<e;g++){let w=nr(g),h=dn(ea(t,g),w);for(let d=0;d<r.length;d++){let a=t==10?+`${r[d]}e${g}`:r[d]*h,l=(g>=0?0:w)+(g>=p[d]?0:p[d]),c=t==10?a:dn(a,l);m.push(c),jo.set(c,l)}}return m}const Ka={},Zu=[],ta=[null,null],Ho=Array.isArray,em=Number.isInteger,s_=t=>t===void 0;function tm(t){return typeof t=="string"}function ec(t){let n=!1;if(t!=null){let e=t.constructor;n=e==null||e==Object}return n}function a_(t){return t!=null&&typeof t=="object"}const l_=Object.getPrototypeOf(Uint8Array),nm="__proto__";function na(t,n=ec){let e;if(Ho(t)){let r=t.find(m=>m!=null);if(Ho(r)||n(r)){e=Array(t.length);for(let m=0;m<t.length;m++)e[m]=na(t[m],n)}else e=t.slice()}else if(t instanceof l_)e=t.slice();else if(n(t)){e={};for(let r in t)r!=nm&&(e[r]=na(t[r],n))}else e=t;return e}function Kn(t){let n=arguments;for(let e=1;e<n.length;e++){let r=n[e];for(let m in r)m!=nm&&(ec(t[m])?Kn(t[m],na(r[m])):t[m]=na(r[m]))}return t}const c_=0,u_=1,h_=2;function d_(t,n,e){for(let r=0,m,p=-1;r<n.length;r++){let g=n[r];if(g>p){for(m=g-1;m>=0&&t[m]==null;)t[m--]=null;for(m=g+1;m<e&&t[m]==null;)t[p=m++]=null}}}function f_(t,n){if(m_(t)){let g=t[0].slice();for(let w=1;w<t.length;w++)g.push(...t[w].slice(1));return v_(g[0])||(g=g_(g)),g}let e=new Set;for(let g=0;g<t.length;g++){let w=t[g][0],h=w.length;for(let d=0;d<h;d++)e.add(w[d])}let r=[Array.from(e).sort((g,w)=>g-w)],m=r[0].length,p=new Map;for(let g=0;g<m;g++)p.set(r[0][g],g);for(let g=0;g<t.length;g++){let w=t[g],h=w[0];for(let d=1;d<w.length;d++){let a=w[d],l=Array(m).fill(void 0),c=n?n[g][d]:u_,u=[];for(let i=0;i<a.length;i++){let s=a[i],f=p.get(h[i]);s===null?c!=c_&&(l[f]=s,c==h_&&u.push(f)):l[f]=s}d_(l,u,m),r.push(l)}}return r}const p_=typeof queueMicrotask>"u"?t=>Promise.resolve().then(t):queueMicrotask;function g_(t){let n=t[0],e=n.length,r=Array(e);for(let p=0;p<r.length;p++)r[p]=p;r.sort((p,g)=>n[p]-n[g]);let m=[];for(let p=0;p<t.length;p++){let g=t[p],w=Array(e);for(let h=0;h<e;h++)w[h]=g[r[h]];m.push(w)}return m}function m_(t){let n=t[0][0],e=n.length;for(let r=1;r<t.length;r++){let m=t[r][0];if(m.length!=e)return!1;if(m!=n){for(let p=0;p<e;p++)if(m[p]!=n[p])return!1}}return!0}function v_(t,n=100){const e=t.length;if(e<=1)return!0;let r=0,m=e-1;for(;r<=m&&t[r]==null;)r++;for(;m>=r&&t[m]==null;)m--;if(m<=r)return!0;const p=Br(1,vi((m-r+1)/n));for(let g=t[r],w=r+p;w<=m;w+=p){const h=t[w];if(h!=null){if(h<=g)return!1;g=h}}return!0}const rm=["January","February","March","April","May","June","July","August","September","October","November","December"],im=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function om(t){return t.slice(0,3)}const y_=im.map(om),b_=rm.map(om),w_={MMMM:rm,MMM:b_,WWWW:im,WWW:y_};function Ya(t){return(t<10?"0":"")+t}function x_(t){return(t<10?"00":t<100?"0":"")+t}const C_={YYYY:t=>t.getFullYear(),YY:t=>(t.getFullYear()+"").slice(2),MMMM:(t,n)=>n.MMMM[t.getMonth()],MMM:(t,n)=>n.MMM[t.getMonth()],MM:t=>Ya(t.getMonth()+1),M:t=>t.getMonth()+1,DD:t=>Ya(t.getDate()),D:t=>t.getDate(),WWWW:(t,n)=>n.WWWW[t.getDay()],WWW:(t,n)=>n.WWW[t.getDay()],HH:t=>Ya(t.getHours()),H:t=>t.getHours(),h:t=>{let n=t.getHours();return n==0?12:n>12?n-12:n},AA:t=>t.getHours()>=12?"PM":"AM",aa:t=>t.getHours()>=12?"pm":"am",a:t=>t.getHours()>=12?"p":"a",mm:t=>Ya(t.getMinutes()),m:t=>t.getMinutes(),ss:t=>Ya(t.getSeconds()),s:t=>t.getSeconds(),fff:t=>x_(t.getMilliseconds())};function Qu(t,n){n=n||w_;let e=[],r=/\{([a-z]+)\}|[^{]+/gi,m;for(;m=r.exec(t);)e.push(m[0][0]=="{"?C_[m[1]]:m[0]);return p=>{let g="";for(let w=0;w<e.length;w++)g+=typeof e[w]=="string"?e[w]:e[w](p,n);return g}}const k_=new Intl.DateTimeFormat().resolvedOptions().timeZone;function __(t,n){let e;return n=="UTC"||n=="Etc/UTC"?e=new Date(+t+t.getTimezoneOffset()*6e4):n==k_?e=t:(e=new Date(t.toLocaleString("en-US",{timeZone:n})),e.setMilliseconds(t.getMilliseconds())),e}const sm=t=>t%1==0,tc=[1,2,2.5,5],A_=qa(10,-32,0,tc),am=qa(10,0,32,tc),S_=am.filter(sm),vs=A_.concat(am),eh=`
1479
+ `,lm="{YYYY}",cm=eh+lm,um="{M}/{D}",Ja=eh+um,nc=Ja+"/{YY}",hm="{aa}",$_="{h}:{mm}",ra=$_+hm,dm=eh+ra,fm=":{ss}",tn=null;function pm(t){let n=t*1e3,e=n*60,r=e*60,m=r*24,p=m*30,g=m*365,w=(t==1?qa(10,0,3,tc).filter(sm):qa(10,-3,0,tc)).concat([n,n*5,n*10,n*15,n*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,p,p*2,p*3,p*4,p*6,g,g*2,g*5,g*10,g*25,g*50,g*100]);const h=[[g,lm,tn,tn,tn,tn,tn,tn,1],[m*28,"{MMM}",cm,tn,tn,tn,tn,tn,1],[m,um,cm,tn,tn,tn,tn,tn,1],[r,"{h}"+hm,nc,tn,Ja,tn,tn,tn,1],[e,ra,nc,tn,Ja,tn,tn,tn,1],[n,fm,nc+" "+ra,tn,Ja+" "+ra,tn,dm,tn,1],[t,fm+".{fff}",nc+" "+ra,tn,Ja+" "+ra,tn,dm,tn,1]];function d(a){return(l,c,u,i,s,f)=>{let b=[],x=s>=g,I=s>=p&&s<g,R=a(u),A=dn(R*t,3),C=th(R.getFullYear(),x?0:R.getMonth(),I||x?1:R.getDate()),O=dn(C*t,3);if(I||x){let D=I?s/p:0,E=x?s/g:0,T=A==O?A:dn(th(C.getFullYear()+E,C.getMonth()+D,1)*t,3),B=new Date(rr(T/t)),F=B.getFullYear(),N=B.getMonth();for(let $=0;T<=i;$++){let k=th(F+E*$,N+D*$,1),L=k-a(dn(k*t,3));T=dn((+k+L)*t,3),T<=i&&b.push(T)}}else{let D=s>=m?m:s,E=vi(u)-vi(A),T=O+E+Ql(A-O,D);b.push(T);let B=a(T),F=B.getHours()+B.getMinutes()/e+B.getSeconds()/r,N=s/r,$=l.axes[c]._space,k=f/$;for(;T=dn(T+s,t==1?0:3),!(T>i);)if(N>1){let L=vi(dn(F+N,6))%24,W=a(T).getHours()-L;W>1&&(W=-1),T-=W*r,F=(F+N)%24;let U=b[b.length-1];dn((T-U)/s,3)*k>=.7&&b.push(T)}else b.push(T)}return b}}return[w,h,d]}const[R_,M_,T_]=pm(1),[E_,I_,L_]=pm(.001);qa(2,-53,53,[1]);function gm(t,n){return t.map(e=>e.map((r,m)=>m==0||m==8||r==null?r:n(m==1||e[8]==0?r:e[1]+r)))}function mm(t,n){return(e,r,m,p,g)=>{let w=n.find(i=>g>=i[0])||n[n.length-1],h,d,a,l,c,u;return r.map(i=>{let s=t(i),f=s.getFullYear(),b=s.getMonth(),x=s.getDate(),I=s.getHours(),R=s.getMinutes(),A=s.getSeconds(),C=f!=h&&w[2]||b!=d&&w[3]||x!=a&&w[4]||I!=l&&w[5]||R!=c&&w[6]||A!=u&&w[7]||w[1];return h=f,d=b,a=x,l=I,c=R,u=A,C(s)})}}function O_(t,n){let e=Qu(n);return(r,m,p,g,w)=>m.map(h=>e(t(h)))}function th(t,n,e){return new Date(t,n,e)}function vm(t,n){return n(t)}const N_="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function ym(t,n){return(e,r,m,p)=>p==null?Bu:n(t(r))}function D_(t,n){let e=t.series[n];return e.width?e.stroke(t,n):e.points.width?e.points.stroke(t,n):null}function P_(t,n){return t.series[n].fill(t,n)}const F_={show:!0,live:!0,isolate:!1,mount:r_,markers:{show:!0,width:2,stroke:D_,fill:P_,dash:"solid"},idx:null,idxs:null,values:[]};function z_(t,n){let e=t.cursor.points,r=Mi(),m=e.size(t,n);xn(r,Ha,m),xn(r,Ua,m);let p=m/-2;xn(r,"marginLeft",p),xn(r,"marginTop",p);let g=e.width(t,n,m);return g&&xn(r,"borderWidth",g),r}function W_(t,n){let e=t.series[n].points;return e._fill||e._stroke}function B_(t,n){let e=t.series[n].points;return e._stroke||e._fill}function j_(t,n){return t.series[n].points.size}const nh=[0,0];function H_(t,n,e){return nh[0]=n,nh[1]=e,nh}function rc(t,n,e,r=!0){return m=>{m.button==0&&(!r||m.target==n)&&e(m)}}function rh(t,n,e,r=!0){return m=>{(!r||m.target==n)&&e(m)}}const U_={show:!0,x:!0,y:!0,lock:!1,move:H_,points:{one:!1,show:z_,size:j_,width:0,stroke:B_,fill:W_},bind:{mousedown:rc,mouseup:rc,click:rc,dblclick:rc,mousemove:rh,mouseleave:rh,mouseenter:rh},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(t,n)=>{n.stopPropagation(),n.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(t,n,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},bm={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},ih=Kn({},bm,{filter:Yg}),wm=Kn({},ih,{size:10}),xm=Kn({},bm,{show:!1}),oh='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"',Cm="bold "+oh,km=1.5,_m={show:!0,scale:"x",stroke:Fu,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Cm,side:2,grid:ih,ticks:wm,border:xm,font:oh,lineGap:km,rotate:0},V_="Value",G_="Time",Am={show:!0,scale:"x",auto:!1,sorted:1,min:hn,max:-hn,idxs:[]};function q_(t,n,e,r,m){return n.map(p=>p==null?"":Yu(p))}function K_(t,n,e,r,m,p,g){let w=[],h=jo.get(m)||0;e=g?e:dn(Ql(e,m),h);for(let d=e;d<=r;d=dn(d+m,h))w.push(Object.is(d,-0)?0:d);return w}function sh(t,n,e,r,m,p,g){const w=[],h=t.scales[t.axes[n].scale].log,d=h==10?xo:Vg,a=vi(d(e));m=ea(h,a),h==10&&(m=vs[Gi(m,vs)]);let l=e,c=m*h;h==10&&(c=vs[Gi(c,vs)]);do w.push(l),l=l+m,h==10&&!jo.has(l)&&(l=dn(l,jo.get(m))),l>=c&&(m=l,c=m*h,h==10&&(c=vs[Gi(c,vs)]));while(l<=r);return w}function Y_(t,n,e,r,m,p,g){let w=t.scales[t.axes[n].scale].asinh,h=r>w?sh(t,n,Br(w,e),r,m):[w],d=r>=0&&e<=0?[0]:[];return(e<-w?sh(t,n,Br(w,-r),-e,m):[w]).reverse().map(a=>-a).concat(d,h)}const Sm=/./,J_=/[12357]/,X_=/[125]/,$m=/1/,ah=(t,n,e,r)=>t.map((m,p)=>n==4&&m==0||p%r==0&&e.test(m.toExponential()[m<0?1:0])?m:null);function Z_(t,n,e,r,m){let p=t.axes[e],g=p.scale,w=t.scales[g],h=t.valToPos,d=p._space,a=h(10,g),l=h(9,g)-a>=d?Sm:h(7,g)-a>=d?J_:h(5,g)-a>=d?X_:$m;if(l==$m){let c=nr(h(1,g)-a);if(c<d)return ah(n.slice().reverse(),w.distr,l,Ti(d/c)).reverse()}return ah(n,w.distr,l,1)}function Q_(t,n,e,r,m){let p=t.axes[e],g=p.scale,w=p._space,h=t.valToPos,d=nr(h(1,g)-h(2,g));return d<w?ah(n.slice().reverse(),3,Sm,Ti(w/d)).reverse():n}function eA(t,n,e,r){return r==null?Bu:n==null?"":Yu(n)}const Rm={show:!0,scale:"y",stroke:Fu,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Cm,side:3,grid:ih,ticks:wm,border:xm,font:oh,lineGap:km,rotate:0};function tA(t,n){let e=3+(t||1)*2;return dn(e*n,3)}function nA(t,n){let{scale:e,idxs:r}=t.series[0],m=t._data[0],p=t.valToPos(m[r[0]],e,!0),g=t.valToPos(m[r[1]],e,!0),w=nr(g-p),h=t.series[n],d=w/(h.points.space*Qt);return r[1]-r[0]<=d}const Mm={scale:null,auto:!0,sorted:0,min:hn,max:-hn},Tm=(t,n,e,r,m)=>m,Em={show:!0,auto:!0,sorted:0,gaps:Tm,alpha:1,facets:[Kn({},Mm,{scale:"x"}),Kn({},Mm,{scale:"y"})]},Im={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Tm,alpha:1,points:{show:nA,filter:null},values:null,min:hn,max:-hn,idxs:[],path:null,clip:null};function rA(t,n,e,r,m){return e/10}const Lm={time:Rk,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},iA=Kn({},Lm,{time:!1,ori:1}),Om={};function Nm(t,n){let e=Om[t];return e||(e={key:t,plots:[],sub(r){e.plots.push(r)},unsub(r){e.plots=e.plots.filter(m=>m!=r)},pub(r,m,p,g,w,h,d){for(let a=0;a<e.plots.length;a++)e.plots[a]!=m&&e.plots[a].pub(r,m,p,g,w,h,d)}},t!=null&&(Om[t]=e)),e}const ia=1,lh=2;function ys(t,n,e){const r=t.mode,m=t.series[n],p=r==2?t._data[n]:t._data,g=t.scales,w=t.bbox;let h=p[0],d=r==2?p[1]:p[n],a=r==2?g[m.facets[0].scale]:g[t.series[0].scale],l=r==2?g[m.facets[1].scale]:g[m.scale],c=w.left,u=w.top,i=w.width,s=w.height,f=t.valToPosH,b=t.valToPosV;return a.ori==0?e(m,h,d,a,l,f,b,c,u,i,s,oc,oa,ac,Fm,Wm):e(m,h,d,a,l,b,f,u,c,s,i,sc,sa,hh,zm,Bm)}function ch(t,n){let e=0,r=0,m=Jt(t.bands,Zu);for(let p=0;p<m.length;p++){let g=m[p];g.series[0]==n?e=g.dir:g.series[1]==n&&(g.dir==1?r|=1:r|=2)}return[e,r==1?-1:r==2?1:r==3?2:0]}function oA(t,n,e,r,m){let p=t.mode,g=t.series[n],w=p==2?g.facets[1].scale:g.scale,h=t.scales[w];return m==-1?h.min:m==1?h.max:h.distr==3?h.dir==1?h.min:h.max:0}function Co(t,n,e,r,m,p){return ys(t,n,(g,w,h,d,a,l,c,u,i,s,f)=>{let b=g.pxRound;const x=d.dir*(d.ori==0?1:-1),I=d.ori==0?oa:sa;let R,A;x==1?(R=e,A=r):(R=r,A=e);let C=b(l(w[R],d,s,u)),O=b(c(h[R],a,f,i)),D=b(l(w[A],d,s,u)),E=b(c(p==1?a.max:a.min,a,f,i)),T=new Path2D(m);return I(T,D,E),I(T,C,E),I(T,C,O),T})}function ic(t,n,e,r,m,p){let g=null;if(t.length>0){g=new Path2D;const w=n==0?ac:hh;let h=e;for(let l=0;l<t.length;l++){let c=t[l];if(c[1]>c[0]){let u=c[0]-h;u>0&&w(g,h,r,u,r+p),h=c[1]}}let d=e+m-h,a=10;d>0&&w(g,h,r-a/2,d,r+p+a)}return g}function sA(t,n,e){let r=t[t.length-1];r&&r[0]==n?r[1]=e:t.push([n,e])}function uh(t,n,e,r,m,p,g){let w=[],h=t.length;for(let d=m==1?e:r;d>=e&&d<=r;d+=m)if(n[d]===null){let a=d,l=d;if(m==1)for(;++d<=r&&n[d]===null;)l=d;else for(;--d>=e&&n[d]===null;)l=d;let c=p(t[a]),u=l==a?c:p(t[l]),i=a-m;c=g<=0&&i>=0&&i<h?p(t[i]):c;let s=l+m;u=g>=0&&s>=0&&s<h?p(t[s]):u,u>=c&&w.push([c,u])}return w}function Dm(t){return t==0?Kg:t==1?rr:n=>ms(n,t)}function Pm(t){let n=t==0?oc:sc,e=t==0?(m,p,g,w,h,d)=>{m.arcTo(p,g,w,h,d)}:(m,p,g,w,h,d)=>{m.arcTo(g,p,h,w,d)},r=t==0?(m,p,g,w,h)=>{m.rect(p,g,w,h)}:(m,p,g,w,h)=>{m.rect(g,p,h,w)};return(m,p,g,w,h,d=0,a=0)=>{d==0&&a==0?r(m,p,g,w,h):(d=qi(d,w/2,h/2),a=qi(a,w/2,h/2),n(m,p+d,g),e(m,p+w,g,p+w,g+h,d),e(m,p+w,g+h,p,g+h,a),e(m,p,g+h,p,g,a),e(m,p,g,p+w,g,d),m.closePath())}}const oc=(t,n,e)=>{t.moveTo(n,e)},sc=(t,n,e)=>{t.moveTo(e,n)},oa=(t,n,e)=>{t.lineTo(n,e)},sa=(t,n,e)=>{t.lineTo(e,n)},ac=Pm(0),hh=Pm(1),Fm=(t,n,e,r,m,p)=>{t.arc(n,e,r,m,p)},zm=(t,n,e,r,m,p)=>{t.arc(e,n,r,m,p)},Wm=(t,n,e,r,m,p,g)=>{t.bezierCurveTo(n,e,r,m,p,g)},Bm=(t,n,e,r,m,p,g)=>{t.bezierCurveTo(e,n,m,r,g,p)};function jm(t){return(n,e,r,m,p)=>ys(n,e,(g,w,h,d,a,l,c,u,i,s,f)=>{let{pxRound:b,points:x}=g,I,R;d.ori==0?(I=oc,R=Fm):(I=sc,R=zm);const A=dn(x.width*Qt,3);let C=(x.size-x.width)/2*Qt,O=dn(C*2,3),D=new Path2D,E=new Path2D,{left:T,top:B,width:F,height:N}=n.bbox;ac(E,T-O,B-O,F+O*2,N+O*2);const $=k=>{if(h[k]!=null){let L=b(l(w[k],d,s,u)),W=b(c(h[k],a,f,i));I(D,L+C,W),R(D,L,W,C,0,Zl*2)}};if(p)p.forEach($);else for(let k=r;k<=m;k++)$(k);return{stroke:A>0?D:null,fill:D,clip:E,flags:ia|lh}})}function Hm(t){return(n,e,r,m,p,g)=>{r!=m&&(p!=r&&g!=r&&t(n,e,r),p!=m&&g!=m&&t(n,e,m),t(n,e,g))}}const aA=Hm(oa),lA=Hm(sa);function Um(t){const n=Jt(t?.alignGaps,0);return(e,r,m,p)=>ys(e,r,(g,w,h,d,a,l,c,u,i,s,f)=>{[m,p]=Yl(h,m,p);let b=g.pxRound,x=F=>b(l(F,d,s,u)),I=F=>b(c(F,a,f,i)),R,A;d.ori==0?(R=oa,A=aA):(R=sa,A=lA);const C=d.dir*(d.ori==0?1:-1),O={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ia},D=O.stroke;let E=!1;if(p-m>=s*4){let F=le=>e.posToVal(le,d.key,!0),N=null,$=null,k,L,W,U=x(w[C==1?m:p]),q=x(w[m]),Z=x(w[p]),Q=F(C==1?q+1:Z-1);for(let le=C==1?m:p;le>=m&&le<=p;le+=C){let ne=w[le],ce=(C==1?ne<Q:ne>Q)?U:x(ne),ae=h[le];ce==U?ae!=null?(L=ae,N==null?(R(D,ce,I(L)),k=N=$=L):L<N?N=L:L>$&&($=L)):ae===null&&(E=!0):(N!=null&&A(D,U,I(N),I($),I(k),I(L)),ae!=null?(L=ae,R(D,ce,I(L)),N=$=k=L):(N=$=null,ae===null&&(E=!0)),U=ce,Q=F(U+C))}N!=null&&N!=$&&W!=U&&A(D,U,I(N),I($),I(k),I(L))}else for(let F=C==1?m:p;F>=m&&F<=p;F+=C){let N=h[F];N===null?E=!0:N!=null&&R(D,x(w[F]),I(N))}let[T,B]=ch(e,r);if(g.fill!=null||T!=0){let F=O.fill=new Path2D(D),N=g.fillTo(e,r,g.min,g.max,T),$=I(N),k=x(w[m]),L=x(w[p]);C==-1&&([L,k]=[k,L]),R(F,L,$),R(F,k,$)}if(!g.spanGaps){let F=[];E&&F.push(...uh(w,h,m,p,C,x,n)),O.gaps=F=g.gaps(e,r,m,p,F),O.clip=ic(F,d.ori,u,i,s,f)}return B!=0&&(O.band=B==2?[Co(e,r,m,p,D,-1),Co(e,r,m,p,D,1)]:Co(e,r,m,p,D,B)),O})}function cA(t){const n=Jt(t.align,1),e=Jt(t.ascDesc,!1),r=Jt(t.alignGaps,0),m=Jt(t.extend,!1);return(p,g,w,h)=>ys(p,g,(d,a,l,c,u,i,s,f,b,x,I)=>{[w,h]=Yl(l,w,h);let R=d.pxRound,{left:A,width:C}=p.bbox,O=Z=>R(i(Z,c,x,f)),D=Z=>R(s(Z,u,I,b)),E=c.ori==0?oa:sa;const T={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ia},B=T.stroke,F=c.dir*(c.ori==0?1:-1);let N=D(l[F==1?w:h]),$=O(a[F==1?w:h]),k=$,L=$;m&&n==-1&&(L=A,E(B,L,N)),E(B,$,N);for(let Z=F==1?w:h;Z>=w&&Z<=h;Z+=F){let Q=l[Z];if(Q==null)continue;let le=O(a[Z]),ne=D(Q);n==1?E(B,le,N):E(B,k,ne),E(B,le,ne),N=ne,k=le}let W=k;m&&n==1&&(W=A+C,E(B,W,N));let[U,q]=ch(p,g);if(d.fill!=null||U!=0){let Z=T.fill=new Path2D(B),Q=d.fillTo(p,g,d.min,d.max,U),le=D(Q);E(Z,W,le),E(Z,L,le)}if(!d.spanGaps){let Z=[];Z.push(...uh(a,l,w,h,F,O,r));let Q=d.width*Qt/2,le=e||n==1?Q:-Q,ne=e||n==-1?-Q:Q;Z.forEach(ce=>{ce[0]+=le,ce[1]+=ne}),T.gaps=Z=d.gaps(p,g,w,h,Z),T.clip=ic(Z,c.ori,f,b,x,I)}return q!=0&&(T.band=q==2?[Co(p,g,w,h,B,-1),Co(p,g,w,h,B,1)]:Co(p,g,w,h,B,q)),T})}function Vm(t,n,e,r,m,p,g=hn){if(t.length>1){let w=null;for(let h=0,d=1/0;h<t.length;h++)if(n[h]!==void 0){if(w!=null){let a=nr(t[h]-t[w]);a<d&&(d=a,g=nr(e(t[h],r,m,p)-e(t[w],r,m,p)))}w=h}}return g}function uA(t){t=t||Ka;const n=Jt(t.size,[.6,hn,1]),e=t.align||0,r=t.gap||0;let m=t.radius;m=m==null?[0,0]:typeof m=="number"?[m,0]:m;const p=jt(m),g=1-n[0],w=Jt(n[1],hn),h=Jt(n[2],1),d=Jt(t.disp,Ka),a=Jt(t.each,u=>{}),{fill:l,stroke:c}=d;return(u,i,s,f)=>ys(u,i,(b,x,I,R,A,C,O,D,E,T,B)=>{let F=b.pxRound,N=e,$=r*Qt,k=w*Qt,L=h*Qt,W,U;R.ori==0?[W,U]=p(u,i):[U,W]=p(u,i);const q=R.dir*(R.ori==0?1:-1);let Z=R.ori==0?ac:hh,Q=R.ori==0?a:(Ge,$t,Xt,In,Un,sr,pn)=>{a(Ge,$t,Xt,Un,In,pn,sr)},le=Jt(u.bands,Zu).find(Ge=>Ge.series[0]==i),ne=le!=null?le.dir:0,ce=b.fillTo(u,i,b.min,b.max,ne),ae=F(O(ce,A,B,E)),de,me,$e,Re=T,Me=F(b.width*Qt),Xe=!1,qe=null,rt=null,st=null,et=null;l!=null&&(Me==0||c!=null)&&(Xe=!0,qe=l.values(u,i,s,f),rt=new Map,new Set(qe).forEach(Ge=>{Ge!=null&&rt.set(Ge,new Path2D)}),Me>0&&(st=c.values(u,i,s,f),et=new Map,new Set(st).forEach(Ge=>{Ge!=null&&et.set(Ge,new Path2D)})));let{x0:Wt,size:br}=d;if(Wt!=null&&br!=null){N=1,x=Wt.values(u,i,s,f),Wt.unit==2&&(x=x.map($t=>u.posToVal(D+$t*T,R.key,!0)));let Ge=br.values(u,i,s,f);br.unit==2?me=Ge[0]*T:me=C(Ge[0],R,T,D)-C(0,R,T,D),Re=Vm(x,I,C,R,T,D,Re),$e=Re-me+$}else Re=Vm(x,I,C,R,T,D,Re),$e=Re*g+$,me=Re-$e;$e<1&&($e=0),Me>=me/2&&(Me=0),$e<5&&(F=Kg);let At=$e>0,ir=Re-$e-(At?Me:0);me=F(Xu(ir,L,k)),de=(N==0?me/2:N==q?0:me)-N*q*((N==0?$/2:0)+(At?Me/2:0));const An={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},wr=Xe?null:new Path2D;let fn=null;if(le!=null)fn=u.data[le.series[1]];else{let{y0:Ge,y1:$t}=d;Ge!=null&&$t!=null&&(I=$t.values(u,i,s,f),fn=Ge.values(u,i,s,f))}let or=W*me,ht=U*me;for(let Ge=q==1?s:f;Ge>=s&&Ge<=f;Ge+=q){let $t=I[Ge];if($t==null)continue;if(fn!=null){let qt=fn[Ge]??0;if($t-qt==0)continue;ae=O(qt,A,B,E)}let Xt=R.distr!=2||d!=null?x[Ge]:Ge,In=C(Xt,R,T,D),Un=O(Jt($t,ce),A,B,E),sr=F(In-de),pn=F(Br(Un,ae)),zn=F(qi(Un,ae)),Ln=pn-zn;if($t!=null){let qt=$t<0?ht:or,nn=$t<0?or:ht;Xe?(Me>0&&st[Ge]!=null&&Z(et.get(st[Ge]),sr,zn+vi(Me/2),me,Br(0,Ln-Me),qt,nn),qe[Ge]!=null&&Z(rt.get(qe[Ge]),sr,zn+vi(Me/2),me,Br(0,Ln-Me),qt,nn)):Z(wr,sr,zn+vi(Me/2),me,Br(0,Ln-Me),qt,nn),Q(u,i,Ge,sr-Me/2,zn,me+Me,Ln)}}return Me>0?An.stroke=Xe?et:wr:Xe||(An._fill=b.width==0?b._fill:b._stroke??b._fill,An.width=0),An.fill=Xe?rt:wr,An})}function hA(t,n){const e=Jt(n?.alignGaps,0);return(r,m,p,g)=>ys(r,m,(w,h,d,a,l,c,u,i,s,f,b)=>{[p,g]=Yl(d,p,g);let x=w.pxRound,I=W=>x(c(W,a,f,i)),R=W=>x(u(W,l,b,s)),A,C,O;a.ori==0?(A=oc,O=oa,C=Wm):(A=sc,O=sa,C=Bm);const D=a.dir*(a.ori==0?1:-1);let E=I(h[D==1?p:g]),T=E,B=[],F=[];for(let W=D==1?p:g;W>=p&&W<=g;W+=D)if(d[W]!=null){let U=h[W],q=I(U);B.push(T=q),F.push(R(d[W]))}const N={stroke:t(B,F,A,O,C,x),fill:null,clip:null,band:null,gaps:null,flags:ia},$=N.stroke;let[k,L]=ch(r,m);if(w.fill!=null||k!=0){let W=N.fill=new Path2D($),U=w.fillTo(r,m,w.min,w.max,k),q=R(U);O(W,T,q),O(W,E,q)}if(!w.spanGaps){let W=[];W.push(...uh(h,d,p,g,D,I,e)),N.gaps=W=w.gaps(r,m,p,g,W),N.clip=ic(W,a.ori,i,s,f,b)}return L!=0&&(N.band=L==2?[Co(r,m,p,g,$,-1),Co(r,m,p,g,$,1)]:Co(r,m,p,g,$,L)),N})}function dA(t){return hA(fA,t)}function fA(t,n,e,r,m,p){const g=t.length;if(g<2)return null;const w=new Path2D;if(e(w,t[0],n[0]),g==2)r(w,t[1],n[1]);else{let h=Array(g),d=Array(g-1),a=Array(g-1),l=Array(g-1);for(let c=0;c<g-1;c++)a[c]=n[c+1]-n[c],l[c]=t[c+1]-t[c],d[c]=a[c]/l[c];h[0]=d[0];for(let c=1;c<g-1;c++)d[c]===0||d[c-1]===0||d[c-1]>0!=d[c]>0?h[c]=0:(h[c]=3*(l[c-1]+l[c])/((2*l[c]+l[c-1])/d[c-1]+(l[c]+2*l[c-1])/d[c]),isFinite(h[c])||(h[c]=0));h[g-1]=d[g-2];for(let c=0;c<g-1;c++)m(w,t[c]+l[c]/3,n[c]+h[c]*l[c]/3,t[c+1]-l[c]/3,n[c+1]-h[c+1]*l[c]/3,t[c+1],n[c+1])}return w}const dh=new Set;function Gm(){for(let t of dh)t.syncRect(!0)}Zs&&(ps(qk,Qs,Gm),ps(Kk,Qs,Gm,!0),ps(ql,Qs,()=>{Tr.pxRatio=Qt}));const pA=Um(),gA=jm();function qm(t,n,e,r){return(r?[t[0],t[1]].concat(t.slice(2)):[t[0]].concat(t.slice(1))).map((m,p)=>fh(m,p,n,e))}function mA(t,n){return t.map((e,r)=>r==0?{}:Kn({},n,e))}function fh(t,n,e,r){return Kn({},n==0?e:r,t)}function Km(t,n,e){return n==null?ta:[n,e]}const vA=Km;function yA(t,n,e){return n==null?ta:Xl(n,e,Ku,!0)}function Ym(t,n,e,r){return n==null?ta:Jl(n,e,t.scales[r].log,!1)}const bA=Ym;function Jm(t,n,e,r){return n==null?ta:qu(n,e,t.scales[r].log,!1)}const wA=Jm;function xA(t,n,e,r,m){let p=Br(Gg(t),Gg(n)),g=n-t,w=Gi(m/r*g,e);do{let h=e[w],d=r*h/g;if(d>=m&&p+(h<5?jo.get(h):0)<=17)return[h,d]}while(++w<e.length);return[0,0]}function Xm(t){let n,e;return t=t.replace(/(\d+)px/,(r,m)=>(n=rr((e=+m)*Qt))+"px"),[t,n,e]}function CA(t){t.show&&[t.font,t.labelFont].forEach(n=>{let e=dn(n[2]*Qt,1);n[0]=n[0].replace(/[0-9.]+px/,e+"px"),n[1]=e})}function Tr(t,n,e){const r={mode:Jt(t.mode,1)},m=r.mode;function p(V,J,ie,se){let pe=J.valToPct(V);return se+ie*(J.dir==-1?1-pe:pe)}function g(V,J,ie,se){let pe=J.valToPct(V);return se+ie*(J.dir==-1?pe:1-pe)}function w(V,J,ie,se){return J.ori==0?p(V,J,ie,se):g(V,J,ie,se)}r.valToPosH=p,r.valToPosV=g;let h=!1;r.status=0;const d=r.root=Mi(Mk);if(t.id!=null&&(d.id=t.id),gi(d,t.class),t.title){let V=Mi(Ik,d);V.textContent=t.title}const a=Vi("canvas"),l=r.ctx=a.getContext("2d"),c=Mi(Lk,d);ps("click",c,V=>{V.target===i&&(at!=Li||Ht!=go)&&Wn.click(r,V)},!0);const u=r.under=Mi(Ok,c);c.appendChild(a);const i=r.over=Mi(Nk,c);t=na(t);const s=+Jt(t.pxAlign,1),f=Dm(s);(t.plugins||[]).forEach(V=>{V.opts&&(t=V.opts(r,t)||t)});const b=t.ms||.001,x=r.series=m==1?qm(t.series||[],Am,Im,!1):mA(t.series||[null],Em),I=r.axes=qm(t.axes||[],_m,Rm,!0),R=r.scales={},A=r.bands=t.bands||[];A.forEach(V=>{V.fill=jt(V.fill||null),V.dir=Jt(V.dir,-1)});const C=m==2?x[1].facets[0].scale:x[0].scale,O={axes:Ko,series:Rs},D=(t.drawOrder||["axes","series"]).map(V=>O[V]);function E(V){const J=V.distr==3?ie=>xo(ie>0?ie:V.clamp(r,ie,V.min,V.max,V.key)):V.distr==4?ie=>Ju(ie,V.asinh):V.distr==100?ie=>V.fwd(ie):ie=>ie;return ie=>{let se=J(ie),{_min:pe,_max:xe}=V,Te=xe-pe;return(se-pe)/Te}}function T(V){let J=R[V];if(J==null){let ie=(t.scales||Ka)[V]||Ka;if(ie.from!=null){T(ie.from);let se=Kn({},R[ie.from],ie,{key:V});se.valToPct=E(se),R[V]=se}else{J=R[V]=Kn({},V==C?Lm:iA,ie),J.key=V;let se=J.time,pe=J.range,xe=Ho(pe);if((V!=C||m==2&&!se)&&(xe&&(pe[0]==null||pe[1]==null)&&(pe={min:pe[0]==null?jg:{mode:1,hard:pe[0],soft:pe[0]},max:pe[1]==null?jg:{mode:1,hard:pe[1],soft:pe[1]}},xe=!1),!xe&&ec(pe))){let Te=pe;pe=(Fe,We,He)=>We==null?ta:Xl(We,He,Te)}J.range=jt(pe||(se?vA:V==C?J.distr==3?bA:J.distr==4?wA:Km:J.distr==3?Ym:J.distr==4?Jm:yA)),J.auto=jt(xe?!1:J.auto),J.clamp=jt(J.clamp||rA),J._min=J._max=null,J.valToPct=E(J)}}}T("x"),T("y"),m==1&&x.forEach(V=>{T(V.scale)}),I.forEach(V=>{T(V.scale)});for(let V in t.scales)T(V);const B=R[C],F=B.distr;let N,$;B.ori==0?(gi(d,Tk),N=p,$=g):(gi(d,Ek),N=g,$=p);const k={};for(let V in R){let J=R[V];(J.min!=null||J.max!=null)&&(k[V]={min:J.min,max:J.max},J.min=J.max=null)}const L=t.tzDate||(V=>new Date(rr(V/b))),W=t.fmtDate||Qu,U=b==1?T_(L):L_(L),q=mm(L,gm(b==1?M_:I_,W)),Z=ym(L,vm(N_,W)),Q=[],le=r.legend=Kn({},F_,t.legend),ne=r.cursor=Kn({},U_,{drag:{y:m==2}},t.cursor),ce=le.show,ae=ne.show,de=le.markers;le.idxs=Q,de.width=jt(de.width),de.dash=jt(de.dash),de.stroke=jt(de.stroke),de.fill=jt(de.fill);let me,$e,Re,Me=[],Xe=[],qe,rt=!1,st={};if(le.live){const V=x[1]?x[1].values:null;rt=V!=null,qe=rt?V(r,1,0):{_:0};for(let J in qe)st[J]=Bu}if(ce)if(me=Vi("table",Bk,d),Re=Vi("tbody",null,me),le.mount(r,me),rt){$e=Vi("thead",null,me,Re);let V=Vi("tr",null,$e);Vi("th",null,V);for(var et in qe)Vi("th",Sg,V).textContent=et}else gi(me,Hk),le.live&&gi(me,jk);const Wt={show:!0},br={show:!1};function At(V,J){if(J==0&&(rt||!le.live||m==2))return ta;let ie=[],se=Vi("tr",Uk,Re,Re.childNodes[J]);gi(se,V.class),V.show||gi(se,fs);let pe=Vi("th",null,se);if(de.show){let Fe=Mi(Vk,pe);if(J>0){let We=de.width(r,J);We&&(Fe.style.border=We+"px "+de.dash(r,J)+" "+de.stroke(r,J)),Fe.style.background=de.fill(r,J)}}let xe=Mi(Sg,pe);V.label instanceof HTMLElement?xe.appendChild(V.label):xe.textContent=V.label,J>0&&(de.show||(xe.style.color=V.width>0?de.stroke(r,J):de.fill(r,J)),An("click",pe,Fe=>{if(ne._lock)return;si(Fe);let We=x.indexOf(V);if((Fe.ctrlKey||Fe.metaKey)!=le.isolate){let He=x.some((Ke,Ze)=>Ze>0&&Ze!=We&&Ke.show);x.forEach((Ke,Ze)=>{Ze>0&&Zn(Ze,He?Ze==We?Wt:br:Wt,!0,Ct.setSeries)})}else Zn(We,{show:!V.show},!0,Ct.setSeries)},!1),Lr&&An(Tg,pe,Fe=>{ne._lock||(si(Fe),Zn(x.indexOf(V),Di,!0,Ct.setSeries))},!1));for(var Te in qe){let Fe=Vi("td",Gk,se);Fe.textContent="--",ie.push(Fe)}return[se,ie]}const ir=new Map;function An(V,J,ie,se=!0){const pe=ir.get(J)||{},xe=ne.bind[V](r,J,ie,se);xe&&(ps(V,J,pe[V]=xe),ir.set(J,pe))}function wr(V,J,ie){const se=ir.get(J)||{};for(let pe in se)(V==null||pe==V)&&(Gu(pe,J,se[pe]),delete se[pe]);V==null&&ir.delete(J)}let fn=0,or=0,ht=0,Ge=0,$t=0,Xt=0,In=$t,Un=Xt,sr=ht,pn=Ge,zn=0,Ln=0,qt=0,nn=0;r.bbox={};let Ir=!1,Vr=!1,xr=!1,yi=!1,bi=!1,Xn=!1;function Yi(V,J,ie){(ie||V!=r.width||J!=r.height)&&Gr(V,J),Xi(!1),xr=!0,Vr=!0,po()}function Gr(V,J){r.width=fn=ht=V,r.height=or=Ge=J,$t=Xt=0,wi(),ko();let ie=r.bbox;zn=ie.left=ms($t*Qt,.5),Ln=ie.top=ms(Xt*Qt,.5),qt=ie.width=ms(ht*Qt,.5),nn=ie.height=ms(Ge*Qt,.5)}const Cs=3;function qr(){let V=!1,J=0;for(;!V;){J++;let ie=ma(J),se=va(J);V=J==Cs||ie&&se,V||(Gr(r.width,r.height),Vr=!0)}}function Cn({width:V,height:J}){Yi(V,J)}r.setSize=Cn;function wi(){let V=!1,J=!1,ie=!1,se=!1;I.forEach((pe,xe)=>{if(pe.show&&pe._show){let{side:Te,_size:Fe}=pe,We=Te%2,He=pe.label!=null?pe.labelSize:0,Ke=Fe+He;Ke>0&&(We?(ht-=Ke,Te==3?($t+=Ke,se=!0):ie=!0):(Ge-=Ke,Te==0?(Xt+=Ke,V=!0):J=!0))}}),li[0]=V,li[1]=ie,li[2]=J,li[3]=se,ht-=ar[1]+ar[3],$t+=ar[3],Ge-=ar[2]+ar[0],Xt+=ar[0]}function ko(){let V=$t+ht,J=Xt+Ge,ie=$t,se=Xt;function pe(xe,Te){switch(xe){case 1:return V+=Te,V-Te;case 2:return J+=Te,J-Te;case 3:return ie-=Te,ie+Te;case 0:return se-=Te,se+Te}}I.forEach((xe,Te)=>{if(xe.show&&xe._show){let Fe=xe.side;xe._pos=pe(Fe,xe._size),xe.label!=null&&(xe._lpos=pe(Fe,xe.labelSize))}})}if(ne.dataIdx==null){let V=ne.hover,J=V.skip=new Set(V.skip??[]);J.add(void 0);let ie=V.prox=jt(V.prox),se=V.bias??=0;ne.dataIdx=(pe,xe,Te,Fe)=>{if(xe==0)return Te;let We=Te,He=ie(pe,xe,Te,Fe)??hn,Ke=He>=0&&He<hn,Ze=B.ori==0?ht:Ge,xt=ne.left,Yt=n[0],Pt=n[xe];if(J.has(Pt[Te])){We=null;let yt=null,dt=null,ot;if(se==0||se==-1)for(ot=Te;yt==null&&ot-- >0;)J.has(Pt[ot])||(yt=ot);if(se==0||se==1)for(ot=Te;dt==null&&ot++<Pt.length;)J.has(Pt[ot])||(dt=ot);if(yt!=null||dt!=null)if(Ke){let vn=yt==null?-1/0:N(Yt[yt],B,Ze,0),Mn=dt==null?1/0:N(Yt[dt],B,Ze,0),er=xt-vn,on=Mn-xt;er<=on?er<=He&&(We=yt):on<=He&&(We=dt)}else We=dt==null?yt:yt==null?dt:Te-yt<=dt-Te?yt:dt}else Ke&&nr(xt-N(Yt[Te],B,Ze,0))>He&&(We=null);return We}}const si=V=>{ne.event=V};ne.idxs=Q,ne._lock=!1;let kn=ne.points;kn.show=jt(kn.show),kn.size=jt(kn.size),kn.stroke=jt(kn.stroke),kn.width=jt(kn.width),kn.fill=jt(kn.fill);const Cr=r.focus=Kn({},t.focus||{alpha:.3},ne.focus),Lr=Cr.prox>=0,On=Lr&&kn.one;let yn=[],pr=[],ai=[];function ao(V,J){let ie=kn.show(r,J);if(ie instanceof HTMLElement)return gi(ie,Wk),gi(ie,V.class),so(ie,-10,-10,ht,Ge),i.insertBefore(ie,yn[J]),ie}function lo(V,J){if(m==1||J>0){let ie=m==1&&R[V.scale].time,se=V.value;V.value=ie?tm(se)?ym(L,vm(se,W)):se||Z:se||eA,V.label=V.label||(ie?G_:V_)}if(On||J>0){V.width=V.width==null?1:V.width,V.paths=V.paths||pA||i_,V.fillTo=jt(V.fillTo||oA),V.pxAlign=+Jt(V.pxAlign,s),V.pxRound=Dm(V.pxAlign),V.stroke=jt(V.stroke||null),V.fill=jt(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let ie=tA(Br(1,V.width),1),se=V.points=Kn({},{size:ie,width:Br(1,ie*.2),stroke:V.stroke,space:ie*2,paths:gA,_stroke:null,_fill:null},V.points);se.show=jt(se.show),se.filter=jt(se.filter),se.fill=jt(se.fill),se.stroke=jt(se.stroke),se.paths=jt(se.paths),se.pxAlign=V.pxAlign}if(ce){let ie=At(V,J);Me.splice(J,0,ie[0]),Xe.splice(J,0,ie[1]),le.values.push(null)}if(ae){Q.splice(J,0,null);let ie=null;On?J==0&&(ie=ao(V,J)):J>0&&(ie=ao(V,J)),yn.splice(J,0,ie),pr.splice(J,0,0),ai.splice(J,0,0)}Qe("addSeries",J)}function _o(V,J){J=J??x.length,V=m==1?fh(V,J,Am,Im):fh(V,J,{},Em),x.splice(J,0,V),lo(x[J],J)}r.addSeries=_o;function Or(V){if(x.splice(V,1),ce){le.values.splice(V,1),Xe.splice(V,1);let J=Me.splice(V,1)[0];wr(null,J.firstChild),J.remove()}ae&&(Q.splice(V,1),yn.splice(V,1)[0].remove(),pr.splice(V,1),ai.splice(V,1)),Qe("delSeries",V)}r.delSeries=Or;const li=[!1,!1,!1,!1];function Kr(V,J){if(V._show=V.show,V.show){let ie=V.side%2,se=R[V.scale];se==null&&(V.scale=ie?x[1].scale:C,se=R[V.scale]);let pe=se.time;V.size=jt(V.size),V.space=jt(V.space),V.rotate=jt(V.rotate),Ho(V.incrs)&&V.incrs.forEach(Te=>{!jo.has(Te)&&jo.set(Te,Qg(Te))}),V.incrs=jt(V.incrs||(se.distr==2?S_:pe?b==1?R_:E_:vs)),V.splits=jt(V.splits||(pe&&se.distr==1?U:se.distr==3?sh:se.distr==4?Y_:K_)),V.stroke=jt(V.stroke),V.grid.stroke=jt(V.grid.stroke),V.ticks.stroke=jt(V.ticks.stroke),V.border.stroke=jt(V.border.stroke);let xe=V.values;V.values=Ho(xe)&&!Ho(xe[0])?jt(xe):pe?Ho(xe)?mm(L,gm(xe,W)):tm(xe)?O_(L,xe):xe||q:xe||q_,V.filter=jt(V.filter||(se.distr>=3&&se.log==10?Z_:se.distr==3&&se.log==2?Q_:Yg)),V.font=Xm(V.font),V.labelFont=Xm(V.labelFont),V._size=V.size(r,null,J,0),V._space=V._rotate=V._incrs=V._found=V._splits=V._values=null,V._size>0&&(li[J]=!0,V._el=Mi(Dk,c))}}function Nt(V,J,ie,se){let[pe,xe,Te,Fe]=ie,We=J%2,He=0;return We==0&&(Fe||xe)&&(He=J==0&&!pe||J==2&&!Te?rr(_m.size/3):0),We==1&&(pe||Te)&&(He=J==1&&!xe||J==3&&!Fe?rr(Rm.size/2):0),He}const Ao=r.padding=(t.padding||[Nt,Nt,Nt,Nt]).map(V=>jt(Jt(V,Nt))),ar=r._padding=Ao.map((V,J)=>V(r,J,li,0));let Sn,oe=null,Ne=null;const Be=m==1?x[0].idxs:null;let bt=null,gn=!1;function Vt(V,J){if(n=V??[],r.data=r._data=n,m==2){Sn=0;for(let ie=1;ie<x.length;ie++)Sn+=n[ie][0].length}else{n.length==0&&(r.data=r._data=n=[[]]),bt=n[0],Sn=bt.length;let ie=n;if(F==2){ie=n.slice();let se=ie[0]=Array(Sn);for(let pe=0;pe<Sn;pe++)se[pe]=pe}r._data=n=ie}if(Xi(!0),Qe("setData"),F==2&&(xr=!0),J!==!1){let ie=B;ie.auto(r,gn)?kr():Dr(C,ie.min,ie.max),yi=yi||ne.left>=0,Xn=!0,po()}}r.setData=Vt;function kr(){gn=!0;let V,J;m==1&&(Sn>0?(oe=Be[0]=0,Ne=Be[1]=Sn-1,V=n[0][oe],J=n[0][Ne],F==2?(V=oe,J=Ne):V==J&&(F==3?[V,J]=Jl(V,V,B.log,!1):F==4?[V,J]=qu(V,V,B.log,!1):B.time?J=V+rr(86400/b):[V,J]=Xl(V,J,Ku,!0))):(oe=Be[0]=V=null,Ne=Be[1]=J=null)),Dr(C,V,J)}let Vn,cn,gr,mn,mr,co,ks,_s,As,lr;function Ss(V,J,ie,se,pe,xe){V??=Rg,ie??=Zu,se??="butt",pe??=Rg,xe??="round",V!=Vn&&(l.strokeStyle=Vn=V),pe!=cn&&(l.fillStyle=cn=pe),J!=gr&&(l.lineWidth=gr=J),xe!=mr&&(l.lineJoin=mr=xe),se!=co&&(l.lineCap=co=se),ie!=mn&&l.setLineDash(mn=ie)}function Uo(V,J,ie,se){J!=cn&&(l.fillStyle=cn=J),V!=ks&&(l.font=ks=V),ie!=_s&&(l.textAlign=_s=ie),se!=As&&(l.textBaseline=As=se)}function uo(V,J,ie,se,pe=0){if(se.length>0&&V.auto(r,gn)&&(J==null||J.min==null)){let xe=Jt(oe,0),Te=Jt(Ne,se.length-1),Fe=ie.min==null?Zk(se,xe,Te,pe,V.distr==3):[ie.min,ie.max];V.min=qi(V.min,ie.min=Fe[0]),V.max=Br(V.max,ie.max=Fe[1])}}const $s={min:null,max:null};function Vo(){for(let se in R){let pe=R[se];k[se]==null&&(pe.min==null||k[C]!=null&&pe.auto(r,gn))&&(k[se]=$s)}for(let se in R){let pe=R[se];k[se]==null&&pe.from!=null&&k[pe.from]!=null&&(k[se]=$s)}k[C]!=null&&Xi(!0);let V={};for(let se in k){let pe=k[se];if(pe!=null){let xe=V[se]=na(R[se],a_);if(pe.min!=null)Kn(xe,pe);else if(se!=C||m==2)if(Sn==0&&xe.from==null){let Te=xe.range(r,null,null,se);xe.min=Te[0],xe.max=Te[1]}else xe.min=hn,xe.max=-hn}}if(Sn>0){x.forEach((se,pe)=>{if(m==1){let xe=se.scale,Te=k[xe];if(Te==null)return;let Fe=V[xe];if(pe==0){let We=Fe.range(r,Fe.min,Fe.max,xe);Fe.min=We[0],Fe.max=We[1],oe=Gi(Fe.min,n[0]),Ne=Gi(Fe.max,n[0]),Ne-oe>1&&(n[0][oe]<Fe.min&&oe++,n[0][Ne]>Fe.max&&Ne--),se.min=bt[oe],se.max=bt[Ne]}else se.show&&se.auto&&uo(Fe,Te,se,n[pe],se.sorted);se.idxs[0]=oe,se.idxs[1]=Ne}else if(pe>0&&se.show&&se.auto){let[xe,Te]=se.facets,Fe=xe.scale,We=Te.scale,[He,Ke]=n[pe],Ze=V[Fe],xt=V[We];Ze!=null&&uo(Ze,k[Fe],xe,He,xe.sorted),xt!=null&&uo(xt,k[We],Te,Ke,Te.sorted),se.min=Te.min,se.max=Te.max}});for(let se in V){let pe=V[se],xe=k[se];if(pe.from==null&&(xe==null||xe.min==null)){let Te=pe.range(r,pe.min==hn?null:pe.min,pe.max==-hn?null:pe.max,se);pe.min=Te[0],pe.max=Te[1]}}}for(let se in V){let pe=V[se];if(pe.from!=null){let xe=V[pe.from];if(xe.min==null)pe.min=pe.max=null;else{let Te=pe.range(r,xe.min,xe.max,se);pe.min=Te[0],pe.max=Te[1]}}}let J={},ie=!1;for(let se in V){let pe=V[se],xe=R[se];if(xe.min!=pe.min||xe.max!=pe.max){xe.min=pe.min,xe.max=pe.max;let Te=xe.distr;xe._min=Te==3?xo(xe.min):Te==4?Ju(xe.min,xe.asinh):Te==100?xe.fwd(xe.min):xe.min,xe._max=Te==3?xo(xe.max):Te==4?Ju(xe.max,xe.asinh):Te==100?xe.fwd(xe.max):xe.max,J[se]=ie=!0}}if(ie){x.forEach((se,pe)=>{m==2?pe>0&&J.y&&(se._paths=null):J[se.scale]&&(se._paths=null)});for(let se in J)xr=!0,Qe("setScale",se);ae&&ne.left>=0&&(yi=Xn=!0)}for(let se in k)k[se]=null}function So(V){let J=Xu(oe-1,0,Sn-1),ie=Xu(Ne+1,0,Sn-1);for(;V[J]==null&&J>0;)J--;for(;V[ie]==null&&ie<Sn-1;)ie++;return[J,ie]}function Rs(){if(Sn>0){let V=x.some(J=>J._focus)&&lr!=Cr.alpha;V&&(l.globalAlpha=lr=Cr.alpha),x.forEach((J,ie)=>{if(ie>0&&J.show&&(Ms(ie,!1),Ms(ie,!0),J._paths==null)){let se=lr;lr!=J.alpha&&(l.globalAlpha=lr=J.alpha);let pe=m==2?[0,n[ie][0].length-1]:So(n[ie]);J._paths=J.paths(r,ie,pe[0],pe[1]),lr!=se&&(l.globalAlpha=lr=se)}}),x.forEach((J,ie)=>{if(ie>0&&J.show){let se=lr;lr!=J.alpha&&(l.globalAlpha=lr=J.alpha),J._paths!=null&&Go(ie,!1);{let pe=J._paths!=null?J._paths.gaps:null,xe=J.points.show(r,ie,oe,Ne,pe),Te=J.points.filter(r,ie,xe,pe);(xe||Te)&&(J.points._paths=J.points.paths(r,ie,oe,Ne,Te),Go(ie,!0))}lr!=se&&(l.globalAlpha=lr=se),Qe("drawSeries",ie)}}),V&&(l.globalAlpha=lr=1)}}function Ms(V,J){let ie=J?x[V].points:x[V];ie._stroke=ie.stroke(r,V),ie._fill=ie.fill(r,V)}function Go(V,J){let ie=J?x[V].points:x[V],{stroke:se,fill:pe,clip:xe,flags:Te,_stroke:Fe=ie._stroke,_fill:We=ie._fill,_width:He=ie.width}=ie._paths;He=dn(He*Qt,3);let Ke=null,Ze=He%2/2;J&&We==null&&(We=He>0?"#fff":Fe);let xt=ie.pxAlign==1&&Ze>0;if(xt&&l.translate(Ze,Ze),!J){let Yt=zn-He/2,Pt=Ln-He/2,yt=qt+He,dt=nn+He;Ke=new Path2D,Ke.rect(Yt,Pt,yt,dt)}J?qo(Fe,He,ie.dash,ie.cap,We,se,pe,Te,xe):ga(V,Fe,He,ie.dash,ie.cap,We,se,pe,Te,Ke,xe),xt&&l.translate(-Ze,-Ze)}function ga(V,J,ie,se,pe,xe,Te,Fe,We,He,Ke){let Ze=!1;We!=0&&A.forEach((xt,Yt)=>{if(xt.series[0]==V){let Pt=x[xt.series[1]],yt=n[xt.series[1]],dt=(Pt._paths||Ka).band;Ho(dt)&&(dt=xt.dir==1?dt[0]:dt[1]);let ot,vn=null;Pt.show&&dt&&e_(yt,oe,Ne)?(vn=xt.fill(r,Yt)||xe,ot=Pt._paths.clip):dt=null,qo(J,ie,se,pe,vn,Te,Fe,We,He,Ke,ot,dt),Ze=!0}}),Ze||qo(J,ie,se,pe,xe,Te,Fe,We,He,Ke)}const ho=ia|lh;function qo(V,J,ie,se,pe,xe,Te,Fe,We,He,Ke,Ze){Ss(V,J,ie,se,pe),(We||He||Ze)&&(l.save(),We&&l.clip(We),He&&l.clip(He)),Ze?(Fe&ho)==ho?(l.clip(Ze),Ke&&l.clip(Ke),cr(pe,Te),Ji(V,xe,J)):Fe&lh?(cr(pe,Te),l.clip(Ze),Ji(V,xe,J)):Fe&ia&&(l.save(),l.clip(Ze),Ke&&l.clip(Ke),cr(pe,Te),l.restore(),Ji(V,xe,J)):(cr(pe,Te),Ji(V,xe,J)),(We||He||Ze)&&l.restore()}function Ji(V,J,ie){ie>0&&(J instanceof Map?J.forEach((se,pe)=>{l.strokeStyle=Vn=pe,l.stroke(se)}):J!=null&&V&&l.stroke(J))}function cr(V,J){J instanceof Map?J.forEach((ie,se)=>{l.fillStyle=cn=se,l.fill(ie)}):J!=null&&V&&l.fill(J)}function Ts(V,J,ie,se){let pe=I[V],xe;if(se<=0)xe=[0,0];else{let Te=pe._space=pe.space(r,V,J,ie,se),Fe=pe._incrs=pe.incrs(r,V,J,ie,se,Te);xe=xA(J,ie,Fe,se,Te)}return pe._found=xe}function Yr(V,J,ie,se,pe,xe,Te,Fe,We,He){let Ke=Te%2/2;s==1&&l.translate(Ke,Ke),Ss(Fe,Te,We,He,Fe),l.beginPath();let Ze,xt,Yt,Pt,yt=pe+(se==0||se==3?-xe:xe);ie==0?(xt=pe,Pt=yt):(Ze=pe,Yt=yt);for(let dt=0;dt<V.length;dt++)J[dt]!=null&&(ie==0?Ze=Yt=V[dt]:xt=Pt=V[dt],l.moveTo(Ze,xt),l.lineTo(Yt,Pt));l.stroke(),s==1&&l.translate(-Ke,-Ke)}function ma(V){let J=!0;return I.forEach((ie,se)=>{if(!ie.show)return;let pe=R[ie.scale];if(pe.min==null){ie._show&&(J=!1,ie._show=!1,Xi(!1));return}else ie._show||(J=!1,ie._show=!0,Xi(!1));let xe=ie.side,Te=xe%2,{min:Fe,max:We}=pe,[He,Ke]=Ts(se,Fe,We,Te==0?ht:Ge);if(Ke==0)return;let Ze=pe.distr==2,xt=ie._splits=ie.splits(r,se,Fe,We,He,Ke,Ze),Yt=pe.distr==2?xt.map(ot=>bt[ot]):xt,Pt=pe.distr==2?bt[xt[1]]-bt[xt[0]]:He,yt=ie._values=ie.values(r,ie.filter(r,Yt,se,Ke,Pt),se,Ke,Pt);ie._rotate=xe==2?ie.rotate(r,yt,se,Ke):0;let dt=ie._size;ie._size=Ti(ie.size(r,yt,se,V)),dt!=null&&ie._size!=dt&&(J=!1)}),J}function va(V){let J=!0;return Ao.forEach((ie,se)=>{let pe=ie(r,se,li,V);pe!=ar[se]&&(J=!1),ar[se]=pe}),J}function Ko(){for(let V=0;V<I.length;V++){let J=I[V];if(!J.show||!J._show)continue;let ie=J.side,se=ie%2,pe,xe,Te=J.stroke(r,V),Fe=ie==0||ie==3?-1:1,[We,He]=J._found;if(J.label!=null){let Ar=J.labelGap*Fe,wn=rr((J._lpos+Ar)*Qt);Uo(J.labelFont[0],Te,"center",ie==2?Va:$g),l.save(),se==1?(pe=xe=0,l.translate(wn,rr(Ln+nn/2)),l.rotate((ie==3?-Zl:Zl)/2)):(pe=rr(zn+qt/2),xe=wn);let Pi=qg(J.label)?J.label(r,V,We,He):J.label;l.fillText(Pi,pe,xe),l.restore()}if(He==0)continue;let Ke=R[J.scale],Ze=se==0?qt:nn,xt=se==0?zn:Ln,Yt=J._splits,Pt=Ke.distr==2?Yt.map(Ar=>bt[Ar]):Yt,yt=Ke.distr==2?bt[Yt[1]]-bt[Yt[0]]:We,dt=J.ticks,ot=J.border,vn=dt.show?dt.size:0,Mn=rr(vn*Qt),er=rr((J.alignTo==2?J._size-vn-J.gap:J.gap)*Qt),on=J._rotate*-Zl/180,un=f(J._pos*Qt),ge=(Mn+er)*Fe,Se=un+ge;xe=se==0?Se:0,pe=se==1?Se:0;let ke=J.font[0],Ue=J.align==1?Xs:J.align==2?Pu:on>0?Xs:on<0?Pu:se==0?"center":ie==3?Pu:Xs,ct=on||se==1?"middle":ie==2?Va:$g;Uo(ke,Te,Ue,ct);let _t=J.font[1]*J.lineGap,Zt=Yt.map(Ar=>f(w(Ar,Ke,Ze,xt))),Ft=J._values;for(let Ar=0;Ar<Ft.length;Ar++){let wn=Ft[Ar];if(wn!=null){se==0?pe=Zt[Ar]:xe=Zt[Ar],wn=""+wn;let Pi=wn.indexOf(`
1480
+ `)==-1?[wn]:wn.split(/\n/gm);for(let Sr=0;Sr<Pi.length;Sr++){let To=Pi[Sr];on?(l.save(),l.translate(pe,xe+Sr*_t),l.rotate(on),l.fillText(To,0,0),l.restore()):l.fillText(To,pe,xe+Sr*_t)}}}dt.show&&Yr(Zt,dt.filter(r,Pt,V,He,yt),se,ie,un,Mn,dn(dt.width*Qt,3),dt.stroke(r,V),dt.dash,dt.cap);let ui=J.grid;ui.show&&Yr(Zt,ui.filter(r,Pt,V,He,yt),se,se==0?2:1,se==0?Ln:zn,se==0?nn:qt,dn(ui.width*Qt,3),ui.stroke(r,V),ui.dash,ui.cap),ot.show&&Yr([un],[1],se==0?1:0,se==0?1:2,se==1?Ln:zn,se==1?nn:qt,dn(ot.width*Qt,3),ot.stroke(r,V),ot.dash,ot.cap)}Qe("drawAxes")}function Xi(V){x.forEach((J,ie)=>{ie>0&&(J._paths=null,V&&(m==1?(J.min=null,J.max=null):J.facets.forEach(se=>{se.min=null,se.max=null})))})}let $o=!1,Yo=!1,fo=[];function ya(){Yo=!1;for(let V=0;V<fo.length;V++)Qe(...fo[V]);fo.length=0}function po(){$o||(p_(Es),$o=!0)}function ze(V,J=!1){$o=!0,Yo=J,V(r),Es(),J&&fo.length>0&&queueMicrotask(ya)}r.batch=ze;function Es(){if(Ir&&(Vo(),Ir=!1),xr&&(qr(),xr=!1),Vr){if(xn(u,Xs,$t),xn(u,Va,Xt),xn(u,Ha,ht),xn(u,Ua,Ge),xn(i,Xs,$t),xn(i,Va,Xt),xn(i,Ha,ht),xn(i,Ua,Ge),xn(c,Ha,fn),xn(c,Ua,or),a.width=rr(fn*Qt),a.height=rr(or*Qt),I.forEach(({_el:V,_show:J,_size:ie,_pos:se,side:pe})=>{if(V!=null)if(J){let xe=pe===3||pe===0?ie:0,Te=pe%2==1;xn(V,Te?"left":"top",se-xe),xn(V,Te?"width":"height",ie),xn(V,Te?"top":"left",Te?Xt:$t),xn(V,Te?"height":"width",Te?Ge:ht),Uu(V,fs)}else gi(V,fs)}),Vn=cn=gr=mr=co=ks=_s=As=mn=null,lr=1,z(!0),$t!=In||Xt!=Un||ht!=sr||Ge!=pn){Xi(!1);let V=ht/sr,J=Ge/pn;if(ae&&!yi&&ne.left>=0){ne.left*=V,ne.top*=J,Zi&&so(Zi,rr(ne.left),0,ht,Ge),Dn&&so(Dn,0,rr(ne.top),ht,Ge);for(let ie=0;ie<yn.length;ie++){let se=yn[ie];se!=null&&(pr[ie]*=V,ai[ie]*=J,so(se,Ti(pr[ie]),Ti(ai[ie]),ht,Ge))}}if(wt.show&&!bi&&wt.left>=0&&wt.width>0){wt.left*=V,wt.width*=V,wt.top*=J,wt.height*=J;for(let ie in Y)xn(Nr,ie,wt[ie])}In=$t,Un=Xt,sr=ht,pn=Ge}Qe("setSize"),Vr=!1}fn>0&&or>0&&(l.clearRect(0,0,a.width,a.height),Qe("drawClear"),D.forEach(V=>V()),Qe("draw")),wt.show&&bi&&(Ni(wt),bi=!1),ae&&yi&&(_(null,!0,!1),yi=!1),le.show&&le.live&&Xn&&(y(),Xn=!1),h||(h=!0,r.status=1,Qe("ready")),gn=!1,$o=!1}r.redraw=(V,J)=>{xr=J||!1,V!==!1?Dr(C,B.min,B.max):po()};function De(V,J){let ie=R[V];if(ie.from==null){if(Sn==0){let se=ie.range(r,J.min,J.max,V);J.min=se[0],J.max=se[1]}if(J.min>J.max){let se=J.min;J.min=J.max,J.max=se}if(Sn>1&&J.min!=null&&J.max!=null&&J.max-J.min<1e-16)return;V==C&&ie.distr==2&&Sn>0&&(J.min=Gi(J.min,n[0]),J.max=Gi(J.max,n[0]),J.min==J.max&&J.max++),k[V]=J,Ir=!0,po()}}r.setScale=De;let Nn,Ro,Zi,Dn,ba,Mo,Li,go,Is,en,at,Ht,Oi=!1;const Wn=ne.drag;let je=Wn.x,bn=Wn.y;ae&&(ne.x&&(Nn=Mi(Fk,i)),ne.y&&(Ro=Mi(zk,i)),B.ori==0?(Zi=Nn,Dn=Ro):(Zi=Ro,Dn=Nn),at=ne.left,Ht=ne.top);const wt=r.select=Kn({show:!0,over:!0,left:0,width:0,top:0,height:0},t.select),Nr=wt.show?Mi(Pk,wt.over?i:u):null;function Ni(V,J){if(wt.show){for(let ie in V)wt[ie]=V[ie],ie in Y&&xn(Nr,ie,V[ie]);J!==!1&&Qe("setSelect")}}r.setSelect=Ni;function Dt(V){if(x[V].show)ce&&Uu(Me[V],fs);else if(ce&&gi(Me[V],fs),ae){let J=On?yn[0]:yn[V];J!=null&&so(J,-10,-10,ht,Ge)}}function Dr(V,J,ie){De(V,{min:J,max:ie})}function Zn(V,J,ie,se){J.focus!=null&&Ls(V),J.show!=null&&x.forEach((pe,xe)=>{xe>0&&(V==xe||V==null)&&(pe.show=J.show,Dt(xe),m==2?(Dr(pe.facets[0].scale,null,null),Dr(pe.facets[1].scale,null,null)):Dr(pe.scale,null,null),po())}),ie!==!1&&Qe("setSeries",V,J),se&&kt("setSeries",r,V,J)}r.setSeries=Zn;function Qi(V,J){Kn(A[V],J)}function xi(V,J){V.fill=jt(V.fill||null),V.dir=Jt(V.dir,-1),J=J??A.length,A.splice(J,0,V)}function $n(V){V==null?A.length=0:A.splice(V,1)}r.addBand=xi,r.setBand=Qi,r.delBand=$n;function Jo(V,J){x[V].alpha=J,ae&&yn[V]!=null&&(yn[V].style.opacity=J),ce&&Me[V]&&(Me[V].style.opacity=J)}let Bn,Ci,ki;const Di={focus:!0};function Ls(V){if(V!=ki){let J=V==null,ie=Cr.alpha!=1;x.forEach((se,pe)=>{if(m==1||pe>0){let xe=J||pe==0||pe==V;se._focus=J?null:xe,ie&&Jo(pe,xe?1:Cr.alpha)}}),ki=V,ie&&po()}}ce&&Lr&&An(Eg,me,V=>{ne._lock||(si(V),ki!=null&&Zn(null,Di,!0,Ct.setSeries))});function rn(V,J,ie){let se=R[J];ie&&(V=V/Qt-(se.ori==1?Xt:$t));let pe=ht;se.ori==1&&(pe=Ge,V=pe-V),se.dir==-1&&(V=pe-V);let xe=se._min,Te=se._max,Fe=V/pe,We=xe+(Te-xe)*Fe,He=se.distr;return He==3?ea(10,We):He==4?n_(We,se.asinh):He==100?se.bwd(We):We}function wa(V,J){let ie=rn(V,C,J);return Gi(ie,n[0],oe,Ne)}r.valToIdx=V=>Gi(V,n[0]),r.posToIdx=wa,r.posToVal=rn,r.valToPos=(V,J,ie)=>R[J].ori==0?p(V,R[J],ie?qt:ht,ie?zn:0):g(V,R[J],ie?nn:Ge,ie?Ln:0),r.setCursor=(V,J,ie)=>{at=V.left,Ht=V.top,_(null,J,ie)};function ur(V,J){xn(Nr,Xs,wt.left=V),xn(Nr,Ha,wt.width=J)}function Pr(V,J){xn(Nr,Va,wt.top=V),xn(Nr,Ua,wt.height=J)}let mo=B.ori==0?ur:Pr,_r=B.ori==1?ur:Pr;function ci(){if(ce&&le.live)for(let V=m==2?1:0;V<x.length;V++){if(V==0&&rt)continue;let J=le.values[V],ie=0;for(let se in J)Xe[V][ie++].firstChild.nodeValue=J[se]}}function y(V,J){if(V!=null&&(V.idxs?V.idxs.forEach((ie,se)=>{Q[se]=ie}):s_(V.idx)||Q.fill(V.idx),le.idx=Q[0]),ce&&le.live){for(let ie=0;ie<x.length;ie++)(ie>0||m==1&&!rt)&&S(ie,Q[ie]);ci()}Xn=!1,J!==!1&&Qe("setLegend")}r.setLegend=y;function S(V,J){let ie=x[V],se=V==0&&F==2?bt:n[V],pe;rt?pe=ie.values(r,V,J)??st:(pe=ie.value(r,J==null?null:se[J],V,J),pe=pe==null?st:{_:pe}),le.values[V]=pe}function _(V,J,ie){Is=at,en=Ht,[at,Ht]=ne.move(r,at,Ht),ne.left=at,ne.top=Ht,ae&&(Zi&&so(Zi,rr(at),0,ht,Ge),Dn&&so(Dn,0,rr(Ht),ht,Ge));let se,pe=oe>Ne;Bn=hn,Ci=null;let xe=B.ori==0?ht:Ge,Te=B.ori==1?ht:Ge;if(at<0||Sn==0||pe){se=ne.idx=null;for(let Fe=0;Fe<x.length;Fe++){let We=yn[Fe];We!=null&&so(We,-10,-10,ht,Ge)}Lr&&Zn(null,Di,!0,V==null&&Ct.setSeries),le.live&&(Q.fill(se),Xn=!0)}else{let Fe,We,He;m==1&&(Fe=B.ori==0?at:Ht,We=rn(Fe,C),se=ne.idx=Gi(We,n[0],oe,Ne),He=N(n[0][se],B,xe,0));let Ke=-10,Ze=-10,xt=0,Yt=0,Pt=!0,yt="",dt="";for(let ot=m==2?1:0;ot<x.length;ot++){let vn=x[ot],Mn=Q[ot],er=Mn==null?null:m==1?n[ot][Mn]:n[ot][1][Mn],on=ne.dataIdx(r,ot,se,We),un=on==null?null:m==1?n[ot][on]:n[ot][1][on];if(Xn=Xn||un!=er||on!=Mn,Q[ot]=on,ot>0&&vn.show){let ge=on==null?-10:on==se?He:N(m==1?n[0][on]:n[ot][0][on],B,xe,0),Se=un==null?-10:$(un,m==1?R[vn.scale]:R[vn.facets[1].scale],Te,0);if(Lr&&un!=null){let ke=B.ori==1?at:Ht,Ue=nr(Cr.dist(r,ot,on,Se,ke));if(Ue<Bn){let ct=Cr.bias;if(ct!=0){let _t=rn(ke,vn.scale),Zt=un>=0?1:-1,Ft=_t>=0?1:-1;Ft==Zt&&(Ft==1?ct==1?un>=_t:un<=_t:ct==1?un<=_t:un>=_t)&&(Bn=Ue,Ci=ot)}else Bn=Ue,Ci=ot}}if(Xn||On){let ke,Ue;B.ori==0?(ke=ge,Ue=Se):(ke=Se,Ue=ge);let ct,_t,Zt,Ft,ui,Ar,wn=!0,Pi=kn.bbox;if(Pi!=null){wn=!1;let Sr=Pi(r,ot);Zt=Sr.left,Ft=Sr.top,ct=Sr.width,_t=Sr.height}else Zt=ke,Ft=Ue,ct=_t=kn.size(r,ot);if(Ar=kn.fill(r,ot),ui=kn.stroke(r,ot),On)ot==Ci&&Bn<=Cr.prox&&(Ke=Zt,Ze=Ft,xt=ct,Yt=_t,Pt=wn,yt=Ar,dt=ui);else{let Sr=yn[ot];Sr!=null&&(pr[ot]=Zt,ai[ot]=Ft,Fg(Sr,ct,_t,wn),Dg(Sr,Ar,ui),so(Sr,Ti(Zt),Ti(Ft),ht,Ge))}}}}if(On){let ot=Cr.prox,vn=ki==null?Bn<=ot:Bn>ot||Ci!=ki;if(Xn||vn){let Mn=yn[0];Mn!=null&&(pr[0]=Ke,ai[0]=Ze,Fg(Mn,xt,Yt,Pt),Dg(Mn,yt,dt),so(Mn,Ti(Ke),Ti(Ze),ht,Ge))}}}if(wt.show&&Oi)if(V!=null){let[Fe,We]=Ct.scales,[He,Ke]=Ct.match,[Ze,xt]=V.cursor.sync.scales,Yt=V.cursor.drag;if(je=Yt._x,bn=Yt._y,je||bn){let{left:Pt,top:yt,width:dt,height:ot}=V.select,vn=V.scales[Ze].ori,Mn=V.posToVal,er,on,un,ge,Se,ke=Fe!=null&&He(Fe,Ze),Ue=We!=null&&Ke(We,xt);ke&&je?(vn==0?(er=Pt,on=dt):(er=yt,on=ot),un=R[Fe],ge=N(Mn(er,Ze),un,xe,0),Se=N(Mn(er+on,Ze),un,xe,0),mo(qi(ge,Se),nr(Se-ge))):mo(0,xe),Ue&&bn?(vn==1?(er=Pt,on=dt):(er=yt,on=ot),un=R[We],ge=$(Mn(er,xt),un,Te,0),Se=$(Mn(er+on,xt),un,Te,0),_r(qi(ge,Se),nr(Se-ge))):_r(0,Te)}else X()}else{let Fe=nr(Is-ba),We=nr(en-Mo);if(B.ori==1){let xt=Fe;Fe=We,We=xt}je=Wn.x&&Fe>=Wn.dist,bn=Wn.y&&We>=Wn.dist;let He=Wn.uni;He!=null?je&&bn&&(je=Fe>=He,bn=We>=He,!je&&!bn&&(We>Fe?bn=!0:je=!0)):Wn.x&&Wn.y&&(je||bn)&&(je=bn=!0);let Ke,Ze;je&&(B.ori==0?(Ke=Li,Ze=at):(Ke=go,Ze=Ht),mo(qi(Ke,Ze),nr(Ze-Ke)),bn||_r(0,Te)),bn&&(B.ori==1?(Ke=Li,Ze=at):(Ke=go,Ze=Ht),_r(qi(Ke,Ze),nr(Ze-Ke)),je||mo(0,xe)),!je&&!bn&&(mo(0,0),_r(0,0))}if(Wn._x=je,Wn._y=bn,V==null){if(ie){if(Kt!=null){let[Fe,We]=Ct.scales;Ct.values[0]=Fe!=null?rn(B.ori==0?at:Ht,Fe):null,Ct.values[1]=We!=null?rn(B.ori==1?at:Ht,We):null}kt(zu,r,at,Ht,ht,Ge,se)}if(Lr){let Fe=ie&&Ct.setSeries,We=Cr.prox;ki==null?Bn<=We&&Zn(Ci,Di,!0,Fe):Bn>We?Zn(null,Di,!0,Fe):Ci!=ki&&Zn(Ci,Di,!0,Fe)}}Xn&&(le.idx=se,y()),J!==!1&&Qe("setCursor")}let P=null;Object.defineProperty(r,"rect",{get(){return P==null&&z(!1),P}});function z(V=!1){V?P=null:(P=i.getBoundingClientRect(),Qe("syncRect",P))}function j(V,J,ie,se,pe,xe,Te){ne._lock||Oi&&V!=null&&V.movementX==0&&V.movementY==0||(G(V,J,ie,se,pe,xe,Te,!1,V!=null),V!=null?_(null,!0,!0):_(J,!0,!1))}function G(V,J,ie,se,pe,xe,Te,Fe,We){if(P==null&&z(!1),si(V),V!=null)ie=V.clientX-P.left,se=V.clientY-P.top;else{if(ie<0||se<0){at=-10,Ht=-10;return}let[He,Ke]=Ct.scales,Ze=J.cursor.sync,[xt,Yt]=Ze.values,[Pt,yt]=Ze.scales,[dt,ot]=Ct.match,vn=J.axes[0].side%2==1,Mn=B.ori==0?ht:Ge,er=B.ori==1?ht:Ge,on=vn?xe:pe,un=vn?pe:xe,ge=vn?se:ie,Se=vn?ie:se;if(Pt!=null?ie=dt(He,Pt)?w(xt,R[He],Mn,0):-10:ie=Mn*(ge/on),yt!=null?se=ot(Ke,yt)?w(Yt,R[Ke],er,0):-10:se=er*(Se/un),B.ori==1){let ke=ie;ie=se,se=ke}}We&&(J==null||J.cursor.event.type==zu)&&((ie<=1||ie>=ht-1)&&(ie=ms(ie,ht)),(se<=1||se>=Ge-1)&&(se=ms(se,Ge))),Fe?(ba=ie,Mo=se,[Li,go]=ne.move(r,ie,se)):(at=ie,Ht=se)}const Y={width:0,height:0,left:0,top:0};function X(){Ni(Y,!1)}let re,ue,ye,Ce;function ve(V,J,ie,se,pe,xe,Te){Oi=!0,je=bn=Wn._x=Wn._y=!1,G(V,J,ie,se,pe,xe,Te,!0,!1),V!=null&&(An(Wu,ju,we,!1),kt(Mg,r,Li,go,ht,Ge,null));let{left:Fe,top:We,width:He,height:Ke}=wt;re=Fe,ue=We,ye=He,Ce=Ke}function we(V,J,ie,se,pe,xe,Te){Oi=Wn._x=Wn._y=!1,G(V,J,ie,se,pe,xe,Te,!1,!0);let{left:Fe,top:We,width:He,height:Ke}=wt,Ze=He>0||Ke>0,xt=re!=Fe||ue!=We||ye!=He||Ce!=Ke;if(Ze&&xt&&Ni(wt),Wn.setScale&&Ze&&xt){let Yt=Fe,Pt=He,yt=We,dt=Ke;if(B.ori==1&&(Yt=We,Pt=Ke,yt=Fe,dt=He),je&&Dr(C,rn(Yt,C),rn(Yt+Pt,C)),bn)for(let ot in R){let vn=R[ot];ot!=C&&vn.from==null&&vn.min!=hn&&Dr(ot,rn(yt+dt,ot),rn(yt,ot))}X()}else ne.lock&&(ne._lock=!ne._lock,_(J,!0,V!=null));V!=null&&(wr(Wu,ju),kt(Wu,r,at,Ht,ht,Ge,null))}function Oe(V,J,ie,se,pe,xe,Te){if(ne._lock)return;si(V);let Fe=Oi;if(Oi){let We=!0,He=!0,Ke=10,Ze,xt;B.ori==0?(Ze=je,xt=bn):(Ze=bn,xt=je),Ze&&xt&&(We=at<=Ke||at>=ht-Ke,He=Ht<=Ke||Ht>=Ge-Ke),Ze&&We&&(at=at<Li?0:ht),xt&&He&&(Ht=Ht<go?0:Ge),_(null,!0,!0),Oi=!1}at=-10,Ht=-10,Q.fill(null),_(null,!0,!0),Fe&&(Oi=Fe)}function Ie(V,J,ie,se,pe,xe,Te){ne._lock||(si(V),kr(),X(),V!=null&&kt(Ig,r,at,Ht,ht,Ge,null))}function Ve(){I.forEach(CA),Yi(r.width,r.height,!0)}ps(ql,Qs,Ve);const lt={};lt.mousedown=ve,lt.mousemove=j,lt.mouseup=we,lt.dblclick=Ie,lt.setSeries=(V,J,ie,se)=>{let pe=Ct.match[2];ie=pe(r,J,ie),ie!=-1&&Zn(ie,se,!0,!1)},ae&&(An(Mg,i,ve),An(zu,i,j),An(Tg,i,V=>{si(V),z(!1)}),An(Eg,i,Oe),An(Ig,i,Ie),dh.add(r),r.syncRect=z);const Je=r.hooks=t.hooks||{};function Qe(V,J,ie){Yo?fo.push([V,J,ie]):V in Je&&Je[V].forEach(se=>{se.call(null,r,J,ie)})}(t.plugins||[]).forEach(V=>{for(let J in V.hooks)Je[J]=(Je[J]||[]).concat(V.hooks[J])});const _n=(V,J,ie)=>ie,Ct=Kn({key:null,setSeries:!1,filters:{pub:Jg,sub:Jg},scales:[C,x[1]?x[1].scale:null],match:[Xg,Xg,_n],values:[null,null]},ne.sync);Ct.match.length==2&&Ct.match.push(_n),ne.sync=Ct;const Kt=Ct.key,Tt=Nm(Kt);function kt(V,J,ie,se,pe,xe,Te){Ct.filters.pub(V,J,ie,se,pe,xe,Te)&&Tt.pub(V,J,ie,se,pe,xe,Te)}Tt.sub(r);function Qn(V,J,ie,se,pe,xe,Te){Ct.filters.sub(V,J,ie,se,pe,xe,Te)&&lt[V](null,J,ie,se,pe,xe,Te)}r.pub=Qn;function hr(){Tt.unsub(r),dh.delete(r),ir.clear(),Gu(ql,Qs,Ve),d.remove(),me?.remove(),Qe("destroy")}r.destroy=hr;function Rn(){Qe("init",t,n),Vt(n||t.data,!1),k[C]?De(C,k[C]):kr(),bi=wt.show&&(wt.width>0||wt.height>0),yi=Xn=!0,Yi(t.width,t.height)}return x.forEach(lo),I.forEach(Kr),e?e instanceof HTMLElement?(e.appendChild(d),Rn()):e(r,Rn):Rn(),r}Tr.assign=Kn,Tr.fmtNum=Yu,Tr.rangeNum=Xl,Tr.rangeLog=Jl,Tr.rangeAsinh=qu,Tr.orient=ys,Tr.pxRatio=Qt,Tr.join=f_,Tr.fmtDate=Qu,Tr.tzDate=__,Tr.sync=Nm;{Tr.addGap=sA,Tr.clipGaps=ic;let t=Tr.paths={points:jm};t.linear=Um,t.stepped=cA,t.bars=uA,t.spline=dA}var Zm,Qm;function kA(){return Qm||(Qm=1,Zm=function(t,n,e,r,m){var p,g;if(r===void 0)r=0;else if(r=r|0,r<0||r>=t.length)throw new RangeError("invalid lower bound");if(m===void 0)m=t.length-1;else if(m=m|0,m<r||m>=t.length)throw new RangeError("invalid upper bound");for(;r<=m;)if(p=r+(m-r>>>1),g=+e(t[p],n,p,t),g<0)r=p+1;else if(g>0)m=p-1;else return p;return~r}),Zm}var _A=kA();const E2=Tn("y",Vl(_A));var ph,ev;function AA(){if(ev)return ph;ev=1;function t(n,e,r){var m=-1,p=n.length;e<0&&(e=-e>p?0:p+e),r=r>p?p:r,r<0&&(r+=p),p=e>r?0:r-e>>>0,e>>>=0;for(var g=Array(p);++m<p;)g[m]=n[m+e];return g}return ph=t,ph}var gh,tv;function SA(){if(tv)return gh;tv=1;var t=AA();function n(e,r,m){var p=e.length;return m=m===void 0?p:m,!r&&m>=p?e:t(e,r,m)}return gh=n,gh}var mh,nv;function rv(){if(nv)return mh;nv=1;var t="\\ud800-\\udfff",n="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",m=n+e+r,p="\\ufe0e\\ufe0f",g="\\u200d",w=RegExp("["+g+t+m+p+"]");function h(d){return w.test(d)}return mh=h,mh}var vh,iv;function $A(){if(iv)return vh;iv=1;function t(n){return n.split("")}return vh=t,vh}var yh,ov;function RA(){if(ov)return yh;ov=1;var t="\\ud800-\\udfff",n="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",m=n+e+r,p="\\ufe0e\\ufe0f",g="["+t+"]",w="["+m+"]",h="\\ud83c[\\udffb-\\udfff]",d="(?:"+w+"|"+h+")",a="[^"+t+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",u="\\u200d",i=d+"?",s="["+p+"]?",f="(?:"+u+"(?:"+[a,l,c].join("|")+")"+s+i+")*",b=s+i+f,x="(?:"+[a+w+"?",w,l,c,g].join("|")+")",I=RegExp(h+"(?="+h+")|"+x+b,"g");function R(A){return A.match(I)||[]}return yh=R,yh}var bh,sv;function MA(){if(sv)return bh;sv=1;var t=$A(),n=rv(),e=RA();function r(m){return n(m)?e(m):t(m)}return bh=r,bh}var wh,av;function TA(){if(av)return wh;av=1;var t=typeof Bo=="object"&&Bo&&Bo.Object===Object&&Bo;return wh=t,wh}var xh,lv;function EA(){if(lv)return xh;lv=1;var t=TA(),n=typeof self=="object"&&self&&self.Object===Object&&self,e=t||n||Function("return this")();return xh=e,xh}var Ch,cv;function kh(){if(cv)return Ch;cv=1;var t=EA(),n=t.Symbol;return Ch=n,Ch}var _h,uv;function IA(){if(uv)return _h;uv=1;function t(n,e){for(var r=-1,m=n==null?0:n.length,p=Array(m);++r<m;)p[r]=e(n[r],r,n);return p}return _h=t,_h}var Ah,hv;function LA(){if(hv)return Ah;hv=1;var t=Array.isArray;return Ah=t,Ah}var Sh,dv;function OA(){if(dv)return Sh;dv=1;var t=kh(),n=Object.prototype,e=n.hasOwnProperty,r=n.toString,m=t?t.toStringTag:void 0;function p(g){var w=e.call(g,m),h=g[m];try{g[m]=void 0;var d=!0}catch{}var a=r.call(g);return d&&(w?g[m]=h:delete g[m]),a}return Sh=p,Sh}var $h,fv;function NA(){if(fv)return $h;fv=1;var t=Object.prototype,n=t.toString;function e(r){return n.call(r)}return $h=e,$h}var Rh,pv;function DA(){if(pv)return Rh;pv=1;var t=kh(),n=OA(),e=NA(),r="[object Null]",m="[object Undefined]",p=t?t.toStringTag:void 0;function g(w){return w==null?w===void 0?m:r:p&&p in Object(w)?n(w):e(w)}return Rh=g,Rh}var Mh,gv;function PA(){if(gv)return Mh;gv=1;function t(n){return n!=null&&typeof n=="object"}return Mh=t,Mh}var Th,mv;function FA(){if(mv)return Th;mv=1;var t=DA(),n=PA(),e="[object Symbol]";function r(m){return typeof m=="symbol"||n(m)&&t(m)==e}return Th=r,Th}var Eh,vv;function zA(){if(vv)return Eh;vv=1;var t=kh(),n=IA(),e=LA(),r=FA(),m=t?t.prototype:void 0,p=m?m.toString:void 0;function g(w){if(typeof w=="string")return w;if(e(w))return n(w,g)+"";if(r(w))return p?p.call(w):"";var h=w+"";return h=="0"&&1/w==-1/0?"-0":h}return Eh=g,Eh}var Ih,yv;function lc(){if(yv)return Ih;yv=1;var t=zA();function n(e){return e==null?"":t(e)}return Ih=n,Ih}var Lh,bv;function WA(){if(bv)return Lh;bv=1;var t=SA(),n=rv(),e=MA(),r=lc();function m(p){return function(g){g=r(g);var w=n(g)?e(g):void 0,h=w?w[0]:g.charAt(0),d=w?t(w,1).join(""):g.slice(1);return h[p]()+d}}return Lh=m,Lh}var Oh,wv;function xv(){if(wv)return Oh;wv=1;var t=WA(),n=t("toUpperCase");return Oh=n,Oh}var BA=xv();const jA=Vl(BA);var Nh,Cv;function HA(){if(Cv)return Nh;Cv=1;var t=lc(),n=xv();function e(r){return n(t(r).toLowerCase())}return Nh=e,Nh}var Dh,kv;function UA(){if(kv)return Dh;kv=1;function t(n,e,r,m){var p=-1,g=n==null?0:n.length;for(m&&g&&(r=n[++p]);++p<g;)r=e(r,n[p],p,n);return r}return Dh=t,Dh}var Ph,_v;function VA(){if(_v)return Ph;_v=1;function t(n){return function(e){return n?.[e]}}return Ph=t,Ph}var Fh,Av;function GA(){if(Av)return Fh;Av=1;var t=VA(),n={À:"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=t(n);return Fh=e,Fh}var zh,Sv;function qA(){if(Sv)return zh;Sv=1;var t=GA(),n=lc(),e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",m="\\ufe20-\\ufe2f",p="\\u20d0-\\u20ff",g=r+m+p,w="["+g+"]",h=RegExp(w,"g");function d(a){return a=n(a),a&&a.replace(e,t).replace(h,"")}return zh=d,zh}var Wh,$v;function KA(){if($v)return Wh;$v=1;var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function n(e){return e.match(t)||[]}return Wh=n,Wh}var Bh,Rv;function YA(){if(Rv)return Bh;Rv=1;var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function n(e){return t.test(e)}return Bh=n,Bh}var jh,Mv;function JA(){if(Mv)return jh;Mv=1;var t="\\ud800-\\udfff",n="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",m=n+e+r,p="\\u2700-\\u27bf",g="a-z\\xdf-\\xf6\\xf8-\\xff",w="\\xac\\xb1\\xd7\\xf7",h="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",d="\\u2000-\\u206f",a=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",l="A-Z\\xc0-\\xd6\\xd8-\\xde",c="\\ufe0e\\ufe0f",u=w+h+d+a,i="['’]",s="["+u+"]",f="["+m+"]",b="\\d+",x="["+p+"]",I="["+g+"]",R="[^"+t+u+b+p+g+l+"]",A="\\ud83c[\\udffb-\\udfff]",C="(?:"+f+"|"+A+")",O="[^"+t+"]",D="(?:\\ud83c[\\udde6-\\uddff]){2}",E="[\\ud800-\\udbff][\\udc00-\\udfff]",T="["+l+"]",B="\\u200d",F="(?:"+I+"|"+R+")",N="(?:"+T+"|"+R+")",$="(?:"+i+"(?:d|ll|m|re|s|t|ve))?",k="(?:"+i+"(?:D|LL|M|RE|S|T|VE))?",L=C+"?",W="["+c+"]?",U="(?:"+B+"(?:"+[O,D,E].join("|")+")"+W+L+")*",q="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Q=W+L+U,le="(?:"+[x,D,E].join("|")+")"+Q,ne=RegExp([T+"?"+I+"+"+$+"(?="+[s,T,"$"].join("|")+")",N+"+"+k+"(?="+[s,T+F,"$"].join("|")+")",T+"?"+F+"+"+$,T+"+"+k,Z,q,b,le].join("|"),"g");function ce(ae){return ae.match(ne)||[]}return jh=ce,jh}var Hh,Tv;function XA(){if(Tv)return Hh;Tv=1;var t=KA(),n=YA(),e=lc(),r=JA();function m(p,g,w){return p=e(p),g=w?void 0:g,g===void 0?n(p)?r(p):t(p):p.match(g)||[]}return Hh=m,Hh}var Uh,Ev;function ZA(){if(Ev)return Uh;Ev=1;var t=UA(),n=qA(),e=XA(),r="['’]",m=RegExp(r,"g");function p(g){return function(w){return t(e(n(w).replace(m,"")),g,"")}}return Uh=p,Uh}var Vh,Iv;function QA(){if(Iv)return Vh;Iv=1;var t=HA(),n=ZA(),e=n(function(r,m,p){return m=m.toLowerCase(),r+(p?t(m):m)});return Vh=e,Vh}var eS=QA();const tS=Vl(eS),nS=Object.assign({"./ArrayWidget.vue":()=>nt(()=>tt.import("./ArrayWidget-CcQFJGCA-f76220cc11a39cef93d3.js"),void 0),"./ArrayplotWidget.vue":()=>nt(()=>tt.import("./ArrayplotWidget-DGJEXAY0-2638e110104829429b7e.js"),void 0),"./BlockWidget.vue":()=>nt(()=>tt.import("./BlockWidget-BHtugveV-3a86c79f29993edbe557.js"),void 0),"./ButtonWidget.vue":()=>nt(()=>tt.import("./ButtonWidget-Cc9cYsg8-fa11db39baed1ca10dd9.js"),void 0),"./CanvasWidget.vue":()=>nt(()=>tt.import("./CanvasWidget-Bn70gBcc-9779d7c4a0937c4e2f70.js"),void 0),"./CanvasdotWidget.vue":()=>nt(()=>tt.import("./CanvasdotWidget-CMROfW3O-f502b2d25ac1e3251128.js"),void 0),"./CanvasimageWidget.vue":()=>nt(()=>tt.import("./CanvasimageWidget-BpM05v_m-6263bd6847c2e58b6b84.js"),void 0),"./CanvasimagevalueWidget.vue":()=>nt(()=>tt.import("./CanvasimagevalueWidget-E6G93iGc-49d367288d7991a84f17.js"),void 0),"./CanvaslabelWidget.vue":()=>nt(()=>tt.import("./CanvaslabelWidget-C074R2Fy-8fa147b0578e1ddd8e31.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>nt(()=>tt.import("./CanvaslabelvalueWidget-B0nJeS4X-b4d8b3e018abcec044ee.js"),void 0),"./CanvaslineWidget.vue":()=>nt(()=>tt.import("./CanvaslineWidget-CxnNAqOX-d042686da706d5408c3e.js"),void 0),"./CanvaslinevalueWidget.vue":()=>nt(()=>tt.import("./CanvaslinevalueWidget-BwfFyCwH-7997bd44b424ae4b1561.js"),void 0),"./CheckbuttonWidget.vue":()=>nt(()=>tt.import("./CheckbuttonWidget-yAm10oX0-e8125b88e4be2fc48dbf.js"),void 0),"./ComboboxWidget.vue":()=>nt(()=>tt.import("./ComboboxWidget-BnWksnnp-c1d54211236c9e26a34b.js"),void 0),"./DateWidget.vue":()=>nt(()=>tt.import("./DateWidget-CAiG2FIl-c146fb495ef13560c452.js"),void 0),"./DynamicWidget.vue":()=>nt(()=>tt.import("./DynamicWidget-BuSbQVhf-86285e64782585bb8284.js"),void 0),"./FilechecksumWidget.vue":()=>nt(()=>tt.import("./FilechecksumWidget-DeW9wy5d-248571c63dba27319b36.js"),void 0),"./FiledisplayWidget.vue":()=>nt(()=>tt.import("./FiledisplayWidget-C_zPFu2E-2d17e2f1448559a44f05.js"),void 0),"./FormatvalueWidget.vue":()=>nt(()=>tt.import("./FormatvalueWidget-BrvPWwfN-e050d5adc896a68175ca.js"),void 0),"./HorizontalWidget.vue":()=>nt(()=>tt.import("./HorizontalWidget-cFSsdChw-d979f75547fda5fa7327.js"),void 0),"./HorizontalboxWidget.vue":()=>nt(()=>tt.import("./HorizontalboxWidget-CKA7rLGd-9f624ef7e0a8f5e8341a.js"),void 0),"./HorizontallineWidget.vue":()=>nt(()=>tt.import("./HorizontallineWidget-BqbLK0zc-032877ba9a30de523df1.js"),void 0),"./IframeWidget.vue":()=>nt(()=>tt.import("./IframeWidget-CITX8Es1-f88b11b4cb0abe9013a6.js"),void 0),"./ImageviewerWidget.vue":()=>nt(()=>tt.import("./ImageviewerWidget-BIsSA7KD-27ebd6d54624aecc85c5.js"),void 0),"./LabelWidget.vue":()=>nt(()=>tt.import("./LabelWidget-FQI-cH_A-6ba874245f82dee1b5b4.js"),void 0),"./LabelledWidget.vue":()=>nt(()=>tt.import("./LabelledWidget-KGXtQ4Zb-fd5dd58e0de56789b7b2.js"),void 0),"./LabelprogressbarWidget.vue":()=>nt(()=>tt.import("./LabelprogressbarWidget-72WyzD_Q-0c61a376a160ac8eabc1.js"),void 0),"./LabelsparklineWidget.vue":()=>nt(()=>tt.import("./LabelsparklineWidget-DtWNf4mK-49ac92040f51acb6ad41.js"),void 0),"./LabelvalueWidget.vue":()=>nt(()=>tt.import("./LabelvalueWidget-D_JLdY7r-95bd967c8c4f6cb0fb1c.js"),void 0),"./LabelvaluedescWidget.vue":()=>nt(()=>tt.import("./LabelvaluedescWidget-BppM5vGp-e2eb8f62ec8b1edab5c7.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>nt(()=>tt.import("./LabelvaluelimitsbarWidget-B69ogLif-bfa23b96929cba8117ff.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>nt(()=>tt.import("./LabelvaluelimitscolumnWidget-DPYwFdgq-2159672e62922d671ff6.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>nt(()=>tt.import("./LabelvaluerangebarWidget-BT0BcOoK-db30aa4c4f1abbb71f06.js"),void 0),"./LedWidget.vue":()=>nt(()=>tt.import("./LedWidget-Cmr6eVG2-aa2c79bda6817327a734.js"),void 0),"./LimitsbarWidget.vue":()=>nt(()=>tt.import("./LimitsbarWidget-CMvcwa-m-d060dbaa92ea217695a7.js"),void 0),"./LimitscolorWidget.vue":()=>nt(()=>tt.import("./LimitscolorWidget-CZ9wMtcI-600a0d33cfdac9e606c6.js"),void 0),"./LimitscolumnWidget.vue":()=>nt(()=>tt.import("./LimitscolumnWidget-r84KJGU--63f1ce2e287b7e068fe3.js"),void 0),"./LinegraphWidget.vue":()=>nt(()=>tt.import("./LinegraphWidget-COGBGOjF-5c8d32bb60f274b053cd.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>nt(()=>tt.import("./MatrixbycolumnsWidget-Dx2iz0YF-999d3afe43e2aa9db87e.js"),void 0),"./ProgressbarWidget.vue":()=>nt(()=>tt.import("./ProgressbarWidget-DPbAVjdC-2981b1af8af4da20b6d1.js"),void 0),"./RadiobuttonWidget.vue":()=>nt(()=>tt.import("./RadiobuttonWidget-iXI9yCDk-59f850a8bd9d843024e5.js"),void 0),"./RadiogroupWidget.vue":()=>nt(()=>tt.import("./RadiogroupWidget-CMM_p1eA-1a39ed7902af769f50d0.js"),void 0),"./RangebarWidget.vue":()=>nt(()=>tt.import("./RangebarWidget-DJXGUHAc-63d6cdc08c070ce2280c.js"),void 0),"./RollupWidget.vue":()=>nt(()=>tt.import("./RollupWidget-BbWLSsTT-f862029486671e1966d7.js"),void 0),"./ScrollwindowWidget.vue":()=>nt(()=>tt.import("./ScrollwindowWidget-Dxhp7yKn-8b0ba7315cde67bcc9f6.js"),void 0),"./SignalWidget.vue":()=>nt(()=>tt.import("./SignalWidget-65q0tiuo-52c981c4470bf5006886.js"),void 0),"./SpacerWidget.vue":()=>nt(()=>tt.import("./SpacerWidget-DFzbojmX-55a4d9330581f9b7285d.js"),void 0),"./SparklineWidget.vue":()=>nt(()=>tt.import("./SparklineWidget-Bu4I8zY0-d05e82f937b095333a15.js"),void 0),"./TabbookWidget.vue":()=>nt(()=>tt.import("./TabbookWidget-CELMWyx7-1d7b6a3a541b8b6cffb3.js"),void 0),"./TextboxWidget.vue":()=>nt(()=>tt.import("./TextboxWidget-DYsqXntS-d477d1867f2a65ae0699.js"),void 0),"./TextfieldWidget.vue":()=>nt(()=>tt.import("./TextfieldWidget-BIUgV9Q4-7664df7a16deff334036.js"),void 0),"./TimeWidget.vue":()=>nt(()=>tt.import("./TimeWidget-BPXcY1Wy-61008f558728b5f906d7.js"),void 0),"./TitleWidget.vue":()=>nt(()=>tt.import("./TitleWidget-DJ9mHRLE-52e464994c49c45eae92.js"),void 0),"./ValueWidget.vue":()=>nt(()=>tt.import("./ValueWidget-DzOSy7lp-92479ffa8015859984c7.js"),void 0),"./ValuelimitsbarWidget.vue":()=>nt(()=>tt.import("./ValuelimitsbarWidget-D5dSlW6D-cae311a05073ff60ddb1.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>nt(()=>tt.import("./ValuelimitscolumnWidget-7DXCsVW_-86690696d7ef52117561.js"),void 0),"./ValuerangebarWidget.vue":()=>nt(()=>tt.import("./ValuerangebarWidget-BWjnpmyy-ef11d2ea672f2dbd1a8a.js"),void 0),"./VerticalWidget.vue":()=>nt(()=>tt.import("./VerticalWidget-BOtXAhxt-19d6adff2d379742f886.js"),void 0),"./VerticalboxWidget.vue":()=>nt(()=>tt.import("./VerticalboxWidget-RAsXfGdI-c0d18d921ac32d9c3bbe.js"),void 0)}),rS=Object.entries(nS).reduce((t,[n,e])=>{n=n.split("/").pop();const r=jA(tS(n.replace(/\.\w+$/,"")));return{...t,[r]:bf(e)}},{}),I2=Tn("w",{components:rS});function Lv(t,n){return function(){return t.apply(n,arguments)}}const{toString:iS}=Object.prototype,{getPrototypeOf:cc}=Object,{iterator:uc,toStringTag:Ov}=Symbol,hc=(t=>n=>{const e=iS.call(n);return t[e]||(t[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ki=t=>(t=t.toLowerCase(),n=>hc(n)===t),dc=t=>n=>typeof n===t,{isArray:aa}=Array,la=dc("undefined");function Xa(t){return t!==null&&!la(t)&&t.constructor!==null&&!la(t.constructor)&&ri(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Nv=Ki("ArrayBuffer");function oS(t){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(t):n=t&&t.buffer&&Nv(t.buffer),n}const sS=dc("string"),ri=dc("function"),Dv=dc("number"),Za=t=>t!==null&&typeof t=="object",aS=t=>t===!0||t===!1,fc=t=>{if(hc(t)!=="object")return!1;const n=cc(t);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Ov in t)&&!(uc in t)},lS=t=>{if(!Za(t)||Xa(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},cS=Ki("Date"),uS=Ki("File"),hS=t=>!!(t&&typeof t.uri<"u"),dS=t=>t&&typeof t.getParts<"u",fS=Ki("Blob"),pS=Ki("FileList"),gS=t=>Za(t)&&ri(t.pipe);function mS(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Pv=mS(),Fv=typeof Pv.FormData<"u"?Pv.FormData:void 0,vS=t=>{if(!t)return!1;if(Fv&&t instanceof Fv)return!0;const n=cc(t);if(!n||n===Object.prototype||!ri(t.append))return!1;const e=hc(t);return e==="formdata"||e==="object"&&ri(t.toString)&&t.toString()==="[object FormData]"},yS=Ki("URLSearchParams"),[bS,wS,xS,CS]=["ReadableStream","Request","Response","Headers"].map(Ki),kS=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qa(t,n,{allOwnKeys:e=!1}={}){if(t===null||typeof t>"u")return;let r,m;if(typeof t!="object"&&(t=[t]),aa(t))for(r=0,m=t.length;r<m;r++)n.call(null,t[r],r,t);else{if(Xa(t))return;const p=e?Object.getOwnPropertyNames(t):Object.keys(t),g=p.length;let w;for(r=0;r<g;r++)w=p[r],n.call(null,t[w],w,t)}}function zv(t,n){if(Xa(t))return null;n=n.toLowerCase();const e=Object.keys(t);let r=e.length,m;for(;r-- >0;)if(m=e[r],n===m.toLowerCase())return m;return null}const bs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Wv=t=>!la(t)&&t!==bs;function Gh(){const{caseless:t,skipUndefined:n}=Wv(this)&&this||{},e={},r=(m,p)=>{if(p==="__proto__"||p==="constructor"||p==="prototype")return;const g=t&&zv(e,p)||p;fc(e[g])&&fc(m)?e[g]=Gh(e[g],m):fc(m)?e[g]=Gh({},m):aa(m)?e[g]=m.slice():(!n||!la(m))&&(e[g]=m)};for(let m=0,p=arguments.length;m<p;m++)arguments[m]&&Qa(arguments[m],r);return e}const _S=(t,n,e,{allOwnKeys:r}={})=>(Qa(n,(m,p)=>{e&&ri(m)?Object.defineProperty(t,p,{value:Lv(m,e),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,p,{value:m,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),AS=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),SS=(t,n,e,r)=>{t.prototype=Object.create(n.prototype,r),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:n.prototype}),e&&Object.assign(t.prototype,e)},$S=(t,n,e,r)=>{let m,p,g;const w={};if(n=n||{},t==null)return n;do{for(m=Object.getOwnPropertyNames(t),p=m.length;p-- >0;)g=m[p],(!r||r(g,t,n))&&!w[g]&&(n[g]=t[g],w[g]=!0);t=e!==!1&&cc(t)}while(t&&(!e||e(t,n))&&t!==Object.prototype);return n},RS=(t,n,e)=>{t=String(t),(e===void 0||e>t.length)&&(e=t.length),e-=n.length;const r=t.indexOf(n,e);return r!==-1&&r===e},MS=t=>{if(!t)return null;if(aa(t))return t;let n=t.length;if(!Dv(n))return null;const e=new Array(n);for(;n-- >0;)e[n]=t[n];return e},TS=(t=>n=>t&&n instanceof t)(typeof Uint8Array<"u"&&cc(Uint8Array)),ES=(t,n)=>{const e=(t&&t[uc]).call(t);let r;for(;(r=e.next())&&!r.done;){const m=r.value;n.call(t,m[0],m[1])}},IS=(t,n)=>{let e;const r=[];for(;(e=t.exec(n))!==null;)r.push(e);return r},LS=Ki("HTMLFormElement"),OS=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,e,r){return e.toUpperCase()+r}),Bv=(({hasOwnProperty:t})=>(n,e)=>t.call(n,e))(Object.prototype),NS=Ki("RegExp"),jv=(t,n)=>{const e=Object.getOwnPropertyDescriptors(t),r={};Qa(e,(m,p)=>{let g;(g=n(m,p,t))!==!1&&(r[p]=g||m)}),Object.defineProperties(t,r)},DS=t=>{jv(t,(n,e)=>{if(ri(t)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=t[e];if(ri(r)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},PS=(t,n)=>{const e={},r=m=>{m.forEach(p=>{e[p]=!0})};return aa(t)?r(t):r(String(t).split(n)),e},FS=()=>{},zS=(t,n)=>t!=null&&Number.isFinite(t=+t)?t:n;function WS(t){return!!(t&&ri(t.append)&&t[Ov]==="FormData"&&t[uc])}const BS=t=>{const n=new Array(10),e=(r,m)=>{if(Za(r)){if(n.indexOf(r)>=0)return;if(Xa(r))return r;if(!("toJSON"in r)){n[m]=r;const p=aa(r)?[]:{};return Qa(r,(g,w)=>{const h=e(g,m+1);!la(h)&&(p[w]=h)}),n[m]=void 0,p}}return r};return e(t,0)},jS=Ki("AsyncFunction"),HS=t=>t&&(Za(t)||ri(t))&&ri(t.then)&&ri(t.catch),Hv=((t,n)=>t?setImmediate:n?((e,r)=>(bs.addEventListener("message",({source:m,data:p})=>{m===bs&&p===e&&r.length&&r.shift()()},!1),m=>{r.push(m),bs.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",ri(bs.postMessage)),US=typeof queueMicrotask<"u"?queueMicrotask.bind(bs):typeof process<"u"&&process.nextTick||Hv,VS=t=>t!=null&&ri(t[uc]),Ae={isArray:aa,isArrayBuffer:Nv,isBuffer:Xa,isFormData:vS,isArrayBufferView:oS,isString:sS,isNumber:Dv,isBoolean:aS,isObject:Za,isPlainObject:fc,isEmptyObject:lS,isReadableStream:bS,isRequest:wS,isResponse:xS,isHeaders:CS,isUndefined:la,isDate:cS,isFile:uS,isReactNativeBlob:hS,isReactNative:dS,isBlob:fS,isRegExp:NS,isFunction:ri,isStream:gS,isURLSearchParams:yS,isTypedArray:TS,isFileList:pS,forEach:Qa,merge:Gh,extend:_S,trim:kS,stripBOM:AS,inherits:SS,toFlatObject:$S,kindOf:hc,kindOfTest:Ki,endsWith:RS,toArray:MS,forEachEntry:ES,matchAll:IS,isHTMLForm:LS,hasOwnProperty:Bv,hasOwnProp:Bv,reduceDescriptors:jv,freezeMethods:DS,toObjectSet:PS,toCamelCase:OS,noop:FS,toFiniteNumber:zS,findKey:zv,global:bs,isContextDefined:Wv,isSpecCompliantForm:WS,toJSONObject:BS,isAsyncFn:jS,isThenable:HS,setImmediate:Hv,asap:US,isIterable:VS};let gt=class Q0 extends Error{static from(n,e,r,m,p,g){const w=new Q0(n.message,e||n.code,r,m,p);return w.cause=n,w.name=n.name,n.status!=null&&w.status==null&&(w.status=n.status),g&&Object.assign(w,g),w}constructor(n,e,r,m,p){super(n),Object.defineProperty(this,"message",{value:n,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),r&&(this.config=r),m&&(this.request=m),p&&(this.response=p,this.status=p.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ae.toJSONObject(this.config),code:this.code,status:this.status}}};gt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",gt.ERR_BAD_OPTION="ERR_BAD_OPTION",gt.ECONNABORTED="ECONNABORTED",gt.ETIMEDOUT="ETIMEDOUT",gt.ERR_NETWORK="ERR_NETWORK",gt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",gt.ERR_DEPRECATED="ERR_DEPRECATED",gt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",gt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",gt.ERR_CANCELED="ERR_CANCELED",gt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",gt.ERR_INVALID_URL="ERR_INVALID_URL",gt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const GS=null;function qh(t){return Ae.isPlainObject(t)||Ae.isArray(t)}function Uv(t){return Ae.endsWith(t,"[]")?t.slice(0,-2):t}function Kh(t,n,e){return t?t.concat(n).map(function(r,m){return r=Uv(r),!e&&m?"["+r+"]":r}).join(e?".":""):n}function qS(t){return Ae.isArray(t)&&!t.some(qh)}const KS=Ae.toFlatObject(Ae,{},null,function(t){return/^is[A-Z]/.test(t)});function pc(t,n,e){if(!Ae.isObject(t))throw new TypeError("target must be an object");n=n||new FormData,e=Ae.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(s,f){return!Ae.isUndefined(f[s])});const r=e.metaTokens,m=e.visitor||l,p=e.dots,g=e.indexes,w=e.Blob||typeof Blob<"u"&&Blob,h=e.maxDepth===void 0?100:e.maxDepth,d=w&&Ae.isSpecCompliantForm(n);if(!Ae.isFunction(m))throw new TypeError("visitor must be a function");function a(s){if(s===null)return"";if(Ae.isDate(s))return s.toISOString();if(Ae.isBoolean(s))return s.toString();if(!d&&Ae.isBlob(s))throw new gt("Blob is not supported. Use a Buffer instead.");return Ae.isArrayBuffer(s)||Ae.isTypedArray(s)?d&&typeof Blob=="function"?new Blob([s]):Buffer.from(s):s}function l(s,f,b){let x=s;if(Ae.isReactNative(n)&&Ae.isReactNativeBlob(s))return n.append(Kh(b,f,p),a(s)),!1;if(s&&!b&&typeof s=="object"){if(Ae.endsWith(f,"{}"))f=r?f:f.slice(0,-2),s=JSON.stringify(s);else if(Ae.isArray(s)&&qS(s)||(Ae.isFileList(s)||Ae.endsWith(f,"[]"))&&(x=Ae.toArray(s)))return f=Uv(f),x.forEach(function(I,R){!(Ae.isUndefined(I)||I===null)&&n.append(g===!0?Kh([f],R,p):g===null?f:f+"[]",a(I))}),!1}return qh(s)?!0:(n.append(Kh(b,f,p),a(s)),!1)}const c=[],u=Object.assign(KS,{defaultVisitor:l,convertValue:a,isVisitable:qh});function i(s,f,b=0){if(!Ae.isUndefined(s)){if(b>h)throw new gt("Object is too deeply nested ("+b+" levels). Max depth: "+h,gt.ERR_FORM_DATA_DEPTH_EXCEEDED);if(c.indexOf(s)!==-1)throw Error("Circular reference detected in "+f.join("."));c.push(s),Ae.forEach(s,function(x,I){(!(Ae.isUndefined(x)||x===null)&&m.call(n,x,Ae.isString(I)?I.trim():I,f,u))===!0&&i(x,f?f.concat(I):[I],b+1)}),c.pop()}}if(!Ae.isObject(t))throw new TypeError("data must be an object");return i(t),n}function Vv(t){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(e){return n[e]})}function Yh(t,n){this._pairs=[],t&&pc(t,this,n)}const Gv=Yh.prototype;Gv.append=function(t,n){this._pairs.push([t,n])},Gv.toString=function(t){const n=t?function(e){return t.call(this,e,Vv)}:Vv;return this._pairs.map(function(e){return n(e[0])+"="+n(e[1])},"").join("&")};function YS(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function qv(t,n,e){if(!n)return t;const r=e&&e.encode||YS,m=Ae.isFunction(e)?{serialize:e}:e,p=m&&m.serialize;let g;if(p?g=p(n,m):g=Ae.isURLSearchParams(n)?n.toString():new Yh(n,m).toString(r),g){const w=t.indexOf("#");w!==-1&&(t=t.slice(0,w)),t+=(t.indexOf("?")===-1?"?":"&")+g}return t}let Kv=class{constructor(){this.handlers=[]}use(n,e,r){return this.handlers.push({fulfilled:n,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){Ae.forEach(this.handlers,function(e){e!==null&&n(e)})}};const Jh={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},JS=typeof URLSearchParams<"u"?URLSearchParams:Yh,XS=typeof FormData<"u"?FormData:null,ZS=typeof Blob<"u"?Blob:null,QS={isBrowser:!0,classes:{URLSearchParams:JS,FormData:XS,Blob:ZS},protocols:["http","https","file","blob","url","data"]},Xh=typeof window<"u"&&typeof document<"u",Zh=typeof navigator=="object"&&navigator||void 0,e$=Xh&&(!Zh||["ReactNative","NativeScript","NS"].indexOf(Zh.product)<0),t$=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",n$=Xh&&window.location.href||"http://localhost",r$=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xh,hasStandardBrowserEnv:e$,hasStandardBrowserWebWorkerEnv:t$,navigator:Zh,origin:n$},Symbol.toStringTag,{value:"Module"})),Er={...r$,...QS};function i$(t,n){return pc(t,new Er.classes.URLSearchParams,{visitor:function(e,r,m,p){return Er.isNode&&Ae.isBuffer(e)?(this.append(r,e.toString("base64")),!1):p.defaultVisitor.apply(this,arguments)},...n})}function o$(t){return Ae.matchAll(/\w+|\[(\w*)]/g,t).map(n=>n[0]==="[]"?"":n[1]||n[0])}function s$(t){const n={},e=Object.keys(t);let r;const m=e.length;let p;for(r=0;r<m;r++)p=e[r],n[p]=t[p];return n}function Yv(t){function n(e,r,m,p){let g=e[p++];if(g==="__proto__")return!0;const w=Number.isFinite(+g),h=p>=e.length;return g=!g&&Ae.isArray(m)?m.length:g,h?(Ae.hasOwnProp(m,g)?m[g]=Ae.isArray(m[g])?m[g].concat(r):[m[g],r]:m[g]=r,!w):((!m[g]||!Ae.isObject(m[g]))&&(m[g]=[]),n(e,r,m[g],p)&&Ae.isArray(m[g])&&(m[g]=s$(m[g])),!w)}if(Ae.isFormData(t)&&Ae.isFunction(t.entries)){const e={};return Ae.forEachEntry(t,(r,m)=>{n(o$(r),m,e,0)}),e}return null}const ca=(t,n)=>t!=null&&Ae.hasOwnProp(t,n)?t[n]:void 0;function a$(t,n,e){if(Ae.isString(t))try{return(n||JSON.parse)(t),Ae.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(t)}const el={transitional:Jh,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const e=n.getContentType()||"",r=e.indexOf("application/json")>-1,m=Ae.isObject(t);if(m&&Ae.isHTMLForm(t)&&(t=new FormData(t)),Ae.isFormData(t))return r?JSON.stringify(Yv(t)):t;if(Ae.isArrayBuffer(t)||Ae.isBuffer(t)||Ae.isStream(t)||Ae.isFile(t)||Ae.isBlob(t)||Ae.isReadableStream(t))return t;if(Ae.isArrayBufferView(t))return t.buffer;if(Ae.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let p;if(m){const g=ca(this,"formSerializer");if(e.indexOf("application/x-www-form-urlencoded")>-1)return i$(t,g).toString();if((p=Ae.isFileList(t))||e.indexOf("multipart/form-data")>-1){const w=ca(this,"env"),h=w&&w.FormData;return pc(p?{"files[]":t}:t,h&&new h,g)}}return m||r?(n.setContentType("application/json",!1),a$(t)):t}],transformResponse:[function(t){const n=ca(this,"transitional")||el.transitional,e=n&&n.forcedJSONParsing,r=ca(this,"responseType"),m=r==="json";if(Ae.isResponse(t)||Ae.isReadableStream(t))return t;if(t&&Ae.isString(t)&&(e&&!r||m)){const p=!(n&&n.silentJSONParsing)&&m;try{return JSON.parse(t,ca(this,"parseReviver"))}catch(g){if(p)throw g.name==="SyntaxError"?gt.from(g,gt.ERR_BAD_RESPONSE,this,null,ca(this,"response")):g}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Er.classes.FormData,Blob:Er.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ae.forEach(["delete","get","head","post","put","patch"],t=>{el.headers[t]={}});const l$=Ae.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),c$=t=>{const n={};let e,r,m;return t&&t.split(`
1481
+ `).forEach(function(p){m=p.indexOf(":"),e=p.substring(0,m).trim().toLowerCase(),r=p.substring(m+1).trim(),!(!e||n[e]&&l$[e])&&(e==="set-cookie"?n[e]?n[e].push(r):n[e]=[r]:n[e]=n[e]?n[e]+", "+r:r)}),n},Jv=Symbol("internals"),u$=/[^\x09\x20-\x7E\x80-\xFF]/g;function h$(t){let n=0,e=t.length;for(;n<e;){const r=t.charCodeAt(n);if(r!==9&&r!==32)break;n+=1}for(;e>n;){const r=t.charCodeAt(e-1);if(r!==9&&r!==32)break;e-=1}return n===0&&e===t.length?t:t.slice(n,e)}function tl(t){return t&&String(t).trim().toLowerCase()}function d$(t){return h$(t.replace(u$,""))}function gc(t){return t===!1||t==null?t:Ae.isArray(t)?t.map(gc):d$(String(t))}function f$(t){const n=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(t);)n[r[1]]=r[2];return n}const p$=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Qh(t,n,e,r,m){if(Ae.isFunction(r))return r.call(this,n,e);if(m&&(n=e),!!Ae.isString(n)){if(Ae.isString(r))return n.indexOf(r)!==-1;if(Ae.isRegExp(r))return r.test(n)}}function g$(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,e,r)=>e.toUpperCase()+r)}function m$(t,n){const e=Ae.toCamelCase(" "+n);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+e,{value:function(m,p,g){return this[r].call(this,n,m,p,g)},configurable:!0})})}let ii=class{constructor(n){n&&this.set(n)}set(n,e,r){const m=this;function p(w,h,d){const a=tl(h);if(!a)throw new Error("header name must be a non-empty string");const l=Ae.findKey(m,a);(!l||m[l]===void 0||d===!0||d===void 0&&m[l]!==!1)&&(m[l||h]=gc(w))}const g=(w,h)=>Ae.forEach(w,(d,a)=>p(d,a,h));if(Ae.isPlainObject(n)||n instanceof this.constructor)g(n,e);else if(Ae.isString(n)&&(n=n.trim())&&!p$(n))g(c$(n),e);else if(Ae.isObject(n)&&Ae.isIterable(n)){let w={},h,d;for(const a of n){if(!Ae.isArray(a))throw TypeError("Object iterator must return a key-value pair");w[d=a[0]]=(h=w[d])?Ae.isArray(h)?[...h,a[1]]:[h,a[1]]:a[1]}g(w,e)}else n!=null&&p(e,n,r);return this}get(n,e){if(n=tl(n),n){const r=Ae.findKey(this,n);if(r){const m=this[r];if(!e)return m;if(e===!0)return f$(m);if(Ae.isFunction(e))return e.call(this,m,r);if(Ae.isRegExp(e))return e.exec(m);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,e){if(n=tl(n),n){const r=Ae.findKey(this,n);return!!(r&&this[r]!==void 0&&(!e||Qh(this,this[r],r,e)))}return!1}delete(n,e){const r=this;let m=!1;function p(g){if(g=tl(g),g){const w=Ae.findKey(r,g);w&&(!e||Qh(r,r[w],w,e))&&(delete r[w],m=!0)}}return Ae.isArray(n)?n.forEach(p):p(n),m}clear(n){const e=Object.keys(this);let r=e.length,m=!1;for(;r--;){const p=e[r];(!n||Qh(this,this[p],p,n,!0))&&(delete this[p],m=!0)}return m}normalize(n){const e=this,r={};return Ae.forEach(this,(m,p)=>{const g=Ae.findKey(r,p);if(g){e[g]=gc(m),delete e[p];return}const w=n?g$(p):String(p).trim();w!==p&&delete e[p],e[w]=gc(m),r[w]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const e=Object.create(null);return Ae.forEach(this,(r,m)=>{r!=null&&r!==!1&&(e[m]=n&&Ae.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,e])=>n+": "+e).join(`
1482
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...e){const r=new this(n);return e.forEach(m=>r.set(m)),r}static accessor(n){const e=(this[Jv]=this[Jv]={accessors:{}}).accessors,r=this.prototype;function m(p){const g=tl(p);e[g]||(m$(r,p),e[g]=!0)}return Ae.isArray(n)?n.forEach(m):m(n),this}};ii.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ae.reduceDescriptors(ii.prototype,({value:t},n)=>{let e=n[0].toUpperCase()+n.slice(1);return{get:()=>t,set(r){this[e]=r}}}),Ae.freezeMethods(ii);function ed(t,n){const e=this||el,r=n||e,m=ii.from(r.headers);let p=r.data;return Ae.forEach(t,function(g){p=g.call(e,p,m.normalize(),n?n.status:void 0)}),m.normalize(),p}function Xv(t){return!!(t&&t.__CANCEL__)}let nl=class extends gt{constructor(n,e,r){super(n??"canceled",gt.ERR_CANCELED,e,r),this.name="CanceledError",this.__CANCEL__=!0}};function Zv(t,n,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?t(e):n(new gt("Request failed with status code "+e.status,[gt.ERR_BAD_REQUEST,gt.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function v$(t){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""}function y$(t,n){t=t||10;const e=new Array(t),r=new Array(t);let m=0,p=0,g;return n=n!==void 0?n:1e3,function(w){const h=Date.now(),d=r[p];g||(g=h),e[m]=w,r[m]=h;let a=p,l=0;for(;a!==m;)l+=e[a++],a=a%t;if(m=(m+1)%t,m===p&&(p=(p+1)%t),h-g<n)return;const c=d&&h-d;return c?Math.round(l*1e3/c):void 0}}function b$(t,n){let e=0,r=1e3/n,m,p;const g=(w,h=Date.now())=>{e=h,m=null,p&&(clearTimeout(p),p=null),t(...w)};return[(...w)=>{const h=Date.now(),d=h-e;d>=r?g(w,h):(m=w,p||(p=setTimeout(()=>{p=null,g(m)},r-d)))},()=>m&&g(m)]}const mc=(t,n,e=3)=>{let r=0;const m=y$(50,250);return b$(p=>{const g=p.loaded,w=p.lengthComputable?p.total:void 0,h=w!=null?Math.min(g,w):g,d=Math.max(0,h-r),a=m(d);r=Math.max(r,h);const l={loaded:h,total:w,progress:w?h/w:void 0,bytes:d,rate:a||void 0,estimated:a&&w?(w-h)/a:void 0,event:p,lengthComputable:w!=null,[n?"download":"upload"]:!0};t(l)},e)},Qv=(t,n)=>{const e=t!=null;return[r=>n[0]({lengthComputable:e,total:t,loaded:r}),n[1]]},ey=t=>(...n)=>Ae.asap(()=>t(...n)),w$=Er.hasStandardBrowserEnv?((t,n)=>e=>(e=new URL(e,Er.origin),t.protocol===e.protocol&&t.host===e.host&&(n||t.port===e.port)))(new URL(Er.origin),Er.navigator&&/(msie|trident)/i.test(Er.navigator.userAgent)):()=>!0,x$=Er.hasStandardBrowserEnv?{write(t,n,e,r,m,p,g){if(typeof document>"u")return;const w=[`${t}=${encodeURIComponent(n)}`];Ae.isNumber(e)&&w.push(`expires=${new Date(e).toUTCString()}`),Ae.isString(r)&&w.push(`path=${r}`),Ae.isString(m)&&w.push(`domain=${m}`),p===!0&&w.push("secure"),Ae.isString(g)&&w.push(`SameSite=${g}`),document.cookie=w.join("; ")},read(t){if(typeof document>"u")return null;const n=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return n?decodeURIComponent(n[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function C$(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function k$(t,n){return n?t.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):t}function ty(t,n,e){let r=!C$(n);return t&&(r||e===!1)?k$(t,n):n}const ny=t=>t instanceof ii?{...t}:t;function ws(t,n){n=n||{};const e=Object.create(null);Object.defineProperty(e,"hasOwnProperty",{value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(d,a,l,c){return Ae.isPlainObject(d)&&Ae.isPlainObject(a)?Ae.merge.call({caseless:c},d,a):Ae.isPlainObject(a)?Ae.merge({},a):Ae.isArray(a)?a.slice():a}function m(d,a,l,c){if(Ae.isUndefined(a)){if(!Ae.isUndefined(d))return r(void 0,d,l,c)}else return r(d,a,l,c)}function p(d,a){if(!Ae.isUndefined(a))return r(void 0,a)}function g(d,a){if(Ae.isUndefined(a)){if(!Ae.isUndefined(d))return r(void 0,d)}else return r(void 0,a)}function w(d,a,l){if(Ae.hasOwnProp(n,l))return r(d,a);if(Ae.hasOwnProp(t,l))return r(void 0,d)}const h={url:p,method:p,data:p,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutMessage:g,withCredentials:g,withXSRFToken:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,allowedSocketPaths:g,responseEncoding:g,validateStatus:w,headers:(d,a,l)=>m(ny(d),ny(a),l,!0)};return Ae.forEach(Object.keys({...t,...n}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const a=Ae.hasOwnProp(h,d)?h[d]:m,l=Ae.hasOwnProp(t,d)?t[d]:void 0,c=Ae.hasOwnProp(n,d)?n[d]:void 0,u=a(l,c,d);Ae.isUndefined(u)&&a!==w||(e[d]=u)}),e}const ry=t=>{const n=ws({},t),e=c=>Ae.hasOwnProp(n,c)?n[c]:void 0,r=e("data");let m=e("withXSRFToken");const p=e("xsrfHeaderName"),g=e("xsrfCookieName");let w=e("headers");const h=e("auth"),d=e("baseURL"),a=e("allowAbsoluteUrls"),l=e("url");if(n.headers=w=ii.from(w),n.url=qv(ty(d,l,a),t.params,t.paramsSerializer),h&&w.set("Authorization","Basic "+btoa((h.username||"")+":"+(h.password?unescape(encodeURIComponent(h.password)):""))),Ae.isFormData(r)){if(Er.hasStandardBrowserEnv||Er.hasStandardBrowserWebWorkerEnv)w.setContentType(void 0);else if(Ae.isFunction(r.getHeaders)){const c=r.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([i,s])=>{u.includes(i.toLowerCase())&&w.set(i,s)})}}if(Er.hasStandardBrowserEnv&&(Ae.isFunction(m)&&(m=m(n)),m===!0||m==null&&w$(n.url))){const c=p&&g&&x$.read(g);c&&w.set(p,c)}return n},_$=typeof XMLHttpRequest<"u",A$=_$&&function(t){return new Promise(function(n,e){const r=ry(t);let m=r.data;const p=ii.from(r.headers).normalize();let{responseType:g,onUploadProgress:w,onDownloadProgress:h}=r,d,a,l,c,u;function i(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let s=new XMLHttpRequest;s.open(r.method.toUpperCase(),r.url,!0),s.timeout=r.timeout;function f(){if(!s)return;const x=ii.from("getAllResponseHeaders"in s&&s.getAllResponseHeaders()),I={data:!g||g==="text"||g==="json"?s.responseText:s.response,status:s.status,statusText:s.statusText,headers:x,config:t,request:s};Zv(function(R){n(R),i()},function(R){e(R),i()},I),s=null}"onloadend"in s?s.onloadend=f:s.onreadystatechange=function(){!s||s.readyState!==4||s.status===0&&!(s.responseURL&&s.responseURL.indexOf("file:")===0)||setTimeout(f)},s.onabort=function(){s&&(e(new gt("Request aborted",gt.ECONNABORTED,t,s)),s=null)},s.onerror=function(x){const I=x&&x.message?x.message:"Network Error",R=new gt(I,gt.ERR_NETWORK,t,s);R.event=x||null,e(R),s=null},s.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const I=r.transitional||Jh;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),e(new gt(x,I.clarifyTimeoutError?gt.ETIMEDOUT:gt.ECONNABORTED,t,s)),s=null},m===void 0&&p.setContentType(null),"setRequestHeader"in s&&Ae.forEach(p.toJSON(),function(x,I){s.setRequestHeader(I,x)}),Ae.isUndefined(r.withCredentials)||(s.withCredentials=!!r.withCredentials),g&&g!=="json"&&(s.responseType=r.responseType),h&&([l,u]=mc(h,!0),s.addEventListener("progress",l)),w&&s.upload&&([a,c]=mc(w),s.upload.addEventListener("progress",a),s.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(d=x=>{s&&(e(!x||x.type?new nl(null,t,s):x),s.abort(),s=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const b=v$(r.url);if(b&&Er.protocols.indexOf(b)===-1){e(new gt("Unsupported protocol "+b+":",gt.ERR_BAD_REQUEST,t));return}s.send(m||null)})},S$=(t,n)=>{const{length:e}=t=t?t.filter(Boolean):[];if(n||e){let r=new AbortController,m;const p=function(d){if(!m){m=!0,w();const a=d instanceof Error?d:this.reason;r.abort(a instanceof gt?a:new nl(a instanceof Error?a.message:a))}};let g=n&&setTimeout(()=>{g=null,p(new gt(`timeout of ${n}ms exceeded`,gt.ETIMEDOUT))},n);const w=()=>{t&&(g&&clearTimeout(g),g=null,t.forEach(d=>{d.unsubscribe?d.unsubscribe(p):d.removeEventListener("abort",p)}),t=null)};t.forEach(d=>d.addEventListener("abort",p));const{signal:h}=r;return h.unsubscribe=()=>Ae.asap(w),h}},$$=function*(t,n){let e=t.byteLength;if(e<n){yield t;return}let r=0,m;for(;r<e;)m=r+n,yield t.slice(r,m),r=m},R$=async function*(t,n){for await(const e of M$(t))yield*$$(e,n)},M$=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const n=t.getReader();try{for(;;){const{done:e,value:r}=await n.read();if(e)break;yield r}}finally{await n.cancel()}},iy=(t,n,e,r)=>{const m=R$(t,n);let p=0,g,w=h=>{g||(g=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:d,value:a}=await m.next();if(d){w(),h.close();return}let l=a.byteLength;if(e){let c=p+=l;e(c)}h.enqueue(new Uint8Array(a))}catch(d){throw w(d),d}},cancel(h){return w(h),m.return()}},{highWaterMark:2})},oy=64*1024,{isFunction:vc}=Ae,T$=(({Request:t,Response:n})=>({Request:t,Response:n}))(Ae.global),{ReadableStream:sy,TextEncoder:ay}=Ae.global,ly=(t,...n)=>{try{return!!t(...n)}catch{return!1}},E$=t=>{t=Ae.merge.call({skipUndefined:!0},T$,t);const{fetch:n,Request:e,Response:r}=t,m=n?vc(n):typeof fetch=="function",p=vc(e),g=vc(r);if(!m)return!1;const w=m&&vc(sy),h=m&&(typeof ay=="function"?(i=>s=>i.encode(s))(new ay):async i=>new Uint8Array(await new e(i).arrayBuffer())),d=p&&w&&ly(()=>{let i=!1;const s=new e(Er.origin,{body:new sy,method:"POST",get duplex(){return i=!0,"half"}}),f=s.headers.has("Content-Type");return s.body!=null&&s.body.cancel(),i&&!f}),a=g&&w&&ly(()=>Ae.isReadableStream(new r("").body)),l={stream:a&&(i=>i.body)};m&&["text","arrayBuffer","blob","formData","stream"].forEach(i=>{!l[i]&&(l[i]=(s,f)=>{let b=s&&s[i];if(b)return b.call(s);throw new gt(`Response type '${i}' is not supported`,gt.ERR_NOT_SUPPORT,f)})});const c=async i=>{if(i==null)return 0;if(Ae.isBlob(i))return i.size;if(Ae.isSpecCompliantForm(i))return(await new e(Er.origin,{method:"POST",body:i}).arrayBuffer()).byteLength;if(Ae.isArrayBufferView(i)||Ae.isArrayBuffer(i))return i.byteLength;if(Ae.isURLSearchParams(i)&&(i=i+""),Ae.isString(i))return(await h(i)).byteLength},u=async(i,s)=>Ae.toFiniteNumber(i.getContentLength())??c(s);return async i=>{let{url:s,method:f,data:b,signal:x,cancelToken:I,timeout:R,onDownloadProgress:A,onUploadProgress:C,responseType:O,headers:D,withCredentials:E="same-origin",fetchOptions:T}=ry(i),B=n||fetch;O=O?(O+"").toLowerCase():"text";let F=S$([x,I&&I.toAbortSignal()],R),N=null;const $=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let k;try{if(C&&d&&f!=="get"&&f!=="head"&&(k=await u(D,b))!==0){let Q=new e(s,{method:"POST",body:b,duplex:"half"}),le;if(Ae.isFormData(b)&&(le=Q.headers.get("content-type"))&&D.setContentType(le),Q.body){const[ne,ce]=Qv(k,mc(ey(C)));b=iy(Q.body,oy,ne,ce)}}Ae.isString(E)||(E=E?"include":"omit");const L=p&&"credentials"in e.prototype;if(Ae.isFormData(b)){const Q=D.getContentType();Q&&/^multipart\/form-data/i.test(Q)&&!/boundary=/i.test(Q)&&D.delete("content-type")}const W={...T,signal:F,method:f.toUpperCase(),headers:D.normalize().toJSON(),body:b,duplex:"half",credentials:L?E:void 0};N=p&&new e(s,W);let U=await(p?B(N,T):B(s,W));const q=a&&(O==="stream"||O==="response");if(a&&(A||q&&$)){const Q={};["status","statusText","headers"].forEach(ae=>{Q[ae]=U[ae]});const le=Ae.toFiniteNumber(U.headers.get("content-length")),[ne,ce]=A&&Qv(le,mc(ey(A),!0))||[];U=new r(iy(U.body,oy,ne,()=>{ce&&ce(),$&&$()}),Q)}O=O||"text";let Z=await l[Ae.findKey(l,O)||"text"](U,i);return!q&&$&&$(),await new Promise((Q,le)=>{Zv(Q,le,{data:Z,headers:ii.from(U.headers),status:U.status,statusText:U.statusText,config:i,request:N})})}catch(L){throw $&&$(),L&&L.name==="TypeError"&&/Load failed|fetch/i.test(L.message)?Object.assign(new gt("Network Error",gt.ERR_NETWORK,i,N,L&&L.response),{cause:L.cause||L}):gt.from(L,L&&L.code,i,N,L&&L.response)}}},I$=new Map,cy=t=>{let n=t&&t.env||{};const{fetch:e,Request:r,Response:m}=n,p=[r,m,e];let g=p.length,w=g,h,d,a=I$;for(;w--;)h=p[w],d=a.get(h),d===void 0&&a.set(h,d=w?new Map:E$(n)),a=d;return d};cy();const td={http:GS,xhr:A$,fetch:{get:cy}};Ae.forEach(td,(t,n)=>{if(t){try{Object.defineProperty(t,"name",{value:n})}catch{}Object.defineProperty(t,"adapterName",{value:n})}});const uy=t=>`- ${t}`,L$=t=>Ae.isFunction(t)||t===null||t===!1;function O$(t,n){t=Ae.isArray(t)?t:[t];const{length:e}=t;let r,m;const p={};for(let g=0;g<e;g++){r=t[g];let w;if(m=r,!L$(r)&&(m=td[(w=String(r)).toLowerCase()],m===void 0))throw new gt(`Unknown adapter '${w}'`);if(m&&(Ae.isFunction(m)||(m=m.get(n))))break;p[w||"#"+g]=m}if(!m){const g=Object.entries(p).map(([h,d])=>`adapter ${h} `+(d===!1?"is not supported by the environment":"is not available in the build"));let w=e?g.length>1?`since :
1483
+ `+g.map(uy).join(`
1484
+ `):" "+uy(g[0]):"as no adapter specified";throw new gt("There is no suitable adapter to dispatch the request "+w,"ERR_NOT_SUPPORT")}return m}const hy={getAdapter:O$,adapters:td};function nd(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new nl(null,t)}function dy(t){return nd(t),t.headers=ii.from(t.headers),t.data=ed.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),hy.getAdapter(t.adapter||el.adapter,t)(t).then(function(n){return nd(t),n.data=ed.call(t,t.transformResponse,n),n.headers=ii.from(n.headers),n},function(n){return Xv(n)||(nd(t),n&&n.response&&(n.response.data=ed.call(t,t.transformResponse,n.response),n.response.headers=ii.from(n.response.headers))),Promise.reject(n)})}const fy="1.15.2",yc={};["object","boolean","number","function","string","symbol"].forEach((t,n)=>{yc[t]=function(e){return typeof e===t||"a"+(n<1?"n ":" ")+t}});const py={};yc.transitional=function(t,n,e){function r(m,p){return"[Axios v"+fy+"] Transitional option '"+m+"'"+p+(e?". "+e:"")}return(m,p,g)=>{if(t===!1)throw new gt(r(p," has been removed"+(n?" in "+n:"")),gt.ERR_DEPRECATED);return n&&!py[p]&&(py[p]=!0,console.warn(r(p," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(m,p,g):!0}},yc.spelling=function(t){return(n,e)=>(console.warn(`${e} is likely a misspelling of ${t}`),!0)};function N$(t,n,e){if(typeof t!="object")throw new gt("options must be an object",gt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let m=r.length;for(;m-- >0;){const p=r[m],g=Object.prototype.hasOwnProperty.call(n,p)?n[p]:void 0;if(g){const w=t[p],h=w===void 0||g(w,p,t);if(h!==!0)throw new gt("option "+p+" must be "+h,gt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new gt("Unknown option "+p,gt.ERR_BAD_OPTION)}}const bc={assertOptions:N$,validators:yc},Ei=bc.validators;let xs=class{constructor(n){this.defaults=n||{},this.interceptors={request:new Kv,response:new Kv}}async request(n,e){try{return await this._request(n,e)}catch(r){if(r instanceof Error){let m={};Error.captureStackTrace?Error.captureStackTrace(m):m=new Error;const p=(()=>{if(!m.stack)return"";const g=m.stack.indexOf(`
1485
+ `);return g===-1?"":m.stack.slice(g+1)})();try{if(!r.stack)r.stack=p;else if(p){const g=p.indexOf(`
1486
+ `),w=g===-1?-1:p.indexOf(`
1487
+ `,g+1),h=w===-1?"":p.slice(w+1);String(r.stack).endsWith(h)||(r.stack+=`
1488
+ `+p)}}catch{}}throw r}}_request(n,e){typeof n=="string"?(e=e||{},e.url=n):e=n||{},e=ws(this.defaults,e);const{transitional:r,paramsSerializer:m,headers:p}=e;r!==void 0&&bc.assertOptions(r,{silentJSONParsing:Ei.transitional(Ei.boolean),forcedJSONParsing:Ei.transitional(Ei.boolean),clarifyTimeoutError:Ei.transitional(Ei.boolean),legacyInterceptorReqResOrdering:Ei.transitional(Ei.boolean)},!1),m!=null&&(Ae.isFunction(m)?e.paramsSerializer={serialize:m}:bc.assertOptions(m,{encode:Ei.function,serialize:Ei.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),bc.assertOptions(e,{baseUrl:Ei.spelling("baseURL"),withXsrfToken:Ei.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let g=p&&Ae.merge(p.common,p[e.method]);p&&Ae.forEach(["delete","get","head","post","put","patch","common"],i=>{delete p[i]}),e.headers=ii.concat(g,p);const w=[];let h=!0;this.interceptors.request.forEach(function(i){if(typeof i.runWhen=="function"&&i.runWhen(e)===!1)return;h=h&&i.synchronous;const s=e.transitional||Jh;s&&s.legacyInterceptorReqResOrdering?w.unshift(i.fulfilled,i.rejected):w.push(i.fulfilled,i.rejected)});const d=[];this.interceptors.response.forEach(function(i){d.push(i.fulfilled,i.rejected)});let a,l=0,c;if(!h){const i=[dy.bind(this),void 0];for(i.unshift(...w),i.push(...d),c=i.length,a=Promise.resolve(e);l<c;)a=a.then(i[l++],i[l++]);return a}c=w.length;let u=e;for(;l<c;){const i=w[l++],s=w[l++];try{u=i(u)}catch(f){s.call(this,f);break}}try{a=dy.call(this,u)}catch(i){return Promise.reject(i)}for(l=0,c=d.length;l<c;)a=a.then(d[l++],d[l++]);return a}getUri(n){n=ws(this.defaults,n);const e=ty(n.baseURL,n.url,n.allowAbsoluteUrls);return qv(e,n.params,n.paramsSerializer)}};Ae.forEach(["delete","get","head","options"],function(t){xs.prototype[t]=function(n,e){return this.request(ws(e||{},{method:t,url:n,data:(e||{}).data}))}}),Ae.forEach(["post","put","patch"],function(t){function n(e){return function(r,m,p){return this.request(ws(p||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:m}))}}xs.prototype[t]=n(),xs.prototype[t+"Form"]=n(!0)});let D$=class ew{constructor(n){if(typeof n!="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 p=r._listeners.length;for(;p-- >0;)r._listeners[p](m);r._listeners=null}),this.promise.then=m=>{let p;const g=new Promise(w=>{r.subscribe(w),p=w}).then(m);return g.cancel=function(){r.unsubscribe(p)},g},n(function(m,p,g){r.reason||(r.reason=new nl(m,p,g),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const e=this._listeners.indexOf(n);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const n=new AbortController,e=r=>{n.abort(r)};return this.subscribe(e),n.signal.unsubscribe=()=>this.unsubscribe(e),n.signal}static source(){let n;return{token:new ew(function(e){n=e}),cancel:n}}};function P$(t){return function(n){return t.apply(null,n)}}function F$(t){return Ae.isObject(t)&&t.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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(rd).forEach(([t,n])=>{rd[n]=t});function gy(t){const n=new xs(t),e=Lv(xs.prototype.request,n);return Ae.extend(e,xs.prototype,n,{allOwnKeys:!0}),Ae.extend(e,n,null,{allOwnKeys:!0}),e.create=function(r){return gy(ws(t,r))},e}const Yn=Tn("g",gy(el));Yn.Axios=xs,Yn.CanceledError=nl,Yn.CancelToken=D$,Yn.isCancel=Xv,Yn.VERSION=fy,Yn.toFormData=pc,Yn.AxiosError=gt,Yn.Cancel=Yn.CanceledError,Yn.all=function(t){return Promise.all(t)},Yn.spread=P$,Yn.isAxiosError=F$,Yn.mergeConfig=ws,Yn.AxiosHeaders=ii,Yn.formToJSON=t=>Yv(Ae.isHTMLForm(t)?new FormData(t):t),Yn.getAdapter=hy.getAdapter,Yn.HttpStatusCode=rd,Yn.default=Yn;const{Axios:L2,AxiosError:O2,CanceledError:N2,isCancel:D2,CancelToken:P2,VERSION:F2,all:z2,Cancel:W2,isAxiosError:B2,spread:j2,toFormData:H2,AxiosHeaders:U2,HttpStatusCode:V2,formToJSON:G2,getAdapter:q2,mergeConfig:K2}=Yn;function my(){return Object.assign({},Ks())}function z$(t,n,e){const r=Wr(t,e?.in);return r.setTime(r.getTime()+n*Ul),r}function W$(t,n){const e=()=>oo(n?.in,NaN),r=U$(t);let m;if(r.date){const h=V$(r.date,2);m=G$(h.restDateString,h.year)}if(!m||isNaN(+m))return e();const p=+m;let g=0,w;if(r.time&&(g=q$(r.time),isNaN(g)))return e();if(r.timezone){if(w=K$(r.timezone),isNaN(w))return e()}else{const h=new Date(p+g),d=Wr(0,n?.in);return d.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),d.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),d}return Wr(p+g+w,n?.in)}const wc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},B$=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,j$=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,H$=/^([+-])(\d{2})(?::?(\d{2}))?$/;function U$(t){const n={},e=t.split(wc.dateTimeDelimiter);let r;if(e.length>2)return n;if(/:/.test(e[0])?r=e[0]:(n.date=e[0],r=e[1],wc.timeZoneDelimiter.test(n.date)&&(n.date=t.split(wc.timeZoneDelimiter)[0],r=t.substr(n.date.length,t.length))),r){const m=wc.timezone.exec(r);m?(n.time=r.replace(m[1],""),n.timezone=m[1]):n.time=r}return n}function V$(t,n){const e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+n)+"})|(\\d{2}|[+-]\\d{"+(2+n)+"})$)"),r=t.match(e);if(!r)return{year:NaN,restDateString:""};const m=r[1]?parseInt(r[1]):null,p=r[2]?parseInt(r[2]):null;return{year:p===null?m:p*100,restDateString:t.slice((r[1]||r[2]).length)}}function G$(t,n){if(n===null)return new Date(NaN);const e=t.match(B$);if(!e)return new Date(NaN);const r=!!e[4],m=rl(e[1]),p=rl(e[2])-1,g=rl(e[3]),w=rl(e[4]),h=rl(e[5])-1;if(r)return Q$(n,w,h)?Y$(n,w,h):new Date(NaN);{const d=new Date(0);return!X$(n,p,g)||!Z$(n,m)?new Date(NaN):(d.setUTCFullYear(n,p,Math.max(m,g)),d)}}function rl(t){return t?parseInt(t):1}function q$(t){const n=t.match(j$);if(!n)return NaN;const e=id(n[1]),r=id(n[2]),m=id(n[3]);return eR(e,r,m)?e*Lu+r*Ul+m*1e3:NaN}function id(t){return t&&parseFloat(t.replace(",","."))||0}function K$(t){if(t==="Z")return 0;const n=t.match(H$);if(!n)return 0;const e=n[1]==="+"?-1:1,r=parseInt(n[2]),m=n[3]&&parseInt(n[3])||0;return tR(r,m)?e*(r*Lu+m*Ul):NaN}function Y$(t,n,e){const r=new Date(0);r.setUTCFullYear(t,0,4);const m=r.getUTCDay()||7,p=(n-1)*7+e+1-m;return r.setUTCDate(r.getUTCDate()+p),r}const J$=[31,null,31,30,31,30,31,31,30,31,30,31];function vy(t){return t%400===0||t%4===0&&t%100!==0}function X$(t,n,e){return n>=0&&n<=11&&e>=1&&e<=(J$[n]||(vy(t)?29:28))}function Z$(t,n){return n>=1&&n<=(vy(t)?366:365)}function Q$(t,n,e){return n>=1&&n<=53&&e>=0&&e<=6}function eR(t,n,e){return t===24?n===0&&e===0:e>=0&&e<60&&n>=0&&n<60&&t>=0&&t<25}function tR(t,n){return n>=0&&n<=59}function nR(t,n,e){return z$(t,-n,e)}function yy(t,n,e){const r=my(),m=oR(t,e.timeZone,e.locale??r.locale);return"formatToParts"in m?rR(m,n):iR(m,n)}function rR(t,n){const e=t.formatToParts(n);for(let r=e.length-1;r>=0;--r)if(e[r].type==="timeZoneName")return e[r].value}function iR(t,n){const e=t.format(n).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(e);return r?r[0].substr(1):""}function oR(t,n,e){return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:n,timeZoneName:t})}function sR(t,n){const e=hR(n);return"formatToParts"in e?lR(e,t):cR(e,t)}const aR={year:0,month:1,day:2,hour:3,minute:4,second:5};function lR(t,n){try{const e=t.formatToParts(n),r=[];for(let m=0;m<e.length;m++){const p=aR[e[m].type];p!==void 0&&(r[p]=parseInt(e[m].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}function cR(t,n){const e=t.format(n),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const od={},by=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")),uR=by==="06/25/2014, 00:00:00"||by==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function hR(t){return od[t]||(od[t]=uR?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),od[t]}function wy(t,n,e,r,m,p,g){const w=new Date(0);return w.setUTCFullYear(t,n,e),w.setUTCHours(r,m,p,g),w}const xy=36e5,dR=6e4,sd={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function ad(t,n,e){if(!t)return 0;let r=sd.timezoneZ.exec(t);if(r)return 0;let m,p;if(r=sd.timezoneHH.exec(t),r)return m=parseInt(r[1],10),Cy(m)?-(m*xy):NaN;if(r=sd.timezoneHHMM.exec(t),r){m=parseInt(r[2],10);const g=parseInt(r[3],10);return Cy(m,g)?(p=Math.abs(m)*xy+g*dR,r[1]==="+"?-p:p):NaN}if(gR(t)){n=new Date(n||Date.now());const g=e?n:fR(n),w=ld(g,t);return-(e?w:pR(n,w,t))}return NaN}function fR(t){return wy(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}function ld(t,n){const e=sR(t,n),r=wy(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime();let m=t.getTime();const p=m%1e3;return m-=p>=0?p:1e3+p,r-m}function pR(t,n,e){let r=t.getTime()-n;const m=ld(new Date(r),e);if(n===m)return n;r-=m-n;const p=ld(new Date(r),e);return m===p?m:Math.max(m,p)}function Cy(t,n){return-23<=t&&t<=23&&(n==null||0<=n&&n<=59)}const ky={};function gR(t){if(ky[t])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:t}),ky[t]=!0,!0}catch{return!1}}const mR=60*1e3,vR={X:function(t,n,e){const r=cd(e.timeZone,t);if(r===0)return"Z";switch(n){case"X":return _y(r);case"XXXX":case"XX":return ua(r);default:return ua(r,":")}},x:function(t,n,e){const r=cd(e.timeZone,t);switch(n){case"x":return _y(r);case"xxxx":case"xx":return ua(r);default:return ua(r,":")}},O:function(t,n,e){const r=cd(e.timeZone,t);switch(n){case"O":case"OO":case"OOO":return"GMT"+yR(r,":");default:return"GMT"+ua(r,":")}},z:function(t,n,e){switch(n){case"z":case"zz":case"zzz":return yy("short",t,e);default:return yy("long",t,e)}}};function cd(t,n){const e=t?ad(t,n,!0)/mR:n?.getTimezoneOffset()??0;if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+t);return e}function xc(t,n){const e=t<0?"-":"";let r=Math.abs(t).toString();for(;r.length<n;)r="0"+r;return e+r}function ua(t,n=""){const e=t>0?"-":"+",r=Math.abs(t),m=xc(Math.floor(r/60),2),p=xc(Math.floor(r%60),2);return e+m+n+p}function _y(t,n){return t%60===0?(t>0?"-":"+")+xc(Math.abs(t)/60,2):ua(t,n)}function yR(t,n=""){const e=t>0?"-":"+",r=Math.abs(t),m=Math.floor(r/60),p=r%60;return p===0?e+String(m):e+String(m)+n+xc(p,2)}function Ay(t){const n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+t-+n}const bR=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,ud=36e5,Sy=6e4,wR=2,jr={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:bR};function $y(t,n={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(t===null)return new Date(NaN);const e=n.additionalDigits==null?wR:Number(n.additionalDigits);if(e!==2&&e!==1&&e!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]")return new Date(t.getTime());if(typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]")return new Date(t);if(Object.prototype.toString.call(t)!=="[object String]")return new Date(NaN);const r=xR(t),{year:m,restDateString:p}=CR(r.date,e),g=kR(p,m);if(g===null||isNaN(g.getTime()))return new Date(NaN);if(g){const w=g.getTime();let h=0,d;if(r.time&&(h=_R(r.time),h===null||isNaN(h)))return new Date(NaN);if(r.timeZone||n.timeZone){if(d=ad(r.timeZone||n.timeZone,new Date(w+h)),isNaN(d))return new Date(NaN)}else d=Ay(new Date(w+h)),d=Ay(new Date(w+h+d));return new Date(w+h+d)}else return new Date(NaN)}function xR(t){const n={};let e=jr.dateTimePattern.exec(t),r;if(e?(n.date=e[1],r=e[3]):(e=jr.datePattern.exec(t),e?(n.date=e[1],r=e[2]):(n.date=null,r=t)),r){const m=jr.timeZone.exec(r);m?(n.time=r.replace(m[1],""),n.timeZone=m[1].trim()):n.time=r}return n}function CR(t,n){if(t){const e=jr.YYY[n],r=jr.YYYYY[n];let m=jr.YYYY.exec(t)||r.exec(t);if(m){const p=m[1];return{year:parseInt(p,10),restDateString:t.slice(p.length)}}if(m=jr.YY.exec(t)||e.exec(t),m){const p=m[1];return{year:parseInt(p,10)*100,restDateString:t.slice(p.length)}}}return{year:null}}function kR(t,n){if(n===null)return null;let e,r,m;if(!t||!t.length)return e=new Date(0),e.setUTCFullYear(n),e;let p=jr.MM.exec(t);if(p)return e=new Date(0),r=parseInt(p[1],10)-1,Ty(n,r)?(e.setUTCFullYear(n,r),e):new Date(NaN);if(p=jr.DDD.exec(t),p){e=new Date(0);const g=parseInt(p[1],10);return $R(n,g)?(e.setUTCFullYear(n,0,g),e):new Date(NaN)}if(p=jr.MMDD.exec(t),p){e=new Date(0),r=parseInt(p[1],10)-1;const g=parseInt(p[2],10);return Ty(n,r,g)?(e.setUTCFullYear(n,r,g),e):new Date(NaN)}if(p=jr.Www.exec(t),p)return m=parseInt(p[1],10)-1,Ey(m)?Ry(n,m):new Date(NaN);if(p=jr.WwwD.exec(t),p){m=parseInt(p[1],10)-1;const g=parseInt(p[2],10)-1;return Ey(m,g)?Ry(n,m,g):new Date(NaN)}return null}function _R(t){let n,e,r=jr.HH.exec(t);if(r)return n=parseFloat(r[1].replace(",",".")),hd(n)?n%24*ud:NaN;if(r=jr.HHMM.exec(t),r)return n=parseInt(r[1],10),e=parseFloat(r[2].replace(",",".")),hd(n,e)?n%24*ud+e*Sy:NaN;if(r=jr.HHMMSS.exec(t),r){n=parseInt(r[1],10),e=parseInt(r[2],10);const m=parseFloat(r[3].replace(",","."));return hd(n,e,m)?n%24*ud+e*Sy+m*1e3:NaN}return null}function Ry(t,n,e){n=n||0,e=e||0;const r=new Date(0);r.setUTCFullYear(t,0,4);const m=r.getUTCDay()||7,p=n*7+e+1-m;return r.setUTCDate(r.getUTCDate()+p),r}const AR=[31,28,31,30,31,30,31,31,30,31,30,31],SR=[31,29,31,30,31,30,31,31,30,31,30,31];function My(t){return t%400===0||t%4===0&&t%100!==0}function Ty(t,n,e){if(n<0||n>11)return!1;if(e!=null){if(e<1)return!1;const r=My(t);if(r&&e>SR[n]||!r&&e>AR[n])return!1}return!0}function $R(t,n){if(n<1)return!1;const e=My(t);return!(e&&n>366||!e&&n>365)}function Ey(t,n){return!(t<0||t>52||n!=null&&(n<0||n>6))}function hd(t,n,e){return!(t<0||t>=25||n!=null&&(n<0||n>=60)||e!=null&&(e<0||e>=60))}const RR=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function MR(t,n,e={}){n=String(n);const r=n.match(RR);if(r){const m=$y(e.originalDate||t,e);n=r.reduce(function(p,g){if(g[0]==="'")return p;const w=p.indexOf(g),h=p[w-1]==="'",d=p.replace(g,"'"+vR[g[0]](m,g,e)+"'");return h?d.substring(0,w-1)+d.substring(w+1):d},n)}return ds(t,n,e)}function TR(t,n,e){t=$y(t,e);const r=ad(n,t,!0),m=new Date(t.getTime()-r),p=new Date(0);return p.setFullYear(m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate()),p.setHours(m.getUTCHours(),m.getUTCMinutes(),m.getUTCSeconds(),m.getUTCMilliseconds()),p}function Cc(t,n,e,r){return r={...r,timeZone:n,originalDate:t},MR(TR(t,n,{timeZone:r.timeZone}),e,r)}const kc="yyyy-MM-dd",Iy="HH:mm:ss.SSS",Ly="HH:mm:ss",_c=`${kc} ${Iy}`,Oy=`${kc} ${Ly}`,Y2=Tn("R",{methods:{parseDateTime(t,n){return t.includes(" ")&&(t=t.replace(" ","T")),n&&n==="UTC"&&(t+="Z"),Date.parse(t)},formatUtcToLocal(t,n){return ds(!n||n==="local"?nR(t,t.getTimezoneOffset()):t,_c)},formatDateTime(t,n){return!n||n==="local"?ds(t,_c):Cc(t,n,_c)},formatDateTimeHMS(t,n){return!n||n==="local"?ds(t,Oy):Cc(t,n,Oy)},formatDate:function(t,n){return!n||n==="local"?ds(t,kc):Cc(t,this.timeZone,kc)},formatTime:function(t,n,e=Iy){return!n||n==="local"?ds(t,e):Cc(t,this.timeZone,e)},formatTimeHMS:function(t,n){return this.formatTime(t,n,Ly)},formatTimestamp(t,n){return this.formatDateTime(W$(t),n)},formatSeconds(t,n){return this.formatDateTime(new Date(t*1e3),n)},formatNanoseconds(t,n){return this.formatDateTime(new Date(parseInt(t)/1e6),n)}}}),Ny=100,Dy=Tn("c",Ef("app",{state:()=>({notifyHistory:[],namedWidgets:{},playback:{playbackMode:null,playbackDateTime:null,playbackStep:1,playbackLoading:0}}),getters:{namedWidget:t=>n=>t.namedWidgets[n]},actions:{notifyAddHistory(t){this.notifyHistory.length>=Ny&&(this.notifyHistory.length=Ny-1),this.notifyHistory.unshift(t)},notifyClearHistory(){this.notifyHistory=[]},setNamedWidget(t){Object.assign(this.namedWidgets,t)},clearNamedWidget(t){delete this.namedWidgets[t]},updatePlayback(t){Object.assign(this.playback,t)}}})),ha=If();ha.use(({store:t})=>{t.commit=(n,e)=>{typeof t[n]=="function"&&t[n](e)},t.dispatch=(n,e)=>{if(typeof t[n]=="function")return t[n](e)}});const ER=ha.install.bind(ha);ha.install=t=>{ER(t);const n=Dy(ha);t.config.globalProperties.$store={state:new Proxy({},{get(e,r){return n.$state}}),getters:new Proxy({},{get(e,r){if(r.includes("/")){const[,m]=r.split("/");return n[m]}return n[r]}}),commit(e,r){if(e.includes("/")){const[,m]=e.split("/");n[m]?.(r)}else n[e]?.(r)},dispatch(e,r){if(e.includes("/")){const[,m]=e.split("/");return n[m]?.(r)}else return n[e]?.(r)}}};const IR="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=",LR={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number,default:1}},computed:{icons:function(){return IR},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const t=WR.indexOf(Py[this.status]),n=1-(t-1)*.05,e=224*this.scaleFactor*n,r=32*this.scaleFactor*n,m=32*this.scaleFactor*n;return[`background-image: url(${this.icons});`,`background-position-x: -${t*m}px;`,`background-size: ${e}px ${r}px;`,`height: ${m}px;`,`width: ${m}px;`,`padding-top: ${t-1}px;`].join("")}}};function OR(t,n,e,r,m,p){return En(),Qr("div",{style:Ma(p.iconStyle)},null,4)}const NR=zo(LR,[["render",OR]]),DR={props:{icon:{type:String,default:null},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function PR(t,n,e,r,m,p){const g=St("rux-icon");return En(),io(g,{size:e.size,icon:e.icon,style:Ma(p.colorStyle)},null,8,["size","icon","style"])}const FR=zo(DR,[["render",PR],["__scopeId","data-v-bb4cd487"]]),Py={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"},dd={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},zR=function(t){const n="#000000",e="#ffffff",r=dd[Py[t]];if(r){const m=+`0x${r.slice(1,3)}`,p=+`0x${r.slice(3,5)}`,g=+`0x${r.slice(5,7)}`;if((m*299+p*587+g*114)/1e3>128)return n}return e},WR=Object.keys(dd),BR={astro:{component:t=>js(FR,{...t})},"astro-status":{component:t=>js(NR,{...t,status:t.icon})}},jR={extras:{component:t=>js(vw,{...t})}},J2=Tn("k",{data:{configKey:"",dontSaveDefaultConfig:!1},methods:{loadDefaultConfig:function(){return localStorage[`${this.configKey}__default`]?JSON.parse(localStorage[`${this.configKey}__default`]):{}},saveDefaultConfig:function(t){this.dontSaveDefaultConfig!==!0&&(localStorage[`${this.configKey}__default`]=JSON.stringify(t))},openConfigBase:function(t,n=!1,e=null){new us().load_config(this.configKey,t).then(r=>{r?(this.$notify.normal({title:"Loading configuration",body:t}),e&&e(JSON.parse(r)),n||this.$route.fullPath.includes(t)||this.$router.push({query:{config:t}})):this.$notify.caution({title:"Unknown configuration",body:t})}).catch(r=>{r&&this.$notify.serious({title:`Error opening configuration: ${t}`,body:r})})},saveConfigBase:function(t,n){new us().save_config(this.configKey,t,JSON.stringify(n)).then(()=>{this.$notify.normal({title:"Saved configuration",body:t})}).catch(e=>{e&&this.$notify.serious({title:`Error saving configuration: ${t}`,body:e})})},resetConfigBase:function(){localStorage.removeItem(`${this.configKey}__default`);const t={...this.$route.query};delete t.config,this.$router.replace({query:t})}}}),HR={props:{configKey:{type:String,default:null},modelValue:Boolean},emits:["update:modelValue","warning","success"],data(){return{configs:[],headers:[{title:"Configuration",value:"config"},{title:"Actions",value:"actions",align:"end",sortable:!1}],search:null,selectedRows:[]}},computed:{selectedItem:function(){return this.selectedRows.length?this.configs.find(t=>t.configId===this.selectedRows[0]):null},error:function(){return this.selectedItem===""||this.selectedItem===null?"Must select a config":null},show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},mounted(){let t=-1;new us().list_configs(this.configKey).then(n=>{this.configs=n.map(e=>(t+=1,{configId:t,config:e}))}).catch(n=>{this.$emit("warning",`Failed to connect to OpenC3. ${n}`)})},methods:{selectRow:function(t){this.selectedRows=[t.item.configId]},success:function(){this.selectedItem&&(this.$emit("success",this.selectedItem.config),this.show=!1,this.search=null,this.selectedRows=[])},cancel:function(){this.show=!1,this.search=null,this.selectedRows=[]},deleteConfig:function(t){this.$dialog.confirm(`Are you sure you want to delete: ${t.config}`,{okText:"Delete",cancelText:"Cancel"}).then(n=>{this.selectedItem?.config===t.config&&(this.selectedRows=[]),this.configs.splice(this.configs.indexOf(t),1),new us().delete_config(this.configKey,t.config)}).catch(n=>{n!==!0&&this.$emit("warning",`Failed to delete config ${t.config} Error: ${n}`)})}}},UR={class:"mt-4 pa-3"},VR=["textContent"];function GR(t,n,e,r,m,p){const g=St("v-spacer"),w=St("v-toolbar"),h=St("v-text-field"),d=St("v-row"),a=St("v-btn"),l=St("v-data-table"),c=St("v-card-text"),u=St("v-card-actions"),i=St("v-card"),s=St("v-dialog");return En(),io(s,{modelValue:p.show,"onUpdate:modelValue":n[4]||(n[4]=f=>p.show=f),persistent:"",width:"600",onKeydown:Al(p.cancel,["esc"])},{default:Ot(()=>[ut(i,null,{default:Ot(()=>[fr("form",{onSubmit:n[3]||(n[3]=Hs((...f)=>p.success&&p.success(...f),["prevent"]))},[ut(w,{height:"24"},{default:Ot(()=>[ut(g),n[5]||(n[5]=fr("span",null,"Open Configuration",-1)),ut(g)]),_:1}),ut(c,null,{default:Ot(()=>[fr("div",UR,[ut(d,{dense:""},{default:Ot(()=>[ut(h,{modelValue:m.search,"onUpdate:modelValue":n[0]||(n[0]=f=>m.search=f),label:"Search",type:"text","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","clear-icon":"mdi-close-circle-outline",autofocus:"","single-line":"","hide-details":"","data-test":"search"},null,8,["modelValue"])]),_:1}),ut(l,{modelValue:m.selectedRows,"onUpdate:modelValue":n[1]||(n[1]=f=>m.selectedRows=f),"show-select":"","select-strategy":"single","item-value":"configId",search:m.search,headers:m.headers,items:m.configs,"items-per-page":5,"items-per-page-options":[5],"onClick:row":n[2]||(n[2]=(f,b)=>p.selectRow(b))},{"item.actions":Ot(({item:f})=>[ut(a,{class:"mt-1",icon:"mdi-delete",variant:"text","data-test":"item-delete",onClick:b=>p.deleteConfig(f)},null,8,["onClick"])]),_:1},8,["modelValue","search","headers","items"]),ut(d,{dense:""},{default:Ot(()=>[Sl(fr("span",{class:"ma-2 text-red",textContent:ei(p.error)},null,8,VR),[[$l,p.error]])]),_:1})])]),_:1}),ut(u,{class:"px-2"},{default:Ot(()=>[ut(g),ut(a,{variant:"outlined","data-test":"open-config-cancel-btn",onClick:p.cancel},{default:Ot(()=>[...n[6]||(n[6]=[Rr(" Cancel ",-1)])]),_:1},8,["onClick"]),ut(a,{variant:"flat",type:"submit","data-test":"open-config-submit-btn",disabled:!!p.error,onClick:Hs(p.success,["prevent"])},{default:Ot(()=>[...n[7]||(n[7]=[Rr(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})],32)]),_:1})]),_:1},8,["modelValue","onKeydown"])}const X2=Tn("I",zo(HR,[["render",GR]])),qR={props:{configKey:{type:String,default:null},modelValue:Boolean},emits:["update:modelValue","warning","success"],data(){return{configName:"",configs:[],headers:[{title:"Configuration",value:"config"},{title:"Actions",value:"actions",align:"end",sortable:!1}],search:null,selectedRows:[]}},computed:{selectedItem:function(){return this.selectedRows.length?this.configs.find(t=>t.configId===this.selectedRows[0]):null},error:function(){return this.configName?/^[A-Za-z0-9_\-. ]+$/.test(this.configName)?null:"Config name must only contain letters, numbers, hyphens, underscores, spaces, and periods":"Config must have a name"},show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},watch:{selectedItem:function(t){t&&(this.configName=t.config)}},mounted(){let t=-1;new us().list_configs(this.configKey).then(n=>{this.configs=n.map(e=>(t+=1,{configId:t,config:e}))}).catch(n=>{this.$emit("warning",`Failed to connect to OpenC3. ${n}`)})},methods:{selectRow:function(t){this.selectedRows=[t.item.configId]},success:function(){this.$emit("success",this.configName),this.show=!1,this.search=null,this.selectedRows=[],this.configName=""},cancel:function(){this.show=!1,this.search=null,this.selectedRows=[],this.configName=""},deleteConfig:function(t){this.$dialog.confirm(`Are you sure you want to delete: ${t.config}`,{okText:"Delete",cancelText:"Cancel"}).then(n=>{this.selectedItem?.config===t.config&&(this.selectedRows=[],this.configName=""),this.configs.splice(this.configs.indexOf(t),1),new us().delete_config(this.configKey,t.config)}).catch(n=>{n!==!0&&this.$emit("warning",`Failed to delete config ${t.config} Error: ${n}`)})}}},KR={class:"mt-4 pa-3"},YR=["textContent"];function JR(t,n,e,r,m,p){const g=St("v-spacer"),w=St("v-toolbar"),h=St("v-text-field"),d=St("v-row"),a=St("v-btn"),l=St("v-data-table"),c=St("v-card-text"),u=St("v-card-actions"),i=St("v-card"),s=St("v-dialog");return En(),io(s,{modelValue:p.show,"onUpdate:modelValue":n[5]||(n[5]=f=>p.show=f),persistent:"",width:"600",onKeydown:Al(p.cancel,["esc"])},{default:Ot(()=>[ut(i,null,{default:Ot(()=>[fr("form",{onSubmit:n[4]||(n[4]=Hs((...f)=>p.success&&p.success(...f),["prevent"]))},[ut(w,{height:"24"},{default:Ot(()=>[ut(g),n[6]||(n[6]=fr("span",null,"Save Configuration",-1)),ut(g)]),_:1}),ut(c,null,{default:Ot(()=>[fr("div",KR,[ut(d,{dense:""},{default:Ot(()=>[ut(h,{modelValue:m.search,"onUpdate:modelValue":n[0]||(n[0]=f=>m.search=f),label:"search",type:"text","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","clear-icon":"mdi-close-circle-outline","single-line":"","hide-details":"","data-test":"search"},null,8,["modelValue"])]),_:1}),ut(l,{modelValue:m.selectedRows,"onUpdate:modelValue":n[1]||(n[1]=f=>m.selectedRows=f),"show-select":"","select-strategy":"single","item-value":"configId",search:m.search,headers:m.headers,items:m.configs,"items-per-page":5,"items-per-page-options":[5],"onClick:row":n[2]||(n[2]=(f,b)=>p.selectRow(b))},{"item.actions":Ot(({item:f})=>[ut(a,{class:"mt-1",icon:"mdi-delete",variant:"text","data-test":"item-delete",onClick:b=>p.deleteConfig(f)},null,8,["onClick"])]),_:1},8,["modelValue","search","headers","items"]),ut(d,{dense:""},{default:Ot(()=>[ut(h,{modelValue:m.configName,"onUpdate:modelValue":n[3]||(n[3]=f=>m.configName=f),"hide-details":"",autofocus:"",disabled:!!p.selectedItem,label:"Configuration Name","data-test":"name-input-save-config-dialog"},null,8,["modelValue","disabled"])]),_:1}),ut(d,{dense:""},{default:Ot(()=>[Sl(fr("span",{class:"ma-2 text-red",textContent:ei(p.error)},null,8,YR),[[$l,p.error]])]),_:1})])]),_:1}),ut(u,{class:"px-2"},{default:Ot(()=>[ut(g),ut(a,{variant:"outlined",onClick:p.cancel},{default:Ot(()=>[...n[7]||(n[7]=[Rr(" Cancel ",-1)])]),_:1},8,["onClick"]),ut(a,{variant:"flat",type:"submit","data-test":"save-config-submit-btn",disabled:!!p.error,onClick:Hs(p.success,["prevent"])},{default:Ot(()=>[...n[8]||(n[8]=[Rr(" Ok ",-1)])]),_:1},8,["disabled","onClick"])]),_:1})],32)]),_:1})]),_:1},8,["modelValue","onKeydown"])}const Z2=Tn("M",zo(qR,[["render",JR]])),XR=50,ZR=2e3,Fy="single-spa:app-change",QR={data(){return{appsMounted:!1,show:!1,hideSpinner:!1,pollInterval:null}},computed:{showSpinner:function(){return!this.hideSpinner&&!this.show}},created(){window.addEventListener(Fy,this.handleAppChange)},mounted(){this.pollForMountedApps(),setTimeout(()=>{this.appsMounted||(this.show=!0,this.pollInterval&&clearInterval(this.pollInterval))},ZR)},unmounted(){window.removeEventListener(Fy,this.handleAppChange),this.pollInterval&&clearInterval(this.pollInterval)},methods:{handleAppChange:function(t){this.show=!t.detail.appsByNewStatus.MOUNTED,this.hideSpinner=!0},pollForMountedApps:function(){this.pollInterval=setInterval(()=>{this.appsMounted=hu().length>0,hu().length>0&&(this.hideSpinner=!0,clearInterval(this.pollInterval))},XR)}}},eM={class:"mx-1"},tM={key:1,class:"d-flex justify-center align-center"};function nM(t,n,e,r,m,p){const g=St("v-card-title"),w=St("v-card-text"),h=St("v-card"),d=St("v-progress-circular");return En(),Qr(_l,null,[m.show?(En(),io(h,{key:0},{default:Ot(()=>[ut(g,null,{default:Ot(()=>[...n[0]||(n[0]=[Rr(" 404 Not Found ",-1)])]),_:1}),ut(w,{class:"d-flex align-center mt-3"},{default:Ot(()=>[n[1]||(n[1]=Rr(" The requested URL ",-1)),fr("code",eM,ei(t.$route.fullPath),1),n[2]||(n[2]=Rr(" was not routable. ",-1)),n[3]||(n[3]=fr("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):wo("",!0),p.showSpinner?(En(),Qr("div",tM,[ut(d,{indeterminate:""})])):wo("",!0)],64)}const zy=[{path:"/",name:"DataExtractor",component:()=>nt(()=>tt.import("./DataExtractor-4fdb57d1945b0887db0f.js"),void 0)},{path:"/:pathMatch(.*)*",name:"NotFound",component:zo(QR,[["render",nM]])}];zy.forEach(t=>Nf(t));const rM=Mf({history:Tf(),routes:zy}),{entries:Wy,setPrototypeOf:By,isFrozen:iM,getPrototypeOf:oM,getOwnPropertyDescriptor:sM}=Object;let{freeze:Hr,seal:Ii,create:da}=Object,{apply:fd,construct:pd}=typeof Reflect<"u"&&Reflect;Hr||(Hr=function(t){return t}),Ii||(Ii=function(t){return t}),fd||(fd=function(t,n){for(var e=arguments.length,r=new Array(e>2?e-2:0),m=2;m<e;m++)r[m-2]=arguments[m];return t.apply(n,r)}),pd||(pd=function(t){for(var n=arguments.length,e=new Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];return new t(...e)});const il=Jn(Array.prototype.forEach),aM=Jn(Array.prototype.lastIndexOf),jy=Jn(Array.prototype.pop),ol=Jn(Array.prototype.push),lM=Jn(Array.prototype.splice),Ur=Array.isArray,sl=Jn(String.prototype.toLowerCase),gd=Jn(String.prototype.toString),Hy=Jn(String.prototype.match),fa=Jn(String.prototype.replace),Uy=Jn(String.prototype.indexOf),cM=Jn(String.prototype.trim),uM=Jn(Number.prototype.toString),hM=Jn(Boolean.prototype.toString),Vy=typeof BigInt>"u"?null:Jn(BigInt.prototype.toString),Gy=typeof Symbol>"u"?null:Jn(Symbol.prototype.toString),Fn=Jn(Object.prototype.hasOwnProperty),al=Jn(Object.prototype.toString),yr=Jn(RegExp.prototype.test),Ac=dM(TypeError);function Jn(t){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var e=arguments.length,r=new Array(e>1?e-1:0),m=1;m<e;m++)r[m-1]=arguments[m];return fd(t,n,r)}}function dM(t){return function(){for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];return pd(t,e)}}function Et(t,n){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:sl;if(By&&By(t,null),!Ur(n))return t;let r=n.length;for(;r--;){let m=n[r];if(typeof m=="string"){const p=e(m);p!==m&&(iM(n)||(n[r]=p),m=p)}t[m]=!0}return t}function fM(t){for(let n=0;n<t.length;n++)Fn(t,n)||(t[n]=null);return t}function oi(t){const n=da(null);for(const[e,r]of Wy(t))Fn(t,e)&&(Ur(r)?n[e]=fM(r):r&&typeof r=="object"&&r.constructor===Object?n[e]=oi(r):n[e]=r);return n}function pM(t){switch(typeof t){case"string":return t;case"number":return uM(t);case"boolean":return hM(t);case"bigint":return Vy?Vy(t):"0";case"symbol":return Gy?Gy(t):"Symbol()";case"undefined":return al(t);case"function":case"object":{if(t===null)return al(t);const n=t,e=pa(n,"toString");if(typeof e=="function"){const r=e(n);return typeof r=="string"?r:al(r)}return al(t)}default:return al(t)}}function pa(t,n){for(;t!==null;){const r=sM(t,n);if(r){if(r.get)return Jn(r.get);if(typeof r.value=="function")return Jn(r.value)}t=oM(t)}function e(){return null}return e}function gM(t){try{return yr(t,""),!0}catch{return!1}}const qy=Hr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),md=Hr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),vd=Hr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),mM=Hr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),yd=Hr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),vM=Hr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ky=Hr(["#text"]),Yy=Hr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),bd=Hr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Jy=Hr(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Sc=Hr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),yM=Ii(/\{\{[\w\W]*|[\w\W]*\}\}/gm),bM=Ii(/<%[\w\W]*|[\w\W]*%>/gm),wM=Ii(/\$\{[\w\W]*/gm),xM=Ii(/^data-[\-\w.\u00B7-\uFFFF]+$/),CM=Ii(/^aria-[\-\w]+$/),Xy=Ii(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),kM=Ii(/^(?:\w+script|data):/i),_M=Ii(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Zy=Ii(/^html$/i),AM=Ii(/^[a-z][.\w]*(-[.\w]+)+$/i);var Qy=Object.freeze({__proto__:null,ARIA_ATTR:CM,ATTR_WHITESPACE:_M,CUSTOM_ELEMENT:AM,DATA_ATTR:xM,DOCTYPE_NAME:Zy,ERB_EXPR:bM,IS_ALLOWED_URI:Xy,IS_SCRIPT_OR_DATA:kM,MUSTACHE_EXPR:yM,TMPLIT_EXPR:wM});const ll={element:1,text:3,progressingInstruction:7,comment:8,document:9},SM=function(){return typeof window>"u"?null:window},$M=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let e=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(e=n.getAttribute(r));const m="dompurify"+(e?"#"+e:"");try{return t.createPolicy(m,{createHTML(p){return p},createScriptURL(p){return p}})}catch{return console.warn("TrustedTypes policy "+m+" could not be created."),null}},eb=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function tb(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:SM();const n=oe=>tb(oe);if(n.version="3.4.1",n.removed=[],!t||!t.document||t.document.nodeType!==ll.document||!t.Element)return n.isSupported=!1,n;let{document:e}=t;const r=e,m=r.currentScript,{DocumentFragment:p,HTMLTemplateElement:g,Node:w,Element:h,NodeFilter:d,NamedNodeMap:a=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:l,DOMParser:c,trustedTypes:u}=t,i=h.prototype,s=pa(i,"cloneNode"),f=pa(i,"remove"),b=pa(i,"nextSibling"),x=pa(i,"childNodes"),I=pa(i,"parentNode");if(typeof g=="function"){const oe=e.createElement("template");oe.content&&oe.content.ownerDocument&&(e=oe.content.ownerDocument)}let R,A="";const{implementation:C,createNodeIterator:O,createDocumentFragment:D,getElementsByTagName:E}=e,{importNode:T}=r;let B=eb();n.isSupported=typeof Wy=="function"&&typeof I=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:F,ERB_EXPR:N,TMPLIT_EXPR:$,DATA_ATTR:k,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:W,ATTR_WHITESPACE:U,CUSTOM_ELEMENT:q}=Qy;let{IS_ALLOWED_URI:Z}=Qy,Q=null;const le=Et({},[...qy,...md,...vd,...yd,...Ky]);let ne=null;const ce=Et({},[...Yy,...bd,...Jy,...Sc]);let ae=Object.seal(da(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),de=null,me=null;const $e=Object.seal(da(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Re=!0,Me=!0,Xe=!1,qe=!0,rt=!1,st=!0,et=!1,Wt=!1,br=!1,At=!1,ir=!1,An=!1,wr=!0,fn=!1;const or="user-content-";let ht=!0,Ge=!1,$t={},Xt=null;const In=Et({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Un=null;const sr=Et({},["audio","video","img","source","image","track"]);let pn=null;const zn=Et({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ln="http://www.w3.org/1998/Math/MathML",qt="http://www.w3.org/2000/svg",nn="http://www.w3.org/1999/xhtml";let Ir=nn,Vr=!1,xr=null;const yi=Et({},[Ln,qt,nn],gd);let bi=Et({},["mi","mo","mn","ms","mtext"]),Xn=Et({},["annotation-xml"]);const Yi=Et({},["title","style","font","a","script"]);let Gr=null;const Cs=["application/xhtml+xml","text/html"],qr="text/html";let Cn=null,wi=null;const ko=e.createElement("form"),si=function(oe){return oe instanceof RegExp||oe instanceof Function},kn=function(){let oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(wi&&wi===oe)return;(!oe||typeof oe!="object")&&(oe={}),oe=oi(oe),Gr=Cs.indexOf(oe.PARSER_MEDIA_TYPE)===-1?qr:oe.PARSER_MEDIA_TYPE,Cn=Gr==="application/xhtml+xml"?gd:sl,Q=Fn(oe,"ALLOWED_TAGS")&&Ur(oe.ALLOWED_TAGS)?Et({},oe.ALLOWED_TAGS,Cn):le,ne=Fn(oe,"ALLOWED_ATTR")&&Ur(oe.ALLOWED_ATTR)?Et({},oe.ALLOWED_ATTR,Cn):ce,xr=Fn(oe,"ALLOWED_NAMESPACES")&&Ur(oe.ALLOWED_NAMESPACES)?Et({},oe.ALLOWED_NAMESPACES,gd):yi,pn=Fn(oe,"ADD_URI_SAFE_ATTR")&&Ur(oe.ADD_URI_SAFE_ATTR)?Et(oi(zn),oe.ADD_URI_SAFE_ATTR,Cn):zn,Un=Fn(oe,"ADD_DATA_URI_TAGS")&&Ur(oe.ADD_DATA_URI_TAGS)?Et(oi(sr),oe.ADD_DATA_URI_TAGS,Cn):sr,Xt=Fn(oe,"FORBID_CONTENTS")&&Ur(oe.FORBID_CONTENTS)?Et({},oe.FORBID_CONTENTS,Cn):In,de=Fn(oe,"FORBID_TAGS")&&Ur(oe.FORBID_TAGS)?Et({},oe.FORBID_TAGS,Cn):oi({}),me=Fn(oe,"FORBID_ATTR")&&Ur(oe.FORBID_ATTR)?Et({},oe.FORBID_ATTR,Cn):oi({}),$t=Fn(oe,"USE_PROFILES")?oe.USE_PROFILES&&typeof oe.USE_PROFILES=="object"?oi(oe.USE_PROFILES):oe.USE_PROFILES:!1,Re=oe.ALLOW_ARIA_ATTR!==!1,Me=oe.ALLOW_DATA_ATTR!==!1,Xe=oe.ALLOW_UNKNOWN_PROTOCOLS||!1,qe=oe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,rt=oe.SAFE_FOR_TEMPLATES||!1,st=oe.SAFE_FOR_XML!==!1,et=oe.WHOLE_DOCUMENT||!1,At=oe.RETURN_DOM||!1,ir=oe.RETURN_DOM_FRAGMENT||!1,An=oe.RETURN_TRUSTED_TYPE||!1,br=oe.FORCE_BODY||!1,wr=oe.SANITIZE_DOM!==!1,fn=oe.SANITIZE_NAMED_PROPS||!1,ht=oe.KEEP_CONTENT!==!1,Ge=oe.IN_PLACE||!1,Z=gM(oe.ALLOWED_URI_REGEXP)?oe.ALLOWED_URI_REGEXP:Xy,Ir=typeof oe.NAMESPACE=="string"?oe.NAMESPACE:nn,bi=Fn(oe,"MATHML_TEXT_INTEGRATION_POINTS")&&oe.MATHML_TEXT_INTEGRATION_POINTS&&typeof oe.MATHML_TEXT_INTEGRATION_POINTS=="object"?oi(oe.MATHML_TEXT_INTEGRATION_POINTS):Et({},["mi","mo","mn","ms","mtext"]),Xn=Fn(oe,"HTML_INTEGRATION_POINTS")&&oe.HTML_INTEGRATION_POINTS&&typeof oe.HTML_INTEGRATION_POINTS=="object"?oi(oe.HTML_INTEGRATION_POINTS):Et({},["annotation-xml"]);const Ne=Fn(oe,"CUSTOM_ELEMENT_HANDLING")&&oe.CUSTOM_ELEMENT_HANDLING&&typeof oe.CUSTOM_ELEMENT_HANDLING=="object"?oi(oe.CUSTOM_ELEMENT_HANDLING):da(null);if(ae=da(null),Fn(Ne,"tagNameCheck")&&si(Ne.tagNameCheck)&&(ae.tagNameCheck=Ne.tagNameCheck),Fn(Ne,"attributeNameCheck")&&si(Ne.attributeNameCheck)&&(ae.attributeNameCheck=Ne.attributeNameCheck),Fn(Ne,"allowCustomizedBuiltInElements")&&typeof Ne.allowCustomizedBuiltInElements=="boolean"&&(ae.allowCustomizedBuiltInElements=Ne.allowCustomizedBuiltInElements),rt&&(Me=!1),ir&&(At=!0),$t&&(Q=Et({},Ky),ne=da(null),$t.html===!0&&(Et(Q,qy),Et(ne,Yy)),$t.svg===!0&&(Et(Q,md),Et(ne,bd),Et(ne,Sc)),$t.svgFilters===!0&&(Et(Q,vd),Et(ne,bd),Et(ne,Sc)),$t.mathMl===!0&&(Et(Q,yd),Et(ne,Jy),Et(ne,Sc))),$e.tagCheck=null,$e.attributeCheck=null,Fn(oe,"ADD_TAGS")&&(typeof oe.ADD_TAGS=="function"?$e.tagCheck=oe.ADD_TAGS:Ur(oe.ADD_TAGS)&&(Q===le&&(Q=oi(Q)),Et(Q,oe.ADD_TAGS,Cn))),Fn(oe,"ADD_ATTR")&&(typeof oe.ADD_ATTR=="function"?$e.attributeCheck=oe.ADD_ATTR:Ur(oe.ADD_ATTR)&&(ne===ce&&(ne=oi(ne)),Et(ne,oe.ADD_ATTR,Cn))),Fn(oe,"ADD_URI_SAFE_ATTR")&&Ur(oe.ADD_URI_SAFE_ATTR)&&Et(pn,oe.ADD_URI_SAFE_ATTR,Cn),Fn(oe,"FORBID_CONTENTS")&&Ur(oe.FORBID_CONTENTS)&&(Xt===In&&(Xt=oi(Xt)),Et(Xt,oe.FORBID_CONTENTS,Cn)),Fn(oe,"ADD_FORBID_CONTENTS")&&Ur(oe.ADD_FORBID_CONTENTS)&&(Xt===In&&(Xt=oi(Xt)),Et(Xt,oe.ADD_FORBID_CONTENTS,Cn)),ht&&(Q["#text"]=!0),et&&Et(Q,["html","head","body"]),Q.table&&(Et(Q,["tbody"]),delete de.tbody),oe.TRUSTED_TYPES_POLICY){if(typeof oe.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ac('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof oe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ac('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');R=oe.TRUSTED_TYPES_POLICY,A=R.createHTML("")}else R===void 0&&(R=$M(u,m)),R!==null&&typeof A=="string"&&(A=R.createHTML(""));Hr&&Hr(oe),wi=oe},Cr=Et({},[...md,...vd,...mM]),Lr=Et({},[...yd,...vM]),On=function(oe){let Ne=I(oe);(!Ne||!Ne.tagName)&&(Ne={namespaceURI:Ir,tagName:"template"});const Be=sl(oe.tagName),bt=sl(Ne.tagName);return xr[oe.namespaceURI]?oe.namespaceURI===qt?Ne.namespaceURI===nn?Be==="svg":Ne.namespaceURI===Ln?Be==="svg"&&(bt==="annotation-xml"||bi[bt]):!!Cr[Be]:oe.namespaceURI===Ln?Ne.namespaceURI===nn?Be==="math":Ne.namespaceURI===qt?Be==="math"&&Xn[bt]:!!Lr[Be]:oe.namespaceURI===nn?Ne.namespaceURI===qt&&!Xn[bt]||Ne.namespaceURI===Ln&&!bi[bt]?!1:!Lr[Be]&&(Yi[Be]||!Cr[Be]):!!(Gr==="application/xhtml+xml"&&xr[oe.namespaceURI]):!1},yn=function(oe){ol(n.removed,{element:oe});try{I(oe).removeChild(oe)}catch{f(oe)}},pr=function(oe,Ne){try{ol(n.removed,{attribute:Ne.getAttributeNode(oe),from:Ne})}catch{ol(n.removed,{attribute:null,from:Ne})}if(Ne.removeAttribute(oe),oe==="is")if(At||ir)try{yn(Ne)}catch{}else try{Ne.setAttribute(oe,"")}catch{}},ai=function(oe){let Ne=null,Be=null;if(br)oe="<remove></remove>"+oe;else{const Vt=Hy(oe,/^[\r\n\t ]+/);Be=Vt&&Vt[0]}Gr==="application/xhtml+xml"&&Ir===nn&&(oe='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+oe+"</body></html>");const bt=R?R.createHTML(oe):oe;if(Ir===nn)try{Ne=new c().parseFromString(bt,Gr)}catch{}if(!Ne||!Ne.documentElement){Ne=C.createDocument(Ir,"template",null);try{Ne.documentElement.innerHTML=Vr?A:bt}catch{}}const gn=Ne.body||Ne.documentElement;return oe&&Be&&gn.insertBefore(e.createTextNode(Be),gn.childNodes[0]||null),Ir===nn?E.call(Ne,et?"html":"body")[0]:et?Ne.documentElement:gn},ao=function(oe){return O.call(oe.ownerDocument||oe,oe,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},lo=function(oe){return oe instanceof l&&(typeof oe.nodeName!="string"||typeof oe.textContent!="string"||typeof oe.removeChild!="function"||!(oe.attributes instanceof a)||typeof oe.removeAttribute!="function"||typeof oe.setAttribute!="function"||typeof oe.namespaceURI!="string"||typeof oe.insertBefore!="function"||typeof oe.hasChildNodes!="function")},_o=function(oe){return typeof w=="function"&&oe instanceof w};function Or(oe,Ne,Be){il(oe,bt=>{bt.call(n,Ne,Be,wi)})}const li=function(oe){let Ne=null;if(Or(B.beforeSanitizeElements,oe,null),lo(oe))return yn(oe),!0;const Be=Cn(oe.nodeName);if(Or(B.uponSanitizeElement,oe,{tagName:Be,allowedTags:Q}),st&&oe.hasChildNodes()&&!_o(oe.firstElementChild)&&yr(/<[/\w!]/g,oe.innerHTML)&&yr(/<[/\w!]/g,oe.textContent)||st&&oe.namespaceURI===nn&&Be==="style"&&_o(oe.firstElementChild)||oe.nodeType===ll.progressingInstruction||st&&oe.nodeType===ll.comment&&yr(/<[/\w]/g,oe.data))return yn(oe),!0;if(de[Be]||!($e.tagCheck instanceof Function&&$e.tagCheck(Be))&&!Q[Be]){if(!de[Be]&&Ao(Be)&&(ae.tagNameCheck instanceof RegExp&&yr(ae.tagNameCheck,Be)||ae.tagNameCheck instanceof Function&&ae.tagNameCheck(Be)))return!1;if(ht&&!Xt[Be]){const bt=I(oe)||oe.parentNode,gn=x(oe)||oe.childNodes;if(gn&&bt){const Vt=gn.length;for(let kr=Vt-1;kr>=0;--kr){const Vn=s(gn[kr],!0);bt.insertBefore(Vn,b(oe))}}}return yn(oe),!0}return oe instanceof h&&!On(oe)||(Be==="noscript"||Be==="noembed"||Be==="noframes")&&yr(/<\/no(script|embed|frames)/i,oe.innerHTML)?(yn(oe),!0):(rt&&oe.nodeType===ll.text&&(Ne=oe.textContent,il([F,N,$],bt=>{Ne=fa(Ne,bt," ")}),oe.textContent!==Ne&&(ol(n.removed,{element:oe.cloneNode()}),oe.textContent=Ne)),Or(B.afterSanitizeElements,oe,null),!1)},Kr=function(oe,Ne,Be){if(me[Ne]||wr&&(Ne==="id"||Ne==="name")&&(Be in e||Be in ko))return!1;if(!(Me&&!me[Ne]&&yr(k,Ne))&&!(Re&&yr(L,Ne))&&!($e.attributeCheck instanceof Function&&$e.attributeCheck(Ne,oe))){if(!ne[Ne]||me[Ne]){if(!(Ao(oe)&&(ae.tagNameCheck instanceof RegExp&&yr(ae.tagNameCheck,oe)||ae.tagNameCheck instanceof Function&&ae.tagNameCheck(oe))&&(ae.attributeNameCheck instanceof RegExp&&yr(ae.attributeNameCheck,Ne)||ae.attributeNameCheck instanceof Function&&ae.attributeNameCheck(Ne,oe))||Ne==="is"&&ae.allowCustomizedBuiltInElements&&(ae.tagNameCheck instanceof RegExp&&yr(ae.tagNameCheck,Be)||ae.tagNameCheck instanceof Function&&ae.tagNameCheck(Be))))return!1}else if(!pn[Ne]&&!yr(Z,fa(Be,U,""))&&!((Ne==="src"||Ne==="xlink:href"||Ne==="href")&&oe!=="script"&&Uy(Be,"data:")===0&&Un[oe])&&!(Xe&&!yr(W,fa(Be,U,"")))&&Be)return!1}return!0},Nt=Et({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ao=function(oe){return!Nt[sl(oe)]&&yr(q,oe)},ar=function(oe){Or(B.beforeSanitizeAttributes,oe,null);const{attributes:Ne}=oe;if(!Ne||lo(oe))return;const Be={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ne,forceKeepAttr:void 0};let bt=Ne.length;for(;bt--;){const gn=Ne[bt],{name:Vt,namespaceURI:kr,value:Vn}=gn,cn=Cn(Vt),gr=Vn;let mn=Vt==="value"?gr:cM(gr);if(Be.attrName=cn,Be.attrValue=mn,Be.keepAttr=!0,Be.forceKeepAttr=void 0,Or(B.uponSanitizeAttribute,oe,Be),mn=Be.attrValue,fn&&(cn==="id"||cn==="name")&&Uy(mn,or)!==0&&(pr(Vt,oe),mn=or+mn),st&&yr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,mn)){pr(Vt,oe);continue}if(cn==="attributename"&&Hy(mn,"href")){pr(Vt,oe);continue}if(Be.forceKeepAttr)continue;if(!Be.keepAttr){pr(Vt,oe);continue}if(!qe&&yr(/\/>/i,mn)){pr(Vt,oe);continue}rt&&il([F,N,$],co=>{mn=fa(mn,co," ")});const mr=Cn(oe.nodeName);if(!Kr(mr,cn,mn)){pr(Vt,oe);continue}if(R&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!kr)switch(u.getAttributeType(mr,cn)){case"TrustedHTML":{mn=R.createHTML(mn);break}case"TrustedScriptURL":{mn=R.createScriptURL(mn);break}}if(mn!==gr)try{kr?oe.setAttributeNS(kr,Vt,mn):oe.setAttribute(Vt,mn),lo(oe)?yn(oe):jy(n.removed)}catch{pr(Vt,oe)}}Or(B.afterSanitizeAttributes,oe,null)},Sn=function(oe){let Ne=null;const Be=ao(oe);for(Or(B.beforeSanitizeShadowDOM,oe,null);Ne=Be.nextNode();)Or(B.uponSanitizeShadowNode,Ne,null),li(Ne),ar(Ne),Ne.content instanceof p&&Sn(Ne.content);Or(B.afterSanitizeShadowDOM,oe,null)};return n.sanitize=function(oe){let Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Be=null,bt=null,gn=null,Vt=null;if(Vr=!oe,Vr&&(oe="<!-->"),typeof oe!="string"&&!_o(oe)&&(oe=pM(oe),typeof oe!="string"))throw Ac("dirty is not a string, aborting");if(!n.isSupported)return oe;if(Wt||kn(Ne),n.removed=[],typeof oe=="string"&&(Ge=!1),Ge){const cn=oe.nodeName;if(typeof cn=="string"){const gr=Cn(cn);if(!Q[gr]||de[gr])throw Ac("root node is forbidden and cannot be sanitized in-place")}}else if(oe instanceof w)Be=ai("<!---->"),bt=Be.ownerDocument.importNode(oe,!0),bt.nodeType===ll.element&&bt.nodeName==="BODY"||bt.nodeName==="HTML"?Be=bt:Be.appendChild(bt);else{if(!At&&!rt&&!et&&oe.indexOf("<")===-1)return R&&An?R.createHTML(oe):oe;if(Be=ai(oe),!Be)return At?null:An?A:""}Be&&br&&yn(Be.firstChild);const kr=ao(Ge?oe:Be);for(;gn=kr.nextNode();)li(gn),ar(gn),gn.content instanceof p&&Sn(gn.content);if(Ge)return oe;if(At){if(rt){Be.normalize();let cn=Be.innerHTML;il([F,N,$],gr=>{cn=fa(cn,gr," ")}),Be.innerHTML=cn}if(ir)for(Vt=D.call(Be.ownerDocument);Be.firstChild;)Vt.appendChild(Be.firstChild);else Vt=Be;return(ne.shadowroot||ne.shadowrootmode)&&(Vt=T.call(r,Vt,!0)),Vt}let Vn=et?Be.outerHTML:Be.innerHTML;return et&&Q["!doctype"]&&Be.ownerDocument&&Be.ownerDocument.doctype&&Be.ownerDocument.doctype.name&&yr(Zy,Be.ownerDocument.doctype.name)&&(Vn="<!DOCTYPE "+Be.ownerDocument.doctype.name+`>
1489
+ `+Vn),rt&&il([F,N,$],cn=>{Vn=fa(Vn,cn," ")}),R&&An?R.createHTML(Vn):Vn},n.setConfig=function(){let oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};kn(oe),Wt=!0},n.clearConfig=function(){wi=null,Wt=!1},n.isValidAttribute=function(oe,Ne,Be){wi||kn({});const bt=Cn(oe),gn=Cn(Ne);return Kr(bt,gn,Be)},n.addHook=function(oe,Ne){typeof Ne=="function"&&ol(B[oe],Ne)},n.removeHook=function(oe,Ne){if(Ne!==void 0){const Be=aM(B[oe],Ne);return Be===-1?void 0:lM(B[oe],Be,1)[0]}return jy(B[oe])},n.removeHooks=function(oe){B[oe]=[]},n.removeAllHooks=function(){B=eb()},n}var RM=tb();const MM={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"}},TM={data:function(){return{show:!1,params:{title:"Title",text:"The text that is displayed",okText:"Ok",okClass:"primary",validateText:"CONFIRM",cancelText:"Cancel",html:!1},resolve:null,reject:null,validationText:null,rules:{required:t=>!!t||"Required.",match:t=>t===this.params.validateText||"Value mismatch."}}},computed:{dataTestOk:function(){return`confirm-dialog-${this.params.okText.toLowerCase()}`},dataTestCancel:function(){return`confirm-dialog-${this.params.cancelText.toLowerCase()}`},sanitizedText:function(){return RM.sanitize(this.params.text)}},methods:{dialog:function(t,n,e){this.params=t,this.show=!0,this.resolve=n,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=""}}},EM=["innerHTML"],IM={key:2},LM={key:3,class:"validate mt-4"};function OM(t,n,e,r,m,p){const g=St("v-spacer"),w=St("v-toolbar"),h=St("v-icon"),d=St("v-text-field"),a=St("v-card-text"),l=St("v-btn"),c=St("v-card-actions"),u=St("v-card"),i=St("v-dialog"),s=St("v-app");return En(),io(s,null,{default:Ot(()=>[ut(i,{modelValue:t.show,"onUpdate:modelValue":n[1]||(n[1]=f=>t.show=f),persistent:"",width:"600",onKeydown:Al(p.cancel,["esc"])},{default:Ot(()=>[ut(u,null,{default:Ot(()=>[ut(w,{height:"24"},{default:Ot(()=>[ut(g),fr("span",null,ei(t.params.title),1),ut(g)]),_:1}),ut(a,{class:"mt-4 pa-3"},{default:Ot(()=>[t.params.validateText?(En(),io(h,{key:0,class:"mr-2"},{default:Ot(()=>[...n[2]||(n[2]=[Rr(" mdi-alert ",-1)])]),_:1})):wo("",!0),t.params.html?(En(),Qr("span",{key:1,innerHTML:p.sanitizedText},null,8,EM)):(En(),Qr("span",IM,ei(p.sanitizedText),1)),t.params.validateText?(En(),Qr("div",LM,[Rr(" Enter "+ei(t.params.validateText)+" to confirm! ",1),ut(d,{modelValue:t.validationText,"onUpdate:modelValue":n[0]||(n[0]=f=>t.validationText=f),variant:"solo",density:"compact","single-line":"",rules:[t.rules.required,t.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):wo("",!0)]),_:1}),ut(c,{class:"px-2"},{default:Ot(()=>[ut(g),t.params.cancelText?(En(),io(l,{key:0,variant:"outlined","data-test":p.dataTestCancel,onClick:p.cancel},{default:Ot(()=>[Rr(ei(t.params.cancelText),1)]),_:1},8,["data-test","onClick"])):wo("",!0),ut(l,{variant:"flat",color:t.params.okClass,"data-test":p.dataTestOk,onClick:p.ok},{default:Ot(()=>[Rr(ei(t.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"])]),_:1})}const NM=zo(TM,[["render",OM],["__scopeId","data-v-53691296"]]);class DM{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const n=window.Vue.createApp(NM);n.use(xd);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=n.mount(e),this.mounted=!0}open({title:n,text:e,okText:r,okClass:m,validateText:p,cancelText:g,html:w}){return this.mount(),new Promise((h,d)=>{this.$root.dialog({title:n,text:e,okText:r,okClass:m,validateText:p,cancelText:g,html:w},h,d)})}confirm(n,{okText:e="Ok",cancelText:r="Cancel",okClass:m="primary"}){return this.open({title:"Confirm",text:n,okText:e,okClass:m,validateText:null,cancelText:r,html:!1})}alert(n,{okText:e="Ok",html:r=!1,okClass:m="primary"}){return this.open({title:"Alert",text:n,okText:e,okClass:m,validateText:null,cancelText:null,html:r})}validate(n,{okText:e="Ok",validateText:r="CONFIRM",cancelText:m="Cancel",okClass:p="primary"}){return this.open({title:"Confirm",text:n,okText:e,okClass:p,validateText:r,cancelText:m,html:!1})}}const PM={install(t,n){const e=new DM;t.provide("dialog",e),t.config.globalProperties.hasOwnProperty("$dialog")||(t.config.globalProperties.$dialog=e)}},FM={data:function(){return{showToast:!1,expanded:!1,toastNotification:{title:"Title here",body:"This is the notification body",message:"Overall message here"},timeout:null,noToastPaths:["/login"]}},computed:{toastNotificationIcon:function(){return this.toastNotification.type==="notification"?"mdi-bell":"mdi-alert-box"},toastStyle:function(){return`
1490
+ --toast-bg-color:${dd[this.toastNotification.level]};
1491
+ --toast-fg-color:${zR(this.toastNotification.level)};
1492
+ `},contentStyle:function(){return`
1493
+ white-space: ${this.expanded?"normal":"nowrap"};
1494
+ overflow-x: ${this.expanded?"visible":"hidden"};
1495
+ text-overflow: ${this.expanded?"unset":"ellipsis"};
1496
+ `}},methods:{toast:function(t,n){this.noToastPaths.includes(window.location.pathname)||(n===void 0&&(n=5e3),this.toastNotification=t,this.showToast=!0,this.cancelAutohide(),n&&(this.timeout=setTimeout(()=>{this.hide()},n)))},hide:function(){this.cancelAutohide(),this.showToast=!1},cancelAutohide:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},expand:function(){this.cancelAutohide(),this.expanded=!0}}},zM={key:0,class:"text-subtitle-1 mr-1 notification-text"},WM={key:1,class:"text-body-2 notification-text"},BM={key:2,class:"text-body-2 notification-text"};function jM(t,n,e,r,m,p){const g=St("v-icon"),w=St("v-spacer"),h=St("v-btn"),d=St("v-sheet"),a=St("v-slide-y-transition");return En(),io(a,null,{default:Ot(()=>[Sl(ut(d,{style:Ma(p.toastStyle),class:"toast-notification",onClick:p.expand},{default:Ot(()=>[ut(g,{class:"mr-1 notification-text"},{default:Ot(()=>[Rr(ei(p.toastNotificationIcon),1)]),_:1}),fr("div",{class:"toast-content",style:Ma(p.contentStyle)},[t.toastNotification.title?(En(),Qr("span",zM,[t.toastNotification.body||t.toastNotification.message?(En(),Qr(_l,{key:0},[Rr(ei(t.toastNotification.title)+": ",1)],64)):(En(),Qr(_l,{key:1},[Rr(ei(t.toastNotification.title),1)],64))])):wo("",!0),t.toastNotification.body?(En(),Qr("span",WM,ei(t.toastNotification.body),1)):wo("",!0),t.toastNotification.message?(En(),Qr("span",BM,ei(t.toastNotification.message),1)):wo("",!0)],4),ut(w),ut(h,{variant:"text",class:"notification-text",onClick:Hs(p.hide,["stop"])},{default:Ot(()=>[...n[0]||(n[0]=[Rr(" Dismiss ",-1)])]),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[$l,t.showToast]])]),_:1})}const HM=zo(FM,[["render",jM],["__scopeId","data-v-ef96840d"]]);class UM{constructor(n={}){this.store=null,this.mounted=!1,this.$root=null,window.$cosmosNotify?.$root?(this.mounted=!0,this.$root=window.$cosmosNotify.$root):window.$cosmosNotify=this}getStore(){return this.store||(this.store=Dy()),this.store}mount(){if(this.mounted)return;const n=uu(HM);n.use(xd);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=n.mount(e),this.mounted=!0}open({method:n,title:e,body:r,message:m,level:p,duration:g,type:w="alert",logToConsole:h=!1,saveToHistory:d=!0}){this.mount(),h&&console.log(m?`${p.toUpperCase()} - ${m}`:`${p.toUpperCase()} - ${e}: ${r}`),d&&this.getStore().notifyAddHistory({title:e,body:r,message:m,level:p}),this[n]({title:e,body:r,message:m,level:p,duration:g,type:w})}toast({title:n,body:e,message:r,level:m,duration:p,type:g}){this.$root.toast({title:n,body:e,message:r,level:m,type:g},p)}critical({title:n,body:e,message:r,type:m,duration:p,logToConsole:g,saveToHistory:w}){this.open({method:"toast",level:"critical",title:n,body:e,message:r,type:m,duration:p,logToConsole:g,saveToHistory:w})}FATAL(n){this.critical(n)}ERROR(n){this.critical(n)}serious({title:n,body:e,message:r,type:m,duration:p,logToConsole:g,saveToHistory:w}){this.open({method:"toast",level:"serious",title:n,body:e,message:r,type:m,duration:p,logToConsole:g,saveToHistory:w})}caution({title:n,body:e,message:r,type:m,duration:p,logToConsole:g,saveToHistory:w}){this.open({method:"toast",level:"caution",title:n,body:e,message:r,type:m,duration:p,logToConsole:g,saveToHistory:w})}WARN(n){this.caution(n)}normal({title:n,body:e,message:r,type:m,duration:p,logToConsole:g,saveToHistory:w}){this.open({method:"toast",level:"normal",title:n,body:e,message:r,type:m,duration:p,logToConsole:g,saveToHistory:w})}INFO(n){this.normal(n)}DEBUG(n){this.normal(n)}standby({title:n,body:e,message:r,type:m,duration:p,logToConsole:g,saveToHistory:w}){this.open({method:"toast",level:"standby",title:n,body:e,message:r,type:m,duration:p,logToConsole:g,saveToHistory:w})}off({title:n,body:e,message:r,type:m,duration:p,logToConsole:g,saveToHistory:w}){this.open({method:"toast",level:"off",title:n,body:e,message:r,type:m,duration:p,logToConsole:g,saveToHistory:w})}}const VM={install(t,n){const e=new UM(n);t.provide("notify",e),t.config.globalProperties.hasOwnProperty("$notify")||(t.config.globalProperties.$notify=e)}};function GM(t){xf(`Vuetify: ${t}`)}function nb(t){let n;return t!==null&&typeof t=="object"&&((n=Object.getPrototypeOf(t))===Object.prototype||n===null)}function qM(t,n){const e={};for(const r of n)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function rb(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2?arguments[2]:void 0;const r={};for(const m in t)r[m]=t[m];for(const m in n){const p=t[m],g=n[m];if(nb(p)&&nb(g)){r[m]=rb(p,g,e);continue}if(e&&Array.isArray(p)&&Array.isArray(g)){r[m]=e(p,g);continue}r[m]=g}return r}function cl(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(cl.cache.has(t))return cl.cache.get(t);const n=t.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return cl.cache.set(t,n),n}cl.cache=new Map;function ib(t,n){return e=>Object.keys(t).reduce((r,m)=>{const p=typeof t[m]=="object"&&t[m]!=null&&!Array.isArray(t[m])?t[m]:{type:t[m]};return e&&m in e?r[m]={...p,default:e[m]}:r[m]=p,n&&!r[m].source&&(r[m].source=n),r},{})}function ob(t,n){const e=Sf();if(!e)throw new Error(`[Vuetify] ${t} must be called from inside a setup function`);return e}function KM(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ob("injectSelf");const{provides:e}=n;if(e&&t in e)return e[t]}const wd=Symbol.for("vuetify:defaults");function sb(){const t=Cf(wd);if(!t)throw new Error("[Vuetify] Could not find defaults instance");return t}function YM(t,n){return t.props&&(typeof t.props[n]<"u"||typeof t.props[cl(n)]<"u")}function JM(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:sb();const r=ob("useDefaults");if(n=n??r.type.name??r.type.__name,!n)throw new Error("[Vuetify] Could not determine component name");const m=cu(()=>e.value?.[t._as??n]),p=new Proxy(t,{get(h,d){const a=Reflect.get(h,d);if(d==="class"||d==="style")return[m.value?.[d],a].filter(u=>u!=null);if(YM(r.vnode,d))return a;const l=m.value?.[d];if(l!==void 0)return l;const c=e.value?.global?.[d];return c!==void 0?c:a}}),g=kf();_f(()=>{if(m.value){const h=Object.entries(m.value).filter(d=>{let[a]=d;return a.startsWith(a[0].toUpperCase())});g.value=h.length?Object.fromEntries(h):void 0}else g.value=void 0});function w(){const h=KM(wd,r);$f(wd,cu(()=>g.value?rb(h?.value??{},g.value):h?.value))}return{props:p,provideSubDefaults:w}}function $c(t){if(t._setup=t._setup??t.setup,!t.name)return GM("The component is missing an explicit name, unable to generate default prop value"),t;if(t._setup){t.props=ib(t.props??{},t.name)();const n=Object.keys(t.props).filter(e=>e!=="class"&&e!=="style");t.filterProps=function(e){return qM(e,n)},t.props._as=String,t.setup=function(e,r){const m=sb();if(!m.value)return t._setup(e,r);const{props:p,provideSubDefaults:g}=JM(e,e._as??t.name,m),w=t._setup(p,r);return g(),w}}return t}function XM(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n=>(t?$c:wf)(n)}const ZM=[String,Function,Object,Array],Rc=ib({icon:{type:ZM},tag:{type:[String,Object,Function],required:!0}},"icon");XM()({name:"VComponentIcon",props:Rc(),setup(t,n){let{slots:e}=n;return()=>{const r=t.icon;return ut(t.tag,null,{default:()=>[t.icon?ut(r,null,null):e.default?.()]})}}}),$c({name:"VSvgIcon",inheritAttrs:!1,props:Rc(),setup(t,n){let{attrs:e}=n;return()=>ut(t.tag,Rf(e,{style:null}),{default:()=>[fr("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(t.icon)?t.icon.map(r=>Array.isArray(r)?fr("path",{d:r[0],"fill-opacity":r[1]},null):fr("path",{d:r},null)):fr("path",{d:t.icon},null)])]})}}),$c({name:"VLigatureIcon",props:Rc(),setup(t){return()=>ut(t.tag,null,{default:()=>[t.icon]})}});const QM=$c({name:"VClassIcon",props:Rc(),setup(t){return()=>ut(t.tag,{class:Af(t.icon)},null)}}),eT={component:t=>js(QM,{...t,class:"mdi"})},tT={dark:!0,colors:{primary:"#007ad0",secondary:"#4da3e0",tertiary:"#858585",surface:"#1f1f1f",background:"#161616","on-surface":"#d4d4d4","on-background":"#d4d4d4","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},nT={dark:!0,colors:{primary:"#5B52E0",secondary:"#8078F0",tertiary:"#7E8696",surface:"#24242F",background:"#1A1A24","on-surface":"#D0D4DC","on-background":"#D0D4DC","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},rT={dark:!0,colors:{primary:"#0097A7",secondary:"#26C6DA",tertiary:"#708090",surface:"#242D36",background:"#1A2027","on-surface":"#D4DCE4","on-background":"#D4DCE4","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},iT={dark:!0,colors:{primary:"#00897B",secondary:"#26A69A",tertiary:"#6E7680",surface:"#222428",background:"#181A1C","on-surface":"#D4D8DC","on-background":"#D4D8DC","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},xd=Lf({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:MM,cosmosDarkCobalt:tT,cosmosDarkIndigo:nT,cosmosDarkSlate:rT,cosmosDarkEmerald:iT}},defaults:{VCheckbox:{color:"secondary"},VCheckboxBtn:{color:"secondary"},VRadio:{color:"secondary"},VRadioGroup:{color:"secondary"},VSwitch:{color:"secondary"}},icons:{defaultSet:"mdi",sets:{mdi:eT,...BR,...jR}}}),Cd=rw({createApp:uu,appOptions:{render(){return js(hw,{})},el:"#openc3-tool"},handleInstance:t=>{t.use(rM),t.use(ha),t.use(xd),t.use(PM),t.use(VM)}}),eD=Tn("r",Cd.bootstrap),tD=Tn("s",Cd.mount),nD=Tn("t",Cd.unmount)})}}));