openc3-cosmos-tool-cmdsender 6.6.0 → 6.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/tools/cmdsender/ArrayWidget-j3ncPuPx-f939b74328291df8a5de.js +2 -0
  3. data/tools/cmdsender/ArrayplotWidget-DuLaiGa9-4e423aca38f960d26373.js +1 -0
  4. data/tools/cmdsender/BarColumn-BWJ0Dd4O-4c5640abb9625004d209.js +1 -0
  5. data/tools/cmdsender/BlockWidget-Bf5Dd6Cr-ef35d651764a1f1ded69.js +2 -0
  6. data/tools/cmdsender/ButtonWidget-bl_mGFYh-bd3a80c50b3d01aaaff5.js +2 -0
  7. data/tools/cmdsender/CanvasWidget-boDemgx1-c68ac68b01e5a84f0579.js +1 -0
  8. data/tools/cmdsender/CanvasdotWidget-BZBbJcER-f8666166dd26f9b4d0c2.js +1 -0
  9. data/tools/cmdsender/CanvasimageWidget-6ywvT5jd-b960807789b9dcbcc50d.js +1 -0
  10. data/tools/cmdsender/CanvasimagevalueWidget-DjWrA3gX-4074ee5ef0a41f17fddd.js +1 -0
  11. data/tools/cmdsender/CanvaslabelWidget-Bq4V2BQh-78092fbf686162916c1c.js +1 -0
  12. data/tools/cmdsender/CanvaslabelvalueWidget-C8oNcFLi-828de5416d4d6f2f1b68.js +1 -0
  13. data/tools/cmdsender/CanvaslineWidget-nvbL2GoL-c71cc643a6024963a623.js +1 -0
  14. data/tools/cmdsender/CanvaslinevalueWidget-ZACQedKx-6223a4707f27190d998d.js +1 -0
  15. data/tools/cmdsender/CheckbuttonWidget-B82UE8AB-8935020f16d81e86bd39.js +1 -0
  16. data/tools/cmdsender/ComboboxWidget-4OFiSkI6-f0b1e8f3e0b734cb6ad2.js +1 -0
  17. data/tools/cmdsender/CommandSender-c37075627710fdc475ce.js +1127 -0
  18. data/tools/cmdsender/CriticalCmdDialog-FhXDdBn4-5e2871bb9b2ad6ada180.js +1 -0
  19. data/tools/cmdsender/DateWidget-BmwtdirF-c478451d8a9912180a30.js +1 -0
  20. data/tools/cmdsender/DynamicWidget-CfMtj7H8-3b839f85b196e9521a5d.js +1 -0
  21. data/tools/cmdsender/FormatvalueWidget-C8exC3bj-6fc3fa6fb5d3bdeed5f4.js +1 -0
  22. data/tools/cmdsender/GraphWidget-CvzxZYVx-c753dae2d338f42d662c.js +1 -0
  23. data/tools/cmdsender/HorizontalWidget-Ck151zVw-5a9b2cfd6856a7e967b5.js +1 -0
  24. data/tools/cmdsender/HorizontalboxWidget-D3P-cl9V-a538d5bea21494d86a8c.js +1 -0
  25. data/tools/cmdsender/HorizontallineWidget-BE1TjPU8-60179ab7246a142d636c.js +1 -0
  26. data/tools/cmdsender/IframeWidget-BgJCgues-8d275c3925dcaef036ce.js +1 -0
  27. data/tools/cmdsender/ImageLoader-CWn-PLOk-4303aade4f81fd3dfaff.js +1 -0
  28. data/tools/cmdsender/ImageviewerWidget-BlhFZD2f-2f0d71645905d2247b85.js +1 -0
  29. data/tools/cmdsender/LabelWidget-Cwosk4x2-e46f4721f9bfa9b4c642.js +1 -0
  30. data/tools/cmdsender/LabelledWidget-Dl6rAFTQ-326ebac7e9b44c786d55.js +1 -0
  31. data/tools/cmdsender/LabelprogressbarWidget-MuAKesOz-153e98b717f1bb0940e1.js +1 -0
  32. data/tools/cmdsender/LabelsparklineWidget-6LA6Ox3d-126f70696b7ab46a0ca2.js +1 -0
  33. data/tools/cmdsender/LabelvalueWidget-BxAXx-Tf-d87d776b4ee0a755f336.js +1 -0
  34. data/tools/cmdsender/LabelvaluedescWidget-Dwwlnd1g-f01d9e2309195df7c3d0.js +1 -0
  35. data/tools/cmdsender/LabelvaluelimitsbarWidget-Dv8Qk8kK-5fd8eb8da41cf4aa3a95.js +1 -0
  36. data/tools/cmdsender/LabelvaluelimitscolumnWidget-D-_gl6fq-fcc6b42a9b4c29e45e73.js +1 -0
  37. data/tools/cmdsender/LabelvaluerangebarWidget-B3MKT-3Y-a0b64358b0a0958b27fa.js +1 -0
  38. data/tools/cmdsender/Layout-Bkb6VP3e-ebc8fdb14d3b2a3b8fbb.js +1 -0
  39. data/tools/cmdsender/LedWidget-DOuDD8LI-6667a8c3e33737fc95ba.js +1 -0
  40. data/tools/cmdsender/LimitsbarWidget-D1U6SvVL-296c2641a79d9f3cfdbc.js +1 -0
  41. data/tools/cmdsender/LimitscolorWidget-iSMGusqt-864314d19d55c8c4b11a.js +1 -0
  42. data/tools/cmdsender/LimitscolumnWidget-DjxZTt_r-375bbc8160586a53a650.js +1 -0
  43. data/tools/cmdsender/LinegraphWidget-BHKU6zlT-f5a67e90280ecd56e5ff.js +1 -0
  44. data/tools/cmdsender/MatrixbycolumnsWidget-BKO-A2QD-c0d993dadda5d555c9d5.js +1 -0
  45. data/tools/cmdsender/ProgressbarWidget-fbr2qu_N-c63c1c8aad560c8fe9f0.js +1 -0
  46. data/tools/cmdsender/RadiobuttonWidget-DL08zcQT-9a53a941e6fe248a6a8b.js +1 -0
  47. data/tools/cmdsender/RadiogroupWidget-DW9Xpj3c-734245b32d66bdcb0e2a.js +1 -0
  48. data/tools/cmdsender/RangebarWidget-o9q55kjc-b7b0a515ecb909587048.js +1 -0
  49. data/tools/cmdsender/RollupWidget-BHnjj-DF-d5e7f79088ae2defdd32.js +1 -0
  50. data/tools/cmdsender/ScrollwindowWidget-D-QVwztC-296dc5d83bd09c2f7e9b.js +1 -0
  51. data/tools/cmdsender/SignalWidget-CsWuufdx-fcd5aa4329eda73bbc19.js +1 -0
  52. data/tools/cmdsender/SpacerWidget-Di9-qunj-434c8dec966d53c43547.js +1 -0
  53. data/tools/cmdsender/SparklineWidget-B6-zhdPW-f70171404709364118de.js +1 -0
  54. data/tools/cmdsender/TabbookWidget-B1E1_mzA-d5c8d4af992caa015879.js +1 -0
  55. data/tools/cmdsender/TextboxWidget-CBVEXPw_-4ccfa794fc27e17c41e9.js +1 -0
  56. data/tools/cmdsender/TextfieldWidget-DZMHrtQa-cdcf0c0cd90b83a89cd4.js +1 -0
  57. data/tools/cmdsender/TimeWidget-K4MNmJ7J-4ac9a34c4cb89a628f1e.js +1 -0
  58. data/tools/cmdsender/TitleWidget-8IcwweFE-2d09ac632c6319281e1e.js +1 -0
  59. data/tools/cmdsender/VWidget-CoIgX3hM-2a96bb926a22082ef66f.js +1 -0
  60. data/tools/cmdsender/ValueWidget-BvT1ASar-569bf4ee3a869b3a983c.js +1 -0
  61. data/tools/cmdsender/ValuelimitsbarWidget-C5lBnUmB-a57a4387edcb9e00239f.js +1 -0
  62. data/tools/cmdsender/ValuelimitscolumnWidget-DHYI0WBL-9bdaf843078c6c366a0a.js +1 -0
  63. data/tools/cmdsender/ValuerangebarWidget-BSszZhlE-9720c31cb31b04465293.js +1 -0
  64. data/tools/cmdsender/VerticalWidget-1GhgYrC3-2861b7292deac636c9ce.js +1 -0
  65. data/tools/cmdsender/VerticalboxWidget-DYHJqEzd-fbaceb71491dd8a6da8e.js +1 -0
  66. data/tools/cmdsender/Widget-B8t93Oid-343384cb6cc88aad60ee.js +1 -0
  67. data/tools/cmdsender/main-fa50ec9d093e7c784e06.js +1504 -0
  68. data/tools/cmdsender/main.js +1 -1
  69. metadata +68 -70
  70. data/tools/cmdsender/ArrayWidget-Ck6pzAyW-e6f2bc78591871d4c021.js +0 -2
  71. data/tools/cmdsender/ArrayplotWidget-ntRLh6-B-5b25846e1160edc5860d.js +0 -1
  72. data/tools/cmdsender/BarColumn-Bgz2YJ59-85182280463f9f317a0e.js +0 -1
  73. data/tools/cmdsender/BlockWidget-DGH3Zz5p-a7218379f30e4e7499d2.js +0 -2
  74. data/tools/cmdsender/ButtonWidget-D_tupiPB-c36933dafd7fe4511f97.js +0 -2
  75. data/tools/cmdsender/CanvasWidget-CzG2jYQb-74abcd98bde7f4b06931.js +0 -1
  76. data/tools/cmdsender/CanvasdotWidget-0FAaw4G2-a7d15bcf24dcc3c99a16.js +0 -1
  77. data/tools/cmdsender/CanvasimageWidget-CNJlzLqo-ea39154a49478f39b1c9.js +0 -1
  78. data/tools/cmdsender/CanvasimagevalueWidget-DudwwOD6-c2977839b1b5beb747ac.js +0 -1
  79. data/tools/cmdsender/CanvaslabelWidget-BZQp16dH-4e0a2e1d4ad8ffdbc00f.js +0 -1
  80. data/tools/cmdsender/CanvaslabelvalueWidget-CHS36Te9-1326b196ef519b64ef4e.js +0 -1
  81. data/tools/cmdsender/CanvaslineWidget-nhKEAGhs-b26186dde4dbe9720fe2.js +0 -1
  82. data/tools/cmdsender/CanvaslinevalueWidget-DsyIDkJy-7dd806a4251982359fc8.js +0 -1
  83. data/tools/cmdsender/CheckbuttonWidget-DCam7Jd0-b0bd5e20f41eb64a2e4c.js +0 -1
  84. data/tools/cmdsender/ComboboxWidget-ZX-k-_aK-de6ae885887baed6f869.js +0 -1
  85. data/tools/cmdsender/CommandSender-8ccdeb4eec8da196a156.js +0 -1125
  86. data/tools/cmdsender/CriticalCmdDialog-Dylpoz_4-de39c72a2e7f30c62c5f.js +0 -1
  87. data/tools/cmdsender/DateWidget-DuJ5uC2t-61ac3a5607ac69bf1946.js +0 -1
  88. data/tools/cmdsender/DetailsDialog-BQE0TraI-14e31b27a906a6493bc2.js +0 -1
  89. data/tools/cmdsender/DynamicWidget-CfMtj7H8-e763433cb1f126a56a85.js +0 -1
  90. data/tools/cmdsender/FormatvalueWidget-DYICPNcx-369b3503763d617b1704.js +0 -1
  91. data/tools/cmdsender/Graph-DCihpnT0-012785e59cef2f7ba8d0.js +0 -1
  92. data/tools/cmdsender/GraphWidget-cTVq29cY-3a1d000b923aab692dc1.js +0 -1
  93. data/tools/cmdsender/HorizontalWidget-v1pfd94Z-bd4117a1b457f7b747b8.js +0 -1
  94. data/tools/cmdsender/HorizontalboxWidget-B06-c_n4-df67026ca3aa367e15cd.js +0 -1
  95. data/tools/cmdsender/HorizontallineWidget-DEODVJCk-6c4cfe764738b3dce8ed.js +0 -1
  96. data/tools/cmdsender/IframeWidget-n8lNXrpt-248b557a9ca7861fa205.js +0 -1
  97. data/tools/cmdsender/ImageLoader-CfcErydq-a423f9782e23274ea1de.js +0 -1
  98. data/tools/cmdsender/ImageviewerWidget-DE8fj06Z-4229c338f78b0b61fbe4.js +0 -1
  99. data/tools/cmdsender/LabelWidget-iUIJLhdA-3a3a035aa7e3f324f4e3.js +0 -1
  100. data/tools/cmdsender/LabelledWidget-KI6fMlsr-bb052d44ac77b2e324ee.js +0 -1
  101. data/tools/cmdsender/LabelprogressbarWidget-C2lzmqBH-fe6335931e28c4cdfb6e.js +0 -1
  102. data/tools/cmdsender/LabelsparklineWidget-Ci6GGm29-dee496933e008db9d034.js +0 -1
  103. data/tools/cmdsender/LabelvalueWidget-oiW-JDw6-1570e7ad78320dd7165f.js +0 -1
  104. data/tools/cmdsender/LabelvaluedescWidget-Ck0AJ9g0-7df34a2f89be8fb9f8f7.js +0 -1
  105. data/tools/cmdsender/LabelvaluelimitsbarWidget-aaVLaejn-90cba58de18421f43e81.js +0 -1
  106. data/tools/cmdsender/LabelvaluelimitscolumnWidget-Uur6aqOg-1eb20d5d4e420cdc8dcf.js +0 -1
  107. data/tools/cmdsender/LabelvaluerangebarWidget-Bs9locqu-be67e66661e173c12a74.js +0 -1
  108. data/tools/cmdsender/Layout-1z8iJV5--980eb034a25f5f420214.js +0 -1
  109. data/tools/cmdsender/LedWidget-BN8IgAxJ-9302562e072e102c9bb6.js +0 -1
  110. data/tools/cmdsender/LimitsbarWidget-BxxoKTjp-550654baa6dbb8de5c82.js +0 -1
  111. data/tools/cmdsender/LimitscolorWidget-DFDwf4In-c2da3a66e07c0f0b827a.js +0 -1
  112. data/tools/cmdsender/LimitscolumnWidget-CdBh2mJu-b320b478205b2745236a.js +0 -1
  113. data/tools/cmdsender/LinegraphWidget-jXksfbPb-8fade2012cc2b61f1d8b.js +0 -1
  114. data/tools/cmdsender/MatrixbycolumnsWidget-DCwxPjwS-900c11b179ef5d285cce.js +0 -1
  115. data/tools/cmdsender/ProgressbarWidget-Cdu5nJC3-e1b358898e99ab5c366a.js +0 -1
  116. data/tools/cmdsender/RadiobuttonWidget-CZZGbvdG-7dd02b64c7451adbee41.js +0 -1
  117. data/tools/cmdsender/RadiogroupWidget-CQN3v8Ip-9c60d5d6fc0dd4a6fc45.js +0 -1
  118. data/tools/cmdsender/RangebarWidget-dZN9WjoZ-ad740b52951c88159b7d.js +0 -1
  119. data/tools/cmdsender/RollupWidget-i9DnNJl6-3e63539ecdaa49f8d78a.js +0 -1
  120. data/tools/cmdsender/ScrollwindowWidget-54GU96Ve-d671eec7dfe14acd41b6.js +0 -1
  121. data/tools/cmdsender/SignalWidget-B_kA9eCJ-f9ea606e8558a158f002.js +0 -1
  122. data/tools/cmdsender/SpacerWidget-XoMPHak8-89101d45ce49761853c3.js +0 -1
  123. data/tools/cmdsender/SparklineWidget-DQNsvEj9-1e65a82bdcc1920569b8.js +0 -1
  124. data/tools/cmdsender/TabbookWidget-_HVA72t5-b9753d8d524da2c7dabe.js +0 -1
  125. data/tools/cmdsender/TextboxWidget-0JXn4bMH-a2ff21565b7bf6e69bfb.js +0 -1
  126. data/tools/cmdsender/TextfieldWidget-BXr9MkVW-5f200ba6cb8dd008c3db.js +0 -1
  127. data/tools/cmdsender/TimeWidget-C67uwMGH-c979573d24a98c50b30e.js +0 -1
  128. data/tools/cmdsender/TitleWidget-t_YLgUMB-3d5ac03e484ee87c85cb.js +0 -1
  129. data/tools/cmdsender/VWidget-j2GIGGSX-a35a776160f2d34d22a7.js +0 -1
  130. data/tools/cmdsender/ValueWidget-3jNtnh5i-3fb26681ba0b3eea2fce.js +0 -1
  131. data/tools/cmdsender/ValuelimitsbarWidget-JSceOzGS-165ff396b7b32b637e38.js +0 -1
  132. data/tools/cmdsender/ValuelimitscolumnWidget-HR1TNHwQ-7790fc72265737c05bd0.js +0 -1
  133. data/tools/cmdsender/ValuerangebarWidget-DnZrho8S-906c7c04bc84fef194be.js +0 -1
  134. data/tools/cmdsender/VerticalWidget-DJvoxqLE-7193eb2ad090444f41cc.js +0 -1
  135. data/tools/cmdsender/VerticalboxWidget-CYYyLBoO-ae1b0e994ee90609f26e.js +0 -1
  136. data/tools/cmdsender/Widget-Bn_S-zBo-efae4c00380b9d00ac88.js +0 -1
  137. data/tools/cmdsender/main-2ac97b3f21af7820f325.js +0 -1503
@@ -0,0 +1,1504 @@
1
+ System.register(["vue","vue-router","single-spa","vuex","vuetify"],(function(Pn,st){"use strict";var Fe,ht,Ue,pe,se,qt,Yt,up,hp,ka,Ht,Ps,Sa,Fs,dt,Mr,Be,dp,pp,eu,Ws,gp,Bs,_a,fp,mp,vp,yp,tu,wp,bp,xp,Cp,nu,kp,Sp,_p,iu,Ap,$p;return{setters:[xt=>{Fe=xt.resolveComponent,ht=xt.createBlock,Ue=xt.openBlock,pe=xt.withCtx,se=xt.createVNode,qt=xt.createElementBlock,Yt=xt.createElementVNode,up=xt.useCssVars,hp=xt.defineAsyncComponent,ka=xt.withModifiers,Ht=xt.createCommentVNode,Ps=xt.withDirectives,Sa=xt.normalizeClass,Fs=xt.vShow,dt=xt.toDisplayString,Mr=xt.Fragment,Be=xt.createTextVNode,dp=xt.normalizeProps,pp=xt.guardReactiveProps,eu=xt.withKeys,Ws=xt.renderList,gp=xt.createSlots,Bs=xt.h,_a=xt.normalizeStyle,fp=xt.renderSlot,mp=xt.defineComponent,vp=xt.warn,yp=xt.inject,tu=xt.computed,wp=xt.shallowRef,bp=xt.watchEffect,xp=xt.getCurrentInstance,Cp=xt.provide,nu=xt.createApp,kp=xt.mergeProps},xt=>{Sp=xt.createRouter,_p=xt.createWebHistory},xt=>{iu=xt.getMountedApps},xt=>{Ap=xt.createStore},xt=>{$p=xt.createVuetify}],execute:(function(){Pn({c:ed,f:yn,l:pn,y:Kn,z:Zh});var xt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(h){return Object.getOwnPropertyDescriptor(t,h).enumerable}))),n.push.apply(n,i)}return n}function ts(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Mp(Object(n),!0).forEach((function(i){Pb(t,i,n[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mp(Object(n)).forEach((function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))}))}return t}function Pb(t,e,n){return(e=(function(i){var h=(function(p,m){if(ns(p)!=="object"||p===null)return p;var b=p[Symbol.toPrimitive];if(b!==void 0){var d=b.call(p,m);if(ns(d)!=="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(p)})(i,"string");return ns(h)==="symbol"?h:String(h)})(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ns(t){return ns=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ns(t)}(function(t){if(t.CSS&&t.CSS.escape)return t.CSS.escape;var e=function(n){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var i,h=String(n),p=h.length,m=-1,b="",d=h.charCodeAt(0);++m<p;)(i=h.charCodeAt(m))!=0?b+=i>=1&&i<=31||i==127||m==0&&i>=48&&i<=57||m==1&&i>=48&&i<=57&&d==45?"\\"+i.toString(16)+" ":m==0&&p==1&&i==45||!(i>=128||i==45||i==95||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122)?"\\"+h.charAt(m):h.charAt(m):b+="�";return b};t.CSS||(t.CSS={}),t.CSS.escape=e})(xt);var Fb={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function Wb(t){if(ns(t)!=="object")throw new Error("single-spa-vue requires a configuration object");var e=ts(ts({},Fb),t);if(!e.Vue&&!e.createApp)throw Error("single-spa-vue must be passed opts.Vue or opts.createApp");if(!e.appOptions)throw Error("single-spa-vue must be passed opts.appOptions");if(e.appOptions.el&&typeof e.appOptions.el!="string"&&!(e.appOptions.el instanceof HTMLElement))throw Error("single-spa-vue: appOptions.el must be a string CSS selector, an HTMLElement, or not provided at all. Was given ".concat(ns(e.appOptions.el)));e.createApp=e.createApp||e.Vue&&e.Vue.createApp;var n={};return{bootstrap:Bb.bind(null,e,n),mount:zb.bind(null,e,n),unmount:Hb.bind(null,e,n),update:jb.bind(null,e,n)}}function Bb(t){return t.loadRootComponent?t.loadRootComponent().then((function(e){return t.rootComponent=e})):Promise.resolve()}function zb(t,e,n){var i={};return Promise.resolve().then((function(){return(function(h,p){return typeof h.appOptions=="function"?h.appOptions(p):Promise.resolve(ts({},h.appOptions))})(t,n).then((function(h){var p;if(n.domElement&&!h.el&&(h.el=n.domElement),h.el)if(typeof h.el=="string"){if(!(p=document.querySelector(h.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(h.el))}else(p=h.el).id||(p.id="single-spa-application:".concat(n.name)),h.el="#".concat(CSS.escape(p.id));else{var m="single-spa-application:".concat(n.name);h.el="#".concat(CSS.escape(m)),(p=document.getElementById(m))||((p=document.createElement("div")).id=m,document.body.appendChild(p))}if(!t.replaceMode&&(h.el=h.el+" .single-spa-container",!p.querySelector(".single-spa-container"))){var b=document.createElement("div");b.className="single-spa-container",p.appendChild(b)}i.domEl=p,h.render||h.template||!t.rootComponent||(h.render=function(g){return g(t.rootComponent)}),h.data||(h.data={});var d=h.data;if(h.data=function(){return ts(ts({},typeof d=="function"?d.call(this,this):d),n)},t.createApp){if(i.vueInstance=t.createApp(h),t.handleInstance)return Promise.resolve(t.handleInstance(i.vueInstance,n)).then((function(){return i.root=i.vueInstance.mount(h.el),e[n.name]=i,i.vueInstance}));i.root=i.vueInstance.mount(h.el)}else if(i.vueInstance=new t.Vue(h),i.vueInstance.bind&&(i.vueInstance=i.vueInstance.bind(i.vueInstance)),t.handleInstance)return Promise.resolve(t.handleInstance(i.vueInstance,n)).then((function(){return e[n.name]=i,i.vueInstance}));return e[n.name]=i,i.vueInstance}))}))}function jb(t,e,n){return Promise.resolve().then((function(){var i=e[n.name],h=ts(ts({},t.appOptions.data||{}),n),p=i.root||i.vueInstance;for(var m in h)p[m]=h[m]}))}function Hb(t,e,n){return Promise.resolve().then((function(){var i=e[n.name];t.createApp?i.vueInstance.unmount(i.domEl):(i.vueInstance.$destroy(),i.vueInstance.$el.innerHTML=""),delete i.vueInstance,i.domEl&&(i.domEl.innerHTML="",delete i.domEl)}))}const Ub=Pn("_",(t,e)=>{const n=t.__vccOpts||t;for(const[i,h]of e)n[i]=h;return n}),Vb={};function Gb(t,e){const n=Fe("router-view"),i=Fe("v-app");return Ue(),ht(i,{id:"innerapp"},{default:pe(()=>[se(n)]),_:1})}const Kb=Ub(Vb,[["render",Gb]]),I2="modulepreload",E2=function(t){return"/"+t},L2={},at=function(e,n,i){let h=Promise.resolve();function p(m){const b=new Event("vite:preloadError",{cancelable:!0});if(b.payload=m,window.dispatchEvent(b),!b.defaultPrevented)throw m}return h.then(m=>{for(const b of m||[])b.status==="rejected"&&p(b.reason);return e().catch(p)})},Tp=function(t){var e;!t.name!=="NotFound"&&(t.path=`/tools/cmdsender/${t.path.replace(/^\//,"")}`),(e=t.children)==null||e.forEach(Tp)},Zi=Pn("d",(t,e)=>{const n=t.__vccOpts||t;for(const[i,h]of e)n[i]=h;return n}),qb="/icons/customIcons.svg",ru={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return qb+"#"+this.icon}}},Ip=()=>{up(t=>({"259824e2":t.color}))},Ep=ru.setup;ru.setup=Ep?(t,e)=>(Ip(),Ep(t,e)):Ip;const Yb={class:"cosmos-custom-icon"},Xb={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},Zb=["href"];function Qb(t,e,n,i,h,p){return Ue(),qt("span",Yb,[(Ue(),qt("svg",Xb,[Yt("use",{href:p.iconSrc},null,8,Zb)]))])}const Jb=Zi(ru,[["render",Qb],["__scopeId","data-v-4b6f1199"]]),wl=6e4,ou=36e5,e0=1e3,Lp=Symbol.for("constructDateFrom");function Kn(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Lp in t?t[Lp](e):t instanceof Date?new t.constructor(e):new Date(e)}function pn(t,e){return Kn(e||t,t)}let t0={};function zs(){return t0}function Lo(t,e){var n,i,h,p;const m=zs(),b=(e==null?void 0:e.weekStartsOn)??((i=(n=e==null?void 0:e.locale)==null?void 0:n.options)==null?void 0:i.weekStartsOn)??m.weekStartsOn??((p=(h=m.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,d=pn(t,e==null?void 0:e.in),g=d.getDay(),o=(g<b?7:0)+g-b;return d.setDate(d.getDate()-o),d.setHours(0,0,0,0),d}function js(t,e){return Lo(t,{...e,weekStartsOn:1})}function Rp(t,e){const n=pn(t,void 0),i=n.getFullYear(),h=Kn(n,0);h.setFullYear(i+1,0,4),h.setHours(0,0,0,0);const p=js(h),m=Kn(n,0);m.setFullYear(i,0,4),m.setHours(0,0,0,0);const b=js(m);return n.getTime()>=p.getTime()?i+1:n.getTime()>=b.getTime()?i:i-1}function bl(t){const e=pn(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function n0(t,...e){const n=Kn.bind(null,e.find(i=>typeof i=="object"));return e.map(n)}function Op(t,e){const n=pn(t,void 0);return n.setHours(0,0,0,0),n}function i0(t,e,n){const[i,h]=n0(void 0,t,e),p=Op(i),m=Op(h),b=+p-bl(p),d=+m-bl(m);return Math.round((b-d)/864e5)}function r0(t,e){const n=Rp(t),i=Kn(t,0);return i.setFullYear(n,0,4),i.setHours(0,0,0,0),js(i)}function o0(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function su(t){return!(!o0(t)&&typeof t!="number"||isNaN(+pn(t)))}function s0(t,e){const n=pn(t,void 0);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const a0={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"}},l0=(t,e,n)=>{let i;const h=a0[t];return typeof h=="string"?i=h:e===1?i=h.one:i=h.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function au(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const c0={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},u0={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},h0={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},d0={date:au({formats:c0,defaultWidth:"full"}),time:au({formats:u0,defaultWidth:"full"}),dateTime:au({formats:h0,defaultWidth:"full"})},p0={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},g0=(t,e,n,i)=>p0[t];function Aa(t){return(e,n)=>{const i=n!=null&&n.context?String(n.context):"standalone";let h;if(i==="formatting"&&t.formattingValues){const m=t.defaultFormattingWidth||t.defaultWidth,b=n!=null&&n.width?String(n.width):m;h=t.formattingValues[b]||t.formattingValues[m]}else{const m=t.defaultWidth,b=n!=null&&n.width?String(n.width):t.defaultWidth;h=t.values[b]||t.values[m]}const p=t.argumentCallback?t.argumentCallback(e):e;return h[p]}}const f0={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},m0={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},v0={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"]},y0={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"]},w0={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"}},b0={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"}},x0=(t,e)=>{const n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},C0={ordinalNumber:x0,era:Aa({values:f0,defaultWidth:"wide"}),quarter:Aa({values:m0,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Aa({values:v0,defaultWidth:"wide"}),day:Aa({values:y0,defaultWidth:"wide"}),dayPeriod:Aa({values:w0,defaultWidth:"wide",formattingValues:b0,defaultFormattingWidth:"wide"})};function $a(t){return(e,n={})=>{const i=n.width,h=i&&t.matchPatterns[i]||t.matchPatterns[t.defaultMatchWidth],p=e.match(h);if(!p)return null;const m=p[0],b=i&&t.parsePatterns[i]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(b)?S0(b,a=>a.test(m)):k0(b,a=>a.test(m));let g;g=t.valueCallback?t.valueCallback(d):d,g=n.valueCallback?n.valueCallback(g):g;const o=e.slice(m.length);return{value:g,rest:o}}}function k0(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function S0(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function _0(t){return(e,n={})=>{const i=e.match(t.matchPattern);if(!i)return null;const h=i[0],p=e.match(t.parsePattern);if(!p)return null;let m=t.valueCallback?t.valueCallback(p[0]):p[0];m=n.valueCallback?n.valueCallback(m):m;const b=e.slice(h.length);return{value:m,rest:b}}}const A0=/^(\d+)(th|st|nd|rd)?/i,$0=/\d+/i,M0={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},T0={any:[/^b/i,/^(a|c)/i]},I0={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},E0={any:[/1/i,/2/i,/3/i,/4/i]},L0={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},R0={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]},O0={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},N0={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]},D0={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},P0={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}},F0={ordinalNumber:_0({matchPattern:A0,parsePattern:$0,valueCallback:t=>parseInt(t,10)}),era:$a({matchPatterns:M0,defaultMatchWidth:"wide",parsePatterns:T0,defaultParseWidth:"any"}),quarter:$a({matchPatterns:I0,defaultMatchWidth:"wide",parsePatterns:E0,defaultParseWidth:"any",valueCallback:t=>t+1}),month:$a({matchPatterns:L0,defaultMatchWidth:"wide",parsePatterns:R0,defaultParseWidth:"any"}),day:$a({matchPatterns:O0,defaultMatchWidth:"wide",parsePatterns:N0,defaultParseWidth:"any"}),dayPeriod:$a({matchPatterns:D0,defaultMatchWidth:"any",parsePatterns:P0,defaultParseWidth:"any"})},Np={code:"en-US",formatDistance:l0,formatLong:d0,formatRelative:g0,localize:C0,match:F0,options:{weekStartsOn:0,firstWeekContainsDate:1}};function W0(t,e){const n=pn(t,void 0);return i0(n,s0(n))+1}function Dp(t,e){const n=pn(t,void 0),i=+js(n)-+r0(n);return Math.round(i/6048e5)+1}function lu(t,e){var n,i,h,p;const m=pn(t,e==null?void 0:e.in),b=m.getFullYear(),d=zs(),g=(e==null?void 0:e.firstWeekContainsDate)??((i=(n=e==null?void 0:e.locale)==null?void 0:n.options)==null?void 0:i.firstWeekContainsDate)??d.firstWeekContainsDate??((p=(h=d.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,o=Kn((e==null?void 0:e.in)||t,0);o.setFullYear(b+1,0,g),o.setHours(0,0,0,0);const a=Lo(o,e),u=Kn((e==null?void 0:e.in)||t,0);u.setFullYear(b,0,g),u.setHours(0,0,0,0);const l=Lo(u,e);return+m>=+a?b+1:+m>=+l?b:b-1}function B0(t,e){var n,i,h,p;const m=zs(),b=(e==null?void 0:e.firstWeekContainsDate)??((i=(n=e==null?void 0:e.locale)==null?void 0:n.options)==null?void 0:i.firstWeekContainsDate)??m.firstWeekContainsDate??((p=(h=m.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,d=lu(t,e),g=Kn((e==null?void 0:e.in)||t,0);return g.setFullYear(d,0,b),g.setHours(0,0,0,0),Lo(g,e)}function Pp(t,e){const n=pn(t,e==null?void 0:e.in),i=+Lo(n,e)-+B0(n,e);return Math.round(i/6048e5)+1}function rn(t,e){const n=t<0?"-":"",i=Math.abs(t).toString().padStart(e,"0");return n+i}const Ro={y(t,e){const n=t.getFullYear(),i=n>0?n:1-n;return rn(e==="yy"?i%100:i,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):rn(n+1,2)},d(t,e){return rn(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return rn(t.getHours()%12||12,e.length)},H(t,e){return rn(t.getHours(),e.length)},m(t,e){return rn(t.getMinutes(),e.length)},s(t,e){return rn(t.getSeconds(),e.length)},S(t,e){const n=e.length,i=t.getMilliseconds(),h=Math.trunc(i*Math.pow(10,n-3));return rn(h,e.length)}},Hs={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Fp={G:function(t,e,n){const i=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const i=t.getFullYear(),h=i>0?i:1-i;return n.ordinalNumber(h,{unit:"year"})}return Ro.y(t,e)},Y:function(t,e,n,i){const h=lu(t,i),p=h>0?h:1-h;if(e==="YY"){const m=p%100;return rn(m,2)}return e==="Yo"?n.ordinalNumber(p,{unit:"year"}):rn(p,e.length)},R:function(t,e){const n=Rp(t);return rn(n,e.length)},u:function(t,e){const n=t.getFullYear();return rn(n,e.length)},Q:function(t,e,n){const i=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(i);case"QQ":return rn(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,e,n){const i=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(i);case"qq":return rn(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,e,n){const i=t.getMonth();switch(e){case"M":case"MM":return Ro.M(t,e);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,e,n){const i=t.getMonth();switch(e){case"L":return String(i+1);case"LL":return rn(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,e,n,i){const h=Pp(t,i);return e==="wo"?n.ordinalNumber(h,{unit:"week"}):rn(h,e.length)},I:function(t,e,n){const i=Dp(t);return e==="Io"?n.ordinalNumber(i,{unit:"week"}):rn(i,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):Ro.d(t,e)},D:function(t,e,n){const i=W0(t);return e==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):rn(i,e.length)},E:function(t,e,n){const i=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,e,n,i){const h=t.getDay(),p=(h-i.weekStartsOn+8)%7||7;switch(e){case"e":return String(p);case"ee":return rn(p,2);case"eo":return n.ordinalNumber(p,{unit:"day"});case"eee":return n.day(h,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(h,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(h,{width:"short",context:"formatting"});case"eeee":default:return n.day(h,{width:"wide",context:"formatting"})}},c:function(t,e,n,i){const h=t.getDay(),p=(h-i.weekStartsOn+8)%7||7;switch(e){case"c":return String(p);case"cc":return rn(p,e.length);case"co":return n.ordinalNumber(p,{unit:"day"});case"ccc":return n.day(h,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(h,{width:"narrow",context:"standalone"});case"cccccc":return n.day(h,{width:"short",context:"standalone"});case"cccc":default:return n.day(h,{width:"wide",context:"standalone"})}},i:function(t,e,n){const i=t.getDay(),h=i===0?7:i;switch(e){case"i":return String(h);case"ii":return rn(h,e.length);case"io":return n.ordinalNumber(h,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,e,n){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,n){const i=t.getHours();let h;switch(i===12?h=Hs.noon:i===0?h=Hs.midnight:h=i/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(h,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(h,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(h,{width:"wide",context:"formatting"})}},B:function(t,e,n){const i=t.getHours();let h;switch(i>=17?h=Hs.evening:i>=12?h=Hs.afternoon:i>=4?h=Hs.morning:h=Hs.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(h,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(h,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let i=t.getHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return Ro.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):Ro.H(t,e)},K:function(t,e,n){const i=t.getHours()%12;return e==="Ko"?n.ordinalNumber(i,{unit:"hour"}):rn(i,e.length)},k:function(t,e,n){let i=t.getHours();return i===0&&(i=24),e==="ko"?n.ordinalNumber(i,{unit:"hour"}):rn(i,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Ro.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Ro.s(t,e)},S:function(t,e){return Ro.S(t,e)},X:function(t,e,n){const i=t.getTimezoneOffset();if(i===0)return"Z";switch(e){case"X":return Bp(i);case"XXXX":case"XX":return is(i);case"XXXXX":case"XXX":default:return is(i,":")}},x:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"x":return Bp(i);case"xxxx":case"xx":return is(i);case"xxxxx":case"xxx":default:return is(i,":")}},O:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Wp(i,":");case"OOOO":default:return"GMT"+is(i,":")}},z:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Wp(i,":");case"zzzz":default:return"GMT"+is(i,":")}},t:function(t,e,n){const i=Math.trunc(+t/1e3);return rn(i,e.length)},T:function(t,e,n){return rn(+t,e.length)}};function Wp(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),h=Math.trunc(i/60),p=i%60;return p===0?n+String(h):n+String(h)+e+rn(p,2)}function Bp(t,e){return t%60===0?(t>0?"-":"+")+rn(Math.abs(t)/60,2):is(t,e)}function is(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),h=rn(Math.trunc(i/60),2),p=rn(i%60,2);return n+h+e+p}const zp=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},jp=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},z0=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],i=n[1],h=n[2];if(!h)return zp(t,e);let p;switch(i){case"P":p=e.dateTime({width:"short"});break;case"PP":p=e.dateTime({width:"medium"});break;case"PPP":p=e.dateTime({width:"long"});break;case"PPPP":default:p=e.dateTime({width:"full"});break}return p.replace("{{date}}",zp(i,e)).replace("{{time}}",jp(h,e))},cu={p:jp,P:z0},j0=/^D+$/,H0=/^Y+$/,U0=["D","DD","YY","YYYY"];function Hp(t){return j0.test(t)}function Up(t){return H0.test(t)}function uu(t,e,n){const i=V0(t,e,n);if(console.warn(i),U0.includes(t))throw new RangeError(i)}function V0(t,e,n){const i=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${i} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const G0=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,K0=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,q0=/^'([^]*?)'?$/,Y0=/''/g,X0=/[a-zA-Z]/;function rs(t,e,n){var i,h,p,m,b,d,g,o;const a=zs(),u=(n==null?void 0:n.locale)??a.locale??Np,l=(n==null?void 0:n.firstWeekContainsDate)??((h=(i=n==null?void 0:n.locale)==null?void 0:i.options)==null?void 0:h.firstWeekContainsDate)??a.firstWeekContainsDate??((m=(p=a.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((d=(b=n==null?void 0:n.locale)==null?void 0:b.options)==null?void 0:d.weekStartsOn)??a.weekStartsOn??((o=(g=a.locale)==null?void 0:g.options)==null?void 0:o.weekStartsOn)??0,c=pn(t,n==null?void 0:n.in);if(!su(c))throw new RangeError("Invalid time value");let f=e.match(K0).map(x=>{const E=x[0];if(E==="p"||E==="P"){const M=cu[E];return M(x,u.formatLong)}return x}).join("").match(G0).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const E=x[0];if(E==="'")return{isToken:!1,value:Z0(x)};if(Fp[E])return{isToken:!0,value:x};if(E.match(X0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return{isToken:!1,value:x}});u.localize.preprocessor&&(f=u.localize.preprocessor(c,f));const w={firstWeekContainsDate:l,weekStartsOn:s,locale:u};return f.map(x=>{if(!x.isToken)return x.value;const E=x.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Up(E)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Hp(E))&&uu(E,e,String(t));const M=Fp[E[0]];return M(c,E,u.localize,w)}).join("")}function Z0(t){const e=t.match(q0);return e?e[1].replace(Y0,"'"):t}var Oo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Vp={exports:{}},Gp;function Q0(){return Gp||(Gp=1,(function(t,e){(function(){var n="ace",i=(function(){return this})();!i&&typeof window<"u"&&(i=window);var h=function(o,a,u){if(typeof o!="string"){h.original?h.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(u=a),h.modules[o]||(h.payloads[o]=u,h.modules[o]=null)};h.modules={},h.payloads={};var p=function(o,a,u){if(typeof a=="string"){var l=d(o,a);if(l!=null)return u&&u(),l}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var s=[],c=0,f=a.length;c<f;++c){var w=d(o,a[c]);if(w==null&&m.original)return;s.push(w)}return u&&u.apply(null,s)||!0}},m=function(o,a){var u=p("",o,a);return u==null&&m.original?m.original.apply(this,arguments):u},b=function(o,a){if(a.indexOf("!")!==-1){var u=a.split("!");return b(o,u[0])+"!"+b(o,u[1])}if(a.charAt(0)=="."){var l=o.split("/").slice(0,-1).join("/");for(a=l+"/"+a;a.indexOf(".")!==-1&&s!=a;){var s=a;a=a.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return a},d=function(o,a){a=b(o,a);var u=h.modules[a];if(!u){if(u=h.payloads[a],typeof u=="function"){var l={},s={id:a,uri:"",exports:l,packaged:!0},c=function(w,x){return p(a,w,x)},f=u(c,l,s);l=f||s.exports,h.modules[a]=l,delete h.payloads[a]}u=h.modules[a]=l||u}return u};function g(o){var a=i;i[o]||(i[o]={}),a=i[o],(!a.define||!a.define.packaged)&&(h.original=a.define,a.define=h,a.define.packaged=!0),(!a.require||!a.require.packaged)&&(m.original=a.require,a.require=m,a.require.packaged=!0)}g(n)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(n,i,h){function p(m,b,d){Object.defineProperty(m,b,{value:d,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||p(String.prototype,"startsWith",function(m,b){return b=b||0,this.lastIndexOf(m,b)===b}),String.prototype.endsWith||p(String.prototype,"endsWith",function(m,b){var d=this;(b===void 0||b>d.length)&&(b=d.length),b-=m.length;var g=d.indexOf(m,b);return g!==-1&&g===b}),String.prototype.repeat||p(String.prototype,"repeat",function(m){for(var b="",d=this;m>0;)m&1&&(b+=d),(m>>=1)&&(d+=d);return b}),String.prototype.includes||p(String.prototype,"includes",function(m,b){return this.indexOf(m,b)!=-1}),Object.assign||(Object.assign=function(m){if(m==null)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(m),d=1;d<arguments.length;d++){var g=arguments[d];g!=null&&Object.keys(g).forEach(function(o){b[o]=g[o]})}return b}),Object.values||(Object.values=function(m){return Object.keys(m).map(function(b){return m[b]})}),Array.prototype.find||p(Array.prototype,"find",function(m){for(var b=this.length,d=arguments[1],g=0;g<b;g++){var o=this[g];if(m.call(d,o,g,this))return o}}),Array.prototype.findIndex||p(Array.prototype,"findIndex",function(m){for(var b=this.length,d=arguments[1],g=0;g<b;g++){var o=this[g];if(m.call(d,o,g,this))return g}}),Array.prototype.includes||p(Array.prototype,"includes",function(m,b){return this.indexOf(m,b)!=-1}),Array.prototype.fill||p(Array.prototype,"fill",function(m){for(var b=this,d=b.length>>>0,g=arguments[1],o=g>>0,a=o<0?Math.max(d+o,0):Math.min(o,d),u=arguments[2],l=u===void 0?d:u>>0,s=l<0?Math.max(d+l,0):Math.min(l,d);a<s;)b[a]=m,a++;return b}),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(n,i,h){n("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(n,i,h){i.deepCopy=function p(m){if(typeof m!="object"||!m)return m;var b;if(Array.isArray(m)){b=[];for(var d=0;d<m.length;d++)b[d]=p(m[d]);return b}if(Object.prototype.toString.call(m)!=="[object Object]")return m;b={};for(var d in m)b[d]=p(m[d]);return b}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(n,i,h){i.last=function(b){return b[b.length-1]},i.stringReverse=function(b){return b.split("").reverse().join("")},i.stringRepeat=function(b,d){for(var g="";d>0;)d&1&&(g+=b),(d>>=1)&&(b+=b);return g};var p=/^\s\s*/,m=/\s\s*$/;i.stringTrimLeft=function(b){return b.replace(p,"")},i.stringTrimRight=function(b){return b.replace(m,"")},i.copyObject=function(b){var d={};for(var g in b)d[g]=b[g];return d},i.copyArray=function(b){for(var d=[],g=0,o=b.length;g<o;g++)b[g]&&typeof b[g]=="object"?d[g]=this.copyObject(b[g]):d[g]=b[g];return d},i.deepCopy=n("./deep_copy").deepCopy,i.arrayToMap=function(b){for(var d={},g=0;g<b.length;g++)d[b[g]]=1;return d},i.createMap=function(b){var d=Object.create(null);for(var g in b)d[g]=b[g];return d},i.arrayRemove=function(b,d){for(var g=0;g<=b.length;g++)d===b[g]&&b.splice(g,1)},i.escapeRegExp=function(b){return b.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},i.escapeHTML=function(b){return(""+b).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},i.getMatchOffsets=function(b,d){var g=[];return b.replace(d,function(o){g.push({offset:arguments[arguments.length-2],length:o.length})}),g},i.deferredCall=function(b){var d=null,g=function(){d=null,b()},o=function(a){return o.cancel(),d=setTimeout(g,a||0),o};return o.schedule=o,o.call=function(){return this.cancel(),b(),o},o.cancel=function(){return clearTimeout(d),d=null,o},o.isPending=function(){return d},o},i.delayedCall=function(b,d){var g=null,o=function(){g=null,b()},a=function(u){g==null&&(g=setTimeout(o,u||d))};return a.delay=function(u){g&&clearTimeout(g),g=setTimeout(o,u||d)},a.schedule=a,a.call=function(){this.cancel(),b()},a.cancel=function(){g&&clearTimeout(g),g=null},a.isPending=function(){return g},a},i.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},i.skipEmptyMatch=function(b,d,g){return g&&b.codePointAt(d)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(n,i,h){i.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},i.getOS=function(){return i.isMac?i.OS.MAC:i.isLinux?i.OS.LINUX:i.OS.WINDOWS};var p=typeof navigator=="object"?navigator:{},m=(/mac|win|linux/i.exec(p.platform)||["other"])[0].toLowerCase(),b=p.userAgent||"",d=p.appName||"";i.isWin=m=="win",i.isMac=m=="mac",i.isLinux=m=="linux",i.isIE=d=="Microsoft Internet Explorer"||d.indexOf("MSAppHost")>=0?parseFloat((b.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((b.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),i.isOldIE=i.isIE&&i.isIE<9,i.isGecko=i.isMozilla=b.match(/ Gecko\/\d+/),i.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",i.isWebKit=parseFloat(b.split("WebKit/")[1])||void 0,i.isChrome=parseFloat(b.split(" Chrome/")[1])||void 0,i.isSafari=parseFloat(b.split(" Safari/")[1])&&!i.isChrome||void 0,i.isEdge=parseFloat(b.split(" Edge/")[1])||void 0,i.isAIR=b.indexOf("AdobeAIR")>=0,i.isAndroid=b.indexOf("Android")>=0,i.isChromeOS=b.indexOf(" CrOS ")>=0,i.isIOS=/iPad|iPhone|iPod/.test(b)&&!window.MSStream,i.isIOS&&(i.isMac=!0),i.isMobile=i.isIOS||i.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(n,i,h){var p=n("./useragent"),m="http://www.w3.org/1999/xhtml";i.buildDom=function u(l,s,c){if(typeof l=="string"&&l){var f=document.createTextNode(l);return s&&s.appendChild(f),f}if(!Array.isArray(l))return l&&l.appendChild&&s&&s.appendChild(l),l;if(typeof l[0]!="string"||!l[0]){for(var w=[],x=0;x<l.length;x++){var E=u(l[x],s,c);E&&w.push(E)}return w}var M=document.createElement(l[0]),k=l[1],C=1;k&&typeof k=="object"&&!Array.isArray(k)&&(C=2);for(var x=C;x<l.length;x++)u(l[x],M,c);return C==2&&Object.keys(k).forEach(function(O){var L=k[O];O==="class"?M.className=Array.isArray(L)?L.join(" "):L:typeof L=="function"||O=="value"||O[0]=="$"?M[O]=L:O==="ref"?c&&(c[L]=M):O==="style"?typeof L=="string"&&(M.style.cssText=L):L!=null&&M.setAttribute(O,L)}),s&&s.appendChild(M),M},i.getDocumentHead=function(u){return u||(u=document),u.head||u.getElementsByTagName("head")[0]||u.documentElement},i.createElement=function(u,l){return document.createElementNS?document.createElementNS(l||m,u):document.createElement(u)},i.removeChildren=function(u){u.innerHTML=""},i.createTextNode=function(u,l){var s=l?l.ownerDocument:document;return s.createTextNode(u)},i.createFragment=function(u){var l=u?u.ownerDocument:document;return l.createDocumentFragment()},i.hasCssClass=function(u,l){var s=(u.className+"").split(/\s+/g);return s.indexOf(l)!==-1},i.addCssClass=function(u,l){i.hasCssClass(u,l)||(u.className+=" "+l)},i.removeCssClass=function(u,l){for(var s=u.className.split(/\s+/g);;){var c=s.indexOf(l);if(c==-1)break;s.splice(c,1)}u.className=s.join(" ")},i.toggleCssClass=function(u,l){for(var s=u.className.split(/\s+/g),c=!0;;){var f=s.indexOf(l);if(f==-1)break;c=!1,s.splice(f,1)}return c&&s.push(l),u.className=s.join(" "),c},i.setCssClass=function(u,l,s){s?i.addCssClass(u,l):i.removeCssClass(u,l)},i.hasCssString=function(u,l){var s=0,c;if(l=l||document,c=l.querySelectorAll("style")){for(;s<c.length;)if(c[s++].id===u)return!0}},i.removeElementById=function(u,l){l=l||document,l.getElementById(u)&&l.getElementById(u).remove()};var b,d=[];i.useStrictCSP=function(u){b=u,u==!1?g():d||(d=[])};function g(){var u=d;d=null,u&&u.forEach(function(l){o(l[0],l[1])})}function o(u,l,s){if(!(typeof document>"u")){if(d){if(s)g();else if(s===!1)return d.push([u,l])}if(!b){var c=s;!s||!s.getRootNode?c=document:(c=s.getRootNode(),(!c||c==s)&&(c=document));var f=c.ownerDocument||c;if(l&&i.hasCssString(l,c))return null;l&&(u+=`
2
+ /*# sourceURL=ace/css/`+l+" */");var w=i.createElement("style");w.appendChild(f.createTextNode(u)),l&&(w.id=l),c==f&&(c=i.getDocumentHead(f)),c.insertBefore(w,c.firstChild)}}}if(i.importCssString=o,i.importCssStylsheet=function(u,l){i.buildDom(["link",{rel:"stylesheet",href:u}],i.getDocumentHead(l))},i.scrollbarWidth=function(u){var l=i.createElement("ace_inner");l.style.width="100%",l.style.minWidth="0px",l.style.height="200px",l.style.display="block";var s=i.createElement("ace_outer"),c=s.style;c.position="absolute",c.left="-10000px",c.overflow="hidden",c.width="200px",c.minWidth="0px",c.height="150px",c.display="block",s.appendChild(l);var f=u&&u.documentElement||document&&document.documentElement;if(!f)return 0;f.appendChild(s);var w=l.offsetWidth;c.overflow="scroll";var x=l.offsetWidth;return w===x&&(x=s.clientWidth),f.removeChild(s),w-x},i.computedStyle=function(u,l){return window.getComputedStyle(u,"")||{}},i.setStyle=function(u,l,s){u[l]!==s&&(u[l]=s)},i.HAS_CSS_ANIMATION=!1,i.HAS_CSS_TRANSFORMS=!1,i.HI_DPI=p.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,p.isChromeOS&&(i.HI_DPI=!1),typeof document<"u"){var a=document.createElement("div");i.HI_DPI&&a.style.transform!==void 0&&(i.HAS_CSS_TRANSFORMS=!0),!p.isEdge&&typeof a.style.animationName<"u"&&(i.HAS_CSS_ANIMATION=!0),a=null}i.HAS_CSS_TRANSFORMS?i.translate=function(u,l,s){u.style.transform="translate("+Math.round(l)+"px, "+Math.round(s)+"px)"}:i.translate=function(u,l,s){u.style.top=Math.round(s)+"px",u.style.left=Math.round(l)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(n,i,h){/*
3
+ * based on code from:
4
+ *
5
+ * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
6
+ * Available via the MIT or new BSD license.
7
+ * see: http://github.com/jrburke/requirejs for details
8
+ */var p=n("./dom");i.get=function(m,b){var d=new XMLHttpRequest;d.open("GET",m,!0),d.onreadystatechange=function(){d.readyState===4&&b(d.responseText)},d.send(null)},i.loadScript=function(m,b){var d=p.getDocumentHead(),g=document.createElement("script");g.src=m,d.appendChild(g),g.onload=g.onreadystatechange=function(o,a){(a||!g.readyState||g.readyState=="loaded"||g.readyState=="complete")&&(g=g.onload=g.onreadystatechange=null,a||b())}},i.qualifyURL=function(m){var b=document.createElement("a");return b.href=m,b.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(n,i,h){i.inherits=function(p,m){p.super_=m,p.prototype=Object.create(m.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}})},i.mixin=function(p,m){for(var b in m)p[b]=m[b];return p},i.implement=function(p,m){i.mixin(p,m)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(n,i,h){var p={},m=function(){this.propagationStopped=!0},b=function(){this.defaultPrevented=!0};p._emit=p._dispatchEvent=function(d,g){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var o=this._eventRegistry[d]||[],a=this._defaultHandlers[d];if(!(!o.length&&!a)){(typeof g!="object"||!g)&&(g={}),g.type||(g.type=d),g.stopPropagation||(g.stopPropagation=m),g.preventDefault||(g.preventDefault=b),o=o.slice();for(var u=0;u<o.length&&(o[u](g,this),!g.propagationStopped);u++);if(a&&!g.defaultPrevented)return a(g,this)}},p._signal=function(d,g){var o=(this._eventRegistry||{})[d];if(o){o=o.slice();for(var a=0;a<o.length;a++)o[a](g,this)}},p.once=function(d,g){var o=this;if(this.on(d,function a(){o.off(d,a),g.apply(null,arguments)}),!g)return new Promise(function(a){g=a})},p.setDefaultHandler=function(d,g){var o=this._defaultHandlers;if(o||(o=this._defaultHandlers={_disabled_:{}}),o[d]){var a=o[d],u=o._disabled_[d];u||(o._disabled_[d]=u=[]),u.push(a);var l=u.indexOf(g);l!=-1&&u.splice(l,1)}o[d]=g},p.removeDefaultHandler=function(d,g){var o=this._defaultHandlers;if(o){var a=o._disabled_[d];if(o[d]==g)a&&this.setDefaultHandler(d,a.pop());else if(a){var u=a.indexOf(g);u!=-1&&a.splice(u,1)}}},p.on=p.addEventListener=function(d,g,o){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[d];return a||(a=this._eventRegistry[d]=[]),a.indexOf(g)==-1&&a[o?"unshift":"push"](g),g},p.off=p.removeListener=p.removeEventListener=function(d,g){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[d];if(o){var a=o.indexOf(g);a!==-1&&o.splice(a,1)}},p.removeAllListeners=function(d){d||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[d]=void 0),this._defaultHandlers&&(this._defaultHandlers[d]=void 0)},i.EventEmitter=p}),ace.define("ace/lib/report_error",["require","exports","module"],function(n,i,h){i.reportError=function(p,m){var b=new Error(p);b.data=m,typeof console=="object"&&console.error&&console.error(b),setTimeout(function(){throw b})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(n,i,h){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"};i.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(n,i,h){"no use strict";var p=n("./oop"),m=n("./event_emitter").EventEmitter,b=n("./report_error").reportError,d=n("./default_english_messages").defaultEnglishMessages,g={setOptions:function(s){Object.keys(s).forEach(function(c){this.setOption(c,s[c])},this)},getOptions:function(s){var c={};if(s)Array.isArray(s)||(s=Object.keys(s));else{var f=this.$options;s=Object.keys(f).filter(function(w){return!f[w].hidden})}return s.forEach(function(w){c[w]=this.getOption(w)},this),c},setOption:function(s,c){if(this["$"+s]!==c){var f=this.$options[s];if(!f)return o('misspelled option "'+s+'"');if(f.forwardTo)return this[f.forwardTo]&&this[f.forwardTo].setOption(s,c);f.handlesSet||(this["$"+s]=c),f&&f.set&&f.set.call(this,c)}},getOption:function(s){var c=this.$options[s];return c?c.forwardTo?this[c.forwardTo]&&this[c.forwardTo].getOption(s):c&&c.get?c.get.call(this):this["$"+s]:o('misspelled option "'+s+'"')}};function o(s){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var a,u,l=(function(){function s(){this.$defaultOptions={},a=d,u="dollarSigns"}return s.prototype.defineOptions=function(c,f,w){return c.$options||(this.$defaultOptions[f]=c.$options={}),Object.keys(w).forEach(function(x){var E=w[x];typeof E=="string"&&(E={forwardTo:E}),E.name||(E.name=x),c.$options[E.name]=E,"initialValue"in E&&(c["$"+E.name]=E.initialValue)}),p.implement(c,g),this},s.prototype.resetOptions=function(c){Object.keys(c.$options).forEach(function(f){var w=c.$options[f];"value"in w&&c.setOption(f,w.value)})},s.prototype.setDefaultValue=function(c,f,w){if(!c){for(c in this.$defaultOptions)if(this.$defaultOptions[c][f])break;if(!this.$defaultOptions[c][f])return!1}var x=this.$defaultOptions[c]||(this.$defaultOptions[c]={});x[f]&&(x.forwardTo?this.setDefaultValue(x.forwardTo,f,w):x[f].value=w)},s.prototype.setDefaultValues=function(c,f){Object.keys(f).forEach(function(w){this.setDefaultValue(c,w,f[w])},this)},s.prototype.setMessages=function(c,f){a=c,f&&f.placeholders&&(u=f.placeholders)},s.prototype.nls=function(c,f,w){a[c]||(o("No message found for the key '"+c+"' in messages with id "+a.$id+", trying to find a translation for the default string '"+f+"'."),a[f]||o("No message found for the default string '"+f+"' in the provided messages. Falling back to the default English message."));var x=a[c]||a[f]||f;return w&&(u==="dollarSigns"&&(x=x.replace(/\$(\$|[\d]+)/g,function(E,M){return M=="$"?"$":w[M]})),u==="curlyBrackets"&&(x=x.replace(/\{([^\}]+)\}/g,function(E,M){return w[M]}))),x},s})();l.prototype.warn=o,l.prototype.reportError=b,p.implement(l.prototype,m),i.AppConfig=l}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(n,i,h){h.exports=`.ace-tm .ace_gutter {
9
+ background: #f0f0f0;
10
+ color: #333;
11
+ }
12
+
13
+ .ace-tm .ace_print-margin {
14
+ width: 1px;
15
+ background: #e8e8e8;
16
+ }
17
+
18
+ .ace-tm .ace_fold {
19
+ background-color: #6B72E6;
20
+ }
21
+
22
+ .ace-tm {
23
+ background-color: #FFFFFF;
24
+ color: black;
25
+ }
26
+
27
+ .ace-tm .ace_cursor {
28
+ color: black;
29
+ }
30
+
31
+ .ace-tm .ace_invisible {
32
+ color: rgb(191, 191, 191);
33
+ }
34
+
35
+ .ace-tm .ace_storage,
36
+ .ace-tm .ace_keyword {
37
+ color: blue;
38
+ }
39
+
40
+ .ace-tm .ace_constant {
41
+ color: rgb(197, 6, 11);
42
+ }
43
+
44
+ .ace-tm .ace_constant.ace_buildin {
45
+ color: rgb(88, 72, 246);
46
+ }
47
+
48
+ .ace-tm .ace_constant.ace_language {
49
+ color: rgb(88, 92, 246);
50
+ }
51
+
52
+ .ace-tm .ace_constant.ace_library {
53
+ color: rgb(6, 150, 14);
54
+ }
55
+
56
+ .ace-tm .ace_invalid {
57
+ background-color: rgba(255, 0, 0, 0.1);
58
+ color: red;
59
+ }
60
+
61
+ .ace-tm .ace_support.ace_function {
62
+ color: rgb(60, 76, 114);
63
+ }
64
+
65
+ .ace-tm .ace_support.ace_constant {
66
+ color: rgb(6, 150, 14);
67
+ }
68
+
69
+ .ace-tm .ace_support.ace_type,
70
+ .ace-tm .ace_support.ace_class {
71
+ color: rgb(109, 121, 222);
72
+ }
73
+
74
+ .ace-tm .ace_keyword.ace_operator {
75
+ color: rgb(104, 118, 135);
76
+ }
77
+
78
+ .ace-tm .ace_string {
79
+ color: rgb(3, 106, 7);
80
+ }
81
+
82
+ .ace-tm .ace_comment {
83
+ color: rgb(76, 136, 107);
84
+ }
85
+
86
+ .ace-tm .ace_comment.ace_doc {
87
+ color: rgb(0, 102, 255);
88
+ }
89
+
90
+ .ace-tm .ace_comment.ace_doc.ace_tag {
91
+ color: rgb(128, 159, 191);
92
+ }
93
+
94
+ .ace-tm .ace_constant.ace_numeric {
95
+ color: rgb(0, 0, 205);
96
+ }
97
+
98
+ .ace-tm .ace_variable {
99
+ color: rgb(49, 132, 149);
100
+ }
101
+
102
+ .ace-tm .ace_xml-pe {
103
+ color: rgb(104, 104, 91);
104
+ }
105
+
106
+ .ace-tm .ace_entity.ace_name.ace_function {
107
+ color: #0000A2;
108
+ }
109
+
110
+
111
+ .ace-tm .ace_heading {
112
+ color: rgb(12, 7, 255);
113
+ }
114
+
115
+ .ace-tm .ace_list {
116
+ color:rgb(185, 6, 144);
117
+ }
118
+
119
+ .ace-tm .ace_meta.ace_tag {
120
+ color:rgb(0, 22, 142);
121
+ }
122
+
123
+ .ace-tm .ace_string.ace_regex {
124
+ color: rgb(255, 0, 0)
125
+ }
126
+
127
+ .ace-tm .ace_marker-layer .ace_selection {
128
+ background: rgb(181, 213, 255);
129
+ }
130
+ .ace-tm.ace_multiselect .ace_selection.ace_start {
131
+ box-shadow: 0 0 3px 0px white;
132
+ }
133
+ .ace-tm .ace_marker-layer .ace_step {
134
+ background: rgb(252, 255, 0);
135
+ }
136
+
137
+ .ace-tm .ace_marker-layer .ace_stack {
138
+ background: rgb(164, 229, 101);
139
+ }
140
+
141
+ .ace-tm .ace_marker-layer .ace_bracket {
142
+ margin: -1px 0 0 -1px;
143
+ border: 1px solid rgb(192, 192, 192);
144
+ }
145
+
146
+ .ace-tm .ace_marker-layer .ace_active-line {
147
+ background: rgba(0, 0, 0, 0.07);
148
+ }
149
+
150
+ .ace-tm .ace_gutter-active-line {
151
+ background-color : #dcdcdc;
152
+ }
153
+
154
+ .ace-tm .ace_marker-layer .ace_selected-word {
155
+ background: rgb(250, 250, 255);
156
+ border: 1px solid rgb(200, 200, 250);
157
+ }
158
+
159
+ .ace-tm .ace_indent-guide {
160
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
161
+ }
162
+
163
+ .ace-tm .ace_indent-guide-active {
164
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
165
+ }
166
+ `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(n,i,h){i.isDark=!1,i.cssClass="ace-tm",i.cssText=n("./textmate-css"),i.$id="ace/theme/textmate";var p=n("../lib/dom");p.importCssString(i.cssText,i.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(n,i,h){"no use strict";var p=n("./lib/lang"),m=n("./lib/net"),b=n("./lib/dom"),d=n("./lib/app_config").AppConfig;h.exports=i=new d;var g={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};i.get=function(l){if(!g.hasOwnProperty(l))throw new Error("Unknown config key: "+l);return g[l]},i.set=function(l,s){if(g.hasOwnProperty(l))g[l]=s;else if(this.setDefaultValue("",l,s)==!1)throw new Error("Unknown config key: "+l);l=="useStrictCSP"&&b.useStrictCSP(s)},i.all=function(){return p.copyObject(g)},i.$modes={},i.moduleUrl=function(l,s){if(g.$moduleUrls[l])return g.$moduleUrls[l];var c=l.split("/");s=s||c[c.length-2]||"";var f=s=="snippets"?"/":"-",w=c[c.length-1];if(s=="worker"&&f=="-"){var x=new RegExp("^"+s+"[\\-_]|[\\-_]"+s+"$","g");w=w.replace(x,"")}(!w||w==s)&&c.length>1&&(w=c[c.length-2]);var E=g[s+"Path"];return E==null?E=g.basePath:f=="/"&&(s=f=""),E&&E.slice(-1)!="/"&&(E+="/"),E+s+f+w+this.get("suffix")},i.setModuleUrl=function(l,s){return g.$moduleUrls[l]=s};var o=function(l,s){if(l==="ace/theme/textmate"||l==="./theme/textmate")return s(null,n("./theme/textmate"));if(a)return a(l,s);console.error("loader is not configured")},a;i.setLoader=function(l){a=l},i.dynamicModules=Object.create(null),i.$loading={},i.$loaded={},i.loadModule=function(l,s){var c;if(Array.isArray(l))var f=l[0],w=l[1];else if(typeof l=="string")var w=l;var x=function(E){if(E&&!i.$loading[w])return s&&s(E);if(i.$loading[w]||(i.$loading[w]=[]),i.$loading[w].push(s),!(i.$loading[w].length>1)){var M=function(){o(w,function(k,C){C&&(i.$loaded[w]=C),i._emit("load.module",{name:w,module:C});var O=i.$loading[w];i.$loading[w]=null,O.forEach(function(L){L&&L(C)})})};if(!i.get("packaged"))return M();m.loadScript(i.moduleUrl(w,f),M),u()}};if(i.dynamicModules[w])i.dynamicModules[w]().then(function(E){E.default?x(E.default):x(E)});else{try{c=this.$require(w)}catch{}x(c||i.$loaded[w])}},i.$require=function(l){if(typeof h.require=="function"){var s="require";return h[s](l)}},i.setModuleLoader=function(l,s){i.dynamicModules[l]=s};var u=function(){!g.basePath&&!g.workerPath&&!g.modePath&&!g.themePath&&!Object.keys(g.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),u=function(){})};i.version="1.43.3"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(n,i,h){n("./lib/fixoldbrowsers");var p=n("./config");p.setLoader(function(g,o){n([g],function(a){o(null,a)})});var m=(function(){return this||typeof window<"u"&&window})();h.exports=function(g){p.init=b,p.$require=n,g.require=n},b(!0);function b(g){if(!(!m||!m.document)){p.set("packaged",g||n.packaged||h.packaged||m.define&&(void 0).packaged);var o={},a="",u=document.currentScript||document._currentScript,l=u&&u.ownerDocument||document;u&&u.src&&(a=u.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var s=l.getElementsByTagName("script"),c=0;c<s.length;c++){var f=s[c],w=f.src||f.getAttribute("src");if(w){for(var x=f.attributes,E=0,M=x.length;E<M;E++){var k=x[E];k.name.indexOf("data-ace-")===0&&(o[d(k.name.replace(/^data-ace-/,""))]=k.value)}var C=w.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);C&&(a=C[1])}}a&&(o.base=o.base||a,o.packaged=!0),o.basePath=o.base,o.workerPath=o.workerPath||o.base,o.modePath=o.modePath||o.base,o.themePath=o.themePath||o.base,delete o.base;for(var O in o)typeof o[O]<"u"&&p.set(O,o[O])}}function d(g){return g.replace(/-(.)/g,function(o,a){return a.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(n,i,h){var p=(function(){function m(b,d,g,o){this.start={row:b,column:d},this.end={row:g,column:o}}return m.prototype.isEqual=function(b){return this.start.row===b.start.row&&this.end.row===b.end.row&&this.start.column===b.start.column&&this.end.column===b.end.column},m.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},m.prototype.contains=function(b,d){return this.compare(b,d)==0},m.prototype.compareRange=function(b){var d,g=b.end,o=b.start;return d=this.compare(g.row,g.column),d==1?(d=this.compare(o.row,o.column),d==1?2:d==0?1:0):d==-1?-2:(d=this.compare(o.row,o.column),d==-1?-1:d==1?42:0)},m.prototype.comparePoint=function(b){return this.compare(b.row,b.column)},m.prototype.containsRange=function(b){return this.comparePoint(b.start)==0&&this.comparePoint(b.end)==0},m.prototype.intersects=function(b){var d=this.compareRange(b);return d==-1||d==0||d==1},m.prototype.isEnd=function(b,d){return this.end.row==b&&this.end.column==d},m.prototype.isStart=function(b,d){return this.start.row==b&&this.start.column==d},m.prototype.setStart=function(b,d){typeof b=="object"?(this.start.column=b.column,this.start.row=b.row):(this.start.row=b,this.start.column=d)},m.prototype.setEnd=function(b,d){typeof b=="object"?(this.end.column=b.column,this.end.row=b.row):(this.end.row=b,this.end.column=d)},m.prototype.inside=function(b,d){return this.compare(b,d)==0?!(this.isEnd(b,d)||this.isStart(b,d)):!1},m.prototype.insideStart=function(b,d){return this.compare(b,d)==0?!this.isEnd(b,d):!1},m.prototype.insideEnd=function(b,d){return this.compare(b,d)==0?!this.isStart(b,d):!1},m.prototype.compare=function(b,d){return!this.isMultiLine()&&b===this.start.row?d<this.start.column?-1:d>this.end.column?1:0:b<this.start.row?-1:b>this.end.row?1:this.start.row===b?d>=this.start.column?0:-1:this.end.row===b?d<=this.end.column?0:1:0},m.prototype.compareStart=function(b,d){return this.start.row==b&&this.start.column==d?-1:this.compare(b,d)},m.prototype.compareEnd=function(b,d){return this.end.row==b&&this.end.column==d?1:this.compare(b,d)},m.prototype.compareInside=function(b,d){return this.end.row==b&&this.end.column==d?1:this.start.row==b&&this.start.column==d?-1:this.compare(b,d)},m.prototype.clipRows=function(b,d){if(this.end.row>d)var g={row:d+1,column:0};else if(this.end.row<b)var g={row:b,column:0};if(this.start.row>d)var o={row:d+1,column:0};else if(this.start.row<b)var o={row:b,column:0};return m.fromPoints(o||this.start,g||this.end)},m.prototype.extend=function(b,d){var g=this.compare(b,d);if(g==0)return this;if(g==-1)var o={row:b,column:d};else var a={row:b,column:d};return m.fromPoints(o||this.start,a||this.end)},m.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},m.prototype.isMultiLine=function(){return this.start.row!==this.end.row},m.prototype.clone=function(){return m.fromPoints(this.start,this.end)},m.prototype.collapseRows=function(){return this.end.column==0?new m(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new m(this.start.row,0,this.end.row,0)},m.prototype.toScreenRange=function(b){var d=b.documentToScreenPosition(this.start),g=b.documentToScreenPosition(this.end);return new m(d.row,d.column,g.row,g.column)},m.prototype.moveBy=function(b,d){this.start.row+=b,this.start.column+=d,this.end.row+=b,this.end.column+=d},m})();p.fromPoints=function(m,b){return new p(m.row,m.column,b.row,b.column)},p.comparePoints=function(m,b){return m.row-b.row||m.column-b.column},i.Range=p}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(n,i,h){for(var p=n("./oop"),m={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},b={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},d=0;d<10;d++)b["Digit"+d]=48+d,b["Numpad"+d]=96+d,m.PRINTABLE_KEYS[48+d]=""+d,m.FUNCTION_KEYS[96+d]="Numpad"+d;for(var d=65;d<91;d++){var g=String.fromCharCode(d+32);b["Key"+g.toUpperCase()]=d,m.PRINTABLE_KEYS[d]=g}for(var d=1;d<13;d++)b["F"+d]=111+d,m.FUNCTION_KEYS[111+d]="F"+d;var o={Shift:16,Control:17,Alt:18,Meta:224};for(var a in o)b[a]=b[a+"Left"]=b[a+"Right"]=o[a];i.$codeToKeyCode=b,m.PRINTABLE_KEYS[173]="-";for(var u in m.FUNCTION_KEYS){var l=m.FUNCTION_KEYS[u].toLowerCase();m[l]=parseInt(u,10)}for(var u in m.PRINTABLE_KEYS){var l=m.PRINTABLE_KEYS[u].toLowerCase();m[l]=parseInt(u,10)}p.mixin(m,m.MODIFIER_KEYS),p.mixin(m,m.PRINTABLE_KEYS),p.mixin(m,m.FUNCTION_KEYS),m.enter=m.return,m.escape=m.esc,m.del=m.delete,(function(){for(var s=["cmd","ctrl","alt","shift"],c=Math.pow(2,s.length);c--;)m.KEY_MODS[c]=s.filter(function(f){return c&m.KEY_MODS[f]}).join("-")+"-"})(),m.KEY_MODS[0]="",m.KEY_MODS[-1]="input-",p.mixin(i,m),i.default=i,i.keyCodeToString=function(s){var c=m[s];return typeof c!="string"&&(c=String.fromCharCode(s)),c.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,i,h){var p=n("./keys"),m=n("./useragent"),b=null,d=0,g;function o(){g=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return g={passive:!1},!0}})}catch{}}function a(){return g==null&&o(),g}function u(E,M,k){this.elem=E,this.type=M,this.callback=k}u.prototype.destroy=function(){s(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var l=i.addListener=function(E,M,k,C){E.addEventListener(M,k,a()),C&&C.$toDestroy.push(new u(E,M,k))},s=i.removeListener=function(E,M,k){E.removeEventListener(M,k,a())};i.stopEvent=function(E){return i.stopPropagation(E),i.preventDefault(E),!1},i.stopPropagation=function(E){E.stopPropagation&&E.stopPropagation()},i.preventDefault=function(E){E.preventDefault&&E.preventDefault()},i.getButton=function(E){return E.type=="dblclick"?0:E.type=="contextmenu"||m.isMac&&E.ctrlKey&&!E.altKey&&!E.shiftKey?2:E.button},i.capture=function(E,M,k){var C=E&&E.ownerDocument||document;function O(L){M&&M(L),k&&k(L),s(C,"mousemove",M),s(C,"mouseup",O),s(C,"dragstart",O)}return l(C,"mousemove",M),l(C,"mouseup",O),l(C,"dragstart",O),O},i.addMouseWheelListener=function(E,M,k){l(E,"wheel",function(C){var O=.15,L=C.deltaX||0,R=C.deltaY||0;switch(C.deltaMode){case C.DOM_DELTA_PIXEL:C.wheelX=L*O,C.wheelY=R*O;break;case C.DOM_DELTA_LINE:var I=15;C.wheelX=L*I,C.wheelY=R*I;break;case C.DOM_DELTA_PAGE:var z=150;C.wheelX=L*z,C.wheelY=R*z;break}M(C)},k)},i.addMultiMouseDownListener=function(E,M,k,C,O){var L=0,R,I,z,F={2:"dblclick",3:"tripleclick",4:"quadclick"};function N(A){if(i.getButton(A)!==0?L=0:A.detail>1?(L++,L>4&&(L=1)):L=1,m.isIE){var S=Math.abs(A.clientX-R)>5||Math.abs(A.clientY-I)>5;(!z||S)&&(L=1),z&&clearTimeout(z),z=setTimeout(function(){z=null},M[L-1]||600),L==1&&(R=A.clientX,I=A.clientY)}if(A._clicks=L,k[C]("mousedown",A),L>4)L=0;else if(L>1)return k[C](F[L],A)}Array.isArray(E)||(E=[E]),E.forEach(function(A){l(A,"mousedown",N,O)})};function c(E){return 0|(E.ctrlKey?1:0)|(E.altKey?2:0)|(E.shiftKey?4:0)|(E.metaKey?8:0)}i.getModifierString=function(E){return p.KEY_MODS[c(E)]};function f(E,M,k){var C=c(M);if(!k&&M.code&&(k=p.$codeToKeyCode[M.code]||k),!m.isMac&&b){if(M.getModifierState&&(M.getModifierState("OS")||M.getModifierState("Win"))&&(C|=8),b.altGr)if((3&C)!=3)b.altGr=0;else return;if(k===18||k===17){var O=M.location;if(k===17&&O===1)b[k]==1&&(d=M.timeStamp);else if(k===18&&C===3&&O===2){var L=M.timeStamp-d;L<50&&(b.altGr=!0)}}}if(k in p.MODIFIER_KEYS&&(k=-1),!(!C&&k===13&&M.location===3&&(E(M,C,-k),M.defaultPrevented))){if(m.isChromeOS&&C&8){if(E(M,C,k),M.defaultPrevented)return;C&=-9}return!C&&!(k in p.FUNCTION_KEYS)&&!(k in p.PRINTABLE_KEYS)?!1:E(M,C,k)}}i.addCommandKeyListener=function(E,M,k){var C=null;l(E,"keydown",function(O){b[O.keyCode]=(b[O.keyCode]||0)+1;var L=f(M,O,O.keyCode);return C=O.defaultPrevented,L},k),l(E,"keypress",function(O){C&&(O.ctrlKey||O.altKey||O.shiftKey||O.metaKey)&&(i.stopEvent(O),C=null)},k),l(E,"keyup",function(O){b[O.keyCode]=null},k),b||(w(),l(window,"focus",w))};function w(){b=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!m.isOldIE){var x=1;i.nextTick=function(E,M){M=M||window;var k="zero-timeout-message-"+x++,C=function(O){O.data==k&&(i.stopPropagation(O),s(M,"message",C),E())};l(M,"message",C),M.postMessage(k,"*")}}i.$idleBlocked=!1,i.onIdle=function(E,M){return setTimeout(function k(){i.$idleBlocked?setTimeout(k,100):E()},M)},i.$idleBlockId=null,i.blockIdle=function(E){i.$idleBlockId&&clearTimeout(i.$idleBlockId),i.$idleBlocked=!0,i.$idleBlockId=setTimeout(function(){i.$idleBlocked=!1},E||100)},i.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),i.nextFrame?i.nextFrame=i.nextFrame.bind(window):i.nextFrame=function(E){setTimeout(E,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(n,i,h){var p;h.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(n,i,h){var p=n("../lib/event"),m=n("../config").nls,b=n("../lib/useragent"),d=n("../lib/dom"),g=n("../lib/lang"),o=n("../clipboard"),a=b.isChrome<18,u=b.isIE,l=b.isChrome>63,s=400,c=n("../lib/keys"),f=c.KEY_MODS,w=b.isIOS,x=w?/\s/:/\n/,E=b.isMobile,M=(function(){function k(C,O){var L=this;this.host=O,this.text=d.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="",E||(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(R){L.ignoreFocusEvents||(O.onBlur(R),L.$isFocused=!1)},O),p.addListener(this.text,"focus",function(R){if(!L.ignoreFocusEvents){if(L.$isFocused=!0,b.isEdge)try{if(!document.hasFocus())return}catch{}O.onFocus(R),b.isEdge?setTimeout(L.resetSelection.bind(L)):L.resetSelection()}},O),this.$focusScroll=!1,O.on("beforeEndOperation",function(){var R=O.curOp,I=R&&R.command&&R.command.name;if(I!="insertstring"){var z=I&&(R.docChanged||R.selectionChanged);L.inComposition&&z&&(L.lastValue=L.text.value="",L.onCompositionEnd()),L.resetSelection()}}),O.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=w?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&O.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,p.addCommandKeyListener(this.text,function(R,I,z){if(!L.inComposition)return O.onCommandKey(R,I,z)},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(R){if(!(b.isMac&&!R.metaKey||!R.ctrlKey))switch(R.keyCode){case 67:L.onCopy(R);break;case 86:L.onPaste(R);break;case 88:L.onCut(R);break}},O),this.syncComposition=g.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(R){R.preventDefault(),L.onContextMenuClose()},O),p.addListener(O.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),O),p.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),O),w&&this.addIosSelectionHandler(C,O,this.text)}return k.prototype.addIosSelectionHandler=function(C,O,L){var R=this,I=null,z=!1;L.addEventListener("keydown",function(N){I&&clearTimeout(I),z=!0},!0),L.addEventListener("keyup",function(N){I=setTimeout(function(){z=!1},100)},!0);var F=function(N){if(document.activeElement===L&&!(z||R.inComposition||O.$mouseHandler.isMousePressed)&&!R.copied){var A=L.selectionStart,S=L.selectionEnd,D=null,j=0;if(A==0?D=c.up:A==1?D=c.home:S>R.lastSelectionEnd&&R.lastValue[S]==`
167
+ `?D=c.end:A<R.lastSelectionStart&&R.lastValue[A-1]==" "?(D=c.left,j=f.option):A<R.lastSelectionStart||A==R.lastSelectionStart&&R.lastSelectionEnd!=R.lastSelectionStart&&A==S?D=c.left:S>R.lastSelectionEnd&&R.lastValue.slice(0,S).split(`
168
+ `).length>2?D=c.down:S>R.lastSelectionEnd&&R.lastValue[S-1]==" "?(D=c.right,j=f.option):(S>R.lastSelectionEnd||S==R.lastSelectionEnd&&R.lastSelectionEnd!=R.lastSelectionStart&&A==S)&&(D=c.right),A!==S&&(j|=f.shift),D){var U=O.onCommandKey({},j,D);if(!U&&O.commands){D=c.keyCodeToString(D);var q=O.commands.findKeyCommand(j,D);q&&O.execCommand(q)}R.lastSelectionStart=A,R.lastSelectionEnd=S,R.resetSelection("")}}};document.addEventListener("selectionchange",F),O.on("destroy",function(){document.removeEventListener("selectionchange",F)})},k.prototype.onContextMenuClose=function(){var C=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){C.tempStyle&&(C.text.style.cssText=C.tempStyle,C.tempStyle=""),C.host.renderer.$isMousePressed=!1,C.host.renderer.$keepTextAreaAtCursor&&C.host.renderer.$moveTextAreaToCursor()},0)},k.prototype.$onContextMenu=function(C){this.host.textInput.onContextMenu(C),this.onContextMenuClose()},k.prototype.onKeyup=function(C){C.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},k.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},k.prototype.onCompositionStart=function(C){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){C.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var 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()))}},k.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var C=this.text.value;this.sendText(C),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},k.prototype.onCompositionEnd=function(C){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),C&&this.onInput())},k.prototype.onCut=function(C){this.doCopy(C,!0)},k.prototype.onCopy=function(C){this.doCopy(C,!1)},k.prototype.onPaste=function(C){var O=this.handleClipboardData(C);o.pasteCancelled()||(typeof O=="string"?(O&&this.host.onPaste(O,C),b.isIE&&setTimeout(this.resetSelection),p.preventDefault(C)):(this.text.value="",this.pasted=!0))},k.prototype.doCopy=function(C,O){var L=this,R=this.host.getCopyText();if(!R)return p.preventDefault(C);this.handleClipboardData(C,R)?(w&&(this.resetSelection(R),this.copied=R,setTimeout(function(){L.copied=!1},10)),O?this.host.onCut():this.host.onCopy(),p.preventDefault(C)):(this.copied=!0,this.text.value=R,this.text.select(),setTimeout(function(){L.copied=!1,L.resetSelection(),O?L.host.onCut():L.host.onCopy()}))},k.prototype.handleClipboardData=function(C,O,L){var R=C.clipboardData||window.clipboardData;if(!(!R||a)){var I=u||L?"Text":"text/plain";try{return O?R.setData(I,O)!==!1:R.getData(I)}catch(z){if(!L)return this.handleClipboardData(z,O,!0)}}},k.prototype.onInput=function(C){if(this.inComposition)return this.onCompositionUpdate();if(C&&C.inputType){if(C.inputType=="historyUndo")return this.host.execCommand("undo");if(C.inputType=="historyRedo")return this.host.execCommand("redo")}var O=this.text.value,L=this.sendText(O,!0);(O.length>s+100||x.test(L)||E&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},k.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 L=this.text.selectionStart,R=this.text.selectionEnd,I=this.lastSelectionStart,z=this.lastValue.length-this.lastSelectionEnd,F=C,N=C.length-L,A=C.length-R,S=0;I>0&&this.lastValue[S]==C[S];)S++,I--;for(F=F.slice(S),S=1;z>0&&this.lastValue.length-S>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-S]==C[C.length-S];)S++,z--;N-=S-1,A-=S-1;var D=F.length-S+1;if(D<0&&(I=-D,D=0),F=F.slice(0,D),!O&&!F&&!N&&!I&&!z&&!A)return"";this.sendingText=!0;var j=!1;return b.isAndroid&&F==". "&&(F=" ",j=!0),F&&!I&&!z&&!N&&!A||this.commandMode?this.host.onTextInput(F):this.host.onTextInput(F,{extendLeft:I,extendRight:z,restoreStart:N,restoreEnd:A}),this.sendingText=!1,this.lastValue=C,this.lastSelectionStart=L,this.lastSelectionEnd=R,this.lastRestoreEnd=A,j?`
169
+ `:F},k.prototype.onSelect=function(C){var O=this;if(!this.inComposition){var L=function(R){return R.selectionStart===0&&R.selectionEnd>=O.lastValue.length&&R.value===O.lastValue&&O.lastValue&&R.selectionEnd!==O.lastSelectionEnd};this.copied?this.copied=!1:L(this.text)?(this.host.selectAll(),this.resetSelection()):E&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},k.prototype.$resetSelectionIOS=function(C){if(!(!this.$isFocused||this.copied&&!C||this.sendingText)){C||(C="");var O=`
170
+ ab`+C+`cde fg
171
+ `;O!=this.text.value&&(this.text.value=this.lastValue=O);var L=4,R=4+(C.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=L||this.lastSelectionEnd!=R)&&this.text.setSelectionRange(L,R),this.lastSelectionStart=L,this.lastSelectionEnd=R}},k.prototype.$resetSelection=function(){var C=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var O=0,L=0,R="",I=function(q,Q){for(var te=Q,de=1;de<=q-C.rowStart&&de<2*C.numberOfExtraLines+1;de++)te+=C.host.session.getLine(q-de).length+1;return te};if(this.host.session){var z=this.host.selection,F=z.getRange(),N=z.cursor.row;N===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):N===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(N<this.rowStart-1||N>this.rowEnd+1)&&(this.rowStart=N>this.numberOfExtraLines?N-this.numberOfExtraLines:0,this.rowEnd=N>this.numberOfExtraLines?N+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var A=[],S=this.rowStart;S<=this.rowEnd;S++)A.push(this.host.session.getLine(S));if(R=A.join(`
172
+ `),O=I(F.start.row,F.start.column),L=I(F.end.row,F.end.column),F.start.row<this.rowStart){var D=this.host.session.getLine(this.rowStart-1);O=F.start.row<this.rowStart-1?0:O,L+=D.length+1,R=D+`
173
+ `+R}else if(F.end.row>this.rowEnd){var j=this.host.session.getLine(this.rowEnd+1);L=F.end.row>this.rowEnd+1?j.length:F.end.column,L+=R.length+1,R=R+`
174
+ `+j}else E&&N>0&&(R=`
175
+ `+R,L+=1,O+=1);R.length>s&&(O<s&&L<s?R=R.slice(0,s):(R=`
176
+ `,O==L?O=L=0:(O=0,L=1)));var U=R+`
177
+
178
+ `;U!=this.lastValue&&(this.text.value=this.lastValue=U,this.lastSelectionStart=this.lastSelectionEnd=U.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=L||this.lastSelectionStart!=O||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(O,L),this.lastSelectionStart=O,this.lastSelectionEnd=L}catch{}this.inComposition=!1}},k.prototype.setHost=function(C){this.host=C},k.prototype.setNumberOfExtraLines=function(C){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,C<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=C},k.prototype.setAriaLabel=function(){var C="";if(this.host.$textInputAriaLabel&&(C+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var O=this.host.session.selection.cursor.row;C+=m("text-input.aria-label","Cursor at row $0",[O+1])}this.text.setAttribute("aria-label",C)},k.prototype.setAriaOptions=function(C){C.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",C.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",C.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),C.role&&this.text.setAttribute("role",C.role),C.setLabel&&(this.text.setAttribute("aria-roledescription",m("text-input.aria-roledescription","editor")),this.setAriaLabel())},k.prototype.focus=function(){var C=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||l||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var O=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var L=this.text.getBoundingClientRect().top!=0}catch{return}var R=[];if(L)for(var I=this.text.parentElement;I&&I.nodeType==1;)R.push(I),I.setAttribute("ace_nocontext","true"),!I.parentElement&&I.getRootNode?I=I.getRootNode().host:I=I.parentElement;this.text.focus({preventScroll:!0}),L&&R.forEach(function(z){z.removeAttribute("ace_nocontext")}),setTimeout(function(){C.text.style.position="",C.text.style.top=="0px"&&(C.text.style.top=O)},0)},k.prototype.blur=function(){this.text.blur()},k.prototype.isFocused=function(){return this.$isFocused},k.prototype.setInputHandler=function(C){this.inputHandler=C},k.prototype.getInputHandler=function(){return this.inputHandler},k.prototype.getElement=function(){return this.text},k.prototype.setCommandMode=function(C){this.commandMode=C,this.text.readOnly=!1},k.prototype.setReadOnly=function(C){this.commandMode||(this.text.readOnly=C)},k.prototype.setCopyWithEmptySelection=function(C){},k.prototype.onContextMenu=function(C){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:C}),this.moveToMouse(C,!0)},k.prototype.moveToMouse=function(C,O){var L=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(O?"z-index:100000;":"")+(b.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var R=this.host.container.getBoundingClientRect(),I=d.computedStyle(this.host.container),z=R.top+(parseInt(I.borderTopWidth)||0),F=R.left+(parseInt(I.borderLeftWidth)||0),N=R.bottom-z-this.text.clientHeight-2,A=function(S){d.translate(L.text,S.clientX-F-2,Math.min(S.clientY-z-2,N))};A(C),C.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),b.isWin&&p.capture(this.host.container,A,this.onContextMenuClose.bind(this)))},k.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},k})();i.TextInput=M,i.$setUserAgentForTests=function(k,C){E=k,w=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,i,h){var p=n("../lib/useragent"),m=0,b=550,d=(function(){function a(u){u.$clickSelection=null;var l=u.editor;l.setDefaultHandler("mousedown",this.onMouseDown.bind(u)),l.setDefaultHandler("dblclick",this.onDoubleClick.bind(u)),l.setDefaultHandler("tripleclick",this.onTripleClick.bind(u)),l.setDefaultHandler("quadclick",this.onQuadClick.bind(u)),l.setDefaultHandler("mousewheel",this.onMouseWheel.bind(u));var s=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];s.forEach(function(c){u[c]=this[c]},this),u.selectByLines=this.extendSelectionBy.bind(u,"getLineRange"),u.selectByWords=this.extendSelectionBy.bind(u,"getWordRange")}return a.prototype.onMouseDown=function(u){var l=u.inSelection(),s=u.getDocumentPosition();this.mousedownEvent=u;var c=this.editor,f=u.getButton();if(f!==0){var w=c.getSelectionRange(),x=w.isEmpty();(x||f==1)&&c.selection.moveToPosition(s),f==2&&(c.textInput.onContextMenu(u.domEvent),p.isMozilla||u.preventDefault());return}if(this.mousedownEvent.time=Date.now(),l&&!c.isFocused()&&(c.focus(),this.$focusTimeout&&!this.$clickSelection&&!c.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(u);return}return this.captureMouse(u),this.startSelect(s,u.domEvent._clicks>1),u.preventDefault()},a.prototype.startSelect=function(u,l){u=u||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var s=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?s.selection.selectToPosition(u):l||s.selection.moveToPosition(u),l||this.select(),s.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var u,l=this.editor,s=l.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var c=this.$clickSelection.comparePoint(s);if(c==-1)u=this.$clickSelection.end;else if(c==1)u=this.$clickSelection.start;else{var f=o(this.$clickSelection,s);s=f.cursor,u=f.anchor}l.selection.setSelectionAnchor(u.row,u.column)}l.selection.selectToPosition(s),l.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(u){var l,s=this.editor,c=s.renderer.screenToTextCoordinates(this.x,this.y),f=s.selection[u](c.row,c.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(f.start),x=this.$clickSelection.comparePoint(f.end);if(w==-1&&x<=0)l=this.$clickSelection.end,(f.end.row!=c.row||f.end.column!=c.column)&&(c=f.start);else if(x==1&&w>=0)l=this.$clickSelection.start,(f.start.row!=c.row||f.start.column!=c.column)&&(c=f.end);else if(w==-1&&x==1)c=f.end,l=f.start;else{var E=o(this.$clickSelection,c);c=E.cursor,l=E.anchor}s.selection.setSelectionAnchor(l.row,l.column)}s.selection.selectToPosition(c),s.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var u=g(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),l=Date.now();(u>m||l-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(u){var l=u.getDocumentPosition(),s=this.editor,c=s.session,f=c.getBracketRange(l);f?(f.isEmpty()&&(f.start.column--,f.end.column++),this.setState("select")):(f=s.selection.getWordRange(l.row,l.column),this.setState("selectByWords")),this.$clickSelection=f,this.select()},a.prototype.onTripleClick=function(u){var l=u.getDocumentPosition(),s=this.editor;this.setState("selectByLines");var c=s.getSelectionRange();c.isMultiLine()&&c.contains(l.row,l.column)?(this.$clickSelection=s.selection.getLineRange(c.start.row),this.$clickSelection.end=s.selection.getLineRange(c.end.row).end):this.$clickSelection=s.selection.getLineRange(l.row),this.select()},a.prototype.onQuadClick=function(u){var l=this.editor;l.selectAll(),this.$clickSelection=l.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(u){if(!u.getAccelKey()){u.getShiftKey()&&u.wheelY&&!u.wheelX&&(u.wheelX=u.wheelY,u.wheelY=0);var l=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var s=this.$lastScroll,c=u.domEvent.timeStamp,f=c-s.t,w=f?u.wheelX/f:s.vx,x=f?u.wheelY/f:s.vy;f<b&&(w=(w+s.vx)/2,x=(x+s.vy)/2);var E=Math.abs(w/x),M=!1;if(E>=1&&l.renderer.isScrollableBy(u.wheelX*u.speed,0)&&(M=!0),E<=1&&l.renderer.isScrollableBy(0,u.wheelY*u.speed)&&(M=!0),M)s.allowed=c;else if(c-s.allowed<b){var k=Math.abs(w)<=1.5*Math.abs(s.vx)&&Math.abs(x)<=1.5*Math.abs(s.vy);k?(M=!0,s.allowed=c):s.allowed=0}if(s.t=c,s.vx=w,s.vy=x,M)return l.renderer.scrollBy(u.wheelX*u.speed,u.wheelY*u.speed),u.stop()}},a})();d.prototype.selectEnd=d.prototype.selectByLinesEnd,d.prototype.selectAllEnd=d.prototype.selectByLinesEnd,d.prototype.selectByWordsEnd=d.prototype.selectByLinesEnd,i.DefaultHandlers=d;function g(a,u,l,s){return Math.sqrt(Math.pow(l-a,2)+Math.pow(s-u,2))}function o(a,u){if(a.start.row==a.end.row)var l=2*u.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var l=u.column-4;else var l=2*u.row-a.start.row-a.end.row;return l<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(n,i,h){i.preventParentScroll=function(p){p.stopPropagation();var m=p.currentTarget,b=m.scrollHeight>m.clientHeight;b||p.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(n,i,h){var p=this&&this.__extends||(function(){var c=function(f,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,E){x.__proto__=E}||function(x,E){for(var M in E)Object.prototype.hasOwnProperty.call(E,M)&&(x[M]=E[M])},c(f,w)};return function(f,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");c(f,w);function x(){this.constructor=f}f.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}})(),m=this&&this.__values||function(c){var f=typeof Symbol=="function"&&Symbol.iterator,w=f&&c[f],x=0;if(w)return w.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&x>=c.length&&(c=void 0),{value:c&&c[x++],done:!c}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")},b=n("./lib/dom");n("./lib/event");var d=n("./range").Range,g=n("./lib/scroll").preventParentScroll,o="ace_tooltip",a=(function(){function c(f){this.isOpen=!1,this.$element=null,this.$parentNode=f}return c.prototype.$init=function(){return this.$element=b.createElement("div"),this.$element.className=o,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},c.prototype.getElement=function(){return this.$element||this.$init()},c.prototype.setText=function(f){this.getElement().textContent=f},c.prototype.setHtml=function(f){this.getElement().innerHTML=f},c.prototype.setPosition=function(f,w){var x=this.getElement(),E=x.offsetParent&&x.offsetParent.getBoundingClientRect();x.style.left=f-(E?E.left:0)+"px",x.style.top=w-(E?E.top:0)+"px"},c.prototype.setClassName=function(f){b.addCssClass(this.getElement(),f)},c.prototype.setTheme=function(f){this.$element.className=o+" "+(f.isDark?"ace_dark ":"")+(f.cssClass||"")},c.prototype.show=function(f,w,x){f!=null&&this.setText(f),w!=null&&x!=null&&this.setPosition(w,x),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},c.prototype.hide=function(f){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=o,this.isOpen=!1)},c.prototype.getHeight=function(){return this.getElement().offsetHeight},c.prototype.getWidth=function(){return this.getElement().offsetWidth},c.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},c})(),u=(function(){function c(){this.popups=[]}return c.prototype.addPopup=function(f){this.popups.push(f),this.updatePopups()},c.prototype.removePopup=function(f){var w=this.popups.indexOf(f);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},c.prototype.updatePopups=function(){var f,w,x,E;this.popups.sort(function(F,N){return N.priority-F.priority});var M=[];try{for(var k=m(this.popups),C=k.next();!C.done;C=k.next()){var O=C.value,L=!0;try{for(var R=(x=void 0,m(M)),I=R.next();!I.done;I=R.next()){var z=I.value;if(this.doPopupsOverlap(z,O)){L=!1;break}}}catch(F){x={error:F}}finally{try{I&&!I.done&&(E=R.return)&&E.call(R)}finally{if(x)throw x.error}}L?M.push(O):O.hide()}}catch(F){f={error:F}}finally{try{C&&!C.done&&(w=k.return)&&w.call(k)}finally{if(f)throw f.error}}},c.prototype.doPopupsOverlap=function(f,w){var x=f.getElement().getBoundingClientRect(),E=w.getElement().getBoundingClientRect();return x.left<E.right&&x.right>E.left&&x.top<E.bottom&&x.bottom>E.top},c})(),l=new u;i.popupManager=l,i.Tooltip=a;var s=(function(c){p(f,c);function f(w){w===void 0&&(w=document.body);var x=c.call(this,w)||this;x.timeout=void 0,x.lastT=0,x.idleTime=350,x.lastEvent=void 0,x.onMouseOut=x.onMouseOut.bind(x),x.onMouseMove=x.onMouseMove.bind(x),x.waitForHover=x.waitForHover.bind(x),x.hide=x.hide.bind(x);var E=x.getElement();return E.style.whiteSpace="pre-wrap",E.style.pointerEvents="auto",E.addEventListener("mouseout",x.onMouseOut),E.tabIndex=-1,E.addEventListener("blur",(function(){E.contains(document.activeElement)||this.hide()}).bind(x)),E.addEventListener("wheel",g),x}return f.prototype.addToEditor=function(w){w.on("mousemove",this.onMouseMove),w.on("mousedown",this.hide),w.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},f.prototype.removeFromEditor=function(w){w.off("mousemove",this.onMouseMove),w.off("mousedown",this.hide),w.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},f.prototype.onMouseMove=function(w,x){this.lastEvent=w,this.lastT=Date.now();var E=x.$mouseHandler.isMousePressed;if(this.isOpen){var M=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(M.row,M.column)||E||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||E||(this.lastEvent=w,this.timeout=setTimeout(this.waitForHover,this.idleTime))},f.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var w=Date.now()-this.lastT;if(this.idleTime-w>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-w);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},f.prototype.isOutsideOfText=function(w){var x=w.editor,E=w.getDocumentPosition(),M=x.session.getLine(E.row);if(E.column==M.length){var k=x.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),C=x.session.documentToScreenPosition(E.row,E.column);if(C.column!=k.column||C.row!=k.row)return!0}return!1},f.prototype.setDataProvider=function(w){this.$gatherData=w},f.prototype.showForRange=function(w,x,E,M){var k=10;if(!(M&&M!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var C=w.renderer;this.isOpen||(l.addPopup(this),this.$registerCloseEvents(),this.setTheme(C.theme)),this.isOpen=!0,this.addMarker(x,w.session),this.range=d.fromPoints(x.start,x.end);var O=C.textToScreenCoordinates(x.start.row,x.start.column),L=C.scroller.getBoundingClientRect();O.pageX<L.left&&(O.pageX=L.left);var R=this.getElement();R.innerHTML="",R.appendChild(E),R.style.maxHeight="",R.style.display="block";var I=R.clientHeight,z=R.clientWidth,F=window.innerHeight-O.pageY-C.lineHeight,N=!0;O.pageY-I<0&&O.pageY<F&&(N=!1),R.style.maxHeight=(N?O.pageY:F)-k+"px",R.style.top=N?"":O.pageY+C.lineHeight+"px",R.style.bottom=N?window.innerHeight-O.pageY+"px":"",R.style.left=Math.min(O.pageX,window.innerWidth-z-k)+"px"}},f.prototype.addMarker=function(w,x){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=x,this.marker=x&&x.addMarker(w,"ace_highlight-marker","text")},f.prototype.hide=function(w){!w&&document.activeElement==this.getElement()||w&&w.target&&(w.type!="keydown"||w.ctrlKey||w.metaKey)&&this.$element.contains(w.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,l.removePopup(this)))},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(w){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||w.relatedTarget.classList.contains("ace_content")||this.hide())},f})(a);i.HoverTooltip=s}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(n,i,h){var p=this&&this.__extends||(function(){var c=function(f,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,E){x.__proto__=E}||function(x,E){for(var M in E)Object.prototype.hasOwnProperty.call(E,M)&&(x[M]=E[M])},c(f,w)};return function(f,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");c(f,w);function x(){this.constructor=f}f.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}})(),m=this&&this.__values||function(c){var f=typeof Symbol=="function"&&Symbol.iterator,w=f&&c[f],x=0;if(w)return w.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&x>=c.length&&(c=void 0),{value:c&&c[x++],done:!c}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")},b=n("../lib/dom"),d=n("../lib/event"),g=n("../tooltip").Tooltip,o=n("../config").nls,a=5,u=3;i.GUTTER_TOOLTIP_LEFT_OFFSET=a,i.GUTTER_TOOLTIP_TOP_OFFSET=u;function l(c){var f=c.editor,w=f.renderer.$gutterLayer,x=new s(f,!0);c.editor.setDefaultHandler("guttermousedown",function(L){if(!(!f.isFocused()||L.getButton()!=0)){var R=w.getRegion(L);if(R!="foldWidgets"){var I=L.getDocumentPosition().row,z=f.session.selection;if(L.getShiftKey())z.selectTo(I,0);else{if(L.domEvent.detail==2)return f.selectAll(),L.preventDefault();c.$clickSelection=f.selection.getLineRange(I)}return c.setState("selectByLines"),c.captureMouse(L),L.preventDefault()}}});var E,M;function k(){var L=M.getDocumentPosition().row,R=f.session.getLength();if(L==R){var I=f.renderer.pixelToScreenCoordinates(0,M.y).row,z=M.$pos;if(I>f.session.documentToScreenRow(z.row,z.column))return C()}if(x.showTooltip(L),!!x.isOpen)if(f.on("mousewheel",C),f.on("changeSession",C),window.addEventListener("keydown",C,!0),c.$tooltipFollowsMouse)O(M);else{var F=M.getGutterRow(),N=w.$lines.get(F);if(N){var A=N.element.querySelector(".ace_gutter_annotation"),S=A.getBoundingClientRect(),D=x.getElement().style;D.left=S.right-a+"px",D.top=S.bottom-u+"px"}else O(M)}}function C(L){L&&L.type==="keydown"&&(L.ctrlKey||L.metaKey)||L&&L.type==="mouseout"&&(!L.relatedTarget||x.getElement().contains(L.relatedTarget))||(E&&(E=clearTimeout(E)),x.isOpen&&(x.hideTooltip(),f.off("mousewheel",C),f.off("changeSession",C),window.removeEventListener("keydown",C,!0)))}function O(L){x.setPosition(L.x,L.y)}c.editor.setDefaultHandler("guttermousemove",function(L){var R=L.domEvent.target||L.domEvent.srcElement;if(b.hasCssClass(R,"ace_fold-widget")||b.hasCssClass(R,"ace_custom-widget"))return C();x.isOpen&&c.$tooltipFollowsMouse&&O(L),M=L,!E&&(E=setTimeout(function(){E=null,M&&!c.isMousePressed&&k()},50))}),d.addListener(f.renderer.$gutter,"mouseout",function(L){M=null,x.isOpen&&(E=setTimeout(function(){E=null,C(L)},50))},f)}i.GutterHandler=l;var s=(function(c){p(f,c);function f(w,x){x===void 0&&(x=!1);var E=c.call(this,w.container)||this;E.id="gt"+ ++f.$uid,E.editor=w,E.visibleTooltipRow;var M=E.getElement();return M.setAttribute("role","tooltip"),M.setAttribute("id",E.id),M.style.pointerEvents="auto",x&&(E.onMouseOut=E.onMouseOut.bind(E),M.addEventListener("mouseout",E.onMouseOut)),E}return f.prototype.onMouseOut=function(w){this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||this.hideTooltip())},f.prototype.setPosition=function(w,x){var E=window.innerWidth||document.documentElement.clientWidth,M=window.innerHeight||document.documentElement.clientHeight,k=this.getWidth(),C=this.getHeight();w+=15,x+=15,w+k>E&&(w-=w+k-E),x+C>M&&(x-=20+C),g.prototype.setPosition.call(this,w,x)},Object.defineProperty(f,"annotationLabels",{get:function(){return{error:{singular:o("gutter-tooltip.aria-label.error.singular","error"),plural:o("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:o("gutter-tooltip.aria-label.security.singular","security finding"),plural:o("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:o("gutter-tooltip.aria-label.warning.singular","warning"),plural:o("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:o("gutter-tooltip.aria-label.info.singular","information message"),plural:o("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:o("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:o("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),f.prototype.showTooltip=function(w){var x,E=this.editor.renderer.$gutterLayer,M=E.$annotations[w],k;M?k={displayText:Array.from(M.displayText),type:Array.from(M.type)}:k={displayText:[],type:[]};var C=E.session.getFoldLine(w);if(C&&E.$showFoldedAnnotations){for(var O={error:[],security:[],warning:[],info:[],hint:[]},L={error:1,security:2,warning:3,info:4,hint:5},R,I=w+1;I<=C.end.row;I++)if(E.$annotations[I])for(var z=0;z<E.$annotations[I].text.length;z++){var F=E.$annotations[I].type[z];O[F].push(E.$annotations[I].text[z]),(!R||L[F]<L[R])&&(R=F)}if(["error","security","warning"].includes(R)){var N="".concat(f.annotationsToSummaryString(O)," in folded code.");k.displayText.push(N),k.type.push(R+"_fold")}}if(k.displayText.length===0)return this.hideTooltip();for(var A={error:[],security:[],warning:[],info:[],hint:[]},S=E.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",I=0;I<k.displayText.length;I++){var D=b.createElement("span"),j=b.createElement("span");(x=j.classList).add.apply(x,["ace_".concat(k.type[I]),S]),j.setAttribute("aria-label","".concat(f.annotationLabels[k.type[I].replace("_fold","")].singular)),j.setAttribute("role","img"),j.appendChild(b.createTextNode(" ")),D.appendChild(j),D.appendChild(b.createTextNode(k.displayText[I])),D.appendChild(b.createElement("br")),A[k.type[I].replace("_fold","")].push(D)}var U=this.getElement();b.removeChildren(U),A.error.forEach(function(Q){return U.appendChild(Q)}),A.security.forEach(function(Q){return U.appendChild(Q)}),A.warning.forEach(function(Q){return U.appendChild(Q)}),A.info.forEach(function(Q){return U.appendChild(Q)}),A.hint.forEach(function(Q){return U.appendChild(Q)}),U.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip"));var q=this.$findLinkedAnnotationNode(w);q&&q.setAttribute("aria-describedby",this.id),this.show(),this.visibleTooltipRow=w,this.editor._signal("showGutterTooltip",this)},f.prototype.$findLinkedAnnotationNode=function(w){var x=this.$findCellByRow(w);if(x){var E=x.element;if(E.childNodes.length>2)return E.childNodes[2]}},f.prototype.$findCellByRow=function(w){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(x){return x.row===w})},f.prototype.hideTooltip=function(){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow!=null){var w=this.$findLinkedAnnotationNode(this.visibleTooltipRow);w&&w.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this)}},f.annotationsToSummaryString=function(w){var x,E,M=[],k=["error","security","warning","info","hint"];try{for(var C=m(k),O=C.next();!O.done;O=C.next()){var L=O.value;if(w[L].length){var R=w[L].length===1?f.annotationLabels[L].singular:f.annotationLabels[L].plural;M.push("".concat(w[L].length," ").concat(R))}}}catch(I){x={error:I}}finally{try{O&&!O.done&&(E=C.return)&&E.call(C)}finally{if(x)throw x.error}}return M.join(", ")},f})(g);s.$uid=0,i.GutterTooltip=s}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,i,h){var p=n("../lib/event"),m=n("../lib/useragent"),b=(function(){function d(g,o){this.speed,this.wheelX,this.wheelY,this.domEvent=g,this.editor=o,this.x=this.clientX=g.clientX,this.y=this.clientY=g.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return d.prototype.stopPropagation=function(){p.stopPropagation(this.domEvent),this.propagationStopped=!0},d.prototype.preventDefault=function(){p.preventDefault(this.domEvent),this.defaultPrevented=!0},d.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},d.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},d.prototype.getGutterRow=function(){var g=this.getDocumentPosition().row,o=this.editor.session.documentToScreenRow(g,0),a=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return o-a},d.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var g=this.editor,o=g.getSelectionRange();if(o.isEmpty())this.$inSelection=!1;else{var a=this.getDocumentPosition();this.$inSelection=o.contains(a.row,a.column)}return this.$inSelection},d.prototype.getButton=function(){return p.getButton(this.domEvent)},d.prototype.getShiftKey=function(){return this.domEvent.shiftKey},d.prototype.getAccelKey=function(){return m.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},d})();i.MouseEvent=b}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(n,i,h){var p=n("../lib/dom"),m=n("../lib/event"),b=n("../lib/useragent"),d=200,g=200,o=5;function a(l){var s=l.editor,c=p.createElement("div");c.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",c.textContent=" ";var f=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];f.forEach(function(ne){l[ne]=this[ne]},this),s.on("mousedown",this.onMouseDown.bind(l));var w=s.container,x,E,M,k,C,O,L=0,R,I,z,F,N;this.onDragStart=function(ne){if(this.cancelDrag||!w.draggable){var ce=this;return setTimeout(function(){ce.startSelect(),ce.captureMouse(ne)},0),ne.preventDefault()}C=s.getSelectionRange();var he=ne.dataTransfer;he.effectAllowed=s.getReadOnly()?"copy":"copyMove",s.container.appendChild(c),he.setDragImage&&he.setDragImage(c,0,0),setTimeout(function(){s.container.removeChild(c)}),he.clearData(),he.setData("Text",s.session.getTextRange()),I=!0,this.setState("drag")},this.onDragEnd=function(ne){if(w.draggable=!1,I=!1,this.setState(null),!s.getReadOnly()){var ce=ne.dataTransfer.dropEffect;!R&&ce=="move"&&s.session.remove(s.getSelectionRange()),s.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(s.getReadOnly()||!te(ne.dataTransfer)))return E=ne.clientX,M=ne.clientY,x||j(),L++,ne.dataTransfer.dropEffect=R=de(ne),m.preventDefault(ne)},this.onDragOver=function(ne){if(!(s.getReadOnly()||!te(ne.dataTransfer)))return E=ne.clientX,M=ne.clientY,x||(j(),L++),q!==null&&(q=null),ne.dataTransfer.dropEffect=R=de(ne),m.preventDefault(ne)},this.onDragLeave=function(ne){if(L--,L<=0&&x)return U(),R=null,m.preventDefault(ne)},this.onDrop=function(ne){if(O){var ce=ne.dataTransfer;if(I)switch(R){case"move":C.contains(O.row,O.column)?C={start:O,end:O}:C=s.moveText(C,O);break;case"copy":C=s.moveText(C,O,!0);break}else{var he=ce.getData("Text");C={start:O,end:s.session.insert(O,he)},s.focus(),R=null}return U(),m.preventDefault(ne)}},m.addListener(w,"dragstart",this.onDragStart.bind(l),s),m.addListener(w,"dragend",this.onDragEnd.bind(l),s),m.addListener(w,"dragenter",this.onDragEnter.bind(l),s),m.addListener(w,"dragover",this.onDragOver.bind(l),s),m.addListener(w,"dragleave",this.onDragLeave.bind(l),s),m.addListener(w,"drop",this.onDrop.bind(l),s);function A(ne,ce){var he=Date.now(),ue=!ce||ne.row!=ce.row,ve=!ce||ne.column!=ce.column;if(!F||ue||ve)s.moveCursorToPosition(ne),F=he,N={x:E,y:M};else{var Me=u(N.x,N.y,E,M);Me>o?F=null:he-F>=g&&(s.renderer.scrollCursorIntoView(),F=null)}}function S(ne,ce){var he=Date.now(),ue=s.renderer.layerConfig.lineHeight,ve=s.renderer.layerConfig.characterWidth,Me=s.renderer.scroller.getBoundingClientRect(),Te={x:{left:E-Me.left,right:Me.right-E},y:{top:M-Me.top,bottom:Me.bottom-M}},Ee=Math.min(Te.x.left,Te.x.right),Je=Math.min(Te.y.top,Te.y.bottom),Xe={row:ne.row,column:ne.column};Ee/ve<=2&&(Xe.column+=Te.x.left<Te.x.right?-3:2),Je/ue<=1&&(Xe.row+=Te.y.top<Te.y.bottom?-1:1);var ft=ne.row!=Xe.row,rt=ne.column!=Xe.column,yt=!ce||ne.row!=ce.row;ft||rt&&!yt?z?he-z>=d&&s.renderer.scrollCursorIntoView(Xe):z=he:z=null}function D(){var ne=O;O=s.renderer.screenToTextCoordinates(E,M),A(O,ne),S(O,ne)}function j(){C=s.selection.toOrientedRange(),x=s.session.addMarker(C,"ace_selection",s.getSelectionStyle()),s.clearSelection(),s.isFocused()&&s.renderer.$cursorLayer.setBlinking(!1),clearInterval(k),D(),k=setInterval(D,20),L=0,m.addListener(document,"mousemove",Q)}function U(){clearInterval(k),s.session.removeMarker(x),x=null,s.selection.fromOrientedRange(C),s.isFocused()&&!I&&s.$resetCursorStyle(),C=null,O=null,L=0,z=null,F=null,m.removeListener(document,"mousemove",Q)}var q=null;function Q(){q==null&&(q=setTimeout(function(){q!=null&&x&&U()},20))}function te(ne){var ce=ne.types;return!ce||Array.prototype.some.call(ce,function(he){return he=="text/plain"||he=="Text"})}function de(ne){var ce=["copy","copymove","all","uninitialized"],he=["move","copymove","linkmove","all","uninitialized"],ue=b.isMac?ne.altKey:ne.ctrlKey,ve="uninitialized";try{ve=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var Me="none";return ue&&ce.indexOf(ve)>=0?Me="copy":he.indexOf(ve)>=0?Me="move":ce.indexOf(ve)>=0&&(Me="copy"),Me}}(function(){this.dragWait=function(){var l=Date.now()-this.mousedownEvent.time;l>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var l=this.editor.container;l.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(l){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var l=this.editor,s=l.container;s.draggable=!0,l.renderer.$cursorLayer.setBlinking(!1),l.setStyle("ace_dragging");var c=b.isWin?"default":"move";l.renderer.setCursorStyle(c),this.setState("dragReady")},this.onMouseDrag=function(l){var s=this.editor.container;if(b.isIE&&this.state=="dragReady"){var c=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>3&&s.dragDrop()}if(this.state==="dragWait"){var c=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>0&&(s.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(l){if(this.$dragEnabled){this.mousedownEvent=l;var s=this.editor,c=l.inSelection(),f=l.getButton(),w=l.domEvent.detail||1;if(w===1&&f===0&&c){if(l.editor.inMultiSelectMode&&(l.getAccelKey()||l.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=l.domEvent.target||l.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),s.getDragDelay()){if(b.isWebKit){this.cancelDrag=!0;var E=s.container;E.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(l,this.onMouseDrag.bind(this)),l.defaultPrevented=!0}}}}).call(a.prototype);function u(l,s,c,f){return Math.sqrt(Math.pow(c-l,2)+Math.pow(f-s,2))}i.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(n,i,h){var p=n("./mouse_event").MouseEvent,m=n("../lib/event"),b=n("../lib/dom");i.addTouchListeners=function(d,g){var o="scroll",a,u,l,s,c,f,w=0,x,E=0,M=0,k=0,C,O;function L(){var A=window.navigator&&window.navigator.clipboard,S=!1,D=function(){var q=g.getCopyText(),Q=g.session.getUndoManager().hasUndo();O.replaceChild(b.buildDom(S?["span",!q&&j("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],q&&j("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],q&&j("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],A&&j("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Q&&j("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],j("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],j("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),O.firstChild)},j=function(q){return g.commands.canExecute(q,g)},U=function(q){var Q=q.target.getAttribute("action");if(Q=="more"||!S)return S=!S,D();Q=="paste"?A.readText().then(function(te){g.execCommand(Q,te)}):Q&&((Q=="cut"||Q=="copy")&&(A?A.writeText(g.getCopyText()):document.execCommand("copy")),g.execCommand(Q)),O.firstChild.style.display="none",S=!1,Q!="openCommandPalette"&&g.focus()};O=b.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(q){o="menu",q.stopPropagation(),q.preventDefault(),g.textInput.focus()},ontouchend:function(q){q.stopPropagation(),q.preventDefault(),U(q)},onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],g.container)}function R(){if(!g.getOption("enableMobileMenu")){O&&I();return}O||L();var A=g.selection.cursor,S=g.renderer.textToScreenCoordinates(A.row,A.column),D=g.renderer.textToScreenCoordinates(0,0).pageX,j=g.renderer.scrollLeft,U=g.container.getBoundingClientRect();O.style.top=S.pageY-U.top-3+"px",S.pageX-U.left<U.width-70?(O.style.left="",O.style.right="10px"):(O.style.right="",O.style.left=D+j-U.left+"px"),O.style.display="",O.firstChild.style.display="none",g.on("input",I)}function I(A){O&&(O.style.display="none"),g.off("input",I)}function z(){c=null,clearTimeout(c);var A=g.selection.getRange(),S=A.contains(x.row,x.column);(A.isEmpty()||!S)&&(g.selection.moveToPosition(x),g.selection.selectWord()),o="wait",R()}function F(){c=null,clearTimeout(c),g.selection.moveToPosition(x);var A=E>=2?g.selection.getLineRange(x.row):g.session.getBracketRange(x);A&&!A.isEmpty()?g.selection.setRange(A):g.selection.selectWord(),o="wait"}m.addListener(d,"contextmenu",function(A){if(C){var S=g.textInput.getElement();S.focus()}},g),m.addListener(d,"touchstart",function(A){var S=A.touches;if(c||S.length>1){clearTimeout(c),c=null,l=-1,o="zoom";return}C=g.$mouseHandler.isMousePressed=!0;var D=g.renderer.layerConfig.lineHeight,j=g.renderer.layerConfig.lineHeight,U=A.timeStamp;s=U;var q=S[0],Q=q.clientX,te=q.clientY;Math.abs(a-Q)+Math.abs(u-te)>D&&(l=-1),a=A.clientX=Q,u=A.clientY=te,M=k=0;var de=new p(A,g);if(x=de.getDocumentPosition(),U-l<500&&S.length==1&&!w)E++,A.preventDefault(),A.button=0,F();else{E=0;var ne=g.selection.cursor,ce=g.selection.isEmpty()?ne:g.selection.anchor,he=g.renderer.$cursorLayer.getPixelPosition(ne,!0),ue=g.renderer.$cursorLayer.getPixelPosition(ce,!0),ve=g.renderer.scroller.getBoundingClientRect(),Me=g.renderer.layerConfig.offset,Te=g.renderer.scrollLeft,Ee=function(ft,rt){return ft=ft/j,rt=rt/D-.75,ft*ft+rt*rt};if(A.clientX<ve.left){o="zoom";return}var Je=Ee(A.clientX-ve.left-he.left+Te,A.clientY-ve.top-he.top+Me),Xe=Ee(A.clientX-ve.left-ue.left+Te,A.clientY-ve.top-ue.top+Me);Je<3.5&&Xe<3.5&&(o=Je>Xe?"cursor":"anchor"),Xe<3.5?o="anchor":Je<3.5?o="cursor":o="scroll",c=setTimeout(z,450)}l=U},g),m.addListener(d,"touchend",function(A){C=g.$mouseHandler.isMousePressed=!1,f&&clearInterval(f),o=="zoom"?(o="",w=0):c?(g.selection.moveToPosition(x),w=0,R()):o=="scroll"?(N(),I()):R(),clearTimeout(c),c=null},g),m.addListener(d,"touchmove",function(A){c&&(clearTimeout(c),c=null);var S=A.touches;if(!(S.length>1||o=="zoom")){var D=S[0],j=a-D.clientX,U=u-D.clientY;if(o=="wait")if(j*j+U*U>4)o="cursor";else return A.preventDefault();a=D.clientX,u=D.clientY,A.clientX=D.clientX,A.clientY=D.clientY;var q=A.timeStamp,Q=q-s;if(s=q,o=="scroll"){var te=new p(A,g);te.speed=1,te.wheelX=j,te.wheelY=U,10*Math.abs(j)<Math.abs(U)&&(j=0),10*Math.abs(U)<Math.abs(j)&&(U=0),Q!=0&&(M=j/Q,k=U/Q),g._emit("mousewheel",te),te.propagationStopped||(M=k=0)}else{var de=new p(A,g),ne=de.getDocumentPosition();o=="cursor"?g.selection.moveCursorToPosition(ne):o=="anchor"&&g.selection.setSelectionAnchor(ne.row,ne.column),g.renderer.scrollCursorIntoView(ne),A.preventDefault()}}},g);function N(){w+=60,f=setInterval(function(){w--<=0&&(clearInterval(f),f=null),Math.abs(M)<.01&&(M=0),Math.abs(k)<.01&&(k=0),w<20&&(M=.9*M),w<20&&(k=.9*k);var A=g.session.getScrollTop();g.renderer.scrollBy(10*M,10*k),A==g.session.getScrollTop()&&(w=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(n,i,h){var p=n("../lib/event"),m=n("../lib/useragent"),b=n("./default_handlers").DefaultHandlers,d=n("./default_gutter_handler").GutterHandler,g=n("./mouse_event").MouseEvent,o=n("./dragdrop_handler").DragdropHandler,a=n("./touch_handler").addTouchListeners,u=n("../config"),l=(function(){function s(c){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var f=this;this.editor=c,new b(this),new d(this),new o(this);var w=function(M){var k=!document.hasFocus||!document.hasFocus()||!c.isFocused()&&document.activeElement==(c.textInput&&c.textInput.getElement());k&&window.focus(),c.focus(),setTimeout(function(){c.isFocused()||c.focus()})},x=c.renderer.getMouseEventTarget();p.addListener(x,"click",this.onMouseEvent.bind(this,"click"),c),p.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),c),p.addMultiMouseDownListener([x,c.renderer.scrollBarV&&c.renderer.scrollBarV.inner,c.renderer.scrollBarH&&c.renderer.scrollBarH.inner,c.textInput&&c.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",c),p.addMouseWheelListener(c.container,this.onMouseWheel.bind(this,"mousewheel"),c),a(c.container,c);var E=c.renderer.$gutter;p.addListener(E,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),c),p.addListener(E,"click",this.onMouseEvent.bind(this,"gutterclick"),c),p.addListener(E,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),c),p.addListener(E,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),c),p.addListener(x,"mousedown",w,c),p.addListener(E,"mousedown",w,c),m.isIE&&c.renderer.scrollBarV&&(p.addListener(c.renderer.scrollBarV.element,"mousedown",w,c),p.addListener(c.renderer.scrollBarH.element,"mousedown",w,c)),c.on("mousemove",function(M){if(!(f.state||f.$dragDelay||!f.$dragEnabled)){var k=c.renderer.screenToTextCoordinates(M.x,M.y),C=c.session.selection.getRange(),O=c.renderer;!C.isEmpty()&&C.insideStart(k.row,k.column)?O.setCursorStyle("default"):O.setCursorStyle("")}},c)}return s.prototype.onMouseEvent=function(c,f){this.editor.session&&this.editor._emit(c,new g(f,this.editor))},s.prototype.onMouseMove=function(c,f){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(c,new g(f,this.editor))},s.prototype.onMouseWheel=function(c,f){var w=new g(f,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=f.wheelX,w.wheelY=f.wheelY,this.editor._emit(c,w)},s.prototype.setState=function(c){this.state=c},s.prototype.captureMouse=function(c,f){this.x=c.x,this.y=c.y,this.isMousePressed=!0;var w=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var E=this,M=!0,k=function(I){if(I){if(m.isWebKit&&!I.which&&E.releaseMouse)return E.releaseMouse();E.x=I.clientX,E.y=I.clientY,f&&f(I),E.mouseEvent=new g(I,E.editor),E.$mouseMoved=!0}},C=function(I){w.off("beforeEndOperation",R),M=!1,w.session&&O(),E[E.state+"End"]&&E[E.state+"End"](I),E.state="",E.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),E.$onCaptureMouseMove=E.releaseMouse=null,I&&E.onMouseEvent("mouseup",I),w.endOperation()},O=function(){E[E.state]&&E[E.state](),E.$mouseMoved=!1},L=function(){M&&(O(),p.nextFrame(L))};if(m.isOldIE&&c.domEvent.type=="dblclick")return setTimeout(function(){C(c)});var R=function(I){E.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(E[E.state+"End"]&&E[E.state+"End"](),E.state="",E.releaseMouse())};w.on("beforeEndOperation",R),w.startOperation({command:{name:"mouse"}}),E.$onCaptureMouseMove=k,E.releaseMouse=p.capture(this.editor.container,k,C),L()},s.prototype.cancelContextMenu=function(){var c=(function(f){f&&f.domEvent&&f.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",c),f&&f.domEvent&&p.stopEvent(f.domEvent))}).bind(this);setTimeout(c,10),this.editor.on("nativecontextmenu",c)},s.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},s})();l.prototype.releaseMouse=null,u.defineOptions(l.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:m.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),i.MouseHandler=l}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(n,i,h){var p=n("../lib/dom"),m=(function(){function b(d){d.on("click",function(g){var o=g.getDocumentPosition(),a=d.session,u=a.getFoldAt(o.row,o.column,1);u&&(g.getAccelKey()?a.removeFold(u):a.expandFold(u),g.stop());var l=g.domEvent&&g.domEvent.target;l&&p.hasCssClass(l,"ace_inline_button")&&p.hasCssClass(l,"ace_toggle_wrap")&&(a.setOption("wrap",!a.getUseWrapMode()),d.renderer.scrollCursorIntoView())}),d.on("gutterclick",function(g){var o=d.renderer.$gutterLayer.getRegion(g);if(o=="foldWidgets"){var a=g.getDocumentPosition().row,u=d.session;u.foldWidgets&&u.foldWidgets[a]&&d.session.onFoldWidgetClick(a,g),d.isFocused()||d.focus(),g.stop()}}),d.on("gutterdblclick",function(g){var o=d.renderer.$gutterLayer.getRegion(g);if(o=="foldWidgets"){var a=g.getDocumentPosition().row,u=d.session,l=u.getParentFoldRangeData(a,!0),s=l.range||l.firstRange;if(s){a=s.start.row;var c=u.getFoldAt(a,u.getLine(a).length,1);c?u.removeFold(c):(u.addFold("...",s),d.renderer.scrollCursorIntoView({row:s.start.row,column:0}))}g.stop()}})}return b})();i.FoldHandler=m}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(n,i,h){var p=n("../lib/keys"),m=n("../lib/event"),b=(function(){function d(g){this.$editor=g,this.$data={editor:g},this.$handlers=[],this.setDefaultHandler(g.commands)}return d.prototype.setDefaultHandler=function(g){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=g,this.addKeyboardHandler(g,0)},d.prototype.setKeyboardHandler=function(g){var o=this.$handlers;if(o[o.length-1]!=g){for(;o[o.length-1]&&o[o.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(o[o.length-1]);this.addKeyboardHandler(g,1)}},d.prototype.addKeyboardHandler=function(g,o){if(g){typeof g=="function"&&!g.handleKeyboard&&(g.handleKeyboard=g);var a=this.$handlers.indexOf(g);a!=-1&&this.$handlers.splice(a,1),o==null?this.$handlers.push(g):this.$handlers.splice(o,0,g),a==-1&&g.attach&&g.attach(this.$editor)}},d.prototype.removeKeyboardHandler=function(g){var o=this.$handlers.indexOf(g);return o==-1?!1:(this.$handlers.splice(o,1),g.detach&&g.detach(this.$editor),!0)},d.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},d.prototype.getStatusText=function(){var g=this.$data,o=g.editor;return this.$handlers.map(function(a){return a.getStatusText&&a.getStatusText(o,g)||""}).filter(Boolean).join(" ")},d.prototype.$callKeyboardHandlers=function(g,o,a,u){for(var l,s=!1,c=this.$editor.commands,f=this.$handlers.length;f--&&(l=this.$handlers[f].handleKeyboard(this.$data,g,o,a,u),!(!(!l||!l.command)&&(l.command=="null"?s=!0:s=c.exec(l.command,this.$editor,l.args,u),s&&u&&g!=-1&&l.passEvent!=!0&&l.command.passEvent!=!0&&m.stopEvent(u),s))););return!s&&g==-1&&(l={command:"insertstring"},s=c.exec("insertstring",this.$editor,o)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",l),s},d.prototype.onCommandKey=function(g,o,a){var u=p.keyCodeToString(a);return this.$callKeyboardHandlers(o,u,a,g)},d.prototype.onTextInput=function(g){return this.$callKeyboardHandlers(-1,g)},d})();i.KeyBinding=b}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(n,i,h){var p=0,m=0,b=!1,d=!1,g=!1,o=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],a=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=0,l=1,s=0,c=1,f=2,w=3,x=4,E=5,M=6,k=7,C=8,O=9,L=10,R=11,I=12,z=13,F=14,N=15,A=16,S=17,D=18,j=[D,D,D,D,D,D,D,D,D,M,E,M,C,E,D,D,D,D,D,D,D,D,D,D,D,D,D,D,E,E,E,M,C,x,x,R,R,R,x,x,x,x,x,L,O,L,O,O,f,f,f,f,f,f,f,f,f,f,O,x,x,x,x,x,x,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,x,x,x,x,x,x,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,s,x,x,x,x,D,D,D,D,D,D,E,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,O,x,R,R,R,R,x,x,x,x,s,x,x,D,x,x,R,R,f,f,x,s,x,x,x,f,s,x,x,x,x,x],U=[C,C,C,C,C,C,C,C,C,C,C,D,D,D,s,c,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,C,E,z,F,N,A,S,O,R,R,R,R,R,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,he,ue){var ve=p?a:o,Me=null,Te=null,Ee=null,Je=0,Xe=null,ft=null,rt=-1,yt=null,on=null,zn=[];if(!ue)for(yt=0,ue=[];yt<he;yt++)ue[yt]=de(ne[yt]);for(m=p,b=!1,d=!1,g=!1,on=0;on<he;on++){if(Me=Je,zn[on]=Te=te(ne,ue,zn,on),Je=ve[Me][Te],Xe=Je&240,Je&=15,ce[on]=Ee=ve[Je][5],Xe>0)if(Xe==16){for(yt=rt;yt<on;yt++)ce[yt]=1;rt=-1}else rt=-1;if(ft=ve[Je][6],ft)rt==-1&&(rt=on);else if(rt>-1){for(yt=rt;yt<on;yt++)ce[yt]=Ee;rt=-1}ue[on]==E&&(ce[on]=0),m|=Ee}if(g){for(yt=0;yt<he;yt++)if(ue[yt]==M){ce[yt]=p;for(var tn=yt-1;tn>=0&&ue[tn]==C;tn--)ce[tn]=p}}}function Q(ne,ce,he){if(!(m<ne)){if(ne==1&&p==l&&!d){he.reverse();return}for(var ue=he.length,ve=0,Me,Te,Ee,Je;ve<ue;){if(ce[ve]>=ne){for(Me=ve+1;Me<ue&&ce[Me]>=ne;)Me++;for(Te=ve,Ee=Me-1;Te<Ee;Te++,Ee--)Je=he[Te],he[Te]=he[Ee],he[Ee]=Je;ve=Me}ve++}}}function te(ne,ce,he,ue){var ve=ce[ue],Me,Te,Ee,Je;switch(ve){case s:case c:b=!1;case x:case w:return ve;case f:return b?w:f;case k:return b=!0,c;case C:return x;case O:return ue<1||ue+1>=ce.length||(Me=he[ue-1])!=f&&Me!=w||(Te=ce[ue+1])!=f&&Te!=w?x:(b&&(Te=w),Te==Me?Te:x);case L:return Me=ue>0?he[ue-1]:E,Me==f&&ue+1<ce.length&&ce[ue+1]==f?f:x;case R:if(ue>0&&he[ue-1]==f)return f;if(b)return x;for(Je=ue+1,Ee=ce.length;Je<Ee&&ce[Je]==R;)Je++;return Je<Ee&&ce[Je]==f?f:x;case I:for(Ee=ce.length,Je=ue+1;Je<Ee&&ce[Je]==I;)Je++;if(Je<Ee){var Xe=ne[ue],ft=Xe>=1425&&Xe<=2303||Xe==64286;if(Me=ce[Je],ft&&(Me==c||Me==k))return c}return ue<1||(Me=ce[ue-1])==E?x:he[ue-1];case E:return b=!1,d=!0,p;case M:return g=!0,x;case z:case F:case A:case S:case N:b=!1;case D:return x}}function de(ne){var ce=ne.charCodeAt(0),he=ce>>8;return he==0?ce>191?s:j[ce]:he==5?/[\u0591-\u05f4]/.test(ne)?c:s:he==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?I:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?w:ce==1642?R:/[\u06f0-\u06f9]/.test(ne)?f:k:he==32&&ce<=8287?U[ce&255]:he==254&&ce>=65136?k:x}i.L=s,i.R=c,i.EN=f,i.ON_R=3,i.AN=4,i.R_H=5,i.B=6,i.RLE=7,i.DOT="·",i.doBidiReorder=function(ne,ce,he){if(ne.length<2)return{};var ue=ne.split(""),ve=new Array(ue.length),Me=new Array(ue.length),Te=[];p=he?l:u,q(ue,Te,ue.length,ce);for(var Ee=0;Ee<ve.length;ve[Ee]=Ee,Ee++);Q(2,Te,ve),Q(1,Te,ve);for(var Ee=0;Ee<ve.length-1;Ee++)ce[Ee]===w?Te[Ee]=i.AN:Te[Ee]===c&&(ce[Ee]>k&&ce[Ee]<z||ce[Ee]===x||ce[Ee]===D)?Te[Ee]=i.ON_R:Ee>0&&ue[Ee-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ue[Ee])&&(Te[Ee-1]=Te[Ee]=i.R_H,Ee++);ue[ue.length-1]===i.DOT&&(Te[ue.length-1]=i.B),ue[0]==="‫"&&(Te[0]=i.RLE);for(var Ee=0;Ee<ve.length;Ee++)Me[Ee]=Te[ve[Ee]];return{logicalFromVisual:ve,bidiLevels:Me}},i.hasBidiCharacters=function(ne,ce){for(var he=!1,ue=0;ue<ne.length;ue++)ce[ue]=de(ne.charAt(ue)),!he&&(ce[ue]==c||ce[ue]==k||ce[ue]==w)&&(he=!0);return he},i.getVisualFromLogicalIdx=function(ne,ce){for(var he=0;he<ce.logicalFromVisual.length;he++)if(ce.logicalFromVisual[he]==ne)return he;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(n,i,h){var p=n("./lib/bidiutil"),m=n("./lib/lang"),b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,d=(function(){function g(o){this.session=o,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=b.test(o.getValue())}return g.prototype.isBidiRow=function(o,a,u){return this.seenBidi?(o!==this.currentRow&&(this.currentRow=o,this.updateRowLine(a,u),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},g.prototype.onChange=function(o){this.seenBidi?this.currentRow=null:o.action=="insert"&&b.test(o.lines.join(`
179
+ `))&&(this.seenBidi=!0,this.currentRow=null)},g.prototype.getDocumentRow=function(){var o=0,a=this.session.$screenRowCache;if(a.length){var u=this.session.$getRowCacheIndex(a,this.currentRow);u>=0&&(o=this.session.$docRowCache[u])}return o},g.prototype.getSplitIndex=function(){var o=0,a=this.session.$screenRowCache;if(a.length)for(var u,l=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-o>0&&(u=this.session.$getRowCacheIndex(a,this.currentRow-o-1),u===l);)l=u,o++;else o=this.currentRow;return o},g.prototype.updateRowLine=function(o,a){o===void 0&&(o=this.getDocumentRow());var u=o===this.session.getLength()-1,l=u?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(o),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var s=this.session.$wrapData[o];s&&(a===void 0&&(a=this.getSplitIndex()),a>0&&s.length?(this.wrapIndent=s.indent,this.wrapOffset=this.wrapIndent*this.charWidths[p.L],this.line=a<s.length?this.line.substring(s[a-1],s[a]):this.line.substring(s[s.length-1])):this.line=this.line.substring(0,s[a]),a==s.length&&(this.line+=this.showInvisibles?l:p.DOT))}else this.line+=this.showInvisibles?l:p.DOT;var c=this.session,f=0,w;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(x,E){return x===" "||c.isFullWidth(x.charCodeAt(0))?(w=x===" "?c.getScreenTabSize(E+f):2,f+=w-1,m.stringRepeat(p.DOT,w)):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)},g.prototype.updateBidiMap=function(){var o=[];p.hasBidiCharacters(this.line,o)||this.isRtlDir?this.bidiMap=p.doBidiReorder(this.line,o,this.isRtlDir):this.bidiMap={}},g.prototype.markAsDirty=function(){this.currentRow=null},g.prototype.updateCharacterWidths=function(o){if(this.characterWidth!==o.$characterSize.width){this.fontMetrics=o;var a=this.characterWidth=o.$characterSize.width,u=o.$measureCharWidth("ה");this.charWidths[p.L]=this.charWidths[p.EN]=this.charWidths[p.ON_R]=a,this.charWidths[p.R]=this.charWidths[p.AN]=u,this.charWidths[p.R_H]=u*.45,this.charWidths[p.B]=this.charWidths[p.RLE]=0,this.currentRow=null}},g.prototype.setShowInvisibles=function(o){this.showInvisibles=o,this.currentRow=null},g.prototype.setEolChar=function(o){this.EOL=o},g.prototype.setContentWidth=function(o){this.contentWidth=o},g.prototype.isRtlLine=function(o){return this.$isRtl?!0:o!=null?this.session.getLine(o).charAt(0)==this.RLE:this.isRtlDir},g.prototype.setRtlDirection=function(o,a){for(var u=o.getCursorPosition(),l=o.selection.getSelectionAnchor().row;l<=u.row;l++)!a&&o.session.getLine(l).charAt(0)===o.session.$bidiHandler.RLE?o.session.doc.removeInLine(l,0,1):a&&o.session.getLine(l).charAt(0)!==o.session.$bidiHandler.RLE&&o.session.doc.insert({column:0,row:l},o.session.$bidiHandler.RLE)},g.prototype.getPosLeft=function(o){o-=this.wrapIndent;var a=this.line.charAt(0)===this.RLE?1:0,u=o>a?this.session.getOverwrite()?o:o-1:a,l=p.getVisualFromLogicalIdx(u,this.bidiMap),s=this.bidiMap.bidiLevels,c=0;!this.session.getOverwrite()&&o<=a&&s[l]%2!==0&&l++;for(var f=0;f<l;f++)c+=this.charWidths[s[f]];return!this.session.getOverwrite()&&o>a&&s[l]%2===0&&(c+=this.charWidths[s[l]]),this.wrapIndent&&(c+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(c+=this.rtlLineOffset),c},g.prototype.getSelections=function(o,a){var u=this.bidiMap,l=u.bidiLevels,s,c=[],f=0,w=Math.min(o,a)-this.wrapIndent,x=Math.max(o,a)-this.wrapIndent,E=!1,M=!1,k=0;this.wrapIndent&&(f+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,O=0;O<l.length;O++)C=u.logicalFromVisual[O],s=l[O],E=C>=w&&C<x,E&&!M?k=f:!E&&M&&c.push({left:k,width:f-k}),f+=this.charWidths[s],M=E;if(E&&O===l.length&&c.push({left:k,width:f-k}),this.isRtlDir)for(var L=0;L<c.length;L++)c[L].left+=this.rtlLineOffset;return c},g.prototype.offsetToCol=function(u){this.isRtlDir&&(u-=this.rtlLineOffset);var a=0,u=Math.max(u,0),l=0,s=0,c=this.bidiMap.bidiLevels,f=this.charWidths[c[s]];for(this.wrapIndent&&(u-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);u>l+f/2;){if(l+=f,s===c.length-1){f=0;break}f=this.charWidths[c[++s]]}return s>0&&c[s-1]%2!==0&&c[s]%2===0?(u<l&&s--,a=this.bidiMap.logicalFromVisual[s]):s>0&&c[s-1]%2===0&&c[s]%2!==0?a=1+(u>l?this.bidiMap.logicalFromVisual[s]:this.bidiMap.logicalFromVisual[s-1]):this.isRtlDir&&s===c.length-1&&f===0&&c[s-1]%2===0||!this.isRtlDir&&s===0&&c[s]%2!==0?a=1+this.bidiMap.logicalFromVisual[s]:(s>0&&c[s-1]%2!==0&&f!==0&&s--,a=this.bidiMap.logicalFromVisual[s]),a===0&&this.isRtlDir&&a++,a+this.wrapIndent},g})();i.BidiHandler=d}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(n,i,h){var p=n("./lib/oop"),m=n("./lib/lang"),b=n("./lib/event_emitter").EventEmitter,d=n("./range").Range,g=(function(){function o(a){this.session=a,this.doc=a.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var u=this;this.cursor.on("change",function(l){u.$cursorChanged=!0,u.$silent||u._emit("changeCursor"),!u.$isEmpty&&!u.$silent&&u._emit("changeSelection"),!u.$keepDesiredColumnOnChange&&l.old.column!=l.value.column&&(u.$desiredColumn=null)}),this.anchor.on("change",function(){u.$anchorChanged=!0,!u.$isEmpty&&!u.$silent&&u._emit("changeSelection")})}return o.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},o.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},o.prototype.getCursor=function(){return this.lead.getPosition()},o.prototype.setAnchor=function(a,u){this.$isEmpty=!1,this.anchor.setPosition(a,u)},o.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},o.prototype.getSelectionLead=function(){return this.lead.getPosition()},o.prototype.isBackwards=function(){var a=this.anchor,u=this.lead;return a.row>u.row||a.row==u.row&&a.column>u.column},o.prototype.getRange=function(){var a=this.anchor,u=this.lead;return this.$isEmpty?d.fromPoints(u,u):this.isBackwards()?d.fromPoints(u,a):d.fromPoints(a,u)},o.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},o.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},o.prototype.setRange=function(a,u){var l=u?a.end:a.start,s=u?a.start:a.end;this.$setSelection(l.row,l.column,s.row,s.column)},o.prototype.$setSelection=function(a,u,l,s){if(!this.$silent){var c=this.$isEmpty,f=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,u),this.cursor.setPosition(l,s),this.$isEmpty=!d.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||c!=this.$isEmpty||f)&&this._emit("changeSelection")}},o.prototype.$moveSelection=function(a){var u=this.lead;this.$isEmpty&&this.setSelectionAnchor(u.row,u.column),a.call(this)},o.prototype.selectTo=function(a,u){this.$moveSelection(function(){this.moveCursorTo(a,u)})},o.prototype.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},o.prototype.moveTo=function(a,u){this.clearSelection(),this.moveCursorTo(a,u)},o.prototype.moveToPosition=function(a){this.clearSelection(),this.moveCursorToPosition(a)},o.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},o.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},o.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},o.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},o.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},o.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},o.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},o.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},o.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},o.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},o.prototype.getWordRange=function(a,u){if(typeof u>"u"){var l=a||this.lead;a=l.row,u=l.column}return this.session.getWordRange(a,u)},o.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},o.prototype.selectAWord=function(){var a=this.getCursor(),u=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(u)},o.prototype.getLineRange=function(a,u){var l=typeof a=="number"?a:this.lead.row,s,c=this.session.getFoldLine(l);return c?(l=c.start.row,s=c.end.row):s=l,u===!0?new d(l,0,s,this.session.getLine(s).length):new d(l,0,s+1,0)},o.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},o.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},o.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},o.prototype.wouldMoveIntoSoftTab=function(a,u,l){var s=a.column,c=a.column+u;return l<0&&(s=a.column-u,c=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(s,c).split(" ").length-1==u},o.prototype.moveCursorLeft=function(){var a=this.lead.getPosition(),u;if(u=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(u.start.row,u.start.column);else if(a.column===0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var l=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,l,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-l):this.moveCursorBy(0,-1)}},o.prototype.moveCursorRight=function(){var a=this.lead.getPosition(),u;if(u=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(u.end.row,u.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var l=this.session.getTabSize(),a=this.lead;this.wouldMoveIntoSoftTab(a,l,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,l):this.moveCursorBy(0,1)}},o.prototype.moveCursorLineStart=function(){var a=this.lead.row,u=this.lead.column,l=this.session.documentToScreenRow(a,u),s=this.session.screenToDocumentPosition(l,0),c=this.session.getDisplayLine(a,null,s.row,s.column),f=c.match(/^\s*/);f[0].length!=u&&!this.session.$useEmacsStyleLineStart&&(s.column+=f[0].length),this.moveCursorToPosition(s)},o.prototype.moveCursorLineEnd=function(){var a=this.lead,u=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==u.column){var l=this.session.getLine(u.row);if(u.column==l.length){var s=l.search(/\s+$/);s>0&&(u.column=s)}}this.moveCursorTo(u.row,u.column)},o.prototype.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,u=this.doc.getLine(a).length;this.moveCursorTo(a,u)},o.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},o.prototype.moveCursorLongWordRight=function(){var a=this.lead.row,u=this.lead.column,l=this.doc.getLine(a),s=l.substring(u);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var c=this.session.getFoldAt(a,u,1);if(c){this.moveCursorTo(c.end.row,c.end.column);return}if(this.session.nonTokenRe.exec(s)&&(u+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,s=l.substring(u)),u>=l.length){this.moveCursorTo(a,l.length),this.moveCursorRight(),a<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(s)&&(u+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,u)},o.prototype.moveCursorLongWordLeft=function(){var a=this.lead.row,u=this.lead.column,l;if(l=this.session.getFoldAt(a,u,-1)){this.moveCursorTo(l.start.row,l.start.column);return}var s=this.session.getFoldStringAt(a,u,-1);s==null&&(s=this.doc.getLine(a).substring(0,u));var c=m.stringReverse(s);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(c)&&(u-=this.session.nonTokenRe.lastIndex,c=c.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),u<=0){this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(c)&&(u-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,u)},o.prototype.$shortWordEndIndex=function(a){var u=0,l,s=/\s/,c=this.session.tokenRe;if(c.lastIndex=0,this.session.tokenRe.exec(a))u=this.session.tokenRe.lastIndex;else{for(;(l=a[u])&&s.test(l);)u++;if(u<1){for(c.lastIndex=0;(l=a[u])&&!c.test(l);)if(c.lastIndex=0,u++,s.test(l))if(u>2){u--;break}else{for(;(l=a[u])&&s.test(l);)u++;if(u>2)break}}}return c.lastIndex=0,u},o.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,u=this.lead.column,l=this.doc.getLine(a),s=l.substring(u),c=this.session.getFoldAt(a,u,1);if(c)return this.moveCursorTo(c.end.row,c.end.column);if(u==l.length){var f=this.doc.getLength();do a++,s=this.doc.getLine(a);while(a<f&&/^\s*$/.test(s));/^\s+/.test(s)||(s=""),u=0}var w=this.$shortWordEndIndex(s);this.moveCursorTo(a,u+w)},o.prototype.moveCursorShortWordLeft=function(){var a=this.lead.row,u=this.lead.column,l;if(l=this.session.getFoldAt(a,u,-1))return this.moveCursorTo(l.start.row,l.start.column);var s=this.session.getLine(a).substring(0,u);if(u===0){do a--,s=this.doc.getLine(a);while(a>0&&/^\s*$/.test(s));u=s.length,/\s+$/.test(s)||(s="")}var c=m.stringReverse(s),f=this.$shortWordEndIndex(c);return this.moveCursorTo(a,u-f)},o.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},o.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},o.prototype.moveCursorBy=function(a,u){var l=this.session.documentToScreenPosition(this.lead.row,this.lead.column),s;if(u===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(l.row,this.lead.row)?(s=this.session.$bidiHandler.getPosLeft(l.column),l.column=Math.round(s/this.session.$bidiHandler.charWidths[0])):s=l.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?l.column=this.$desiredColumn:this.$desiredColumn=l.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var c=this.session.lineWidgets[this.lead.row];a<0?a-=c.rowsAbove||0:a>0&&(a+=c.rowCount-(c.rowsAbove||0))}var f=this.session.screenToDocumentPosition(l.row+a,l.column,s);a!==0&&u===0&&f.row===this.lead.row&&(f.column,this.lead.column),this.moveCursorTo(f.row,f.column+u,u===0)},o.prototype.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},o.prototype.moveCursorTo=function(a,u,l){var s=this.session.getFoldAt(a,u,1);s&&(a=s.start.row,u=s.start.column),this.$keepDesiredColumnOnChange=!0;var c=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(c.charAt(u))&&c.charAt(u-1)&&(this.lead.row==a&&this.lead.column==u+1?u=u-1:u=u+1),this.lead.setPosition(a,u),this.$keepDesiredColumnOnChange=!1,l||(this.$desiredColumn=null)},o.prototype.moveCursorToScreen=function(a,u,l){var s=this.session.screenToDocumentPosition(a,u);this.moveCursorTo(s.row,s.column,l)},o.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},o.prototype.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},o.prototype.toOrientedRange=function(a){var u=this.getRange();return a?(a.start.column=u.start.column,a.start.row=u.start.row,a.end.column=u.end.column,a.end.row=u.end.row):a=u,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},o.prototype.getRangeOfMovements=function(a){var u=this.getCursor();try{a(this);var l=this.getCursor();return d.fromPoints(u,l)}catch{return d.fromPoints(u,u)}finally{this.moveCursorToPosition(u)}},o.prototype.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(u){var l=u.clone();return l.isBackwards=u.cursor==u.start,l});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},o.prototype.fromJSON=function(a){if(a.start==null)if(this.rangeList&&a.length>1){this.toSingleRange(a[0]);for(var u=a.length;u--;){var l=d.fromPoints(a[u].start,a[u].end);a[u].isBackwards&&(l.cursor=l.start),this.addRange(l,!0)}return}else a=a[0];this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},o.prototype.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var u=this.ranges.length;u--;)if(!this.ranges[u].isEqual(a[u]))return!1;return!0},o})();g.prototype.setSelectionAnchor=g.prototype.setAnchor,g.prototype.getSelectionAnchor=g.prototype.getAnchor,g.prototype.setSelectionRange=g.prototype.setRange,p.implement(g.prototype,b),i.Selection=g}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(n,i,h){var p=n("./lib/report_error").reportError,m=2e3,b=(function(){function d(g){this.splitRegex,this.states=g,this.regExps={},this.matchMappings={};for(var o in this.states){for(var a=this.states[o],u=[],l=0,s=this.matchMappings[o]={defaultToken:"text"},c="g",f=[],w=0;w<a.length;w++){var x=a[w];if(x.defaultToken&&(s.defaultToken=x.defaultToken),x.caseInsensitive&&c.indexOf("i")===-1&&(c+="i"),x.unicode&&c.indexOf("u")===-1&&(c+="u"),x.regex!=null){x.regex instanceof RegExp&&(x.regex=x.regex.toString().slice(1,-1));var E=x.regex,M=new RegExp("(?:("+E+")|(.))").exec("a").length-2;Array.isArray(x.token)?x.token.length==1||M==1?x.token=x.token[0]:M-1!=x.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:x,groupCount:M-1}),x.token=x.token[0]):(x.tokenArray=x.token,x.token=null,x.onMatch=this.$arrayTokens):typeof x.token=="function"&&!x.onMatch&&(M>1?x.onMatch=this.$applyToken:x.onMatch=x.token),M>1&&(/\\\d/.test(x.regex)?E=x.regex.replace(/\\([0-9]+)/g,function(k,C){return"\\"+(parseInt(C,10)+l+1)}):(M=1,E=this.removeCapturingGroups(x.regex)),!x.splitRegex&&typeof x.token!="string"&&f.push(x)),s[l]=w,l+=M,u.push(E),x.onMatch||(x.onMatch=null)}}u.length||(s[0]=0,u.push("$")),f.forEach(function(k){k.splitRegex=this.createSplitterRegexp(k.regex,c)},this),this.regExps[o]=new RegExp("("+u.join(")|(")+")|($)",c)}}return d.prototype.$setMaxTokenCount=function(g){m=g|0},d.prototype.$applyToken=function(g){var o=this.splitRegex.exec(g).slice(1),a=this.token.apply(this,o);if(typeof a=="string")return[{type:a,value:g}];for(var u=[],l=0,s=a.length;l<s;l++)o[l]&&(u[u.length]={type:a[l],value:o[l]});return u},d.prototype.$arrayTokens=function(g){if(!g)return[];var o=this.splitRegex.exec(g);if(!o)return"text";for(var a=[],u=this.tokenArray,l=0,s=u.length;l<s;l++)o[l+1]&&(a[a.length]={type:u[l],value:o[l+1]});return a},d.prototype.removeCapturingGroups=function(g){var o=g.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(a,u){return u?"(?:":a});return o},d.prototype.createSplitterRegexp=function(g,o){if(g.indexOf("(?=")!=-1){var a=0,u=!1,l={};g.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(s,c,f,w,x,E){return u?u=x!="]":x?u=!0:w?(a==l.stack&&(l.end=E+1,l.stack=-1),a--):f&&(a++,f.length!=1&&(l.stack=a,l.start=E)),s}),l.end!=null&&/^\)*$/.test(g.substr(l.end))&&(g=g.substring(0,l.start)+g.substr(l.end))}return g.charAt(0)!="^"&&(g="^"+g),g.charAt(g.length-1)!="$"&&(g+="$"),new RegExp(g,(o||"").replace("g",""))},d.prototype.getLineTokens=function(g,o){if(o&&typeof o!="string"){var a=o.slice(0);o=a[0],o==="#tmp"&&(a.shift(),o=a.shift())}else var a=[];var u=o||"start",l=this.states[u];l||(u="start",l=this.states[u]);var s=this.matchMappings[u],c=this.regExps[u];c.lastIndex=0;for(var f,w=[],x=0,E=0,M={type:null,value:""};f=c.exec(g);){var k=s.defaultToken,C=null,O=f[0],L=c.lastIndex;if(L-O.length>x){var R=g.substring(x,L-O.length);M.type==k?M.value+=R:(M.type&&w.push(M),M={type:k,value:R})}for(var I=0;I<f.length-2;I++)if(f[I+1]!==void 0){C=l[s[I]],C.onMatch?k=C.onMatch(O,u,a,g):k=C.token,C.next&&(typeof C.next=="string"?u=C.next:u=C.next(u,a),l=this.states[u],l||(this.reportError("state doesn't exist",u),u="start",l=this.states[u]),s=this.matchMappings[u],x=L,c=this.regExps[u],c.lastIndex=L),C.consumeLineEnd&&(x=L);break}if(O){if(typeof k=="string")(!C||C.merge!==!1)&&M.type===k?M.value+=O:(M.type&&w.push(M),M={type:k,value:O});else if(k){M.type&&w.push(M),M={type:null,value:""};for(var I=0;I<k.length;I++)w.push(k[I])}}if(x==g.length)break;if(x=L,E++>m){for(E>2*g.length&&this.reportError("infinite loop with in ace tokenizer",{startState:o,line:g});x<g.length;)M.type&&w.push(M),M={value:g.substring(x,x+=500),type:"overflow"};u="start",a=[];break}}return M.type&&w.push(M),a.length>1&&a[0]!==u&&a.unshift("#tmp",u),{tokens:w,state:a.length?a:u}},d})();b.prototype.reportError=p,i.Tokenizer=b}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(n,i,h){var p=n("../lib/deep_copy").deepCopy,m;m=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(g,o){if(!o){for(var a in g)this.$rules[a]=g[a];return}for(var a in g){for(var u=g[a],l=0;l<u.length;l++){var s=u[l];(s.next||s.onMatch)&&(typeof s.next=="string"&&s.next.indexOf(o)!==0&&(s.next=o+s.next),s.nextState&&s.nextState.indexOf(o)!==0&&(s.nextState=o+s.nextState))}this.$rules[o+a]=u}},this.getRules=function(){return this.$rules},this.embedRules=function(g,o,a,u,l){var s=typeof g=="function"?new g().getRules():g;if(u)for(var c=0;c<u.length;c++)u[c]=o+u[c];else{u=[];for(var f in s)u.push(o+f)}if(this.addRules(s,o),a)for(var w=Array.prototype[l?"push":"unshift"],c=0;c<u.length;c++)w.apply(this.$rules[u[c]],p(a));this.$embeds||(this.$embeds=[]),this.$embeds.push(o)},this.getEmbeds=function(){return this.$embeds};var b=function(g,o){return(g!="start"||o.length)&&o.unshift(this.nextState,g),this.nextState},d=function(g,o){return o.shift(),o.shift()||"start"};this.normalizeRules=function(){var g=0,o=this.$rules;function a(u){var l=o[u];l.processed=!0;for(var s=0;s<l.length;s++){var c=l[s],f=null;Array.isArray(c)&&(f=c,c={}),!c.regex&&c.start&&(c.regex=c.start,c.next||(c.next=[]),c.next.push({defaultToken:c.token},{token:c.token+".end",regex:c.end||c.start,next:"pop"}),c.token=c.token+".start",c.push=!0);var w=c.next||c.push;if(w&&Array.isArray(w)){var x=c.stateName;x||(x=c.token,typeof x!="string"&&(x=x[0]||""),o[x]&&(x+=g++)),o[x]=w,c.next=x,a(x)}else w=="pop"&&(c.next=d);if(c.push&&(c.nextState=c.next||c.push,c.next=b,delete c.push),c.rules)for(var E in c.rules)o[E]?o[E].push&&o[E].push.apply(o[E],c.rules[E]):o[E]=c.rules[E];var M=typeof c=="string"?c:c.include;if(M&&(M==="$self"&&(M="start"),Array.isArray(M)?f=M.map(function(C){return o[C]}):f=o[M]),f){var k=[s,1].concat(f);c.noEscape&&(k=k.filter(function(C){return!C.next})),l.splice.apply(l,k),s--}c.keywordMap&&(c.token=this.createKeywordMapper(c.keywordMap,c.defaultToken||"text",c.caseInsensitive),delete c.defaultToken)}}Object.keys(o).forEach(a,this)},this.createKeywordMapper=function(g,o,a,u){var l=Object.create(null);return this.$keywordList=[],Object.keys(g).forEach(function(s){for(var c=g[s],f=c.split(u||"|"),w=f.length;w--;){var x=f[w];this.$keywordList.push(x),a&&(x=x.toLowerCase()),l[x]=s}},this),g=null,a?function(s){return l[s.toLowerCase()]||o}:function(s){return l[s]||o}},this.getKeywords=function(){return this.$keywords}}).call(m.prototype),i.TextHighlightRules=m}),ace.define("ace/mode/behaviour",["require","exports","module"],function(n,i,h){var p;p=function(){this.$behaviours={}},(function(){this.add=function(m,b,d){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[m]:this.$behaviours[m]={}}this.$behaviours[m][b]=d},this.addBehaviours=function(m){for(var b in m)for(var d in m[b])this.add(b,d,m[b][d])},this.remove=function(m){this.$behaviours&&this.$behaviours[m]&&delete this.$behaviours[m]},this.inherit=function(m,b){if(typeof m=="function")var d=new m().getBehaviours(b);else var d=m.getBehaviours(b);this.addBehaviours(d)},this.getBehaviours=function(m){if(m){for(var b={},d=0;d<m.length;d++)this.$behaviours[m[d]]&&(b[m[d]]=this.$behaviours[m[d]]);return b}else return this.$behaviours}}).call(p.prototype),i.Behaviour=p}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(n,i,h){var p=n("./range").Range,m=(function(){function b(d,g,o){this.$session=d,this.$row=g,this.$rowTokens=d.getTokens(g);var a=d.getTokenAt(g,o);this.$tokenIndex=a?a.index:-1}return b.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},b.prototype.stepForward=function(){this.$tokenIndex+=1;for(var d;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,d||(d=this.$session.getLength()),this.$row>=d)return this.$row=d-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},b.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},b.prototype.getCurrentTokenRow=function(){return this.$row},b.prototype.getCurrentTokenColumn=function(){var d=this.$rowTokens,g=this.$tokenIndex,o=d[g].start;if(o!==void 0)return o;for(o=0;g>0;)g-=1,o+=d[g].value.length;return o},b.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},b.prototype.getCurrentTokenRange=function(){var d=this.$rowTokens[this.$tokenIndex],g=this.getCurrentTokenColumn();return new p(this.$row,g,this.$row,g+d.value.length)},b})();i.TokenIterator=m}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,i,h){var p=n("../../lib/oop"),m=n("../behaviour").Behaviour,b=n("../../token_iterator").TokenIterator,d=n("../../lib/lang"),g=["text","paren.rparen","rparen","paren","punctuation.operator"],o=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,u={},l={'"':'"',"'":"'"},s=function(w){var x=-1;if(w.multiSelect&&(x=w.selection.index,u.rangeCount!=w.multiSelect.rangeCount&&(u={rangeCount:w.multiSelect.rangeCount})),u[x])return a=u[x];a=u[x]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},c=function(w,x,E,M){var k=w.end.row-w.start.row;return{text:E+x+M,selection:[0,w.start.column+1,k,w.end.column+(k?0:1)]}},f;f=function(w){w=w||{},this.add("braces","insertion",function(x,E,M,k,C){var O=M.getCursorPosition(),L=k.doc.getLine(O.row);if(C=="{"){s(M);var R=M.getSelectionRange(),I=k.doc.getTextRange(R),z=k.getTokenAt(O.row,O.column);if(I!==""&&I!=="{"&&M.getWrapBehavioursEnabled())return c(R,I,"{","}");if(z&&/(?:string)\.quasi|\.xml/.test(z.type)){var F=[/tag\-(?:open|name)/,/attribute\-name/];return F.some(function(q){return q.test(z.type)})||/(string)\.quasi/.test(z.type)&&z.value[O.column-z.start-1]!=="$"?void 0:(f.recordAutoInsert(M,k,"}"),{text:"{}",selection:[1,1]})}else if(f.isSaneInsertion(M,k))return/[\]\}\)]/.test(L[O.column])||M.inMultiSelectMode||w.braces?(f.recordAutoInsert(M,k,"}"),{text:"{}",selection:[1,1]}):(f.recordMaybeInsert(M,k,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){s(M);var N=L.substring(O.column,O.column+1);if(N=="}"){var A=k.$findOpeningBracket("}",{column:O.column+1,row:O.row});if(A!==null&&f.isAutoInsertedClosing(O,L,C))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
180
+ `||C==`\r
181
+ `){s(M);var S="";f.isMaybeInsertedClosing(O,L)&&(S=d.stringRepeat("}",a.maybeInsertedBrackets),f.clearMaybeInsertedClosing());var N=L.substring(O.column,O.column+1);if(N==="}"){var D=k.findMatchingBracket({row:O.row,column:O.column+1},"}");if(!D)return null;var j=this.$getIndent(k.getLine(D.row))}else if(S)var j=this.$getIndent(L);else{f.clearMaybeInsertedClosing();return}var U=j+k.getTabString();return{text:`
182
+ `+U+`
183
+ `+j+S,selection:[1,U.length,1,U.length]}}else f.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(x,E,M,k,C){var O=k.doc.getTextRange(C);if(!C.isMultiLine()&&O=="{"){s(M);var L=k.doc.getLine(C.start.row),R=L.substring(C.end.column,C.end.column+1);if(R=="}")return C.end.column++,C;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(x,E,M,k,C){if(C=="("){s(M);var O=M.getSelectionRange(),L=k.doc.getTextRange(O);if(L!==""&&M.getWrapBehavioursEnabled())return c(O,L,"(",")");if(f.isSaneInsertion(M,k))return f.recordAutoInsert(M,k,")"),{text:"()",selection:[1,1]}}else if(C==")"){s(M);var R=M.getCursorPosition(),I=k.doc.getLine(R.row),z=I.substring(R.column,R.column+1);if(z==")"){var F=k.$findOpeningBracket(")",{column:R.column+1,row:R.row});if(F!==null&&f.isAutoInsertedClosing(R,I,C))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(x,E,M,k,C){var O=k.doc.getTextRange(C);if(!C.isMultiLine()&&O=="("){s(M);var L=k.doc.getLine(C.start.row),R=L.substring(C.start.column+1,C.start.column+2);if(R==")")return C.end.column++,C}}),this.add("brackets","insertion",function(x,E,M,k,C){if(C=="["){s(M);var O=M.getSelectionRange(),L=k.doc.getTextRange(O);if(L!==""&&M.getWrapBehavioursEnabled())return c(O,L,"[","]");if(f.isSaneInsertion(M,k))return f.recordAutoInsert(M,k,"]"),{text:"[]",selection:[1,1]}}else if(C=="]"){s(M);var R=M.getCursorPosition(),I=k.doc.getLine(R.row),z=I.substring(R.column,R.column+1);if(z=="]"){var F=k.$findOpeningBracket("]",{column:R.column+1,row:R.row});if(F!==null&&f.isAutoInsertedClosing(R,I,C))return f.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(x,E,M,k,C){var O=k.doc.getTextRange(C);if(!C.isMultiLine()&&O=="["){s(M);var L=k.doc.getLine(C.start.row),R=L.substring(C.start.column+1,C.start.column+2);if(R=="]")return C.end.column++,C}}),this.add("string_dquotes","insertion",function(x,E,M,k,C){var O=k.$mode.$quotes||l;if(C.length==1&&O[C]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(C)!=-1)return;s(M);var L=C,R=M.getSelectionRange(),I=k.doc.getTextRange(R);if(I!==""&&(I.length!=1||!O[I])&&M.getWrapBehavioursEnabled())return c(R,I,L,L);if(!I){var z=M.getCursorPosition(),F=k.doc.getLine(z.row),N=F.substring(z.column-1,z.column),A=F.substring(z.column,z.column+1),S=k.getTokenAt(z.row,z.column),D=k.getTokenAt(z.row,z.column+1);if(N=="\\"&&S&&/escape/.test(S.type))return null;var j=S&&/string|escape/.test(S.type),U=!D||/string|escape/.test(D.type),q;if(A==L)q=j!==U,q&&/string\.end/.test(D.type)&&(q=!1);else{if(j&&!U||j&&U)return null;var Q=k.$mode.tokenRe;Q.lastIndex=0;var te=Q.test(N);Q.lastIndex=0;var de=Q.test(A),ne=k.$mode.$pairQuotesAfter,ce=ne&&ne[L]&&ne[L].test(N);if(!ce&&te||de||A&&!/[\s;,.})\]\\]/.test(A))return null;var he=F[z.column-2];if(N==L&&(he==L||Q.test(he)))return null;q=!0}return{text:q?L+L:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(x,E,M,k,C){var O=k.$mode.$quotes||l,L=k.doc.getTextRange(C);if(!C.isMultiLine()&&O.hasOwnProperty(L)){s(M);var R=k.doc.getLine(C.start.row),I=R.substring(C.start.column+1,C.start.column+2);if(I==L)return C.end.column++,C}}),w.closeDocComment!==!1&&this.add("doc comment end","insertion",function(x,E,M,k,C){if(x==="doc-start"&&(C===`
184
+ `||C===`\r
185
+ `)&&M.selection.isEmpty()){var O=M.getCursorPosition();if(O.column===0)return;for(var L=k.doc.getLine(O.row),R=k.doc.getLine(O.row+1),I=k.getTokens(O.row),z=0,F=0;F<I.length;F++){z+=I[F].value.length;var N=I[F];if(z>=O.column){if(z===O.column){if(!/\.doc/.test(N.type))return;if(/\*\//.test(N.value)){var A=I[F+1];if(!A||!/\.doc/.test(A.type))return}}var S=O.column-(z-N.value.length),D=N.value.indexOf("*/"),j=N.value.indexOf("/**",D>-1?D+2:0);if(j!==-1&&S>j&&S<j+3||D!==-1&&j!==-1&&S>=D&&S<=j||!/\.doc/.test(N.type))return;break}}var U=this.$getIndent(L);if(/\s*\*/.test(R))return/^\s*\*/.test(L)?{text:C+U+"* ",selection:[1,2+U.length,1,2+U.length]}:{text:C+U+" * ",selection:[1,3+U.length,1,3+U.length]};if(/\/\*\*/.test(L.substring(0,O.column)))return{text:C+U+" * "+C+" "+U+"*/",selection:[1,4+U.length,1,4+U.length]}}})},f.isSaneInsertion=function(w,x){var E=w.getCursorPosition(),M=new b(x,E.row,E.column);if(!this.$matchTokenType(M.getCurrentToken()||"text",g)){if(/[)}\]]/.test(w.session.getLine(E.row)[E.column]))return!0;var k=new b(x,E.row,E.column+1);if(!this.$matchTokenType(k.getCurrentToken()||"text",g))return!1}return M.stepForward(),M.getCurrentTokenRow()!==E.row||this.$matchTokenType(M.getCurrentToken()||"text",o)},f.$matchTokenType=function(w,x){return x.indexOf(w.type||w)>-1},f.recordAutoInsert=function(w,x,E){var M=w.getCursorPosition(),k=x.doc.getLine(M.row);this.isAutoInsertedClosing(M,k,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=M.row,a.autoInsertedLineEnd=E+k.substr(M.column),a.autoInsertedBrackets++},f.recordMaybeInsert=function(w,x,E){var M=w.getCursorPosition(),k=x.doc.getLine(M.row);this.isMaybeInsertedClosing(M,k)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=M.row,a.maybeInsertedLineStart=k.substr(0,M.column)+E,a.maybeInsertedLineEnd=k.substr(M.column),a.maybeInsertedBrackets++},f.isAutoInsertedClosing=function(w,x,E){return a.autoInsertedBrackets>0&&w.row===a.autoInsertedRow&&E===a.autoInsertedLineEnd[0]&&x.substr(w.column)===a.autoInsertedLineEnd},f.isMaybeInsertedClosing=function(w,x){return a.maybeInsertedBrackets>0&&w.row===a.maybeInsertedRow&&x.substr(w.column)===a.maybeInsertedLineEnd&&x.substr(0,w.column)==a.maybeInsertedLineStart},f.popAutoInsertedClosing=function(){a.autoInsertedLineEnd=a.autoInsertedLineEnd.substr(1),a.autoInsertedBrackets--},f.clearMaybeInsertedClosing=function(){a&&(a.maybeInsertedBrackets=0,a.maybeInsertedRow=-1)},p.inherits(f,m),i.CstyleBehaviour=f}),ace.define("ace/unicode",["require","exports","module"],function(n,i,h){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],m=0,b=[],d=0;d<p.length;d+=2)b.push(m+=p[d]),p[d+1]&&b.push(45,m+=p[d+1]);i.wordChars=String.fromCharCode.apply(null,b)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(n,i,h){var p=n("../config"),m=n("../tokenizer").Tokenizer,b=n("./text_highlight_rules").TextHighlightRules,d=n("./behaviour/cstyle").CstyleBehaviour,g=n("../unicode"),o=n("../lib/lang"),a=n("../token_iterator").TokenIterator,u=n("../range").Range,l;l=function(){this.HighlightRules=b},(function(){this.$defaultBehaviour=new d,this.tokenRe=new RegExp("^["+g.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+g.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new m(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(s,c,f,w){var x=c.doc,E=!0,M=!0,k=1/0,C=c.getTabSize(),O=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var L=this.lineCommentStart.map(o.escapeRegExp).join("|"),R=this.lineCommentStart[0];else var L=o.escapeRegExp(this.lineCommentStart),R=this.lineCommentStart;L=new RegExp("^(\\s*)(?:"+L+") ?"),O=c.getUseSoftTabs();var I=function(q,Q){var te=q.match(L);if(te){var de=te[1].length,ne=te[0].length;!A(q,de,ne)&&te[0][ne-1]==" "&&ne--,x.removeInLine(Q,de,ne)}},z=R+" ",F=function(q,Q){(!E||/\S/.test(q))&&(A(q,k,k)?x.insertInLine({row:Q,column:k},z):x.insertInLine({row:Q,column:k},R))},N=function(q,Q){return L.test(q)},A=function(q,Q,te){for(var de=0;Q--&&q.charAt(Q)==" ";)de++;if(de%C!=0)return!1;for(var de=0;q.charAt(te++)==" ";)de++;return C>2?de%C!=C-1:de%C==0}}else{if(!this.blockComment)return!1;var R=this.blockComment.start,S=this.blockComment.end,L=new RegExp("^(\\s*)(?:"+o.escapeRegExp(R)+")"),D=new RegExp("(?:"+o.escapeRegExp(S)+")\\s*$"),F=function(ce,he){N(ce,he)||(!E||/\S/.test(ce))&&(x.insertInLine({row:he,column:ce.length},S),x.insertInLine({row:he,column:k},R))},I=function(ce,he){var ue;(ue=ce.match(D))&&x.removeInLine(he,ce.length-ue[0].length,ce.length),(ue=ce.match(L))&&x.removeInLine(he,ue[1].length,ue[0].length)},N=function(ce,he){if(L.test(ce))return!0;for(var ue=c.getTokens(he),ve=0;ve<ue.length;ve++)if(ue[ve].type==="comment")return!0}}function j(q){for(var Q=f;Q<=w;Q++)q(x.getLine(Q),Q)}var U=1/0;j(function(q,Q){var te=q.search(/\S/);te!==-1?(te<k&&(k=te),M&&!N(q,Q)&&(M=!1)):U>q.length&&(U=q.length)}),k==1/0&&(k=U,E=!1,M=!1),O&&k%C!=0&&(k=Math.floor(k/C)*C),j(M?I:F)},this.toggleBlockComment=function(s,c,f,w){var x=this.blockComment;if(x){!x.start&&x[0]&&(x=x[0]);var E=new a(c,w.row,w.column),M=E.getCurrentToken();c.selection;var k=c.selection.toOrientedRange(),C,O;if(M&&/comment/.test(M.type)){for(var L,R;M&&/comment/.test(M.type);){var I=M.value.indexOf(x.start);if(I!=-1){var z=E.getCurrentTokenRow(),F=E.getCurrentTokenColumn()+I;L=new u(z,F,z,F+x.start.length);break}M=E.stepBackward()}for(var E=new a(c,w.row,w.column),M=E.getCurrentToken();M&&/comment/.test(M.type);){var I=M.value.indexOf(x.end);if(I!=-1){var z=E.getCurrentTokenRow(),F=E.getCurrentTokenColumn()+I;R=new u(z,F,z,F+x.end.length);break}M=E.stepForward()}R&&c.remove(R),L&&(c.remove(L),C=L.start.row,O=-x.start.length)}else O=x.start.length,C=f.start.row,c.insert(f.end,x.end),c.insert(f.start,x.start);k.start.row==C&&(k.start.column+=O),k.end.row==C&&(k.end.column+=O),c.selection.fromOrientedRange(k)}},this.getNextLineIndent=function(s,c,f){return this.$getIndent(c)},this.checkOutdent=function(s,c,f){return!1},this.autoOutdent=function(s,c,f){},this.$getIndent=function(s){return s.match(/^\s*/)[0]},this.createWorker=function(s){return null},this.createModeDelegates=function(s){this.$embeds=[],this.$modes={};for(var c in s)if(s[c]){var f=s[c],w=f.prototype.$id,x=p.$modes[w];x||(p.$modes[w]=x=new f),p.$modes[c]||(p.$modes[c]=x),this.$embeds.push(c),this.$modes[c]=x}for(var E=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],M=function(O){(function(L){var R=E[O],I=L[R];L[E[O]]=function(){return this.$delegator(R,arguments,I)}})(k)},k=this,c=0;c<E.length;c++)M(c)},this.$delegator=function(s,c,f){var w=c[0]||"start";if(typeof w!="string"){if(Array.isArray(w[2])){var x=w[2][w[2].length-1],E=this.$modes[x];if(E)return E[s].apply(E,[w[1]].concat([].slice.call(c,1)))}w=w[0]||"start"}for(var M=0;M<this.$embeds.length;M++)if(this.$modes[this.$embeds[M]]){var k=w.split(this.$embeds[M]);if(!k[0]&&k[1]){c[0]=k[1];var E=this.$modes[this.$embeds[M]];return E[s].apply(E,c)}}var C=f.apply(this,c);return f?C:void 0},this.transformAction=function(s,c,f,w,x){if(this.$behaviour){var E=this.$behaviour.getBehaviours();for(var M in E)if(E[M][c]){var k=E[M][c].apply(this,arguments);if(k)return k}}},this.getKeywords=function(s){if(!this.completionKeywords){var c=this.$tokenizer.rules,f=[];for(var w in c)for(var x=c[w],E=0,M=x.length;E<M;E++)if(typeof x[E].token=="string")/keyword|support|storage/.test(x[E].token)&&f.push(x[E].regex);else if(typeof x[E].token=="object"){for(var k=0,C=x[E].token.length;k<C;k++)if(/keyword|support|storage/.test(x[E].token[k])){var w=x[E].regex.match(/\(.+?\)/g)[k];f.push(w.substr(1,w.length-2))}}this.completionKeywords=f}return s?f.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(s,c,f,w){var x=this.$keywordList||this.$createKeywordList();return x.map(function(E){return{name:E,value:E,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(l.prototype),i.Mode=l}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(n,i,h){var p=n("./lib/dom"),m=(function(){function b(d){this.session=d,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return b.prototype.getRowLength=function(d){var g;return this.lineWidgets?g=this.lineWidgets[d]&&this.lineWidgets[d].rowCount||0:g=0,!this.$useWrapMode||!this.$wrapData[d]?1+g:this.$wrapData[d].length+1+g},b.prototype.$getWidgetScreenLength=function(){var d=0;return this.lineWidgets.forEach(function(g){g&&g.rowCount&&!g.hidden&&(d+=g.rowCount)}),d},b.prototype.$onChangeEditor=function(d){this.attach(d.editor)},b.prototype.attach=function(d){d&&d.widgetManager&&d.widgetManager!=this&&d.widgetManager.detach(),this.editor!=d&&(this.detach(),this.editor=d,d&&(d.widgetManager=this,d.renderer.on("beforeRender",this.measureWidgets),d.renderer.on("afterRender",this.renderWidgets)))},b.prototype.detach=function(d){var g=this.editor;if(g){this.editor=null,g.widgetManager=null,g.renderer.off("beforeRender",this.measureWidgets),g.renderer.off("afterRender",this.renderWidgets);var o=this.session.lineWidgets;o&&o.forEach(function(a){a&&a.el&&a.el.parentNode&&(a._inDocument=!1,a.el.parentNode.removeChild(a.el))})}},b.prototype.updateOnFold=function(d,g){var o=g.lineWidgets;if(!(!o||!d.action)){for(var a=d.data,u=a.start.row,l=a.end.row,s=d.action=="add",c=u+1;c<l;c++)o[c]&&(o[c].hidden=s);o[l]&&(s?o[u]?o[l].hidden=s:o[u]=o[l]:(o[u]==o[l]&&(o[u]=void 0),o[l].hidden=s))}},b.prototype.updateOnChange=function(d){var g=this.session.lineWidgets;if(g){var o=d.start.row,a=d.end.row-o;if(a!==0)if(d.action=="remove"){var u=g.splice(o+1,a);!g[o]&&u[u.length-1]&&(g[o]=u.pop()),u.forEach(function(s){s&&this.removeLineWidget(s)},this),this.$updateRows()}else{var l=new Array(a);g[o]&&g[o].column!=null&&d.start.column>g[o].column&&o++,l.unshift(o,0),g.splice.apply(g,l),this.$updateRows()}}},b.prototype.$updateRows=function(){var d=this.session.lineWidgets;if(d){var g=!0;d.forEach(function(o,a){if(o)for(g=!1,o.row=a;o.$oldWidget;)o.$oldWidget.row=a,o=o.$oldWidget}),g&&(this.session.lineWidgets=null)}},b.prototype.$registerLineWidget=function(d){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var g=this.session.lineWidgets[d.row];return g&&(d.$oldWidget=g,g.el&&g.el.parentNode&&(g.el.parentNode.removeChild(g.el),g._inDocument=!1)),this.session.lineWidgets[d.row]=d,d},b.prototype.addLineWidget=function(d){if(this.$registerLineWidget(d),d.session=this.session,!this.editor)return d;var g=this.editor.renderer;d.html&&!d.el&&(d.el=p.createElement("div"),d.el.innerHTML=d.html),d.text&&!d.el&&(d.el=p.createElement("div"),d.el.textContent=d.text),d.el&&(p.addCssClass(d.el,"ace_lineWidgetContainer"),d.className&&p.addCssClass(d.el,d.className),d.el.style.position="absolute",d.el.style.zIndex="5",g.container.appendChild(d.el),d._inDocument=!0,d.coverGutter||(d.el.style.zIndex="3"),d.pixelHeight==null&&(d.pixelHeight=d.el.offsetHeight)),d.rowCount==null&&(d.rowCount=d.pixelHeight/g.layerConfig.lineHeight);var o=this.session.getFoldAt(d.row,0);if(d.$fold=o,o){var a=this.session.lineWidgets;d.row==o.end.row&&!a[o.start.row]?a[o.start.row]=d:d.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:d.row}}}),this.$updateRows(),this.renderWidgets(null,g),this.onWidgetChanged(d),d},b.prototype.removeLineWidget=function(d){if(d._inDocument=!1,d.session=null,d.el&&d.el.parentNode&&d.el.parentNode.removeChild(d.el),d.editor&&d.editor.destroy)try{d.editor.destroy()}catch{}if(this.session.lineWidgets){var g=this.session.lineWidgets[d.row];if(g==d)this.session.lineWidgets[d.row]=d.$oldWidget,d.$oldWidget&&this.onWidgetChanged(d.$oldWidget);else for(;g;){if(g.$oldWidget==d){g.$oldWidget=d.$oldWidget;break}g=g.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:d.row}}}),this.$updateRows()},b.prototype.getWidgetsAtRow=function(d){for(var g=this.session.lineWidgets,o=g&&g[d],a=[];o;)a.push(o),o=o.$oldWidget;return a},b.prototype.onWidgetChanged=function(d){this.session._changedWidgets.push(d),this.editor&&this.editor.renderer.updateFull()},b.prototype.measureWidgets=function(d,g){var o=this.session._changedWidgets,a=g.layerConfig;if(!(!o||!o.length)){for(var u=1/0,l=0;l<o.length;l++){var s=o[l];if(!(!s||!s.el)&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,g.container.appendChild(s.el)}s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/a.characterWidth));var c=s.h/a.lineHeight;s.coverLine&&(c-=this.session.getRowLineCount(s.row),c<0&&(c=0)),s.rowCount!=c&&(s.rowCount=c,s.row<u&&(u=s.row))}}u!=1/0&&(this.session._emit("changeFold",{data:{start:{row:u}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},b.prototype.renderWidgets=function(d,g){var o=g.layerConfig,a=this.session.lineWidgets;if(a){for(var u=Math.min(this.firstRow,o.firstRow),l=Math.max(this.lastRow,o.lastRow,a.length);u>0&&!a[u];)u--;this.firstRow=o.firstRow,this.lastRow=o.lastRow,g.$cursorLayer.config=o;for(var s=u;s<=l;s++){var c=a[s];if(!(!c||!c.el)){if(c.hidden){c.el.style.top=-100-(c.pixelHeight||0)+"px";continue}c._inDocument||(c._inDocument=!0,g.container.appendChild(c.el));var f=g.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;c.coverLine||(f+=o.lineHeight*this.session.getRowLineCount(c.row)),c.el.style.top=f-o.offset+"px";var w=c.coverGutter?0:g.gutterWidth;c.fixedWidth||(w-=g.scrollLeft),c.el.style.left=w+"px",c.fullWidth&&c.screenWidth&&(c.el.style.minWidth=o.width+2*o.padding+"px"),c.fixedWidth?c.el.style.right=g.scrollBar.getWidth()+"px":c.el.style.right=""}}}},b})();i.LineWidgets=m}),ace.define("ace/apply_delta",["require","exports","module"],function(n,i,h){i.applyDelta=function(p,m,b){var d=m.start.row,g=m.start.column,o=p[d]||"";switch(m.action){case"insert":var a=m.lines;if(a.length===1)p[d]=o.substring(0,g)+m.lines[0]+o.substring(g);else{var u=[d,1].concat(m.lines);p.splice.apply(p,u),p[d]=o.substring(0,g)+p[d],p[d+m.lines.length-1]+=o.substring(g)}break;case"remove":var l=m.end.column,s=m.end.row;d===s?p[d]=o.substring(0,g)+o.substring(l):p.splice(d,s-d+1,o.substring(0,g)+p[s].substring(l));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,i,h){var p=n("./lib/oop"),m=n("./lib/event_emitter").EventEmitter,b=(function(){function o(a,u,l){this.$onChange=this.onChange.bind(this),this.attach(a),typeof u!="number"?this.setPosition(u.row,u.column):this.setPosition(u,l)}return o.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},o.prototype.getDocument=function(){return this.document},o.prototype.onChange=function(a){if(!(a.start.row==a.end.row&&a.start.row!=this.row)&&!(a.start.row>this.row)){var u=g(a,{row:this.row,column:this.column},this.$insertRight);this.setPosition(u.row,u.column,!0)}},o.prototype.setPosition=function(a,u,l){var s;if(l?s={row:a,column:u}:s=this.$clipPositionToDocument(a,u),!(this.row==s.row&&this.column==s.column)){var c={row:this.row,column:this.column};this.row=s.row,this.column=s.column,this._signal("change",{old:c,value:s})}},o.prototype.detach=function(){this.document.off("change",this.$onChange)},o.prototype.attach=function(a){this.document=a||this.document,this.document.on("change",this.$onChange)},o.prototype.$clipPositionToDocument=function(a,u){var l={};return a>=this.document.getLength()?(l.row=Math.max(0,this.document.getLength()-1),l.column=this.document.getLine(l.row).length):a<0?(l.row=0,l.column=0):(l.row=a,l.column=Math.min(this.document.getLine(l.row).length,Math.max(0,u))),u<0&&(l.column=0),l},o})();b.prototype.$insertRight=!1,p.implement(b.prototype,m);function d(o,a,u){var l=u?o.column<=a.column:o.column<a.column;return o.row<a.row||o.row==a.row&&l}function g(o,a,u){var l=o.action=="insert",s=(l?1:-1)*(o.end.row-o.start.row),c=(l?1:-1)*(o.end.column-o.start.column),f=o.start,w=l?f:o.end;return d(a,f,u)?{row:a.row,column:a.column}:d(w,a,!u)?{row:a.row+s,column:a.column+(a.row==w.row?c:0)}:{row:f.row,column:f.column}}i.Anchor=b}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(n,i,h){var p=n("./lib/oop"),m=n("./apply_delta").applyDelta,b=n("./lib/event_emitter").EventEmitter,d=n("./range").Range,g=n("./anchor").Anchor,o=(function(){function a(u){this.$lines=[""],u.length===0?this.$lines=[""]:Array.isArray(u)?this.insertMergedLines({row:0,column:0},u):this.insert({row:0,column:0},u)}return a.prototype.setValue=function(u){var l=this.getLength()-1;this.remove(new d(0,0,l,this.getLine(l).length)),this.insert({row:0,column:0},u||"")},a.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},a.prototype.createAnchor=function(u,l){return new g(this,u,l)},a.prototype.$detectNewLine=function(u){var l=u.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=l?l[1]:`
186
+ `,this._signal("changeNewLineMode")},a.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
187
+ `;case"unix":return`
188
+ `;default:return this.$autoNewLine||`
189
+ `}},a.prototype.setNewLineMode=function(u){this.$newLineMode!==u&&(this.$newLineMode=u,this._signal("changeNewLineMode"))},a.prototype.getNewLineMode=function(){return this.$newLineMode},a.prototype.isNewLine=function(u){return u==`\r
190
+ `||u=="\r"||u==`
191
+ `},a.prototype.getLine=function(u){return this.$lines[u]||""},a.prototype.getLines=function(u,l){return this.$lines.slice(u,l+1)},a.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},a.prototype.getLength=function(){return this.$lines.length},a.prototype.getTextRange=function(u){return this.getLinesForRange(u).join(this.getNewLineCharacter())},a.prototype.getLinesForRange=function(u){var l;if(u.start.row===u.end.row)l=[this.getLine(u.start.row).substring(u.start.column,u.end.column)];else{l=this.getLines(u.start.row,u.end.row),l[0]=(l[0]||"").substring(u.start.column);var s=l.length-1;u.end.row-u.start.row==s&&(l[s]=l[s].substring(0,u.end.column))}return l},a.prototype.insertLines=function(u,l){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(u,l)},a.prototype.removeLines=function(u,l){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(u,l)},a.prototype.insertNewLine=function(u){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(u,["",""])},a.prototype.insert=function(u,l){return this.getLength()<=1&&this.$detectNewLine(l),this.insertMergedLines(u,this.$split(l))},a.prototype.insertInLine=function(u,l){var s=this.clippedPos(u.row,u.column),c=this.pos(u.row,u.column+l.length);return this.applyDelta({start:s,end:c,action:"insert",lines:[l]},!0),this.clonePos(c)},a.prototype.clippedPos=function(u,l){var s=this.getLength();u===void 0?u=s:u<0?u=0:u>=s&&(u=s-1,l=void 0);var c=this.getLine(u);return l==null&&(l=c.length),l=Math.min(Math.max(l,0),c.length),{row:u,column:l}},a.prototype.clonePos=function(u){return{row:u.row,column:u.column}},a.prototype.pos=function(u,l){return{row:u,column:l}},a.prototype.$clipPosition=function(u){var l=this.getLength();return u.row>=l?(u.row=Math.max(0,l-1),u.column=this.getLine(l-1).length):(u.row=Math.max(0,u.row),u.column=Math.min(Math.max(u.column,0),this.getLine(u.row).length)),u},a.prototype.insertFullLines=function(u,l){u=Math.min(Math.max(u,0),this.getLength());var s=0;u<this.getLength()?(l=l.concat([""]),s=0):(l=[""].concat(l),u--,s=this.$lines[u].length),this.insertMergedLines({row:u,column:s},l)},a.prototype.insertMergedLines=function(u,l){var s=this.clippedPos(u.row,u.column),c={row:s.row+l.length-1,column:(l.length==1?s.column:0)+l[l.length-1].length};return this.applyDelta({start:s,end:c,action:"insert",lines:l}),this.clonePos(c)},a.prototype.remove=function(u){var l=this.clippedPos(u.start.row,u.start.column),s=this.clippedPos(u.end.row,u.end.column);return this.applyDelta({start:l,end:s,action:"remove",lines:this.getLinesForRange({start:l,end:s})}),this.clonePos(l)},a.prototype.removeInLine=function(u,l,s){var c=this.clippedPos(u,l),f=this.clippedPos(u,s);return this.applyDelta({start:c,end:f,action:"remove",lines:this.getLinesForRange({start:c,end:f})},!0),this.clonePos(c)},a.prototype.removeFullLines=function(u,l){u=Math.min(Math.max(0,u),this.getLength()-1),l=Math.min(Math.max(0,l),this.getLength()-1);var s=l==this.getLength()-1&&u>0,c=l<this.getLength()-1,f=s?u-1:u,w=s?this.getLine(f).length:0,x=c?l+1:l,E=c?0:this.getLine(x).length,M=new d(f,w,x,E),k=this.$lines.slice(u,l+1);return this.applyDelta({start:M.start,end:M.end,action:"remove",lines:this.getLinesForRange(M)}),k},a.prototype.removeNewLine=function(u){u<this.getLength()-1&&u>=0&&this.applyDelta({start:this.pos(u,this.getLine(u).length),end:this.pos(u+1,0),action:"remove",lines:["",""]})},a.prototype.replace=function(u,l){if(u instanceof d||(u=d.fromPoints(u.start,u.end)),l.length===0&&u.isEmpty())return u.start;if(l==this.getTextRange(u))return u.end;this.remove(u);var s;return l?s=this.insert(u.start,l):s=u.start,s},a.prototype.applyDeltas=function(u){for(var l=0;l<u.length;l++)this.applyDelta(u[l])},a.prototype.revertDeltas=function(u){for(var l=u.length-1;l>=0;l--)this.revertDelta(u[l])},a.prototype.applyDelta=function(u,l){var s=u.action=="insert";(s?u.lines.length<=1&&!u.lines[0]:!d.comparePoints(u.start,u.end))||(s&&u.lines.length>2e4?this.$splitAndapplyLargeDelta(u,2e4):(m(this.$lines,u,l),this._signal("change",u)))},a.prototype.$safeApplyDelta=function(u){var l=this.$lines.length;(u.action=="remove"&&u.start.row<l&&u.end.row<l||u.action=="insert"&&u.start.row<=l)&&this.applyDelta(u)},a.prototype.$splitAndapplyLargeDelta=function(u,l){for(var s=u.lines,c=s.length-l+1,f=u.start.row,w=u.start.column,x=0,E=0;x<c;x=E){E+=l-1;var M=s.slice(x,E);M.push(""),this.applyDelta({start:this.pos(f+x,w),end:this.pos(f+E,w=0),action:u.action,lines:M},!0)}u.lines=s.slice(x),u.start.row=f+x,u.start.column=w,this.applyDelta(u,!0)},a.prototype.revertDelta=function(u){this.$safeApplyDelta({start:this.clonePos(u.start),end:this.clonePos(u.end),action:u.action=="insert"?"remove":"insert",lines:u.lines.slice()})},a.prototype.indexToPosition=function(u,l){for(var s=this.$lines||this.getAllLines(),c=this.getNewLineCharacter().length,f=l||0,w=s.length;f<w;f++)if(u-=s[f].length+c,u<0)return{row:f,column:u+s[f].length+c};return{row:w-1,column:u+s[w-1].length+c}},a.prototype.positionToIndex=function(u,l){for(var s=this.$lines||this.getAllLines(),c=this.getNewLineCharacter().length,f=0,w=Math.min(u.row,s.length),x=l||0;x<w;++x)f+=s[x].length+c;return f+u.column},a.prototype.$split=function(u){return u.split(/\r\n|\r|\n/)},a})();o.prototype.$autoNewLine="",o.prototype.$newLineMode="auto",p.implement(o.prototype,b),i.Document=o}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,i,h){var p=n("./lib/oop"),m=n("./lib/event_emitter").EventEmitter,b=(function(){function d(g,o){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=g;var a=this;this.$worker=function(){if(a.running){for(var u=new Date,l=a.currentLine,s=-1,c=a.doc,f=l;a.lines[l];)l++;var w=c.getLength(),x=0;for(a.running=!1;l<w;){a.$tokenizeRow(l),s=l;do l++;while(a.lines[l]);if(x++,x%5===0&&new Date-u>20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=l,s==-1&&(s=l),f<=s&&a.fireUpdateEvent(f,s)}}}return d.prototype.setTokenizer=function(g){this.tokenizer=g,this.lines=[],this.states=[],this.start(0)},d.prototype.setDocument=function(g){this.doc=g,this.lines=[],this.states=[],this.stop()},d.prototype.fireUpdateEvent=function(g,o){var a={first:g,last:o};this._signal("update",{data:a})},d.prototype.start=function(g){this.currentLine=Math.min(g||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},d.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},d.prototype.$updateOnChange=function(g){var o=g.start.row,a=g.end.row-o;if(a===0)this.lines[o]=null;else if(g.action=="remove")this.lines.splice(o,a+1,null),this.states.splice(o,a+1,null);else{var u=Array(a+1);u.unshift(o,1),this.lines.splice.apply(this.lines,u),this.states.splice.apply(this.states,u)}this.currentLine=Math.min(o,this.currentLine,this.doc.getLength()),this.stop()},d.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},d.prototype.getTokens=function(g){return this.lines[g]||this.$tokenizeRow(g)},d.prototype.getState=function(g){return this.currentLine==g&&this.$tokenizeRow(g),this.states[g]||"start"},d.prototype.$tokenizeRow=function(g){var o=this.doc.getLine(g),a=this.states[g-1],u=this.tokenizer.getLineTokens(o,a,g);return this.states[g]+""!=u.state+""?(this.states[g]=u.state,this.lines[g+1]=null,this.currentLine>g+1&&(this.currentLine=g+1)):this.currentLine==g&&(this.currentLine=g+1),this.lines[g]=u.tokens},d.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},d})();p.implement(b.prototype,m),i.BackgroundTokenizer=b}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(n,i,h){var p=n("./lib/lang"),m=n("./range").Range,b=(function(){function d(g,o,a){a===void 0&&(a="text"),this.setRegexp(g),this.clazz=o,this.type=a,this.docLen=0}return d.prototype.setRegexp=function(g){this.regExp+""!=g+""&&(this.regExp=g,this.cache=[])},d.prototype.update=function(g,o,a,u){if(this.regExp){for(var l=u.firstRow,s=u.lastRow,c={},f=a.$editor&&a.$editor.$search,w=f&&f.$isMultilineSearch(a.$editor.getLastSearchOptions()),x=l;x<=s;x++){var E=this.cache[x];if(E==null||a.getValue().length!=this.docLen){if(w){E=[];var M=f.$multiLineForward(a,this.regExp,x,s);if(M){var k=M.endRow<=s?M.endRow-1:s;k>x&&(x=k),E.push(new m(M.startRow,M.startCol,M.endRow,M.endCol))}E.length>this.MAX_RANGES&&(E=E.slice(0,this.MAX_RANGES))}else E=p.getMatchOffsets(a.getLine(x),this.regExp),E.length>this.MAX_RANGES&&(E=E.slice(0,this.MAX_RANGES)),E=E.map(function(R){return new m(x,R.offset,x,R.offset+R.length)});this.cache[x]=E.length?E:""}if(E.length!==0)for(var C=E.length;C--;){var O=E[C].toScreenRange(a),L=O.toString();c[L]||(c[L]=!0,o.drawSingleLineMarker(g,O,this.clazz,u))}}this.docLen=a.getValue().length}},d})();b.prototype.MAX_RANGES=500,i.SearchHighlight=b}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(n,i,h){var p=(function(){function k(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return k.prototype.addSession=function(C){this.$session=C},k.prototype.add=function(C,O,L){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),O===!1||!this.lastDeltas){this.lastDeltas=[];var R=this.$undoStack.length;R>this.$undoDepth-1&&this.$undoStack.splice(0,R-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),C.id=this.$rev=++this.$maxRev}(C.action=="remove"||C.action=="insert")&&(this.$lastDelta=C),this.lastDeltas.push(C)}},k.prototype.addSelection=function(C,O){this.selections.push({value:C,rev:O||this.$rev})},k.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},k.prototype.markIgnored=function(C,O){O==null&&(O=this.$rev+1);for(var L=this.$undoStack,R=L.length;R--;){var I=L[R][0];if(I.id<=C)break;I.id<O&&(I.ignore=!0)}this.lastDeltas=null},k.prototype.getSelection=function(C,O){for(var L=this.selections,R=L.length;R--;){var I=L[R];if(I.rev<C)return O&&(I=L[R+1]),I}},k.prototype.getRevision=function(){return this.$rev},k.prototype.getDeltas=function(C,O){O==null&&(O=this.$rev+1);for(var L=this.$undoStack,R=null,I=0,z=L.length;z--;){var F=L[z][0];if(F.id<O&&!R&&(R=z+1),F.id<=C){I=z+1;break}}return L.slice(I,R)},k.prototype.getChangedRanges=function(C,O){O==null&&(O=this.$rev+1)},k.prototype.getChangedLines=function(C,O){O==null&&(O=this.$rev+1)},k.prototype.undo=function(C,O){this.lastDeltas=null;var L=this.$undoStack;if(m(L,L.length)){C||(C=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var R=L.pop(),I=null;return R&&(I=C.undoChanges(R,O),this.$redoStack.push(R),this.$syncRev()),this.$fromUndo=!1,I}},k.prototype.redo=function(C,O){if(this.lastDeltas=null,C||(C=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var L=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);M(this.$redoStack,L),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(z){z[0].id=++this.$maxRev},this)}var R=this.$redoStack.pop(),I=null;return R&&(I=C.redoChanges(R,O),this.$undoStack.push(R),this.$syncRev()),this.$fromUndo=!1,I},k.prototype.$syncRev=function(){var C=this.$undoStack,O=C[C.length-1],L=O&&O[0].id||0;this.$redoStackBaseRev=L,this.$rev=L},k.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},k.prototype.canUndo=function(){return this.$undoStack.length>0},k.prototype.canRedo=function(){return this.$redoStack.length>0},k.prototype.bookmark=function(C){C==null&&(C=this.$rev),this.mark=C},k.prototype.isAtBookmark=function(){return this.$rev===this.mark},k.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},k.prototype.fromJSON=function(C){this.reset(),this.$undoStack=C.$undoStack,this.$redoStack=C.$redoStack},k.prototype.$prettyPrint=function(C){return C?a(C):a(this.$undoStack)+`
192
+ ---
193
+ `+a(this.$redoStack)},k})();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 m(k,C){for(var O=C;O--;){var L=k[O];if(L&&!L[0].ignore){for(;O<C-1;){var R=s(k[O],k[O+1]);k[O]=R[0],k[O+1]=R[1],O++}return!0}}}var b=n("./range").Range,d=b.comparePoints;b.comparePoints;function g(k){return{row:k.row,column:k.column}}function o(k){return{start:g(k.start),end:g(k.end),action:k.action,lines:k.lines.slice()}}function a(k){if(k=k||this,Array.isArray(k))return k.map(a).join(`
194
+ `);var C="";return k.action?(C=k.action=="insert"?"+":"-",C+="["+k.lines+"]"):k.value&&(Array.isArray(k.value)?C=k.value.map(u).join(`
195
+ `):C=u(k.value)),k.start&&(C+=u(k)),(k.id||k.rev)&&(C+=" ("+(k.id||k.rev)+")"),C}function u(k){return k.start.row+":"+k.start.column+"=>"+k.end.row+":"+k.end.column}function l(k,C){var O=k.action=="insert",L=C.action=="insert";if(O&&L)if(d(C.start,k.end)>=0)f(C,k,-1);else if(d(C.start,k.start)<=0)f(k,C,1);else return null;else if(O&&!L)if(d(C.start,k.end)>=0)f(C,k,-1);else if(d(C.end,k.start)<=0)f(k,C,-1);else return null;else if(!O&&L)if(d(C.start,k.start)>=0)f(C,k,1);else if(d(C.start,k.start)<=0)f(k,C,1);else return null;else if(!O&&!L)if(d(C.start,k.start)>=0)f(C,k,1);else if(d(C.end,k.start)<=0)f(k,C,-1);else return null;return[C,k]}function s(k,C){for(var O=k.length;O--;)for(var L=0;L<C.length;L++)if(!l(k[O],C[L])){for(;O<k.length;){for(;L--;)l(C[L],k[O]);L=C.length,O++}return[k,C]}return k.selectionBefore=C.selectionBefore=k.selectionAfter=C.selectionAfter=null,[C,k]}function c(k,C){var O=k.action=="insert",L=C.action=="insert";if(O&&L)d(k.start,C.start)<0?f(C,k,1):f(k,C,1);else if(O&&!L)d(k.start,C.end)>=0?f(k,C,-1):(d(k.start,C.start)<=0||f(k,b.fromPoints(C.start,k.start),-1),f(C,k,1));else if(!O&&L)d(C.start,k.end)>=0?f(C,k,-1):(d(C.start,k.start)<=0||f(C,b.fromPoints(k.start,C.start),-1),f(k,C,1));else if(!O&&!L)if(d(C.start,k.end)>=0)f(C,k,-1);else if(d(C.end,k.start)<=0)f(k,C,-1);else{var R,I;return d(k.start,C.start)<0&&(R=k,k=x(k,C.start)),d(k.end,C.end)>0&&(I=x(k,C.end)),w(C.end,k.start,k.end,-1),I&&!R&&(k.lines=I.lines,k.start=I.start,k.end=I.end,I=k),[C,R,I].filter(Boolean)}return[C,k]}function f(k,C,O){w(k.start,C.start,C.end,O),w(k.end,C.start,C.end,O)}function w(k,C,O,L){k.row==(L==1?C:O).row&&(k.column+=L*(O.column-C.column)),k.row+=L*(O.row-C.row)}function x(k,C){var O=k.lines,L=k.end;k.end=g(C);var R=k.end.row-k.start.row,I=O.splice(R,O.length),z=R?C.column:C.column-k.start.column;O.push(I[0].substring(0,z)),I[0]=I[0].substr(z);var F={start:g(C),end:L,lines:I,action:k.action};return F}function E(k,C){C=o(C);for(var O=k.length;O--;){for(var L=k[O],R=0;R<L.length;R++){var I=L[R],z=c(I,C);C=z[0],z.length!=2&&(z[2]?(L.splice(R+1,1,z[1],z[2]),R++):z[1]||(L.splice(R,1),R--))}L.length||k.splice(O,1)}return k}function M(k,C){for(var O=0;O<C.length;O++)for(var L=C[O],R=0;R<L.length;R++)E(k,L[R])}i.UndoManager=p}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(n,i,h){var p=n("../range").Range,m=(function(){function b(d,g){this.foldData=d,Array.isArray(g)?this.folds=g:g=this.folds=[g];var o=g[g.length-1];this.range=new p(g[0].start.row,g[0].start.column,o.end.row,o.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(a){a.setFoldLine(this)},this)}return b.prototype.shiftRow=function(d){this.start.row+=d,this.end.row+=d,this.folds.forEach(function(g){g.start.row+=d,g.end.row+=d})},b.prototype.addFold=function(d){if(d.sameRow){if(d.start.row<this.startRow||d.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(d),this.folds.sort(function(g,o){return-g.range.compareEnd(o.start.row,o.start.column)}),this.range.compareEnd(d.start.row,d.start.column)>0?(this.end.row=d.end.row,this.end.column=d.end.column):this.range.compareStart(d.end.row,d.end.column)<0&&(this.start.row=d.start.row,this.start.column=d.start.column)}else if(d.start.row==this.end.row)this.folds.push(d),this.end.row=d.end.row,this.end.column=d.end.column;else if(d.end.row==this.start.row)this.folds.unshift(d),this.start.row=d.start.row,this.start.column=d.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");d.foldLine=this},b.prototype.containsRow=function(d){return d>=this.start.row&&d<=this.end.row},b.prototype.walk=function(d,g,o){var a=0,u=this.folds,l,s,c,f=!0;g==null&&(g=this.end.row,o=this.end.column);for(var w=0;w<u.length;w++){if(l=u[w],s=l.range.compareStart(g,o),s==-1){d(null,g,o,a,f);return}if(c=d(null,l.start.row,l.start.column,a,f),c=!c&&d(l.placeholder,l.start.row,l.start.column,a),c||s===0)return;f=!l.sameRow,a=l.end.column}d(null,g,o,a,f)},b.prototype.getNextFoldTo=function(d,g){for(var o,a,u=0;u<this.folds.length;u++){if(o=this.folds[u],a=o.range.compareEnd(d,g),a==-1)return{fold:o,kind:"after"};if(a===0)return{fold:o,kind:"inside"}}return null},b.prototype.addRemoveChars=function(d,g,o){var a=this.getNextFoldTo(d,g),u,l;if(a){if(u=a.fold,a.kind=="inside"&&u.start.column!=g&&u.start.row!=d)window.console&&window.console.log(d,g,u);else if(u.start.row==d){l=this.folds;var s=l.indexOf(u);for(s===0&&(this.start.column+=o),s;s<l.length;s++){if(u=l[s],u.start.column+=o,!u.sameRow)return;u.end.column+=o}this.end.column+=o}}},b.prototype.split=function(d,g){var o=this.getNextFoldTo(d,g);if(!o||o.kind=="inside")return null;var a=o.fold,u=this.folds,l=this.foldData,s=u.indexOf(a),c=u[s-1];this.end.row=c.end.row,this.end.column=c.end.column,u=u.splice(s,u.length-s);var f=new b(l,u);return l.splice(l.indexOf(this)+1,0,f),f},b.prototype.merge=function(d){for(var g=d.folds,o=0;o<g.length;o++)this.addFold(g[o]);var a=this.foldData;a.splice(a.indexOf(d),1)},b.prototype.toString=function(){var d=[this.range.toString()+": ["];return this.folds.forEach(function(g){d.push(" "+g.toString())}),d.push("]"),d.join(`
196
+ `)},b.prototype.idxToPosition=function(d){for(var g=0,o=0;o<this.folds.length;o++){var a=this.folds[o];if(d-=a.start.column-g,d<0)return{row:a.start.row,column:a.start.column+d};if(d-=a.placeholder.length,d<0)return a.start;g=a.end.column}return{row:this.end.row,column:this.end.column+d}},b})();i.FoldLine=m}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(n,i,h){var p=n("./range").Range,m=p.comparePoints,b=(function(){function d(){this.ranges=[],this.$bias=1}return d.prototype.pointIndex=function(g,o,a){for(var u=this.ranges,l=a||0;l<u.length;l++){var s=u[l],c=m(g,s.end);if(!(c>0)){var f=m(g,s.start);return c===0?o&&f!==0?-l-2:l:f>0||f===0&&!o?l:-l-1}}return-l-1},d.prototype.add=function(g){var o=!g.isEmpty(),a=this.pointIndex(g.start,o);a<0&&(a=-a-1);var u=this.pointIndex(g.end,o,a);return u<0?u=-u-1:u++,this.ranges.splice(a,u-a,g)},d.prototype.addList=function(g){for(var o=[],a=g.length;a--;)o.push.apply(o,this.add(g[a]));return o},d.prototype.substractPoint=function(g){var o=this.pointIndex(g);if(o>=0)return this.ranges.splice(o,1)},d.prototype.merge=function(){var g=[],o=this.ranges;o=o.sort(function(c,f){return m(c.start,f.start)});for(var a=o[0],u,l=1;l<o.length;l++){u=a,a=o[l];var s=m(u.end,a.start);s<0||s==0&&!u.isEmpty()&&!a.isEmpty()||(m(u.end,a.end)<0&&(u.end.row=a.end.row,u.end.column=a.end.column),o.splice(l,1),g.push(a),a=u,l--)}return this.ranges=o,g},d.prototype.contains=function(g,o){return this.pointIndex({row:g,column:o})>=0},d.prototype.containsPoint=function(g){return this.pointIndex(g)>=0},d.prototype.rangeAtPoint=function(g){var o=this.pointIndex(g);if(o>=0)return this.ranges[o]},d.prototype.clipRows=function(g,o){var a=this.ranges;if(a[0].start.row>o||a[a.length-1].start.row<g)return[];var u=this.pointIndex({row:g,column:0});u<0&&(u=-u-1);var l=this.pointIndex({row:o,column:0},u);l<0&&(l=-l-1);for(var s=[],c=u;c<l;c++)s.push(a[c]);return s},d.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},d.prototype.attach=function(g){this.session&&this.detach(),this.session=g,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},d.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},d.prototype.$onChange=function(g){for(var o=g.start,a=g.end,u=o.row,l=a.row,s=this.ranges,c=0,f=s.length;c<f;c++){var w=s[c];if(w.end.row>=u)break}if(g.action=="insert")for(var x=l-u,E=-o.column+a.column;c<f;c++){var w=s[c];if(w.start.row>u)break;if(w.start.row==u&&w.start.column>=o.column&&(w.start.column==o.column&&this.$bias<=0||(w.start.column+=E,w.start.row+=x)),w.end.row==u&&w.end.column>=o.column){if(w.end.column==o.column&&this.$bias<0)continue;w.end.column==o.column&&E>0&&c<f-1&&w.end.column>w.start.column&&w.end.column==s[c+1].start.column&&(w.end.column-=E),w.end.column+=E,w.end.row+=x}}else for(var x=u-l,E=o.column-a.column;c<f;c++){var w=s[c];if(w.start.row>l)break;w.end.row<l&&(u<w.end.row||u==w.end.row&&o.column<w.end.column)?(w.end.row=u,w.end.column=o.column):w.end.row==l?w.end.column<=a.column?(x||w.end.column>o.column)&&(w.end.column=o.column,w.end.row=o.row):(w.end.column+=E,w.end.row+=x):w.end.row>l&&(w.end.row+=x),w.start.row<l&&(u<w.start.row||u==w.start.row&&o.column<w.start.column)?(w.start.row=u,w.start.column=o.column):w.start.row==l?w.start.column<=a.column?(x||w.start.column>o.column)&&(w.start.column=o.column,w.start.row=o.row):(w.start.column+=E,w.start.row+=x):w.start.row>l&&(w.start.row+=x)}if(x!=0&&c<f)for(;c<f;c++){var w=s[c];w.start.row+=x,w.end.row+=x}},d})();b.prototype.comparePoints=m,i.RangeList=b}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(n,i,h){var p=this&&this.__extends||(function(){var u=function(l,s){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,f){c.__proto__=f}||function(c,f){for(var w in f)Object.prototype.hasOwnProperty.call(f,w)&&(c[w]=f[w])},u(l,s)};return function(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");u(l,s);function c(){this.constructor=l}l.prototype=s===null?Object.create(s):(c.prototype=s.prototype,new c)}})(),m=n("../range_list").RangeList,b=(function(u){p(l,u);function l(s,c){var f=u.call(this)||this;return f.foldLine=null,f.placeholder=c,f.range=s,f.start=s.start,f.end=s.end,f.sameRow=s.start.row==s.end.row,f.subFolds=f.ranges=[],f}return l.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},l.prototype.setFoldLine=function(s){this.foldLine=s,this.subFolds.forEach(function(c){c.setFoldLine(s)})},l.prototype.clone=function(){var s=this.range.clone(),c=new l(s,this.placeholder);return this.subFolds.forEach(function(f){c.subFolds.push(f.clone())}),c.collapseChildren=this.collapseChildren,c},l.prototype.addSubFold=function(s){if(!this.range.isEqual(s)){g(s,this.start);for(var c=s.start.row,f=s.start.column,w=0,x=-1;w<this.subFolds.length&&(x=this.subFolds[w].range.compare(c,f),x==1);w++);var E=this.subFolds[w],M=0;if(x==0){if(E.range.containsRange(s))return E.addSubFold(s);M=1}for(var c=s.range.end.row,f=s.range.end.column,k=w,x=-1;k<this.subFolds.length&&(x=this.subFolds[k].range.compare(c,f),x==1);k++);x==0&&k++;for(var C=this.subFolds.splice(w,k-w,s),O=x==0?C.length-1:C.length,L=M;L<O;L++)s.addSubFold(C[L]);return s.setFoldLine(this.foldLine),s}},l.prototype.restoreRange=function(s){return a(s,this.start)},l})(m);function d(u,l){u.row-=l.row,u.row==0&&(u.column-=l.column)}function g(u,l){d(u.start,l),d(u.end,l)}function o(u,l){u.row==0&&(u.column+=l.column),u.row+=l.row}function a(u,l){o(u.start,l),o(u.end,l)}i.Fold=b}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(n,i,h){var p=n("../range").Range,m=n("./fold_line").FoldLine,b=n("./fold").Fold,d=n("../token_iterator").TokenIterator,g=n("../mouse/mouse_event").MouseEvent;function o(){this.getFoldAt=function(a,u,l){var s=this.getFoldLine(a);if(!s)return null;for(var c=s.folds,f=0;f<c.length;f++){var w=c[f].range;if(w.contains(a,u)){if(l==1&&w.isEnd(a,u)&&!w.isEmpty()||l==-1&&w.isStart(a,u)&&!w.isEmpty())continue;return c[f]}}},this.getFoldsInRange=function(a){var u=a.start,l=a.end,s=this.$foldData,c=[];u.column+=1,l.column-=1;for(var f=0;f<s.length;f++){var w=s[f].range.compareRange(a);if(w!=2){if(w==-2)break;for(var x=s[f].folds,E=0;E<x.length;E++){var M=x[E];if(w=M.range.compareRange(a),w==-2)break;if(w!=2){if(w==42)break;c.push(M)}}}}return u.column-=1,l.column+=1,c},this.getFoldsInRangeList=function(a){if(Array.isArray(a)){var u=[];a.forEach(function(s){u=u.concat(this.getFoldsInRange(s))},this)}else var u=this.getFoldsInRange(a);return u},this.getAllFolds=function(){for(var a=[],u=this.$foldData,l=0;l<u.length;l++)for(var s=0;s<u[l].folds.length;s++)a.push(u[l].folds[s]);return a},this.getFoldStringAt=function(a,u,l,s){if(s=s||this.getFoldLine(a),!s)return null;for(var c={end:{column:0}},f,w,x=0;x<s.folds.length;x++){w=s.folds[x];var E=w.range.compareEnd(a,u);if(E==-1){f=this.getLine(w.start.row).substring(c.end.column,w.start.column);break}else if(E===0)return null;c=w}return f||(f=this.getLine(w.start.row).substring(c.end.column)),l==-1?f.substring(0,u-c.end.column):l==1?f.substring(u-c.end.column):f},this.getFoldLine=function(a,u){var l=this.$foldData,s=0;for(u&&(s=l.indexOf(u)),s==-1&&(s=0),s;s<l.length;s++){var c=l[s];if(c.start.row<=a&&c.end.row>=a)return c;if(c.end.row>a)return null}return null},this.getNextFoldLine=function(a,u){var l=this.$foldData,s=0;for(u&&(s=l.indexOf(u)),s==-1&&(s=0),s;s<l.length;s++){var c=l[s];if(c.end.row>=a)return c}return null},this.getFoldedRowCount=function(a,u){for(var l=this.$foldData,s=u-a+1,c=0;c<l.length;c++){var f=l[c],w=f.end.row,x=f.start.row;if(w>=u){x<u&&(x>=a?s-=u-x:s=0);break}else w>=a&&(x>=a?s-=w-x:s-=w-a+1)}return s},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(u,l){return u.start.row-l.start.row}),a},this.addFold=function(a,u){var l=this.$foldData,s=!1,c;a instanceof b?c=a:(c=new b(u,a),c.collapseChildren=u.collapseChildren),this.$clipRangeToDocument(c.range);var f=c.start.row,w=c.start.column,x=c.end.row,E=c.end.column,M=this.getFoldAt(f,w,1),k=this.getFoldAt(x,E,-1);if(M&&k==M)return M.addSubFold(c);M&&!M.range.isStart(f,w)&&this.removeFold(M),k&&!k.range.isEnd(x,E)&&this.removeFold(k);var C=this.getFoldsInRange(c.range);C.length>0&&(this.removeFolds(C),c.collapseChildren||C.forEach(function(I){c.addSubFold(I)}));for(var O=0;O<l.length;O++){var L=l[O];if(x==L.start.row){L.addFold(c),s=!0;break}else if(f==L.end.row){if(L.addFold(c),s=!0,!c.sameRow){var R=l[O+1];if(R&&R.start.row==x){L.merge(R);break}}break}else if(x<=L.start.row)break}return s||(L=this.$addFoldLine(new m(this.$foldData,c))),this.$useWrapMode?this.$updateWrapData(L.start.row,L.start.row):this.$updateRowLengthCache(L.start.row,L.start.row),this.$modified=!0,this._signal("changeFold",{data:c,action:"add"}),c},this.addFolds=function(a){a.forEach(function(u){this.addFold(u)},this)},this.removeFold=function(a){var u=a.foldLine,l=u.start.row,s=u.end.row,c=this.$foldData,f=u.folds;if(f.length==1)c.splice(c.indexOf(u),1);else if(u.range.isEnd(a.end.row,a.end.column))f.pop(),u.end.row=f[f.length-1].end.row,u.end.column=f[f.length-1].end.column;else if(u.range.isStart(a.start.row,a.start.column))f.shift(),u.start.row=f[0].start.row,u.start.column=f[0].start.column;else if(a.sameRow)f.splice(f.indexOf(a),1);else{var w=u.split(a.start.row,a.start.column);f=w.folds,f.shift(),w.start.row=f[0].start.row,w.start.column=f[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(l,s):this.$updateRowLengthCache(l,s)),this.$modified=!0,this._signal("changeFold",{data:a,action:"remove"})},this.removeFolds=function(a){for(var u=[],l=0;l<a.length;l++)u.push(a[l]);u.forEach(function(s){this.removeFold(s)},this),this.$modified=!0},this.expandFold=function(a){this.removeFold(a),a.subFolds.forEach(function(u){a.restoreRange(u),this.addFold(u)},this),a.collapseChildren>0&&this.foldAll(a.start.row+1,a.end.row,a.collapseChildren-1),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(u){this.expandFold(u)},this)},this.unfold=function(a,u){var l,s;if(a==null)l=new p(0,0,this.getLength(),0),u==null&&(u=!0);else if(typeof a=="number")l=new p(a,0,a,this.getLine(a).length);else if("row"in a)l=p.fromPoints(a,a);else{if(Array.isArray(a))return s=[],a.forEach(function(f){s=s.concat(this.unfold(f))},this),s;l=a}s=this.getFoldsInRangeList(l);for(var c=s;s.length==1&&p.comparePoints(s[0].start,l.start)<0&&p.comparePoints(s[0].end,l.end)>0;)this.expandFolds(s),s=this.getFoldsInRangeList(l);if(u!=!1?this.removeFolds(s):this.expandFolds(s),c.length)return c},this.isRowFolded=function(a,u){return!!this.getFoldLine(a,u)},this.getRowFoldEnd=function(a,u){var l=this.getFoldLine(a,u);return l?l.end.row:a},this.getRowFoldStart=function(a,u){var l=this.getFoldLine(a,u);return l?l.start.row:a},this.getFoldDisplayLine=function(a,u,l,s,c){s==null&&(s=a.start.row),c==null&&(c=0),u==null&&(u=a.end.row),l==null&&(l=this.getLine(u).length);var f=this.doc,w="";return a.walk(function(x,E,M,k){if(!(E<s)){if(E==s){if(M<c)return;k=Math.max(c,k)}x!=null?w+=x:w+=f.getLine(E).substring(k,M)}},u,l),w},this.getDisplayLine=function(a,u,l,s){var c=this.getFoldLine(a);if(c)return this.getFoldDisplayLine(c,a,u,l,s);var f;return f=this.doc.getLine(a),f.substring(s||0,u||f.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(u){var l=u.folds.map(function(s){return s.clone()});return new m(a,l)}),a},this.toggleFold=function(a){var u=this.selection,l=u.getRange(),s,c;if(l.isEmpty()){var f=l.start;if(s=this.getFoldAt(f.row,f.column),s){this.expandFold(s);return}else if(a){var w=this.getFoldLine(f.row);w&&this.expandFolds(w.folds);return}else(c=this.findMatchingBracket(f))?l.comparePoint(c)==1?l.end=c:(l.start=c,l.start.column++,l.end.column--):(c=this.findMatchingBracket({row:f.row,column:f.column+1}))?(l.comparePoint(c)==1?l.end=c:l.start=c,l.start.column++):l=this.getCommentFoldRange(f.row,f.column)||l}else{var x=this.getFoldsInRange(l);if(a&&x.length){this.expandFolds(x);return}else x.length==1&&(s=x[0])}if(s||(s=this.getFoldAt(l.start.row,l.start.column)),s&&s.range.toString()==l.toString()){this.expandFold(s);return}var E="...";if(!l.isMultiLine()){if(E=this.getTextRange(l),E.length<4)return;E=E.trim().substring(0,2)+".."}this.addFold(E,l)},this.getCommentFoldRange=function(a,u,l){var s=new d(this,a,u),c=s.getCurrentToken(),f=c&&c.type;if(c&&/^comment|string/.test(f)){f=f.match(/comment|string/)[0],f=="comment"&&(f+="|doc-start|\\.doc");var w=new RegExp(f),x=new p;if(l!=1){do c=s.stepBackward();while(c&&w.test(c.type));c=s.stepForward()}x.start.row=s.getCurrentTokenRow(),x.start.column=s.getCurrentTokenColumn()+c.value.length,s=new d(this,a,u);var E=this.getState(s.$row);if(l!=-1){var M=-1;do if(c=s.stepForward(),M==-1){var k=this.getState(s.$row);E.toString()!==k.toString()&&(M=s.$row)}else if(s.$row>M)break;while(c&&w.test(c.type));c=s.stepBackward()}else c=s.getCurrentToken();return x.end.row=s.getCurrentTokenRow(),x.end.column=s.getCurrentTokenColumn(),x.start.row==x.end.row&&x.start.column>x.end.column?void 0:x}},this.foldAll=function(a,u,l,s){l==null&&(l=1e5);var c=this.foldWidgets;if(c){u=u||this.getLength(),a=a||0;for(var f=a;f<u;f++)if(c[f]==null&&(c[f]=this.getFoldWidget(f)),c[f]=="start"&&!(s&&!s(f))){var w=this.getFoldWidgetRange(f);w&&w.isMultiLine()&&w.end.row<=u&&w.start.row>=a&&(f=w.end.row,w.collapseChildren=l,this.addFold("...",w))}}},this.foldToLevel=function(a){for(this.foldAll();a-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var a=this;this.foldAll(null,null,null,function(u){for(var l=a.getTokens(u),s=0;s<l.length;s++){var c=l[s];if(!(c.type=="text"&&/^\s+$/.test(c.value)))return!!/comment/.test(c.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(a){if(!this.$foldStyles[a])throw new Error("invalid fold style: "+a+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=a){this.$foldStyle=a,a=="manual"&&this.unfold();var u=this.$foldMode;this.$setFolding(null),this.$setFolding(u)}},this.$setFolding=function(a){if(this.$foldMode!=a){if(this.$foldMode=a,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!a||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=a.getFoldWidget.bind(a,this,this.$foldStyle),this.getFoldWidgetRange=a.getFoldWidgetRange.bind(a,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(a,u){var l=this.foldWidgets;if(!l||u&&l[a])return{};for(var s=a-1,c;s>=0;){var f=l[s];if(f==null&&(f=l[s]=this.getFoldWidget(s)),f=="start"){var w=this.getFoldWidgetRange(s);if(c||(c=w),w&&w.end.row>=a)break}s--}return{range:s!==-1&&w,firstRange:c}},this.onFoldWidgetClick=function(a,u){u instanceof g&&(u=u.domEvent);var l={children:u.shiftKey,all:u.ctrlKey||u.metaKey,siblings:u.altKey},s=this.$toggleFoldWidget(a,l);if(!s){var c=u.target||u.srcElement;c&&/ace_fold-widget/.test(c.className)&&(c.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,u){if(this.getFoldWidget){var l=this.getFoldWidget(a),s=this.getLine(a),c=l==="end"?-1:1,f=this.getFoldAt(a,c===-1?0:s.length,c);if(f)return u.children||u.all?this.removeFold(f):this.expandFold(f),f;var w=this.getFoldWidgetRange(a,!0);if(w&&!w.isMultiLine()&&(f=this.getFoldAt(w.start.row,w.start.column,1),f&&w.isEqual(f.range)))return this.removeFold(f),f;if(u.siblings){var x=this.getParentFoldRangeData(a);if(x.range)var E=x.range.start.row+1,M=x.range.end.row;this.foldAll(E,M,u.all?1e4:0)}else u.children?(M=w?w.end.row:this.getLength(),this.foldAll(a+1,M,u.all?1e4:0)):w&&(u.all&&(w.collapseChildren=1e4),this.addFold("...",w));return w}},this.toggleFoldWidget=function(a){var u=this.selection.getCursor().row;u=this.getRowFoldStart(u);var l=this.$toggleFoldWidget(u,{});if(!l){var s=this.getParentFoldRangeData(u,!0);if(l=s.range||s.firstRange,l){u=l.start.row;var c=this.getFoldAt(u,this.getLine(u).length,1);c?this.removeFold(c):this.addFold("...",l)}}},this.updateFoldWidgets=function(a){var u=a.start.row,l=a.end.row-u;if(l===0)this.foldWidgets[u]=null;else if(a.action=="remove")this.foldWidgets.splice(u,l+1,null);else{var s=Array(l+1);s.unshift(u,1),this.foldWidgets.splice.apply(this.foldWidgets,s)}},this.tokenizerUpdateFoldWidgets=function(a){var u=a.data;u.first!=u.last&&this.foldWidgets.length>u.first&&this.foldWidgets.splice(u.first,this.foldWidgets.length)}}i.Folding=o}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(n,i,h){var p=n("../token_iterator").TokenIterator,m=n("../range").Range;function b(){this.findMatchingBracket=function(d,g){if(d.column==0)return null;var o=g||this.getLine(d.row).charAt(d.column-1);if(o=="")return null;var a=o.match(/([\(\[\{])|([\)\]\}])/);return a?a[1]?this.$findClosingBracket(a[1],d):this.$findOpeningBracket(a[2],d):null},this.getBracketRange=function(d){var g=this.getLine(d.row),o=!0,a,u=g.charAt(d.column-1),l=u&&u.match(/([\(\[\{])|([\)\]\}])/);if(l||(u=g.charAt(d.column),d={row:d.row,column:d.column+1},l=u&&u.match(/([\(\[\{])|([\)\]\}])/),o=!1),!l)return null;if(l[1]){var s=this.$findClosingBracket(l[1],d);if(!s)return null;a=m.fromPoints(d,s),o||(a.end.column++,a.start.column--),a.cursor=a.end}else{var s=this.$findOpeningBracket(l[2],d);if(!s)return null;a=m.fromPoints(s,d),o||(a.start.column++,a.end.column--),a.cursor=a.start}return a},this.getMatchingBracketRanges=function(d,g){var o=this.getLine(d.row),a=/([\(\[\{])|([\)\]\}])/,u=!g&&o.charAt(d.column-1),l=u&&u.match(a);if(l||(u=(g===void 0||g)&&o.charAt(d.column),d={row:d.row,column:d.column+1},l=u&&u.match(a)),!l)return null;var s=new m(d.row,d.column-1,d.row,d.column),c=l[1]?this.$findClosingBracket(l[1],d):this.$findOpeningBracket(l[2],d);if(!c)return[s];var f=new m(c.row,c.column,c.row,c.column+1);return[s,f]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(d,g,o){var a=this.$brackets[d],u=1,l=new p(this,g.row,g.column),s=l.getCurrentToken();if(s||(s=l.stepForward()),!!s){o||(o=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var c=g.column-l.getCurrentTokenColumn()-2,f=s.value;;){for(;c>=0;){var w=f.charAt(c);if(w==a){if(u-=1,u==0)return{row:l.getCurrentTokenRow(),column:c+l.getCurrentTokenColumn()}}else w==d&&(u+=1);c-=1}do s=l.stepBackward();while(s&&!o.test(s.type));if(s==null)break;f=s.value,c=f.length-1}return null}},this.$findClosingBracket=function(d,g,o){var a=this.$brackets[d],u=1,l=new p(this,g.row,g.column),s=l.getCurrentToken();if(s||(s=l.stepForward()),!!s){o||(o=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var c=g.column-l.getCurrentTokenColumn();;){for(var f=s.value,w=f.length;c<w;){var x=f.charAt(c);if(x==a){if(u-=1,u==0)return{row:l.getCurrentTokenRow(),column:c+l.getCurrentTokenColumn()}}else x==d&&(u+=1);c+=1}do s=l.stepForward();while(s&&!o.test(s.type));if(s==null)break;c=0}return null}},this.getMatchingTags=function(d){var g=new p(this,d.row,d.column),o=this.$findTagName(g);if(o){var a=g.stepBackward();return a.value==="<"?this.$findClosingTag(g,o):this.$findOpeningTag(g,o)}},this.$findTagName=function(d){var g=d.getCurrentToken(),o=!1,a=!1;if(g&&g.type.indexOf("tag-name")===-1)do a?g=d.stepBackward():g=d.stepForward(),g&&(g.value==="/>"?a=!0:g.type.indexOf("tag-name")!==-1&&(o=!0));while(g&&!o);return g},this.$findClosingTag=function(d,g){var o,a=g.value,u=g.value,l=0,s=new m(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+1);g=d.stepForward();var c=new m(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+g.value.length),f=!1;do{if(o=g,o.type.indexOf("tag-close")!==-1&&!f){var w=new m(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+1);f=!0}if(g=d.stepForward(),g){if(g.value===">"&&!f){var w=new m(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+1);f=!0}if(g.type.indexOf("tag-name")!==-1){if(a=g.value,u===a){if(o.value==="<")l++;else if(o.value==="</"&&(l--,l<0)){d.stepBackward();var x=new m(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+2);g=d.stepForward();var E=new m(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+g.value.length);if(g.type.indexOf("tag-close")===-1&&(g=d.stepForward()),g&&g.value===">")var M=new m(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+1);else return}}}else if(u===a&&g.value==="/>"&&(l--,l<0))var x=new m(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+2),E=x,M=E,w=new m(c.end.row,c.end.column,c.end.row,c.end.column+1)}}while(g&&l>=0);if(s&&w&&x&&M&&c&&E)return{openTag:new m(s.start.row,s.start.column,w.end.row,w.end.column),closeTag:new m(x.start.row,x.start.column,M.end.row,M.end.column),openTagName:c,closeTagName:E}},this.$findOpeningTag=function(d,g){var o=d.getCurrentToken(),a=g.value,u=0,l=d.getCurrentTokenRow(),s=d.getCurrentTokenColumn(),c=s+2,f=new m(l,s,l,c);d.stepForward();var w=new m(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+g.value.length);if(g.type.indexOf("tag-close")===-1&&(g=d.stepForward()),!(!g||g.value!==">")){var x=new m(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+1);d.stepBackward(),d.stepBackward();do if(g=o,l=d.getCurrentTokenRow(),s=d.getCurrentTokenColumn(),c=s+g.value.length,o=d.stepBackward(),g){if(g.type.indexOf("tag-name")!==-1){if(a===g.value)if(o.value==="<"){if(u++,u>0){var E=new m(l,s,l,c),M=new m(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+1);do g=d.stepForward();while(g&&g.value!==">");var k=new m(d.getCurrentTokenRow(),d.getCurrentTokenColumn(),d.getCurrentTokenRow(),d.getCurrentTokenColumn()+1)}}else o.value==="</"&&u--}else if(g.value==="/>"){for(var C=0,O=o;O;){if(O.type.indexOf("tag-name")!==-1&&O.value===a){u--;break}else if(O.value==="<")break;O=d.stepBackward(),C++}for(var L=0;L<C;L++)d.stepForward()}}while(o&&u<=0);if(M&&k&&f&&x&&E&&w)return{openTag:new m(M.start.row,M.start.column,k.end.row,k.end.column),closeTag:new m(f.start.row,f.start.column,x.end.row,x.end.column),openTagName:E,closeTagName:w}}}}i.BracketMatch=b}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(n,i,h){var p=n("./lib/oop"),m=n("./lib/lang"),b=n("./bidihandler").BidiHandler,d=n("./config"),g=n("./lib/event_emitter").EventEmitter,o=n("./selection").Selection,a=n("./mode/text").Mode,u=n("./range").Range,l=n("./line_widgets").LineWidgets,s=n("./document").Document,c=n("./background_tokenizer").BackgroundTokenizer,f=n("./search_highlight").SearchHighlight,w=n("./undomanager").UndoManager,x=(function(){function F(N,A){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(`
197
+ `)},this.$gutterCustomWidgets={},this.bgTokenizer=new c(new a().getTokenizer(),this);var S=this;this.bgTokenizer.on("update",function(D){S._signal("tokenizerUpdate",D)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof N!="object"||!N.getLine)&&(N=new s(N)),this.setDocument(N),this.selection=new o(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new b(this),d.resetOptions(this),this.setMode(A),d._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=m.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 A=this.selection.toJSON();this.curOp.selectionAfter=A,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(A),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 l(this);return this.widgetManager=N,this.$editor&&N.attach(this.$editor),N},set:function(N){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:N})},enumerable:!1,configurable:!0}),F.prototype.$resetRowCache=function(N){if(!N){this.$docRowCache=[],this.$screenRowCache=[];return}var A=this.$docRowCache.length,S=this.$getRowCacheIndex(this.$docRowCache,N)+1;A>S&&(this.$docRowCache.splice(S,A),this.$screenRowCache.splice(S,A))},F.prototype.$getRowCacheIndex=function(N,A){for(var S=0,D=N.length-1;S<=D;){var j=S+D>>1,U=N[j];if(A>U)S=j+1;else if(A<U)D=j-1;else return j}return S-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 A=N.data;this.$resetRowCache(A.start.row)},F.prototype.onChange=function(N){this.$modified=!0,this.$bidiHandler.onChange(N),this.$resetRowCache(N.start.row);var A=this.$updateInternalDataOnChange(N);!this.$fromUndo&&this.$undoManager&&(A&&A.length&&(this.$undoManager.add({action:"removeFolds",folds:A},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 A=new w;A.$undoStack=N.history.undo,A.$redoStack=N.history.redo,A.mark=N.history.mark,A.$rev=N.history.rev;var S=new F(N.value);return N.folds.forEach(function(D){S.addFold("...",u.fromPoints(D.start,D.end))}),S.setAnnotations(N.annotations),S.setBreakpoints(N.breakpoints),S.setMode(N.mode),S.setScrollLeft(N.scrollLeft),S.setScrollTop(N.scrollTop),S.setUndoManager(A),S.selection.fromJSON(N.selection),S},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,A){var S=this.bgTokenizer.getTokens(N),D,j=0;if(A==null){var U=S.length-1;j=this.getLine(N).length}else for(var U=0;U<S.length&&(j+=S[U].value.length,!(j>=A));U++);return D=S[U],D?(D.index=U,D.start=j-D.value.length,D):null},F.prototype.setUndoManager=function(N){if(this.$undoManager=N,this.$informUndoManager&&this.$informUndoManager.cancel(),N){var A=this;N.addSession(this),this.$syncInformUndoManager=function(){A.$informUndoManager.cancel(),A.mergeUndoDeltas=!1},this.$informUndoManager=m.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()?m.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,A){this.$decorations[N]||(this.$decorations[N]=""),this.$decorations[N]+=" "+A,this._signal("changeBreakpoint",{})},F.prototype.removeGutterCustomWidget=function(N){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(N)},F.prototype.addGutterCustomWidget=function(N,A){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(N,A)},F.prototype.removeGutterDecoration=function(N,A){this.$decorations[N]=(this.$decorations[N]||"").replace(" "+A,""),this._signal("changeBreakpoint",{})},F.prototype.getBreakpoints=function(){return this.$breakpoints},F.prototype.setBreakpoints=function(N){this.$breakpoints=[];for(var A=0;A<N.length;A++)this.$breakpoints[N[A]]="ace_breakpoint";this._signal("changeBreakpoint",{})},F.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},F.prototype.setBreakpoint=function(N,A){A===void 0&&(A="ace_breakpoint"),A?this.$breakpoints[N]=A:delete this.$breakpoints[N],this._signal("changeBreakpoint",{})},F.prototype.clearBreakpoint=function(N){delete this.$breakpoints[N],this._signal("changeBreakpoint",{})},F.prototype.addMarker=function(N,A,S,D){var j=this.$markerId++,U={range:N,type:S||"line",renderer:typeof S=="function"?S:null,clazz:A,inFront:!!D,id:j};return D?(this.$frontMarkers[j]=U,this._signal("changeFrontMarker")):(this.$backMarkers[j]=U,this._signal("changeBackMarker")),j},F.prototype.addDynamicMarker=function(N,A){if(N.update){var S=this.$markerId++;return N.id=S,N.inFront=!!A,A?(this.$frontMarkers[S]=N,this._signal("changeFrontMarker")):(this.$backMarkers[S]=N,this._signal("changeBackMarker")),N}},F.prototype.removeMarker=function(N){var A=this.$frontMarkers[N]||this.$backMarkers[N];if(A){var S=A.inFront?this.$frontMarkers:this.$backMarkers;delete S[N],this._signal(A.inFront?"changeFrontMarker":"changeBackMarker")}},F.prototype.getMarkers=function(N){return N?this.$frontMarkers:this.$backMarkers},F.prototype.highlight=function(N){if(!this.$searchHighlight){var A=new f(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(A)}this.$searchHighlight.setRegexp(N)},F.prototype.highlightLines=function(N,A,S,D){typeof A!="number"&&(S=A,A=N),S||(S="ace_step");var j=new u(N,0,A,1/0);return j.id=this.addMarker(j,S,"fullLine",D),j},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 A=N.match(/^.*?(\r?\n)/m);A?this.$autoNewLine=A[1]:this.$autoNewLine=`
198
+ `},F.prototype.getWordRange=function(N,A){var S=this.getLine(N),D=!1;if(A>0&&(D=!!S.charAt(A-1).match(this.tokenRe)),D||(D=!!S.charAt(A).match(this.tokenRe)),D)var j=this.tokenRe;else if(/^\s+$/.test(S.slice(A-1,A+1)))var j=/\s/;else var j=this.nonTokenRe;var U=A;if(U>0){do U--;while(U>=0&&S.charAt(U).match(j));U++}for(var q=A;q<S.length&&S.charAt(q).match(j);)q++;return new u(N,U,N,q)},F.prototype.getAWordRange=function(N,A){for(var S=this.getWordRange(N,A),D=this.getLine(S.end.row);D.charAt(S.end.column).match(/[ \t]/);)S.end.column+=1;return S},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 A=N.data;this.bgTokenizer.start(A.first),this._signal("tokenizerUpdate",N)},F.prototype.setMode=function(N,A){if(N&&typeof N=="object"){if(N.getTokenizer)return this.$onChangeMode(N);var S=N,D=S.path}else D=N||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a),this.$modes[D]&&!S){this.$onChangeMode(this.$modes[D]),A&&A();return}this.$modeId=D,d.loadModule(["mode",D],(function(j){if(!this.destroyed){if(this.$modeId!==D)return A&&A();this.$modes[D]&&!S?this.$onChangeMode(this.$modes[D]):j&&j.Mode&&(j=new j.Mode(S),S||(this.$modes[D]=j,j.$id=D),this.$onChangeMode(j)),A&&A()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},F.prototype.$onChangeMode=function(N,A){if(A||(this.$modeId=N.$id),this.$mode!==N){var S=this.$mode;this.$mode=N,this.$stopWorker(),this.$useWorker&&this.$startWorker();var D=N.getTokenizer();if(D.on!==void 0){var j=this.onReloadTokenizer.bind(this);D.on("update",j)}this.bgTokenizer.setTokenizer(D),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=N.tokenRe,this.nonTokenRe=N.nonTokenRe,A||(N.attachToSession&&N.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(N.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:S,mode:N}))}},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){d.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(A){A&&A.screenWidth>N&&(N=A.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 A=this.doc.getAllLines(),S=this.$rowLengthCache,D=0,j=0,U=this.$foldData[j],q=U?U.start.row:1/0,Q=A.length,te=0;te<Q;te++){if(te>q){if(te=U.end.row+1,te>=Q)break;U=this.$foldData[j++],q=U?U.start.row:1/0}S[te]==null&&(S[te]=this.$getStringScreenWidth(A[te])[0]),S[te]>D&&(D=S[te])}this.screenWidth=D}},F.prototype.getLine=function(N){return this.doc.getLine(N)},F.prototype.getLines=function(N,A){return this.doc.getLines(N,A)},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,A){return this.doc.insert(N,A)},F.prototype.remove=function(N){return this.doc.remove(N)},F.prototype.removeFullLines=function(N,A){return this.doc.removeFullLines(N,A)},F.prototype.undoChanges=function(N,A){if(N.length){this.$fromUndo=!0;for(var S=N.length-1;S!=-1;S--){var D=N[S];D.action=="insert"||D.action=="remove"?this.doc.revertDelta(D):D.folds&&this.addFolds(D.folds)}!A&&this.$undoSelect&&(N.selectionBefore?this.selection.fromJSON(N.selectionBefore):this.selection.setRange(this.$getUndoSelection(N,!0))),this.$fromUndo=!1}},F.prototype.redoChanges=function(N,A){if(N.length){this.$fromUndo=!0;for(var S=0;S<N.length;S++){var D=N[S];(D.action=="insert"||D.action=="remove")&&this.doc.$safeApplyDelta(D)}!A&&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,A){function S(Q){return A?Q.action!=="insert":Q.action==="insert"}for(var D,j,U=0;U<N.length;U++){var q=N[U];if(q.start){if(!D){S(q)?D=u.fromPoints(q.start,q.end):D=u.fromPoints(q.start,q.start);continue}S(q)?(j=q.start,D.compare(j.row,j.column)==-1&&D.setStart(j),j=q.end,D.compare(j.row,j.column)==1&&D.setEnd(j)):(j=q.start,D.compare(j.row,j.column)==-1&&(D=u.fromPoints(q.start,q.start)))}}return D},F.prototype.replace=function(N,A){return this.doc.replace(N,A)},F.prototype.moveText=function(N,A,S){var D=this.getTextRange(N),j=this.getFoldsInRange(N),U=u.fromPoints(A,A);if(!S){this.remove(N);var q=N.start.row-N.end.row,Q=q?-N.end.column:N.start.column-N.end.column;Q&&(U.start.row==N.end.row&&U.start.column>N.end.column&&(U.start.column+=Q),U.end.row==N.end.row&&U.end.column>N.end.column&&(U.end.column+=Q)),q&&U.start.row>=N.end.row&&(U.start.row+=q,U.end.row+=q)}if(U.end=this.insert(U.start,D),j.length){var te=N.start,de=U.start,q=de.row-te.row,Q=de.column-te.column;this.addFolds(j.map(function(he){return he=he.clone(),he.start.row==te.row&&(he.start.column+=Q),he.end.row==te.row&&(he.end.column+=Q),he.start.row+=q,he.end.row+=q,he}))}return U},F.prototype.indentRows=function(N,A,S){S=S.replace(/\t/g,this.getTabString());for(var D=N;D<=A;D++)this.doc.insertInLine({row:D,column:0},S)},F.prototype.outdentRows=function(N){for(var A=N.collapseRows(),S=new u(0,0,0,0),D=this.getTabSize(),j=A.start.row;j<=A.end.row;++j){var U=this.getLine(j);S.start.row=j,S.end.row=j;for(var q=0;q<D&&U.charAt(q)==" ";++q);q<D&&U.charAt(q)==" "?(S.start.column=q,S.end.column=q+1):(S.start.column=0,S.end.column=q),this.remove(S)}},F.prototype.$moveLines=function(N,A,S){if(N=this.getRowFoldStart(N),A=this.getRowFoldEnd(A),S<0){var D=this.getRowFoldStart(N+S);if(D<0)return 0;var j=D-N}else if(S>0){var D=this.getRowFoldEnd(A+S);if(D>this.doc.getLength()-1)return 0;var j=D-A}else{N=this.$clipRowToDocument(N),A=this.$clipRowToDocument(A);var j=A-N+1}var U=new u(N,0,A,Number.MAX_VALUE),q=this.getFoldsInRange(U).map(function(te){return te=te.clone(),te.start.row+=j,te.end.row+=j,te}),Q=S==0?this.doc.getLines(N,A):this.doc.removeFullLines(N,A);return this.doc.insertFullLines(N+j,Q),q.length&&this.addFolds(q),j},F.prototype.moveLinesUp=function(N,A){return this.$moveLines(N,A,-1)},F.prototype.moveLinesDown=function(N,A){return this.$moveLines(N,A,1)},F.prototype.duplicateLines=function(N,A){return this.$moveLines(N,A,0)},F.prototype.$clipRowToDocument=function(N){return Math.max(0,Math.min(N,this.doc.getLength()-1))},F.prototype.$clipColumnToRow=function(N,A){return A<0?0:Math.min(this.doc.getLine(N).length,A)},F.prototype.$clipPositionToDocument=function(N,A){if(A=Math.max(0,A),N<0)N=0,A=0;else{var S=this.doc.getLength();N>=S?(N=S-1,A=this.doc.getLine(S-1).length):A=Math.min(this.doc.getLine(N).length,A)}return{row:N,column:A}},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 A=this.doc.getLength()-1;return N.end.row>A?(N.end.row=A,N.end.column=this.doc.getLine(A).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 A=this.getLength();this.$wrapData=Array(A),this.$updateWrapData(0,A-1)}this._signal("changeWrapMode")}},F.prototype.getUseWrapMode=function(){return this.$useWrapMode},F.prototype.setWrapLimitRange=function(N,A){(this.$wrapLimitRange.min!==N||this.$wrapLimitRange.max!==A)&&(this.$wrapLimitRange={min:N,max:A},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},F.prototype.adjustWrapLimit=function(N,A){var S=this.$wrapLimitRange;S.max<0&&(S={min:A,max:A});var D=this.$constrainWrapLimit(N,S.min,S.max);return D!=this.$wrapLimit&&D>1?(this.$wrapLimit=D,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},F.prototype.$constrainWrapLimit=function(N,A,S){return A&&(N=Math.max(A,N)),S&&(N=Math.min(S,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 A=this.$useWrapMode,S=N.action,D=N.start,j=N.end,U=D.row,q=j.row,Q=q-U,te=null;if(this.$updating=!0,Q!=0)if(S==="remove"){this[A?"$wrapData":"$rowLengthCache"].splice(U,Q);var de=this.$foldData;te=this.getFoldsInRange(N),this.removeFolds(te);var ne=this.getFoldLine(j.row),ce=0;if(ne){ne.addRemoveChars(j.row,j.column,D.column-j.column),ne.shiftRow(-Q);var he=this.getFoldLine(U);he&&he!==ne&&(he.merge(ne),ne=he),ce=de.indexOf(ne)+1}for(ce;ce<de.length;ce++){var ne=de[ce];ne.start.row>=j.row&&ne.shiftRow(-Q)}q=U}else{var ue=Array(Q);ue.unshift(U,0);var ve=A?this.$wrapData:this.$rowLengthCache;ve.splice.apply(ve,ue);var de=this.$foldData,ne=this.getFoldLine(U),ce=0;if(ne){var Me=ne.range.compareInside(D.row,D.column);Me==0?(ne=ne.split(D.row,D.column),ne&&(ne.shiftRow(Q),ne.addRemoveChars(q,0,j.column-D.column))):Me==-1&&(ne.addRemoveChars(U,0,j.column-D.column),ne.shiftRow(Q)),ce=de.indexOf(ne)+1}for(ce;ce<de.length;ce++){var ne=de[ce];ne.start.row>=U&&ne.shiftRow(Q)}}else{Q=Math.abs(N.start.column-N.end.column),S==="remove"&&(te=this.getFoldsInRange(N),this.removeFolds(te),Q=-Q);var ne=this.getFoldLine(U);ne&&ne.addRemoveChars(U,D.column,Q)}return A&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,A?this.$updateWrapData(U,q):this.$updateRowLengthCache(U,q),te},F.prototype.$updateRowLengthCache=function(N,A){this.$rowLengthCache[N]=null,this.$rowLengthCache[A]=null},F.prototype.$updateWrapData=function(N,A){var S=this.doc.getAllLines(),D=this.getTabSize(),j=this.$wrapData,U=this.$wrapLimit,q,Q,te=N;for(A=Math.min(A,S.length-1);te<=A;)Q=this.getFoldLine(te,Q),Q?(q=[],Q.walk((function(de,ne,ce,he){var ue;if(de!=null){ue=this.$getDisplayTokens(de,q.length),ue[0]=k;for(var ve=1;ve<ue.length;ve++)ue[ve]=C}else ue=this.$getDisplayTokens(S[ne].substring(he,ce),q.length);q=q.concat(ue)}).bind(this),Q.end.row,S[Q.end.row].length+1),j[Q.start.row]=this.$computeWrapSplits(q,U,D),te=Q.end.row+1):(q=this.$getDisplayTokens(S[te]),j[te]=this.$computeWrapSplits(q,U,D),te++)},F.prototype.$computeWrapSplits=function(N,A,S){if(N.length==0)return[];var D=[],j=N.length,U=0,q=0,Q=this.$wrapAsCode,te=this.$indentedSoftWrap,de=A<=Math.max(2*S,8)||te===!1?0:Math.floor(A/2);function ne(){var Me=0;if(de===0)return Me;if(te)for(var Te=0;Te<N.length;Te++){var Ee=N[Te];if(Ee==L)Me+=1;else if(Ee==R)Me+=S;else{if(Ee==I)continue;break}}return Q&&te!==!1&&(Me+=S),Math.min(Me,de)}function ce(Me){for(var Te=Me-U,Ee=U;Ee<Me;Ee++){var Je=N[Ee];(Je===12||Je===2)&&(Te-=1)}D.length||(he=ne(),D.indent=he),q+=Te,D.push(q),U=Me}for(var he=0;j-U>A-he;){var ue=U+A-he;if(N[ue-1]>=L&&N[ue]>=L){ce(ue);continue}if(N[ue]==k||N[ue]==C){for(ue;ue!=U-1&&N[ue]!=k;ue--);if(ue>U){ce(ue);continue}for(ue=U+A,ue;ue<N.length&&N[ue]==C;ue++);if(ue==N.length)break;ce(ue);continue}for(var ve=Math.max(ue-(A-(A>>2)),U-1);ue>ve&&N[ue]<k;)ue--;if(Q){for(;ue>ve&&N[ue]<k;)ue--;for(;ue>ve&&N[ue]==O;)ue--}else for(;ue>ve&&N[ue]<L;)ue--;if(ue>ve){ce(++ue);continue}ue=U+A,N[ue]==M&&ue--,ce(ue-he)}return D},F.prototype.$getDisplayTokens=function(N,A){var S=[],D;A=A||0;for(var j=0;j<N.length;j++){var U=N.charCodeAt(j);if(U==9){D=this.getScreenTabSize(S.length+A),S.push(R);for(var q=1;q<D;q++)S.push(I)}else U==32?S.push(L):U>39&&U<48||U>57&&U<64?S.push(O):U>=4352&&z(U)?S.push(E,M):S.push(E)}return S},F.prototype.$getStringScreenWidth=function(N,A,S){if(A==0)return[0,0];A==null&&(A=1/0),S=S||0;var D,j;for(j=0;j<N.length&&(D=N.charCodeAt(j),D==9?S+=this.getScreenTabSize(S):D>=4352&&z(D)?S+=2:S+=1,!(S>A));j++);return[S,j]},F.prototype.getRowLength=function(N){var A=1;return this.lineWidgets&&(A+=this.lineWidgets[N]&&this.lineWidgets[N].rowCount||0),!this.$useWrapMode||!this.$wrapData[N]?A:this.$wrapData[N].length+A},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 A=this.screenToDocumentPosition(N,Number.MAX_VALUE),S=this.$wrapData[A.row];return S.length&&S[0]<A.column?S.indent:0}else return 0},F.prototype.getScreenLastRowColumn=function(N){var A=this.screenToDocumentPosition(N,Number.MAX_VALUE);return this.documentToScreenColumn(A.row,A.column)},F.prototype.getDocumentLastRowColumn=function(N,A){var S=this.documentToScreenRow(N,A);return this.getScreenLastRowColumn(S)},F.prototype.getDocumentLastRowColumnPosition=function(N,A){var S=this.documentToScreenRow(N,A);return this.screenToDocumentPosition(S,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,A){return this.screenToDocumentPosition(N,A).row},F.prototype.screenToDocumentColumn=function(N,A){return this.screenToDocumentPosition(N,A).column},F.prototype.screenToDocumentPosition=function(N,A,S){if(N<0)return{row:0,column:0};var D,ce=0,j=0,U,ne=0,q=0,Q=this.$screenRowCache,te=this.$getRowCacheIndex(Q,N),de=Q.length;if(de&&te>=0)var ne=Q[te],ce=this.$docRowCache[te],he=N>Q[de-1];else var he=!de;for(var ue=this.getLength()-1,ve=this.getNextFoldLine(ce),Me=ve?ve.start.row:1/0;ne<=N&&(q=this.getRowLength(ce),!(ne+q>N||ce>=ue));)ne+=q,ce++,ce>Me&&(ce=ve.end.row+1,ve=this.getNextFoldLine(ce,ve),Me=ve?ve.start.row:1/0),he&&(this.$docRowCache.push(ce),this.$screenRowCache.push(ne));if(ve&&ve.start.row<=ce)D=this.getFoldDisplayLine(ve),ce=ve.start.row;else{if(ne+q<=N||ce>ue)return{row:ue,column:this.getLine(ue).length};D=this.getLine(ce),ve=null}var Te=0,Ee=Math.floor(N-ne);if(this.$useWrapMode){var Je=this.$wrapData[ce];Je&&(U=Je[Ee],Ee>0&&Je.length&&(Te=Je.indent,j=Je[Ee-1]||Je[Je.length-1],D=D.substring(j)))}return S!==void 0&&this.$bidiHandler.isBidiRow(ne+Ee,ce,Ee)&&(A=this.$bidiHandler.offsetToCol(S)),j+=this.$getStringScreenWidth(D,A-Te)[1],this.$useWrapMode&&j>=U&&(j=U-1),ve?ve.idxToPosition(j):{row:ce,column:j}},F.prototype.documentToScreenPosition=function(N,A){if(typeof A>"u")var S=this.$clipPositionToDocument(N.row,N.column);else S=this.$clipPositionToDocument(N,A);N=S.row,A=S.column;var ne=0,D=null,j=null;j=this.getFoldAt(N,A,1),j&&(N=j.start.row,A=j.start.column);var U,de=0,q=this.$docRowCache,Q=this.$getRowCacheIndex(q,N),te=q.length;if(te&&Q>=0)var de=q[Q],ne=this.$screenRowCache[Q],ce=N>q[te-1];else var ce=!te;for(var he=this.getNextFoldLine(de),ue=he?he.start.row:1/0;de<N;){if(de>=ue){if(U=he.end.row+1,U>N)break;he=this.getNextFoldLine(U,he),ue=he?he.start.row:1/0}else U=de+1;ne+=this.getRowLength(de),de=U,ce&&(this.$docRowCache.push(de),this.$screenRowCache.push(ne))}var ve="";he&&de>=ue?(ve=this.getFoldDisplayLine(he,N,A),D=he.start.row):(ve=this.getLine(N).substring(0,A),D=N);var Me=0;if(this.$useWrapMode){var Te=this.$wrapData[D];if(Te){for(var Ee=0;ve.length>=Te[Ee];)ne++,Ee++;ve=ve.substring(Te[Ee-1]||0,ve.length),Me=Ee>0?Te.indent:0}}return this.lineWidgets&&this.lineWidgets[de]&&this.lineWidgets[de].rowsAbove&&(ne+=this.lineWidgets[de].rowsAbove),{row:ne,column:Me+this.$getStringScreenWidth(ve)[0]}},F.prototype.documentToScreenColumn=function(N,A){return this.documentToScreenPosition(N,A).column},F.prototype.documentToScreenRow=function(N,A){return this.documentToScreenPosition(N,A).row},F.prototype.getScreenLength=function(){var N=0,A=null;if(this.$useWrapMode)for(var S=this.$wrapData.length,D=0,j=0,A=this.$foldData[j++],U=A?A.start.row:1/0;D<S;){var q=this.$wrapData[D];N+=q?q.length+1:1,D++,D>U&&(D=A.end.row+1,A=this.$foldData[j++],U=A?A.start.row:1/0)}else{N=this.getLength();for(var Q=this.$foldData,j=0;j<Q.length;j++)A=Q[j],N-=A.end.row-A.start.row}return this.lineWidgets&&(N+=this.$getWidgetScreenLength()),N},F.prototype.$setFontMetrics=function(N){this.$enableVarChar&&(this.$getStringScreenWidth=function(A,S,D){if(S===0)return[0,0];S||(S=1/0),D=D||0;var j,U;for(U=0;U<A.length&&(j=A.charAt(U),j===" "?D+=this.getScreenTabSize(D):D+=N.getCharacterWidth(j),!(D>S));U++);return[D,U]})},F.prototype.getPrecedingCharacter=function(){var N=this.selection.getCursor();if(N.column===0)return N.row===0?"":this.doc.getNewLineCharacter();var A=this.getLine(N.row);return A[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=d.$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=z,p.implement(x.prototype,g);var E=1,M=2,k=3,C=4,O=9,L=10,R=11,I=12;function z(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}n("./edit_session/folding").Folding.call(x.prototype),n("./edit_session/bracket_match").BracketMatch.call(x.prototype),d.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}}),i.EditSession=x}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(n,i,h){var p=n("./lib/lang"),m=n("./lib/oop"),b=n("./range").Range,d=(function(){function u(){this.$options={}}return u.prototype.set=function(l){return m.mixin(this.$options,l),this},u.prototype.getOptions=function(){return p.copyObject(this.$options)},u.prototype.setOptions=function(l){this.$options=l},u.prototype.find=function(l){var s=this.$options,c=this.$matchIterator(l,s);if(!c)return!1;var f=null;return c.forEach(function(w,x,E,M){return f=new b(w,x,E,M),x==M&&s.start&&s.start.start&&s.skipCurrent!=!1&&f.isEqual(s.start)?(f=null,!1):!0}),f},u.prototype.findAll=function(l){var s=this.$options;if(!s.needle)return[];this.$assembleRegExp(s);var c=s.range,f=c?l.getLines(c.start.row,c.end.row):l.doc.getAllLines(),w=[],x=s.re;if(s.$isMultiLine){var E=x.length,M=f.length-E,k;e:for(var C=x.offset||0;C<=M;C++){for(var O=0;O<E;O++)if(f[C+O].search(x[O])==-1)continue e;var L=f[C],R=f[C+E-1],I=L.length-L.match(x[0])[0].length,z=R.match(x[E-1])[0].length;k&&k.end.row===C&&k.end.column>I||(w.push(k=new b(C,I,C+E-1,z)),E>2&&(C=C+E-2))}}else for(var F,N=0;N<f.length;N++)if(this.$isMultilineSearch(s)){var A=f.length-1;if(F=this.$multiLineForward(l,x,N,A),F){var S=F.endRow<=A?F.endRow-1:A;S>N&&(N=S),w.push(new b(F.startRow,F.startCol,F.endRow,F.endCol))}}else{F=p.getMatchOffsets(f[N],x);for(var O=0;O<F.length;O++){var D=F[O];w.push(new b(N,D.offset,N,D.offset+D.length))}}if(c){for(var j=c.start.column,U=c.end.column,N=0,O=w.length-1;N<O&&w[N].start.column<j&&w[N].start.row==0;)N++;for(var q=c.end.row-c.start.row;N<O&&w[O].end.column>U&&w[O].end.row==q;)O--;for(w=w.slice(N,O+1),N=0,O=w.length;N<O;N++)w[N].start.row+=c.start.row,w[N].end.row+=c.start.row}return w},u.prototype.parseReplaceString=function(l){for(var s={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},c="",f=0,w=l.length;f<w;f++){var x=l.charCodeAt(f);if(x===s.Backslash){if(f++,f>=w){c+="\\";break}var E=l.charCodeAt(f);switch(E){case s.Backslash:c+="\\";break;case s.n:c+=`
199
+ `;break;case s.t:c+=" ";break}continue}if(x===s.DollarSign){if(f++,f>=w){c+="$";break}var M=l.charCodeAt(f);if(M===s.DollarSign){c+="$$";continue}if(M===s.Digit0||M===s.Ampersand){c+="$&";continue}if(s.Digit1<=M&&M<=s.Digit9){c+="$"+l[f];continue}}c+=l[f]}return c||l},u.prototype.replace=function(l,s){var c=this.$options,f=this.$assembleRegExp(c);if(c.$isMultiLine)return s;if(f){var w=this.$isMultilineSearch(c);w&&(l=l.replace(/\r\n|\r|\n/g,`
200
+ `));var x=f.exec(l);if(!x||!w&&x[0].length!=l.length)return null;if(s=c.regExp?this.parseReplaceString(s):s.replace(/\$/g,"$$$$"),s=l.replace(f,s),c.preserveCase){s=s.split("");for(var E=Math.min(l.length,l.length);E--;){var M=l[E];M&&M.toLowerCase()!=M?s[E]=s[E].toUpperCase():s[E]=s[E].toLowerCase()}s=s.join("")}return s}},u.prototype.$assembleRegExp=function(l,s){if(l.needle instanceof RegExp)return l.re=l.needle;var c=l.needle;if(!l.needle)return l.re=!1;l.regExp||(c=p.escapeRegExp(c));var f=l.caseSensitive?"gm":"gmi";try{new RegExp(c,"u"),l.$supportsUnicodeFlag=!0,f+="u"}catch{l.$supportsUnicodeFlag=!1}if(l.wholeWord&&(c=g(c,l)),l.$isMultiLine=!s&&/[\n\r]/.test(c),l.$isMultiLine)return l.re=this.$assembleMultilineRegExp(c,f);try{var w=new RegExp(c,f)}catch{w=!1}return l.re=w},u.prototype.$assembleMultilineRegExp=function(l,s){for(var c=l.replace(/\r\n|\r|\n/g,`$
201
+ ^`).split(`
202
+ `),f=[],w=0;w<c.length;w++)try{f.push(new RegExp(c[w],s))}catch{return!1}return f},u.prototype.$isMultilineSearch=function(l){return l.re&&/\\r\\n|\\r|\\n/.test(l.re.source)&&l.regExp&&!l.$isMultiLine},u.prototype.$multiLineForward=function(l,s,c,f){for(var w,x=a(l,c),E=c;E<=f;){for(var M=0;M<x&&!(E>f);M++){var k=l.getLine(E++);w=w==null?k:w+`
203
+ `+k}var C=s.exec(w);if(s.lastIndex=0,C){var O=w.slice(0,C.index).split(`
204
+ `),L=C[0].split(`
205
+ `),R=c+O.length-1,I=O[O.length-1].length,z=R+L.length-1,F=L.length==1?I+L[0].length:L[L.length-1].length;return{startRow:R,startCol:I,endRow:z,endCol:F}}}return null},u.prototype.$multiLineBackward=function(l,s,c,f,w){for(var x,E=a(l,f),M=l.getLine(f).length-c,k=f;k>=w;){for(var C=0;C<E&&k>=w;C++){var O=l.getLine(k--);x=x==null?O:O+`
206
+ `+x}var L=o(x,s,M);if(L){var R=x.slice(0,L.index).split(`
207
+ `),I=L[0].split(`
208
+ `),z=k+R.length,F=R[R.length-1].length,N=z+I.length-1,A=I.length==1?F+I[0].length:I[I.length-1].length;return{startRow:z,startCol:F,endRow:N,endCol:A}}}return null},u.prototype.$matchIterator=function(l,s){var c=this.$assembleRegExp(s);if(!c)return!1;var f=this.$isMultilineSearch(s),w=this.$multiLineForward,x=this.$multiLineBackward,E=s.backwards==!0,M=s.skipCurrent!=!1,k=c.unicode,C=s.range,O=s.start;O||(O=C?C[E?"end":"start"]:l.selection.getRange()),O.start&&(O=O[M!=E?"end":"start"]);var L=C?C.start.row:0,R=C?C.end.row:l.getLength()-1;if(E)var I=function(N){var A=O.row;if(!F(A,O.column,N)){for(A--;A>=L;A--)if(F(A,Number.MAX_VALUE,N))return;if(s.wrap!=!1){for(A=R,L=O.row;A>=L;A--)if(F(A,Number.MAX_VALUE,N))return}}};else var I=function(N){var A=O.row;if(!F(A,O.column,N)){for(A=A+1;A<=R;A++)if(F(A,0,N))return;if(s.wrap!=!1){for(A=L,R=O.row;A<=R;A++)if(F(A,0,N))return}}};if(s.$isMultiLine)var z=c.length,F=function(N,A,S){var D=E?N-z+1:N;if(!(D<0||D+z>l.getLength())){var j=l.getLine(D),U=j.search(c[0]);if(!(!E&&U<A||U===-1)){for(var q=1;q<z;q++)if(j=l.getLine(D+q),j.search(c[q])==-1)return;var Q=j.match(c[z-1])[0].length;if(!(E&&Q>A)&&S(D,U,D+z-1,Q))return!0}}};else if(E)var F=function(N,A,S){if(f){var D=x(l,c,A,N,L);if(!D)return!1;if(S(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else{var j=l.getLine(N),U=[],q,Q=0;for(c.lastIndex=0;q=c.exec(j);){var te=q[0].length;if(Q=q.index,!te){if(Q>=j.length)break;c.lastIndex=Q+=p.skipEmptyMatch(j,Q,k)}if(q.index+te>A)break;U.push(q.index,te)}for(var de=U.length-1;de>=0;de-=2){var ne=U[de-1],te=U[de];if(S(N,ne,N,ne+te))return!0}}};else var F=function(N,A,S){if(c.lastIndex=A,f){var D=w(l,c,N,R);if(D){var j=D.endRow<=R?D.endRow-1:R;j>N&&(N=j)}if(!D)return!1;if(S(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else for(var U=l.getLine(N),q,Q;Q=c.exec(U);){var te=Q[0].length;if(q=Q.index,S(N,q,N,q+te))return!0;if(!te&&(c.lastIndex=q+=p.skipEmptyMatch(U,q,k),q>=U.length))return!1}};return{forEach:I}},u})();function g(u,l){var s=p.supportsLookbehind();function c(E,M){M===void 0&&(M=!0);var k=s&&l.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return k.test(E)||l.regExp?s&&l.$supportsUnicodeFlag?M?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var f=Array.from(u),w=f[0],x=f[f.length-1];return c(w)+u+c(x,!1)}function o(u,l,s){for(var c=null,f=0;f<=u.length;){l.lastIndex=f;var w=l.exec(u);if(!w)break;var x=w.index+w[0].length;if(x>u.length-s)break;(!c||x>c.index+c[0].length)&&(c=w),f=w.index+1}return c}function a(u,l){var s=5e3,c={row:l,column:0},f=u.doc.positionToIndex(c),w=f+s,x=u.doc.indexToPosition(w),E=x.row;return E+1}i.Search=d}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,i,h){var p=this&&this.__extends||(function(){var u=function(l,s){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,f){c.__proto__=f}||function(c,f){for(var w in f)Object.prototype.hasOwnProperty.call(f,w)&&(c[w]=f[w])},u(l,s)};return function(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");u(l,s);function c(){this.constructor=l}l.prototype=s===null?Object.create(s):(c.prototype=s.prototype,new c)}})(),m=n("../lib/keys"),b=n("../lib/useragent"),d=m.KEY_MODS,g=(function(){function u(l,s){this.$init(l,s,!1)}return u.prototype.$init=function(l,s,c){this.platform=s||(b.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(l),this.$singleCommand=c},u.prototype.addCommand=function(l){this.commands[l.name]&&this.removeCommand(l),this.commands[l.name]=l,l.bindKey&&this._buildKeyHash(l)},u.prototype.removeCommand=function(l,s){var c=l&&(typeof l=="string"?l:l.name);l=this.commands[c],s||delete this.commands[c];var f=this.commandKeyBinding;for(var w in f){var x=f[w];if(x==l)delete f[w];else if(Array.isArray(x)){var E=x.indexOf(l);E!=-1&&(x.splice(E,1),x.length==1&&(f[w]=x[0]))}}},u.prototype.bindKey=function(l,s,c){if(typeof l=="object"&&l&&(c==null&&(c=l.position),l=l[this.platform]),!!l){if(typeof s=="function")return this.addCommand({exec:s,bindKey:l,name:s.name||l});l.split("|").forEach(function(f){var w="";if(f.indexOf(" ")!=-1){var x=f.split(/\s+/);f=x.pop(),x.forEach(function(k){var C=this.parseKeys(k),O=d[C.hashId]+C.key;w+=(w?" ":"")+O,this._addCommandToBinding(w,"chainKeys")},this),w+=" "}var E=this.parseKeys(f),M=d[E.hashId]+E.key;this._addCommandToBinding(w+M,s,c)},this)}},u.prototype._addCommandToBinding=function(l,s,c){var f=this.commandKeyBinding,w;if(!s)delete f[l];else if(!f[l]||this.$singleCommand)f[l]=s;else{Array.isArray(f[l])?(w=f[l].indexOf(s))!=-1&&f[l].splice(w,1):f[l]=[f[l]],typeof c!="number"&&(c=o(s));var x=f[l];for(w=0;w<x.length;w++){var E=x[w],M=o(E);if(M>c)break}x.splice(w,0,s)}},u.prototype.addCommands=function(l){l&&Object.keys(l).forEach(function(s){var c=l[s];if(c){if(typeof c=="string")return this.bindKey(c,s);typeof c=="function"&&(c={exec:c}),typeof c=="object"&&(c.name||(c.name=s),this.addCommand(c))}},this)},u.prototype.removeCommands=function(l){Object.keys(l).forEach(function(s){this.removeCommand(l[s])},this)},u.prototype.bindKeys=function(l){Object.keys(l).forEach(function(s){this.bindKey(s,l[s])},this)},u.prototype._buildKeyHash=function(l){this.bindKey(l.bindKey,l)},u.prototype.parseKeys=function(l){var s=l.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(M){return M}),c=s.pop(),f=m[c];if(m.FUNCTION_KEYS[f])c=m.FUNCTION_KEYS[f].toLowerCase();else if(s.length){if(s.length==1&&s[0]=="shift")return{key:c.toUpperCase(),hashId:-1}}else return{key:c,hashId:-1};for(var w=0,x=s.length;x--;){var E=m.KEY_MODS[s[x]];if(E==null)return typeof console<"u"&&console.error("invalid modifier "+s[x]+" in "+l),!1;w|=E}return{key:c,hashId:w}},u.prototype.findKeyCommand=function(l,s){var c=d[l]+s;return this.commandKeyBinding[c]},u.prototype.handleKeyboard=function(l,s,c,f){if(!(f<0)){var w=d[s]+c,x=this.commandKeyBinding[w];return l.$keyChain&&(l.$keyChain+=" "+w,x=this.commandKeyBinding[l.$keyChain]||x),x&&(x=="chainKeys"||x[x.length-1]=="chainKeys")?(l.$keyChain=l.$keyChain||w,{command:"null"}):(l.$keyChain&&((!s||s==4)&&c.length==1?l.$keyChain=l.$keyChain.slice(0,-w.length-1):(s==-1||f>0)&&(l.$keyChain="")),{command:x})}},u.prototype.getStatusText=function(l,s){return s.$keyChain||""},u})();function o(u){return typeof u=="object"&&u.bindKey&&u.bindKey.position||(u.isDefault?-100:0)}var a=(function(u){p(l,u);function l(s,c){var f=u.call(this,s,c)||this;return f.$singleCommand=!0,f}return l})(g);a.call=function(u,l,s){g.prototype.$init.call(u,l,s,!0)},g.call=function(u,l,s){g.prototype.$init.call(u,l,s,!1)},i.HashHandler=a,i.MultiHashHandler=g}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(n,i,h){var p=this&&this.__extends||(function(){var o=function(a,u){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,s){l.__proto__=s}||function(l,s){for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(l[c]=s[c])},o(a,u)};return function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");o(a,u);function l(){this.constructor=a}a.prototype=u===null?Object.create(u):(l.prototype=u.prototype,new l)}})(),m=n("../lib/oop"),b=n("../keyboard/hash_handler").MultiHashHandler,d=n("../lib/event_emitter").EventEmitter,g=(function(o){p(a,o);function a(u,l){var s=o.call(this,l,u)||this;return s.byName=s.commands,s.setDefaultHandler("exec",function(c){return c.args?c.command.exec(c.editor,c.args,c.event,!1):c.command.exec(c.editor,{},c.event,!0)}),s}return a.prototype.exec=function(u,l,s){if(Array.isArray(u)){for(var c=u.length;c--;)if(this.exec(u[c],l,s))return!0;return!1}typeof u=="string"&&(u=this.commands[u]);var f={editor:l,command:u,args:s};return this.canExecute(u,l)?(f.returnValue=this._emit("exec",f),this._signal("afterExec",f),f.returnValue!==!1):(this._signal("commandUnavailable",f),!1)},a.prototype.canExecute=function(u,l){return typeof u=="string"&&(u=this.commands[u]),!(!u||l&&l.$readOnly&&!u.readOnly||this.$checkCommandState!=!1&&u.isAvailable&&!u.isAvailable(l))},a.prototype.toggleRecording=function(u){if(!this.$inReplay)return u&&u._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(l){this.macro.push([l.command,l.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},a.prototype.replay=function(u){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(u);try{this.$inReplay=!0,this.macro.forEach(function(l){typeof l=="string"?this.exec(l,u):this.exec(l[0],u,l[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function(u){return u.map(function(l){return typeof l[0]!="string"&&(l[0]=l[0].name),l[1]||(l=l[0]),l})},a})(b);m.implement(g.prototype,d),i.CommandManager=g}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(n,i,h){var p=n("../lib/lang"),m=n("../config"),b=n("../range").Range;function d(o,a){return{win:o,mac:a}}i.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:d("Ctrl-,","Command-,"),exec:function(o){m.loadModule("ace/ext/settings_menu",function(a){a.init(o),o.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:d("Alt-E","F4"),exec:function(o){m.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(o,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:d("Alt-Shift-E","Shift-F4"),exec:function(o){m.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(o,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:d("Ctrl-A","Command-A"),exec:function(o){o.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:d(null,"Ctrl-L"),exec:function(o){o.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:d("Ctrl-L","Command-L"),exec:function(o,a){typeof a=="number"&&!isNaN(a)&&o.gotoLine(a),o.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:d("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(o){o.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:d("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(o){o.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:d("F2","F2"),exec:function(o){o.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:d("Alt-F2","Alt-F2"),exec:function(o){o.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:d(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:d(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:d("Alt-0","Command-Option-0"),exec:function(o){o.session.foldAll(),o.session.unfold(o.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:d("Alt-Shift-0","Command-Option-Shift-0"),exec:function(o){o.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:d("Ctrl-K","Command-G"),exec:function(o){o.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:d("Ctrl-Shift-K","Command-Shift-G"),exec:function(o){o.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:d("Alt-K","Ctrl-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:d("Alt-Shift-K","Ctrl-Shift-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:d("Ctrl-F","Command-F"),exec:function(o){m.loadModule("ace/ext/searchbox",function(a){a.Search(o)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(o){o.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:d("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(o){o.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:d("Ctrl-Home","Command-Home|Command-Up"),exec:function(o){o.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:d("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(o){o.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:d("Up","Up|Ctrl-P"),exec:function(o,a){o.navigateUp(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:d("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(o){o.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:d("Ctrl-End","Command-End|Command-Down"),exec:function(o){o.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:d("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(o){o.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:d("Down","Down|Ctrl-N"),exec:function(o,a){o.navigateDown(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:d("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(o){o.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:d("Ctrl-Left","Option-Left"),exec:function(o){o.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:d("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:d("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(o){o.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:d("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(o){o.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:d("Left","Left|Ctrl-B"),exec:function(o,a){o.navigateLeft(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:d("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(o){o.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:d("Ctrl-Right","Option-Right"),exec:function(o){o.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:d("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:d("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(o){o.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:d("Shift-Right","Shift-Right"),exec:function(o){o.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:d("Right","Right|Ctrl-F"),exec:function(o,a){o.navigateRight(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(o){o.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:d(null,"Option-PageDown"),exec:function(o){o.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:d("PageDown","PageDown|Ctrl-V"),exec:function(o){o.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(o){o.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:d(null,"Option-PageUp"),exec:function(o){o.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(o){o.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:d("Ctrl-Up",null),exec:function(o){o.renderer.scrollBy(0,-2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:d("Ctrl-Down",null),exec:function(o){o.renderer.scrollBy(0,2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:d("Ctrl-Alt-E","Command-Option-E"),exec:function(o){o.commands.toggleRecording(o)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:d("Ctrl-Shift-E","Command-Shift-E"),exec:function(o){o.commands.replay(o)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:d("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(o){o.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:d("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(o){o.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:d("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(o){o.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:d(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(o){},readOnly:!0},{name:"cut",description:"Cut",exec:function(o){var a=o.$copyWithEmptySelection&&o.selection.isEmpty(),u=a?o.selection.getLineRange():o.selection.getRange();o._emit("cut",u),u.isEmpty()||o.session.remove(u),o.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(o,a){o.$handlePaste(a)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:d("Ctrl-D","Command-D"),exec:function(o){o.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:d("Ctrl-Shift-D","Command-Shift-D"),exec:function(o){o.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:d("Ctrl-Alt-S","Command-Alt-S"),exec:function(o){o.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:d("Ctrl-/","Command-/"),exec:function(o){o.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:d("Ctrl-Shift-/","Command-Shift-/"),exec:function(o){o.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:d("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(o){o.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:d("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(o){o.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:d("Ctrl-H","Command-Option-F"),exec:function(o){m.loadModule("ace/ext/searchbox",function(a){a.Search(o,!0)})}},{name:"undo",description:"Undo",bindKey:d("Ctrl-Z","Command-Z"),exec:function(o){o.undo()}},{name:"redo",description:"Redo",bindKey:d("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(o){o.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:d("Alt-Shift-Up","Command-Option-Up"),exec:function(o){o.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:d("Alt-Up","Option-Up"),exec:function(o){o.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:d("Alt-Shift-Down","Command-Option-Down"),exec:function(o){o.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:d("Alt-Down","Option-Down"),exec:function(o){o.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:d("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(o){o.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:d("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(o){o.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:d("Shift-Delete",null),exec:function(o){if(o.selection.isEmpty())o.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:d("Alt-Backspace","Command-Backspace"),exec:function(o){o.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:d("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(o){o.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:d("Ctrl-Shift-Backspace",null),exec:function(o){var a=o.selection.getRange();a.start.column=0,o.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:d("Ctrl-Shift-Delete",null),exec:function(o){var a=o.selection.getRange();a.end.column=Number.MAX_VALUE,o.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:d("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(o){o.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:d("Ctrl-Delete","Alt-Delete"),exec:function(o){o.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:d("Shift-Tab","Shift-Tab"),exec:function(o){o.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:d("Tab","Tab"),exec:function(o){o.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:d("Ctrl-[","Ctrl-["),exec:function(o){o.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:d("Ctrl-]","Ctrl-]"),exec:function(o){o.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(o,a){o.insert(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(o,a){o.insert(p.stringRepeat(a.text||"",a.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:d(null,"Ctrl-O"),exec:function(o){o.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:d("Alt-Shift-X","Ctrl-T"),exec:function(o){o.transposeLetters()},multiSelectAction:function(o){o.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:d("Ctrl-U","Ctrl-U"),exec:function(o){o.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:d("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(o){o.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:d(null,null),exec:function(o){o.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:d("Ctrl-Shift-L","Command-Shift-L"),exec:function(o){var a=o.selection.getRange();a.start.column=a.end.column=0,a.end.row++,o.selection.setRange(a,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:d("Ctrl+F3","F3"),exec:function(o){o.openLink()}},{name:"joinlines",description:"Join lines",bindKey:d(null,null),exec:function(o){for(var a=o.selection.isBackwards(),u=a?o.selection.getSelectionLead():o.selection.getSelectionAnchor(),l=a?o.selection.getSelectionAnchor():o.selection.getSelectionLead(),s=o.session.doc.getLine(u.row).length,c=o.session.doc.getTextRange(o.selection.getRange()),f=c.replace(/\n\s*/," ").length,w=o.session.doc.getLine(u.row),x=u.row+1;x<=l.row+1;x++){var E=p.stringTrimLeft(p.stringTrimRight(o.session.doc.getLine(x)));E.length!==0&&(E=" "+E),w+=E}l.row+1<o.session.doc.getLength()-1&&(w+=o.session.doc.getNewLineCharacter()),o.clearSelection(),o.session.doc.replace(new b(u.row,0,l.row+2,0),w),f>0?(o.selection.moveCursorTo(u.row,u.column),o.selection.selectTo(u.row,u.column+f)):(s=o.session.doc.getLine(u.row).length>s?s+1:s,o.selection.moveCursorTo(u.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:d(null,null),exec:function(o){var a=o.session.doc.getLength()-1,u=o.session.doc.getLine(a).length,l=o.selection.rangeList.ranges,s=[];l.length<1&&(l=[o.selection.getRange()]);for(var c=0;c<l.length;c++)c==l.length-1&&(l[c].end.row===a&&l[c].end.column===u||s.push(new b(l[c].end.row,l[c].end.column,a,u))),c===0?l[c].start.row===0&&l[c].start.column===0||s.push(new b(0,0,l[c].start.row,l[c].start.column)):s.push(new b(l[c-1].end.row,l[c-1].end.column,l[c].start.row,l[c].start.column));o.exitMultiSelectMode(),o.clearSelection();for(var c=0;c<s.length;c++)o.selection.addRange(s[c],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(o){o.selection.clearSelection(),o.navigateLineEnd(),o.insert(`
209
+ `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(o){o.selection.clearSelection();var a=o.getCursorPosition();o.selection.moveTo(a.row-1,Number.MAX_VALUE),o.insert(`
210
+ `),a.row===0&&o.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(o){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),o.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:d("F1","F1"),exec:function(o){o.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:d(null,null),exec:function(o){o.prompt({$type:"modes"})},readOnly:!0}];for(var g=1;g<9;g++)i.commands.push({name:"foldToLevel"+g,description:"Fold To Level "+g,level:g,exec:function(o){o.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(n,i,h){var p=n("../lib/keys"),m=n("../mouse/default_gutter_handler").GutterTooltip,b=(function(){function g(o){this.editor=o,this.gutterLayer=o.renderer.$gutterLayer,this.element=o.renderer.$gutter,this.lines=o.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new m(this.editor)}return g.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},g.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},g.prototype.$onGutterKeyDown=function(o){if(this.annotationTooltip.isOpen){o.preventDefault(),o.keyCode===p.escape&&this.annotationTooltip.hideTooltip();return}if(o.target===this.element){if(o.keyCode!=p.enter)return;o.preventDefault();var a=this.editor.getCursorPosition().row;this.editor.isRowVisible(a)||this.editor.scrollToLine(a,!0,!0),setTimeout((function(){var u=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),l=this.$findNearestFoldLaneWidget(u),s=this.$findNearestAnnotation(u);if(!(l===null&&s===null)){var c=this.$findClosestNumber(l,s,u);if(c===l)if(this.activeLane="fold",this.activeRowIndex=l,this.$isCustomWidgetVisible(l)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=s,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(o),setTimeout((function(){this.editor._signal("gutterkeydown",new d(o,this))}).bind(this),10)},g.prototype.$handleGutterKeyboardInteraction=function(o){if(o.keyCode===p.tab){o.preventDefault();return}if(o.keyCode===p.escape){o.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(o.keyCode===p.up){switch(o.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(o.keyCode===p.down){switch(o.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(o.keyCode===p.left){o.preventDefault(),this.$switchLane("annotation");return}if(o.keyCode===p.right){o.preventDefault(),this.$switchLane("fold");return}if(o.keyCode===p.enter||o.keyCode===p.space){switch(o.preventDefault(),this.activeLane){case"fold":var a=this.$rowIndexToRow(this.activeRowIndex),u=this.editor.session.$gutterCustomWidgets[a];if(u)u.callbacks&&u.callbacks.onClick&&u.callbacks.onClick(o,a);else if(this.gutterLayer.session.foldWidgets[a]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),o),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==a&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(a),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var l=this.lines.cells[this.activeRowIndex].element.childNodes[2],s=l.getBoundingClientRect(),c=this.annotationTooltip.getElement().style;c.left=s.right+"px",c.top=s.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},g.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},g.prototype.$isFoldWidgetVisible=function(o){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(o)),u=this.$getFoldWidget(o).style.display!=="none";return a&&u},g.prototype.$isCustomWidgetVisible=function(o){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(o)),u=!!this.$getCustomWidget(o);return a&&u},g.prototype.$isAnnotationVisible=function(o){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(o)),u=this.$getAnnotation(o).style.display!=="none";return a&&u},g.prototype.$getFoldWidget=function(o){var a=this.lines.get(o),u=a.element;return u.childNodes[1]},g.prototype.$getCustomWidget=function(o){var a=this.lines.get(o),u=a.element;return u.childNodes[3]},g.prototype.$getAnnotation=function(o){var a=this.lines.get(o),u=a.element;return u.childNodes[2]},g.prototype.$findNearestFoldLaneWidget=function(o){if(this.$isCustomWidgetVisible(o)||this.$isFoldWidgetVisible(o))return o;for(var a=0;o-a>0||o+a<this.lines.getLength()-1;){if(a++,o-a>=0&&this.$isCustomWidgetVisible(o-a))return o-a;if(o+a<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(o+a))return o+a;if(o-a>=0&&this.$isFoldWidgetVisible(o-a))return o-a;if(o+a<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(o+a))return o+a}return null},g.prototype.$findNearestAnnotation=function(o){if(this.$isAnnotationVisible(o))return o;for(var a=0;o-a>0||o+a<this.lines.getLength()-1;){if(a++,o-a>=0&&this.$isAnnotationVisible(o-a))return o-a;if(o+a<=this.lines.getLength()-1&&this.$isAnnotationVisible(o+a))return o+a}return null},g.prototype.$focusFoldWidget=function(o){if(o!=null){var a=this.$getFoldWidget(o);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},g.prototype.$focusCustomWidget=function(o){if(o!=null){var a=this.$getCustomWidget(o);a&&(a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus())}},g.prototype.$focusAnnotation=function(o){if(o!=null){var a=this.$getAnnotation(o);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},g.prototype.$blurFoldWidget=function(o){var a=this.$getFoldWidget(o);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},g.prototype.$blurCustomWidget=function(o){var a=this.$getCustomWidget(o);a&&(a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur())},g.prototype.$blurAnnotation=function(o){var a=this.$getAnnotation(o);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},g.prototype.$moveFoldWidgetUp=function(){for(var o=this.activeRowIndex;o>0;)if(o--,this.$isFoldWidgetVisible(o)||this.$isCustomWidgetVisible(o)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=o,this.$isFoldWidgetVisible(o)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},g.prototype.$moveFoldWidgetDown=function(){for(var o=this.activeRowIndex;o<this.lines.getLength()-1;)if(o++,this.$isFoldWidgetVisible(o)||this.$isCustomWidgetVisible(o)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=o,this.$isFoldWidgetVisible(o)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},g.prototype.$moveAnnotationUp=function(){for(var o=this.activeRowIndex;o>0;)if(o--,this.$isAnnotationVisible(o)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);return}},g.prototype.$moveAnnotationDown=function(){for(var o=this.activeRowIndex;o<this.lines.getLength()-1;)if(o++,this.$isAnnotationVisible(o)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);return}},g.prototype.$findClosestNumber=function(o,a,u){return o===null?a:a===null||Math.abs(u-o)<=Math.abs(u-a)?o:a},g.prototype.$switchLane=function(o){switch(o){case"annotation":if(this.activeLane==="annotation")break;var a=this.$findNearestAnnotation(this.activeRowIndex);if(a==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=a,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var u=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(u===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=u,this.$isCustomWidgetVisible(u)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},g.prototype.$rowIndexToRow=function(o){var a=this.lines.get(o);return a?a.row:null},g.prototype.$rowToRowIndex=function(o){for(var a=0;a<this.lines.getLength();a++){var u=this.lines.get(a);if(u.row==o)return a}return null},g})();i.GutterKeyboardHandler=b;var d=(function(){function g(o,a){this.gutterKeyboardHandler=a,this.domEvent=o}return g.prototype.getKey=function(){return p.keyCodeToString(this.domEvent.keyCode)},g.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},g.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},g.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},g})();i.GutterKeyboardEvent=d}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(n,i,h){var p=this&&this.__values||function(A){var S=typeof Symbol=="function"&&Symbol.iterator,D=S&&A[S],j=0;if(D)return D.call(A);if(A&&typeof A.length=="number")return{next:function(){return A&&j>=A.length&&(A=void 0),{value:A&&A[j++],done:!A}}};throw new TypeError(S?"Object is not iterable.":"Symbol.iterator is not defined.")},m=n("./lib/oop"),b=n("./lib/dom"),d=n("./lib/lang"),g=n("./lib/useragent"),o=n("./keyboard/textinput").TextInput,a=n("./mouse/mouse_handler").MouseHandler,u=n("./mouse/fold_handler").FoldHandler,l=n("./keyboard/keybinding").KeyBinding,s=n("./edit_session").EditSession,c=n("./search").Search,f=n("./range").Range,w=n("./lib/event_emitter").EventEmitter,x=n("./commands/command_manager").CommandManager,E=n("./commands/default_commands").commands,M=n("./config"),k=n("./token_iterator").TokenIterator,C=n("./keyboard/gutter_handler").GutterKeyboardHandler,O=n("./config").nls,L=n("./clipboard"),R=n("./lib/keys"),I=n("./lib/event"),z=n("./tooltip").HoverTooltip,F=(function(){function A(S,D,j){this.id="editor"+ ++A.$uid,this.session,this.$toDestroy=[];var U=S.getContainerElement();this.container=U,this.renderer=S,this.commands=new x(g.isMac?"mac":"win",E),typeof document=="object"&&(this.textInput=new o(S.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new u(this)),this.keyBinding=new l(this),this.$search=new c().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=d.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(q,Q){Q._$emitInputEvent.schedule(31)}),this.setSession(D||j&&j.session||new s("")),M.resetOptions(this),j&&this.setOptions(j),M._signal("editor",this)}return A.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},A.prototype.startOperation=function(S){this.session.startOperation(S)},A.prototype.endOperation=function(S){this.session.endOperation(S)},A.prototype.onStartOperation=function(S){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,S||(this.previousCommand=null)},A.prototype.onEndOperation=function(S){if(this.curOp&&this.session){if(S&&S.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var D=this.curOp.command,j=D&&D.scrollIntoView;if(j){switch(j){case"center-animate":j="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var U=this.selection.getRange(),q=this.renderer.layerConfig;(U.start.row>=q.lastRow||U.end.row<=q.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}j=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},A.prototype.$historyTracker=function(S){if(this.$mergeUndoDeltas){var D=this.prevOp,j=this.$mergeableCommands,U=D.command&&S.command.name==D.command.name;if(S.command.name=="insertstring"){var q=S.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),U=U&&this.mergeNextCommand&&(!/\s/.test(q)||/\s/.test(D.args)),this.mergeNextCommand=!0}else U=U&&j.indexOf(S.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(U=!1),U?this.session.mergeUndoDeltas=!0:j.indexOf(S.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},A.prototype.setKeyboardHandler=function(S,D){if(S&&typeof S=="string"&&S!="ace"){this.$keybindingId=S;var j=this;M.loadModule(["keybinding",S],function(U){j.$keybindingId==S&&j.keyBinding.setKeyboardHandler(U&&U.handler),D&&D()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(S),D&&D()},A.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},A.prototype.setSession=function(S){if(this.session!=S){this.curOp&&this.endOperation(),this.curOp={};var D=this.session;if(D){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var j=this.session.getSelection();j.off("changeCursor",this.$onCursorChange),j.off("changeSelection",this.$onSelectionChange)}this.session=S,S?(this.$onDocumentChange=this.onDocumentChange.bind(this),S.on("change",this.$onDocumentChange),this.renderer.setSession(S),this.$onChangeMode=this.onChangeMode.bind(this),S.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),S.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),S.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),S.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),S.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),S.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=S.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(S)),this._signal("changeSession",{session:S,oldSession:D}),this.curOp=null,D&&D._signal("changeEditor",{oldEditor:this}),D&&(D.$editor=null),S&&S._signal("changeEditor",{editor:this}),S&&(S.$editor=this),S&&!S.destroyed&&S.bgTokenizer.scheduleStart()}},A.prototype.getSession=function(){return this.session},A.prototype.setValue=function(S,D){return this.session.doc.setValue(S),D?D==1?this.navigateFileEnd():D==-1&&this.navigateFileStart():this.selectAll(),S},A.prototype.getValue=function(){return this.session.getValue()},A.prototype.getSelection=function(){return this.selection},A.prototype.resize=function(S){this.renderer.onResize(S)},A.prototype.setTheme=function(S,D){this.renderer.setTheme(S,D)},A.prototype.getTheme=function(){return this.renderer.getTheme()},A.prototype.setStyle=function(S,D){this.renderer.setStyle(S,D)},A.prototype.unsetStyle=function(S){this.renderer.unsetStyle(S)},A.prototype.getFontSize=function(){return this.getOption("fontSize")||b.computedStyle(this.container).fontSize},A.prototype.setFontSize=function(S){this.setOption("fontSize",S)},A.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var S=this;this.$highlightPending=!0,setTimeout(function(){S.$highlightPending=!1;var D=S.session;if(!(!D||D.destroyed)){D.$bracketHighlight&&(D.$bracketHighlight.markerIds.forEach(function(he){D.removeMarker(he)}),D.$bracketHighlight=null);var j=S.getCursorPosition(),U=S.getKeyboardHandler(),q=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(S),Q=D.getMatchingBracketRanges(j,q);if(!Q){var te=new k(D,j.row,j.column),de=te.getCurrentToken();if(de&&/\b(?:tag-open|tag-name)/.test(de.type)){var ne=D.getMatchingTags(j);ne&&(Q=[ne.openTagName.isEmpty()?ne.openTag:ne.openTagName,ne.closeTagName.isEmpty()?ne.closeTag:ne.closeTagName])}}if(!Q&&D.$mode.getMatching&&(Q=D.$mode.getMatching(S.session)),!Q){S.getHighlightIndentGuides()&&S.renderer.$textLayer.$highlightIndentGuide();return}var ce="ace_bracket";Array.isArray(Q)?Q.length==1&&(ce="ace_error_bracket"):Q=[Q],Q.length==2&&(f.comparePoints(Q[0].end,Q[1].start)==0?Q=[f.fromPoints(Q[0].start,Q[1].end)]:f.comparePoints(Q[0].start,Q[1].end)==0&&(Q=[f.fromPoints(Q[1].start,Q[0].end)])),D.$bracketHighlight={ranges:Q,markerIds:Q.map(function(he){return D.addMarker(he,ce,"text")})},S.getHighlightIndentGuides()&&S.renderer.$textLayer.$highlightIndentGuide()}},50)}},A.prototype.focus=function(){this.textInput.focus()},A.prototype.isFocused=function(){return this.textInput.isFocused()},A.prototype.blur=function(){this.textInput.blur()},A.prototype.onFocus=function(S){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",S))},A.prototype.onBlur=function(S){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",S))},A.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},A.prototype.onDocumentChange=function(S){var D=this.session.$useWrapMode,j=S.start.row==S.end.row?S.end.row:1/0;this.renderer.updateLines(S.start.row,j,D),this._signal("change",S),this.$cursorChange()},A.prototype.onTokenizerUpdate=function(S){var D=S.data;this.renderer.updateLines(D.first,D.last)},A.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},A.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},A.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},A.prototype.$updateHighlightActiveLine=function(){var S=this.getSession(),D;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(D=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(D=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(D=!1)),S.$highlightLineMarker&&!D)S.removeMarker(S.$highlightLineMarker.id),S.$highlightLineMarker=null;else if(!S.$highlightLineMarker&&D){var j=new f(D.row,D.column,D.row,1/0);j.id=S.addMarker(j,"ace_active-line","screenLine"),S.$highlightLineMarker=j}else D&&(S.$highlightLineMarker.start.row=D.row,S.$highlightLineMarker.end.row=D.row,S.$highlightLineMarker.start.column=D.column,S._signal("changeBackMarker"))},A.prototype.onSelectionChange=function(S){var D=this.session;if(D.$selectionMarker&&D.removeMarker(D.$selectionMarker),D.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var j=this.selection.getRange(),U=this.getSelectionStyle();D.$selectionMarker=D.addMarker(j,"ace_selection",U)}var q=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(q),this._signal("changeSelection")},A.prototype.$getSelectionHighLightRegexp=function(){var S=this.session,D=this.getSelectionRange();if(!(D.isEmpty()||D.isMultiLine())){var j=D.start.column,U=D.end.column,q=S.getLine(D.start.row),Q=q.substring(j,U);if(!(Q.length>5e3||!/[\w\d]/.test(Q))){var te=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Q}),de=q.substring(j-1,U+1);if(te.test(de))return te}}},A.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},A.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},A.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},A.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},A.prototype.onChangeMode=function(S){this.renderer.updateText(),this._emit("changeMode",S)},A.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},A.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},A.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},A.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},A.prototype.getCopyText=function(){var S=this.getSelectedText(),D=this.session.doc.getNewLineCharacter(),j=!1;if(!S&&this.$copyWithEmptySelection){j=!0;for(var U=this.selection.getAllRanges(),q=0;q<U.length;q++){var Q=U[q];q&&U[q-1].start.row==Q.start.row||(S+=this.session.getLine(Q.start.row)+D)}}var te={text:S};return this._signal("copy",te),L.lineMode=j?te.text:!1,te.text},A.prototype.onCopy=function(){this.commands.exec("copy",this)},A.prototype.onCut=function(){this.commands.exec("cut",this)},A.prototype.onPaste=function(S,D){var j={text:S,event:D};this.commands.exec("paste",this,j)},A.prototype.$handlePaste=function(S){typeof S=="string"&&(S={text:S}),this._signal("paste",S);var D=S.text,j=D===L.lineMode,U=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)j?U.insert({row:this.selection.lead.row,column:0},D):this.insert(D);else if(j)this.selection.rangeList.ranges.forEach(function(ce){U.insert({row:ce.start.row,column:0},D)});else{var q=D.split(/\r\n|\r|\n/),Q=this.selection.rangeList.ranges,te=q.length==2&&(!q[0]||!q[1]);if(q.length!=Q.length||te)return this.commands.exec("insertstring",this,D);for(var de=Q.length;de--;){var ne=Q[de];ne.isEmpty()||U.remove(ne),U.insert(ne.start,q[de])}}},A.prototype.execCommand=function(S,D){return this.commands.exec(S,this,D)},A.prototype.insert=function(S,D){var j=this.session,U=j.getMode(),q=this.getCursorPosition();if(this.getBehavioursEnabled()&&!D){var Q=U.transformAction(j.getState(q.row),"insertion",this,j,S);Q&&(S!==Q.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),S=Q.text)}if(S==" "&&(S=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&S.indexOf(`
211
+ `)==-1){var te=f.fromPoints(q,q);te.end.column+=S.length,this.session.remove(te)}}else{var te=this.getSelectionRange();q=this.session.remove(te),this.clearSelection()}if(S==`
212
+ `||S==`\r
213
+ `){var he=j.getLine(q.row);if(q.column>he.search(/\S|$/)){var de=he.substr(q.column).search(/\S|$/);j.doc.removeInLine(q.row,q.column,q.column+de)}}this.clearSelection();var ne=q.column,ce=j.getState(q.row),he=j.getLine(q.row),ue=U.checkOutdent(ce,he,S);if(j.insert(q,S),Q&&Q.selection&&(Q.selection.length==2?this.selection.setSelectionRange(new f(q.row,ne+Q.selection[0],q.row,ne+Q.selection[1])):this.selection.setSelectionRange(new f(q.row+Q.selection[0],Q.selection[1],q.row+Q.selection[2],Q.selection[3]))),this.$enableAutoIndent){if(j.getDocument().isNewLine(S)){var ve=U.getNextLineIndent(ce,he.slice(0,q.column),j.getTabString());j.insert({row:q.row+1,column:0},ve)}ue&&U.autoOutdent(ce,j,q.row)}},A.prototype.autoIndent=function(){for(var S=this.session,D=S.getMode(),j=this.selection.isEmpty()?[new f(0,0,S.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",q="",Q="",te=S.getTabString(),de=0;de<j.length;de++)for(var ne=j[de].start.row,ce=j[de].end.row,he=ne;he<=ce;he++){he>0&&(U=S.getState(he-1),q=S.getLine(he-1),Q=D.getNextLineIndent(U,q,te));var ue=S.getLine(he),ve=D.$getIndent(ue);if(Q!==ve){if(ve.length>0){var Me=new f(he,0,he,ve.length);S.remove(Me)}Q.length>0&&S.insert({row:he,column:0},Q)}D.autoOutdent(U,S,he)}},A.prototype.onTextInput=function(S,D){if(!D)return this.keyBinding.onTextInput(S);this.startOperation({command:{name:"insertstring"}});var j=this.applyComposition.bind(this,S,D);this.selection.rangeCount?this.forEachSelection(j):j(),this.endOperation()},A.prototype.applyComposition=function(S,D){if(D.extendLeft||D.extendRight){var j=this.selection.getRange();j.start.column-=D.extendLeft,j.end.column+=D.extendRight,j.start.column<0&&(j.start.row--,j.start.column+=this.session.getLine(j.start.row).length+1),this.selection.setRange(j),!S&&!j.isEmpty()&&this.remove()}if((S||!this.selection.isEmpty())&&this.insert(S,!0),D.restoreStart||D.restoreEnd){var j=this.selection.getRange();j.start.column-=D.restoreStart,j.end.column-=D.restoreEnd,this.selection.setRange(j)}},A.prototype.onCommandKey=function(S,D,j){return this.keyBinding.onCommandKey(S,D,j)},A.prototype.setOverwrite=function(S){this.session.setOverwrite(S)},A.prototype.getOverwrite=function(){return this.session.getOverwrite()},A.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},A.prototype.setScrollSpeed=function(S){this.setOption("scrollSpeed",S)},A.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},A.prototype.setDragDelay=function(S){this.setOption("dragDelay",S)},A.prototype.getDragDelay=function(){return this.getOption("dragDelay")},A.prototype.setSelectionStyle=function(S){this.setOption("selectionStyle",S)},A.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},A.prototype.setHighlightActiveLine=function(S){this.setOption("highlightActiveLine",S)},A.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},A.prototype.setHighlightGutterLine=function(S){this.setOption("highlightGutterLine",S)},A.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},A.prototype.setHighlightSelectedWord=function(S){this.setOption("highlightSelectedWord",S)},A.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},A.prototype.setAnimatedScroll=function(S){this.renderer.setAnimatedScroll(S)},A.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},A.prototype.setShowInvisibles=function(S){this.renderer.setShowInvisibles(S)},A.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},A.prototype.setDisplayIndentGuides=function(S){this.renderer.setDisplayIndentGuides(S)},A.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},A.prototype.setHighlightIndentGuides=function(S){this.renderer.setHighlightIndentGuides(S)},A.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},A.prototype.setShowPrintMargin=function(S){this.renderer.setShowPrintMargin(S)},A.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},A.prototype.setPrintMarginColumn=function(S){this.renderer.setPrintMarginColumn(S)},A.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},A.prototype.setReadOnly=function(S){this.setOption("readOnly",S)},A.prototype.getReadOnly=function(){return this.getOption("readOnly")},A.prototype.setBehavioursEnabled=function(S){this.setOption("behavioursEnabled",S)},A.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},A.prototype.setWrapBehavioursEnabled=function(S){this.setOption("wrapBehavioursEnabled",S)},A.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},A.prototype.setShowFoldWidgets=function(S){this.setOption("showFoldWidgets",S)},A.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},A.prototype.setFadeFoldWidgets=function(S){this.setOption("fadeFoldWidgets",S)},A.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},A.prototype.remove=function(S){this.selection.isEmpty()&&(S=="left"?this.selection.selectLeft():this.selection.selectRight());var D=this.getSelectionRange();if(this.getBehavioursEnabled()){var j=this.session,U=j.getState(D.start.row),q=j.getMode().transformAction(U,"deletion",this,j,D);if(D.end.column===0){var Q=j.getTextRange(D);if(Q[Q.length-1]==`
214
+ `){var te=j.getLine(D.end.row);/^\s+$/.test(te)&&(D.end.column=te.length)}}q&&(D=q)}this.session.remove(D),this.clearSelection()},A.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var S=this.getSelectionRange();S.start.column==S.end.column&&S.start.row==S.end.row&&(S.end.column=0,S.end.row++),this.session.remove(S),this.clearSelection()},A.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var S=this.getCursorPosition();this.insert(`
215
+ `),this.moveCursorToPosition(S)},A.prototype.setGhostText=function(S,D){this.renderer.setGhostText(S,D)},A.prototype.removeGhostText=function(){this.renderer.removeGhostText()},A.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var S=this.getCursorPosition(),D=S.column;if(D!==0){var j=this.session.getLine(S.row),U,q;D<j.length?(U=j.charAt(D)+j.charAt(D-1),q=new f(S.row,D-1,S.row,D+1)):(U=j.charAt(D-1)+j.charAt(D-2),q=new f(S.row,D-2,S.row,D)),this.session.replace(q,U),this.session.selection.moveToPosition(q.end)}}},A.prototype.toLowerCase=function(){var S=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),j=this.session.getTextRange(D);this.session.replace(D,j.toLowerCase()),this.selection.setSelectionRange(S)},A.prototype.toUpperCase=function(){var S=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),j=this.session.getTextRange(D);this.session.replace(D,j.toUpperCase()),this.selection.setSelectionRange(S)},A.prototype.indent=function(){var S=this.session,D=this.getSelectionRange();if(D.start.row<D.end.row){var j=this.$getSelectedRows();S.indentRows(j.first,j.last," ");return}else if(D.start.column<D.end.column){var U=S.getTextRange(D);if(!/^\s+$/.test(U)){var j=this.$getSelectedRows();S.indentRows(j.first,j.last," ");return}}var q=S.getLine(D.start.row),Q=D.start,te=S.getTabSize(),de=S.documentToScreenColumn(Q.row,Q.column);if(this.session.getUseSoftTabs())var ne=te-de%te,ce=d.stringRepeat(" ",ne);else{for(var ne=de%te;q[D.start.column-1]==" "&&ne;)D.start.column--,ne--;this.selection.setSelectionRange(D),ce=" "}return this.insert(ce)},A.prototype.blockIndent=function(){var S=this.$getSelectedRows();this.session.indentRows(S.first,S.last," ")},A.prototype.blockOutdent=function(){var S=this.session.getSelection();this.session.outdentRows(S.getRange())},A.prototype.sortLines=function(){for(var S=this.$getSelectedRows(),D=this.session,j=[],U=S.first;U<=S.last;U++)j.push(D.getLine(U));j.sort(function(te,de){return te.toLowerCase()<de.toLowerCase()?-1:te.toLowerCase()>de.toLowerCase()?1:0});for(var q=new f(0,0,0,0),U=S.first;U<=S.last;U++){var Q=D.getLine(U);q.start.row=U,q.end.row=U,q.end.column=Q.length,D.replace(q,j[U-S.first])}},A.prototype.toggleCommentLines=function(){var S=this.session.getState(this.getCursorPosition().row),D=this.$getSelectedRows();this.session.getMode().toggleCommentLines(S,this.session,D.first,D.last)},A.prototype.toggleBlockComment=function(){var S=this.getCursorPosition(),D=this.session.getState(S.row),j=this.getSelectionRange();this.session.getMode().toggleBlockComment(D,this.session,j,S)},A.prototype.getNumberAt=function(S,D){var j=/[\-]?[0-9]+(?:\.[0-9]+)?/g;j.lastIndex=0;for(var U=this.session.getLine(S);j.lastIndex<D;){var q=j.exec(U);if(q.index<=D&&q.index+q[0].length>=D){var Q={value:q[0],start:q.index,end:q.index+q[0].length};return Q}}return null},A.prototype.modifyNumber=function(S){var D=this.selection.getCursor().row,j=this.selection.getCursor().column,U=new f(D,j-1,D,j),q=this.session.getTextRange(U);if(!isNaN(parseFloat(q))&&isFinite(q)){var Q=this.getNumberAt(D,j);if(Q){var te=Q.value.indexOf(".")>=0?Q.start+Q.value.indexOf(".")+1:Q.end,de=Q.start+Q.value.length-te,ne=parseFloat(Q.value);ne*=Math.pow(10,de),te!==Q.end&&j<te?S*=Math.pow(10,Q.end-j-1):S*=Math.pow(10,Q.end-j),ne+=S,ne/=Math.pow(10,de);var ce=ne.toFixed(de),he=new f(D,Q.start,D,Q.end);this.session.replace(he,ce),this.moveCursorTo(D,Math.max(Q.start+1,j+ce.length-Q.value.length))}}else this.toggleWord()},A.prototype.toggleWord=function(){var S=this.selection.getCursor().row,D=this.selection.getCursor().column;this.selection.selectWord();var j=this.getSelectedText(),U=this.selection.getWordRange().start.column,q=j.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),Q=D-U-1;Q<0&&(Q=0);var te=0,de=0,ne=this;j.match(/[A-Za-z0-9_]+/)&&q.forEach(function(Xe,ft){de=te+Xe.length,Q>=te&&Q<=de&&(j=Xe,ne.selection.clearSelection(),ne.moveCursorTo(S,te+U),ne.selection.selectTo(S,de+U)),te=de});for(var ce=this.$toggleWordPairs,he,ue=0;ue<ce.length;ue++)for(var ve=ce[ue],Me=0;Me<=1;Me++){var Te=+!Me,Ee=j.match(new RegExp("^\\s?_?("+d.escapeRegExp(ve[Me])+")\\s?$","i"));if(Ee){var Je=j.match(new RegExp("([_]|^|\\s)("+d.escapeRegExp(Ee[1])+")($|\\s)","g"));Je&&(he=j.replace(new RegExp(d.escapeRegExp(ve[Me]),"i"),function(Xe){var ft=ve[Te];return Xe.toUpperCase()==Xe?ft=ft.toUpperCase():Xe.charAt(0).toUpperCase()==Xe.charAt(0)&&(ft=ft.substr(0,0)+ve[Te].charAt(0).toUpperCase()+ft.substr(1)),ft}),this.insert(he),he="")}}},A.prototype.findLinkAt=function(S,D){var j,U,q=this.session.getLine(S),Q=q.split(/((?:https?|ftp):\/\/[\S]+)/),te=D;te<0&&(te=0);var de=0,ne=0,ce;try{for(var he=p(Q),ue=he.next();!ue.done;ue=he.next()){var ve=ue.value;if(ne=de+ve.length,te>=de&&te<=ne&&ve.match(/((?:https?|ftp):\/\/[\S]+)/)){ce=ve.replace(/[\s:.,'";}\]]+$/,"");break}de=ne}}catch(Me){j={error:Me}}finally{try{ue&&!ue.done&&(U=he.return)&&U.call(he)}finally{if(j)throw j.error}}return ce},A.prototype.openLink=function(){var S=this.selection.getCursor(),D=this.findLinkAt(S.row,S.column);return D&&window.open(D,"_blank"),D!=null},A.prototype.removeLines=function(){var S=this.$getSelectedRows();this.session.removeFullLines(S.first,S.last),this.clearSelection()},A.prototype.duplicateSelection=function(){var S=this.selection,D=this.session,j=S.getRange(),U=S.isBackwards();if(j.isEmpty()){var q=j.start.row;D.duplicateLines(q,q)}else{var Q=U?j.start:j.end,te=D.insert(Q,D.getTextRange(j));j.start=Q,j.end=te,S.setSelectionRange(j,U)}},A.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},A.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},A.prototype.moveText=function(S,D,j){return this.session.moveText(S,D,j)},A.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},A.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},A.prototype.$moveLines=function(S,D){var j,U,q=this.selection;if(!q.inMultiSelectMode||this.inVirtualSelectionMode){var Q=q.toOrientedRange();j=this.$getSelectedRows(Q),U=this.session.$moveLines(j.first,j.last,D?0:S),D&&S==-1&&(U=0),Q.moveBy(U,0),q.fromOrientedRange(Q)}else{var te=q.rangeList.ranges;q.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var de=0,ne=0,ce=te.length,he=0;he<ce;he++){var ue=he;te[he].moveBy(de,0),j=this.$getSelectedRows(te[he]);for(var ve=j.first,Me=j.last;++he<ce;){ne&&te[he].moveBy(ne,0);var Te=this.$getSelectedRows(te[he]);if(D&&Te.first!=Me||!D&&Te.first>Me+1)break;Me=Te.last}for(he--,de=this.session.$moveLines(ve,Me,D?0:S),D&&S==-1&&(ue=he+1);ue<=he;)te[ue].moveBy(de,0),ue++;D||(de=0),ne+=de}q.fromOrientedRange(q.ranges[0]),q.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},A.prototype.$getSelectedRows=function(S){return S=(S||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(S.start.row),last:this.session.getRowFoldEnd(S.end.row)}},A.prototype.onCompositionStart=function(S){this.renderer.showComposition(S)},A.prototype.onCompositionUpdate=function(S){this.renderer.setCompositionText(S)},A.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},A.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},A.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},A.prototype.isRowVisible=function(S){return S>=this.getFirstVisibleRow()&&S<=this.getLastVisibleRow()},A.prototype.isRowFullyVisible=function(S){return S>=this.renderer.getFirstFullyVisibleRow()&&S<=this.renderer.getLastFullyVisibleRow()},A.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},A.prototype.$moveByPage=function(S,D){var j=this.renderer,U=this.renderer.layerConfig,q=S*Math.floor(U.height/U.lineHeight);D===!0?this.selection.$moveSelection(function(){this.moveCursorBy(q,0)}):D===!1&&(this.selection.moveCursorBy(q,0),this.selection.clearSelection());var Q=j.scrollTop;j.scrollBy(0,q*U.lineHeight),D!=null&&j.scrollCursorIntoView(null,.5),j.animateScrolling(Q)},A.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},A.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},A.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},A.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},A.prototype.scrollPageDown=function(){this.$moveByPage(1)},A.prototype.scrollPageUp=function(){this.$moveByPage(-1)},A.prototype.scrollToRow=function(S){this.renderer.scrollToRow(S)},A.prototype.scrollToLine=function(S,D,j,U){this.renderer.scrollToLine(S,D,j,U)},A.prototype.centerSelection=function(){var S=this.getSelectionRange(),D={row:Math.floor(S.start.row+(S.end.row-S.start.row)/2),column:Math.floor(S.start.column+(S.end.column-S.start.column)/2)};this.renderer.alignCursor(D,.5)},A.prototype.getCursorPosition=function(){return this.selection.getCursor()},A.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},A.prototype.getSelectionRange=function(){return this.selection.getRange()},A.prototype.selectAll=function(){this.selection.selectAll()},A.prototype.clearSelection=function(){this.selection.clearSelection()},A.prototype.moveCursorTo=function(S,D){this.selection.moveCursorTo(S,D)},A.prototype.moveCursorToPosition=function(S){this.selection.moveCursorToPosition(S)},A.prototype.jumpToMatching=function(S,D){var j=this.getCursorPosition(),U=new k(this.session,j.row,j.column),q=U.getCurrentToken(),Q=0;q&&q.type.indexOf("tag-name")!==-1&&(q=U.stepBackward());var te=q||U.stepForward();if(te){var de,ne=!1,ce={},he=j.column-te.start,ue,ve={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(te.value.match(/[{}()\[\]]/g)){for(;he<te.value.length&&!ne;he++)if(ve[te.value[he]])switch(ue=ve[te.value[he]]+"."+te.type.replace("rparen","lparen"),isNaN(ce[ue])&&(ce[ue]=0),te.value[he]){case"(":case"[":case"{":ce[ue]++;break;case")":case"]":case"}":ce[ue]--,ce[ue]===-1&&(de="bracket",ne=!0);break}}else te.type.indexOf("tag-name")!==-1&&(isNaN(ce[te.value])&&(ce[te.value]=0),q.value==="<"&&Q>1?ce[te.value]++:q.value==="</"&&ce[te.value]--,ce[te.value]===-1&&(de="tag",ne=!0));ne||(q=te,Q++,te=U.stepForward(),he=0)}while(te&&!ne);if(de){var Me,Te;if(de==="bracket")Me=this.session.getBracketRange(j),Me||(Me=new f(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+he-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+he-1),Te=Me.start,(D||Te.row===j.row&&Math.abs(Te.column-j.column)<2)&&(Me=this.session.getBracketRange(Te)));else if(de==="tag"){if(!te||te.type.indexOf("tag-name")===-1)return;if(Me=new f(U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2,U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2),Me.compare(j.row,j.column)===0){var Ee=this.session.getMatchingTags(j);Ee&&(Ee.openTag.contains(j.row,j.column)?(Me=Ee.closeTag,Te=Me.start):(Me=Ee.openTag,Ee.closeTag.start.row===j.row&&Ee.closeTag.start.column===j.column?Te=Me.end:Te=Me.start))}Te=Te||Me.start}Te=Me&&Me.cursor||Te,Te&&(S?Me&&D?this.selection.setRange(Me):Me&&Me.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Te.row,Te.column):this.selection.moveTo(Te.row,Te.column))}}},A.prototype.gotoLine=function(S,D,j){this.selection.clearSelection(),this.session.unfold({row:S-1,column:D||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(S-1,D||0),this.isRowFullyVisible(S-1)||this.scrollToLine(S-1,!0,j)},A.prototype.navigateTo=function(S,D){this.selection.moveTo(S,D)},A.prototype.navigateUp=function(S){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(-S||-1,0)},A.prototype.navigateDown=function(S){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(S||1,0)},A.prototype.navigateLeft=function(S){if(this.selection.isEmpty())for(S=S||1;S--;)this.selection.moveCursorLeft();else{var D=this.getSelectionRange().start;this.moveCursorToPosition(D)}this.clearSelection()},A.prototype.navigateRight=function(S){if(this.selection.isEmpty())for(S=S||1;S--;)this.selection.moveCursorRight();else{var D=this.getSelectionRange().end;this.moveCursorToPosition(D)}this.clearSelection()},A.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},A.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},A.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},A.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},A.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},A.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},A.prototype.replace=function(S,D){D&&this.$search.set(D);var j=this.$search.find(this.session),U=0;return j&&(this.$tryReplace(j,S)&&(U=1),this.selection.setSelectionRange(j),this.renderer.scrollSelectionIntoView(j.start,j.end)),U},A.prototype.replaceAll=function(S,D){D&&this.$search.set(D);var j=this.$search.findAll(this.session),U=0;if(!j.length)return U;var q=this.getSelectionRange();this.selection.moveTo(0,0);for(var Q=j.length-1;Q>=0;--Q)this.$tryReplace(j[Q],S)&&U++;return this.selection.setSelectionRange(q),U},A.prototype.$tryReplace=function(S,D){var j=this.session.getTextRange(S);return D=this.$search.replace(j,D),D!==null?(S.end=this.session.replace(S,D),S):null},A.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},A.prototype.find=function(S,D,j){D||(D={}),typeof S=="string"||S instanceof RegExp?D.needle=S:typeof S=="object"&&m.mixin(D,S);var U=this.selection.getRange();D.needle==null&&(S=this.session.getTextRange(U)||this.$search.$options.needle,S||(U=this.session.getWordRange(U.start.row,U.start.column),S=this.session.getTextRange(U)),this.$search.set({needle:S})),this.$search.set(D),D.start||this.$search.set({start:U});var q=this.$search.find(this.session);if(D.preventScroll)return q;if(q)return this.revealRange(q,j),q;D.backwards?U.start=U.end:U.end=U.start,this.selection.setRange(U)},A.prototype.findNext=function(S,D){this.find({skipCurrent:!0,backwards:!1},S,D)},A.prototype.findPrevious=function(S,D){this.find(S,{skipCurrent:!0,backwards:!0},D)},A.prototype.revealRange=function(S,D){this.session.unfold(S),this.selection.setSelectionRange(S);var j=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(S.start,S.end,.5),D!==!1&&this.renderer.animateScrolling(j)},A.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},A.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},A.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(S){S.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},A.prototype.setAutoScrollEditorIntoView=function(S){if(S){var D,j=this,U=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var q=this.$scrollAnchor;q.style.cssText="position:absolute",this.container.insertBefore(q,this.container.firstChild);var Q=this.on("changeSelection",function(){U=!0}),te=this.renderer.on("beforeRender",function(){U&&(D=j.renderer.container.getBoundingClientRect())}),de=this.renderer.on("afterRender",function(){if(U&&D&&(j.isFocused()||j.searchBox&&j.searchBox.isFocused())){var ne=j.renderer,ce=ne.$cursorLayer.$pixelPos,he=ne.layerConfig,ue=ce.top-he.offset;ce.top>=0&&ue+D.top<0?U=!0:ce.top<he.height&&ce.top+D.top+he.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(q.style.top=ue+"px",q.style.left=ce.left+"px",q.style.height=he.lineHeight+"px",q.scrollIntoView(U)),U=D=null}});this.setAutoScrollEditorIntoView=function(ne){ne||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Q),this.renderer.off("afterRender",de),this.renderer.off("beforeRender",te))}}},A.prototype.$resetCursorStyle=function(){var S=this.$cursorStyle||"ace",D=this.renderer.$cursorLayer;D&&(D.setSmoothBlinking(/smooth/.test(S)),D.isBlinking=!this.$readOnly&&S!="wide",b.setCssClass(D.element,"ace_slim-cursors",/slim/.test(S)))},A.prototype.prompt=function(S,D,j){var U=this;M.loadModule("ace/ext/prompt",function(q){q.prompt(U,S,D,j)})},A})();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"],["&&","||"],["==","!="]],m.implement(F.prototype,w),M.defineOptions(F.prototype,"editor",{selectionStyle:{set:function(A){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:A})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(A){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(A){var S=this;if(this.textInput.setReadOnly(A),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(j){var U=!1;if(j&&j.type=="keydown"){if(j&&j.key&&!j.ctrlKey&&!j.metaKey&&(j.key==" "&&j.preventDefault(),U=j.key.length==1),!U)return}else j&&j.type!=="exec"&&(U=!0);if(U){S.hoverTooltip||(S.hoverTooltip=new z);var q=b.createElement("div");q.textContent=O("editor.tooltip.disable-editing","Editing is disabled"),S.hoverTooltip.isOpen||S.hoverTooltip.showForRange(S,S.getSelectionRange(),q)}else S.hoverTooltip&&S.hoverTooltip.isOpen&&S.hoverTooltip.hide()});var D=this.textInput.getElement();A?(I.addListener(D,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(I.removeListener(D,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))}},initialValue:!1},copyWithEmptySelection:{set:function(A){this.textInput.setCopyWithEmptySelection(A)},initialValue:!1},cursorStyle:{set:function(A){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(A){this.setAutoScrollEditorIntoView(A)}},keyboardHandler:{set:function(A){this.setKeyboardHandler(A)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(A){this.session.setValue(A)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(A){this.setSession(A)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(A){this.renderer.$gutterLayer.setShowLineNumbers(A),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),A&&this.$relativeLineNumbers?N.attach(this):N.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(A){this.$showLineNumbers&&A?N.attach(this):N.detach(this)}},placeholder:{set:function(A){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var S=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(S&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),b.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!S&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),b.addCssClass(this.container,"ace_hasPlaceholder");var D=b.createElement("div");D.className="ace_placeholder",D.textContent=this.$placeholder||"",this.renderer.placeholderNode=D,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!S&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(A){var S={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(U){U.blur(),U.renderer.scroller.focus()},readOnly:!0},D=function(U){if(U.target==this.renderer.scroller&&U.keyCode===R.enter){U.preventDefault();var q=this.getCursorPosition().row;this.isRowVisible(q)||this.scrollToLine(q,!0,!0),this.focus()}},j;A?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(g.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",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",D.bind(this)),this.commands.addCommand(S),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",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),j||(j=new C(this)),j.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",D.bind(this)),this.commands.removeCommand(S),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),j&&j.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(A){this.$textInputAriaLabel=A},initialValue:""},enableMobileMenu:{set:function(A){this.$enableMobileMenu=A},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var N={getText:function(A,S){return(Math.abs(A.selection.lead.row-S)||S+1+(S<9?"·":""))+""},getWidth:function(A,S,D){return Math.max(S.toString().length,(D.lastRow+1).toString().length,2)*D.characterWidth},update:function(A,S){S.renderer.$loop.schedule(S.renderer.CHANGE_GUTTER)},attach:function(A){A.renderer.$gutterLayer.$renderer=this,A.on("changeSelection",this.update),this.update(null,A)},detach:function(A){A.renderer.$gutterLayer.$renderer==this&&(A.renderer.$gutterLayer.$renderer=null),A.off("changeSelection",this.update),this.update(null,A)}};i.Editor=F}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(n,i,h){var p=n("../lib/dom"),m=(function(){function b(d,g){this.element=d,this.canvasHeight=g||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return b.prototype.moveContainer=function(d){p.translate(this.element,0,-(d.firstRowScreen*d.lineHeight%this.canvasHeight)-d.offset*this.$offsetCoefficient)},b.prototype.pageChanged=function(d,g){return Math.floor(d.firstRowScreen*d.lineHeight/this.canvasHeight)!==Math.floor(g.firstRowScreen*g.lineHeight/this.canvasHeight)},b.prototype.computeLineTop=function(d,g,o){var a=g.firstRowScreen*g.lineHeight,u=Math.floor(a/this.canvasHeight),l=o.documentToScreenRow(d,0)*g.lineHeight;return l-u*this.canvasHeight},b.prototype.computeLineHeight=function(d,g,o){return g.lineHeight*o.getRowLineCount(d)},b.prototype.getLength=function(){return this.cells.length},b.prototype.get=function(d){return this.cells[d]},b.prototype.shift=function(){this.$cacheCell(this.cells.shift())},b.prototype.pop=function(){this.$cacheCell(this.cells.pop())},b.prototype.push=function(d){if(Array.isArray(d)){this.cells.push.apply(this.cells,d);for(var g=p.createFragment(this.element),o=0;o<d.length;o++)g.appendChild(d[o].element);this.element.appendChild(g)}else this.cells.push(d),this.element.appendChild(d.element)},b.prototype.unshift=function(d){if(Array.isArray(d)){this.cells.unshift.apply(this.cells,d);for(var g=p.createFragment(this.element),o=0;o<d.length;o++)g.appendChild(d[o].element);this.element.firstChild?this.element.insertBefore(g,this.element.firstChild):this.element.appendChild(g)}else this.cells.unshift(d),this.element.insertAdjacentElement("afterbegin",d.element)},b.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},b.prototype.$cacheCell=function(d){d&&(d.element.remove(),this.cellCache.push(d))},b.prototype.createCell=function(d,g,o,a){var u=this.cellCache.pop();if(!u){var l=p.createElement("div");a&&a(l),this.element.appendChild(l),u={element:l,text:"",row:d}}return u.row=d,u},b})();i.Lines=m}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(n,i,h){var p=n("../lib/dom"),m=n("../lib/oop"),b=n("../lib/lang"),d=n("../lib/event_emitter").EventEmitter,g=n("./lines").Lines,o=n("../config").nls,a=(function(){function l(s){this.element=p.createElement("div"),this.element.className="ace_layer ace_gutter-layer",s.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new g(this.element),this.$lines.$offsetCoefficient=1}return l.prototype.setSession=function(s){this.session&&this.session.off("change",this.$updateAnnotations),this.session=s,s&&s.on("change",this.$updateAnnotations)},l.prototype.addGutterDecoration=function(s,c){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(s,c)},l.prototype.removeGutterDecoration=function(s,c){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(s,c)},l.prototype.setAnnotations=function(s){this.$annotations=[];for(var c=0;c<s.length;c++){var f=s[c],w=f.row,x=this.$annotations[w];x||(x=this.$annotations[w]={text:[],type:[],displayText:[]});var E=f.text,M=f.text,k=f.type;E=E?b.escapeHTML(E):f.html||"",M=M||f.html||"",x.text.indexOf(E)===-1&&(x.text.push(E),x.type.push(k),x.displayText.push(M));var C=f.className;C?x.className=C:k==="error"?x.className=" ace_error":k==="security"&&!/\bace_error\b/.test(x.className)?x.className=" ace_security":k==="warning"&&!/\bace_(error|security)\b/.test(x.className)?x.className=" ace_warning":k==="info"&&!x.className?x.className=" ace_info":k==="hint"&&!x.className&&(x.className=" ace_hint")}},l.prototype.$updateAnnotations=function(s){if(this.$annotations.length){var c=s.start.row,f=s.end.row-c;if(f!==0)if(s.action=="remove")this.$annotations.splice(c,f+1,null);else{var w=new Array(f+1);w.unshift(c,1),this.$annotations.splice.apply(this.$annotations,w)}}},l.prototype.update=function(s){this.config=s;var c=this.session,f=s.firstRow,w=Math.min(s.lastRow+s.gutterOffset,c.getLength()-1);this.oldLastRow=w,this.config=s,this.$lines.moveContainer(s),this.$updateCursorRow();for(var x=c.getNextFoldLine(f),E=x?x.start.row:1/0,M=null,k=-1,C=f;;){if(C>E&&(C=x.end.row+1,x=c.getNextFoldLine(C,x),E=x?x.start.row:1/0),C>w){for(;this.$lines.getLength()>k+1;)this.$lines.pop();break}M=this.$lines.get(++k),M?M.row=C:(M=this.$lines.createCell(C,s,this.session,u),this.$lines.push(M)),this.$renderCell(M,s,x,C),C++}this._signal("afterRender"),this.$updateGutterWidth(s)},l.prototype.$updateGutterWidth=function(s){var c=this.session,f=c.gutterRenderer||this.$renderer,w=c.$firstLineNumber,x=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||c.$useWrapMode)&&(x=c.getLength()+w-1);var E=f?f.getWidth(c,x,s):x.toString().length*s.characterWidth,M=this.$padding||this.$computePadding();E+=M.left+M.right,E!==this.gutterWidth&&!isNaN(E)&&(this.gutterWidth=E,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",E))},l.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var s=this.session.selection.getCursor();this.$cursorRow!==s.row&&(this.$cursorRow=s.row)}},l.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var s=this.session.selection.cursor.row;if(this.$cursorRow=s,!(this.$cursorCell&&this.$cursorCell.row==s)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var c=this.$lines.cells;this.$cursorCell=null;for(var f=0;f<c.length;f++){var w=c[f];if(w.row>=this.$cursorRow){if(w.row>this.$cursorRow){var x=this.session.getFoldLine(this.$cursorRow);if(f>0&&x&&x.start.row==c[f-1].row)w=c[f-1];else break}w.element.className="ace_gutter-active-line "+w.element.className,this.$cursorCell=w;break}}}}},l.prototype.scrollLines=function(s){var c=this.config;if(this.config=s,this.$updateCursorRow(),this.$lines.pageChanged(c,s))return this.update(s);this.$lines.moveContainer(s);var f=Math.min(s.lastRow+s.gutterOffset,this.session.getLength()-1),w=this.oldLastRow;if(this.oldLastRow=f,!c||w<s.firstRow)return this.update(s);if(f<c.firstRow)return this.update(s);if(c.firstRow<s.firstRow)for(var x=this.session.getFoldedRowCount(c.firstRow,s.firstRow-1);x>0;x--)this.$lines.shift();if(w>f)for(var x=this.session.getFoldedRowCount(f+1,w);x>0;x--)this.$lines.pop();s.firstRow<c.firstRow&&this.$lines.unshift(this.$renderLines(s,s.firstRow,c.firstRow-1)),f>w&&this.$lines.push(this.$renderLines(s,w+1,f)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(s)},l.prototype.$renderLines=function(s,c,f){for(var w=[],x=c,E=this.session.getNextFoldLine(x),M=E?E.start.row:1/0;x>M&&(x=E.end.row+1,E=this.session.getNextFoldLine(x,E),M=E?E.start.row:1/0),!(x>f);){var k=this.$lines.createCell(x,s,this.session,u);this.$renderCell(k,s,E,x),w.push(k),x++}return w},l.prototype.$renderCell=function(s,c,f,w){var x=s.element,E=this.session,M=x.childNodes[0],k=x.childNodes[1],C=x.childNodes[2],O=x.childNodes[3],L=C.firstChild,R=E.$firstLineNumber,I=E.$breakpoints,z=E.$decorations,F=E.gutterRenderer||this.$renderer,N=this.$showFoldWidgets&&E.foldWidgets,A=f?f.start.row:Number.MAX_VALUE,S=c.lineHeight+"px",D=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",j=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",U=(F?F.getText(E,w):w+R).toString();if(this.$highlightGutterLine&&(w==this.$cursorRow||f&&w<this.$cursorRow&&w>=A&&this.$cursorRow<=f.end.row)&&(D+="ace_gutter-active-line ",this.$cursorCell!=s&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=s)),I[w]&&(D+=I[w]),z[w]&&(D+=z[w]),this.$annotations[w]&&w!==A&&(D+=this.$annotations[w].className),N){var q=N[w];q==null&&(q=N[w]=E.getFoldWidget(w))}if(q){var Q="ace_fold-widget ace_"+q,te=q=="start"&&w==A&&w<f.end.row;if(te){Q+=" ace_closed";for(var de="",ne=!1,ce=w+1;ce<=f.end.row;ce++)if(this.$annotations[ce]){if(this.$annotations[ce].className===" ace_error"){ne=!0,de=" ace_error_fold";break}this.$annotations[ce].className===" ace_security"?(ne=!0,de=" ace_security_fold"):this.$annotations[ce].className===" ace_warning"&&de!==" ace_security_fold"&&(ne=!0,de=" ace_warning_fold")}D+=de}else Q+=" ace_open";k.className!=Q&&(k.className=Q),p.setStyle(k.style,"height",S),p.setStyle(k.style,"display","inline-block"),k.setAttribute("role","button"),k.setAttribute("tabindex","-1");var he=E.getFoldWidgetRange(w);he?k.setAttribute("aria-label",o("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[he.start.row+1,he.end.row+1])):f?k.setAttribute("aria-label",o("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[f.start.row+1,f.end.row+1])):k.setAttribute("aria-label",o("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[w+1])),te?(k.setAttribute("aria-expanded","false"),k.setAttribute("title",o("gutter.code-folding.closed.title","Unfold code"))):(k.setAttribute("aria-expanded","true"),k.setAttribute("title",o("gutter.code-folding.open.title","Fold code")))}else k&&(p.setStyle(k.style,"display","none"),k.setAttribute("tabindex","0"),k.removeAttribute("role"),k.removeAttribute("aria-label"));var ue=this.session.$gutterCustomWidgets[w];if(ue?this.$addCustomWidget(w,ue,s):O&&this.$removeCustomWidget(w,s),ne&&this.$showFoldedAnnotations){C.className="ace_gutter_annotation",L.className=j,L.className+=de,p.setStyle(L.style,"height",S),p.setStyle(C.style,"display","block"),p.setStyle(C.style,"height",S);var ve;switch(de){case" ace_error_fold":ve=o("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security_fold":ve=o("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning_fold":ve=o("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break}C.setAttribute("aria-label",ve),C.setAttribute("tabindex","-1"),C.setAttribute("role","button")}else if(this.$annotations[w]){C.className="ace_gutter_annotation",L.className=j,this.$useSvgGutterIcons?L.className+=this.$annotations[w].className:x.classList.add(this.$annotations[w].className.replace(" ","")),p.setStyle(L.style,"height",S),p.setStyle(C.style,"display","block"),p.setStyle(C.style,"height",S);var ve;switch(this.$annotations[w].className){case" ace_error":ve=o("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security":ve=o("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning":ve=o("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break;case" ace_info":ve=o("gutter.annotation.aria-label.info","Info, read annotations row $0",[U]);break;case" ace_hint":ve=o("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[U]);break}C.setAttribute("aria-label",ve),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!==M.data&&(M.data=U),x.className!=D&&(x.className=D),p.setStyle(s.element.style,"height",this.$lines.computeLineHeight(w,c,E)+"px"),p.setStyle(s.element.style,"top",this.$lines.computeLineTop(w,c,E)+"px"),s.text=U,C.style.display==="none"&&k.style.display==="none"&&!ue?s.element.setAttribute("aria-hidden",!0):s.element.setAttribute("aria-hidden",!1),s},l.prototype.setHighlightGutterLine=function(s){this.$highlightGutterLine=s},l.prototype.setShowLineNumbers=function(s){this.$renderer=!s&&{getWidth:function(){return 0},getText:function(){return""}}},l.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},l.prototype.setShowFoldWidgets=function(s){s?p.addCssClass(this.element,"ace_folding-enabled"):p.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=s,this.$padding=null},l.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},l.prototype.$hideFoldWidget=function(s,c){var f=c||this.$getGutterCell(s);if(f&&f.element){var w=f.element.childNodes[1];w&&p.setStyle(w.style,"display","none")}},l.prototype.$showFoldWidget=function(s,c){var f=c||this.$getGutterCell(s);if(f&&f.element){var w=f.element.childNodes[1];w&&this.session.foldWidgets&&this.session.foldWidgets[f.row]&&p.setStyle(w.style,"display","inline-block")}},l.prototype.$getGutterCell=function(s){var c=this.$lines.cells,f=this.session.documentToScreenRow(s,0);return c[s-this.config.firstRowScreen-(s-f)]},l.prototype.$addCustomWidget=function(s,c,f){var w=c.className,x=c.label,E=c.title,M=c.callbacks;this.session.$gutterCustomWidgets[s]={className:w,label:x,title:E,callbacks:M},this.$hideFoldWidget(s,f);var k=f||this.$getGutterCell(s);if(k&&k.element){var C=k.element.querySelector(".ace_custom-widget");C&&C.remove(),C=p.createElement("span"),C.className="ace_custom-widget ".concat(w),C.setAttribute("tabindex","-1"),C.setAttribute("role","button"),C.setAttribute("aria-label",x),C.setAttribute("title",E),p.setStyle(C.style,"display","inline-block"),p.setStyle(C.style,"height","inherit"),M&&M.onClick&&C.addEventListener("click",function(O){M.onClick(O,s),O.stopPropagation()}),k.element.appendChild(C)}},l.prototype.$removeCustomWidget=function(s,c){delete this.session.$gutterCustomWidgets[s],this.$showFoldWidget(s,c);var f=c||this.$getGutterCell(s);if(f&&f.element){var w=f.element.querySelector(".ace_custom-widget");w&&f.element.removeChild(w)}},l.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var s=p.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(s.borderLeftWidth)||0)+(parseInt(s.paddingLeft)||0)+1,this.$padding.right=(parseInt(s.borderRightWidth)||0)+(parseInt(s.paddingRight)||0),this.$padding},l.prototype.getRegion=function(s){var c=this.$padding||this.$computePadding(),f=this.element.getBoundingClientRect();if(s.x<c.left+f.left)return"markers";if(this.$showFoldWidgets&&s.x>f.right-c.right)return"foldWidgets"},l})();a.prototype.$fixedWidth=!1,a.prototype.$highlightGutterLine=!0,a.prototype.$renderer="",a.prototype.$showLineNumbers=!0,a.prototype.$showFoldWidgets=!0,m.implement(a.prototype,d);function u(l){var s=document.createTextNode("");l.appendChild(s);var c=p.createElement("span");l.appendChild(c);var f=p.createElement("span");l.appendChild(f);var w=p.createElement("span");return f.appendChild(w),l}i.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(n,i,h){var p=n("../range").Range,m=n("../lib/dom"),b=(function(){function g(o){this.element=m.createElement("div"),this.element.className="ace_layer ace_marker-layer",o.appendChild(this.element)}return g.prototype.setPadding=function(o){this.$padding=o},g.prototype.setSession=function(o){this.session=o},g.prototype.setMarkers=function(o){this.markers=o},g.prototype.elt=function(o,a){var u=this.i!=-1&&this.element.childNodes[this.i];u?this.i++:(u=document.createElement("div"),this.element.appendChild(u),this.i=-1),u.style.cssText=a,u.className=o},g.prototype.update=function(o){if(o){this.config=o,this.i=0;var a;for(var u in this.markers){var l=this.markers[u];if(!l.range){l.update(a,this,this.session,o);continue}var s=l.range.clipRows(o.firstRow,o.lastRow);if(!s.isEmpty())if(s=s.toScreenRange(this.session),l.renderer){var c=this.$getTop(s.start.row,o),f=this.$padding+s.start.column*o.characterWidth;l.renderer(a,s,f,c,o)}else l.type=="fullLine"?this.drawFullLineMarker(a,s,l.clazz,o):l.type=="screenLine"?this.drawScreenLineMarker(a,s,l.clazz,o):s.isMultiLine()?l.type=="text"?this.drawTextMarker(a,s,l.clazz,o):this.drawMultiLineMarker(a,s,l.clazz,o):this.drawSingleLineMarker(a,s,l.clazz+" ace_start ace_br15",o)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},g.prototype.$getTop=function(o,a){return(o-a.firstRowScreen)*a.lineHeight},g.prototype.drawTextMarker=function(o,a,u,l,s){for(var c=this.session,f=a.start.row,w=a.end.row,x=f,E=0,M=0,k=c.getScreenLastRowColumn(x),C=new p(x,a.start.column,x,M);x<=w;x++)C.start.row=C.end.row=x,C.start.column=x==f?a.start.column:c.getRowWrapIndent(x),C.end.column=k,E=M,M=k,k=x+1<w?c.getScreenLastRowColumn(x+1):x==w?0:a.end.column,this.drawSingleLineMarker(o,C,u+(x==f?" ace_start":"")+" ace_br"+d(x==f||x==f+1&&a.start.column,E<M,M>k,x==w),l,x==w?0:1,s)},g.prototype.drawMultiLineMarker=function(o,a,u,l,s){var c=this.$padding,f=l.lineHeight,w=this.$getTop(a.start.row,l),x=c+a.start.column*l.characterWidth;if(s=s||"",this.session.$bidiHandler.isBidiRow(a.start.row)){var E=a.clone();E.end.row=E.start.row,E.end.column=this.session.getLine(E.start.row).length,this.drawBidiSingleLineMarker(o,E,u+" ace_br1 ace_start",l,null,s)}else this.elt(u+" ace_br1 ace_start","height:"+f+"px;right:"+c+"px;top:"+w+"px;left:"+x+"px;"+(s||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var E=a.clone();E.start.row=E.end.row,E.start.column=0,this.drawBidiSingleLineMarker(o,E,u+" ace_br12",l,null,s)}else{w=this.$getTop(a.end.row,l);var M=a.end.column*l.characterWidth;this.elt(u+" ace_br12","height:"+f+"px;width:"+M+"px;top:"+w+"px;left:"+c+"px;"+(s||""))}if(f=(a.end.row-a.start.row-1)*l.lineHeight,!(f<=0)){w=this.$getTop(a.start.row+1,l);var k=(a.start.column?1:0)|(a.end.column?0:8);this.elt(u+(k?" ace_br"+k:""),"height:"+f+"px;right:"+c+"px;top:"+w+"px;left:"+c+"px;"+(s||""))}},g.prototype.drawSingleLineMarker=function(o,a,u,l,s,c){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(o,a,u,l,s,c);var f=l.lineHeight,w=(a.end.column+(s||0)-a.start.column)*l.characterWidth,x=this.$getTop(a.start.row,l),E=this.$padding+a.start.column*l.characterWidth;this.elt(u,"height:"+f+"px;width:"+w+"px;top:"+x+"px;left:"+E+"px;"+(c||""))},g.prototype.drawBidiSingleLineMarker=function(o,a,u,l,s,c){var f=l.lineHeight,w=this.$getTop(a.start.row,l),x=this.$padding,E=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);E.forEach(function(M){this.elt(u,"height:"+f+"px;width:"+(M.width+(s||0))+"px;top:"+w+"px;left:"+(x+M.left)+"px;"+(c||""))},this)},g.prototype.drawFullLineMarker=function(o,a,u,l,s){var c=this.$getTop(a.start.row,l),f=l.lineHeight;a.start.row!=a.end.row&&(f+=this.$getTop(a.end.row,l)-c),this.elt(u,"height:"+f+"px;top:"+c+"px;left:0;right:0;"+(s||""))},g.prototype.drawScreenLineMarker=function(o,a,u,l,s){var c=this.$getTop(a.start.row,l),f=l.lineHeight;this.elt(u,"height:"+f+"px;top:"+c+"px;left:0;right:0;"+(s||""))},g})();b.prototype.$padding=0;function d(g,o,a,u){return(g?1:0)|(o?2:0)|(a?4:0)|(u?8:0)}i.Marker=b}),ace.define("ace/layer/text_util",["require","exports","module"],function(n,i,h){var p=new Set(["text","rparen","lparen"]);i.isTextToken=function(m){return p.has(m)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(n,i,h){var p=n("../lib/oop"),m=n("../lib/dom"),b=n("../lib/lang"),d=n("./lines").Lines,g=n("../lib/event_emitter").EventEmitter,o=n("../config").nls,a=n("./text_util").isTextToken,u=(function(){function l(s){this.dom=m,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",s.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new d(this.element)}return l.prototype.$updateEolChar=function(){var s=this.session.doc,c=s.getNewLineCharacter()==`
216
+ `&&s.getNewLineMode()!="windows",f=c?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=f)return this.EOL_CHAR=f,!0},l.prototype.setPadding=function(s){this.$padding=s,this.element.style.margin="0 "+s+"px"},l.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},l.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},l.prototype.$setFontMetrics=function(s){this.$fontMetrics=s,this.$fontMetrics.on("changeCharacterSize",(function(c){this._signal("changeCharacterSize",c)}).bind(this)),this.$pollSizeChanges()},l.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},l.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},l.prototype.setSession=function(s){this.session=s,s&&this.$computeTabString()},l.prototype.setShowInvisibles=function(s){return this.showInvisibles==s?!1:(this.showInvisibles=s,typeof s=="string"?(this.showSpaces=/tab/i.test(s),this.showTabs=/space/i.test(s),this.showEOL=/eol/i.test(s)):this.showSpaces=this.showTabs=this.showEOL=s,this.$computeTabString(),!0)},l.prototype.setDisplayIndentGuides=function(s){return this.displayIndentGuides==s?!1:(this.displayIndentGuides=s,this.$computeTabString(),!0)},l.prototype.setHighlightIndentGuides=function(s){return this.$highlightIndentGuides===s?!1:(this.$highlightIndentGuides=s,s)},l.prototype.$computeTabString=function(){var s=this.session.getTabSize();this.tabSize=s;for(var c=this.$tabStrings=[0],f=1;f<s+1;f++)if(this.showTabs){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_tab",w.textContent=b.stringRepeat(this.TAB_CHAR,f),c.push(w)}else c.push(this.dom.createTextNode(b.stringRepeat(" ",f),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var x="ace_indent-guide",E=this.showSpaces?" ace_invisible ace_invisible_space":"",M=this.showSpaces?b.stringRepeat(this.SPACE_CHAR,this.tabSize):b.stringRepeat(" ",this.tabSize),k=this.showTabs?" ace_invisible ace_invisible_tab":"",C=this.showTabs?b.stringRepeat(this.TAB_CHAR,this.tabSize):M,w=this.dom.createElement("span");w.className=x+E,w.textContent=M,this.$tabStrings[" "]=w;var w=this.dom.createElement("span");w.className=x+k,w.textContent=C,this.$tabStrings[" "]=w}},l.prototype.updateLines=function(s,c,f){if(this.config.lastRow!=s.lastRow||this.config.firstRow!=s.firstRow)return this.update(s);this.config=s;for(var w=Math.max(c,s.firstRow),x=Math.min(f,s.lastRow),E=this.element.childNodes,M=0,k=s.firstRow;k<w;k++){var C=this.session.getFoldLine(k);if(C)if(C.containsRow(w)){w=C.start.row;break}else k=C.end.row;M++}for(var O=!1,k=w,C=this.session.getNextFoldLine(k),L=C?C.start.row:1/0;k>L&&(k=C.end.row+1,C=this.session.getNextFoldLine(k,C),L=C?C.start.row:1/0),!(k>x);){var R=E[M++];if(R){this.dom.removeChildren(R),this.$renderLine(R,k,k==L?C:!1),O&&(R.style.top=this.$lines.computeLineTop(k,s,this.session)+"px");var I=s.lineHeight*this.session.getRowLength(k)+"px";R.style.height!=I&&(O=!0,R.style.height=I)}k++}if(O)for(;M<this.$lines.cells.length;){var z=this.$lines.cells[M++];z.element.style.top=this.$lines.computeLineTop(z.row,s,this.session)+"px"}},l.prototype.scrollLines=function(s){var c=this.config;if(this.config=s,this.$lines.pageChanged(c,s))return this.update(s);this.$lines.moveContainer(s);var f=s.lastRow,w=c?c.lastRow:-1;if(!c||w<s.firstRow)return this.update(s);if(f<c.firstRow)return this.update(s);if(!c||c.lastRow<s.firstRow)return this.update(s);if(s.lastRow<c.firstRow)return this.update(s);if(c.firstRow<s.firstRow)for(var x=this.session.getFoldedRowCount(c.firstRow,s.firstRow-1);x>0;x--)this.$lines.shift();if(c.lastRow>s.lastRow)for(var x=this.session.getFoldedRowCount(s.lastRow+1,c.lastRow);x>0;x--)this.$lines.pop();s.firstRow<c.firstRow&&this.$lines.unshift(this.$renderLinesFragment(s,s.firstRow,c.firstRow-1)),s.lastRow>c.lastRow&&this.$lines.push(this.$renderLinesFragment(s,c.lastRow+1,s.lastRow)),this.$highlightIndentGuide()},l.prototype.$renderLinesFragment=function(s,c,f){for(var w=[],x=c,E=this.session.getNextFoldLine(x),M=E?E.start.row:1/0;x>M&&(x=E.end.row+1,E=this.session.getNextFoldLine(x,E),M=E?E.start.row:1/0),!(x>f);){var k=this.$lines.createCell(x,s,this.session),C=k.element;this.dom.removeChildren(C),m.setStyle(C.style,"height",this.$lines.computeLineHeight(x,s,this.session)+"px"),m.setStyle(C.style,"top",this.$lines.computeLineTop(x,s,this.session)+"px"),this.$renderLine(C,x,x==M?E:!1),this.$useLineGroups()?C.className="ace_line_group":C.className="ace_line",w.push(k),x++}return w},l.prototype.update=function(s){this.$lines.moveContainer(s),this.config=s;for(var c=s.firstRow,f=s.lastRow,w=this.$lines;w.getLength();)w.pop();w.push(this.$renderLinesFragment(s,c,f))},l.prototype.$renderToken=function(s,c,f,w){for(var x=this,E=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,M=this.dom.createFragment(this.element),k,C=0;k=E.exec(w);){var O=k[1],L=k[2],R=k[3],I=k[4],z=k[5];if(!(!x.showSpaces&&L)){var F=C!=k.index?w.slice(C,k.index):"";if(C=k.index+k[0].length,F&&M.appendChild(this.dom.createTextNode(F,this.element)),O){var N=x.session.getScreenTabSize(c+k.index),A=x.$tabStrings[N].cloneNode(!0);A.charCount=1,M.appendChild(A),c+=N-1}else if(L)if(x.showSpaces){var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_space",S.textContent=b.stringRepeat(x.SPACE_CHAR,L.length),M.appendChild(S)}else M.appendChild(this.dom.createTextNode(L,this.element));else if(R){var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_space ace_invalid",S.textContent=b.stringRepeat(x.SPACE_CHAR,R.length),M.appendChild(S)}else if(I){c+=1;var S=this.dom.createElement("span");S.style.width=x.config.characterWidth*2+"px",S.className=x.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",S.textContent=x.showSpaces?x.SPACE_CHAR:I,M.appendChild(S)}else if(z){c+=1;var S=this.dom.createElement("span");S.style.width=x.config.characterWidth*2+"px",S.className="ace_cjk",S.textContent=z,M.appendChild(S)}}}if(M.appendChild(this.dom.createTextNode(C?w.slice(C):w,this.element)),a(f.type))s.appendChild(M);else{var D="ace_"+f.type.replace(/\./g," ace_"),S=this.dom.createElement("span");f.type=="fold"&&(S.style.width=f.value.length*this.config.characterWidth+"px",S.setAttribute("title",o("inline-fold.closed.title","Unfold code"))),S.className=D,S.appendChild(M),s.appendChild(S)}return c+w.length},l.prototype.renderIndentGuide=function(s,c,f){var w=c.search(this.$indentGuideRe);if(w<=0||w>=f)return c;if(c[0]==" "){w-=w%this.tabSize;for(var x=w/this.tabSize,E=0;E<x;E++)s.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),c.substr(w)}else if(c[0]==" "){for(var E=0;E<w;E++)s.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),c.substr(w)}return this.$highlightIndentGuide(),c},l.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var s=this.session.doc.$lines;if(s){var c=this.session.selection.getCursor(),f=/^\s*/.exec(this.session.doc.getLine(c.row))[0].length,w=Math.floor(f/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:w,start:c.row};var x=this.session.$bracketHighlight;if(x){for(var E=this.session.$bracketHighlight.ranges,M=0;M<E.length;M++)if(c.row!==E[M].start.row){this.$highlightIndentGuideMarker.end=E[M].start.row+1,c.row>E[M].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&s[c.row]!==""&&c.column===s[c.row].length){this.$highlightIndentGuideMarker.dir=1;for(var M=c.row+1;M<s.length;M++){var k=s[M],C=/^\s*/.exec(k)[0].length;if(k!==""&&(this.$highlightIndentGuideMarker.end=M,C<=f))break}}this.$renderHighlightIndentGuide()}}},l.prototype.$clearActiveIndentGuide=function(){for(var s=this.element.querySelectorAll(".ace_indent-guide-active"),c=0;c<s.length;c++)s[c].classList.remove("ace_indent-guide-active")},l.prototype.$setIndentGuideActive=function(s,c){var f=this.session.doc.getLine(s.row);if(f!==""){var w=s.element;if(s.element.classList&&s.element.classList.contains("ace_line_group"))if(s.element.childNodes.length>0)w=s.element.childNodes[0];else return;var x=w.childNodes;if(x){var E=x[c-1];E&&E.classList&&E.classList.contains("ace_indent-guide")&&E.classList.add("ace_indent-guide-active")}}},l.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var s=this.$lines.cells;this.$clearActiveIndentGuide();var c=this.$highlightIndentGuideMarker.indentLevel;if(c!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var f=0;f<s.length;f++){var w=s[f];if(this.$highlightIndentGuideMarker.end&&w.row>=this.$highlightIndentGuideMarker.start+1){if(w.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,c)}}else for(var f=s.length-1;f>=0;f--){var w=s[f];if(this.$highlightIndentGuideMarker.end&&w.row<this.$highlightIndentGuideMarker.start){if(w.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,c)}}}},l.prototype.$createLineElement=function(s){var c=this.dom.createElement("div");return c.className="ace_line",c.style.height=this.config.lineHeight+"px",c},l.prototype.$renderWrappedLine=function(s,c,f){var w=0,x=0,E=f[0],M=0,k=this.$createLineElement();s.appendChild(k);for(var C=0;C<c.length;C++){var O=c[C],L=O.value;if(C==0&&this.displayIndentGuides){if(w=L.length,L=this.renderIndentGuide(k,L,E),!L)continue;w-=L.length}if(w+L.length<E)M=this.$renderToken(k,M,O,L),w+=L.length;else{for(;w+L.length>=E;){M=this.$renderToken(k,M,O,L.substring(0,E-w)),L=L.substring(E-w),w=E,k=this.$createLineElement(),s.appendChild(k);var R=this.dom.createTextNode(b.stringRepeat(" ",f.indent),this.element);R.charCount=0,k.appendChild(R),x++,M=0,E=f[x]||Number.MAX_VALUE}L.length!=0&&(w+=L.length,M=this.$renderToken(k,M,O,L))}}f[f.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(k,M,null,"",!0)},l.prototype.$renderSimpleLine=function(s,c){for(var f=0,w=0;w<c.length;w++){var x=c[w],E=x.value;if(!(w==0&&this.displayIndentGuides&&(E=this.renderIndentGuide(s,E),!E))){if(f+E.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(s,f,x,E);f=this.$renderToken(s,f,x,E)}}},l.prototype.$renderOverflowMessage=function(s,c,f,w,x){f&&this.$renderToken(s,c,f,w.slice(0,this.MAX_LINE_LENGTH-c));var E=this.dom.createElement("span");E.className="ace_inline_button ace_keyword ace_toggle_wrap",E.textContent=x?"<hide>":"<click to see more...>",s.appendChild(E)},l.prototype.$renderLine=function(s,c,f){if(!f&&f!=!1&&(f=this.session.getFoldLine(c)),f)var w=this.$getFoldLineTokens(c,f);else var w=this.session.getTokens(c);var x=s;if(w.length){var E=this.session.getRowSplitData(c);if(E&&E.length){this.$renderWrappedLine(s,w,E);var x=s.lastChild}else{var x=s;this.$useLineGroups()&&(x=this.$createLineElement(),s.appendChild(x)),this.$renderSimpleLine(x,w)}}else this.$useLineGroups()&&(x=this.$createLineElement(),s.appendChild(x));if(this.showEOL&&x){f&&(c=f.end.row);var M=this.dom.createElement("span");M.className="ace_invisible ace_invisible_eol",M.textContent=c==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,x.appendChild(M)}},l.prototype.$getFoldLineTokens=function(s,c){var f=this.session,w=[];function x(M,k,C){for(var O=0,L=0;L+M[O].value.length<k;)if(L+=M[O].value.length,O++,O==M.length)return;if(L!=k){var R=M[O].value.substring(k-L);R.length>C-k&&(R=R.substring(0,C-k)),w.push({type:M[O].type,value:R}),L=k+R.length,O+=1}for(;L<C&&O<M.length;){var R=M[O].value;R.length+L>C?w.push({type:M[O].type,value:R.substring(0,C-L)}):w.push(M[O]),L+=R.length,O+=1}}var E=f.getTokens(s);return c.walk(function(M,k,C,O,L){M!=null?w.push({type:"fold",value:M}):(L&&(E=f.getTokens(k)),E.length&&x(E,O,C))},c.end.row,this.session.getLine(c.end.row).length),w},l.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},l})();u.prototype.EOF_CHAR="¶",u.prototype.EOL_CHAR_LF="¬",u.prototype.EOL_CHAR_CRLF="¤",u.prototype.EOL_CHAR=u.prototype.EOL_CHAR_LF,u.prototype.TAB_CHAR="—",u.prototype.SPACE_CHAR="·",u.prototype.$padding=0,u.prototype.MAX_LINE_LENGTH=1e4,u.prototype.showInvisibles=!1,u.prototype.showSpaces=!1,u.prototype.showTabs=!1,u.prototype.showEOL=!1,u.prototype.displayIndentGuides=!0,u.prototype.$highlightIndentGuides=!0,u.prototype.$tabStrings=[],u.prototype.destroy={},u.prototype.onChangeTabSize=u.prototype.$computeTabString,p.implement(u.prototype,g),i.Text=u}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(n,i,h){var p=n("../lib/dom"),m=(function(){function b(d){this.element=p.createElement("div"),this.element.className="ace_layer ace_cursor-layer",d.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 b.prototype.$updateOpacity=function(d){for(var g=this.cursors,o=g.length;o--;)p.setStyle(g[o].style,"opacity",d?"":"0")},b.prototype.$startCssAnimation=function(){for(var d=this.cursors,g=d.length;g--;)d[g].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&p.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},b.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,p.removeCssClass(this.element,"ace_animate-blinking")},b.prototype.setPadding=function(d){this.$padding=d},b.prototype.setSession=function(d){this.session=d},b.prototype.setBlinking=function(d){d!=this.isBlinking&&(this.isBlinking=d,this.restartTimer())},b.prototype.setBlinkInterval=function(d){d!=this.blinkInterval&&(this.blinkInterval=d,this.restartTimer())},b.prototype.setSmoothBlinking=function(d){d!=this.smoothBlinking&&(this.smoothBlinking=d,p.setCssClass(this.element,"ace_smooth-blinking",d),this.$updateCursors(!0),this.restartTimer())},b.prototype.addCursor=function(){var d=p.createElement("div");return d.className="ace_cursor",this.element.appendChild(d),this.cursors.push(d),d},b.prototype.removeCursor=function(){if(this.cursors.length>1){var d=this.cursors.pop();return d.parentNode.removeChild(d),d}},b.prototype.hideCursor=function(){this.isVisible=!1,p.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},b.prototype.showCursor=function(){this.isVisible=!0,p.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},b.prototype.restartTimer=function(){var d=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,p.removeCssClass(this.element,"ace_smooth-blinking")),d(!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 g=(function(){this.timeoutId=setTimeout(function(){d(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){d(!0),g()},this.blinkInterval),g()}},b.prototype.getPixelPosition=function(d,g){if(!this.config||!this.session)return{left:0,top:0};d||(d=this.session.selection.getCursor());var o=this.session.documentToScreenPosition(d),a=this.$padding+(this.session.$bidiHandler.isBidiRow(o.row,d.row)?this.session.$bidiHandler.getPosLeft(o.column):o.column*this.config.characterWidth),u=(o.row-(g?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:a,top:u}},b.prototype.isCursorInView=function(d,g){return d.top>=0&&d.top<g.maxHeight},b.prototype.update=function(d){this.config=d;var g=this.session.$selectionMarkers,o=0,a=0;(g===void 0||g.length===0)&&(g=[{cursor:null}]);for(var o=0,u=g.length;o<u;o++){var l=this.getPixelPosition(g[o].cursor,!0);if(!((l.top>d.height+d.offset||l.top<0)&&o>1)){var s=this.cursors[a++]||this.addCursor(),c=s.style;this.drawCursor?this.drawCursor(s,l,d,g[o],this.session):this.isCursorInView(l,d)?(p.setStyle(c,"display","block"),p.translate(s,l.left,l.top),p.setStyle(c,"width",Math.round(d.characterWidth)+"px"),p.setStyle(c,"height",d.lineHeight+"px")):p.setStyle(c,"display","none")}}for(;this.cursors.length>a;)this.removeCursor();var f=this.session.getOverwrite();this.$setOverwrite(f),this.$pixelPos=l,this.restartTimer()},b.prototype.$setOverwrite=function(d){d!=this.overwrite&&(this.overwrite=d,d?p.addCssClass(this.element,"ace_overwrite-cursors"):p.removeCssClass(this.element,"ace_overwrite-cursors"))},b.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},b})();m.prototype.$padding=0,m.prototype.drawCursor=null,i.Cursor=m}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,i,h){var p=this&&this.__extends||(function(){var s=function(c,f){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var E in x)Object.prototype.hasOwnProperty.call(x,E)&&(w[E]=x[E])},s(c,f)};return function(c,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");s(c,f);function w(){this.constructor=c}c.prototype=f===null?Object.create(f):(w.prototype=f.prototype,new w)}})(),m=n("./lib/oop"),b=n("./lib/dom"),d=n("./lib/event"),g=n("./lib/event_emitter").EventEmitter,o=32768,a=(function(){function s(c,f){this.element=b.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+f,this.inner=b.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),c.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,d.addListener(this.element,"scroll",this.onScroll.bind(this)),d.addListener(this.element,"mousedown",d.preventDefault)}return s.prototype.setVisible=function(c){this.element.style.display=c?"":"none",this.isVisible=c,this.coeff=1},s})();m.implement(a.prototype,g);var u=(function(s){p(c,s);function c(f,w){var x=s.call(this,f,"-v")||this;return x.scrollTop=0,x.scrollHeight=0,w.$scrollbarWidth=x.width=b.scrollbarWidth(f.ownerDocument),x.inner.style.width=x.element.style.width=(x.width||15)+5+"px",x.$minWidth=0,x}return c.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var f=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-f)/(this.coeff-f)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},c.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},c.prototype.setHeight=function(f){this.element.style.height=f+"px"},c.prototype.setScrollHeight=function(f){this.scrollHeight=f,f>o?(this.coeff=o/f,f=o):this.coeff!=1&&(this.coeff=1),this.inner.style.height=f+"px"},c.prototype.setScrollTop=function(f){this.scrollTop!=f&&(this.skipEvent=!0,this.scrollTop=f,this.element.scrollTop=f*this.coeff)},c})(a);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var l=(function(s){p(c,s);function c(f,w){var x=s.call(this,f,"-h")||this;return x.scrollLeft=0,x.height=w.$scrollbarWidth,x.inner.style.height=x.element.style.height=(x.height||15)+5+"px",x}return c.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},c.prototype.getHeight=function(){return this.isVisible?this.height:0},c.prototype.setWidth=function(f){this.element.style.width=f+"px"},c.prototype.setInnerWidth=function(f){this.inner.style.width=f+"px"},c.prototype.setScrollWidth=function(f){this.inner.style.width=f+"px"},c.prototype.setScrollLeft=function(f){this.scrollLeft!=f&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=f)},c})(a);i.ScrollBar=u,i.ScrollBarV=u,i.ScrollBarH=l,i.VScrollBar=u,i.HScrollBar=l}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,i,h){var p=this&&this.__extends||(function(){var l=function(s,c){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,w){f.__proto__=w}||function(f,w){for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(f[x]=w[x])},l(s,c)};return function(s,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");l(s,c);function f(){this.constructor=s}s.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}})(),m=n("./lib/oop"),b=n("./lib/dom"),d=n("./lib/event"),g=n("./lib/event_emitter").EventEmitter;b.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
217
+ position: absolute;
218
+ background: rgba(128, 128, 128, 0.6);
219
+ -moz-box-sizing: border-box;
220
+ box-sizing: border-box;
221
+ border: 1px solid #bbb;
222
+ border-radius: 2px;
223
+ z-index: 8;
224
+ }
225
+ .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
226
+ position: absolute;
227
+ z-index: 6;
228
+ background: none;
229
+ overflow: hidden!important;
230
+ }
231
+ .ace_editor>.ace_sb-v {
232
+ z-index: 6;
233
+ right: 0;
234
+ top: 0;
235
+ width: 12px;
236
+ }
237
+ .ace_editor>.ace_sb-v div {
238
+ z-index: 8;
239
+ right: 0;
240
+ width: 100%;
241
+ }
242
+ .ace_editor>.ace_sb-h {
243
+ bottom: 0;
244
+ left: 0;
245
+ height: 12px;
246
+ }
247
+ .ace_editor>.ace_sb-h div {
248
+ bottom: 0;
249
+ height: 100%;
250
+ }
251
+ .ace_editor>.ace_sb_grabbed {
252
+ z-index: 8;
253
+ background: #000;
254
+ }`,"ace_scrollbar.css",!1);var o=(function(){function l(s,c){this.element=b.createElement("div"),this.element.className="ace_sb"+c,this.inner=b.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,s.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,d.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return l.prototype.setVisible=function(s){this.element.style.display=s?"":"none",this.isVisible=s,this.coeff=1},l})();m.implement(o.prototype,g);var a=(function(l){p(s,l);function s(c,f){var w=l.call(this,c,"-v")||this;return w.scrollTop=0,w.scrollHeight=0,w.parent=c,w.width=w.VScrollWidth,w.renderer=f,w.inner.style.width=w.element.style.width=(w.width||15)+"px",w.$minWidth=0,w}return s.prototype.onMouseDown=function(c,f){if(c==="mousedown"&&!(d.getButton(f)!==0||f.detail===2)){if(f.target===this.inner){var w=this,x=f.clientY,E=function(I){x=I.clientY},M=function(){clearInterval(L)},k=f.clientY,C=this.thumbTop,O=function(){if(x!==void 0){var I=w.scrollTopFromThumbTop(C+x-k);I!==w.scrollTop&&w._emit("scroll",{data:I})}};d.capture(this.inner,E,M);var L=setInterval(O,20);return d.preventDefault(f)}var R=f.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(R)}),d.preventDefault(f)}},s.prototype.getHeight=function(){return this.height},s.prototype.scrollTopFromThumbTop=function(c){var f=c*(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},s.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},s.prototype.setHeight=function(c){this.height=Math.max(0,c),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},s.prototype.setScrollHeight=function(c,f){this.pageHeight===c&&!f||(this.pageHeight=c,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},s.prototype.setScrollTop=function(c){this.scrollTop=c,c<0&&(c=0),this.thumbTop=c*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},s})(o);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var u=(function(l){p(s,l);function s(c,f){var w=l.call(this,c,"-h")||this;return w.scrollLeft=0,w.scrollWidth=0,w.height=w.HScrollHeight,w.inner.style.height=w.element.style.height=(w.height||12)+"px",w.renderer=f,w}return s.prototype.onMouseDown=function(c,f){if(c==="mousedown"&&!(d.getButton(f)!==0||f.detail===2)){if(f.target===this.inner){var w=this,x=f.clientX,E=function(I){x=I.clientX},M=function(){clearInterval(L)},k=f.clientX,C=this.thumbLeft,O=function(){if(x!==void 0){var I=w.scrollLeftFromThumbLeft(C+x-k);I!==w.scrollLeft&&w._emit("scroll",{data:I})}};d.capture(this.inner,E,M);var L=setInterval(O,20);return d.preventDefault(f)}var R=f.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(R)}),d.preventDefault(f)}},s.prototype.getHeight=function(){return this.isVisible?this.height:0},s.prototype.scrollLeftFromThumbLeft=function(c){var f=c*(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},s.prototype.setWidth=function(c){this.width=Math.max(0,c),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},s.prototype.setScrollWidth=function(c,f){this.pageWidth===c&&!f||(this.pageWidth=c,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},s.prototype.setScrollLeft=function(c){this.scrollLeft=c,c<0&&(c=0),this.thumbLeft=c*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},s})(o);u.prototype.setInnerWidth=u.prototype.setScrollWidth,i.ScrollBar=a,i.ScrollBarV=a,i.ScrollBarH=u,i.VScrollBar=a,i.HScrollBar=u}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(n,i,h){var p=n("./lib/event"),m=(function(){function b(d,g){this.onRender=d,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=g||window;var o=this;this._flush=function(a){o.pending=!1;var u=o.changes;if(u&&(p.blockIdle(100),o.changes=0,o.onRender(u)),o.changes){if(o.$recursionLimit--<0)return;o.schedule()}else o.$recursionLimit=2}}return b.prototype.schedule=function(d){this.changes=this.changes|d,this.changes&&!this.pending&&(p.nextFrame(this._flush),this.pending=!0)},b.prototype.clear=function(d){var g=this.changes;return this.changes=0,g},b})();i.RenderLoop=m}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(n,i,h){var p=n("../lib/oop"),m=n("../lib/dom"),b=n("../lib/lang"),d=n("../lib/event"),g=n("../lib/useragent"),o=n("../lib/event_emitter").EventEmitter,a=512,u=typeof ResizeObserver=="function",l=200,s=(function(){function c(f){this.el=m.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=m.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=m.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),f.appendChild(this.el),this.$measureNode.textContent=b.stringRepeat("X",a),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()}return c.prototype.$setMeasureNodeStyles=function(f,w){f.width=f.height="auto",f.left=f.top="0px",f.visibility="hidden",f.position="absolute",f.whiteSpace="pre",g.isIE<8?f["font-family"]="inherit":f.font="inherit",f.overflow=w?"hidden":"visible"},c.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 w=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=f,this.charSizes=Object.create(null),this.allowBoldFonts=w&&w.width===f.width&&w.height===f.height,this._emit("changeCharacterSize",{data:f})}},c.prototype.$addObserver=function(){var f=this;this.$observer=new window.ResizeObserver(function(w){f.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},c.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var f=this;return this.$pollSizeChangesTimer=d.onIdle(function w(){f.checkForSizeChanges(),d.onIdle(w,500)},500)},c.prototype.setPolling=function(f){f?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},c.prototype.$measureSizes=function(f){var w={height:(f||this.$measureNode).clientHeight,width:(f||this.$measureNode).clientWidth/a};return w.width===0||w.height===0?null:w},c.prototype.$measureCharWidth=function(f){this.$main.textContent=b.stringRepeat(f,a);var w=this.$main.getBoundingClientRect();return w.width/a},c.prototype.getCharacterWidth=function(f){var w=this.charSizes[f];return w===void 0&&(w=this.charSizes[f]=this.$measureCharWidth(f)/this.$characterSize.width),w},c.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},c.prototype.$getZoom=function(f){return!f||!f.parentElement?1:(Number(window.getComputedStyle(f).zoom)||1)*this.$getZoom(f.parentElement)},c.prototype.$initTransformMeasureNodes=function(){var f=function(w,x){return["div",{style:"position: absolute;top:"+w+"px;left:"+x+"px;"}]};this.els=m.buildDom([f(0,0),f(l,0),f(0,l),f(l,l)],this.el)},c.prototype.transformCoordinates=function(f,w){if(f){var x=this.$getZoom(this.el);f=C(1/x,f)}function E(Q,te,de){var ne=Q[1]*te[0]-Q[0]*te[1];return[(-te[1]*de[0]+te[0]*de[1])/ne,(+Q[1]*de[0]-Q[0]*de[1])/ne]}function M(Q,te){return[Q[0]-te[0],Q[1]-te[1]]}function k(Q,te){return[Q[0]+te[0],Q[1]+te[1]]}function C(Q,te){return[Q*te[0],Q*te[1]]}this.els||this.$initTransformMeasureNodes();function O(Q){var te=Q.getBoundingClientRect();return[te.left,te.top]}var L=O(this.els[0]),R=O(this.els[1]),I=O(this.els[2]),z=O(this.els[3]),F=E(M(z,R),M(z,I),M(k(R,I),k(z,L))),N=C(1+F[0],M(R,L)),A=C(1+F[1],M(I,L));if(w){var S=w,D=F[0]*S[0]/l+F[1]*S[1]/l+1,j=k(C(S[0],N),C(S[1],A));return k(C(1/D/l,j),L)}var U=M(f,L),q=E(M(N,C(F[0],U)),M(A,C(F[1],U)),U);return C(l,q)},c})();s.prototype.$characterSize={width:0,height:0},p.implement(s.prototype,o),i.FontMetrics=s}),ace.define("ace/css/editor-css",["require","exports","module"],function(n,i,h){h.exports=`
255
+ .ace_br1 {border-top-left-radius : 3px;}
256
+ .ace_br2 {border-top-right-radius : 3px;}
257
+ .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
258
+ .ace_br4 {border-bottom-right-radius: 3px;}
259
+ .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
260
+ .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
261
+ .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
262
+ .ace_br8 {border-bottom-left-radius : 3px;}
263
+ .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
264
+ .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
265
+ .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
266
+ .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
267
+ .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
268
+ .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
269
+ .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
270
+
271
+
272
+ .ace_editor {
273
+ position: relative;
274
+ overflow: hidden;
275
+ padding: 0;
276
+ font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
277
+ direction: ltr;
278
+ text-align: left;
279
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
280
+ forced-color-adjust: none;
281
+ }
282
+
283
+ .ace_scroller {
284
+ position: absolute;
285
+ overflow: hidden;
286
+ top: 0;
287
+ bottom: 0;
288
+ background-color: inherit;
289
+ -ms-user-select: none;
290
+ -moz-user-select: none;
291
+ -webkit-user-select: none;
292
+ user-select: none;
293
+ cursor: text;
294
+ }
295
+
296
+ .ace_content {
297
+ position: absolute;
298
+ box-sizing: border-box;
299
+ min-width: 100%;
300
+ contain: style size layout;
301
+ font-variant-ligatures: no-common-ligatures;
302
+ }
303
+ .ace_invisible {
304
+ font-variant-ligatures: none;
305
+ }
306
+
307
+ .ace_keyboard-focus:focus {
308
+ box-shadow: inset 0 0 0 2px #5E9ED6;
309
+ outline: none;
310
+ }
311
+
312
+ .ace_dragging .ace_scroller:before{
313
+ position: absolute;
314
+ top: 0;
315
+ left: 0;
316
+ right: 0;
317
+ bottom: 0;
318
+ content: '';
319
+ background: rgba(250, 250, 250, 0.01);
320
+ z-index: 1000;
321
+ }
322
+ .ace_dragging.ace_dark .ace_scroller:before{
323
+ background: rgba(0, 0, 0, 0.01);
324
+ }
325
+
326
+ .ace_gutter {
327
+ position: absolute;
328
+ overflow : hidden;
329
+ width: auto;
330
+ top: 0;
331
+ bottom: 0;
332
+ left: 0;
333
+ cursor: default;
334
+ z-index: 4;
335
+ -ms-user-select: none;
336
+ -moz-user-select: none;
337
+ -webkit-user-select: none;
338
+ user-select: none;
339
+ contain: style size layout;
340
+ }
341
+
342
+ .ace_gutter-active-line {
343
+ position: absolute;
344
+ left: 0;
345
+ right: 0;
346
+ }
347
+
348
+ .ace_scroller.ace_scroll-left:after {
349
+ content: "";
350
+ position: absolute;
351
+ top: 0;
352
+ right: 0;
353
+ bottom: 0;
354
+ left: 0;
355
+ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
356
+ pointer-events: none;
357
+ }
358
+
359
+ .ace_gutter-cell, .ace_gutter-cell_svg-icons {
360
+ position: absolute;
361
+ top: 0;
362
+ left: 0;
363
+ right: 0;
364
+ padding-left: 19px;
365
+ padding-right: 6px;
366
+ background-repeat: no-repeat;
367
+ }
368
+
369
+ .ace_gutter-cell_svg-icons .ace_gutter_annotation {
370
+ margin-left: -14px;
371
+ float: left;
372
+ }
373
+
374
+ .ace_gutter-cell .ace_gutter_annotation {
375
+ margin-left: -19px;
376
+ float: left;
377
+ }
378
+
379
+ .ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {
380
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
381
+ background-repeat: no-repeat;
382
+ background-position: 2px center;
383
+ }
384
+
385
+ .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
386
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
387
+ background-repeat: no-repeat;
388
+ background-position: 2px center;
389
+ }
390
+
391
+ .ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
392
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
393
+ background-repeat: no-repeat;
394
+ background-position: 2px center;
395
+ }
396
+
397
+ .ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {
398
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
399
+ }
400
+
401
+ .ace_icon_svg.ace_error {
402
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
403
+ background-color: crimson;
404
+ }
405
+ .ace_icon_svg.ace_security {
406
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
407
+ background-color: crimson;
408
+ }
409
+ .ace_icon_svg.ace_warning {
410
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
411
+ background-color: darkorange;
412
+ }
413
+ .ace_icon_svg.ace_info {
414
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
415
+ background-color: royalblue;
416
+ }
417
+ .ace_icon_svg.ace_hint {
418
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
419
+ background-color: silver;
420
+ }
421
+
422
+ .ace_icon_svg.ace_error_fold {
423
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
424
+ background-color: crimson;
425
+ }
426
+ .ace_icon_svg.ace_security_fold {
427
+ -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
428
+ background-color: crimson;
429
+ }
430
+ .ace_icon_svg.ace_warning_fold {
431
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
432
+ background-color: darkorange;
433
+ }
434
+
435
+ .ace_scrollbar {
436
+ contain: strict;
437
+ position: absolute;
438
+ right: 0;
439
+ bottom: 0;
440
+ z-index: 6;
441
+ }
442
+
443
+ .ace_scrollbar-inner {
444
+ position: absolute;
445
+ cursor: text;
446
+ left: 0;
447
+ top: 0;
448
+ }
449
+
450
+ .ace_scrollbar-v{
451
+ overflow-x: hidden;
452
+ overflow-y: scroll;
453
+ top: 0;
454
+ }
455
+
456
+ .ace_scrollbar-h {
457
+ overflow-x: scroll;
458
+ overflow-y: hidden;
459
+ left: 0;
460
+ }
461
+
462
+ .ace_print-margin {
463
+ position: absolute;
464
+ height: 100%;
465
+ }
466
+
467
+ .ace_text-input {
468
+ position: absolute;
469
+ z-index: 0;
470
+ width: 0.5em;
471
+ height: 1em;
472
+ opacity: 0;
473
+ background: transparent;
474
+ -moz-appearance: none;
475
+ appearance: none;
476
+ border: none;
477
+ resize: none;
478
+ outline: none;
479
+ overflow: hidden;
480
+ font: inherit;
481
+ padding: 0 1px;
482
+ margin: 0 -1px;
483
+ contain: strict;
484
+ -ms-user-select: text;
485
+ -moz-user-select: text;
486
+ -webkit-user-select: text;
487
+ user-select: text;
488
+ /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
489
+ white-space: pre!important;
490
+ }
491
+ .ace_text-input.ace_composition {
492
+ background: transparent;
493
+ color: inherit;
494
+ z-index: 1000;
495
+ opacity: 1;
496
+ }
497
+ .ace_composition_placeholder { color: transparent }
498
+ .ace_composition_marker {
499
+ border-bottom: 1px solid;
500
+ position: absolute;
501
+ border-radius: 0;
502
+ margin-top: 1px;
503
+ }
504
+
505
+ [ace_nocontext=true] {
506
+ transform: none!important;
507
+ filter: none!important;
508
+ clip-path: none!important;
509
+ mask : none!important;
510
+ contain: none!important;
511
+ perspective: none!important;
512
+ mix-blend-mode: initial!important;
513
+ z-index: auto;
514
+ }
515
+
516
+ .ace_layer {
517
+ z-index: 1;
518
+ position: absolute;
519
+ overflow: hidden;
520
+ /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
521
+ word-wrap: normal;
522
+ white-space: pre;
523
+ height: 100%;
524
+ width: 100%;
525
+ box-sizing: border-box;
526
+ /* setting pointer-events: auto; on node under the mouse, which changes
527
+ during scroll, will break mouse wheel scrolling in Safari */
528
+ pointer-events: none;
529
+ }
530
+
531
+ .ace_gutter-layer {
532
+ position: relative;
533
+ width: auto;
534
+ text-align: right;
535
+ pointer-events: auto;
536
+ height: 1000000px;
537
+ contain: style size layout;
538
+ }
539
+
540
+ .ace_text-layer {
541
+ font: inherit !important;
542
+ position: absolute;
543
+ height: 1000000px;
544
+ width: 1000000px;
545
+ contain: style size layout;
546
+ }
547
+
548
+ .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
549
+ contain: style size layout;
550
+ position: absolute;
551
+ top: 0;
552
+ left: 0;
553
+ right: 0;
554
+ }
555
+
556
+ .ace_hidpi .ace_text-layer,
557
+ .ace_hidpi .ace_gutter-layer,
558
+ .ace_hidpi .ace_content,
559
+ .ace_hidpi .ace_gutter {
560
+ contain: strict;
561
+ }
562
+ .ace_hidpi .ace_text-layer > .ace_line,
563
+ .ace_hidpi .ace_text-layer > .ace_line_group {
564
+ contain: strict;
565
+ }
566
+
567
+ .ace_cjk {
568
+ display: inline-block;
569
+ text-align: center;
570
+ }
571
+
572
+ .ace_cursor-layer {
573
+ z-index: 4;
574
+ }
575
+
576
+ .ace_cursor {
577
+ z-index: 4;
578
+ position: absolute;
579
+ box-sizing: border-box;
580
+ border-left: 2px solid;
581
+ /* workaround for smooth cursor repaintng whole screen in chrome */
582
+ transform: translatez(0);
583
+ }
584
+
585
+ .ace_multiselect .ace_cursor {
586
+ border-left-width: 1px;
587
+ }
588
+
589
+ .ace_slim-cursors .ace_cursor {
590
+ border-left-width: 1px;
591
+ }
592
+
593
+ .ace_overwrite-cursors .ace_cursor {
594
+ border-left-width: 0;
595
+ border-bottom: 1px solid;
596
+ }
597
+
598
+ .ace_hidden-cursors .ace_cursor {
599
+ opacity: 0.2;
600
+ }
601
+
602
+ .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
603
+ opacity: 0;
604
+ }
605
+
606
+ .ace_smooth-blinking .ace_cursor {
607
+ transition: opacity 0.18s;
608
+ }
609
+
610
+ .ace_animate-blinking .ace_cursor {
611
+ animation-duration: 1000ms;
612
+ animation-timing-function: step-end;
613
+ animation-name: blink-ace-animate;
614
+ animation-iteration-count: infinite;
615
+ }
616
+
617
+ .ace_animate-blinking.ace_smooth-blinking .ace_cursor {
618
+ animation-duration: 1000ms;
619
+ animation-timing-function: ease-in-out;
620
+ animation-name: blink-ace-animate-smooth;
621
+ }
622
+
623
+ @keyframes blink-ace-animate {
624
+ from, to { opacity: 1; }
625
+ 60% { opacity: 0; }
626
+ }
627
+
628
+ @keyframes blink-ace-animate-smooth {
629
+ from, to { opacity: 1; }
630
+ 45% { opacity: 1; }
631
+ 60% { opacity: 0; }
632
+ 85% { opacity: 0; }
633
+ }
634
+
635
+ .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
636
+ position: absolute;
637
+ z-index: 3;
638
+ }
639
+
640
+ .ace_marker-layer .ace_selection {
641
+ position: absolute;
642
+ z-index: 5;
643
+ }
644
+
645
+ .ace_marker-layer .ace_bracket {
646
+ position: absolute;
647
+ z-index: 6;
648
+ }
649
+
650
+ .ace_marker-layer .ace_error_bracket {
651
+ position: absolute;
652
+ border-bottom: 1px solid #DE5555;
653
+ border-radius: 0;
654
+ }
655
+
656
+ .ace_marker-layer .ace_active-line {
657
+ position: absolute;
658
+ z-index: 2;
659
+ }
660
+
661
+ .ace_marker-layer .ace_selected-word {
662
+ position: absolute;
663
+ z-index: 4;
664
+ box-sizing: border-box;
665
+ }
666
+
667
+ .ace_line .ace_fold {
668
+ box-sizing: border-box;
669
+
670
+ display: inline-block;
671
+ height: 11px;
672
+ margin-top: -2px;
673
+ vertical-align: middle;
674
+
675
+ background-image:
676
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
677
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
678
+ background-repeat: no-repeat, repeat-x;
679
+ background-position: center center, top left;
680
+ color: transparent;
681
+
682
+ border: 1px solid black;
683
+ border-radius: 2px;
684
+
685
+ cursor: pointer;
686
+ pointer-events: auto;
687
+ }
688
+
689
+ .ace_dark .ace_fold {
690
+ }
691
+
692
+ .ace_fold:hover{
693
+ background-image:
694
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
695
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
696
+ }
697
+
698
+ .ace_tooltip {
699
+ background-color: #f5f5f5;
700
+ border: 1px solid gray;
701
+ border-radius: 1px;
702
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
703
+ color: black;
704
+ padding: 3px 4px;
705
+ position: absolute;
706
+ z-index: 999999;
707
+ box-sizing: border-box;
708
+ cursor: default;
709
+ white-space: pre-wrap;
710
+ word-wrap: break-word;
711
+ line-height: normal;
712
+ font-style: normal;
713
+ font-weight: normal;
714
+ letter-spacing: normal;
715
+ pointer-events: none;
716
+ overflow: auto;
717
+ max-width: min(33em, 66vw);
718
+ overscroll-behavior: contain;
719
+ }
720
+ .ace_tooltip pre {
721
+ white-space: pre-wrap;
722
+ }
723
+
724
+ .ace_tooltip.ace_dark {
725
+ background-color: #636363;
726
+ color: #fff;
727
+ }
728
+
729
+ .ace_tooltip:focus {
730
+ outline: 1px solid #5E9ED6;
731
+ }
732
+
733
+ .ace_icon {
734
+ display: inline-block;
735
+ width: 18px;
736
+ vertical-align: top;
737
+ }
738
+
739
+ .ace_icon_svg {
740
+ display: inline-block;
741
+ width: 12px;
742
+ vertical-align: top;
743
+ -webkit-mask-repeat: no-repeat;
744
+ -webkit-mask-size: 12px;
745
+ -webkit-mask-position: center;
746
+ }
747
+
748
+ .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
749
+ padding-right: 13px;
750
+ }
751
+
752
+ .ace_fold-widget, .ace_custom-widget {
753
+ box-sizing: border-box;
754
+
755
+ margin: 0 -12px 0 1px;
756
+ display: none;
757
+ width: 11px;
758
+ vertical-align: top;
759
+
760
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
761
+ background-repeat: no-repeat;
762
+ background-position: center;
763
+
764
+ border-radius: 3px;
765
+
766
+ border: 1px solid transparent;
767
+ cursor: pointer;
768
+ pointer-events: auto;
769
+ }
770
+
771
+ .ace_custom-widget {
772
+ background: none;
773
+ }
774
+
775
+ .ace_folding-enabled .ace_fold-widget {
776
+ display: inline-block;
777
+ }
778
+
779
+ .ace_fold-widget.ace_end {
780
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
781
+ }
782
+
783
+ .ace_fold-widget.ace_closed {
784
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
785
+ }
786
+
787
+ .ace_fold-widget:hover {
788
+ border: 1px solid rgba(0, 0, 0, 0.3);
789
+ background-color: rgba(255, 255, 255, 0.2);
790
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
791
+ }
792
+
793
+ .ace_fold-widget:active {
794
+ border: 1px solid rgba(0, 0, 0, 0.4);
795
+ background-color: rgba(0, 0, 0, 0.05);
796
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
797
+ }
798
+ /**
799
+ * Dark version for fold widgets
800
+ */
801
+ .ace_dark .ace_fold-widget {
802
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
803
+ }
804
+ .ace_dark .ace_fold-widget.ace_end {
805
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
806
+ }
807
+ .ace_dark .ace_fold-widget.ace_closed {
808
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
809
+ }
810
+ .ace_dark .ace_fold-widget:hover {
811
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
812
+ background-color: rgba(255, 255, 255, 0.1);
813
+ }
814
+ .ace_dark .ace_fold-widget:active {
815
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
816
+ }
817
+
818
+ .ace_inline_button {
819
+ border: 1px solid lightgray;
820
+ display: inline-block;
821
+ margin: -1px 8px;
822
+ padding: 0 5px;
823
+ pointer-events: auto;
824
+ cursor: pointer;
825
+ }
826
+ .ace_inline_button:hover {
827
+ border-color: gray;
828
+ background: rgba(200,200,200,0.2);
829
+ display: inline-block;
830
+ pointer-events: auto;
831
+ }
832
+
833
+ .ace_fold-widget.ace_invalid {
834
+ background-color: #FFB4B4;
835
+ border-color: #DE5555;
836
+ }
837
+
838
+ .ace_fade-fold-widgets .ace_fold-widget {
839
+ transition: opacity 0.4s ease 0.05s;
840
+ opacity: 0;
841
+ }
842
+
843
+ .ace_fade-fold-widgets:hover .ace_fold-widget {
844
+ transition: opacity 0.05s ease 0.05s;
845
+ opacity:1;
846
+ }
847
+
848
+ .ace_underline {
849
+ text-decoration: underline;
850
+ }
851
+
852
+ .ace_bold {
853
+ font-weight: bold;
854
+ }
855
+
856
+ .ace_nobold .ace_bold {
857
+ font-weight: normal;
858
+ }
859
+
860
+ .ace_italic {
861
+ font-style: italic;
862
+ }
863
+
864
+
865
+ .ace_error-marker {
866
+ background-color: rgba(255, 0, 0,0.2);
867
+ position: absolute;
868
+ z-index: 9;
869
+ }
870
+
871
+ .ace_highlight-marker {
872
+ background-color: rgba(255, 255, 0,0.2);
873
+ position: absolute;
874
+ z-index: 8;
875
+ }
876
+
877
+ .ace_mobile-menu {
878
+ position: absolute;
879
+ line-height: 1.5;
880
+ border-radius: 4px;
881
+ -ms-user-select: none;
882
+ -moz-user-select: none;
883
+ -webkit-user-select: none;
884
+ user-select: none;
885
+ background: white;
886
+ box-shadow: 1px 3px 2px grey;
887
+ border: 1px solid #dcdcdc;
888
+ color: black;
889
+ }
890
+ .ace_dark > .ace_mobile-menu {
891
+ background: #333;
892
+ color: #ccc;
893
+ box-shadow: 1px 3px 2px grey;
894
+ border: 1px solid #444;
895
+
896
+ }
897
+ .ace_mobile-button {
898
+ padding: 2px;
899
+ cursor: pointer;
900
+ overflow: hidden;
901
+ }
902
+ .ace_mobile-button:hover {
903
+ background-color: #eee;
904
+ opacity:1;
905
+ }
906
+ .ace_mobile-button:active {
907
+ background-color: #ddd;
908
+ }
909
+
910
+ .ace_placeholder {
911
+ position: relative;
912
+ font-family: arial;
913
+ transform: scale(0.9);
914
+ transform-origin: left;
915
+ white-space: pre;
916
+ opacity: 0.7;
917
+ margin: 0 10px;
918
+ z-index: 1;
919
+ }
920
+
921
+ .ace_ghost_text {
922
+ opacity: 0.5;
923
+ font-style: italic;
924
+ }
925
+
926
+ .ace_ghost_text_container > div {
927
+ white-space: pre;
928
+ }
929
+
930
+ .ghost_text_line_wrapped::after {
931
+ content: "↩";
932
+ position: absolute;
933
+ }
934
+
935
+ .ace_lineWidgetContainer.ace_ghost_text {
936
+ margin: 0px 4px
937
+ }
938
+
939
+ .ace_screenreader-only {
940
+ position:absolute;
941
+ left:-10000px;
942
+ top:auto;
943
+ width:1px;
944
+ height:1px;
945
+ overflow:hidden;
946
+ }
947
+
948
+ .ace_hidden_token {
949
+ display: none;
950
+ }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(n,i,h){var p=n("../lib/dom"),m=n("../lib/oop"),b=n("../lib/event_emitter").EventEmitter,d=(function(){function g(o,a){this.renderer=a,this.pixelRatio=1,this.maxHeight=a.layerConfig.maxHeight,this.lineHeight=a.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(o)}return g.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"},g.prototype.setScrollBarV=function(o){this.$createCanvas(),this.scrollbarV=o,o.element.appendChild(this.canvas),this.setDimensions()},g.prototype.$updateDecorators=function(o){if(typeof this.canvas.getContext!="function")return;var a=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(o);var u=this.canvas.getContext("2d");function l(N,A){return N.priority<A.priority?-1:N.priority>A.priority?1:0}var s=this.renderer.session.$annotations;if(u.clearRect(0,0,this.canvas.width,this.canvas.height),s){var c={info:1,warning:2,error:3};s.forEach(function(N){N.priority=c[N.type]||null}),s=s.sort(l);for(var f=0;f<s.length;f++){var w=s[f].row,x=this.getVerticalOffsetForRow(w),E=x+this.lineHeight,M=Math.round(this.heightRatio*x),k=Math.round(this.heightRatio*E),C=Math.round((M+k)/2),O=k-C;O<this.halfMinDecorationHeight&&(O=this.halfMinDecorationHeight),C-O<0&&(C=O),C+O>this.canvasHeight&&(C=this.canvasHeight-O);var L=C-O,R=C+O,I=R-L;u.fillStyle=a[s[f].type]||null,u.fillRect(0,L,Math.round(this.oneZoneWidth-1),I)}}var z=this.renderer.session.selection.getCursor();if(z){var F=Math.round(this.getVerticalOffsetForRow(z.row)*this.heightRatio);u.fillStyle="rgba(0, 0, 0, 0.5)",u.fillRect(0,F,this.canvasWidth,2)}},g.prototype.getVerticalOffsetForRow=function(o){o=o|0;var a=this.renderer.session.documentToScreenRow(o,0)*this.lineHeight;return a},g.prototype.setDimensions=function(o){o=o||this.renderer.layerConfig,this.maxHeight=o.maxHeight,this.lineHeight=o.lineHeight,this.canvasHeight=o.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},g.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},g.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},g})();m.implement(d.prototype,b),i.Decorator=d}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(n,i,h){var p=n("./lib/oop"),m=n("./lib/dom"),b=n("./lib/lang"),d=n("./config"),g=n("./layer/gutter").Gutter,o=n("./layer/marker").Marker,a=n("./layer/text").Text,u=n("./layer/cursor").Cursor,l=n("./scrollbar").HScrollBar,s=n("./scrollbar").VScrollBar,c=n("./scrollbar_custom").HScrollBar,f=n("./scrollbar_custom").VScrollBar,w=n("./renderloop").RenderLoop,x=n("./layer/font_metrics").FontMetrics,E=n("./lib/event_emitter").EventEmitter,M=n("./css/editor-css"),k=n("./layer/decorators").Decorator,C=n("./lib/useragent"),O=n("./layer/text_util").isTextToken;m.importCssString(M,"ace_editor.css",!1);var L=(function(){function R(I,z){var F=this;this.container=I||m.createElement("div"),m.addCssClass(this.container,"ace_editor"),m.HI_DPI&&m.addCssClass(this.container,"ace_hidpi"),this.setTheme(z),d.get("useStrictCSP")==null&&d.set("useStrictCSP",!1),this.$gutter=m.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=m.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=m.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new g(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new o(this.content);var N=this.$textLayer=new a(this.content);this.canvas=N.element,this.$markerFront=new o(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new s(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.on("scroll",function(A){F.$scrollAnimation||F.session.setScrollTop(A.data-F.scrollMargin.top)}),this.scrollBarH.on("scroll",function(A){F.$scrollAnimation||F.session.setScrollLeft(A.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(A){F.updateCharacterSize(),F.onResize(!0,F.gutterWidth,F.$size.width,F.$size.height),F._signal("changeCharacterSize",A)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!C.isIOS,this.$loop=new w(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),d.resetOptions(this),d._signal("renderer",this)}return R.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(),m.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},R.prototype.setSession=function(I){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=I,I&&this.scrollMargin.top&&I.getScrollTop()<=0&&I.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(I),this.$markerBack.setSession(I),this.$markerFront.setSession(I),this.$gutterLayer.setSession(I),this.$textLayer.setSession(I),I&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},R.prototype.updateLines=function(I,z,F){if(z===void 0&&(z=1/0),this.$changedLines?(this.$changedLines.firstRow>I&&(this.$changedLines.firstRow=I),this.$changedLines.lastRow<z&&(this.$changedLines.lastRow=z)):this.$changedLines={firstRow:I,lastRow:z},this.$changedLines.lastRow<this.layerConfig.firstRow)if(F)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},R.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},R.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},R.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},R.prototype.updateFull=function(I){I?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},R.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},R.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},R.prototype.onResize=function(I,z,F,N){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=I?1:0;var A=this.container;N||(N=A.clientHeight||A.scrollHeight),!N&&this.$maxLines&&this.lineHeight>1&&(!A.style.height||A.style.height=="0px")&&(A.style.height="1px",N=A.clientHeight||A.scrollHeight),F||(F=A.clientWidth||A.scrollWidth);var S=this.$updateCachedSize(I,z,F,N);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!F&&!N)return this.resizing=0;I&&(this.$gutterLayer.$padding=null),I?this.$renderChanges(S|this.$changes,!0):this.$loop.schedule(S|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},R.prototype.$updateCachedSize=function(I,z,F,N){N-=this.$extraHeight||0;var A=0,S=this.$size,D={width:S.width,height:S.height,scrollerHeight:S.scrollerHeight,scrollerWidth:S.scrollerWidth};if(N&&(I||S.height!=N)&&(S.height=N,A|=this.CHANGE_SIZE,S.scrollerHeight=S.height,this.$horizScroll&&(S.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(S.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",A=A|this.CHANGE_SCROLL),F&&(I||S.width!=F)){A|=this.CHANGE_SIZE,S.width=F,z==null&&(z=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=z,m.setStyle(this.scrollBarH.element.style,"left",z+"px"),m.setStyle(this.scroller.style,"left",z+this.margin.left+"px"),S.scrollerWidth=Math.max(0,F-z-this.scrollBarV.getWidth()-this.margin.h),m.setStyle(this.$gutter.style,"left",this.margin.left+"px");var j=this.scrollBarV.getWidth()+"px";m.setStyle(this.scrollBarH.element.style,"right",j),m.setStyle(this.scroller.style,"right",j),m.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(S.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||I)&&(A|=this.CHANGE_FULL)}return S.$dirty=!F||!N,A&&this._signal("resize",D),A},R.prototype.onGutterResize=function(I){var z=this.$showGutter?I:0;z!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,z,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},R.prototype.adjustWrapLimit=function(){var I=this.$size.scrollerWidth-this.$padding*2,z=Math.floor(I/this.characterWidth);return this.session.adjustWrapLimit(z,this.$showPrintMargin&&this.$printMarginColumn)},R.prototype.setAnimatedScroll=function(I){this.setOption("animatedScroll",I)},R.prototype.getAnimatedScroll=function(){return this.$animatedScroll},R.prototype.setShowInvisibles=function(I){this.setOption("showInvisibles",I),this.session.$bidiHandler.setShowInvisibles(I)},R.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},R.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},R.prototype.setDisplayIndentGuides=function(I){this.setOption("displayIndentGuides",I)},R.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},R.prototype.setHighlightIndentGuides=function(I){this.setOption("highlightIndentGuides",I)},R.prototype.setShowPrintMargin=function(I){this.setOption("showPrintMargin",I)},R.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},R.prototype.setPrintMarginColumn=function(I){this.setOption("printMarginColumn",I)},R.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},R.prototype.getShowGutter=function(){return this.getOption("showGutter")},R.prototype.setShowGutter=function(I){return this.setOption("showGutter",I)},R.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},R.prototype.setFadeFoldWidgets=function(I){this.setOption("fadeFoldWidgets",I)},R.prototype.setHighlightGutterLine=function(I){this.setOption("highlightGutterLine",I)},R.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},R.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var I=m.createElement("div");I.className="ace_layer ace_print-margin-layer",this.$printMarginEl=m.createElement("div"),this.$printMarginEl.className="ace_print-margin",I.appendChild(this.$printMarginEl),this.content.insertBefore(I,this.content.firstChild)}var z=this.$printMarginEl.style;z.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",z.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},R.prototype.getContainerElement=function(){return this.container},R.prototype.getMouseEventTarget=function(){return this.scroller},R.prototype.getTextAreaContainer=function(){return this.container},R.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var I=this.textarea.style,z=this.$composition;if(!this.$keepTextAreaAtCursor&&!z){m.translate(this.textarea,-100,0);return}var F=this.$cursorLayer.$pixelPos;if(F){z&&z.markerRange&&(F=this.$cursorLayer.getPixelPosition(z.markerRange.start,!0));var N=this.layerConfig,A=F.top,S=F.left;A-=N.offset;var D=z&&z.useTextareaForIME||C.isMobile?this.lineHeight:1;if(A<0||A>N.height-D){m.translate(this.textarea,0,0);return}var j=1,U=this.$size.height-D;if(!z)A+=this.lineHeight;else if(z.useTextareaForIME){var q=this.textarea.value;j=this.characterWidth*this.session.$getStringScreenWidth(q)[0]}else A+=this.lineHeight+2;S-=this.scrollLeft,S>this.$size.scrollerWidth-j&&(S=this.$size.scrollerWidth-j),S+=this.gutterWidth+this.margin.left,m.setStyle(I,"height",D+"px"),m.setStyle(I,"width",j+"px"),m.translate(this.textarea,Math.min(S,this.$size.scrollerWidth-j),Math.min(A,U))}}},R.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},R.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},R.prototype.getLastFullyVisibleRow=function(){var I=this.layerConfig,z=I.lastRow,F=this.session.documentToScreenRow(z,0)*I.lineHeight;return F-this.session.getScrollTop()>I.height-I.lineHeight?z-1:z},R.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},R.prototype.setPadding=function(I){this.$padding=I,this.$textLayer.setPadding(I),this.$cursorLayer.setPadding(I),this.$markerFront.setPadding(I),this.$markerBack.setPadding(I),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},R.prototype.setScrollMargin=function(I,z,F,N){var A=this.scrollMargin;A.top=I|0,A.bottom=z|0,A.right=N|0,A.left=F|0,A.v=A.top+A.bottom,A.h=A.left+A.right,A.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-A.top),this.updateFull()},R.prototype.setMargin=function(I,z,F,N){var A=this.margin;A.top=I|0,A.bottom=z|0,A.right=N|0,A.left=F|0,A.v=A.top+A.bottom,A.h=A.left+A.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},R.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},R.prototype.setHScrollBarAlwaysVisible=function(I){this.setOption("hScrollBarAlwaysVisible",I)},R.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},R.prototype.setVScrollBarAlwaysVisible=function(I){this.setOption("vScrollBarAlwaysVisible",I)},R.prototype.$updateScrollBarV=function(){var I=this.layerConfig.maxHeight,z=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(I-=(z-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>I-z&&(I=this.scrollTop+z,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(I+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},R.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},R.prototype.freeze=function(){this.$frozen=!0},R.prototype.unfreeze=function(){this.$frozen=!1},R.prototype.$renderChanges=function(I,z){if(this.$changes&&(I|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!I&&!z){this.$changes|=I;return}if(this.$size.$dirty)return this.$changes|=I,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",I),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var F=this.layerConfig;if(I&this.CHANGE_FULL||I&this.CHANGE_SIZE||I&this.CHANGE_TEXT||I&this.CHANGE_LINES||I&this.CHANGE_SCROLL||I&this.CHANGE_H_SCROLL){if(I|=this.$computeLayerConfig()|this.$loop.clear(),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,I=I|this.CHANGE_SCROLL,I|=this.$computeLayerConfig()|this.$loop.clear())}F=this.layerConfig,this.$updateScrollBarV(),I&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),m.translate(this.content,-this.scrollLeft,-F.offset);var A=F.width+2*this.$padding+"px",S=F.minHeight+"px";m.setStyle(this.content.style,"width",A),m.setStyle(this.content.style,"height",S)}if(I&this.CHANGE_H_SCROLL&&(m.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)),I&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",I);return}if(I&this.CHANGE_SCROLL){this.$changedLines=null,I&this.CHANGE_TEXT||I&this.CHANGE_LINES?this.$textLayer.update(F):this.$textLayer.scrollLines(F),this.$showGutter&&(I&this.CHANGE_GUTTER||I&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",I);return}I&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):I&this.CHANGE_LINES?((this.$updateLines()||I&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):I&this.CHANGE_TEXT||I&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):I&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)),I&this.CHANGE_CURSOR&&(this.$cursorLayer.update(F),this.$moveTextAreaToCursor()),I&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(F),I&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(F),this._signal("afterRender",I)},R.prototype.$autosize=function(){var I=this.session.getScreenLength()*this.lineHeight,z=this.$maxLines*this.lineHeight,F=Math.min(z,Math.max((this.$minLines||1)*this.lineHeight,I))+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,A=!N&&I>z;if(F!=this.desiredHeight||this.$size.height!=this.desiredHeight||A!=this.$vScroll){A!=this.$vScroll&&(this.$vScroll=A,this.scrollBarV.setVisible(A));var S=this.container.clientWidth;this.container.style.height=F+"px",this.$updateCachedSize(!0,this.$gutterWidth,S,F),this.desiredHeight=F,this._signal("autosize")}},R.prototype.$computeLayerConfig=function(){var I=this.session,z=this.$size,F=z.height<=2*this.lineHeight,N=this.session.getScreenLength(),A=N*this.lineHeight,S=this.$getLongestLine(),D=!F&&(this.$hScrollBarAlwaysVisible||z.scrollerWidth-S-2*this.$padding<0),j=this.$horizScroll!==D;j&&(this.$horizScroll=D,this.scrollBarH.setVisible(D));var U=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),F=z.height<=2*this.lineHeight);var q=z.scrollerHeight+this.lineHeight,Q=!this.$maxLines&&this.$scrollPastEnd?(z.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;A+=Q;var te=this.scrollMargin;this.session.setScrollTop(Math.max(-te.top,Math.min(this.scrollTop,A-z.scrollerHeight+te.bottom))),this.session.setScrollLeft(Math.max(-te.left,Math.min(this.scrollLeft,S+2*this.$padding-z.scrollerWidth+te.right)));var de=!F&&(this.$vScrollBarAlwaysVisible||z.scrollerHeight-A+Q<0||this.scrollTop>te.top),ne=U!==de;ne&&(this.$vScroll=de,this.scrollBarV.setVisible(de));var ce=this.scrollTop%this.lineHeight,he=Math.ceil(q/this.lineHeight)-1,ue=Math.max(0,Math.round((this.scrollTop-ce)/this.lineHeight)),ve=ue+he,Me,Te,Ee=this.lineHeight;ue=I.screenToDocumentRow(ue,0);var Je=I.getFoldLine(ue);Je&&(ue=Je.start.row),Me=I.documentToScreenRow(ue,0),Te=I.getRowLength(ue)*Ee,ve=Math.min(I.screenToDocumentRow(ve,0),I.getLength()-1),q=z.scrollerHeight+I.getRowLength(ve)*Ee+Te,ce=this.scrollTop-Me*Ee,ce<0&&Me>0&&(Me=Math.max(0,Me+Math.floor(ce/Ee)),ce=this.scrollTop-Me*Ee);var Xe=0;return(this.layerConfig.width!=S||j)&&(Xe=this.CHANGE_H_SCROLL),(j||ne)&&(Xe|=this.$updateCachedSize(!0,this.gutterWidth,z.width,z.height),this._signal("scrollbarVisibilityChanged"),ne&&(S=this.$getLongestLine())),this.layerConfig={width:S,padding:this.$padding,firstRow:ue,firstRowScreen:Me,lastRow:ve,lineHeight:Ee,characterWidth:this.characterWidth,minHeight:q,maxHeight:A,offset:ce,gutterOffset:Ee?Math.max(0,Math.ceil((ce+z.height-z.scrollerHeight)/Ee)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(S-this.$padding),Xe},R.prototype.$updateLines=function(){if(this.$changedLines){var I=this.$changedLines.firstRow,z=this.$changedLines.lastRow;this.$changedLines=null;var F=this.layerConfig;if(!(I>F.lastRow+1)&&!(z<F.firstRow)){if(z===1/0){this.$showGutter&&this.$gutterLayer.update(F),this.$textLayer.update(F);return}return this.$textLayer.updateLines(F,I,z),!0}}},R.prototype.$getLongestLine=function(){var I=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(I+=1),this.$textLayer&&I>this.$textLayer.MAX_LINE_LENGTH&&(I=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(I*this.characterWidth))},R.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},R.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},R.prototype.addGutterDecoration=function(I,z){this.$gutterLayer.addGutterDecoration(I,z)},R.prototype.removeGutterDecoration=function(I,z){this.$gutterLayer.removeGutterDecoration(I,z)},R.prototype.updateBreakpoints=function(I){this._rows=I,this.$loop.schedule(this.CHANGE_GUTTER)},R.prototype.setAnnotations=function(I){this.$gutterLayer.setAnnotations(I),this.$loop.schedule(this.CHANGE_GUTTER)},R.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},R.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},R.prototype.showCursor=function(){this.$cursorLayer.showCursor()},R.prototype.scrollSelectionIntoView=function(I,z,F){this.scrollCursorIntoView(I,F),this.scrollCursorIntoView(z,F)},R.prototype.scrollCursorIntoView=function(I,z,F){if(this.$size.scrollerHeight!==0){var N=this.$cursorLayer.getPixelPosition(I),A=N.left,S=N.top,D=F&&F.top||0,j=F&&F.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var U=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;U+D>S?(z&&U+D>S+this.lineHeight&&(S-=z*this.$size.scrollerHeight),S===0&&(S=-this.scrollMargin.top),this.session.setScrollTop(S)):U+this.$size.scrollerHeight-j<S+this.lineHeight&&(z&&U+this.$size.scrollerHeight-j<S-this.lineHeight&&(S+=z*this.$size.scrollerHeight),this.session.setScrollTop(S+this.lineHeight+j-this.$size.scrollerHeight));var q=this.scrollLeft,Q=2*this.layerConfig.characterWidth;A-Q<q?(A-=Q,A<this.$padding+Q&&(A=-this.scrollMargin.left),this.session.setScrollLeft(A)):(A+=Q,q+this.$size.scrollerWidth<A+this.characterWidth?this.session.setScrollLeft(Math.round(A+this.characterWidth-this.$size.scrollerWidth)):q<=this.$padding&&A-q<this.characterWidth&&this.session.setScrollLeft(0))}},R.prototype.getScrollTop=function(){return this.session.getScrollTop()},R.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},R.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},R.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},R.prototype.scrollToRow=function(I){this.session.setScrollTop(I*this.lineHeight)},R.prototype.alignCursor=function(I,z){typeof I=="number"&&(I={row:I,column:0});var F=this.$cursorLayer.getPixelPosition(I),N=this.$size.scrollerHeight-this.lineHeight,A=F.top-N*(z||0);return this.session.setScrollTop(A),A},R.prototype.$calcSteps=function(I,z){var F=0,N=this.STEPS,A=[],S=function(D,j,U){return U*(Math.pow(D-1,3)+1)+j};for(F=0;F<N;++F)A.push(S(F/this.STEPS,I,z-I));return A},R.prototype.scrollToLine=function(I,z,F,N){var A=this.$cursorLayer.getPixelPosition({row:I,column:0}),S=A.top;z&&(S-=this.$size.scrollerHeight/2);var D=this.scrollTop;this.session.setScrollTop(S),F!==!1&&this.animateScrolling(D,N)},R.prototype.animateScrolling=function(I,z){var F=this.scrollTop;if(!this.$animatedScroll)return;var N=this;if(I==F)return;if(this.$scrollAnimation){var A=this.$scrollAnimation.steps;if(A.length&&(I=A[0],I==F))return}var S=N.$calcSteps(I,F);this.$scrollAnimation={from:I,to:F,steps:S},clearInterval(this.$timer),N.session.setScrollTop(S.shift()),N.session.$scrollTop=F;function D(){N.$timer=clearInterval(N.$timer),N.$scrollAnimation=null,N.$stopAnimation=!1,z&&z()}this.$timer=setInterval(function(){if(N.$stopAnimation){D();return}if(!N.session)return clearInterval(N.$timer);S.length?(N.session.setScrollTop(S.shift()),N.session.$scrollTop=F):F!=null?(N.session.$scrollTop=-1,N.session.setScrollTop(F),F=null):D()},10)},R.prototype.scrollToY=function(I){this.scrollTop!==I&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=I)},R.prototype.scrollToX=function(I){this.scrollLeft!==I&&(this.scrollLeft=I),this.$loop.schedule(this.CHANGE_H_SCROLL)},R.prototype.scrollTo=function(I,z){this.session.setScrollTop(z),this.session.setScrollLeft(I)},R.prototype.scrollBy=function(I,z){z&&this.session.setScrollTop(this.session.getScrollTop()+z),I&&this.session.setScrollLeft(this.session.getScrollLeft()+I)},R.prototype.isScrollableBy=function(I,z){if(z<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||z>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||I<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||I>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},R.prototype.pixelToScreenCoordinates=function(I,z){var F;if(this.$hasCssTransforms){F={top:0,left:0};var N=this.$fontMetrics.transformCoordinates([I,z]);I=N[1]-this.gutterWidth-this.margin.left,z=N[0]}else F=this.scroller.getBoundingClientRect();var A=I+this.scrollLeft-F.left-this.$padding,S=A/this.characterWidth,D=Math.floor((z+this.scrollTop-F.top)/this.lineHeight),j=this.$blockCursor?Math.floor(S):Math.round(S);return{row:D,column:j,side:S-j>0?1:-1,offsetX:A}},R.prototype.screenToTextCoordinates=function(I,z){var F;if(this.$hasCssTransforms){F={top:0,left:0};var N=this.$fontMetrics.transformCoordinates([I,z]);I=N[1]-this.gutterWidth-this.margin.left,z=N[0]}else F=this.scroller.getBoundingClientRect();var A=I+this.scrollLeft-F.left-this.$padding,S=A/this.characterWidth,D=this.$blockCursor?Math.floor(S):Math.round(S),j=Math.floor((z+this.scrollTop-F.top)/this.lineHeight);return this.session.screenToDocumentPosition(j,Math.max(D,0),A)},R.prototype.textToScreenCoordinates=function(I,z){var F=this.scroller.getBoundingClientRect(),N=this.session.documentToScreenPosition(I,z),A=this.$padding+(this.session.$bidiHandler.isBidiRow(N.row,I)?this.session.$bidiHandler.getPosLeft(N.column):Math.round(N.column*this.characterWidth)),S=N.row*this.lineHeight;return{pageX:F.left+A-this.scrollLeft,pageY:F.top+S-this.scrollTop}},R.prototype.visualizeFocus=function(){m.addCssClass(this.container,"ace_focus")},R.prototype.visualizeBlur=function(){m.removeCssClass(this.container,"ace_focus")},R.prototype.showComposition=function(I){this.$composition=I,I.cssText||(I.cssText=this.textarea.style.cssText),I.useTextareaForIME==null&&(I.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(m.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):I.markerId=this.session.addMarker(I.markerRange,"ace_composition_marker","text")},R.prototype.setCompositionText=function(I){var z=this.session.selection.cursor;this.addToken(I,"composition_placeholder",z.row,z.column),this.$moveTextAreaToCursor()},R.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),m.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var I=this.session.selection.cursor;this.removeExtraToken(I.row,I.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},R.prototype.setGhostText=function(I,z){var F=this.session.selection.cursor,N=z||{row:F.row,column:F.column};this.removeGhostText();var A=this.$calculateWrappedTextChunks(I,N);this.addToken(A[0].text,"ghost_text",N.row,N.column),this.$ghostText={text:I,position:{row:N.row,column:N.column}};var S=m.createElement("div");if(A.length>1){var D=this.hideTokensAfterPosition(N.row,N.column),j;A.slice(1).forEach(function(ne){var ce=m.createElement("div"),he=m.createElement("span");he.className="ace_ghost_text",ne.wrapped&&(ce.className="ghost_text_line_wrapped"),ne.text.length===0&&(ne.text=" "),he.appendChild(m.createTextNode(ne.text)),ce.appendChild(he),S.appendChild(ce),j=ce}),D.forEach(function(ne){var ce=m.createElement("span");O(ne.type)||(ce.className="ace_"+ne.type.replace(/\./g," ace_")),ce.appendChild(m.createTextNode(ne.value)),j.appendChild(ce)}),this.$ghostTextWidget={el:S,row:N.row,column:N.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var U=this.$cursorLayer.getPixelPosition(N,!0),q=this.container,Q=q.getBoundingClientRect().height,te=A.length*this.lineHeight,de=te<Q-U.top;if(de)return;te<Q?this.scrollBy(0,(A.length-1)*this.lineHeight):this.scrollToRow(N.row)}},R.prototype.$calculateWrappedTextChunks=function(I,z){var F=this.$size.scrollerWidth-this.$padding*2,N=Math.floor(F/this.characterWidth)-2;N=N<=0?60:N;for(var A=I.split(/\r?\n/),S=[],D=0;D<A.length;D++){var j=this.session.$getDisplayTokens(A[D],z.column),U=this.session.$computeWrapSplits(j,N,this.session.$tabSize);if(U.length>0){var q=0;U.push(A[D].length);for(var Q=0;Q<U.length;Q++){var te=A[D].slice(q,U[Q]);S.push({text:te,wrapped:!0}),q=U[Q]}}else S.push({text:A[D],wrapped:!1})}return S},R.prototype.removeGhostText=function(){if(this.$ghostText){var I=this.$ghostText.position;this.removeExtraToken(I.row,I.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},R.prototype.addToken=function(I,z,F,N){var A=this.session;A.bgTokenizer.lines[F]=null;var S={type:z,value:I},D=A.getTokens(F);if(N==null||!D.length)D.push(S);else for(var j=0,U=0;U<D.length;U++){var q=D[U];if(j+=q.value.length,N<=j){var Q=q.value.length-(j-N),te=q.value.slice(0,Q),de=q.value.slice(Q);D.splice(U,1,{type:q.type,value:te},S,{type:q.type,value:de});break}}this.updateLines(F,F)},R.prototype.hideTokensAfterPosition=function(I,z){for(var F=this.session.getTokens(I),N=0,A=!1,S=[],D=0;D<F.length;D++){var j=F[D];if(N+=j.value.length,j.type!=="ghost_text"){if(A){S.push({type:j.type,value:j.value}),j.type="hidden_token";continue}N===z&&(A=!0)}}return this.updateLines(I,I),S},R.prototype.removeExtraToken=function(I,z){this.session.bgTokenizer.lines[I]=null,this.updateLines(I,I)},R.prototype.setTheme=function(I,z){var F=this;if(this.$themeId=I,F._dispatchEvent("themeChange",{theme:I}),!I||typeof I=="string"){var N=I||this.$options.theme.initialValue;d.loadModule(["theme",N],A)}else A(I);function A(S){if(F.$themeId!=I)return z&&z();if(!S||!S.cssClass)throw new Error("couldn't load module "+I+" or it didn't call define");S.$id&&(F.$themeId=S.$id),m.importCssString(S.cssText,S.cssClass,F.container),F.theme&&m.removeCssClass(F.container,F.theme.cssClass);var D="padding"in S?S.padding:"padding"in(F.theme||{})?4:F.$padding;F.$padding&&D!=F.$padding&&F.setPadding(D),F.$theme=S.cssClass,F.theme=S,m.addCssClass(F.container,S.cssClass),m.setCssClass(F.container,"ace_dark",S.isDark),F.$size&&(F.$size.width=0,F.$updateSizeAsync()),F._dispatchEvent("themeLoaded",{theme:S}),z&&z(),C.isSafari&&F.scroller&&(F.scroller.style.background="red",F.scroller.style.background="")}},R.prototype.getTheme=function(){return this.$themeId},R.prototype.setStyle=function(I,z){m.setCssClass(this.container,I,z!==!1)},R.prototype.unsetStyle=function(I){m.removeCssClass(this.container,I)},R.prototype.setCursorStyle=function(I){m.setStyle(this.scroller.style,"cursor",I)},R.prototype.setMouseCursor=function(I){m.setStyle(this.scroller.style,"cursor",I)},R.prototype.attachToShadowRoot=function(){m.importCssString(M,"ace_editor.css",this.container)},R.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},R.prototype.$updateCustomScrollbar=function(I){var z=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),I===!0?(this.scrollBarV=new f(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(F){z.$scrollAnimation||z.session.setScrollTop(F.data-z.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(F){z.$scrollAnimation||z.session.setScrollLeft(F.data-z.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new k(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new s(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.addEventListener("scroll",function(F){z.$scrollAnimation||z.session.setScrollTop(F.data-z.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(F){z.$scrollAnimation||z.session.setScrollLeft(F.data-z.scrollMargin.left)}))},R.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var I=this;this.$resizeTimer=b.delayedCall(function(){I.destroyed||I.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(z){var F=z[0].contentRect.width,N=z[0].contentRect.height;Math.abs(I.$size.width-F)>1||Math.abs(I.$size.height-N)>1?I.$resizeTimer.delay():I.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},R})();L.prototype.CHANGE_CURSOR=1,L.prototype.CHANGE_MARKER=2,L.prototype.CHANGE_GUTTER=4,L.prototype.CHANGE_SCROLL=8,L.prototype.CHANGE_LINES=16,L.prototype.CHANGE_TEXT=32,L.prototype.CHANGE_SIZE=64,L.prototype.CHANGE_MARKER_BACK=128,L.prototype.CHANGE_MARKER_FRONT=256,L.prototype.CHANGE_FULL=512,L.prototype.CHANGE_H_SCROLL=1024,L.prototype.$changes=0,L.prototype.$padding=null,L.prototype.$frozen=!1,L.prototype.STEPS=8,p.implement(L.prototype,E),d.defineOptions(L.prototype,"renderer",{useResizeObserver:{set:function(R){!R&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):R&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(R){this.$textLayer.setShowInvisibles(R)&&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(R){typeof R=="number"&&(this.$printMarginColumn=R),this.$showPrintMargin=!!R,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(R){this.$gutter.style.display=R?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(R){this.$gutterLayer.$useSvgGutterIcons=R},initialValue:!1},showFoldedAnnotations:{set:function(R){this.$gutterLayer.$showFoldedAnnotations=R},initialValue:!1},fadeFoldWidgets:{set:function(R){m.setCssClass(this.$gutter,"ace_fade-fold-widgets",R)},initialValue:!1},showFoldWidgets:{set:function(R){this.$gutterLayer.setShowFoldWidgets(R),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(R){this.$textLayer.setDisplayIndentGuides(R)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(R){this.$textLayer.setHighlightIndentGuides(R)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(R){this.$gutterLayer.setHighlightGutterLine(R),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(R){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(R){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(R){typeof R=="number"&&(R=R+"px"),this.container.style.fontSize=R,this.updateFontSize()},initialValue:12},fontFamily:{set:function(R){this.container.style.fontFamily=R,this.updateFontSize()}},maxLines:{set:function(R){this.updateFull()}},minLines:{set:function(R){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(R){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(R){R=+R||0,this.$scrollPastEnd!=R&&(this.$scrollPastEnd=R,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(R){this.$gutterLayer.$fixedWidth=!!R,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(R){this.$updateCustomScrollbar(R)},initialValue:!1},theme:{set:function(R){this.setTheme(R)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!C.isMobile&&!C.isIE}}),i.VirtualRenderer=L}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(n,i,h){var p=n("../lib/oop"),m=n("../lib/net"),b=n("../lib/event_emitter").EventEmitter,d=n("../config");function g(l){var s="importScripts('"+m.qualifyURL(l)+"');";try{return new Blob([s],{type:"application/javascript"})}catch{var c=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,f=new c;return f.append(s),f.getBlob("application/javascript")}}function o(l){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(d.get("loadWorkerFromBlob")){var s=g(l),c=window.URL||window.webkitURL,f=c.createObjectURL(s);return new Worker(f)}return new Worker(l)}var a=function(l){l.postMessage||(l=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=l,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){p.implement(this,b),this.$createWorkerFromOldConfig=function(l,s,c,f,w){if(n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl),d.get("packaged")||!n.toUrl)f=f||d.moduleUrl(s,"worker");else{var x=this.$normalizePath;f=f||x(n.toUrl("ace/worker/worker.js",null,"_"));var E={};l.forEach(function(M){E[M]=x(n.toUrl(M,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=o(f),w&&this.send("importScripts",w),this.$worker.postMessage({init:!0,tlns:E,module:s,classname:c}),this.$worker},this.onMessage=function(l){var s=l.data;switch(s.type){case"event":this._signal(s.name,{data:s.data});break;case"call":var c=this.callbacks[s.id];c&&(c(s.data),delete this.callbacks[s.id]);break;case"error":this.reportError(s.data);break;case"log":window.console&&console.log&&console.log.apply(console,s.data);break}},this.reportError=function(l){window.console&&console.error&&console.error(l)},this.$normalizePath=function(l){return m.qualifyURL(l)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(l){l.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(l,s){this.$worker.postMessage({command:l,args:s})},this.call=function(l,s,c){if(c){var f=this.callbackId++;this.callbacks[f]=c,s.push(f)}this.send(l,s)},this.emit=function(l,s){try{s.data&&s.data.err&&(s.data.err={message:s.data.err.message,stack:s.data.err.stack,code:s.data.err.code}),this.$worker&&this.$worker.postMessage({event:l,data:{data:s.data}})}catch(c){console.error(c.stack)}},this.attachToDocument=function(l){this.$doc&&this.terminate(),this.$doc=l,this.call("setValue",[l.getValue()]),l.on("change",this.changeListener,!0)},this.changeListener=function(l){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),l.action=="insert"?this.deltaQueue.push(l.start,l.lines):this.deltaQueue.push(l.start,l.end)},this.$sendDeltaQueue=function(){var l=this.deltaQueue;l&&(this.deltaQueue=null,l.length>50&&l.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:l}))}}).call(a.prototype);var u=function(l,s,c){var f=null,w=!1,x=Object.create(b),E=[],M=new a({messageBuffer:E,terminate:function(){},postMessage:function(C){E.push(C),f&&(w?setTimeout(k):k())}});M.setEmitSync=function(C){w=C};var k=function(){var C=E.shift();C.command?f[C.command].apply(f,C.args):C.event&&x._signal(C.event,C.data)};return x.postMessage=function(C){M.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})},d.loadModule(["worker",s],function(C){for(f=new C[c](x);E.length;)k()}),M};i.UIWorkerClient=u,i.WorkerClient=a,i.createWorker=o}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(n,i,h){var p=n("./range").Range,m=n("./lib/event_emitter").EventEmitter,b=n("./lib/oop"),d=(function(){function g(o,a,u,l,s,c){var f=this;this.length=a,this.session=o,this.doc=o.getDocument(),this.mainClass=s,this.othersClass=c,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=l,this.$onCursorChange=function(){setTimeout(function(){f.onCursorChange()})},this.$pos=u;var w=o.getUndoManager().$undoStack||o.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=w.length,this.setup(),o.selection.on("changeCursor",this.$onCursorChange)}return g.prototype.setup=function(){var o=this,a=this.doc,u=this.session;this.selectionBefore=u.selection.toJSON(),u.selection.inMultiSelectMode&&u.selection.toSingleRange(),this.pos=a.createAnchor(this.$pos.row,this.$pos.column);var l=this.pos;l.$insertRight=!0,l.detach(),l.markerId=u.addMarker(new p(l.row,l.column,l.row,l.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(s){var c=a.createAnchor(s.row,s.column);c.$insertRight=!0,c.detach(),o.others.push(c)}),u.setUndoSelect(!1)},g.prototype.showOtherMarkers=function(){if(!this.othersActive){var o=this.session,a=this;this.othersActive=!0,this.others.forEach(function(u){u.markerId=o.addMarker(new p(u.row,u.column,u.row,u.column+a.length),a.othersClass,null,!1)})}},g.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var o=0;o<this.others.length;o++)this.session.removeMarker(this.others[o].markerId)}},g.prototype.onUpdate=function(o){if(this.$updating)return this.updateAnchors(o);var a=o;if(a.start.row===a.end.row&&a.start.row===this.pos.row){this.$updating=!0;var u=o.action==="insert"?a.end.column-a.start.column:a.start.column-a.end.column,l=a.start.column>=this.pos.column&&a.start.column<=this.pos.column+this.length+1,s=a.start.column-this.pos.column;if(this.updateAnchors(o),l&&(this.length+=u),l&&!this.session.$fromUndo){if(o.action==="insert")for(var c=this.others.length-1;c>=0;c--){var f=this.others[c],w={row:f.row,column:f.column+s};this.doc.insertMergedLines(w,o.lines)}else if(o.action==="remove")for(var c=this.others.length-1;c>=0;c--){var f=this.others[c],w={row:f.row,column:f.column+s};this.doc.remove(new p(w.row,w.column,w.row,w.column-u))}}this.$updating=!1,this.updateMarkers()}},g.prototype.updateAnchors=function(o){this.pos.onChange(o);for(var a=this.others.length;a--;)this.others[a].onChange(o);this.updateMarkers()},g.prototype.updateMarkers=function(){if(!this.$updating){var o=this,a=this.session,u=function(s,c){a.removeMarker(s.markerId),s.markerId=a.addMarker(new p(s.row,s.column,s.row,s.column+o.length),c,null,!1)};u(this.pos,this.mainClass);for(var l=this.others.length;l--;)u(this.others[l],this.othersClass)}},g.prototype.onCursorChange=function(o){if(!(this.$updating||!this.session)){var a=this.session.selection.getCursor();a.row===this.pos.row&&a.column>=this.pos.column&&a.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",o)):(this.hideOtherMarkers(),this._emit("cursorLeave",o))}},g.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},g.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var o=this.session.getUndoManager(),a=(o.$undoStack||o.$undostack).length-this.$undoStackDepth,u=0;u<a;u++)o.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},g})();b.implement(d.prototype,m),i.PlaceHolder=d}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,i,h){var p=n("../lib/event"),m=n("../lib/useragent");function b(g,o){return g.row==o.row&&g.column==o.column}function d(g){var o=g.domEvent,a=o.altKey,u=o.shiftKey,l=o.ctrlKey,s=g.getAccelKey(),c=g.getButton();if(l&&m.isMac&&(c=o.button),g.editor.inMultiSelectMode&&c==2){g.editor.textInput.onContextMenu(g.domEvent);return}if(!l&&!a&&!s){c===0&&g.editor.inMultiSelectMode&&g.editor.exitMultiSelectMode();return}if(c===0){var f=g.editor,w=f.selection,x=f.inMultiSelectMode,E=g.getDocumentPosition(),M=w.getCursor(),k=g.inSelection()||w.isEmpty()&&b(E,M),C=g.x,O=g.y,L=function(te){C=te.clientX,O=te.clientY},R=f.session,I=f.renderer.pixelToScreenCoordinates(C,O),z=I,F;if(f.$mouseHandler.$enableJumpToDef)l&&a||s&&a?F=u?"block":"add":a&&f.$blockSelectEnabled&&(F="block");else if(s&&!a){if(F="add",!x&&u)return}else a&&f.$blockSelectEnabled&&(F="block");if(F&&m.isMac&&o.ctrlKey&&f.$mouseHandler.cancelContextMenu(),F=="add"){if(!x&&k)return;if(!x){var N=w.toOrientedRange();f.addSelectionMarker(N)}var A=w.rangeList.rangeAtPoint(E);f.inVirtualSelectionMode=!0,u&&(A=null,N=w.ranges[0]||N,f.removeSelectionMarker(N)),f.once("mouseup",function(){var te=w.toOrientedRange();A&&te.isEmpty()&&b(A.cursor,te.cursor)?w.substractPoint(te.cursor):(u?w.substractPoint(N.cursor):N&&(f.removeSelectionMarker(N),w.addRange(N)),w.addRange(te)),f.inVirtualSelectionMode=!1})}else if(F=="block"){g.stop(),f.inVirtualSelectionMode=!0;var S,D=[],j=function(){var te=f.renderer.pixelToScreenCoordinates(C,O),de=R.screenToDocumentPosition(te.row,te.column,te.offsetX);b(z,te)&&b(de,w.lead)||(z=te,f.selection.moveToPosition(de),f.renderer.scrollCursorIntoView(),f.removeSelectionMarkers(D),D=w.rectangularRangeBlock(z,I),f.$mouseHandler.$clickSelection&&D.length==1&&D[0].isEmpty()&&(D[0]=f.$mouseHandler.$clickSelection.clone()),D.forEach(f.addSelectionMarker,f),f.updateSelectionMarkers())};x&&!s?w.toSingleRange():!x&&s&&(S=w.toOrientedRange(),f.addSelectionMarker(S)),u?I=R.documentToScreenPosition(w.lead):w.moveToPosition(E),z={row:-1,column:-1};var U=function(te){j(),clearInterval(Q),f.removeSelectionMarkers(D),D.length||(D=[w.toOrientedRange()]),S&&(f.removeSelectionMarker(S),w.toSingleRange(S));for(var de=0;de<D.length;de++)w.addRange(D[de]);f.inVirtualSelectionMode=!1,f.$mouseHandler.$clickSelection=null},q=j;p.capture(f.container,L,U);var Q=setInterval(function(){q()},20);return g.preventDefault()}}}i.onMouseDown=d}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(n,i,h){i.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(m){m.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(m){m.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(m){m.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(m){m.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(m){m.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(m){m.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(m){m.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(m){m.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(m){m.multiSelect.rangeCount>1?m.multiSelect.joinSelections():m.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(m){m.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(m){m.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(m){m.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],i.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(m){m.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(m){return m&&m.inMultiSelectMode}}];var p=n("../keyboard/hash_handler").HashHandler;i.keyboardHandler=new p(i.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(n,i,h){var p=n("./range_list").RangeList,m=n("./range").Range,b=n("./selection").Selection,d=n("./mouse/multi_select_handler").onMouseDown,g=n("./lib/event"),o=n("./lib/lang"),a=n("./commands/multi_select_commands");i.commands=a.defaultCommands.concat(a.multiSelectCommands);var u=n("./search").Search,l=new u;function s(M,k,C){return l.$options.wrap=!0,l.$options.needle=k,l.$options.backwards=C==-1,l.find(M)}var c=n("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(c.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(M,k){if(M){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add(M),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),k||this.fromOrientedRange(M);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}M.cursor||(M.cursor=M.end);var O=this.rangeList.add(M);return this.$onAddRange(M),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)),k||this.fromOrientedRange(M)}},this.toSingleRange=function(M){M=M||this.ranges[0];var k=this.rangeList.removeAll();k.length&&this.$onRemoveRange(k),M&&this.fromOrientedRange(M)},this.substractPoint=function(M){var k=this.rangeList.substractPoint(M);if(k)return this.$onRemoveRange(k),k[0]},this.mergeOverlappingRanges=function(){var M=this.rangeList.merge();M.length&&this.$onRemoveRange(M)},this.$onAddRange=function(M){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(M),this._signal("addRange",{range:M})},this.$onRemoveRange=function(M){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var k=this.rangeList.ranges.pop();M.push(k),this.rangeCount=0}for(var C=M.length;C--;){var O=this.ranges.indexOf(M[C]);this.ranges.splice(O,1)}this._signal("removeRange",{ranges:M}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),k=k||this.ranges[0],k&&!k.isEqual(this.getRange())&&this.fromOrientedRange(k)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new p,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var M=this.ranges.length?this.ranges:[this.getRange()],k=[],C=0;C<M.length;C++){var O=M[C],L=O.start.row,R=O.end.row;if(L===R)k.push(O.clone());else{for(k.push(new m(L,O.start.column,L,this.session.getLine(L).length));++L<R;)k.push(this.getLineRange(L,!0));k.push(new m(R,0,R,O.end.column))}C==0&&!this.isBackwards()&&(k=k.reverse())}this.toSingleRange();for(var C=k.length;C--;)this.addRange(k[C])},this.joinSelections=function(){var M=this.rangeList.ranges,k=M[M.length-1],C=m.fromPoints(M[0].start,k.end);this.toSingleRange(),this.setSelectionRange(C,k.cursor==k.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var M=this.rangeList.ranges,k=M[M.length-1],C=m.fromPoints(M[0].start,k.end);this.toSingleRange(),this.setSelectionRange(C,k.cursor==k.start)}else{var O=this.session.documentToScreenPosition(this.cursor),L=this.session.documentToScreenPosition(this.anchor),R=this.rectangularRangeBlock(O,L);R.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(M,k,C){var O=[],L=M.column<k.column;if(L)var R=M.column,I=k.column,z=M.offsetX,F=k.offsetX;else var R=k.column,I=M.column,z=k.offsetX,F=M.offsetX;var N=M.row<k.row;if(N)var A=M.row,S=k.row;else var A=k.row,S=M.row;R<0&&(R=0),A<0&&(A=0),A==S&&(C=!0);for(var D,j=A;j<=S;j++){var U=m.fromPoints(this.session.screenToDocumentPosition(j,R,z),this.session.screenToDocumentPosition(j,I,F));if(U.isEmpty()){if(D&&w(U.end,D))break;D=U.end}U.cursor=L?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 Q=0;O[Q].isEmpty();)Q++;for(var te=q;te>=Q;te--)O[te].isEmpty()&&O.splice(te,1)}return O}}).call(b.prototype);var f=n("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(M){M.cursor||(M.cursor=M.end);var k=this.getSelectionStyle();return M.marker=this.session.addMarker(M,"ace_selection",k),this.session.$selectionMarkers.push(M),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,M},this.removeSelectionMarker=function(M){if(M.marker){this.session.removeMarker(M.marker);var k=this.session.$selectionMarkers.indexOf(M);k!=-1&&this.session.$selectionMarkers.splice(k,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(M){for(var k=this.session.$selectionMarkers,C=M.length;C--;){var O=M[C];if(O.marker){this.session.removeMarker(O.marker);var L=k.indexOf(O);L!=-1&&k.splice(L,1)}}this.session.selectionMarkerCount=k.length},this.$onAddRange=function(M){this.addSelectionMarker(M.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(M){this.removeSelectionMarkers(M.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(M){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(a.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(M){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(a.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(M){var k=M.command,C=M.editor;if(C.multiSelect){if(k.multiSelectAction)k.multiSelectAction=="forEach"?O=C.forEachSelection(k,M.args):k.multiSelectAction=="forEachLine"?O=C.forEachSelection(k,M.args,!0):k.multiSelectAction=="single"?(C.exitMultiSelectMode(),O=k.exec(C,M.args||{})):O=k.multiSelectAction(C,M.args||{});else{var O=k.exec(C,M.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return O}},this.forEachSelection=function(M,k,C){if(!this.inVirtualSelectionMode){var O=C&&C.keepOrder,L=C==!0||C&&C.$byLines,R=this.session,I=this.selection,z=I.rangeList,F=(O?I:z).ranges,N;if(!F.length)return M.exec?M.exec(this,k||{}):M(this,k||{});var A=I._eventRegistry;I._eventRegistry={};var S=new b(R);this.inVirtualSelectionMode=!0;for(var D=F.length;D--;){if(L)for(;D>0&&F[D].start.row==F[D-1].end.row;)D--;S.fromOrientedRange(F[D]),S.index=D,this.selection=R.selection=S;var j=M.exec?M.exec(this,k||{}):M(this,k||{});!N&&j!==void 0&&(N=j),S.toOrientedRange(F[D])}S.detach(),this.selection=R.selection=I,this.inVirtualSelectionMode=!1,I._eventRegistry=A,I.mergeOverlappingRanges(),I.ranges[0]&&I.fromOrientedRange(I.ranges[0]);var U=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),U&&U.from==U.to&&this.renderer.animateScrolling(U.from),N}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var M="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var k=this.multiSelect.rangeList.ranges,C=[],O=0;O<k.length;O++)C.push(this.session.getTextRange(k[O]));var L=this.session.getDocument().getNewLineCharacter();M=C.join(L),M.length==(C.length-1)*L.length&&(M="")}else this.selection.isEmpty()||(M=this.session.getTextRange(this.getSelectionRange()));return M},this.$checkMultiselectChange=function(M,k){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&k==this.multiSelect.anchor)return;var O=k==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;O.row!=k.row||this.session.$clipPositionToDocument(O.row,O.column).column!=k.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(M,k,C){if(k=k||{},k.needle=M||k.needle,k.needle==null){var O=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();k.needle=this.session.getTextRange(O)}this.$search.set(k);var L=this.$search.findAll(this.session);if(!L.length)return 0;var R=this.multiSelect;C||R.toSingleRange(L[0]);for(var I=L.length;I--;)R.addRange(L[I],!0);return O&&R.rangeList.rangeAtPoint(O.start)&&R.addRange(O,!0),L.length},this.selectMoreLines=function(M,k){var C=this.selection.toOrientedRange(),O=C.cursor==C.end,L=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(L.column=this.selection.$desiredColumn);var R=this.session.screenToDocumentPosition(L.row+M,L.column);if(C.isEmpty())var z=R;else var I=this.session.documentToScreenPosition(O?C.end:C.start),z=this.session.screenToDocumentPosition(I.row+M,I.column);if(O){var F=m.fromPoints(R,z);F.cursor=F.start}else{var F=m.fromPoints(z,R);F.cursor=F.end}if(F.desiredColumn=L.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(k)var N=C.cursor;this.selection.addRange(F),N&&this.selection.substractPoint(N)},this.transposeSelections=function(M){for(var k=this.session,C=k.multiSelect,O=C.ranges,L=O.length;L--;){var R=O[L];if(R.isEmpty()){var I=k.getWordRange(R.start.row,R.start.column);R.start.row=I.start.row,R.start.column=I.start.column,R.end.row=I.end.row,R.end.column=I.end.column}}C.mergeOverlappingRanges();for(var z=[],L=O.length;L--;){var R=O[L];z.unshift(k.getTextRange(R))}M<0?z.unshift(z.pop()):z.push(z.shift());for(var L=O.length;L--;){var R=O[L],F=R.clone();k.replace(R,z[L]),R.start.row=F.start.row,R.start.column=F.start.column}C.fromOrientedRange(C.ranges[0])},this.selectMore=function(M,k,C){var O=this.session,L=O.multiSelect,R=L.toOrientedRange();if(!(R.isEmpty()&&(R=O.getWordRange(R.start.row,R.start.column),R.cursor=M==-1?R.start:R.end,this.multiSelect.addRange(R),C))){var I=O.getTextRange(R),z=s(O,I,M);z&&(z.cursor=M==-1?z.start:z.end,this.session.unfold(z),this.multiSelect.addRange(z),this.renderer.scrollCursorIntoView(null,.5)),k&&this.multiSelect.substractPoint(R.cursor)}},this.alignCursors=function(){var M=this.session,k=M.multiSelect,C=k.ranges,O=-1,L=C.filter(function(q){if(q.cursor.row==O)return!0;O=q.cursor.row});if(!C.length||L.length==C.length-1){var R=this.selection.getRange(),I=R.start.row,z=R.end.row,F=I==z;if(F){var N=this.session.getLength(),A;do A=this.session.getLine(z);while(/[=:]/.test(A)&&++z<N);do A=this.session.getLine(I);while(/[=:]/.test(A)&&--I>0);I<0&&(I=0),z>=N&&(z=N-1)}var S=this.session.removeFullLines(I,z);S=this.$reAlignText(S,F),this.session.insert({row:I,column:0},S.join(`
951
+ `)+`
952
+ `),F||(R.start.column=0,R.end.column=S[S.length-1].length),this.selection.setRange(R)}else{L.forEach(function(q){k.substractPoint(q.cursor)});var D=0,j=1/0,U=C.map(function(q){var Q=q.cursor,te=M.getLine(Q.row),de=te.substr(Q.column).search(/\S/g);return de==-1&&(de=0),Q.column>D&&(D=Q.column),de<j&&(j=de),de});C.forEach(function(q,Q){var te=q.cursor,de=D-te.column,ne=U[Q]-j;de>ne?M.insert(te,o.stringRepeat(" ",de-ne)):M.remove(new m(te.row,te.column,te.row,te.column-de+ne)),q.start.column=q.end.column=D,q.start.row=q.end.row=te.row,q.cursor=q.end}),k.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(M,k){var C=!0,O=!0,L,R,I;return M.map(function(S){var D=S.match(/(\s*)(.*?)(\s*)([=:].*)/);return D?L==null?(L=D[1].length,R=D[2].length,I=D[3].length,D):(L+R+I!=D[1].length+D[2].length+D[3].length&&(O=!1),L!=D[1].length&&(C=!1),L>D[1].length&&(L=D[1].length),R<D[2].length&&(R=D[2].length),I>D[3].length&&(I=D[3].length),D):[S]}).map(k?F:C?O?N:F:A);function z(S){return o.stringRepeat(" ",S)}function F(S){return S[2]?z(L)+S[2]+z(R-S[2].length+I)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}function N(S){return S[2]?z(L+R-S[2].length)+S[2]+z(I)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}function A(S){return S[2]?z(L)+S[2]+z(I)+S[4].replace(/^([=:])\s+/,"$1 "):S[0]}}}).call(f.prototype);function w(M,k){return M.row==k.row&&M.column==k.column}i.onSessionChange=function(M){var k=M.session;k&&!k.multiSelect&&(k.$selectionMarkers=[],k.selection.$initRangeList(),k.multiSelect=k.selection),this.multiSelect=k&&k.multiSelect;var C=M.oldSession;C&&(C.multiSelect.off("addRange",this.$onAddRange),C.multiSelect.off("removeRange",this.$onRemoveRange),C.multiSelect.off("multiSelect",this.$onMultiSelect),C.multiSelect.off("singleSelect",this.$onSingleSelect),C.multiSelect.lead.off("change",this.$checkMultiselectChange),C.multiSelect.anchor.off("change",this.$checkMultiselectChange)),k&&(k.multiSelect.on("addRange",this.$onAddRange),k.multiSelect.on("removeRange",this.$onRemoveRange),k.multiSelect.on("multiSelect",this.$onMultiSelect),k.multiSelect.on("singleSelect",this.$onSingleSelect),k.multiSelect.lead.on("change",this.$checkMultiselectChange),k.multiSelect.anchor.on("change",this.$checkMultiselectChange)),k&&this.inMultiSelectMode!=k.selection.inMultiSelectMode&&(k.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function x(M){M.$multiselectOnSessionChange||(M.$onAddRange=M.$onAddRange.bind(M),M.$onRemoveRange=M.$onRemoveRange.bind(M),M.$onMultiSelect=M.$onMultiSelect.bind(M),M.$onSingleSelect=M.$onSingleSelect.bind(M),M.$multiselectOnSessionChange=i.onSessionChange.bind(M),M.$checkMultiselectChange=M.$checkMultiselectChange.bind(M),M.$multiselectOnSessionChange(M),M.on("changeSession",M.$multiselectOnSessionChange),M.on("mousedown",d),M.commands.addCommands(a.defaultCommands),E(M))}function E(M){if(!M.textInput)return;var k=M.textInput.getElement(),C=!1;g.addListener(k,"keydown",function(L){var R=L.keyCode==18&&!(L.ctrlKey||L.shiftKey||L.metaKey);M.$blockSelectEnabled&&R?C||(M.renderer.setMouseCursor("crosshair"),C=!0):C&&O()},M),g.addListener(k,"keyup",O,M),g.addListener(k,"blur",O,M);function O(L){C&&(M.renderer.setMouseCursor(""),C=!1)}}i.MultiSelect=x,n("./config").defineOptions(f.prototype,"editor",{enableMultiselect:{set:function(M){x(this),M?this.on("mousedown",d):this.off("mousedown",d)},value:!0},enableBlockSelect:{set:function(M){this.$blockSelectEnabled=M},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(n,i,h){var p=n("../../range").Range,m=i.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(b,d,g){var o=b.getLine(g);return this.foldingStartMarker.test(o)?"start":d=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(o)?"end":""},this.getFoldWidgetRange=function(b,d,g){return null},this.indentationBlock=function(b,d,g){var o=/\S/,a=b.getLine(d),u=a.search(o);if(u!=-1){for(var l=g||a.length,s=b.getLength(),c=d,f=d;++d<s;){var w=b.getLine(d).search(o);if(w!=-1){if(w<=u){var x=b.getTokenAt(d,0);if(!x||x.type!=="string")break}f=d}}if(f>c){var E=b.getLine(f).length;return new p(c,l,f,E)}}},this.openingBracketBlock=function(b,d,g,o,a){var u={row:g,column:o+1},l=b.$findClosingBracket(d,u,a);if(l){var s=b.foldWidgets[l.row];return s==null&&(s=b.getFoldWidget(l.row)),s=="start"&&l.row>u.row&&(l.row--,l.column=b.getLine(l.row).length),p.fromPoints(u,l)}},this.closingBracketBlock=function(b,d,g,o,a){var u={row:g,column:o},l=b.$findOpeningBracket(d,u);if(l)return l.column++,u.column--,p.fromPoints(l,u)}}).call(m.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(n,i,h){var p=n("../lib/dom"),m=n("../range").Range,b=n("../config").nls;function d(o,a,u){for(var l=0,s=o.length-1;l<=s;){var c=l+s>>1,f=u(a,o[c]);if(f>0)l=c+1;else if(f<0)s=c-1;else return c}return-(l+1)}function g(o,a,u){var l=o.getAnnotations().sort(m.comparePoints);if(l.length){var s=d(l,{row:a,column:-1},m.comparePoints);s<0&&(s=-s-1),s>=l.length?s=u>0?0:l.length-1:s===0&&u<0&&(s=l.length-1);var c=l[s];if(!(!c||!u)){if(c.row===a){do c=l[s+=u];while(c&&c.row===a);if(!c)return l.slice()}var f=[];a=c.row;do f[u<0?"unshift":"push"](c),c=l[s+=u];while(c&&c.row==a);return f.length&&f}}}i.showErrorMarker=function(o,a){var u=o.session,l=o.getCursorPosition(),s=l.row,c=u.widgetManager.getWidgetsAtRow(s).filter(function(L){return L.type=="errorMarker"})[0];c?c.destroy():s-=a;var f=g(u,s,a),w;if(f){var x=f[0];l.column=(x.pos&&typeof x.column!="number"?x.pos.sc:x.column)||0,l.row=x.row,w=o.renderer.$gutterLayer.$annotations[l.row]}else{if(c)return;w={displayText:[b("error-marker.good-state","Looks good!")],className:"ace_ok"}}o.session.unfold(l.row),o.selection.moveToPosition(l);var E={row:l.row,fixedWidth:!0,coverGutter:!0,el:p.createElement("div"),type:"errorMarker"},M=E.el.appendChild(p.createElement("div")),k=E.el.appendChild(p.createElement("div"));k.className="error_widget_arrow "+w.className;var C=o.renderer.$cursorLayer.getPixelPosition(l).left;k.style.left=C+o.renderer.gutterWidth-5+"px",E.el.className="error_widget_wrapper",M.className="error_widget "+w.className,w.displayText.forEach(function(L,R){M.appendChild(p.createTextNode(L)),R<w.displayText.length-1&&M.appendChild(p.createElement("br"))}),M.appendChild(p.createElement("div"));var O=function(L,R,I){if(R===0&&(I==="esc"||I==="return"))return E.destroy(),{command:"null"}};E.destroy=function(){o.$mouseHandler.isMousePressed||(o.keyBinding.removeKeyboardHandler(O),u.widgetManager.removeLineWidget(E),o.off("changeSelection",E.destroy),o.off("changeSession",E.destroy),o.off("mouseup",E.destroy),o.off("change",E.destroy))},o.keyBinding.addKeyboardHandler(O),o.on("changeSelection",E.destroy),o.on("changeSession",E.destroy),o.on("mouseup",E.destroy),o.on("change",E.destroy),o.session.widgetManager.addLineWidget(E),E.el.onmousedown=o.focus.bind(o),o.renderer.scrollCursorIntoView(null,.5,{bottom:E.el.offsetHeight})},p.importCssString(`
953
+ .error_widget_wrapper {
954
+ background: inherit;
955
+ color: inherit;
956
+ border:none
957
+ }
958
+ .error_widget {
959
+ border-top: solid 2px;
960
+ border-bottom: solid 2px;
961
+ margin: 5px 0;
962
+ padding: 10px 40px;
963
+ white-space: pre-wrap;
964
+ }
965
+ .error_widget.ace_error, .error_widget_arrow.ace_error{
966
+ border-color: #ff5a5a
967
+ }
968
+ .error_widget.ace_warning, .error_widget_arrow.ace_warning{
969
+ border-color: #F1D817
970
+ }
971
+ .error_widget.ace_info, .error_widget_arrow.ace_info{
972
+ border-color: #5a5a5a
973
+ }
974
+ .error_widget.ace_ok, .error_widget_arrow.ace_ok{
975
+ border-color: #5aaa5a
976
+ }
977
+ .error_widget_arrow {
978
+ position: absolute;
979
+ border: solid 5px;
980
+ border-top-color: transparent!important;
981
+ border-right-color: transparent!important;
982
+ border-left-color: transparent!important;
983
+ top: -5px;
984
+ }
985
+ `,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(n,i,h){n("./loader_build")(i);var p=n("./lib/dom"),m=n("./range").Range,b=n("./editor").Editor,d=n("./edit_session").EditSession,g=n("./undomanager").UndoManager,o=n("./virtual_renderer").VirtualRenderer;n("./worker/worker_client"),n("./keyboard/hash_handler"),n("./placeholder"),n("./multi_select"),n("./mode/folding/fold_mode"),n("./theme/textmate"),n("./ext/error_marker"),i.config=n("./config"),i.edit=function(u,l){if(typeof u=="string"){var s=u;if(u=document.getElementById(s),!u)throw new Error("ace.edit can't find div #"+s)}if(u&&u.env&&u.env.editor instanceof b)return u.env.editor;var c="";if(u&&/input|textarea/i.test(u.tagName)){var f=u;c=f.value,u=p.createElement("pre"),f.parentNode.replaceChild(u,f)}else u&&(c=u.textContent,u.innerHTML="");var w=i.createEditSession(c),x=new b(new o(u),w,l),E={document:w,editor:x,onResize:x.resize.bind(x,null)};return f&&(E.textarea=f),x.on("destroy",function(){E.editor.container.env=null}),x.container.env=x.env=E,x},i.createEditSession=function(u,l){var s=new d(u,l);return s.setUndoManager(new g),s},i.Range=m,i.Editor=b,i.EditSession=d,i.UndoManager=g,i.VirtualRenderer=o;var a=i.config.version;i.version=a}),(function(){ace.require(["ace/ace"],function(n){n&&(n.config.init(!0),n.define=ace.define);var i=(function(){return this})();!i&&typeof window<"u"&&(i=window),!i&&typeof self<"u"&&(i=self),i.ace||(i.ace=n);for(var h in n)n.hasOwnProperty(h)&&(i.ace[h]=n[h]);i.ace.default=i.ace,t&&(t.exports=i.ace)})})()})(Vp)),Vp.exports}var R2=Pn("x",Q0()),Kp={exports:{}},qp;function J0(){return qp||(qp=1,(function(t,e){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,i,h){var p=n("../lib/oop"),m=n("./text_highlight_rules").TextHighlightRules,b=i.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};i.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},i.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},i.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var d=i.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},g=i.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},o=i.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},a=i.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},u=i.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},l=i.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},s=i.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},c=i.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},f=function(){var w="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",x="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",E="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",M="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",k=this.$keywords=this.createKeywordMapper({keyword:x,"constant.language":E,"variable.language":M,"support.function":w,"invalid.deprecated":"debugger"},"identifier"),C=`\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})`,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(L,R,I){I.length&&(I=[]);var z=L[L.length-1];return I.unshift(z,R),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(L,R,I){I.length&&(I=[]);var z=L[L.length-1];return I.unshift(z,R),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(L,R,I){I.length&&(I=[]);var z=L[L.length-1];return I.unshift(z,R),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(L,R,I){I.length&&(I=[]);var z=L[L.length-1];return I.unshift(z,R),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(L,R,I){I.length&&(I=[]);var z=L[L.length-1];return I.unshift(z,R),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},c,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+C+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},u,l,b,d,s,g,o,a,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:k,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(L,R,I){var z=L[2]=="-"||L[2]=="~"?"indentedHeredoc":"heredoc",F=L.split(this.splitRegex);return I.push(z,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(L,R,I){return L===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(L,R,I){return L===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(L,R){return R[0]==="heredoc"||R[0]==="indentedHeredoc"?R[0]:L}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(L,R,I){return this.next="",L=="}"&&I.length>1&&I[1]!="start"&&(I.shift(),this.next=I.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(L,R,I){return I.length&&L===I[0]?(I.unshift(L,R),this.token):"string"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(L,R,I){return I.length&&L===O[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(L,R,I){return I.length&&L===I[0]?(I.unshift(L,R),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(L,R,I){return I.length&&L===O[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(L,R,I){return I.length&&L===I[0]?(I.unshift(L,R),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(L,R,I){return I.length&&L===O[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(L,R,I){return I.length&&L===I[0]?(I.unshift(L,R),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:C},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(L,R,I){return I.length&&L===O[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(L,R,I){return I.length&&L===I[0]?(I.unshift(L,R),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(L,R,I){return I.length&&L[0]===O[I[0]]?(I.shift(),this.next=I.shift(),this.token):(this.next="","constant.language.escape")}},{include:"regex"},{defaultToken:"string.regexp"}],regex:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"constant.language.escape",regex:/\\[AGbBzZ]/},{token:"constant.language.escape",regex:/\\g<[a-zA-Z0-9]*>/},{token:["constant.language.escape","regexp.keyword","constant.language.escape"],regex:/(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/},{token:["constant.language.escape","invalid","constant.language.escape"],regex:/(\\p{\^?)([^/]*)(})/},{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:/[/][imxouesn]*/,next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"regexp.keyword",regex:/\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/},{token:"constant.language.escape",regex:/\[\^?/,push:"regex_character_class"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:/&?&?\[\^?/,push:"regex_character_class"},{token:"constant.language.escape",regex:"]",next:"pop"},{token:"constant.language.escape",regex:"-"},{defaultToken:"string.regexp.characterclass"}]},this.normalizeRules()};p.inherits(f,m),i.RubyHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,i,h){var p=n("../range").Range,m=function(){};(function(){this.checkOutdent=function(b,d){return/^\s+$/.test(b)?/^\s*\}/.test(d):!1},this.autoOutdent=function(b,d){var g=b.getLine(d),o=g.match(/^(\s*\})/);if(!o)return 0;var a=o[1].length,u=b.findMatchingBracket({row:d,column:a});if(!u||u.row==d)return 0;var l=this.$getIndent(b.getLine(u.row));b.replace(new p(d,0,d,a-1),l)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(m.prototype),i.MatchingBraceOutdent=m}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(n,i,h){var p=n("../../lib/oop"),m=n("./fold_mode").FoldMode,b=n("../../range").Range,d=n("../../token_iterator").TokenIterator,g=i.FoldMode=function(){};p.inherits(g,m),(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(o,a,u){var l=o.getLine(u),s=this.foldingStartMarker.test(l),c=this.foldingStopMarker.test(l);if(s&&!c){var f=l.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(l)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(l)===!1)||f[1]=="when"&&/\sthen\s/.test(l)===!0)return;if(o.getTokenAt(u,f.index+2).type==="keyword")return"start"}else if(!f[3]||o.getTokenAt(u,f.index+1).type==="comment.multiline")return"start"}if(a!="markbeginend"||!c||s&&c)return"";var f=l.match(this.foldingStopMarker);if(f[3]==="end"){if(o.getTokenAt(u,f.index+1).type==="keyword")return"end"}else if(!f[1]||o.getTokenAt(u,f.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(o,a,u){var l=o.doc.getLine(u),s=this.foldingStartMarker.exec(l);if(s)return s[1]||s[3]?this.rubyBlock(o,u,s.index+2):this.openingBracketBlock(o,"{",u,s.index);var s=this.foldingStopMarker.exec(l);if(s)return s[3]==="end"&&o.getTokenAt(u,s.index+1).type==="keyword"?this.rubyBlock(o,u,s.index+1):s[1]==="=end"&&o.getTokenAt(u,s.index+1).type==="comment.multiline"?this.rubyBlock(o,u,s.index+1):this.closingBracketBlock(o,"}",u,s.index+s[0].length)},this.rubyBlock=function(o,a,u,l){var s=new d(o,a,u),c=s.getCurrentToken();if(!(!c||c.type!="keyword"&&c.type!="comment.multiline")){var f=c.value,w=o.getLine(a);switch(c.value){case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+c.value);if(!x.test(w))return;var E=this.indentKeywords[f];break;case"when":if(/\sthen\s/.test(w))return;case"elsif":case"rescue":case"ensure":var E=1;break;case"else":var x=new RegExp("^\\s*"+c.value+"\\s*$");if(!x.test(w))return;var E=1;break;default:var E=this.indentKeywords[f]}var M=[f];if(E){var k=E===-1?o.getLine(a-1).length:o.getLine(a).length,C=a,O=[];if(O.push(s.getCurrentTokenRange()),s.step=E===-1?s.stepBackward:s.stepForward,c.type=="comment.multiline"){for(;c=s.step();)if(c.type==="comment.multiline"){if(E==1){if(k=6,c.value=="=end")break}else if(c.value=="=begin")break}}else for(;c=s.step();){var L=!1;if(c.type==="keyword"){var R=E*this.indentKeywords[c.value];switch(w=o.getLine(s.getCurrentTokenRow()),c.value){case"do":for(var I=s.$tokenIndex-1;I>=0;I--){var z=s.$rowTokens[I];if(z&&(z.value=="while"||z.value=="until"||z.value=="for")){R=0;break}}break;case"else":var x=new RegExp("^\\s*"+c.value+"\\s*$");(!x.test(w)||f=="case")&&(R=0,L=!0);break;case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+c.value);x.test(w)||(R=0,L=!0);break;case"when":(/\sthen\s/.test(w)||f=="case")&&(R=0,L=!0)}if(R>0)M.unshift(c.value);else if(R<=0&&L===!1){if(M.shift(),!M.length&&((f=="while"||f=="until"||f=="for")&&c.value!="do"||c.value=="do"&&E==-1&&R!=0||c.value!="do"))break;R===0&&M.unshift(c.value)}}}if(!c)return null;if(l)return O.push(s.getCurrentTokenRange()),O;var a=s.getCurrentTokenRow();if(E===-1){if(c.type==="comment.multiline")var F=6;else var F=o.getLine(a).length;return new b(a,F,C-1,k)}return new b(C,k,a-1,o.getLine(a-1).length)}}}}).call(g.prototype)}),ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"],function(n,i,h){var p=n("../lib/oop"),m=n("./text").Mode,b=n("./ruby_highlight_rules").RubyHighlightRules,d=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("../range").Range,o=n("./folding/ruby").FoldMode,a=function(){this.HighlightRules=b,this.$outdent=new d,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new o,this.indentKeywords=this.foldingRules.indentKeywords};p.inherits(a,m),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,l,s){var c=this.$getIndent(l),f=this.getTokenizer().getLineTokens(l,u),w=f.tokens;if(w.length&&w[w.length-1].type=="comment")return c;if(u=="start"){var x=l.match(/^.*[\{\(\[]\s*$/),E=l.match(/^\s*(class|def|module)\s.*$/),M=l.match(/.*do(\s*|\s+\|.*\|\s*)$/),k=l.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(x||E||M||k)&&(c+=s)}return c},this.checkOutdent=function(u,l,s){return/^\s+(end|else|rescue|ensure)$/.test(l+s)||this.$outdent.checkOutdent(l,s)},this.autoOutdent=function(u,l,s){var c=l.getLine(s);if(/}/.test(c))return this.$outdent.autoOutdent(l,s);var f=this.$getIndent(c),w=l.getLine(s-1),x=this.$getIndent(w),E=l.getTabString();x.length<=f.length&&f.slice(-E.length)==E&&l.remove(new g(s,f.length-E.length,s,f.length))},this.getMatching=function(u,l,s){if(l==null){var c=u.selection.lead;s=c.column,l=c.row}var f=u.getTokenAt(l,s);if(f&&f.value in this.indentKeywords)return this.foldingRules.rubyBlock(u,l,s,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(a.prototype),i.Mode=a}),(function(){ace.require(["ace/mode/ruby"],function(n){t&&(t.exports=n)})})()})(Kp)),Kp.exports}J0();var Yp={exports:{}},Xp;function ex(){return Xp||(Xp=1,(function(t,e){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,i,h){var p=n("../lib/oop"),m=n("./text_highlight_rules").TextHighlightRules,b=function(){var d="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await|nonlocal",g="True|False|None|NotImplemented|Ellipsis|__debug__",o="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",a=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":o,"variable.language":"self|cls","constant.language":g,keyword:d},"identifier"),u="[uU]?",l="[rR]",s="[fF]",c="(?:[rR][fF]|[fF][rR])",f="(?:(?:[1-9]\\d*)|(?:0))",w="(?:0[oO]?[0-7]+)",x="(?:0[xX][\\dA-Fa-f]+)",E="(?:0[bB][01]+)",M="(?:"+f+"|"+w+"|"+x+"|"+E+")",k="(?:[eE][+-]?\\d+)",C="(?:\\.\\d+)",O="(?:\\d+)",L="(?:(?:"+O+"?"+C+")|(?:"+O+"\\.))",R="(?:(?:"+L+"|"+O+")"+k+")",I="(?:"+R+"|"+L+")",z=`\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})`;this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:u+'"{3}',next:"qqstring3"},{token:"string",regex:u+'"(?=.)',next:"qqstring"},{token:"string",regex:u+"'{3}",next:"qstring3"},{token:"string",regex:u+"'(?=.)",next:"qstring"},{token:"string",regex:l+'"{3}',next:"rawqqstring3"},{token:"string",regex:l+'"(?=.)',next:"rawqqstring"},{token:"string",regex:l+"'{3}",next:"rawqstring3"},{token:"string",regex:l+"'(?=.)",next:"rawqstring"},{token:"string",regex:s+'"{3}',next:"fqqstring3"},{token:"string",regex:s+'"(?=.)',next:"fqqstring"},{token:"string",regex:s+"'{3}",next:"fqstring3"},{token:"string",regex:s+"'(?=.)",next:"fqstring"},{token:"string",regex:c+'"{3}',next:"rfqqstring3"},{token:"string",regex:c+'"(?=.)',next:"rfqqstring"},{token:"string",regex:c+"'{3}",next:"rfqstring3"},{token:"string",regex:c+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:["keyword","text","entity.name.function"],regex:"(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex:z},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:z},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:z},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:z},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],rawqqstring3:[{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],rawqstring3:[{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],rawqqstring:[{token:"string",regex:"\\\\$",next:"rawqqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],rawqstring:[{token:"string",regex:"\\\\$",next:"rawqstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],fqqstring3:[{token:"constant.language.escape",regex:z},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:z},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:z},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:z},{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring3:[{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring3:[{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring:[{token:"string",regex:"\\\\$",next:"rfqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring:[{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstringParRules:[{token:"paren.lparen",regex:"[\\[\\(]"},{token:"paren.rparen",regex:"[\\]\\)]"},{token:"string",regex:"\\s+"},{token:"string",regex:"'[^']*'"},{token:"string",regex:'"[^"]*"'},{token:"function.support",regex:"(!s|!r|!a)"},{include:"constants"},{token:"paren.rparen",regex:"}",next:"pop"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"}],constants:[{token:"constant.numeric",regex:"(?:"+I+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:I},{token:"constant.numeric",regex:M+"[lL]\\b"},{token:"constant.numeric",regex:M+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};p.inherits(b,m),i.PythonHighlightRules=b}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(n,i,h){var p=n("../../lib/oop"),m=n("./fold_mode").FoldMode,b=i.FoldMode=function(d){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+d+")(?:\\s*)(?:#.*)?$")};p.inherits(b,m),(function(){this.getFoldWidgetRange=function(d,g,o){var a=d.getLine(o),u=a.match(this.foldingStartMarker);if(u)return u[1]?this.openingBracketBlock(d,u[1],o,u.index):u[2]?this.indentationBlock(d,o,u.index+u[2].length):this.indentationBlock(d,o)}}).call(b.prototype)}),ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(n,i,h){var p=n("../lib/oop"),m=n("./text").Mode,b=n("./python_highlight_rules").PythonHighlightRules,d=n("./folding/pythonic").FoldMode,g=n("../range").Range,o=function(){this.HighlightRules=b,this.foldingRules=new d("\\:"),this.$behaviour=this.$defaultBehaviour};p.inherits(o,m),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(u,l,s){var c=this.$getIndent(l),f=this.getTokenizer().getLineTokens(l,u),w=f.tokens;if(w.length&&w[w.length-1].type=="comment")return c;if(u=="start"){var x=l.match(/^.*[\{\(\[:]\s*$/);x&&(c+=s)}return c};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,l,s){if(s!==`\r
986
+ `&&s!=="\r"&&s!==`
987
+ `)return!1;var c=this.getTokenizer().getLineTokens(l.trim(),u).tokens;if(!c)return!1;do var f=c.pop();while(f&&(f.type=="comment"||f.type=="text"&&f.value.match(/^\s+$/)));return f?f.type=="keyword"&&a[f.value]:!1},this.autoOutdent=function(u,l,s){s+=1;var c=this.$getIndent(l.getLine(s)),f=l.getTabString();c.slice(-f.length)==f&&l.remove(new g(s,c.length-f.length,s,c.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(o.prototype),i.Mode=o}),(function(){ace.require(["ace/mode/python"],function(n){t&&(t.exports=n)})})()})(Yp)),Yp.exports}ex();var Zp={exports:{}},Qp;function tx(){return Qp||(Qp=1,(function(t,e){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,i,h){var p=n("../lib/oop"),m=n("./text_highlight_rules").TextHighlightRules,b=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};p.inherits(b,m),i.JsonHighlightRules=b}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,i,h){var p=n("../range").Range,m=function(){};(function(){this.checkOutdent=function(b,d){return/^\s+$/.test(b)?/^\s*\}/.test(d):!1},this.autoOutdent=function(b,d){var g=b.getLine(d),o=g.match(/^(\s*\})/);if(!o)return 0;var a=o[1].length,u=b.findMatchingBracket({row:d,column:a});if(!u||u.row==d)return 0;var l=this.$getIndent(b.getLine(u.row));b.replace(new p(d,0,d,a-1),l)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(m.prototype),i.MatchingBraceOutdent=m}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,i,h){var p=n("../../lib/oop"),m=n("../../range").Range,b=n("./fold_mode").FoldMode,d=i.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end)))};p.inherits(d,b),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(g,o,a){var u=g.getLine(a);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var l=this._getFoldWidgetBase(g,o,a);return!l&&this.startRegionRe.test(u)?"start":l},this.getFoldWidgetRange=function(g,o,a,u){var l=g.getLine(a);if(this.startRegionRe.test(l))return this.getCommentRegionBlock(g,l,a);var s=l.match(this.foldingStartMarker);if(s){var c=s.index;if(s[1])return this.openingBracketBlock(g,s[1],a,c);var f=g.getCommentFoldRange(a,c+s[0].length,1);return f&&!f.isMultiLine()&&(u?f=this.getSectionRange(g,a):o!="all"&&(f=null)),f}if(o!=="markbegin"){var s=l.match(this.foldingStopMarker);if(s){var c=s.index+s[0].length;return s[1]?this.closingBracketBlock(g,s[1],a,c):g.getCommentFoldRange(a,c,-1)}}},this.getSectionRange=function(g,o){var a=g.getLine(o),u=a.search(/\S/),l=o,s=a.length;o+=1;for(var c=o,f=g.getLength();++o<f;){a=g.getLine(o);var w=a.search(/\S/);if(w!==-1){if(u>w)break;var x=this.getFoldWidgetRange(g,"all",o);if(x){if(x.start.row<=l)break;if(x.isMultiLine())o=x.end.row;else if(u==w)break}c=o}}return new m(l,s,c,g.getLine(c).length)},this.getCommentRegionBlock=function(g,o,a){for(var u=o.search(/\s*$/),l=g.getLength(),s=a,c=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,f=1;++a<l;){o=g.getLine(a);var w=c.exec(o);if(w&&(w[1]?f--:f++,!f))break}var x=a;if(x>s)return new m(s,u,x,o.length)}}).call(d.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(n,i,h){var p=n("../lib/oop"),m=n("./text").Mode,b=n("./json_highlight_rules").JsonHighlightRules,d=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("./folding/cstyle").FoldMode,o=n("../worker/worker_client").WorkerClient,a=function(){this.HighlightRules=b,this.$outdent=new d,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new g};p.inherits(a,m),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(u,l,s){var c=this.$getIndent(l);if(u=="start"){var f=l.match(/^.*[\{\(\[]\s*$/);f&&(c+=s)}return c},this.checkOutdent=function(u,l,s){return this.$outdent.checkOutdent(l,s)},this.autoOutdent=function(u,l,s){this.$outdent.autoOutdent(l,s)},this.createWorker=function(u){var l=new o(["ace"],"ace/mode/json_worker","JsonWorker");return l.attachToDocument(u.getDocument()),l.on("annotate",function(s){u.setAnnotations(s.data)}),l.on("terminate",function(){u.clearAnnotations()}),l},this.$id="ace/mode/json"}).call(a.prototype),i.Mode=a}),(function(){ace.require(["ace/mode/json"],function(n){t&&(t.exports=n)})})()})(Zp)),Zp.exports}tx();var Jp={exports:{}},eg;function nx(){return eg||(eg=1,(function(t,e){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(n,i,h){var p=n("../lib/oop");n("../lib/lang");var m=n("./text_highlight_rules").TextHighlightRules,b=i.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",d=i.supportFunction="rgb|rgba|url|attr|counter|counters",g=i.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",o=i.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",a=i.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",u=i.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",l=i.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",s=i.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",c=function(){var f=this.createKeywordMapper({"support.function":d,"support.constant":g,"support.type":b,"support.constant.color":o,"support.constant.fonts":a},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:u},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+u+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:u},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:l},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:s},{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(c,m),i.CssHighlightRules=c}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,i,h){var p=n("../lib/oop"),m=n("./text_highlight_rules").TextHighlightRules,b=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},b.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};p.inherits(b,m),b.getTagRule=function(d){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},b.getStartRule=function(d){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:d}},b.getEndRule=function(d){return{token:"comment.doc",regex:"\\*\\/",next:d}},i.JsDocCommentHighlightRules=b}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(n,i,h){function p(){var u=o.replace("\\d","\\d\\-"),l={onMatch:function(c,f,w){var x=c.charAt(1)=="/"?2:1;return x==1?(f!=this.nextState?w.unshift(this.next,this.nextState,0):w.unshift(this.next),w[2]++):x==2&&f==this.nextState&&(w[1]--,(!w[1]||w[1]<0)&&(w.shift(),w.shift())),[{type:"meta.tag.punctuation."+(x==1?"":"end-")+"tag-open.xml",value:c.slice(0,x)},{type:"meta.tag.tag-name.xml",value:c.substr(x)}]},regex:"</?(?:"+u+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(l);var s={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[s,l,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(c,f,w){return f==w[0]&&w.shift(),c.length==2&&(w[0]==this.nextState&&w[1]--,(!w[1]||w[1]<0)&&w.splice(0,2)),this.next=w[0]||"start",[{type:this.token,value:c}]},nextState:"jsx"},s,m("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:u},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},l],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function m(u){return[{token:"comment",regex:/\/\*/,next:[d.getTagRule(),{token:"comment",regex:"\\*\\/",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[d.getTagRule(),{token:"comment",regex:"$|^",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var b=n("../lib/oop"),d=n("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,g=n("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",a=function(u){var l={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},s=this.createKeywordMapper(l,"identifier"),c="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]?|.)",w="(function)(\\s*)(\\*?)",x={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(l).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[d.getStartRule("doc-start"),m("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:"("+o+")(\\s*)(=)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+c+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:s,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[d.getStartRule("doc-start"),m("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:[m("function_arguments"),{token:"variable.parameter",regex:o},{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"}]},(!u||!u.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(E,M,k){if(this.next=E=="{"?this.nextState:"",E=="{"&&k.length)k.unshift("start",M);else if(E=="}"&&k.length&&(k.shift(),this.next=k.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return E=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:f},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!u||u.jsx!=0)&&p.call(this)),this.embedRules(d,"doc-",[d.getEndRule("no_regex")]),this.normalizeRules()};b.inherits(a,g),i.JavaScriptHighlightRules=a}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,i,h){var p=n("../lib/oop"),m=n("./text_highlight_rules").TextHighlightRules,b=function(d){var g="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+g+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:g},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+g+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+g+":)?"+g+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:g},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===b&&this.normalizeRules()};(function(){this.embedTagRules=function(d,g,o){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+o+".tag-name.xml"],regex:"(<)("+o+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:g+"start"}]}),this.$rules[o+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(a,u,l){return l.splice(0),this.token}}],this.embedRules(d,g,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+o+".tag-name.xml"],regex:"(</)("+o+"(?=\\s|>|$))",next:o+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(m.prototype),p.inherits(b,m),i.XmlHighlightRules=b}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(n,i,h){var p=n("../lib/oop"),m=n("../lib/lang"),b=n("./css_highlight_rules").CssHighlightRules,d=n("./javascript_highlight_rules").JavaScriptHighlightRules,g=n("./xml_highlight_rules").XmlHighlightRules,o=m.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),a=function(){g.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(u,l){var s=o[l];return["meta.tag.punctuation."+(u=="<"?"":"end-")+"tag-open.xml","meta.tag"+(s?"."+s:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(b,"css-","style"),this.embedTagRules(new d({jsx:!1}).getRules(),"js-","script"),this.constructor===a&&this.normalizeRules()};p.inherits(a,g),i.HtmlHighlightRules=a}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(n,i,h){var p=n("../config").$modes,m=n("../lib/oop"),b=n("../lib/lang"),d=n("./text_highlight_rules").TextHighlightRules,g=n("./html_highlight_rules").HtmlHighlightRules,o=function(u){return"(?:[^"+b.escapeRegExp(u)+"\\\\]|\\\\.)*"},a=function(){g.call(this);var u={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(s,c,f,w){var x=s.match(/^(\s*)([`~]+)(.*)/),E=/[\w-]+|$/.exec(x[3])[0];return p[E]||(E=""),f.unshift("githubblock",[],[x[1],x[2],E],c),this.token},next:"githubblock"},l=[{token:"support.function",regex:".*",onMatch:function(s,c,f,w){var x=f[1],E=f[2][0],M=f[2][1],k=f[2][2],C=/^(\s*)(`+|~+)\s*$/.exec(s);if(C&&C[1].length<E.length+3&&C[2].length>=M.length&&C[2][0]==M[0])return f.splice(0,3),this.next=f.shift(),this.token;if(this.next="",k&&p[k]){var O=p[k].getTokenizer().getLineTokens(s,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(s){return"markup.heading."+s.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},u,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+o("]")+")(\\]\\s*\\[)("+o("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+o("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+o('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},u,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:l}),this.normalizeRules()};m.inherits(a,d),i.MarkdownHighlightRules=a}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(n,i,h){var p=n("../../lib/oop"),m=n("./fold_mode").FoldMode,b=n("../../range").Range,d=i.FoldMode=function(){};p.inherits(d,m),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(g,o,a){var u=g.getLine(a);return this.foldingStartMarker.test(u)?u[0]=="`"&&g.bgTokenizer.getState(a)=="start"?"end":"start":""},this.getFoldWidgetRange=function(g,o,a){function u(L){return E=g.getTokens(L)[0],E&&E.type.lastIndexOf(M,0)===0}function l(){var L=E.value[0];return L=="="?6:L=="-"?5:7-E.value.search(/[^#]|$/)}var s=g.getLine(a),c=s.length,f=g.getLength(),w=a,x=a;if(s.match(this.foldingStartMarker)){if(s[0]=="`"){if(g.bgTokenizer.getState(a)!=="start"){for(;++a<f&&(s=g.getLine(a),!(s[0]=="`"&s.substring(0,3)=="```")););return new b(w,c,a,0)}for(;a-- >0&&(s=g.getLine(a),!(s[0]=="`"&s.substring(0,3)=="```")););return new b(a,s.length,w,0)}var E,M="markup.heading";if(u(a)){for(var k=l();++a<f;)if(u(a)){var C=l();if(C>=k)break}if(x=a-(!E||["=","-"].indexOf(E.value[0])==-1?1:2),x>w)for(;x>w&&/^\s*$/.test(g.getLine(x));)x--;if(x>w){var O=g.getLine(x).length;return new b(w,c,x,O)}}}}}).call(d.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,i,h){var p=n("../range").Range,m=function(){};(function(){this.checkOutdent=function(b,d){return/^\s+$/.test(b)?/^\s*\}/.test(d):!1},this.autoOutdent=function(b,d){var g=b.getLine(d),o=g.match(/^(\s*\})/);if(!o)return 0;var a=o[1].length,u=b.findMatchingBracket({row:d,column:a});if(!u||u.row==d)return 0;var l=this.$getIndent(b.getLine(u.row));b.replace(new p(d,0,d,a-1),l)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(m.prototype),i.MatchingBraceOutdent=m}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(n,i,h){function p(o,a){return o&&o.type.lastIndexOf(a+".xml")>-1}var m=n("../../lib/oop"),b=n("../behaviour").Behaviour,d=n("../../token_iterator").TokenIterator,g=function(){this.add("string_dquotes","insertion",function(o,a,u,l,s){if(s=='"'||s=="'"){var c=s,f=l.doc.getTextRange(u.getSelectionRange());if(f!==""&&f!=="'"&&f!='"'&&u.getWrapBehavioursEnabled())return{text:c+f+c,selection:!1};var w=u.getCursorPosition(),x=l.doc.getLine(w.row),E=x.substring(w.column,w.column+1),M=new d(l,w.row,w.column),k=M.getCurrentToken();if(E==c&&(p(k,"attribute-value")||p(k,"string")))return{text:"",selection:[1,1]};if(k||(k=M.stepBackward()),!k)return;for(;p(k,"tag-whitespace")||p(k,"whitespace");)k=M.stepBackward();var C=!E||E.match(/\s/);if(p(k,"attribute-equals")&&(C||E==">")||p(k,"decl-attribute-equals")&&(C||E=="?"))return{text:c+c,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(o,a,u,l,s){var c=l.doc.getTextRange(s);if(!s.isMultiLine()&&(c=='"'||c=="'")){var f=l.doc.getLine(s.start.row),w=f.substring(s.start.column+1,s.start.column+2);if(w==c)return s.end.column++,s}}),this.add("autoclosing","insertion",function(o,a,u,l,s){if(s==">"){var c=u.getSelectionRange().start,f=new d(l,c.row,c.column),w=f.getCurrentToken()||f.stepBackward();if(!w||!(p(w,"tag-name")||p(w,"tag-whitespace")||p(w,"attribute-name")||p(w,"attribute-equals")||p(w,"attribute-value"))||p(w,"reference.attribute-value"))return;if(p(w,"attribute-value")){var x=f.getCurrentTokenColumn()+w.value.length;if(c.column<x)return;if(c.column==x){var E=f.stepForward();if(E&&p(E,"attribute-value"))return;f.stepBackward()}}if(/^\s*>/.test(l.getLine(c.row).slice(c.column)))return;for(;!p(w,"tag-name");)if(w=f.stepBackward(),w.value=="<"){w=f.stepForward();break}var M=f.getCurrentTokenRow(),k=f.getCurrentTokenColumn();if(p(f.stepBackward(),"end-tag-open"))return;var C=w.value;return M==c.row&&(C=C.substring(0,c.column-k)),this.voidElements&&this.voidElements.hasOwnProperty(C.toLowerCase())?void 0:{text:"></"+C+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(o,a,u,l,s){if(s==`
988
+ `){var c=u.getCursorPosition(),f=l.getLine(c.row),w=new d(l,c.row,c.column),x=w.getCurrentToken();if(p(x,"")&&x.type.indexOf("tag-close")!==-1){if(x.value=="/>")return;for(;x&&x.type.indexOf("tag-name")===-1;)x=w.stepBackward();if(!x)return;var E=x.value,M=w.getCurrentTokenRow();if(x=w.stepBackward(),!x||x.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[E]||!this.voidElements){var k=l.getTokenAt(c.row,c.column+1),f=l.getLine(M),C=this.$getIndent(f),O=C+l.getTabString();return k&&k.value==="</"?{text:`
989
+ `+O+`
990
+ `+C,selection:[1,O.length,1,O.length]}:{text:`
991
+ `+O}}}}})};m.inherits(g,b),i.XmlBehaviour=g}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(n,i,h){var p=n("../../lib/oop"),m=n("../../token_iterator").TokenIterator,b=n("../behaviour/cstyle").CstyleBehaviour,d=n("../behaviour/xml").XmlBehaviour,g=function(){var o=new d({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(o),this.inherit(b),this.add("autoclosing-fragment","insertion",function(a,u,l,s,c){if(c==">"){var f=l.getSelectionRange().start,w=new m(s,f.row,f.column),x=w.getCurrentToken()||w.stepBackward();if(!x)return;if(x.value=="<")return{text:"></>",selection:[1,1]}}})};p.inherits(g,b),i.JavaScriptBehaviour=g}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,i,h){function p(a,u){return a&&a.type&&a.type.lastIndexOf(u+".xml")>-1}var m=n("../../lib/oop"),b=n("../../range").Range,d=n("./fold_mode").FoldMode,g=i.FoldMode=function(a,u){d.call(this),this.voidElements=a||{},this.optionalEndTags=m.mixin({},this.voidElements),u&&m.mixin(this.optionalEndTags,u)};m.inherits(g,d);var o=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(a,u,l){var s=this._getFirstTagInLine(a,l);return s?s.closing||!s.tagName&&s.selfClosing?u==="markbeginend"?"end":"":!s.tagName||s.selfClosing||this.voidElements.hasOwnProperty(s.tagName.toLowerCase())||this._findEndTagInLine(a,l,s.tagName,s.end.column)?"":"start":this.getCommentFoldWidget(a,l)},this.getCommentFoldWidget=function(a,u){return/comment/.test(a.getState(u))&&/<!-/.test(a.getLine(u))?"start":""},this._getFirstTagInLine=function(a,u){for(var l=a.getTokens(u),s=new o,c=0;c<l.length;c++){var f=l[c];if(p(f,"tag-open")){if(s.end.column=s.start.column+f.value.length,s.closing=p(f,"end-tag-open"),f=l[++c],!f)return null;if(s.tagName=f.value,f.value===""){if(f=l[++c],!f)return null;s.tagName=f.value}for(s.end.column+=f.value.length,c++;c<l.length;c++)if(f=l[c],s.end.column+=f.value.length,p(f,"tag-close")){s.selfClosing=f.value=="/>";break}return s}if(p(f,"tag-close"))return s.selfClosing=f.value=="/>",s;s.start.column+=f.value.length}return null},this._findEndTagInLine=function(a,u,l,s){for(var c=a.getTokens(u),f=0,w=0;w<c.length;w++){var x=c[w];if(f+=x.value.length,!(f<s-1)&&p(x,"end-tag-open")&&(x=c[w+1],p(x,"tag-name")&&x.value===""&&(x=c[w+2]),x&&x.value==l))return!0}return!1},this.getFoldWidgetRange=function(a,u,l){var s=this._getFirstTagInLine(a,l);if(!s)return this.getCommentFoldWidget(a,l)&&a.getCommentFoldRange(l,a.getLine(l).length);var c=a.getMatchingTags({row:l,column:0});if(c)return new b(c.openTag.end.row,c.openTag.end.column,c.closeTag.start.row,c.closeTag.start.column)}}).call(g.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,i,h){var p=n("../../lib/oop"),m=n("../../range").Range,b=n("./fold_mode").FoldMode,d=i.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end)))};p.inherits(d,b),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(g,o,a){var u=g.getLine(a);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var l=this._getFoldWidgetBase(g,o,a);return!l&&this.startRegionRe.test(u)?"start":l},this.getFoldWidgetRange=function(g,o,a,u){var l=g.getLine(a);if(this.startRegionRe.test(l))return this.getCommentRegionBlock(g,l,a);var s=l.match(this.foldingStartMarker);if(s){var c=s.index;if(s[1])return this.openingBracketBlock(g,s[1],a,c);var f=g.getCommentFoldRange(a,c+s[0].length,1);return f&&!f.isMultiLine()&&(u?f=this.getSectionRange(g,a):o!="all"&&(f=null)),f}if(o!=="markbegin"){var s=l.match(this.foldingStopMarker);if(s){var c=s.index+s[0].length;return s[1]?this.closingBracketBlock(g,s[1],a,c):g.getCommentFoldRange(a,c,-1)}}},this.getSectionRange=function(g,o){var a=g.getLine(o),u=a.search(/\S/),l=o,s=a.length;o+=1;for(var c=o,f=g.getLength();++o<f;){a=g.getLine(o);var w=a.search(/\S/);if(w!==-1){if(u>w)break;var x=this.getFoldWidgetRange(g,"all",o);if(x){if(x.start.row<=l)break;if(x.isMultiLine())o=x.end.row;else if(u==w)break}c=o}}return new m(l,s,c,g.getLine(c).length)},this.getCommentRegionBlock=function(g,o,a){for(var u=o.search(/\s*$/),l=g.getLength(),s=a,c=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,f=1;++a<l;){o=g.getLine(a);var w=c.exec(o);if(w&&(w[1]?f--:f++,!f))break}var x=a;if(x>s)return new m(s,u,x,o.length)}}).call(d.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(n,i,h){var p=n("../../lib/oop"),m=n("./xml").FoldMode,b=n("./cstyle").FoldMode,d=i.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end))),this.xmlFoldMode=new m};p.inherits(d,b),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(g,o,a){var u=this.getFoldWidgetBase(g,o,a);return u||this.xmlFoldMode.getFoldWidget(g,o,a)},this.getFoldWidgetRange=function(g,o,a,u){var l=this.getFoldWidgetRangeBase(g,o,a,u);return l||this.xmlFoldMode.getFoldWidgetRange(g,o,a)}}).call(d.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(n,i,h){var p=n("../lib/oop"),m=n("./text").Mode,b=n("./javascript_highlight_rules").JavaScriptHighlightRules,d=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("../worker/worker_client").WorkerClient,o=n("./behaviour/javascript").JavaScriptBehaviour,a=n("./folding/javascript").FoldMode,u=function(){this.HighlightRules=b,this.$outdent=new d,this.$behaviour=new o,this.foldingRules=new a};p.inherits(u,m),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(l,s,c){var f=this.$getIndent(s),w=this.getTokenizer().getLineTokens(s,l),x=w.tokens,E=w.state;if(x.length&&x[x.length-1].type=="comment")return f;if(l=="start"||l=="no_regex"){var M=s.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);M&&(f+=c)}else if(l=="doc-start"&&(E=="start"||E=="no_regex"))return"";return f},this.checkOutdent=function(l,s,c){return this.$outdent.checkOutdent(s,c)},this.autoOutdent=function(l,s,c){this.$outdent.autoOutdent(s,c)},this.createWorker=function(l){var s=new g(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return s.attachToDocument(l.getDocument()),s.on("annotate",function(c){l.setAnnotations(c.data)}),s.on("terminate",function(){l.clearAnnotations()}),s},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(u.prototype),i.Mode=u}),ace.define("ace/mode/css_completions",["require","exports","module"],function(n,i,h){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}},m=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var b=document.createElement("c").style;for(var d in b)if(typeof b[d]=="string"){var g=d.replace(/[A-Z]/g,function(o){return"-"+o.toLowerCase()});p.hasOwnProperty(g)||(p[g]=1)}}this.completionsDefined=!0},this.getCompletions=function(b,d,g,o){if(this.completionsDefined||this.defineCompletions(),b==="ruleset"||d.$mode.$id=="ace/mode/scss"){var a=d.getLine(g.row).substr(0,g.column),u=/\([^)]*$/.test(a);return u&&(a=a.substr(a.lastIndexOf("(")+1)),/:[^;]+$/.test(a)?this.getPropertyValueCompletions(b,d,g,o):this.getPropertyCompletions(b,d,g,o,u)}return[]},this.getPropertyCompletions=function(b,d,g,o,a){a=a||!1;var u=Object.keys(p);return u.map(function(l){return{caption:l,snippet:l+": $0"+(a?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(b,d,g,o){var a=d.getLine(g.row).substr(0,g.column),u=(/([\w\-]+):[^:]*$/.exec(a)||{})[1];if(!u)return[];var l=[];return u in p&&typeof p[u]=="object"&&(l=Object.keys(p[u])),l.map(function(s){return{caption:s,snippet:s,meta:"property value",score:1e6}})}}).call(m.prototype),i.CssCompletions=m}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(n,i,h){var p=n("../../lib/oop");n("../behaviour").Behaviour;var m=n("./cstyle").CstyleBehaviour,b=n("../../token_iterator").TokenIterator,d=function(){this.inherit(m),this.add("colon","insertion",function(g,o,a,u,l){if(l===":"&&a.selection.isEmpty()){var s=a.getCursorPosition(),c=new b(u,s.row,s.column),f=c.getCurrentToken();if(f&&f.value.match(/\s+/)&&(f=c.stepBackward()),f&&f.type==="support.type"){var w=u.doc.getLine(s.row),x=w.substring(s.column,s.column+1);if(x===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(w.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(g,o,a,u,l){var s=u.doc.getTextRange(l);if(!l.isMultiLine()&&s===":"){var c=a.getCursorPosition(),f=new b(u,c.row,c.column),w=f.getCurrentToken();if(w&&w.value.match(/\s+/)&&(w=f.stepBackward()),w&&w.type==="support.type"){var x=u.doc.getLine(l.start.row),E=x.substring(l.end.column,l.end.column+1);if(E===";")return l.end.column++,l}}}),this.add("semicolon","insertion",function(g,o,a,u,l){if(l===";"&&a.selection.isEmpty()){var s=a.getCursorPosition(),c=u.doc.getLine(s.row),f=c.substring(s.column,s.column+1);if(f===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(g,o,a,u,l){if(l==="!"&&a.selection.isEmpty()){var s=a.getCursorPosition(),c=u.doc.getLine(s.row);if(/^\s*(;|}|$)/.test(c.substring(s.column)))return{text:"!important",selection:[10,10]}}})};p.inherits(d,m),i.CssBehaviour=d}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(n,i,h){var p=n("../lib/oop"),m=n("./text").Mode,b=n("./css_highlight_rules").CssHighlightRules,d=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("../worker/worker_client").WorkerClient,o=n("./css_completions").CssCompletions,a=n("./behaviour/css").CssBehaviour,u=n("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=b,this.$outdent=new d,this.$behaviour=new a,this.$completer=new o,this.foldingRules=new u};p.inherits(l,m),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(s,c,f){var w=this.$getIndent(c),x=this.getTokenizer().getLineTokens(c,s).tokens;if(x.length&&x[x.length-1].type=="comment")return w;var E=c.match(/^.*\{\s*$/);return E&&(w+=f),w},this.checkOutdent=function(s,c,f){return this.$outdent.checkOutdent(c,f)},this.autoOutdent=function(s,c,f){this.$outdent.autoOutdent(c,f)},this.getCompletions=function(s,c,f,w){return this.$completer.getCompletions(s,c,f,w)},this.createWorker=function(s){var c=new g(["ace"],"ace/mode/css_worker","Worker");return c.attachToDocument(s.getDocument()),c.on("annotate",function(f){s.setAnnotations(f.data)}),c.on("terminate",function(){s.clearAnnotations()}),c},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(l.prototype),i.Mode=l}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(n,i,h){var p=n("../../lib/oop"),m=n("./fold_mode").FoldMode,b=i.FoldMode=function(d,g){this.defaultMode=d,this.subModes=g};p.inherits(b,m),(function(){this.$getMode=function(d){typeof d!="string"&&(d=d[0]);for(var g in this.subModes)if(d.indexOf(g)===0)return this.subModes[g];return null},this.$tryMode=function(d,g,o,a){var u=this.$getMode(d);return u?u.getFoldWidget(g,o,a):""},this.getFoldWidget=function(d,g,o){return this.$tryMode(d.getState(o-1),d,g,o)||this.$tryMode(d.getState(o),d,g,o)||this.defaultMode.getFoldWidget(d,g,o)},this.getFoldWidgetRange=function(d,g,o){var a=this.$getMode(d.getState(o-1));return(!a||!a.getFoldWidget(d,g,o))&&(a=this.$getMode(d.getState(o))),(!a||!a.getFoldWidget(d,g,o))&&(a=this.defaultMode),a.getFoldWidgetRange(d,g,o)}}).call(b.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(n,i,h){var p=n("../../lib/oop"),m=n("./mixed").FoldMode,b=n("./xml").FoldMode,d=n("./cstyle").FoldMode,g=i.FoldMode=function(o,a){m.call(this,new b(o,a),{"js-":new d,"css-":new d})};p.inherits(g,m)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(n,i,h){function p(c,f){return c.type.lastIndexOf(f+".xml")>-1}function m(c,f){for(var w=new d(c,f.row,f.column),x=w.getCurrentToken();x&&!p(x,"tag-name");)x=w.stepBackward();if(x)return x.value}function b(c,f){for(var w=new d(c,f.row,f.column),x=w.getCurrentToken();x&&!p(x,"attribute-name");)x=w.stepBackward();if(x)return x.value}var d=n("../token_iterator").TokenIterator,g=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],o=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],a=g.concat(o),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},l=Object.keys(u),s=function(){};(function(){this.getCompletions=function(c,f,w,x){var E=f.getTokenAt(w.row,w.column);if(!E)return[];if(p(E,"tag-name")||p(E,"tag-open")||p(E,"end-tag-open"))return this.getTagCompletions(c,f,w,x);if(p(E,"tag-whitespace")||p(E,"attribute-name"))return this.getAttributeCompletions(c,f,w,x);if(p(E,"attribute-value"))return this.getAttributeValueCompletions(c,f,w,x);var M=f.getLine(w.row).substr(0,w.column);return/&[a-z]*$/i.test(M)?this.getHTMLEntityCompletions(c,f,w,x):[]},this.getTagCompletions=function(c,f,w,x){return l.map(function(E){return{value:E,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(c,f,w,x){var E=m(f,w);if(!E)return[];var M=a;return E in u&&(M=M.concat(Object.keys(u[E]))),M.map(function(k){return{caption:k,snippet:k+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(c,f,w,x){var E=m(f,w),M=b(f,w);if(!E)return[];var k=[];return E in u&&M in u[E]&&typeof u[E][M]=="object"&&(k=Object.keys(u[E][M])),k.map(function(C){return{caption:C,snippet:C,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(c,f,w,x){var E=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return E.map(function(M){return{caption:M,snippet:M,meta:"html entity",score:1e6}})}}).call(s.prototype),i.HtmlCompletions=s}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(n,i,h){var p=n("../lib/oop"),m=n("../lib/lang"),b=n("./text").Mode,d=n("./javascript").Mode,g=n("./css").Mode,o=n("./html_highlight_rules").HtmlHighlightRules,a=n("./behaviour/xml").XmlBehaviour,u=n("./folding/html").FoldMode,l=n("./html_completions").HtmlCompletions,s=n("../worker/worker_client").WorkerClient,c=["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"],w=function(x){this.fragmentContext=x&&x.fragmentContext,this.HighlightRules=o,this.$behaviour=new a,this.$completer=new l,this.createModeDelegates({"js-":d,"css-":g}),this.foldingRules=new u(this.voidElements,m.arrayToMap(f))};p.inherits(w,b),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=m.arrayToMap(c),this.getNextLineIndent=function(x,E,M){return this.$getIndent(E)},this.checkOutdent=function(x,E,M){return!1},this.getCompletions=function(x,E,M,k){return this.$completer.getCompletions(x,E,M,k)},this.createWorker=function(x){if(this.constructor==w){var E=new s(["ace"],"ace/mode/html_worker","Worker");return E.attachToDocument(x.getDocument()),this.fragmentContext&&E.call("setOptions",[{context:this.fragmentContext}]),E.on("error",function(M){x.setAnnotations(M.data)}),E.on("terminate",function(){x.clearAnnotations()}),E}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(w.prototype),i.Mode=w}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,i,h){var p=n("../lib/oop"),m=n("./text_highlight_rules").TextHighlightRules,b=i.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",d=i.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",g=function(){var o=this.createKeywordMapper({keyword:b,"support.function.builtin":d,"invalid.deprecated":"debugger"},"identifier"),a="(?:(?:[1-9]\\d*)|(?:0))",u="(?:\\.\\d+)",l="(?:\\d+)",s="(?:(?:"+l+"?"+u+")|(?:"+l+"\\.))",c="(?:(?:"+s+"|"+l+"))",f="(?:"+c+"|"+s+")",w="(?:&"+l+")",x="[a-zA-Z_][a-zA-Z0-9_]*",E="(?:"+x+"(?==))",M="(?:\\$(?:SHLVL|\\$|\\!|\\?))",k="(?:"+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,L){var R=C[2]=="-"?"indentedHeredoc":"heredoc",I=C.split(this.splitRegex);return L.push(R,I[4]),[{type:"constant",value:I[1]},{type:"text",value:I[2]},{type:"string",value:I[3]},{type:"support.class",value:I[4]},{type:"string",value:I[5]}]},rules:{heredoc:[{onMatch:function(C,O,L){return C===L[1]?(L.shift(),L.shift(),this.next=L[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(C,O,L){return C===L[1]?(L.shift(),L.shift(),this.next=L[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(C,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:M},{token:"variable",regex:E},{include:"variables"},{token:"support.function",regex:k},{token:"support.function",regex:w},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:f},{token:"constant.numeric",regex:a+"\\b"},{token:o,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(g,m),i.ShHighlightRules=g}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(n,i,h){var p=n("../lib/oop"),m=n("./text").Mode,b=n("./sh_highlight_rules").ShHighlightRules,d=n("../range").Range,g=n("./folding/cstyle").FoldMode,o=function(){this.HighlightRules=b,this.foldingRules=new g,this.$behaviour=this.$defaultBehaviour};p.inherits(o,m),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,l,s){var c=this.$getIndent(l),f=this.getTokenizer().getLineTokens(l,u),w=f.tokens;if(w.length&&w[w.length-1].type=="comment")return c;if(u=="start"){var x=l.match(/^.*[\{\(\[:]\s*$/);x&&(c+=s)}return c};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,l,s){if(s!==`\r
992
+ `&&s!=="\r"&&s!==`
993
+ `)return!1;var c=this.getTokenizer().getLineTokens(l.trim(),u).tokens;if(!c)return!1;do var f=c.pop();while(f&&(f.type=="comment"||f.type=="text"&&f.value.match(/^\s+$/)));return f?f.type=="keyword"&&a[f.value]:!1},this.autoOutdent=function(u,l,s){s+=1;var c=this.$getIndent(l.getLine(s)),f=l.getTabString();c.slice(-f.length)==f&&l.remove(new d(s,c.length-f.length,s,c.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(o.prototype),i.Mode=o}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(n,i,h){var p=n("../lib/oop"),m=n("../lib/lang"),b=n("./text").Mode,d=n("./xml_highlight_rules").XmlHighlightRules,g=n("./behaviour/xml").XmlBehaviour,o=n("./folding/xml").FoldMode,a=n("../worker/worker_client").WorkerClient,u=function(){this.HighlightRules=d,this.$behaviour=new g,this.foldingRules=new o};p.inherits(u,b),(function(){this.voidElements=m.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(l){var s=new a(["ace"],"ace/mode/xml_worker","Worker");return s.attachToDocument(l.getDocument()),s.on("error",function(c){l.setAnnotations(c.data)}),s.on("terminate",function(){l.clearAnnotations()}),s},this.$id="ace/mode/xml"}).call(u.prototype),i.Mode=u}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(n,i,h){var p=n("../lib/oop"),m=n("./behaviour/cstyle").CstyleBehaviour,b=n("./text").Mode,d=n("./markdown_highlight_rules").MarkdownHighlightRules,g=n("./folding/markdown").FoldMode,o=function(){this.HighlightRules=d,this.createModeDelegates({javascript:n("./javascript").Mode,html:n("./html").Mode,bash:n("./sh").Mode,sh:n("./sh").Mode,xml:n("./xml").Mode,css:n("./css").Mode}),this.foldingRules=new g,this.$behaviour=new m({braces:!0})};p.inherits(o,b),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(a,u,l){if(a=="listblock"){var s=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(u);if(!s)return"";var c=s[2];return c||(c=parseInt(s[3],10)+1+"."),s[1]+c+s[4]}return this.$getIndent(u)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(o.prototype),i.Mode=o}),(function(){ace.require(["ace/mode/markdown"],function(n){t&&(t.exports=n)})})()})(Jp)),Jp.exports}nx();var tg={exports:{}},ng;function ix(){return ng||(ng=1,(function(t,e){ace.define("ace/theme/twilight-css",["require","exports","module"],function(n,i,h){h.exports=`.ace-twilight .ace_gutter {
994
+ background: #232323;
995
+ color: #E2E2E2
996
+ }
997
+
998
+ .ace-twilight .ace_print-margin {
999
+ width: 1px;
1000
+ background: #232323
1001
+ }
1002
+
1003
+ .ace-twilight {
1004
+ background-color: #141414;
1005
+ color: #F8F8F8
1006
+ }
1007
+
1008
+ .ace-twilight .ace_cursor {
1009
+ color: #A7A7A7
1010
+ }
1011
+
1012
+ .ace-twilight .ace_marker-layer .ace_selection {
1013
+ background: rgba(221, 240, 255, 0.20)
1014
+ }
1015
+
1016
+ .ace-twilight.ace_multiselect .ace_selection.ace_start {
1017
+ box-shadow: 0 0 3px 0px #141414;
1018
+ }
1019
+
1020
+ .ace-twilight .ace_marker-layer .ace_step {
1021
+ background: rgb(102, 82, 0)
1022
+ }
1023
+
1024
+ .ace-twilight .ace_marker-layer .ace_bracket {
1025
+ margin: -1px 0 0 -1px;
1026
+ border: 1px solid rgba(255, 255, 255, 0.25)
1027
+ }
1028
+
1029
+ .ace-twilight .ace_marker-layer .ace_active-line {
1030
+ background: rgba(255, 255, 255, 0.031)
1031
+ }
1032
+
1033
+ .ace-twilight .ace_gutter-active-line {
1034
+ background-color: rgba(255, 255, 255, 0.031)
1035
+ }
1036
+
1037
+ .ace-twilight .ace_marker-layer .ace_selected-word {
1038
+ border: 1px solid rgba(221, 240, 255, 0.20)
1039
+ }
1040
+
1041
+ .ace-twilight .ace_invisible {
1042
+ color: rgba(255, 255, 255, 0.25)
1043
+ }
1044
+
1045
+ .ace-twilight .ace_keyword,
1046
+ .ace-twilight .ace_meta {
1047
+ color: #CDA869
1048
+ }
1049
+
1050
+ .ace-twilight .ace_constant,
1051
+ .ace-twilight .ace_constant.ace_character,
1052
+ .ace-twilight .ace_constant.ace_character.ace_escape,
1053
+ .ace-twilight .ace_constant.ace_other,
1054
+ .ace-twilight .ace_heading,
1055
+ .ace-twilight .ace_markup.ace_heading,
1056
+ .ace-twilight .ace_support.ace_constant {
1057
+ color: #CF6A4C
1058
+ }
1059
+
1060
+ .ace-twilight .ace_invalid.ace_illegal {
1061
+ color: #F8F8F8;
1062
+ background-color: rgba(86, 45, 86, 0.75)
1063
+ }
1064
+
1065
+ .ace-twilight .ace_invalid.ace_deprecated {
1066
+ text-decoration: underline;
1067
+ font-style: italic;
1068
+ color: #D2A8A1
1069
+ }
1070
+
1071
+ .ace-twilight .ace_support {
1072
+ color: #9B859D
1073
+ }
1074
+
1075
+ .ace-twilight .ace_fold {
1076
+ background-color: #AC885B;
1077
+ border-color: #F8F8F8
1078
+ }
1079
+
1080
+ .ace-twilight .ace_support.ace_function {
1081
+ color: #DAD085
1082
+ }
1083
+
1084
+ .ace-twilight .ace_list,
1085
+ .ace-twilight .ace_markup.ace_list,
1086
+ .ace-twilight .ace_storage {
1087
+ color: #F9EE98
1088
+ }
1089
+
1090
+ .ace-twilight .ace_entity.ace_name.ace_function,
1091
+ .ace-twilight .ace_meta.ace_tag {
1092
+ color: #AC885B
1093
+ }
1094
+
1095
+ .ace-twilight .ace_string {
1096
+ color: #8F9D6A
1097
+ }
1098
+
1099
+ .ace-twilight .ace_string.ace_regexp {
1100
+ color: #E9C062
1101
+ }
1102
+
1103
+ .ace-twilight .ace_comment {
1104
+ font-style: italic;
1105
+ color: #5F5A60
1106
+ }
1107
+
1108
+ .ace-twilight .ace_variable {
1109
+ color: #7587A6
1110
+ }
1111
+
1112
+ .ace-twilight .ace_xml-pe {
1113
+ color: #494949
1114
+ }
1115
+
1116
+ .ace-twilight .ace_indent-guide {
1117
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
1118
+ }
1119
+
1120
+ .ace-twilight .ace_indent-guide-active {
1121
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
1122
+ }
1123
+ `}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(n,i,h){i.isDark=!0,i.cssClass="ace-twilight",i.cssText=n("./twilight-css");var p=n("../lib/dom");p.importCssString(i.cssText,i.cssClass,!1)}),(function(){ace.require(["ace/theme/twilight"],function(n){t&&(t.exports=n)})})()})(tg)),tg.exports}ix();var ig={exports:{}},rg;function rx(){return rg||(rg=1,(function(t,e){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(n,i,h){function p(C){var O=new Date().toLocaleString("en-us",C);return O.length==1?"0"+O:O}var m=n("./lib/dom"),b=n("./lib/oop"),d=n("./lib/event_emitter").EventEmitter,g=n("./lib/lang"),o=n("./range").Range,a=n("./range_list").RangeList,u=n("./keyboard/hash_handler").HashHandler,l=n("./tokenizer").Tokenizer,s=n("./clipboard"),c={CURRENT_WORD:function(C){return C.session.getTextRange(C.session.getWordRange())},SELECTION:function(C,O,L){var R=C.session.getTextRange();return L?R.replace(/\n\r?([ \t]*\S)/g,`
1124
+ `+L+"$1"):R},CURRENT_LINE:function(C){return C.session.getLine(C.getCursorPosition().row)},PREV_LINE:function(C){return C.session.getLine(C.getCursorPosition().row-1)},LINE_INDEX:function(C){return C.getCursorPosition().row},LINE_NUMBER:function(C){return C.getCursorPosition().row+1},SOFT_TABS:function(C){return C.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(C){return C.session.getTabSize()},CLIPBOARD:function(C){return s.getText&&s.getText()},FILENAME:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0]},FILENAME_BASE:function(C){return/[^/\\]*$/.exec(this.FILEPATH(C))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(C){return this.FILEPATH(C).replace(/[^/\\]*$/,"")},FILEPATH:function(C){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(C){var O=C.session.$mode||{};return O.blockComment&&O.blockComment.start||""},BLOCK_COMMENT_END:function(C){var O=C.session.$mode||{};return O.blockComment&&O.blockComment.end||""},LINE_COMMENT:function(C){var O=C.session.$mode||{};return O.lineCommentStart||""},CURRENT_YEAR: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"})};c.SELECTED_TEXT=c.SELECTION;var f=(function(){function C(){this.snippetMap={},this.snippetNameMap={},this.variables=c}return C.prototype.getTokenizer=function(){return C.$tokenizer||this.createTokenizer()},C.prototype.createTokenizer=function(){function O(I){return I=I.substr(1),/^\d+$/.test(I)?[{tabstopId:parseInt(I,10)}]:[{text:I}]}function L(I){return"(?:[^\\\\"+I+"]|\\\\.)"}var R={regex:"/("+L("/")+"+)/",onMatch:function(I,z,F){var N=F[0];return N.fmtString=!0,N.guard=I.slice(1,-1),N.flag="",""},next:"formatString"};return C.$tokenizer=new l({start:[{regex:/\\./,onMatch:function(I,z,F){var N=I[1];return(N=="}"&&F.length||"`$\\".indexOf(N)!=-1)&&(I=N),[I]}},{regex:/}/,onMatch:function(I,z,F){return[F.length?F.shift():I]}},{regex:/\$(?:\d+|\w+)/,onMatch:O},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(I,z,F){var N=O(I.substr(1));return F.unshift(N[0]),N},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+L("\\|")+"*\\|",onMatch:function(I,z,F){var N=I.slice(1,-1).replace(/\\[,|\\]|,/g,function(A){return A.length==2?A[1]:"\0"}).split("\0").map(function(A){return{value:A}});return F[0].choices=N,[N[0]]},next:"start"},R,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(I,z,F){return F.length&&F[0].expectElse?(F[0].expectElse=!1,F[0].ifEnd={elseEnd:F[0]},[F[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(I,z,F){var N=I[1];return N=="}"&&F.length||"`$\\".indexOf(N)!=-1?I=N:N=="n"?I=`
1125
+ `:N=="t"?I=" ":"ulULE".indexOf(N)!=-1&&(I={changeCase:N,local:N>"a"}),[I]}},{regex:"/\\w*}",onMatch:function(I,z,F){var N=F.shift();return N&&(N.flag=I.slice(1,-1)),this.next=N&&N.tabstopId?"start":"",[N||I]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(I,z,F){return[{text:I.slice(1)}]}},{regex:/\${\w+/,onMatch:function(I,z,F){var N={text:I.slice(2)};return F.unshift(N),[N]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(I,z,F){var N=F.shift();return this.next=N&&N.tabstopId?"start":"",[N||I]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(I,z,F){var N=F[0];return N.formatFunction=I.slice(2,-1),[F.shift()]},next:"formatString"},R,{regex:/:[\?\-+]?/,onMatch:function(I,z,F){I[1]=="+"&&(F[0].ifEnd=F[0]),I[1]=="?"&&(F[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),C.$tokenizer},C.prototype.tokenizeTmSnippet=function(O,L){return this.getTokenizer().getLineTokens(O,L).tokens.map(function(R){return R.value||R})},C.prototype.getVariableValue=function(O,L,R){if(/^\d+$/.test(L))return(this.variables.__||{})[L]||"";if(/^[A-Z]\d+$/.test(L))return(this.variables[L[0]+"__"]||{})[L.substr(1)]||"";if(L=L.replace(/^TM_/,""),!this.variables.hasOwnProperty(L))return"";var I=this.variables[L];return typeof I=="function"&&(I=this.variables[L](O,L,R)),I??""},C.prototype.tmStrFormat=function(O,L,R){if(!L.fmt)return O;var I=L.flag||"",z=L.guard;z=new RegExp(z,I.replace(/[^gim]/g,""));var F=typeof L.fmt=="string"?this.tokenizeTmSnippet(L.fmt,"formatString"):L.fmt,N=this,A=O.replace(z,function(){var S=N.variables.__;N.variables.__=[].slice.call(arguments);for(var D=N.resolveVariables(F,R),j="E",U=0;U<D.length;U++){var q=D[U];if(typeof q=="object")if(D[U]="",q.changeCase&&q.local){var Q=D[U+1];Q&&typeof Q=="string"&&(q.changeCase=="u"?D[U]=Q[0].toUpperCase():D[U]=Q[0].toLowerCase(),D[U+1]=Q.substr(1))}else q.changeCase&&(j=q.changeCase);else j=="U"?D[U]=q.toUpperCase():j=="L"&&(D[U]=q.toLowerCase())}return N.variables.__=S,D.join("")});return A},C.prototype.tmFormatFunction=function(O,L,R){return L.formatFunction=="upcase"?O.toUpperCase():L.formatFunction=="downcase"?O.toLowerCase():O},C.prototype.resolveVariables=function(O,L){function R(j){var U=O.indexOf(j,N+1);U!=-1&&(N=U)}for(var I=[],z="",F=!0,N=0;N<O.length;N++){var A=O[N];if(typeof A=="string"){I.push(A),A==`
1126
+ `?(F=!0,z=""):F&&(z=/^\t*/.exec(A)[0],F=/\S/.test(A));continue}if(A){if(F=!1,A.fmtString){var S=O.indexOf(A,N+1);S==-1&&(S=O.length),A.fmt=O.slice(N+1,S),N=S}if(A.text){var D=this.getVariableValue(L,A.text,z)+"";A.fmtString&&(D=this.tmStrFormat(D,A,L)),A.formatFunction&&(D=this.tmFormatFunction(D,A,L)),D&&!A.ifEnd?(I.push(D),R(A)):!D&&A.ifEnd&&R(A.ifEnd)}else A.elseEnd?R(A.elseEnd):(A.tabstopId!=null||A.changeCase!=null)&&I.push(A)}}return I},C.prototype.getDisplayTextForSnippet=function(O,L){var R=w.call(this,O,L);return R.text},C.prototype.insertSnippetForSelection=function(O,L,R){R===void 0&&(R={});var I=w.call(this,O,L,R),z=O.getSelectionRange(),F=O.session.replace(z,I.text),N=new x(O),A=O.inVirtualSelectionMode&&O.selection.index;N.addTabstops(I.tabstops,z.start,F,A)},C.prototype.insertSnippet=function(O,L,R){R===void 0&&(R={});var I=this;if(O.inVirtualSelectionMode)return I.insertSnippetForSelection(O,L,R);O.forEachSelection(function(){I.insertSnippetForSelection(O,L,R)},null,{keepOrder:!0}),O.tabstopManager&&O.tabstopManager.tabNext()},C.prototype.$getScope=function(O){var L=O.session.$mode.$id||"";if(L=L.split("/").pop(),L==="html"||L==="php"){L==="php"&&!O.session.$mode.inlinePhp&&(L="html");var R=O.getCursorPosition(),I=O.session.getState(R.row);typeof I=="object"&&(I=I[0]),I.substring&&(I.substring(0,3)=="js-"?L="javascript":I.substring(0,4)=="css-"?L="css":I.substring(0,4)=="php-"&&(L="php"))}return L},C.prototype.getActiveScopes=function(O){var L=this.$getScope(O),R=[L],I=this.snippetMap;return I[L]&&I[L].includeScopes&&R.push.apply(R,I[L].includeScopes),R.push("_"),R},C.prototype.expandWithTab=function(O,L){var R=this,I=O.forEachSelection(function(){return R.expandSnippetForSelection(O,L)},null,{keepOrder:!0});return I&&O.tabstopManager&&O.tabstopManager.tabNext(),I},C.prototype.expandSnippetForSelection=function(O,L){var R=O.getCursorPosition(),I=O.session.getLine(R.row),z=I.substring(0,R.column),F=I.substr(R.column),N=this.snippetMap,A;return this.getActiveScopes(O).some(function(S){var D=N[S];return D&&(A=this.findMatchingSnippet(D,z,F)),!!A},this),A?(L&&L.dryRun||(O.session.doc.removeInLine(R.row,R.column-A.replaceBefore.length,R.column+A.replaceAfter.length),this.variables.M__=A.matchBefore,this.variables.T__=A.matchAfter,this.insertSnippetForSelection(O,A.content),this.variables.M__=this.variables.T__=null),!0):!1},C.prototype.findMatchingSnippet=function(O,L,R){for(var I=O.length;I--;){var z=O[I];if(!(z.startRe&&!z.startRe.test(L))&&!(z.endRe&&!z.endRe.test(R))&&!(!z.startRe&&!z.endRe))return z.matchBefore=z.startRe?z.startRe.exec(L):[""],z.matchAfter=z.endRe?z.endRe.exec(R):[""],z.replaceBefore=z.triggerRe?z.triggerRe.exec(L)[0]:"",z.replaceAfter=z.endTriggerRe?z.endTriggerRe.exec(R)[0]:"",z}},C.prototype.register=function(O,L){function R(S){return S&&!/^\^?\(.*\)\$?$|^\\b$/.test(S)&&(S="(?:"+S+")"),S||""}function I(S,D,j){return S=R(S),D=R(D),S=D+S,S&&S[S.length-1]!="$"&&(S+="$"),new RegExp(S)}function z(S){S.scope||(S.scope=L||"_"),L=S.scope,F[L]||(F[L]=[],N[L]={});var D=N[L];if(S.name){var j=D[S.name];j&&A.unregister(j),D[S.name]=S}F[L].push(S),S.prefix&&(S.tabTrigger=S.prefix),!S.content&&S.body&&(S.content=Array.isArray(S.body)?S.body.join(`
1127
+ `):S.body),S.tabTrigger&&!S.trigger&&(!S.guard&&/^\w/.test(S.tabTrigger)&&(S.guard="\\b"),S.trigger=g.escapeRegExp(S.tabTrigger)),!(!S.trigger&&!S.guard&&!S.endTrigger&&!S.endGuard)&&(S.startRe=I(S.trigger,S.guard),S.triggerRe=new RegExp(S.trigger),S.endRe=I(S.endTrigger,S.endGuard),S.endTriggerRe=new RegExp(S.endTrigger))}var F=this.snippetMap,N=this.snippetNameMap,A=this;O||(O=[]),Array.isArray(O)?O.forEach(z):Object.keys(O).forEach(function(S){z(O[S])}),this._signal("registerSnippets",{scope:L})},C.prototype.unregister=function(O,L){function R(F){var N=z[F.scope||L];if(N&&N[F.name]){delete N[F.name];var A=I[F.scope||L],S=A&&A.indexOf(F);S>=0&&A.splice(S,1)}}var I=this.snippetMap,z=this.snippetNameMap;O.content?R(O):Array.isArray(O)&&O.forEach(R)},C.prototype.parseSnippetFile=function(O){O=O.replace(/\r/g,"");for(var L=[],R={},I=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,z;z=I.exec(O);){if(z[1])try{R=JSON.parse(z[1]),L.push(R)}catch{}if(z[4])R.content=z[4].replace(/^\t/gm,""),L.push(R),R={};else{var F=z[2],N=z[3];if(F=="regex"){var A=/\/((?:[^\/\\]|\\.)*)|$/g;R.guard=A.exec(N)[1],R.trigger=A.exec(N)[1],R.endTrigger=A.exec(N)[1],R.endGuard=A.exec(N)[1]}else F=="snippet"?(R.tabTrigger=N.match(/^\S*/)[0],R.name||(R.name=N)):F&&(R[F]=N)}}return L},C.prototype.getSnippetByName=function(O,L){var R=this.snippetNameMap,I;return this.getActiveScopes(L).some(function(z){var F=R[z];return F&&(I=F[O]),!!I},this),I},C})();b.implement(f.prototype,d);var w=function(C,O,L){function R(ue){for(var ve=[],Me=0;Me<ue.length;Me++){var Te=ue[Me];if(typeof Te=="object"){if(D[Te.tabstopId])continue;var Ee=ue.lastIndexOf(Te,Me-1);Te=ve[Ee]||{tabstopId:Te.tabstopId}}ve[Me]=Te}return ve}L===void 0&&(L={});var I=C.getCursorPosition(),z=C.session.getLine(I.row),F=C.session.getTabString(),N=z.match(/^\s*/)[0];I.column<N.length&&(N=N.slice(0,I.column)),O=O.replace(/\r/g,"");var A=this.tokenizeTmSnippet(O);A=this.resolveVariables(A,C),A=A.map(function(ue){return ue==`
1128
+ `&&!L.excludeExtraIndent?ue+N:typeof ue=="string"?ue.replace(/\t/g,F):ue});var S=[];A.forEach(function(ue,ve){if(typeof ue=="object"){var Me=ue.tabstopId,Te=S[Me];if(Te||(Te=S[Me]=[],Te.index=Me,Te.value="",Te.parents={}),Te.indexOf(ue)===-1){ue.choices&&!Te.choices&&(Te.choices=ue.choices),Te.push(ue);var Ee=A.indexOf(ue,ve+1);if(Ee!==-1){var Je=A.slice(ve+1,Ee),Xe=Je.some(function(ft){return typeof ft=="object"});Xe&&!Te.value?Te.value=Je:Je.length&&(!Te.value||typeof Te.value!="string")&&(Te.value=Je.join(""))}}}}),S.forEach(function(ue){ue.length=0});for(var D={},j=0;j<A.length;j++){var U=A[j];if(typeof U=="object"){var q=U.tabstopId,Q=S[q],te=A.indexOf(U,j+1);if(D[q]){D[q]===U&&(delete D[q],Object.keys(D).forEach(function(ue){Q.parents[ue]=!0}));continue}D[q]=U;var de=Q.value;typeof de!="string"?de=R(de):U.fmt&&(de=this.tmStrFormat(de,U,C)),A.splice.apply(A,[j+1,Math.max(0,te-j)].concat(de,U)),Q.indexOf(U)===-1&&Q.push(U)}}var ne=0,ce=0,he="";return A.forEach(function(ue){if(typeof ue=="string"){var ve=ue.split(`
1129
+ `);ve.length>1?(ce=ve[ve.length-1].length,ne+=ve.length-1):ce+=ue.length,he+=ue}else ue&&(ue.start?ue.end={row:ne,column:ce}:ue.start={row:ne,column:ce})}),{text:he,tabstops:S,tokens:A}},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=g.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 L=O.action[0]=="r",R=this.selectedTabstop||{},I=R.parents||{},z=this.tabstops.slice(),F=0;F<z.length;F++){var N=z[F],A=N==R||I[N.index];if(N.rangeList.$bias=A?0:1,O.action=="remove"&&N!==R){var S=N.parents&&N.parents[R.index],D=N.rangeList.pointIndex(O.start,S);D=D<0?-D-1:D+1;var j=N.rangeList.pointIndex(O.end,S);j=j<0?-j-1:j-1;for(var U=N.rangeList.ranges.slice(D,j),q=0;q<U.length;q++)this.removeRange(U[q])}N.rangeList.$onChange(O)}var Q=this.session;!this.$inChange&&L&&Q.getLength()==1&&!Q.getValue()&&this.detach()},C.prototype.updateLinkedFields=function(){var O=this.selectedTabstop;if(!(!O||!O.hasLinkedRanges||!O.firstNonLinked)){this.$inChange=!0;for(var L=this.session,R=L.getTextRange(O.firstNonLinked),I=0;I<O.length;I++){var z=O[I];if(z.linked){var F=z.original,N=i.snippetManager.tmStrFormat(R,F,this.editor);L.replace(z,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,L=this.editor.selection.anchor,R=this.editor.selection.isEmpty(),I=0;I<this.ranges.length;I++)if(!this.ranges[I].linked){var z=this.ranges[I].contains(O.row,O.column),F=R||this.ranges[I].contains(L.row,L.column);if(z&&F)return}this.detach()}},C.prototype.onChangeSession=function(){this.detach()},C.prototype.tabNext=function(O){var L=this.tabstops.length,R=this.index+(O||1);R=Math.min(Math.max(R,1),L),R==L&&(R=0),this.selectTabstop(R),this.updateTabstopMarkers(),R===0&&this.detach()},C.prototype.selectTabstop=function(O){this.$openTabstops=null;var L=this.tabstops[this.index];if(L&&this.addTabstopMarkers(L),this.index=O,L=this.tabstops[this.index],!(!L||!L.length)){this.selectedTabstop=L;var R=L.firstNonLinked||L;if(L.choices&&(R.cursor=R.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(R);else{var I=this.editor.multiSelect;I.toSingleRange(R);for(var z=0;z<L.length;z++)L.hasLinkedRanges&&L[z].linked||I.addRange(L[z].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},C.prototype.addTabstops=function(O,L,R){var I=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!O[0]){var z=o.fromPoints(R,R);M(z.start,L),M(z.end,L),O[0]=[z],O[0].index=0}var F=this.index,N=[F+1,0],A=this.ranges,S=this.snippetId=(this.snippetId||0)+1;O.forEach(function(D,j){var U=this.$openTabstops[j]||D;U.snippetId=S;for(var q=0;q<D.length;q++){var Q=D[q],te=o.fromPoints(Q.start,Q.end||Q.start);E(te.start,L),E(te.end,L),te.original=Q,te.tabstop=U,A.push(te),U!=D?U.unshift(te):U[q]=te,Q.fmtString||U.firstNonLinked&&I?(te.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=te)}U.firstNonLinked||(U.hasLinkedRanges=!1),U===D&&(N.push(U),this.$openTabstops[j]=U),this.addTabstopMarkers(U),U.rangeList=U.rangeList||new a,U.rangeList.$bias=0,U.rangeList.addList(U)},this),N.length>2&&(this.tabstops.length&&N.push(N.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,N))},C.prototype.addTabstopMarkers=function(O){var L=this.session;O.forEach(function(R){R.markerId||(R.markerId=L.addMarker(R,"ace_snippet-marker","text"))})},C.prototype.removeTabstopMarkers=function(O){var L=this.session;O.forEach(function(R){L.removeMarker(R.markerId),R.markerId=null})},C.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var O=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&O--,this.tabstops.forEach(function(L){L.snippetId===O?this.addTabstopMarkers(L):this.removeTabstopMarkers(L)},this)}},C.prototype.removeRange=function(O){var L=O.tabstop.indexOf(O);L!=-1&&O.tabstop.splice(L,1),L=this.ranges.indexOf(O),L!=-1&&this.ranges.splice(L,1),L=O.tabstop.rangeList.ranges.indexOf(O),L!=-1&&O.tabstop.splice(L,1),this.session.removeMarker(O.markerId),O.tabstop.length||(L=this.tabstops.indexOf(O.tabstop),L!=-1&&this.tabstops.splice(L,1),this.tabstops.length||this.detach())},C})();x.prototype.keyboardHandler=new u,x.prototype.keyboardHandler.bindKeys({Tab:function(C){i.snippetManager&&i.snippetManager.expandWithTab(C)||(C.tabstopManager.tabNext(1),C.renderer.scrollCursorIntoView())},"Shift-Tab":function(C){C.tabstopManager.tabNext(-1),C.renderer.scrollCursorIntoView()},Esc:function(C){C.tabstopManager.detach()}});var E=function(C,O){C.row==0&&(C.column+=O.column),C.row+=O.row},M=function(C,O){C.row==O.row&&(C.column-=O.column),C.row-=O.row};m.importCssString(`
1130
+ .ace_snippet-marker {
1131
+ -moz-box-sizing: border-box;
1132
+ box-sizing: border-box;
1133
+ background: rgba(194, 193, 208, 0.09);
1134
+ border: 1px dotted rgba(211, 208, 235, 0.62);
1135
+ position: absolute;
1136
+ }`,"snippets.css",!1),i.snippetManager=new f;var k=n("./editor").Editor;(function(){this.insertSnippet=function(C,O){return i.snippetManager.insertSnippet(this,C,O)},this.expandSnippet=function(C){return i.snippetManager.expandWithTab(this,C)}}).call(k.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(n,i,h){var p=n("../virtual_renderer").VirtualRenderer,m=n("../editor").Editor,b=n("../range").Range,d=n("../lib/event"),g=n("../lib/lang"),o=n("../lib/dom"),a=n("../config").nls,u=n("./../lib/useragent"),l=function(E){return"suggest-aria-id:".concat(E)},s=u.isSafari?"menu":"listbox",c=u.isSafari?"menuitem":"option",f=u.isSafari?"aria-current":"aria-selected",w=function(E){var M=new p(E);M.$maxLines=4;var k=new m(M);return k.setHighlightActiveLine(!1),k.setShowPrintMargin(!1),k.renderer.setShowGutter(!1),k.renderer.setHighlightGutterLine(!1),k.$mouseHandler.$focusTimeout=0,k.$highlightTagPending=!0,k},x=(function(){function E(M){var k=o.createElement("div"),C=w(k);M&&M.appendChild(k),k.style.display="none",C.renderer.content.style.cursor="default",C.renderer.setStyle("ace_autocomplete"),C.renderer.$textLayer.element.setAttribute("role",s),C.renderer.$textLayer.element.setAttribute("aria-roledescription",a("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),C.renderer.$textLayer.element.setAttribute("aria-label",a("autocomplete.popup.aria-label","Autocomplete suggestions")),C.renderer.textarea.setAttribute("aria-hidden","true"),C.setOption("displayIndentGuides",!1),C.setOption("dragDelay",150);var O=function(){};C.focus=O,C.$isFocused=!0,C.renderer.$cursorLayer.restartTimer=O,C.renderer.$cursorLayer.element.style.opacity="0",C.renderer.$maxLines=8,C.renderer.$keepTextAreaAtCursor=!1,C.setHighlightActiveLine(!1),C.session.highlight(""),C.session.$searchHighlight.clazz="ace_highlight-marker",C.on("mousedown",function(A){var S=A.getDocumentPosition();C.selection.moveToPosition(S),I.start.row=I.end.row=S.row,A.stop()});var L,R=new b(-1,0,-1,1/0),I=new b(-1,0,-1,1/0);I.id=C.session.addMarker(I,"ace_active-line","fullLine"),C.setSelectOnHover=function(A){A?R.id&&(C.session.removeMarker(R.id),R.id=null):R.id=C.session.addMarker(R,"ace_line-hover","fullLine")},C.setSelectOnHover(!1),C.on("mousemove",function(A){if(!L){L=A;return}if(!(L.x==A.x&&L.y==A.y)){L=A,L.scrollTop=C.renderer.scrollTop,C.isMouseOver=!0;var S=L.getDocumentPosition().row;R.start.row!=S&&(R.id||C.setRow(S),F(S))}}),C.renderer.on("beforeRender",function(){if(L&&R.start.row!=-1){L.$pos=null;var A=L.getDocumentPosition().row;R.id||C.setRow(A),F(A,!0)}}),C.renderer.on("afterRender",function(){for(var A=C.renderer.$textLayer,S=A.config.firstRow,D=A.config.lastRow;S<=D;S++){var j=A.element.childNodes[S-A.config.firstRow];j.setAttribute("role",c),j.setAttribute("aria-roledescription",a("autocomplete.popup.item.aria-roledescription","item")),j.setAttribute("aria-setsize",C.data.length),j.setAttribute("aria-describedby","doc-tooltip"),j.setAttribute("aria-posinset",S+1);var U=C.getData(S);if(U){var q="".concat(U.caption||U.value).concat(U.meta?", ".concat(U.meta):"");j.setAttribute("aria-label",q)}var Q=j.querySelectorAll(".ace_completion-highlight");Q.forEach(function(te){te.setAttribute("role","mark")})}}),C.renderer.on("afterRender",function(){var A=C.getRow(),S=C.renderer.$textLayer,D=S.element.childNodes[A-S.config.firstRow],j=document.activeElement;if(D!==C.selectedNode&&C.selectedNode&&(o.removeCssClass(C.selectedNode,"ace_selected"),C.selectedNode.removeAttribute(f),C.selectedNode.removeAttribute("id")),j.removeAttribute("aria-activedescendant"),C.selectedNode=D,D){var U=l(A);o.addCssClass(D,"ace_selected"),D.id=U,S.element.setAttribute("aria-activedescendant",U),j.setAttribute("aria-activedescendant",U),D.setAttribute(f,"true")}});var z=function(){F(-1)},F=function(A,S){A!==R.start.row&&(R.start.row=R.end.row=A,S||C.session._emit("changeBackMarker"),C._emit("changeHoverMarker"))};C.getHoveredRow=function(){return R.start.row},d.addListener(C.container,"mouseout",function(){C.isMouseOver=!1,z()}),C.on("hide",z),C.on("changeSelection",z),C.session.doc.getLength=function(){return C.data.length},C.session.doc.getLine=function(A){var S=C.data[A];return typeof S=="string"?S:S&&S.value||""};var N=C.session.bgTokenizer;return N.$tokenizeRow=function(A){function S(ue,ve){ue&&j.push({type:(D.className||"")+(ve||""),value:ue})}var D=C.data[A],j=[];if(!D)return j;typeof D=="string"&&(D={value:D});for(var U=D.caption||D.value||D.name,q=U.toLowerCase(),Q=(C.filterText||"").toLowerCase(),te=0,de=0,ne=0;ne<=Q.length;ne++)if(ne!=de&&(D.matchMask&1<<ne||ne==Q.length)){var ce=Q.slice(de,ne);de=ne;var he=q.indexOf(ce,te);if(he==-1)continue;S(U.slice(te,he),""),te=he+ce.length,S(U.slice(he,te),"completion-highlight")}return S(U.slice(te,U.length),""),j.push({type:"completion-spacer",value:" "}),D.meta&&j.push({type:"completion-meta",value:D.meta}),D.message&&j.push({type:"completion-message",value:D.message}),j},N.$updateOnChange=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(A,S){C.filterText=S||"",C.setValue(g.stringRepeat(`
1137
+ `,A.length),-1),C.data=A||[],C.setRow(0)},C.getData=function(A){return C.data[A]},C.getRow=function(){return I.start.row},C.setRow=function(A){A=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,A)),I.start.row!=A&&(C.selection.clearSelection(),I.start.row=I.end.row=A||0,C.session._emit("changeBackMarker"),C.moveCursorTo(A||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(A,S,D,j){if(!j&&C.isOpen&&C.anchorPos&&C.anchor&&C.anchorPos.top===A.top&&C.anchorPos.left===A.left&&C.anchor===D)return!0;var U=this.container,q=this.renderer.scrollBar.width||10,Q=window.innerHeight-q,te=window.innerWidth-q,de=this.renderer,ne=de.$maxLines*S*1.4,ce={top:0,bottom:0},he=Q-A.top-3*this.$borderSize-S,ue=A.top-3*this.$borderSize;D||(ue<=he||he>=ne?D="bottom":D="top"),D==="top"?(ce.bottom=A.top-this.$borderSize,ce.top=ce.bottom-ne):D==="bottom"&&(ce.top=A.top+S+this.$borderSize,ce.bottom=ce.top+ne);var ve=ce.top>=0&&ce.bottom<=Q;if(!j&&!ve)return!1;ve?de.$maxPixelHeight=null:D==="top"?de.$maxPixelHeight=ue:de.$maxPixelHeight=he,U.style.display="";var Me=U.offsetParent&&U.offsetParent.getBoundingClientRect();D==="top"?(U.style.top="",U.style.bottom=Q+q-ce.bottom-(Me?Q+q-Me.bottom:0)+"px",C.isTopdown=!1):(U.style.top=ce.top-(Me?Me.top:0)+"px",U.style.bottom="",C.isTopdown=!0);var Te=A.left;return Te+U.offsetWidth>te&&(Te=te-U.offsetWidth),U.style.left=Te-(Me?Me.left:0)+"px",U.style.right="",C.isOpen||(C.isOpen=!0,this._signal("show"),L=null),C.anchorPos=A,C.anchor=D,!0},C.show=function(A,S,D){this.tryShow(A,S,D?"bottom":void 0,!0)},C.goTo=function(A){var S=this.getRow(),D=this.session.getLength()-1;switch(A){case"up":S=S<=0?D:S-1;break;case"down":S=S>=D?-1:S+1;break;case"start":S=0;break;case"end":S=D}this.setRow(S)},C.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},C.$imageSize=0,C.$borderSize=1,C}return E})();o.importCssString(`
1138
+ .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1139
+ background-color: #CAD6FA;
1140
+ z-index: 1;
1141
+ }
1142
+ .ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1143
+ background-color: #3a674e;
1144
+ }
1145
+ .ace_editor.ace_autocomplete .ace_line-hover {
1146
+ border: 1px solid #abbffe;
1147
+ margin-top: -1px;
1148
+ background: rgba(233,233,253,0.4);
1149
+ position: absolute;
1150
+ z-index: 2;
1151
+ }
1152
+ .ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
1153
+ border: 1px solid rgba(109, 150, 13, 0.8);
1154
+ background: rgba(58, 103, 78, 0.62);
1155
+ }
1156
+ .ace_completion-meta {
1157
+ opacity: 0.5;
1158
+ margin-left: 0.9em;
1159
+ }
1160
+ .ace_completion-message {
1161
+ margin-left: 0.9em;
1162
+ color: blue;
1163
+ }
1164
+ .ace_editor.ace_autocomplete .ace_completion-highlight{
1165
+ color: #2d69c7;
1166
+ }
1167
+ .ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
1168
+ color: #93ca12;
1169
+ }
1170
+ .ace_editor.ace_autocomplete {
1171
+ width: 300px;
1172
+ z-index: 200000;
1173
+ border: 1px lightgray solid;
1174
+ position: absolute;
1175
+ box-shadow: 2px 3px 5px rgba(0,0,0,.2);
1176
+ line-height: 1.4;
1177
+ background: #fefefe;
1178
+ color: #111;
1179
+ }
1180
+ .ace_dark.ace_editor.ace_autocomplete {
1181
+ border: 1px #484747 solid;
1182
+ box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
1183
+ line-height: 1.4;
1184
+ background: #25282c;
1185
+ color: #c1c1c1;
1186
+ }
1187
+ .ace_autocomplete .ace_text-layer {
1188
+ width: calc(100% - 8px);
1189
+ }
1190
+ .ace_autocomplete .ace_line {
1191
+ display: flex;
1192
+ align-items: center;
1193
+ }
1194
+ .ace_autocomplete .ace_line > * {
1195
+ min-width: 0;
1196
+ flex: 0 0 auto;
1197
+ }
1198
+ .ace_autocomplete .ace_line .ace_ {
1199
+ flex: 0 1 auto;
1200
+ overflow: hidden;
1201
+ text-overflow: ellipsis;
1202
+ }
1203
+ .ace_autocomplete .ace_completion-spacer {
1204
+ flex: 1;
1205
+ }
1206
+ .ace_autocomplete.ace_loading:after {
1207
+ content: "";
1208
+ position: absolute;
1209
+ top: 0px;
1210
+ height: 2px;
1211
+ width: 8%;
1212
+ background: blue;
1213
+ z-index: 100;
1214
+ animation: ace_progress 3s infinite linear;
1215
+ animation-delay: 300ms;
1216
+ transform: translateX(-100%) scaleX(1);
1217
+ }
1218
+ @keyframes ace_progress {
1219
+ 0% { transform: translateX(-100%) scaleX(1) }
1220
+ 50% { transform: translateX(625%) scaleX(2) }
1221
+ 100% { transform: translateX(1500%) scaleX(3) }
1222
+ }
1223
+ @media (prefers-reduced-motion) {
1224
+ .ace_autocomplete.ace_loading:after {
1225
+ transform: translateX(625%) scaleX(2);
1226
+ animation: none;
1227
+ }
1228
+ }
1229
+ `,"autocompletion.css",!1),i.AcePopup=x,i.$singleLineEditor=w,i.getAriaId=l}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(n,i,h){var p=(function(){function m(b){this.editor=b,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return m.prototype.setScreenReaderContent=function(b){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var g=this.popup.getRow(),o=this.popup.renderer.$textLayer,a=o.element.childNodes[g-o.config.firstRow];if(a){for(var u="doc-tooltip ",l=0;l<this._lines.length;l++)u+="ace-inline-screenreader-line-".concat(l," ");a.setAttribute("aria-describedby",u)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=b.split(/\r\n|\r|\n/);var d=this.createCodeBlock();this.screenReaderDiv.appendChild(d)},m.prototype.destroy=function(){this.screenReaderDiv.remove()},m.prototype.createCodeBlock=function(){var b=document.createElement("pre");b.setAttribute("id","ace-inline-screenreader");for(var d=0;d<this._lines.length;d++){var g=document.createElement("code");g.setAttribute("id","ace-inline-screenreader-line-".concat(d));var o=document.createTextNode(this._lines[d]);g.appendChild(o),b.appendChild(g)}return b},m})();i.AceInlineScreenReader=p}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(n,i,h){var p=n("../snippets").snippetManager,m=n("./inline_screenreader").AceInlineScreenReader,b=(function(){function d(){this.editor=null}return d.prototype.show=function(g,o,a){if(a=a||"",g&&this.editor&&this.editor!==g&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!g||!o)return!1;this.inlineScreenReader||(this.inlineScreenReader=new m(g));var u=o.snippet?p.getDisplayTextForSnippet(g,o.snippet):o.value;return o.hideInlinePreview||!u||!u.startsWith(a)?!1:(this.editor=g,this.inlineScreenReader.setScreenReaderContent(u),u=u.slice(a.length),u===""?g.removeGhostText():g.setGhostText(u),!0)},d.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},d.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},d.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},d})();i.AceInline=b}),ace.define("ace/autocomplete/util",["require","exports","module"],function(n,i,h){i.parForEach=function(m,b,d){var g=0,o=m.length;o===0&&d();for(var a=0;a<o;a++)b(m[a],function(u,l){g++,g===o&&d(u,l)})};var p=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;i.retrievePrecedingIdentifier=function(m,b,d){d=d||p;for(var g=[],o=b-1;o>=0&&d.test(m[o]);o--)g.push(m[o]);return g.reverse().join("")},i.retrieveFollowingIdentifier=function(m,b,d){d=d||p;for(var g=[],o=b;o<m.length&&d.test(m[o]);o++)g.push(m[o]);return g},i.getCompletionPrefix=function(m){var b=m.getCursorPosition(),d=m.session.getLine(b.row),g;return m.completers.forEach((function(o){o.identifierRegexps&&o.identifierRegexps.forEach((function(a){!g&&a&&(g=this.retrievePrecedingIdentifier(d,b.column,a))}).bind(this))}).bind(this)),g||this.retrievePrecedingIdentifier(d,b.column)},i.triggerAutocomplete=function(m,d){var d=d??m.session.getPrecedingCharacter();return m.completers.some(function(g){if(g.triggerCharacters&&Array.isArray(g.triggerCharacters))return g.triggerCharacters.includes(d)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function(n,i,h){var p=n("./keyboard/hash_handler").HashHandler,m=n("./autocomplete/popup").AcePopup,b=n("./autocomplete/inline").AceInline,d=n("./autocomplete/popup").getAriaId,g=n("./autocomplete/util"),o=n("./lib/lang"),a=n("./lib/dom"),u=n("./snippets").snippetManager,l=n("./config"),s=n("./lib/event"),c=n("./lib/scroll").preventParentScroll,f=function(M,k){k.completer&&k.completer.destroy()},w=(function(){function M(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new 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=o.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=o.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=o.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=o.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=o.delayedCall((function(){var k=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!k||this.editor.completers.length===0||(this.completions=new E(M.completionsForLoading),this.openPopup(this.editor,k.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty(M,"completionsForLoading",{get:function(){return[{caption:l.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),M.prototype.$init=function(){return this.popup=new m(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(k){this.insertMatch(),k.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),s.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},M.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new b,this.inlineRenderer},M.prototype.getPopup=function(){return this.popup||this.$init()},M.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},M.prototype.$seen=function(k){!this.hasSeen.has(k)&&k&&k.completer&&k.completer.onSeen&&typeof k.completer.onSeen=="function"&&(k.completer.onSeen(this.editor,k),this.hasSeen.add(k))},M.prototype.$onPopupChange=function(k){if(this.inlineRenderer&&this.inlineEnabled){var C=k?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(C),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},M.prototype.$updateGhostText=function(k){var C=this.base.row,O=this.base.column,L=this.editor.getCursorPosition().column,R=this.editor.session.getLine(C).slice(O,L);this.inlineRenderer.show(this.editor,k,R)?this.$seen(k):this.inlineRenderer.hide()},M.prototype.$onPopupRender=function(){var k=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var C=this.popup.getFirstVisibleRow();C<=this.popup.getLastVisibleRow();C++){var O=this.popup.getData(C);O&&(!k||O.hideInlinePreview)&&this.$seen(O)}},M.prototype.$onPopupShow=function(k){this.$onPopupChange(k),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},M.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var k=this.editor.container.parentNode,C=[];k;)C.push(k),k.addEventListener("scroll",this.onLayoutChange,{passive:!0}),k=k.parentNode;this.$elements=C}},M.prototype.unObserveLayoutChanges=function(){var k=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(C){C.removeEventListener("scroll",k.onLayoutChange,{passive:!0})}),this.$elements=null},M.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},M.prototype.$updatePopupPosition=function(){var k=this.editor,C=k.renderer,O=C.layerConfig.lineHeight,L=C.$cursorLayer.getPixelPosition(this.base,!0);L.left-=this.popup.getTextLeftOffset();var R=k.container.getBoundingClientRect();L.top+=R.top-C.layerConfig.offset,L.left+=R.left-k.renderer.scrollLeft,L.left+=C.gutterWidth;var I={top:L.top,left:L.left};C.$ghostText&&C.$ghostTextWidget&&this.base.row===C.$ghostText.position.row&&(I.top+=C.$ghostTextWidget.el.offsetHeight);var z=k.container.getBoundingClientRect().bottom-O,F=z<I.top?{top:z,left:I.left}:I;this.popup.tryShow(F,O,"bottom")||this.popup.tryShow(L,O,"top")||this.popup.show(L,O)},M.prototype.openPopup=function(k,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 L=this.popup.getRow(),R=this.popup.data[L];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:d(this.popup.getRow()),inline:this.inlineEnabled}),k.keyBinding.addKeyboardHandler(this.keyboardHandler);var I;this.stickySelection&&(I=this.popup.data.indexOf(R)),(!I||I===-1)&&(I=0),this.popup.setRow(this.autoSelect?I:-1),I===L&&R!==this.completions.filtered[I]&&this.$onPopupChange();var z=this.inlineRenderer&&this.inlineEnabled;if(I===L&&z){var F=this.popup.getData(this.popup.getRow());this.$updateGhostText(F)}O||(this.popup.setTheme(k.getTheme()),this.popup.setFontSize(k.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},M.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},M.prototype.changeListener=function(k){var C=this.editor.selection.lead;(C.row!=this.base.row||C.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},M.prototype.blurListener=function(k){var C=document.activeElement,O=this.editor.textInput.getElement(),L=k.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(k.relatedTarget),R=this.popup&&this.popup.container;C!=O&&C.parentNode!=R&&!L&&C!=this.tooltipNode&&k.relatedTarget!=O&&this.detach()},M.prototype.mousedownListener=function(k){this.detach()},M.prototype.mousewheelListener=function(k){this.popup&&!this.popup.isMouseOver&&this.detach()},M.prototype.mouseOutListener=function(k){this.popup.isOpen&&this.$updatePopupPosition()},M.prototype.goTo=function(k){this.popup.goTo(k)},M.prototype.insertMatch=function(k,C){if(k||(k=this.popup.getData(this.popup.getRow())),!k)return!1;if(k.value==="")return this.detach();var O=this.completions,L=this.getCompletionProvider().insertMatch(this.editor,k,O.filterText,C);return this.completions==O&&this.detach(),L},M.prototype.showPopup=function(k,C){this.editor&&this.detach(),this.activated=!0,this.editor=k,k.completer!=this&&(k.completer&&k.completer.detach(),k.completer=this),k.on("changeSelection",this.changeListener),k.on("blur",this.blurListener),k.on("mousedown",this.mousedownListener),k.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,C)},M.prototype.getCompletionProvider=function(k){return this.completionProvider||(this.completionProvider=new x(k)),this.completionProvider},M.prototype.gatherCompletions=function(k,C){return this.getCompletionProvider().gatherCompletions(k,C)},M.prototype.updateCompletions=function(k,C){if(k&&this.base&&this.completions){var L=this.editor.getCursorPosition(),R=this.editor.session.getTextRange({start:this.base,end:L});if(R==this.completions.filterText)return;if(this.completions.setFilter(R),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==R&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,R,k);return}if(C&&C.matches){var L=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(L.row,L.column),this.base.$insertRight=!0,this.completions=new E(C.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",k)}var O=this.editor.getSession(),L=this.editor.getCursorPosition(),R=g.getCompletionPrefix(this.editor);this.base=O.doc.createAnchor(L.row,L.column-R.length),this.base.$insertRight=!0;var I={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:R,pos:L}).provideCompletions(this.editor,I,(function(z,F,N){var A=F.filtered,S=g.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),N){if(!A.length){var D=!this.autoShown&&this.emptyMessage;if(typeof D=="function"&&(D=this.emptyMessage(S)),D){var j=[{caption:D,value:""}];this.completions=new E(j),this.openPopup(this.editor,S,k),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if(A.length==1&&A[0].value==S&&!A[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&A.length==1)return this.insertMatch(A[0])}this.completions=!N&&this.showLoadingState?new E(M.completionsForLoading.concat(A),F.filterText):F,this.openPopup(this.editor,S,k),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!N)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},M.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},M.prototype.updateDocTooltip=function(){var k=this.popup,C=this.completions&&this.completions.filtered,O=C&&(C[k.getHoveredRow()]||C[k.getRow()]),L=null;if(!O||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var R=this.editor.completers.length,I=0;I<R;I++){var z=this.editor.completers[I];if(z.getDocTooltip&&O.completerId===z.id){L=z.getDocTooltip(O);break}}if(!L&&typeof O!="string"&&(L=O),typeof L=="string"&&(L={docText:L}),!L||!L.docHTML&&!L.docText)return this.hideDocTooltip();this.showDocTooltip(L)},M.prototype.showDocTooltip=function(k){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",c));var C=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(C.isDark?"ace_dark ":"")+(C.cssClass||"");var O=this.tooltipNode;k.docHTML?O.innerHTML=k.docHTML:k.docText&&(O.textContent=k.docText),O.parentNode||this.popup.container.appendChild(this.tooltipNode);var L=this.popup,R=L.container.getBoundingClientRect(),I=400,z=300,F=L.renderer.scrollBar.width||10,N=R.left,A=window.innerWidth-R.right-F,S=L.isTopdown?R.top:window.innerHeight-F-R.bottom,D=[Math.min(A/I,1),Math.min(N/I,1),Math.min(S/z*.9)],j=Math.max.apply(Math,D),U=O.style;U.display="block",j==D[0]?(U.left=R.right+1+"px",U.right="",U.maxWidth=I*j+"px",U.top=R.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-F-R.top,z)+"px"):j==D[1]?(U.right=window.innerWidth-R.left+"px",U.left="",U.maxWidth=I*j+"px",U.top=R.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-F-R.top,z)+"px"):j==D[2]&&(U.left=window.innerWidth-R.left+"px",U.maxWidth=Math.min(I,window.innerWidth)+"px",L.isTopdown?(U.top=R.bottom+"px",U.left=R.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(window.innerHeight-F-R.bottom,z)+"px"):(U.top=L.container.offsetTop-O.offsetHeight+"px",U.left=R.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(L.container.offsetTop,z)+"px"))},M.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var k=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==k&&this.editor.focus(),this.tooltipNode=null,k.parentNode&&k.parentNode.removeChild(k)}},M.prototype.onTooltipClick=function(k){for(var C=k.target;C&&C!=this.tooltipNode;){if(C.nodeName=="A"&&C.href){C.rel="noreferrer",C.target="_blank";break}C=C.parentNode}},M.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var k=this.popup.container;k&&k.parentNode&&k.parentNode.removeChild(k)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",f),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},M.for=function(k){return k.completer instanceof M||(k.completer&&(k.completer.destroy(),k.completer=null),l.get("sharedPopups")?(M.$sharedInstance||(M.$sharedInstance=new M),k.completer=M.$sharedInstance):(k.completer=new M,k.once("destroy",f))),k.completer},M})();w.prototype.commands={Up:function(M){M.completer.goTo("up")},Down:function(M){M.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(M){M.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(M){M.completer.goTo("end")},Esc:function(M){M.completer.detach()},Return:function(M){return M.completer.insertMatch()},"Shift-Return":function(M){M.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(M){var k=M.completer.insertMatch();if(k||M.tabstopManager)return k;M.completer.goTo("down")},Backspace:function(M){M.execCommand("backspace");var k=g.getCompletionPrefix(M);!k&&M.completer&&M.completer.detach()},PageUp:function(M){M.completer.popup.gotoPageUp()},PageDown:function(M){M.completer.popup.gotoPageDown()}},w.startCommand={name:"startAutocomplete",exec:function(M,k){var C=w.for(M);C.autoInsert=!1,C.autoSelect=!0,C.autoShown=!1,C.showPopup(M,k),C.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var x=(function(){function M(k){this.initialPosition=k,this.active=!0}return M.prototype.insertByIndex=function(k,C,O){return!this.completions||!this.completions.filtered?!1:this.insertMatch(k,this.completions.filtered[C],O)},M.prototype.insertMatch=function(k,C,O){if(!C)return!1;if(k.startOperation({command:{name:"insertMatch"}}),C.completer&&C.completer.insertMatch)C.completer.insertMatch(k,C);else{if(!this.completions)return!1;var L=this.completions.filterText.length,R=0;if(C.range&&C.range.start.row===C.range.end.row&&(L-=this.initialPosition.prefix.length,L+=this.initialPosition.pos.column-C.range.start.column,R+=C.range.end.column-this.initialPosition.pos.column),L||R){var I;k.selection.getAllRanges?I=k.selection.getAllRanges():I=[k.getSelectionRange()];for(var z=0,F;F=I[z];z++)F.start.column-=L,F.end.column+=R,k.session.remove(F)}C.snippet?u.insertSnippet(k,C.snippet):this.$insertString(k,C),C.completer&&C.completer.onInsert&&typeof C.completer.onInsert=="function"&&C.completer.onInsert(k,C),C.command&&C.command==="startAutocomplete"&&k.execCommand(C.command)}return k.endOperation(),!0},M.prototype.$insertString=function(k,C){var O=C.value||C;k.execCommand("insertstring",O)},M.prototype.gatherCompletions=function(k,C){var O=k.getSession(),L=k.getCursorPosition(),R=g.getCompletionPrefix(k),I=[];this.completers=k.completers;var z=k.completers.length;return k.completers.forEach(function(F,N){F.getCompletions(k,O,L,R,function(A,S){F.hideInlinePreview&&(S=S.map(function(D){return Object.assign(D,{hideInlinePreview:F.hideInlinePreview})})),!A&&S&&(I=I.concat(S)),C(null,{prefix:g.getCompletionPrefix(k),matches:I,finished:--z===0})})}),!0},M.prototype.provideCompletions=function(k,C,O){var L=(function(F){var N=F.prefix,A=F.matches;this.completions=new E(A),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),R=!0,I=null;if(this.gatherCompletions(k,(function(F,N){if(this.active){F&&(O(F,[],!0),this.detach());var A=N.prefix;if(A.indexOf(N.prefix)===0){if(R){I=N;return}L(N)}}}).bind(this)),R=!1,I){var z=I;I=null,L(z)}},M.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(k){typeof k.cancel=="function"&&k.cancel()})},M})(),E=(function(){function M(k,C){this.all=k,this.filtered=k,this.filterText=C||"",this.exactMatch=!1,this.ignoreCaption=!1}return M.prototype.setFilter=function(k){if(k.length>this.filterText&&k.lastIndexOf(this.filterText,0)===0)var C=this.filtered;else var C=this.all;this.filterText=k,C=this.filterCompletions(C,this.filterText),C=C.sort(function(L,R){return R.exactMatch-L.exactMatch||R.$score-L.$score||(L.caption||L.value).localeCompare(R.caption||R.value)});var O=null;C=C.filter(function(L){var R=L.snippet||L.caption||L.value;return R===O?!1:(O=R,!0)}),this.filtered=C},M.prototype.filterCompletions=function(k,C){var O=[],L=C.toUpperCase(),R=C.toLowerCase();e:for(var I=0,z;z=k[I];I++){if(z.skipFilter){z.$score=z.score,O.push(z);continue}var F=!this.ignoreCaption&&z.caption||z.value||z.snippet;if(F){var N=-1,A=0,S=0,D,j;if(this.exactMatch){if(C!==F.substr(0,C.length))continue e}else{var U=F.toLowerCase().indexOf(R);if(U>-1)S=U;else for(var q=0;q<C.length;q++){var Q=F.indexOf(R[q],N+1),te=F.indexOf(L[q],N+1);if(D=Q>=0&&(te<0||Q<te)?Q:te,D<0)continue e;j=D-N-1,j>0&&(N===-1&&(S+=10),S+=j,A|=1<<q),N=D}}z.matchMask=A,z.exactMatch=S?0:1,z.$score=(z.score||0)-S,O.push(z)}}return O},M})();i.Autocomplete=w,i.CompletionProvider=x,i.FilteredList=E}),ace.define("ace/marker_group",["require","exports","module"],function(n,i,h){var p=(function(){function m(b,d){d&&(this.markerType=d.markerType),this.markers=[],this.session=b,b.addDynamicMarker(this)}return m.prototype.getMarkerAtPosition=function(b){return this.markers.find(function(d){return d.range.contains(b.row,b.column)})},m.prototype.markersComparator=function(b,d){return b.range.start.row-d.range.start.row},m.prototype.setMarkers=function(b){this.markers=b.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},m.prototype.update=function(b,d,g,o){if(!(!this.markers||!this.markers.length))for(var a=o.firstRow,u=o.lastRow,l,s=0,c=0,f=0;f<this.markers.length;f++){var w=this.markers[f];if(!(w.range.end.row<a)&&!(w.range.start.row>u)&&(w.range.start.row===c?s++:(c=w.range.start.row,s=0),!(s>200))){var x=w.range.clipRows(a,u);if(!(x.start.row===x.end.row&&x.start.column===x.end.column)){var E=x.toScreenRange(g);if(E.isEmpty()){l=g.getNextFoldLine(x.end.row,l),l&&l.end.row>x.end.row&&(a=l.end.row);continue}this.markerType==="fullLine"?d.drawFullLineMarker(b,E,w.className,o):E.isMultiLine()?this.markerType==="line"?d.drawMultiLineMarker(b,E,w.className,o):d.drawTextMarker(b,E,w.className,o):d.drawSingleLineMarker(b,E,w.className+" ace_br15",o)}}}},m})();p.prototype.MAX_MARKERS=1e4,i.MarkerGroup=p}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(n,i,h){function p(g,o){var a=g.getTextRange(b.fromPoints({row:0,column:0},o));return a.split(d).length-1}function m(g,o){var a=p(g,o),u=g.getValue().split(d),l=Object.create(null),s=u[a];return u.forEach(function(c,f){if(!(!c||c===s)){var w=Math.abs(a-f),x=u.length-w;l[c]?l[c]=Math.max(x,l[c]):l[c]=x}}),l}var b=n("../range").Range,d=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;i.getCompletions=function(g,o,a,u,l){var s=m(o,a),c=Object.keys(s);l(null,c.map(function(f){return{caption:f,value:f,score:s[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(n,i,h){var p=n("../snippets").snippetManager,m=n("../autocomplete").Autocomplete,b=n("../config"),d=n("../lib/lang"),g=n("../autocomplete/util"),o=n("../marker_group").MarkerGroup,a=n("../autocomplete/text_completer"),u={getCompletions:function(R,I,z,F,N){if(I.$mode.completer)return I.$mode.completer.getCompletions(R,I,z,F,N);var A=R.session.getState(z.row),S=I.$mode.getCompletions(A,I,z,F);S=S.map(function(D){return D.completerId=u.id,D}),N(null,S)},id:"keywordCompleter"},l=function(R){var I={};return R.replace(/\${(\d+)(:(.*?))?}/g,function(z,F,N,A){return I[F]=A||""}).replace(/\$(\d+?)/g,function(z,F){return I[F]})},s={getCompletions:function(R,I,z,F,N){var A=[],S=I.getTokenAt(z.row,z.column);S&&S.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?A.push("html-tag"):A=p.getActiveScopes(R);var D=p.snippetMap,j=[];A.forEach(function(U){for(var q=D[U]||[],Q=q.length;Q--;){var te=q[Q],de=te.name||te.tabTrigger;de&&j.push({caption:de,snippet:te.content,meta:te.tabTrigger&&!te.name?te.tabTrigger+"⇥ ":"snippet",completerId:s.id})}},this),N(null,j)},getDocTooltip:function(R){R.snippet&&!R.docHTML&&(R.docHTML=["<b>",d.escapeHTML(R.caption),"</b>","<hr></hr>",d.escapeHTML(l(R.snippet))].join(""))},id:"snippetCompleter"},c=[s,a,u];i.setCompleters=function(R){c.length=0,R&&c.push.apply(c,R)},i.addCompleter=function(R){c.push(R)},i.textCompleter=a,i.keyWordCompleter=u,i.snippetCompleter=s;var f={name:"expandSnippet",exec:function(R){return p.expandWithTab(R)},bindKey:"Tab"},w=function(R,I){x(I.session.$mode)},x=function(R){typeof R=="string"&&(R=b.$modes[R]),R&&(p.files||(p.files={}),E(R.$id,R.snippetFileId),R.modes&&R.modes.forEach(x))},E=function(R,I){!I||!R||p.files[R]||(p.files[R]={},b.loadModule(I,function(z){z&&(p.files[R]=z,!z.snippets&&z.snippetText&&(z.snippets=p.parseSnippetFile(z.snippetText)),p.register(z.snippets||[],z.scope),z.includeScopes&&(p.snippetMap[z.scope].includeScopes=z.includeScopes,z.includeScopes.forEach(function(F){x("ace/mode/"+F)})))}))},M=function(R){var I=R.editor,z=I.completer&&I.completer.activated;if(R.command.name==="backspace")z&&!g.getCompletionPrefix(I)&&I.completer.detach();else if(R.command.name==="insertstring"&&!z){k=R;var F=R.editor.$liveAutocompletionDelay;F?C.delay(F):O(R)}},k,C=d.delayedCall(function(){O(k)},0),O=function(R){var I=R.editor,z=g.getCompletionPrefix(I),F=R.args,N=g.triggerAutocomplete(I,F);if(z&&z.length>=I.$liveAutocompletionThreshold||N){var A=m.for(I);A.autoShown=!0,A.showPopup(I)}},L=n("../editor").Editor;n("../config").defineOptions(L.prototype,"editor",{enableBasicAutocompletion:{set:function(R){R?(m.for(this),this.completers||(this.completers=Array.isArray(R)?R:c),this.commands.addCommand(m.startCommand)):this.commands.removeCommand(m.startCommand)},value:!1},enableLiveAutocompletion:{set:function(R){R?(this.completers||(this.completers=Array.isArray(R)?R:c),this.commands.on("afterExec",M)):this.commands.off("afterExec",M)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(R){R?(this.commands.addCommand(f),this.on("changeMode",w),w(null,this)):(this.commands.removeCommand(f),this.off("changeMode",w))},value:!1}}),i.MarkerGroup=o}),(function(){ace.require(["ace/ext/language_tools"],function(n){t&&(t.exports=n)})})()})(ig)),ig.exports}rx();var og={exports:{}},sg;function ox(){return sg||(sg=1,(function(t,e){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(n,i,h){h.exports=`
1230
+
1231
+ /* ------------------------------------------------------------------------------------------
1232
+ * Editor Search Form
1233
+ * --------------------------------------------------------------------------------------- */
1234
+ .ace_search {
1235
+ background-color: #ddd;
1236
+ color: #666;
1237
+ border: 1px solid #cbcbcb;
1238
+ border-top: 0 none;
1239
+ overflow: hidden;
1240
+ margin: 0;
1241
+ padding: 4px 6px 0 4px;
1242
+ position: absolute;
1243
+ top: 0;
1244
+ z-index: 99;
1245
+ white-space: normal;
1246
+ }
1247
+ .ace_search.left {
1248
+ border-left: 0 none;
1249
+ border-radius: 0px 0px 5px 0px;
1250
+ left: 0;
1251
+ }
1252
+ .ace_search.right {
1253
+ border-radius: 0px 0px 0px 5px;
1254
+ border-right: 0 none;
1255
+ right: 0;
1256
+ }
1257
+
1258
+ .ace_search_form, .ace_replace_form {
1259
+ margin: 0 20px 4px 0;
1260
+ overflow: hidden;
1261
+ line-height: 1.9;
1262
+ }
1263
+ .ace_replace_form {
1264
+ margin-right: 0;
1265
+ }
1266
+ .ace_search_form.ace_nomatch {
1267
+ outline: 1px solid red;
1268
+ }
1269
+
1270
+ .ace_search_field {
1271
+ border-radius: 3px 0 0 3px;
1272
+ background-color: white;
1273
+ color: black;
1274
+ border: 1px solid #cbcbcb;
1275
+ border-right: 0 none;
1276
+ outline: 0;
1277
+ padding: 0;
1278
+ font-size: inherit;
1279
+ margin: 0;
1280
+ line-height: inherit;
1281
+ padding: 0 6px;
1282
+ min-width: 17em;
1283
+ vertical-align: top;
1284
+ min-height: 1.8em;
1285
+ box-sizing: content-box;
1286
+ }
1287
+ .ace_searchbtn {
1288
+ border: 1px solid #cbcbcb;
1289
+ line-height: inherit;
1290
+ display: inline-block;
1291
+ padding: 0 6px;
1292
+ background: #fff;
1293
+ border-right: 0 none;
1294
+ border-left: 1px solid #dcdcdc;
1295
+ cursor: pointer;
1296
+ margin: 0;
1297
+ position: relative;
1298
+ color: #666;
1299
+ }
1300
+ .ace_searchbtn:last-child {
1301
+ border-radius: 0 3px 3px 0;
1302
+ border-right: 1px solid #cbcbcb;
1303
+ }
1304
+ .ace_searchbtn:disabled {
1305
+ background: none;
1306
+ cursor: default;
1307
+ }
1308
+ .ace_searchbtn:hover {
1309
+ background-color: #eef1f6;
1310
+ }
1311
+ .ace_searchbtn.prev, .ace_searchbtn.next {
1312
+ padding: 0px 0.7em
1313
+ }
1314
+ .ace_searchbtn.prev:after, .ace_searchbtn.next:after {
1315
+ content: "";
1316
+ border: solid 2px #888;
1317
+ width: 0.5em;
1318
+ height: 0.5em;
1319
+ border-width: 2px 0 0 2px;
1320
+ display:inline-block;
1321
+ transform: rotate(-45deg);
1322
+ }
1323
+ .ace_searchbtn.next:after {
1324
+ border-width: 0 2px 2px 0 ;
1325
+ }
1326
+ .ace_searchbtn_close {
1327
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
1328
+ border-radius: 50%;
1329
+ border: 0 none;
1330
+ color: #656565;
1331
+ cursor: pointer;
1332
+ font: 16px/16px Arial;
1333
+ padding: 0;
1334
+ height: 14px;
1335
+ width: 14px;
1336
+ top: 9px;
1337
+ right: 7px;
1338
+ position: absolute;
1339
+ }
1340
+ .ace_searchbtn_close:hover {
1341
+ background-color: #656565;
1342
+ background-position: 50% 100%;
1343
+ color: white;
1344
+ }
1345
+
1346
+ .ace_button {
1347
+ margin-left: 2px;
1348
+ cursor: pointer;
1349
+ -webkit-user-select: none;
1350
+ -moz-user-select: none;
1351
+ -o-user-select: none;
1352
+ -ms-user-select: none;
1353
+ user-select: none;
1354
+ overflow: hidden;
1355
+ opacity: 0.7;
1356
+ border: 1px solid rgba(100,100,100,0.23);
1357
+ padding: 1px;
1358
+ box-sizing: border-box!important;
1359
+ color: black;
1360
+ }
1361
+
1362
+ .ace_button:hover {
1363
+ background-color: #eee;
1364
+ opacity:1;
1365
+ }
1366
+ .ace_button:active {
1367
+ background-color: #ddd;
1368
+ }
1369
+
1370
+ .ace_button.checked {
1371
+ border-color: #3399ff;
1372
+ opacity:1;
1373
+ }
1374
+
1375
+ .ace_search_options{
1376
+ margin-bottom: 3px;
1377
+ text-align: right;
1378
+ -webkit-user-select: none;
1379
+ -moz-user-select: none;
1380
+ -o-user-select: none;
1381
+ -ms-user-select: none;
1382
+ user-select: none;
1383
+ clear: both;
1384
+ }
1385
+
1386
+ .ace_search_counter {
1387
+ float: left;
1388
+ font-family: arial;
1389
+ padding: 0 8px;
1390
+ }`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/ext/searchbox","ace/ext/searchbox","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(n,i,h){var p=n("../lib/dom"),m=n("../lib/lang"),b=n("../lib/event"),d=n("./searchbox-css"),g=n("../keyboard/hash_handler").HashHandler,o=n("../lib/keys"),a=n("../config").nls,u=999;p.importCssString(d,"ace_searchbox",!1);var l=(function(){function f(w,x,E){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:a("search-box.find.placeholder","Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},"​"],["span",{action:"findNext",class:"ace_searchbtn next"},"​"],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},a("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:a("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},a("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},a("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:a("search-box.toggle-replace.title","Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:a("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:a("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:a("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:a("search-box.toggle-in-selection.title","Search In Selection")},"S"]]]),this.setSession=this.setSession.bind(this),this.$onEditorInput=this.onEditorInput.bind(this),this.$init(),this.setEditor(w),p.importCssString(d,"ace_searchbox",w.container),b.addListener(this.element,"touchstart",function(M){M.stopPropagation()},w)}return f.prototype.setEditor=function(w){w.searchBox=this,w.renderer.scroller.appendChild(this.element),this.editor=w},f.prototype.setSession=function(w){this.searchRange=null,this.$syncOptions(!0)},f.prototype.onEditorInput=function(){this.find(!1,!1,!0)},f.prototype.$initElements=function(w){this.searchBox=w.querySelector(".ace_search_form"),this.replaceBox=w.querySelector(".ace_replace_form"),this.searchOption=w.querySelector("[action=searchInSelection]"),this.replaceOption=w.querySelector("[action=toggleReplace]"),this.regExpOption=w.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=w.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=w.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=w.querySelector(".ace_search_counter")},f.prototype.$init=function(){var w=this.element;this.$initElements(w);var x=this;b.addListener(w,"mousedown",function(E){setTimeout(function(){x.activeInput.focus()},0),b.stopPropagation(E)}),b.addListener(w,"click",function(E){var M=E.target||E.srcElement,k=M.getAttribute("action");k&&x[k]?x[k]():x.$searchBarKb.commands[k]&&x.$searchBarKb.commands[k].exec(x),b.stopPropagation(E)}),b.addCommandKeyListener(w,function(E,M,k){var C=o.keyCodeToString(k),O=x.$searchBarKb.findKeyCommand(M,C);O&&O.exec&&(O.exec(x),b.stopEvent(E))}),this.$onChange=m.delayedCall(function(){x.find(!1,!1)}),b.addListener(this.searchInput,"input",function(){x.$onChange.schedule(20)}),b.addListener(this.searchInput,"focus",function(){x.activeInput=x.searchInput,x.searchInput.value&&x.highlight()}),b.addListener(this.replaceInput,"focus",function(){x.activeInput=x.replaceInput,x.searchInput.value&&x.highlight()})},f.prototype.setSearchRange=function(w){this.searchRange=w,w?this.searchRangeMarker=this.editor.session.addMarker(w,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},f.prototype.$syncOptions=function(w){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,w)},f.prototype.highlight=function(w){this.editor.session.highlight(w||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},f.prototype.find=function(w,x,E){if(this.editor.session){var M=this.editor.find(this.searchInput.value,{skipCurrent:w,backwards:x,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:E,range:this.searchRange}),k=!M&&this.searchInput.value;p.setCssClass(this.searchBox,"ace_nomatch",k),this.editor._emit("findSearchBox",{match:!k}),this.highlight(),this.updateCounter()}},f.prototype.updateCounter=function(){var w=this.editor,x=w.$search.$options.re,E=x.unicode,M=0,k=0;if(x){var C=this.searchRange?w.session.getTextRange(this.searchRange):w.getValue();w.$search.$isMultilineSearch(w.getLastSearchOptions())&&(C=C.replace(/\r\n|\r|\n/g,`
1391
+ `),w.session.doc.$autoNewLine=`
1392
+ `);var O=w.session.doc.positionToIndex(w.selection.anchor);this.searchRange&&(O-=w.session.doc.positionToIndex(this.searchRange.start));for(var L=x.lastIndex=0,R;(R=x.exec(C))&&(M++,L=R.index,L<=O&&k++,!(M>u||!R[0]&&(x.lastIndex=L+=m.skipEmptyMatch(C,L,E),L>=C.length))););}this.searchCounter.textContent=a("search-box.search-counter","$0 of $1",[k,M>u?u+"+":M])},f.prototype.findNext=function(){this.find(!0,!1)},f.prototype.findPrev=function(){this.find(!0,!0)},f.prototype.findAll=function(){var w=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),x=!w&&this.searchInput.value;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(w,x){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=x,this.editor.$search.$options.regExp&&(w=m.escapeRegExp(w)),w!=null&&(this.searchInput.value=w),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},f.prototype.isFocused=function(){var w=document.activeElement;return w==this.searchInput||w==this.replaceInput},f})(),s=new g;s.bindKeys({"Ctrl-f|Command-f":function(f){var w=f.isReplace=!f.isReplace;f.replaceBox.style.display=w?"":"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()}}),s.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 c=new g([{bindKey:"Esc",name:"closeSearchBar",exec:function(f){f.searchBox.hide()}}]);l.prototype.$searchBarKb=s,l.prototype.$closeSearchBarKb=c,i.SearchBox=l,i.Search=function(f,w){var x=f.searchBox||new l(f),E=f.session.selection.getRange(),M=E.isMultiLine()?"":f.session.getTextRange(E);x.show(M,w)}}),(function(){ace.require(["ace/ext/searchbox"],function(n){t&&(t.exports=n)})})()})(og)),og.exports}ox();var sx=Object.defineProperty,ax=(t,e,n)=>e in t?sx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Kr=(t,e,n)=>ax(t,typeof e!="symbol"?e+"":e,n);function ag(t,e){return function(){return t.apply(e,arguments)}}const{toString:lx}=Object.prototype,{getPrototypeOf:hu}=Object,{iterator:Cl,toStringTag:lg}=Symbol,kl=(t=>e=>{const n=lx.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Tr=t=>(t=t.toLowerCase(),e=>kl(e)===t),Sl=t=>e=>typeof e===t,{isArray:Us}=Array,Ma=Sl("undefined");function Ta(t){return t!==null&&!Ma(t)&&t.constructor!==null&&!Ma(t.constructor)&&Bi(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const cg=Tr("ArrayBuffer");function cx(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&cg(t.buffer),e}const ux=Sl("string"),Bi=Sl("function"),ug=Sl("number"),Ia=t=>t!==null&&typeof t=="object",hx=t=>t===!0||t===!1,_l=t=>{if(kl(t)!=="object")return!1;const e=hu(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(lg in t)&&!(Cl in t)},dx=t=>{if(!Ia(t)||Ta(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},px=Tr("Date"),gx=Tr("File"),fx=Tr("Blob"),mx=Tr("FileList"),vx=t=>Ia(t)&&Bi(t.pipe),yx=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Bi(t.append)&&((e=kl(t))==="formdata"||e==="object"&&Bi(t.toString)&&t.toString()==="[object FormData]"))},wx=Tr("URLSearchParams"),[bx,xx,Cx,kx]=["ReadableStream","Request","Response","Headers"].map(Tr),Sx=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ea(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let i,h;if(typeof t!="object"&&(t=[t]),Us(t))for(i=0,h=t.length;i<h;i++)e.call(null,t[i],i,t);else{if(Ta(t))return;const p=n?Object.getOwnPropertyNames(t):Object.keys(t),m=p.length;let b;for(i=0;i<m;i++)b=p[i],e.call(null,t[b],b,t)}}function hg(t,e){if(Ta(t))return null;e=e.toLowerCase();const n=Object.keys(t);let i=n.length,h;for(;i-- >0;)if(h=n[i],e===h.toLowerCase())return h;return null}const os=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,dg=t=>!Ma(t)&&t!==os;function du(){const{caseless:t}=dg(this)&&this||{},e={},n=(i,h)=>{const p=t&&hg(e,h)||h;_l(e[p])&&_l(i)?e[p]=du(e[p],i):_l(i)?e[p]=du({},i):Us(i)?e[p]=i.slice():e[p]=i};for(let i=0,h=arguments.length;i<h;i++)arguments[i]&&Ea(arguments[i],n);return e}const _x=(t,e,n,{allOwnKeys:i}={})=>(Ea(e,(h,p)=>{n&&Bi(h)?t[p]=ag(h,n):t[p]=h},{allOwnKeys:i}),t),Ax=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),$x=(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Mx=(t,e,n,i)=>{let h,p,m;const b={};if(e=e||{},t==null)return e;do{for(h=Object.getOwnPropertyNames(t),p=h.length;p-- >0;)m=h[p],(!i||i(m,t,e))&&!b[m]&&(e[m]=t[m],b[m]=!0);t=n!==!1&&hu(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Tx=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return i!==-1&&i===n},Ix=t=>{if(!t)return null;if(Us(t))return t;let e=t.length;if(!ug(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Ex=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&hu(Uint8Array)),Lx=(t,e)=>{const n=(t&&t[Cl]).call(t);let i;for(;(i=n.next())&&!i.done;){const h=i.value;e.call(t,h[0],h[1])}},Rx=(t,e)=>{let n;const i=[];for(;(n=t.exec(e))!==null;)i.push(n);return i},Ox=Tr("HTMLFormElement"),Nx=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,i){return n.toUpperCase()+i}),pg=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Dx=Tr("RegExp"),gg=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};Ea(n,(h,p)=>{let m;(m=e(h,p,t))!==!1&&(i[p]=m||h)}),Object.defineProperties(t,i)},Px=t=>{gg(t,(e,n)=>{if(Bi(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=t[n];if(Bi(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Fx=(t,e)=>{const n={},i=h=>{h.forEach(p=>{n[p]=!0})};return Us(t)?i(t):i(String(t).split(e)),n},Wx=()=>{},Bx=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function zx(t){return!!(t&&Bi(t.append)&&t[lg]==="FormData"&&t[Cl])}const jx=t=>{const e=new Array(10),n=(i,h)=>{if(Ia(i)){if(e.indexOf(i)>=0)return;if(Ta(i))return i;if(!("toJSON"in i)){e[h]=i;const p=Us(i)?[]:{};return Ea(i,(m,b)=>{const d=n(m,h+1);!Ma(d)&&(p[b]=d)}),e[h]=void 0,p}}return i};return n(t,0)},Hx=Tr("AsyncFunction"),Ux=t=>t&&(Ia(t)||Bi(t))&&Bi(t.then)&&Bi(t.catch),fg=((t,e)=>t?setImmediate:e?((n,i)=>(os.addEventListener("message",({source:h,data:p})=>{h===os&&p===n&&i.length&&i.shift()()},!1),h=>{i.push(h),os.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Bi(os.postMessage)),Vx=typeof queueMicrotask<"u"?queueMicrotask.bind(os):typeof process<"u"&&process.nextTick||fg,Gx=t=>t!=null&&Bi(t[Cl]),_e={isArray:Us,isArrayBuffer:cg,isBuffer:Ta,isFormData:yx,isArrayBufferView:cx,isString:ux,isNumber:ug,isBoolean:hx,isObject:Ia,isPlainObject:_l,isEmptyObject:dx,isReadableStream:bx,isRequest:xx,isResponse:Cx,isHeaders:kx,isUndefined:Ma,isDate:px,isFile:gx,isBlob:fx,isRegExp:Dx,isFunction:Bi,isStream:vx,isURLSearchParams:wx,isTypedArray:Ex,isFileList:mx,forEach:Ea,merge:du,extend:_x,trim:Sx,stripBOM:Ax,inherits:$x,toFlatObject:Mx,kindOf:kl,kindOfTest:Tr,endsWith:Tx,toArray:Ix,forEachEntry:Lx,matchAll:Rx,isHTMLForm:Ox,hasOwnProperty:pg,hasOwnProp:pg,reduceDescriptors:gg,freezeMethods:Px,toObjectSet:Fx,toCamelCase:Nx,noop:Wx,toFiniteNumber:Bx,findKey:hg,global:os,isContextDefined:dg,isSpecCompliantForm:zx,toJSONObject:jx,isAsyncFn:Hx,isThenable:Ux,setImmediate:fg,asap:Vx,isIterable:Gx};function At(t,e,n,i,h){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),h&&(this.response=h,this.status=h.status?h.status:null)}_e.inherits(At,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_e.toJSONObject(this.config),code:this.code,status:this.status}}});const mg=At.prototype,vg={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{vg[t]={value:t}}),Object.defineProperties(At,vg),Object.defineProperty(mg,"isAxiosError",{value:!0}),At.from=(t,e,n,i,h,p)=>{const m=Object.create(mg);return _e.toFlatObject(t,m,function(b){return b!==Error.prototype},b=>b!=="isAxiosError"),At.call(m,t.message,e,n,i,h),m.cause=t,m.name=t.name,p&&Object.assign(m,p),m};const Kx=null;function pu(t){return _e.isPlainObject(t)||_e.isArray(t)}function yg(t){return _e.endsWith(t,"[]")?t.slice(0,-2):t}function wg(t,e,n){return t?t.concat(e).map(function(i,h){return i=yg(i),!n&&h?"["+i+"]":i}).join(n?".":""):e}function qx(t){return _e.isArray(t)&&!t.some(pu)}const Yx=_e.toFlatObject(_e,{},null,function(t){return/^is[A-Z]/.test(t)});function Al(t,e,n){if(!_e.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=_e.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(l,s){return!_e.isUndefined(s[l])});const i=n.metaTokens,h=n.visitor||g,p=n.dots,m=n.indexes,b=(n.Blob||typeof Blob<"u"&&Blob)&&_e.isSpecCompliantForm(e);if(!_e.isFunction(h))throw new TypeError("visitor must be a function");function d(l){if(l===null)return"";if(_e.isDate(l))return l.toISOString();if(_e.isBoolean(l))return l.toString();if(!b&&_e.isBlob(l))throw new At("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(l)||_e.isTypedArray(l)?b&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function g(l,s,c){let f=l;if(l&&!c&&typeof l=="object"){if(_e.endsWith(s,"{}"))s=i?s:s.slice(0,-2),l=JSON.stringify(l);else if(_e.isArray(l)&&qx(l)||(_e.isFileList(l)||_e.endsWith(s,"[]"))&&(f=_e.toArray(l)))return s=yg(s),f.forEach(function(w,x){!(_e.isUndefined(w)||w===null)&&e.append(m===!0?wg([s],x,p):m===null?s:s+"[]",d(w))}),!1}return pu(l)?!0:(e.append(wg(c,s,p),d(l)),!1)}const o=[],a=Object.assign(Yx,{defaultVisitor:g,convertValue:d,isVisitable:pu});function u(l,s){if(!_e.isUndefined(l)){if(o.indexOf(l)!==-1)throw Error("Circular reference detected in "+s.join("."));o.push(l),_e.forEach(l,function(c,f){(!(_e.isUndefined(c)||c===null)&&h.call(e,c,_e.isString(f)?f.trim():f,s,a))===!0&&u(c,s?s.concat(f):[f])}),o.pop()}}if(!_e.isObject(t))throw new TypeError("data must be an object");return u(t),e}function bg(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function gu(t,e){this._pairs=[],t&&Al(t,this,e)}const xg=gu.prototype;xg.append=function(t,e){this._pairs.push([t,e])},xg.toString=function(t){const e=t?function(n){return t.call(this,n,bg)}:bg;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function Xx(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Cg(t,e,n){if(!e)return t;const i=n&&n.encode||Xx;_e.isFunction(n)&&(n={serialize:n});const h=n&&n.serialize;let p;if(h?p=h(e,n):p=_e.isURLSearchParams(e)?e.toString():new gu(e,n).toString(i),p){const m=t.indexOf("#");m!==-1&&(t=t.slice(0,m)),t+=(t.indexOf("?")===-1?"?":"&")+p}return t}class kg{constructor(){this.handlers=[]}use(e,n,i){return this.handlers.push({fulfilled:e,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){_e.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Sg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Zx=typeof URLSearchParams<"u"?URLSearchParams:gu,Qx=typeof FormData<"u"?FormData:null,Jx=typeof Blob<"u"?Blob:null,e1={isBrowser:!0,classes:{URLSearchParams:Zx,FormData:Qx,Blob:Jx},protocols:["http","https","file","blob","url","data"]},fu=typeof window<"u"&&typeof document<"u",mu=typeof navigator=="object"&&navigator||void 0,t1=fu&&(!mu||["ReactNative","NativeScript","NS"].indexOf(mu.product)<0),n1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",i1=fu&&window.location.href||"http://localhost",r1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:fu,hasStandardBrowserEnv:t1,hasStandardBrowserWebWorkerEnv:n1,navigator:mu,origin:i1},Symbol.toStringTag,{value:"Module"})),bi={...r1,...e1};function o1(t,e){return Al(t,new bi.classes.URLSearchParams,{visitor:function(n,i,h,p){return bi.isNode&&_e.isBuffer(n)?(this.append(i,n.toString("base64")),!1):p.defaultVisitor.apply(this,arguments)},...e})}function s1(t){return _e.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function a1(t){const e={},n=Object.keys(t);let i;const h=n.length;let p;for(i=0;i<h;i++)p=n[i],e[p]=t[p];return e}function _g(t){function e(n,i,h,p){let m=n[p++];if(m==="__proto__")return!0;const b=Number.isFinite(+m),d=p>=n.length;return m=!m&&_e.isArray(h)?h.length:m,d?(_e.hasOwnProp(h,m)?h[m]=[h[m],i]:h[m]=i,!b):((!h[m]||!_e.isObject(h[m]))&&(h[m]=[]),e(n,i,h[m],p)&&_e.isArray(h[m])&&(h[m]=a1(h[m])),!b)}if(_e.isFormData(t)&&_e.isFunction(t.entries)){const n={};return _e.forEachEntry(t,(i,h)=>{e(s1(i),h,n,0)}),n}return null}function l1(t,e,n){if(_e.isString(t))try{return(e||JSON.parse)(t),_e.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(t)}const La={transitional:Sg,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,h=_e.isObject(t);if(h&&_e.isHTMLForm(t)&&(t=new FormData(t)),_e.isFormData(t))return i?JSON.stringify(_g(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 e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let p;if(h){if(n.indexOf("application/x-www-form-urlencoded")>-1)return o1(t,this.formSerializer).toString();if((p=_e.isFileList(t))||n.indexOf("multipart/form-data")>-1){const m=this.env&&this.env.FormData;return Al(p?{"files[]":t}:t,m&&new m,this.formSerializer)}}return h||i?(e.setContentType("application/json",!1),l1(t)):t}],transformResponse:[function(t){const e=this.transitional||La.transitional,n=e&&e.forcedJSONParsing,i=this.responseType==="json";if(_e.isResponse(t)||_e.isReadableStream(t))return t;if(t&&_e.isString(t)&&(n&&!this.responseType||i)){const h=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(p){if(h)throw p.name==="SyntaxError"?At.from(p,At.ERR_BAD_RESPONSE,this,null,this.response):p}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:bi.classes.FormData,Blob:bi.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 c1=_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"]),u1=t=>{const e={};let n,i,h;return t&&t.split(`
1393
+ `).forEach(function(p){h=p.indexOf(":"),n=p.substring(0,h).trim().toLowerCase(),i=p.substring(h+1).trim(),!(!n||e[n]&&c1[n])&&(n==="set-cookie"?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)}),e},Ag=Symbol("internals");function Ra(t){return t&&String(t).trim().toLowerCase()}function $l(t){return t===!1||t==null?t:_e.isArray(t)?t.map($l):String(t)}function h1(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}const d1=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function vu(t,e,n,i,h){if(_e.isFunction(i))return i.call(this,e,n);if(h&&(e=n),!!_e.isString(e)){if(_e.isString(i))return e.indexOf(i)!==-1;if(_e.isRegExp(i))return i.test(e)}}function p1(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,i)=>n.toUpperCase()+i)}function g1(t,e){const n=_e.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(t,i+n,{value:function(h,p,m){return this[i].call(this,e,h,p,m)},configurable:!0})})}let zi=class{constructor(t){t&&this.set(t)}set(t,e,n){const i=this;function h(m,b,d){const g=Ra(b);if(!g)throw new Error("header name must be a non-empty string");const o=_e.findKey(i,g);(!o||i[o]===void 0||d===!0||d===void 0&&i[o]!==!1)&&(i[o||b]=$l(m))}const p=(m,b)=>_e.forEach(m,(d,g)=>h(d,g,b));if(_e.isPlainObject(t)||t instanceof this.constructor)p(t,e);else if(_e.isString(t)&&(t=t.trim())&&!d1(t))p(u1(t),e);else if(_e.isObject(t)&&_e.isIterable(t)){let m={},b,d;for(const g of t){if(!_e.isArray(g))throw TypeError("Object iterator must return a key-value pair");m[d=g[0]]=(b=m[d])?_e.isArray(b)?[...b,g[1]]:[b,g[1]]:g[1]}p(m,e)}else t!=null&&h(e,t,n);return this}get(t,e){if(t=Ra(t),t){const n=_e.findKey(this,t);if(n){const i=this[n];if(!e)return i;if(e===!0)return h1(i);if(_e.isFunction(e))return e.call(this,i,n);if(_e.isRegExp(e))return e.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Ra(t),t){const n=_e.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||vu(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let i=!1;function h(p){if(p=Ra(p),p){const m=_e.findKey(n,p);m&&(!e||vu(n,n[m],m,e))&&(delete n[m],i=!0)}}return _e.isArray(t)?t.forEach(h):h(t),i}clear(t){const e=Object.keys(this);let n=e.length,i=!1;for(;n--;){const h=e[n];(!t||vu(this,this[h],h,t,!0))&&(delete this[h],i=!0)}return i}normalize(t){const e=this,n={};return _e.forEach(this,(i,h)=>{const p=_e.findKey(n,h);if(p){e[p]=$l(i),delete e[h];return}const m=t?p1(h):String(h).trim();m!==h&&delete e[h],e[m]=$l(i),n[m]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return _e.forEach(this,(n,i)=>{n!=null&&n!==!1&&(e[i]=t&&_e.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
1394
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(i=>n.set(i)),n}static accessor(t){const e=(this[Ag]=this[Ag]={accessors:{}}).accessors,n=this.prototype;function i(h){const p=Ra(h);e[p]||(g1(n,h),e[p]=!0)}return _e.isArray(t)?t.forEach(i):i(t),this}};zi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_e.reduceDescriptors(zi.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(i){this[n]=i}}}),_e.freezeMethods(zi);function yu(t,e){const n=this||La,i=e||n,h=zi.from(i.headers);let p=i.data;return _e.forEach(t,function(m){p=m.call(n,p,h.normalize(),e?e.status:void 0)}),h.normalize(),p}function $g(t){return!!(t&&t.__CANCEL__)}function Vs(t,e,n){At.call(this,t??"canceled",At.ERR_CANCELED,e,n),this.name="CanceledError"}_e.inherits(Vs,At,{__CANCEL__:!0});function Mg(t,e,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?t(n):e(new At("Request failed with status code "+n.status,[At.ERR_BAD_REQUEST,At.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function f1(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function m1(t,e){t=t||10;const n=new Array(t),i=new Array(t);let h=0,p=0,m;return e=e!==void 0?e:1e3,function(b){const d=Date.now(),g=i[p];m||(m=d),n[h]=b,i[h]=d;let o=p,a=0;for(;o!==h;)a+=n[o++],o=o%t;if(h=(h+1)%t,h===p&&(p=(p+1)%t),d-m<e)return;const u=g&&d-g;return u?Math.round(a*1e3/u):void 0}}function v1(t,e){let n=0,i=1e3/e,h,p;const m=(b,d=Date.now())=>{n=d,h=null,p&&(clearTimeout(p),p=null),t(...b)};return[(...b)=>{const d=Date.now(),g=d-n;g>=i?m(b,d):(h=b,p||(p=setTimeout(()=>{p=null,m(h)},i-g)))},()=>h&&m(h)]}const Ml=(t,e,n=3)=>{let i=0;const h=m1(50,250);return v1(p=>{const m=p.loaded,b=p.lengthComputable?p.total:void 0,d=m-i,g=h(d),o=m<=b;i=m;const a={loaded:m,total:b,progress:b?m/b:void 0,bytes:d,rate:g||void 0,estimated:g&&b&&o?(b-m)/g:void 0,event:p,lengthComputable:b!=null,[e?"download":"upload"]:!0};t(a)},n)},Tg=(t,e)=>{const n=t!=null;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},Ig=t=>(...e)=>_e.asap(()=>t(...e)),y1=bi.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,bi.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(bi.origin),bi.navigator&&/(msie|trident)/i.test(bi.navigator.userAgent)):()=>!0,w1=bi.hasStandardBrowserEnv?{write(t,e,n,i,h,p){const m=[t+"="+encodeURIComponent(e)];_e.isNumber(n)&&m.push("expires="+new Date(n).toGMTString()),_e.isString(i)&&m.push("path="+i),_e.isString(h)&&m.push("domain="+h),p===!0&&m.push("secure"),document.cookie=m.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function b1(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function x1(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Eg(t,e,n){let i=!b1(e);return t&&(i||n==!1)?x1(t,e):e}const Lg=t=>t instanceof zi?{...t}:t;function ss(t,e){e=e||{};const n={};function i(g,o,a,u){return _e.isPlainObject(g)&&_e.isPlainObject(o)?_e.merge.call({caseless:u},g,o):_e.isPlainObject(o)?_e.merge({},o):_e.isArray(o)?o.slice():o}function h(g,o,a,u){if(_e.isUndefined(o)){if(!_e.isUndefined(g))return i(void 0,g,a,u)}else return i(g,o,a,u)}function p(g,o){if(!_e.isUndefined(o))return i(void 0,o)}function m(g,o){if(_e.isUndefined(o)){if(!_e.isUndefined(g))return i(void 0,g)}else return i(void 0,o)}function b(g,o,a){if(a in e)return i(g,o);if(a in t)return i(void 0,g)}const d={url:p,method:p,data:p,baseURL:m,transformRequest:m,transformResponse:m,paramsSerializer:m,timeout:m,timeoutMessage:m,withCredentials:m,withXSRFToken:m,adapter:m,responseType:m,xsrfCookieName:m,xsrfHeaderName:m,onUploadProgress:m,onDownloadProgress:m,decompress:m,maxContentLength:m,maxBodyLength:m,beforeRedirect:m,transport:m,httpAgent:m,httpsAgent:m,cancelToken:m,socketPath:m,responseEncoding:m,validateStatus:b,headers:(g,o,a)=>h(Lg(g),Lg(o),a,!0)};return _e.forEach(Object.keys({...t,...e}),function(g){const o=d[g]||h,a=o(t[g],e[g],g);_e.isUndefined(a)&&o!==b||(n[g]=a)}),n}const Rg=t=>{const e=ss({},t);let{data:n,withXSRFToken:i,xsrfHeaderName:h,xsrfCookieName:p,headers:m,auth:b}=e;e.headers=m=zi.from(m),e.url=Cg(Eg(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),b&&m.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):"")));let d;if(_e.isFormData(n)){if(bi.hasStandardBrowserEnv||bi.hasStandardBrowserWebWorkerEnv)m.setContentType(void 0);else if((d=m.getContentType())!==!1){const[g,...o]=d?d.split(";").map(a=>a.trim()).filter(Boolean):[];m.setContentType([g||"multipart/form-data",...o].join("; "))}}if(bi.hasStandardBrowserEnv&&(i&&_e.isFunction(i)&&(i=i(e)),i||i!==!1&&y1(e.url))){const g=h&&p&&w1.read(p);g&&m.set(h,g)}return e},C1=typeof XMLHttpRequest<"u",k1=C1&&function(t){return new Promise(function(e,n){const i=Rg(t);let h=i.data;const p=zi.from(i.headers).normalize();let{responseType:m,onUploadProgress:b,onDownloadProgress:d}=i,g,o,a,u,l;function s(){u&&u(),l&&l(),i.cancelToken&&i.cancelToken.unsubscribe(g),i.signal&&i.signal.removeEventListener("abort",g)}let c=new XMLHttpRequest;c.open(i.method.toUpperCase(),i.url,!0),c.timeout=i.timeout;function f(){if(!c)return;const x=zi.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),E={data:!m||m==="text"||m==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:x,config:t,request:c};Mg(function(M){e(M),s()},function(M){n(M),s()},E),c=null}"onloadend"in c?c.onloadend=f:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(f)},c.onabort=function(){c&&(n(new At("Request aborted",At.ECONNABORTED,t,c)),c=null)},c.onerror=function(){n(new At("Network Error",At.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let x=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||Sg;i.timeoutErrorMessage&&(x=i.timeoutErrorMessage),n(new At(x,E.clarifyTimeoutError?At.ETIMEDOUT:At.ECONNABORTED,t,c)),c=null},h===void 0&&p.setContentType(null),"setRequestHeader"in c&&_e.forEach(p.toJSON(),function(x,E){c.setRequestHeader(E,x)}),_e.isUndefined(i.withCredentials)||(c.withCredentials=!!i.withCredentials),m&&m!=="json"&&(c.responseType=i.responseType),d&&([a,l]=Ml(d,!0),c.addEventListener("progress",a)),b&&c.upload&&([o,u]=Ml(b),c.upload.addEventListener("progress",o),c.upload.addEventListener("loadend",u)),(i.cancelToken||i.signal)&&(g=x=>{c&&(n(!x||x.type?new Vs(null,t,c):x),c.abort(),c=null)},i.cancelToken&&i.cancelToken.subscribe(g),i.signal&&(i.signal.aborted?g():i.signal.addEventListener("abort",g)));const w=f1(i.url);if(w&&bi.protocols.indexOf(w)===-1){n(new At("Unsupported protocol "+w+":",At.ERR_BAD_REQUEST,t));return}c.send(h||null)})},S1=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let i=new AbortController,h;const p=function(g){if(!h){h=!0,b();const o=g instanceof Error?g:this.reason;i.abort(o instanceof At?o:new Vs(o instanceof Error?o.message:o))}};let m=e&&setTimeout(()=>{m=null,p(new At(`timeout ${e} of ms exceeded`,At.ETIMEDOUT))},e);const b=()=>{t&&(m&&clearTimeout(m),m=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(p):g.removeEventListener("abort",p)}),t=null)};t.forEach(g=>g.addEventListener("abort",p));const{signal:d}=i;return d.unsubscribe=()=>_e.asap(b),d}},_1=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let i=0,h;for(;i<n;)h=i+e,yield t.slice(i,h),i=h},A1=async function*(t,e){for await(const n of $1(t))yield*_1(n,e)},$1=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:i}=await e.read();if(n)break;yield i}}finally{await e.cancel()}},Og=(t,e,n,i)=>{const h=A1(t,e);let p=0,m,b=d=>{m||(m=!0,i&&i(d))};return new ReadableStream({async pull(d){try{const{done:g,value:o}=await h.next();if(g){b(),d.close();return}let a=o.byteLength;if(n){let u=p+=a;n(u)}d.enqueue(new Uint8Array(o))}catch(g){throw b(g),g}},cancel(d){return b(d),h.return()}},{highWaterMark:2})},Tl=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ng=Tl&&typeof ReadableStream=="function",M1=Tl&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Dg=(t,...e)=>{try{return!!t(...e)}catch{return!1}},T1=Ng&&Dg(()=>{let t=!1;const e=new Request(bi.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Pg=64*1024,wu=Ng&&Dg(()=>_e.isReadableStream(new Response("").body)),Il={stream:wu&&(t=>t.body)};Tl&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Il[e]&&(Il[e]=_e.isFunction(t[e])?n=>n[e]():(n,i)=>{throw new At(`Response type '${e}' is not supported`,At.ERR_NOT_SUPPORT,i)})})})(new Response);const I1=async t=>{if(t==null)return 0;if(_e.isBlob(t))return t.size;if(_e.isSpecCompliantForm(t))return(await new Request(bi.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(t)||_e.isArrayBuffer(t))return t.byteLength;if(_e.isURLSearchParams(t)&&(t=t+""),_e.isString(t))return(await M1(t)).byteLength},E1=async(t,e)=>_e.toFiniteNumber(t.getContentLength())??I1(e),L1=Tl&&(async t=>{let{url:e,method:n,data:i,signal:h,cancelToken:p,timeout:m,onDownloadProgress:b,onUploadProgress:d,responseType:g,headers:o,withCredentials:a="same-origin",fetchOptions:u}=Rg(t);g=g?(g+"").toLowerCase():"text";let l=S1([h,p&&p.toAbortSignal()],m),s;const c=l&&l.unsubscribe&&(()=>{l.unsubscribe()});let f;try{if(d&&T1&&n!=="get"&&n!=="head"&&(f=await E1(o,i))!==0){let k=new Request(e,{method:"POST",body:i,duplex:"half"}),C;if(_e.isFormData(i)&&(C=k.headers.get("content-type"))&&o.setContentType(C),k.body){const[O,L]=Tg(f,Ml(Ig(d)));i=Og(k.body,Pg,O,L)}}_e.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;s=new Request(e,{...u,signal:l,method:n.toUpperCase(),headers:o.normalize().toJSON(),body:i,duplex:"half",credentials:w?a:void 0});let x=await fetch(s,u);const E=wu&&(g==="stream"||g==="response");if(wu&&(b||E&&c)){const k={};["status","statusText","headers"].forEach(R=>{k[R]=x[R]});const C=_e.toFiniteNumber(x.headers.get("content-length")),[O,L]=b&&Tg(C,Ml(Ig(b),!0))||[];x=new Response(Og(x.body,Pg,O,()=>{L&&L(),c&&c()}),k)}g=g||"text";let M=await Il[_e.findKey(Il,g)||"text"](x,t);return!E&&c&&c(),await new Promise((k,C)=>{Mg(k,C,{data:M,headers:zi.from(x.headers),status:x.status,statusText:x.statusText,config:t,request:s})})}catch(w){throw c&&c(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new At("Network Error",At.ERR_NETWORK,t,s),{cause:w.cause||w}):At.from(w,w&&w.code,t,s)}}),bu={http:Kx,xhr:k1,fetch:L1};_e.forEach(bu,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Fg=t=>`- ${t}`,R1=t=>_e.isFunction(t)||t===null||t===!1,Wg={getAdapter:t=>{t=_e.isArray(t)?t:[t];const{length:e}=t;let n,i;const h={};for(let p=0;p<e;p++){n=t[p];let m;if(i=n,!R1(n)&&(i=bu[(m=String(n)).toLowerCase()],i===void 0))throw new At(`Unknown adapter '${m}'`);if(i)break;h[m||"#"+p]=i}if(!i){const p=Object.entries(h).map(([b,d])=>`adapter ${b} `+(d===!1?"is not supported by the environment":"is not available in the build"));let m=e?p.length>1?`since :
1395
+ `+p.map(Fg).join(`
1396
+ `):" "+Fg(p[0]):"as no adapter specified";throw new At("There is no suitable adapter to dispatch the request "+m,"ERR_NOT_SUPPORT")}return i},adapters:bu};function xu(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Vs(null,t)}function Bg(t){return xu(t),t.headers=zi.from(t.headers),t.data=yu.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Wg.getAdapter(t.adapter||La.adapter)(t).then(function(e){return xu(t),e.data=yu.call(t,t.transformResponse,e),e.headers=zi.from(e.headers),e},function(e){return $g(e)||(xu(t),e&&e.response&&(e.response.data=yu.call(t,t.transformResponse,e.response),e.response.headers=zi.from(e.response.headers))),Promise.reject(e)})}const zg="1.11.0",El={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{El[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const jg={};El.transitional=function(t,e,n){function i(h,p){return"[Axios v"+zg+"] Transitional option '"+h+"'"+p+(n?". "+n:"")}return(h,p,m)=>{if(t===!1)throw new At(i(p," has been removed"+(e?" in "+e:"")),At.ERR_DEPRECATED);return e&&!jg[p]&&(jg[p]=!0,console.warn(i(p," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(h,p,m):!0}},El.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function O1(t,e,n){if(typeof t!="object")throw new At("options must be an object",At.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let h=i.length;for(;h-- >0;){const p=i[h],m=e[p];if(m){const b=t[p],d=b===void 0||m(b,p,t);if(d!==!0)throw new At("option "+p+" must be "+d,At.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new At("Unknown option "+p,At.ERR_BAD_OPTION)}}const Ll={assertOptions:O1,validators:El},qr=Ll.validators;let as=class{constructor(t){this.defaults=t||{},this.interceptors={request:new kg,response:new kg}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const h=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?h&&!String(n.stack).endsWith(h.replace(/^.+\n.+\n/,""))&&(n.stack+=`
1397
+ `+h):n.stack=h}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=ss(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:h}=e;n!==void 0&&Ll.assertOptions(n,{silentJSONParsing:qr.transitional(qr.boolean),forcedJSONParsing:qr.transitional(qr.boolean),clarifyTimeoutError:qr.transitional(qr.boolean)},!1),i!=null&&(_e.isFunction(i)?e.paramsSerializer={serialize:i}:Ll.assertOptions(i,{encode:qr.function,serialize:qr.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Ll.assertOptions(e,{baseUrl:qr.spelling("baseURL"),withXsrfToken:qr.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let p=h&&_e.merge(h.common,h[e.method]);h&&_e.forEach(["delete","get","head","post","put","patch","common"],l=>{delete h[l]}),e.headers=zi.concat(p,h);const m=[];let b=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(e)===!1||(b=b&&l.synchronous,m.unshift(l.fulfilled,l.rejected))});const d=[];this.interceptors.response.forEach(function(l){d.push(l.fulfilled,l.rejected)});let g,o=0,a;if(!b){const l=[Bg.bind(this),void 0];for(l.unshift(...m),l.push(...d),a=l.length,g=Promise.resolve(e);o<a;)g=g.then(l[o++],l[o++]);return g}a=m.length;let u=e;for(o=0;o<a;){const l=m[o++],s=m[o++];try{u=l(u)}catch(c){s.call(this,c);break}}try{g=Bg.call(this,u)}catch(l){return Promise.reject(l)}for(o=0,a=d.length;o<a;)g=g.then(d[o++],d[o++]);return g}getUri(t){t=ss(this.defaults,t);const e=Eg(t.baseURL,t.url,t.allowAbsoluteUrls);return Cg(e,t.params,t.paramsSerializer)}};_e.forEach(["delete","get","head","options"],function(t){as.prototype[t]=function(e,n){return this.request(ss(n||{},{method:t,url:e,data:(n||{}).data}))}}),_e.forEach(["post","put","patch"],function(t){function e(n){return function(i,h,p){return this.request(ss(p||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:h}))}}as.prototype[t]=e(),as.prototype[t+"Form"]=e(!0)});let N1=class Nb{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(h){n=h});const i=this;this.promise.then(h=>{if(!i._listeners)return;let p=i._listeners.length;for(;p-- >0;)i._listeners[p](h);i._listeners=null}),this.promise.then=h=>{let p;const m=new Promise(b=>{i.subscribe(b),p=b}).then(h);return m.cancel=function(){i.unsubscribe(p)},m},e(function(h,p,m){i.reason||(i.reason=new Vs(h,p,m),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=i=>{e.abort(i)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Nb(function(n){e=n}),cancel:e}}};function D1(t){return function(e){return t.apply(null,e)}}function P1(t){return _e.isObject(t)&&t.isAxiosError===!0}const Cu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Cu).forEach(([t,e])=>{Cu[e]=t});function Hg(t){const e=new as(t),n=ag(as.prototype.request,e);return _e.extend(n,as.prototype,e,{allOwnKeys:!0}),_e.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return Hg(ss(t,i))},n}const Fn=Hg(La);Fn.Axios=as,Fn.CanceledError=Vs,Fn.CancelToken=N1,Fn.isCancel=$g,Fn.VERSION=zg,Fn.toFormData=Al,Fn.AxiosError=At,Fn.Cancel=Fn.CanceledError,Fn.all=function(t){return Promise.all(t)},Fn.spread=D1,Fn.isAxiosError=P1,Fn.mergeConfig=ss,Fn.AxiosHeaders=zi,Fn.formToJSON=t=>_g(_e.isHTMLForm(t)?new FormData(t):t),Fn.getAdapter=Wg.getAdapter,Fn.HttpStatusCode=Cu,Fn.default=Fn;const{Axios:O2,AxiosError:N2,CanceledError:D2,isCancel:P2,CancelToken:F2,VERSION:W2,all:B2,Cancel:z2,isAxiosError:j2,spread:H2,toFormData:U2,AxiosHeaders:V2,HttpStatusCode:G2,formToJSON:K2,getAdapter:q2,mergeConfig:Y2}=Fn,ku=Fn.create({baseURL:location.origin,timeout:6e4,params:{}});ku.interceptors.response.use(t=>t,t=>{var e,n,i,h,p,m,b,d,g,o,a;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(s){s&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let u=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(u+=`${t.response.statusText} `),(i=(n=t.response)==null?void 0:n.config)!=null&&i.data&&(u+=`${t.response.config.data} `),(p=(h=t.response)==null?void 0:h.data)!=null&&p.message?u+=`${t.response.data.message}`:(b=(m=t.response)==null?void 0:m.data)!=null&&b.exception?u+=`${t.response.data.exception}`:(o=(g=(d=t.response)==null?void 0:d.data)==null?void 0:g.error)!=null&&o.message?(t.response.data.error.class&&(u+=`${t.response.data.error.class} `),u+=`${t.response.data.error.message}`):u+=`${(a=t.response)==null?void 0:a.data}`;const{$cosmosNotify:l}=window;throw l&&l.serious({title:"Network error",body:u}),t}else throw t});const Rl=async function(t,e,{data:n,params:i={},headers:h,noAuth:p=!1,noScope:m=!1,onUploadProgress:b=!1}={}){if(!p){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}h.Authorization=localStorage.openc3Token}return h.manual=!0,!m&&!i.scope&&(i.scope=window.openc3Scope),ku({method:t,url:e,data:n,params:i,headers:h,onUploadProgress:b})},Su={Accept:"application/json"},Ug={...Su,"Content-Type":"application/json"},X2=Pn("P",{get:function(t,{params:e,headers:n=Su,noScope:i,noAuth:h,onUploadProgress:p}={}){return Rl("get",t,{params:e,headers:n,noScope:i,noAuth:h,onUploadProgress:p})},put:function(t,{data:e,params:n,headers:i=Ug,noScope:h,noAuth:p,onUploadProgress:m}={}){return Rl("put",t,{data:e,params:n,headers:i,noScope:h,noAuth:p,onUploadProgress:m})},post:function(t,{data:e,params:n,headers:i=Ug,noScope:h,noAuth:p,onUploadProgress:m}={}){return Rl("post",t,{data:e,params:n,headers:i,noScope:h,noAuth:p,onUploadProgress:m})},delete:function(t,{params:e,headers:n=Su,noScope:i,noAuth:h,onUploadProgress:p}={}){return Rl("delete",t,{params:e,headers:n,noScope:i,noAuth:h,onUploadProgress:p})}});let Ol=()=>({emit(t,...e){for(let n=this.events[t]||[],i=0,h=n.length;i<h;i++)n[i](...e)},events:{},on(t,e){var n;return((n=this.events)[t]||(n[t]=[])).push(e),()=>{var i;this.events[t]=(i=this.events[t])==null?void 0:i.filter(h=>e!==h)}}});class Oa extends Error{constructor(e,n){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=n,this.name="ReasonError"}}class _u extends Oa{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class F1 extends Oa{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class Ir extends Oa{constructor(e,n){n?super(e,n):super("Disconnected",e),this.name="DisconnectedError"}}class W1 extends Ir{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function Vg(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let n=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${n}`}).join(",")}}`:""}class B1{constructor(e){this.channel=e,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",e=>{if(e.type==="info"){this._state||(this._state=this.stateFromInfo(e));return}this._state&&(e.type==="join"?this._state[e.id]=e.info:e.type==="leave"&&delete this._state[e.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(e=>e()),this.listeners.length=0}async join(e,n){if(!this._info)return this._info={id:e,info:n},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let e=await this.channel.perform("$presence:leave");return delete this._info,e}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let e=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(e),this._state}finally{delete this._promise}}stateFromInfo(e){return e.records.reduce((n,{id:i,info:h})=>(n[i]=h,n),{})}}const ls=Symbol("state");class Gg{constructor(e={}){this.emitter=Ol(),this.params=Object.freeze(e),this.presence=new B1(this),this.initialConnect=!0,this[ls]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Vg({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ls]}attached(e){if(this.receiver){if(this.receiver!==e)throw Error("Already connected to a different receiver");return!1}return this.receiver=e,!0}connecting(){this[ls]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ls]="connected";let e=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:e})):this.emit("connect",{reconnect:!0,restored:e})}restored(){if(this.state==="connected")throw Error("Already connected");this[ls]="connected";let e=!0,n=!0;this.initialConnect=!1,this.emit("connect",{reconnect:n,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[ls]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[ls]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",e))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(e,n){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,n)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(n){let i=this.receiver?this.receiver.logger:null;i&&i.warn("whisper failed: ",n)}}receive(e,n){this.emit("message",e,n)}on(e,n){return this.emitter.on(e,n)}once(e,n){let i=this.emitter.on(e,(...h)=>{i(),n(...h)});return i}emit(e,...n){return this.emitter.emit(e,...n)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((e,n)=>{let i=[()=>delete this._pendingSubscribe];i.push(this.on("connect",()=>{i.forEach(h=>h()),e()})),i.push(this.on("close",h=>{i.forEach(p=>p()),n(h||new Oa("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class z1{constructor(e){this.id=e,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(e){this.channels.includes(e)||this.channels.push(e)}remove(e){let n=this.channels.indexOf(e);n>-1&&this.channels.splice(n,1)}notify(e,...n){this.state=e==="restored"?"connected":e,n.length===1?this.channels.forEach(i=>i[e](n[0])):this.channels.forEach(i=>i[e]())}pending(e){this._checkIntent(e);let n=this._pendings[0];return!n||n.intent!==e?Promise.resolve():n.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(e){this._checkIntent(e);let n,i={promise:new Promise(p=>{n=p}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(i),1),n(i)},canceled:!1,acquired:!1},h=this._pendingTop;return this._pendings.push(i),h&&await h.promise,this.gvl&&await this.gvl.acquire(i,e),i.acquired=!0,i}close(e){this.disposed=!0,this.intent=void 0,this.notify("closed",e)}_checkIntent(e){if(!(e==="unsubscribed"||e==="subscribed"))throw Error(`Unknown subscription intent: ${e}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(e){let n=this._pendingTop;return!n||n.acquired||n.intent!==e?!1:(this._pendings.pop(),n.canceled=!0,!0)}}class j1{constructor(){this.queue=[]}async acquire(e,n){n==="subscribed"&&(this.queue.push(e.promise.then(()=>{this.queue.splice(this.queue.indexOf(e),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class H1{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new j1),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:n,unsubscribe:i}){let h=this._subscriptions[e]=new z1(e);return h.remoteId=this._localToRemote[e],h.subscriber=n,h.unsubscriber=i,h.gvl=this.glv,h}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,n){this._localToRemote[e]=n;let i=this.get(e);i&&(i.remoteId=n)}}class U1{constructor(e={}){this.subscriptions=new H1(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,n){this._remoteToLocal[n]=e,this.subscriptions.storeRemoteId(e,n),this.flush(n)}unsubscribe(e){let n=this.subscriptions.get(e);if(!n)return;let i=n.remoteId;i&&delete this._remoteToLocal[i],this.subscriptions.remove(e)}transmit(e,n,i){let h=this._remoteToLocal[e];if(!h){this._pendingMessages.push([e,n,i]);return}let p=this.subscriptions.get(h);p&&p.channels.forEach(m=>{m.receive(n,i)})}notify(e,n,i){let h=this._remoteToLocal[e];if(!h)return;let p=this.subscriptions.get(h);p&&p.channels.forEach(m=>m.emit(n,i))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let n=[];for(let i of this._pendingMessages)i[0]===e?this.transmit(i[0],i[1],i[2]):n.push(i);this._pendingMessages=n}}const Kg={debug:0,info:1,warn:2,error:3};class qg{constructor(e){this.level=e||"warn"}log(e,n,i){Kg[e]<Kg[this.level]||this.writeLogEntry(e,n,i)}writeLogEntry(){throw Error("Not implemented")}debug(e,n){this.log("debug",e,n)}info(e,n){this.log("info",e,n)}warn(e,n){this.log("warn",e,n)}error(e,n){this.log("error",e,n)}}class Na extends qg{writeLogEntry(){}}class V1{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let G1=0;class Yg{constructor(e={}){let{logger:n}=e;this.logger=n||new Na,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,n){let i={channel:e};n&&Object.assign(i,n);let h=Vg(i);if(this.pendingUnsubscriptions[h]){let m=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${m}`,h),new Promise(b=>{setTimeout(()=>{b(this.subscribe(e,n))},m)})}if(this.pendingSubscriptions[h])return this.logger.warn("subscription is already pending, skipping",h),Promise.reject(Error("Already subscribing"));let p=this.subscribeRetryInterval;return new Promise((m,b)=>{let d=++G1;this.pendingSubscriptions[h]={resolve:m,reject:b,id:d},this.cable.send(this.buildSubscribeRequest(h)),this.maybeRetrySubscribe(d,h,p)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,n,i){setTimeout(()=>{let h=this.pendingSubscriptions[n];h&&h.id===e&&(this.logger.warn(`no subscription ack received in ${i}ms, retrying subscribe`,n),this.cable.send(this.buildSubscribeRequest(n)),this.maybeExpireSubscribe(e,n,i))},i)}maybeExpireSubscribe(e,n,i){setTimeout(()=>{let h=this.pendingSubscriptions[n];h&&h.id===e&&(delete this.pendingSubscriptions[n],h.reject(new F1(`Haven't received subscription ack in ${i*2}ms for ${n}`)))},i)}unsubscribe(e){return this.cable.send({command:"unsubscribe",identifier:e}),this.pendingUnsubscriptions[e]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[e]},this.subscribeCooldownInterval),Promise.resolve()}perform(e,n,i){return n==="$whisper"?this.whisper(e,i):(i||(i={}),i.action=n,this.cable.send({command:"message",identifier:e,data:JSON.stringify(i)}),Promise.resolve())}whisper(e,n){return this.cable.send({command:"whisper",identifier:e,data:n}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:i,message:h,reason:p,reconnect:m}=e;if(n==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="welcome"){let b=e.sid;return b&&this.cable.setSessionId(b),this.cable.connected()}if(n==="disconnect"){let b=new Ir(p);this.reset(b),m===!1?this.cable.closed(b):this.cable.disconnected(b);return}if(n==="confirm_subscription"){let b=this.pendingSubscriptions[i];if(!b){this.logger.error("subscription not found, unsubscribing",{type:n,identifier:i}),this.unsubscribe(i);return}return delete this.pendingSubscriptions[i],b.resolve(i)}if(n==="reject_subscription"){let b=this.pendingSubscriptions[i];return b?(delete this.pendingSubscriptions[i],b.reject(new _u)):this.logger.error("subscription not found",{type:n,identifier:i})}if(h)return{identifier:i,message:h};this.logger.warn(`unknown message type: ${n}`,{message:e})}reset(e){for(let n in this.pendingSubscriptions)this.pendingSubscriptions[n].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const Xg=()=>Date.now()/1e3|0;class K1 extends Yg{constructor(e={}){super(e),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=e.historyTimestamp,this.disableSessionRecovery=e.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=Xg()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let n in this.pendingPresence)this.pendingPresence[n].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:i,message:h}=e;if(n==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(n==="reject_subscription")return super.receive(e);if(n==="confirm_subscription")return this.subscriptionStreams[i]||(this.subscriptionStreams[i]=new Set),super.receive(e);if(n==="ping")return this.restoreSince&&(this.restoreSince=Xg()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",i);return}if(n==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",i);return}if(n==="welcome"){if(this.disableSessionRecovery||(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),e.restored){let p=e.restored_ids||Object.keys(this.subscriptionStreams);for(let m of p)this.cable.send({identifier:m,command:"history",history:this.historyRequestFor(m)}),this.presenceInfo[m]&&this.cable.send({identifier:m,command:"join",presence:this.presenceInfo[m]});return this.cable.restored(p)}return this.cable.connected(this.sessionId)}if(n==="presence"){let p=h.type;if(p==="info"){let m=this.pendingPresence[i];m&&(delete this.pendingPresence[i],m.resolve(h))}else if(p==="error"){let m=this.pendingPresence[i];m&&(delete this.pendingPresence[i],m.reject(new Error("failed to retrieve presence")))}return{type:n,identifier:i,message:h}}if(h){let p=this.trackStreamPosition(i,e.stream_id,e.epoch,e.offset);return{identifier:i,message:h,meta:p}}this.logger.warn(`unknown message type: ${n}`,{message:e})}perform(e,n,i){switch(n){case"$presence:join":return this.join(e,i);case"$presence:leave":return this.leave(e,i);case"$presence:info":return this.presence(e,i)}return super.perform(e,n,i)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let n=super.buildSubscribeRequest(e),i=this.historyRequestFor(e);i&&(n.history=i,this.pendingHistory[e]=!0);let h=this.presenceInfo[e];return h&&(n.presence=h),n}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let n={},i=!1;if(this.subscriptionStreams[e])for(let h of this.subscriptionStreams[e]){let p=this.streamsPositions[h];p&&(i=!0,n[h]=p)}if(!(!i&&!this.restoreSince))return{since:this.restoreSince,streams:n}}trackStreamPosition(e,n,i,h){if(!(!n||!i))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(n),this.streamsPositions[n]={epoch:i,offset:h},{stream:n,epoch:i,offset:h}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,n){return this.presenceInfo[e]=n,this.cable.send({command:"join",identifier:e,presence:n}),Promise.resolve()}async leave(e,n){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:n}),Promise.resolve()}presence(e,n){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((i,h)=>{this.pendingPresence[e]={resolve:i,reject:h},this.cable.send({command:"presence",identifier:e,data:n})})}}class q1 extends Oa{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Au extends Gg{constructor(e,n){super(n),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}Kr(Au,"identifier","__ghost__");const Y1="$pubsub";class $u extends Gg{async perform(e,n){if(e.startsWith("$"))return super.perform(e,n);throw Error("not implemented")}}Kr($u,"identifier",Y1);const cs=Symbol("state");let X1=class{constructor({transport:t,protocol:e,encoder:n,logger:i,lazy:h,hubOptions:p,performFailures:m,transportConfigurator:b}){this.emitter=Ol(),this.transport=t,this.encoder=n,this.logger=i||new Na,this.protocol=e,this.performFailures=m||"throw",this.protocol.attached(this),this.hub=new U1(p||{}),this[cs]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=b,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,h===!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 e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(n){this.handleClose(n)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[cs]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new Ir("recovery_failed"))),this.hub.subscriptions.all().forEach(e=>this._resubscribe(e));let t=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(t){this.logger.info("connection recovered",{remoteIds:t}),this[cs]="connected",this.hub.subscriptions.all().forEach(i=>{t&&i.remoteId&&t.includes(i.remoteId)?i.notify("restored"):(i.notify("disconnected",new Ir("recovery_failed")),this._resubscribe(i))});let e=!this.initialConnect,n=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:n})}notify(t,e,n){e&&typeof e!="string"&&(n=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:n}):this.emit("info",{type:t,data:n})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new Ir(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(e=>e.notify("connecting")):this.hub.subscriptions.all().forEach(e=>{e.notify("disconnected",t)}),this.protocol.reset(t),this.hub.close(),this.transport.close(),this.emit("disconnect",t))}closed(t){if(this.state==="closed"||this.state==="idle")return;let e;t&&(e=t instanceof Ir?t:new Ir(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[cs]="closed";let n=e||new Ir("cable_closed");this.hub.subscriptions.all().forEach(i=>i.notify("disconnected",n)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(t);if(e===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",e);let n=this.protocol.receive(e);if(n){this.logger.debug("processed incoming message",n);let{type:i,identifier:h,message:p,meta:m}=n;i?this.hub.notify(h,i,p):this.hub.transmit(h,p,m)}}send(t){if(this.state==="closed")throw Error("Cable is closed");let e=this.encoder.encode(t);if(e===void 0){this.logger.error("failed to encode message",{message:t});return}this.logger.debug("outgoing message",t),this.transport.send(e)}keepalive(t){this.emit("keepalive",t)}streamFrom(t){let e=new $u({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new $u({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let n,i;return typeof t=="string"&&(i=t,t=Au),n=i?new t(i,e):new t(e),this.subscribe(n)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let n=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:i=>this._subscribe(i,t.channelId,t.params),unsubscribe:i=>this._unsubscribe(i)});return n.add(t),n.intent==="subscribed"&&n.state==="connected"&&t.connected(),n.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,n){let i=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:i});return}this.logger.debug("acquiring subscribe lock",{identifier:i});let h=await t.acquire("subscribed");if(h.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:i}),h.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:i}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),h.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:i}),h.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:i}),t.notify("connected"),h.release();return}let p={identifier:e,params:n};this.logger.debug("subscribing",p);try{let m=await this.protocol.subscribe(e,n);this.hub.subscribe(i,m),this.logger.debug("subscribed",{...p,remoteId:m}),t.notify("connected")}catch(m){if(m){if(m instanceof _u&&this.logger.warn("rejected",p),m instanceof Ir){this.logger.debug("disconnected during subscription; will retry on connect",p),h.release();return}this.logger.error("failed to subscribe",{error:m,...p})}t.close(m),this.hub.unsubscribe(i)}h.release()}unsubscribe(t){let e=t.identifier,n=this.hub.subscriptions.get(e);if(!n)throw Error(`Subscription not found: ${e}`);n.remove(t),t.closed(),n.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let n=await t.acquire("unsubscribed");if(n.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),n.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:t.intent}),n.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),n.release();return}let i=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:i}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),n.release();return}try{await this.protocol.unsubscribe(i),this.logger.debug("unsubscribed remotely",{id:e})}catch(h){h&&(h instanceof Ir?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:h}):this.logger.error("unsubscribe failed",{id:e,error:h}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",n.release()}async perform(t,e,n){if(this.performFailures==="throw")return this._perform(t,e,n);try{return await this._perform(t,e,n)}catch(i){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:i});return}}async _perform(t,e,n){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new q1;let i=this.hub.subscriptions.get(t);if(!i)throw Error(`Subscription not found: ${t}`);if(await i.pending("subscribed"),i.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let h=i.remoteId,p={id:h,action:e,payload:n};this.logger.debug("perform",p);try{let m=await this.protocol.perform(h,e,n);return m&&this.logger.debug("perform result",{message:m,request:p}),m}catch(m){throw this.logger.error("perform failed",{error:m,request:p}),m}}on(t,e){return this.emitter.on(t,e)}once(t,e){let n=this.emitter.on(t,(...i)=>{n(),e(...i)});return n}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let n=[()=>delete this._pendingConnect];n.push(this.on("connect",()=>{n.forEach(i=>i()),t()})),n.push(this.on("close",i=>{n.forEach(h=>h()),e(i)})),n.push(this.on("disconnect",i=>{n.forEach(h=>h()),e(i)}))}),this._pendingConnect)}};const Z1={maxMissingPings:2,maxReconnectAttempts:1/0},Gs=()=>Date.now(),Zg=(t,e)=>{e=e||{};let{backoffRate:n,jitterRatio:i,maxInterval:h}=e;return n=n||2,i===void 0&&(i=.5),p=>{let m=t*n**p,b=m*n,d=m+(b-m)*Math.random(),g=2*(Math.random()-.5)*i;return d=d*(1+g),h&&h<d&&(d=h),d}};let Qg=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},Z1,e),this.strategy=e.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=e.maxMissingPings,this.maxReconnectAttempts=e.maxReconnectAttempts,this.logger=e.logger||new Na,this.state="pending_connect",this.attempts=0,this.disconnectedAt=Gs()}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=Gs(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=Gs(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=Gs(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=Gs()})),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=Gs()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new W1))}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 Q1{constructor(e,n={}){this.transports=e,this.transport=null,this.emitter=Ol(),this.unbind=[],this.logger=n.logger||new Na}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let n=this.transports[e];try{this.transport=n,this.resetListeners(),this.logger.debug(`Trying to connect via ${n.displayName()}`),await n.open(),this.logger.debug(`Connected via ${n.displayName()}`);return}catch(i){this.logger.debug(`Failed to connect via ${n.displayName()}: ${i.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(e){if(!this.transport)throw new Error("No transport is open");this.transport.send(e)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(e,n){this.transports.forEach(i=>{i.setParam(e,n)})}setToken(e,n){this.transports.forEach(i=>{i.setToken(e,n)})}on(e,n){return this.emitter.on(e,n)}once(e,n){let i=this.emitter.on(e,(...h)=>{i(),n(...h)});return i}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(e=>e()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",e=>{this.emitter.emit("data",e)}),this.transport.on("close",e=>{this.emitter.emit("close",e)}),this.transport.on("error",e=>{this.emitter.emit("error",e)}))}}class J1{constructor(e,n={}){this.url=e;let i=n.websocketImplementation;if(i)this.Impl=i;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=Ol();let{format:h,subprotocol:p,authStrategy:m}=n;this.format=h||"text",this.connectionOptions=n.websocketOptions,this.authStrategy=m||"param",this.authProtocol="",this.subprotocol=p}displayName(){return"WebSocket("+this.url+")"}open(){let e=this.subprotocol;return this.authStrategy==="sub-protocol"&&(e=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,e,this.connectionOptions):this.ws=new this.Impl(this.url,e),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((n,i)=>{let h=[];h.push(this.once("open",()=>{h.forEach(p=>p()),n()})),h.push(this.once("close",()=>{h.forEach(p=>p()),i(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,n){let i=new URL(this.url);i.searchParams.set(e,n);let h=`${i.protocol}//${i.host}${i.pathname}?${i.searchParams}`;this.setURL(h)}setToken(e,n="jid"){if(this.authStrategy==="param")this.setParam(n,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let i=`x-${n}`.toLowerCase();i=Object.keys(this.connectionOptions.headers).find(h=>h.toLowerCase()===i)||i,this.connectionOptions.headers[i]=e}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${e}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(e){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(e)}close(){this.ws?this.onclose():this.connected=!1}on(e,n){return this.emitter.on(e,n)}once(e,n){let i=this.emitter.on(e,(...h)=>{i(),n(...h)});return i}initListeners(){this.ws.onerror=e=>{this.connected&&this.emitter.emit("error",e.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=e=>{let n=e.data;this.format==="binary"&&(n=new Uint8Array(n)),this.emitter.emit("data",n)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}const Jg={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function eC(t,e){if(typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),e=e||{},!t&&!e.transport)throw Error("URL or transport must be specified");e=Object.assign({},Jg,e);let{protocol:n,websocketImplementation:i,websocketFormat:h,websocketOptions:p,websocketAuthStrategy:m,fallbacks:b,logLevel:d,logger:g,transport:o,encoder:a,lazy:u,monitor:l,pingInterval:s,reconnectStrategy:c,maxMissingPings:f,maxReconnectAttempts:w,subprotocol:x,tokenRefresher:E,historyTimestamp:M,protocolOptions:k,concurrentSubscribes:C,performFailures:O,transportConfigurator:L,auth:R}=e;if(g=g||new Na(d),typeof n=="string"){x=x||n;let F=n.substring(0,n.lastIndexOf("-")),N=n.substring(n.lastIndexOf("-")+1);if(k=k||{},F==="actioncable-v1")n=new Yg({logger:g,...k});else if(F==="actioncable-v1-ext")n=new K1({logger:g,historyTimestamp:M,...k});else throw Error(`Protocol is not supported yet: ${n}`);if(N==="json")a=a||new V1,h=h||"text";else if(N==="msgpack"){if(h="binary",!a)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(N==="protobuf"){if(h=h||"binary",!a)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${n}`)}if(!n)throw Error("Protocol must be specified");o=o||new J1(t,{websocketImplementation:i,websocketOptions:p,subprotocol:x,authStrategy:m,format:h}),b&&(o=new Q1([o,...b],{logger:g})),R&&R.token&&o.setToken(R.token,R.param||"jid"),c=c||Zg(s),l!==!1&&(l=l||new Qg({pingInterval:s,reconnectStrategy:c,maxMissingPings:f,maxReconnectAttempts:w,logger:g}));let I={concurrentSubscribes:C},z=new X1({protocol:n,transport:o,encoder:a,logger:g,lazy:u,hubOptions:I,performFailures:O,transportConfigurator:L});return l&&(l.watch(z),z.monitor=l),E&&tC(z,async()=>{try{await E(o)}catch(F){return g.error("Failed to refresh authentication token: "+F),!1}return z.connect().catch(()=>{}),!0}),z}function tC(t,e){let n=!1;t.on("connect",()=>n=!1),t.on("close",async i=>{if(i){if(n){t.logger.warn("Token auto-refresh is disabled",i);return}i.reason==="token_expired"&&(n=!0,await e())}})}class nC{constructor(e){this.channel=e}notify(e,...n){typeof this[e]=="function"&&this[e](...n)}perform(e,n={}){this.channel.perform(e,n)}send(e){this.channel.send(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class iC extends Au{constructor(e,n,i){super(e,n),this.subscription=new nC(this),Object.assign(this.subscription,i),this.on("connect",({reconnect:h})=>this.subscription.notify("connected",{reconnected:h})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",h=>this.subscription.notify("received",h)),this.on("close",h=>{h&&h instanceof _u?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class rC{constructor(e){this.cable=e}create(e,n){let i,h;typeof e=="object"?(i=e.channel,delete e.channel,h=e):(i=e,h={});let p=new iC(i,h,n);return p.subscription.notify("initialized"),this.cable.subscribe(p),p.subscription}findAll(e){return this.cable.hub.channels.filter(n=>n.identifier===e).map(n=>n.subscription)}}class oC{constructor(e){this.cable=e,this.subscriptions=new rC(e)}}class sC extends qg{writeLogEntry(e,n,i){i?console[e](n,i):console[e](n)}}class aC extends Qg{watch(e){super.watch(e),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let e=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},n=h=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:h})},i=()=>this.disconnect(new Ir("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",n,!1),window.addEventListener("online",n,!1),window.addEventListener("resume",n,!1),window.addEventListener("freeze",i,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",n,!1),window.removeEventListener("online",n,!1),window.removeEventListener("resume",n,!1),window.removeEventListener("freeze",i,!1)})}}disconnect(e){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:e.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(e))}}const lC=["cable","action-cable"],cC="/cable",Nl=(t,e)=>{for(let n of lC){let i=t.head.querySelector(`meta[name='${n}-${e}']`);if(i)return i.getAttribute("content")}},ef=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,uC=()=>{if(typeof document<"u"&&document.head){let t=Nl(document,"url");if(t)return ef(t)}return ef(cC)},hC=()=>{if(typeof document<"u"&&document.head){let t=Nl(document,"history-timestamp");if(t)return t|0}},dC=()=>{if(typeof document<"u"&&document.head)return Nl(document,"token")},pC=()=>{if(typeof document<"u"&&document.head)return Nl(document,"token-param")};function gC(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||uC(),e=e||{},e.historyTimestamp||(e.historyTimestamp=hC());let n=dC();if(n){let g=pC();e.auth=Object.assign({token:n,param:g},e.auth||{})}e=Object.assign({},Jg,e);let{logLevel:i,logger:h,pingInterval:p,reconnectStrategy:m,maxMissingPings:b,maxReconnectAttempts:d}=e;return h=e.logger=e.logger||new sC(i),m=e.reconnectStrategy=e.reconnectStrategy||Zg(p),e.monitor!==!1&&(e.monitor=e.monitor||new aC({pingInterval:p,reconnectStrategy:m,maxMissingPings:b,maxReconnectAttempts:d,logger:h})),eC(t,e)}function fC(t,e){let n=gC(t,e);return new oC(n)}class tf{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,n,i={},h={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(p=>{if(p&&OpenC3Auth.setTokens(),this._cable==null){let m=this._url+"?scope="+encodeURIComponent(n)+"&authorization="+encodeURIComponent(localStorage.openc3Token);m=new URL(m,document.baseURI).href,this._cable=fC(m)}return this._cable.subscriptions.create({channel:e,...h},i)})}recordPing(){}}Pn("W",tf);class Mu{constructor(e,n,i="",h=""){this.keyword=e.keyword,this.parameters=e.parameters,this.filename=e.filename,this.line=e.line,this.lineNumber=e.lineNumber,this.message=n,this.usage=i,this.url=h}}Pn("S",Mu);class mC{constructor(){Kr(this,"keyword",null),Kr(this,"parameters",[]),Kr(this,"filename",""),Kr(this,"line",""),Kr(this,"lineNumber",0),Kr(this,"url","https://docs.openc3.com/docs/configuration")}verify_num_parameters(e,n,i=""){for(let h=1;h<=e;h++)if(this.parameters[h-1]===void 0)throw new Mu(this,`Not enough parameters for ${this.keyword}.`,i,this.url);if(n&&this.parameters[n]!==void 0)throw new Mu(this,`Too many parameters for ${this.keyword}.`,i,this.url)}remove_quotes(e){if(e.length<2)return e;let n=e.charAt(0);if(n!=='"'&&n!=="'")return e;let i=e.charAt(e.length-1);return n!==i?e:e.substring(1,e.length-1)}scan_string(e,n){if(!n.global)throw"rx must have 'global' flag set";let i=[];return e.replace(n,function(h){return i.push(h),h}),i}parse_string(e,n,i,h,p){let m=!1;this.line="",this.keyword=null,this.parameters=[],this.filename=n;let b=e.split(`
1398
+ `),d=b.length;for(let g=0;g<d;g++){this.lineNumber=g+1;let o=b[g].trim();if(o.length===0){i&&p(null,[],this.line,this.lineNumber);continue}if(m===!0){if(o[0]==="#")continue;o=o.substring(1,o.length)}let a=o.charAt(o.length-1),u=!1;switch(a){case"+":u=!0;case"\\":let w=o.substring(0,o.length-1).trim();this.line+=w.substring(0,w.length-1),u&&(this.line+=`
1399
+ `),m=!0;continue;case"&":this.line+=o.substring(0,o.length-1);continue;default:this.line+=o}m=!1;let l=/("([^\\"]|\\.)*")|('([^\\']|\\.)*')|\S+/g,s=this.scan_string(this.line,l),c="";if(s.length>0&&(c=c+s[0]),c.length===0||c.charAt(0)==="#"?this.keyword=null:this.keyword=c.toUpperCase(),this.parameters=[],this.keyword===null){i&&p(this.keyword,this.parameters,this.line,this.lineNumber),this.line="";continue}let f=s.length;if(f>1)for(let w=1;w<f;w++){let x=s[w];if(x.length>0&&x.charAt(0)==="#")break;h?this.parameters.push(this.remove_quotes(x)):this.parameters.push(x)}p(this.keyword,this.parameters,this.line,this.lineNumber),this.line=""}}}Pn("B",mC);function Da(t){return vC.test(t)}const vC=/^-?[0-9]+$/;function nf(t){return yC.test(t)}const yC=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function rf(t,e){if(Da(t))return Number.isSafeInteger(Number.parseInt(t,10));const n=Number.parseFloat(t),i=String(n);if(t===i)return!0;const h=of(t),p=of(i);return!!(h===p||(e==null?void 0:e.approx)===!0&&!Da(t)&&p.length>=14&&h.startsWith(p.substring(0,14)))}let Pa=(function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t})({});function wC(t){if(rf(t,{approx:!1}))return;if(Da(t))return Pa.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?Pa.underflow:Pa.truncate_float:Pa.overflow}function of(t){const{start:e,end:n}=bC(t),i=t.substring(e,n),h=i.indexOf(".");return h===-1?i:i.substring(0,h)+i.substring(h+1)}function bC(t){let e=0;for(t[0]==="-"&&e++;t[e]==="0"||t[e]===".";)e++;let n=t.lastIndexOf("e");for(n===-1&&(n=t.lastIndexOf("E")),n===-1&&(n=t.length);(t[n-1]==="0"||t[n-1]===".")&&n>e;)n--;return{start:e,end:n}}class xC{constructor(e){if(Kr(this,"isLosslessNumber",!0),!nf(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=wC(this.value);if(e===void 0||e===Pa.truncate_float)return Number.parseFloat(this.value);if(Da(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${e} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function CC(t){return t&&typeof t=="object"&&t.isLosslessNumber||!1}function kC(t){return new xC(t)}function SC(t,e){return Tu({"":t},"",t,e)}function Tu(t,e,n,i){return Array.isArray(n)?i.call(t,e,AC(n,i)):n&&typeof n=="object"&&!CC(n)?i.call(t,e,_C(n,i)):i.call(t,e,n)}function _C(t,e){for(const n of Object.keys(t)){const i=Tu(t,n,t[n],e);i!==void 0?t[n]=i:delete t[n]}return t}function AC(t,e){for(let n=0;n<t.length;n++)t[n]=Tu(t,String(n),t[n],e);return t}function $C(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:kC,i=0;const h=b();return s(h),f(),e?SC(h,e):h;function p(){if(t.charCodeAt(i)===RC){i++,g();const A={};let S=!0;for(;i<t.length&&t.charCodeAt(i)!==af;){S?S=!1:(u(),g());const D=i,j=o();if(j===void 0){E();return}g(),l();const U=b();if(U===void 0){R();return}Object.prototype.hasOwnProperty.call(A,j)&&!Iu(U,A[j])&&M(j,D+1),A[j]=U}return t.charCodeAt(i)!==af&&k(),i++,A}}function m(){if(t.charCodeAt(i)===OC){i++,g();const A=[];let S=!0;for(;i<t.length&&t.charCodeAt(i)!==lf;){S?S=!1:u();const D=b();c(D),A.push(D)}return t.charCodeAt(i)!==lf&&C(),i++,A}}function b(){g();const A=o()??a()??p()??m()??d("true",!0)??d("false",!1)??d("null",null);return g(),A}function d(A,S){if(t.slice(i,i+A.length)===A)return i+=A.length,S}function g(){for(;MC(t.charCodeAt(i));)i++}function o(){if(t.charCodeAt(i)===Eu){i++;let A="";for(;i<t.length&&t.charCodeAt(i)!==Eu;){if(t.charCodeAt(i)===LC){const S=t[i+1],D=EC[S];D!==void 0?(A+=D,i++):S==="u"?Dl(t.charCodeAt(i+2))&&Dl(t.charCodeAt(i+3))&&Dl(t.charCodeAt(i+4))&&Dl(t.charCodeAt(i+5))?(A+=String.fromCharCode(Number.parseInt(t.slice(i+2,i+6),16)),i+=5):I(i):L(i)}else IC(t.charCodeAt(i))?A+=t[i]:O(t[i]);i++}return x(),i++,A}}function a(){const A=i;if(t.charCodeAt(i)===cf&&(i++,w(A)),t.charCodeAt(i)===Lu)i++;else if(TC(t.charCodeAt(i)))for(i++;Pl(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===jC)for(i++,w(A);Pl(t.charCodeAt(i));)i++;if(t.charCodeAt(i)===KC||t.charCodeAt(i)===GC)for(i++,(t.charCodeAt(i)===cf||t.charCodeAt(i)===WC)&&i++,w(A);Pl(t.charCodeAt(i));)i++;if(i>A)return n(t.slice(A,i))}function u(){if(t.charCodeAt(i)!==zC)throw new SyntaxError(`Comma ',' expected after value ${N()}`);i++}function l(){if(t.charCodeAt(i)!==HC)throw new SyntaxError(`Colon ':' expected after property name ${N()}`);i++}function s(A){if(A===void 0)throw new SyntaxError(`JSON value expected ${N()}`)}function c(A){if(A===void 0)throw new SyntaxError(`Array item expected ${N()}`)}function f(){if(i<t.length)throw new SyntaxError(`Expected end of input ${N()}`)}function w(A){if(!Pl(t.charCodeAt(i))){const S=t.slice(A,i);throw new SyntaxError(`Invalid number '${S}', expecting a digit ${N()}`)}}function x(){if(t.charCodeAt(i)!==Eu)throw new SyntaxError(`End of string '"' expected ${N()}`)}function E(){throw new SyntaxError(`Quoted object key expected ${N()}`)}function M(A,S){throw new SyntaxError(`Duplicate key '${A}' encountered at position ${S}`)}function k(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${N()}`)}function C(){throw new SyntaxError(`Array item or end of array ']' expected ${N()}`)}function O(A){throw new SyntaxError(`Invalid character '${A}' ${z()}`)}function L(A){const S=t.slice(A,A+2);throw new SyntaxError(`Invalid escape character '${S}' ${z()}`)}function R(){throw new SyntaxError(`Object value expected after ':' ${z()}`)}function I(A){const S=t.slice(A,A+6);throw new SyntaxError(`Invalid unicode character '${S}' ${z()}`)}function z(){return`at position ${i}`}function F(){return i<t.length?`but got '${t[i]}'`:"but reached end of input"}function N(){return`${F()} ${z()}`}}function MC(t){return t===NC||t===DC||t===PC||t===FC}function Dl(t){return t>=Lu&&t<=Ru||t>=UC&&t<=qC||t>=VC&&t<=YC}function Pl(t){return t>=Lu&&t<=Ru}function TC(t){return t>=BC&&t<=Ru}function IC(t){return t>=32&&t<=1114111}function Iu(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((n,i)=>Iu(n,e[i])):sf(t)&&sf(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(n=>Iu(t[n],e[n])):!1}function sf(t){return typeof t=="object"&&t!==null}const EC={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
1400
+ `,r:"\r",t:" "},LC=92,RC=123,af=125,OC=91,lf=93,NC=32,DC=10,PC=9,FC=13,Eu=34,WC=43,cf=45,Lu=48,BC=49,Ru=57,zC=44,jC=46,HC=58,UC=65,VC=97,GC=69,KC=101,qC=70,YC=102;function uf(t,e,n,i){return h(t);function h(d,g){if(Array.isArray(i)){const o=i.find(a=>a.test(d));if(o){const a=o.stringify(d);if(typeof a!="string"||!nf(a))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${a})`);return a}}if(typeof d=="boolean"||typeof d=="number"||typeof d=="string"||d===null||d instanceof Date||d instanceof Boolean||d instanceof Number||d instanceof String)return JSON.stringify(d);if(d!=null&&d.isLosslessNumber||typeof d=="bigint")return d.toString();if(Array.isArray(d))return p(d);if(d&&typeof d=="object")return m(d)}function p(d,g){if(d.length===0)return"[]";let o="[";for(let a=0;a<d.length;a++){const u=d[a];typeof u<"u"&&typeof u!="function"?o+=h(u):o+="null",a<d.length-1&&(o+=",")}return o+="]",o}function m(d,g){if(typeof d.toJSON=="function")return uf(d.toJSON(),e,n,void 0);const o=Array.isArray(e)?e.map(String):Object.keys(d);if(o.length===0)return"{}";let a=!0,u="{";for(const l of o){const s=d[l];if(b(l,s)){a?a=!1:u+=",";const c=JSON.stringify(l);u+=`${c}:`,u+=h(s)}}return u+="}",u}function b(d,g){return typeof g<"u"&&typeof g!="function"&&typeof g!="symbol"}}function XC(t){return Da(t)&&!rf(t)?BigInt(t):parseFloat(t)}class Ks{constructor(){Kr(this,"id",1)}async exec(e,n,i={},h={},p=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return i.scope=window.openc3Scope,h.manual=!0,(await ku.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:n,id:this.id,keyword_params:i},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...h},timeout:p,transformRequest:[(m,b)=>uf(m)],transformResponse:[m=>$C(m,void 0,XC)]})).data.result}catch(m){let b=new Error;throw m.response?(b.name=m.response.data.error.data.class,b.message=m.response.data.error.data.message,b.object=m.response.data.error):m.request?(b.name="Request error",b.message="Request error, no response received"):b=m,b}}decode_openc3_type(e){if(e!==null&&typeof e=="object"&&e.json_class=="Float"&&e.raw){if(e.raw=="NaN")return NaN;if(e.raw=="Infinity")return 1/0;if(e.raw=="-Infinity")return-1/0}return null}encode_openc3_type(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(e=>{e&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,n){return this.exec("map_target_to_interface",[e,n])}connect_interface(e,...n){return n.length>0?this.exec("connect_interface",[e,...n]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,n,...i){return this.exec("interface_cmd",[e,n,...i])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,n,i){return this.exec("get_item",[e,n,i])}get_param(e,n,i){return this.exec("get_param",[e,n,i])}get_parameter(e,n,i){return this.exec("get_param",[e,n,i])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(e,n){return this.exec("get_tlm",[e,n])}get_telemetry(e,n){return this.exec("get_tlm",[e,n])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_tlm",[e])}get_all_tlm_names(e,n=!1){return this.exec("get_all_tlm_names",[e],{hidden:n})}get_all_telemetry_names(e){return this.exec("get_all_tlm_names",[e])}get_all_tlm_item_names(e){return this.exec("get_all_tlm_item_names",[e])}async get_tlm_packet(e,n,i,h=30){const p=await this.exec("get_tlm_packet",[e,n],{type:i,stale_time:h});if(p!=null){let m=p.length,b=null;for(let d=0;d<m;d++)b=this.decode_openc3_type(p[d][1]),b!==null&&(p[d][1]=b)}return p}get_packet_derived_items(e,n){return this.exec("get_packet_derived_items",[e,n])}get_tlm_buffer(e,n){return this.exec("get_tlm_buffer",[e,n])}get_tlm_available(e){return this.exec("get_tlm_available",[e])}async get_tlm_values(e,n=30,i=null,h=null,p=null){let m={stale_time:n};i!==null&&(m.cache_timeout=i),h!==null&&(m.start_time=h.toISOString()),p!==null&&(m.end_time=p.toISOString());const b=await this.exec("get_tlm_values",[e],m,{},1e4);if(b&&b.length>0){let d=b[0].length,g=null;for(let o=0;o<d;o++)g=this.decode_openc3_type(b[0][o]),g!==null&&(b[0][o]=g)}return b}get_limits(e,n,i){return this.exec("get_limits",[e,n,i])}async tlm(e,n,i,h="CONVERTED"){let p=null;if(n===void 0)p=await this.exec("tlm",[e]);else if(i===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(n))p=await this.exec("tlm",[e],{type:n});else{let b=new Error;throw b.name="TypeError",b.message=`Invalid data type ${n}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,b}else p=await this.exec("tlm",[e,n,i],{type:h});let m=this.decode_openc3_type(p);return m!==null&&(p=m),p}async inject_tlm(e,n,i=null,h="CONVERTED"){await this.exec("inject_tlm",[e,n,i],{type:h})}set_tlm(e,n,i,h){return this.exec("set_tlm",[e,n,i],{type:h})}override_tlm(e,n,i,h){return this.exec("override_tlm",[e,n,i],{type:h})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,n,i,h){return this.exec("normalize_tlm",[e,n,i],{type:h})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_cmds",[e])}get_all_cmd_names(e,n=!1){return this.exec("get_all_cmd_names",[e],{hidden:n})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,n){return this.exec("get_cmd",[e,n])}get_command(e,n){return this.exec("get_cmd",[e,n])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,n,i,h="CONVERTED"){return this.exec("get_cmd_value",[e,n,i,h])}get_cmd_buffer(e,n){return this.exec("get_cmd_buffer",[e,n])}_cmd(e,n,i,h,p,m={}){let b=null;for(let d in h)Object.prototype.hasOwnProperty.call(h,d)&&(b=this.encode_openc3_type(h[d]),b!==null&&(h[d]=b));return this.exec(e,[n,i,h],m,p)}get_cmd_hazardous(e,n,i,h={}){return n===void 0?this.exec("get_cmd_hazardous",e,{},h):this._cmd("get_cmd_hazardous",e,n,i,h)}cmd(e,n,i,h={},p={}){return n===void 0?this.exec("cmd",e,{},h):this._cmd("cmd",e,n,i,h,p)}cmd_no_range_check(e,n,i,h={},p={}){return n===void 0?this.exec("cmd_no_range_check",e,{},h,p):this._cmd("cmd_no_range_check",e,n,i,h,p)}cmd_raw(e,n,i,h={},p={}){return n===void 0?this.exec("cmd_raw",e,{},h,p):this._cmd("cmd_raw",e,n,i,h,p)}cmd_raw_no_range_check(e,n,i,h={},p={}){return n===void 0?this.exec("cmd_raw_no_range_check",e,{},h,p):this._cmd("cmd_raw_no_range_check",e,n,i,h,p)}cmd_no_hazardous_check(e,n,i,h={},p={}){return n===void 0?this.exec("cmd_no_hazardous_check",e,{},h,p):this._cmd("cmd_no_hazardous_check",e,n,i,h,p)}cmd_no_checks(e,n,i,h={},p={}){return n===void 0?this.exec("cmd_no_checks",e,{},h,p):this._cmd("cmd_no_checks",e,n,i,h,p)}cmd_raw_no_hazardous_check(e,n,i,h={},p={}){return n===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},h,p):this._cmd("cmd_raw_no_hazardous_check",e,n,i,h,p)}cmd_raw_no_checks(e,n,i,h={},p={}){return n===void 0?this.exec("cmd_raw_no_checks",e,{},h,p):this._cmd("cmd_raw_no_checks",e,n,i,h,p)}build_cmd(e,n,i,h={},p={}){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,i,h,p)}build_command(e,n,i,h={},p={}){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,i,h,p)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(e,n){return this.exec("send_raw",[e,n])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,n){return this.exec("load_config",[e,n])}save_config(e,n,i){return this.exec("save_config",[e,n,i])}delete_config(e,n){return this.exec("delete_config",[e,n])}enable_limits(e,n,i){return this.exec("enable_limits",[e,n,i])}disable_limits(e,n,i){return this.exec("disable_limits",[e,n,i])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(e){return this.exec("get_overall_limits_state",[e])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(e,n){return this.exec("get_setting",[e],n)}get_settings(e,n){return this.exec("get_settings",e,n)}set_setting(e,n){return this.exec("set_setting",[e,n])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(e,n){return this.exec("set_setting",[e,n])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const n=new TextEncoder().encode(e),i=await crypto.subtle.digest("SHA-256",n),h=new Uint8Array(i);return Array.from(h).map(p=>p.toString(16).padStart(2,"0")).join("")}}}Pn("H",Ks);var hf={exports:{}},df;function ZC(){return df||(df=1,(function(t,e){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(n,i,h){function p(g,o){function a(R,I,z){if(!(R.length<I)){var F=R.slice(0,I),N=R.slice(I),A=/^(?:(\s+)|(\S+)(\s+))/.exec(N),S=/(?:(\s+)|(\s+)(\S+))$/.exec(F),D=0,j=0;if(S&&!S[2]&&(D=I-S[1].length,j=I),A&&!A[2]&&(D||(D=I),j=I+A[1].length),D)return{start:D,end:j};if(S&&S[2]&&S.index>z)return{start:S.index,end:S.index+S[2].length};if(A&&A[2])return D=I+A[2].length,{start:D,end:D+A[3].length}}}for(var u=o.column||g.getOption("printMarginColumn"),l=o.allowMerge!=0,s=Math.min(o.startRow,o.endRow),c=Math.max(o.startRow,o.endRow),f=g.session;s<=c;){var w=f.getLine(s);if(w.length>u){var x=a(w,u,5);if(x){var E=/^\s*/.exec(w)[0];f.replace(new b(s,x.start,s,x.end),`
1401
+ `+E)}c++}else if(l&&/\S/.test(w)&&s!=c){var M=f.getLine(s+1);if(M&&/\S/.test(M)){var k=w.replace(/\s+$/,""),C=M.replace(/^\s+/,""),O=k+" "+C,x=a(O,u,5);if(x&&x.start>k.length||O.length<u){var L=new b(s,k.length,s+1,M.length-C.length);f.replace(L," "),s--,c--}else k.length<w.length&&f.remove(new b(s,k.length,s,w.length))}}s++}}function m(g){if(g.command.name=="insertstring"&&/\S/.test(g.args)){var o=g.editor,a=o.selection.cursor;if(a.column<=o.renderer.$printMarginColumn)return;var u=o.session.$undoManager.$lastDelta;p(o,{startRow:a.row,endRow:a.row,allowMerge:!1}),u!=o.session.$undoManager.$lastDelta&&o.session.markUndoGroup()}}var b=n("../range").Range,d=n("../editor").Editor;n("../config").defineOptions(d.prototype,"editor",{hardWrap:{set:function(g){g?this.commands.on("afterExec",m):this.commands.off("afterExec",m)},value:!1}}),i.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(n,i,h){function p(y){return{row:y.line,column:y.ch}}function m(y){return new De(y.row,y.column)}function b(y,$,_){if($.line===_.line&&$.ch>=_.ch-1){var P=y.getLine($.line),W=P.charCodeAt($.ch);55296<=W&&W<=55551&&(_.ch+=1)}return{start:$,end:_}}function d(y){y.setOption("disableInput",!0),y.setOption("showCursorWhenSelecting",!1),ze.signal(y,"vim-mode-change",{mode:"normal"}),y.on("cursorActivity",jo),O(y),ze.on(y.getInputField(),"paste",o(y))}function g(y){y.setOption("disableInput",!1),y.off("cursorActivity",jo),ze.off(y.getInputField(),"paste",o(y)),y.state.vim=null,di&&clearTimeout(di)}function o(y){var $=y.state.vim;return $.onPasteFn||($.onPasteFn=function(){$.insertMode||(y.setCursor(ve(y.getCursor(),0,1)),On.enterInsertMode(y,{},$))}),$.onPasteFn}function a(y,$){return $>=y.firstLine()&&$<=y.lastLine()}function u(y){return/^[a-z]$/.test(y)}function l(y){return"()[]{}".indexOf(y)!=-1}function s(y){return ga.test(y)}function c(y){return Jt.test(y)}function f(y){return/^\s*$/.test(y)}function w(y){return".?!".indexOf(y)!=-1}function x(y,$){for(var _=0;_<$.length;_++)if($[_]==y)return!0;return!1}function E(y,$,_,P,W){if($===void 0&&!W)throw Error("defaultValue is required unless callback is provided");if(_||(_="string"),Wt[y]={type:_,defaultValue:$,callback:W},P)for(var B=0;B<P.length;B++)Wt[P[B]]=Wt[y];$&&M(y,$)}function M(y,$,_,P){var W=Wt[y];P=P||{};var B=P.scope;if(!W)return new Error("Unknown option: "+y);if(W.type=="boolean"){if($&&$!==!0)return new Error("Invalid argument: "+y+"="+$);$!==!1&&($=!0)}W.callback?(B!=="local"&&W.callback($,void 0),B!=="global"&&_&&W.callback($,_)):(B!=="local"&&(W.value=W.type=="boolean"?!!$:$),B!=="global"&&_&&(_.state.vim.options[y]={value:$}))}function k(y,$,_){var P=Wt[y];_=_||{};var W=_.scope;if(!P)return new Error("Unknown option: "+y);if(P.callback){var B=$&&P.callback(void 0,$);return W!=="global"&&B!==void 0?B:W!=="local"?P.callback():void 0}var B=W!=="global"&&$&&$.state.vim.options[y];return(B||W!=="local"&&P||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Ln()}function O(y){return y.state.vim||(y.state.vim={inputState:new A,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 L(){He={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:wr(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new q({}),searchHistoryController:new Q,exCommandHistoryController:new Q};for(var y in Wt){var $=Wt[y];$.value=$.defaultValue}}function R(y){function $(Y){typeof Y=="string"?bn.value=Y:bn=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=`
1402
+ `;else if(br[_]){var W=bn.value,B={key:br[_],target:{value:W,selectionEnd:W.length,selectionStart:W.length}};bn.onKeyDown&&bn.onKeyDown(B,bn.value,$),bn&&bn.onKeyUp&&bn.onKeyUp(B,bn.value,$);return}}if(y==`
1403
+ `){var G=bn;bn=null,G.onClose&&G.onClose(G.value)}else bn.value=(bn.value||"")+y}function I(y,$,_){var P=ln;if(_){if(Oi.indexOf(_)!=-1)return;Oi.push(_),ln=_.noremap!=0}try{for(var W=O(y),B=/<(?:[CSMA]-)*\w+>|./gi,G;G=B.exec($);){var Y=G[0],Z=W.insertMode;if(bn){R(Y);continue}var ie=wt.handleKey(y,Y,"mapping");if(!ie&&Z&&W.insertMode){if(Y[0]=="<"){var ae=Y.toLowerCase().slice(1,-1),be=ae.split("-");if(ae=be.pop()||"",ae=="lt")Y="<";else if(ae=="space")Y=" ";else if(ae=="cr")Y=`
1404
+ `;else{if(br.hasOwnProperty(ae)){Y=br[ae],Uo(y,Y);continue}Y=Y[0],B.lastIndex=G.index+1}}y.replaceSelection(Y)}}}finally{if(Oi.pop(),ln=Oi.length?P:!1,!Oi.length&&bn){var Se=bn;bn=null,_i(y,Se)}}}function z(y,$){var _=y.key;if(!Ni[_]){_.length>1&&_[0]=="n"&&(_=_.replace("Numpad","")),_=Qn[_]||_;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-"),$&&!$.expectLiteralNext&&_.length==1){if(Un.keymap&&_ in Un.keymap)(Un.remapCtrl!=0||!P)&&(_=Un.keymap[_]);else if(_.charCodeAt(0)>255){var W=y.code&&y.code.slice(-1)||"";y.shiftKey||(W=W.toLowerCase()),W&&(_=W)}}return P+=_,P.length>1&&(P="<"+P+">"),P}}function F(y,$){Un.string!==y&&(Un=N(y)),Un.remapCtrl=$}function N(y){function $(P){return P.split(/\\?(.)/).filter(Boolean)}var _={};return y?(y.split(/((?:[^\\,]|\\.)+),/).map(function(P){if(P){var W=P.split(/((?:[^\\;]|\\.)+);/);if(W.length==3){var B=$(W[1]),G=$(W[2]);if(B.length!==G.length)return;for(var Y=0;Y<B.length;++Y)_[B[Y]]=G[Y]}else if(W.length==1){var Z=$(P);if(Z.length%2!==0)return;for(var Y=0;Y<Z.length;Y+=2)_[Z[Y]]=Z[Y+1]}}}),{keymap:_,string:y}):{keymap:_,string:""}}function A(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}function S(y,$){y.state.vim.inputState=new A,y.state.vim.expectLiteralNext=!1,ze.signal(y,"vim-command-done",$)}function D(){this.removed=[],this.inserted=""}function j(y,$,_){this.clear(),this.keyBuffer=[y||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!$,this.blockwise=!!_}function U(y,$){var _=He.registerController.registers;if(!y||y.length!=1)throw Error("Register name must be 1 character");_[y]=$,Qt.push(y)}function q(y){this.registers=y,this.unnamedRegister=y['"']=new j,y["."]=new j,y[":"]=new j,y["/"]=new j,y["+"]=new j}function Q(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function te(y,$){Gi[y]=$}function de(y,$){for(var _=[],P=0;P<$;P++)_.push(y);return _}function ne(y,$){qo[y]=$}function ce(y,$){On[y]=$}function he(y,$,_){var P=y.state.vim,W=P.insertMode||P.visualMode,B=Math.min(Math.max(y.firstLine(),$.line),y.lastLine()),G=y.getLine(B),Y=G.length-1+ +!!W,Z=Math.min(Math.max(0,$.ch),Y),ie=G.charCodeAt(Z);if(56320<=ie&&ie<=57343){var ae=1;_&&_.line==B&&_.ch>Z&&(ae=-1),Z+=ae,Z>Y&&(Z-=2)}return new De(B,Z)}function ue(y){var $={};for(var _ in y)y.hasOwnProperty(_)&&($[_]=y[_]);return $}function ve(y,$,_){return typeof $=="object"&&(_=$.ch,$=$.line),new De(y.line+$,y.ch+_)}function Me(y,$,_,P){P.operator&&(_="operatorPending");for(var W,B=[],G=[],Y=ln?$.length-bo:0,Z=Y;Z<$.length;Z++){var ie=$[Z];_=="insert"&&ie.context!="insert"||ie.context&&ie.context!=_||P.operator&&ie.type=="action"||!(W=Te(y,ie.keys))||(W=="partial"&&B.push(ie),W=="full"&&G.push(ie))}return{partial:B.length&&B,full:G.length&&G}}function Te(y,$){var _=$.slice(-11)=="<character>",P=$.slice(-10)=="<register>";if(_||P){var W=$.length-(_?11:10),B=y.slice(0,W),G=$.slice(0,W);return B==G&&y.length>W?"full":G.indexOf(B)==0?"partial":!1}return y==$?"full":$.indexOf(y)==0?"partial":!1}function Ee(y){var $=/^.*(<[^>]+>)$/.exec(y),_=$?$[1]:y.slice(-1);if(_.length>1)switch(_){case"<CR>":_=`
1405
+ `;break;case"<Space>":_=" ";break;default:_=""}return _}function Je(y,$,_){return function(){for(var P=0;P<_;P++)$(y)}}function Xe(y){return new De(y.line,y.ch)}function ft(y,$){return y.ch==$.ch&&y.line==$.line}function rt(y,$){return y.line<$.line?!0:y.line==$.line&&y.ch<$.ch}function yt(y,$){return arguments.length>2&&($=yt.apply(void 0,Array.prototype.slice.call(arguments,1))),rt(y,$)?y:$}function on(y,$){return arguments.length>2&&($=on.apply(void 0,Array.prototype.slice.call(arguments,1))),rt(y,$)?$:y}function zn(y,$,_){var P=rt(y,$),W=rt($,_);return P&&W}function tn(y,$){return y.getLine($).length}function tr(y){return y.trim?y.trim():y.replace(/^\s+|\s+$/g,"")}function _n(y){return y.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Xn(y,$,_){var P=tn(y,$),W=new Array(_-P+1).join(" ");y.setCursor(new De($,P)),y.replaceRange(W,y.getCursor())}function ci(y,$){var _=[],P=y.listSelections(),W=Xe(y.clipPos($)),B=!ft($,W),G=y.getCursor("head"),Y=Ct(P,G),Z=ft(P[Y].head,P[Y].anchor),ie=P.length-1,ae=ie-Y>Y?ie:0,be=P[ae].anchor,Se=Math.min(be.line,W.line),ye=Math.max(be.line,W.line),xe=be.ch,Ne=W.ch,Oe=P[ae].head.ch-xe,Ge=Ne-xe;Oe>0&&Ge<=0?(xe++,B||Ne--):Oe<0&&Ge>=0?(xe--,Z||Ne++):Oe<0&&Ge==-1&&(xe--,Ne++);for(var lt=Se;lt<=ye;lt++){var Qe={anchor:new De(lt,xe),head:new De(lt,Ne)};_.push(Qe)}return y.setSelections(_),$.ch=Ne,be.ch=xe,be}function Li(y,$,_){for(var P=[],W=0;W<_;W++){var B=ve($,W,0);P.push({anchor:B,head:B})}y.setSelections(P,0)}function Ct(y,$,_){for(var P=0;P<y.length;P++){var W=ft(y[P].anchor,$),B=ft(y[P].head,$);if(W||B)return P}return-1}function qe(y,$){var _=$.lastSelection,P=function(){var B=y.listSelections(),G=B[0],Y=B[B.length-1],Z=rt(G.anchor,G.head)?G.anchor:G.head,ie=rt(Y.anchor,Y.head)?Y.head:Y.anchor;return[Z,ie]},W=function(){var B=y.getCursor(),G=y.getCursor(),Y=_.visualBlock;if(Y){var Z=Y.width,ie=Y.height;G=new De(B.line+ie,B.ch+Z);for(var ae=[],be=B.line;be<G.line;be++){var Se=new De(be,B.ch),ye=new De(be,G.ch),xe={anchor:Se,head:ye};ae.push(xe)}y.setSelections(ae)}else{var Ne=_.anchorMark.find(),Oe=_.headMark.find(),Ge=Oe.line-Ne.line,lt=Oe.ch-Ne.ch;G={line:G.line+Ge,ch:Ge?G.ch:lt+G.ch},_.visualLine&&(B=new De(B.line,0),G=new De(G.line,tn(y,G.line))),y.setSelection(B,G)}return[B,G]};return $.visualMode?P():W()}function Gt(y,$){var _=$.sel.anchor,P=$.sel.head;$.lastPastedText&&(P=y.posFromIndex(y.indexFromPos(_)+$.lastPastedText.length),$.lastPastedText=null),$.lastSelection={anchorMark:y.setBookmark(_),headMark:y.setBookmark(P),anchor:Xe(_),head:Xe(P),visualMode:$.visualMode,visualLine:$.visualLine,visualBlock:$.visualBlock}}function wn(y,$,_,P){var W=y.state.vim.sel,B=P?$:W.head,G=P?$:W.anchor,Y;return rt(_,$)&&(Y=_,_=$,$=Y),rt(B,G)?(B=yt($,B),G=on(G,_)):(G=yt($,G),B=on(B,_),B=ve(B,0,-1),B.ch==-1&&B.line!=y.firstLine()&&(B=new De(B.line-1,tn(y,B.line-1)))),[G,B]}function Zn(y,$,W){var P=y.state.vim;$=$||P.sel;var W=W||P.visualLine?"line":P.visualBlock?"block":"char",B=Ri(y,$,W);y.setSelections(B.ranges,B.primary)}function Ri(y,$,_,P){var W=Xe($.head),B=Xe($.anchor);if(_=="char"){var G=!P&&!rt($.head,$.anchor)?1:0,Y=rt($.head,$.anchor)?1:0;return W=ve($.head,0,G),B=ve($.anchor,0,Y),{ranges:[{anchor:B,head:W}],primary:0}}if(_=="line"){if(rt($.head,$.anchor))W.ch=0,B.ch=tn(y,B.line);else{B.ch=0;var Z=y.lastLine();W.line>Z&&(W.line=Z),W.ch=tn(y,W.line)}return{ranges:[{anchor:B,head:W}],primary:0}}if(_=="block"){var ie=Math.min(B.line,W.line),ae=B.ch,be=Math.max(B.line,W.line),Se=W.ch;ae<Se?Se+=1:ae+=1;for(var ye=be-ie+1,xe=W.line==ie?0:ye-1,Ne=[],Oe=0;Oe<ye;Oe++)Ne.push({anchor:new De(ie+Oe,ae),head:new De(ie+Oe,Se)});return{ranges:Ne,primary:xe}}}function Ci(y){var $=y.getCursor("head");return y.getSelection().length==1&&($=yt($,y.getCursor("anchor"))),$}function An(y,$){var _=y.state.vim;$!==!1&&y.setCursor(he(y,_.sel.head)),Gt(y,_),_.visualMode=!1,_.visualLine=!1,_.visualBlock=!1,_.insertMode||ze.signal(y,"vim-mode-change",{mode:"normal"})}function ri(y,$,_){var P=y.getRange($,_);if(/\n\s*$/.test(P)){var W=P.split(`
1406
+ `);W.pop();for(var B,B=W.pop();W.length>0&&B&&f(B);B=W.pop())_.line--,_.ch=0;B?(_.line--,_.ch=tn(y,_.line)):_.ch=0}}function ui(y,$,_){$.ch=0,_.ch=0,_.line++}function sn(y){if(!y)return 0;var $=y.search(/\S/);return $==-1?y.length:$}function oi(y,$,_){var P=$.inclusive,W=$.innerWord,B=$.bigWord,G=$.noSymbol,Y=$.multiline,Z=_||Ci(y),ie=y.getLine(Z.line),ae=ie,be=Z.line,Se=be,ye=Z.ch,xe,Ne=G?xo[0]:yr[0];if(W&&/\s/.test(ie.charAt(ye)))Ne=function(mn){return/\s/.test(mn)};else{for(;!Ne(ie.charAt(ye));)if(ye++,ye>=ie.length){if(!Y)return null;ye--,xe=ho(y,Z,!0,B,!0);break}B?Ne=yr[0]:(Ne=xo[0],Ne(ie.charAt(ye))||(Ne=xo[1]))}for(var Oe=ye,Ge=ye;Ne(ie.charAt(Ge))&&Ge>=0;)Ge--;if(Ge++,xe)Oe=xe.to,Se=xe.line,ae=y.getLine(Se),!ae&&Oe==0&&Oe++;else for(;Ne(ie.charAt(Oe))&&Oe<ie.length;)Oe++;if(P){var lt=Oe,Qe=Z.ch<=Ge&&/\s/.test(ie.charAt(Z.ch));if(!Qe)for(;/\s/.test(ae.charAt(Oe))&&Oe<ae.length;)Oe++;if(lt==Oe||Qe){for(var nt=Ge;/\s/.test(ie.charAt(Ge-1))&&Ge>0;)Ge--;!Ge&&!Qe&&(Ge=nt)}}return{start:new De(be,Ge),end:new De(Se,Oe)}}function uo(y,$,_){var P=$;if(!ze.findMatchingTag||!ze.findEnclosingTag)return{start:P,end:P};var W=ze.findMatchingTag(y,$)||ze.findEnclosingTag(y,$);return!W||!W.open||!W.close?{start:P,end:P}:_?{start:W.open.from,end:W.close.to}:{start:W.open.to,end:W.close.from}}function Nr(y,$,_){ft($,_)||He.jumpList.add(y,$,_)}function Dr(y,$){He.lastCharacterSearch.increment=y,He.lastCharacterSearch.forward=$.forward,He.lastCharacterSearch.selectedCharacter=$.selectedCharacter}function Pr(y,$,_,P){var W=Xe(y.getCursor()),B=_?1:-1,G=_?y.lineCount():-1,Y=W.ch,Z=W.line,ie=y.getLine(Z),ae={lineText:ie,nextCh:ie.charAt(Y),lastCh:null,index:Y,symb:P,reverseSymb:(_?{")":"(","}":"{"}:{"(":")","{":"}"})[P],forward:_,depth:0,curMoveThrough:!1},be=or[P];if(!be)return W;var Se=sr[be].init,ye=sr[be].isComplete;for(Se&&Se(ae);Z!==G&&$;){if(ae.index+=B,ae.nextCh=ae.lineText.charAt(ae.index),!ae.nextCh){if(Z+=B,ae.lineText=y.getLine(Z)||"",B>0)ae.index=0;else{var xe=ae.lineText.length;ae.index=xe>0?xe-1:0}ae.nextCh=ae.lineText.charAt(ae.index)}ye(ae)&&(W.line=Z,W.ch=ae.index,$--)}return ae.nextCh||ae.curMoveThrough?new De(Z,ae.index):W}function ho(y,$,_,P,W){var B=$.line,G=$.ch,Y=y.getLine(B),Z=_?1:-1,ie=P?yr:xo;if(W&&Y==""){if(B+=Z,Y=y.getLine(B),!a(y,B))return null;G=_?0:Y.length}for(;;){if(W&&Y=="")return{from:0,to:0,line:B};for(var ae=Z>0?Y.length:-1,be=ae,Se=ae;G!=ae;){for(var ye=!1,xe=0;xe<ie.length&&!ye;++xe)if(ie[xe](Y.charAt(G))){for(be=G;G!=ae&&ie[xe](Y.charAt(G));)G+=Z;if(Se=G,ye=be!=Se,be==$.ch&&B==$.line&&Se==be+Z)continue;return{from:Math.min(be,Se+1),to:Math.max(be,Se),line:B}}ye||(G+=Z)}if(B+=Z,!a(y,B))return null;Y=y.getLine(B),G=Z>0?0:Y.length}}function mi(y,$,_,P,W,B){var G=Xe($),Y=[];(P&&!W||!P&&W)&&_++;for(var Z=!P||!W,ie=0;ie<_;ie++){var ae=ho(y,$,P,B,Z);if(!ae){var be=tn(y,y.lastLine());Y.push(P?{line:y.lastLine(),from:be,to:be}:{line:0,from:0,to:0});break}Y.push(ae),$=new De(ae.line,P?ae.to-1:ae.from)}var Se=Y.length!=_,ye=Y[0],xe=Y.pop();return P&&!W?(!Se&&(ye.from!=G.ch||ye.line!=G.line)&&(xe=Y.pop()),new De(xe.line,xe.from)):P&&W?new De(xe.line,xe.to-1):!P&&W?(!Se&&(ye.to!=G.ch||ye.line!=G.line)&&(xe=Y.pop()),new De(xe.line,xe.to)):new De(xe.line,xe.from)}function po(y,$,_,P,W){var B=$,G=new De(B.line+_.repeat-1,1/0),Y=y.clipPos(G);return Y.ch--,W||(P.lastHPos=1/0,P.lastHSPos=y.charCoords(Y,"div").left),G}function Po(y,$,_,P,W){for(var B=W||y.getCursor(),G=B.ch,Y,Z=0;Z<$;Z++){var ie=y.getLine(B.line);if(Y=tl(G,ie,P,_),Y==-1)return null;G=Y}return new De(y.getCursor().line,Y)}function el(y,$){var _=y.getCursor().line;return he(y,new De(_,$-1))}function nr(y,$,_,P){!x(_,ro)&&!Kt.test(_)||($.marks[_]&&$.marks[_].clear(),$.marks[_]=y.setBookmark(P))}function tl(y,$,_,P,W){var B;return P?(B=$.indexOf(_,y+1),B!=-1):(B=$.lastIndexOf(_,y-1),B!=-1),B}function ws(y,$,_,P,W){function B(Ge){return!/\S/.test(y.getLine(Ge))}function G(Ge,lt,Qe){return Qe?B(Ge)!=B(Ge+lt):!B(Ge)&&B(Ge+lt)}function Y(Ge){P=P>0?1:-1;var lt=y.ace.session.getFoldLine(Ge);lt&&Ge+P>lt.start.row&&Ge+P<lt.end.row&&(P=(P>0?lt.end.row:lt.start.row)-Ge)}var Z=$.line,ie=y.firstLine(),ae=y.lastLine(),be,Se,ye=Z;if(P){for(;ie<=ye&&ye<=ae&&_>0;)Y(ye),G(ye,P)&&_--,ye+=P;return new De(ye,0)}var xe=y.state.vim;if(xe.visualLine&&G(Z,1,!0)){var Ne=xe.sel.anchor;G(Ne.line,-1,!0)&&(!W||Ne.line!=Z)&&(Z+=1)}var Oe=B(Z);for(ye=Z;ye<=ae&&_;ye++)G(ye,1,!0)&&(!W||B(ye)!=Oe)&&_--;for(Se=new De(ye,0),ye>ae&&!Oe?Oe=!0:W=!1,ye=Z;ye>ie&&!((!W||B(ye)==Oe||ye==Z)&&G(ye,-1,!0));ye--);return be=new De(ye,0),{start:be,end:Se}}function aa(y,$,_,P,W){function B(ie){ie.pos+ie.dir<0||ie.pos+ie.dir>=ie.line.length?ie.line=null:ie.pos+=ie.dir}function G(ie,ae,be,Se){var ye=ie.getLine(ae),xe={line:ye,ln:ae,pos:be,dir:Se};if(xe.line==="")return{ln:xe.ln,pos:xe.pos};var Ne=xe.pos;for(B(xe);xe.line!==null;){if(Ne=xe.pos,w(xe.line[xe.pos])){if(!W)return{ln:xe.ln,pos:xe.pos+1};for(B(xe);xe.line!==null&&f(xe.line[xe.pos]);)Ne=xe.pos,B(xe);return{ln:xe.ln,pos:Ne+1}}B(xe)}return{ln:xe.ln,pos:Ne+1}}function Y(ie,ae,be,Se){var ye=ie.getLine(ae),xe={line:ye,ln:ae,pos:be,dir:Se};if(xe.line==="")return{ln:xe.ln,pos:xe.pos};var Ne=xe.pos;for(B(xe);xe.line!==null;){if(!f(xe.line[xe.pos])&&!w(xe.line[xe.pos]))Ne=xe.pos;else if(w(xe.line[xe.pos]))return W?f(xe.line[xe.pos+1])?{ln:xe.ln,pos:xe.pos+1}:{ln:xe.ln,pos:Ne}:{ln:xe.ln,pos:Ne};B(xe)}return xe.line=ye,W&&f(xe.line[xe.pos])?{ln:xe.ln,pos:xe.pos}:{ln:xe.ln,pos:Ne}}for(var Z={ln:$.line,pos:$.ch};_>0;)P<0?Z=Y(y,Z.ln,Z.pos,P):Z=G(y,Z.ln,Z.pos,P),_--;return new De(Z.ln,Z.pos)}function Fr(y,$,_,P){function W(Z,ie){if(ie.pos+ie.dir<0||ie.pos+ie.dir>=ie.line.length){if(ie.ln+=ie.dir,!a(Z,ie.ln)){ie.line=null,ie.ln=null,ie.pos=null;return}ie.line=Z.getLine(ie.ln),ie.pos=ie.dir>0?0:ie.line.length-1}else ie.pos+=ie.dir}function B(Z,ie,ae,be){var Oe=Z.getLine(ie),Se=Oe==="",ye={line:Oe,ln:ie,pos:ae,dir:be},xe={ln:ye.ln,pos:ye.pos},Ne=ye.line==="";for(W(Z,ye);ye.line!==null;){if(xe.ln=ye.ln,xe.pos=ye.pos,ye.line===""&&!Ne)return{ln:ye.ln,pos:ye.pos};if(Se&&ye.line!==""&&!f(ye.line[ye.pos]))return{ln:ye.ln,pos:ye.pos};w(ye.line[ye.pos])&&!Se&&(ye.pos===ye.line.length-1||f(ye.line[ye.pos+1]))&&(Se=!0),W(Z,ye)}var Oe=Z.getLine(xe.ln);xe.pos=0;for(var Ge=Oe.length-1;Ge>=0;--Ge)if(!f(Oe[Ge])){xe.pos=Ge;break}return xe}function G(Z,ie,ae,be){var Ne=Z.getLine(ie),Se={line:Ne,ln:ie,pos:ae,dir:be},ye={ln:Se.ln,pos:null},xe=Se.line==="";for(W(Z,Se);Se.line!==null;){if(Se.line===""&&!xe)return ye.pos!==null?ye:{ln:Se.ln,pos:Se.pos};if(!(!w(Se.line[Se.pos])||ye.pos===null||Se.ln===ye.ln&&Se.pos+1===ye.pos))return ye;Se.line!==""&&!f(Se.line[Se.pos])&&(xe=!1,ye={ln:Se.ln,pos:Se.pos}),W(Z,Se)}var Ne=Z.getLine(ye.ln);ye.pos=0;for(var Oe=0;Oe<Ne.length;++Oe)if(!f(Ne[Oe])){ye.pos=Oe;break}return ye}for(var Y={ln:$.line,pos:$.ch};_>0;)P<0?Y=G(y,Y.ln,Y.pos,P):Y=B(y,Y.ln,Y.pos,P),_--;return new De(Y.ln,Y.pos)}function jn(y,$,_,P){var W=$,B,G,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[_],Z={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[_],ie=y.getLine(W.line).charAt(W.ch),ae=ie===Z?1:0;if(B=y.scanForBracket(new De(W.line,W.ch+ae),-1,void 0,{bracketRegex:Y}),G=y.scanForBracket(new De(W.line,W.ch+ae),1,void 0,{bracketRegex:Y}),!B||!G)return null;if(B=B.pos,G=G.pos,B.line==G.line&&B.ch>G.ch||B.line>G.line){var be=B;B=G,G=be}return P?G.ch+=1:B.ch+=1,{start:B,end:G}}function ki(y,$,_,P){var W=Xe($),B=y.getLine(W.line),G=B.split(""),Y,Z,ie,ae,be=G.indexOf(_);if(W.ch<be)W.ch=be;else if(be<W.ch&&G[W.ch]==_){var Se=/string/.test(y.getTokenTypeAt(ve($,0,1))),ye=/string/.test(y.getTokenTypeAt($)),xe=Se&&!ye;xe||(Z=W.ch,--W.ch)}if(G[W.ch]==_&&!Z)Y=W.ch+1;else for(ie=W.ch;ie>-1&&!Y;ie--)G[ie]==_&&(Y=ie+1);if(Y&&!Z)for(ie=Y,ae=G.length;ie<ae&&!Z;ie++)G[ie]==_&&(Z=ie);return!Y||!Z?{start:W,end:W}:(P&&(--Y,++Z),{start:new De(W.line,Y),end:new De(W.line,Z)})}function Wr(){}function $n(y){var $=y.state.vim;return $.searchState_||($.searchState_=new Wr)}function Si(y){return Br(y,"/")}function Jr(y){return bs(y,"/")}function Br(y,$){var _=bs(y,$)||[];if(!_.length)return[];var P=[];if(_[0]===0){for(var W=0;W<_.length;W++)typeof _[W]=="number"&&P.push(y.substring(_[W]+1,_[W+1]));return P}}function bs(y,$){$||($="/");for(var _=!1,P=[],W=0;W<y.length;W++){var B=y.charAt(W);!_&&B==$&&P.push(W),_=!_&&B=="\\"}return P}function la(y){for(var $="|(){",_="}",P=!1,W=[],B=-1;B<y.length;B++){var G=y.charAt(B)||"",Y=y.charAt(B+1)||"",Z=Y&&$.indexOf(Y)!=-1;P?((G!=="\\"||!Z)&&W.push(G),P=!1):G==="\\"?(P=!0,Y&&_.indexOf(Y)!=-1&&(Z=!0),(!Z||Y==="\\")&&W.push(G)):(W.push(G),Z&&Y!=="\\"&&W.push("\\"))}return W.join("")}function nl(y){for(var $=!1,_=[],P=-1;P<y.length;P++){var W=y.charAt(P)||"",B=y.charAt(P+1)||"";xr[W+B]?(_.push(xr[W+B]),P++):$?(_.push(W),$=!1):W==="\\"?($=!0,s(B)||B==="$"?_.push("$"):B!=="/"&&B!=="\\"&&_.push("\\")):(W==="$"&&_.push("$"),_.push(W),B==="/"&&_.push("\\"))}return _.join("")}function il(y){for(var $=new ze.StringStream(y),_=[];!$.eol();){for(;$.peek()&&$.peek()!="\\";)_.push($.next());var P=!1;for(var W in hi)if($.match(W,!0)){P=!0,_.push(hi[W]);break}P||_.push($.next())}return _.join("")}function zr(y,$,_){var P=He.registerController.getRegister("/");if(P.setText(y),y instanceof RegExp)return y;var W=Jr(y),B,G;if(!W.length)B=y;else{B=y.substring(0,W[0]);var Y=y.substring(W[0]);G=Y.indexOf("i")!=-1}if(!B)return null;k("pcre")||(B=la(B)),_&&($=/^[^A-Z]*$/.test(B));var Z=new RegExp(B,$||G?"im":"m");return Z}function ir(y){typeof y=="string"&&(y=document.createElement(y));for(var $,_=1;_<arguments.length;_++)if($=arguments[_])if(typeof $!="object"&&($=document.createTextNode($)),$.nodeType)y.appendChild($);else for(var P in $)Object.prototype.hasOwnProperty.call($,P)&&(P[0]==="$"?y.style[P.slice(1)]=$[P]:y.setAttribute(P,$[P]));return y}function Ft(y,$){var _=ir("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},$);y.openNotification?y.openNotification(_,{bottom:!0,duration:5e3}):alert(_.innerText)}function ca(y,$){return ir("div",{$display:"flex"},ir("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},y,ir("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),$&&ir("span",{$color:"#888"},$))}function _i(y,$){if(Oi.length){$.value||($.value=""),bn=$;return}var _=ca($.prefix,$.desc);if(y.openDialog)y.openDialog(_,$.onClose,{onKeyDown:$.onKeyDown,onKeyUp:$.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:$.value});else{var P="";typeof $.prefix!="string"&&$.prefix&&(P+=$.prefix.textContent),$.desc&&(P+=" "+$.desc),$.onClose(prompt(P,""))}}function Hn(y,$){if(y instanceof RegExp&&$ instanceof RegExp){for(var _=["global","multiline","ignoreCase","source"],P=0;P<_.length;P++){var W=_[P];if(y[W]!==$[W])return!1}return!0}return!1}function gn(y,$,_,P){if($){var W=$n(y),B=zr($,!!_,!!P);if(B)return fr(y,B),Hn(B,W.getQuery())||W.setQuery(B),B}}function En(y){if(y.source.charAt(0)=="^")var $=!0;return{token:function(_){if($&&!_.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 fr(y,$){clearTimeout(di);var _=$n(y);_.highlightTimeout=di,di=setTimeout(function(){if(y.state.vim){var P=$n(y);P.highlightTimeout=null;var W=P.getOverlay();(!W||$!=W.query)&&(W&&y.removeOverlay(W),W=En($),y.addOverlay(W),y.showMatchesOnScrollbar&&(P.getScrollbarAnnotate()&&P.getScrollbarAnnotate().clear(),P.setScrollbarAnnotate(y.showMatchesOnScrollbar($))),P.setOverlay(W))}},50)}function Ai(y,$,_,P){return P===void 0&&(P=1),y.operation(function(){for(var W=y.getCursor(),B=y.getSearchCursor(_,W),G=0;G<P;G++){var Y=B.find($);if(G==0&&Y&&ft(B.from(),W)){var Z=$?B.from():B.to();Y=B.find($),Y&&!Y[0]&&ft(B.from(),Z)&&y.getLine(Z.line).length==Z.ch&&(Y=B.find($))}if(!Y&&(B=y.getSearchCursor(_,$?new De(y.lastLine()):new De(y.firstLine(),0)),!B.find($)))return}return B.from()})}function mr(y,$,_,P,W){return P===void 0&&(P=1),y.operation(function(){var B=y.getCursor(),G=y.getSearchCursor(_,B),Y=G.find(!$);!W.visualMode&&Y&&ft(G.from(),B)&&G.find(!$);for(var Z=0;Z<P;Z++)if(Y=G.find($),!Y&&(G=y.getSearchCursor(_,$?new De(y.lastLine()):new De(y.firstLine(),0)),!G.find($)))return;return[G.from(),G.to()]})}function Fo(y){var $=$n(y);$.highlightTimeout&&(clearTimeout($.highlightTimeout),$.highlightTimeout=null),y.removeOverlay($n(y).getOverlay()),$.setOverlay(null),$.getScrollbarAnnotate()&&($.getScrollbarAnnotate().clear(),$.setScrollbarAnnotate(null))}function xs(y,$,_){return typeof y!="number"&&(y=y.line),$ instanceof Array?x(y,$):typeof _=="number"?y>=$&&y<=_:y==$}function eo(y){var $=y.ace.renderer;return{top:$.getFirstFullyVisibleRow(),bottom:$.getLastFullyVisibleRow()}}function Ui(y,$,_){if(_=="'"||_=="`")return He.jumpList.find(y,-1)||new De(0,0);if(_==".")return go(y);var P=$.marks[_];return P&&P.find()}function go(y){if(y.getLastEditEnd)return y.getLastEditEnd();for(var $=y.doc.history.done,_=$.length;_--;)if($[_].changes)return Xe($[_].changes[0].to)}function Wo(y,$,_,P,W,B,G,Y,Z){function ie(){y.operation(function(){for(;!Ne;)ae(),Se();ye()})}function ae(){var Qe=y.getRange(B.from(),B.to()),nt=Qe.replace(G,Y),mn=B.to().line;B.replace(nt),Ge=B.to().line,W+=Ge-mn,lt=Ge<mn}function be(){var Qe=Oe&&Xe(B.to()),nt=B.findNext();return nt&&!nt[0]&&Qe&&ft(B.from(),Qe)&&(nt=B.findNext()),nt}function Se(){for(;be()&&xs(B.from(),P,W);)if(!(!_&&B.from().line==Ge&&!lt)){y.scrollIntoView(B.from(),30),y.setSelection(B.from(),B.to()),Oe=B.from(),Ne=!1;return}Ne=!0}function ye(Qe){if(Qe&&Qe(),y.focus(),Oe){y.setCursor(Oe);var nt=y.state.vim;nt.exMode=!1,nt.lastHPos=nt.lastHSPos=Oe.ch}Z&&Z()}function xe(Qe,nt,mn){ze.e_stop(Qe);var ct=z(Qe);switch(ct){case"y":ae(),Se();break;case"n":Se();break;case"a":var xn=Z;Z=void 0,y.operation(ie),Z=xn;break;case"l":ae();case"q":case"<Esc>":case"<C-c>":case"<C-[>":ye(mn)}return Ne&&ye(mn),!0}y.state.vim.exMode=!0;var Ne=!1,Oe,Ge,lt;if(Se(),Ne){Ft(y,"No matches for "+G.source);return}if(!$){ie(),Z&&Z();return}_i(y,{prefix:ir("span","replace with ",ir("strong",Y)," (y/n/a/q/l)"),onKeyDown:xe})}function Vi(y,$){var _=y.state.vim,P=He.macroModeState,W=He.registerController.getRegister("."),B=P.isPlaying,G=P.lastInsertModeChanges;B||(y.off("change",fo),_.insertEnd&&_.insertEnd.clear(),_.insertEnd=null,ze.off(y.getInputField(),"keydown",_s)),!B&&_.insertModeRepeat>1&&(ua(y,_,_.insertModeRepeat-1,!0),_.lastEditInputState.repeatOverride=_.insertModeRepeat),delete _.insertModeRepeat,_.insertMode=!1,$||y.setCursor(y.getCursor().line,y.getCursor().ch-1),y.setOption("keyMap","vim"),y.setOption("disableInput",!0),y.toggleOverwrite(!1),W.setText(G.changes.join("")),ze.signal(y,"vim-mode-change",{mode:"normal"}),P.isRecording&&si(P)}function Bo(y){Mn.unshift(y)}function Cs(y,$,_,P,W){var B={keys:y,type:$};B[$]=_,B[$+"Args"]=P;for(var G in W)B[G]=W[G];Bo(B)}function ks(y,$,_,P){var W=He.registerController.getRegister(P);if(P==":"){W.keyBuffer[0]&&yi.processCommand(y,W.keyBuffer[0]),_.isPlaying=!1;return}var B=W.keyBuffer,G=0;_.isPlaying=!0,_.replaySearchQueries=W.searchQueries.slice(0);for(var Y=0;Y<B.length;Y++)for(var Z=B[Y],ie,ae;Z;)if(ie=/<\w+-.+?>|<\w+>|./.exec(Z),ae=ie[0],Z=Z.substring(ie.index+ae.length),wt.handleKey(y,ae,"macro"),$.insertMode){var be=W.insertModeChanges[G++].changes;He.macroModeState.lastInsertModeChanges.changes=be,Vo(y,be,1),Vi(y)}_.isPlaying=!1}function zo(y,$){if(!y.isPlaying){var _=y.latestRegister,P=He.registerController.getRegister(_);P&&P.pushText($)}}function si(y){if(!y.isPlaying){var $=y.latestRegister,_=He.registerController.getRegister($);_&&_.pushInsertModeChanges&&_.pushInsertModeChanges(y.lastInsertModeChanges)}}function Ss(y,$){if(!y.isPlaying){var _=y.latestRegister,P=He.registerController.getRegister(_);P&&P.pushSearchQuery&&P.pushSearchQuery($)}}function fo(y,$){var _=He.macroModeState,P=_.lastInsertModeChanges;if(!_.isPlaying)for(var W=y.state.vim;$;){if(P.expectCursorActivityForChange=!0,P.ignoreCount>1)P.ignoreCount--;else if($.origin=="+input"||$.origin=="paste"||$.origin===void 0){var B=y.listSelections().length;B>1&&(P.ignoreCount=B);var G=$.text.join(`
1407
+ `);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=W&&W.insertEnd&&W.insertEnd.find(),Z=y.getCursor();if(Y&&Y.line==Z.line){var ie=Y.ch-Z.ch;ie>0&&ie<G.length&&(P.changes.push([G,ie]),G="")}}G&&P.changes.push(G)}}$=$.next}}function jo(y){var $=y.state.vim;if($.insertMode){var _=He.macroModeState;if(_.isPlaying)return;var P=_.lastInsertModeChanges;P.expectCursorActivityForChange?P.expectCursorActivityForChange=!1:(P.maybeReset=!0,$.insertEnd&&$.insertEnd.clear(),$.insertEnd=y.setBookmark(y.getCursor(),{insertLeft:!0}))}else y.curOp.isVimOp||Ho(y,$)}function Ho(y,$,_){var P=y.getCursor("anchor"),W=y.getCursor("head");if($.visualMode&&!y.somethingSelected()?An(y,!1):!$.visualMode&&!$.insertMode&&y.somethingSelected()&&($.visualMode=!0,$.visualLine=!1,ze.signal(y,"vim-mode-change",{mode:"visual"})),$.visualMode){var B=rt(W,P)?0:-1,G=rt(W,P)?-1:0;W=ve(W,0,B),P=ve(P,0,G),$.sel={anchor:P,head:W},nr(y,$,"<",yt(W,P)),nr(y,$,">",on(W,P))}else!$.insertMode&&!_&&($.lastHPos=y.getCursor().ch)}function to(y,$){this.keyName=y,this.key=$.key,this.ctrlKey=$.ctrlKey,this.altKey=$.altKey,this.metaKey=$.metaKey,this.shiftKey=$.shiftKey}function _s(y){var $=He.macroModeState,_=$.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 to(P,y)))}function ua(y,$,_,P){function W(){Y?Rn.processAction(y,$,$.lastEditActionCommand):Rn.evalInput(y,$)}function B(ae){if(G.lastInsertModeChanges.changes.length>0){ae=$.lastEditActionCommand?ae:1;var be=G.lastInsertModeChanges;Vo(y,be.changes,ae)}}var G=He.macroModeState;G.isPlaying=!0;var Y=!!$.lastEditActionCommand,Z=$.inputState;if($.inputState=$.lastEditInputState,Y&&$.lastEditActionCommand.interlaceInsertRepeat)for(var ie=0;ie<_;ie++)W(),B(1);else P||W(),B(_);$.inputState=Z,$.insertMode&&!P&&Vi(y),G.isPlaying=!1}function Uo(y,$){ze.lookupKey($,"vim-insert",function(_){return typeof _=="string"?ze.commands[_](y):_(y),!0})}function Vo(y,$,_){var P=y.getCursor("head"),W=He.macroModeState.lastInsertModeChanges.visualBlock;W&&(Li(y,P,W+1),_=y.listSelections().length,y.setCursor(P));for(var B=0;B<_;B++){W&&y.setCursor(ve(P,B,0));for(var G=0;G<$.length;G++){var Y=$[G];if(Y instanceof to)Uo(y,Y.keyName);else if(typeof Y=="string")y.replaceSelection(Y);else{var Z=y.getCursor(),ie=ve(Z,0,Y[0].length-(Y[1]||0));y.replaceRange(Y[0],Z,Y[1]?Z:ie),y.setCursor(ie)}}}W&&y.setCursor(ve(P,0,1))}function As(y,$,_,P){$.length>1&&$[0]=="n"&&($=$.replace("numpad","")),$=$i[$]||$;var W="";if(_.ctrlKey&&(W+="C-"),_.altKey&&(W+="A-"),(W||$.length>1)&&_.shiftKey&&(W+="S-"),P&&!P.expectLiteralNext&&$.length==1){if(Un.keymap&&$ in Un.keymap)(Un.remapCtrl!==!1||!W)&&($=Un.keymap[$]);else if($.charCodeAt(0)>255){var B=_.code&&_.code.slice(-1)||"";_.shiftKey||(B=B.toLowerCase()),B&&($=B)}}return W+=$,W.length>1&&(W="<"+W+">"),W}function Go(y){var $=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=Go(P)),$[_]=P}}),y.sel&&($.sel={head:y.sel.head&&Xe(y.sel.head),anchor:y.sel.anchor&&Xe(y.sel.anchor)}),$}function mo(y,$,_){var P=!1,W=wt.maybeInitVimState_(y),B=W.visualBlock||W.wasInVisualBlock,G=y.ace.inMultiSelectMode;if(W.wasInVisualBlock&&!G?W.wasInVisualBlock=!1:G&&W.visualBlock&&(W.wasInVisualBlock=!0),$=="<Esc>"&&!W.insertMode&&!W.visualMode&&G)y.ace.exitMultiSelectMode();else if(B||!G||y.ace.inVirtualSelectionMode)P=wt.handleKey(y,$,_);else{var Y=Go(W),Z=W.inputState.changeQueueList||[];y.operation(function(){y.curOp.isVimOp=!0;var ie=0;y.ace.forEachSelection(function(){var ae=y.ace.selection;y.state.vim.lastHPos=ae.$desiredColumn==null?ae.lead.column:ae.$desiredColumn,y.state.vim.inputState.changeQueue=Z[ie];var be=y.getCursor("head"),Se=y.getCursor("anchor"),ye=rt(be,Se)?0:-1,xe=rt(be,Se)?-1:0;be=ve(be,0,ye),Se=ve(Se,0,xe),y.state.vim.sel.head=be,y.state.vim.sel.anchor=Se,P=ar(y,$,_),ae.$desiredColumn=y.state.vim.lastHPos==-1?null:y.state.vim.lastHPos,y.ace.inVirtualSelectionMode&&(Z[ie]=y.state.vim.inputState.changeQueue),y.virtualSelectionMode()&&(y.state.vim=Go(Y)),ie++}),y.curOp.cursorActivity&&!P&&(y.curOp.cursorActivity=!1),W.status=y.state.vim.status,y.state.vim=W,W.inputState.changeQueueList=Z,W.inputState.changeQueue=null},!0)}return P&&!W.visualMode&&!W.insert&&W.visualMode!=y.somethingSelected()&&Ho(y,W,!0),P}function vr(y,$){$.off("beforeEndOperation",vr);var _=$.state.cm.vimCmd;_&&$.execCommand(_.exec?_:_.name,_.args),$.curOp=$.prevOp}var ai=n("../range").Range,no=n("../lib/event_emitter").EventEmitter,jr=n("../lib/dom"),ha=n("../lib/oop"),rl=n("../lib/keys"),vo=n("../lib/event"),Hr=n("../search").Search,yo=n("../lib/useragent"),Ko=n("../search_highlight").SearchHighlight,wo=n("../commands/multi_select_commands"),da=n("../mode/text").Mode.prototype.tokenRe,io=n("../ext/hardwrap").hardWrap;n("../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,$){if(!(this instanceof De))return new De(y,$);this.line=y,this.ch=$},ze.defineOption=function(y,$,_){},ze.commands={redo:function(y){y.ace.redo()},undo:function(y){y.ace.undo()},newlineAndIndent:function(y){y.ace.insert(`
1408
+ `)},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=vo.stopEvent,ze.keyName=function(y){var $=rl[y.keyCode]||y.key||"";return $.length==1&&($=$.toUpperCase()),$=vo.getModifierString(y).replace(/(^|-)\w/g,function(_){return _.toUpperCase()})+$,$},ze.keyMap.default=function(y){return function($){var _=$.ace.commands.commandKeyBinding[y.toLowerCase()];return _&&$.ace.execCommand(_)!==!1}},ze.lookupKey=function y($,_,P){_||(_="default"),typeof _=="string"&&(_=ze.keyMap[_]||ze.keyMap.default);var W=typeof _=="function"?_($):_[$];if(W===!1)return"nothing";if(W==="...")return"multi";if(W!=null&&P(W))return"handled";if(_.fallthrough){if(!Array.isArray(_.fallthrough))return y($,_.fallthrough,P);for(var B=0;B<_.fallthrough.length;B++){var G=y($,_.fallthrough[B],P);if(G)return G}}},ze.findMatchingTag=function(y,$){return y.findMatchingTag($)},ze.findEnclosingTag=function(y,$){},ze.signal=function(y,$,_){return y._signal($,_)},ze.on=vo.addListener,ze.off=vo.removeListener,ze.isWordChar=function(y){return y<""?/^\w$/.test(y):(da.lastIndex=0,da.test(y))},(function(){ha.implement(ze.prototype,no),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:[]},W=this.curOp=this.curOp||{};W.changeHandlers||(W.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),W.lastChange?W.lastChange.next=W.lastChange=P:W.lastChange=W.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(wo.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 W=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var B=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(),!B.cursorActivity&&!B.lastChange&&W&&(this.ace.prevOp=W)),(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,W){var B=W?W[_+"Handlers"]:(this._eventRegistry||{})[_];if(B){B=B.slice();for(var G=0;G<B.length;G++)B[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 W=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:_,column:P}),this.ace.selection.moveTo(_,P),W&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(_){var P=this.ace.selection,W=_=="anchor"?P.isEmpty()?P.lead:P.anchor:_=="head"||!_?P.lead:P.getRange()[_];return m(W)},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(W){return{anchor:this.clipPos(m(W.cursor==W.end?W.start:W.end)),head:this.clipPos(m(W.cursor))}},this)},this.setSelections=function(_,P){var W=this.ace.multiSelect,B=_.map(function(ie){var ae=p(ie.anchor),be=p(ie.head),Se=ai.comparePoints(ae,be)<0?new ai.fromPoints(ae,be):new ai.fromPoints(be,ae);return Se.cursor=ai.comparePoints(Se.start,be)?Se.end:Se.start,Se});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(B[0]);return}P?B[P]&&B.push(B.splice(P,1)[0]):B=B.reverse(),W.toSingleRange(B[0].clone());for(var G=this.ace.session,Y=0;Y<B.length;Y++){var Z=G.$clipRangeToDocument(B[Y]);W.addRange(Z)}},this.setSelection=function(_,P,W){var B=this.ace.selection;B.moveTo(_.line,_.ch),B.selectTo(P.line,P.ch),W&&W.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(_){return!this.ace.selection.isEmpty()},this.clipPos=function(_){var P=this.ace.session.$clipPositionToDocument(_.line,_.ch);return m(P)},this.foldCode=function(_){this.ace.session.$toggleFoldWidget(_.line,{})},this.markText=function(_){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(_){var P=_.action=="insert",W=_.start,B=_.end,G=(B.row-W.row)*(P?1:-1),Y=(B.column-W.column)*(P?1:-1);P&&(B=W);for(var Z in this.marks){var ie=this.marks[Z],ae=ai.comparePoints(ie,W);if(!(ae<0)){if(ae===0&&P)if(!ie.$insertRight)ae=1;else{if(ie.bias!=1){ie.bias=-1;continue}ae=1}var be=P?ae:ai.comparePoints(ie,B);if(be>0){ie.row+=G,ie.column+=ie.row==B.row?Y:0;continue}!P&&be<=0&&(ie.row=W.row,ie.column=W.column,be===0&&(ie.bias=1))}}};var y=function(_,P,W,B){this.cm=_,this.id=P,this.row=W,this.column=B,_.marks[this.id]=this};y.prototype.clear=function(){delete this.cm.marks[this.id]},y.prototype.find=function(){return m(this)},this.setBookmark=function(_,P){var W=new y(this,this.$uid++,_.line,_.ch);return(!P||!P.insertLeft)&&(W.$insertRight=!0),this.marks[W.id]=W,W},this.moveH=function(_,P){if(P=="char"){var W=this.ace.selection;W.clearSelection(),W.moveCursorBy(0,_)}},this.findPosV=function(_,P,W,B){if(W=="page"){var G=this.ace.renderer,Y=G.layerConfig;P*=Math.floor(Y.height/Y.lineHeight),W="line"}if(W=="line"){var Z=this.ace.session.documentToScreenPosition(_.line,_.ch);B!=null&&(Z.column=B),Z.row+=P,Z.row=Math.min(Math.max(0,Z.row),this.ace.session.getScreenLength()-1);var ie=this.ace.session.screenToDocumentPosition(Z.row,Z.column);return m(ie)}debugger},this.charCoords=function(_,P){if(P=="div"||!P){var W=this.ace.session.documentToScreenPosition(_.line,_.ch);return{left:W.column,top:W.row}}if(P=="local"){var B=this.ace.renderer,W=this.ace.session.documentToScreenPosition(_.line,_.ch),G=B.layerConfig.lineHeight,Y=B.layerConfig.characterWidth,Z=G*W.row;return{left:W.column*Y,top:Z,bottom:Z+G}}},this.coordsChar=function(_,P){var W=this.ace.renderer;if(P=="local"){var B=Math.max(0,Math.floor(_.top/W.lineHeight)),G=Math.max(0,Math.floor(_.left/W.characterWidth)),Y=W.session.screenToDocumentPosition(B,G);return m(Y)}if(P=="div")throw"not implemented"},this.getSearchCursor=function(_,P,W){var B=!1,G=!1;_ instanceof RegExp&&!_.global&&(B=!_.ignoreCase,_=_.source,G=!0),_=="\\n"&&(_=`
1409
+ `,G=!1);var Y=new Hr;P.ch==null&&(P.ch=Number.MAX_VALUE);var Z={row:P.line,column:P.ch},ie=this,ae=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(be){Y.setOptions({needle:_,caseSensitive:B,wrap:!1,backwards:be,regExp:G,start:ae||Z});var Se=Y.find(ie.ace.session);return ae=Se,ae&&[!ae.isEmpty()]},from:function(){return ae&&m(ae.start)},to:function(){return ae&&m(ae.end)},replace:function(be){ae&&(ae.end=ie.ace.session.doc.replace(ae,be))}}},this.scrollTo=function(_,P){var W=this.ace.renderer,B=W.layerConfig,G=B.maxHeight;G-=(W.$size.scrollerHeight-W.lineHeight)*W.$scrollPastEnd,P!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(P,G))),_!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(_,B.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(_,P){if(_){var W=this.ace.renderer,B={top:0,bottom:P};W.scrollCursorIntoView(p(_),W.lineHeight*2/W.$size.scrollerHeight,B)}},this.getLine=function(_){return this.ace.session.getLine(_)},this.getRange=function(_,P){return this.ace.session.getTextRange(new ai(_.line,_.ch,P.line,P.ch))},this.replaceRange=function(_,P,W){W||(W=P);var B=new ai(P.line,P.ch,W.line,W.ch);return this.ace.session.$clipRangeToDocument(B),this.ace.session.replace(B,_)},this.replaceSelection=this.replaceSelections=function(_){var P=Array.isArray(_)&&_,W=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(W.getRange(),P?_[0]||"":_);return}W.inVirtualSelectionMode=!0;var B=W.rangeList.ranges;B.length||(B=[this.ace.multiSelect.getRange()]);for(var G=B.length;G--;)this.ace.session.replace(B[G],P?_[G]||"":_);W.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 $={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(_,P){switch(this.state[_]=P,_){case"indentWithTabs":_=$[_],P=!P;break;case"keyMap":this.state.$keyMap=P;return;default:_=$[_]}_&&this.ace.setOption(_,P)},this.getOption=function(_){var P,W=$[_];switch(W&&(P=this.ace.getOption(W)),_){case"indentWithTabs":return _=$[_],!P;case"keyMap":return this.state.$keyMap||"vim"}return W?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 Ko(null,"ace_highlight-marker","text"),W=this.ace.session.addDynamicMarker(P);P.id=W.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 B=new RegExp(_.query.source,"gmi");this.$searchHighlight=_.highlight=P,this.$searchHighlight.setRegexp(B),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&&m(P)}},this.findMatchingTag=function(_){var P=this.ace.session.getMatchingTags(p(_));if(P)return{open:{from:m(P.openTag.start),to:m(P.openTag.end)},close:{from:m(P.closeTag.start),to:m(P.closeTag.end)}}},this.indentLine=function(_,P){P===!0?this.ace.session.indentRows(_,_," "):P===!1&&this.ace.session.outdentRows(new ai(_,0,_,0))},this.indexFromPos=function(_){return this.ace.session.doc.positionToIndex(p(_))},this.posFromIndex=function(_){return m(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,W,B){var G=B.bracketRegex.source,Y=/paren|text|operator|tag/;if(P==1)var Z=this.ace.session.$findClosingBracket(G.slice(1,2),p(_),Y);else{var Z=this.ace.session.$findOpeningBracket(G.slice(-2,-1),{row:_.line,column:_.ch+1},Y);!Z&&B.bracketRegex&&B.bracketRegex.test(this.getLine(_.line)[_.ch-1])&&(Z={row:_.line,column:_.ch-1})}return Z&&{pos:m(Z)}},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 W=_.row,B=0;B<P.length;B++){var G=P[B];if(G.start.row!=G.end.row){if(G.action[0]=="i")G.start.row<W&&(W+=G.end.row-G.start.row);else if(G.start.row<W){if(W<G.end.row||W==G.end.row&&G.start.column>0)return null;W-=G.end.row-G.start.row}}}return W},this.getLineHandle=function(_){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 m(_.$lastDelta.end)}}).call(ze.prototype);var pa=ze.StringStream=function(y,$){this.pos=this.start=0,this.string=y,this.tabSize=$||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};pa.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(y){var $=this.string.charAt(this.pos);if(typeof y=="string")var _=$==y;else var _=$&&(y.test?y.test($):y($));if(_)return++this.pos,$},eatWhile:function(y){for(var $=this.pos;this.eat(y););return this.pos>$},eatSpace:function(){for(var y=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>y},skipToEnd:function(){this.pos=this.string.length},skipTo:function(y){var $=this.string.indexOf(y,this.pos);if($>-1)return this.pos=$,!0},backUp:function(y){this.pos-=y},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(y,$,_){if(typeof y!="string"){var P=this.string.slice(this.pos).match(y);return P&&P.index>0?null:(P&&$!==!1&&(this.pos+=P[0].length),P)}var W=function(G){return _?G.toLowerCase():G},B=this.string.substr(this.pos,y.length);if(W(B)==W(y))return $!==!1&&(this.pos+=y.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(y,$){this.lineStart+=y;try{return $()}finally{this.lineStart-=y}}},ze.defineExtension=function(y,$){ze.prototype[y]=$},jr.importCssString(`.normal-mode .ace_cursor{
1410
+ border: none;
1411
+ background-color: rgba(255,0,0,0.5);
1412
+ }
1413
+ .normal-mode .ace_hidden-cursors .ace_cursor{
1414
+ background-color: transparent;
1415
+ border: 1px solid red;
1416
+ opacity: 0.7
1417
+ }
1418
+ .ace_dialog {
1419
+ position: absolute;
1420
+ left: 0; right: 0;
1421
+ background: inherit;
1422
+ z-index: 15;
1423
+ padding: .1em .8em;
1424
+ overflow: hidden;
1425
+ color: inherit;
1426
+ }
1427
+ .ace_dialog-top {
1428
+ border-bottom: 1px solid #444;
1429
+ top: 0;
1430
+ }
1431
+ .ace_dialog-bottom {
1432
+ border-top: 1px solid #444;
1433
+ bottom: 0;
1434
+ }
1435
+ .ace_dialog input {
1436
+ border: none;
1437
+ outline: none;
1438
+ background: transparent;
1439
+ width: 20em;
1440
+ color: inherit;
1441
+ font-family: monospace;
1442
+ }`,"vimMode",!1),(function(){function y(_,P,W){var B=_.ace.container,G;return G=B.appendChild(document.createElement("div")),W?G.className="ace_dialog ace_dialog-bottom":G.className="ace_dialog ace_dialog-top",typeof P=="string"?G.innerHTML=P:G.appendChild(P),G}function $(_,P){_.state.currentNotificationClose&&_.state.currentNotificationClose(),_.state.currentNotificationClose=P}ze.defineExtension("openDialog",function(_,P,W){function B(be){if(typeof be=="string")ie.value=be;else{if(Y||be&&be.type=="blur"&&document.activeElement===ie)return;Z.state.dialog==G&&(Z.state.dialog=null,Z.focus()),Y=!0,G.remove(),W.onClose&&W.onClose(G);var Se=Z;Se.state.vim&&(Se.state.vim.status=null,Se.ace._signal("changeStatus"),Se.ace.renderer.$loop.schedule(Se.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){W||(W={}),$(this,null);var G=y(this,_,W.bottom),Y=!1,Z=this;this.state.dialog=G;var ie=G.getElementsByTagName("input")[0],ae;return ie?(W.value&&(ie.value=W.value,W.selectValueOnOpen!==!1&&ie.select()),W.onInput&&ze.on(ie,"input",function(be){W.onInput(be,ie.value,B)}),W.onKeyUp&&ze.on(ie,"keyup",function(be){W.onKeyUp(be,ie.value,B)}),ze.on(ie,"keydown",function(be){W&&W.onKeyDown&&W.onKeyDown(be,ie.value,B)||(be.keyCode==13&&P(ie.value),(be.keyCode==27||W.closeOnEnter!==!1&&be.keyCode==13)&&(ze.e_stop(be),B()))}),W.closeOnBlur!==!1&&ze.on(ie,"blur",B),ie.focus()):(ae=G.getElementsByTagName("button")[0])&&(ze.on(ae,"click",function(){B(),Z.focus()}),W.closeOnBlur!==!1&&ze.on(ae,"blur",B),ae.focus()),B}}),ze.defineExtension("openNotification",function(_,P){function W(){G||(G=!0,clearTimeout(Y),B.remove())}if(!this.virtualSelectionMode()){$(this,W);var B=y(this,_,P&&P.bottom),G=!1,Y,Z=P&&typeof P.duration<"u"?P.duration:5e3;return ze.on(B,"click",function(ie){ze.e_preventDefault(ie),W()}),Z&&(Y=setTimeout(W,Z)),W}})})();var De=ze.Pos,Mn=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h"},{keys:"<Del>",type:"keyToKey",toKeys:"x"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"gq",type:"operator",operator:"hardWrap"},{keys:"gw",type:"operator",operator:"hardWrap",operatorArgs:{keepCursor:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<register>",type:"action",action:"replayMacro"},{keys:"q<register>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<register>",type:"action",action:"setMark"},{keys:'"<register>',type:"action",action:"setRegister"},{keys:"<C-r><register>",type:"action",action:"insertRegister",context:"insert",isEdit:!0},{keys:"<C-o>",type:"action",action:"oneNormalCommand",context:"insert"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<register>",type:"motion",motion:"textObjectManipulation"},{keys:"i<register>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],bo=Mn.length,rr=[{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"}],Un=N(""),ga=/[\d]/,xo=[ze.isWordChar,function(y){return y&&!ze.isWordChar(y)&&!/\s/.test(y)}],yr=[function(y){return/\S/.test(y)}],ro=["<",">"],Qt=["-",'"',".",":","_","/","+"],Kt=/^\w$/,Jt;try{Jt=new RegExp("^[\\p{Lu}]$","u")}catch{Jt=/^[A-Z]$/}var Wt={};E("filetype",void 0,"string",["ft"],function(y,$){if($!==void 0){if(y===void 0){var _=$.getOption("mode");return _=="null"?"":_}var _=y==""?"null":y;$.setOption("mode",_)}}),E("textwidth",80,"number",["tw"],function(y,$){if($!==void 0){if(y===void 0){var _=$.getOption("textwidth");return _}var P=Math.round(y);P>1&&$.setOption("textwidth",P)}});var wr=function(){function y(Z,ie,ae){function be(Ne){var Oe=++W%P,Ge=Y[Oe];Ge&&Ge.clear(),Y[Oe]=Z.setBookmark(Ne)}var Se=W%P,ye=Y[Se];if(ye){var xe=ye.find();xe&&!ft(xe,ie)&&be(ie)}else be(ie);be(ae),B=W,G=W-P+1,G<0&&(G=0)}function $(Z,ie){W+=ie,W>B?W=B:W<G&&(W=G);var ae=Y[(P+W)%P];if(ae&&!ae.find()){var be=ie>0?1:-1,Se,ye=Z.getCursor();do if(W+=be,ae=Y[(P+W)%P],ae&&(Se=ae.find())&&!ft(ye,Se))break;while(W<B&&W>G)}return ae}function _(Z,ie){var ae=W,be=$(Z,ie);return W=ae,be&&be.find()}var P=100,W=-1,B=0,G=0,Y=new Array(P);return{cachedCursor:void 0,add:y,find:_,move:$}},Ln=function(y){return y?{changes:y.changes,expectCursorActivityForChange:y.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var y=He.macroModeState;y.onRecordingDone&&y.onRecordingDone(),y.onRecordingDone=void 0,y.isRecording=!1},enterMacroRecordMode:function(y,$){var _=He.registerController.getRegister($);if(_){if(_.clear(),this.latestRegister=$,y.openDialog){var P=ir("span",{class:"cm-vim-message"},"recording @"+$);this.onRecordingDone=y.openDialog(P,null,{bottom:!0})}this.isRecording=!0}}};var He,fn,wt={enterVimMode:d,leaveVimMode:g,buildKeyMap:function(){},getRegisterController:function(){return He.registerController},resetVimGlobalState_:L,getVimGlobalState_:function(){return He},maybeInitVimState_:O,suppressErrorLogging:!1,InsertModeKey:to,map:function(y,$,_){yi.map(y,$,_)},unmap:function(y,$){return yi.unmap(y,$)},noremap:function(y,$,_){yi.map(y,$,_,!0)},mapclear:function(y){var $=Mn.length,_=bo,P=Mn.slice(0,$-_);if(Mn=Mn.slice($-_),y)for(var W=P.length-1;W>=0;W--){var B=P[W];if(y!==B.context)if(B.context)this._mapCommand(B);else{var G=["normal","insert","visual"];for(var Y in G)if(G[Y]!==y){var Z={};for(var ie in B)Z[ie]=B[ie];Z.context=G[Y],this._mapCommand(Z)}}}},langmap:F,vimKeyFromEvent:z,setOption:M,getOption:k,defineOption:E,defineEx:function(y,$,_){if(!$)$=y;else if(y.indexOf($)!==0)throw new Error('(Vim.defineEx) "'+$+'" is not a prefix of "'+y+'", command not registered');$s[y]=_,yi.commandMap_[$]={name:y,shortName:$,type:"api"}},handleKey:function(y,$,_){var P=this.findKey(y,$,_);if(typeof P=="function")return P()},multiSelectHandleKey:mo,findKey:function(y,$,_){function P(){var ie=He.macroModeState;if(ie.isRecording){if($=="q")return ie.exitMacroRecordMode(),S(y),!0;_!="mapping"&&zo(ie,$)}}function W(){if($=="<Esc>"){if(Y.visualMode)An(y);else{if(!Y.insertMode)return;Vi(y)}return S(y),!0}}function B(){if(W())return!0;Y.inputState.keyBuffer.push($);var ie=Y.inputState.keyBuffer.join(""),ae=$.length==1,be=Rn.matchCommand(ie,Mn,Y.inputState,"insert"),Se=Y.inputState.changeQueue;if(be.type=="none")return S(y),!1;if(be.type=="partial"){if(be.expectLiteralNext&&(Y.expectLiteralNext=!0),fn&&window.clearTimeout(fn),fn=ae&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&S(y)},k("insertModeEscKeysTimeout")),ae){var ye=y.listSelections();(!Se||Se.removed.length!=ye.length)&&(Se=Y.inputState.changeQueue=new D),Se.inserted+=$;for(var xe=0;xe<ye.length;xe++){var Ne=yt(ye[xe].anchor,ye[xe].head),Oe=on(ye[xe].anchor,ye[xe].head),Ge=y.getRange(Ne,y.state.overwrite?ve(Oe,0,1):Oe);Se.removed[xe]=(Se.removed[xe]||"")+Ge}}return!ae}if(Y.expectLiteralNext=!1,fn&&window.clearTimeout(fn),be.command&&Se){for(var ye=y.listSelections(),xe=0;xe<ye.length;xe++){var lt=ye[xe].head;y.replaceRange(Se.removed[xe]||"",ve(lt,0,-Se.inserted.length),lt,"+input")}He.macroModeState.lastInsertModeChanges.changes.pop()}return be.command||S(y),be.command}function G(){if(P()||W())return!0;Y.inputState.keyBuffer.push($);var ie=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(ie))return!0;var ae=/^(\d*)(.*)$/.exec(ie);if(!ae)return S(y),!1;var be=Y.visualMode?"visual":"normal",Se=ae[2]||ae[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==Se&&(Se=Y.inputState.operatorShortcut);var ye=Rn.matchCommand(Se,Mn,Y.inputState,be);return ye.type=="none"?(S(y),!1):ye.type=="partial"?(ye.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):ye.type=="clear"?(S(y),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,ae=/^(\d*)(.*)$/.exec(ie),ae[1]&&ae[1]!="0"&&Y.inputState.pushRepeatDigit(ae[1]),ye.command)}var Y=O(y),Z;return Y.insertMode?Z=B():Z=G(),Z===!1?!Y.insertMode&&$.length===1?function(){return!0}:void 0:Z===!0?function(){return!0}:function(){if(!((Z.operator||Z.isEdit)&&y.getOption("readOnly")))return y.operation(function(){y.curOp.isVimOp=!0;try{Z.type=="keyToKey"?I(y,Z.toKeys,Z):Rn.processCommand(y,Y,Z)}catch(ie){throw y.state.vim=void 0,O(y),wt.suppressErrorLogging||console.log(ie),ie}return!0})}},handleEx:function(y,$){yi.processCommand(y,$)},defineMotion:te,defineAction:ce,defineOperator:ne,mapCommand:Cs,_mapCommand:Bo,defineRegister:U,exitVisualMode:An,exitInsertMode:Vi},Oi=[],ln=!1,bn,Qn={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},Ni={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},br={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(Qn)).forEach(function(y){br[(Qn[y]||"").toLowerCase()]=br[y.toLowerCase()]=y}),E("langmap",void 0,"string",["lmap"],function(y,$){if(y===void 0)return Un.string;F(y)}),A.prototype.pushRepeatDigit=function(y){this.operator?this.motionRepeat=this.motionRepeat.concat(y):this.prefixRepeat=this.prefixRepeat.concat(y)},A.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},j.prototype={setText:function(y,$,_){this.keyBuffer=[y||""],this.linewise=!!$,this.blockwise=!!_},pushText:function(y,$){$&&(this.linewise||this.keyBuffer.push(`
1443
+ `),this.linewise=!0),this.keyBuffer.push(y)},pushInsertModeChanges:function(y){this.insertModeChanges.push(Ln(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,$,_,P,W){if(y!=="_"){P&&_.charAt(_.length-1)!==`
1444
+ `&&(_+=`
1445
+ `);var B=this.isValidRegister(y)?this.getRegister(y):null;if(!B){switch($){case"yank":this.registers[0]=new j(_,P,W);break;case"delete":case"change":_.indexOf(`
1446
+ `)==-1?this.registers["-"]=new j(_,P):(this.shiftNumericRegisters_(),this.registers[1]=new j(_,P))}this.unnamedRegister.setText(_,P,W);return}var G=c(y);G?B.pushText(_,P):B.setText(_,P,W),y==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(_),this.unnamedRegister.setText(B.toString(),P)}},getRegister:function(y){return this.isValidRegister(y)?(y=y.toLowerCase(),this.registers[y]||(this.registers[y]=new j),this.registers[y]):this.unnamedRegister},isValidRegister:function(y){return y&&(x(y,Qt)||Kt.test(y))},shiftNumericRegisters_:function(){for(var y=9;y>=2;y--)this.registers[y]=this.getRegister(""+(y-1))}},Q.prototype={nextMatch:function(y,$){var _=this.historyBuffer,P=$?-1:1;this.initialPrefix===null&&(this.initialPrefix=y);for(var W=this.iterator+P;$?W>=0:W<_.length;W+=P)for(var B=_[W],G=0;G<=B.length;G++)if(this.initialPrefix==B.substring(0,G))return this.iterator=W,B;if(W>=_.length)return this.iterator=_.length,this.initialPrefix;if(W<0)return y},pushInput:function(y){var $=this.historyBuffer.indexOf(y);$>-1&&this.historyBuffer.splice($,1),y.length&&this.historyBuffer.push(y)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Rn={matchCommand:function(y,$,_,P){var W=Me(y,$,P,_);if(!W.full&&!W.partial)return{type:"none"};if(!W.full&&W.partial)return{type:"partial",expectLiteralNext:W.partial.length==1&&W.partial[0].keys.slice(-11)=="<character>"};for(var B,G=0;G<W.full.length;G++){var Y=W.full[G];B||(B=Y)}if(B.keys.slice(-11)=="<character>"||B.keys.slice(-10)=="<register>"){var Z=Ee(y);if(!Z||Z.length>1)return{type:"clear"};_.selectedCharacter=Z}return{type:"full",command:B}},processCommand:function(y,$,_){switch($.inputState.repeatOverride=_.repeatOverride,_.type){case"motion":this.processMotion(y,$,_);break;case"operator":this.processOperator(y,$,_);break;case"operatorMotion":this.processOperatorMotion(y,$,_);break;case"action":this.processAction(y,$,_);break;case"search":this.processSearch(y,$,_);break;case"ex":case"keyToEx":this.processEx(y,$,_);break}},processMotion:function(y,$,_){$.inputState.motion=_.motion,$.inputState.motionArgs=ue(_.motionArgs),this.evalInput(y,$)},processOperator:function(y,$,_){var P=$.inputState;if(P.operator){if(P.operator==_.operator){P.motion="expandToLine",P.motionArgs={linewise:!0},this.evalInput(y,$);return}S(y)}P.operator=_.operator,P.operatorArgs=ue(_.operatorArgs),_.keys.length>1&&(P.operatorShortcut=_.keys),_.exitVisualBlock&&($.visualBlock=!1,Zn(y)),$.visualMode&&this.evalInput(y,$)},processOperatorMotion:function(y,$,_){var P=$.visualMode,W=ue(_.operatorMotionArgs);W&&P&&W.visualLine&&($.visualLine=!0),this.processOperator(y,$,_),P||this.processMotion(y,$,_)},processAction:function(y,$,_){var P=$.inputState,W=P.getRepeat(),B=!!W,G=ue(_.actionArgs)||{};P.selectedCharacter&&(G.selectedCharacter=P.selectedCharacter),_.operator&&this.processOperator(y,$,_),_.motion&&this.processMotion(y,$,_),(_.motion||_.operator)&&this.evalInput(y,$),G.repeat=W||1,G.repeatIsExplicit=B,G.registerName=P.registerName,S(y),$.lastMotion=null,_.isEdit&&this.recordLastEdit($,P,_),On[_.action](y,G,$)},processSearch:function(y,$,_){function P(Oe,Ge,lt){He.searchHistoryController.pushInput(Oe),He.searchHistoryController.reset();try{gn(y,Oe,Ge,lt)}catch{Ft(y,"Invalid regex: "+Oe),S(y);return}Rn.processMotion(y,$,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:_.searchArgs.toJumplist}})}function W(Oe){P(Oe,!0,!0);var Ge=He.macroModeState;Ge.isRecording&&Ss(Ge,Oe)}function B(Oe,Ge,lt){var Qe=z(Oe),nt,mn;Qe=="<Up>"||Qe=="<Down>"?(nt=Qe=="<Up>",mn=Oe.target?Oe.target.selectionEnd:0,Ge=He.searchHistoryController.nextMatch(Ge,nt)||"",lt(Ge),mn&&Oe.target&&(Oe.target.selectionEnd=Oe.target.selectionStart=Math.min(mn,Oe.target.value.length))):Qe&&Qe!="<Left>"&&Qe!="<Right>"&&He.searchHistoryController.reset();var ct;try{ct=gn(y,Ge,!0,!0)}catch{}ct?y.scrollIntoView(Ai(y,!Y,ct),30):(Fo(y),y.scrollTo(be.left,be.top))}function G(Oe,Ge,lt){var Qe=z(Oe);Qe=="<Esc>"||Qe=="<C-c>"||Qe=="<C-[>"||Qe=="<BS>"&&Ge==""?(He.searchHistoryController.pushInput(Ge),He.searchHistoryController.reset(),gn(y,ae),Fo(y),y.scrollTo(be.left,be.top),ze.e_stop(Oe),S(y),lt(),y.focus()):Qe=="<Up>"||Qe=="<Down>"?ze.e_stop(Oe):Qe=="<C-u>"&&(ze.e_stop(Oe),lt(""))}if(y.getSearchCursor){var Y=_.searchArgs.forward,Z=_.searchArgs.wholeWordOnly;$n(y).setReversed(!Y);var ie=Y?"/":"?",ae=$n(y).getQuery(),be=y.getScrollInfo();switch(_.searchArgs.querySrc){case"prompt":var Se=He.macroModeState;if(Se.isPlaying){var Ne=Se.replaySearchQueries.shift();P(Ne,!0,!1)}else _i(y,{onClose:W,prefix:ie,desc:"(JavaScript regexp)",onKeyUp:B,onKeyDown:G});break;case"wordUnderCursor":var ye=oi(y,{noSymbol:!0}),xe=!0;if(ye||(ye=oi(y,{noSymbol:!1}),xe=!1),!ye){Ft(y,"No word under cursor"),S(y);return}var Ne=y.getLine(ye.start.line).substring(ye.start.ch,ye.end.ch);xe&&Z?Ne="\\b"+Ne+"\\b":Ne=_n(Ne),He.jumpList.cachedCursor=y.getCursor(),y.setCursor(ye.start),P(Ne,!0,!1)}}},processEx:function(y,$,_){function P(B){He.exCommandHistoryController.pushInput(B),He.exCommandHistoryController.reset(),yi.processCommand(y,B),y.state.vim&&S(y)}function W(B,G,Y){var Z=z(B),ie,ae;(Z=="<Esc>"||Z=="<C-c>"||Z=="<C-[>"||Z=="<BS>"&&G=="")&&(He.exCommandHistoryController.pushInput(G),He.exCommandHistoryController.reset(),ze.e_stop(B),S(y),Y(),y.focus()),Z=="<Up>"||Z=="<Down>"?(ze.e_stop(B),ie=Z=="<Up>",ae=B.target?B.target.selectionEnd:0,G=He.exCommandHistoryController.nextMatch(G,ie)||"",Y(G),ae&&B.target&&(B.target.selectionEnd=B.target.selectionStart=Math.min(ae,B.target.value.length))):Z=="<C-u>"?(ze.e_stop(B),Y("")):Z&&Z!="<Left>"&&Z!="<Right>"&&He.exCommandHistoryController.reset()}_.type=="keyToEx"?yi.processCommand(y,_.exArgs.input):$.visualMode?_i(y,{onClose:P,prefix:":",value:"'<,'>",onKeyDown:W,selectValueOnOpen:!1}):_i(y,{onClose:P,prefix:":",onKeyDown:W})},evalInput:function(y,$){var _=$.inputState,P=_.motion,W=_.motionArgs||{},B=_.operator,G=_.operatorArgs||{},Y=_.registerName,Z=$.sel,ie=Xe($.visualMode?he(y,Z.head):y.getCursor("head")),ae=Xe($.visualMode?he(y,Z.anchor):y.getCursor("anchor")),be=Xe(ie),Se=Xe(ae),ye,xe,Ne;if(B&&this.recordLastEdit($,_),_.repeatOverride!==void 0?Ne=_.repeatOverride:Ne=_.getRepeat(),Ne>0&&W.explicitRepeat?W.repeatIsExplicit=!0:(W.noRepeat||!W.explicitRepeat&&Ne===0)&&(Ne=1,W.repeatIsExplicit=!1),_.selectedCharacter&&(W.selectedCharacter=G.selectedCharacter=_.selectedCharacter),W.repeat=Ne,S(y),P){var Oe=Gi[P](y,ie,W,$,_);if($.lastMotion=Gi[P],!Oe)return;if(W.toJumplist){!B&&y.ace.curOp!=null&&(y.ace.curOp.command.scrollIntoView="center-animate");var Ge=He.jumpList,lt=Ge.cachedCursor;lt?(Nr(y,lt,Oe),delete Ge.cachedCursor):Nr(y,ie,Oe)}Oe instanceof Array?(xe=Oe[0],ye=Oe[1]):ye=Oe,ye||(ye=Xe(ie)),$.visualMode?((!$.visualBlock||ye.ch!==1/0)&&(ye=he(y,ye,be)),xe&&(xe=he(y,xe)),xe=xe||Se,Z.anchor=xe,Z.head=ye,Zn(y),nr(y,$,"<",rt(xe,ye)?xe:ye),nr(y,$,">",rt(xe,ye)?ye:xe)):B||(y.ace.curOp&&(y.ace.curOp.vimDialogScroll="center-animate"),ye=he(y,ye,be),y.setCursor(ye.line,ye.ch))}if(B){if(G.lastSel){xe=Se;var Qe=G.lastSel,nt=Math.abs(Qe.head.line-Qe.anchor.line),mn=Math.abs(Qe.head.ch-Qe.anchor.ch);Qe.visualLine?ye=new De(Se.line+nt,Se.ch):Qe.visualBlock?ye=new De(Se.line+nt,Se.ch+mn):Qe.head.line==Qe.anchor.line?ye=new De(Se.line,Se.ch+mn):ye=new De(Se.line+nt,Se.ch),$.visualMode=!0,$.visualLine=Qe.visualLine,$.visualBlock=Qe.visualBlock,Z=$.sel={anchor:xe,head:ye},Zn(y)}else $.visualMode&&(G.lastSel={anchor:Xe(Z.anchor),head:Xe(Z.head),visualBlock:$.visualBlock,visualLine:$.visualLine});var ct,xn,kt,Mt,Jn;if($.visualMode){ct=yt(Z.head,Z.anchor),xn=on(Z.head,Z.anchor),kt=$.visualLine||G.linewise,Mt=$.visualBlock?"block":kt?"line":"char";var pi=b(y,ct,xn);if(Jn=Ri(y,{anchor:pi.start,head:pi.end},Mt),kt){var Cn=Jn.ranges;if(Mt=="block")for(var V=0;V<Cn.length;V++)Cn[V].head.ch=tn(y,Cn[V].head.line);else Mt=="line"&&(Cn[0].head=new De(Cn[0].head.line+1,0))}}else{if(ct=Xe(xe||Se),xn=Xe(ye||be),rt(xn,ct)){var X=ct;ct=xn,xn=X}kt=W.linewise||G.linewise,kt?ui(y,ct,xn):W.forward&&ri(y,ct,xn),Mt="char";var re=!W.inclusive||kt,pi=b(y,ct,xn);Jn=Ri(y,{anchor:pi.start,head:pi.end},Mt,re)}y.setSelections(Jn.ranges,Jn.primary),$.lastMotion=null,G.repeat=Ne,G.registerName=Y,G.linewise=kt;var oe=qo[B](y,G,Jn.ranges,Se,ye);$.visualMode&&An(y,oe!=null),oe&&y.setCursor(oe)}},recordLastEdit:function(y,$,_){var P=He.macroModeState;P.isPlaying||(y.lastEditInputState=$,y.lastEditActionCommand=_,P.lastInsertModeChanges.changes=[],P.lastInsertModeChanges.expectCursorActivityForChange=!1,P.lastInsertModeChanges.visualBlock=y.visualBlock?y.sel.head.line-y.sel.anchor.line:0)}},Gi={moveToTopLine:function(y,$,_){var P=eo(y).top+_.repeat-1;return new De(P,sn(y.getLine(P)))},moveToMiddleLine:function(y){var $=eo(y),_=Math.floor(($.top+$.bottom)*.5);return new De(_,sn(y.getLine(_)))},moveToBottomLine:function(y,$,_){var P=eo(y).bottom-_.repeat+1;return new De(P,sn(y.getLine(P)))},expandToLine:function(y,$,_){var P=$;return new De(P.line+_.repeat-1,1/0)},findNext:function(y,$,_){var P=$n(y),W=P.getQuery();if(W){var B=!_.forward;return B=P.isReversed()?!B:B,fr(y,W),Ai(y,B,W,_.repeat)}},findAndSelectNextInclusive:function(y,$,_,P,W){var B=$n(y),G=B.getQuery();if(G){var Y=!_.forward;Y=B.isReversed()?!Y:Y;var Z=mr(y,Y,G,_.repeat,P);if(Z){if(W.operator)return Z;var ie=Z[0],ae=new De(Z[1].line,Z[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 be=P.sel.anchor;if(be)return B.isReversed()?_.forward?[be,ie]:[be,ae]:_.forward?[be,ae]:[be,ie]}else P.visualMode=!0,P.visualLine=!1,P.visualBlock=!1,ze.signal(y,"vim-mode-change",{mode:"visual",subMode:""});return Y?[ae,ie]:[ie,ae]}}},goToMark:function(y,$,_,P){var W=Ui(y,P,_.selectedCharacter);return W?_.linewise?{line:W.line,ch:sn(y.getLine(W.line))}:W:null},moveToOtherHighlightedEnd:function(y,$,_,P){if(P.visualBlock&&_.sameLine){var W=P.sel;return[he(y,new De(W.anchor.line,W.head.ch)),he(y,new De(W.head.line,W.anchor.ch))]}return[P.sel.head,P.sel.anchor]},jumpToMark:function(y,$,_,P){for(var W=$,B=0;B<_.repeat;B++){var G=W;for(var Y in P.marks)if(u(Y)){var Z=P.marks[Y].find(),ie=_.forward?rt(Z,G):rt(G,Z);if(!ie&&!(_.linewise&&Z.line==G.line)){var ae=ft(G,W),be=_.forward?zn(G,Z,W):zn(W,Z,G);(ae||be)&&(W=Z)}}}return _.linewise&&(W=new De(W.line,sn(y.getLine(W.line)))),W},moveByCharacters:function(y,$,_){var P=$,W=_.repeat,B=_.forward?P.ch+W:P.ch-W;return new De(P.line,B)},moveByLines:function(y,$,_,P){var W=$,B=W.ch;switch(P.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:B=P.lastHPos;break;default:P.lastHPos=B}var G=_.repeat+(_.repeatOffset||0),Y=_.forward?W.line+G:W.line-G,Z=y.firstLine(),ie=y.lastLine();if(Y<Z&&W.line==Z)return this.moveToStartOfLine(y,$,_,P);if(Y>ie&&W.line==ie)return po(y,$,_,P,!0);var ae=y.ace.session.getFoldLine(Y);return ae&&(_.forward?Y>ae.start.row&&(Y=ae.end.row+1):Y=ae.start.row),_.toFirstChar&&(B=sn(y.getLine(Y)),P.lastHPos=B),P.lastHSPos=y.charCoords(new De(Y,B),"div").left,new De(Y,B)},moveByDisplayLines:function(y,$,_,P){var W=$;switch(P.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:P.lastHSPos=y.charCoords(W,"div").left}var B=_.repeat,Z=y.findPosV(W,_.forward?B:-B,"line",P.lastHSPos);if(Z.hitSide)if(_.forward)var G=y.charCoords(Z,"div"),Y={top:G.top+8,left:P.lastHSPos},Z=y.coordsChar(Y,"div");else{var ie=y.charCoords(new De(y.firstLine(),0),"div");ie.left=P.lastHSPos,Z=y.coordsChar(ie,"div")}return P.lastHPos=Z.ch,Z},moveByPage:function(y,$,_){var P=$,W=_.repeat;return y.findPosV(P,_.forward?W:-W,"page")},moveByParagraph:function(y,$,_){var P=_.forward?1:-1;return ws(y,$,_.repeat,P)},moveBySentence:function(y,$,_){var P=_.forward?1:-1;return Fr(y,$,_.repeat,P)},moveByScroll:function(y,$,_,P){var W=y.getScrollInfo(),B=null,G=_.repeat;G||(G=W.clientHeight/(2*y.defaultTextHeight()));var Y=y.charCoords($,"local");if(_.repeat=G,B=Gi.moveByDisplayLines(y,$,_,P),!B)return null;var Z=y.charCoords(B,"local");return y.scrollTo(null,W.top+Z.top-Y.top),B},moveByWords:function(y,$,_){return mi(y,$,_.repeat,!!_.forward,!!_.wordEnd,!!_.bigWord)},moveTillCharacter:function(y,$,_){var P=_.repeat,W=Po(y,P,_.forward,_.selectedCharacter,$),B=_.forward?-1:1;return Dr(B,_),W?(W.ch+=B,W):null},moveToCharacter:function(y,$,_){var P=_.repeat;return Dr(0,_),Po(y,P,_.forward,_.selectedCharacter,$)||$},moveToSymbol:function(y,$,_){var P=_.repeat;return Pr(y,P,_.forward,_.selectedCharacter)||$},moveToColumn:function(y,$,_,P){var W=_.repeat;return P.lastHPos=W-1,P.lastHSPos=y.charCoords($,"div").left,el(y,W)},moveToEol:function(y,$,_,P){return po(y,$,_,P,!1)},moveToFirstNonWhiteSpaceCharacter:function(y,$){var _=$;return new De(_.line,sn(y.getLine(_.line)))},moveToMatchedSymbol:function(y,$){for(var _=$,P=_.line,W=_.ch,B=y.getLine(P),G;W<B.length;W++)if(G=B.charAt(W),G&&l(G)){var Y=y.getTokenTypeAt(new De(P,W+1));if(Y!=="string"&&Y!=="comment")break}if(W<B.length){var Z=/[<>]/.test(B[W])?/[(){}[\]<>]/:/[(){}[\]]/,ie=y.findMatchingBracket(new De(P,W+1),{bracketRegex:Z});return ie.to}return _},moveToStartOfLine:function(y,$){return new De($.line,0)},moveToLineOrEdgeOfDocument:function(y,$,_){var P=_.forward?y.lastLine():y.firstLine();return _.repeatIsExplicit&&(P=_.repeat-y.getOption("firstLineNumber")),new De(P,sn(y.getLine(P)))},moveToStartOfDisplayLine:function(y){return y.execCommand("goLineLeft"),y.getCursor()},moveToEndOfDisplayLine:function(y){y.execCommand("goLineRight");var $=y.getCursor();return $.sticky=="before"&&$.ch--,$},textObjectManipulation:function(y,$,_,P){var W={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},B={"'":!0,'"':!0,"`":!0},G=_.selectedCharacter;G=="b"?G="(":G=="B"&&(G="{");var Y=!_.textObjectInner,Z,ie;if(W[G]){if(ie=!0,Z=jn(y,$,G,Y),!Z){var ae=y.getSearchCursor(new RegExp("\\"+G,"g"),$);ae.find()&&(Z=jn(y,ae.from(),G,Y))}}else if(B[G])ie=!0,Z=ki(y,$,G,Y);else if(G==="W"||G==="w")for(var be=_.repeat||1;be-- >0;){var Se=oi(y,{inclusive:Y,innerWord:!Y,bigWord:G==="W",noSymbol:G==="W",multiline:!0},Z&&Z.end);Se&&(Z||(Z=Se),Z.end=Se.end)}else if(G==="p")if(Z=ws(y,$,_.repeat,0,Y),_.linewise=!0,P.visualMode)P.visualLine||(P.visualLine=!0);else{var ye=P.inputState.operatorArgs;ye&&(ye.linewise=!0),Z.end.line--}else if(G==="t")Z=uo(y,$,Y);else if(G==="s"){var xe=y.getLine($.line);$.ch>0&&w(xe[$.ch])&&($.ch-=1);var Ne=aa(y,$,_.repeat,1,Y),Oe=aa(y,$,_.repeat,-1,Y);f(y.getLine(Oe.line)[Oe.ch])&&f(y.getLine(Ne.line)[Ne.ch-1])&&(Oe={line:Oe.line,ch:Oe.ch+1}),Z={start:Oe,end:Ne}}return Z?y.state.vim.visualMode?wn(y,Z.start,Z.end,ie):[Z.start,Z.end]:null},repeatLastCharacterSearch:function(y,$,_){var P=He.lastCharacterSearch,W=_.repeat,B=_.forward===P.forward,G=(P.increment?1:0)*(B?-1:1);y.moveH(-G,"char"),_.inclusive=!!B;var Y=Po(y,W,B,P.selectedCharacter);return Y?(Y.ch+=G,Y):(y.moveH(G,"char"),$)}},qo={change:function(y,$,_){var P,W,B=y.state.vim,G=_[0].anchor,Y=_[0].head;if(B.visualMode)if($.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,y.setSelection(G,Y),W=y.getSelection(),y.replaceSelection(""),P=G;else{W=y.getSelection();var Z=de("",_.length);y.replaceSelections(Z),P=yt(_[0].head,_[0].anchor)}else{W=y.getRange(G,Y);var ie=B.lastEditInputState||{};if(ie.motion=="moveByWords"&&!f(W)){var ae=/\s+$/.exec(W);ae&&ie.motionArgs&&ie.motionArgs.forward&&(Y=ve(Y,0,-ae[0].length),W=W.slice(0,-ae[0].length))}$.linewise&&(G=new De(G.line,sn(y.getLine(G.line))),Y.line>G.line&&(Y=new De(Y.line-1,Number.MAX_VALUE))),y.replaceRange("",G,Y),P=G}He.registerController.pushText($.registerName,"change",W,$.linewise,_.length>1),On.enterInsertMode(y,{head:P},y.state.vim)},delete:function(y,$,_){var P,W,B=y.state.vim;if(B.visualBlock){W=y.getSelection();var G=de("",_.length);y.replaceSelections(G),P=yt(_[0].head,_[0].anchor)}else{var Y=_[0].anchor,Z=_[0].head;$.linewise&&Z.line!=y.firstLine()&&Y.line==y.lastLine()&&Y.line==Z.line-1&&(Y.line==y.firstLine()?Y.ch=0:Y=new De(Y.line-1,tn(y,Y.line-1))),W=y.getRange(Y,Z),y.replaceRange("",Y,Z),P=Y,$.linewise&&(P=Gi.moveToFirstNonWhiteSpaceCharacter(y,Y))}return He.registerController.pushText($.registerName,"delete",W,$.linewise,B.visualBlock),he(y,P)},indent:function(y,$,_){var P=y.state.vim,W=P.visualMode?$.repeat:1;if(P.visualBlock){for(var B=y.getOption("tabSize"),G=y.getOption("indentWithTabs")?" ":" ".repeat(B),Y,Z=_.length-1;Z>=0;Z--)if(Y=yt(_[Z].anchor,_[Z].head),$.indentRight)y.replaceRange(G.repeat(W),Y,Y);else{for(var ie=y.getLine(Y.line),ae=0,be=0;be<W;be++){var Se=ie[Y.ch+ae];if(Se==" ")ae++;else{if(Se!=" ")break;ae++;for(var ye=1;ye<G.length&&(Se=ie[Y.ch+ae],Se===" ");ye++)ae++}}y.replaceRange("",Y,ve(Y,0,ae))}return Y}if(y.indentMore)for(var be=0;be<W;be++)$.indentRight?y.indentMore():y.indentLess();else{var xe=_[0].anchor.line,Ne=P.visualBlock?_[_.length-1].anchor.line:_[0].head.line;$.linewise&&Ne--;for(var Z=xe;Z<=Ne;Z++)for(var be=0;be<W;be++)y.indentLine(Z,$.indentRight)}return Gi.moveToFirstNonWhiteSpaceCharacter(y,_[0].anchor)},indentAuto:function(y,$,_){return y.execCommand("indentAuto"),Gi.moveToFirstNonWhiteSpaceCharacter(y,_[0].anchor)},hardWrap:function(y,$,_,P,W){if(y.hardWrap){var B=_[0].anchor.line,G=_[0].head.line;$.linewise&&G--;var Y=y.hardWrap({from:B,to:G});return Y>B&&$.linewise&&Y--,$.keepCursor?P:new De(Y,0)}},changeCase:function(y,$,_,P,W){for(var B=y.getSelections(),G=[],Y=$.toLower,Z=0;Z<B.length;Z++){var ie=B[Z],ae="";if(Y===!0)ae=ie.toLowerCase();else if(Y===!1)ae=ie.toUpperCase();else for(var be=0;be<ie.length;be++){var Se=ie.charAt(be);ae+=c(Se)?Se.toLowerCase():Se.toUpperCase()}G.push(ae)}return y.replaceSelections(G),$.shouldMoveCursor?W:!y.state.vim.visualMode&&$.linewise&&_[0].anchor.line+1==_[0].head.line?Gi.moveToFirstNonWhiteSpaceCharacter(y,P):$.linewise?P:yt(_[0].anchor,_[0].head)},yank:function(y,$,_,P){var W=y.state.vim,B=y.getSelection(),G=W.visualMode?yt(W.sel.anchor,W.sel.head,_[0].head,_[0].anchor):P;return He.registerController.pushText($.registerName,"yank",B,$.linewise,W.visualBlock),G}},On={jumpListWalk:function(y,$,_){if(!_.visualMode){var P=$.repeat,W=$.forward,B=He.jumpList,G=B.move(y,W?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,$,_){if(!_.visualMode){var P=$.repeat||1,W=y.defaultTextHeight(),B=y.getScrollInfo().top,G=W*P,Y=$.forward?B+G:B-G,Z=Xe(y.getCursor()),ie=y.charCoords(Z,"local");if($.forward)Y>ie.top?(Z.line+=(Y-ie.top)/W,Z.line=Math.ceil(Z.line),y.setCursor(Z),ie=y.charCoords(Z,"local"),y.scrollTo(null,ie.top)):y.scrollTo(null,Y);else{var ae=Y+y.getScrollInfo().clientHeight;ae<ie.bottom?(Z.line-=(ie.bottom-ae)/W,Z.line=Math.floor(Z.line),y.setCursor(Z),ie=y.charCoords(Z,"local"),y.scrollTo(null,ie.bottom-y.getScrollInfo().clientHeight)):y.scrollTo(null,Y)}}},scrollToCursor:function(y,$){var _=y.getCursor().line,P=y.charCoords(new De(_,0),"local"),W=y.getScrollInfo().clientHeight,B=P.top;switch($.position){case"center":B=P.bottom-W/2;break;case"bottom":var G=new De(_,y.getLine(_).length-1),Y=y.charCoords(G,"local"),Z=Y.bottom-B;B=B-W+Z}y.scrollTo(null,B)},replayMacro:function(y,$,_){var P=$.selectedCharacter,W=$.repeat,B=He.macroModeState;for(P=="@"?P=B.latestRegister:B.latestRegister=P;W--;)ks(y,_,B,P)},enterMacroRecordMode:function(y,$){var _=He.macroModeState,P=$.selectedCharacter;He.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,$,_){if(!y.getOption("readOnly")){_.insertMode=!0,_.insertModeRepeat=$&&$.repeat||1;var P=$?$.insertAt:null,W=_.sel,B=$.head||y.getCursor("head"),G=y.listSelections().length;if(P=="eol")B=new De(B.line,tn(y,B.line));else if(P=="bol")B=new De(B.line,0);else if(P=="charAfter"){var Y=b(y,B,ve(B,0,1));B=Y.end}else if(P=="firstNonBlank"){var Y=b(y,B,Gi.moveToFirstNonWhiteSpaceCharacter(y,B));B=Y.end}else if(P=="startOfSelectedArea"){if(!_.visualMode)return;_.visualBlock?(B=new De(Math.min(W.head.line,W.anchor.line),Math.min(W.head.ch,W.anchor.ch)),G=Math.abs(W.head.line-W.anchor.line)+1):W.head.line<W.anchor.line?B=W.head:B=new De(W.anchor.line,0)}else if(P=="endOfSelectedArea"){if(!_.visualMode)return;_.visualBlock?(B=new De(Math.min(W.head.line,W.anchor.line),Math.max(W.head.ch,W.anchor.ch)+1),G=Math.abs(W.head.line-W.anchor.line)+1):W.head.line>=W.anchor.line?B=ve(W.head,0,1):B=new De(W.anchor.line,0)}else if(P=="inplace"){if(_.visualMode)return}else P=="lastEdit"&&(B=go(y)||B);y.setOption("disableInput",!1),$&&$.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"})),He.macroModeState.isPlaying||(y.on("change",fo),_.insertEnd&&_.insertEnd.clear(),_.insertEnd=y.setBookmark(B,{insertLeft:!0}),ze.on(y.getInputField(),"keydown",_s)),_.visualMode&&An(y),Li(y,B,G)}},toggleVisualMode:function(y,$,_){var P=$.repeat,W=y.getCursor(),B;if(_.visualMode)_.visualLine^$.linewise||_.visualBlock^$.blockwise?(_.visualLine=!!$.linewise,_.visualBlock=!!$.blockwise,ze.signal(y,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""}),Zn(y)):An(y);else{_.visualMode=!0,_.visualLine=!!$.linewise,_.visualBlock=!!$.blockwise,B=he(y,new De(W.line,W.ch+P-1));var G=b(y,W,B);_.sel={anchor:G.start,head:G.end},ze.signal(y,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""}),Zn(y),nr(y,_,"<",yt(W,B)),nr(y,_,">",on(W,B))}},reselectLastSelection:function(y,$,_){var P=_.lastSelection;if(_.visualMode&&Gt(y,_),P){var W=P.anchorMark.find(),B=P.headMark.find();if(!W||!B)return;_.sel={anchor:W,head:B},_.visualMode=!0,_.visualLine=P.visualLine,_.visualBlock=P.visualBlock,Zn(y),nr(y,_,"<",yt(W,B)),nr(y,_,">",on(W,B)),ze.signal(y,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""})}},joinLines:function(y,$,_){var P,W;if(_.visualMode){if(P=y.getCursor("anchor"),W=y.getCursor("head"),rt(W,P)){var B=W;W=P,P=B}W.ch=tn(y,W.line)-1}else{var G=Math.max($.repeat,2);P=y.getCursor(),W=he(y,new De(P.line+G-1,1/0))}for(var Y=0,Z=P.line;Z<W.line;Z++){Y=tn(y,P.line);var ie="",ae=0;if(!$.keepSpaces){var be=y.getLine(P.line+1);ae=be.search(/\S/),ae==-1?ae=be.length:ie=" "}y.replaceRange(ie,new De(P.line,Y),new De(P.line+1,ae))}var Se=he(y,new De(P.line,Y));_.visualMode&&An(y,!1),y.setCursor(Se)},newLineAndEnterInsertMode:function(y,$,_){_.insertMode=!0;var P=Xe(y.getCursor());if(P.line===y.firstLine()&&!$.after)y.replaceRange(`
1447
+ `,new De(y.firstLine(),0)),y.setCursor(y.firstLine(),0);else{P.line=$.after?P.line:P.line-1,P.ch=tn(y,P.line),y.setCursor(P);var W=ze.commands.newlineAndIndentContinueComment||ze.commands.newlineAndIndent;W(y)}this.enterInsertMode(y,{repeat:$.repeat},_)},paste:function(y,$,_){var P=this,W=He.registerController.getRegister($.registerName),B=function(){var G=W.toString();P.continuePaste(y,$,_,G,W)};$.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(G){P.continuePaste(y,$,_,G,W)},function(){B()}):B()},continuePaste:function(y,$,_,P,W){var B=Xe(y.getCursor());if(P){if($.matchIndent){var G=y.getOption("tabSize"),Y=function(Cn){var V=Cn.split(" ").length-1,X=Cn.split(" ").length-1;return V*G+X*1},Z=y.getLine(y.getCursor().line),ie=Y(Z.match(/^\s*/)[0]),ae=P.replace(/\n$/,""),be=P!==ae,Se=Y(P.match(/^\s*/)[0]),P=ae.replace(/^\s*/gm,function(Cn){var V=ie+(Y(Cn)-Se);if(V<0)return"";if(y.getOption("indentWithTabs")){var X=Math.floor(V/G);return Array(X+1).join(" ")}return Array(V+1).join(" ")});P+=be?`
1448
+ `:""}if($.repeat>1)var P=Array($.repeat+1).join(P);var ye=W.linewise,xe=W.blockwise;if(xe){P=P.split(`
1449
+ `),ye&&P.pop();for(var Ne=0;Ne<P.length;Ne++)P[Ne]=P[Ne]==""?" ":P[Ne];B.ch+=$.after?1:0,B.ch=Math.min(tn(y,B.line),B.ch)}else ye?_.visualMode?P=_.visualLine?P.slice(0,-1):`
1450
+ `+P.slice(0,P.length-1)+`
1451
+ `:$.after?(P=`
1452
+ `+P.slice(0,P.length-1),B.ch=tn(y,B.line)):B.ch=0:B.ch+=$.after?1:0;var Oe;if(_.visualMode){_.lastPastedText=P;var Ge,lt=qe(y,_),Qe=lt[0],nt=lt[1],mn=y.getSelection(),ct=y.listSelections(),xn=new Array(ct.length).join("1").split("1");_.lastSelection&&(Ge=_.lastSelection.headMark.find()),He.registerController.unnamedRegister.setText(mn),xe?(y.replaceSelections(xn),nt=new De(Qe.line+P.length-1,Qe.ch),y.setCursor(Qe),ci(y,nt),y.replaceSelections(P),Oe=Qe):_.visualBlock?(y.replaceSelections(xn),y.setCursor(Qe),y.replaceRange(P,Qe,Qe),Oe=Qe):(y.replaceRange(P,Qe,nt),Oe=y.posFromIndex(y.indexFromPos(Qe)+P.length-1)),Ge&&(_.lastSelection.headMark=y.setBookmark(Ge)),ye&&(Oe.ch=0)}else if(xe){y.setCursor(B);for(var Ne=0;Ne<P.length;Ne++){var kt=B.line+Ne;kt>y.lastLine()&&y.replaceRange(`
1453
+ `,new De(kt,0));var Mt=tn(y,kt);Mt<B.ch&&Xn(y,kt,B.ch)}y.setCursor(B),ci(y,new De(B.line+P.length-1,B.ch)),y.replaceSelections(P),Oe=B}else if(y.replaceRange(P,B),ye){var kt=$.after?B.line+1:B.line;Oe=new De(kt,sn(y.getLine(kt)))}else Oe=Xe(B),/\n/.test(P)||(Oe.ch+=P.length-($.after?1:0));_.visualMode&&An(y,!1),y.setCursor(Oe)}},undo:function(y,$){y.operation(function(){Je(y,ze.commands.undo,$.repeat)(),y.setCursor(he(y,y.getCursor("start")))})},redo:function(y,$){Je(y,ze.commands.redo,$.repeat)()},setRegister:function(y,$,_){_.inputState.registerName=$.selectedCharacter},insertRegister:function(y,$,_){var P=$.selectedCharacter,W=He.registerController.getRegister(P),B=W&&W.toString();B&&y.replaceSelection(B)},oneNormalCommand:function(y,$,_){Vi(y,!0),_.insertModeReturn=!0,ze.on(y,"vim-command-done",function P(){_.visualMode||(_.insertModeReturn&&(_.insertModeReturn=!1,_.insertMode||On.enterInsertMode(y,{},_)),ze.off(y,"vim-command-done",P))})},setMark:function(y,$,_){var P=$.selectedCharacter;nr(y,_,P,y.getCursor())},replace:function(y,$,_){var P=$.selectedCharacter,W=y.getCursor(),B,G,Y=y.listSelections();if(_.visualMode)W=y.getCursor("start"),G=y.getCursor("end");else{var Z=y.getLine(W.line);B=W.ch+$.repeat,B>Z.length&&(B=Z.length),G=new De(W.line,B)}var ie=b(y,W,G);if(W=ie.start,G=ie.end,P==`
1454
+ `)_.visualMode||y.replaceRange("",W,G),(ze.commands.newlineAndIndentContinueComment||ze.commands.newlineAndIndent)(y);else{var ae=y.getRange(W,G);if(ae=ae.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),ae=ae.replace(/[^\n]/g,P),_.visualBlock){var be=new Array(y.getOption("tabSize")+1).join(" ");ae=y.getSelection(),ae=ae.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),ae=ae.replace(/\t/g,be).replace(/[^\n]/g,P).split(`
1455
+ `),y.replaceSelections(ae)}else y.replaceRange(ae,W,G);_.visualMode?(W=rt(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,y.setCursor(W),An(y,!1)):y.setCursor(ve(G,0,-1))}},incrementNumberToken:function(y,$){for(var _=y.getCursor(),P=y.getLine(_.line),W=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,B,G,Y,Z;(B=W.exec(P))!==null&&(G=B.index,Y=G+B[0].length,!(_.ch<Y)););if(!(!$.backtrack&&Y<=_.ch)&&B){var ie=B[2]||B[4],ae=B[3]||B[5],be=$.increase?1:-1,Se={"0b":2,0:8,"":10,"0x":16}[ie.toLowerCase()],ye=parseInt(B[1]+ae,Se)+be*$.repeat;Z=ye.toString(Se);var xe=ie?new Array(ae.length-Z.length+1+B[1].length).join("0"):"";Z.charAt(0)==="-"?Z="-"+ie+xe+Z.substr(1):Z=ie+xe+Z;var Ne=new De(_.line,G),Oe=new De(_.line,Y);y.replaceRange(Z,Ne,Oe),y.setCursor(new De(_.line,G+Z.length-1))}},repeatLastEdit:function(y,$,_){var P=_.lastEditInputState;if(P){var W=$.repeat;W&&$.repeatIsExplicit?_.lastEditInputState.repeatOverride=W:W=_.lastEditInputState.repeatOverride||W,ua(y,_,W,!1)}},indent:function(y,$){y.indentLine(y.getCursor().line,$.indentRight)},exitInsertMode:Vi},or={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},sr={bracket:{isComplete:function(y){if(y.nextCh===y.symb){if(y.depth++,y.depth>=1)return!0}else y.nextCh===y.reverseSymb&&y.depth--;return!1}},section:{init:function(y){y.curMoveThrough=!0,y.symb=(y.forward?"]":"[")===y.symb?"{":"}"},isComplete:function(y){return y.index===0&&y.nextCh===y.symb}},comment:{isComplete:function(y){var $=y.lastCh==="*"&&y.nextCh==="/";return y.lastCh=y.nextCh,$}},method:{init:function(y){y.symb=y.symb==="m"?"{":"}",y.reverseSymb=y.symb==="{"?"}":"{"},isComplete:function(y){return y.nextCh===y.symb}},preprocess:{init:function(y){y.index=0},isComplete:function(y){if(y.nextCh==="#"){var $=y.lineText.match(/^#(\w+)/)[1];if($==="endif"){if(y.forward&&y.depth===0)return!0;y.depth++}else if($==="if"){if(!y.forward&&y.depth===0)return!0;y.depth--}if($==="else"&&y.depth===0)return!0}return!1}}};E("pcre",!0,"boolean"),Wr.prototype={getQuery:function(){return He.query},setQuery:function(y){He.query=y},getOverlay:function(){return this.searchOverlay},setOverlay:function(y){this.searchOverlay=y},isReversed:function(){return He.isReversed},setReversed:function(y){He.isReversed=y},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(y){this.annotate=y}};var xr={"\\n":`
1456
+ `,"\\r":"\r","\\t":" "},hi={"\\/":"/","\\\\":"\\","\\n":`
1457
+ `,"\\r":"\r","\\t":" ","\\&":"&"},di=0,vi=function(){this.buildCommandMap_()};vi.prototype={processCommand:function(y,$,_){var P=this;y.operation(function(){y.curOp.isVimOp=!0,P._processCommand(y,$,_)})},_processCommand:function(y,$,_){var P=y.state.vim,W=He.registerController.getRegister(":"),B=W.toString(),G=new ze.StringStream($);W.setText($);var Y=_||{};Y.input=$;try{this.parseInput_(y,G,Y)}catch(ae){throw Ft(y,ae.toString()),ae}P.visualMode&&An(y);var Z,ie;if(!Y.commandName)Y.line!==void 0&&(ie="move");else if(Z=this.matchCommand_(Y.commandName),Z){if(ie=Z.name,Z.excludeFromCommandHistory&&W.setText(B),this.parseCommandArgs_(G,Y,Z),Z.type=="exToKey"){I(y,Z.toKeys,Z);return}if(Z.type=="exToEx"){this.processCommand(y,Z.toInput);return}}if(!ie){Ft(y,'Not an editor command ":'+$+'"');return}try{$s[ie](y,Y),(!Z||!Z.possiblyAsync)&&Y.callback&&Y.callback()}catch(ae){throw Ft(y,ae.toString()),ae}},parseInput_:function(y,$,_){if($.eatWhile(":"),$.eat("%")?(_.line=y.firstLine(),_.lineEnd=y.lastLine()):(_.line=this.parseLineSpec_(y,$),_.line!==void 0&&$.eat(",")&&(_.lineEnd=this.parseLineSpec_(y,$))),_.line==null)if(y.state.vim.visualMode){var P=Ui(y,y.state.vim,"<");_.selectionLine=P&&P.line,P=Ui(y,y.state.vim,">"),_.selectionLineEnd=P&&P.line}else _.selectionLine=y.getCursor().line;else _.selectionLine=_.line,_.selectionLineEnd=_.lineEnd;var W=$.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return W?_.commandName=W[1]:_.commandName=$.match(/.*/)[0],_},parseLineSpec_:function(y,$){var _=$.match(/^(\d+)/);if(_)return parseInt(_[1],10)-1;switch($.next()){case".":return this.parseLineSpecOffset_($,y.getCursor().line);case"$":return this.parseLineSpecOffset_($,y.lastLine());case"'":var P=$.next(),W=Ui(y,y.state.vim,P);if(!W)throw new Error("Mark not set");return this.parseLineSpecOffset_($,W.line);case"-":case"+":return $.backUp(1),this.parseLineSpecOffset_($,y.getCursor().line);default:return $.backUp(1),void 0}},parseLineSpecOffset_:function(y,$){var _=y.match(/^([+-])?(\d+)/);if(_){var P=parseInt(_[2],10);_[1]=="-"?$-=P:$+=P}return $},parseCommandArgs_:function(y,$,_){if(!y.eol()){$.argString=y.match(/.*/)[0];var P=_.argDelimiter||/\s+/,W=tr($.argString).split(P);W.length&&W[0]&&($.args=W)}},matchCommand_:function(y){for(var $=y.length;$>0;$--){var _=y.substring(0,$);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<rr.length;y++){var $=rr[y],_=$.shortName||$.name;this.commandMap_[_]=$}},map:function(y,$,_,P){if(y!=":"&&y.charAt(0)==":"){if(_)throw Error("Mode not supported for ex mappings");var W=y.substring(1);$!=":"&&$.charAt(0)==":"?this.commandMap_[W]={name:W,type:"exToEx",toInput:$.substring(1),user:!0}:this.commandMap_[W]={name:W,type:"exToKey",toKeys:$,user:!0}}else{var B={keys:y,type:"keyToKey",toKeys:$,noremap:!!P};_&&(B.context=_),Mn.unshift(B)}},unmap:function(y,$){if(y!=":"&&y.charAt(0)==":"){if($)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,W=0;W<Mn.length;W++)if(P==Mn[W].keys&&Mn[W].context===$)return Mn.splice(W,1),!0}};var $s={colorscheme:function(y,$){if(!$.args||$.args.length<1){Ft(y,y.getOption("theme"));return}y.setOption("theme",$.args[0])},map:function(y,$,_,P){var W=$.args;if(!W||W.length<2){y&&Ft(y,"Invalid mapping: "+$.input);return}yi.map(W[0],W[1],_,P)},imap:function(y,$){this.map(y,$,"insert")},nmap:function(y,$){this.map(y,$,"normal")},vmap:function(y,$){this.map(y,$,"visual")},omap:function(y,$){this.map(y,$,"operatorPending")},noremap:function(y,$){this.map(y,$,void 0,!0)},inoremap:function(y,$){this.map(y,$,"insert",!0)},nnoremap:function(y,$){this.map(y,$,"normal",!0)},vnoremap:function(y,$){this.map(y,$,"visual",!0)},onoremap:function(y,$){this.map(y,$,"operatorPending",!0)},unmap:function(y,$,_){var P=$.args;(!P||P.length<1||!yi.unmap(P[0],_))&&y&&Ft(y,"No such mapping: "+$.input)},mapclear:function(y,$){wt.mapclear()},imapclear:function(y,$){wt.mapclear("insert")},nmapclear:function(y,$){wt.mapclear("normal")},vmapclear:function(y,$){wt.mapclear("visual")},omapclear:function(y,$){wt.mapclear("operatorPending")},move:function(y,$){Rn.processCommand(y,y.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:$.line+1})},set:function(y,$){var _=$.args,P=$.setCfg||{};if(!_||_.length<1){y&&Ft(y,"Invalid mapping: "+$.input);return}var W=_[0].split("="),B=W[0],G=W[1],Y=!1,Z=!1;if(B.charAt(B.length-1)=="?"){if(G)throw Error("Trailing characters: "+$.argString);B=B.substring(0,B.length-1),Y=!0}else B.charAt(B.length-1)=="!"&&(B=B.substring(0,B.length-1),Z=!0);G===void 0&&B.substring(0,2)=="no"&&(B=B.substring(2),G=!1);var ie=Wt[B]&&Wt[B].type=="boolean";if(ie&&(Z?G=!k(B,y,P):G==null&&(G=!0)),!ie&&G===void 0||Y){var ae=k(B,y,P);ae instanceof Error?Ft(y,ae.message):ae===!0||ae===!1?Ft(y," "+(ae?"":"no")+B):Ft(y," "+B+"="+ae)}else{var be=M(B,G,y,P);be instanceof Error&&Ft(y,be.message)}},setlocal:function(y,$){$.setCfg={scope:"local"},this.set(y,$)},setglobal:function(y,$){$.setCfg={scope:"global"},this.set(y,$)},registers:function(y,$){var _=$.args,P=He.registerController.registers,W=`----------Registers----------
1458
+
1459
+ `;if(_){var B;_=_.join("");for(var G=0;G<_.length;G++)if(B=_.charAt(G),!!He.registerController.isValidRegister(B)){var Y=P[B]||new j;W+='"'+B+" "+Y.toString()+`
1460
+ `}}else for(var B in P){var Z=P[B].toString();Z.length&&(W+='"'+B+" "+Z+`
1461
+ `)}Ft(y,W)},sort:function(y,$){function _(){if($.argString){var kt=new ze.StringStream($.argString);if(kt.eat("!")&&(B=!0),kt.eol())return;if(!kt.eatSpace())return"Invalid arguments";var Mt=kt.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!Mt&&!kt.eol())return"Invalid arguments";if(Mt[1]){G=Mt[1].indexOf("i")!=-1,Y=Mt[1].indexOf("u")!=-1;var Jn=Mt[1].indexOf("d")!=-1||Mt[1].indexOf("n")!=-1&&1,pi=Mt[1].indexOf("x")!=-1&&1,Cn=Mt[1].indexOf("o")!=-1&&1;if(Jn+pi+Cn>1)return"Invalid arguments";Z=Jn&&"decimal"||pi&&"hex"||Cn&&"octal"}Mt[2]&&(ie=new RegExp(Mt[2].substr(1,Mt[2].length-2),G?"i":""))}}function P(kt,Mt){if(B){var Jn;Jn=kt,kt=Mt,Mt=Jn}G&&(kt=kt.toLowerCase(),Mt=Mt.toLowerCase());var pi=Z&&Oe.exec(kt),Cn=Z&&Oe.exec(Mt);return pi?(pi=parseInt((pi[1]+pi[2]).toLowerCase(),Ge),Cn=parseInt((Cn[1]+Cn[2]).toLowerCase(),Ge),pi-Cn):kt<Mt?-1:1}function W(kt,Mt){if(B){var Jn;Jn=kt,kt=Mt,Mt=Jn}return G&&(kt[0]=kt[0].toLowerCase(),Mt[0]=Mt[0].toLowerCase()),kt[0]<Mt[0]?-1:1}var B,G,Y,Z,ie,ae=_();if(ae){Ft(y,ae+": "+$.argString);return}var be=$.line||y.firstLine(),Se=$.lineEnd||$.line||y.lastLine();if(be!=Se){var ye=new De(be,0),xe=new De(Se,tn(y,Se)),Ne=y.getRange(ye,xe).split(`
1462
+ `),Oe=ie||(Z=="decimal"?/(-?)([\d]+)/:Z=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Z=="octal"?/([0-7]+)/:null),Ge=Z=="decimal"?10:Z=="hex"?16:Z=="octal"?8:null,lt=[],Qe=[];if(Z||ie)for(var nt=0;nt<Ne.length;nt++){var mn=ie?Ne[nt].match(ie):null;mn&&mn[0]!=""?lt.push(mn):!ie&&Oe.exec(Ne[nt])?lt.push(Ne[nt]):Qe.push(Ne[nt])}else Qe=Ne;if(lt.sort(ie?W:P),ie)for(var nt=0;nt<lt.length;nt++)lt[nt]=lt[nt].input;else Z||Qe.sort(P);if(Ne=B?lt.concat(Qe):Qe.concat(lt),Y){var ct=Ne,xn;Ne=[];for(var nt=0;nt<ct.length;nt++)ct[nt]!=xn&&Ne.push(ct[nt]),xn=ct[nt]}y.replaceRange(Ne.join(`
1463
+ `),ye,xe)}},vglobal:function(y,$){this.global(y,$)},normal:function(y,$){var _=$.argString;if(_&&_[0]=="!"&&(_=_.slice(1),ln=!0),_=_.trimStart(),!_){Ft(y,"Argument is required.");return}var P=$.line;if(typeof P=="number")for(var W=isNaN($.lineEnd)?P:$.lineEnd,B=P;B<=W;B++)y.setCursor(B,0),I(y,$.argString.trimStart()),y.state.vim.insertMode&&Vi(y,!0);else I(y,$.argString.trimStart()),y.state.vim.insertMode&&Vi(y,!0)},global:function(y,$){var _=$.argString;if(!_){Ft(y,"Regular Expression missing from global");return}var P=$.commandName[0]==="v";_[0]==="!"&&$.commandName[0]==="g"&&(P=!0,_=_.slice(1));var W=$.line!==void 0?$.line:y.firstLine(),B=$.lineEnd||$.line||y.lastLine(),G=Si(_),Y=_,Z;if(G.length&&(Y=G[0],Z=G.slice(1,G.length).join("/")),Y)try{gn(y,Y,!0,!0)}catch{Ft(y,"Invalid regex: "+Y);return}for(var ie=$n(y).getQuery(),ae=[],be=W;be<=B;be++){var Se=y.getLine(be),ye=ie.test(Se);ye!==P&&ae.push(Z?y.getLineHandle(be):Se)}if(!Z){Ft(y,ae.join(`
1464
+ `));return}var xe=0,Ne=function(){if(xe<ae.length){var Oe=ae[xe++],Ge=y.getLineNumber(Oe);if(Ge==null){Ne();return}var lt=Ge+1+Z;yi.processCommand(y,lt,{callback:Ne})}else y.releaseLineHandles&&y.releaseLineHandles()};Ne()},substitute:function(y,$){if(!y.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var _=$.argString,P=_?Br(_,_[0]):[],W,B="",G,Y,Z,ie=!1,ae=!1;if(P.length)W=P[0],k("pcre")&&W!==""&&(W=new RegExp(W).source),B=P[1],B!==void 0&&(k("pcre")?B=il(B.replace(/([^\\])&/g,"$1$$&")):B=nl(B),He.lastSubstituteReplacePart=B),G=P[2]?P[2].split(" "):[];else if(_&&_.length){Ft(y,"Substitutions should be of the form :s/pattern/replace/");return}if(G&&(Y=G[0],Z=parseInt(G[1]),Y&&(Y.indexOf("c")!=-1&&(ie=!0),Y.indexOf("g")!=-1&&(ae=!0),k("pcre")?W=W+"/"+Y:W=W.replace(/\//g,"\\/")+"/"+Y)),W)try{gn(y,W,!0,!0)}catch{Ft(y,"Invalid regex: "+W);return}if(B=B||He.lastSubstituteReplacePart,B===void 0){Ft(y,"No previous substitute regular expression");return}var be=$n(y),Se=be.getQuery(),ye=$.line!==void 0?$.line:y.getCursor().line,xe=$.lineEnd||ye;ye==y.firstLine()&&xe==y.lastLine()&&(xe=1/0),Z&&(ye=xe,xe=ye+Z-1);var Ne=he(y,new De(ye,0)),Oe=y.getSearchCursor(Se,Ne);Wo(y,ie,ae,ye,xe,Oe,Se,B,$.callback)},startinsert:function(y,$){I(y,$.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){Fo(y)},yank:function(y){var $=Xe(y.getCursor()),_=$.line,P=y.getLine(_);He.registerController.pushText("0","yank",P,!0,!0)},delete:function(y,$){var _=$.selectionLine,P=isNaN($.selectionLineEnd)?_:$.selectionLineEnd;qo.delete(y,{linewise:!0},[{anchor:new De(_,0),head:new De(P+1,0)}])},join:function(y,$){var _=$.selectionLine,P=isNaN($.selectionLineEnd)?_:$.selectionLineEnd;y.setCursor(new De(_,0)),On.joinLines(y,{repeat:P-_},y.state.vim)},delmarks:function(y,$){if(!$.argString||!tr($.argString)){Ft(y,"Argument required");return}for(var _=y.state.vim,P=new ze.StringStream(tr($.argString));!P.eol();){P.eatSpace();var W=P.pos;if(!P.match(/[a-zA-Z]/,!1)){Ft(y,"Invalid argument: "+$.argString.substring(W));return}var B=P.next();if(P.match("-",!0)){if(!P.match(/[a-zA-Z]/,!1)){Ft(y,"Invalid argument: "+$.argString.substring(W));return}var G=B,Y=P.next();if(!(u(G)&&u(Y)||c(G)&&c(Y))){Ft(y,"Invalid argument: "+G+"-");return}var Z=G.charCodeAt(0),ie=Y.charCodeAt(0);if(Z>=ie){Ft(y,"Invalid argument: "+$.argString.substring(W));return}for(var ae=0;ae<=ie-Z;ae++){var be=String.fromCharCode(Z+ae);delete _.marks[be]}}else delete _.marks[B]}}},yi=new vi;E("insertModeEscKeysTimeout",200,"number"),ze.Vim=wt;var $i={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"},ar=wt.handleKey.bind(wt);wt.handleKey=function(y,$,_){return y.operation(function(){return ar(y,$,_)},!0)},L(),i.CodeMirror=ze;var lr=wt.maybeInitVimState_;i.handler={$id:"ace/keyboard/vim",drawCursor:function(y,$,_,P,W){var B=this.state.vim||{},G=_.characterWidth,Y=_.lineHeight,Z=$.top,ie=$.left;if(!B.insertMode){var ae=P.cursor?ai.comparePoints(P.cursor,P.start)<=0:W.selection.isBackwards()||W.selection.isEmpty();!ae&&ie>G&&(ie-=G)}!B.insertMode&&B.status&&(Y/=2,Z+=Y),jr.translate(y,ie,Z),jr.setStyle(y.style,"width",G+"px"),jr.setStyle(y.style,"height",Y+"px")},$getDirectionForHighlight:function(y){var $=y.state.cm,_=lr($);if(!_.insertMode)return y.session.selection.isBackwards()||y.session.selection.isEmpty()},handleKeyboard:function(y,$,_,P,W){var B=y.editor,G=B.state.cm,Y=lr(G);if(P!=-1){if(Y.insertMode||($==-1?(_.charCodeAt(0)>255&&y.inputKey&&(_=y.inputKey,_&&y.inputHash==4&&(_=_.toUpperCase())),y.inputChar=_):$==4||$==0?y.inputKey==_&&y.inputHash==$&&y.inputChar?(_=y.inputChar,$=-1):(y.inputChar=null,y.inputKey=_,y.inputHash=$):y.inputChar=y.inputKey=null),G.state.overwrite&&Y.insertMode&&_=="backspace"&&$==0)return{command:"gotoleft"};if(_=="c"&&$==1&&!yo.isMac&&B.getCopyText())return B.once("copy",function(){Y.insertMode?B.selection.clearSelection():G.operation(function(){An(G)})}),{command:"null",passEvent:!0};if(_=="esc"&&!Y.insertMode&&!Y.visualMode&&!G.ace.inMultiSelectMode){var Z=$n(G),ie=Z.getOverlay();ie&&G.removeOverlay(ie)}if($==-1||$&1||$===0&&_.length>1){var ae=Y.insertMode,be=As($,_,W||{},Y);Y.status==null&&(Y.status="");var Se=mo(G,be,"user");return Y=lr(G),Se&&Y.status!=null?Y.status+=be:Y.status==null&&(Y.status=""),G._signal("changeStatus"),!Se&&($!=-1||ae)?void 0:{command:"null",passEvent:!Se}}}},attach:function(y){function $(){var P=lr(_).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,d(_),lr(_).status=null,_.on("vim-command-done",function(){_.virtualSelectionMode()||(lr(_).status=null,_.ace._signal("changeStatus"),_.ace.session.markUndoGroup())}),_.on("changeStatus",function(){_.ace.renderer.updateCursor(),_.ace._signal("changeStatus")}),_.on("vim-mode-change",function(){_.virtualSelectionMode()||($(),_._signal("changeStatus"))}),$(),y.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(_)},detach:function(y){var $=y.state.cm;g($),$.destroy(),y.state.cm=null,y.$vimModeHandler=null,y.renderer.$cursorLayer.drawCursor=null,y.renderer.setStyle("normal-mode",!1),y.textInput.setCommandMode(!1),y.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(y){var $=y.state.cm,_=lr($);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,$){$&&$.ace.setOption("wrap",y)},type:"boolean"},!1),wt.defineEx("write","w",function(){console.log(":write is not implemented")}),Mn.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"}}),Mn.push({keys:"gq",type:"operator",operator:"hardWrap"}),wt.defineOperator("hardWrap",function(y,$,_,P,W){var B=_[0].anchor.line,G=_[0].head.line;return $.linewise&&G--,io(y.ace,{startRow:B,endRow:G}),De(G,0)}),E("textwidth",void 0,"number",["tw"],function(y,$){if($!==void 0){if(y===void 0){var _=$.ace.getOption("printMarginColumn");return _}var P=Math.round(y);P>1&&$.ace.setOption("printMarginColumn",P)}}),On.aceCommand=function(y,$,_){y.vimCmd=$,y.ace.inVirtualSelectionMode?y.ace.on("beforeEndOperation",vr):vr(null,y.ace)},On.fold=function(y,$,_){y.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][($.all?2:0)+($.open?1:0)])},bo=Mn.length,i.handler.defaultKeymap=Mn,i.handler.actions=On,i.Vim=wt}),(function(){ace.require(["ace/keyboard/vim"],function(n){t&&(t.exports=n)})})()})(hf)),hf.exports}ZC();var pf={},gf;function QC(){return gf||(gf=1,(function(t){(function(){var e={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 n(b){return h(m(b),arguments)}function i(b,d){return n.apply(null,[b].concat(d||[]))}function h(b,d){var g=1,o=b.length,a,u="",l,s,c,f,w,x,E,M;for(l=0;l<o;l++)if(typeof b[l]=="string")u+=b[l];else if(typeof b[l]=="object"){if(c=b[l],c.keys)for(a=d[g],s=0;s<c.keys.length;s++){if(a==null)throw new Error(n('[sprintf] Cannot access property "%s" of undefined value "%s"',c.keys[s],c.keys[s-1]));a=a[c.keys[s]]}else c.param_no?a=d[c.param_no]:a=d[g++];if(e.not_type.test(c.type)&&e.not_primitive.test(c.type)&&a instanceof Function&&(a=a()),e.numeric_arg.test(c.type)&&typeof a!="number"&&isNaN(a))throw new TypeError(n("[sprintf] expecting number but found %T",a));switch(e.number.test(c.type)&&(E=a>=0),c.type){case"b":a=parseInt(a,10).toString(2);break;case"c":a=String.fromCharCode(parseInt(a,10));break;case"d":case"i":a=parseInt(a,10);break;case"j":a=JSON.stringify(a,null,c.width?parseInt(c.width):0);break;case"e":a=c.precision?parseFloat(a).toExponential(c.precision):parseFloat(a).toExponential();break;case"f":a=c.precision?parseFloat(a).toFixed(c.precision):parseFloat(a);break;case"g":a=c.precision?String(Number(a.toPrecision(c.precision))):parseFloat(a);break;case"o":a=(parseInt(a,10)>>>0).toString(8);break;case"s":a=String(a),a=c.precision?a.substring(0,c.precision):a;break;case"t":a=String(!!a),a=c.precision?a.substring(0,c.precision):a;break;case"T":a=Object.prototype.toString.call(a).slice(8,-1).toLowerCase(),a=c.precision?a.substring(0,c.precision):a;break;case"u":a=parseInt(a,10)>>>0;break;case"v":a=a.valueOf(),a=c.precision?a.substring(0,c.precision):a;break;case"x":a=(parseInt(a,10)>>>0).toString(16);break;case"X":a=(parseInt(a,10)>>>0).toString(16).toUpperCase();break}e.json.test(c.type)?u+=a:(e.number.test(c.type)&&(!E||c.sign)?(M=E?"+":"-",a=a.toString().replace(e.sign,"")):M="",w=c.pad_char?c.pad_char==="0"?"0":c.pad_char.charAt(1):" ",x=c.width-(M+a).length,f=c.width&&x>0?w.repeat(x):"",u+=c.align?M+a+f:w==="0"?M+f+a:f+M+a)}return u}var p=Object.create(null);function m(b){if(p[b])return p[b];for(var d=b,g,o=[],a=0;d;){if((g=e.text.exec(d))!==null)o.push(g[0]);else if((g=e.modulo.exec(d))!==null)o.push("%");else if((g=e.placeholder.exec(d))!==null){if(g[2]){a|=1;var u=[],l=g[2],s=[];if((s=e.key.exec(l))!==null)for(u.push(s[1]);(l=l.substring(s[0].length))!=="";)if((s=e.key_access.exec(l))!==null)u.push(s[1]);else if((s=e.index_access.exec(l))!==null)u.push(s[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");g[2]=u}else a|=2;if(a===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");o.push({placeholder:g[0],param_no:g[1],keys:g[2],sign:g[3],pad_char:g[4],align:g[5],width:g[6],precision:g[7],type:g[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");d=d.substring(g[0].length)}return p[b]=o}t.sprintf=n,t.vsprintf=i,typeof window<"u"&&(window.sprintf=n,window.vsprintf=i)})()})(pf)),pf}QC();var Fl={exports:{}};/**
1465
+ * @license
1466
+ * Lodash <https://lodash.com/>
1467
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
1468
+ * Released under MIT license <https://lodash.com/license>
1469
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1470
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1471
+ */var JC=Fl.exports,ff;function ek(){return ff||(ff=1,(function(t,e){(function(){var n,i="4.17.21",h=200,p="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",m="Expected a function",b="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",g=500,o="__lodash_placeholder__",a=1,u=2,l=4,s=1,c=2,f=1,w=2,x=4,E=8,M=16,k=32,C=64,O=128,L=256,R=512,I=30,z="...",F=800,N=16,A=1,S=2,D=3,j=1/0,U=9007199254740991,q=17976931348623157e292,Q=NaN,te=4294967295,de=te-1,ne=te>>>1,ce=[["ary",O],["bind",f],["bindKey",w],["curry",E],["curryRight",M],["flip",R],["partial",k],["partialRight",C],["rearg",L]],he="[object Arguments]",ue="[object Array]",ve="[object AsyncFunction]",Me="[object Boolean]",Te="[object Date]",Ee="[object DOMException]",Je="[object Error]",Xe="[object Function]",ft="[object GeneratorFunction]",rt="[object Map]",yt="[object Number]",on="[object Null]",zn="[object Object]",tn="[object Promise]",tr="[object Proxy]",_n="[object RegExp]",Xn="[object Set]",ci="[object String]",Li="[object Symbol]",Ct="[object Undefined]",qe="[object WeakMap]",Gt="[object WeakSet]",wn="[object ArrayBuffer]",Zn="[object DataView]",Ri="[object Float32Array]",Ci="[object Float64Array]",An="[object Int8Array]",ri="[object Int16Array]",ui="[object Int32Array]",sn="[object Uint8Array]",oi="[object Uint8ClampedArray]",uo="[object Uint16Array]",Nr="[object Uint32Array]",Dr=/\b__p \+= '';/g,Pr=/\b(__p \+=) '' \+/g,ho=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mi=/&(?:amp|lt|gt|quot|#39);/g,po=/[&<>"']/g,Po=RegExp(mi.source),el=RegExp(po.source),nr=/<%-([\s\S]+?)%>/g,tl=/<%([\s\S]+?)%>/g,ws=/<%=([\s\S]+?)%>/g,aa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fr=/^\w*$/,jn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ki=/[\\^$.*+?()[\]{}|]/g,Wr=RegExp(ki.source),$n=/^\s+/,Si=/\s/,Jr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Br=/\{\n\/\* \[wrapped with (.+)\] \*/,bs=/,? & /,la=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,nl=/[()=,{}\[\]\/\s]/,il=/\\(\\)?/g,zr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ir=/\w*$/,Ft=/^[-+]0x[0-9a-f]+$/i,ca=/^0b[01]+$/i,_i=/^\[object .+?Constructor\]$/,Hn=/^0o[0-7]+$/i,gn=/^(?:0|[1-9]\d*)$/,En=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,fr=/($^)/,Ai=/['\n\r\u2028\u2029\\]/g,mr="\\ud800-\\udfff",Fo="\\u0300-\\u036f",xs="\\ufe20-\\ufe2f",eo="\\u20d0-\\u20ff",Ui=Fo+xs+eo,go="\\u2700-\\u27bf",Wo="a-z\\xdf-\\xf6\\xf8-\\xff",Vi="\\xac\\xb1\\xd7\\xf7",Bo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Cs="\\u2000-\\u206f",ks=" \\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",zo="A-Z\\xc0-\\xd6\\xd8-\\xde",si="\\ufe0e\\ufe0f",Ss=Vi+Bo+Cs+ks,fo="['’]",jo="["+mr+"]",Ho="["+Ss+"]",to="["+Ui+"]",_s="\\d+",ua="["+go+"]",Uo="["+Wo+"]",Vo="[^"+mr+Ss+_s+go+Wo+zo+"]",As="\\ud83c[\\udffb-\\udfff]",Go="(?:"+to+"|"+As+")",mo="[^"+mr+"]",vr="(?:\\ud83c[\\udde6-\\uddff]){2}",ai="[\\ud800-\\udbff][\\udc00-\\udfff]",no="["+zo+"]",jr="\\u200d",ha="(?:"+Uo+"|"+Vo+")",rl="(?:"+no+"|"+Vo+")",vo="(?:"+fo+"(?:d|ll|m|re|s|t|ve))?",Hr="(?:"+fo+"(?:D|LL|M|RE|S|T|VE))?",yo=Go+"?",Ko="["+si+"]?",wo="(?:"+jr+"(?:"+[mo,vr,ai].join("|")+")"+Ko+yo+")*",da="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",io="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ze=Ko+yo+wo,pa="(?:"+[ua,vr,ai].join("|")+")"+ze,De="(?:"+[mo+to+"?",to,vr,ai,jo].join("|")+")",Mn=RegExp(fo,"g"),bo=RegExp(to,"g"),rr=RegExp(As+"(?="+As+")|"+De+ze,"g"),Un=RegExp([no+"?"+Uo+"+"+vo+"(?="+[Ho,no,"$"].join("|")+")",rl+"+"+Hr+"(?="+[Ho,no+ha,"$"].join("|")+")",no+"?"+ha+"+"+vo,no+"+"+Hr,io,da,_s,pa].join("|"),"g"),ga=RegExp("["+jr+mr+Ui+si+"]"),xo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,yr=["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"],ro=-1,Qt={};Qt[Ri]=Qt[Ci]=Qt[An]=Qt[ri]=Qt[ui]=Qt[sn]=Qt[oi]=Qt[uo]=Qt[Nr]=!0,Qt[he]=Qt[ue]=Qt[wn]=Qt[Me]=Qt[Zn]=Qt[Te]=Qt[Je]=Qt[Xe]=Qt[rt]=Qt[yt]=Qt[zn]=Qt[_n]=Qt[Xn]=Qt[ci]=Qt[qe]=!1;var Kt={};Kt[he]=Kt[ue]=Kt[wn]=Kt[Zn]=Kt[Me]=Kt[Te]=Kt[Ri]=Kt[Ci]=Kt[An]=Kt[ri]=Kt[ui]=Kt[rt]=Kt[yt]=Kt[zn]=Kt[_n]=Kt[Xn]=Kt[ci]=Kt[Li]=Kt[sn]=Kt[oi]=Kt[uo]=Kt[Nr]=!0,Kt[Je]=Kt[Xe]=Kt[qe]=!1;var Jt={À:"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"},Wt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},wr={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Ln={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},He=parseFloat,fn=parseInt,wt=typeof Oo=="object"&&Oo&&Oo.Object===Object&&Oo,Oi=typeof self=="object"&&self&&self.Object===Object&&self,ln=wt||Oi||Function("return this")(),bn=e&&!e.nodeType&&e,Qn=bn&&!0&&t&&!t.nodeType&&t,Ni=Qn&&Qn.exports===bn,br=Ni&&wt.process,Rn=(function(){try{var fe=Qn&&Qn.require&&Qn.require("util").types;return fe||br&&br.binding&&br.binding("util")}catch{}})(),Gi=Rn&&Rn.isArrayBuffer,qo=Rn&&Rn.isDate,On=Rn&&Rn.isMap,or=Rn&&Rn.isRegExp,sr=Rn&&Rn.isSet,xr=Rn&&Rn.isTypedArray;function hi(fe,$e,ke){switch(ke.length){case 0:return fe.call($e);case 1:return fe.call($e,ke[0]);case 2:return fe.call($e,ke[0],ke[1]);case 3:return fe.call($e,ke[0],ke[1],ke[2])}return fe.apply($e,ke)}function di(fe,$e,ke,Ve){for(var ut=-1,Tt=fe==null?0:fe.length;++ut<Tt;){var Ut=fe[ut];$e(Ve,Ut,ke(Ut),fe)}return Ve}function vi(fe,$e){for(var ke=-1,Ve=fe==null?0:fe.length;++ke<Ve&&$e(fe[ke],ke,fe)!==!1;);return fe}function $s(fe,$e){for(var ke=fe==null?0:fe.length;ke--&&$e(fe[ke],ke,fe)!==!1;);return fe}function yi(fe,$e){for(var ke=-1,Ve=fe==null?0:fe.length;++ke<Ve;)if(!$e(fe[ke],ke,fe))return!1;return!0}function $i(fe,$e){for(var ke=-1,Ve=fe==null?0:fe.length,ut=0,Tt=[];++ke<Ve;){var Ut=fe[ke];$e(Ut,ke,fe)&&(Tt[ut++]=Ut)}return Tt}function ar(fe,$e){var ke=fe==null?0:fe.length;return!!ke&&ae(fe,$e,0)>-1}function lr(fe,$e,ke){for(var Ve=-1,ut=fe==null?0:fe.length;++Ve<ut;)if(ke($e,fe[Ve]))return!0;return!1}function y(fe,$e){for(var ke=-1,Ve=fe==null?0:fe.length,ut=Array(Ve);++ke<Ve;)ut[ke]=$e(fe[ke],ke,fe);return ut}function $(fe,$e){for(var ke=-1,Ve=$e.length,ut=fe.length;++ke<Ve;)fe[ut+ke]=$e[ke];return fe}function _(fe,$e,ke,Ve){var ut=-1,Tt=fe==null?0:fe.length;for(Ve&&Tt&&(ke=fe[++ut]);++ut<Tt;)ke=$e(ke,fe[ut],ut,fe);return ke}function P(fe,$e,ke,Ve){var ut=fe==null?0:fe.length;for(Ve&&ut&&(ke=fe[--ut]);ut--;)ke=$e(ke,fe[ut],ut,fe);return ke}function W(fe,$e){for(var ke=-1,Ve=fe==null?0:fe.length;++ke<Ve;)if($e(fe[ke],ke,fe))return!0;return!1}var B=xe("length");function G(fe){return fe.split("")}function Y(fe){return fe.match(la)||[]}function Z(fe,$e,ke){var Ve;return ke(fe,function(ut,Tt,Ut){if($e(ut,Tt,Ut))return Ve=Tt,!1}),Ve}function ie(fe,$e,ke,Ve){for(var ut=fe.length,Tt=ke+(Ve?1:-1);Ve?Tt--:++Tt<ut;)if($e(fe[Tt],Tt,fe))return Tt;return-1}function ae(fe,$e,ke){return $e===$e?et(fe,$e,ke):ie(fe,Se,ke)}function be(fe,$e,ke,Ve){for(var ut=ke-1,Tt=fe.length;++ut<Tt;)if(Ve(fe[ut],$e))return ut;return-1}function Se(fe){return fe!==fe}function ye(fe,$e){var ke=fe==null?0:fe.length;return ke?lt(fe,$e)/ke:Q}function xe(fe){return function($e){return $e==null?n:$e[fe]}}function Ne(fe){return function($e){return fe==null?n:fe[$e]}}function Oe(fe,$e,ke,Ve,ut){return ut(fe,function(Tt,Ut,Et){ke=Ve?(Ve=!1,Tt):$e(ke,Tt,Ut,Et)}),ke}function Ge(fe,$e){var ke=fe.length;for(fe.sort($e);ke--;)fe[ke]=fe[ke].value;return fe}function lt(fe,$e){for(var ke,Ve=-1,ut=fe.length;++Ve<ut;){var Tt=$e(fe[Ve]);Tt!==n&&(ke=ke===n?Tt:ke+Tt)}return ke}function Qe(fe,$e){for(var ke=-1,Ve=Array(fe);++ke<fe;)Ve[ke]=$e(ke);return Ve}function nt(fe,$e){return y($e,function(ke){return[ke,fe[ke]]})}function mn(fe){return fe&&fe.slice(0,Rt(fe)+1).replace($n,"")}function ct(fe){return function($e){return fe($e)}}function xn(fe,$e){return y($e,function(ke){return fe[ke]})}function kt(fe,$e){return fe.has($e)}function Mt(fe,$e){for(var ke=-1,Ve=fe.length;++ke<Ve&&ae($e,fe[ke],0)>-1;);return ke}function Jn(fe,$e){for(var ke=fe.length;ke--&&ae($e,fe[ke],0)>-1;);return ke}function pi(fe,$e){for(var ke=fe.length,Ve=0;ke--;)fe[ke]===$e&&++Ve;return Ve}var Cn=Ne(Jt),V=Ne(Wt);function X(fe){return"\\"+Ln[fe]}function re(fe,$e){return fe==null?n:fe[$e]}function oe(fe){return ga.test(fe)}function me(fe){return xo.test(fe)}function Ce(fe){for(var $e,ke=[];!($e=fe.next()).done;)ke.push($e.value);return ke}function Ie(fe){var $e=-1,ke=Array(fe.size);return fe.forEach(function(Ve,ut){ke[++$e]=[ut,Ve]}),ke}function We(fe,$e){return function(ke){return fe($e(ke))}}function je(fe,$e){for(var ke=-1,Ve=fe.length,ut=0,Tt=[];++ke<Ve;){var Ut=fe[ke];(Ut===$e||Ut===o)&&(fe[ke]=o,Tt[ut++]=ke)}return Tt}function Ke(fe){var $e=-1,ke=Array(fe.size);return fe.forEach(function(Ve){ke[++$e]=Ve}),ke}function Ze(fe){var $e=-1,ke=Array(fe.size);return fe.forEach(function(Ve){ke[++$e]=[Ve,Ve]}),ke}function et(fe,$e,ke){for(var Ve=ke-1,ut=fe.length;++Ve<ut;)if(fe[Ve]===$e)return Ve;return-1}function bt(fe,$e,ke){for(var Ve=ke+1;Ve--;)if(fe[Ve]===$e)return Ve;return Ve}function Nt(fe){return oe(fe)?ot(fe):B(fe)}function St(fe){return oe(fe)?dn(fe):G(fe)}function Rt(fe){for(var $e=fe.length;$e--&&Si.test(fe.charAt($e)););return $e}var pt=Ne(wr);function ot(fe){for(var $e=rr.lastIndex=0;rr.test(fe);)++$e;return $e}function dn(fe){return fe.match(rr)||[]}function kn(fe){return fe.match(Un)||[]}var ei=(function fe($e){$e=$e==null?ln:zt.defaults(ln.Object(),$e,zt.pick(ln,yr));var ke=$e.Array,Ve=$e.Date,ut=$e.Error,Tt=$e.Function,Ut=$e.Math,Et=$e.Object,Di=$e.RegExp,Cr=$e.String,cn=$e.TypeError,gi=ke.prototype,Co=Tt.prototype,Nn=Et.prototype,Ms=$e["__core-js_shared__"],bc=Co.toString,an=Nn.hasOwnProperty,_I=0,Gy=(function(){var r=/[^.]+$/.exec(Ms&&Ms.keys&&Ms.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})(),xc=Nn.toString,AI=bc.call(Et),$I=ln._,MI=Di("^"+bc.call(an).replace(ki,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Cc=Ni?$e.Buffer:n,Yo=$e.Symbol,kc=$e.Uint8Array,Ky=Cc?Cc.allocUnsafe:n,Sc=We(Et.getPrototypeOf,Et),qy=Et.create,Yy=Nn.propertyIsEnumerable,_c=gi.splice,Xy=Yo?Yo.isConcatSpreadable:n,ol=Yo?Yo.iterator:n,Ts=Yo?Yo.toStringTag:n,Ac=(function(){try{var r=Os(Et,"defineProperty");return r({},"",{}),r}catch{}})(),TI=$e.clearTimeout!==ln.clearTimeout&&$e.clearTimeout,II=Ve&&Ve.now!==ln.Date.now&&Ve.now,EI=$e.setTimeout!==ln.setTimeout&&$e.setTimeout,$c=Ut.ceil,Mc=Ut.floor,vd=Et.getOwnPropertySymbols,LI=Cc?Cc.isBuffer:n,Zy=$e.isFinite,RI=gi.join,OI=We(Et.keys,Et),li=Ut.max,Mi=Ut.min,NI=Ve.now,DI=$e.parseInt,Qy=Ut.random,PI=gi.reverse,yd=Os($e,"DataView"),sl=Os($e,"Map"),wd=Os($e,"Promise"),fa=Os($e,"Set"),al=Os($e,"WeakMap"),ll=Os(Et,"create"),Tc=al&&new al,ma={},FI=Ns(yd),WI=Ns(sl),BI=Ns(wd),zI=Ns(fa),jI=Ns(al),Ic=Yo?Yo.prototype:n,cl=Ic?Ic.valueOf:n,Jy=Ic?Ic.toString:n;function J(r){if(Dn(r)&&!_t(r)&&!(r instanceof Bt)){if(r instanceof kr)return r;if(an.call(r,"__wrapped__"))return eb(r)}return new kr(r)}var va=(function(){function r(){}return function(v){if(!Tn(v))return{};if(qy)return qy(v);r.prototype=v;var T=new r;return r.prototype=n,T}})();function Ec(){}function kr(r,v){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!v,this.__index__=0,this.__values__=n}J.templateSettings={escape:nr,evaluate:tl,interpolate:ws,variable:"",imports:{_:J}},J.prototype=Ec.prototype,J.prototype.constructor=J,kr.prototype=va(Ec.prototype),kr.prototype.constructor=kr;function Bt(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=te,this.__views__=[]}function HI(){var r=new Bt(this.__wrapped__);return r.__actions__=Ki(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=Ki(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=Ki(this.__views__),r}function UI(){if(this.__filtered__){var r=new Bt(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function VI(){var r=this.__wrapped__.value(),v=this.__dir__,T=_t(r),H=v<0,K=T?r.length:0,ee=iL(0,K,this.__views__),le=ee.start,ge=ee.end,we=ge-le,Le=H?ge:le-1,Re=this.__iteratees__,Pe=Re.length,Ye=0,it=Mi(we,this.__takeCount__);if(!T||!H&&K==we&&it==we)return kw(r,this.__actions__);var mt=[];e:for(;we--&&Ye<it;){Le+=v;for(var Lt=-1,vt=r[Le];++Lt<Pe;){var Dt=Re[Lt],jt=Dt.iteratee,hr=Dt.type,Wi=jt(vt);if(hr==S)vt=Wi;else if(!Wi){if(hr==A)continue e;break e}}mt[Ye++]=vt}return mt}Bt.prototype=va(Ec.prototype),Bt.prototype.constructor=Bt;function Is(r){var v=-1,T=r==null?0:r.length;for(this.clear();++v<T;){var H=r[v];this.set(H[0],H[1])}}function GI(){this.__data__=ll?ll(null):{},this.size=0}function KI(r){var v=this.has(r)&&delete this.__data__[r];return this.size-=v?1:0,v}function qI(r){var v=this.__data__;if(ll){var T=v[r];return T===d?n:T}return an.call(v,r)?v[r]:n}function YI(r){var v=this.__data__;return ll?v[r]!==n:an.call(v,r)}function XI(r,v){var T=this.__data__;return this.size+=this.has(r)?0:1,T[r]=ll&&v===n?d:v,this}Is.prototype.clear=GI,Is.prototype.delete=KI,Is.prototype.get=qI,Is.prototype.has=YI,Is.prototype.set=XI;function ko(r){var v=-1,T=r==null?0:r.length;for(this.clear();++v<T;){var H=r[v];this.set(H[0],H[1])}}function ZI(){this.__data__=[],this.size=0}function QI(r){var v=this.__data__,T=Lc(v,r);if(T<0)return!1;var H=v.length-1;return T==H?v.pop():_c.call(v,T,1),--this.size,!0}function JI(r){var v=this.__data__,T=Lc(v,r);return T<0?n:v[T][1]}function eE(r){return Lc(this.__data__,r)>-1}function tE(r,v){var T=this.__data__,H=Lc(T,r);return H<0?(++this.size,T.push([r,v])):T[H][1]=v,this}ko.prototype.clear=ZI,ko.prototype.delete=QI,ko.prototype.get=JI,ko.prototype.has=eE,ko.prototype.set=tE;function So(r){var v=-1,T=r==null?0:r.length;for(this.clear();++v<T;){var H=r[v];this.set(H[0],H[1])}}function nE(){this.size=0,this.__data__={hash:new Is,map:new(sl||ko),string:new Is}}function iE(r){var v=Uc(this,r).delete(r);return this.size-=v?1:0,v}function rE(r){return Uc(this,r).get(r)}function oE(r){return Uc(this,r).has(r)}function sE(r,v){var T=Uc(this,r),H=T.size;return T.set(r,v),this.size+=T.size==H?0:1,this}So.prototype.clear=nE,So.prototype.delete=iE,So.prototype.get=rE,So.prototype.has=oE,So.prototype.set=sE;function Es(r){var v=-1,T=r==null?0:r.length;for(this.__data__=new So;++v<T;)this.add(r[v])}function aE(r){return this.__data__.set(r,d),this}function lE(r){return this.__data__.has(r)}Es.prototype.add=Es.prototype.push=aE,Es.prototype.has=lE;function Ur(r){var v=this.__data__=new ko(r);this.size=v.size}function cE(){this.__data__=new ko,this.size=0}function uE(r){var v=this.__data__,T=v.delete(r);return this.size=v.size,T}function hE(r){return this.__data__.get(r)}function dE(r){return this.__data__.has(r)}function pE(r,v){var T=this.__data__;if(T instanceof ko){var H=T.__data__;if(!sl||H.length<h-1)return H.push([r,v]),this.size=++T.size,this;T=this.__data__=new So(H)}return T.set(r,v),this.size=T.size,this}Ur.prototype.clear=cE,Ur.prototype.delete=uE,Ur.prototype.get=hE,Ur.prototype.has=dE,Ur.prototype.set=pE;function ew(r,v){var T=_t(r),H=!T&&Ds(r),K=!T&&!H&&es(r),ee=!T&&!H&&!K&&xa(r),le=T||H||K||ee,ge=le?Qe(r.length,Cr):[],we=ge.length;for(var Le in r)(v||an.call(r,Le))&&!(le&&(Le=="length"||K&&(Le=="offset"||Le=="parent")||ee&&(Le=="buffer"||Le=="byteLength"||Le=="byteOffset")||Mo(Le,we)))&&ge.push(Le);return ge}function tw(r){var v=r.length;return v?r[Id(0,v-1)]:n}function gE(r,v){return Vc(Ki(r),Ls(v,0,r.length))}function fE(r){return Vc(Ki(r))}function bd(r,v,T){(T!==n&&!Vr(r[v],T)||T===n&&!(v in r))&&_o(r,v,T)}function ul(r,v,T){var H=r[v];(!(an.call(r,v)&&Vr(H,T))||T===n&&!(v in r))&&_o(r,v,T)}function Lc(r,v){for(var T=r.length;T--;)if(Vr(r[T][0],v))return T;return-1}function mE(r,v,T,H){return Xo(r,function(K,ee,le){v(H,K,T(K),le)}),H}function nw(r,v){return r&&so(v,fi(v),r)}function vE(r,v){return r&&so(v,Yi(v),r)}function _o(r,v,T){v=="__proto__"&&Ac?Ac(r,v,{configurable:!0,enumerable:!0,value:T,writable:!0}):r[v]=T}function xd(r,v){for(var T=-1,H=v.length,K=ke(H),ee=r==null;++T<H;)K[T]=ee?n:tp(r,v[T]);return K}function Ls(r,v,T){return r===r&&(T!==n&&(r=r<=T?r:T),v!==n&&(r=r>=v?r:v)),r}function Sr(r,v,T,H,K,ee){var le,ge=v&a,we=v&u,Le=v&l;if(T&&(le=K?T(r,H,K,ee):T(r)),le!==n)return le;if(!Tn(r))return r;var Re=_t(r);if(Re){if(le=oL(r),!ge)return Ki(r,le)}else{var Pe=Ti(r),Ye=Pe==Xe||Pe==ft;if(es(r))return Aw(r,ge);if(Pe==zn||Pe==he||Ye&&!K){if(le=we||Ye?{}:Vw(r),!ge)return we?qE(r,vE(le,r)):KE(r,nw(le,r))}else{if(!Kt[Pe])return K?r:{};le=sL(r,Pe,ge)}}ee||(ee=new Ur);var it=ee.get(r);if(it)return it;ee.set(r,le),bb(r)?r.forEach(function(vt){le.add(Sr(vt,v,T,vt,r,ee))}):yb(r)&&r.forEach(function(vt,Dt){le.set(Dt,Sr(vt,v,T,Dt,r,ee))});var mt=Le?we?zd:Bd:we?Yi:fi,Lt=Re?n:mt(r);return vi(Lt||r,function(vt,Dt){Lt&&(Dt=vt,vt=r[Dt]),ul(le,Dt,Sr(vt,v,T,Dt,r,ee))}),le}function yE(r){var v=fi(r);return function(T){return iw(T,r,v)}}function iw(r,v,T){var H=T.length;if(r==null)return!H;for(r=Et(r);H--;){var K=T[H],ee=v[K],le=r[K];if(le===n&&!(K in r)||!ee(le))return!1}return!0}function rw(r,v,T){if(typeof r!="function")throw new cn(m);return vl(function(){r.apply(n,T)},v)}function hl(r,v,T,H){var K=-1,ee=ar,le=!0,ge=r.length,we=[],Le=v.length;if(!ge)return we;T&&(v=y(v,ct(T))),H?(ee=lr,le=!1):v.length>=h&&(ee=kt,le=!1,v=new Es(v));e:for(;++K<ge;){var Re=r[K],Pe=T==null?Re:T(Re);if(Re=H||Re!==0?Re:0,le&&Pe===Pe){for(var Ye=Le;Ye--;)if(v[Ye]===Pe)continue e;we.push(Re)}else ee(v,Pe,H)||we.push(Re)}return we}var Xo=Ew(oo),ow=Ew(kd,!0);function wE(r,v){var T=!0;return Xo(r,function(H,K,ee){return T=!!v(H,K,ee),T}),T}function Rc(r,v,T){for(var H=-1,K=r.length;++H<K;){var ee=r[H],le=v(ee);if(le!=null&&(ge===n?le===le&&!ur(le):T(le,ge)))var ge=le,we=ee}return we}function bE(r,v,T,H){var K=r.length;for(T=It(T),T<0&&(T=-T>K?0:K+T),H=H===n||H>K?K:It(H),H<0&&(H+=K),H=T>H?0:Cb(H);T<H;)r[T++]=v;return r}function sw(r,v){var T=[];return Xo(r,function(H,K,ee){v(H,K,ee)&&T.push(H)}),T}function wi(r,v,T,H,K){var ee=-1,le=r.length;for(T||(T=lL),K||(K=[]);++ee<le;){var ge=r[ee];v>0&&T(ge)?v>1?wi(ge,v-1,T,H,K):$(K,ge):H||(K[K.length]=ge)}return K}var Cd=Lw(),aw=Lw(!0);function oo(r,v){return r&&Cd(r,v,fi)}function kd(r,v){return r&&aw(r,v,fi)}function Oc(r,v){return $i(v,function(T){return To(r[T])})}function Rs(r,v){v=Qo(v,r);for(var T=0,H=v.length;r!=null&&T<H;)r=r[ao(v[T++])];return T&&T==H?r:n}function lw(r,v,T){var H=v(r);return _t(r)?H:$(H,T(r))}function Pi(r){return r==null?r===n?Ct:on:Ts&&Ts in Et(r)?nL(r):fL(r)}function Sd(r,v){return r>v}function xE(r,v){return r!=null&&an.call(r,v)}function CE(r,v){return r!=null&&v in Et(r)}function kE(r,v,T){return r>=Mi(v,T)&&r<li(v,T)}function _d(r,v,T){for(var H=T?lr:ar,K=r[0].length,ee=r.length,le=ee,ge=ke(ee),we=1/0,Le=[];le--;){var Re=r[le];le&&v&&(Re=y(Re,ct(v))),we=Mi(Re.length,we),ge[le]=!T&&(v||K>=120&&Re.length>=120)?new Es(le&&Re):n}Re=r[0];var Pe=-1,Ye=ge[0];e:for(;++Pe<K&&Le.length<we;){var it=Re[Pe],mt=v?v(it):it;if(it=T||it!==0?it:0,!(Ye?kt(Ye,mt):H(Le,mt,T))){for(le=ee;--le;){var Lt=ge[le];if(!(Lt?kt(Lt,mt):H(r[le],mt,T)))continue e}Ye&&Ye.push(mt),Le.push(it)}}return Le}function SE(r,v,T,H){return oo(r,function(K,ee,le){v(H,T(K),ee,le)}),H}function dl(r,v,T){v=Qo(v,r),r=Yw(r,v);var H=r==null?r:r[ao(Ar(v))];return H==null?n:hi(H,r,T)}function cw(r){return Dn(r)&&Pi(r)==he}function _E(r){return Dn(r)&&Pi(r)==wn}function AE(r){return Dn(r)&&Pi(r)==Te}function pl(r,v,T,H,K){return r===v?!0:r==null||v==null||!Dn(r)&&!Dn(v)?r!==r&&v!==v:$E(r,v,T,H,pl,K)}function $E(r,v,T,H,K,ee){var le=_t(r),ge=_t(v),we=le?ue:Ti(r),Le=ge?ue:Ti(v);we=we==he?zn:we,Le=Le==he?zn:Le;var Re=we==zn,Pe=Le==zn,Ye=we==Le;if(Ye&&es(r)){if(!es(v))return!1;le=!0,Re=!1}if(Ye&&!Re)return ee||(ee=new Ur),le||xa(r)?jw(r,v,T,H,K,ee):eL(r,v,we,T,H,K,ee);if(!(T&s)){var it=Re&&an.call(r,"__wrapped__"),mt=Pe&&an.call(v,"__wrapped__");if(it||mt){var Lt=it?r.value():r,vt=mt?v.value():v;return ee||(ee=new Ur),K(Lt,vt,T,H,ee)}}return Ye?(ee||(ee=new Ur),tL(r,v,T,H,K,ee)):!1}function ME(r){return Dn(r)&&Ti(r)==rt}function Ad(r,v,T,H){var K=T.length,ee=K,le=!H;if(r==null)return!ee;for(r=Et(r);K--;){var ge=T[K];if(le&&ge[2]?ge[1]!==r[ge[0]]:!(ge[0]in r))return!1}for(;++K<ee;){ge=T[K];var we=ge[0],Le=r[we],Re=ge[1];if(le&&ge[2]){if(Le===n&&!(we in r))return!1}else{var Pe=new Ur;if(H)var Ye=H(Le,Re,we,r,v,Pe);if(!(Ye===n?pl(Re,Le,s|c,H,Pe):Ye))return!1}}return!0}function uw(r){if(!Tn(r)||uL(r))return!1;var v=To(r)?MI:_i;return v.test(Ns(r))}function TE(r){return Dn(r)&&Pi(r)==_n}function IE(r){return Dn(r)&&Ti(r)==Xn}function EE(r){return Dn(r)&&Zc(r.length)&&!!Qt[Pi(r)]}function hw(r){return typeof r=="function"?r:r==null?Xi:typeof r=="object"?_t(r)?gw(r[0],r[1]):pw(r):Rb(r)}function $d(r){if(!ml(r))return OI(r);var v=[];for(var T in Et(r))an.call(r,T)&&T!="constructor"&&v.push(T);return v}function LE(r){if(!Tn(r))return gL(r);var v=ml(r),T=[];for(var H in r)H=="constructor"&&(v||!an.call(r,H))||T.push(H);return T}function Md(r,v){return r<v}function dw(r,v){var T=-1,H=qi(r)?ke(r.length):[];return Xo(r,function(K,ee,le){H[++T]=v(K,ee,le)}),H}function pw(r){var v=Hd(r);return v.length==1&&v[0][2]?Kw(v[0][0],v[0][1]):function(T){return T===r||Ad(T,r,v)}}function gw(r,v){return Vd(r)&&Gw(v)?Kw(ao(r),v):function(T){var H=tp(T,r);return H===n&&H===v?np(T,r):pl(v,H,s|c)}}function Nc(r,v,T,H,K){r!==v&&Cd(v,function(ee,le){if(K||(K=new Ur),Tn(ee))RE(r,v,le,T,Nc,H,K);else{var ge=H?H(Kd(r,le),ee,le+"",r,v,K):n;ge===n&&(ge=ee),bd(r,le,ge)}},Yi)}function RE(r,v,T,H,K,ee,le){var ge=Kd(r,T),we=Kd(v,T),Le=le.get(we);if(Le){bd(r,T,Le);return}var Re=ee?ee(ge,we,T+"",r,v,le):n,Pe=Re===n;if(Pe){var Ye=_t(we),it=!Ye&&es(we),mt=!Ye&&!it&&xa(we);Re=we,Ye||it||mt?_t(ge)?Re=ge:Vn(ge)?Re=Ki(ge):it?(Pe=!1,Re=Aw(we,!0)):mt?(Pe=!1,Re=$w(we,!0)):Re=[]:yl(we)||Ds(we)?(Re=ge,Ds(ge)?Re=kb(ge):(!Tn(ge)||To(ge))&&(Re=Vw(we))):Pe=!1}Pe&&(le.set(we,Re),K(Re,we,H,ee,le),le.delete(we)),bd(r,T,Re)}function fw(r,v){var T=r.length;if(T)return v+=v<0?T:0,Mo(v,T)?r[v]:n}function mw(r,v,T){v.length?v=y(v,function(ee){return _t(ee)?function(le){return Rs(le,ee.length===1?ee[0]:ee)}:ee}):v=[Xi];var H=-1;v=y(v,ct(gt()));var K=dw(r,function(ee,le,ge){var we=y(v,function(Le){return Le(ee)});return{criteria:we,index:++H,value:ee}});return Ge(K,function(ee,le){return GE(ee,le,T)})}function OE(r,v){return vw(r,v,function(T,H){return np(r,H)})}function vw(r,v,T){for(var H=-1,K=v.length,ee={};++H<K;){var le=v[H],ge=Rs(r,le);T(ge,le)&&gl(ee,Qo(le,r),ge)}return ee}function NE(r){return function(v){return Rs(v,r)}}function Td(r,v,T,H){var K=H?be:ae,ee=-1,le=v.length,ge=r;for(r===v&&(v=Ki(v)),T&&(ge=y(r,ct(T)));++ee<le;)for(var we=0,Le=v[ee],Re=T?T(Le):Le;(we=K(ge,Re,we,H))>-1;)ge!==r&&_c.call(ge,we,1),_c.call(r,we,1);return r}function yw(r,v){for(var T=r?v.length:0,H=T-1;T--;){var K=v[T];if(T==H||K!==ee){var ee=K;Mo(K)?_c.call(r,K,1):Rd(r,K)}}return r}function Id(r,v){return r+Mc(Qy()*(v-r+1))}function DE(r,v,T,H){for(var K=-1,ee=li($c((v-r)/(T||1)),0),le=ke(ee);ee--;)le[H?ee:++K]=r,r+=T;return le}function Ed(r,v){var T="";if(!r||v<1||v>U)return T;do v%2&&(T+=r),v=Mc(v/2),v&&(r+=r);while(v);return T}function Ot(r,v){return qd(qw(r,v,Xi),r+"")}function PE(r){return tw(Ca(r))}function FE(r,v){var T=Ca(r);return Vc(T,Ls(v,0,T.length))}function gl(r,v,T,H){if(!Tn(r))return r;v=Qo(v,r);for(var K=-1,ee=v.length,le=ee-1,ge=r;ge!=null&&++K<ee;){var we=ao(v[K]),Le=T;if(we==="__proto__"||we==="constructor"||we==="prototype")return r;if(K!=le){var Re=ge[we];Le=H?H(Re,we,ge):n,Le===n&&(Le=Tn(Re)?Re:Mo(v[K+1])?[]:{})}ul(ge,we,Le),ge=ge[we]}return r}var ww=Tc?function(r,v){return Tc.set(r,v),r}:Xi,WE=Ac?function(r,v){return Ac(r,"toString",{configurable:!0,enumerable:!1,value:rp(v),writable:!0})}:Xi;function BE(r){return Vc(Ca(r))}function _r(r,v,T){var H=-1,K=r.length;v<0&&(v=-v>K?0:K+v),T=T>K?K:T,T<0&&(T+=K),K=v>T?0:T-v>>>0,v>>>=0;for(var ee=ke(K);++H<K;)ee[H]=r[H+v];return ee}function zE(r,v){var T;return Xo(r,function(H,K,ee){return T=v(H,K,ee),!T}),!!T}function Dc(r,v,T){var H=0,K=r==null?H:r.length;if(typeof v=="number"&&v===v&&K<=ne){for(;H<K;){var ee=H+K>>>1,le=r[ee];le!==null&&!ur(le)&&(T?le<=v:le<v)?H=ee+1:K=ee}return K}return Ld(r,v,Xi,T)}function Ld(r,v,T,H){var K=0,ee=r==null?0:r.length;if(ee===0)return 0;v=T(v);for(var le=v!==v,ge=v===null,we=ur(v),Le=v===n;K<ee;){var Re=Mc((K+ee)/2),Pe=T(r[Re]),Ye=Pe!==n,it=Pe===null,mt=Pe===Pe,Lt=ur(Pe);if(le)var vt=H||mt;else Le?vt=mt&&(H||Ye):ge?vt=mt&&Ye&&(H||!it):we?vt=mt&&Ye&&!it&&(H||!Lt):it||Lt?vt=!1:vt=H?Pe<=v:Pe<v;vt?K=Re+1:ee=Re}return Mi(ee,de)}function bw(r,v){for(var T=-1,H=r.length,K=0,ee=[];++T<H;){var le=r[T],ge=v?v(le):le;if(!T||!Vr(ge,we)){var we=ge;ee[K++]=le===0?0:le}}return ee}function xw(r){return typeof r=="number"?r:ur(r)?Q:+r}function cr(r){if(typeof r=="string")return r;if(_t(r))return y(r,cr)+"";if(ur(r))return Jy?Jy.call(r):"";var v=r+"";return v=="0"&&1/r==-j?"-0":v}function Zo(r,v,T){var H=-1,K=ar,ee=r.length,le=!0,ge=[],we=ge;if(T)le=!1,K=lr;else if(ee>=h){var Le=v?null:QE(r);if(Le)return Ke(Le);le=!1,K=kt,we=new Es}else we=v?[]:ge;e:for(;++H<ee;){var Re=r[H],Pe=v?v(Re):Re;if(Re=T||Re!==0?Re:0,le&&Pe===Pe){for(var Ye=we.length;Ye--;)if(we[Ye]===Pe)continue e;v&&we.push(Pe),ge.push(Re)}else K(we,Pe,T)||(we!==ge&&we.push(Pe),ge.push(Re))}return ge}function Rd(r,v){return v=Qo(v,r),r=Yw(r,v),r==null||delete r[ao(Ar(v))]}function Cw(r,v,T,H){return gl(r,v,T(Rs(r,v)),H)}function Pc(r,v,T,H){for(var K=r.length,ee=H?K:-1;(H?ee--:++ee<K)&&v(r[ee],ee,r););return T?_r(r,H?0:ee,H?ee+1:K):_r(r,H?ee+1:0,H?K:ee)}function kw(r,v){var T=r;return T instanceof Bt&&(T=T.value()),_(v,function(H,K){return K.func.apply(K.thisArg,$([H],K.args))},T)}function Od(r,v,T){var H=r.length;if(H<2)return H?Zo(r[0]):[];for(var K=-1,ee=ke(H);++K<H;)for(var le=r[K],ge=-1;++ge<H;)ge!=K&&(ee[K]=hl(ee[K]||le,r[ge],v,T));return Zo(wi(ee,1),v,T)}function Sw(r,v,T){for(var H=-1,K=r.length,ee=v.length,le={};++H<K;){var ge=H<ee?v[H]:n;T(le,r[H],ge)}return le}function Nd(r){return Vn(r)?r:[]}function Dd(r){return typeof r=="function"?r:Xi}function Qo(r,v){return _t(r)?r:Vd(r,v)?[r]:Jw(nn(r))}var jE=Ot;function Jo(r,v,T){var H=r.length;return T=T===n?H:T,!v&&T>=H?r:_r(r,v,T)}var _w=TI||function(r){return ln.clearTimeout(r)};function Aw(r,v){if(v)return r.slice();var T=r.length,H=Ky?Ky(T):new r.constructor(T);return r.copy(H),H}function Pd(r){var v=new r.constructor(r.byteLength);return new kc(v).set(new kc(r)),v}function HE(r,v){var T=v?Pd(r.buffer):r.buffer;return new r.constructor(T,r.byteOffset,r.byteLength)}function UE(r){var v=new r.constructor(r.source,ir.exec(r));return v.lastIndex=r.lastIndex,v}function VE(r){return cl?Et(cl.call(r)):{}}function $w(r,v){var T=v?Pd(r.buffer):r.buffer;return new r.constructor(T,r.byteOffset,r.length)}function Mw(r,v){if(r!==v){var T=r!==n,H=r===null,K=r===r,ee=ur(r),le=v!==n,ge=v===null,we=v===v,Le=ur(v);if(!ge&&!Le&&!ee&&r>v||ee&&le&&we&&!ge&&!Le||H&&le&&we||!T&&we||!K)return 1;if(!H&&!ee&&!Le&&r<v||Le&&T&&K&&!H&&!ee||ge&&T&&K||!le&&K||!we)return-1}return 0}function GE(r,v,T){for(var H=-1,K=r.criteria,ee=v.criteria,le=K.length,ge=T.length;++H<le;){var we=Mw(K[H],ee[H]);if(we){if(H>=ge)return we;var Le=T[H];return we*(Le=="desc"?-1:1)}}return r.index-v.index}function Tw(r,v,T,H){for(var K=-1,ee=r.length,le=T.length,ge=-1,we=v.length,Le=li(ee-le,0),Re=ke(we+Le),Pe=!H;++ge<we;)Re[ge]=v[ge];for(;++K<le;)(Pe||K<ee)&&(Re[T[K]]=r[K]);for(;Le--;)Re[ge++]=r[K++];return Re}function Iw(r,v,T,H){for(var K=-1,ee=r.length,le=-1,ge=T.length,we=-1,Le=v.length,Re=li(ee-ge,0),Pe=ke(Re+Le),Ye=!H;++K<Re;)Pe[K]=r[K];for(var it=K;++we<Le;)Pe[it+we]=v[we];for(;++le<ge;)(Ye||K<ee)&&(Pe[it+T[le]]=r[K++]);return Pe}function Ki(r,v){var T=-1,H=r.length;for(v||(v=ke(H));++T<H;)v[T]=r[T];return v}function so(r,v,T,H){var K=!T;T||(T={});for(var ee=-1,le=v.length;++ee<le;){var ge=v[ee],we=H?H(T[ge],r[ge],ge,T,r):n;we===n&&(we=r[ge]),K?_o(T,ge,we):ul(T,ge,we)}return T}function KE(r,v){return so(r,Ud(r),v)}function qE(r,v){return so(r,Hw(r),v)}function Fc(r,v){return function(T,H){var K=_t(T)?di:mE,ee=v?v():{};return K(T,r,gt(H,2),ee)}}function ya(r){return Ot(function(v,T){var H=-1,K=T.length,ee=K>1?T[K-1]:n,le=K>2?T[2]:n;for(ee=r.length>3&&typeof ee=="function"?(K--,ee):n,le&&Fi(T[0],T[1],le)&&(ee=K<3?n:ee,K=1),v=Et(v);++H<K;){var ge=T[H];ge&&r(v,ge,H,ee)}return v})}function Ew(r,v){return function(T,H){if(T==null)return T;if(!qi(T))return r(T,H);for(var K=T.length,ee=v?K:-1,le=Et(T);(v?ee--:++ee<K)&&H(le[ee],ee,le)!==!1;);return T}}function Lw(r){return function(v,T,H){for(var K=-1,ee=Et(v),le=H(v),ge=le.length;ge--;){var we=le[r?ge:++K];if(T(ee[we],we,ee)===!1)break}return v}}function YE(r,v,T){var H=v&f,K=fl(r);function ee(){var le=this&&this!==ln&&this instanceof ee?K:r;return le.apply(H?T:this,arguments)}return ee}function Rw(r){return function(v){v=nn(v);var T=oe(v)?St(v):n,H=T?T[0]:v.charAt(0),K=T?Jo(T,1).join(""):v.slice(1);return H[r]()+K}}function wa(r){return function(v){return _(Eb(Ib(v).replace(Mn,"")),r,"")}}function fl(r){return function(){var v=arguments;switch(v.length){case 0:return new r;case 1:return new r(v[0]);case 2:return new r(v[0],v[1]);case 3:return new r(v[0],v[1],v[2]);case 4:return new r(v[0],v[1],v[2],v[3]);case 5:return new r(v[0],v[1],v[2],v[3],v[4]);case 6:return new r(v[0],v[1],v[2],v[3],v[4],v[5]);case 7:return new r(v[0],v[1],v[2],v[3],v[4],v[5],v[6])}var T=va(r.prototype),H=r.apply(T,v);return Tn(H)?H:T}}function XE(r,v,T){var H=fl(r);function K(){for(var ee=arguments.length,le=ke(ee),ge=ee,we=ba(K);ge--;)le[ge]=arguments[ge];var Le=ee<3&&le[0]!==we&&le[ee-1]!==we?[]:je(le,we);if(ee-=Le.length,ee<T)return Fw(r,v,Wc,K.placeholder,n,le,Le,n,n,T-ee);var Re=this&&this!==ln&&this instanceof K?H:r;return hi(Re,this,le)}return K}function Ow(r){return function(v,T,H){var K=Et(v);if(!qi(v)){var ee=gt(T,3);v=fi(v),T=function(ge){return ee(K[ge],ge,K)}}var le=r(v,T,H);return le>-1?K[ee?v[le]:le]:n}}function Nw(r){return $o(function(v){var T=v.length,H=T,K=kr.prototype.thru;for(r&&v.reverse();H--;){var ee=v[H];if(typeof ee!="function")throw new cn(m);if(K&&!le&&Hc(ee)=="wrapper")var le=new kr([],!0)}for(H=le?H:T;++H<T;){ee=v[H];var ge=Hc(ee),we=ge=="wrapper"?jd(ee):n;we&&Gd(we[0])&&we[1]==(O|E|k|L)&&!we[4].length&&we[9]==1?le=le[Hc(we[0])].apply(le,we[3]):le=ee.length==1&&Gd(ee)?le[ge]():le.thru(ee)}return function(){var Le=arguments,Re=Le[0];if(le&&Le.length==1&&_t(Re))return le.plant(Re).value();for(var Pe=0,Ye=T?v[Pe].apply(this,Le):Re;++Pe<T;)Ye=v[Pe].call(this,Ye);return Ye}})}function Wc(r,v,T,H,K,ee,le,ge,we,Le){var Re=v&O,Pe=v&f,Ye=v&w,it=v&(E|M),mt=v&R,Lt=Ye?n:fl(r);function vt(){for(var Dt=arguments.length,jt=ke(Dt),hr=Dt;hr--;)jt[hr]=arguments[hr];if(it)var Wi=ba(vt),dr=pi(jt,Wi);if(H&&(jt=Tw(jt,H,K,it)),ee&&(jt=Iw(jt,ee,le,it)),Dt-=dr,it&&Dt<Le){var Gn=je(jt,Wi);return Fw(r,v,Wc,vt.placeholder,T,jt,Gn,ge,we,Le-Dt)}var Gr=Pe?T:this,Eo=Ye?Gr[r]:r;return Dt=jt.length,ge?jt=mL(jt,ge):mt&&Dt>1&&jt.reverse(),Re&&we<Dt&&(jt.length=we),this&&this!==ln&&this instanceof vt&&(Eo=Lt||fl(Eo)),Eo.apply(Gr,jt)}return vt}function Dw(r,v){return function(T,H){return SE(T,r,v(H),{})}}function Bc(r,v){return function(T,H){var K;if(T===n&&H===n)return v;if(T!==n&&(K=T),H!==n){if(K===n)return H;typeof T=="string"||typeof H=="string"?(T=cr(T),H=cr(H)):(T=xw(T),H=xw(H)),K=r(T,H)}return K}}function Fd(r){return $o(function(v){return v=y(v,ct(gt())),Ot(function(T){var H=this;return r(v,function(K){return hi(K,H,T)})})})}function zc(r,v){v=v===n?" ":cr(v);var T=v.length;if(T<2)return T?Ed(v,r):v;var H=Ed(v,$c(r/Nt(v)));return oe(v)?Jo(St(H),0,r).join(""):H.slice(0,r)}function ZE(r,v,T,H){var K=v&f,ee=fl(r);function le(){for(var ge=-1,we=arguments.length,Le=-1,Re=H.length,Pe=ke(Re+we),Ye=this&&this!==ln&&this instanceof le?ee:r;++Le<Re;)Pe[Le]=H[Le];for(;we--;)Pe[Le++]=arguments[++ge];return hi(Ye,K?T:this,Pe)}return le}function Pw(r){return function(v,T,H){return H&&typeof H!="number"&&Fi(v,T,H)&&(T=H=n),v=Io(v),T===n?(T=v,v=0):T=Io(T),H=H===n?v<T?1:-1:Io(H),DE(v,T,H,r)}}function jc(r){return function(v,T){return typeof v=="string"&&typeof T=="string"||(v=$r(v),T=$r(T)),r(v,T)}}function Fw(r,v,T,H,K,ee,le,ge,we,Le){var Re=v&E,Pe=Re?le:n,Ye=Re?n:le,it=Re?ee:n,mt=Re?n:ee;v|=Re?k:C,v&=~(Re?C:k),v&x||(v&=-4);var Lt=[r,v,K,it,Pe,mt,Ye,ge,we,Le],vt=T.apply(n,Lt);return Gd(r)&&Xw(vt,Lt),vt.placeholder=H,Zw(vt,r,v)}function Wd(r){var v=Ut[r];return function(T,H){if(T=$r(T),H=H==null?0:Mi(It(H),292),H&&Zy(T)){var K=(nn(T)+"e").split("e"),ee=v(K[0]+"e"+(+K[1]+H));return K=(nn(ee)+"e").split("e"),+(K[0]+"e"+(+K[1]-H))}return v(T)}}var QE=fa&&1/Ke(new fa([,-0]))[1]==j?function(r){return new fa(r)}:ap;function Ww(r){return function(v){var T=Ti(v);return T==rt?Ie(v):T==Xn?Ze(v):nt(v,r(v))}}function Ao(r,v,T,H,K,ee,le,ge){var we=v&w;if(!we&&typeof r!="function")throw new cn(m);var Le=H?H.length:0;if(Le||(v&=-97,H=K=n),le=le===n?le:li(It(le),0),ge=ge===n?ge:It(ge),Le-=K?K.length:0,v&C){var Re=H,Pe=K;H=K=n}var Ye=we?n:jd(r),it=[r,v,T,H,K,Re,Pe,ee,le,ge];if(Ye&&pL(it,Ye),r=it[0],v=it[1],T=it[2],H=it[3],K=it[4],ge=it[9]=it[9]===n?we?0:r.length:li(it[9]-Le,0),!ge&&v&(E|M)&&(v&=-25),!v||v==f)var mt=YE(r,v,T);else v==E||v==M?mt=XE(r,v,ge):(v==k||v==(f|k))&&!K.length?mt=ZE(r,v,T,H):mt=Wc.apply(n,it);var Lt=Ye?ww:Xw;return Zw(Lt(mt,it),r,v)}function Bw(r,v,T,H){return r===n||Vr(r,Nn[T])&&!an.call(H,T)?v:r}function zw(r,v,T,H,K,ee){return Tn(r)&&Tn(v)&&(ee.set(v,r),Nc(r,v,n,zw,ee),ee.delete(v)),r}function JE(r){return yl(r)?n:r}function jw(r,v,T,H,K,ee){var le=T&s,ge=r.length,we=v.length;if(ge!=we&&!(le&&we>ge))return!1;var Le=ee.get(r),Re=ee.get(v);if(Le&&Re)return Le==v&&Re==r;var Pe=-1,Ye=!0,it=T&c?new Es:n;for(ee.set(r,v),ee.set(v,r);++Pe<ge;){var mt=r[Pe],Lt=v[Pe];if(H)var vt=le?H(Lt,mt,Pe,v,r,ee):H(mt,Lt,Pe,r,v,ee);if(vt!==n){if(vt)continue;Ye=!1;break}if(it){if(!W(v,function(Dt,jt){if(!kt(it,jt)&&(mt===Dt||K(mt,Dt,T,H,ee)))return it.push(jt)})){Ye=!1;break}}else if(!(mt===Lt||K(mt,Lt,T,H,ee))){Ye=!1;break}}return ee.delete(r),ee.delete(v),Ye}function eL(r,v,T,H,K,ee,le){switch(T){case Zn:if(r.byteLength!=v.byteLength||r.byteOffset!=v.byteOffset)return!1;r=r.buffer,v=v.buffer;case wn:return!(r.byteLength!=v.byteLength||!ee(new kc(r),new kc(v)));case Me:case Te:case yt:return Vr(+r,+v);case Je:return r.name==v.name&&r.message==v.message;case _n:case ci:return r==v+"";case rt:var ge=Ie;case Xn:var we=H&s;if(ge||(ge=Ke),r.size!=v.size&&!we)return!1;var Le=le.get(r);if(Le)return Le==v;H|=c,le.set(r,v);var Re=jw(ge(r),ge(v),H,K,ee,le);return le.delete(r),Re;case Li:if(cl)return cl.call(r)==cl.call(v)}return!1}function tL(r,v,T,H,K,ee){var le=T&s,ge=Bd(r),we=ge.length,Le=Bd(v),Re=Le.length;if(we!=Re&&!le)return!1;for(var Pe=we;Pe--;){var Ye=ge[Pe];if(!(le?Ye in v:an.call(v,Ye)))return!1}var it=ee.get(r),mt=ee.get(v);if(it&&mt)return it==v&&mt==r;var Lt=!0;ee.set(r,v),ee.set(v,r);for(var vt=le;++Pe<we;){Ye=ge[Pe];var Dt=r[Ye],jt=v[Ye];if(H)var hr=le?H(jt,Dt,Ye,v,r,ee):H(Dt,jt,Ye,r,v,ee);if(!(hr===n?Dt===jt||K(Dt,jt,T,H,ee):hr)){Lt=!1;break}vt||(vt=Ye=="constructor")}if(Lt&&!vt){var Wi=r.constructor,dr=v.constructor;Wi!=dr&&"constructor"in r&&"constructor"in v&&!(typeof Wi=="function"&&Wi instanceof Wi&&typeof dr=="function"&&dr instanceof dr)&&(Lt=!1)}return ee.delete(r),ee.delete(v),Lt}function $o(r){return qd(qw(r,n,ib),r+"")}function Bd(r){return lw(r,fi,Ud)}function zd(r){return lw(r,Yi,Hw)}var jd=Tc?function(r){return Tc.get(r)}:ap;function Hc(r){for(var v=r.name+"",T=ma[v],H=an.call(ma,v)?T.length:0;H--;){var K=T[H],ee=K.func;if(ee==null||ee==r)return K.name}return v}function ba(r){var v=an.call(J,"placeholder")?J:r;return v.placeholder}function gt(){var r=J.iteratee||op;return r=r===op?hw:r,arguments.length?r(arguments[0],arguments[1]):r}function Uc(r,v){var T=r.__data__;return cL(v)?T[typeof v=="string"?"string":"hash"]:T.map}function Hd(r){for(var v=fi(r),T=v.length;T--;){var H=v[T],K=r[H];v[T]=[H,K,Gw(K)]}return v}function Os(r,v){var T=re(r,v);return uw(T)?T:n}function nL(r){var v=an.call(r,Ts),T=r[Ts];try{r[Ts]=n;var H=!0}catch{}var K=xc.call(r);return H&&(v?r[Ts]=T:delete r[Ts]),K}var Ud=vd?function(r){return r==null?[]:(r=Et(r),$i(vd(r),function(v){return Yy.call(r,v)}))}:lp,Hw=vd?function(r){for(var v=[];r;)$(v,Ud(r)),r=Sc(r);return v}:lp,Ti=Pi;(yd&&Ti(new yd(new ArrayBuffer(1)))!=Zn||sl&&Ti(new sl)!=rt||wd&&Ti(wd.resolve())!=tn||fa&&Ti(new fa)!=Xn||al&&Ti(new al)!=qe)&&(Ti=function(r){var v=Pi(r),T=v==zn?r.constructor:n,H=T?Ns(T):"";if(H)switch(H){case FI:return Zn;case WI:return rt;case BI:return tn;case zI:return Xn;case jI:return qe}return v});function iL(r,v,T){for(var H=-1,K=T.length;++H<K;){var ee=T[H],le=ee.size;switch(ee.type){case"drop":r+=le;break;case"dropRight":v-=le;break;case"take":v=Mi(v,r+le);break;case"takeRight":r=li(r,v-le);break}}return{start:r,end:v}}function rL(r){var v=r.match(Br);return v?v[1].split(bs):[]}function Uw(r,v,T){v=Qo(v,r);for(var H=-1,K=v.length,ee=!1;++H<K;){var le=ao(v[H]);if(!(ee=r!=null&&T(r,le)))break;r=r[le]}return ee||++H!=K?ee:(K=r==null?0:r.length,!!K&&Zc(K)&&Mo(le,K)&&(_t(r)||Ds(r)))}function oL(r){var v=r.length,T=new r.constructor(v);return v&&typeof r[0]=="string"&&an.call(r,"index")&&(T.index=r.index,T.input=r.input),T}function Vw(r){return typeof r.constructor=="function"&&!ml(r)?va(Sc(r)):{}}function sL(r,v,T){var H=r.constructor;switch(v){case wn:return Pd(r);case Me:case Te:return new H(+r);case Zn:return HE(r,T);case Ri:case Ci:case An:case ri:case ui:case sn:case oi:case uo:case Nr:return $w(r,T);case rt:return new H;case yt:case ci:return new H(r);case _n:return UE(r);case Xn:return new H;case Li:return VE(r)}}function aL(r,v){var T=v.length;if(!T)return r;var H=T-1;return v[H]=(T>1?"& ":"")+v[H],v=v.join(T>2?", ":" "),r.replace(Jr,`{
1472
+ /* [wrapped with `+v+`] */
1473
+ `)}function lL(r){return _t(r)||Ds(r)||!!(Xy&&r&&r[Xy])}function Mo(r,v){var T=typeof r;return v=v??U,!!v&&(T=="number"||T!="symbol"&&gn.test(r))&&r>-1&&r%1==0&&r<v}function Fi(r,v,T){if(!Tn(T))return!1;var H=typeof v;return(H=="number"?qi(T)&&Mo(v,T.length):H=="string"&&v in T)?Vr(T[v],r):!1}function Vd(r,v){if(_t(r))return!1;var T=typeof r;return T=="number"||T=="symbol"||T=="boolean"||r==null||ur(r)?!0:Fr.test(r)||!aa.test(r)||v!=null&&r in Et(v)}function cL(r){var v=typeof r;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?r!=="__proto__":r===null}function Gd(r){var v=Hc(r),T=J[v];if(typeof T!="function"||!(v in Bt.prototype))return!1;if(r===T)return!0;var H=jd(T);return!!H&&r===H[0]}function uL(r){return!!Gy&&Gy in r}var hL=Ms?To:cp;function ml(r){var v=r&&r.constructor,T=typeof v=="function"&&v.prototype||Nn;return r===T}function Gw(r){return r===r&&!Tn(r)}function Kw(r,v){return function(T){return T==null?!1:T[r]===v&&(v!==n||r in Et(T))}}function dL(r){var v=Yc(r,function(H){return T.size===g&&T.clear(),H}),T=v.cache;return v}function pL(r,v){var T=r[1],H=v[1],K=T|H,ee=K<(f|w|O),le=H==O&&T==E||H==O&&T==L&&r[7].length<=v[8]||H==(O|L)&&v[7].length<=v[8]&&T==E;if(!(ee||le))return r;H&f&&(r[2]=v[2],K|=T&f?0:x);var ge=v[3];if(ge){var we=r[3];r[3]=we?Tw(we,ge,v[4]):ge,r[4]=we?je(r[3],o):v[4]}return ge=v[5],ge&&(we=r[5],r[5]=we?Iw(we,ge,v[6]):ge,r[6]=we?je(r[5],o):v[6]),ge=v[7],ge&&(r[7]=ge),H&O&&(r[8]=r[8]==null?v[8]:Mi(r[8],v[8])),r[9]==null&&(r[9]=v[9]),r[0]=v[0],r[1]=K,r}function gL(r){var v=[];if(r!=null)for(var T in Et(r))v.push(T);return v}function fL(r){return xc.call(r)}function qw(r,v,T){return v=li(v===n?r.length-1:v,0),function(){for(var H=arguments,K=-1,ee=li(H.length-v,0),le=ke(ee);++K<ee;)le[K]=H[v+K];K=-1;for(var ge=ke(v+1);++K<v;)ge[K]=H[K];return ge[v]=T(le),hi(r,this,ge)}}function Yw(r,v){return v.length<2?r:Rs(r,_r(v,0,-1))}function mL(r,v){for(var T=r.length,H=Mi(v.length,T),K=Ki(r);H--;){var ee=v[H];r[H]=Mo(ee,T)?K[ee]:n}return r}function Kd(r,v){if(!(v==="constructor"&&typeof r[v]=="function")&&v!="__proto__")return r[v]}var Xw=Qw(ww),vl=EI||function(r,v){return ln.setTimeout(r,v)},qd=Qw(WE);function Zw(r,v,T){var H=v+"";return qd(r,aL(H,vL(rL(H),T)))}function Qw(r){var v=0,T=0;return function(){var H=NI(),K=N-(H-T);if(T=H,K>0){if(++v>=F)return arguments[0]}else v=0;return r.apply(n,arguments)}}function Vc(r,v){var T=-1,H=r.length,K=H-1;for(v=v===n?H:v;++T<v;){var ee=Id(T,K),le=r[ee];r[ee]=r[T],r[T]=le}return r.length=v,r}var Jw=dL(function(r){var v=[];return r.charCodeAt(0)===46&&v.push(""),r.replace(jn,function(T,H,K,ee){v.push(K?ee.replace(il,"$1"):H||T)}),v});function ao(r){if(typeof r=="string"||ur(r))return r;var v=r+"";return v=="0"&&1/r==-j?"-0":v}function Ns(r){if(r!=null){try{return bc.call(r)}catch{}try{return r+""}catch{}}return""}function vL(r,v){return vi(ce,function(T){var H="_."+T[0];v&T[1]&&!ar(r,H)&&r.push(H)}),r.sort()}function eb(r){if(r instanceof Bt)return r.clone();var v=new kr(r.__wrapped__,r.__chain__);return v.__actions__=Ki(r.__actions__),v.__index__=r.__index__,v.__values__=r.__values__,v}function yL(r,v,T){(T?Fi(r,v,T):v===n)?v=1:v=li(It(v),0);var H=r==null?0:r.length;if(!H||v<1)return[];for(var K=0,ee=0,le=ke($c(H/v));K<H;)le[ee++]=_r(r,K,K+=v);return le}function wL(r){for(var v=-1,T=r==null?0:r.length,H=0,K=[];++v<T;){var ee=r[v];ee&&(K[H++]=ee)}return K}function bL(){var r=arguments.length;if(!r)return[];for(var v=ke(r-1),T=arguments[0],H=r;H--;)v[H-1]=arguments[H];return $(_t(T)?Ki(T):[T],wi(v,1))}var xL=Ot(function(r,v){return Vn(r)?hl(r,wi(v,1,Vn,!0)):[]}),CL=Ot(function(r,v){var T=Ar(v);return Vn(T)&&(T=n),Vn(r)?hl(r,wi(v,1,Vn,!0),gt(T,2)):[]}),kL=Ot(function(r,v){var T=Ar(v);return Vn(T)&&(T=n),Vn(r)?hl(r,wi(v,1,Vn,!0),n,T):[]});function SL(r,v,T){var H=r==null?0:r.length;return H?(v=T||v===n?1:It(v),_r(r,v<0?0:v,H)):[]}function _L(r,v,T){var H=r==null?0:r.length;return H?(v=T||v===n?1:It(v),v=H-v,_r(r,0,v<0?0:v)):[]}function AL(r,v){return r&&r.length?Pc(r,gt(v,3),!0,!0):[]}function $L(r,v){return r&&r.length?Pc(r,gt(v,3),!0):[]}function ML(r,v,T,H){var K=r==null?0:r.length;return K?(T&&typeof T!="number"&&Fi(r,v,T)&&(T=0,H=K),bE(r,v,T,H)):[]}function tb(r,v,T){var H=r==null?0:r.length;if(!H)return-1;var K=T==null?0:It(T);return K<0&&(K=li(H+K,0)),ie(r,gt(v,3),K)}function nb(r,v,T){var H=r==null?0:r.length;if(!H)return-1;var K=H-1;return T!==n&&(K=It(T),K=T<0?li(H+K,0):Mi(K,H-1)),ie(r,gt(v,3),K,!0)}function ib(r){var v=r==null?0:r.length;return v?wi(r,1):[]}function TL(r){var v=r==null?0:r.length;return v?wi(r,j):[]}function IL(r,v){var T=r==null?0:r.length;return T?(v=v===n?1:It(v),wi(r,v)):[]}function EL(r){for(var v=-1,T=r==null?0:r.length,H={};++v<T;){var K=r[v];H[K[0]]=K[1]}return H}function rb(r){return r&&r.length?r[0]:n}function LL(r,v,T){var H=r==null?0:r.length;if(!H)return-1;var K=T==null?0:It(T);return K<0&&(K=li(H+K,0)),ae(r,v,K)}function RL(r){var v=r==null?0:r.length;return v?_r(r,0,-1):[]}var OL=Ot(function(r){var v=y(r,Nd);return v.length&&v[0]===r[0]?_d(v):[]}),NL=Ot(function(r){var v=Ar(r),T=y(r,Nd);return v===Ar(T)?v=n:T.pop(),T.length&&T[0]===r[0]?_d(T,gt(v,2)):[]}),DL=Ot(function(r){var v=Ar(r),T=y(r,Nd);return v=typeof v=="function"?v:n,v&&T.pop(),T.length&&T[0]===r[0]?_d(T,n,v):[]});function PL(r,v){return r==null?"":RI.call(r,v)}function Ar(r){var v=r==null?0:r.length;return v?r[v-1]:n}function FL(r,v,T){var H=r==null?0:r.length;if(!H)return-1;var K=H;return T!==n&&(K=It(T),K=K<0?li(H+K,0):Mi(K,H-1)),v===v?bt(r,v,K):ie(r,Se,K,!0)}function WL(r,v){return r&&r.length?fw(r,It(v)):n}var BL=Ot(ob);function ob(r,v){return r&&r.length&&v&&v.length?Td(r,v):r}function zL(r,v,T){return r&&r.length&&v&&v.length?Td(r,v,gt(T,2)):r}function jL(r,v,T){return r&&r.length&&v&&v.length?Td(r,v,n,T):r}var HL=$o(function(r,v){var T=r==null?0:r.length,H=xd(r,v);return yw(r,y(v,function(K){return Mo(K,T)?+K:K}).sort(Mw)),H});function UL(r,v){var T=[];if(!(r&&r.length))return T;var H=-1,K=[],ee=r.length;for(v=gt(v,3);++H<ee;){var le=r[H];v(le,H,r)&&(T.push(le),K.push(H))}return yw(r,K),T}function Yd(r){return r==null?r:PI.call(r)}function VL(r,v,T){var H=r==null?0:r.length;return H?(T&&typeof T!="number"&&Fi(r,v,T)?(v=0,T=H):(v=v==null?0:It(v),T=T===n?H:It(T)),_r(r,v,T)):[]}function GL(r,v){return Dc(r,v)}function KL(r,v,T){return Ld(r,v,gt(T,2))}function qL(r,v){var T=r==null?0:r.length;if(T){var H=Dc(r,v);if(H<T&&Vr(r[H],v))return H}return-1}function YL(r,v){return Dc(r,v,!0)}function XL(r,v,T){return Ld(r,v,gt(T,2),!0)}function ZL(r,v){var T=r==null?0:r.length;if(T){var H=Dc(r,v,!0)-1;if(Vr(r[H],v))return H}return-1}function QL(r){return r&&r.length?bw(r):[]}function JL(r,v){return r&&r.length?bw(r,gt(v,2)):[]}function eR(r){var v=r==null?0:r.length;return v?_r(r,1,v):[]}function tR(r,v,T){return r&&r.length?(v=T||v===n?1:It(v),_r(r,0,v<0?0:v)):[]}function nR(r,v,T){var H=r==null?0:r.length;return H?(v=T||v===n?1:It(v),v=H-v,_r(r,v<0?0:v,H)):[]}function iR(r,v){return r&&r.length?Pc(r,gt(v,3),!1,!0):[]}function rR(r,v){return r&&r.length?Pc(r,gt(v,3)):[]}var oR=Ot(function(r){return Zo(wi(r,1,Vn,!0))}),sR=Ot(function(r){var v=Ar(r);return Vn(v)&&(v=n),Zo(wi(r,1,Vn,!0),gt(v,2))}),aR=Ot(function(r){var v=Ar(r);return v=typeof v=="function"?v:n,Zo(wi(r,1,Vn,!0),n,v)});function lR(r){return r&&r.length?Zo(r):[]}function cR(r,v){return r&&r.length?Zo(r,gt(v,2)):[]}function uR(r,v){return v=typeof v=="function"?v:n,r&&r.length?Zo(r,n,v):[]}function Xd(r){if(!(r&&r.length))return[];var v=0;return r=$i(r,function(T){if(Vn(T))return v=li(T.length,v),!0}),Qe(v,function(T){return y(r,xe(T))})}function sb(r,v){if(!(r&&r.length))return[];var T=Xd(r);return v==null?T:y(T,function(H){return hi(v,n,H)})}var hR=Ot(function(r,v){return Vn(r)?hl(r,v):[]}),dR=Ot(function(r){return Od($i(r,Vn))}),pR=Ot(function(r){var v=Ar(r);return Vn(v)&&(v=n),Od($i(r,Vn),gt(v,2))}),gR=Ot(function(r){var v=Ar(r);return v=typeof v=="function"?v:n,Od($i(r,Vn),n,v)}),fR=Ot(Xd);function mR(r,v){return Sw(r||[],v||[],ul)}function vR(r,v){return Sw(r||[],v||[],gl)}var yR=Ot(function(r){var v=r.length,T=v>1?r[v-1]:n;return T=typeof T=="function"?(r.pop(),T):n,sb(r,T)});function ab(r){var v=J(r);return v.__chain__=!0,v}function wR(r,v){return v(r),r}function Gc(r,v){return v(r)}var bR=$o(function(r){var v=r.length,T=v?r[0]:0,H=this.__wrapped__,K=function(ee){return xd(ee,r)};return v>1||this.__actions__.length||!(H instanceof Bt)||!Mo(T)?this.thru(K):(H=H.slice(T,+T+(v?1:0)),H.__actions__.push({func:Gc,args:[K],thisArg:n}),new kr(H,this.__chain__).thru(function(ee){return v&&!ee.length&&ee.push(n),ee}))});function xR(){return ab(this)}function CR(){return new kr(this.value(),this.__chain__)}function kR(){this.__values__===n&&(this.__values__=xb(this.value()));var r=this.__index__>=this.__values__.length,v=r?n:this.__values__[this.__index__++];return{done:r,value:v}}function SR(){return this}function _R(r){for(var v,T=this;T instanceof Ec;){var H=eb(T);H.__index__=0,H.__values__=n,v?K.__wrapped__=H:v=H;var K=H;T=T.__wrapped__}return K.__wrapped__=r,v}function AR(){var r=this.__wrapped__;if(r instanceof Bt){var v=r;return this.__actions__.length&&(v=new Bt(this)),v=v.reverse(),v.__actions__.push({func:Gc,args:[Yd],thisArg:n}),new kr(v,this.__chain__)}return this.thru(Yd)}function $R(){return kw(this.__wrapped__,this.__actions__)}var MR=Fc(function(r,v,T){an.call(r,T)?++r[T]:_o(r,T,1)});function TR(r,v,T){var H=_t(r)?yi:wE;return T&&Fi(r,v,T)&&(v=n),H(r,gt(v,3))}function IR(r,v){var T=_t(r)?$i:sw;return T(r,gt(v,3))}var ER=Ow(tb),LR=Ow(nb);function RR(r,v){return wi(Kc(r,v),1)}function OR(r,v){return wi(Kc(r,v),j)}function NR(r,v,T){return T=T===n?1:It(T),wi(Kc(r,v),T)}function lb(r,v){var T=_t(r)?vi:Xo;return T(r,gt(v,3))}function cb(r,v){var T=_t(r)?$s:ow;return T(r,gt(v,3))}var DR=Fc(function(r,v,T){an.call(r,T)?r[T].push(v):_o(r,T,[v])});function PR(r,v,T,H){r=qi(r)?r:Ca(r),T=T&&!H?It(T):0;var K=r.length;return T<0&&(T=li(K+T,0)),Qc(r)?T<=K&&r.indexOf(v,T)>-1:!!K&&ae(r,v,T)>-1}var FR=Ot(function(r,v,T){var H=-1,K=typeof v=="function",ee=qi(r)?ke(r.length):[];return Xo(r,function(le){ee[++H]=K?hi(v,le,T):dl(le,v,T)}),ee}),WR=Fc(function(r,v,T){_o(r,T,v)});function Kc(r,v){var T=_t(r)?y:dw;return T(r,gt(v,3))}function BR(r,v,T,H){return r==null?[]:(_t(v)||(v=v==null?[]:[v]),T=H?n:T,_t(T)||(T=T==null?[]:[T]),mw(r,v,T))}var zR=Fc(function(r,v,T){r[T?0:1].push(v)},function(){return[[],[]]});function jR(r,v,T){var H=_t(r)?_:Oe,K=arguments.length<3;return H(r,gt(v,4),T,K,Xo)}function HR(r,v,T){var H=_t(r)?P:Oe,K=arguments.length<3;return H(r,gt(v,4),T,K,ow)}function UR(r,v){var T=_t(r)?$i:sw;return T(r,Xc(gt(v,3)))}function VR(r){var v=_t(r)?tw:PE;return v(r)}function GR(r,v,T){(T?Fi(r,v,T):v===n)?v=1:v=It(v);var H=_t(r)?gE:FE;return H(r,v)}function KR(r){var v=_t(r)?fE:BE;return v(r)}function qR(r){if(r==null)return 0;if(qi(r))return Qc(r)?Nt(r):r.length;var v=Ti(r);return v==rt||v==Xn?r.size:$d(r).length}function YR(r,v,T){var H=_t(r)?W:zE;return T&&Fi(r,v,T)&&(v=n),H(r,gt(v,3))}var XR=Ot(function(r,v){if(r==null)return[];var T=v.length;return T>1&&Fi(r,v[0],v[1])?v=[]:T>2&&Fi(v[0],v[1],v[2])&&(v=[v[0]]),mw(r,wi(v,1),[])}),qc=II||function(){return ln.Date.now()};function ZR(r,v){if(typeof v!="function")throw new cn(m);return r=It(r),function(){if(--r<1)return v.apply(this,arguments)}}function ub(r,v,T){return v=T?n:v,v=r&&v==null?r.length:v,Ao(r,O,n,n,n,n,v)}function hb(r,v){var T;if(typeof v!="function")throw new cn(m);return r=It(r),function(){return--r>0&&(T=v.apply(this,arguments)),r<=1&&(v=n),T}}var Zd=Ot(function(r,v,T){var H=f;if(T.length){var K=je(T,ba(Zd));H|=k}return Ao(r,H,v,T,K)}),db=Ot(function(r,v,T){var H=f|w;if(T.length){var K=je(T,ba(db));H|=k}return Ao(v,H,r,T,K)});function pb(r,v,T){v=T?n:v;var H=Ao(r,E,n,n,n,n,n,v);return H.placeholder=pb.placeholder,H}function gb(r,v,T){v=T?n:v;var H=Ao(r,M,n,n,n,n,n,v);return H.placeholder=gb.placeholder,H}function fb(r,v,T){var H,K,ee,le,ge,we,Le=0,Re=!1,Pe=!1,Ye=!0;if(typeof r!="function")throw new cn(m);v=$r(v)||0,Tn(T)&&(Re=!!T.leading,Pe="maxWait"in T,ee=Pe?li($r(T.maxWait)||0,v):ee,Ye="trailing"in T?!!T.trailing:Ye);function it(Gn){var Gr=H,Eo=K;return H=K=n,Le=Gn,le=r.apply(Eo,Gr),le}function mt(Gn){return Le=Gn,ge=vl(Dt,v),Re?it(Gn):le}function Lt(Gn){var Gr=Gn-we,Eo=Gn-Le,Ob=v-Gr;return Pe?Mi(Ob,ee-Eo):Ob}function vt(Gn){var Gr=Gn-we,Eo=Gn-Le;return we===n||Gr>=v||Gr<0||Pe&&Eo>=ee}function Dt(){var Gn=qc();if(vt(Gn))return jt(Gn);ge=vl(Dt,Lt(Gn))}function jt(Gn){return ge=n,Ye&&H?it(Gn):(H=K=n,le)}function hr(){ge!==n&&_w(ge),Le=0,H=we=K=ge=n}function Wi(){return ge===n?le:jt(qc())}function dr(){var Gn=qc(),Gr=vt(Gn);if(H=arguments,K=this,we=Gn,Gr){if(ge===n)return mt(we);if(Pe)return _w(ge),ge=vl(Dt,v),it(we)}return ge===n&&(ge=vl(Dt,v)),le}return dr.cancel=hr,dr.flush=Wi,dr}var QR=Ot(function(r,v){return rw(r,1,v)}),JR=Ot(function(r,v,T){return rw(r,$r(v)||0,T)});function eO(r){return Ao(r,R)}function Yc(r,v){if(typeof r!="function"||v!=null&&typeof v!="function")throw new cn(m);var T=function(){var H=arguments,K=v?v.apply(this,H):H[0],ee=T.cache;if(ee.has(K))return ee.get(K);var le=r.apply(this,H);return T.cache=ee.set(K,le)||ee,le};return T.cache=new(Yc.Cache||So),T}Yc.Cache=So;function Xc(r){if(typeof r!="function")throw new cn(m);return function(){var v=arguments;switch(v.length){case 0:return!r.call(this);case 1:return!r.call(this,v[0]);case 2:return!r.call(this,v[0],v[1]);case 3:return!r.call(this,v[0],v[1],v[2])}return!r.apply(this,v)}}function tO(r){return hb(2,r)}var nO=jE(function(r,v){v=v.length==1&&_t(v[0])?y(v[0],ct(gt())):y(wi(v,1),ct(gt()));var T=v.length;return Ot(function(H){for(var K=-1,ee=Mi(H.length,T);++K<ee;)H[K]=v[K].call(this,H[K]);return hi(r,this,H)})}),Qd=Ot(function(r,v){var T=je(v,ba(Qd));return Ao(r,k,n,v,T)}),mb=Ot(function(r,v){var T=je(v,ba(mb));return Ao(r,C,n,v,T)}),iO=$o(function(r,v){return Ao(r,L,n,n,n,v)});function rO(r,v){if(typeof r!="function")throw new cn(m);return v=v===n?v:It(v),Ot(r,v)}function oO(r,v){if(typeof r!="function")throw new cn(m);return v=v==null?0:li(It(v),0),Ot(function(T){var H=T[v],K=Jo(T,0,v);return H&&$(K,H),hi(r,this,K)})}function sO(r,v,T){var H=!0,K=!0;if(typeof r!="function")throw new cn(m);return Tn(T)&&(H="leading"in T?!!T.leading:H,K="trailing"in T?!!T.trailing:K),fb(r,v,{leading:H,maxWait:v,trailing:K})}function aO(r){return ub(r,1)}function lO(r,v){return Qd(Dd(v),r)}function cO(){if(!arguments.length)return[];var r=arguments[0];return _t(r)?r:[r]}function uO(r){return Sr(r,l)}function hO(r,v){return v=typeof v=="function"?v:n,Sr(r,l,v)}function dO(r){return Sr(r,a|l)}function pO(r,v){return v=typeof v=="function"?v:n,Sr(r,a|l,v)}function gO(r,v){return v==null||iw(r,v,fi(v))}function Vr(r,v){return r===v||r!==r&&v!==v}var fO=jc(Sd),mO=jc(function(r,v){return r>=v}),Ds=cw((function(){return arguments})())?cw:function(r){return Dn(r)&&an.call(r,"callee")&&!Yy.call(r,"callee")},_t=ke.isArray,vO=Gi?ct(Gi):_E;function qi(r){return r!=null&&Zc(r.length)&&!To(r)}function Vn(r){return Dn(r)&&qi(r)}function yO(r){return r===!0||r===!1||Dn(r)&&Pi(r)==Me}var es=LI||cp,wO=qo?ct(qo):AE;function bO(r){return Dn(r)&&r.nodeType===1&&!yl(r)}function xO(r){if(r==null)return!0;if(qi(r)&&(_t(r)||typeof r=="string"||typeof r.splice=="function"||es(r)||xa(r)||Ds(r)))return!r.length;var v=Ti(r);if(v==rt||v==Xn)return!r.size;if(ml(r))return!$d(r).length;for(var T in r)if(an.call(r,T))return!1;return!0}function CO(r,v){return pl(r,v)}function kO(r,v,T){T=typeof T=="function"?T:n;var H=T?T(r,v):n;return H===n?pl(r,v,n,T):!!H}function Jd(r){if(!Dn(r))return!1;var v=Pi(r);return v==Je||v==Ee||typeof r.message=="string"&&typeof r.name=="string"&&!yl(r)}function SO(r){return typeof r=="number"&&Zy(r)}function To(r){if(!Tn(r))return!1;var v=Pi(r);return v==Xe||v==ft||v==ve||v==tr}function vb(r){return typeof r=="number"&&r==It(r)}function Zc(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=U}function Tn(r){var v=typeof r;return r!=null&&(v=="object"||v=="function")}function Dn(r){return r!=null&&typeof r=="object"}var yb=On?ct(On):ME;function _O(r,v){return r===v||Ad(r,v,Hd(v))}function AO(r,v,T){return T=typeof T=="function"?T:n,Ad(r,v,Hd(v),T)}function $O(r){return wb(r)&&r!=+r}function MO(r){if(hL(r))throw new ut(p);return uw(r)}function TO(r){return r===null}function IO(r){return r==null}function wb(r){return typeof r=="number"||Dn(r)&&Pi(r)==yt}function yl(r){if(!Dn(r)||Pi(r)!=zn)return!1;var v=Sc(r);if(v===null)return!0;var T=an.call(v,"constructor")&&v.constructor;return typeof T=="function"&&T instanceof T&&bc.call(T)==AI}var ep=or?ct(or):TE;function EO(r){return vb(r)&&r>=-U&&r<=U}var bb=sr?ct(sr):IE;function Qc(r){return typeof r=="string"||!_t(r)&&Dn(r)&&Pi(r)==ci}function ur(r){return typeof r=="symbol"||Dn(r)&&Pi(r)==Li}var xa=xr?ct(xr):EE;function LO(r){return r===n}function RO(r){return Dn(r)&&Ti(r)==qe}function OO(r){return Dn(r)&&Pi(r)==Gt}var NO=jc(Md),DO=jc(function(r,v){return r<=v});function xb(r){if(!r)return[];if(qi(r))return Qc(r)?St(r):Ki(r);if(ol&&r[ol])return Ce(r[ol]());var v=Ti(r),T=v==rt?Ie:v==Xn?Ke:Ca;return T(r)}function Io(r){if(!r)return r===0?r:0;if(r=$r(r),r===j||r===-j){var v=r<0?-1:1;return v*q}return r===r?r:0}function It(r){var v=Io(r),T=v%1;return v===v?T?v-T:v:0}function Cb(r){return r?Ls(It(r),0,te):0}function $r(r){if(typeof r=="number")return r;if(ur(r))return Q;if(Tn(r)){var v=typeof r.valueOf=="function"?r.valueOf():r;r=Tn(v)?v+"":v}if(typeof r!="string")return r===0?r:+r;r=mn(r);var T=ca.test(r);return T||Hn.test(r)?fn(r.slice(2),T?2:8):Ft.test(r)?Q:+r}function kb(r){return so(r,Yi(r))}function PO(r){return r?Ls(It(r),-U,U):r===0?r:0}function nn(r){return r==null?"":cr(r)}var FO=ya(function(r,v){if(ml(v)||qi(v)){so(v,fi(v),r);return}for(var T in v)an.call(v,T)&&ul(r,T,v[T])}),Sb=ya(function(r,v){so(v,Yi(v),r)}),Jc=ya(function(r,v,T,H){so(v,Yi(v),r,H)}),WO=ya(function(r,v,T,H){so(v,fi(v),r,H)}),BO=$o(xd);function zO(r,v){var T=va(r);return v==null?T:nw(T,v)}var jO=Ot(function(r,v){r=Et(r);var T=-1,H=v.length,K=H>2?v[2]:n;for(K&&Fi(v[0],v[1],K)&&(H=1);++T<H;)for(var ee=v[T],le=Yi(ee),ge=-1,we=le.length;++ge<we;){var Le=le[ge],Re=r[Le];(Re===n||Vr(Re,Nn[Le])&&!an.call(r,Le))&&(r[Le]=ee[Le])}return r}),HO=Ot(function(r){return r.push(n,zw),hi(_b,n,r)});function UO(r,v){return Z(r,gt(v,3),oo)}function VO(r,v){return Z(r,gt(v,3),kd)}function GO(r,v){return r==null?r:Cd(r,gt(v,3),Yi)}function KO(r,v){return r==null?r:aw(r,gt(v,3),Yi)}function qO(r,v){return r&&oo(r,gt(v,3))}function YO(r,v){return r&&kd(r,gt(v,3))}function XO(r){return r==null?[]:Oc(r,fi(r))}function ZO(r){return r==null?[]:Oc(r,Yi(r))}function tp(r,v,T){var H=r==null?n:Rs(r,v);return H===n?T:H}function QO(r,v){return r!=null&&Uw(r,v,xE)}function np(r,v){return r!=null&&Uw(r,v,CE)}var JO=Dw(function(r,v,T){v!=null&&typeof v.toString!="function"&&(v=xc.call(v)),r[v]=T},rp(Xi)),eN=Dw(function(r,v,T){v!=null&&typeof v.toString!="function"&&(v=xc.call(v)),an.call(r,v)?r[v].push(T):r[v]=[T]},gt),tN=Ot(dl);function fi(r){return qi(r)?ew(r):$d(r)}function Yi(r){return qi(r)?ew(r,!0):LE(r)}function nN(r,v){var T={};return v=gt(v,3),oo(r,function(H,K,ee){_o(T,v(H,K,ee),H)}),T}function iN(r,v){var T={};return v=gt(v,3),oo(r,function(H,K,ee){_o(T,K,v(H,K,ee))}),T}var rN=ya(function(r,v,T){Nc(r,v,T)}),_b=ya(function(r,v,T,H){Nc(r,v,T,H)}),oN=$o(function(r,v){var T={};if(r==null)return T;var H=!1;v=y(v,function(ee){return ee=Qo(ee,r),H||(H=ee.length>1),ee}),so(r,zd(r),T),H&&(T=Sr(T,a|u|l,JE));for(var K=v.length;K--;)Rd(T,v[K]);return T});function sN(r,v){return Ab(r,Xc(gt(v)))}var aN=$o(function(r,v){return r==null?{}:OE(r,v)});function Ab(r,v){if(r==null)return{};var T=y(zd(r),function(H){return[H]});return v=gt(v),vw(r,T,function(H,K){return v(H,K[0])})}function lN(r,v,T){v=Qo(v,r);var H=-1,K=v.length;for(K||(K=1,r=n);++H<K;){var ee=r==null?n:r[ao(v[H])];ee===n&&(H=K,ee=T),r=To(ee)?ee.call(r):ee}return r}function cN(r,v,T){return r==null?r:gl(r,v,T)}function uN(r,v,T,H){return H=typeof H=="function"?H:n,r==null?r:gl(r,v,T,H)}var $b=Ww(fi),Mb=Ww(Yi);function hN(r,v,T){var H=_t(r),K=H||es(r)||xa(r);if(v=gt(v,4),T==null){var ee=r&&r.constructor;K?T=H?new ee:[]:Tn(r)?T=To(ee)?va(Sc(r)):{}:T={}}return(K?vi:oo)(r,function(le,ge,we){return v(T,le,ge,we)}),T}function dN(r,v){return r==null?!0:Rd(r,v)}function pN(r,v,T){return r==null?r:Cw(r,v,Dd(T))}function gN(r,v,T,H){return H=typeof H=="function"?H:n,r==null?r:Cw(r,v,Dd(T),H)}function Ca(r){return r==null?[]:xn(r,fi(r))}function fN(r){return r==null?[]:xn(r,Yi(r))}function mN(r,v,T){return T===n&&(T=v,v=n),T!==n&&(T=$r(T),T=T===T?T:0),v!==n&&(v=$r(v),v=v===v?v:0),Ls($r(r),v,T)}function vN(r,v,T){return v=Io(v),T===n?(T=v,v=0):T=Io(T),r=$r(r),kE(r,v,T)}function yN(r,v,T){if(T&&typeof T!="boolean"&&Fi(r,v,T)&&(v=T=n),T===n&&(typeof v=="boolean"?(T=v,v=n):typeof r=="boolean"&&(T=r,r=n)),r===n&&v===n?(r=0,v=1):(r=Io(r),v===n?(v=r,r=0):v=Io(v)),r>v){var H=r;r=v,v=H}if(T||r%1||v%1){var K=Qy();return Mi(r+K*(v-r+He("1e-"+((K+"").length-1))),v)}return Id(r,v)}var wN=wa(function(r,v,T){return v=v.toLowerCase(),r+(T?Tb(v):v)});function Tb(r){return ip(nn(r).toLowerCase())}function Ib(r){return r=nn(r),r&&r.replace(En,Cn).replace(bo,"")}function bN(r,v,T){r=nn(r),v=cr(v);var H=r.length;T=T===n?H:Ls(It(T),0,H);var K=T;return T-=v.length,T>=0&&r.slice(T,K)==v}function xN(r){return r=nn(r),r&&el.test(r)?r.replace(po,V):r}function CN(r){return r=nn(r),r&&Wr.test(r)?r.replace(ki,"\\$&"):r}var kN=wa(function(r,v,T){return r+(T?"-":"")+v.toLowerCase()}),SN=wa(function(r,v,T){return r+(T?" ":"")+v.toLowerCase()}),_N=Rw("toLowerCase");function AN(r,v,T){r=nn(r),v=It(v);var H=v?Nt(r):0;if(!v||H>=v)return r;var K=(v-H)/2;return zc(Mc(K),T)+r+zc($c(K),T)}function $N(r,v,T){r=nn(r),v=It(v);var H=v?Nt(r):0;return v&&H<v?r+zc(v-H,T):r}function MN(r,v,T){r=nn(r),v=It(v);var H=v?Nt(r):0;return v&&H<v?zc(v-H,T)+r:r}function TN(r,v,T){return T||v==null?v=0:v&&(v=+v),DI(nn(r).replace($n,""),v||0)}function IN(r,v,T){return(T?Fi(r,v,T):v===n)?v=1:v=It(v),Ed(nn(r),v)}function EN(){var r=arguments,v=nn(r[0]);return r.length<3?v:v.replace(r[1],r[2])}var LN=wa(function(r,v,T){return r+(T?"_":"")+v.toLowerCase()});function RN(r,v,T){return T&&typeof T!="number"&&Fi(r,v,T)&&(v=T=n),T=T===n?te:T>>>0,T?(r=nn(r),r&&(typeof v=="string"||v!=null&&!ep(v))&&(v=cr(v),!v&&oe(r))?Jo(St(r),0,T):r.split(v,T)):[]}var ON=wa(function(r,v,T){return r+(T?" ":"")+ip(v)});function NN(r,v,T){return r=nn(r),T=T==null?0:Ls(It(T),0,r.length),v=cr(v),r.slice(T,T+v.length)==v}function DN(r,v,T){var H=J.templateSettings;T&&Fi(r,v,T)&&(v=n),r=nn(r),v=Jc({},v,H,Bw);var K=Jc({},v.imports,H.imports,Bw),ee=fi(K),le=xn(K,ee),ge,we,Le=0,Re=v.interpolate||fr,Pe="__p += '",Ye=Di((v.escape||fr).source+"|"+Re.source+"|"+(Re===ws?zr:fr).source+"|"+(v.evaluate||fr).source+"|$","g"),it="//# sourceURL="+(an.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ro+"]")+`
1474
+ `;r.replace(Ye,function(vt,Dt,jt,hr,Wi,dr){return jt||(jt=hr),Pe+=r.slice(Le,dr).replace(Ai,X),Dt&&(ge=!0,Pe+=`' +
1475
+ __e(`+Dt+`) +
1476
+ '`),Wi&&(we=!0,Pe+=`';
1477
+ `+Wi+`;
1478
+ __p += '`),jt&&(Pe+=`' +
1479
+ ((__t = (`+jt+`)) == null ? '' : __t) +
1480
+ '`),Le=dr+vt.length,vt}),Pe+=`';
1481
+ `;var mt=an.call(v,"variable")&&v.variable;if(!mt)Pe=`with (obj) {
1482
+ `+Pe+`
1483
+ }
1484
+ `;else if(nl.test(mt))throw new ut(b);Pe=(we?Pe.replace(Dr,""):Pe).replace(Pr,"$1").replace(ho,"$1;"),Pe="function("+(mt||"obj")+`) {
1485
+ `+(mt?"":`obj || (obj = {});
1486
+ `)+"var __t, __p = ''"+(ge?", __e = _.escape":"")+(we?`, __j = Array.prototype.join;
1487
+ function print() { __p += __j.call(arguments, '') }
1488
+ `:`;
1489
+ `)+Pe+`return __p
1490
+ }`;var Lt=Lb(function(){return Tt(ee,it+"return "+Pe).apply(n,le)});if(Lt.source=Pe,Jd(Lt))throw Lt;return Lt}function PN(r){return nn(r).toLowerCase()}function FN(r){return nn(r).toUpperCase()}function WN(r,v,T){if(r=nn(r),r&&(T||v===n))return mn(r);if(!r||!(v=cr(v)))return r;var H=St(r),K=St(v),ee=Mt(H,K),le=Jn(H,K)+1;return Jo(H,ee,le).join("")}function BN(r,v,T){if(r=nn(r),r&&(T||v===n))return r.slice(0,Rt(r)+1);if(!r||!(v=cr(v)))return r;var H=St(r),K=Jn(H,St(v))+1;return Jo(H,0,K).join("")}function zN(r,v,T){if(r=nn(r),r&&(T||v===n))return r.replace($n,"");if(!r||!(v=cr(v)))return r;var H=St(r),K=Mt(H,St(v));return Jo(H,K).join("")}function jN(r,v){var T=I,H=z;if(Tn(v)){var K="separator"in v?v.separator:K;T="length"in v?It(v.length):T,H="omission"in v?cr(v.omission):H}r=nn(r);var ee=r.length;if(oe(r)){var le=St(r);ee=le.length}if(T>=ee)return r;var ge=T-Nt(H);if(ge<1)return H;var we=le?Jo(le,0,ge).join(""):r.slice(0,ge);if(K===n)return we+H;if(le&&(ge+=we.length-ge),ep(K)){if(r.slice(ge).search(K)){var Le,Re=we;for(K.global||(K=Di(K.source,nn(ir.exec(K))+"g")),K.lastIndex=0;Le=K.exec(Re);)var Pe=Le.index;we=we.slice(0,Pe===n?ge:Pe)}}else if(r.indexOf(cr(K),ge)!=ge){var Ye=we.lastIndexOf(K);Ye>-1&&(we=we.slice(0,Ye))}return we+H}function HN(r){return r=nn(r),r&&Po.test(r)?r.replace(mi,pt):r}var UN=wa(function(r,v,T){return r+(T?" ":"")+v.toUpperCase()}),ip=Rw("toUpperCase");function Eb(r,v,T){return r=nn(r),v=T?n:v,v===n?me(r)?kn(r):Y(r):r.match(v)||[]}var Lb=Ot(function(r,v){try{return hi(r,n,v)}catch(T){return Jd(T)?T:new ut(T)}}),VN=$o(function(r,v){return vi(v,function(T){T=ao(T),_o(r,T,Zd(r[T],r))}),r});function GN(r){var v=r==null?0:r.length,T=gt();return r=v?y(r,function(H){if(typeof H[1]!="function")throw new cn(m);return[T(H[0]),H[1]]}):[],Ot(function(H){for(var K=-1;++K<v;){var ee=r[K];if(hi(ee[0],this,H))return hi(ee[1],this,H)}})}function KN(r){return yE(Sr(r,a))}function rp(r){return function(){return r}}function qN(r,v){return r==null||r!==r?v:r}var YN=Nw(),XN=Nw(!0);function Xi(r){return r}function op(r){return hw(typeof r=="function"?r:Sr(r,a))}function ZN(r){return pw(Sr(r,a))}function QN(r,v){return gw(r,Sr(v,a))}var JN=Ot(function(r,v){return function(T){return dl(T,r,v)}}),e2=Ot(function(r,v){return function(T){return dl(r,T,v)}});function sp(r,v,T){var H=fi(v),K=Oc(v,H);T==null&&!(Tn(v)&&(K.length||!H.length))&&(T=v,v=r,r=this,K=Oc(v,fi(v)));var ee=!(Tn(T)&&"chain"in T)||!!T.chain,le=To(r);return vi(K,function(ge){var we=v[ge];r[ge]=we,le&&(r.prototype[ge]=function(){var Le=this.__chain__;if(ee||Le){var Re=r(this.__wrapped__),Pe=Re.__actions__=Ki(this.__actions__);return Pe.push({func:we,args:arguments,thisArg:r}),Re.__chain__=Le,Re}return we.apply(r,$([this.value()],arguments))})}),r}function t2(){return ln._===this&&(ln._=$I),this}function ap(){}function n2(r){return r=It(r),Ot(function(v){return fw(v,r)})}var i2=Fd(y),r2=Fd(yi),o2=Fd(W);function Rb(r){return Vd(r)?xe(ao(r)):NE(r)}function s2(r){return function(v){return r==null?n:Rs(r,v)}}var a2=Pw(),l2=Pw(!0);function lp(){return[]}function cp(){return!1}function c2(){return{}}function u2(){return""}function h2(){return!0}function d2(r,v){if(r=It(r),r<1||r>U)return[];var T=te,H=Mi(r,te);v=gt(v),r-=te;for(var K=Qe(H,v);++T<r;)v(T);return K}function p2(r){return _t(r)?y(r,ao):ur(r)?[r]:Ki(Jw(nn(r)))}function g2(r){var v=++_I;return nn(r)+v}var f2=Bc(function(r,v){return r+v},0),m2=Wd("ceil"),v2=Bc(function(r,v){return r/v},1),y2=Wd("floor");function w2(r){return r&&r.length?Rc(r,Xi,Sd):n}function b2(r,v){return r&&r.length?Rc(r,gt(v,2),Sd):n}function x2(r){return ye(r,Xi)}function C2(r,v){return ye(r,gt(v,2))}function k2(r){return r&&r.length?Rc(r,Xi,Md):n}function S2(r,v){return r&&r.length?Rc(r,gt(v,2),Md):n}var _2=Bc(function(r,v){return r*v},1),A2=Wd("round"),$2=Bc(function(r,v){return r-v},0);function M2(r){return r&&r.length?lt(r,Xi):0}function T2(r,v){return r&&r.length?lt(r,gt(v,2)):0}return J.after=ZR,J.ary=ub,J.assign=FO,J.assignIn=Sb,J.assignInWith=Jc,J.assignWith=WO,J.at=BO,J.before=hb,J.bind=Zd,J.bindAll=VN,J.bindKey=db,J.castArray=cO,J.chain=ab,J.chunk=yL,J.compact=wL,J.concat=bL,J.cond=GN,J.conforms=KN,J.constant=rp,J.countBy=MR,J.create=zO,J.curry=pb,J.curryRight=gb,J.debounce=fb,J.defaults=jO,J.defaultsDeep=HO,J.defer=QR,J.delay=JR,J.difference=xL,J.differenceBy=CL,J.differenceWith=kL,J.drop=SL,J.dropRight=_L,J.dropRightWhile=AL,J.dropWhile=$L,J.fill=ML,J.filter=IR,J.flatMap=RR,J.flatMapDeep=OR,J.flatMapDepth=NR,J.flatten=ib,J.flattenDeep=TL,J.flattenDepth=IL,J.flip=eO,J.flow=YN,J.flowRight=XN,J.fromPairs=EL,J.functions=XO,J.functionsIn=ZO,J.groupBy=DR,J.initial=RL,J.intersection=OL,J.intersectionBy=NL,J.intersectionWith=DL,J.invert=JO,J.invertBy=eN,J.invokeMap=FR,J.iteratee=op,J.keyBy=WR,J.keys=fi,J.keysIn=Yi,J.map=Kc,J.mapKeys=nN,J.mapValues=iN,J.matches=ZN,J.matchesProperty=QN,J.memoize=Yc,J.merge=rN,J.mergeWith=_b,J.method=JN,J.methodOf=e2,J.mixin=sp,J.negate=Xc,J.nthArg=n2,J.omit=oN,J.omitBy=sN,J.once=tO,J.orderBy=BR,J.over=i2,J.overArgs=nO,J.overEvery=r2,J.overSome=o2,J.partial=Qd,J.partialRight=mb,J.partition=zR,J.pick=aN,J.pickBy=Ab,J.property=Rb,J.propertyOf=s2,J.pull=BL,J.pullAll=ob,J.pullAllBy=zL,J.pullAllWith=jL,J.pullAt=HL,J.range=a2,J.rangeRight=l2,J.rearg=iO,J.reject=UR,J.remove=UL,J.rest=rO,J.reverse=Yd,J.sampleSize=GR,J.set=cN,J.setWith=uN,J.shuffle=KR,J.slice=VL,J.sortBy=XR,J.sortedUniq=QL,J.sortedUniqBy=JL,J.split=RN,J.spread=oO,J.tail=eR,J.take=tR,J.takeRight=nR,J.takeRightWhile=iR,J.takeWhile=rR,J.tap=wR,J.throttle=sO,J.thru=Gc,J.toArray=xb,J.toPairs=$b,J.toPairsIn=Mb,J.toPath=p2,J.toPlainObject=kb,J.transform=hN,J.unary=aO,J.union=oR,J.unionBy=sR,J.unionWith=aR,J.uniq=lR,J.uniqBy=cR,J.uniqWith=uR,J.unset=dN,J.unzip=Xd,J.unzipWith=sb,J.update=pN,J.updateWith=gN,J.values=Ca,J.valuesIn=fN,J.without=hR,J.words=Eb,J.wrap=lO,J.xor=dR,J.xorBy=pR,J.xorWith=gR,J.zip=fR,J.zipObject=mR,J.zipObjectDeep=vR,J.zipWith=yR,J.entries=$b,J.entriesIn=Mb,J.extend=Sb,J.extendWith=Jc,sp(J,J),J.add=f2,J.attempt=Lb,J.camelCase=wN,J.capitalize=Tb,J.ceil=m2,J.clamp=mN,J.clone=uO,J.cloneDeep=dO,J.cloneDeepWith=pO,J.cloneWith=hO,J.conformsTo=gO,J.deburr=Ib,J.defaultTo=qN,J.divide=v2,J.endsWith=bN,J.eq=Vr,J.escape=xN,J.escapeRegExp=CN,J.every=TR,J.find=ER,J.findIndex=tb,J.findKey=UO,J.findLast=LR,J.findLastIndex=nb,J.findLastKey=VO,J.floor=y2,J.forEach=lb,J.forEachRight=cb,J.forIn=GO,J.forInRight=KO,J.forOwn=qO,J.forOwnRight=YO,J.get=tp,J.gt=fO,J.gte=mO,J.has=QO,J.hasIn=np,J.head=rb,J.identity=Xi,J.includes=PR,J.indexOf=LL,J.inRange=vN,J.invoke=tN,J.isArguments=Ds,J.isArray=_t,J.isArrayBuffer=vO,J.isArrayLike=qi,J.isArrayLikeObject=Vn,J.isBoolean=yO,J.isBuffer=es,J.isDate=wO,J.isElement=bO,J.isEmpty=xO,J.isEqual=CO,J.isEqualWith=kO,J.isError=Jd,J.isFinite=SO,J.isFunction=To,J.isInteger=vb,J.isLength=Zc,J.isMap=yb,J.isMatch=_O,J.isMatchWith=AO,J.isNaN=$O,J.isNative=MO,J.isNil=IO,J.isNull=TO,J.isNumber=wb,J.isObject=Tn,J.isObjectLike=Dn,J.isPlainObject=yl,J.isRegExp=ep,J.isSafeInteger=EO,J.isSet=bb,J.isString=Qc,J.isSymbol=ur,J.isTypedArray=xa,J.isUndefined=LO,J.isWeakMap=RO,J.isWeakSet=OO,J.join=PL,J.kebabCase=kN,J.last=Ar,J.lastIndexOf=FL,J.lowerCase=SN,J.lowerFirst=_N,J.lt=NO,J.lte=DO,J.max=w2,J.maxBy=b2,J.mean=x2,J.meanBy=C2,J.min=k2,J.minBy=S2,J.stubArray=lp,J.stubFalse=cp,J.stubObject=c2,J.stubString=u2,J.stubTrue=h2,J.multiply=_2,J.nth=WL,J.noConflict=t2,J.noop=ap,J.now=qc,J.pad=AN,J.padEnd=$N,J.padStart=MN,J.parseInt=TN,J.random=yN,J.reduce=jR,J.reduceRight=HR,J.repeat=IN,J.replace=EN,J.result=lN,J.round=A2,J.runInContext=fe,J.sample=VR,J.size=qR,J.snakeCase=LN,J.some=YR,J.sortedIndex=GL,J.sortedIndexBy=KL,J.sortedIndexOf=qL,J.sortedLastIndex=YL,J.sortedLastIndexBy=XL,J.sortedLastIndexOf=ZL,J.startCase=ON,J.startsWith=NN,J.subtract=$2,J.sum=M2,J.sumBy=T2,J.template=DN,J.times=d2,J.toFinite=Io,J.toInteger=It,J.toLength=Cb,J.toLower=PN,J.toNumber=$r,J.toSafeInteger=PO,J.toString=nn,J.toUpper=FN,J.trim=WN,J.trimEnd=BN,J.trimStart=zN,J.truncate=jN,J.unescape=HN,J.uniqueId=g2,J.upperCase=UN,J.upperFirst=ip,J.each=lb,J.eachRight=cb,J.first=rb,sp(J,(function(){var r={};return oo(J,function(v,T){an.call(J.prototype,T)||(r[T]=v)}),r})(),{chain:!1}),J.VERSION=i,vi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){J[r].placeholder=J}),vi(["drop","take"],function(r,v){Bt.prototype[r]=function(T){T=T===n?1:li(It(T),0);var H=this.__filtered__&&!v?new Bt(this):this.clone();return H.__filtered__?H.__takeCount__=Mi(T,H.__takeCount__):H.__views__.push({size:Mi(T,te),type:r+(H.__dir__<0?"Right":"")}),H},Bt.prototype[r+"Right"]=function(T){return this.reverse()[r](T).reverse()}}),vi(["filter","map","takeWhile"],function(r,v){var T=v+1,H=T==A||T==D;Bt.prototype[r]=function(K){var ee=this.clone();return ee.__iteratees__.push({iteratee:gt(K,3),type:T}),ee.__filtered__=ee.__filtered__||H,ee}}),vi(["head","last"],function(r,v){var T="take"+(v?"Right":"");Bt.prototype[r]=function(){return this[T](1).value()[0]}}),vi(["initial","tail"],function(r,v){var T="drop"+(v?"":"Right");Bt.prototype[r]=function(){return this.__filtered__?new Bt(this):this[T](1)}}),Bt.prototype.compact=function(){return this.filter(Xi)},Bt.prototype.find=function(r){return this.filter(r).head()},Bt.prototype.findLast=function(r){return this.reverse().find(r)},Bt.prototype.invokeMap=Ot(function(r,v){return typeof r=="function"?new Bt(this):this.map(function(T){return dl(T,r,v)})}),Bt.prototype.reject=function(r){return this.filter(Xc(gt(r)))},Bt.prototype.slice=function(r,v){r=It(r);var T=this;return T.__filtered__&&(r>0||v<0)?new Bt(T):(r<0?T=T.takeRight(-r):r&&(T=T.drop(r)),v!==n&&(v=It(v),T=v<0?T.dropRight(-v):T.take(v-r)),T)},Bt.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},Bt.prototype.toArray=function(){return this.take(te)},oo(Bt.prototype,function(r,v){var T=/^(?:filter|find|map|reject)|While$/.test(v),H=/^(?:head|last)$/.test(v),K=J[H?"take"+(v=="last"?"Right":""):v],ee=H||/^find/.test(v);K&&(J.prototype[v]=function(){var le=this.__wrapped__,ge=H?[1]:arguments,we=le instanceof Bt,Le=ge[0],Re=we||_t(le),Pe=function(Dt){var jt=K.apply(J,$([Dt],ge));return H&&Ye?jt[0]:jt};Re&&T&&typeof Le=="function"&&Le.length!=1&&(we=Re=!1);var Ye=this.__chain__,it=!!this.__actions__.length,mt=ee&&!Ye,Lt=we&&!it;if(!ee&&Re){le=Lt?le:new Bt(this);var vt=r.apply(le,ge);return vt.__actions__.push({func:Gc,args:[Pe],thisArg:n}),new kr(vt,Ye)}return mt&&Lt?r.apply(this,ge):(vt=this.thru(Pe),mt?H?vt.value()[0]:vt.value():vt)})}),vi(["pop","push","shift","sort","splice","unshift"],function(r){var v=gi[r],T=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",H=/^(?:pop|shift)$/.test(r);J.prototype[r]=function(){var K=arguments;if(H&&!this.__chain__){var ee=this.value();return v.apply(_t(ee)?ee:[],K)}return this[T](function(le){return v.apply(_t(le)?le:[],K)})}}),oo(Bt.prototype,function(r,v){var T=J[v];if(T){var H=T.name+"";an.call(ma,H)||(ma[H]=[]),ma[H].push({name:v,func:T})}}),ma[Wc(n,w).name]=[{name:"wrapper",func:n}],Bt.prototype.clone=HI,Bt.prototype.reverse=UI,Bt.prototype.value=VI,J.prototype.at=bR,J.prototype.chain=xR,J.prototype.commit=CR,J.prototype.next=kR,J.prototype.plant=_R,J.prototype.reverse=AR,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=$R,J.prototype.first=J.prototype.head,ol&&(J.prototype[ol]=SR),J}),zt=ei();Qn?((Qn.exports=zt)._=zt,bn._=zt):ln._=zt}).call(JC)})(Fl,Fl.exports)),Fl.exports}var tk=Pn("O",ek());Pn("D",xl(tk)).debounce(function(){this.rebuildDisplayText()},300);var mf={exports:{}},vf;function nk(){return vf||(vf=1,(function(t,e){(function(){ace.require(["ace/mode/text"],function(n){t&&(t.exports=n)})})()})(mf)),mf.exports}nk();const ik=!0,ti="u-",rk="uplot",ok=ti+"hz",sk=ti+"vt",ak=ti+"title",lk=ti+"wrap",ck=ti+"under",uk=ti+"over",hk=ti+"axis",us=ti+"off",dk=ti+"select",pk=ti+"cursor-x",gk=ti+"cursor-y",fk=ti+"cursor-pt",mk=ti+"legend",vk=ti+"live",yk=ti+"inline",wk=ti+"series",bk=ti+"marker",yf=ti+"label",xk=ti+"value",Fa="width",Wa="height",Ba="top",wf="bottom",qs="left",Ou="right",Nu="#000",bf=Nu+"0",Du="mousemove",xf="mousedown",Pu="mouseup",Cf="mouseenter",kf="mouseleave",Sf="dblclick",Ck="resize",kk="scroll",_f="change",Wl="dppxchange",Fu="--",Ys=typeof window<"u",Wu=Ys?document:null,Xs=Ys?window:null,Sk=Ys?navigator:null;let Xt,Bl;function Bu(){let t=devicePixelRatio;Xt!=t&&(Xt=t,Bl&&Hu(_f,Bl,Bu),Bl=matchMedia(`(min-resolution: ${Xt-.001}dppx) and (max-resolution: ${Xt+.001}dppx)`),hs(_f,Bl,Bu),Xs.dispatchEvent(new CustomEvent(Wl)))}function Qi(t,e){if(e!=null){let n=t.classList;!n.contains(e)&&n.add(e)}}function zu(t,e){let n=t.classList;n.contains(e)&&n.remove(e)}function vn(t,e,n){t.style[e]=n+"px"}function Er(t,e,n,i){let h=Wu.createElement(t);return e!=null&&Qi(h,e),n!=null&&n.insertBefore(h,i),h}function pr(t,e){return Er("div",t,e)}const Af=new WeakMap;function Yr(t,e,n,i,h){let p="translate("+e+"px,"+n+"px)",m=Af.get(t);p!=m&&(t.style.transform=p,Af.set(t,p),e<0||n<0||e>i||n>h?Qi(t,us):zu(t,us))}const $f=new WeakMap;function Mf(t,e,n){let i=e+n,h=$f.get(t);i!=h&&($f.set(t,i),t.style.background=e,t.style.borderColor=n)}const Tf=new WeakMap;function If(t,e,n,i){let h=e+""+n,p=Tf.get(t);h!=p&&(Tf.set(t,h),t.style.height=n+"px",t.style.width=e+"px",t.style.marginLeft=i?-e/2+"px":0,t.style.marginTop=i?-n/2+"px":0)}const ju={passive:!0},_k={...ju,capture:!0};function hs(t,e,n,i){e.addEventListener(t,n,i?_k:ju)}function Hu(t,e,n,i){e.removeEventListener(t,n,ju)}Ys&&Bu();function Lr(t,e,n,i){let h;n=n||0,i=i||e.length-1;let p=i<=2147483647;for(;i-n>1;)h=p?n+i>>1:er((n+i)/2),e[h]<t?n=h:i=h;return t-e[n]<=e[i]-t?n:i}function Ef(t){return(e,n,i)=>{let h=-1,p=-1;for(let m=n;m<=i;m++)if(t(e[m])){h=m;break}for(let m=i;m>=n;m--)if(t(e[m])){p=m;break}return[h,p]}}const Lf=t=>t!=null,Rf=t=>t!=null&&t>0,zl=Ef(Lf),Ak=Ef(Rf);function $k(t,e,n,i=0,h=!1){let p=h?Ak:zl,m=h?Rf:Lf;[e,n]=p(t,e,n);let b=t[e],d=t[e];if(e>-1)if(i==1)b=t[e],d=t[n];else if(i==-1)b=t[n],d=t[e];else for(let g=e;g<=n;g++){let o=t[g];m(o)&&(o<b?b=o:o>d&&(d=o))}return[b??un,d??-un]}function jl(t,e,n,i){let h=Df(t),p=Df(e);t==e&&(h==-1?(t*=n,e/=n):(t/=n,e*=n));let m=n==10?lo:Pf,b=h==1?er:gr,d=p==1?gr:er,g=b(m(ni(t))),o=d(m(ni(e))),a=Zs(n,g),u=Zs(n,o);return n==10&&(g<0&&(a=hn(a,-g)),o<0&&(u=hn(u,-o))),i||n==2?(t=a*h,e=u*p):(t=Uf(t,a),e=Vl(e,u)),[t,e]}function Uu(t,e,n,i){let h=jl(t,e,n,i);return t==0&&(h[0]=0),e==0&&(h[1]=0),h}const Vu=.1,Of={mode:3,pad:Vu},za={pad:0,soft:null,mode:0},Mk={min:za,max:za};function Hl(t,e,n,i){return Gl(n)?Nf(t,e,n):(za.pad=n,za.soft=i?0:null,za.mode=i?3:0,Nf(t,e,Mk))}function Vt(t,e){return t??e}function Tk(t,e,n){for(e=Vt(e,0),n=Vt(n,t.length-1);e<=n;){if(t[e]!=null)return!0;e++}return!1}function Nf(t,e,n){let i=n.min,h=n.max,p=Vt(i.pad,0),m=Vt(h.pad,0),b=Vt(i.hard,-un),d=Vt(h.hard,un),g=Vt(i.soft,un),o=Vt(h.soft,-un),a=Vt(i.mode,0),u=Vt(h.mode,0),l=e-t,s=lo(l),c=Ii(ni(t),ni(e)),f=lo(c),w=ni(f-s);(l<1e-24||w>10)&&(l=0,(t==0||e==0)&&(l=1e-24,a==2&&g!=un&&(p=0),u==2&&o!=-un&&(m=0)));let x=l||c||1e3,E=lo(x),M=Zs(10,er(E)),k=x*(l==0?t==0?.1:1:p),C=hn(Uf(t-k,M/10),24),O=t>=g&&(a==1||a==3&&C<=g||a==2&&C>=g)?g:un,L=Ii(b,C<O&&t>=O?O:Rr(O,C)),R=x*(l==0?e==0?.1:1:m),I=hn(Vl(e+R,M/10),24),z=e<=o&&(u==1||u==3&&I>=o||u==2&&I<=o)?o:-un,F=Rr(d,I>z&&e<=z?z:Ii(z,I));return L==F&&L==0&&(F=100),[L,F]}const Ik=new Intl.NumberFormat(Ys?Sk.language:"en-US"),Gu=t=>Ik.format(t),Ji=Math,Ul=Ji.PI,ni=Ji.abs,er=Ji.floor,ii=Ji.round,gr=Ji.ceil,Rr=Ji.min,Ii=Ji.max,Zs=Ji.pow,Df=Ji.sign,lo=Ji.log10,Pf=Ji.log2,Ek=(t,e=1)=>Ji.sinh(t)*e,Ku=(t,e=1)=>Ji.asinh(t/e),un=1/0;function Ff(t){return(lo((t^t>>31)-(t>>31))|0)+1}function qu(t,e,n){return Rr(Ii(t,e),n)}function Wf(t){return typeof t=="function"}function Pt(t){return Wf(t)?t:()=>t}const Lk=()=>{},Bf=t=>t,zf=(t,e)=>e,Rk=t=>null,jf=t=>!0,Hf=(t,e)=>t==e,Ok=/\.\d*?(?=9{6,}|0{6,})/gm,ds=t=>{if(Gf(t)||No.has(t))return t;const e=`${t}`,n=e.match(Ok);if(n==null)return t;let i=n[0].length-1;if(e.indexOf("e-")!=-1){let[h,p]=e.split("e");return+`${ds(h)}e${p}`}return hn(t,i)};function ps(t,e){return ds(hn(ds(t/e))*e)}function Vl(t,e){return ds(gr(ds(t/e))*e)}function Uf(t,e){return ds(er(ds(t/e))*e)}function hn(t,e=0){if(Gf(t))return t;let n=10**e,i=t*n*(1+Number.EPSILON);return ii(i)/n}const No=new Map;function Vf(t){return((""+t).split(".")[1]||"").length}function ja(t,e,n,i){let h=[],p=i.map(Vf);for(let m=e;m<n;m++){let b=ni(m),d=hn(Zs(t,m),b);for(let g=0;g<i.length;g++){let o=t==10?+`${i[g]}e${m}`:i[g]*d,a=(m>=0?0:b)+(m>=p[g]?0:p[g]),u=t==10?o:hn(o,a);h.push(u),No.set(u,a)}}return h}const Ha={},Yu=[],Qs=[null,null],Do=Array.isArray,Gf=Number.isInteger,Nk=t=>t===void 0;function Kf(t){return typeof t=="string"}function Gl(t){let e=!1;if(t!=null){let n=t.constructor;e=n==null||n==Object}return e}function Dk(t){return t!=null&&typeof t=="object"}const Pk=Object.getPrototypeOf(Uint8Array),qf="__proto__";function Js(t,e=Gl){let n;if(Do(t)){let i=t.find(h=>h!=null);if(Do(i)||e(i)){n=Array(t.length);for(let h=0;h<t.length;h++)n[h]=Js(t[h],e)}else n=t.slice()}else if(t instanceof Pk)n=t.slice();else if(e(t)){n={};for(let i in t)i!=qf&&(n[i]=Js(t[i],e))}else n=t;return n}function qn(t){let e=arguments;for(let n=1;n<e.length;n++){let i=e[n];for(let h in i)h!=qf&&(Gl(t[h])?qn(t[h],Js(i[h])):t[h]=Js(i[h]))}return t}const Fk=0,Wk=1,Bk=2;function zk(t,e,n){for(let i=0,h,p=-1;i<e.length;i++){let m=e[i];if(m>p){for(h=m-1;h>=0&&t[h]==null;)t[h--]=null;for(h=m+1;h<n&&t[h]==null;)t[p=h++]=null}}}function jk(t,e){if(Vk(t)){let m=t[0].slice();for(let b=1;b<t.length;b++)m.push(...t[b].slice(1));return Gk(m[0])||(m=Uk(m)),m}let n=new Set;for(let m=0;m<t.length;m++){let b=t[m][0],d=b.length;for(let g=0;g<d;g++)n.add(b[g])}let i=[Array.from(n).sort((m,b)=>m-b)],h=i[0].length,p=new Map;for(let m=0;m<h;m++)p.set(i[0][m],m);for(let m=0;m<t.length;m++){let b=t[m],d=b[0];for(let g=1;g<b.length;g++){let o=b[g],a=Array(h).fill(void 0),u=e?e[m][g]:Wk,l=[];for(let s=0;s<o.length;s++){let c=o[s],f=p.get(d[s]);c===null?u!=Fk&&(a[f]=c,u==Bk&&l.push(f)):a[f]=c}zk(a,l,h),i.push(a)}}return i}const Hk=typeof queueMicrotask>"u"?t=>Promise.resolve().then(t):queueMicrotask;function Uk(t){let e=t[0],n=e.length,i=Array(n);for(let p=0;p<i.length;p++)i[p]=p;i.sort((p,m)=>e[p]-e[m]);let h=[];for(let p=0;p<t.length;p++){let m=t[p],b=Array(n);for(let d=0;d<n;d++)b[d]=m[i[d]];h.push(b)}return h}function Vk(t){let e=t[0][0],n=e.length;for(let i=1;i<t.length;i++){let h=t[i][0];if(h.length!=n)return!1;if(h!=e){for(let p=0;p<n;p++)if(h[p]!=e[p])return!1}}return!0}function Gk(t,e=100){const n=t.length;if(n<=1)return!0;let i=0,h=n-1;for(;i<=h&&t[i]==null;)i++;for(;h>=i&&t[h]==null;)h--;if(h<=i)return!0;const p=Ii(1,er((h-i+1)/e));for(let m=t[i],b=i+p;b<=h;b+=p){const d=t[b];if(d!=null){if(d<=m)return!1;m=d}}return!0}const Yf=["January","February","March","April","May","June","July","August","September","October","November","December"],Xf=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Zf(t){return t.slice(0,3)}const Kk=Xf.map(Zf),qk=Yf.map(Zf),Yk={MMMM:Yf,MMM:qk,WWWW:Xf,WWW:Kk};function Ua(t){return(t<10?"0":"")+t}function Xk(t){return(t<10?"00":t<100?"0":"")+t}const Zk={YYYY:t=>t.getFullYear(),YY:t=>(t.getFullYear()+"").slice(2),MMMM:(t,e)=>e.MMMM[t.getMonth()],MMM:(t,e)=>e.MMM[t.getMonth()],MM:t=>Ua(t.getMonth()+1),M:t=>t.getMonth()+1,DD:t=>Ua(t.getDate()),D:t=>t.getDate(),WWWW:(t,e)=>e.WWWW[t.getDay()],WWW:(t,e)=>e.WWW[t.getDay()],HH:t=>Ua(t.getHours()),H:t=>t.getHours(),h:t=>{let e=t.getHours();return e==0?12:e>12?e-12:e},AA:t=>t.getHours()>=12?"PM":"AM",aa:t=>t.getHours()>=12?"pm":"am",a:t=>t.getHours()>=12?"p":"a",mm:t=>Ua(t.getMinutes()),m:t=>t.getMinutes(),ss:t=>Ua(t.getSeconds()),s:t=>t.getSeconds(),fff:t=>Xk(t.getMilliseconds())};function Xu(t,e){e=e||Yk;let n=[],i=/\{([a-z]+)\}|[^{]+/gi,h;for(;h=i.exec(t);)n.push(h[0][0]=="{"?Zk[h[1]]:h[0]);return p=>{let m="";for(let b=0;b<n.length;b++)m+=typeof n[b]=="string"?n[b]:n[b](p,e);return m}}const Qk=new Intl.DateTimeFormat().resolvedOptions().timeZone;function Jk(t,e){let n;return e=="UTC"||e=="Etc/UTC"?n=new Date(+t+t.getTimezoneOffset()*6e4):e==Qk?n=t:(n=new Date(t.toLocaleString("en-US",{timeZone:e})),n.setMilliseconds(t.getMilliseconds())),n}const Qf=t=>t%1==0,Kl=[1,2,2.5,5],eS=ja(10,-32,0,Kl),Jf=ja(10,0,32,Kl),tS=Jf.filter(Qf),gs=eS.concat(Jf),Zu=`
1491
+ `,em="{YYYY}",tm=Zu+em,nm="{M}/{D}",Va=Zu+nm,ql=Va+"/{YY}",im="{aa}",nS="{h}:{mm}",ea=nS+im,rm=Zu+ea,om=":{ss}",en=null;function sm(t){let e=t*1e3,n=e*60,i=n*60,h=i*24,p=h*30,m=h*365,b=(t==1?ja(10,0,3,Kl).filter(Qf):ja(10,-3,0,Kl)).concat([e,e*5,e*10,e*15,e*30,n,n*5,n*10,n*15,n*30,i,i*2,i*3,i*4,i*6,i*8,i*12,h,h*2,h*3,h*4,h*5,h*6,h*7,h*8,h*9,h*10,h*15,p,p*2,p*3,p*4,p*6,m,m*2,m*5,m*10,m*25,m*50,m*100]);const d=[[m,em,en,en,en,en,en,en,1],[h*28,"{MMM}",tm,en,en,en,en,en,1],[h,nm,tm,en,en,en,en,en,1],[i,"{h}"+im,ql,en,Va,en,en,en,1],[n,ea,ql,en,Va,en,en,en,1],[e,om,ql+" "+ea,en,Va+" "+ea,en,rm,en,1],[t,om+".{fff}",ql+" "+ea,en,Va+" "+ea,en,rm,en,1]];function g(o){return(a,u,l,s,c,f)=>{let w=[],x=c>=m,E=c>=p&&c<m,M=o(l),k=hn(M*t,3),C=Qu(M.getFullYear(),x?0:M.getMonth(),E||x?1:M.getDate()),O=hn(C*t,3);if(E||x){let L=E?c/p:0,R=x?c/m:0,I=k==O?k:hn(Qu(C.getFullYear()+R,C.getMonth()+L,1)*t,3),z=new Date(ii(I/t)),F=z.getFullYear(),N=z.getMonth();for(let A=0;I<=s;A++){let S=Qu(F+R*A,N+L*A,1),D=S-o(hn(S*t,3));I=hn((+S+D)*t,3),I<=s&&w.push(I)}}else{let L=c>=h?h:c,R=er(l)-er(k),I=O+R+Vl(k-O,L);w.push(I);let z=o(I),F=z.getHours()+z.getMinutes()/n+z.getSeconds()/i,N=c/i,A=a.axes[u]._space,S=f/A;for(;I=hn(I+c,t==1?0:3),!(I>s);)if(N>1){let D=er(hn(F+N,6))%24,j=o(I).getHours()-D;j>1&&(j=-1),I-=j*i,F=(F+N)%24;let U=w[w.length-1];hn((I-U)/c,3)*S>=.7&&w.push(I)}else w.push(I)}return w}}return[b,d,g]}const[iS,rS,oS]=sm(1),[sS,aS,lS]=sm(.001);ja(2,-53,53,[1]);function am(t,e){return t.map(n=>n.map((i,h)=>h==0||h==8||i==null?i:e(h==1||n[8]==0?i:n[1]+i)))}function lm(t,e){return(n,i,h,p,m)=>{let b=e.find(s=>m>=s[0])||e[e.length-1],d,g,o,a,u,l;return i.map(s=>{let c=t(s),f=c.getFullYear(),w=c.getMonth(),x=c.getDate(),E=c.getHours(),M=c.getMinutes(),k=c.getSeconds(),C=f!=d&&b[2]||w!=g&&b[3]||x!=o&&b[4]||E!=a&&b[5]||M!=u&&b[6]||k!=l&&b[7]||b[1];return d=f,g=w,o=x,a=E,u=M,l=k,C(c)})}}function cS(t,e){let n=Xu(e);return(i,h,p,m,b)=>h.map(d=>n(t(d)))}function Qu(t,e,n){return new Date(t,e,n)}function cm(t,e){return e(t)}const uS="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function um(t,e){return(n,i,h,p)=>p==null?Fu:e(t(i))}function hS(t,e){let n=t.series[e];return n.width?n.stroke(t,e):n.points.width?n.points.stroke(t,e):null}function dS(t,e){return t.series[e].fill(t,e)}const pS={show:!0,live:!0,isolate:!1,mount:Lk,markers:{show:!0,width:2,stroke:hS,fill:dS,dash:"solid"},idx:null,idxs:null,values:[]};function gS(t,e){let n=t.cursor.points,i=pr(),h=n.size(t,e);vn(i,Fa,h),vn(i,Wa,h);let p=h/-2;vn(i,"marginLeft",p),vn(i,"marginTop",p);let m=n.width(t,e,h);return m&&vn(i,"borderWidth",m),i}function fS(t,e){let n=t.series[e].points;return n._fill||n._stroke}function mS(t,e){let n=t.series[e].points;return n._stroke||n._fill}function vS(t,e){return t.series[e].points.size}const Ju=[0,0];function yS(t,e,n){return Ju[0]=e,Ju[1]=n,Ju}function Yl(t,e,n,i=!0){return h=>{h.button==0&&(!i||h.target==e)&&n(h)}}function eh(t,e,n,i=!0){return h=>{(!i||h.target==e)&&n(h)}}const wS={show:!0,x:!0,y:!0,lock:!1,move:yS,points:{one:!1,show:gS,size:vS,width:0,stroke:mS,fill:fS},bind:{mousedown:Yl,mouseup:Yl,click:Yl,dblclick:Yl,mousemove:eh,mouseleave:eh,mouseenter:eh},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(t,e)=>{e.stopPropagation(),e.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(t,e,n,i,h)=>i-h,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},hm={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},th=qn({},hm,{filter:zf}),dm=qn({},th,{size:10}),pm=qn({},hm,{show:!1}),nh='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"',gm="bold "+nh,fm=1.5,mm={show:!0,scale:"x",stroke:Nu,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:gm,side:2,grid:th,ticks:dm,border:pm,font:nh,lineGap:fm,rotate:0},bS="Value",xS="Time",vm={show:!0,scale:"x",auto:!1,sorted:1,min:un,max:-un,idxs:[]};function CS(t,e,n,i,h){return e.map(p=>p==null?"":Gu(p))}function kS(t,e,n,i,h,p,m){let b=[],d=No.get(h)||0;n=m?n:hn(Vl(n,h),d);for(let g=n;g<=i;g=hn(g+h,d))b.push(Object.is(g,-0)?0:g);return b}function ih(t,e,n,i,h,p,m){const b=[],d=t.scales[t.axes[e].scale].log,g=d==10?lo:Pf,o=er(g(n));h=Zs(d,o),d==10&&(h=gs[Lr(h,gs)]);let a=n,u=h*d;d==10&&(u=gs[Lr(u,gs)]);do b.push(a),a=a+h,d==10&&!No.has(a)&&(a=hn(a,No.get(h))),a>=u&&(h=a,u=h*d,d==10&&(u=gs[Lr(u,gs)]));while(a<=i);return b}function SS(t,e,n,i,h,p,m){let b=t.scales[t.axes[e].scale].asinh,d=i>b?ih(t,e,Ii(b,n),i,h):[b],g=i>=0&&n<=0?[0]:[];return(n<-b?ih(t,e,Ii(b,-i),-n,h):[b]).reverse().map(o=>-o).concat(g,d)}const ym=/./,_S=/[12357]/,AS=/[125]/,wm=/1/,rh=(t,e,n,i)=>t.map((h,p)=>e==4&&h==0||p%i==0&&n.test(h.toExponential()[h<0?1:0])?h:null);function $S(t,e,n,i,h){let p=t.axes[n],m=p.scale,b=t.scales[m],d=t.valToPos,g=p._space,o=d(10,m),a=d(9,m)-o>=g?ym:d(7,m)-o>=g?_S:d(5,m)-o>=g?AS:wm;if(a==wm){let u=ni(d(1,m)-o);if(u<g)return rh(e.slice().reverse(),b.distr,a,gr(g/u)).reverse()}return rh(e,b.distr,a,1)}function MS(t,e,n,i,h){let p=t.axes[n],m=p.scale,b=p._space,d=t.valToPos,g=ni(d(1,m)-d(2,m));return g<b?rh(e.slice().reverse(),3,ym,gr(b/g)).reverse():e}function TS(t,e,n,i){return i==null?Fu:e==null?"":Gu(e)}const bm={show:!0,scale:"y",stroke:Nu,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:gm,side:3,grid:th,ticks:dm,border:pm,font:nh,lineGap:fm,rotate:0};function IS(t,e){let n=3+(t||1)*2;return hn(n*e,3)}function ES(t,e){let{scale:n,idxs:i}=t.series[0],h=t._data[0],p=t.valToPos(h[i[0]],n,!0),m=t.valToPos(h[i[1]],n,!0),b=ni(m-p),d=t.series[e],g=b/(d.points.space*Xt);return i[1]-i[0]<=g}const xm={scale:null,auto:!0,sorted:0,min:un,max:-un},Cm=(t,e,n,i,h)=>h,km={show:!0,auto:!0,sorted:0,gaps:Cm,alpha:1,facets:[qn({},xm,{scale:"x"}),qn({},xm,{scale:"y"})]},Sm={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:Cm,alpha:1,points:{show:ES,filter:null},values:null,min:un,max:-un,idxs:[],path:null,clip:null};function LS(t,e,n,i,h){return n/10}const _m={time:ik,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},RS=qn({},_m,{time:!1,ori:1}),Am={};function $m(t,e){let n=Am[t];return n||(n={key:t,plots:[],sub(i){n.plots.push(i)},unsub(i){n.plots=n.plots.filter(h=>h!=i)},pub(i,h,p,m,b,d,g){for(let o=0;o<n.plots.length;o++)n.plots[o]!=h&&n.plots[o].pub(i,h,p,m,b,d,g)}},t!=null&&(Am[t]=n)),n}const ta=1,oh=2;function fs(t,e,n){const i=t.mode,h=t.series[e],p=i==2?t._data[e]:t._data,m=t.scales,b=t.bbox;let d=p[0],g=i==2?p[1]:p[e],o=i==2?m[h.facets[0].scale]:m[t.series[0].scale],a=i==2?m[h.facets[1].scale]:m[h.scale],u=b.left,l=b.top,s=b.width,c=b.height,f=t.valToPosH,w=t.valToPosV;return o.ori==0?n(h,d,g,o,a,f,w,u,l,s,c,Zl,na,Jl,Im,Lm):n(h,d,g,o,a,w,f,l,u,c,s,Ql,ia,lh,Em,Rm)}function sh(t,e){let n=0,i=0,h=Vt(t.bands,Yu);for(let p=0;p<h.length;p++){let m=h[p];m.series[0]==e?n=m.dir:m.series[1]==e&&(m.dir==1?i|=1:i|=2)}return[n,i==1?-1:i==2?1:i==3?2:0]}function OS(t,e,n,i,h){let p=t.mode,m=t.series[e],b=p==2?m.facets[1].scale:m.scale,d=t.scales[b];return h==-1?d.min:h==1?d.max:d.distr==3?d.dir==1?d.min:d.max:0}function co(t,e,n,i,h,p){return fs(t,e,(m,b,d,g,o,a,u,l,s,c,f)=>{let w=m.pxRound;const x=g.dir*(g.ori==0?1:-1),E=g.ori==0?na:ia;let M,k;x==1?(M=n,k=i):(M=i,k=n);let C=w(a(b[M],g,c,l)),O=w(u(d[M],o,f,s)),L=w(a(b[k],g,c,l)),R=w(u(p==1?o.max:o.min,o,f,s)),I=new Path2D(h);return E(I,L,R),E(I,C,R),E(I,C,O),I})}function Xl(t,e,n,i,h,p){let m=null;if(t.length>0){m=new Path2D;const b=e==0?Jl:lh;let d=n;for(let a=0;a<t.length;a++){let u=t[a];if(u[1]>u[0]){let l=u[0]-d;l>0&&b(m,d,i,l,i+p),d=u[1]}}let g=n+h-d,o=10;g>0&&b(m,d,i-o/2,g,i+p+o)}return m}function NS(t,e,n){let i=t[t.length-1];i&&i[0]==e?i[1]=n:t.push([e,n])}function ah(t,e,n,i,h,p,m){let b=[],d=t.length;for(let g=h==1?n:i;g>=n&&g<=i;g+=h)if(e[g]===null){let o=g,a=g;if(h==1)for(;++g<=i&&e[g]===null;)a=g;else for(;--g>=n&&e[g]===null;)a=g;let u=p(t[o]),l=a==o?u:p(t[a]),s=o-h;u=m<=0&&s>=0&&s<d?p(t[s]):u;let c=a+h;l=m>=0&&c>=0&&c<d?p(t[c]):l,l>=u&&b.push([u,l])}return b}function Mm(t){return t==0?Bf:t==1?ii:e=>ps(e,t)}function Tm(t){let e=t==0?Zl:Ql,n=t==0?(h,p,m,b,d,g)=>{h.arcTo(p,m,b,d,g)}:(h,p,m,b,d,g)=>{h.arcTo(m,p,d,b,g)},i=t==0?(h,p,m,b,d)=>{h.rect(p,m,b,d)}:(h,p,m,b,d)=>{h.rect(m,p,d,b)};return(h,p,m,b,d,g=0,o=0)=>{g==0&&o==0?i(h,p,m,b,d):(g=Rr(g,b/2,d/2),o=Rr(o,b/2,d/2),e(h,p+g,m),n(h,p+b,m,p+b,m+d,g),n(h,p+b,m+d,p,m+d,o),n(h,p,m+d,p,m,o),n(h,p,m,p+b,m,g),h.closePath())}}const Zl=(t,e,n)=>{t.moveTo(e,n)},Ql=(t,e,n)=>{t.moveTo(n,e)},na=(t,e,n)=>{t.lineTo(e,n)},ia=(t,e,n)=>{t.lineTo(n,e)},Jl=Tm(0),lh=Tm(1),Im=(t,e,n,i,h,p)=>{t.arc(e,n,i,h,p)},Em=(t,e,n,i,h,p)=>{t.arc(n,e,i,h,p)},Lm=(t,e,n,i,h,p,m)=>{t.bezierCurveTo(e,n,i,h,p,m)},Rm=(t,e,n,i,h,p,m)=>{t.bezierCurveTo(n,e,h,i,m,p)};function Om(t){return(e,n,i,h,p)=>fs(e,n,(m,b,d,g,o,a,u,l,s,c,f)=>{let{pxRound:w,points:x}=m,E,M;g.ori==0?(E=Zl,M=Im):(E=Ql,M=Em);const k=hn(x.width*Xt,3);let C=(x.size-x.width)/2*Xt,O=hn(C*2,3),L=new Path2D,R=new Path2D,{left:I,top:z,width:F,height:N}=e.bbox;Jl(R,I-O,z-O,F+O*2,N+O*2);const A=S=>{if(d[S]!=null){let D=w(a(b[S],g,c,l)),j=w(u(d[S],o,f,s));E(L,D+C,j),M(L,D,j,C,0,Ul*2)}};if(p)p.forEach(A);else for(let S=i;S<=h;S++)A(S);return{stroke:k>0?L:null,fill:L,clip:R,flags:ta|oh}})}function Nm(t){return(e,n,i,h,p,m)=>{i!=h&&(p!=i&&m!=i&&t(e,n,i),p!=h&&m!=h&&t(e,n,h),t(e,n,m))}}const DS=Nm(na),PS=Nm(ia);function Dm(t){const e=Vt(t==null?void 0:t.alignGaps,0);return(n,i,h,p)=>fs(n,i,(m,b,d,g,o,a,u,l,s,c,f)=>{[h,p]=zl(d,h,p);let w=m.pxRound,x=F=>w(a(F,g,c,l)),E=F=>w(u(F,o,f,s)),M,k;g.ori==0?(M=na,k=DS):(M=ia,k=PS);const C=g.dir*(g.ori==0?1:-1),O={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ta},L=O.stroke;let R=!1;if(p-h>=c*4){let F=de=>n.posToVal(de,g.key,!0),N=null,A=null,S,D,j,U=x(b[C==1?h:p]),q=x(b[h]),Q=x(b[p]),te=F(C==1?q+1:Q-1);for(let de=C==1?h:p;de>=h&&de<=p;de+=C){let ne=b[de],ce=(C==1?ne<te:ne>te)?U:x(ne),he=d[de];ce==U?he!=null?(D=he,N==null?(M(L,ce,E(D)),S=N=A=D):D<N?N=D:D>A&&(A=D)):he===null&&(R=!0):(N!=null&&k(L,U,E(N),E(A),E(S),E(D)),he!=null?(D=he,M(L,ce,E(D)),N=A=S=D):(N=A=null,he===null&&(R=!0)),U=ce,te=F(U+C))}N!=null&&N!=A&&j!=U&&k(L,U,E(N),E(A),E(S),E(D))}else for(let F=C==1?h:p;F>=h&&F<=p;F+=C){let N=d[F];N===null?R=!0:N!=null&&M(L,x(b[F]),E(N))}let[I,z]=sh(n,i);if(m.fill!=null||I!=0){let F=O.fill=new Path2D(L),N=m.fillTo(n,i,m.min,m.max,I),A=E(N),S=x(b[h]),D=x(b[p]);C==-1&&([D,S]=[S,D]),M(F,D,A),M(F,S,A)}if(!m.spanGaps){let F=[];R&&F.push(...ah(b,d,h,p,C,x,e)),O.gaps=F=m.gaps(n,i,h,p,F),O.clip=Xl(F,g.ori,l,s,c,f)}return z!=0&&(O.band=z==2?[co(n,i,h,p,L,-1),co(n,i,h,p,L,1)]:co(n,i,h,p,L,z)),O})}function FS(t){const e=Vt(t.align,1),n=Vt(t.ascDesc,!1),i=Vt(t.alignGaps,0),h=Vt(t.extend,!1);return(p,m,b,d)=>fs(p,m,(g,o,a,u,l,s,c,f,w,x,E)=>{[b,d]=zl(a,b,d);let M=g.pxRound,{left:k,width:C}=p.bbox,O=Q=>M(s(Q,u,x,f)),L=Q=>M(c(Q,l,E,w)),R=u.ori==0?na:ia;const I={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:ta},z=I.stroke,F=u.dir*(u.ori==0?1:-1);let N=L(a[F==1?b:d]),A=O(o[F==1?b:d]),S=A,D=A;h&&e==-1&&(D=k,R(z,D,N)),R(z,A,N);for(let Q=F==1?b:d;Q>=b&&Q<=d;Q+=F){let te=a[Q];if(te==null)continue;let de=O(o[Q]),ne=L(te);e==1?R(z,de,N):R(z,S,ne),R(z,de,ne),N=ne,S=de}let j=S;h&&e==1&&(j=k+C,R(z,j,N));let[U,q]=sh(p,m);if(g.fill!=null||U!=0){let Q=I.fill=new Path2D(z),te=g.fillTo(p,m,g.min,g.max,U),de=L(te);R(Q,j,de),R(Q,D,de)}if(!g.spanGaps){let Q=[];Q.push(...ah(o,a,b,d,F,O,i));let te=g.width*Xt/2,de=n||e==1?te:-te,ne=n||e==-1?-te:te;Q.forEach(ce=>{ce[0]+=de,ce[1]+=ne}),I.gaps=Q=g.gaps(p,m,b,d,Q),I.clip=Xl(Q,u.ori,f,w,x,E)}return q!=0&&(I.band=q==2?[co(p,m,b,d,z,-1),co(p,m,b,d,z,1)]:co(p,m,b,d,z,q)),I})}function Pm(t,e,n,i,h,p,m=un){if(t.length>1){let b=null;for(let d=0,g=1/0;d<t.length;d++)if(e[d]!==void 0){if(b!=null){let o=ni(t[d]-t[b]);o<g&&(g=o,m=ni(n(t[d],i,h,p)-n(t[b],i,h,p)))}b=d}}return m}function WS(t){t=t||Ha;const e=Vt(t.size,[.6,un,1]),n=t.align||0,i=t.gap||0;let h=t.radius;h=h==null?[0,0]:typeof h=="number"?[h,0]:h;const p=Pt(h),m=1-e[0],b=Vt(e[1],un),d=Vt(e[2],1),g=Vt(t.disp,Ha),o=Vt(t.each,l=>{}),{fill:a,stroke:u}=g;return(l,s,c,f)=>fs(l,s,(w,x,E,M,k,C,O,L,R,I,z)=>{let F=w.pxRound,N=n,A=i*Xt,S=b*Xt,D=d*Xt,j,U;M.ori==0?[j,U]=p(l,s):[U,j]=p(l,s);const q=M.dir*(M.ori==0?1:-1);let Q=M.ori==0?Jl:lh,te=M.ori==0?o:(qe,Gt,wn,Zn,Ri,Ci,An)=>{o(qe,Gt,wn,Ri,Zn,An,Ci)},de=Vt(l.bands,Yu).find(qe=>qe.series[0]==s),ne=de!=null?de.dir:0,ce=w.fillTo(l,s,w.min,w.max,ne),he=F(O(ce,k,z,R)),ue,ve,Me,Te=I,Ee=F(w.width*Xt),Je=!1,Xe=null,ft=null,rt=null,yt=null;a!=null&&(Ee==0||u!=null)&&(Je=!0,Xe=a.values(l,s,c,f),ft=new Map,new Set(Xe).forEach(qe=>{qe!=null&&ft.set(qe,new Path2D)}),Ee>0&&(rt=u.values(l,s,c,f),yt=new Map,new Set(rt).forEach(qe=>{qe!=null&&yt.set(qe,new Path2D)})));let{x0:on,size:zn}=g;if(on!=null&&zn!=null){N=1,x=on.values(l,s,c,f),on.unit==2&&(x=x.map(Gt=>l.posToVal(L+Gt*I,M.key,!0)));let qe=zn.values(l,s,c,f);zn.unit==2?ve=qe[0]*I:ve=C(qe[0],M,I,L)-C(0,M,I,L),Te=Pm(x,E,C,M,I,L,Te),Me=Te-ve+A}else Te=Pm(x,E,C,M,I,L,Te),Me=Te*m+A,ve=Te-Me;Me<1&&(Me=0),Ee>=ve/2&&(Ee=0),Me<5&&(F=Bf);let tn=Me>0,tr=Te-Me-(tn?Ee:0);ve=F(qu(tr,D,S)),ue=(N==0?ve/2:N==q?0:ve)-N*q*((N==0?A/2:0)+(tn?Ee/2:0));const _n={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Xn=Je?null:new Path2D;let ci=null;if(de!=null)ci=l.data[de.series[1]];else{let{y0:qe,y1:Gt}=g;qe!=null&&Gt!=null&&(E=Gt.values(l,s,c,f),ci=qe.values(l,s,c,f))}let Li=j*ve,Ct=U*ve;for(let qe=q==1?c:f;qe>=c&&qe<=f;qe+=q){let Gt=E[qe];if(Gt==null)continue;if(ci!=null){let sn=ci[qe]??0;if(Gt-sn==0)continue;he=O(sn,k,z,R)}let wn=M.distr!=2||g!=null?x[qe]:qe,Zn=C(wn,M,I,L),Ri=O(Vt(Gt,ce),k,z,R),Ci=F(Zn-ue),An=F(Ii(Ri,he)),ri=F(Rr(Ri,he)),ui=An-ri;if(Gt!=null){let sn=Gt<0?Ct:Li,oi=Gt<0?Li:Ct;Je?(Ee>0&&rt[qe]!=null&&Q(yt.get(rt[qe]),Ci,ri+er(Ee/2),ve,Ii(0,ui-Ee),sn,oi),Xe[qe]!=null&&Q(ft.get(Xe[qe]),Ci,ri+er(Ee/2),ve,Ii(0,ui-Ee),sn,oi)):Q(Xn,Ci,ri+er(Ee/2),ve,Ii(0,ui-Ee),sn,oi),te(l,s,qe,Ci-Ee/2,ri,ve+Ee,ui)}}return Ee>0?_n.stroke=Je?yt:Xn:Je||(_n._fill=w.width==0?w._fill:w._stroke??w._fill,_n.width=0),_n.fill=Je?ft:Xn,_n})}function BS(t,e){const n=Vt(e==null?void 0:e.alignGaps,0);return(i,h,p,m)=>fs(i,h,(b,d,g,o,a,u,l,s,c,f,w)=>{[p,m]=zl(g,p,m);let x=b.pxRound,E=j=>x(u(j,o,f,s)),M=j=>x(l(j,a,w,c)),k,C,O;o.ori==0?(k=Zl,O=na,C=Lm):(k=Ql,O=ia,C=Rm);const L=o.dir*(o.ori==0?1:-1);let R=E(d[L==1?p:m]),I=R,z=[],F=[];for(let j=L==1?p:m;j>=p&&j<=m;j+=L)if(g[j]!=null){let U=d[j],q=E(U);z.push(I=q),F.push(M(g[j]))}const N={stroke:t(z,F,k,O,C,x),fill:null,clip:null,band:null,gaps:null,flags:ta},A=N.stroke;let[S,D]=sh(i,h);if(b.fill!=null||S!=0){let j=N.fill=new Path2D(A),U=b.fillTo(i,h,b.min,b.max,S),q=M(U);O(j,I,q),O(j,R,q)}if(!b.spanGaps){let j=[];j.push(...ah(d,g,p,m,L,E,n)),N.gaps=j=b.gaps(i,h,p,m,j),N.clip=Xl(j,o.ori,s,c,f,w)}return D!=0&&(N.band=D==2?[co(i,h,p,m,A,-1),co(i,h,p,m,A,1)]:co(i,h,p,m,A,D)),N})}function zS(t){return BS(jS,t)}function jS(t,e,n,i,h,p){const m=t.length;if(m<2)return null;const b=new Path2D;if(n(b,t[0],e[0]),m==2)i(b,t[1],e[1]);else{let d=Array(m),g=Array(m-1),o=Array(m-1),a=Array(m-1);for(let u=0;u<m-1;u++)o[u]=e[u+1]-e[u],a[u]=t[u+1]-t[u],g[u]=o[u]/a[u];d[0]=g[0];for(let u=1;u<m-1;u++)g[u]===0||g[u-1]===0||g[u-1]>0!=g[u]>0?d[u]=0:(d[u]=3*(a[u-1]+a[u])/((2*a[u]+a[u-1])/g[u-1]+(a[u]+2*a[u-1])/g[u]),isFinite(d[u])||(d[u]=0));d[m-1]=g[m-2];for(let u=0;u<m-1;u++)h(b,t[u]+a[u]/3,e[u]+d[u]*a[u]/3,t[u+1]-a[u]/3,e[u+1]-d[u+1]*a[u]/3,t[u+1],e[u+1])}return b}const ch=new Set;function Fm(){for(let t of ch)t.syncRect(!0)}Ys&&(hs(Ck,Xs,Fm),hs(kk,Xs,Fm,!0),hs(Wl,Xs,()=>{yn.pxRatio=Xt}));const HS=Dm(),US=Om();function Wm(t,e,n,i){return(i?[t[0],t[1]].concat(t.slice(2)):[t[0]].concat(t.slice(1))).map((h,p)=>uh(h,p,e,n))}function VS(t,e){return t.map((n,i)=>i==0?{}:qn({},e,n))}function uh(t,e,n,i){return qn({},e==0?n:i,t)}function Bm(t,e,n){return e==null?Qs:[e,n]}const GS=Bm;function KS(t,e,n){return e==null?Qs:Hl(e,n,Vu,!0)}function zm(t,e,n,i){return e==null?Qs:jl(e,n,t.scales[i].log,!1)}const qS=zm;function jm(t,e,n,i){return e==null?Qs:Uu(e,n,t.scales[i].log,!1)}const YS=jm;function XS(t,e,n,i,h){let p=Ii(Ff(t),Ff(e)),m=e-t,b=Lr(h/i*m,n);do{let d=n[b],g=i*d/m;if(g>=h&&p+(d<5?No.get(d):0)<=17)return[d,g]}while(++b<n.length);return[0,0]}function Hm(t){let e,n;return t=t.replace(/(\d+)px/,(i,h)=>(e=ii((n=+h)*Xt))+"px"),[t,e,n]}function ZS(t){t.show&&[t.font,t.labelFont].forEach(e=>{let n=hn(e[2]*Xt,1);e[0]=e[0].replace(/[0-9.]+px/,n+"px"),e[1]=n})}function yn(t,e,n){const i={mode:Vt(t.mode,1)},h=i.mode;function p(V,X,re,oe){let me=X.valToPct(V);return oe+re*(X.dir==-1?1-me:me)}function m(V,X,re,oe){let me=X.valToPct(V);return oe+re*(X.dir==-1?me:1-me)}function b(V,X,re,oe){return X.ori==0?p(V,X,re,oe):m(V,X,re,oe)}i.valToPosH=p,i.valToPosV=m;let d=!1;i.status=0;const g=i.root=pr(rk);if(t.id!=null&&(g.id=t.id),Qi(g,t.class),t.title){let V=pr(ak,g);V.textContent=t.title}const o=Er("canvas"),a=i.ctx=o.getContext("2d"),u=pr(lk,g);hs("click",u,V=>{V.target===s&&(Jt!=yr||Wt!=ro)&&Ln.click(i,V)},!0);const l=i.under=pr(ck,u);u.appendChild(o);const s=i.over=pr(uk,u);t=Js(t);const c=+Vt(t.pxAlign,1),f=Mm(c);(t.plugins||[]).forEach(V=>{V.opts&&(t=V.opts(i,t)||t)});const w=t.ms||.001,x=i.series=h==1?Wm(t.series||[],vm,Sm,!1):VS(t.series||[null],km),E=i.axes=Wm(t.axes||[],mm,bm,!0),M=i.scales={},k=i.bands=t.bands||[];k.forEach(V=>{V.fill=Pt(V.fill||null),V.dir=Vt(V.dir,-1)});const C=h==2?x[1].facets[0].scale:x[0].scale,O={axes:vo,series:ua},L=(t.drawOrder||["axes","series"]).map(V=>O[V]);function R(V){const X=V.distr==3?re=>lo(re>0?re:V.clamp(i,re,V.min,V.max,V.key)):V.distr==4?re=>Ku(re,V.asinh):V.distr==100?re=>V.fwd(re):re=>re;return re=>{let oe=X(re),{_min:me,_max:Ce}=V,Ie=Ce-me;return(oe-me)/Ie}}function I(V){let X=M[V];if(X==null){let re=(t.scales||Ha)[V]||Ha;if(re.from!=null){I(re.from);let oe=qn({},M[re.from],re,{key:V});oe.valToPct=R(oe),M[V]=oe}else{X=M[V]=qn({},V==C?_m:RS,re),X.key=V;let oe=X.time,me=X.range,Ce=Do(me);if((V!=C||h==2&&!oe)&&(Ce&&(me[0]==null||me[1]==null)&&(me={min:me[0]==null?Of:{mode:1,hard:me[0],soft:me[0]},max:me[1]==null?Of:{mode:1,hard:me[1],soft:me[1]}},Ce=!1),!Ce&&Gl(me))){let Ie=me;me=(We,je,Ke)=>je==null?Qs:Hl(je,Ke,Ie)}X.range=Pt(me||(oe?GS:V==C?X.distr==3?qS:X.distr==4?YS:Bm:X.distr==3?zm:X.distr==4?jm:KS)),X.auto=Pt(Ce?!1:X.auto),X.clamp=Pt(X.clamp||LS),X._min=X._max=null,X.valToPct=R(X)}}}I("x"),I("y"),h==1&&x.forEach(V=>{I(V.scale)}),E.forEach(V=>{I(V.scale)});for(let V in t.scales)I(V);const z=M[C],F=z.distr;let N,A;z.ori==0?(Qi(g,ok),N=p,A=m):(Qi(g,sk),N=m,A=p);const S={};for(let V in M){let X=M[V];(X.min!=null||X.max!=null)&&(S[V]={min:X.min,max:X.max},X.min=X.max=null)}const D=t.tzDate||(V=>new Date(ii(V/w))),j=t.fmtDate||Xu,U=w==1?oS(D):lS(D),q=lm(D,am(w==1?rS:aS,j)),Q=um(D,cm(uS,j)),te=[],de=i.legend=qn({},pS,t.legend),ne=i.cursor=qn({},wS,{drag:{y:h==2}},t.cursor),ce=de.show,he=ne.show,ue=de.markers;de.idxs=te,ue.width=Pt(ue.width),ue.dash=Pt(ue.dash),ue.stroke=Pt(ue.stroke),ue.fill=Pt(ue.fill);let ve,Me,Te,Ee=[],Je=[],Xe,ft=!1,rt={};if(de.live){const V=x[1]?x[1].values:null;ft=V!=null,Xe=ft?V(i,1,0):{_:0};for(let X in Xe)rt[X]=Fu}if(ce)if(ve=Er("table",mk,g),Te=Er("tbody",null,ve),de.mount(i,ve),ft){Me=Er("thead",null,ve,Te);let V=Er("tr",null,Me);Er("th",null,V);for(var yt in Xe)Er("th",yf,V).textContent=yt}else Qi(ve,yk),de.live&&Qi(ve,vk);const on={show:!0},zn={show:!1};function tn(V,X){if(X==0&&(ft||!de.live||h==2))return Qs;let re=[],oe=Er("tr",wk,Te,Te.childNodes[X]);Qi(oe,V.class),V.show||Qi(oe,us);let me=Er("th",null,oe);if(ue.show){let We=pr(bk,me);if(X>0){let je=ue.width(i,X);je&&(We.style.border=je+"px "+ue.dash(i,X)+" "+ue.stroke(i,X)),We.style.background=ue.fill(i,X)}}let Ce=pr(yf,me);V.label instanceof HTMLElement?Ce.appendChild(V.label):Ce.textContent=V.label,X>0&&(ue.show||(Ce.style.color=V.width>0?ue.stroke(i,X):ue.fill(i,X)),_n("click",me,We=>{if(ne._lock)return;Fr(We);let je=x.indexOf(V);if((We.ctrlKey||We.metaKey)!=de.isolate){let Ke=x.some((Ze,et)=>et>0&&et!=je&&Ze.show);x.forEach((Ze,et)=>{et>0&&Ni(et,Ke?et==je?on:zn:on,!0,ct.setSeries)})}else Ni(je,{show:!V.show},!0,ct.setSeries)},!1),Wr&&_n(Cf,me,We=>{ne._lock||(Fr(We),Ni(x.indexOf(V),xr,!0,ct.setSeries))},!1));for(var Ie in Xe){let We=Er("td",xk,oe);We.textContent="--",re.push(We)}return[oe,re]}const tr=new Map;function _n(V,X,re,oe=!0){const me=tr.get(X)||{},Ce=ne.bind[V](i,X,re,oe);Ce&&(hs(V,X,me[V]=Ce),tr.set(X,me))}function Xn(V,X,re){const oe=tr.get(X)||{};for(let me in oe)(V==null||me==V)&&(Hu(me,X,oe[me]),delete oe[me]);V==null&&tr.delete(X)}let ci=0,Li=0,Ct=0,qe=0,Gt=0,wn=0,Zn=Gt,Ri=wn,Ci=Ct,An=qe,ri=0,ui=0,sn=0,oi=0;i.bbox={};let uo=!1,Nr=!1,Dr=!1,Pr=!1,ho=!1,mi=!1;function po(V,X,re){(re||V!=i.width||X!=i.height)&&Po(V,X),Hr(!1),Dr=!0,Nr=!0,io()}function Po(V,X){i.width=ci=Ct=V,i.height=Li=qe=X,Gt=wn=0,ws(),aa();let re=i.bbox;ri=re.left=ps(Gt*Xt,.5),ui=re.top=ps(wn*Xt,.5),sn=re.width=ps(Ct*Xt,.5),oi=re.height=ps(qe*Xt,.5)}const el=3;function nr(){let V=!1,X=0;for(;!V;){X++;let re=ha(X),oe=rl(X);V=X==el||re&&oe,V||(Po(i.width,i.height),Nr=!0)}}function tl({width:V,height:X}){po(V,X)}i.setSize=tl;function ws(){let V=!1,X=!1,re=!1,oe=!1;E.forEach((me,Ce)=>{if(me.show&&me._show){let{side:Ie,_size:We}=me,je=Ie%2,Ke=me.label!=null?me.labelSize:0,Ze=We+Ke;Ze>0&&(je?(Ct-=Ze,Ie==3?(Gt+=Ze,oe=!0):re=!0):(qe-=Ze,Ie==0?(wn+=Ze,V=!0):X=!0))}}),zr[0]=V,zr[1]=re,zr[2]=X,zr[3]=oe,Ct-=_i[1]+_i[3],Gt+=_i[3],qe-=_i[2]+_i[0],wn+=_i[0]}function aa(){let V=Gt+Ct,X=wn+qe,re=Gt,oe=wn;function me(Ce,Ie){switch(Ce){case 1:return V+=Ie,V-Ie;case 2:return X+=Ie,X-Ie;case 3:return re-=Ie,re+Ie;case 0:return oe-=Ie,oe+Ie}}E.forEach((Ce,Ie)=>{if(Ce.show&&Ce._show){let We=Ce.side;Ce._pos=me(We,Ce._size),Ce.label!=null&&(Ce._lpos=me(We,Ce.labelSize))}})}if(ne.dataIdx==null){let V=ne.hover,X=V.skip=new Set(V.skip??[]);X.add(void 0);let re=V.prox=Pt(V.prox),oe=V.bias??(V.bias=0);ne.dataIdx=(me,Ce,Ie,We)=>{if(Ce==0)return Ie;let je=Ie,Ke=re(me,Ce,Ie,We)??un,Ze=Ke>=0&&Ke<un,et=z.ori==0?Ct:qe,bt=ne.left,Nt=e[0],St=e[Ce];if(X.has(St[Ie])){je=null;let Rt=null,pt=null,ot;if(oe==0||oe==-1)for(ot=Ie;Rt==null&&ot-- >0;)X.has(St[ot])||(Rt=ot);if(oe==0||oe==1)for(ot=Ie;pt==null&&ot++<St.length;)X.has(St[ot])||(pt=ot);if(Rt!=null||pt!=null)if(Ze){let dn=Rt==null?-1/0:N(Nt[Rt],z,et,0),kn=pt==null?1/0:N(Nt[pt],z,et,0),ei=bt-dn,zt=kn-bt;ei<=zt?ei<=Ke&&(je=Rt):zt<=Ke&&(je=pt)}else je=pt==null?Rt:Rt==null?pt:Ie-Rt<=pt-Ie?Rt:pt}else Ze&&ni(bt-N(Nt[Ie],z,et,0))>Ke&&(je=null);return je}}const Fr=V=>{ne.event=V};ne.idxs=te,ne._lock=!1;let jn=ne.points;jn.show=Pt(jn.show),jn.size=Pt(jn.size),jn.stroke=Pt(jn.stroke),jn.width=Pt(jn.width),jn.fill=Pt(jn.fill);const ki=i.focus=qn({},t.focus||{alpha:.3},ne.focus),Wr=ki.prox>=0,$n=Wr&&jn.one;let Si=[],Jr=[],Br=[];function bs(V,X){let re=jn.show(i,X);if(re instanceof HTMLElement)return Qi(re,fk),Qi(re,V.class),Yr(re,-10,-10,Ct,qe),s.insertBefore(re,Si[X]),re}function la(V,X){if(h==1||X>0){let re=h==1&&M[V.scale].time,oe=V.value;V.value=re?Kf(oe)?um(D,cm(oe,j)):oe||Q:oe||TS,V.label=V.label||(re?xS:bS)}if($n||X>0){V.width=V.width==null?1:V.width,V.paths=V.paths||HS||Rk,V.fillTo=Pt(V.fillTo||OS),V.pxAlign=+Vt(V.pxAlign,c),V.pxRound=Mm(V.pxAlign),V.stroke=Pt(V.stroke||null),V.fill=Pt(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let re=IS(Ii(1,V.width),1),oe=V.points=qn({},{size:re,width:Ii(1,re*.2),stroke:V.stroke,space:re*2,paths:US,_stroke:null,_fill:null},V.points);oe.show=Pt(oe.show),oe.filter=Pt(oe.filter),oe.fill=Pt(oe.fill),oe.stroke=Pt(oe.stroke),oe.paths=Pt(oe.paths),oe.pxAlign=V.pxAlign}if(ce){let re=tn(V,X);Ee.splice(X,0,re[0]),Je.splice(X,0,re[1]),de.values.push(null)}if(he){te.splice(X,0,null);let re=null;$n?X==0&&(re=bs(V,X)):X>0&&(re=bs(V,X)),Si.splice(X,0,re),Jr.splice(X,0,0),Br.splice(X,0,0)}nt("addSeries",X)}function nl(V,X){X=X??x.length,V=h==1?uh(V,X,vm,Sm):uh(V,X,{},km),x.splice(X,0,V),la(x[X],X)}i.addSeries=nl;function il(V){if(x.splice(V,1),ce){de.values.splice(V,1),Je.splice(V,1);let X=Ee.splice(V,1)[0];Xn(null,X.firstChild),X.remove()}he&&(te.splice(V,1),Si.splice(V,1)[0].remove(),Jr.splice(V,1),Br.splice(V,1)),nt("delSeries",V)}i.delSeries=il;const zr=[!1,!1,!1,!1];function ir(V,X){if(V._show=V.show,V.show){let re=V.side%2,oe=M[V.scale];oe==null&&(V.scale=re?x[1].scale:C,oe=M[V.scale]);let me=oe.time;V.size=Pt(V.size),V.space=Pt(V.space),V.rotate=Pt(V.rotate),Do(V.incrs)&&V.incrs.forEach(Ie=>{!No.has(Ie)&&No.set(Ie,Vf(Ie))}),V.incrs=Pt(V.incrs||(oe.distr==2?tS:me?w==1?iS:sS:gs)),V.splits=Pt(V.splits||(me&&oe.distr==1?U:oe.distr==3?ih:oe.distr==4?SS:kS)),V.stroke=Pt(V.stroke),V.grid.stroke=Pt(V.grid.stroke),V.ticks.stroke=Pt(V.ticks.stroke),V.border.stroke=Pt(V.border.stroke);let Ce=V.values;V.values=Do(Ce)&&!Do(Ce[0])?Pt(Ce):me?Do(Ce)?lm(D,am(Ce,j)):Kf(Ce)?cS(D,Ce):Ce||q:Ce||CS,V.filter=Pt(V.filter||(oe.distr>=3&&oe.log==10?$S:oe.distr==3&&oe.log==2?MS:zf)),V.font=Hm(V.font),V.labelFont=Hm(V.labelFont),V._size=V.size(i,null,X,0),V._space=V._rotate=V._incrs=V._found=V._splits=V._values=null,V._size>0&&(zr[X]=!0,V._el=pr(hk,u))}}function Ft(V,X,re,oe){let[me,Ce,Ie,We]=re,je=X%2,Ke=0;return je==0&&(We||Ce)&&(Ke=X==0&&!me||X==2&&!Ie?ii(mm.size/3):0),je==1&&(me||Ie)&&(Ke=X==1&&!Ce||X==3&&!We?ii(bm.size/2):0),Ke}const ca=i.padding=(t.padding||[Ft,Ft,Ft,Ft]).map(V=>Pt(Vt(V,Ft))),_i=i._padding=ca.map((V,X)=>V(i,X,zr,0));let Hn,gn=null,En=null;const fr=h==1?x[0].idxs:null;let Ai=null,mr=!1;function Fo(V,X){if(e=V??[],i.data=i._data=e,h==2){Hn=0;for(let re=1;re<x.length;re++)Hn+=e[re][0].length}else{e.length==0&&(i.data=i._data=e=[[]]),Ai=e[0],Hn=Ai.length;let re=e;if(F==2){re=e.slice();let oe=re[0]=Array(Hn);for(let me=0;me<Hn;me++)oe[me]=me}i._data=e=re}if(Hr(!0),nt("setData"),F==2&&(Dr=!0),X!==!1){let re=z;re.auto(i,mr)?xs():Qn(C,re.min,re.max),Pr=Pr||ne.left>=0,mi=!0,io()}}i.setData=Fo;function xs(){mr=!0;let V,X;h==1&&(Hn>0?(gn=fr[0]=0,En=fr[1]=Hn-1,V=e[0][gn],X=e[0][En],F==2?(V=gn,X=En):V==X&&(F==3?[V,X]=jl(V,V,z.log,!1):F==4?[V,X]=Uu(V,V,z.log,!1):z.time?X=V+ii(86400/w):[V,X]=Hl(V,X,Vu,!0))):(gn=fr[0]=V=null,En=fr[1]=X=null)),Qn(C,V,X)}let eo,Ui,go,Wo,Vi,Bo,Cs,ks,zo,si;function Ss(V,X,re,oe,me,Ce){V??(V=bf),re??(re=Yu),oe??(oe="butt"),me??(me=bf),Ce??(Ce="round"),V!=eo&&(a.strokeStyle=eo=V),me!=Ui&&(a.fillStyle=Ui=me),X!=go&&(a.lineWidth=go=X),Ce!=Vi&&(a.lineJoin=Vi=Ce),oe!=Bo&&(a.lineCap=Bo=oe),re!=Wo&&a.setLineDash(Wo=re)}function fo(V,X,re,oe){X!=Ui&&(a.fillStyle=Ui=X),V!=Cs&&(a.font=Cs=V),re!=ks&&(a.textAlign=ks=re),oe!=zo&&(a.textBaseline=zo=oe)}function jo(V,X,re,oe,me=0){if(oe.length>0&&V.auto(i,mr)&&(X==null||X.min==null)){let Ce=Vt(gn,0),Ie=Vt(En,oe.length-1),We=re.min==null?$k(oe,Ce,Ie,me,V.distr==3):[re.min,re.max];V.min=Rr(V.min,re.min=We[0]),V.max=Ii(V.max,re.max=We[1])}}const Ho={min:null,max:null};function to(){for(let oe in M){let me=M[oe];S[oe]==null&&(me.min==null||S[C]!=null&&me.auto(i,mr))&&(S[oe]=Ho)}for(let oe in M){let me=M[oe];S[oe]==null&&me.from!=null&&S[me.from]!=null&&(S[oe]=Ho)}S[C]!=null&&Hr(!0);let V={};for(let oe in S){let me=S[oe];if(me!=null){let Ce=V[oe]=Js(M[oe],Dk);if(me.min!=null)qn(Ce,me);else if(oe!=C||h==2)if(Hn==0&&Ce.from==null){let Ie=Ce.range(i,null,null,oe);Ce.min=Ie[0],Ce.max=Ie[1]}else Ce.min=un,Ce.max=-un}}if(Hn>0){x.forEach((oe,me)=>{if(h==1){let Ce=oe.scale,Ie=S[Ce];if(Ie==null)return;let We=V[Ce];if(me==0){let je=We.range(i,We.min,We.max,Ce);We.min=je[0],We.max=je[1],gn=Lr(We.min,e[0]),En=Lr(We.max,e[0]),En-gn>1&&(e[0][gn]<We.min&&gn++,e[0][En]>We.max&&En--),oe.min=Ai[gn],oe.max=Ai[En]}else oe.show&&oe.auto&&jo(We,Ie,oe,e[me],oe.sorted);oe.idxs[0]=gn,oe.idxs[1]=En}else if(me>0&&oe.show&&oe.auto){let[Ce,Ie]=oe.facets,We=Ce.scale,je=Ie.scale,[Ke,Ze]=e[me],et=V[We],bt=V[je];et!=null&&jo(et,S[We],Ce,Ke,Ce.sorted),bt!=null&&jo(bt,S[je],Ie,Ze,Ie.sorted),oe.min=Ie.min,oe.max=Ie.max}});for(let oe in V){let me=V[oe],Ce=S[oe];if(me.from==null&&(Ce==null||Ce.min==null)){let Ie=me.range(i,me.min==un?null:me.min,me.max==-un?null:me.max,oe);me.min=Ie[0],me.max=Ie[1]}}}for(let oe in V){let me=V[oe];if(me.from!=null){let Ce=V[me.from];if(Ce.min==null)me.min=me.max=null;else{let Ie=me.range(i,Ce.min,Ce.max,oe);me.min=Ie[0],me.max=Ie[1]}}}let X={},re=!1;for(let oe in V){let me=V[oe],Ce=M[oe];if(Ce.min!=me.min||Ce.max!=me.max){Ce.min=me.min,Ce.max=me.max;let Ie=Ce.distr;Ce._min=Ie==3?lo(Ce.min):Ie==4?Ku(Ce.min,Ce.asinh):Ie==100?Ce.fwd(Ce.min):Ce.min,Ce._max=Ie==3?lo(Ce.max):Ie==4?Ku(Ce.max,Ce.asinh):Ie==100?Ce.fwd(Ce.max):Ce.max,X[oe]=re=!0}}if(re){x.forEach((oe,me)=>{h==2?me>0&&X.y&&(oe._paths=null):X[oe.scale]&&(oe._paths=null)});for(let oe in X)Dr=!0,nt("setScale",oe);he&&ne.left>=0&&(Pr=mi=!0)}for(let oe in S)S[oe]=null}function _s(V){let X=qu(gn-1,0,Hn-1),re=qu(En+1,0,Hn-1);for(;V[X]==null&&X>0;)X--;for(;V[re]==null&&re<Hn-1;)re++;return[X,re]}function ua(){if(Hn>0){let V=x.some(X=>X._focus)&&si!=ki.alpha;V&&(a.globalAlpha=si=ki.alpha),x.forEach((X,re)=>{if(re>0&&X.show&&(Uo(re,!1),Uo(re,!0),X._paths==null)){let oe=si;si!=X.alpha&&(a.globalAlpha=si=X.alpha);let me=h==2?[0,e[re][0].length-1]:_s(e[re]);X._paths=X.paths(i,re,me[0],me[1]),si!=oe&&(a.globalAlpha=si=oe)}}),x.forEach((X,re)=>{if(re>0&&X.show){let oe=si;si!=X.alpha&&(a.globalAlpha=si=X.alpha),X._paths!=null&&Vo(re,!1);{let me=X._paths!=null?X._paths.gaps:null,Ce=X.points.show(i,re,gn,En,me),Ie=X.points.filter(i,re,Ce,me);(Ce||Ie)&&(X.points._paths=X.points.paths(i,re,gn,En,Ie),Vo(re,!0))}si!=oe&&(a.globalAlpha=si=oe),nt("drawSeries",re)}}),V&&(a.globalAlpha=si=1)}}function Uo(V,X){let re=X?x[V].points:x[V];re._stroke=re.stroke(i,V),re._fill=re.fill(i,V)}function Vo(V,X){let re=X?x[V].points:x[V],{stroke:oe,fill:me,clip:Ce,flags:Ie,_stroke:We=re._stroke,_fill:je=re._fill,_width:Ke=re.width}=re._paths;Ke=hn(Ke*Xt,3);let Ze=null,et=Ke%2/2;X&&je==null&&(je=Ke>0?"#fff":We);let bt=re.pxAlign==1&&et>0;if(bt&&a.translate(et,et),!X){let Nt=ri-Ke/2,St=ui-Ke/2,Rt=sn+Ke,pt=oi+Ke;Ze=new Path2D,Ze.rect(Nt,St,Rt,pt)}X?mo(We,Ke,re.dash,re.cap,je,oe,me,Ie,Ce):As(V,We,Ke,re.dash,re.cap,je,oe,me,Ie,Ze,Ce),bt&&a.translate(-et,-et)}function As(V,X,re,oe,me,Ce,Ie,We,je,Ke,Ze){let et=!1;je!=0&&k.forEach((bt,Nt)=>{if(bt.series[0]==V){let St=x[bt.series[1]],Rt=e[bt.series[1]],pt=(St._paths||Ha).band;Do(pt)&&(pt=bt.dir==1?pt[0]:pt[1]);let ot,dn=null;St.show&&pt&&Tk(Rt,gn,En)?(dn=bt.fill(i,Nt)||Ce,ot=St._paths.clip):pt=null,mo(X,re,oe,me,dn,Ie,We,je,Ke,Ze,ot,pt),et=!0}}),et||mo(X,re,oe,me,Ce,Ie,We,je,Ke,Ze)}const Go=ta|oh;function mo(V,X,re,oe,me,Ce,Ie,We,je,Ke,Ze,et){Ss(V,X,re,oe,me),(je||Ke||et)&&(a.save(),je&&a.clip(je),Ke&&a.clip(Ke)),et?(We&Go)==Go?(a.clip(et),Ze&&a.clip(Ze),ai(me,Ie),vr(V,Ce,X)):We&oh?(ai(me,Ie),a.clip(et),vr(V,Ce,X)):We&ta&&(a.save(),a.clip(et),Ze&&a.clip(Ze),ai(me,Ie),a.restore(),vr(V,Ce,X)):(ai(me,Ie),vr(V,Ce,X)),(je||Ke||et)&&a.restore()}function vr(V,X,re){re>0&&(X instanceof Map?X.forEach((oe,me)=>{a.strokeStyle=eo=me,a.stroke(oe)}):X!=null&&V&&a.stroke(X))}function ai(V,X){X instanceof Map?X.forEach((re,oe)=>{a.fillStyle=Ui=oe,a.fill(re)}):X!=null&&V&&a.fill(X)}function no(V,X,re,oe){let me=E[V],Ce;if(oe<=0)Ce=[0,0];else{let Ie=me._space=me.space(i,V,X,re,oe),We=me._incrs=me.incrs(i,V,X,re,oe,Ie);Ce=XS(X,re,We,oe,Ie)}return me._found=Ce}function jr(V,X,re,oe,me,Ce,Ie,We,je,Ke){let Ze=Ie%2/2;c==1&&a.translate(Ze,Ze),Ss(We,Ie,je,Ke,We),a.beginPath();let et,bt,Nt,St,Rt=me+(oe==0||oe==3?-Ce:Ce);re==0?(bt=me,St=Rt):(et=me,Nt=Rt);for(let pt=0;pt<V.length;pt++)X[pt]!=null&&(re==0?et=Nt=V[pt]:bt=St=V[pt],a.moveTo(et,bt),a.lineTo(Nt,St));a.stroke(),c==1&&a.translate(-Ze,-Ze)}function ha(V){let X=!0;return E.forEach((re,oe)=>{if(!re.show)return;let me=M[re.scale];if(me.min==null){re._show&&(X=!1,re._show=!1,Hr(!1));return}else re._show||(X=!1,re._show=!0,Hr(!1));let Ce=re.side,Ie=Ce%2,{min:We,max:je}=me,[Ke,Ze]=no(oe,We,je,Ie==0?Ct:qe);if(Ze==0)return;let et=me.distr==2,bt=re._splits=re.splits(i,oe,We,je,Ke,Ze,et),Nt=me.distr==2?bt.map(ot=>Ai[ot]):bt,St=me.distr==2?Ai[bt[1]]-Ai[bt[0]]:Ke,Rt=re._values=re.values(i,re.filter(i,Nt,oe,Ze,St),oe,Ze,St);re._rotate=Ce==2?re.rotate(i,Rt,oe,Ze):0;let pt=re._size;re._size=gr(re.size(i,Rt,oe,V)),pt!=null&&re._size!=pt&&(X=!1)}),X}function rl(V){let X=!0;return ca.forEach((re,oe)=>{let me=re(i,oe,zr,V);me!=_i[oe]&&(X=!1),_i[oe]=me}),X}function vo(){for(let V=0;V<E.length;V++){let X=E[V];if(!X.show||!X._show)continue;let re=X.side,oe=re%2,me,Ce,Ie=X.stroke(i,V),We=re==0||re==3?-1:1,[je,Ke]=X._found;if(X.label!=null){let cn=X.labelGap*We,gi=ii((X._lpos+cn)*Xt);fo(X.labelFont[0],Ie,"center",re==2?Ba:wf),a.save(),oe==1?(me=Ce=0,a.translate(gi,ii(ui+oi/2)),a.rotate((re==3?-Ul:Ul)/2)):(me=ii(ri+sn/2),Ce=gi);let Co=Wf(X.label)?X.label(i,V,je,Ke):X.label;a.fillText(Co,me,Ce),a.restore()}if(Ke==0)continue;let Ze=M[X.scale],et=oe==0?sn:oi,bt=oe==0?ri:ui,Nt=X._splits,St=Ze.distr==2?Nt.map(cn=>Ai[cn]):Nt,Rt=Ze.distr==2?Ai[Nt[1]]-Ai[Nt[0]]:je,pt=X.ticks,ot=X.border,dn=pt.show?pt.size:0,kn=ii(dn*Xt),ei=ii((X.alignTo==2?X._size-dn-X.gap:X.gap)*Xt),zt=X._rotate*-Ul/180,fe=f(X._pos*Xt),$e=(kn+ei)*We,ke=fe+$e;Ce=oe==0?ke:0,me=oe==1?ke:0;let Ve=X.font[0],ut=X.align==1?qs:X.align==2?Ou:zt>0?qs:zt<0?Ou:oe==0?"center":re==3?Ou:qs,Tt=zt||oe==1?"middle":re==2?Ba:wf;fo(Ve,Ie,ut,Tt);let Ut=X.font[1]*X.lineGap,Et=Nt.map(cn=>f(b(cn,Ze,et,bt))),Di=X._values;for(let cn=0;cn<Di.length;cn++){let gi=Di[cn];if(gi!=null){oe==0?me=Et[cn]:Ce=Et[cn],gi=""+gi;let Co=gi.indexOf(`
1492
+ `)==-1?[gi]:gi.split(/\n/gm);for(let Nn=0;Nn<Co.length;Nn++){let Ms=Co[Nn];zt?(a.save(),a.translate(me,Ce+Nn*Ut),a.rotate(zt),a.fillText(Ms,0,0),a.restore()):a.fillText(Ms,me,Ce+Nn*Ut)}}}pt.show&&jr(Et,pt.filter(i,St,V,Ke,Rt),oe,re,fe,kn,hn(pt.width*Xt,3),pt.stroke(i,V),pt.dash,pt.cap);let Cr=X.grid;Cr.show&&jr(Et,Cr.filter(i,St,V,Ke,Rt),oe,oe==0?2:1,oe==0?ui:ri,oe==0?oi:sn,hn(Cr.width*Xt,3),Cr.stroke(i,V),Cr.dash,Cr.cap),ot.show&&jr([fe],[1],oe==0?1:0,oe==0?1:2,oe==1?ui:ri,oe==1?oi:sn,hn(ot.width*Xt,3),ot.stroke(i,V),ot.dash,ot.cap)}nt("drawAxes")}function Hr(V){x.forEach((X,re)=>{re>0&&(X._paths=null,V&&(h==1?(X.min=null,X.max=null):X.facets.forEach(oe=>{oe.min=null,oe.max=null})))})}let yo=!1,Ko=!1,wo=[];function da(){Ko=!1;for(let V=0;V<wo.length;V++)nt(...wo[V]);wo.length=0}function io(){yo||(Hk(pa),yo=!0)}function ze(V,X=!1){yo=!0,Ko=X,V(i),pa(),X&&wo.length>0&&queueMicrotask(da)}i.batch=ze;function pa(){if(uo&&(to(),uo=!1),Dr&&(nr(),Dr=!1),Nr){if(vn(l,qs,Gt),vn(l,Ba,wn),vn(l,Fa,Ct),vn(l,Wa,qe),vn(s,qs,Gt),vn(s,Ba,wn),vn(s,Fa,Ct),vn(s,Wa,qe),vn(u,Fa,ci),vn(u,Wa,Li),o.width=ii(ci*Xt),o.height=ii(Li*Xt),E.forEach(({_el:V,_show:X,_size:re,_pos:oe,side:me})=>{if(V!=null)if(X){let Ce=me===3||me===0?re:0,Ie=me%2==1;vn(V,Ie?"left":"top",oe-Ce),vn(V,Ie?"width":"height",re),vn(V,Ie?"top":"left",Ie?wn:Gt),vn(V,Ie?"height":"width",Ie?qe:Ct),zu(V,us)}else Qi(V,us)}),eo=Ui=go=Vi=Bo=Cs=ks=zo=Wo=null,si=1,W(!0),Gt!=Zn||wn!=Ri||Ct!=Ci||qe!=An){Hr(!1);let V=Ct/Ci,X=qe/An;if(he&&!Pr&&ne.left>=0){ne.left*=V,ne.top*=X,rr&&Yr(rr,ii(ne.left),0,Ct,qe),Un&&Yr(Un,0,ii(ne.top),Ct,qe);for(let re=0;re<Si.length;re++){let oe=Si[re];oe!=null&&(Jr[re]*=V,Br[re]*=X,Yr(oe,gr(Jr[re]),gr(Br[re]),Ct,qe))}}if(wt.show&&!ho&&wt.left>=0&&wt.width>0){wt.left*=V,wt.width*=V,wt.top*=X,wt.height*=X;for(let re in Y)vn(Oi,re,wt[re])}Zn=Gt,Ri=wn,Ci=Ct,An=qe}nt("setSize"),Nr=!1}ci>0&&Li>0&&(a.clearRect(0,0,o.width,o.height),nt("drawClear"),L.forEach(V=>V()),nt("draw")),wt.show&&ho&&(ln(wt),ho=!1),he&&Pr&&(_(null,!0,!1),Pr=!1),de.show&&de.live&&mi&&(y(),mi=!1),d||(d=!0,i.status=1,nt("ready")),mr=!1,yo=!1}i.redraw=(V,X)=>{Dr=X||!1,V!==!1?Qn(C,z.min,z.max):io()};function De(V,X){let re=M[V];if(re.from==null){if(Hn==0){let oe=re.range(i,X.min,X.max,V);X.min=oe[0],X.max=oe[1]}if(X.min>X.max){let oe=X.min;X.min=X.max,X.max=oe}if(Hn>1&&X.min!=null&&X.max!=null&&X.max-X.min<1e-16)return;V==C&&re.distr==2&&Hn>0&&(X.min=Lr(X.min,e[0]),X.max=Lr(X.max,e[0]),X.min==X.max&&X.max++),S[V]=X,uo=!0,io()}}i.setScale=De;let Mn,bo,rr,Un,ga,xo,yr,ro,Qt,Kt,Jt,Wt,wr=!1;const Ln=ne.drag;let He=Ln.x,fn=Ln.y;he&&(ne.x&&(Mn=pr(pk,s)),ne.y&&(bo=pr(gk,s)),z.ori==0?(rr=Mn,Un=bo):(rr=bo,Un=Mn),Jt=ne.left,Wt=ne.top);const wt=i.select=qn({show:!0,over:!0,left:0,width:0,top:0,height:0},t.select),Oi=wt.show?pr(dk,wt.over?s:l):null;function ln(V,X){if(wt.show){for(let re in V)wt[re]=V[re],re in Y&&vn(Oi,re,V[re]);X!==!1&&nt("setSelect")}}i.setSelect=ln;function bn(V){if(x[V].show)ce&&zu(Ee[V],us);else if(ce&&Qi(Ee[V],us),he){let X=$n?Si[0]:Si[V];X!=null&&Yr(X,-10,-10,Ct,qe)}}function Qn(V,X,re){De(V,{min:X,max:re})}function Ni(V,X,re,oe){X.focus!=null&&hi(V),X.show!=null&&x.forEach((me,Ce)=>{Ce>0&&(V==Ce||V==null)&&(me.show=X.show,bn(Ce),h==2?(Qn(me.facets[0].scale,null,null),Qn(me.facets[1].scale,null,null)):Qn(me.scale,null,null),io())}),re!==!1&&nt("setSeries",V,X),oe&&Mt("setSeries",i,V,X)}i.setSeries=Ni;function br(V,X){qn(k[V],X)}function Rn(V,X){V.fill=Pt(V.fill||null),V.dir=Vt(V.dir,-1),X=X??k.length,k.splice(X,0,V)}function Gi(V){V==null?k.length=0:k.splice(V,1)}i.addBand=Rn,i.setBand=br,i.delBand=Gi;function qo(V,X){x[V].alpha=X,he&&Si[V]!=null&&(Si[V].style.opacity=X),ce&&Ee[V]&&(Ee[V].style.opacity=X)}let On,or,sr;const xr={focus:!0};function hi(V){if(V!=sr){let X=V==null,re=ki.alpha!=1;x.forEach((oe,me)=>{if(h==1||me>0){let Ce=X||me==0||me==V;oe._focus=X?null:Ce,re&&qo(me,Ce?1:ki.alpha)}}),sr=V,re&&io()}}ce&&Wr&&_n(kf,ve,V=>{ne._lock||(Fr(V),sr!=null&&Ni(null,xr,!0,ct.setSeries))});function di(V,X,re){let oe=M[X];re&&(V=V/Xt-(oe.ori==1?wn:Gt));let me=Ct;oe.ori==1&&(me=qe,V=me-V),oe.dir==-1&&(V=me-V);let Ce=oe._min,Ie=oe._max,We=V/me,je=Ce+(Ie-Ce)*We,Ke=oe.distr;return Ke==3?Zs(10,je):Ke==4?Ek(je,oe.asinh):Ke==100?oe.bwd(je):je}function vi(V,X){let re=di(V,C,X);return Lr(re,e[0],gn,En)}i.valToIdx=V=>Lr(V,e[0]),i.posToIdx=vi,i.posToVal=di,i.valToPos=(V,X,re)=>M[X].ori==0?p(V,M[X],re?sn:Ct,re?ri:0):m(V,M[X],re?oi:qe,re?ui:0),i.setCursor=(V,X,re)=>{Jt=V.left,Wt=V.top,_(null,X,re)};function $s(V,X){vn(Oi,qs,wt.left=V),vn(Oi,Fa,wt.width=X)}function yi(V,X){vn(Oi,Ba,wt.top=V),vn(Oi,Wa,wt.height=X)}let $i=z.ori==0?$s:yi,ar=z.ori==1?$s:yi;function lr(){if(ce&&de.live)for(let V=h==2?1:0;V<x.length;V++){if(V==0&&ft)continue;let X=de.values[V],re=0;for(let oe in X)Je[V][re++].firstChild.nodeValue=X[oe]}}function y(V,X){if(V!=null&&(V.idxs?V.idxs.forEach((re,oe)=>{te[oe]=re}):Nk(V.idx)||te.fill(V.idx),de.idx=te[0]),ce&&de.live){for(let re=0;re<x.length;re++)(re>0||h==1&&!ft)&&$(re,te[re]);lr()}mi=!1,X!==!1&&nt("setLegend")}i.setLegend=y;function $(V,X){let re=x[V],oe=V==0&&F==2?Ai:e[V],me;ft?me=re.values(i,V,X)??rt:(me=re.value(i,X==null?null:oe[X],V,X),me=me==null?rt:{_:me}),de.values[V]=me}function _(V,X,re){Qt=Jt,Kt=Wt,[Jt,Wt]=ne.move(i,Jt,Wt),ne.left=Jt,ne.top=Wt,he&&(rr&&Yr(rr,ii(Jt),0,Ct,qe),Un&&Yr(Un,0,ii(Wt),Ct,qe));let oe,me=gn>En;On=un,or=null;let Ce=z.ori==0?Ct:qe,Ie=z.ori==1?Ct:qe;if(Jt<0||Hn==0||me){oe=ne.idx=null;for(let We=0;We<x.length;We++){let je=Si[We];je!=null&&Yr(je,-10,-10,Ct,qe)}Wr&&Ni(null,xr,!0,V==null&&ct.setSeries),de.live&&(te.fill(oe),mi=!0)}else{let We,je,Ke;h==1&&(We=z.ori==0?Jt:Wt,je=di(We,C),oe=ne.idx=Lr(je,e[0],gn,En),Ke=N(e[0][oe],z,Ce,0));let Ze=-10,et=-10,bt=0,Nt=0,St=!0,Rt="",pt="";for(let ot=h==2?1:0;ot<x.length;ot++){let dn=x[ot],kn=te[ot],ei=kn==null?null:h==1?e[ot][kn]:e[ot][1][kn],zt=ne.dataIdx(i,ot,oe,je),fe=zt==null?null:h==1?e[ot][zt]:e[ot][1][zt];if(mi=mi||fe!=ei||zt!=kn,te[ot]=zt,ot>0&&dn.show){let $e=zt==null?-10:zt==oe?Ke:N(h==1?e[0][zt]:e[ot][0][zt],z,Ce,0),ke=fe==null?-10:A(fe,h==1?M[dn.scale]:M[dn.facets[1].scale],Ie,0);if(Wr&&fe!=null){let Ve=z.ori==1?Jt:Wt,ut=ni(ki.dist(i,ot,zt,ke,Ve));if(ut<On){let Tt=ki.bias;if(Tt!=0){let Ut=di(Ve,dn.scale),Et=fe>=0?1:-1,Di=Ut>=0?1:-1;Di==Et&&(Di==1?Tt==1?fe>=Ut:fe<=Ut:Tt==1?fe<=Ut:fe>=Ut)&&(On=ut,or=ot)}else On=ut,or=ot}}if(mi||$n){let Ve,ut;z.ori==0?(Ve=$e,ut=ke):(Ve=ke,ut=$e);let Tt,Ut,Et,Di,Cr,cn,gi=!0,Co=jn.bbox;if(Co!=null){gi=!1;let Nn=Co(i,ot);Et=Nn.left,Di=Nn.top,Tt=Nn.width,Ut=Nn.height}else Et=Ve,Di=ut,Tt=Ut=jn.size(i,ot);if(cn=jn.fill(i,ot),Cr=jn.stroke(i,ot),$n)ot==or&&On<=ki.prox&&(Ze=Et,et=Di,bt=Tt,Nt=Ut,St=gi,Rt=cn,pt=Cr);else{let Nn=Si[ot];Nn!=null&&(Jr[ot]=Et,Br[ot]=Di,If(Nn,Tt,Ut,gi),Mf(Nn,cn,Cr),Yr(Nn,gr(Et),gr(Di),Ct,qe))}}}}if($n){let ot=ki.prox,dn=sr==null?On<=ot:On>ot||or!=sr;if(mi||dn){let kn=Si[0];kn!=null&&(Jr[0]=Ze,Br[0]=et,If(kn,bt,Nt,St),Mf(kn,Rt,pt),Yr(kn,gr(Ze),gr(et),Ct,qe))}}}if(wt.show&&wr)if(V!=null){let[We,je]=ct.scales,[Ke,Ze]=ct.match,[et,bt]=V.cursor.sync.scales,Nt=V.cursor.drag;if(He=Nt._x,fn=Nt._y,He||fn){let{left:St,top:Rt,width:pt,height:ot}=V.select,dn=V.scales[et].ori,kn=V.posToVal,ei,zt,fe,$e,ke,Ve=We!=null&&Ke(We,et),ut=je!=null&&Ze(je,bt);Ve&&He?(dn==0?(ei=St,zt=pt):(ei=Rt,zt=ot),fe=M[We],$e=N(kn(ei,et),fe,Ce,0),ke=N(kn(ei+zt,et),fe,Ce,0),$i(Rr($e,ke),ni(ke-$e))):$i(0,Ce),ut&&fn?(dn==1?(ei=St,zt=pt):(ei=Rt,zt=ot),fe=M[je],$e=A(kn(ei,bt),fe,Ie,0),ke=A(kn(ei+zt,bt),fe,Ie,0),ar(Rr($e,ke),ni(ke-$e))):ar(0,Ie)}else Z()}else{let We=ni(Qt-ga),je=ni(Kt-xo);if(z.ori==1){let bt=We;We=je,je=bt}He=Ln.x&&We>=Ln.dist,fn=Ln.y&&je>=Ln.dist;let Ke=Ln.uni;Ke!=null?He&&fn&&(He=We>=Ke,fn=je>=Ke,!He&&!fn&&(je>We?fn=!0:He=!0)):Ln.x&&Ln.y&&(He||fn)&&(He=fn=!0);let Ze,et;He&&(z.ori==0?(Ze=yr,et=Jt):(Ze=ro,et=Wt),$i(Rr(Ze,et),ni(et-Ze)),fn||ar(0,Ie)),fn&&(z.ori==1?(Ze=yr,et=Jt):(Ze=ro,et=Wt),ar(Rr(Ze,et),ni(et-Ze)),He||$i(0,Ce)),!He&&!fn&&($i(0,0),ar(0,0))}if(Ln._x=He,Ln._y=fn,V==null){if(re){if(xn!=null){let[We,je]=ct.scales;ct.values[0]=We!=null?di(z.ori==0?Jt:Wt,We):null,ct.values[1]=je!=null?di(z.ori==1?Jt:Wt,je):null}Mt(Du,i,Jt,Wt,Ct,qe,oe)}if(Wr){let We=re&&ct.setSeries,je=ki.prox;sr==null?On<=je&&Ni(or,xr,!0,We):On>je?Ni(null,xr,!0,We):or!=sr&&Ni(or,xr,!0,We)}}mi&&(de.idx=oe,y()),X!==!1&&nt("setCursor")}let P=null;Object.defineProperty(i,"rect",{get(){return P==null&&W(!1),P}});function W(V=!1){V?P=null:(P=s.getBoundingClientRect(),nt("syncRect",P))}function B(V,X,re,oe,me,Ce,Ie){ne._lock||wr&&V!=null&&V.movementX==0&&V.movementY==0||(G(V,X,re,oe,me,Ce,Ie,!1,V!=null),V!=null?_(null,!0,!0):_(X,!0,!1))}function G(V,X,re,oe,me,Ce,Ie,We,je){if(P==null&&W(!1),Fr(V),V!=null)re=V.clientX-P.left,oe=V.clientY-P.top;else{if(re<0||oe<0){Jt=-10,Wt=-10;return}let[Ke,Ze]=ct.scales,et=X.cursor.sync,[bt,Nt]=et.values,[St,Rt]=et.scales,[pt,ot]=ct.match,dn=X.axes[0].side%2==1,kn=z.ori==0?Ct:qe,ei=z.ori==1?Ct:qe,zt=dn?Ce:me,fe=dn?me:Ce,$e=dn?oe:re,ke=dn?re:oe;if(St!=null?re=pt(Ke,St)?b(bt,M[Ke],kn,0):-10:re=kn*($e/zt),Rt!=null?oe=ot(Ze,Rt)?b(Nt,M[Ze],ei,0):-10:oe=ei*(ke/fe),z.ori==1){let Ve=re;re=oe,oe=Ve}}je&&(X==null||X.cursor.event.type==Du)&&((re<=1||re>=Ct-1)&&(re=ps(re,Ct)),(oe<=1||oe>=qe-1)&&(oe=ps(oe,qe))),We?(ga=re,xo=oe,[yr,ro]=ne.move(i,re,oe)):(Jt=re,Wt=oe)}const Y={width:0,height:0,left:0,top:0};function Z(){ln(Y,!1)}let ie,ae,be,Se;function ye(V,X,re,oe,me,Ce,Ie){wr=!0,He=fn=Ln._x=Ln._y=!1,G(V,X,re,oe,me,Ce,Ie,!0,!1),V!=null&&(_n(Pu,Wu,xe,!1),Mt(xf,i,yr,ro,Ct,qe,null));let{left:We,top:je,width:Ke,height:Ze}=wt;ie=We,ae=je,be=Ke,Se=Ze}function xe(V,X,re,oe,me,Ce,Ie){wr=Ln._x=Ln._y=!1,G(V,X,re,oe,me,Ce,Ie,!1,!0);let{left:We,top:je,width:Ke,height:Ze}=wt,et=Ke>0||Ze>0,bt=ie!=We||ae!=je||be!=Ke||Se!=Ze;if(et&&bt&&ln(wt),Ln.setScale&&et&&bt){let Nt=We,St=Ke,Rt=je,pt=Ze;if(z.ori==1&&(Nt=je,St=Ze,Rt=We,pt=Ke),He&&Qn(C,di(Nt,C),di(Nt+St,C)),fn)for(let ot in M){let dn=M[ot];ot!=C&&dn.from==null&&dn.min!=un&&Qn(ot,di(Rt+pt,ot),di(Rt,ot))}Z()}else ne.lock&&(ne._lock=!ne._lock,_(X,!0,V!=null));V!=null&&(Xn(Pu,Wu),Mt(Pu,i,Jt,Wt,Ct,qe,null))}function Ne(V,X,re,oe,me,Ce,Ie){if(ne._lock)return;Fr(V);let We=wr;if(wr){let je=!0,Ke=!0,Ze=10,et,bt;z.ori==0?(et=He,bt=fn):(et=fn,bt=He),et&&bt&&(je=Jt<=Ze||Jt>=Ct-Ze,Ke=Wt<=Ze||Wt>=qe-Ze),et&&je&&(Jt=Jt<yr?0:Ct),bt&&Ke&&(Wt=Wt<ro?0:qe),_(null,!0,!0),wr=!1}Jt=-10,Wt=-10,te.fill(null),_(null,!0,!0),We&&(wr=We)}function Oe(V,X,re,oe,me,Ce,Ie){ne._lock||(Fr(V),xs(),Z(),V!=null&&Mt(Sf,i,Jt,Wt,Ct,qe,null))}function Ge(){E.forEach(ZS),po(i.width,i.height,!0)}hs(Wl,Xs,Ge);const lt={};lt.mousedown=ye,lt.mousemove=B,lt.mouseup=xe,lt.dblclick=Oe,lt.setSeries=(V,X,re,oe)=>{let me=ct.match[2];re=me(i,X,re),re!=-1&&Ni(re,oe,!0,!1)},he&&(_n(xf,s,ye),_n(Du,s,B),_n(Cf,s,V=>{Fr(V),W(!1)}),_n(kf,s,Ne),_n(Sf,s,Oe),ch.add(i),i.syncRect=W);const Qe=i.hooks=t.hooks||{};function nt(V,X,re){Ko?wo.push([V,X,re]):V in Qe&&Qe[V].forEach(oe=>{oe.call(null,i,X,re)})}(t.plugins||[]).forEach(V=>{for(let X in V.hooks)Qe[X]=(Qe[X]||[]).concat(V.hooks[X])});const mn=(V,X,re)=>re,ct=qn({key:null,setSeries:!1,filters:{pub:jf,sub:jf},scales:[C,x[1]?x[1].scale:null],match:[Hf,Hf,mn],values:[null,null]},ne.sync);ct.match.length==2&&ct.match.push(mn),ne.sync=ct;const xn=ct.key,kt=$m(xn);function Mt(V,X,re,oe,me,Ce,Ie){ct.filters.pub(V,X,re,oe,me,Ce,Ie)&&kt.pub(V,X,re,oe,me,Ce,Ie)}kt.sub(i);function Jn(V,X,re,oe,me,Ce,Ie){ct.filters.sub(V,X,re,oe,me,Ce,Ie)&&lt[V](null,X,re,oe,me,Ce,Ie)}i.pub=Jn;function pi(){kt.unsub(i),ch.delete(i),tr.clear(),Hu(Wl,Xs,Ge),g.remove(),ve==null||ve.remove(),nt("destroy")}i.destroy=pi;function Cn(){nt("init",t,e),Fo(e||t.data,!1),S[C]?De(C,S[C]):xs(),ho=wt.show&&(wt.width>0||wt.height>0),Pr=mi=!0,po(t.width,t.height)}return x.forEach(la),E.forEach(ir),n?n instanceof HTMLElement?(n.appendChild(g),Cn()):n(i,Cn):Cn(),i}yn.assign=qn,yn.fmtNum=Gu,yn.rangeNum=Hl,yn.rangeLog=jl,yn.rangeAsinh=Uu,yn.orient=fs,yn.pxRatio=Xt,yn.join=jk,yn.fmtDate=Xu,yn.tzDate=Jk,yn.sync=$m;{yn.addGap=NS,yn.clipGaps=Xl;let t=yn.paths={points:Om};t.linear=Dm,t.stepped=FS,t.bars=WS,t.spline=zS}var Um,Vm;function QS(){return Vm||(Vm=1,Um=function(t,e,n,i,h){var p,m;if(i===void 0)i=0;else if(i=i|0,i<0||i>=t.length)throw new RangeError("invalid lower bound");if(h===void 0)h=t.length-1;else if(h=h|0,h<i||h>=t.length)throw new RangeError("invalid upper bound");for(;i<=h;)if(p=i+(h-i>>>1),m=+n(t[p],e,p,t),m<0)i=p+1;else if(m>0)h=p-1;else return p;return~i}),Um}var JS=QS();const Gm=xl(JS);var hh,Km;function e_(){if(Km)return hh;Km=1;function t(e,n,i){var h=-1,p=e.length;n<0&&(n=-n>p?0:p+n),i=i>p?p:i,i<0&&(i+=p),p=n>i?0:i-n>>>0,n>>>=0;for(var m=Array(p);++h<p;)m[h]=e[h+n];return m}return hh=t,hh}var dh,qm;function t_(){if(qm)return dh;qm=1;var t=e_();function e(n,i,h){var p=n.length;return h=h===void 0?p:h,!i&&h>=p?n:t(n,i,h)}return dh=e,dh}var ph,Ym;function Xm(){if(Ym)return ph;Ym=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",h=e+n+i,p="\\ufe0e\\ufe0f",m="\\u200d",b=RegExp("["+m+t+h+p+"]");function d(g){return b.test(g)}return ph=d,ph}var gh,Zm;function n_(){if(Zm)return gh;Zm=1;function t(e){return e.split("")}return gh=t,gh}var fh,Qm;function i_(){if(Qm)return fh;Qm=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",h=e+n+i,p="\\ufe0e\\ufe0f",m="["+t+"]",b="["+h+"]",d="\\ud83c[\\udffb-\\udfff]",g="(?:"+b+"|"+d+")",o="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",l="\\u200d",s=g+"?",c="["+p+"]?",f="(?:"+l+"(?:"+[o,a,u].join("|")+")"+c+s+")*",w=c+s+f,x="(?:"+[o+b+"?",b,a,u,m].join("|")+")",E=RegExp(d+"(?="+d+")|"+x+w,"g");function M(k){return k.match(E)||[]}return fh=M,fh}var mh,Jm;function r_(){if(Jm)return mh;Jm=1;var t=n_(),e=Xm(),n=i_();function i(h){return e(h)?n(h):t(h)}return mh=i,mh}var vh,ev;function o_(){if(ev)return vh;ev=1;var t=typeof Oo=="object"&&Oo&&Oo.Object===Object&&Oo;return vh=t,vh}var yh,tv;function s_(){if(tv)return yh;tv=1;var t=o_(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return yh=n,yh}var wh,nv;function bh(){if(nv)return wh;nv=1;var t=s_(),e=t.Symbol;return wh=e,wh}var xh,iv;function a_(){if(iv)return xh;iv=1;function t(e,n){for(var i=-1,h=e==null?0:e.length,p=Array(h);++i<h;)p[i]=n(e[i],i,e);return p}return xh=t,xh}var Ch,rv;function l_(){if(rv)return Ch;rv=1;var t=Array.isArray;return Ch=t,Ch}var kh,ov;function c_(){if(ov)return kh;ov=1;var t=bh(),e=Object.prototype,n=e.hasOwnProperty,i=e.toString,h=t?t.toStringTag:void 0;function p(m){var b=n.call(m,h),d=m[h];try{m[h]=void 0;var g=!0}catch{}var o=i.call(m);return g&&(b?m[h]=d:delete m[h]),o}return kh=p,kh}var Sh,sv;function u_(){if(sv)return Sh;sv=1;var t=Object.prototype,e=t.toString;function n(i){return e.call(i)}return Sh=n,Sh}var _h,av;function h_(){if(av)return _h;av=1;var t=bh(),e=c_(),n=u_(),i="[object Null]",h="[object Undefined]",p=t?t.toStringTag:void 0;function m(b){return b==null?b===void 0?h:i:p&&p in Object(b)?e(b):n(b)}return _h=m,_h}var Ah,lv;function d_(){if(lv)return Ah;lv=1;function t(e){return e!=null&&typeof e=="object"}return Ah=t,Ah}var $h,cv;function p_(){if(cv)return $h;cv=1;var t=h_(),e=d_(),n="[object Symbol]";function i(h){return typeof h=="symbol"||e(h)&&t(h)==n}return $h=i,$h}var Mh,uv;function g_(){if(uv)return Mh;uv=1;var t=bh(),e=a_(),n=l_(),i=p_(),h=t?t.prototype:void 0,p=h?h.toString:void 0;function m(b){if(typeof b=="string")return b;if(n(b))return e(b,m)+"";if(i(b))return p?p.call(b):"";var d=b+"";return d=="0"&&1/b==-1/0?"-0":d}return Mh=m,Mh}var Th,hv;function ec(){if(hv)return Th;hv=1;var t=g_();function e(n){return n==null?"":t(n)}return Th=e,Th}var Ih,dv;function f_(){if(dv)return Ih;dv=1;var t=t_(),e=Xm(),n=r_(),i=ec();function h(p){return function(m){m=i(m);var b=e(m)?n(m):void 0,d=b?b[0]:m.charAt(0),g=b?t(b,1).join(""):m.slice(1);return d[p]()+g}}return Ih=h,Ih}var Eh,pv;function gv(){if(pv)return Eh;pv=1;var t=f_(),e=t("toUpperCase");return Eh=e,Eh}var m_=gv();const v_=xl(m_);var Lh,fv;function y_(){if(fv)return Lh;fv=1;var t=ec(),e=gv();function n(i){return e(t(i).toLowerCase())}return Lh=n,Lh}var Rh,mv;function w_(){if(mv)return Rh;mv=1;function t(e,n,i,h){var p=-1,m=e==null?0:e.length;for(h&&m&&(i=e[++p]);++p<m;)i=n(i,e[p],p,e);return i}return Rh=t,Rh}var Oh,vv;function b_(){if(vv)return Oh;vv=1;function t(e){return function(n){return e==null?void 0:e[n]}}return Oh=t,Oh}var Nh,yv;function x_(){if(yv)return Nh;yv=1;var t=b_(),e={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},n=t(e);return Nh=n,Nh}var Dh,wv;function C_(){if(wv)return Dh;wv=1;var t=x_(),e=ec(),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i="\\u0300-\\u036f",h="\\ufe20-\\ufe2f",p="\\u20d0-\\u20ff",m=i+h+p,b="["+m+"]",d=RegExp(b,"g");function g(o){return o=e(o),o&&o.replace(n,t).replace(d,"")}return Dh=g,Dh}var Ph,bv;function k_(){if(bv)return Ph;bv=1;var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(n){return n.match(t)||[]}return Ph=e,Ph}var Fh,xv;function S_(){if(xv)return Fh;xv=1;var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function e(n){return t.test(n)}return Fh=e,Fh}var Wh,Cv;function __(){if(Cv)return Wh;Cv=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",h=e+n+i,p="\\u2700-\\u27bf",m="a-z\\xdf-\\xf6\\xf8-\\xff",b="\\xac\\xb1\\xd7\\xf7",d="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",g="\\u2000-\\u206f",o=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="A-Z\\xc0-\\xd6\\xd8-\\xde",u="\\ufe0e\\ufe0f",l=b+d+g+o,s="['’]",c="["+l+"]",f="["+h+"]",w="\\d+",x="["+p+"]",E="["+m+"]",M="[^"+t+l+w+p+m+a+"]",k="\\ud83c[\\udffb-\\udfff]",C="(?:"+f+"|"+k+")",O="[^"+t+"]",L="(?:\\ud83c[\\udde6-\\uddff]){2}",R="[\\ud800-\\udbff][\\udc00-\\udfff]",I="["+a+"]",z="\\u200d",F="(?:"+E+"|"+M+")",N="(?:"+I+"|"+M+")",A="(?:"+s+"(?:d|ll|m|re|s|t|ve))?",S="(?:"+s+"(?:D|LL|M|RE|S|T|VE))?",D=C+"?",j="["+u+"]?",U="(?:"+z+"(?:"+[O,L,R].join("|")+")"+j+D+")*",q="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Q="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",te=j+D+U,de="(?:"+[x,L,R].join("|")+")"+te,ne=RegExp([I+"?"+E+"+"+A+"(?="+[c,I,"$"].join("|")+")",N+"+"+S+"(?="+[c,I+F,"$"].join("|")+")",I+"?"+F+"+"+A,I+"+"+S,Q,q,w,de].join("|"),"g");function ce(he){return he.match(ne)||[]}return Wh=ce,Wh}var Bh,kv;function A_(){if(kv)return Bh;kv=1;var t=k_(),e=S_(),n=ec(),i=__();function h(p,m,b){return p=n(p),m=b?void 0:m,m===void 0?e(p)?i(p):t(p):p.match(m)||[]}return Bh=h,Bh}var zh,Sv;function $_(){if(Sv)return zh;Sv=1;var t=w_(),e=C_(),n=A_(),i="['’]",h=RegExp(i,"g");function p(m){return function(b){return t(n(e(b).replace(h,"")),m,"")}}return zh=p,zh}var jh,_v;function M_(){if(_v)return jh;_v=1;var t=y_(),e=$_(),n=e(function(i,h,p){return h=h.toLowerCase(),i+(p?t(h):h)});return jh=n,jh}var T_=M_();const I_=xl(T_),E_=Object.assign({"./ArrayWidget.vue":()=>at(()=>st.import("./ArrayWidget-j3ncPuPx-f939b74328291df8a5de.js"),void 0),"./ArrayplotWidget.vue":()=>at(()=>st.import("./ArrayplotWidget-DuLaiGa9-4e423aca38f960d26373.js"),void 0),"./BlockWidget.vue":()=>at(()=>st.import("./BlockWidget-Bf5Dd6Cr-ef35d651764a1f1ded69.js"),void 0),"./ButtonWidget.vue":()=>at(()=>st.import("./ButtonWidget-bl_mGFYh-bd3a80c50b3d01aaaff5.js"),void 0),"./CanvasWidget.vue":()=>at(()=>st.import("./CanvasWidget-boDemgx1-c68ac68b01e5a84f0579.js"),void 0),"./CanvasdotWidget.vue":()=>at(()=>st.import("./CanvasdotWidget-BZBbJcER-f8666166dd26f9b4d0c2.js"),void 0),"./CanvasimageWidget.vue":()=>at(()=>st.import("./CanvasimageWidget-6ywvT5jd-b960807789b9dcbcc50d.js"),void 0),"./CanvasimagevalueWidget.vue":()=>at(()=>st.import("./CanvasimagevalueWidget-DjWrA3gX-4074ee5ef0a41f17fddd.js"),void 0),"./CanvaslabelWidget.vue":()=>at(()=>st.import("./CanvaslabelWidget-Bq4V2BQh-78092fbf686162916c1c.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>at(()=>st.import("./CanvaslabelvalueWidget-C8oNcFLi-828de5416d4d6f2f1b68.js"),void 0),"./CanvaslineWidget.vue":()=>at(()=>st.import("./CanvaslineWidget-nvbL2GoL-c71cc643a6024963a623.js"),void 0),"./CanvaslinevalueWidget.vue":()=>at(()=>st.import("./CanvaslinevalueWidget-ZACQedKx-6223a4707f27190d998d.js"),void 0),"./CheckbuttonWidget.vue":()=>at(()=>st.import("./CheckbuttonWidget-B82UE8AB-8935020f16d81e86bd39.js"),void 0),"./ComboboxWidget.vue":()=>at(()=>st.import("./ComboboxWidget-4OFiSkI6-f0b1e8f3e0b734cb6ad2.js"),void 0),"./DateWidget.vue":()=>at(()=>st.import("./DateWidget-BmwtdirF-c478451d8a9912180a30.js"),void 0),"./DynamicWidget.vue":()=>at(()=>st.import("./DynamicWidget-CfMtj7H8-3b839f85b196e9521a5d.js"),void 0),"./FormatvalueWidget.vue":()=>at(()=>st.import("./FormatvalueWidget-C8exC3bj-6fc3fa6fb5d3bdeed5f4.js"),void 0),"./HorizontalWidget.vue":()=>at(()=>st.import("./HorizontalWidget-Ck151zVw-5a9b2cfd6856a7e967b5.js"),void 0),"./HorizontalboxWidget.vue":()=>at(()=>st.import("./HorizontalboxWidget-D3P-cl9V-a538d5bea21494d86a8c.js"),void 0),"./HorizontallineWidget.vue":()=>at(()=>st.import("./HorizontallineWidget-BE1TjPU8-60179ab7246a142d636c.js"),void 0),"./IframeWidget.vue":()=>at(()=>st.import("./IframeWidget-BgJCgues-8d275c3925dcaef036ce.js"),void 0),"./ImageviewerWidget.vue":()=>at(()=>st.import("./ImageviewerWidget-BlhFZD2f-2f0d71645905d2247b85.js"),void 0),"./LabelWidget.vue":()=>at(()=>st.import("./LabelWidget-Cwosk4x2-e46f4721f9bfa9b4c642.js"),void 0),"./LabelledWidget.vue":()=>at(()=>st.import("./LabelledWidget-Dl6rAFTQ-326ebac7e9b44c786d55.js"),void 0),"./LabelprogressbarWidget.vue":()=>at(()=>st.import("./LabelprogressbarWidget-MuAKesOz-153e98b717f1bb0940e1.js"),void 0),"./LabelsparklineWidget.vue":()=>at(()=>st.import("./LabelsparklineWidget-6LA6Ox3d-126f70696b7ab46a0ca2.js"),void 0),"./LabelvalueWidget.vue":()=>at(()=>st.import("./LabelvalueWidget-BxAXx-Tf-d87d776b4ee0a755f336.js"),void 0),"./LabelvaluedescWidget.vue":()=>at(()=>st.import("./LabelvaluedescWidget-Dwwlnd1g-f01d9e2309195df7c3d0.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>at(()=>st.import("./LabelvaluelimitsbarWidget-Dv8Qk8kK-5fd8eb8da41cf4aa3a95.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>at(()=>st.import("./LabelvaluelimitscolumnWidget-D-_gl6fq-fcc6b42a9b4c29e45e73.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>at(()=>st.import("./LabelvaluerangebarWidget-B3MKT-3Y-a0b64358b0a0958b27fa.js"),void 0),"./LedWidget.vue":()=>at(()=>st.import("./LedWidget-DOuDD8LI-6667a8c3e33737fc95ba.js"),void 0),"./LimitsbarWidget.vue":()=>at(()=>st.import("./LimitsbarWidget-D1U6SvVL-296c2641a79d9f3cfdbc.js"),void 0),"./LimitscolorWidget.vue":()=>at(()=>st.import("./LimitscolorWidget-iSMGusqt-864314d19d55c8c4b11a.js"),void 0),"./LimitscolumnWidget.vue":()=>at(()=>st.import("./LimitscolumnWidget-DjxZTt_r-375bbc8160586a53a650.js"),void 0),"./LinegraphWidget.vue":()=>at(()=>st.import("./LinegraphWidget-BHKU6zlT-f5a67e90280ecd56e5ff.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>at(()=>st.import("./MatrixbycolumnsWidget-BKO-A2QD-c0d993dadda5d555c9d5.js"),void 0),"./ProgressbarWidget.vue":()=>at(()=>st.import("./ProgressbarWidget-fbr2qu_N-c63c1c8aad560c8fe9f0.js"),void 0),"./RadiobuttonWidget.vue":()=>at(()=>st.import("./RadiobuttonWidget-DL08zcQT-9a53a941e6fe248a6a8b.js"),void 0),"./RadiogroupWidget.vue":()=>at(()=>st.import("./RadiogroupWidget-DW9Xpj3c-734245b32d66bdcb0e2a.js"),void 0),"./RangebarWidget.vue":()=>at(()=>st.import("./RangebarWidget-o9q55kjc-b7b0a515ecb909587048.js"),void 0),"./RollupWidget.vue":()=>at(()=>st.import("./RollupWidget-BHnjj-DF-d5e7f79088ae2defdd32.js"),void 0),"./ScrollwindowWidget.vue":()=>at(()=>st.import("./ScrollwindowWidget-D-QVwztC-296dc5d83bd09c2f7e9b.js"),void 0),"./SignalWidget.vue":()=>at(()=>st.import("./SignalWidget-CsWuufdx-fcd5aa4329eda73bbc19.js"),void 0),"./SpacerWidget.vue":()=>at(()=>st.import("./SpacerWidget-Di9-qunj-434c8dec966d53c43547.js"),void 0),"./SparklineWidget.vue":()=>at(()=>st.import("./SparklineWidget-B6-zhdPW-f70171404709364118de.js"),void 0),"./TabbookWidget.vue":()=>at(()=>st.import("./TabbookWidget-B1E1_mzA-d5c8d4af992caa015879.js"),void 0),"./TextboxWidget.vue":()=>at(()=>st.import("./TextboxWidget-CBVEXPw_-4ccfa794fc27e17c41e9.js"),void 0),"./TextfieldWidget.vue":()=>at(()=>st.import("./TextfieldWidget-DZMHrtQa-cdcf0c0cd90b83a89cd4.js"),void 0),"./TimeWidget.vue":()=>at(()=>st.import("./TimeWidget-K4MNmJ7J-4ac9a34c4cb89a628f1e.js"),void 0),"./TitleWidget.vue":()=>at(()=>st.import("./TitleWidget-8IcwweFE-2d09ac632c6319281e1e.js"),void 0),"./ValueWidget.vue":()=>at(()=>st.import("./ValueWidget-BvT1ASar-569bf4ee3a869b3a983c.js"),void 0),"./ValuelimitsbarWidget.vue":()=>at(()=>st.import("./ValuelimitsbarWidget-C5lBnUmB-a57a4387edcb9e00239f.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>at(()=>st.import("./ValuelimitscolumnWidget-DHYI0WBL-9bdaf843078c6c366a0a.js"),void 0),"./ValuerangebarWidget.vue":()=>at(()=>st.import("./ValuerangebarWidget-BSszZhlE-9720c31cb31b04465293.js"),void 0),"./VerticalWidget.vue":()=>at(()=>st.import("./VerticalWidget-1GhgYrC3-2861b7292deac636c9ce.js"),void 0),"./VerticalboxWidget.vue":()=>at(()=>st.import("./VerticalboxWidget-DYHJqEzd-fbaceb71491dd8a6da8e.js"),void 0)}),L_=Object.entries(E_).reduce((t,[e,n])=>{e=e.split("/").pop();const i=v_(I_(e.replace(/\.\w+$/,"")));return{...t,[i]:hp(n)}},{}),Q2=Pn("j",{components:L_});function Av(){return Object.assign({},zs())}function R_(t,e,n){const i=pn(t,void 0);return i.setTime(i.getTime()+e*wl),i}function O_(t,e){const n=()=>Kn(void 0,NaN),i=F_(t);let h;if(i.date){const d=W_(i.date,2);h=B_(d.restDateString,d.year)}if(!h||isNaN(+h))return n();const p=+h;let m=0,b;if(i.time&&(m=z_(i.time),isNaN(m)))return n();if(i.timezone){if(b=j_(i.timezone),isNaN(b))return n()}else{const d=new Date(p+m),g=pn(0,void 0);return g.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),g.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),g}return pn(p+m+b,void 0)}const tc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},N_=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,D_=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,P_=/^([+-])(\d{2})(?::?(\d{2}))?$/;function F_(t){const e={},n=t.split(tc.dateTimeDelimiter);let i;if(n.length>2)return e;if(/:/.test(n[0])?i=n[0]:(e.date=n[0],i=n[1],tc.timeZoneDelimiter.test(e.date)&&(e.date=t.split(tc.timeZoneDelimiter)[0],i=t.substr(e.date.length,t.length))),i){const h=tc.timezone.exec(i);h?(e.time=i.replace(h[1],""),e.timezone=h[1]):e.time=i}return e}function W_(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),i=t.match(n);if(!i)return{year:NaN,restDateString:""};const h=i[1]?parseInt(i[1]):null,p=i[2]?parseInt(i[2]):null;return{year:p===null?h:p*100,restDateString:t.slice((i[1]||i[2]).length)}}function B_(t,e){if(e===null)return new Date(NaN);const n=t.match(N_);if(!n)return new Date(NaN);const i=!!n[4],h=Ga(n[1]),p=Ga(n[2])-1,m=Ga(n[3]),b=Ga(n[4]),d=Ga(n[5])-1;if(i)return K_(e,b,d)?H_(e,b,d):new Date(NaN);{const g=new Date(0);return!V_(e,p,m)||!G_(e,h)?new Date(NaN):(g.setUTCFullYear(e,p,Math.max(h,m)),g)}}function Ga(t){return t?parseInt(t):1}function z_(t){const e=t.match(D_);if(!e)return NaN;const n=Hh(e[1]),i=Hh(e[2]),h=Hh(e[3]);return q_(n,i,h)?n*ou+i*wl+h*1e3:NaN}function Hh(t){return t&&parseFloat(t.replace(",","."))||0}function j_(t){if(t==="Z")return 0;const e=t.match(P_);if(!e)return 0;const n=e[1]==="+"?-1:1,i=parseInt(e[2]),h=e[3]&&parseInt(e[3])||0;return Y_(i,h)?n*(i*ou+h*wl):NaN}function H_(t,e,n){const i=new Date(0);i.setUTCFullYear(t,0,4);const h=i.getUTCDay()||7,p=(e-1)*7+n+1-h;return i.setUTCDate(i.getUTCDate()+p),i}const U_=[31,null,31,30,31,30,31,31,30,31,30,31];function $v(t){return t%400===0||t%4===0&&t%100!==0}function V_(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(U_[e]||($v(t)?29:28))}function G_(t,e){return e>=1&&e<=($v(t)?366:365)}function K_(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function q_(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function Y_(t,e){return e>=0&&e<=59}function X_(t,e,n){return R_(t,-e)}function Mv(t,e,n){const i=Av(),h=J_(t,n.timeZone,n.locale??i.locale);return"formatToParts"in h?Z_(h,e):Q_(h,e)}function Z_(t,e){const n=t.formatToParts(e);for(let i=n.length-1;i>=0;--i)if(n[i].type==="timeZoneName")return n[i].value}function Q_(t,e){const n=t.format(e).replace(/\u200E/g,""),i=/ [\w-+ ]+$/.exec(n);return i?i[0].substr(1):""}function J_(t,e,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:e,timeZoneName:t})}function eA(t,e){const n=oA(e);return"formatToParts"in n?nA(n,t):iA(n,t)}const tA={year:0,month:1,day:2,hour:3,minute:4,second:5};function nA(t,e){try{const n=t.formatToParts(e),i=[];for(let h=0;h<n.length;h++){const p=tA[n[h].type];p!==void 0&&(i[p]=parseInt(n[h].value,10))}return i}catch(n){if(n instanceof RangeError)return[NaN];throw n}}function iA(t,e){const n=t.format(e),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[parseInt(i[3],10),parseInt(i[1],10),parseInt(i[2],10),parseInt(i[4],10),parseInt(i[5],10),parseInt(i[6],10)]}const Uh={},Tv=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")),rA=Tv==="06/25/2014, 00:00:00"||Tv==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function oA(t){return Uh[t]||(Uh[t]=rA?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"})),Uh[t]}function Iv(t,e,n,i,h,p,m){const b=new Date(0);return b.setUTCFullYear(t,e,n),b.setUTCHours(i,h,p,m),b}const Ev=36e5,sA=6e4,Vh={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Gh(t,e,n){if(!t)return 0;let i=Vh.timezoneZ.exec(t);if(i)return 0;let h,p;if(i=Vh.timezoneHH.exec(t),i)return h=parseInt(i[1],10),Lv(h)?-(h*Ev):NaN;if(i=Vh.timezoneHHMM.exec(t),i){h=parseInt(i[2],10);const m=parseInt(i[3],10);return Lv(h,m)?(p=Math.abs(h)*Ev+m*sA,i[1]==="+"?-p:p):NaN}if(cA(t)){e=new Date(e||Date.now());const m=n?e:aA(e),b=Kh(m,t);return-(n?b:lA(e,b,t))}return NaN}function aA(t){return Iv(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}function Kh(t,e){const n=eA(t,e),i=Iv(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let h=t.getTime();const p=h%1e3;return h-=p>=0?p:1e3+p,i-h}function lA(t,e,n){let i=t.getTime()-e;const h=Kh(new Date(i),n);if(e===h)return e;i-=h-e;const p=Kh(new Date(i),n);return h===p?h:Math.max(h,p)}function Lv(t,e){return-23<=t&&t<=23&&(e==null||0<=e&&e<=59)}const Rv={};function cA(t){if(Rv[t])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:t}),Rv[t]=!0,!0}catch{return!1}}const uA=60*1e3,hA={X:function(t,e,n){const i=qh(n.timeZone,t);if(i===0)return"Z";switch(e){case"X":return Ov(i);case"XXXX":case"XX":return ra(i);case"XXXXX":case"XXX":default:return ra(i,":")}},x:function(t,e,n){const i=qh(n.timeZone,t);switch(e){case"x":return Ov(i);case"xxxx":case"xx":return ra(i);case"xxxxx":case"xxx":default:return ra(i,":")}},O:function(t,e,n){const i=qh(n.timeZone,t);switch(e){case"O":case"OO":case"OOO":return"GMT"+dA(i,":");case"OOOO":default:return"GMT"+ra(i,":")}},z:function(t,e,n){switch(e){case"z":case"zz":case"zzz":return Mv("short",t,n);case"zzzz":default:return Mv("long",t,n)}}};function qh(t,e){const n=t?Gh(t,e,!0)/uA:(e==null?void 0:e.getTimezoneOffset())??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+t);return n}function nc(t,e){const n=t<0?"-":"";let i=Math.abs(t).toString();for(;i.length<e;)i="0"+i;return n+i}function ra(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),h=nc(Math.floor(i/60),2),p=nc(Math.floor(i%60),2);return n+h+e+p}function Ov(t,e){return t%60===0?(t>0?"-":"+")+nc(Math.abs(t)/60,2):ra(t,e)}function dA(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),h=Math.floor(i/60),p=i%60;return p===0?n+String(h):n+String(h)+e+nc(p,2)}function Nv(t){const e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+t-+e}const pA=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Yh=36e5,Dv=6e4,gA=2,Ei={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:pA};function Pv(t,e={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(t===null)return new Date(NaN);const n=e.additionalDigits==null?gA:Number(e.additionalDigits);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]")return new Date(t.getTime());if(typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]")return new Date(t);if(Object.prototype.toString.call(t)!=="[object String]")return new Date(NaN);const i=fA(t),{year:h,restDateString:p}=mA(i.date,n),m=vA(p,h);if(m===null||isNaN(m.getTime()))return new Date(NaN);if(m){const b=m.getTime();let d=0,g;if(i.time&&(d=yA(i.time),d===null||isNaN(d)))return new Date(NaN);if(i.timeZone||e.timeZone){if(g=Gh(i.timeZone||e.timeZone,new Date(b+d)),isNaN(g))return new Date(NaN)}else g=Nv(new Date(b+d)),g=Nv(new Date(b+d+g));return new Date(b+d+g)}else return new Date(NaN)}function fA(t){const e={};let n=Ei.dateTimePattern.exec(t),i;if(n?(e.date=n[1],i=n[3]):(n=Ei.datePattern.exec(t),n?(e.date=n[1],i=n[2]):(e.date=null,i=t)),i){const h=Ei.timeZone.exec(i);h?(e.time=i.replace(h[1],""),e.timeZone=h[1].trim()):e.time=i}return e}function mA(t,e){if(t){const n=Ei.YYY[e],i=Ei.YYYYY[e];let h=Ei.YYYY.exec(t)||i.exec(t);if(h){const p=h[1];return{year:parseInt(p,10),restDateString:t.slice(p.length)}}if(h=Ei.YY.exec(t)||n.exec(t),h){const p=h[1];return{year:parseInt(p,10)*100,restDateString:t.slice(p.length)}}}return{year:null}}function vA(t,e){if(e===null)return null;let n,i,h;if(!t||!t.length)return n=new Date(0),n.setUTCFullYear(e),n;let p=Ei.MM.exec(t);if(p)return n=new Date(0),i=parseInt(p[1],10)-1,Bv(e,i)?(n.setUTCFullYear(e,i),n):new Date(NaN);if(p=Ei.DDD.exec(t),p){n=new Date(0);const m=parseInt(p[1],10);return xA(e,m)?(n.setUTCFullYear(e,0,m),n):new Date(NaN)}if(p=Ei.MMDD.exec(t),p){n=new Date(0),i=parseInt(p[1],10)-1;const m=parseInt(p[2],10);return Bv(e,i,m)?(n.setUTCFullYear(e,i,m),n):new Date(NaN)}if(p=Ei.Www.exec(t),p)return h=parseInt(p[1],10)-1,zv(h)?Fv(e,h):new Date(NaN);if(p=Ei.WwwD.exec(t),p){h=parseInt(p[1],10)-1;const m=parseInt(p[2],10)-1;return zv(h,m)?Fv(e,h,m):new Date(NaN)}return null}function yA(t){let e,n,i=Ei.HH.exec(t);if(i)return e=parseFloat(i[1].replace(",",".")),Xh(e)?e%24*Yh:NaN;if(i=Ei.HHMM.exec(t),i)return e=parseInt(i[1],10),n=parseFloat(i[2].replace(",",".")),Xh(e,n)?e%24*Yh+n*Dv:NaN;if(i=Ei.HHMMSS.exec(t),i){e=parseInt(i[1],10),n=parseInt(i[2],10);const h=parseFloat(i[3].replace(",","."));return Xh(e,n,h)?e%24*Yh+n*Dv+h*1e3:NaN}return null}function Fv(t,e,n){e=e||0,n=n||0;const i=new Date(0);i.setUTCFullYear(t,0,4);const h=i.getUTCDay()||7,p=e*7+n+1-h;return i.setUTCDate(i.getUTCDate()+p),i}const wA=[31,28,31,30,31,30,31,31,30,31,30,31],bA=[31,29,31,30,31,30,31,31,30,31,30,31];function Wv(t){return t%400===0||t%4===0&&t%100!==0}function Bv(t,e,n){if(e<0||e>11)return!1;if(n!=null){if(n<1)return!1;const i=Wv(t);if(i&&n>bA[e]||!i&&n>wA[e])return!1}return!0}function xA(t,e){if(e<1)return!1;const n=Wv(t);return!(n&&e>366||!n&&e>365)}function zv(t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function Xh(t,e,n){return!(t<0||t>=25||e!=null&&(e<0||e>=60)||n!=null&&(n<0||n>=60))}const CA=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function kA(t,e,n={}){e=String(e);const i=e.match(CA);if(i){const h=Pv(n.originalDate||t,n);e=i.reduce(function(p,m){if(m[0]==="'")return p;const b=p.indexOf(m),d=p[b-1]==="'",g=p.replace(m,"'"+hA[m[0]](h,m,n)+"'");return d?g.substring(0,b-1)+g.substring(b+1):g},e)}return rs(t,e,n)}function SA(t,e,n){t=Pv(t,n);const i=Gh(e,t,!0),h=new Date(t.getTime()-i),p=new Date(0);return p.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),p.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),p}function ic(t,e,n,i){return i={...i,timeZone:e,originalDate:t},kA(SA(t,e,{timeZone:i.timeZone}),n,i)}const rc="yyyy-MM-dd",jv="HH:mm:ss.SSS",Hv="HH:mm:ss",oc=`${rc} ${jv}`,Uv=`${rc} ${Hv}`,Vv=Pn("R",{methods:{parseDateTime(t,e){return t.includes(" ")&&(t=t.replace(" ","T")),e&&e==="UTC"&&(t+="Z"),Date.parse(t)},formatUtcToLocal(t,e){return rs(!e||e==="local"?X_(t,t.getTimezoneOffset()):t,oc)},formatDateTime(t,e){return!e||e==="local"?rs(t,oc):ic(t,e,oc)},formatDateTimeHMS(t,e){return!e||e==="local"?rs(t,Uv):ic(t,e,Uv)},formatDate:function(t,e){return!e||e==="local"?rs(t,rc):ic(t,this.timeZone,rc)},formatTime:function(t,e,n=jv){return!e||e==="local"?rs(t,n):ic(t,this.timeZone,n)},formatTimeHMS:function(t,e){return this.formatTime(t,e,Hv)},formatTimestamp(t,e){return this.formatDateTime(O_(t),e)},formatSeconds(t,e){return this.formatDateTime(new Date(t*1e3),e)},formatNanoseconds(t,e){return this.formatDateTime(new Date(parseInt(t)/1e6),e)}}});var _A=Object.defineProperty,AA=(t,e,n)=>e in t?_A(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,tt=(t,e,n)=>AA(t,typeof e!="symbol"?e+"":e,n);function Zh(t,e,n){const i=pn(t,n==null?void 0:n.in);return isNaN(e)?Kn((n==null?void 0:n.in)||t,NaN):(e&&i.setDate(i.getDate()+e),i)}function $A(t,e){const n=pn(t,void 0).getDay();return n===0?7:n}function MA(t,e){const n=TA(e)?new e(0):Kn(e,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}function TA(t){var e;return typeof t=="function"&&((e=t.prototype)==null?void 0:e.constructor)===t}const IA=10;let Gv=class{constructor(){tt(this,"subPriority",0)}validate(e,n){return!0}},EA=class extends Gv{constructor(e,n,i,h,p){super(),this.value=e,this.validateValue=n,this.setValue=i,this.priority=h,p&&(this.subPriority=p)}validate(e,n){return this.validateValue(e,this.value,n)}set(e,n,i){return this.setValue(e,n,this.value,i)}},LA=class extends Gv{constructor(e,n){super(),tt(this,"priority",IA),tt(this,"subPriority",-1),this.context=e||(i=>Kn(n,i))}set(e,n){return n.timestampIsSet?e:Kn(e,MA(e,this.context))}};class Zt{run(e,n,i,h){const p=this.parse(e,n,i,h);return p?{setter:new EA(p.value,this.validate,this.set,this.priority,this.subPriority),rest:p.rest}:null}validate(e,n,i){return!0}}let RA=class extends Zt{constructor(){super(...arguments),tt(this,"priority",140),tt(this,"incompatibleTokens",["R","u","t","T"])}parse(e,n,i){switch(n){case"G":case"GG":case"GGG":return i.era(e,{width:"abbreviated"})||i.era(e,{width:"narrow"});case"GGGGG":return i.era(e,{width:"narrow"});case"GGGG":default:return i.era(e,{width:"wide"})||i.era(e,{width:"abbreviated"})||i.era(e,{width:"narrow"})}}set(e,n,i){return n.era=i,e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}};const Wn={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Xr={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Bn(t,e){return t&&{value:e(t.value),rest:t.rest}}function Sn(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function Zr(t,e){const n=e.match(t);if(!n)return null;if(n[0]==="Z")return{value:0,rest:e.slice(1)};const i=n[1]==="+"?1:-1,h=n[2]?parseInt(n[2],10):0,p=n[3]?parseInt(n[3],10):0,m=n[5]?parseInt(n[5],10):0;return{value:i*(h*ou+p*wl+m*e0),rest:e.slice(n[0].length)}}function Kv(t){return Sn(Wn.anyDigitsSigned,t)}function In(t,e){switch(t){case 1:return Sn(Wn.singleDigit,e);case 2:return Sn(Wn.twoDigits,e);case 3:return Sn(Wn.threeDigits,e);case 4:return Sn(Wn.fourDigits,e);default:return Sn(new RegExp("^\\d{1,"+t+"}"),e)}}function qv(t,e){switch(t){case 1:return Sn(Wn.singleDigitSigned,e);case 2:return Sn(Wn.twoDigitsSigned,e);case 3:return Sn(Wn.threeDigitsSigned,e);case 4:return Sn(Wn.fourDigitsSigned,e);default:return Sn(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Qh(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Yv(t,e){const n=e>0,i=n?e:1-e;let h;if(i<=50)h=t||100;else{const p=i+50,m=Math.trunc(p/100)*100,b=t>=p%100;h=t+m-(b?100:0)}return n?h:1-h}function Xv(t){return t%400===0||t%4===0&&t%100!==0}let OA=class extends Zt{constructor(){super(...arguments),tt(this,"priority",130),tt(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,n,i){const h=p=>({year:p,isTwoDigitYear:n==="yy"});switch(n){case"y":return Bn(In(4,e),h);case"yo":return Bn(i.ordinalNumber(e,{unit:"year"}),h);default:return Bn(In(n.length,e),h)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,i){const h=e.getFullYear();if(i.isTwoDigitYear){const m=Yv(i.year,h);return e.setFullYear(m,0,1),e.setHours(0,0,0,0),e}const p=!("era"in n)||n.era===1?i.year:1-i.year;return e.setFullYear(p,0,1),e.setHours(0,0,0,0),e}},NA=class extends Zt{constructor(){super(...arguments),tt(this,"priority",130),tt(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,n,i){const h=p=>({year:p,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Bn(In(4,e),h);case"Yo":return Bn(i.ordinalNumber(e,{unit:"year"}),h);default:return Bn(In(n.length,e),h)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,i,h){const p=lu(e,h);if(i.isTwoDigitYear){const b=Yv(i.year,p);return e.setFullYear(b,0,h.firstWeekContainsDate),e.setHours(0,0,0,0),Lo(e,h)}const m=!("era"in n)||n.era===1?i.year:1-i.year;return e.setFullYear(m,0,h.firstWeekContainsDate),e.setHours(0,0,0,0),Lo(e,h)}},DA=class extends Zt{constructor(){super(...arguments),tt(this,"priority",130),tt(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,n){return qv(n==="R"?4:n.length,e)}set(e,n,i){const h=Kn(e,0);return h.setFullYear(i,0,4),h.setHours(0,0,0,0),js(h)}},PA=class extends Zt{constructor(){super(...arguments),tt(this,"priority",130),tt(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,n){return qv(n==="u"?4:n.length,e)}set(e,n,i){return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}},FA=class extends Zt{constructor(){super(...arguments),tt(this,"priority",120),tt(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,n,i){switch(n){case"Q":case"QQ":return In(n.length,e);case"Qo":return i.ordinalNumber(e,{unit:"quarter"});case"QQQ":return i.quarter(e,{width:"abbreviated",context:"formatting"})||i.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(e,{width:"wide",context:"formatting"})||i.quarter(e,{width:"abbreviated",context:"formatting"})||i.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=1&&n<=4}set(e,n,i){return e.setMonth((i-1)*3,1),e.setHours(0,0,0,0),e}},WA=class extends Zt{constructor(){super(...arguments),tt(this,"priority",120),tt(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,n,i){switch(n){case"q":case"qq":return In(n.length,e);case"qo":return i.ordinalNumber(e,{unit:"quarter"});case"qqq":return i.quarter(e,{width:"abbreviated",context:"standalone"})||i.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(e,{width:"wide",context:"standalone"})||i.quarter(e,{width:"abbreviated",context:"standalone"})||i.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=1&&n<=4}set(e,n,i){return e.setMonth((i-1)*3,1),e.setHours(0,0,0,0),e}},BA=class extends Zt{constructor(){super(...arguments),tt(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),tt(this,"priority",110)}parse(e,n,i){const h=p=>p-1;switch(n){case"M":return Bn(Sn(Wn.month,e),h);case"MM":return Bn(In(2,e),h);case"Mo":return Bn(i.ordinalNumber(e,{unit:"month"}),h);case"MMM":return i.month(e,{width:"abbreviated",context:"formatting"})||i.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(e,{width:"wide",context:"formatting"})||i.month(e,{width:"abbreviated",context:"formatting"})||i.month(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=11}set(e,n,i){return e.setMonth(i,1),e.setHours(0,0,0,0),e}},zA=class extends Zt{constructor(){super(...arguments),tt(this,"priority",110),tt(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,n,i){const h=p=>p-1;switch(n){case"L":return Bn(Sn(Wn.month,e),h);case"LL":return Bn(In(2,e),h);case"Lo":return Bn(i.ordinalNumber(e,{unit:"month"}),h);case"LLL":return i.month(e,{width:"abbreviated",context:"standalone"})||i.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(e,{width:"wide",context:"standalone"})||i.month(e,{width:"abbreviated",context:"standalone"})||i.month(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=11}set(e,n,i){return e.setMonth(i,1),e.setHours(0,0,0,0),e}};function jA(t,e,n){const i=pn(t,n==null?void 0:n.in),h=Pp(i,n)-e;return i.setDate(i.getDate()-h*7),pn(i,n==null?void 0:n.in)}let HA=class extends Zt{constructor(){super(...arguments),tt(this,"priority",100),tt(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,n,i){switch(n){case"w":return Sn(Wn.week,e);case"wo":return i.ordinalNumber(e,{unit:"week"});default:return In(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,i,h){return Lo(jA(e,i,h),h)}};function UA(t,e,n){const i=pn(t,void 0),h=Dp(i)-e;return i.setDate(i.getDate()-h*7),i}let VA=class extends Zt{constructor(){super(...arguments),tt(this,"priority",100),tt(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,n,i){switch(n){case"I":return Sn(Wn.week,e);case"Io":return i.ordinalNumber(e,{unit:"week"});default:return In(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,i){return js(UA(e,i))}};const GA=[31,28,31,30,31,30,31,31,30,31,30,31],KA=[31,29,31,30,31,30,31,31,30,31,30,31];let qA=class extends Zt{constructor(){super(...arguments),tt(this,"priority",90),tt(this,"subPriority",1),tt(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,n,i){switch(n){case"d":return Sn(Wn.date,e);case"do":return i.ordinalNumber(e,{unit:"date"});default:return In(n.length,e)}}validate(e,n){const i=e.getFullYear(),h=Xv(i),p=e.getMonth();return h?n>=1&&n<=KA[p]:n>=1&&n<=GA[p]}set(e,n,i){return e.setDate(i),e.setHours(0,0,0,0),e}},YA=class extends Zt{constructor(){super(...arguments),tt(this,"priority",90),tt(this,"subpriority",1),tt(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,n,i){switch(n){case"D":case"DD":return Sn(Wn.dayOfYear,e);case"Do":return i.ordinalNumber(e,{unit:"date"});default:return In(n.length,e)}}validate(e,n){const i=e.getFullYear();return Xv(i)?n>=1&&n<=366:n>=1&&n<=365}set(e,n,i){return e.setMonth(0,i),e.setHours(0,0,0,0),e}};function Jh(t,e,n){var i,h,p,m;const b=zs(),d=(n==null?void 0:n.weekStartsOn)??((h=(i=n==null?void 0:n.locale)==null?void 0:i.options)==null?void 0:h.weekStartsOn)??b.weekStartsOn??((m=(p=b.locale)==null?void 0:p.options)==null?void 0:m.weekStartsOn)??0,g=pn(t,n==null?void 0:n.in),o=g.getDay(),a=(e%7+7)%7,u=7-d,l=e<0||e>6?e-(o+u)%7:(a+u)%7-(o+u)%7;return Zh(g,l,n)}let XA=class extends Zt{constructor(){super(...arguments),tt(this,"priority",90),tt(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,n,i){switch(n){case"E":case"EE":case"EEE":return i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,i,h){return e=Jh(e,i,h),e.setHours(0,0,0,0),e}},ZA=class extends Zt{constructor(){super(...arguments),tt(this,"priority",90),tt(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,n,i,h){const p=m=>{const b=Math.floor((m-1)/7)*7;return(m+h.weekStartsOn+6)%7+b};switch(n){case"e":case"ee":return Bn(In(n.length,e),p);case"eo":return Bn(i.ordinalNumber(e,{unit:"day"}),p);case"eee":return i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"eeeee":return i.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,i,h){return e=Jh(e,i,h),e.setHours(0,0,0,0),e}},QA=class extends Zt{constructor(){super(...arguments),tt(this,"priority",90),tt(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,n,i,h){const p=m=>{const b=Math.floor((m-1)/7)*7;return(m+h.weekStartsOn+6)%7+b};switch(n){case"c":case"cc":return Bn(In(n.length,e),p);case"co":return Bn(i.ordinalNumber(e,{unit:"day"}),p);case"ccc":return i.day(e,{width:"abbreviated",context:"standalone"})||i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"});case"ccccc":return i.day(e,{width:"narrow",context:"standalone"});case"cccccc":return i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(e,{width:"wide",context:"standalone"})||i.day(e,{width:"abbreviated",context:"standalone"})||i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=6}set(e,n,i,h){return e=Jh(e,i,h),e.setHours(0,0,0,0),e}};function JA(t,e,n){const i=pn(t,void 0),h=$A(i),p=e-h;return Zh(i,p,n)}let e$=class extends Zt{constructor(){super(...arguments),tt(this,"priority",90),tt(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,n,i){const h=p=>p===0?7:p;switch(n){case"i":case"ii":return In(n.length,e);case"io":return i.ordinalNumber(e,{unit:"day"});case"iii":return Bn(i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),h);case"iiiii":return Bn(i.day(e,{width:"narrow",context:"formatting"}),h);case"iiiiii":return Bn(i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),h);case"iiii":default:return Bn(i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),h)}}validate(e,n){return n>=1&&n<=7}set(e,n,i){return e=JA(e,i),e.setHours(0,0,0,0),e}},t$=class extends Zt{constructor(){super(...arguments),tt(this,"priority",80),tt(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,n,i){switch(n){case"a":case"aa":case"aaa":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,i){return e.setHours(Qh(i),0,0,0),e}},n$=class extends Zt{constructor(){super(...arguments),tt(this,"priority",80),tt(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,n,i){switch(n){case"b":case"bb":case"bbb":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,i){return e.setHours(Qh(i),0,0,0),e}},i$=class extends Zt{constructor(){super(...arguments),tt(this,"priority",80),tt(this,"incompatibleTokens",["a","b","t","T"])}parse(e,n,i){switch(n){case"B":case"BB":case"BBB":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,i){return e.setHours(Qh(i),0,0,0),e}},r$=class extends Zt{constructor(){super(...arguments),tt(this,"priority",70),tt(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,n,i){switch(n){case"h":return Sn(Wn.hour12h,e);case"ho":return i.ordinalNumber(e,{unit:"hour"});default:return In(n.length,e)}}validate(e,n){return n>=1&&n<=12}set(e,n,i){const h=e.getHours()>=12;return h&&i<12?e.setHours(i+12,0,0,0):!h&&i===12?e.setHours(0,0,0,0):e.setHours(i,0,0,0),e}};class o$ extends Zt{constructor(){super(...arguments),tt(this,"priority",70),tt(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,n,i){switch(n){case"H":return Sn(Wn.hour23h,e);case"Ho":return i.ordinalNumber(e,{unit:"hour"});default:return In(n.length,e)}}validate(e,n){return n>=0&&n<=23}set(e,n,i){return e.setHours(i,0,0,0),e}}let s$=class extends Zt{constructor(){super(...arguments),tt(this,"priority",70),tt(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,n,i){switch(n){case"K":return Sn(Wn.hour11h,e);case"Ko":return i.ordinalNumber(e,{unit:"hour"});default:return In(n.length,e)}}validate(e,n){return n>=0&&n<=11}set(e,n,i){return e.getHours()>=12&&i<12?e.setHours(i+12,0,0,0):e.setHours(i,0,0,0),e}},a$=class extends Zt{constructor(){super(...arguments),tt(this,"priority",70),tt(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,n,i){switch(n){case"k":return Sn(Wn.hour24h,e);case"ko":return i.ordinalNumber(e,{unit:"hour"});default:return In(n.length,e)}}validate(e,n){return n>=1&&n<=24}set(e,n,i){const h=i<=24?i%24:i;return e.setHours(h,0,0,0),e}},l$=class extends Zt{constructor(){super(...arguments),tt(this,"priority",60),tt(this,"incompatibleTokens",["t","T"])}parse(e,n,i){switch(n){case"m":return Sn(Wn.minute,e);case"mo":return i.ordinalNumber(e,{unit:"minute"});default:return In(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,i){return e.setMinutes(i,0,0),e}},c$=class extends Zt{constructor(){super(...arguments),tt(this,"priority",50),tt(this,"incompatibleTokens",["t","T"])}parse(e,n,i){switch(n){case"s":return Sn(Wn.second,e);case"so":return i.ordinalNumber(e,{unit:"second"});default:return In(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,i){return e.setSeconds(i,0),e}},u$=class extends Zt{constructor(){super(...arguments),tt(this,"priority",30),tt(this,"incompatibleTokens",["t","T"])}parse(e,n){const i=h=>Math.trunc(h*Math.pow(10,-n.length+3));return Bn(In(n.length,e),i)}set(e,n,i){return e.setMilliseconds(i),e}},h$=class extends Zt{constructor(){super(...arguments),tt(this,"priority",10),tt(this,"incompatibleTokens",["t","T","x"])}parse(e,n){switch(n){case"X":return Zr(Xr.basicOptionalMinutes,e);case"XX":return Zr(Xr.basic,e);case"XXXX":return Zr(Xr.basicOptionalSeconds,e);case"XXXXX":return Zr(Xr.extendedOptionalSeconds,e);case"XXX":default:return Zr(Xr.extended,e)}}set(e,n,i){return n.timestampIsSet?e:Kn(e,e.getTime()-bl(e)-i)}},d$=class extends Zt{constructor(){super(...arguments),tt(this,"priority",10),tt(this,"incompatibleTokens",["t","T","X"])}parse(e,n){switch(n){case"x":return Zr(Xr.basicOptionalMinutes,e);case"xx":return Zr(Xr.basic,e);case"xxxx":return Zr(Xr.basicOptionalSeconds,e);case"xxxxx":return Zr(Xr.extendedOptionalSeconds,e);case"xxx":default:return Zr(Xr.extended,e)}}set(e,n,i){return n.timestampIsSet?e:Kn(e,e.getTime()-bl(e)-i)}},p$=class extends Zt{constructor(){super(...arguments),tt(this,"priority",40),tt(this,"incompatibleTokens","*")}parse(e){return Kv(e)}set(e,n,i){return[Kn(e,i*1e3),{timestampIsSet:!0}]}},g$=class extends Zt{constructor(){super(...arguments),tt(this,"priority",20),tt(this,"incompatibleTokens","*")}parse(e){return Kv(e)}set(e,n,i){return[Kn(e,i),{timestampIsSet:!0}]}};const f$={G:new RA,y:new OA,Y:new NA,R:new DA,u:new PA,Q:new FA,q:new WA,M:new BA,L:new zA,w:new HA,I:new VA,d:new qA,D:new YA,E:new XA,e:new ZA,c:new QA,i:new e$,a:new t$,b:new n$,B:new i$,h:new r$,H:new o$,K:new s$,k:new a$,m:new l$,s:new c$,S:new u$,X:new h$,x:new d$,t:new p$,T:new g$},m$=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,v$=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,y$=/^'([^]*?)'?$/,w$=/''/g,b$=/\S/,x$=/[a-zA-Z]/;function ed(t,e,n,i){var h,p,m,b;const d=()=>Kn(n,NaN),g=Av(),o=g.locale??Np,a=g.firstWeekContainsDate??((p=(h=g.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,u=g.weekStartsOn??((b=(m=g.locale)==null?void 0:m.options)==null?void 0:b.weekStartsOn)??0;if(!e)return t?d():pn(n,void 0);const l={firstWeekContainsDate:a,weekStartsOn:u,locale:o},s=[new LA(void 0,n)],c=e.match(v$).map(M=>{const k=M[0];if(k in cu){const C=cu[k];return C(M,o.formatLong)}return M}).join("").match(m$),f=[];for(let M of c){Up(M)&&uu(M,e,t),Hp(M)&&uu(M,e,t);const k=M[0],C=f$[k];if(C){const{incompatibleTokens:O}=C;if(Array.isArray(O)){const R=f.find(I=>O.includes(I.token)||I.token===k);if(R)throw new RangeError(`The format string mustn't contain \`${R.fullToken}\` and \`${M}\` at the same time`)}else if(C.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${M}\` and any other token at the same time`);f.push({token:k,fullToken:M});const L=C.run(t,M,o.match,l);if(!L)return d();s.push(L.setter),t=L.rest}else{if(k.match(x$))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");if(M==="''"?M="'":k==="'"&&(M=C$(M)),t.indexOf(M)===0)t=t.slice(M.length);else return d()}}if(t.length>0&&b$.test(t))return d();const w=s.map(M=>M.priority).sort((M,k)=>k-M).filter((M,k,C)=>C.indexOf(M)===k).map(M=>s.filter(k=>k.priority===M).sort((k,C)=>C.subPriority-k.subPriority)).map(M=>M[0]);let x=pn(n,void 0);if(isNaN(+x))return d();const E={};for(const M of w){if(!M.validate(x,l))return d();const k=M.set(x,E,l);Array.isArray(k)?(x=k[0],Object.assign(E,k[1])):x=k}return x}function C$(t){return t.match(y$)[1].replace(w$,"'")}const k$={props:{allowAll:{type:Boolean,default:!1},allowAllTargets:{type:Boolean,default:!1},allowAllArrayIndex:{type:Boolean,default:!1},buttonText:{type:String,default:null},chooseItem:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},initialTargetName:{type:String,default:""},initialPacketName:{type:String,default:""},initialItemName:{type:String,default:""},selectTypes:{type:Boolean,default:!1},showLatest:{type:Boolean,default:!1},mode:{type:String,default:"tlm",validator:t=>["cmd","tlm"].includes(t)},unknown:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},lockTarget:{type:Boolean,default:!1},lockPacket:{type:Boolean,default:!1}},emits:["on-set","addItem"],data(){var t,e,n;return{targetNames:[],selectedTargetName:(t=this.initialTargetName)==null?void 0:t.toUpperCase(),packetNames:[],selectedPacketName:(e=this.initialPacketName)==null?void 0:e.toUpperCase(),itemNames:[],selectedItemName:(n=this.initialItemName)==null?void 0:n.toUpperCase(),valueTypes:["CONVERTED","RAW"],selectedValueType:"CONVERTED",reductionModes:[{title:"NONE",value:"DECOM"},{title:"REDUCED_MINUTE",value:"REDUCED_MINUTE"},{title:"REDUCED_HOUR",value:"REDUCED_HOUR"},{title:"REDUCED_DAY",value:"REDUCED_DAY"}],selectedArrayIndex:null,selectedReduced:"DECOM",reducedTypes:["MIN","MAX","AVG","STDDEV"],selectedReducedType:"AVG",description:"",hazardous:!1,internalDisabled:!1,packetsDisabled:!1,itemsDisabled:!1,api:null,ALL:{label:"[ ALL ]",value:"ALL",description:"ALL"},UNKNOWN:{label:"[ UNKNOWN ]",value:"UNKNOWN",description:"UNKNOWN"}}},computed:{actualButtonText:function(){return this.selectedPacketName==="ALL"?"Add Target":this.selectedItemName==="ALL"?"Add Packet":this.buttonText},autocompleteDisabled:function(){return this.disabled||this.internalDisabled},buttonDisabled:function(){return this.disabled||this.internalDisabled||this.selectedTargetName===null||this.selectedPacketName===null||this.selectedItemNameWIndex===null},colSize:function(){return this.vertical?12:!1},selectedItemNameWIndex:function(){return this.itemIsArray&&this.selectedArrayIndex!==null&&this.selectedArrayIndex!==this.ALL.label?`${this.selectedItemName}[${this.selectedArrayIndex}]`:this.selectedItemName},includeLatestPacketInDropdown:function(){return this.showLatest&&this.mode==="tlm"},arrayIndexes:function(){let t=this.itemNames.findIndex(n=>n.value===this.selectedItemName),e=[...Array(this.itemNames[t].array).keys()];return(this.allowAll||this.allowAllArrayIndex)&&e.unshift(this.ALL.label),e},itemIsArray:function(){let t=this.itemNames.findIndex(e=>e.value===this.selectedItemName);return!(t===-1||isNaN(this.itemNames[t].array))}},watch:{initialTargetName:function(t){t&&(this.selectedTargetName=t.toUpperCase())},initialPacketName:function(t){t&&(this.selectedPacketName=t.toUpperCase())},initialItemName:function(t){t&&(this.selectedItemName=t.toUpperCase())},mode:function(t,e){this.selectedPacketName=null,this.selectedItemName=null,this.targetNameChanged(this.selectedTargetName)},chooseItem:function(t,e){t?this.updateItems():this.itemNames=[]},itemIsArray:function(t){t?this.selectedArrayIndex||(this.selectedArrayIndex=0):this.selectedArrayIndex=null}},created(){this.internalDisabled=!0,this.api=new Ks,this.api.get_target_names().then(t=>{this.targetNames=t.flatMap(e=>e=="UNKNOWN"?[]:{label:e,value:e}),this.allowAllTargets&&this.targetNames.unshift(this.ALL),this.selectedTargetName?this.updatePackets():(this.selectedTargetName=this.targetNames[0].value,this.targetNameChanged(this.selectedTargetName)),this.unknown&&this.targetNames.push(this.UNKNOWN)})},methods:{updatePackets:function(){if(this.selectedTargetName==="UNKNOWN"){this.packetNames=[this.UNKNOWN],this.selectedPacketName=this.packetNames[0].value,this.updatePacketDetails(this.UNKNOWN.value),this.description="UNKNOWN";return}if(this.selectedTargetName==="ALL"){this.packetNames=[this.ALL],this.selectedPacketName=this.packetNames[0].value,this.updatePacketDetails(this.ALL.value),this.description="ALL";return}this.internalDisabled=!0;const t=this.mode==="tlm"?"get_all_tlm_names":"get_all_cmd_names";this.api[t](this.selectedTargetName,this.hidden).then(e=>{this.packetNames=e.map(n=>({label:n,value:n})),this.allowAll&&this.packetNames.unshift(this.ALL),this.selectedPacketName||(this.packetNames.length===0?this.selectedPacketName=null:this.selectedPacketName=this.packetNames[0].value),this.updatePacketDetails(this.selectedPacketName),this.packetNames.find(n=>n.value===this.selectedPacketName)&&this.chooseItem&&this.updateItems(),this.internalDisabled=!1})},updateItems:function(){if(this.selectedPacketName!=="ALL")if(this.internalDisabled=!0,this.selectedPacketName==="LATEST")this.api.get_all_tlm_item_names(this.selectedTargetName).then(t=>{this.itemNames=t.map(e=>({label:e,value:e,description:`LATEST ${e}`})),this.finishUpdateItems()});else{const t=this.mode==="tlm"?"get_tlm":"get_cmd";this.api[t](this.selectedTargetName,this.selectedPacketName).then(e=>{this.itemNames=e.items.map(n=>{let i=n.name;return n.data_type=="DERIVED"&&(i+=" *"),{label:i,value:n.name,description:n.description,array:n.array_size/n.bit_size}}),this.itemNames.sort((n,i)=>n.label>i.label?1:-1),this.finishUpdateItems()})}},finishUpdateItems:function(){this.allowAll&&this.itemNames.unshift(this.ALL),this.selectedItemName||(this.selectedItemName=this.itemNames[0].value),this.description=this.itemNames[0].description,this.$emit("on-set",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,itemName:this.selectedItemNameWIndex,valueType:this.selectedValueType,reduced:this.selectedReduced,reducedType:this.selectedReducedType}),this.internalDisabled=!1},targetNameChanged:function(t){this.selectedTargetName=t,this.selectedPacketName="",this.selectedItemName="",t!==null&&this.updatePackets()},packetNameChanged:function(t){this.selectedItemName="",t!==null&&this.updatePacketDetails(t)},updatePacketDetails:function(t){if(t==="ALL")this.itemsDisabled=!0,this.internalDisabled=!1;else if(t==="LATEST")this.itemsDisabled=!1,this.selectedPacketName="LATEST";else{this.itemsDisabled=!1;const e=this.packetNames.find(n=>t===n.value);if(e){this.selectedPacketName=e.value;const n=this.mode==="tlm"?"get_tlm":"get_cmd";this.api[n](this.selectedTargetName,this.selectedPacketName).then(i=>{this.description=i.description,this.hazardous=i.hazardous})}}this.chooseItem?this.updateItems():this.$emit("on-set",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,itemName:this.selectedItemNameWIndex,valueType:this.selectedValueType,reduced:this.selectedReduced,reducedType:this.selectedReducedType})},itemNameChanged:function(t){const e=this.itemNames.find(n=>t===n.value);e&&(this.selectedItemName=e.value,this.description=e.description,this.$emit("on-set",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,itemName:this.selectedItemNameWIndex,valueType:this.selectedValueType,reduced:this.selectedReduced,reducedType:this.selectedReducedType}))},indexChanged:function(t){this.$emit("on-set",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,itemName:this.selectedItemNameWIndex,valueType:this.selectedValueType,reduced:this.selectedReduced,reducedType:this.selectedReducedType})},buttonPressed:function(){this.selectedPacketName==="ALL"?this.allTargetPacketItems():this.selectedItemName==="ALL"?this.allPacketItems():this.chooseItem?this.$emit("addItem",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,itemName:this.selectedItemNameWIndex,valueType:this.selectedValueType,reduced:this.selectedReduced,reducedType:this.selectedReducedType}):this.$emit("addItem",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,valueType:this.selectedValueType,reduced:this.selectedReduced,reducedType:this.selectedReducedType})},allTargetPacketItems:function(){this.packetNames.forEach(t=>{if(t===this.ALL)return;const e=this.mode==="tlm"?"get_tlm":"get_cmd";this.api[e](this.selectedTargetName,t.value).then(n=>{n.items.forEach(i=>{this.$emit("addItem",{targetName:this.selectedTargetName,packetName:t.value,itemName:i.name,valueType:this.selectedValueType,reduced:this.selectedReduced,reducedType:this.selectedReducedType})})})})},allPacketItems:function(){this.itemNames.forEach(t=>{t!==this.ALL&&this.$emit("addItem",{targetName:this.selectedTargetName,packetName:this.selectedPacketName,itemName:t.value,valueType:this.selectedValueType,reduced:this.selectedReduced,reducedType:this.selectedReducedType})})}}},S$={class:"pt-4 pb-4"};function _$(t,e,n,i,h,p){const m=Fe("v-autocomplete"),b=Fe("v-col"),d=Fe("v-list-item"),g=Fe("v-divider"),o=Fe("v-combobox"),a=Fe("v-btn"),u=Fe("v-row");return Ue(),qt("div",S$,[se(u,{"no-gutters":!n.vertical},{default:pe(()=>[se(b,{cols:p.colSize,class:"tpic-select pr-4","data-test":"select-target"},{default:pe(()=>[se(m,{modelValue:h.selectedTargetName,"onUpdate:modelValue":[e[0]||(e[0]=l=>h.selectedTargetName=l),p.targetNameChanged],label:"Select Target","hide-details":"",density:"compact",variant:"outlined",disabled:p.autocompleteDisabled||n.lockTarget,items:h.targetNames,"item-title":"label","item-value":"value"},null,8,["modelValue","disabled","items","onUpdate:modelValue"])]),_:1},8,["cols"]),se(b,{cols:p.colSize,class:"tpic-select pr-4","data-test":"select-packet"},{default:pe(()=>[se(m,{modelValue:h.selectedPacketName,"onUpdate:modelValue":[e[2]||(e[2]=l=>h.selectedPacketName=l),p.packetNameChanged],label:"Select Packet","hide-details":"",density:"compact",variant:"outlined",disabled:h.packetsDisabled||p.autocompleteDisabled||n.lockPacket,items:h.packetNames,"item-title":"label","item-value":"value"},gp({_:2},[p.includeLatestPacketInDropdown?{name:"prepend-item",fn:pe(()=>[se(d,{title:"LATEST",onClick:e[1]||(e[1]=l=>p.packetNameChanged("LATEST"))}),se(g)]),key:"0"}:void 0]),1032,["modelValue","disabled","items","onUpdate:modelValue"])]),_:1},8,["cols"]),n.chooseItem?(Ue(),ht(b,{key:0,cols:p.colSize,class:"tpic-select pr-4","data-test":"select-item"},{default:pe(()=>[se(m,{modelValue:h.selectedItemName,"onUpdate:modelValue":[e[3]||(e[3]=l=>h.selectedItemName=l),e[4]||(e[4]=l=>p.itemNameChanged(l))],label:"Select Item","hide-details":"",density:"compact",variant:"outlined",disabled:h.itemsDisabled||p.autocompleteDisabled,items:h.itemNames,"item-title":"label","item-value":"value"},null,8,["modelValue","disabled","items"])]),_:1},8,["cols"])):Ht("",!0),n.chooseItem&&p.itemIsArray?(Ue(),ht(b,{key:1,cols:"1",class:"tpic-select pr-4","data-test":"array-index",style:{"min-width":"105px"}},{default:pe(()=>[se(o,{modelValue:h.selectedArrayIndex,"onUpdate:modelValue":[e[5]||(e[5]=l=>h.selectedArrayIndex=l),e[6]||(e[6]=l=>p.indexChanged(l))],label:"Index","hide-details":"",density:"compact",variant:"outlined",disabled:h.itemsDisabled||p.autocompleteDisabled,items:p.arrayIndexes,"item-title":"label","item-value":"value"},null,8,["modelValue","disabled","items"])]),_:1})):Ht("",!0),n.buttonText?(Ue(),ht(b,{key:2,cols:p.colSize,style:{"max-width":"140px"}},{default:pe(()=>[se(a,{disabled:p.buttonDisabled,color:"primary","data-test":"select-send",onClick:p.buttonPressed},{default:pe(()=>[Be(dt(p.actualButtonText),1)]),_:1},8,["disabled","onClick"])]),_:1},8,["cols"])):Ht("",!0)]),_:1},8,["no-gutters"]),n.selectTypes?(Ue(),ht(u,{key:0,class:"pt-6","no-gutters":""},{default:pe(()=>[se(b,{cols:p.colSize,class:"tpic-select pr-4","data-test":"data-type"},{default:pe(()=>[se(m,{modelValue:h.selectedValueType,"onUpdate:modelValue":e[7]||(e[7]=l=>h.selectedValueType=l),label:"Value Type","hide-details":"",density:"compact",variant:"outlined",items:h.valueTypes},null,8,["modelValue","items"])]),_:1},8,["cols"]),se(b,{cols:p.colSize,class:"tpic-select pr-4","data-test":"reduced"},{default:pe(()=>[se(m,{modelValue:h.selectedReduced,"onUpdate:modelValue":e[8]||(e[8]=l=>h.selectedReduced=l),label:"Reduced","hide-details":"",density:"compact",variant:"outlined",items:h.reductionModes},null,8,["modelValue","items"])]),_:1},8,["cols"]),se(b,{cols:p.colSize,class:"tpic-select pr-4","data-test":"reduced-type"},{default:pe(()=>[se(m,{modelValue:h.selectedReducedType,"onUpdate:modelValue":e[9]||(e[9]=l=>h.selectedReducedType=l),label:"Reduced Type","hide-details":"",density:"compact",variant:"outlined",disabled:h.selectedReduced==="DECOM",items:h.reducedTypes},null,8,["modelValue","disabled","items"])]),_:1},8,["cols"]),se(b,{cols:p.colSize,style:{"max-width":"140px"}},null,8,["cols"])]),_:1})):Ht("",!0),se(u,{"no-gutters":"",class:"pa-3"},{default:pe(()=>[se(b,{cols:p.colSize,class:Sa({"openc3-yellow":h.hazardous})},{default:pe(()=>[Be(" Description: "+dt(h.description)+" ",1),h.hazardous?(Ue(),qt(Mr,{key:0},[Be(" (HAZARDOUS) ")],64)):Ht("",!0)]),_:1},8,["cols","class"])]),_:1})])}const Zv=Zi(k$,[["render",_$],["__scopeId","data-v-404c7763"]]),A$={components:{TargetPacketItemChooser:Zv},mixins:[Vv],props:{modelValue:Boolean,title:{type:String,required:!0},legendPosition:{type:String,required:!0},items:{type:Array,required:!0},graphMinY:{type:Number},graphMaxY:{type:Number},lines:{type:Array,required:!0},colors:{type:Array,required:!0},startDateTime:{type:Number},endDateTime:{type:Number},timeZone:{type:String,required:!0},xAxisItemPacket:{type:Object,default:void 0},xAxisItem:{type:String,default:"__time"}},emits:["cancel","ok","remove","update:modelValue","update:xAxisItem"],data:function(){return{tab:0,graph:{},customXAxisEnabled:!1,selectedXAxisItem:null,pendingXAxisSelection:null,legendPositions:["top","bottom","left","right"],startDate:null,startTime:null,endDate:null,endTime:null,lineHeaders:[{title:"Y Value",value:"yValue"},{title:"Color",value:"color"},{title:"Actions",value:"actions",sortable:!1}],itemHeaders:[{title:"Target Name",value:"targetName"},{title:"Packet Name",value:"packetName"},{title:"Item Name",value:"itemName"},{title:"Actions",value:"actions",sortable:!1}],rules:{date:t=>{if(!t)return!0;try{return su(ed(t,"yyyy-MM-dd",new Date))||"Invalid date (YYYY-MM-DD)"}catch{return"Invalid date (YYYY-MM-DD)"}},time:t=>{if(!t)return!0;try{return su(ed(t,"HH:mm:ss",new Date))||"Invalid time (HH:MM:SS)"}catch{return"Invalid time (HH:MM:SS)"}}}}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},editItems:function(){if(!this.items)return[];let t=0;return this.items.map(e=>(t+=1,{...e,itemId:t}))},initialXAxisItem:function(){if(this.xAxisItem!=="__time")return this.xAxisItem.split("__").at(4)}},created(){if(this.graph={title:this.title,legendPosition:this.legendPosition,items:this.items,graphMinY:this.graphMinY,graphMaxY:this.graphMaxY,lines:[...this.lines]},this.customXAxisEnabled=this.xAxisItem&&this.xAxisItem!=="__time",this.selectedXAxisItem=this.xAxisItem,this.startDateTime){let t=pn(this.startDateTime/1e6);this.startDate=this.formatDate(t,this.timeZone),this.startTime=this.formatTimeHMS(t,this.timeZone)}else{let t=new Date-36e5;this.startDate=this.formatDate(t,this.timeZone),this.startTime=this.formatTimeHMS(t,this.timeZone)}if(this.endDateTime){let t=pn(this.endDateTime/1e6);this.endDate=this.formatDate(t,this.timeZone),this.endTime=this.formatTimeHMS(t,this.timeZone)}},methods:{closeOk(){this.startDate&&this.startTime?this.graph.startDateTime=this.startDate+" "+this.startTime:this.graph.startDateTime=null,this.endDate&&this.endTime?this.graph.endDateTime=this.endDate+" "+this.endTime:this.graph.endDateTime=null,this.$emit("ok",this.graph)},addLine(){this.graph.lines.push({yValue:0,color:"white"})},removeLine(t){let e=this.graph.lines.indexOf(t);this.graph.lines.splice(e,1)},customXAxisToggled(t){t||(this.selectedXAxisItem="__time",this.$emit("update:xAxisItem","__time"))},xAxisItemChanged(t){this.pendingXAxisSelection=t},xAxisItemSelected(t){if(t.targetName&&t.packetName&&t.itemName){const e=`DECOM__TLM__${t.targetName}__${t.packetName}__${t.itemName}__CONVERTED`;this.selectedXAxisItem=e,this.$emit("update:xAxisItem",e)}}}},$$={class:"edit-box"},M$={class:"edit-box"},T$={class:"edit-box"},I$={class:"edit-box"},E$={class:"edit-box"};function L$(t,e,n,i,h,p){const m=Fe("v-spacer"),b=Fe("v-toolbar"),d=Fe("v-tab"),g=Fe("v-tabs"),o=Fe("v-text-field"),a=Fe("v-card-text"),u=Fe("v-col"),l=Fe("v-select"),s=Fe("v-row"),c=Fe("v-tabs-window-item"),f=Fe("v-btn"),w=Fe("v-list-item"),x=Fe("v-list"),E=Fe("v-checkbox"),M=Fe("target-packet-item-chooser"),k=Fe("v-data-table"),C=Fe("v-tabs-window"),O=Fe("v-card-actions"),L=Fe("v-card"),R=Fe("v-dialog");return Ue(),ht(R,{modelValue:p.show,"onUpdate:modelValue":e[13]||(e[13]=I=>p.show=I),"max-width":"700",onKeydown:e[14]||(e[14]=eu(I=>t.$emit("cancel"),["esc"]))},{default:pe(()=>[se(b,{height:"24"},{default:pe(()=>[se(m),e[15]||(e[15]=Yt("span",null," Edit Graph ",-1)),se(m)]),_:1}),se(L,{class:"pa-3"},{default:pe(()=>[se(g,{modelValue:t.tab,"onUpdate:modelValue":e[0]||(e[0]=I=>t.tab=I),class:"ml-3"},{default:pe(()=>[se(d,{value:"0"},{default:pe(()=>[...e[16]||(e[16]=[Be(" Settings ",-1)])]),_:1}),se(d,{value:"1"},{default:pe(()=>[...e[17]||(e[17]=[Be(" Scale / Lines ",-1)])]),_:1}),se(d,{value:"2"},{default:pe(()=>[...e[18]||(e[18]=[Be(" Items ",-1)])]),_:1})]),_:1},8,["modelValue"]),se(C,{modelValue:t.tab,"onUpdate:modelValue":e[11]||(e[11]=I=>t.tab=I)},{default:pe(()=>[se(c,{value:"0",eager:""},{default:pe(()=>[Yt("div",$$,[se(s,null,{default:pe(()=>[se(u,null,{default:pe(()=>[se(a,{class:"pa-0"},{default:pe(()=>[se(o,{modelValue:t.graph.title,"onUpdate:modelValue":e[1]||(e[1]=I=>t.graph.title=I),class:"pb-2",label:"Title","hide-details":""},null,8,["modelValue"])]),_:1})]),_:1}),se(u,null,{default:pe(()=>[se(l,{modelValue:t.graph.legendPosition,"onUpdate:modelValue":e[2]||(e[2]=I=>t.graph.legendPosition=I),label:"Legend Position","hide-details":"",items:t.legendPositions,style:{"max-width":"280px"}},null,8,["modelValue","items"])]),_:1})]),_:1})]),Yt("div",M$,[se(a,{class:"pa-0"},{default:pe(()=>[...e[19]||(e[19]=[Be(" Select a start date/time for the graph. Leave blank for start now. ",-1)])]),_:1}),se(s,null,{default:pe(()=>[se(u,null,{default:pe(()=>[se(o,{modelValue:t.startDate,"onUpdate:modelValue":e[3]||(e[3]=I=>t.startDate=I),label:"Start Date",name:`date${Date.now()}`,rules:[t.rules.date],type:"date"},null,8,["modelValue","name","rules"])]),_:1}),se(u,null,{default:pe(()=>[se(o,{modelValue:t.startTime,"onUpdate:modelValue":e[4]||(e[4]=I=>t.startTime=I),label:"Start Time",name:`time${Date.now()}`,rules:[t.rules.time],type:"time",step:"1"},null,8,["modelValue","name","rules"])]),_:1})]),_:1}),se(a,{class:"pa-0"},{default:pe(()=>[...e[20]||(e[20]=[Be(" Select a end date/time for the graph. Leave blank for continuous real-time graphing. ",-1)])]),_:1}),se(s,null,{default:pe(()=>[se(u,null,{default:pe(()=>[se(o,{modelValue:t.endDate,"onUpdate:modelValue":e[5]||(e[5]=I=>t.endDate=I),label:"End Date",name:`date${Date.now()}`,rules:[t.rules.date],type:"date"},null,8,["modelValue","name","rules"])]),_:1}),se(u,null,{default:pe(()=>[se(o,{modelValue:t.endTime,"onUpdate:modelValue":e[6]||(e[6]=I=>t.endTime=I),label:"End Time",name:`time${Date.now()}`,rules:[t.rules.time],type:"time",step:"1"},null,8,["modelValue","name","rules"])]),_:1})]),_:1})])]),_:1}),se(c,{value:"1",eager:""},{default:pe(()=>[Yt("div",T$,[se(a,{class:"pa-0"},{default:pe(()=>[...e[21]||(e[21]=[Be(" Set a min or max Y value to override automatic scaling ",-1)])]),_:1}),se(s,{dense:""},{default:pe(()=>[se(u,{class:"px-2"},{default:pe(()=>[se(o,{modelValue:t.graph.graphMinY,"onUpdate:modelValue":e[7]||(e[7]=I=>t.graph.graphMinY=I),"hide-details":"",label:"Min Y Axis (Optional)",type:"number"},null,8,["modelValue"])]),_:1}),se(u,{class:"px-2"},{default:pe(()=>[se(o,{modelValue:t.graph.graphMaxY,"onUpdate:modelValue":e[8]||(e[8]=I=>t.graph.graphMaxY=I),"hide-details":"",label:"Max Y Axis (Optional)",type:"number"},null,8,["modelValue"])]),_:1})]),_:1})]),Yt("div",I$,[se(x,{density:"compact",class:"horizontal-lines"},{default:pe(()=>[se(w,null,{default:pe(()=>[e[23]||(e[23]=Yt("span",{style:{"padding-top":"5px"}}," Add horizontal lines to the graph ",-1)),se(m),se(f,{onClick:e[9]||(e[9]=I=>p.addLine())},{default:pe(()=>[...e[22]||(e[22]=[Be(" New Line ",-1)])]),_:1})]),_:1}),(Ue(!0),qt(Mr,null,Ws(t.graph.lines,(I,z)=>(Ue(),ht(w,{key:z,value:I,color:"primary"},{default:pe(()=>[se(s,null,{default:pe(()=>[se(u,null,{default:pe(()=>[se(o,{modelValue:I.yValue,"onUpdate:modelValue":F=>I.yValue=F,label:"Y Value"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),se(u,null,{default:pe(()=>[se(l,{modelValue:I.color,"onUpdate:modelValue":F=>I.color=F,label:"Color","hide-details":"",items:n.colors},null,8,["modelValue","onUpdate:modelValue","items"])]),_:2},1024),se(u,null,{default:pe(()=>[se(f,{style:{padding:"30px"},icon:"mdi-delete",variant:"text","aria-label":"Remove Line",onClick:F=>p.removeLine(I)},null,8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1032,["value"]))),128))]),_:1})]),Yt("div",E$,[se(a,{class:"pa-0 text-medium-emphasis"},{default:pe(()=>[...e[24]||(e[24]=[Be(" Choose a different item to use for the graph's X axis. If unchecked, the graph will use the packet's PACKET_TIMESECONDS item if it exists, otherwise it will use RECEIVED_TIMESECONDS. ",-1),Yt("br",null,null,-1),Yt("span",{class:"font-italic"}," Note that the graph may not work correctly if you choose an item that does not strictly increase in value. It is recommended to use a counter or timestamp. ",-1)])]),_:1}),se(E,{modelValue:t.customXAxisEnabled,"onUpdate:modelValue":[e[10]||(e[10]=I=>t.customXAxisEnabled=I),p.customXAxisToggled],disabled:!n.xAxisItemPacket,label:"Custom X axis item",density:"compact","hide-details":""},null,8,["modelValue","disabled","onUpdate:modelValue"]),n.xAxisItemPacket?Ht("",!0):(Ue(),ht(a,{key:0,class:"pa-0 text-medium-emphasis"},{default:pe(()=>[...e[25]||(e[25]=[Be(" All items on the graph must be in the same packet to enable this feature. ",-1)])]),_:1})),t.customXAxisEnabled&&n.xAxisItemPacket?(Ue(),ht(M,{key:1,"initial-target-name":n.xAxisItemPacket.targetName,"initial-packet-name":n.xAxisItemPacket.packetName,"initial-item-name":p.initialXAxisItem,"choose-item":"","lock-target":"","lock-packet":"","button-text":"Set",onOnSet:p.xAxisItemChanged,onAddItem:p.xAxisItemSelected},null,8,["initial-target-name","initial-packet-name","initial-item-name","onOnSet","onAddItem"])):Ht("",!0)])]),_:1}),se(c,{value:"2",eager:""},{default:pe(()=>[se(k,{"item-key":"itemId",class:"elevation-1 my-2","data-test":"edit-graph-items",headers:t.itemHeaders,items:p.editItems,"items-per-page":5,"footer-props":{"items-per-page-options":[5]}},{"item.actions":pe(({item:I})=>[se(f,{icon:"mdi-delete",variant:"text","aria-label":"Remove Item",onClick:z=>t.$emit("remove",I)},null,8,["onClick"])]),"no-data":pe(()=>[...e[26]||(e[26]=[Yt("span",null," Currently no items on this graph ",-1)])]),_:1},8,["headers","items"])]),_:1})]),_:1},8,["modelValue"]),se(O,{class:"px-2"},{default:pe(()=>[se(m),se(f,{variant:"outlined",onClick:e[12]||(e[12]=I=>t.$emit("cancel"))},{default:pe(()=>[...e[27]||(e[27]=[Be(" Cancel ",-1)])]),_:1}),se(f,{variant:"flat",onClick:p.closeOk},{default:pe(()=>[...e[28]||(e[28]=[Be(" Ok ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])}const R$=Zi(A$,[["render",L$]]),O$={props:{modelValue:Boolean,item:{type:Object,required:!0},colors:{type:Array,required:!0}},emits:["cancel","changeColor","changeLimits","close","update:modelValue"],data:function(){return{editItem:null,limitsName:"NONE",limits:{NONE:[]},valueTypes:["CONVERTED","RAW"],reduction:[{title:"NONE",value:"DECOM"},{title:"REDUCED_MINUTE",value:"REDUCED_MINUTE"},{title:"REDUCED_HOUR",value:"REDUCED_HOUR"},{title:"REDUCED_DAY",value:"REDUCED_DAY"}],reducedTypes:["MIN","MAX","AVG","STDDEV"]}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},limitsNames(){return Object.keys(this.limits)}},async created(){this.editItem={...this.item},new Ks().get_item(this.item.targetName,this.item.packetName,this.item.itemName).then(t=>{for(const[e,n]of Object.entries(t.limits))Object.keys(n).includes("red_low")&&(this.limits[e]=Object.values(n));this.limitsName=Object.keys(this.limits).find(e=>this.limits[e]+""==this.editItem.limits+"")})}},N$={key:0},D$={class:"pa-3"};function P$(t,e,n,i,h,p){const m=Fe("v-card-title"),b=Fe("v-select"),d=Fe("v-card-text"),g=Fe("v-spacer"),o=Fe("v-btn"),a=Fe("v-card-actions"),u=Fe("v-card"),l=Fe("v-dialog");return Ue(),ht(l,{modelValue:p.show,"onUpdate:modelValue":e[9]||(e[9]=s=>p.show=s),width:"400",onKeydown:e[10]||(e[10]=eu(s=>t.success(),["enter"]))},{default:pe(()=>[se(u,null,{default:pe(()=>[se(m,{class:"mb-2"},{default:pe(()=>[...e[11]||(e[11]=[Be("Edit Item",-1)])]),_:1}),se(d,null,{default:pe(()=>[se(b,{modelValue:t.editItem.valueType,"onUpdate:modelValue":e[0]||(e[0]=s=>t.editItem.valueType=s),variant:"outlined","hide-details":"",label:"Value Type",items:t.valueTypes,class:"mb-2"},null,8,["modelValue","items"]),se(b,{modelValue:t.editItem.reduced,"onUpdate:modelValue":e[1]||(e[1]=s=>t.editItem.reduced=s),variant:"outlined","hide-details":"",label:"Reduction",items:t.reduction,class:"mb-2"},null,8,["modelValue","items"]),se(b,{modelValue:t.editItem.reducedType,"onUpdate:modelValue":e[2]||(e[2]=s=>t.editItem.reducedType=s),variant:"outlined","hide-details":"",label:"Reduced Type",items:t.reducedTypes,disabled:t.editItem.reduced==="DECOM",class:"mb-2"},null,8,["modelValue","items","disabled"]),se(b,{modelValue:t.editItem.color,"onUpdate:modelValue":[e[3]||(e[3]=s=>t.editItem.color=s),e[4]||(e[4]=s=>t.$emit("changeColor",s))],variant:"outlined","hide-details":"",label:"Color",items:n.colors,class:"mb-2"},null,8,["modelValue","items"]),p.limitsNames.length>1?(Ue(),qt("div",N$,[se(b,{modelValue:t.limitsName,"onUpdate:modelValue":[e[5]||(e[5]=s=>t.limitsName=s),e[6]||(e[6]=s=>t.$emit("changeLimits",t.limits[t.limitsName]))],variant:"outlined","hide-details":"",label:"Display Limits",items:p.limitsNames},null,8,["modelValue","items"]),Yt("div",D$,dt(t.limitsName)+": "+dt(t.limits[t.limitsName]),1)])):Ht("",!0)]),_:1}),se(a,{class:"px-2"},{default:pe(()=>[se(g),se(o,{variant:"outlined",onClick:e[7]||(e[7]=s=>t.$emit("cancel"))},{default:pe(()=>[...e[12]||(e[12]=[Be(" Cancel ",-1)])]),_:1}),se(o,{variant:"flat",onClick:e[8]||(e[8]=s=>t.$emit("close",t.editItem))},{default:pe(()=>[...e[13]||(e[13]=[Be(" Ok ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const F$=Zi(O$,[["render",P$]]),sc="__time",W$={components:{GraphEditDialog:R$,GraphEditItemDialog:F$},mixins:[Vv],props:{id:{type:Number,required:!0},selectedGraphId:{type:Number,default:null},state:{type:String,required:!0},startTime:{type:Number,default:null},secondsGraphed:{type:Number,required:!0},pointsSaved:{type:Number,required:!0},pointsGraphed:{type:Number,required:!0},refreshIntervalMs:{type:Number,default:200},hideToolbar:{type:Boolean,default:!1},hideOverview:{type:Boolean,default:!1},sparkline:{type:Boolean,default:!1},initialItems:{type:Array,default:()=>[]},initialXAxisItem:{type:String,default:sc},height:{type:Number,default:null},width:{type:Number,default:null},timeZone:{type:String,default:"local"}},emits:["click","close-graph","edit","min-max-graph","pause","resize","start","started"],data(){return{api:null,lines:[],active:!0,expand:!0,fullWidth:!0,fullHeight:!0,graph:null,editGraph:!1,editGraphMenu:!1,editGraphMenuX:0,editGraphMenuY:0,editItem:!1,itemMenu:!1,itemMenuX:0,itemMenuY:0,legendMenu:!1,legendMenuX:0,legendMenuY:0,legendPosition:"bottom",selectedItem:null,hideToolbarData:this.hideToolbar,showOverview:!this.hideOverview,hideOverviewData:this.hideOverview,title:"",overview:null,data:[[]],dataChanged:!1,interval:null,graphMinY:null,graphMaxY:null,graphStartDateTime:null,graphEndDateTime:null,xAxisItem:this.initialXAxisItem,indexes:{},items:this.initialItems,graphItems:[],lastPlaybackDateTime:null,limitsValues:[],drawInterval:null,zoomChart:!1,zoomOverview:!1,cable:new tf,subscription:null,needToUpdate:!1,errorDialog:!1,errors:[],colorIndex:0,colors:["#00c7cb","#938bdb","#4dacff","lime","darkorange","red","gold","hotpink","tan","cyan","maroon","blue","teal","purple","green","brown","lightblue","white","black"]}},computed:{calcFullSize:function(){return this.fullWidth||this.fullHeight},error:function(){return this.errorDialog&&this.errors.length>0?JSON.stringify(this.errors,null,4):null},itemSubscriptionKeys:function(){return this.items.map(this.subscriptionKey)},allowableXAxisItemPacket:function(){if(!this.canUseCustomXAxisItem||this.items.length===0)return;const{targetName:t,packetName:e}=this.items[0];return{targetName:t,packetName:e}},canUseCustomXAxisItem:function(){if(this.items.length===0)return!0;const{targetName:t,packetName:e}=this.items[0];return this.items.every(n=>n.targetName===t&&n.packetName===e)},actualXAxisItem:function(){return this.canUseCustomXAxisItem&&this.xAxisItem?this.xAxisItem:sc},xAxisConverter:function(){return this.xAxisIsDefault?t=>t/1e9:t=>t},xAxisFormatter:function(){return t=>t==null?"--":this.xAxisIsTime?this.formatSeconds(t,this.timeZone):t},xAxisLabel:function(){return this.xAxisIsTime?"Time":this.actualXAxisItem.split("__").at(-2)},xAxisIsDefault:function(){return this.actualXAxisItem===sc},xAxisIsTime:function(){const t=["PACKET_TIMESECONDS","RECEIVED_TIMESECONDS"];return this.xAxisIsDefault||t.includes(this.actualXAxisItem.split("__").at(4))},xAxisIsAlsoGraphedItem:function(){return this.itemSubscriptionKeys.includes(this.actualXAxisItem)},playbackMode:function(){return this.$store.state.playback.playbackMode},playbackDateTime:function(){return this.$store.state.playback.playbackDateTime},playbackStep:function(){return this.$store.state.playback.playbackStep}},watch:{state:function(t,e){switch(t){case"start":e==="stop"&&this.startGraph();break;case"stop":this.stopGraph();break}},playbackMode:function(t,e){this.playbackMode==="playback"?this.setupPlaybackMode():(this.lastPlaybackDateTime=null,this.clearAllData(),this.startGraph())},playbackDateTime:function(t,e){this.playbackMode==="playback"&&(this.lastPlaybackDateTime===null||this.lastPlaybackDateTime>this.playbackDateTime?this.clearAllData():this.api.get_tlm_values(this.graphItems,30,null,this.lastPlaybackDateTime,this.playbackDateTime).then(n=>{if(n.length>0){if(Array.isArray(n[0])&&Array.isArray(n[0][0]))for(let i=0;i<n.length;i++)for(let h=0;h<n[i].length;h++)if(h===0){let p=n[i][h][0],m=new Date(p);this.data[0].push(m.getTime()/1e3)}else this.data[h].push(n[i][h][0]);else if(Array.isArray(n)&&n.length>=2)for(let i=0;i<n.length;i++)if(i===0){let h=n[i][0],p=new Date(h);this.data[0].push(p.getTime()/1e3)}else this.data[i].push(n[i][0])}this.dataChanged=!0,this.updateGraphData()}),this.lastPlaybackDateTime=this.playbackDateTime)},data:function(t,e){this.dataChanged=!0},graphMinY:function(t,e){let n=parseFloat(t);isNaN(n)||(this.graphMinY=n),this.setGraphRange()},graphMaxY:function(t,e){let n=parseFloat(t);isNaN(n)||(this.graphMaxY=n),this.setGraphRange()},graphStartDateTime:function(t,e){t&&typeof t=="string"?(this.graphStartDateTime=this.parseDateTime(this.graphStartDateTime,this.timeZone)*1e6,this.graphStartDateTime!==e&&(this.needToUpdate=!0)):t===null&&e&&(this.graphStartDateTime=null,this.needToUpdate=!0)},graphEndDateTime:function(t,e){t&&typeof t=="string"?(this.graphEndDateTime=this.parseDateTime(this.graphEndDateTime,this.timeZone)*1e6,this.graphEndDateTime!==e&&(this.needToUpdate=!0)):t===null&&e&&(this.graphEndDateTime=null,this.needToUpdate=!0)},actualXAxisItem:function(t,e){let n=JSON.parse(JSON.stringify(this.items));this.removeItems(n),this.graph.destroy(),this.chartOpts.series[0].label=this.xAxisLabel,this.chartOpts.scales.x.time=this.xAxisIsTime,this.graph=new yn(this.chartOpts,this.data,document.getElementById(`chart${this.id}`)),this.hideOverview||(this.overview.destroy(),this.overviewOpts.scales.x.time=this.xAxisIsTime,this.overview=new yn(this.overviewOpts,this.data,document.getElementById(`overview${this.id}`))),this.addItems(n)},refreshIntervalMs:function(t){this.interval&&(clearInterval(this.interval),this.interval=setInterval(()=>{this.updateGraphData()},t))}},created(){this.api=new Ks,this.title=`Graph ${this.id}`;for(const[t,e]of this.items.entries())this.data.push([]),this.indexes[this.subscriptionKey(e)]=t+1,e.color===void 0&&(e.color=this.colors[this.colorIndex]),this.colorIndex++,this.colorIndex===this.colors.length&&(this.colorIndex=0)},mounted(){const{chartSeries:t,overviewSeries:e}=this.items.reduce((n,i)=>{const h={spanGaps:!0};return n.chartSeries.push({...h,item:i,label:this.formatLabel(i),stroke:(p,m)=>this.items[m-1].color,width:2,value:(p,m)=>typeof m=="string"||isNaN(m)?"NaN":m==null?"--":m.toFixed(3)}),n.overviewSeries.push({...h}),n},{chartSeries:[],overviewSeries:[]});if(this.chartOpts={},this.sparkline)this.hideToolbarData=!0,this.hideOverviewData=!0,this.showOverview=!1,this.chartOpts={width:this.width,height:this.height,pxAlign:!1,cursor:{show:!1},select:{show:!1},legend:{show:!1},scales:{x:{time:!1}},axes:[{show:!1},{show:!1}],series:[{},{stroke:"white"}]},this.graph=new yn(this.chartOpts,this.data,document.getElementById(`chart${this.id}`));else{let n=Intl.DateTimeFormat().resolvedOptions().timeZone;this.timeZone&&this.timeZone!=="local"&&(n=this.timeZone),this.chartOpts={...this.getSize("chart"),...this.getScales(),...this.getAxes("chart"),plugins:[this.linesPlugin()],tzDate:i=>yn.tzDate(new Date(i*1e3),n),series:[{label:this.xAxisLabel,value:(i,h)=>this.xAxisFormatter(h)},...t],cursor:{drag:{x:!0,y:!1},sync:{key:"openc3"},bind:{mouseup:(i,h,p)=>m=>{this.state==="pause"&&i.select.width===0&&this.$emit("start"),p(m)}}},hooks:{setScale:[(i,h)=>{if(h==="x"&&!this.zoomOverview&&this.overview){this.zoomChart=!0;let p=Math.round(this.overview.valToPos(i.scales.x.min,"x")),m=Math.round(this.overview.valToPos(i.scales.x.max,"x"));this.overview.setSelect({left:p,width:m-p}),this.zoomChart=!1}}],setSelect:[i=>{this.state==="start"&&i.select.width>0&&this.$emit("pause")}],ready:[i=>{i.root.querySelector(".u-over").addEventListener("contextmenu",p=>{p.preventDefault(),this.itemMenu=!1,this.legendMenu=!1,this.editGraphMenuX=p.clientX,this.editGraphMenuY=p.clientY,this.editGraphMenu=!0});let h=i.root.querySelector(".u-legend");h.addEventListener("contextmenu",p=>{p.preventDefault(),this.editGraphMenu=!1,this.legendMenu=!1,this.itemMenuX=p.clientX,this.itemMenuY=p.clientY;let m=p.target.closest(".u-series"),b=Array.prototype.slice.call(h.childNodes[0].childNodes).indexOf(m),d=i.series[b];d.item?(this.selectedItem=d.item,this.itemMenu=!0):(this.itemMenu=!1,this.legendMenuX=p.clientX,this.legendMenuY=p.clientY,this.legendMenu=!0)}),h.querySelector("tbody").appendChild(this.$refs.info)}]}},this.graph=new yn(this.chartOpts,this.data,document.getElementById(`chart${this.id}`)),this.overviewOpts={...this.getSize("overview"),...this.getScales(),...this.getAxes("overview"),tzDate:i=>yn.tzDate(new Date(i*1e3),n),series:[...e],cursor:{y:!1,drag:{setScale:!1,x:!0,y:!1}},legend:{show:!1},hooks:{setSelect:[i=>{if(!this.zoomChart){this.state==="start"&&i.select.width>0&&this.$emit("pause"),this.zoomOverview=!0;let h=i.posToVal(i.select.left,"x"),p=i.posToVal(i.select.left+i.select.width,"x");this.graph.setScale("x",{min:h,max:p}),this.zoomOverview=!1}}]}},this.hideOverview||(this.overview=new yn(this.overviewOpts,this.data,document.getElementById(`overview${this.id}`))),this.moveLegend(this.legendPosition),window.addEventListener("resize",this.resize)}this.playbackMode!=="playback"?this.state!=="stop"&&this.startGraph():this.setupPlaybackMode()},beforeUnmount:function(){this.stopGraph(),this.cable.disconnect(),window.removeEventListener("resize",this.resize)},methods:{setupPlaybackMode:function(){this.stopGraph(),this.clearAllData();const t=this.itemSubscriptionKeys.map(e=>e.split("__").slice(2).join("__"));if(this.actualXAxisItem===sc){const e=t[0].split("__").slice(0,2).join("__");t.unshift(`${e}__PACKET_TIMESECONDS__RAW`)}else this.xAxisIsAlsoGraphedItem||t.unshift(this.actualXAxisItem);this.api.get_tlm_available(t).then(e=>{this.graphItems=e,t.length!=e.length&&console.log("Error getting tlm available",t,this.graphItems)})},startGraph:function(){this.subscribe(),this.interval=setInterval(()=>{this.updateGraphData()},this.refreshIntervalMs)},stopGraph:function(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.interval&&(clearInterval(this.interval),this.interval=null)},updateGraphData:function(){if(this.state==="pause"||!this.dataChanged)return;this.graph.setData(this.data),this.overview&&this.overview.setData(this.data);const t=this.data[0];if(t&&t.length){let e=t.at(-1);const n=[t.at(0)];this.pointsGraphed<=t.length&&n.push(t.at(-this.pointsGraphed)),this.xAxisIsTime&&n.push(e-this.secondsGraphed);const i=Math.max(...n);i===e&&(e+=1),this.graph.setScale("x",{min:i,max:e})}this.dataChanged=!1},formatLabel(t){if(t.valueType==="CONVERTED"&&t.reduced==="DECOM")return t.itemName;{let e="";return t.valueType!=="CONVERTED"&&(e+=t.valueType),t.reduced!=="DECOM"&&(e!==""&&(e+=" "),e+=`${t.reduced.split("_")[1]} ${t.reducedType}`),`${t.itemName} (${e})`}},moveLegend:function(t){switch(t){case"bottom":this.graph.root.classList.remove("side-legend"),this.graph.root.classList.remove("left-legend"),this.graph.root.classList.remove("top-legend");break;case"top":this.graph.root.classList.remove("side-legend"),this.graph.root.classList.remove("left-legend"),this.graph.root.classList.add("top-legend");break;case"left":this.graph.root.classList.remove("top-legend"),this.graph.root.classList.add("side-legend"),this.graph.root.classList.add("left-legend");break;case"right":this.graph.root.classList.remove("top-legend"),this.graph.root.classList.remove("left-legend"),this.graph.root.classList.add("side-legend");break}this.legendPosition=t,this.resize()},clearErrors:function(){this.errors=[]},editGraphClose:function(t){this.editGraph=!1,this.title=t.title,this.legendPosition=t.legendPosition,this.graphMinY=t.graphMinY,this.graphMaxY=t.graphMaxY,this.lines=[...t.lines],this.graphStartDateTime=t.startDateTime,this.graphEndDateTime=t.endDateTime,this.$nextTick(()=>{if(this.needToUpdate){if(this.subscription==null)this.startGraph();else{let e=JSON.parse(JSON.stringify(this.items));this.removeItems(e),setTimeout(()=>{this.addItems(e)},0)}this.needToUpdate=!1}}),this.moveLegend(this.legendPosition),this.$emit("edit")},resize:function(){this.graph.setSize(this.getSize("chart")),this.overview&&this.overview.setSize(this.getSize("overview")),this.$emit("resize",this.id)},expandAll:function(){this.fullWidth=!0,this.fullHeight=!0,this.resize()},collapseAll:function(){this.fullWidth=!1,this.fullHeight=!1,this.resize()},expandWidth:function(){this.fullWidth=!0,this.resize()},collapseWidth:function(){this.fullWidth=!1,this.resize()},expandHeight:function(){this.fullHeight=!0,this.resize()},collapseHeight:function(){this.fullHeight=!1,this.resize()},minMaxTransition:function(){this.expand=!this.expand,this.$emit("min-max-graph",this.id)},setGraphRange:function(){let t=.1;(this.graphMinY||this.graphMinY===0||this.graphMaxY||this.graphMaxY===0)&&(t=0),this.graph.scales.y.range=(e,n,i)=>{let h=n;(this.graphMinY||this.graphMinY===0)&&(h=this.graphMinY);let p=i;return(this.graphMaxY||this.graphMaxY===0)&&(p=this.graphMaxY),yn.rangeNum(h,p,t,!0)}},subscribe:function(){this.cable.createSubscription("StreamingChannel",window.openc3Scope,{received:t=>this.received(t),connected:()=>{const t=[...this.items];!this.xAxisIsDefault&&!this.xAxisIsAlsoGraphedItem&&t.push(this.actualXAxisItem),this.addItemsToSubscription(t)},disconnected:t=>{t.allowReconnect&&this.errors.push({type:"disconnected",message:"OpenC3 backend connection disconnected",time:new Date().getTime()})},rejected:()=>{this.errors.push({type:"rejected",message:"OpenC3 backend connection rejected",time:new Date().getTime()})}}).then(t=>{this.subscription=t})},getSize:function(t){let e=0;const n=document.getElementById("openc3-nav-drawer");n&&(e=n.classList.contains("v-navigation-drawer--active")?n.clientWidth:0);let i=0;(this.legendPosition==="right"||this.legendPosition==="left")&&(i=document.getElementsByClassName("u-legend")[0].clientWidth);const h=Math.max(document.documentElement.clientWidth,window.innerWidth||0)-e-i,p=Math.max(document.documentElement.clientHeight,window.innerHeight||0),m=document.getElementsByClassName("v-expansion-panel")[0];let b=100;t==="overview"?this.fullHeight&&!this.hideOverviewData?this.showOverview=!0:this.showOverview=!1:(b=p-m.clientHeight-b-250,this.fullHeight||(b=b/2+10));let d=h-70;return this.fullWidth||(d=d/2-12),{width:this.width||d,height:this.height||b}},getScales:function(){return{scales:{x:{range(t,e,n){return e==null?this.xAxisIsTime?[1566453600,1566497660]:[0,1]:[e,n]},time:this.xAxisIsTime},y:{range(t,e,n){return e==null?[-100,100]:yn.rangeNum(e,n,.1,!0)}}}}},getAxes:function(t){let e="rgba(255, 255, 255, .1)",n="white";return{axes:[{stroke:n,grid:{show:!0,stroke:e,width:2}},{size:80,stroke:n,grid:{show:t!=="overview",stroke:e,width:2},values(i,h){return(h.some(p=>p>=1e7)||h.every(p=>p<.01))&&(h=h.map(p=>p.toExponential(3))),h}}]}},closeEditItem:function(t){this.editItem=!1,(this.graphEndDateTime!==null&&this.selectedItem!==t||this.selectedItem.valueType!==t.valueType||this.selectedItem.reduced!==t.reduced||this.selectedItem.reducedType!==t.reducedType)&&this.changeItem(t)},changeColor:function(t){let e=this.subscriptionKey(this.selectedItem),n=this.indexes[e];this.items[n-1].color=t,this.selectedItem.color=t,this.graph.root.querySelectorAll(".u-marker")[n].style.borderColor=t},changeLimits:function(t){let e=this.subscriptionKey(this.selectedItem),n=this.indexes[e];this.items[n-1].limits=t,this.selectedItem.limits=t,this.limitsValues=t},linesPlugin:function(){return{hooks:{draw:t=>{const{ctx:e,bbox:n}=t,i=t.valToPos(t.scales.y.min,"y",!0),h=t.valToPos(t.scales.y.max,"y",!0),p=t.valToPos(this.limitsValues[0],"y",!0),m=t.valToPos(this.limitsValues[1],"y",!0),b=t.valToPos(this.limitsValues[2],"y",!0),d=t.valToPos(this.limitsValues[3],"y",!0);if(this.lines.forEach(g=>{t.scales.y.min<=g.yValue&&g.yValue<=t.scales.y.max&&(e.save(),e.beginPath(),e.strokeStyle=g.color,e.lineWidth=2,e.moveTo(n.left,t.valToPos(g.yValue,"y",!0)),e.lineTo(n.left+n.width,t.valToPos(g.yValue,"y",!0)),e.stroke(),e.restore())}),e.save(),e.beginPath(),e.fillStyle="rgba(255,0,0,0.15)",t.scales.y.min<this.limitsValues[0]){let g=p<h?h:p;e.fillRect(n.left,p,n.width,i-g)}if(t.scales.y.max>this.limitsValues[3]){let g=i<d?i:d;e.fillRect(n.left,h,n.width,g-h)}if(e.fillStyle="rgba(255,255,0,0.15)",t.scales.y.min<this.limitsValues[1]&&t.scales.y.max>this.limitsValues[0]){let g=m<h?h:m;e.fillRect(n.left,g,n.width,p-g)}if(t.scales.y.max>this.limitsValues[2]&&t.scales.y.min<this.limitsValues[3]){let g=i<d?i:d,o=i<b?i:b;e.fillRect(n.left,g,n.width,o-g)}if(e.fillStyle="rgba(0,255,0,0.15)",this.limitsValues.length===4){if(t.scales.y.min<this.limitsValues[2]&&t.scales.y.max>this.limitsValues[1]){let g=b<h?h:b,o=i<m?i:m;e.fillRect(n.left,g,n.width,o-g)}}else{const g=t.valToPos(this.limitsValues[4],"y",!0),o=t.valToPos(this.limitsValues[5],"y",!0);if(t.scales.y.min<this.limitsValues[4]&&t.scales.y.max>this.limitsValues[1]){let l=g<h?h:g;e.fillRect(n.left,l,n.width,m-l)}if(t.scales.y.max>this.limitsValues[5]&&t.scales.y.min<this.limitsValues[2]){let l=i<b?i:b,s=i<o?i:o;e.fillRect(n.left,l,n.width,s-l)}e.fillStyle="rgba(0,0,255,0.15)";let a=o<h?h:o,u=i<g?i:g;e.fillRect(n.left,a,n.width,u-a)}e.stroke(),e.restore()}}}},changeItem:function(t){this.removeItems([this.selectedItem]),this.selectedItem.valueType=t.valueType,this.selectedItem.reduced=t.reduced,this.selectedItem.reducedType=t.reducedType,setTimeout(()=>{this.addItems([this.selectedItem])},0)},addItems:function(t,e="CONVERTED"){t.forEach(n=>{n.valueType||(n.valueType=e),n.color||(n.color=this.colors[this.colorIndex]),n.limits||(n.limits=[]),n.limits.length>0&&(this.limitsValues=n.limits),this.colorIndex=(this.colorIndex+1)%this.colors.length,this.items.push(n);const i=this.data.length;this.graph.addSeries(this.createSeriesConfig(n),i),this.overview&&this.overview.addSeries(this.createOverviewSeriesConfig(),i),this.data.splice(i,0,Array(this.data[0].length)),this.indexes[this.subscriptionKey(n)]=i}),this.updateColorIndex(t),this.xAxisIsDefault||t.push(this.actualXAxisItem),this.addItemsToSubscription(t),this.$emit("resize"),this.$emit("edit")},createSeriesConfig:function(t){return{spanGaps:!0,item:t,label:this.formatLabel(t),stroke:(e,n)=>this.items[n-1].color,width:2,value:(e,n)=>typeof n=="string"||isNaN(n)?"NaN":n==null?"--":Math.abs(n)<.01&&n!==0||Math.abs(n)>=1e7?n.toExponential(6):n.toFixed(6)}},createOverviewSeriesConfig:function(){return{spanGaps:!0,stroke:(t,e)=>this.items[e-1].color}},updateColorIndex:function(t){const e=t[t.length-1];if(e){const n=this.colors.indexOf(e.color);n!==-1&&(this.colorIndex=(n+1)%this.colors.length)}},addItemsToSubscription:function(t=this.items){let e=this.startTime;this.graphStartDateTime&&(e=this.graphStartDateTime);const n=t.map(i=>{if(typeof i=="object")return this.subscriptionKey(i);if(typeof i=="string")return i;throw new Error(`Invalid subscription item type for ${i}: ${typeof i}`)});this.subscription&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(i=>{i&&OpenC3Auth.setTokens(),this.subscription.perform("add",{scope:window.openc3Scope,token:localStorage.openc3Token,items:n,start_time:e,end_time:this.graphEndDateTime})})},clearAllData:function(){this.data[0]=[],this.clearData(this.items)},clearData:function(t){for(const e of t.map(this.subscriptionKey)){let n=this.indexes[e];this.data[n]=Array(this.data[0].length).fill(null),this.graph.setData(this.data),this.overview&&this.overview.setData(this.data)}this.data.length===2&&(this.data[0]=[],this.graph.setData(this.data),this.overview&&this.overview.setData(this.data))},removeItems:function(t){this.removeItemsFromSubscription(t);for(const e of t.map(this.subscriptionKey)){const n=this.reorderIndexes(e);this.items.splice(n-1,1),this.data.splice(n,1),this.graph.delSeries(n),this.graph.setData(this.data),this.overview&&(this.overview.delSeries(n),this.overview.setData(this.data))}this.data.length===1&&(this.data[0]=[],this.graph.setData(this.data),this.overview&&this.overview.setData(this.data)),this.$emit("resize"),this.$emit("edit")},removeItemsFromSubscription:function(t=this.items){if(this.subscription){const e=t.map(n=>{if(typeof n=="object")return this.subscriptionKey(n);if(typeof n=="string")return n;throw new Error(`Invalid subscription item type for ${n}: ${typeof n}`)});this.subscription.perform("remove",{scope:window.openc3Scope,token:localStorage.openc3Token,items:e})}},reorderIndexes:function(t){let e=this.indexes[t];delete this.indexes[t];for(let n in this.indexes)this.indexes[n]>e&&(this.indexes[n]-=1);return e},received:function(t){this.cable.recordPing();for(let e=0;e<t.length;e++){if(!t[e].hasOwnProperty(this.actualXAxisItem))continue;let n=this.xAxisConverter(t[e][this.actualXAxisItem]),i=this.data[0].length;if(i===0||n>this.data[0][i-1]){for(let h=0;h<this.data.length;h++)this.data[h].push(null);this.setDataAtIndex(this.data[0].length-1,n,t[e])}else{let h=Gm(this.data[0],n,this.bsComparator);if(h>=0){if(!Number.isFinite(n))throw new RangeError(`Invalid x-axis value: ${n}`);for(;h>=0;)n-=1e-5,h=Gm(this.data[0],n,this.bsComparator);const p=-h-1;for(let m=0;m<this.data.length;m++)this.data[m].splice(p,0,null);this.setDataAtIndex(p,n,t[e])}else{const p=-h-1;for(let m=0;m<this.data.length;m++)this.data[m].splice(p,0,null);this.setDataAtIndex(p,n,t[e])}}}if(this.startTime==null&&this.data[0][0]){let e=this.data[0][0]*1e9;this.$emit("started",e)}this.dataChanged=!0},bsComparator:function(t,e){return t-e},setDataAtIndex:function(t,e,n){this.data[0][t]=e;for(const[i,h]of Object.entries(n)){if(i===this.actualXAxisItem&&!this.xAxisIsAlsoGraphedItem)continue;const p=this.indexes[i];if(p){let m=this.data[p];if(h!=null&&h.raw)m[t]=null;else if(typeof h=="string"){if(m[t]=null,!i.includes("__RAW")){for(let b of this.items)if(this.subscriptionKey(b)===i){this.selectedItem=b;break}this.changeItem({valueType:"RAW",reduced:this.selectedItem.reduced,reducedType:this.selectedItem.reducedType})}}else m[t]=h}}},subscriptionKey:function(t){let e=`${t.reduced}__TLM__${t.targetName}__${t.packetName}__${t.itemName}__${t.valueType}`;return(t.reduced==="REDUCED_MINUTE"||t.reduced==="REDUCED_HOUR"||t.reduced==="REDUCED_DAY")&&(e+=`__${t.reducedType}`),e}}},B$={id:"chart",ref:"chart",class:"pa-1"},z$=["id"],j$=["id"],H$={key:5,ref:"info",class:"u-series"};function U$(t,e,n,i,h,p){const m=Fe("v-btn"),b=Fe("v-spacer"),d=Fe("v-toolbar"),g=Fe("v-expand-transition"),o=Fe("v-card"),a=Fe("graph-edit-dialog"),u=Fe("v-text-field"),l=Fe("v-row"),s=Fe("v-textarea"),c=Fe("v-dialog"),f=Fe("v-list-item-title"),w=Fe("v-list-item"),x=Fe("v-list"),E=Fe("v-menu"),M=Fe("graph-edit-item-dialog"),k=Fe("v-list-subheader"),C=Fe("v-icon"),O=Fe("v-tooltip");return Ue(),qt("div",{onClick:e[22]||(e[22]=ka(L=>t.$emit("click"),["prevent"]))},[se(o,null,{default:pe(()=>[Ps(se(d,{height:"24",class:Sa(["pl-2 pr-2",n.selectedGraphId===n.id?"active":""])},{default:pe(()=>[Ps(se(m,{class:"mx-2",icon:"mdi-alert",density:"compact",variant:"text","aria-label":"Show Errors",onClick:e[0]||(e[0]=()=>{h.errorDialog=!0})},null,512),[[Fs,h.errors.length!==0]]),se(m,{icon:"mdi-pencil",variant:"text",density:"compact","data-test":"edit-graph-icon","aria-label":"Edit Graph",onClick:e[1]||(e[1]=()=>{h.editGraph=!0})}),se(b),Yt("span",null,dt(h.title),1),se(b),h.expand?(Ue(),qt(Mr,{key:0},[p.calcFullSize?(Ue(),ht(m,{key:0,icon:"mdi-arrow-collapse",variant:"text",density:"compact","data-test":"collapse-all",onClick:p.collapseAll},null,8,["onClick"])):(Ue(),ht(m,{key:1,icon:"mdi-arrow-expand",variant:"text",density:"compact","data-test":"expand-all",onClick:p.expandAll},null,8,["onClick"])),h.fullWidth?(Ue(),ht(m,{key:2,icon:"mdi-arrow-collapse-horizontal",variant:"text",density:"compact","data-test":"collapse-width",onClick:p.collapseWidth},null,8,["onClick"])):(Ue(),ht(m,{key:3,icon:"mdi-arrow-expand-horizontal",variant:"text",density:"compact","data-test":"expand-width",onClick:p.expandWidth},null,8,["onClick"])),h.fullHeight?(Ue(),ht(m,{key:4,icon:"mdi-arrow-collapse-vertical",variant:"text",density:"compact","data-test":"collapse-height",onClick:p.collapseHeight},null,8,["onClick"])):(Ue(),ht(m,{key:5,icon:"mdi-arrow-expand-vertical",variant:"text",density:"compact","data-test":"expand-height",onClick:p.expandHeight},null,8,["onClick"]))],64)):Ht("",!0),h.expand?(Ue(),ht(m,{key:1,icon:"mdi-window-minimize",variant:"text",density:"compact","data-test":"minimize-screen-icon",onClick:p.minMaxTransition},null,8,["onClick"])):(Ue(),ht(m,{key:2,icon:"mdi-window-maximize",variant:"text",density:"compact","data-test":"maximize-screen-icon",onClick:p.minMaxTransition},null,8,["onClick"])),se(m,{icon:"mdi-close-box",variant:"text",density:"compact","data-test":"close-graph-icon",onClick:e[2]||(e[2]=ka(L=>t.$emit("close-graph"),["stop"]))})]),_:1},8,["class"]),[[Fs,!h.hideToolbarData]]),se(g,null,{default:pe(()=>[Ps(Yt("div",B$,[Yt("div",{id:`chart${n.id}`},null,8,z$),e[23]||(e[23]=Yt("div",{id:"betweenCharts"},null,-1)),Ps(Yt("div",{id:`overview${n.id}`},null,8,j$),[[Fs,h.showOverview]])],512),[[Fs,h.expand]])]),_:1})]),_:1}),h.editGraph?(Ue(),ht(a,{key:0,modelValue:h.editGraph,"onUpdate:modelValue":e[3]||(e[3]=L=>h.editGraph=L),"x-axis-item":h.xAxisItem,"onUpdate:xAxisItem":e[4]||(e[4]=L=>h.xAxisItem=L),title:h.title,"legend-position":h.legendPosition,items:h.items,"graph-min-y":h.graphMinY,"graph-max-y":h.graphMaxY,lines:h.lines,colors:h.colors,"start-date-time":h.graphStartDateTime,"end-date-time":h.graphEndDateTime,"time-zone":n.timeZone,"x-axis-item-packet":p.allowableXAxisItemPacket,onRemove:e[5]||(e[5]=L=>p.removeItems([L])),onOk:p.editGraphClose,onCancel:e[6]||(e[6]=L=>h.editGraph=!1)},null,8,["modelValue","x-axis-item","title","legend-position","items","graph-min-y","graph-max-y","lines","colors","start-date-time","end-date-time","time-zone","x-axis-item-packet","onOk"])):Ht("",!0),se(c,{modelValue:h.errorDialog,"onUpdate:modelValue":e[8]||(e[8]=L=>h.errorDialog=L),"max-width":"600"},{default:pe(()=>[se(d,{height:"24"},{default:pe(()=>[se(b),e[24]||(e[24]=Yt("span",null," Errors ",-1)),se(b)]),_:1}),se(o,{class:"pa-3"},{default:pe(()=>[se(l,{dense:""},{default:pe(()=>[se(u,{modelValue:h.title,"onUpdate:modelValue":e[7]||(e[7]=L=>h.title=L),readonly:"","hide-details":"",class:"pb-2",label:"Graph Title"},null,8,["modelValue"])]),_:1}),se(l,{class:"my-3"},{default:pe(()=>[se(s,{readonly:"",rows:"8",value:p.error},null,8,["value"])]),_:1}),se(l,null,{default:pe(()=>[se(m,{block:"",onClick:p.clearErrors},{default:pe(()=>[...e[25]||(e[25]=[Be(" Clear ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),h.editGraphMenu?(Ue(),ht(E,{key:1,modelValue:h.editGraphMenu,"onUpdate:modelValue":e[10]||(e[10]=L=>h.editGraphMenu=L),target:[h.editGraphMenuX,h.editGraphMenuY],absolute:"","offset-y":""},{default:pe(()=>[se(x,null,{default:pe(()=>[se(w,{onClick:e[9]||(e[9]=L=>h.editGraph=!0)},{default:pe(()=>[se(f,{style:{cursor:"pointer"}},{default:pe(()=>[Be(" Edit "+dt(h.title),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","target"])):Ht("",!0),h.editItem?(Ue(),ht(M,{key:2,modelValue:h.editItem,"onUpdate:modelValue":e[11]||(e[11]=L=>h.editItem=L),colors:h.colors,item:h.selectedItem,onChangeColor:p.changeColor,onChangeLimits:p.changeLimits,onCancel:e[12]||(e[12]=L=>h.editItem=!1),onClose:p.closeEditItem},null,8,["modelValue","colors","item","onChangeColor","onChangeLimits","onClose"])):Ht("",!0),h.itemMenu?(Ue(),ht(E,{key:3,modelValue:h.itemMenu,"onUpdate:modelValue":e[16]||(e[16]=L=>h.itemMenu=L),target:[h.itemMenuX,h.itemMenuY],absolute:"","offset-y":""},{default:pe(()=>[se(x,{nav:"",density:"compact"},{default:pe(()=>[se(k,null,{default:pe(()=>[Be(dt(h.selectedItem.targetName)+" "+dt(h.selectedItem.packetName)+" "+dt(h.selectedItem.itemName),1)]),_:1}),se(w,{onClick:e[13]||(e[13]=L=>h.editItem=!0)},{prepend:pe(()=>[se(C,{icon:"mdi-pencil"})]),default:pe(()=>[se(f,null,{default:pe(()=>[...e[26]||(e[26]=[Be(" Edit ",-1)])]),_:1})]),_:1}),se(w,{onClick:e[14]||(e[14]=L=>p.clearData([h.selectedItem]))},{prepend:pe(()=>[se(C,{icon:"mdi-eraser"})]),default:pe(()=>[se(f,null,{default:pe(()=>[...e[27]||(e[27]=[Be(" Clear ",-1)])]),_:1})]),_:1}),se(w,{onClick:e[15]||(e[15]=L=>p.removeItems([h.selectedItem]))},{prepend:pe(()=>[se(C,{icon:"mdi-delete"})]),default:pe(()=>[se(f,null,{default:pe(()=>[...e[28]||(e[28]=[Be(" Delete ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","target"])):Ht("",!0),h.legendMenu?(Ue(),ht(E,{key:4,modelValue:h.legendMenu,"onUpdate:modelValue":e[21]||(e[21]=L=>h.legendMenu=L),target:[h.legendMenuX,h.legendMenuY],absolute:"","offset-y":""},{default:pe(()=>[se(x,null,{default:pe(()=>[se(w,{onClick:e[17]||(e[17]=L=>p.moveLegend("top"))},{default:pe(()=>[se(f,{style:{cursor:"pointer"}},{default:pe(()=>[...e[29]||(e[29]=[Be(" Legend Top ",-1)])]),_:1})]),_:1}),se(w,{onClick:e[18]||(e[18]=L=>p.moveLegend("bottom"))},{default:pe(()=>[se(f,{style:{cursor:"pointer"}},{default:pe(()=>[...e[30]||(e[30]=[Be(" Legend Bottom ",-1)])]),_:1})]),_:1}),se(w,{onClick:e[19]||(e[19]=L=>p.moveLegend("left"))},{default:pe(()=>[se(f,{style:{cursor:"pointer"}},{default:pe(()=>[...e[31]||(e[31]=[Be(" Legend Left ",-1)])]),_:1})]),_:1}),se(w,{onClick:e[20]||(e[20]=L=>p.moveLegend("right"))},{default:pe(()=>[se(f,{style:{cursor:"pointer"}},{default:pe(()=>[...e[32]||(e[32]=[Be(" Legend RIght ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue","target"])):Ht("",!0),n.sparkline?Ht("",!0):(Ue(),qt("div",H$,[se(O,{text:"Click item to toggle, Right click to edit",location:"top"},{activator:pe(({props:L})=>[se(C,dp(pp(L)),{default:pe(()=>[...e[33]||(e[33]=[Be(" mdi-information-variant-circle ",-1)])]),_:1},16)]),_:1})],512))])}const J2=Pn("e",Zi(W$,[["render",U$],["__scopeId","data-v-c388ce30"]])),Qv=Pn("s",{methods:{isFloat(t){return!!(/^\s*[-+]?\d*\.\d+\s*$/.test(t)||/^\s*[-+]?(\d+((\.\d+)?)|(\.\d+))[eE][-+]?\d+\s*$/.test(t))},isInt(t){return!!(/^\s*[-+]?\d+\s*$/.test(t)||/^\s*0[xX][\dabcdefABCDEF]+\s*$/.test(t))},isArray(t){return/^\s*\[.*\]\s*$/.test(t)},removeQuotes(t){if(t.length<2)return t;let e=t.charAt(0);if(e!=='"'&&e!=="'")return t;let n=t.charAt(t.length-1);return e!==n?t:t.slice(1,-1)},convertToString(t){let e="";if(Object.prototype.toString.call(t).slice(8,-1)==="Array"){let n=t.length;e="[ ";for(let i=0;i<n;i++)Object.prototype.toString.call(t[i]).slice(8,-1)==="String"?e+='"'+t[i]+'"':e+=t[i],i!==n-1&&(e+=", ");e+=" ]"}else if(Object.prototype.toString.call(t).slice(8,-1)==="Object")if(t.json_class==="String"&&t.raw){e="0x";for(let n of t.raw){let i=n.toString(16).toUpperCase();i.length<2&&(i="0"+i),e+=i}}else t.json_class==="Float"&&t.raw&&(e=t.raw);else e=String(t);return e}}}),V$={props:{type:{default:"tlm",validator:function(t){return["cmd","tlm"].indexOf(t)!==-1}},targetName:String,packetName:String,itemName:String,modelValue:Boolean},data(){return{details:Object,updater:null,rawValue:null,convertedValue:null,formattedValue:null,unitsValue:null}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},watch:{modelValue:function(t,e){t?(this.requestDetails(),this.type==="tlm"&&(this.updater=setInterval(()=>{this.api.get_tlm_values([`${this.targetName}__${this.packetName}__${this.itemName}__RAW`,`${this.targetName}__${this.packetName}__${this.itemName}__CONVERTED`,`${this.targetName}__${this.packetName}__${this.itemName}__FORMATTED`,`${this.targetName}__${this.packetName}__${this.itemName}__WITH_UNITS`]).then(n=>{for(let i of n){let h=null;if(i[0].json_class==="String"&&i[0].raw!==void 0?h=i[0].raw:this.details.data_type==="BLOCK"&&(h=i[0]),h!==null){h=h.slice(0,parseInt(this.details.bit_size)/8);let p=!1;h.length>64&&(p=!0),i[0]=Array.from(h.slice(0,64),function(m){return m===" "?"20":("0"+(m&255).toString(16)).slice(-2)}).join(" ").toUpperCase(),p&&(i[0]+="...")}}this.details.data_type.includes("INT")&&!this.details.array_size?this.rawValue=`${n[0][0]} (0x${n[0][0].toString(16).toUpperCase()})`:this.rawValue=n[0][0],this.convertedValue=n[1][0],this.formattedValue=n[2][0],this.unitsValue=n[3][0]})},1e3))):(clearInterval(this.updater),this.updater=null)}},created(){this.api=new Ks},beforeUnmount(){clearInterval(this.updater),this.updater=null},methods:{hasLimits(t){let e=!1;return t.limits.DEFAULT&&(e=!0),t.states&&Object.getOwnPropertyNames(t.states).forEach(n=>{t.states[n].color&&(e=!0)}),e},async requestDetails(){this.type==="tlm"?await this.api.get_item(this.targetName,this.packetName,this.itemName).then(t=>{this.details=t,this.hasLimits(t)||(this.details.limits=null)}):await this.api.get_parameter(this.targetName,this.packetName,this.itemName).then(t=>{this.details=t})},async changeLimitsEnabled(){this.details.limits.enabled?await this.api.enable_limits(this.targetName,this.packetName,this.itemName):await this.api.disable_limits(this.targetName,this.packetName,this.itemName)},formatLimit(t){return t.hasOwnProperty("green_low")?"RL/"+t.red_low+" YL/"+t.yellow_low+" YH/"+t.yellow_high+" RH/"+t.red_high+" GL/"+t.green_low+" GH/"+t.green_high:t.hasOwnProperty("red_low")?"RL/"+t.red_low+" YL/"+t.yellow_low+" YH/"+t.yellow_high+" RH/"+t.red_high:t}}},G$={key:5},K$={key:7},q$={key:3},Y$={key:9};function X$(t,e,n,i,h,p){const m=Fe("v-spacer"),b=Fe("v-toolbar"),d=Fe("v-card-title"),g=Fe("v-card-subtitle"),o=Fe("v-col"),a=Fe("v-row"),u=Fe("v-switch"),l=Fe("v-container"),s=Fe("v-card-text"),c=Fe("v-card"),f=Fe("v-dialog");return Ue(),ht(f,{modelValue:p.show,"onUpdate:modelValue":e[1]||(e[1]=w=>p.show=w),width:"700"},{default:pe(()=>[se(c,null,{default:pe(()=>[se(b,{height:24},{default:pe(()=>[se(m),e[2]||(e[2]=Yt("span",null," Details ",-1)),se(m)]),_:1}),se(d,null,{default:pe(()=>[Be(dt(n.targetName)+" "+dt(n.packetName)+" "+dt(n.itemName),1)]),_:1}),se(g,null,{default:pe(()=>[Be(dt(h.details.description),1)]),_:1}),se(s,null,{default:pe(()=>[se(l,{fluid:""},{default:pe(()=>[n.type==="tlm"?(Ue(),ht(a,{key:0,"no-gutters":""},{default:pe(()=>[se(o,{cols:"5",class:"label"},{default:pe(()=>[...e[3]||(e[3]=[Be("Item Values",-1)])]),_:1}),se(o)]),_:1})):Ht("",!0),se(a,{"no-gutters":""},{default:pe(()=>[se(o,{cols:"1"}),se(o,{cols:"4",class:"label"},{default:pe(()=>[...e[4]||(e[4]=[Be("Raw Value",-1)])]),_:1}),se(o,null,{default:pe(()=>[Be(dt(h.rawValue),1)]),_:1})]),_:1}),se(a,{"no-gutters":""},{default:pe(()=>[se(o,{cols:"1"}),se(o,{cols:"4",class:"label"},{default:pe(()=>[...e[5]||(e[5]=[Be("Converted Value",-1)])]),_:1}),se(o,null,{default:pe(()=>[Be(dt(h.convertedValue),1)]),_:1})]),_:1}),se(a,{"no-gutters":""},{default:pe(()=>[se(o,{cols:"1"}),se(o,{cols:"4",class:"label"},{default:pe(()=>[...e[6]||(e[6]=[Be("Formatted Value",-1)])]),_:1}),se(o,null,{default:pe(()=>[Be(dt(h.formattedValue),1)]),_:1})]),_:1}),se(a,{"no-gutters":""},{default:pe(()=>[se(o,{cols:"1"}),se(o,{cols:"4",class:"label"},{default:pe(()=>[...e[7]||(e[7]=[Be("With Units Value",-1)])]),_:1}),se(o,null,{default:pe(()=>[Be(dt(h.unitsValue),1)]),_:1})]),_:1}),se(a,{"no-gutters":""},{default:pe(()=>[se(o,{cols:"5",class:"label"},{default:pe(()=>[...e[8]||(e[8]=[Be("Bit Offset",-1)])]),_:1}),se(o,null,{default:pe(()=>[Be(dt(h.details.bit_offset),1)]),_:1})]),_:1}),se(a,{"no-gutters":""},{default:pe(()=>[se(o,{cols:"5",class:"label"},{default:pe(()=>[...e[9]||(e[9]=[Be("Bit Size",-1)])]),_:1}),se(o,null,{default:pe(()=>[Be(dt(h.details.bit_size),1)]),_:1})]),_:1}),h.details.array_size?(Ue(),ht(a,{key:1,"no-gutters":""},{default:pe(()=>[se(o,{cols:"5",class:"label"},{default:pe(()=>[...e[10]||(e[10]=[Be("Array Size",-1)])]),_:1}),se(o,null,{default:pe(()=>[Be(dt(h.details.array_size),1)]),_:1})]),_:1})):Ht("",!0),se(a,{"no-gutters":""},{default:pe(()=>[se(o,{cols:"5",class:"label"},{default:pe(()=>[...e[11]||(e[11]=[Be("Data Type",-1)])]),_:1}),se(o,null,{default:pe(()=>[Be(dt(h.details.data_type),1)]),_:1})]),_:1}),n.type==="cmd"?(Ue(),ht(a,{key:2,"no-gutters":""},{default:pe(()=>[se(o,{cols:"5",class:"label"},{default:pe(()=>[...e[12]||(e[12]=[Be("Minimum",-1)])]),_:1}),se(o,null,{default:pe(()=>[Be(dt(h.details.minimum),1)]),_:1})]),_:1})):Ht("",!0),n.type==="cmd"?(Ue(),ht(a,{key:3,"no-gutters":""},{default:pe(()=>[se(o,{cols:"5",class:"label"},{default:pe(()=>[...e[13]||(e[13]=[Be("Maximum",-1)])]),_:1}),se(o,null,{default:pe(()=>[Be(dt(h.details.maximum),1)]),_:1})]),_:1})):Ht("",!0),n.type==="cmd"?(Ue(),ht(a,{key:4,"no-gutters":""},{default:pe(()=>[se(o,{cols:"5",class:"label"},{default:pe(()=>[...e[14]||(e[14]=[Be("Default",-1)])]),_:1}),se(o,null,{default:pe(()=>[Be(dt(h.details.default),1)]),_:1})]),_:1})):Ht("",!0),se(a,{"no-gutters":""},{default:pe(()=>[se(o,{cols:"5",class:"label"},{default:pe(()=>[...e[15]||(e[15]=[Be("Format String",-1)])]),_:1}),se(o,null,{default:pe(()=>[Be(dt(h.details.format_string),1)]),_:1})]),_:1}),se(a,{"no-gutters":""},{default:pe(()=>[se(o,{cols:"5",class:"label"},{default:pe(()=>[...e[16]||(e[16]=[Be("Read Conversion",-1)])]),_:1}),h.details.read_conversion?(Ue(),ht(o,{key:0},{default:pe(()=>[Be(" Class: "+dt(h.details.read_conversion.class)+" ",1),e[17]||(e[17]=Yt("br",null,null,-1)),Be(" Params: "+dt(h.details.read_conversion.params),1)]),_:1})):(Ue(),ht(o,{key:1}))]),_:1}),se(a,{"no-gutters":""},{default:pe(()=>[se(o,{cols:"5",class:"label"},{default:pe(()=>[...e[18]||(e[18]=[Be("Write Conversion",-1)])]),_:1}),h.details.write_conversion?(Ue(),ht(o,{key:0},{default:pe(()=>[Be(" Class: "+dt(h.details.write_conversion.class)+" ",1),e[19]||(e[19]=Yt("br",null,null,-1)),Be(" Params: "+dt(h.details.write_conversion.params),1)]),_:1})):(Ue(),ht(o,{key:1}))]),_:1}),se(a,{"no-gutters":""},{default:pe(()=>[se(o,{cols:"5",class:"label"},{default:pe(()=>[...e[20]||(e[20]=[Be("Id Value",-1)])]),_:1}),se(o,null,{default:pe(()=>[Be(dt(h.details.id_value),1)]),_:1})]),_:1}),se(a,{"no-gutters":""},{default:pe(()=>[se(o,{cols:"5",class:"label"},{default:pe(()=>[...e[21]||(e[21]=[Be("Units Full",-1)])]),_:1}),se(o,null,{default:pe(()=>[Be(dt(h.details.units_full),1)]),_:1})]),_:1}),se(a,{"no-gutters":""},{default:pe(()=>[se(o,{cols:"5",class:"label"},{default:pe(()=>[...e[22]||(e[22]=[Be("Units Abbr",-1)])]),_:1}),se(o,null,{default:pe(()=>[Be(dt(h.details.units),1)]),_:1})]),_:1}),se(a,{"no-gutters":""},{default:pe(()=>[se(o,{cols:"5",class:"label"},{default:pe(()=>[...e[23]||(e[23]=[Be("Endianness",-1)])]),_:1}),se(o,null,{default:pe(()=>[Be(dt(h.details.endianness),1)]),_:1})]),_:1}),h.details.states?(Ue(),qt("div",G$,[se(a,{"no-gutters":""},{default:pe(()=>[se(o,{cols:"5",class:"label"},{default:pe(()=>[...e[24]||(e[24]=[Be("States",-1)])]),_:1}),se(o)]),_:1}),(Ue(!0),qt(Mr,null,Ws(h.details.states,(w,x)=>(Ue(),ht(a,{key:x,"no-gutters":""},{default:pe(()=>[se(o,{cols:"1"}),se(o,{cols:"4",class:"label"},{default:pe(()=>[Be(dt(x),1)]),_:2},1024),se(o,null,{default:pe(()=>[Be(dt(w.value),1)]),_:2},1024)]),_:2},1024))),128))])):(Ue(),ht(a,{key:6,"no-gutters":""},{default:pe(()=>[se(o,{cols:"5",class:"label"},{default:pe(()=>[...e[25]||(e[25]=[Be("States",-1)])]),_:1}),se(o,null,{default:pe(()=>[...e[26]||(e[26]=[Be("None",-1)])]),_:1})]),_:1})),h.details.limits?(Ue(),qt("div",K$,[se(a,{"no-gutters":""},{default:pe(()=>[se(o,{cols:"5",class:"label"},{default:pe(()=>[...e[27]||(e[27]=[Be("Limits",-1)])]),_:1}),se(o)]),_:1}),(Ue(!0),qt(Mr,null,Ws(h.details.limits,(w,x)=>(Ue(),ht(a,{key:x,"no-gutters":""},{default:pe(()=>[se(o,{cols:"1"}),x==="enabled"?(Ue(),ht(o,{key:0,cols:"4",class:"label"},{default:pe(()=>[...e[28]||(e[28]=[Be("Enabled",-1)])]),_:1})):Ht("",!0),x==="enabled"?(Ue(),ht(u,{key:1,modelValue:h.details.limits.enabled,"onUpdate:modelValue":[e[0]||(e[0]=E=>h.details.limits.enabled=E),p.changeLimitsEnabled],density:"compact",color:"primary",class:"compact-switch","hide-details":""},null,8,["modelValue","onUpdate:modelValue"])):Ht("",!0),x!=="enabled"?(Ue(),ht(o,{key:2,cols:"4",class:"label"},{default:pe(()=>[Be(dt(x),1)]),_:2},1024)):Ht("",!0),x!=="enabled"?(Ue(),qt("div",q$,dt(p.formatLimit(w)),1)):Ht("",!0),se(o)]),_:2},1024))),128))])):(Ue(),ht(a,{key:8,"no-gutters":""},{default:pe(()=>[se(o,{cols:"5",class:"label"},{default:pe(()=>[...e[29]||(e[29]=[Be("Limits",-1)])]),_:1}),se(o,null,{default:pe(()=>[...e[30]||(e[30]=[Be("None",-1)])]),_:1})]),_:1})),h.details.meta?(Ue(),qt("div",Y$,[se(a,{"no-gutters":""},{default:pe(()=>[se(o,{cols:"5",class:"label"},{default:pe(()=>[...e[31]||(e[31]=[Be("Meta",-1)])]),_:1}),se(o)]),_:1}),(Ue(!0),qt(Mr,null,Ws(h.details.meta,(w,x)=>(Ue(),ht(a,{key:x,"no-gutters":""},{default:pe(()=>[se(o,{cols:"1"}),se(o,{cols:"4",class:"label"},{default:pe(()=>[Be(dt(x),1)]),_:2},1024),se(o,null,{default:pe(()=>[Be(dt(w.join(", ")),1)]),_:2},1024)]),_:2},1024))),128))])):(Ue(),ht(a,{key:10,"no-gutters":""},{default:pe(()=>[se(o,{cols:"5",class:"label"},{default:pe(()=>[...e[32]||(e[32]=[Be("Meta",-1)])]),_:1}),se(o,null,{default:pe(()=>[...e[33]||(e[33]=[Be("None",-1)])]),_:1})]),_:1}))]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const Z$=Pn("b",Zi(V$,[["render",X$],["__scopeId","data-v-6065a19b"]]));function Jv(t,e){return function(){return t.apply(e,arguments)}}const{toString:Q$}=Object.prototype,{getPrototypeOf:td}=Object,{iterator:ac,toStringTag:ey}=Symbol,lc=(t=>e=>{const n=Q$.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Or=t=>(t=t.toLowerCase(),e=>lc(e)===t),cc=t=>e=>typeof e===t,{isArray:oa}=Array,Ka=cc("undefined");function qa(t){return t!==null&&!Ka(t)&&t.constructor!==null&&!Ka(t.constructor)&&ji(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const ty=Or("ArrayBuffer");function J$(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ty(t.buffer),e}const eM=cc("string"),ji=cc("function"),ny=cc("number"),Ya=t=>t!==null&&typeof t=="object",tM=t=>t===!0||t===!1,uc=t=>{if(lc(t)!=="object")return!1;const e=td(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(ey in t)&&!(ac in t)},nM=t=>{if(!Ya(t)||qa(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},iM=Or("Date"),rM=Or("File"),oM=Or("Blob"),sM=Or("FileList"),aM=t=>Ya(t)&&ji(t.pipe),lM=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||ji(t.append)&&((e=lc(t))==="formdata"||e==="object"&&ji(t.toString)&&t.toString()==="[object FormData]"))},cM=Or("URLSearchParams"),[uM,hM,dM,pM]=["ReadableStream","Request","Response","Headers"].map(Or),gM=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Xa(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let i,h;if(typeof t!="object"&&(t=[t]),oa(t))for(i=0,h=t.length;i<h;i++)e.call(null,t[i],i,t);else{if(qa(t))return;const p=n?Object.getOwnPropertyNames(t):Object.keys(t),m=p.length;let b;for(i=0;i<m;i++)b=p[i],e.call(null,t[b],b,t)}}function iy(t,e){if(qa(t))return null;e=e.toLowerCase();const n=Object.keys(t);let i=n.length,h;for(;i-- >0;)if(h=n[i],e===h.toLowerCase())return h;return null}const ms=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ry=t=>!Ka(t)&&t!==ms;function nd(){const{caseless:t}=ry(this)&&this||{},e={},n=(i,h)=>{const p=t&&iy(e,h)||h;uc(e[p])&&uc(i)?e[p]=nd(e[p],i):uc(i)?e[p]=nd({},i):oa(i)?e[p]=i.slice():e[p]=i};for(let i=0,h=arguments.length;i<h;i++)arguments[i]&&Xa(arguments[i],n);return e}const fM=(t,e,n,{allOwnKeys:i}={})=>(Xa(e,(h,p)=>{n&&ji(h)?t[p]=Jv(h,n):t[p]=h},{allOwnKeys:i}),t),mM=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),vM=(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},yM=(t,e,n,i)=>{let h,p,m;const b={};if(e=e||{},t==null)return e;do{for(h=Object.getOwnPropertyNames(t),p=h.length;p-- >0;)m=h[p],(!i||i(m,t,e))&&!b[m]&&(e[m]=t[m],b[m]=!0);t=n!==!1&&td(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},wM=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return i!==-1&&i===n},bM=t=>{if(!t)return null;if(oa(t))return t;let e=t.length;if(!ny(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},xM=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&td(Uint8Array)),CM=(t,e)=>{const n=(t&&t[ac]).call(t);let i;for(;(i=n.next())&&!i.done;){const h=i.value;e.call(t,h[0],h[1])}},kM=(t,e)=>{let n;const i=[];for(;(n=t.exec(e))!==null;)i.push(n);return i},SM=Or("HTMLFormElement"),_M=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,i){return n.toUpperCase()+i}),oy=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),AM=Or("RegExp"),sy=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};Xa(n,(h,p)=>{let m;(m=e(h,p,t))!==!1&&(i[p]=m||h)}),Object.defineProperties(t,i)},$M=t=>{sy(t,(e,n)=>{if(ji(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=t[n];if(ji(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},MM=(t,e)=>{const n={},i=h=>{h.forEach(p=>{n[p]=!0})};return oa(t)?i(t):i(String(t).split(e)),n},TM=()=>{},IM=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function EM(t){return!!(t&&ji(t.append)&&t[ey]==="FormData"&&t[ac])}const LM=t=>{const e=new Array(10),n=(i,h)=>{if(Ya(i)){if(e.indexOf(i)>=0)return;if(qa(i))return i;if(!("toJSON"in i)){e[h]=i;const p=oa(i)?[]:{};return Xa(i,(m,b)=>{const d=n(m,h+1);!Ka(d)&&(p[b]=d)}),e[h]=void 0,p}}return i};return n(t,0)},RM=Or("AsyncFunction"),OM=t=>t&&(Ya(t)||ji(t))&&ji(t.then)&&ji(t.catch),ay=((t,e)=>t?setImmediate:e?((n,i)=>(ms.addEventListener("message",({source:h,data:p})=>{h===ms&&p===n&&i.length&&i.shift()()},!1),h=>{i.push(h),ms.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ji(ms.postMessage)),NM=typeof queueMicrotask<"u"?queueMicrotask.bind(ms):typeof process<"u"&&process.nextTick||ay,DM=t=>t!=null&&ji(t[ac]),Ae={isArray:oa,isArrayBuffer:ty,isBuffer:qa,isFormData:lM,isArrayBufferView:J$,isString:eM,isNumber:ny,isBoolean:tM,isObject:Ya,isPlainObject:uc,isEmptyObject:nM,isReadableStream:uM,isRequest:hM,isResponse:dM,isHeaders:pM,isUndefined:Ka,isDate:iM,isFile:rM,isBlob:oM,isRegExp:AM,isFunction:ji,isStream:aM,isURLSearchParams:cM,isTypedArray:xM,isFileList:sM,forEach:Xa,merge:nd,extend:fM,trim:gM,stripBOM:mM,inherits:vM,toFlatObject:yM,kindOf:lc,kindOfTest:Or,endsWith:wM,toArray:bM,forEachEntry:CM,matchAll:kM,isHTMLForm:SM,hasOwnProperty:oy,hasOwnProp:oy,reduceDescriptors:sy,freezeMethods:$M,toObjectSet:MM,toCamelCase:_M,noop:TM,toFiniteNumber:IM,findKey:iy,global:ms,isContextDefined:ry,isSpecCompliantForm:EM,toJSONObject:LM,isAsyncFn:RM,isThenable:OM,setImmediate:ay,asap:NM,isIterable:DM};function $t(t,e,n,i,h){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),h&&(this.response=h,this.status=h.status?h.status:null)}Ae.inherits($t,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ae.toJSONObject(this.config),code:this.code,status:this.status}}});const ly=$t.prototype,cy={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{cy[t]={value:t}}),Object.defineProperties($t,cy),Object.defineProperty(ly,"isAxiosError",{value:!0}),$t.from=(t,e,n,i,h,p)=>{const m=Object.create(ly);return Ae.toFlatObject(t,m,function(b){return b!==Error.prototype},b=>b!=="isAxiosError"),$t.call(m,t.message,e,n,i,h),m.cause=t,m.name=t.name,p&&Object.assign(m,p),m};const PM=null;function id(t){return Ae.isPlainObject(t)||Ae.isArray(t)}function uy(t){return Ae.endsWith(t,"[]")?t.slice(0,-2):t}function hy(t,e,n){return t?t.concat(e).map(function(i,h){return i=uy(i),!n&&h?"["+i+"]":i}).join(n?".":""):e}function FM(t){return Ae.isArray(t)&&!t.some(id)}const WM=Ae.toFlatObject(Ae,{},null,function(t){return/^is[A-Z]/.test(t)});function hc(t,e,n){if(!Ae.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=Ae.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(l,s){return!Ae.isUndefined(s[l])});const i=n.metaTokens,h=n.visitor||g,p=n.dots,m=n.indexes,b=(n.Blob||typeof Blob<"u"&&Blob)&&Ae.isSpecCompliantForm(e);if(!Ae.isFunction(h))throw new TypeError("visitor must be a function");function d(l){if(l===null)return"";if(Ae.isDate(l))return l.toISOString();if(Ae.isBoolean(l))return l.toString();if(!b&&Ae.isBlob(l))throw new $t("Blob is not supported. Use a Buffer instead.");return Ae.isArrayBuffer(l)||Ae.isTypedArray(l)?b&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function g(l,s,c){let f=l;if(l&&!c&&typeof l=="object"){if(Ae.endsWith(s,"{}"))s=i?s:s.slice(0,-2),l=JSON.stringify(l);else if(Ae.isArray(l)&&FM(l)||(Ae.isFileList(l)||Ae.endsWith(s,"[]"))&&(f=Ae.toArray(l)))return s=uy(s),f.forEach(function(w,x){!(Ae.isUndefined(w)||w===null)&&e.append(m===!0?hy([s],x,p):m===null?s:s+"[]",d(w))}),!1}return id(l)?!0:(e.append(hy(c,s,p),d(l)),!1)}const o=[],a=Object.assign(WM,{defaultVisitor:g,convertValue:d,isVisitable:id});function u(l,s){if(!Ae.isUndefined(l)){if(o.indexOf(l)!==-1)throw Error("Circular reference detected in "+s.join("."));o.push(l),Ae.forEach(l,function(c,f){(!(Ae.isUndefined(c)||c===null)&&h.call(e,c,Ae.isString(f)?f.trim():f,s,a))===!0&&u(c,s?s.concat(f):[f])}),o.pop()}}if(!Ae.isObject(t))throw new TypeError("data must be an object");return u(t),e}function dy(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function rd(t,e){this._pairs=[],t&&hc(t,this,e)}const py=rd.prototype;py.append=function(t,e){this._pairs.push([t,e])},py.toString=function(t){const e=t?function(n){return t.call(this,n,dy)}:dy;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function BM(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function gy(t,e,n){if(!e)return t;const i=n&&n.encode||BM;Ae.isFunction(n)&&(n={serialize:n});const h=n&&n.serialize;let p;if(h?p=h(e,n):p=Ae.isURLSearchParams(e)?e.toString():new rd(e,n).toString(i),p){const m=t.indexOf("#");m!==-1&&(t=t.slice(0,m)),t+=(t.indexOf("?")===-1?"?":"&")+p}return t}class fy{constructor(){this.handlers=[]}use(e,n,i){return this.handlers.push({fulfilled:e,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ae.forEach(this.handlers,function(n){n!==null&&e(n)})}}const my={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},zM=typeof URLSearchParams<"u"?URLSearchParams:rd,jM=typeof FormData<"u"?FormData:null,HM=typeof Blob<"u"?Blob:null,UM={isBrowser:!0,classes:{URLSearchParams:zM,FormData:jM,Blob:HM},protocols:["http","https","file","blob","url","data"]},od=typeof window<"u"&&typeof document<"u",sd=typeof navigator=="object"&&navigator||void 0,VM=od&&(!sd||["ReactNative","NativeScript","NS"].indexOf(sd.product)<0),GM=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",KM=od&&window.location.href||"http://localhost",qM=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:od,hasStandardBrowserEnv:VM,hasStandardBrowserWebWorkerEnv:GM,navigator:sd,origin:KM},Symbol.toStringTag,{value:"Module"})),xi={...qM,...UM};function YM(t,e){return hc(t,new xi.classes.URLSearchParams,{visitor:function(n,i,h,p){return xi.isNode&&Ae.isBuffer(n)?(this.append(i,n.toString("base64")),!1):p.defaultVisitor.apply(this,arguments)},...e})}function XM(t){return Ae.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ZM(t){const e={},n=Object.keys(t);let i;const h=n.length;let p;for(i=0;i<h;i++)p=n[i],e[p]=t[p];return e}function vy(t){function e(n,i,h,p){let m=n[p++];if(m==="__proto__")return!0;const b=Number.isFinite(+m),d=p>=n.length;return m=!m&&Ae.isArray(h)?h.length:m,d?(Ae.hasOwnProp(h,m)?h[m]=[h[m],i]:h[m]=i,!b):((!h[m]||!Ae.isObject(h[m]))&&(h[m]=[]),e(n,i,h[m],p)&&Ae.isArray(h[m])&&(h[m]=ZM(h[m])),!b)}if(Ae.isFormData(t)&&Ae.isFunction(t.entries)){const n={};return Ae.forEachEntry(t,(i,h)=>{e(XM(i),h,n,0)}),n}return null}function QM(t,e,n){if(Ae.isString(t))try{return(e||JSON.parse)(t),Ae.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(t)}const Za={transitional:my,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,h=Ae.isObject(t);if(h&&Ae.isHTMLForm(t)&&(t=new FormData(t)),Ae.isFormData(t))return i?JSON.stringify(vy(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 e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let p;if(h){if(n.indexOf("application/x-www-form-urlencoded")>-1)return YM(t,this.formSerializer).toString();if((p=Ae.isFileList(t))||n.indexOf("multipart/form-data")>-1){const m=this.env&&this.env.FormData;return hc(p?{"files[]":t}:t,m&&new m,this.formSerializer)}}return h||i?(e.setContentType("application/json",!1),QM(t)):t}],transformResponse:[function(t){const e=this.transitional||Za.transitional,n=e&&e.forcedJSONParsing,i=this.responseType==="json";if(Ae.isResponse(t)||Ae.isReadableStream(t))return t;if(t&&Ae.isString(t)&&(n&&!this.responseType||i)){const h=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(p){if(h)throw p.name==="SyntaxError"?$t.from(p,$t.ERR_BAD_RESPONSE,this,null,this.response):p}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xi.classes.FormData,Blob:xi.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=>{Za.headers[t]={}});const JM=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"]),eT=t=>{const e={};let n,i,h;return t&&t.split(`
1493
+ `).forEach(function(p){h=p.indexOf(":"),n=p.substring(0,h).trim().toLowerCase(),i=p.substring(h+1).trim(),!(!n||e[n]&&JM[n])&&(n==="set-cookie"?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)}),e},yy=Symbol("internals");function Qa(t){return t&&String(t).trim().toLowerCase()}function dc(t){return t===!1||t==null?t:Ae.isArray(t)?t.map(dc):String(t)}function tT(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}const nT=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ad(t,e,n,i,h){if(Ae.isFunction(i))return i.call(this,e,n);if(h&&(e=n),!!Ae.isString(e)){if(Ae.isString(i))return e.indexOf(i)!==-1;if(Ae.isRegExp(i))return i.test(e)}}function iT(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,i)=>n.toUpperCase()+i)}function rT(t,e){const n=Ae.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(t,i+n,{value:function(h,p,m){return this[i].call(this,e,h,p,m)},configurable:!0})})}let Hi=class{constructor(t){t&&this.set(t)}set(t,e,n){const i=this;function h(m,b,d){const g=Qa(b);if(!g)throw new Error("header name must be a non-empty string");const o=Ae.findKey(i,g);(!o||i[o]===void 0||d===!0||d===void 0&&i[o]!==!1)&&(i[o||b]=dc(m))}const p=(m,b)=>Ae.forEach(m,(d,g)=>h(d,g,b));if(Ae.isPlainObject(t)||t instanceof this.constructor)p(t,e);else if(Ae.isString(t)&&(t=t.trim())&&!nT(t))p(eT(t),e);else if(Ae.isObject(t)&&Ae.isIterable(t)){let m={},b,d;for(const g of t){if(!Ae.isArray(g))throw TypeError("Object iterator must return a key-value pair");m[d=g[0]]=(b=m[d])?Ae.isArray(b)?[...b,g[1]]:[b,g[1]]:g[1]}p(m,e)}else t!=null&&h(e,t,n);return this}get(t,e){if(t=Qa(t),t){const n=Ae.findKey(this,t);if(n){const i=this[n];if(!e)return i;if(e===!0)return tT(i);if(Ae.isFunction(e))return e.call(this,i,n);if(Ae.isRegExp(e))return e.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Qa(t),t){const n=Ae.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||ad(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let i=!1;function h(p){if(p=Qa(p),p){const m=Ae.findKey(n,p);m&&(!e||ad(n,n[m],m,e))&&(delete n[m],i=!0)}}return Ae.isArray(t)?t.forEach(h):h(t),i}clear(t){const e=Object.keys(this);let n=e.length,i=!1;for(;n--;){const h=e[n];(!t||ad(this,this[h],h,t,!0))&&(delete this[h],i=!0)}return i}normalize(t){const e=this,n={};return Ae.forEach(this,(i,h)=>{const p=Ae.findKey(n,h);if(p){e[p]=dc(i),delete e[h];return}const m=t?iT(h):String(h).trim();m!==h&&delete e[h],e[m]=dc(i),n[m]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return Ae.forEach(this,(n,i)=>{n!=null&&n!==!1&&(e[i]=t&&Ae.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
1494
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(i=>n.set(i)),n}static accessor(t){const e=(this[yy]=this[yy]={accessors:{}}).accessors,n=this.prototype;function i(h){const p=Qa(h);e[p]||(rT(n,h),e[p]=!0)}return Ae.isArray(t)?t.forEach(i):i(t),this}};Hi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ae.reduceDescriptors(Hi.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(i){this[n]=i}}}),Ae.freezeMethods(Hi);function ld(t,e){const n=this||Za,i=e||n,h=Hi.from(i.headers);let p=i.data;return Ae.forEach(t,function(m){p=m.call(n,p,h.normalize(),e?e.status:void 0)}),h.normalize(),p}function wy(t){return!!(t&&t.__CANCEL__)}function sa(t,e,n){$t.call(this,t??"canceled",$t.ERR_CANCELED,e,n),this.name="CanceledError"}Ae.inherits(sa,$t,{__CANCEL__:!0});function by(t,e,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?t(n):e(new $t("Request failed with status code "+n.status,[$t.ERR_BAD_REQUEST,$t.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function oT(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function sT(t,e){t=t||10;const n=new Array(t),i=new Array(t);let h=0,p=0,m;return e=e!==void 0?e:1e3,function(b){const d=Date.now(),g=i[p];m||(m=d),n[h]=b,i[h]=d;let o=p,a=0;for(;o!==h;)a+=n[o++],o=o%t;if(h=(h+1)%t,h===p&&(p=(p+1)%t),d-m<e)return;const u=g&&d-g;return u?Math.round(a*1e3/u):void 0}}function aT(t,e){let n=0,i=1e3/e,h,p;const m=(b,d=Date.now())=>{n=d,h=null,p&&(clearTimeout(p),p=null),t(...b)};return[(...b)=>{const d=Date.now(),g=d-n;g>=i?m(b,d):(h=b,p||(p=setTimeout(()=>{p=null,m(h)},i-g)))},()=>h&&m(h)]}const pc=(t,e,n=3)=>{let i=0;const h=sT(50,250);return aT(p=>{const m=p.loaded,b=p.lengthComputable?p.total:void 0,d=m-i,g=h(d),o=m<=b;i=m;const a={loaded:m,total:b,progress:b?m/b:void 0,bytes:d,rate:g||void 0,estimated:g&&b&&o?(b-m)/g:void 0,event:p,lengthComputable:b!=null,[e?"download":"upload"]:!0};t(a)},n)},xy=(t,e)=>{const n=t!=null;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},Cy=t=>(...e)=>Ae.asap(()=>t(...e)),lT=xi.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,xi.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(xi.origin),xi.navigator&&/(msie|trident)/i.test(xi.navigator.userAgent)):()=>!0,cT=xi.hasStandardBrowserEnv?{write(t,e,n,i,h,p){const m=[t+"="+encodeURIComponent(e)];Ae.isNumber(n)&&m.push("expires="+new Date(n).toGMTString()),Ae.isString(i)&&m.push("path="+i),Ae.isString(h)&&m.push("domain="+h),p===!0&&m.push("secure"),document.cookie=m.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function uT(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function hT(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function ky(t,e,n){let i=!uT(e);return t&&(i||n==!1)?hT(t,e):e}const Sy=t=>t instanceof Hi?{...t}:t;function vs(t,e){e=e||{};const n={};function i(g,o,a,u){return Ae.isPlainObject(g)&&Ae.isPlainObject(o)?Ae.merge.call({caseless:u},g,o):Ae.isPlainObject(o)?Ae.merge({},o):Ae.isArray(o)?o.slice():o}function h(g,o,a,u){if(Ae.isUndefined(o)){if(!Ae.isUndefined(g))return i(void 0,g,a,u)}else return i(g,o,a,u)}function p(g,o){if(!Ae.isUndefined(o))return i(void 0,o)}function m(g,o){if(Ae.isUndefined(o)){if(!Ae.isUndefined(g))return i(void 0,g)}else return i(void 0,o)}function b(g,o,a){if(a in e)return i(g,o);if(a in t)return i(void 0,g)}const d={url:p,method:p,data:p,baseURL:m,transformRequest:m,transformResponse:m,paramsSerializer:m,timeout:m,timeoutMessage:m,withCredentials:m,withXSRFToken:m,adapter:m,responseType:m,xsrfCookieName:m,xsrfHeaderName:m,onUploadProgress:m,onDownloadProgress:m,decompress:m,maxContentLength:m,maxBodyLength:m,beforeRedirect:m,transport:m,httpAgent:m,httpsAgent:m,cancelToken:m,socketPath:m,responseEncoding:m,validateStatus:b,headers:(g,o,a)=>h(Sy(g),Sy(o),a,!0)};return Ae.forEach(Object.keys({...t,...e}),function(g){const o=d[g]||h,a=o(t[g],e[g],g);Ae.isUndefined(a)&&o!==b||(n[g]=a)}),n}const _y=t=>{const e=vs({},t);let{data:n,withXSRFToken:i,xsrfHeaderName:h,xsrfCookieName:p,headers:m,auth:b}=e;e.headers=m=Hi.from(m),e.url=gy(ky(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),b&&m.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):"")));let d;if(Ae.isFormData(n)){if(xi.hasStandardBrowserEnv||xi.hasStandardBrowserWebWorkerEnv)m.setContentType(void 0);else if((d=m.getContentType())!==!1){const[g,...o]=d?d.split(";").map(a=>a.trim()).filter(Boolean):[];m.setContentType([g||"multipart/form-data",...o].join("; "))}}if(xi.hasStandardBrowserEnv&&(i&&Ae.isFunction(i)&&(i=i(e)),i||i!==!1&&lT(e.url))){const g=h&&p&&cT.read(p);g&&m.set(h,g)}return e},dT=typeof XMLHttpRequest<"u",pT=dT&&function(t){return new Promise(function(e,n){const i=_y(t);let h=i.data;const p=Hi.from(i.headers).normalize();let{responseType:m,onUploadProgress:b,onDownloadProgress:d}=i,g,o,a,u,l;function s(){u&&u(),l&&l(),i.cancelToken&&i.cancelToken.unsubscribe(g),i.signal&&i.signal.removeEventListener("abort",g)}let c=new XMLHttpRequest;c.open(i.method.toUpperCase(),i.url,!0),c.timeout=i.timeout;function f(){if(!c)return;const x=Hi.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),E={data:!m||m==="text"||m==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:x,config:t,request:c};by(function(M){e(M),s()},function(M){n(M),s()},E),c=null}"onloadend"in c?c.onloadend=f:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(f)},c.onabort=function(){c&&(n(new $t("Request aborted",$t.ECONNABORTED,t,c)),c=null)},c.onerror=function(){n(new $t("Network Error",$t.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let x=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||my;i.timeoutErrorMessage&&(x=i.timeoutErrorMessage),n(new $t(x,E.clarifyTimeoutError?$t.ETIMEDOUT:$t.ECONNABORTED,t,c)),c=null},h===void 0&&p.setContentType(null),"setRequestHeader"in c&&Ae.forEach(p.toJSON(),function(x,E){c.setRequestHeader(E,x)}),Ae.isUndefined(i.withCredentials)||(c.withCredentials=!!i.withCredentials),m&&m!=="json"&&(c.responseType=i.responseType),d&&([a,l]=pc(d,!0),c.addEventListener("progress",a)),b&&c.upload&&([o,u]=pc(b),c.upload.addEventListener("progress",o),c.upload.addEventListener("loadend",u)),(i.cancelToken||i.signal)&&(g=x=>{c&&(n(!x||x.type?new sa(null,t,c):x),c.abort(),c=null)},i.cancelToken&&i.cancelToken.subscribe(g),i.signal&&(i.signal.aborted?g():i.signal.addEventListener("abort",g)));const w=oT(i.url);if(w&&xi.protocols.indexOf(w)===-1){n(new $t("Unsupported protocol "+w+":",$t.ERR_BAD_REQUEST,t));return}c.send(h||null)})},gT=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let i=new AbortController,h;const p=function(g){if(!h){h=!0,b();const o=g instanceof Error?g:this.reason;i.abort(o instanceof $t?o:new sa(o instanceof Error?o.message:o))}};let m=e&&setTimeout(()=>{m=null,p(new $t(`timeout ${e} of ms exceeded`,$t.ETIMEDOUT))},e);const b=()=>{t&&(m&&clearTimeout(m),m=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(p):g.removeEventListener("abort",p)}),t=null)};t.forEach(g=>g.addEventListener("abort",p));const{signal:d}=i;return d.unsubscribe=()=>Ae.asap(b),d}},fT=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let i=0,h;for(;i<n;)h=i+e,yield t.slice(i,h),i=h},mT=async function*(t,e){for await(const n of vT(t))yield*fT(n,e)},vT=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:i}=await e.read();if(n)break;yield i}}finally{await e.cancel()}},Ay=(t,e,n,i)=>{const h=mT(t,e);let p=0,m,b=d=>{m||(m=!0,i&&i(d))};return new ReadableStream({async pull(d){try{const{done:g,value:o}=await h.next();if(g){b(),d.close();return}let a=o.byteLength;if(n){let u=p+=a;n(u)}d.enqueue(new Uint8Array(o))}catch(g){throw b(g),g}},cancel(d){return b(d),h.return()}},{highWaterMark:2})},gc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",$y=gc&&typeof ReadableStream=="function",yT=gc&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),My=(t,...e)=>{try{return!!t(...e)}catch{return!1}},wT=$y&&My(()=>{let t=!1;const e=new Request(xi.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Ty=64*1024,cd=$y&&My(()=>Ae.isReadableStream(new Response("").body)),fc={stream:cd&&(t=>t.body)};gc&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!fc[e]&&(fc[e]=Ae.isFunction(t[e])?n=>n[e]():(n,i)=>{throw new $t(`Response type '${e}' is not supported`,$t.ERR_NOT_SUPPORT,i)})})})(new Response);const bT=async t=>{if(t==null)return 0;if(Ae.isBlob(t))return t.size;if(Ae.isSpecCompliantForm(t))return(await new Request(xi.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(Ae.isArrayBufferView(t)||Ae.isArrayBuffer(t))return t.byteLength;if(Ae.isURLSearchParams(t)&&(t=t+""),Ae.isString(t))return(await yT(t)).byteLength},xT=async(t,e)=>Ae.toFiniteNumber(t.getContentLength())??bT(e),CT=gc&&(async t=>{let{url:e,method:n,data:i,signal:h,cancelToken:p,timeout:m,onDownloadProgress:b,onUploadProgress:d,responseType:g,headers:o,withCredentials:a="same-origin",fetchOptions:u}=_y(t);g=g?(g+"").toLowerCase():"text";let l=gT([h,p&&p.toAbortSignal()],m),s;const c=l&&l.unsubscribe&&(()=>{l.unsubscribe()});let f;try{if(d&&wT&&n!=="get"&&n!=="head"&&(f=await xT(o,i))!==0){let k=new Request(e,{method:"POST",body:i,duplex:"half"}),C;if(Ae.isFormData(i)&&(C=k.headers.get("content-type"))&&o.setContentType(C),k.body){const[O,L]=xy(f,pc(Cy(d)));i=Ay(k.body,Ty,O,L)}}Ae.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;s=new Request(e,{...u,signal:l,method:n.toUpperCase(),headers:o.normalize().toJSON(),body:i,duplex:"half",credentials:w?a:void 0});let x=await fetch(s,u);const E=cd&&(g==="stream"||g==="response");if(cd&&(b||E&&c)){const k={};["status","statusText","headers"].forEach(R=>{k[R]=x[R]});const C=Ae.toFiniteNumber(x.headers.get("content-length")),[O,L]=b&&xy(C,pc(Cy(b),!0))||[];x=new Response(Ay(x.body,Ty,O,()=>{L&&L(),c&&c()}),k)}g=g||"text";let M=await fc[Ae.findKey(fc,g)||"text"](x,t);return!E&&c&&c(),await new Promise((k,C)=>{by(k,C,{data:M,headers:Hi.from(x.headers),status:x.status,statusText:x.statusText,config:t,request:s})})}catch(w){throw c&&c(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new $t("Network Error",$t.ERR_NETWORK,t,s),{cause:w.cause||w}):$t.from(w,w&&w.code,t,s)}}),ud={http:PM,xhr:pT,fetch:CT};Ae.forEach(ud,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Iy=t=>`- ${t}`,kT=t=>Ae.isFunction(t)||t===null||t===!1,Ey={getAdapter:t=>{t=Ae.isArray(t)?t:[t];const{length:e}=t;let n,i;const h={};for(let p=0;p<e;p++){n=t[p];let m;if(i=n,!kT(n)&&(i=ud[(m=String(n)).toLowerCase()],i===void 0))throw new $t(`Unknown adapter '${m}'`);if(i)break;h[m||"#"+p]=i}if(!i){const p=Object.entries(h).map(([b,d])=>`adapter ${b} `+(d===!1?"is not supported by the environment":"is not available in the build"));let m=e?p.length>1?`since :
1495
+ `+p.map(Iy).join(`
1496
+ `):" "+Iy(p[0]):"as no adapter specified";throw new $t("There is no suitable adapter to dispatch the request "+m,"ERR_NOT_SUPPORT")}return i},adapters:ud};function hd(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new sa(null,t)}function Ly(t){return hd(t),t.headers=Hi.from(t.headers),t.data=ld.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ey.getAdapter(t.adapter||Za.adapter)(t).then(function(e){return hd(t),e.data=ld.call(t,t.transformResponse,e),e.headers=Hi.from(e.headers),e},function(e){return wy(e)||(hd(t),e&&e.response&&(e.response.data=ld.call(t,t.transformResponse,e.response),e.response.headers=Hi.from(e.response.headers))),Promise.reject(e)})}const Ry="1.11.0",mc={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{mc[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const Oy={};mc.transitional=function(t,e,n){function i(h,p){return"[Axios v"+Ry+"] Transitional option '"+h+"'"+p+(n?". "+n:"")}return(h,p,m)=>{if(t===!1)throw new $t(i(p," has been removed"+(e?" in "+e:"")),$t.ERR_DEPRECATED);return e&&!Oy[p]&&(Oy[p]=!0,console.warn(i(p," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(h,p,m):!0}},mc.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function ST(t,e,n){if(typeof t!="object")throw new $t("options must be an object",$t.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let h=i.length;for(;h-- >0;){const p=i[h],m=e[p];if(m){const b=t[p],d=b===void 0||m(b,p,t);if(d!==!0)throw new $t("option "+p+" must be "+d,$t.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new $t("Unknown option "+p,$t.ERR_BAD_OPTION)}}const vc={assertOptions:ST,validators:mc},Qr=vc.validators;let ys=class{constructor(t){this.defaults=t||{},this.interceptors={request:new fy,response:new fy}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const h=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?h&&!String(n.stack).endsWith(h.replace(/^.+\n.+\n/,""))&&(n.stack+=`
1497
+ `+h):n.stack=h}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=vs(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:h}=e;n!==void 0&&vc.assertOptions(n,{silentJSONParsing:Qr.transitional(Qr.boolean),forcedJSONParsing:Qr.transitional(Qr.boolean),clarifyTimeoutError:Qr.transitional(Qr.boolean)},!1),i!=null&&(Ae.isFunction(i)?e.paramsSerializer={serialize:i}:vc.assertOptions(i,{encode:Qr.function,serialize:Qr.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),vc.assertOptions(e,{baseUrl:Qr.spelling("baseURL"),withXsrfToken:Qr.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let p=h&&Ae.merge(h.common,h[e.method]);h&&Ae.forEach(["delete","get","head","post","put","patch","common"],l=>{delete h[l]}),e.headers=Hi.concat(p,h);const m=[];let b=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(e)===!1||(b=b&&l.synchronous,m.unshift(l.fulfilled,l.rejected))});const d=[];this.interceptors.response.forEach(function(l){d.push(l.fulfilled,l.rejected)});let g,o=0,a;if(!b){const l=[Ly.bind(this),void 0];for(l.unshift(...m),l.push(...d),a=l.length,g=Promise.resolve(e);o<a;)g=g.then(l[o++],l[o++]);return g}a=m.length;let u=e;for(o=0;o<a;){const l=m[o++],s=m[o++];try{u=l(u)}catch(c){s.call(this,c);break}}try{g=Ly.call(this,u)}catch(l){return Promise.reject(l)}for(o=0,a=d.length;o<a;)g=g.then(d[o++],d[o++]);return g}getUri(t){t=vs(this.defaults,t);const e=ky(t.baseURL,t.url,t.allowAbsoluteUrls);return gy(e,t.params,t.paramsSerializer)}};Ae.forEach(["delete","get","head","options"],function(t){ys.prototype[t]=function(e,n){return this.request(vs(n||{},{method:t,url:e,data:(n||{}).data}))}}),Ae.forEach(["post","put","patch"],function(t){function e(n){return function(i,h,p){return this.request(vs(p||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:h}))}}ys.prototype[t]=e(),ys.prototype[t+"Form"]=e(!0)});let _T=class Db{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(h){n=h});const i=this;this.promise.then(h=>{if(!i._listeners)return;let p=i._listeners.length;for(;p-- >0;)i._listeners[p](h);i._listeners=null}),this.promise.then=h=>{let p;const m=new Promise(b=>{i.subscribe(b),p=b}).then(h);return m.cancel=function(){i.unsubscribe(p)},m},e(function(h,p,m){i.reason||(i.reason=new sa(h,p,m),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=i=>{e.abort(i)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Db(function(n){e=n}),cancel:e}}};function AT(t){return function(e){return t.apply(null,e)}}function $T(t){return Ae.isObject(t)&&t.isAxiosError===!0}const dd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(dd).forEach(([t,e])=>{dd[e]=t});function Ny(t){const e=new ys(t),n=Jv(ys.prototype.request,e);return Ae.extend(n,ys.prototype,e,{allOwnKeys:!0}),Ae.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return Ny(vs(t,i))},n}const Yn=Pn("E",Ny(Za));Yn.Axios=ys,Yn.CanceledError=sa,Yn.CancelToken=_T,Yn.isCancel=wy,Yn.VERSION=Ry,Yn.toFormData=hc,Yn.AxiosError=$t,Yn.Cancel=Yn.CanceledError,Yn.all=function(t){return Promise.all(t)},Yn.spread=AT,Yn.isAxiosError=$T,Yn.mergeConfig=vs,Yn.AxiosHeaders=Hi,Yn.formToJSON=t=>vy(Ae.isHTMLForm(t)?new FormData(t):t),Yn.getAdapter=Ey.getAdapter,Yn.HttpStatusCode=dd,Yn.default=Yn;const{Axios:eD,AxiosError:tD,CanceledError:nD,isCancel:iD,CancelToken:rD,VERSION:oD,all:sD,Cancel:aD,isAxiosError:lD,spread:cD,toFormData:uD,AxiosHeaders:hD,HttpStatusCode:dD,formToJSON:pD,getAdapter:gD,mergeConfig:fD}=Yn,MT="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=",TT={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number}},computed:{icons:function(){return MT},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const t=DT.indexOf(Dy[this.status]),e=1-(t-1)*.05,n=224*this.scaleFactor*e,i=32*this.scaleFactor*e,h=32*this.scaleFactor*e;return[`background-image: url(${this.icons});`,`background-position-x: -${t*h}px;`,`background-size: ${n}px ${i}px;`,`height: ${h}px;`,`width: ${h}px;`,`padding-top: ${t-1}px;`].join("")}}};function IT(t,e,n,i,h,p){return Ue(),qt("div",{style:_a(p.iconStyle)},null,4)}const ET=Zi(TT,[["render",IT]]),LT={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function RT(t,e,n,i,h,p){const m=Fe("rux-icon");return Ue(),ht(m,{size:n.size,icon:n.icon,style:_a(p.colorStyle)},null,8,["size","icon","style"])}const OT=Zi(LT,[["render",RT],["__scopeId","data-v-9af48e85"]]),Dy={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"},pd={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},NT=function(t){const e="#000000",n="#ffffff",i=pd[Dy[t]];if(i){const h=+`0x${i.slice(1,3)}`,p=+`0x${i.slice(3,5)}`,m=+`0x${i.slice(5,7)}`;if((h*299+p*587+m*114)/1e3>128)return e}return n},DT=Object.keys(pd),PT={astro:{component:t=>Bs(OT,{...t})},"astro-status":{component:t=>Bs(ET,{...t,status:t.icon})}},FT={extras:{component:t=>Bs(Jb,{...t})}},WT={name:"CommandParameterEditor",mixins:[Qv],props:{modelValue:{type:[String,Number],default:void 0},states:{type:Object,default:()=>null},statesInHex:{type:Boolean,default:!1}},emits:["update:modelValue"],computed:{textFieldValue(){return this.convertToString(this.modelValue)},stateValue(){return this.statesInHex?"0x"+this.modelValue.toString(16):this.modelValue},selectValue(){return this.modelValue===""?null:this.modelValue},stateOptions(){return this.states?Object.keys(this.states).map(t=>({label:t,...this.states[t]})):null},hazardous(){var t,e;return((e=(t=Object.entries(this.states).find(([n,i])=>i.value===this.modelValue))==null?void 0:t.at(1))==null?void 0:e.hazardous)!==void 0},stateClass(){return this.hazardous?"hazardous mr-4":"mr-4"}},methods:{handleChange(t){this.$emit("update:modelValue",t)}}},BT={key:1,class:"d-flex align-center"};function zT(t,e,n,i,h,p){const m=Fe("v-text-field"),b=Fe("v-select");return Ue(),qt("div",null,[n.states?(Ue(),qt("div",BT,[se(b,{items:p.stateOptions,"model-value":p.selectValue,"item-title":"label",class:Sa(p.stateClass),"hide-details":"",density:"compact",variant:"outlined",placeholder:"Select...","min-width":"120px","data-test":"cmd-param-select","onUpdate:modelValue":p.handleChange},null,8,["items","model-value","class","onUpdate:modelValue"]),se(m,{"model-value":p.stateValue,disabled:"","hide-details":"",density:"compact",variant:"outlined","min-width":"60px","data-test":"cmd-param-value"},null,8,["model-value"])])):(Ue(),ht(m,{key:0,"model-value":p.textFieldValue,"hide-details":"",density:"compact",variant:"filled","data-test":"cmd-param-value","onUpdate:modelValue":p.handleChange},null,8,["model-value","onUpdate:modelValue"]))])}const jT=Zi(WT,[["render",zT],["__scopeId","data-v-b38d5e7f"]]),HT={name:"CommandEditor",components:{TargetPacketItemChooser:Zv,CommandParameterEditor:jT,DetailsDialog:Z$},mixins:[Qv],props:{initialTargetName:{type:String,default:null},initialPacketName:{type:String,default:null},cmdString:{type:String,default:null},sendDisabled:{type:Boolean,default:!1},statesInHex:{type:Boolean,default:!1},showIgnoredParams:{type:Boolean,default:!1},cmdRaw:{type:Boolean,default:!1},showCommandButton:{type:Boolean,default:!0}},emits:["command-changed","build-cmd"],data(){return{search:"",headers:[{title:"Name",value:"parameter_name"},{title:"Value or State",value:"val"},{title:"Units",value:"units"},{title:"Range",value:"range"},{title:"Description",value:"description"}],api:null,targetName:"",commandName:"",commandDescription:"",ignoredParams:[],computedRows:[],reservedItemNames:["PACKET_TIMESECONDS","PACKET_TIMEFORMATTED","RECEIVED_TIMESECONDS","RECEIVED_TIMEFORMATTED","RECEIVED_COUNT"],contextMenuShown:!1,viewDetails:!1,parameterName:"",x:0,y:0,contextMenuOptions:[{title:"Details",action:()=>{this.contextMenuShown=!1,this.viewDetails=!0}}]}},created(){this.api=new Ks,this.cmdString?this.processCmdString():(this.targetName=this.initialTargetName,this.commandName=this.initialPacketName,this.updateCmdParams())},methods:{commandChanged(t){(this.targetName!==t.targetName||this.commandName!==t.packetName)&&(this.targetName=t.targetName,this.commandName=t.packetName,this.updateCmdParams()),this.$emit("command-changed",t)},buildCmd(t){this.$emit("build-cmd",t)},showContextMenu(t,e){t.preventDefault(),this.parameterName=e.item.parameter_name,this.contextMenuShown=!1,this.x=t.clientX,this.y=t.clientY,this.$nextTick(()=>{this.contextMenuShown=!0})},updateCmdParams(){this.ignoredParams=[],this.computedRows=[],this.targetName&&this.commandName&&this.api.get_target(this.targetName).then(t=>(this.ignoredParams=t.ignored_parameters,this.api.get_cmd(this.targetName,this.commandName)),t=>{console.error("Error getting ignored parameters:",t)}).then(t=>{t&&(t.items.forEach(e=>{if(!this.reservedItemNames.includes(e.name)&&(!this.ignoredParams.includes(e.name)||this.showIgnoredParams)){let n=e.default;!e.states&&e.data_type==="STRING"&&typeof e.default=="string"&&(n=`'${n}'`),e.required&&(n=null),e.format_string&&e.default&&(n=sprintf(e.format_string,e.default));let i="N/A";e.minimum!=null&&e.maximum!=null&&(e.data_type==="FLOAT"&&(e.minimum<-1e6&&Number.isSafeInteger(e.minimum)&&(e.minimum=e.minimum.toExponential(3)),e.maximum>1e6&&Number.isSafeInteger(e.maximum)&&(e.maximum=e.maximum.toExponential(3))),i=`${e.minimum}..${e.maximum}`),this.computedRows.push({parameter_name:e.name,val:n,states:e.states,description:e.description,range:i,units:e.units,type:e.data_type})}}),this.commandDescription=t.description,this.populateParametersFromParsed())},t=>{console.error("Error getting command parameters:",t)})},triggerUpdateCmdParams(){this.updateCmdParams()},getRows(){return this.computedRows},getCmdString(){let t=`${this.targetName} ${this.commandName}`;if(this.computedRows.length===0)return t;t+=" with ";for(const e of this.computedRows){if(e.val===null)throw new Error(`Required parameter ${e.parameter_name} not set`);if(e.val!==null&&e.val!==void 0&&e.val!==""){if(e.states){const i=Object.entries(e.states).find(([,h])=>h.value===e.val);if(i){t+=` ${e.parameter_name} '${i[0]}',`;continue}}let n=this.convertToString(e.val);n.includes(" ")&&!this.isArray(n)?t+=` ${e.parameter_name} '${n}',`:t+=` ${e.parameter_name} ${n},`}}return t.slice(0,-1)},parseCmdString(t){const e=t.split(" ");if(e.length<2)return{target:"",command:"",params:{}};if(e.length===2)return{target:e[0],command:e[1],params:{}};if(e[2]!=="with")return{target:"",command:"",params:{}};const n=e[0],i=e[1];let h={};const p=t.split(" with ")[1];let m=[],b=0,d="";for(let g of p)g==="["?(b++,d+=g):g==="]"?(b--,d+=g):g===","&&b===0?(m.push(d.trim()),d=""):d+=g;d.trim()!==""&&m.push(d.trim());for(let g of m){let o=g.indexOf(" ");if(o>0){let a=g.substring(0,o).trim(),u=g.substring(o+1).trim();h[a]=u}}return{target:n,command:i,params:h}},processCmdString(){const t=this.parseCmdString(this.cmdString);t.target&&t.command&&(this.targetName=t.target,this.commandName=t.command,this.parsedParameters=t.params,this.updateCmdParams())},populateParametersFromParsed(){!this.parsedParameters||Object.keys(this.parsedParameters).length===0||this.$nextTick(()=>{setTimeout(()=>{this.computedRows.forEach(t=>{if(this.parsedParameters.hasOwnProperty(t.parameter_name)){const e=this.parsedParameters[t.parameter_name];if(t.states&&typeof e=="string"){const n=Object.keys(t.states).find(i=>i===e||i.toLowerCase()===e.toLowerCase());n?t.val=t.states[n].value:t.val=e}else t.type==="STRING"&&typeof e=="string"?t.val=e.startsWith("'")||e.startsWith('"')?e:`'${e}'`:t.val=e}})},100)})}}},UT={style:{padding:"10px"}};function VT(t,e,n,i,h,p){const m=Fe("target-packet-item-chooser"),b=Fe("v-spacer"),d=Fe("v-text-field"),g=Fe("v-card-title"),o=Fe("command-parameter-editor"),a=Fe("v-data-table"),u=Fe("v-card"),l=Fe("v-list-item-title"),s=Fe("v-list-item"),c=Fe("v-list"),f=Fe("v-menu"),w=Fe("details-dialog");return Ue(),ht(u,null,{default:pe(()=>[Yt("div",UT,[se(m,{"initial-target-name":h.targetName,"initial-packet-name":h.commandName,disabled:n.sendDisabled,"button-text":n.showCommandButton?"Send":null,mode:"cmd",onOnSet:e[0]||(e[0]=x=>p.commandChanged(x)),onAddItem:e[1]||(e[1]=x=>p.buildCmd(x))},null,8,["initial-target-name","initial-packet-name","disabled","button-text"])]),h.computedRows.length!==0?(Ue(),ht(u,{key:0},{default:pe(()=>[se(g,{class:"d-flex align-center justify-content-space-between"},{default:pe(()=>[e[5]||(e[5]=Be(" Parameters ",-1)),se(b),se(d,{modelValue:h.search,"onUpdate:modelValue":e[2]||(e[2]=x=>h.search=x),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search"},null,8,["modelValue"])]),_:1}),se(a,{headers:h.headers,items:h.computedRows,search:h.search,"items-per-page":-1,"hide-default-footer":"","multi-sort":"",density:"compact","onContextmenu:row":p.showContextMenu},{"item.val":pe(({item:x})=>[fp(t.$slots,"parameter-editor",{item:x,statesInHex:n.statesInHex},()=>[se(o,{modelValue:x.val,"onUpdate:modelValue":E=>x.val=E,states:x.states,"states-in-hex":n.statesInHex},null,8,["modelValue","onUpdate:modelValue","states","states-in-hex"])])]),_:3},8,["headers","items","search","onContextmenu:row"])]),_:3})):Ht("",!0),se(f,{modelValue:h.contextMenuShown,"onUpdate:modelValue":e[3]||(e[3]=x=>h.contextMenuShown=x),target:[h.x,h.y]},{default:pe(()=>[se(c,null,{default:pe(()=>[(Ue(!0),qt(Mr,null,Ws(h.contextMenuOptions,(x,E)=>(Ue(),ht(s,{key:E,onClick:ka(x.action,["stop"])},{default:pe(()=>[se(l,null,{default:pe(()=>[Be(dt(x.title),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["modelValue","target"]),se(w,{modelValue:h.viewDetails,"onUpdate:modelValue":e[4]||(e[4]=x=>h.viewDetails=x),"target-name":h.targetName,"packet-name":h.commandName,"item-name":h.parameterName,type:"cmd"},null,8,["modelValue","target-name","packet-name","item-name"])]),_:3})}const mD=Pn("a",Zi(HT,[["render",VT]])),GT=50,KT=2e3,Py="single-spa:app-change",qT={data(){return{appsMounted:!1,show:!1,hideSpinner:!1,pollInterval:null}},computed:{showSpinner:function(){return!this.hideSpinner&&!this.show}},created(){window.addEventListener(Py,this.handleAppChange)},mounted(){this.pollForMountedApps(),setTimeout(()=>{this.appsMounted||(this.show=!0,this.pollInterval&&clearInterval(this.pollInterval))},KT)},unmounted(){window.removeEventListener(Py,this.handleAppChange),this.pollInterval&&clearInterval(this.pollInterval)},methods:{handleAppChange:function(t){this.show=!t.detail.appsByNewStatus.MOUNTED},pollForMountedApps:function(){this.pollInterval=setInterval(()=>{this.appsMounted=iu().length>0,iu().length>0&&(this.hideSpinner=!0,clearInterval(this.pollInterval))},GT)}}},YT={class:"mx-1"},XT={key:1,class:"d-flex justify-center align-center"};function ZT(t,e,n,i,h,p){const m=Fe("v-card-title"),b=Fe("v-card-text"),d=Fe("v-card"),g=Fe("v-progress-circular");return Ue(),qt(Mr,null,[h.show?(Ue(),ht(d,{key:0},{default:pe(()=>[se(m,null,{default:pe(()=>[...e[0]||(e[0]=[Be(" 404 Not Found ",-1)])]),_:1}),se(b,{class:"d-flex align-center mt-3"},{default:pe(()=>[e[1]||(e[1]=Be(" The requested URL ",-1)),Yt("code",YT,dt(t.$route.fullPath),1),e[2]||(e[2]=Be(" was not routable. ",-1)),e[3]||(e[3]=Yt("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):Ht("",!0),p.showSpinner?(Ue(),qt("div",XT,[se(g,{indeterminate:""})])):Ht("",!0)],64)}const Fy=[{path:"/:target?/:packet?/",name:"CommandSender",component:()=>at(()=>st.import("./CommandSender-c37075627710fdc475ce.js"),void 0)},{path:"/:pathMatch(.*)*",name:"NotFound",component:Zi(qT,[["render",ZT]])}];Fy.forEach(Tp);const QT=Sp({history:_p(),routes:Fy}),JT={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"}},eI={data:function(){return{show:!1,params:{title:"Title",text:"The text that is displayed",okText:"Ok",okClass:"primary",validateText:"CONFIRM",cancelText:"Cancel",html:!1},resolve:null,reject:null,validationText:null,rules:{required:t=>!!t||"Required.",match:t=>t===this.params.validateText||"Value mismatch."}}},computed:{dataTestOk:function(){return`confirm-dialog-${this.params.okText.toLowerCase()}`},dataTestCancel:function(){return`confirm-dialog-${this.params.cancelText.toLowerCase()}`}},methods:{dialog:function(t,e,n){this.params=t,this.show=!0,this.resolve=e,this.reject=n},ok:function(){(!this.params.validateText||this.params.validateText===this.validationText)&&(this.show=!1,this.resolve(!0),this.refresh())},cancel:function(){this.show=!1,this.reject(!0),this.refresh()},refresh:function(){this.validationText=""}}},tI=["innerHTML"],nI={key:2},iI={key:3,class:"validate mt-4"};function rI(t,e,n,i,h,p){const m=Fe("v-spacer"),b=Fe("v-toolbar"),d=Fe("v-icon"),g=Fe("v-text-field"),o=Fe("v-card-text"),a=Fe("v-btn"),u=Fe("v-card-actions"),l=Fe("v-card"),s=Fe("v-dialog"),c=Fe("v-app");return Ue(),ht(c,null,{default:pe(()=>[se(s,{modelValue:t.show,"onUpdate:modelValue":e[1]||(e[1]=f=>t.show=f),width:"600"},{default:pe(()=>[se(l,null,{default:pe(()=>[se(b,{height:"24"},{default:pe(()=>[se(m),Yt("span",null,dt(t.params.title),1),se(m)]),_:1}),se(o,{class:"mt-4 pa-3"},{default:pe(()=>[t.params.validateText?(Ue(),ht(d,{key:0,class:"mr-2"},{default:pe(()=>[...e[2]||(e[2]=[Be(" mdi-alert ",-1)])]),_:1})):Ht("",!0),t.params.html?(Ue(),qt("span",{key:1,innerHTML:t.params.text},null,8,tI)):(Ue(),qt("span",nI,dt(t.params.text),1)),t.params.validateText?(Ue(),qt("div",iI,[Be(" Enter "+dt(t.params.validateText)+" to confirm! ",1),se(g,{modelValue:t.validationText,"onUpdate:modelValue":e[0]||(e[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"])])):Ht("",!0)]),_:1}),se(u,{class:"px-2"},{default:pe(()=>[se(m),t.params.cancelText?(Ue(),ht(a,{key:0,variant:"outlined","data-test":p.dataTestCancel,onClick:p.cancel},{default:pe(()=>[Be(dt(t.params.cancelText),1)]),_:1},8,["data-test","onClick"])):Ht("",!0),se(a,{variant:"flat",color:t.params.okClass,"data-test":p.dataTestOk,onClick:p.ok},{default:pe(()=>[Be(dt(t.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}const oI=Zi(eI,[["render",rI],["__scopeId","data-v-de532a0f"]]);class sI{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const e=window.Vue.createApp(oI);e.use(fd);const n=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(n),this.$root=e.mount(n),this.mounted=!0}open({title:e,text:n,okText:i,okClass:h,validateText:p,cancelText:m,html:b}){return this.mount(),new Promise((d,g)=>{this.$root.dialog({title:e,text:n,okText:i,okClass:h,validateText:p,cancelText:m,html:b},d,g)})}confirm(e,{okText:n="Ok",cancelText:i="Cancel",okClass:h="primary"}){return this.open({title:"Confirm",text:e,okText:n,okClass:h,validateText:null,cancelText:i,html:!1})}alert(e,{okText:n="Ok",html:i=!1,okClass:h="primary"}){return this.open({title:"Alert",text:e,okText:n,okClass:h,validateText:null,cancelText:null,html:i})}validate(e,{okText:n="Ok",validateText:i="CONFIRM",cancelText:h="Cancel",okClass:p="primary"}){return this.open({title:"Confirm",text:e,okText:n,okClass:p,validateText:i,cancelText:h,html:!1})}}const aI={install(t,e){const n=new sI;t.provide("dialog",n),t.config.globalProperties.hasOwnProperty("$dialog")||(t.config.globalProperties.$dialog=n)}},lI={data:function(){return{showToast:!1,expanded:!1,toastNotification:{title:"Title here",body:"This is the notification body",message:"Overall message here"},timeout:null,noToastPaths:["/login"]}},computed:{toastNotificationIcon:function(){switch(this.toastNotification.type){case"notification":return"mdi-bell";case"alert":default:return"mdi-alert-box"}},toastStyle:function(){return`
1498
+ --toast-bg-color:${pd[this.toastNotification.level]};
1499
+ --toast-fg-color:${NT(this.toastNotification.level)};
1500
+ `},contentStyle:function(){return`
1501
+ white-space: ${this.expanded?"normal":"nowrap"};
1502
+ overflow-x: ${this.expanded?"visible":"hidden"};
1503
+ text-overflow: ${this.expanded?"unset":"ellipsis"};
1504
+ `}},methods:{toast:function(t,e){this.noToastPaths.includes(window.location.pathname)||(e===void 0&&(e=5e3),this.toastNotification=t,this.showToast=!0,this.cancelAutohide(),e&&(this.timeout=setTimeout(()=>{this.hide()},e)))},hide:function(){this.cancelAutohide(),this.showToast=!1},cancelAutohide:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},expand:function(){this.cancelAutohide(),this.expanded=!0}}},cI={key:0,class:"text-subtitle-1 mr-1 notification-text"},uI={key:1,class:"text-body-2 notification-text"},hI={key:2,class:"text-body-2 notification-text"};function dI(t,e,n,i,h,p){const m=Fe("v-icon"),b=Fe("v-spacer"),d=Fe("v-btn"),g=Fe("v-sheet"),o=Fe("v-slide-y-transition");return Ue(),ht(o,null,{default:pe(()=>[Ps(se(g,{style:_a(p.toastStyle),class:"toast-notification",onClick:p.expand},{default:pe(()=>[se(m,{class:"mr-1 notification-text"},{default:pe(()=>[Be(dt(p.toastNotificationIcon),1)]),_:1}),Yt("div",{class:"toast-content",style:_a(p.contentStyle)},[t.toastNotification.title?(Ue(),qt("span",cI,[t.toastNotification.body||t.toastNotification.message?(Ue(),qt(Mr,{key:0},[Be(dt(t.toastNotification.title)+": ",1)],64)):(Ue(),qt(Mr,{key:1},[Be(dt(t.toastNotification.title),1)],64))])):Ht("",!0),t.toastNotification.body?(Ue(),qt("span",uI,dt(t.toastNotification.body),1)):Ht("",!0),t.toastNotification.message?(Ue(),qt("span",hI,dt(t.toastNotification.message),1)):Ht("",!0)],4),se(b),se(d,{variant:"text",class:"notification-text",onClick:ka(p.hide,["stop"])},{default:pe(()=>[...e[0]||(e[0]=[Be(" Dismiss ",-1)])]),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[Fs,t.showToast]])]),_:1})}const pI=Zi(lI,[["render",dI],["__scopeId","data-v-84833581"]]);class gI{constructor(e={}){var n;this.$store=e.store,this.mounted=!1,this.$root=null,(n=window.$cosmosNotify)!=null&&n.$root?(this.mounted=!0,this.$root=window.$cosmosNotify.$root):window.$cosmosNotify=this}mount(){if(this.mounted)return;const e=nu(pI);e.use(fd);const n=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(n),this.$root=e.mount(n),this.mounted=!0}open({method:e,title:n,body:i,message:h,level:p,duration:m,type:b="alert",logToConsole:d=!1,saveToHistory:g=!0}){this.mount(),d&&console.log(h?`${p.toUpperCase()} - ${h}`:`${p.toUpperCase()} - ${n}: ${i}`),g&&this.$store.commit("notifyAddHistory",{title:n,body:i,message:h,level:p}),this[e]({title:n,body:i,message:h,level:p,duration:m,type:b})}toast({title:e,body:n,message:i,level:h,duration:p,type:m}){this.$root.toast({title:e,body:n,message:i,level:h,type:m},p)}critical({title:e,body:n,message:i,type:h,duration:p,logToConsole:m,saveToHistory:b}){this.open({method:"toast",level:"critical",title:e,body:n,message:i,type:h,duration:p,logToConsole:m,saveToHistory:b})}FATAL(e){this.critical(e)}ERROR(e){this.critical(e)}serious({title:e,body:n,message:i,type:h,duration:p,logToConsole:m,saveToHistory:b}){this.open({method:"toast",level:"serious",title:e,body:n,message:i,type:h,duration:p,logToConsole:m,saveToHistory:b})}caution({title:e,body:n,message:i,type:h,duration:p,logToConsole:m,saveToHistory:b}){this.open({method:"toast",level:"caution",title:e,body:n,message:i,type:h,duration:p,logToConsole:m,saveToHistory:b})}WARN(e){this.caution(e)}normal({title:e,body:n,message:i,type:h,duration:p,logToConsole:m,saveToHistory:b}){this.open({method:"toast",level:"normal",title:e,body:n,message:i,type:h,duration:p,logToConsole:m,saveToHistory:b})}INFO(e){this.normal(e)}DEBUG(e){this.normal(e)}standby({title:e,body:n,message:i,type:h,duration:p,logToConsole:m,saveToHistory:b}){this.open({method:"toast",level:"standby",title:e,body:n,message:i,type:h,duration:p,logToConsole:m,saveToHistory:b})}off({title:e,body:n,message:i,type:h,duration:p,logToConsole:m,saveToHistory:b}){this.open({method:"toast",level:"off",title:e,body:n,message:i,type:h,duration:p,logToConsole:m,saveToHistory:b})}}const fI={install(t,e){const n=new gI(e);t.provide("notify",n),t.config.globalProperties.hasOwnProperty("$notify")||(t.config.globalProperties.$notify=n)}},Wy=100,By=Ap({state(){return{notifyHistory:[],namedWidgets:{},playback:{playbackMode:null,playbackDateTime:null,playbackStep:1}}},getters:{namedWidget:t=>e=>t.namedWidgets[e]},mutations:{notifyAddHistory(t,e){t.notifyHistory.length>=Wy&&(t.notifyHistory.length=Wy-1),t.notifyHistory.unshift(e)},notifyClearHistory(t){t.notifyHistory=[]},setNamedWidget(t,e){Object.assign(t.namedWidgets,e)},clearNamedWidget(t,e){delete t.namedWidgets[e]},playback(t,e){Object.assign(t.playback,e)}},modules:{}});function zy(t){let e;return t!==null&&typeof t=="object"&&((e=Object.getPrototypeOf(t))===Object.prototype||e===null)}function mI(t,e){const n={};for(const i of e)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n}function jy(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const i={};for(const h in t)i[h]=t[h];for(const h in e){const p=t[h],m=e[h];if(zy(p)&&zy(m)){i[h]=jy(p,m,n);continue}if(n&&Array.isArray(p)&&Array.isArray(m)){i[h]=n(p,m);continue}i[h]=m}return i}function Ja(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Ja.cache.has(t))return Ja.cache.get(t);const e=t.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Ja.cache.set(t,e),e}Ja.cache=new Map;function vI(t){vp(`Vuetify: ${t}`)}function Hy(t,e){return n=>Object.keys(t).reduce((i,h)=>{const p=typeof t[h]=="object"&&t[h]!=null&&!Array.isArray(t[h])?t[h]:{type:t[h]};return n&&h in n?i[h]={...p,default:n[h]}:i[h]=p,e&&!i[h].source&&(i[h].source=e),i},{})}function Uy(t,e){const n=xp();if(!n)throw new Error(`[Vuetify] ${t} must be called from inside a setup function`);return n}function yI(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Uy("injectSelf");const{provides:n}=e;if(n&&t in n)return n[t]}const gd=Symbol.for("vuetify:defaults");function Vy(){const t=yp(gd);if(!t)throw new Error("[Vuetify] Could not find defaults instance");return t}function wI(t,e){return t.props&&(typeof t.props[e]<"u"||typeof t.props[Ja(e)]<"u")}function bI(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Vy();const i=Uy("useDefaults");if(e=e??i.type.name??i.type.__name,!e)throw new Error("[Vuetify] Could not determine component name");const h=tu(()=>{var d;return(d=n.value)==null?void 0:d[t._as??e]}),p=new Proxy(t,{get(d,g){var o,a,u,l;const s=Reflect.get(d,g);if(g==="class"||g==="style")return[(o=h.value)==null?void 0:o[g],s].filter(w=>w!=null);if(wI(i.vnode,g))return s;const c=(a=h.value)==null?void 0:a[g];if(c!==void 0)return c;const f=(l=(u=n.value)==null?void 0:u.global)==null?void 0:l[g];return f!==void 0?f:s}}),m=wp();bp(()=>{if(h.value){const d=Object.entries(h.value).filter(g=>{let[o]=g;return o.startsWith(o[0].toUpperCase())});m.value=d.length?Object.fromEntries(d):void 0}else m.value=void 0});function b(){const d=yI(gd,i);Cp(gd,tu(()=>m.value?jy((d==null?void 0:d.value)??{},m.value):d==null?void 0:d.value))}return{props:p,provideSubDefaults:b}}function yc(t){if(t._setup=t._setup??t.setup,!t.name)return vI("The component is missing an explicit name, unable to generate default prop value"),t;if(t._setup){t.props=Hy(t.props??{},t.name)();const e=Object.keys(t.props).filter(n=>n!=="class"&&n!=="style");t.filterProps=function(n){return mI(n,e)},t.props._as=String,t.setup=function(n,i){const h=Vy();if(!h.value)return t._setup(n,i);const{props:p,provideSubDefaults:m}=bI(n,n._as??t.name,h),b=t._setup(p,i);return m(),b}}return t}function xI(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return e=>(t?yc:mp)(e)}const CI=[String,Function,Object,Array],wc=Hy({icon:{type:CI},tag:{type:[String,Object,Function],required:!0}},"icon");xI()({name:"VComponentIcon",props:wc(),setup(t,e){let{slots:n}=e;return()=>{const i=t.icon;return se(t.tag,null,{default:()=>{var h;return[t.icon?se(i,null,null):(h=n.default)==null?void 0:h.call(n)]}})}}}),yc({name:"VSvgIcon",inheritAttrs:!1,props:wc(),setup(t,e){let{attrs:n}=e;return()=>se(t.tag,kp(n,{style:null}),{default:()=>[Yt("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(i=>Array.isArray(i)?Yt("path",{d:i[0],"fill-opacity":i[1]},null):Yt("path",{d:i},null)):Yt("path",{d:t.icon},null)])]})}}),yc({name:"VLigatureIcon",props:wc(),setup(t){return()=>se(t.tag,null,{default:()=>[t.icon]})}});const kI=yc({name:"VClassIcon",props:wc(),setup(t){return()=>se(t.tag,{class:Sa(t.icon)},null)}}),SI={component:t=>Bs(kI,{...t,class:"mdi"})},fd=$p({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:JT}},icons:{defaultSet:"mdi",sets:{mdi:SI,...PT,...FT}}}),md=Wb({createApp:nu,appOptions:{render(){return Bs(Kb,{})},el:"#openc3-tool"},handleInstance:t=>{t.use(QT),t.use(By),t.use(fd),t.use(aI),t.use(fI,{store:By})}}),yD=Pn("g",md.bootstrap),wD=Pn("m",md.mount),bD=Pn("u",md.unmount)})}}));