openc3-cosmos-tool-bucketexplorer 6.3.0 → 6.4.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 (106) hide show
  1. checksums.yaml +4 -4
  2. data/tools/bucketexplorer/ArrayWidget-DAZApfkV-ebccd0f4d889c29f4fc9.js +2 -0
  3. data/tools/bucketexplorer/{ArrayplotWidget-CCKEyYIx-e643e8798adc5b452a84.js → ArrayplotWidget-BfsxDplv-5a4489357d9ff132532a.js} +1 -1
  4. data/tools/bucketexplorer/{BarColumn-C6p07yWK-5c7bbacb85aff7c1e7ca.js → BarColumn-q0nAsvrd-af31cb55df71d5c075eb.js} +1 -1
  5. data/tools/bucketexplorer/BlockWidget-SDCUWcMQ-e2b62bbb13b0fdc0807b.js +2 -0
  6. data/tools/bucketexplorer/BucketExplorer-c8a26b4a709d6a9475f0.js +1505 -0
  7. data/tools/bucketexplorer/{ButtonWidget-CtfJzCBR-49ed86a3eeaff7fb591e.js → ButtonWidget-BVMjwC19-b0bd858eff2e771adb60.js} +2 -2
  8. data/tools/bucketexplorer/CanvasWidget-bVkufjRQ-ee93db2c318c8dc389f5.js +1 -0
  9. data/tools/bucketexplorer/CanvasdotWidget-DpniFfca-842cea0eec113ba110ca.js +1 -0
  10. data/tools/bucketexplorer/{CanvasimageWidget-BPlj5QYK-8d8661eb3bec77850365.js → CanvasimageWidget-DHOSz-dJ-ee3f3a519e04249fdefb.js} +1 -1
  11. data/tools/bucketexplorer/{CanvasimagevalueWidget-DVFGLt8f-cb1b1c1e263304996795.js → CanvasimagevalueWidget-zrURWWUL-8e3ea53d3bb625eeda31.js} +1 -1
  12. data/tools/bucketexplorer/CanvaslabelWidget-D-XAMifp-8bb424fc472620555810.js +1 -0
  13. data/tools/bucketexplorer/{CanvaslabelvalueWidget-B7yIDmsn-ee35639139b2238e6c45.js → CanvaslabelvalueWidget-BsIdBtEb-da8737e2f5234db9adca.js} +1 -1
  14. data/tools/bucketexplorer/CanvaslineWidget-CA2aPGRg-265f482fb826e4dd24d8.js +1 -0
  15. data/tools/bucketexplorer/{CanvaslinevalueWidget-Cq-Ddh0P-f01ad88e930142c950cc.js → CanvaslinevalueWidget-J7epKRlo-aa62cb914efaa2c72f52.js} +1 -1
  16. data/tools/bucketexplorer/CheckbuttonWidget-ByH-PDRG-4f7a57213fb35ee98b7a.js +1 -0
  17. data/tools/bucketexplorer/ComboboxWidget-Bdm_fMzW-c95c43221acf90ccb8bf.js +1 -0
  18. data/tools/bucketexplorer/DateWidget-BaQqthC7-fde9ff5a1209a56e895c.js +1 -0
  19. data/tools/bucketexplorer/{DetailsDialog-DmEC5BTs-e564267d87b5914f6976.js → DetailsDialog-C5jf8o0K-2e25b1a9f33b3cab07b9.js} +1 -1
  20. data/tools/bucketexplorer/{DynamicWidget-CfMtj7H8-62f823a867781781596e.js → DynamicWidget-CfMtj7H8-9a26deabef7527b1d8ab.js} +1 -1
  21. data/tools/bucketexplorer/FormatvalueWidget--H5B9i_Y-d972db1320f5a94fd483.js +1 -0
  22. data/tools/bucketexplorer/Graph-M382Zo8o-1db2dae6eeac5bcff5bf.js +1 -0
  23. data/tools/bucketexplorer/{GraphWidget-DurWDmpg-b43e4a859d04962daddc.js → GraphWidget-_YOGDD1U-199c1e67eaf3556c217e.js} +1 -1
  24. data/tools/bucketexplorer/{HorizontalWidget-Cd_wl1b3-c828473da5c64e4c9489.js → HorizontalWidget-D_gzrOWs-1e415f375dff1c2e3f95.js} +1 -1
  25. data/tools/bucketexplorer/HorizontalboxWidget-GDcjO-UB-5b917112309608b987b6.js +1 -0
  26. data/tools/bucketexplorer/HorizontallineWidget-DZvOYFxf-6182e61b2c7066616d03.js +1 -0
  27. data/tools/bucketexplorer/{IframeWidget-BPerHCCa-3d7296ffca16530b6b04.js → IframeWidget-CuUav9b3-6fb109f3a35943867bd8.js} +1 -1
  28. data/tools/bucketexplorer/{ImageLoader-4N-7Gj61-4a593e737e514266c071.js → ImageLoader-3KLKJ5mV-bf751a6dc6185b897ef1.js} +1 -1
  29. data/tools/bucketexplorer/ImageviewerWidget-BMZ6REN4-ef48468d98dd8f5a79f6.js +1 -0
  30. data/tools/bucketexplorer/{LabelWidget-xrmcVeq8-fcc9fea1e3b2a89b572e.js → LabelWidget-oh6FIG6s-2cd043da76ed4f5d4800.js} +1 -1
  31. data/tools/bucketexplorer/LabelledWidget-Bic36les-1f05122087725dfbae7d.js +1 -0
  32. data/tools/bucketexplorer/LabelprogressbarWidget-CqIiGoDb-6a58a65027d4cbc2db8e.js +1 -0
  33. data/tools/bucketexplorer/{LabelsparklineWidget-0KXQyPoU-343f35445a43d237ac38.js → LabelsparklineWidget-DLhmqO02-ef54f37a096804eacb9c.js} +1 -1
  34. data/tools/bucketexplorer/LabelvalueWidget-BefwSSVq-bd0b491f02e8812bd08c.js +1 -0
  35. data/tools/bucketexplorer/{LabelvaluedescWidget-Bo8zT01X-d9fe81480425c396a048.js → LabelvaluedescWidget-NxrCzznm-eb3e6ff299590a1515e8.js} +1 -1
  36. data/tools/bucketexplorer/LabelvaluelimitsbarWidget-pq7qoolL-3b9b32a4088758e11188.js +1 -0
  37. data/tools/bucketexplorer/LabelvaluelimitscolumnWidget-edkpogsl-511ba940a2e3cf0d3d42.js +1 -0
  38. data/tools/bucketexplorer/LabelvaluerangebarWidget-DpJNv9dh-97033bbb64e51ef23dc4.js +1 -0
  39. data/tools/bucketexplorer/{Layout-Tf--nruw-6233babe9106d14d477a.js → Layout-B0hvhBQO-3e4765df8a4c5efa50b5.js} +1 -1
  40. data/tools/bucketexplorer/{LedWidget-qH_FthkK-4e1254e4141543ad21a0.js → LedWidget--4eSxBnn-a6c51c7de962ba5a2887.js} +1 -1
  41. data/tools/bucketexplorer/LimitsbarWidget-BQaumgRt-129d114da18318240cdf.js +1 -0
  42. data/tools/bucketexplorer/{LimitscolorWidget-c6Qa6su7-4ec34c9967178f49c48b.js → LimitscolorWidget-BBF9sRtF-5cc3ec96819788f36cc3.js} +1 -1
  43. data/tools/bucketexplorer/{LimitscolumnWidget-CcLs_443-a86448d5635e917bc427.js → LimitscolumnWidget-DZZtSoXw-12bfe588e9b471a113dc.js} +1 -1
  44. data/tools/bucketexplorer/{LinegraphWidget-BSVYLFo1-fee4c34e457b1ca7af1d.js → LinegraphWidget-DTLZmyWs-fb5e1bbe3e9621d0f4fc.js} +1 -1
  45. data/tools/bucketexplorer/{MatrixbycolumnsWidget-DXFpZTre-23e9224c69f02f6d32d5.js → MatrixbycolumnsWidget-dpgZz4wR-e8b84ab48c85481196b1.js} +1 -1
  46. data/tools/bucketexplorer/{ProgressbarWidget-iYGw8-Dc-b2714b06042b710b2aa6.js → ProgressbarWidget-7cYr8136-b518f3206a8405331f39.js} +1 -1
  47. data/tools/bucketexplorer/RadiobuttonWidget-DTfn-7F2-b5df32ec6974df358e53.js +1 -0
  48. data/tools/bucketexplorer/RadiogroupWidget-DWvTpw94-baf879b48df1c5b5143f.js +1 -0
  49. data/tools/bucketexplorer/{RangebarWidget-D_zGTtCa-8afafbc3b78c05353dd1.js → RangebarWidget-CG2Y7eYp-810bc4c4575ef798b32e.js} +1 -1
  50. data/tools/bucketexplorer/{RollupWidget-Dolsixyt-523dd72502cac46e5e11.js → RollupWidget-C6HKTfCR-f6fa049267cd86e6e79d.js} +1 -1
  51. data/tools/bucketexplorer/{ScrollwindowWidget-DV2nZuNi-383cddbf07f020fa8597.js → ScrollwindowWidget-DvhBCYd2-bab70d51dd7fea9d693a.js} +1 -1
  52. data/tools/bucketexplorer/SignalWidget-BZIoGjam-3dbafc090093c226eb8f.js +1 -0
  53. data/tools/bucketexplorer/SpacerWidget-YBS8RZIE-609507312e41b6a0a5ad.js +1 -0
  54. data/tools/bucketexplorer/{SparklineWidget-coxi9r2g-3002a5ca5a6aa8f05308.js → SparklineWidget-BMhY9vYe-a4d97a65ca561ac787ae.js} +1 -1
  55. data/tools/bucketexplorer/{TabbookWidget-B1XKplGH-bd824a152e6eabbc63f9.js → TabbookWidget-RfET19pq-348326c13dbdf781b7f1.js} +1 -1
  56. data/tools/bucketexplorer/TextboxWidget-M8vFBSxS-f0028e771ba4f025d303.js +1 -0
  57. data/tools/bucketexplorer/TextfieldWidget-Dev7lCsT-699275f13ec44b3df372.js +1 -0
  58. data/tools/bucketexplorer/TimeWidget-CQzn13rQ-b02f9f2b022360235af0.js +1 -0
  59. data/tools/bucketexplorer/TitleWidget-C4zbSian-561471f698709b4641a3.js +1 -0
  60. data/tools/bucketexplorer/{VWidget-DQqb7NVW-849ec2d31829a89fb8f1.js → VWidget-iASFPjdx-e52e7edb2e6590638343.js} +1 -1
  61. data/tools/bucketexplorer/ValueWidget-BVI6uUVX-41dda1c5e85d02dd8dd4.js +1 -0
  62. data/tools/bucketexplorer/ValuelimitsbarWidget-BiIcery0-d5fb3cf3e0859e4aa8e6.js +1 -0
  63. data/tools/bucketexplorer/{ValuelimitscolumnWidget-QvhI6EcE-9342e3f4549eee944c9d.js → ValuelimitscolumnWidget-BiRI8GbI-3ccd0ae1d705b2b4c93d.js} +1 -1
  64. data/tools/bucketexplorer/{ValuerangebarWidget-Dt3K9BnC-2ed9341849547e81903a.js → ValuerangebarWidget-CtMFQu9--f52986e29bb622dbdf11.js} +1 -1
  65. data/tools/bucketexplorer/VerticalWidget-CRmcpQBn-5e4566b3eb1377166740.js +1 -0
  66. data/tools/bucketexplorer/VerticalboxWidget-C-qChjug-7a3e96c97106bed30f19.js +1 -0
  67. data/tools/bucketexplorer/Widget-CFEnOKms-315bdcf05c82cbd3cc90.js +1 -0
  68. data/tools/bucketexplorer/main-c2a4bae1b90f56b8972c.js +8 -0
  69. data/tools/bucketexplorer/main.js +1 -1
  70. metadata +69 -69
  71. data/tools/bucketexplorer/ArrayWidget-BbsN1dzF-3c816617807c4a1bbd0b.js +0 -2
  72. data/tools/bucketexplorer/BlockWidget-DlCHbqZX-2e2734ab4b0f1a5538ac.js +0 -2
  73. data/tools/bucketexplorer/BucketExplorer-b5be590d781a24b34d51.js +0 -1501
  74. data/tools/bucketexplorer/CanvasWidget-CqRlXc4r-df0117c2b26a03da9da9.js +0 -1
  75. data/tools/bucketexplorer/CanvasdotWidget--Xr_KsZs-fc30f1224a7323408794.js +0 -1
  76. data/tools/bucketexplorer/CanvaslabelWidget-CYNqmyP0-ecc1e24fd84ea4d742c4.js +0 -1
  77. data/tools/bucketexplorer/CanvaslineWidget-BICdxX0Q-99f8550b9928117b63d1.js +0 -1
  78. data/tools/bucketexplorer/CheckbuttonWidget-B74AWeaW-deb0dab57a05d5af158b.js +0 -1
  79. data/tools/bucketexplorer/ComboboxWidget-CtyKbEWb-213a19cde84919ab44db.js +0 -1
  80. data/tools/bucketexplorer/DateWidget-BEVSczU8-b3d34083d4706f4543f9.js +0 -1
  81. data/tools/bucketexplorer/FormatvalueWidget-DN12xymS-8d9c1ffc0a6950bea903.js +0 -1
  82. data/tools/bucketexplorer/Graph-Bgo0cjl3-66094894befec8fc3c73.js +0 -1
  83. data/tools/bucketexplorer/HorizontalboxWidget-BcMTFBU--cd3830bdb8d05f2819a3.js +0 -1
  84. data/tools/bucketexplorer/HorizontallineWidget-CXFqHclf-643db9a80d241e6e2df8.js +0 -1
  85. data/tools/bucketexplorer/ImageviewerWidget-Cw_H_HmZ-3956afe82618985654d2.js +0 -1
  86. data/tools/bucketexplorer/LabelledWidget-D48QoyMk-a92c1bcb9dbe018ac11e.js +0 -1
  87. data/tools/bucketexplorer/LabelprogressbarWidget-C_950t6g-bb0d03d7482148b436db.js +0 -1
  88. data/tools/bucketexplorer/LabelvalueWidget-CQ06wWDK-948ef42346f9dde609e2.js +0 -1
  89. data/tools/bucketexplorer/LabelvaluelimitsbarWidget-BucTw8Yk-21c8d656590441f125f5.js +0 -1
  90. data/tools/bucketexplorer/LabelvaluelimitscolumnWidget-Dflb1hNd-d760751c866674a79410.js +0 -1
  91. data/tools/bucketexplorer/LabelvaluerangebarWidget-D8cbfXFM-e1ae51493447f44ce2a6.js +0 -1
  92. data/tools/bucketexplorer/LimitsbarWidget-B9lAB2RD-3e2b48bc0114dd3da28c.js +0 -1
  93. data/tools/bucketexplorer/RadiobuttonWidget-ytmoVZ3u-169453335987c0f80710.js +0 -1
  94. data/tools/bucketexplorer/RadiogroupWidget-CusMBhKH-2ea8e64bcbb604d3fdd3.js +0 -1
  95. data/tools/bucketexplorer/SignalWidget-d9-6h85k-228cec76e7f4bf140459.js +0 -1
  96. data/tools/bucketexplorer/SpacerWidget-BH0p2OLi-66846b399ec3e33dc711.js +0 -1
  97. data/tools/bucketexplorer/TextboxWidget-C-_M2M4l-85e29fd4a2af82ef161e.js +0 -1
  98. data/tools/bucketexplorer/TextfieldWidget-C08N4JE8-c8f84ae183157aa30ad7.js +0 -1
  99. data/tools/bucketexplorer/TimeWidget-DtwdEcFg-d2d5984a0aa366ad1d27.js +0 -1
  100. data/tools/bucketexplorer/TitleWidget-CT-aLcNb-640dea16004e819dd90f.js +0 -1
  101. data/tools/bucketexplorer/ValueWidget-C6RanBj3-83744f73e96bc8267ef5.js +0 -1
  102. data/tools/bucketexplorer/ValuelimitsbarWidget-B3bvjfxc-1306042ed01ad1aebc54.js +0 -1
  103. data/tools/bucketexplorer/VerticalWidget-BIIViZgI-992c95609a2a2e955b1e.js +0 -1
  104. data/tools/bucketexplorer/VerticalboxWidget-DY72fLHW-9e9cc22604c92d8faac2.js +0 -1
  105. data/tools/bucketexplorer/Widget-oyqWpFXJ-961d98cc84c89410b01e.js +0 -1
  106. data/tools/bucketexplorer/main-4d58a9f98438f39807d6.js +0 -8
@@ -0,0 +1,1505 @@
1
+ System.register(["./main-c2a4bae1b90f56b8972c.js","vue","single-spa"],function(Wi,ut){"use strict";var lt,Vu,xf,kf,Ut,Jn,Zt,it,ot,fr,Br,er,Sf,Yr,_o,Ko,Ku,Gu,so,Yu,ys,_f;return{setters:[yn=>{lt=yn._,Vu=yn.d,xf=yn.a},yn=>{kf=yn.defineAsyncComponent,Ut=yn.resolveComponent,Jn=yn.createBlock,Zt=yn.openBlock,it=yn.withCtx,ot=yn.createVNode,fr=yn.createElementVNode,Br=yn.toDisplayString,er=yn.createTextVNode,Sf=yn.Teleport,Yr=yn.createElementBlock,_o=yn.Fragment,Ko=yn.renderList,Ku=yn.mergeProps,Gu=yn.createSlots,so=yn.createCommentVNode,Yu=yn.normalizeStyle,ys=yn.withModifiers,_f=yn.withKeys},null],execute:function(){var yn=document.createElement("style");yn.textContent=`.font-size[data-v-5d442166]{font-size:1rem}.small-font-size[data-v-5d442166]{font-size:.8rem}.file-input[data-v-5d442166]{padding-top:0;margin-top:0}
2
+ /*$vite$:1*/`,document.head.appendChild(yn),Wi({$:gg,c:IL,l:Cn,m:Ar,y:tr,z:dp});var jx=Object.defineProperty,Wx=(t,e,n)=>e in t?jx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Cf=(t,e,n)=>Wx(t,e+"",n);function $f(t,e){return function(){return t.apply(e,arguments)}}const{toString:zx}=Object.prototype,{getPrototypeOf:Xu}=Object,{iterator:jl,toStringTag:Tf}=Symbol,Wl=(t=>e=>{const n=zx.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),zi=t=>(t=t.toLowerCase(),e=>Wl(e)===t),zl=t=>e=>typeof e===t,{isArray:sa}=Array,qa=zl("undefined");function Hx(t){return t!==null&&!qa(t)&&t.constructor!==null&&!qa(t.constructor)&&Xr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Af=zi("ArrayBuffer");function Ux(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Af(t.buffer),e}const qx=zl("string"),Xr=zl("function"),Ef=zl("number"),Hl=t=>t!==null&&typeof t=="object",Vx=t=>t===!0||t===!1,Ul=t=>{if(Wl(t)!=="object")return!1;const e=Xu(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Tf in t)&&!(jl in t)},Kx=zi("Date"),Gx=zi("File"),Yx=zi("Blob"),Xx=zi("FileList"),Qx=t=>Hl(t)&&Xr(t.pipe),Zx=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Xr(t.append)&&((e=Wl(t))==="formdata"||e==="object"&&Xr(t.toString)&&t.toString()==="[object FormData]"))},Jx=zi("URLSearchParams"),[e1,t1,n1,r1]=["ReadableStream","Request","Response","Headers"].map(zi),i1=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Va(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,u;if(typeof t!="object"&&(t=[t]),sa(t))for(r=0,u=t.length;r<u;r++)e.call(null,t[r],r,t);else{const d=n?Object.getOwnPropertyNames(t):Object.keys(t),f=d.length;let b;for(r=0;r<f;r++)b=d[r],e.call(null,t[b],b,t)}}function Rf(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,u;for(;r-- >0;)if(u=n[r],e===u.toLowerCase())return u;return null}const vs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Mf=t=>!qa(t)&&t!==vs;function Qu(){const{caseless:t}=Mf(this)&&this||{},e={},n=(r,u)=>{const d=t&&Rf(e,u)||u;Ul(e[d])&&Ul(r)?e[d]=Qu(e[d],r):Ul(r)?e[d]=Qu({},r):sa(r)?e[d]=r.slice():e[d]=r};for(let r=0,u=arguments.length;r<u;r++)arguments[r]&&Va(arguments[r],n);return e}const o1=(t,e,n,{allOwnKeys:r}={})=>(Va(e,(u,d)=>{n&&Xr(u)?t[d]=$f(u,n):t[d]=u},{allOwnKeys:r}),t),s1=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),a1=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},l1=(t,e,n,r)=>{let u,d,f;const b={};if(e=e||{},t==null)return e;do{for(u=Object.getOwnPropertyNames(t),d=u.length;d-- >0;)f=u[d],(!r||r(f,t,e))&&!b[f]&&(e[f]=t[f],b[f]=!0);t=n!==!1&&Xu(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},c1=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},u1=t=>{if(!t)return null;if(sa(t))return t;let e=t.length;if(!Ef(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},h1=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Xu(Uint8Array)),d1=(t,e)=>{const n=(t&&t[jl]).call(t);let r;for(;(r=n.next())&&!r.done;){const u=r.value;e.call(t,u[0],u[1])}},p1=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},f1=zi("HTMLFormElement"),g1=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),Lf=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),m1=zi("RegExp"),Of=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Va(n,(u,d)=>{let f;(f=e(u,d,t))!==!1&&(r[d]=f||u)}),Object.defineProperties(t,r)},y1=t=>{Of(t,(e,n)=>{if(Xr(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Xr(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},v1=(t,e)=>{const n={},r=u=>{u.forEach(d=>{n[d]=!0})};return sa(t)?r(t):r(String(t).split(e)),n},b1=()=>{},w1=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function x1(t){return!!(t&&Xr(t.append)&&t[Tf]==="FormData"&&t[jl])}const k1=t=>{const e=new Array(10),n=(r,u)=>{if(Hl(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[u]=r;const d=sa(r)?[]:{};return Va(r,(f,b)=>{const p=n(f,u+1);!qa(p)&&(d[b]=p)}),e[u]=void 0,d}}return r};return n(t,0)},S1=zi("AsyncFunction"),_1=t=>t&&(Hl(t)||Xr(t))&&Xr(t.then)&&Xr(t.catch),If=((t,e)=>t?setImmediate:e?((n,r)=>(vs.addEventListener("message",({source:u,data:d})=>{u===vs&&d===n&&r.length&&r.shift()()},!1),u=>{r.push(u),vs.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Xr(vs.postMessage)),C1=typeof queueMicrotask<"u"?queueMicrotask.bind(vs):typeof process<"u"&&process.nextTick||If,$1=t=>t!=null&&Xr(t[jl]),Ce={isArray:sa,isArrayBuffer:Af,isBuffer:Hx,isFormData:Zx,isArrayBufferView:Ux,isString:qx,isNumber:Ef,isBoolean:Vx,isObject:Hl,isPlainObject:Ul,isReadableStream:e1,isRequest:t1,isResponse:n1,isHeaders:r1,isUndefined:qa,isDate:Kx,isFile:Gx,isBlob:Yx,isRegExp:m1,isFunction:Xr,isStream:Qx,isURLSearchParams:Jx,isTypedArray:h1,isFileList:Xx,forEach:Va,merge:Qu,extend:o1,trim:i1,stripBOM:s1,inherits:a1,toFlatObject:l1,kindOf:Wl,kindOfTest:zi,endsWith:c1,toArray:u1,forEachEntry:d1,matchAll:p1,isHTMLForm:f1,hasOwnProperty:Lf,hasOwnProp:Lf,reduceDescriptors:Of,freezeMethods:y1,toObjectSet:v1,toCamelCase:g1,noop:b1,toFiniteNumber:w1,findKey:Rf,global:vs,isContextDefined:Mf,isSpecCompliantForm:x1,toJSONObject:k1,isAsyncFn:S1,isThenable:_1,setImmediate:If,asap:C1,isIterable:$1};function Rt(t,e,n,r,u){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),r&&(this.request=r),u&&(this.response=u,this.status=u.status?u.status:null)}Ce.inherits(Rt,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:Ce.toJSONObject(this.config),code:this.code,status:this.status}}});const Nf=Rt.prototype,Df={};["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=>{Df[t]={value:t}}),Object.defineProperties(Rt,Df),Object.defineProperty(Nf,"isAxiosError",{value:!0}),Rt.from=(t,e,n,r,u,d)=>{const f=Object.create(Nf);return Ce.toFlatObject(t,f,function(b){return b!==Error.prototype},b=>b!=="isAxiosError"),Rt.call(f,t.message,e,n,r,u),f.cause=t,f.name=t.name,d&&Object.assign(f,d),f};const T1=null;function Zu(t){return Ce.isPlainObject(t)||Ce.isArray(t)}function Ff(t){return Ce.endsWith(t,"[]")?t.slice(0,-2):t}function Pf(t,e,n){return t?t.concat(e).map(function(r,u){return r=Ff(r),!n&&u?"["+r+"]":r}).join(n?".":""):e}function A1(t){return Ce.isArray(t)&&!t.some(Zu)}const E1=Ce.toFlatObject(Ce,{},null,function(t){return/^is[A-Z]/.test(t)});function ql(t,e,n){if(!Ce.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=Ce.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(c,o){return!Ce.isUndefined(o[c])});const r=n.metaTokens,u=n.visitor||g,d=n.dots,f=n.indexes,b=(n.Blob||typeof Blob<"u"&&Blob)&&Ce.isSpecCompliantForm(e);if(!Ce.isFunction(u))throw new TypeError("visitor must be a function");function p(c){if(c===null)return"";if(Ce.isDate(c))return c.toISOString();if(!b&&Ce.isBlob(c))throw new Rt("Blob is not supported. Use a Buffer instead.");return Ce.isArrayBuffer(c)||Ce.isTypedArray(c)?b&&typeof Blob=="function"?new Blob([c]):Buffer.from(c):c}function g(c,o,l){let m=c;if(c&&!l&&typeof c=="object"){if(Ce.endsWith(o,"{}"))o=r?o:o.slice(0,-2),c=JSON.stringify(c);else if(Ce.isArray(c)&&A1(c)||(Ce.isFileList(c)||Ce.endsWith(o,"[]"))&&(m=Ce.toArray(c)))return o=Ff(o),m.forEach(function(w,k){!(Ce.isUndefined(w)||w===null)&&e.append(f===!0?Pf([o],k,d):f===null?o:o+"[]",p(w))}),!1}return Zu(c)?!0:(e.append(Pf(l,o,d),p(c)),!1)}const i=[],a=Object.assign(E1,{defaultVisitor:g,convertValue:p,isVisitable:Zu});function h(c,o){if(!Ce.isUndefined(c)){if(i.indexOf(c)!==-1)throw Error("Circular reference detected in "+o.join("."));i.push(c),Ce.forEach(c,function(l,m){(!(Ce.isUndefined(l)||l===null)&&u.call(e,l,Ce.isString(m)?m.trim():m,o,a))===!0&&h(l,o?o.concat(m):[m])}),i.pop()}}if(!Ce.isObject(t))throw new TypeError("data must be an object");return h(t),e}function Bf(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Ju(t,e){this._pairs=[],t&&ql(t,this,e)}const jf=Ju.prototype;jf.append=function(t,e){this._pairs.push([t,e])},jf.toString=function(t){const e=t?function(n){return t.call(this,n,Bf)}:Bf;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function R1(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Wf(t,e,n){if(!e)return t;const r=n&&n.encode||R1;Ce.isFunction(n)&&(n={serialize:n});const u=n&&n.serialize;let d;if(u?d=u(e,n):d=Ce.isURLSearchParams(e)?e.toString():new Ju(e,n).toString(r),d){const f=t.indexOf("#");f!==-1&&(t=t.slice(0,f)),t+=(t.indexOf("?")===-1?"?":"&")+d}return t}let zf=class{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ce.forEach(this.handlers,function(n){n!==null&&e(n)})}};const Hf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},M1=typeof URLSearchParams<"u"?URLSearchParams:Ju,L1=typeof FormData<"u"?FormData:null,O1=typeof Blob<"u"?Blob:null,I1={isBrowser:!0,classes:{URLSearchParams:M1,FormData:L1,Blob:O1},protocols:["http","https","file","blob","url","data"]},eh=typeof window<"u"&&typeof document<"u",th=typeof navigator=="object"&&navigator||void 0,N1=eh&&(!th||["ReactNative","NativeScript","NS"].indexOf(th.product)<0),D1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",F1=eh&&window.location.href||"http://localhost",P1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:eh,hasStandardBrowserEnv:N1,hasStandardBrowserWebWorkerEnv:D1,navigator:th,origin:F1},Symbol.toStringTag,{value:"Module"})),$r={...P1,...I1};function B1(t,e){return ql(t,new $r.classes.URLSearchParams,Object.assign({visitor:function(n,r,u,d){return $r.isNode&&Ce.isBuffer(n)?(this.append(r,n.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)}},e))}function j1(t){return Ce.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function W1(t){const e={},n=Object.keys(t);let r;const u=n.length;let d;for(r=0;r<u;r++)d=n[r],e[d]=t[d];return e}function Uf(t){function e(n,r,u,d){let f=n[d++];if(f==="__proto__")return!0;const b=Number.isFinite(+f),p=d>=n.length;return f=!f&&Ce.isArray(u)?u.length:f,p?(Ce.hasOwnProp(u,f)?u[f]=[u[f],r]:u[f]=r,!b):((!u[f]||!Ce.isObject(u[f]))&&(u[f]=[]),e(n,r,u[f],d)&&Ce.isArray(u[f])&&(u[f]=W1(u[f])),!b)}if(Ce.isFormData(t)&&Ce.isFunction(t.entries)){const n={};return Ce.forEachEntry(t,(r,u)=>{e(j1(r),u,n,0)}),n}return null}function z1(t,e,n){if(Ce.isString(t))try{return(e||JSON.parse)(t),Ce.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Ka={transitional:Hf,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,u=Ce.isObject(t);if(u&&Ce.isHTMLForm(t)&&(t=new FormData(t)),Ce.isFormData(t))return r?JSON.stringify(Uf(t)):t;if(Ce.isArrayBuffer(t)||Ce.isBuffer(t)||Ce.isStream(t)||Ce.isFile(t)||Ce.isBlob(t)||Ce.isReadableStream(t))return t;if(Ce.isArrayBufferView(t))return t.buffer;if(Ce.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(u){if(n.indexOf("application/x-www-form-urlencoded")>-1)return B1(t,this.formSerializer).toString();if((d=Ce.isFileList(t))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return ql(d?{"files[]":t}:t,f&&new f,this.formSerializer)}}return u||r?(e.setContentType("application/json",!1),z1(t)):t}],transformResponse:[function(t){const e=this.transitional||Ka.transitional,n=e&&e.forcedJSONParsing,r=this.responseType==="json";if(Ce.isResponse(t)||Ce.isReadableStream(t))return t;if(t&&Ce.isString(t)&&(n&&!this.responseType||r)){const u=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(d){if(u)throw d.name==="SyntaxError"?Rt.from(d,Rt.ERR_BAD_RESPONSE,this,null,this.response):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$r.classes.FormData,Blob:$r.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ce.forEach(["delete","get","head","post","put","patch"],t=>{Ka.headers[t]={}});const H1=Ce.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),U1=t=>{const e={};let n,r,u;return t&&t.split(`
3
+ `).forEach(function(d){u=d.indexOf(":"),n=d.substring(0,u).trim().toLowerCase(),r=d.substring(u+1).trim(),!(!n||e[n]&&H1[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},qf=Symbol("internals");function Ga(t){return t&&String(t).trim().toLowerCase()}function Vl(t){return t===!1||t==null?t:Ce.isArray(t)?t.map(Vl):String(t)}function q1(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const V1=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function nh(t,e,n,r,u){if(Ce.isFunction(r))return r.call(this,e,n);if(u&&(e=n),!!Ce.isString(e)){if(Ce.isString(r))return e.indexOf(r)!==-1;if(Ce.isRegExp(r))return r.test(e)}}function K1(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function G1(t,e){const n=Ce.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(u,d,f){return this[r].call(this,e,u,d,f)},configurable:!0})})}let Qr=class{constructor(e){e&&this.set(e)}set(e,n,r){const u=this;function d(b,p,g){const i=Ga(p);if(!i)throw new Error("header name must be a non-empty string");const a=Ce.findKey(u,i);(!a||u[a]===void 0||g===!0||g===void 0&&u[a]!==!1)&&(u[a||p]=Vl(b))}const f=(b,p)=>Ce.forEach(b,(g,i)=>d(g,i,p));if(Ce.isPlainObject(e)||e instanceof this.constructor)f(e,n);else if(Ce.isString(e)&&(e=e.trim())&&!V1(e))f(U1(e),n);else if(Ce.isObject(e)&&Ce.isIterable(e)){let b={},p,g;for(const i of e){if(!Ce.isArray(i))throw TypeError("Object iterator must return a key-value pair");b[g=i[0]]=(p=b[g])?Ce.isArray(p)?[...p,i[1]]:[p,i[1]]:i[1]}f(b,n)}else e!=null&&d(n,e,r);return this}get(e,n){if(e=Ga(e),e){const r=Ce.findKey(this,e);if(r){const u=this[r];if(!n)return u;if(n===!0)return q1(u);if(Ce.isFunction(n))return n.call(this,u,r);if(Ce.isRegExp(n))return n.exec(u);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ga(e),e){const r=Ce.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||nh(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let u=!1;function d(f){if(f=Ga(f),f){const b=Ce.findKey(r,f);b&&(!n||nh(r,r[b],b,n))&&(delete r[b],u=!0)}}return Ce.isArray(e)?e.forEach(d):d(e),u}clear(e){const n=Object.keys(this);let r=n.length,u=!1;for(;r--;){const d=n[r];(!e||nh(this,this[d],d,e,!0))&&(delete this[d],u=!0)}return u}normalize(e){const n=this,r={};return Ce.forEach(this,(u,d)=>{const f=Ce.findKey(r,d);if(f){n[f]=Vl(u),delete n[d];return}const b=e?K1(d):String(d).trim();b!==d&&delete n[d],n[b]=Vl(u),r[b]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return Ce.forEach(this,(r,u)=>{r!=null&&r!==!1&&(n[u]=e&&Ce.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
4
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(u=>r.set(u)),r}static accessor(e){const n=(this[qf]=this[qf]={accessors:{}}).accessors,r=this.prototype;function u(d){const f=Ga(d);n[f]||(G1(r,d),n[f]=!0)}return Ce.isArray(e)?e.forEach(u):u(e),this}};Qr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ce.reduceDescriptors(Qr.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),Ce.freezeMethods(Qr);function rh(t,e){const n=this||Ka,r=e||n,u=Qr.from(r.headers);let d=r.data;return Ce.forEach(t,function(f){d=f.call(n,d,u.normalize(),e?e.status:void 0)}),u.normalize(),d}function Vf(t){return!!(t&&t.__CANCEL__)}function aa(t,e,n){Rt.call(this,t??"canceled",Rt.ERR_CANCELED,e,n),this.name="CanceledError"}Ce.inherits(aa,Rt,{__CANCEL__:!0});function Kf(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Rt("Request failed with status code "+n.status,[Rt.ERR_BAD_REQUEST,Rt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Y1(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function X1(t,e){t=t||10;const n=new Array(t),r=new Array(t);let u=0,d=0,f;return e=e!==void 0?e:1e3,function(b){const p=Date.now(),g=r[d];f||(f=p),n[u]=b,r[u]=p;let i=d,a=0;for(;i!==u;)a+=n[i++],i=i%t;if(u=(u+1)%t,u===d&&(d=(d+1)%t),p-f<e)return;const h=g&&p-g;return h?Math.round(a*1e3/h):void 0}}function Q1(t,e){let n=0,r=1e3/e,u,d;const f=(b,p=Date.now())=>{n=p,u=null,d&&(clearTimeout(d),d=null),t.apply(null,b)};return[(...b)=>{const p=Date.now(),g=p-n;g>=r?f(b,p):(u=b,d||(d=setTimeout(()=>{d=null,f(u)},r-g)))},()=>u&&f(u)]}const Kl=(t,e,n=3)=>{let r=0;const u=X1(50,250);return Q1(d=>{const f=d.loaded,b=d.lengthComputable?d.total:void 0,p=f-r,g=u(p),i=f<=b;r=f;const a={loaded:f,total:b,progress:b?f/b:void 0,bytes:p,rate:g||void 0,estimated:g&&b&&i?(b-f)/g:void 0,event:d,lengthComputable:b!=null,[e?"download":"upload"]:!0};t(a)},n)},Gf=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Yf=t=>(...e)=>Ce.asap(()=>t(...e)),Z1=$r.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,$r.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL($r.origin),$r.navigator&&/(msie|trident)/i.test($r.navigator.userAgent)):()=>!0,J1=$r.hasStandardBrowserEnv?{write(t,e,n,r,u,d){const f=[t+"="+encodeURIComponent(e)];Ce.isNumber(n)&&f.push("expires="+new Date(n).toGMTString()),Ce.isString(r)&&f.push("path="+r),Ce.isString(u)&&f.push("domain="+u),d===!0&&f.push("secure"),document.cookie=f.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 ek(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function tk(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Xf(t,e,n){let r=!ek(e);return t&&(r||n==!1)?tk(t,e):e}const Qf=t=>t instanceof Qr?{...t}:t;function bs(t,e){e=e||{};const n={};function r(g,i,a,h){return Ce.isPlainObject(g)&&Ce.isPlainObject(i)?Ce.merge.call({caseless:h},g,i):Ce.isPlainObject(i)?Ce.merge({},i):Ce.isArray(i)?i.slice():i}function u(g,i,a,h){if(Ce.isUndefined(i)){if(!Ce.isUndefined(g))return r(void 0,g,a,h)}else return r(g,i,a,h)}function d(g,i){if(!Ce.isUndefined(i))return r(void 0,i)}function f(g,i){if(Ce.isUndefined(i)){if(!Ce.isUndefined(g))return r(void 0,g)}else return r(void 0,i)}function b(g,i,a){if(a in e)return r(g,i);if(a in t)return r(void 0,g)}const p={url:d,method:d,data:d,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,withXSRFToken:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,responseEncoding:f,validateStatus:b,headers:(g,i,a)=>u(Qf(g),Qf(i),a,!0)};return Ce.forEach(Object.keys(Object.assign({},t,e)),function(g){const i=p[g]||u,a=i(t[g],e[g],g);Ce.isUndefined(a)&&i!==b||(n[g]=a)}),n}const Zf=t=>{const e=bs({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:u,xsrfCookieName:d,headers:f,auth:b}=e;e.headers=f=Qr.from(f),e.url=Wf(Xf(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),b&&f.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):"")));let p;if(Ce.isFormData(n)){if($r.hasStandardBrowserEnv||$r.hasStandardBrowserWebWorkerEnv)f.setContentType(void 0);else if((p=f.getContentType())!==!1){const[g,...i]=p?p.split(";").map(a=>a.trim()).filter(Boolean):[];f.setContentType([g||"multipart/form-data",...i].join("; "))}}if($r.hasStandardBrowserEnv&&(r&&Ce.isFunction(r)&&(r=r(e)),r||r!==!1&&Z1(e.url))){const g=u&&d&&J1.read(d);g&&f.set(u,g)}return e},nk=typeof XMLHttpRequest<"u",rk=nk&&function(t){return new Promise(function(e,n){const r=Zf(t);let u=r.data;const d=Qr.from(r.headers).normalize();let{responseType:f,onUploadProgress:b,onDownloadProgress:p}=r,g,i,a,h,c;function o(){h&&h(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let l=new XMLHttpRequest;l.open(r.method.toUpperCase(),r.url,!0),l.timeout=r.timeout;function m(){if(!l)return;const k=Qr.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),R={data:!f||f==="text"||f==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:k,config:t,request:l};Kf(function(T){e(T),o()},function(T){n(T),o()},R),l=null}"onloadend"in l?l.onloadend=m:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(m)},l.onabort=function(){l&&(n(new Rt("Request aborted",Rt.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new Rt("Network Error",Rt.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let k=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const R=r.transitional||Hf;r.timeoutErrorMessage&&(k=r.timeoutErrorMessage),n(new Rt(k,R.clarifyTimeoutError?Rt.ETIMEDOUT:Rt.ECONNABORTED,t,l)),l=null},u===void 0&&d.setContentType(null),"setRequestHeader"in l&&Ce.forEach(d.toJSON(),function(k,R){l.setRequestHeader(R,k)}),Ce.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),f&&f!=="json"&&(l.responseType=r.responseType),p&&([a,c]=Kl(p,!0),l.addEventListener("progress",a)),b&&l.upload&&([i,h]=Kl(b),l.upload.addEventListener("progress",i),l.upload.addEventListener("loadend",h)),(r.cancelToken||r.signal)&&(g=k=>{l&&(n(!k||k.type?new aa(null,t,l):k),l.abort(),l=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const w=Y1(r.url);if(w&&$r.protocols.indexOf(w)===-1){n(new Rt("Unsupported protocol "+w+":",Rt.ERR_BAD_REQUEST,t));return}l.send(u||null)})},ik=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,u;const d=function(g){if(!u){u=!0,b();const i=g instanceof Error?g:this.reason;r.abort(i instanceof Rt?i:new aa(i instanceof Error?i.message:i))}};let f=e&&setTimeout(()=>{f=null,d(new Rt(`timeout ${e} of ms exceeded`,Rt.ETIMEDOUT))},e);const b=()=>{t&&(f&&clearTimeout(f),f=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),t=null)};t.forEach(g=>g.addEventListener("abort",d));const{signal:p}=r;return p.unsubscribe=()=>Ce.asap(b),p}},ok=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,u;for(;r<n;)u=r+e,yield t.slice(r,u),r=u},sk=async function*(t,e){for await(const n of ak(t))yield*ok(n,e)},ak=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Jf=(t,e,n,r)=>{const u=sk(t,e);let d=0,f,b=p=>{f||(f=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:g,value:i}=await u.next();if(g){b(),p.close();return}let a=i.byteLength;if(n){let h=d+=a;n(h)}p.enqueue(new Uint8Array(i))}catch(g){throw b(g),g}},cancel(p){return b(p),u.return()}},{highWaterMark:2})},Gl=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",eg=Gl&&typeof ReadableStream=="function",lk=Gl&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),tg=(t,...e)=>{try{return!!t(...e)}catch{return!1}},ck=eg&&tg(()=>{let t=!1;const e=new Request($r.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),ng=64*1024,ih=eg&&tg(()=>Ce.isReadableStream(new Response("").body)),Yl={stream:ih&&(t=>t.body)};Gl&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Yl[e]&&(Yl[e]=Ce.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Rt(`Response type '${e}' is not supported`,Rt.ERR_NOT_SUPPORT,r)})})})(new Response);const uk=async t=>{if(t==null)return 0;if(Ce.isBlob(t))return t.size;if(Ce.isSpecCompliantForm(t))return(await new Request($r.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(Ce.isArrayBufferView(t)||Ce.isArrayBuffer(t))return t.byteLength;if(Ce.isURLSearchParams(t)&&(t=t+""),Ce.isString(t))return(await lk(t)).byteLength},hk=async(t,e)=>Ce.toFiniteNumber(t.getContentLength())??uk(e),dk=Gl&&(async t=>{let{url:e,method:n,data:r,signal:u,cancelToken:d,timeout:f,onDownloadProgress:b,onUploadProgress:p,responseType:g,headers:i,withCredentials:a="same-origin",fetchOptions:h}=Zf(t);g=g?(g+"").toLowerCase():"text";let c=ik([u,d&&d.toAbortSignal()],f),o;const l=c&&c.unsubscribe&&(()=>{c.unsubscribe()});let m;try{if(p&&ck&&n!=="get"&&n!=="head"&&(m=await hk(i,r))!==0){let S=new Request(e,{method:"POST",body:r,duplex:"half"}),x;if(Ce.isFormData(r)&&(x=S.headers.get("content-type"))&&i.setContentType(x),S.body){const[M,O]=Gf(m,Kl(Yf(p)));r=Jf(S.body,ng,M,O)}}Ce.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;o=new Request(e,{...h,signal:c,method:n.toUpperCase(),headers:i.normalize().toJSON(),body:r,duplex:"half",credentials:w?a:void 0});let k=await fetch(o);const R=ih&&(g==="stream"||g==="response");if(ih&&(b||R&&l)){const S={};["status","statusText","headers"].forEach(F=>{S[F]=k[F]});const x=Ce.toFiniteNumber(k.headers.get("content-length")),[M,O]=b&&Gf(x,Kl(Yf(b),!0))||[];k=new Response(Jf(k.body,ng,M,()=>{O&&O(),l&&l()}),S)}g=g||"text";let T=await Yl[Ce.findKey(Yl,g)||"text"](k,t);return!R&&l&&l(),await new Promise((S,x)=>{Kf(S,x,{data:T,headers:Qr.from(k.headers),status:k.status,statusText:k.statusText,config:t,request:o})})}catch(w){throw l&&l(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new Rt("Network Error",Rt.ERR_NETWORK,t,o),{cause:w.cause||w}):Rt.from(w,w&&w.code,t,o)}}),oh={http:T1,xhr:rk,fetch:dk};Ce.forEach(oh,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const rg=t=>`- ${t}`,pk=t=>Ce.isFunction(t)||t===null||t===!1,ig={getAdapter:t=>{t=Ce.isArray(t)?t:[t];const{length:e}=t;let n,r;const u={};for(let d=0;d<e;d++){n=t[d];let f;if(r=n,!pk(n)&&(r=oh[(f=String(n)).toLowerCase()],r===void 0))throw new Rt(`Unknown adapter '${f}'`);if(r)break;u[f||"#"+d]=r}if(!r){const d=Object.entries(u).map(([b,p])=>`adapter ${b} `+(p===!1?"is not supported by the environment":"is not available in the build"));let f=e?d.length>1?`since :
5
+ `+d.map(rg).join(`
6
+ `):" "+rg(d[0]):"as no adapter specified";throw new Rt("There is no suitable adapter to dispatch the request "+f,"ERR_NOT_SUPPORT")}return r},adapters:oh};function sh(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new aa(null,t)}function og(t){return sh(t),t.headers=Qr.from(t.headers),t.data=rh.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ig.getAdapter(t.adapter||Ka.adapter)(t).then(function(e){return sh(t),e.data=rh.call(t,t.transformResponse,e),e.headers=Qr.from(e.headers),e},function(e){return Vf(e)||(sh(t),e&&e.response&&(e.response.data=rh.call(t,t.transformResponse,e.response),e.response.headers=Qr.from(e.response.headers))),Promise.reject(e)})}const sg="1.9.0",Xl={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Xl[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const ag={};Xl.transitional=function(t,e,n){function r(u,d){return"[Axios v"+sg+"] Transitional option '"+u+"'"+d+(n?". "+n:"")}return(u,d,f)=>{if(t===!1)throw new Rt(r(d," has been removed"+(e?" in "+e:"")),Rt.ERR_DEPRECATED);return e&&!ag[d]&&(ag[d]=!0,console.warn(r(d," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(u,d,f):!0}},Xl.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function fk(t,e,n){if(typeof t!="object")throw new Rt("options must be an object",Rt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let u=r.length;for(;u-- >0;){const d=r[u],f=e[d];if(f){const b=t[d],p=b===void 0||f(b,d,t);if(p!==!0)throw new Rt("option "+d+" must be "+p,Rt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Rt("Unknown option "+d,Rt.ERR_BAD_OPTION)}}const Ql={assertOptions:fk,validators:Xl},ao=Ql.validators;let ws=class{constructor(e){this.defaults=e||{},this.interceptors={request:new zf,response:new zf}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let u={};Error.captureStackTrace?Error.captureStackTrace(u):u=new Error;const d=u.stack?u.stack.replace(/^.+\n/,""):"";try{r.stack?d&&!String(r.stack).endsWith(d.replace(/^.+\n.+\n/,""))&&(r.stack+=`
7
+ `+d):r.stack=d}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=bs(this.defaults,n);const{transitional:r,paramsSerializer:u,headers:d}=n;r!==void 0&&Ql.assertOptions(r,{silentJSONParsing:ao.transitional(ao.boolean),forcedJSONParsing:ao.transitional(ao.boolean),clarifyTimeoutError:ao.transitional(ao.boolean)},!1),u!=null&&(Ce.isFunction(u)?n.paramsSerializer={serialize:u}:Ql.assertOptions(u,{encode:ao.function,serialize:ao.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ql.assertOptions(n,{baseUrl:ao.spelling("baseURL"),withXsrfToken:ao.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let f=d&&Ce.merge(d.common,d[n.method]);d&&Ce.forEach(["delete","get","head","post","put","patch","common"],o=>{delete d[o]}),n.headers=Qr.concat(f,d);const b=[];let p=!0;this.interceptors.request.forEach(function(o){typeof o.runWhen=="function"&&o.runWhen(n)===!1||(p=p&&o.synchronous,b.unshift(o.fulfilled,o.rejected))});const g=[];this.interceptors.response.forEach(function(o){g.push(o.fulfilled,o.rejected)});let i,a=0,h;if(!p){const o=[og.bind(this),void 0];for(o.unshift.apply(o,b),o.push.apply(o,g),h=o.length,i=Promise.resolve(n);a<h;)i=i.then(o[a++],o[a++]);return i}h=b.length;let c=n;for(a=0;a<h;){const o=b[a++],l=b[a++];try{c=o(c)}catch(m){l.call(this,m);break}}try{i=og.call(this,c)}catch(o){return Promise.reject(o)}for(a=0,h=g.length;a<h;)i=i.then(g[a++],g[a++]);return i}getUri(e){e=bs(this.defaults,e);const n=Xf(e.baseURL,e.url,e.allowAbsoluteUrls);return Wf(n,e.params,e.paramsSerializer)}};Ce.forEach(["delete","get","head","options"],function(t){ws.prototype[t]=function(e,n){return this.request(bs(n||{},{method:t,url:e,data:(n||{}).data}))}}),Ce.forEach(["post","put","patch"],function(t){function e(n){return function(r,u,d){return this.request(bs(d||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:u}))}}ws.prototype[t]=e(),ws.prototype[t+"Form"]=e(!0)});let gk=class Dx{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(u){n=u});const r=this;this.promise.then(u=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](u);r._listeners=null}),this.promise.then=u=>{let d;const f=new Promise(b=>{r.subscribe(b),d=b}).then(u);return f.cancel=function(){r.unsubscribe(d)},f},e(function(u,d,f){r.reason||(r.reason=new aa(u,d,f),n(r.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=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Dx(function(n){e=n}),cancel:e}}};function mk(t){return function(e){return t.apply(null,e)}}function yk(t){return Ce.isObject(t)&&t.isAxiosError===!0}const ah={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(ah).forEach(([t,e])=>{ah[e]=t});function lg(t){const e=new ws(t),n=$f(ws.prototype.request,e);return Ce.extend(n,ws.prototype,e,{allOwnKeys:!0}),Ce.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return lg(bs(t,r))},n}const Hn=lg(Ka);Hn.Axios=ws,Hn.CanceledError=aa,Hn.CancelToken=gk,Hn.isCancel=Vf,Hn.VERSION=sg,Hn.toFormData=ql,Hn.AxiosError=Rt,Hn.Cancel=Hn.CanceledError,Hn.all=function(t){return Promise.all(t)},Hn.spread=mk,Hn.isAxiosError=yk,Hn.mergeConfig=bs,Hn.AxiosHeaders=Qr,Hn.formToJSON=t=>Uf(Ce.isHTMLForm(t)?new FormData(t):t),Hn.getAdapter=ig.getAdapter,Hn.HttpStatusCode=ah,Hn.default=Hn;const{Axios:wB,AxiosError:xB,CanceledError:kB,isCancel:SB,CancelToken:_B,VERSION:CB,all:$B,Cancel:TB,isAxiosError:AB,spread:EB,toFormData:RB,AxiosHeaders:MB,HttpStatusCode:LB,formToJSON:OB,getAdapter:IB,mergeConfig:NB}=Hn,cg=Hn.create({baseURL:location.origin,timeout:6e4,params:{}});cg.interceptors.response.use(t=>t,t=>{var e,n,r,u,d,f,b,p,g,i,a;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(o){o&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let h=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(h+=`${t.response.statusText} `),(r=(n=t.response)==null?void 0:n.config)!=null&&r.data&&(h+=`${t.response.config.data} `),(d=(u=t.response)==null?void 0:u.data)!=null&&d.message?h+=`${t.response.data.message}`:(b=(f=t.response)==null?void 0:f.data)!=null&&b.exception?h+=`${t.response.data.exception}`:(i=(g=(p=t.response)==null?void 0:p.data)==null?void 0:g.error)!=null&&i.message?(t.response.data.error.class&&(h+=`${t.response.data.error.class} `),h+=`${t.response.data.error.message}`):h+=`${(a=t.response)==null?void 0:a.data}`;const{$cosmosNotify:c}=window;throw c&&c.serious({title:"Network error",body:h}),t}else throw t});const Zl=async function(t,e,{data:n,params:r={},headers:u,noAuth:d=!1,noScope:f=!1,onUploadProgress:b=!1}={}){if(!d){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}u.Authorization=localStorage.openc3Token}return u.manual=!0,!f&&!r.scope&&(r.scope=window.openc3Scope),cg({method:t,url:e,data:n,params:r,headers:u,onUploadProgress:b})},lh={Accept:"application/json"},ug={...lh,"Content-Type":"application/json"},xs={get:function(t,{params:e,headers:n=lh,noScope:r,noAuth:u,onUploadProgress:d}={}){return Zl("get",t,{params:e,headers:n,noScope:r,noAuth:u,onUploadProgress:d})},put:function(t,{data:e,params:n,headers:r=ug,noScope:u,noAuth:d,onUploadProgress:f}={}){return Zl("put",t,{data:e,params:n,headers:r,noScope:u,noAuth:d,onUploadProgress:f})},post:function(t,{data:e,params:n,headers:r=ug,noScope:u,noAuth:d,onUploadProgress:f}={}){return Zl("post",t,{data:e,params:n,headers:r,noScope:u,noAuth:d,onUploadProgress:f})},delete:function(t,{params:e,headers:n=lh,noScope:r,noAuth:u,onUploadProgress:d}={}){return Zl("delete",t,{params:e,headers:n,noScope:r,noAuth:u,onUploadProgress:d})}};let vk=()=>({emit(t,...e){for(let n=this.events[t]||[],r=0,u=n.length;r<u;r++)n[r](...e)},events:{},on(t,e){var n;return((n=this.events)[t]||(n[t]=[])).push(e),()=>{var r;this.events[t]=(r=this.events[t])==null?void 0:r.filter(u=>e!==u)}}}),bk=class extends Error{constructor(e,n){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=n,this.name="ReasonError"}};function wk(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 xk{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:r,info:u})=>(n[r]=u,n),{})}}const ks=Symbol("state");let hg=class{constructor(e={}){this.emitter=vk(),this.params=Object.freeze(e),this.presence=new xk(this),this.initialConnect=!0,this[ks]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=wk({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ks]}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[ks]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ks]="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[ks]="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[ks]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[ks]="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 r=this.receiver?this.receiver.logger:null;r&&r.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 r=this.emitter.on(e,(...u)=>{r(),n(...u)});return r}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 r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(u=>u()),e()})),r.push(this.on("close",u=>{r.forEach(d=>d()),n(u||new bk("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}};Cf(class extends hg{constructor(e,n){super(n),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}},"identifier","__ghost__"),Cf(class extends hg{async perform(e,n){if(e.startsWith("$"))return super.perform(e,n);throw Error("not implemented")}},"identifier","$pubsub");const Jl=6e4,ch=36e5,kk=1e3,dg=Symbol.for("constructDateFrom");function tr(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&dg in t?t[dg](e):t instanceof Date?new t.constructor(e):new Date(e)}function Cn(t,e){return tr(e||t,t)}let Sk={};function la(){return Sk}function Go(t,e){var n,r,u,d;const f=la(),b=(e==null?void 0:e.weekStartsOn)??((r=(n=e==null?void 0:e.locale)==null?void 0:n.options)==null?void 0:r.weekStartsOn)??f.weekStartsOn??((d=(u=f.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,p=Cn(t,e==null?void 0:e.in),g=p.getDay(),i=(g<b?7:0)+g-b;return p.setDate(p.getDate()-i),p.setHours(0,0,0,0),p}function ca(t,e){return Go(t,{...e,weekStartsOn:1})}function pg(t,e){const n=Cn(t,void 0),r=n.getFullYear(),u=tr(n,0);u.setFullYear(r+1,0,4),u.setHours(0,0,0,0);const d=ca(u),f=tr(n,0);f.setFullYear(r,0,4),f.setHours(0,0,0,0);const b=ca(f);return n.getTime()>=d.getTime()?r+1:n.getTime()>=b.getTime()?r:r-1}function ec(t){const e=Cn(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 _k(t,...e){const n=tr.bind(null,e.find(r=>typeof r=="object"));return e.map(n)}function fg(t,e){const n=Cn(t,void 0);return n.setHours(0,0,0,0),n}function Ck(t,e,n){const[r,u]=_k(void 0,t,e),d=fg(r),f=fg(u),b=+d-ec(d),p=+f-ec(f);return Math.round((b-p)/864e5)}function $k(t,e){const n=pg(t),r=tr(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ca(r)}function Tk(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function gg(t){return!(!Tk(t)&&typeof t!="number"||isNaN(+Cn(t)))}function Ak(t,e){const n=Cn(t,void 0);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Ek={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"}},Rk=(t,e,n)=>{let r;const u=Ek[t];return typeof u=="string"?r=u:e===1?r=u.one:r=u.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function uh(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const Mk={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Lk={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ok={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ik={date:uh({formats:Mk,defaultWidth:"full"}),time:uh({formats:Lk,defaultWidth:"full"}),dateTime:uh({formats:Ok,defaultWidth:"full"})},Nk={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Dk=(t,e,n,r)=>Nk[t];function Ya(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let u;if(r==="formatting"&&t.formattingValues){const f=t.defaultFormattingWidth||t.defaultWidth,b=n!=null&&n.width?String(n.width):f;u=t.formattingValues[b]||t.formattingValues[f]}else{const f=t.defaultWidth,b=n!=null&&n.width?String(n.width):t.defaultWidth;u=t.values[b]||t.values[f]}const d=t.argumentCallback?t.argumentCallback(e):e;return u[d]}}const Fk={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Pk={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Bk={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"]},jk={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"]},Wk={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"}},zk={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"}},Hk=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Uk={ordinalNumber:Hk,era:Ya({values:Fk,defaultWidth:"wide"}),quarter:Ya({values:Pk,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Ya({values:Bk,defaultWidth:"wide"}),day:Ya({values:jk,defaultWidth:"wide"}),dayPeriod:Ya({values:Wk,defaultWidth:"wide",formattingValues:zk,defaultFormattingWidth:"wide"})};function Xa(t){return(e,n={})=>{const r=n.width,u=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],d=e.match(u);if(!d)return null;const f=d[0],b=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],p=Array.isArray(b)?Vk(b,a=>a.test(f)):qk(b,a=>a.test(f));let g;g=t.valueCallback?t.valueCallback(p):p,g=n.valueCallback?n.valueCallback(g):g;const i=e.slice(f.length);return{value:g,rest:i}}}function qk(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Vk(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function Kk(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const u=r[0],d=e.match(t.parsePattern);if(!d)return null;let f=t.valueCallback?t.valueCallback(d[0]):d[0];f=n.valueCallback?n.valueCallback(f):f;const b=e.slice(u.length);return{value:f,rest:b}}}const Gk=/^(\d+)(th|st|nd|rd)?/i,Yk=/\d+/i,Xk={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},Qk={any:[/^b/i,/^(a|c)/i]},Zk={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Jk={any:[/1/i,/2/i,/3/i,/4/i]},eS={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},tS={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]},nS={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},rS={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]},iS={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},oS={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}},sS={ordinalNumber:Kk({matchPattern:Gk,parsePattern:Yk,valueCallback:t=>parseInt(t,10)}),era:Xa({matchPatterns:Xk,defaultMatchWidth:"wide",parsePatterns:Qk,defaultParseWidth:"any"}),quarter:Xa({matchPatterns:Zk,defaultMatchWidth:"wide",parsePatterns:Jk,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Xa({matchPatterns:eS,defaultMatchWidth:"wide",parsePatterns:tS,defaultParseWidth:"any"}),day:Xa({matchPatterns:nS,defaultMatchWidth:"wide",parsePatterns:rS,defaultParseWidth:"any"}),dayPeriod:Xa({matchPatterns:iS,defaultMatchWidth:"any",parsePatterns:oS,defaultParseWidth:"any"})},mg={code:"en-US",formatDistance:Rk,formatLong:Ik,formatRelative:Dk,localize:Uk,match:sS,options:{weekStartsOn:0,firstWeekContainsDate:1}};function aS(t,e){const n=Cn(t,void 0);return Ck(n,Ak(n))+1}function yg(t,e){const n=Cn(t,void 0),r=+ca(n)-+$k(n);return Math.round(r/6048e5)+1}function hh(t,e){var n,r,u,d;const f=Cn(t,e==null?void 0:e.in),b=f.getFullYear(),p=la(),g=(e==null?void 0:e.firstWeekContainsDate)??((r=(n=e==null?void 0:e.locale)==null?void 0:n.options)==null?void 0:r.firstWeekContainsDate)??p.firstWeekContainsDate??((d=(u=p.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,i=tr((e==null?void 0:e.in)||t,0);i.setFullYear(b+1,0,g),i.setHours(0,0,0,0);const a=Go(i,e),h=tr((e==null?void 0:e.in)||t,0);h.setFullYear(b,0,g),h.setHours(0,0,0,0);const c=Go(h,e);return+f>=+a?b+1:+f>=+c?b:b-1}function lS(t,e){var n,r,u,d;const f=la(),b=(e==null?void 0:e.firstWeekContainsDate)??((r=(n=e==null?void 0:e.locale)==null?void 0:n.options)==null?void 0:r.firstWeekContainsDate)??f.firstWeekContainsDate??((d=(u=f.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,p=hh(t,e),g=tr((e==null?void 0:e.in)||t,0);return g.setFullYear(p,0,b),g.setHours(0,0,0,0),Go(g,e)}function vg(t,e){const n=Cn(t,e==null?void 0:e.in),r=+Go(n,e)-+lS(n,e);return Math.round(r/6048e5)+1}function hn(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const Yo={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return hn(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):hn(n+1,2)},d(t,e){return hn(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 hn(t.getHours()%12||12,e.length)},H(t,e){return hn(t.getHours(),e.length)},m(t,e){return hn(t.getMinutes(),e.length)},s(t,e){return hn(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),u=Math.trunc(r*Math.pow(10,n-3));return hn(u,e.length)}},ua={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},bg={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),u=r>0?r:1-r;return n.ordinalNumber(u,{unit:"year"})}return Yo.y(t,e)},Y:function(t,e,n,r){const u=hh(t,r),d=u>0?u:1-u;if(e==="YY"){const f=d%100;return hn(f,2)}return e==="Yo"?n.ordinalNumber(d,{unit:"year"}):hn(d,e.length)},R:function(t,e){const n=pg(t);return hn(n,e.length)},u:function(t,e){const n=t.getFullYear();return hn(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return hn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return hn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return Yo.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return hn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const u=vg(t,r);return e==="wo"?n.ordinalNumber(u,{unit:"week"}):hn(u,e.length)},I:function(t,e,n){const r=yg(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):hn(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):Yo.d(t,e)},D:function(t,e,n){const r=aS(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):hn(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const u=t.getDay(),d=(u-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(d);case"ee":return hn(d,2);case"eo":return n.ordinalNumber(d,{unit:"day"});case"eee":return n.day(u,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(u,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(u,{width:"short",context:"formatting"});case"eeee":default:return n.day(u,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const u=t.getDay(),d=(u-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(d);case"cc":return hn(d,e.length);case"co":return n.ordinalNumber(d,{unit:"day"});case"ccc":return n.day(u,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(u,{width:"narrow",context:"standalone"});case"cccccc":return n.day(u,{width:"short",context:"standalone"});case"cccc":default:return n.day(u,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),u=r===0?7:r;switch(e){case"i":return String(u);case"ii":return hn(u,e.length);case"io":return n.ordinalNumber(u,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let u;switch(r===12?u=ua.noon:r===0?u=ua.midnight:u=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(u,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(u,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(u,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(u,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let u;switch(r>=17?u=ua.evening:r>=12?u=ua.afternoon:r>=4?u=ua.morning:u=ua.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(u,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(u,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(u,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Yo.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):Yo.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):hn(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):hn(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Yo.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Yo.s(t,e)},S:function(t,e){return Yo.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return xg(r);case"XXXX":case"XX":return Ss(r);case"XXXXX":case"XXX":default:return Ss(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return xg(r);case"xxxx":case"xx":return Ss(r);case"xxxxx":case"xxx":default:return Ss(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+wg(r,":");case"OOOO":default:return"GMT"+Ss(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+wg(r,":");case"zzzz":default:return"GMT"+Ss(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return hn(r,e.length)},T:function(t,e,n){return hn(+t,e.length)}};function wg(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),u=Math.trunc(r/60),d=r%60;return d===0?n+String(u):n+String(u)+e+hn(d,2)}function xg(t,e){return t%60===0?(t>0?"-":"+")+hn(Math.abs(t)/60,2):Ss(t,e)}function Ss(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),u=hn(Math.trunc(r/60),2),d=hn(r%60,2);return n+u+e+d}const kg=(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"})}},Sg=(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"})}},cS=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],u=n[2];if(!u)return kg(t,e);let d;switch(r){case"P":d=e.dateTime({width:"short"});break;case"PP":d=e.dateTime({width:"medium"});break;case"PPP":d=e.dateTime({width:"long"});break;case"PPPP":default:d=e.dateTime({width:"full"});break}return d.replace("{{date}}",kg(r,e)).replace("{{time}}",Sg(u,e))},dh={p:Sg,P:cS},uS=/^D+$/,hS=/^Y+$/,dS=["D","DD","YY","YYYY"];function _g(t){return uS.test(t)}function Cg(t){return hS.test(t)}function ph(t,e,n){const r=pS(t,e,n);if(console.warn(r),dS.includes(t))throw new RangeError(r)}function pS(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const fS=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,gS=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,mS=/^'([^]*?)'?$/,yS=/''/g,vS=/[a-zA-Z]/;function _s(t,e,n){var r,u,d,f,b,p,g,i;const a=la(),h=(n==null?void 0:n.locale)??a.locale??mg,c=(n==null?void 0:n.firstWeekContainsDate)??((u=(r=n==null?void 0:n.locale)==null?void 0:r.options)==null?void 0:u.firstWeekContainsDate)??a.firstWeekContainsDate??((f=(d=a.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??1,o=(n==null?void 0:n.weekStartsOn)??((p=(b=n==null?void 0:n.locale)==null?void 0:b.options)==null?void 0:p.weekStartsOn)??a.weekStartsOn??((i=(g=a.locale)==null?void 0:g.options)==null?void 0:i.weekStartsOn)??0,l=Cn(t,n==null?void 0:n.in);if(!gg(l))throw new RangeError("Invalid time value");let m=e.match(gS).map(k=>{const R=k[0];if(R==="p"||R==="P"){const T=dh[R];return T(k,h.formatLong)}return k}).join("").match(fS).map(k=>{if(k==="''")return{isToken:!1,value:"'"};const R=k[0];if(R==="'")return{isToken:!1,value:bS(k)};if(bg[R])return{isToken:!0,value:k};if(R.match(vS))throw new RangeError("Format string contains an unescaped latin alphabet character `"+R+"`");return{isToken:!1,value:k}});h.localize.preprocessor&&(m=h.localize.preprocessor(l,m));const w={firstWeekContainsDate:c,weekStartsOn:o,locale:h};return m.map(k=>{if(!k.isToken)return k.value;const R=k.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Cg(R)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&_g(R))&&ph(R,e,String(t));const T=bg[R[0]];return T(l,R,h.localize,w)}).join("")}function bS(t){const e=t.match(mS);return e?e[1].replace(yS,"'"):t}var Xo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $g={exports:{}},Tg;function wS(){return Tg||(Tg=1,function(t,e){(function(){var n="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var u=function(i,a,h){if(typeof i!="string"){u.original?u.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(h=a),u.modules[i]||(u.payloads[i]=h,u.modules[i]=null)};u.modules={},u.payloads={};var d=function(i,a,h){if(typeof a=="string"){var c=p(i,a);if(c!=null)return h&&h(),c}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var o=[],l=0,m=a.length;l<m;++l){var w=p(i,a[l]);if(w==null&&f.original)return;o.push(w)}return h&&h.apply(null,o)||!0}},f=function(i,a){var h=d("",i,a);return h==null&&f.original?f.original.apply(this,arguments):h},b=function(i,a){if(a.indexOf("!")!==-1){var h=a.split("!");return b(i,h[0])+"!"+b(i,h[1])}if(a.charAt(0)=="."){var c=i.split("/").slice(0,-1).join("/");for(a=c+"/"+a;a.indexOf(".")!==-1&&o!=a;){var o=a;a=a.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return a},p=function(i,a){a=b(i,a);var h=u.modules[a];if(!h){if(h=u.payloads[a],typeof h=="function"){var c={},o={id:a,uri:"",exports:c,packaged:!0},l=function(w,k){return d(a,w,k)},m=h(l,c,o);c=m||o.exports,u.modules[a]=c,delete u.payloads[a]}h=u.modules[a]=c||h}return h};function g(i){var a=r;r[i]||(r[i]={}),a=r[i],(!a.define||!a.define.packaged)&&(u.original=a.define,a.define=u,a.define.packaged=!0),(!a.require||!a.require.packaged)&&(f.original=a.require,a.require=f,a.require.packaged=!0)}g(n)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(n,r,u){function d(f,b,p){Object.defineProperty(f,b,{value:p,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||d(String.prototype,"startsWith",function(f,b){return b=b||0,this.lastIndexOf(f,b)===b}),String.prototype.endsWith||d(String.prototype,"endsWith",function(f,b){var p=this;(b===void 0||b>p.length)&&(b=p.length),b-=f.length;var g=p.indexOf(f,b);return g!==-1&&g===b}),String.prototype.repeat||d(String.prototype,"repeat",function(f){for(var b="",p=this;f>0;)f&1&&(b+=p),(f>>=1)&&(p+=p);return b}),String.prototype.includes||d(String.prototype,"includes",function(f,b){return this.indexOf(f,b)!=-1}),Object.assign||(Object.assign=function(f){if(f==null)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(f),p=1;p<arguments.length;p++){var g=arguments[p];g!=null&&Object.keys(g).forEach(function(i){b[i]=g[i]})}return b}),Object.values||(Object.values=function(f){return Object.keys(f).map(function(b){return f[b]})}),Array.prototype.find||d(Array.prototype,"find",function(f){for(var b=this.length,p=arguments[1],g=0;g<b;g++){var i=this[g];if(f.call(p,i,g,this))return i}}),Array.prototype.findIndex||d(Array.prototype,"findIndex",function(f){for(var b=this.length,p=arguments[1],g=0;g<b;g++){var i=this[g];if(f.call(p,i,g,this))return g}}),Array.prototype.includes||d(Array.prototype,"includes",function(f,b){return this.indexOf(f,b)!=-1}),Array.prototype.fill||d(Array.prototype,"fill",function(f){for(var b=this,p=b.length>>>0,g=arguments[1],i=g>>0,a=i<0?Math.max(p+i,0):Math.min(i,p),h=arguments[2],c=h===void 0?p:h>>0,o=c<0?Math.max(p+c,0):Math.min(c,p);a<o;)b[a]=f,a++;return b}),Array.of||d(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(n,r,u){n("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(n,r,u){r.deepCopy=function d(f){if(typeof f!="object"||!f)return f;var b;if(Array.isArray(f)){b=[];for(var p=0;p<f.length;p++)b[p]=d(f[p]);return b}if(Object.prototype.toString.call(f)!=="[object Object]")return f;b={};for(var p in f)b[p]=d(f[p]);return b}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(n,r,u){r.last=function(b){return b[b.length-1]},r.stringReverse=function(b){return b.split("").reverse().join("")},r.stringRepeat=function(b,p){for(var g="";p>0;)p&1&&(g+=b),(p>>=1)&&(b+=b);return g};var d=/^\s\s*/,f=/\s\s*$/;r.stringTrimLeft=function(b){return b.replace(d,"")},r.stringTrimRight=function(b){return b.replace(f,"")},r.copyObject=function(b){var p={};for(var g in b)p[g]=b[g];return p},r.copyArray=function(b){for(var p=[],g=0,i=b.length;g<i;g++)b[g]&&typeof b[g]=="object"?p[g]=this.copyObject(b[g]):p[g]=b[g];return p},r.deepCopy=n("./deep_copy").deepCopy,r.arrayToMap=function(b){for(var p={},g=0;g<b.length;g++)p[b[g]]=1;return p},r.createMap=function(b){var p=Object.create(null);for(var g in b)p[g]=b[g];return p},r.arrayRemove=function(b,p){for(var g=0;g<=b.length;g++)p===b[g]&&b.splice(g,1)},r.escapeRegExp=function(b){return b.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(b){return(""+b).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},r.getMatchOffsets=function(b,p){var g=[];return b.replace(p,function(i){g.push({offset:arguments[arguments.length-2],length:i.length})}),g},r.deferredCall=function(b){var p=null,g=function(){p=null,b()},i=function(a){return i.cancel(),p=setTimeout(g,a||0),i};return i.schedule=i,i.call=function(){return this.cancel(),b(),i},i.cancel=function(){return clearTimeout(p),p=null,i},i.isPending=function(){return p},i},r.delayedCall=function(b,p){var g=null,i=function(){g=null,b()},a=function(h){g==null&&(g=setTimeout(i,h||p))};return a.delay=function(h){g&&clearTimeout(g),g=setTimeout(i,h||p)},a.schedule=a,a.call=function(){this.cancel(),b()},a.cancel=function(){g&&clearTimeout(g),g=null},a.isPending=function(){return g},a},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(b,p,g){return g&&b.codePointAt(p)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(n,r,u){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var d=typeof navigator=="object"?navigator:{},f=(/mac|win|linux/i.exec(d.platform)||["other"])[0].toLowerCase(),b=d.userAgent||"",p=d.appName||"";r.isWin=f=="win",r.isMac=f=="mac",r.isLinux=f=="linux",r.isIE=p=="Microsoft Internet Explorer"||p.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]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=b.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(b.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(b.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(b.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(b.split(" Edge/")[1])||void 0,r.isAIR=b.indexOf("AdobeAIR")>=0,r.isAndroid=b.indexOf("Android")>=0,r.isChromeOS=b.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(b)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(n,r,u){var d=n("./useragent"),f="http://www.w3.org/1999/xhtml";r.buildDom=function h(c,o,l){if(typeof c=="string"&&c){var m=document.createTextNode(c);return o&&o.appendChild(m),m}if(!Array.isArray(c))return c&&c.appendChild&&o&&o.appendChild(c),c;if(typeof c[0]!="string"||!c[0]){for(var w=[],k=0;k<c.length;k++){var R=h(c[k],o,l);R&&w.push(R)}return w}var T=document.createElement(c[0]),S=c[1],x=1;S&&typeof S=="object"&&!Array.isArray(S)&&(x=2);for(var k=x;k<c.length;k++)h(c[k],T,l);return x==2&&Object.keys(S).forEach(function(M){var O=S[M];M==="class"?T.className=Array.isArray(O)?O.join(" "):O:typeof O=="function"||M=="value"||M[0]=="$"?T[M]=O:M==="ref"?l&&(l[O]=T):M==="style"?typeof O=="string"&&(T.style.cssText=O):O!=null&&T.setAttribute(M,O)}),o&&o.appendChild(T),T},r.getDocumentHead=function(h){return h||(h=document),h.head||h.getElementsByTagName("head")[0]||h.documentElement},r.createElement=function(h,c){return document.createElementNS?document.createElementNS(c||f,h):document.createElement(h)},r.removeChildren=function(h){h.innerHTML=""},r.createTextNode=function(h,c){var o=c?c.ownerDocument:document;return o.createTextNode(h)},r.createFragment=function(h){var c=h?h.ownerDocument:document;return c.createDocumentFragment()},r.hasCssClass=function(h,c){var o=(h.className+"").split(/\s+/g);return o.indexOf(c)!==-1},r.addCssClass=function(h,c){r.hasCssClass(h,c)||(h.className+=" "+c)},r.removeCssClass=function(h,c){for(var o=h.className.split(/\s+/g);;){var l=o.indexOf(c);if(l==-1)break;o.splice(l,1)}h.className=o.join(" ")},r.toggleCssClass=function(h,c){for(var o=h.className.split(/\s+/g),l=!0;;){var m=o.indexOf(c);if(m==-1)break;l=!1,o.splice(m,1)}return l&&o.push(c),h.className=o.join(" "),l},r.setCssClass=function(h,c,o){o?r.addCssClass(h,c):r.removeCssClass(h,c)},r.hasCssString=function(h,c){var o=0,l;if(c=c||document,l=c.querySelectorAll("style")){for(;o<l.length;)if(l[o++].id===h)return!0}},r.removeElementById=function(h,c){c=c||document,c.getElementById(h)&&c.getElementById(h).remove()};var b,p=[];r.useStrictCSP=function(h){b=h,h==!1?g():p||(p=[])};function g(){var h=p;p=null,h&&h.forEach(function(c){i(c[0],c[1])})}function i(h,c,o){if(!(typeof document>"u")){if(p){if(o)g();else if(o===!1)return p.push([h,c])}if(!b){var l=o;!o||!o.getRootNode?l=document:(l=o.getRootNode(),(!l||l==o)&&(l=document));var m=l.ownerDocument||l;if(c&&r.hasCssString(c,l))return null;c&&(h+=`
8
+ /*# sourceURL=ace/css/`+c+" */");var w=r.createElement("style");w.appendChild(m.createTextNode(h)),c&&(w.id=c),l==m&&(l=r.getDocumentHead(m)),l.insertBefore(w,l.firstChild)}}}if(r.importCssString=i,r.importCssStylsheet=function(h,c){r.buildDom(["link",{rel:"stylesheet",href:h}],r.getDocumentHead(c))},r.scrollbarWidth=function(h){var c=r.createElement("ace_inner");c.style.width="100%",c.style.minWidth="0px",c.style.height="200px",c.style.display="block";var o=r.createElement("ace_outer"),l=o.style;l.position="absolute",l.left="-10000px",l.overflow="hidden",l.width="200px",l.minWidth="0px",l.height="150px",l.display="block",o.appendChild(c);var m=h&&h.documentElement||document&&document.documentElement;if(!m)return 0;m.appendChild(o);var w=c.offsetWidth;l.overflow="scroll";var k=c.offsetWidth;return w===k&&(k=o.clientWidth),m.removeChild(o),w-k},r.computedStyle=function(h,c){return window.getComputedStyle(h,"")||{}},r.setStyle=function(h,c,o){h[c]!==o&&(h[c]=o)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=d.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,d.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var a=document.createElement("div");r.HI_DPI&&a.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!d.isEdge&&typeof a.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),a=null}r.HAS_CSS_TRANSFORMS?r.translate=function(h,c,o){h.style.transform="translate("+Math.round(c)+"px, "+Math.round(o)+"px)"}:r.translate=function(h,c,o){h.style.top=Math.round(o)+"px",h.style.left=Math.round(c)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(n,r,u){/*
9
+ * based on code from:
10
+ *
11
+ * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
12
+ * Available via the MIT or new BSD license.
13
+ * see: http://github.com/jrburke/requirejs for details
14
+ */var d=n("./dom");r.get=function(f,b){var p=new XMLHttpRequest;p.open("GET",f,!0),p.onreadystatechange=function(){p.readyState===4&&b(p.responseText)},p.send(null)},r.loadScript=function(f,b){var p=d.getDocumentHead(),g=document.createElement("script");g.src=f,p.appendChild(g),g.onload=g.onreadystatechange=function(i,a){(a||!g.readyState||g.readyState=="loaded"||g.readyState=="complete")&&(g=g.onload=g.onreadystatechange=null,a||b())}},r.qualifyURL=function(f){var b=document.createElement("a");return b.href=f,b.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(n,r,u){r.inherits=function(d,f){d.super_=f,d.prototype=Object.create(f.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(d,f){for(var b in f)d[b]=f[b];return d},r.implement=function(d,f){r.mixin(d,f)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(n,r,u){var d={},f=function(){this.propagationStopped=!0},b=function(){this.defaultPrevented=!0};d._emit=d._dispatchEvent=function(p,g){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[p]||[],a=this._defaultHandlers[p];if(!(!i.length&&!a)){(typeof g!="object"||!g)&&(g={}),g.type||(g.type=p),g.stopPropagation||(g.stopPropagation=f),g.preventDefault||(g.preventDefault=b),i=i.slice();for(var h=0;h<i.length&&(i[h](g,this),!g.propagationStopped);h++);if(a&&!g.defaultPrevented)return a(g,this)}},d._signal=function(p,g){var i=(this._eventRegistry||{})[p];if(i){i=i.slice();for(var a=0;a<i.length;a++)i[a](g,this)}},d.once=function(p,g){var i=this;if(this.on(p,function a(){i.off(p,a),g.apply(null,arguments)}),!g)return new Promise(function(a){g=a})},d.setDefaultHandler=function(p,g){var i=this._defaultHandlers;if(i||(i=this._defaultHandlers={_disabled_:{}}),i[p]){var a=i[p],h=i._disabled_[p];h||(i._disabled_[p]=h=[]),h.push(a);var c=h.indexOf(g);c!=-1&&h.splice(c,1)}i[p]=g},d.removeDefaultHandler=function(p,g){var i=this._defaultHandlers;if(i){var a=i._disabled_[p];if(i[p]==g)a&&this.setDefaultHandler(p,a.pop());else if(a){var h=a.indexOf(g);h!=-1&&a.splice(h,1)}}},d.on=d.addEventListener=function(p,g,i){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[p];return a||(a=this._eventRegistry[p]=[]),a.indexOf(g)==-1&&a[i?"unshift":"push"](g),g},d.off=d.removeListener=d.removeEventListener=function(p,g){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[p];if(i){var a=i.indexOf(g);a!==-1&&i.splice(a,1)}},d.removeAllListeners=function(p){p||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[p]=void 0),this._defaultHandlers&&(this._defaultHandlers[p]=void 0)},r.EventEmitter=d}),ace.define("ace/lib/report_error",["require","exports","module"],function(n,r,u){r.reportError=function(d,f){var b=new Error(d);b.data=f,typeof console=="object"&&console.error&&console.error(b),setTimeout(function(){throw b})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(n,r,u){var d={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor gutter","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions","editor.tooltip.disable-editing":"Editing is disabled"};r.defaultEnglishMessages=d}),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,r,u){"no use strict";var d=n("./oop"),f=n("./event_emitter").EventEmitter,b=n("./report_error").reportError,p=n("./default_english_messages").defaultEnglishMessages,g={setOptions:function(o){Object.keys(o).forEach(function(l){this.setOption(l,o[l])},this)},getOptions:function(o){var l={};if(o)Array.isArray(o)||(l=o,o=Object.keys(l));else{var m=this.$options;o=Object.keys(m).filter(function(w){return!m[w].hidden})}return o.forEach(function(w){l[w]=this.getOption(w)},this),l},setOption:function(o,l){if(this["$"+o]!==l){var m=this.$options[o];if(!m)return i('misspelled option "'+o+'"');if(m.forwardTo)return this[m.forwardTo]&&this[m.forwardTo].setOption(o,l);m.handlesSet||(this["$"+o]=l),m&&m.set&&m.set.call(this,l)}},getOption:function(o){var l=this.$options[o];return l?l.forwardTo?this[l.forwardTo]&&this[l.forwardTo].getOption(o):l&&l.get?l.get.call(this):this["$"+o]:i('misspelled option "'+o+'"')}};function i(o){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var a,h,c=function(){function o(){this.$defaultOptions={},a=p,h="dollarSigns"}return o.prototype.defineOptions=function(l,m,w){return l.$options||(this.$defaultOptions[m]=l.$options={}),Object.keys(w).forEach(function(k){var R=w[k];typeof R=="string"&&(R={forwardTo:R}),R.name||(R.name=k),l.$options[R.name]=R,"initialValue"in R&&(l["$"+R.name]=R.initialValue)}),d.implement(l,g),this},o.prototype.resetOptions=function(l){Object.keys(l.$options).forEach(function(m){var w=l.$options[m];"value"in w&&l.setOption(m,w.value)})},o.prototype.setDefaultValue=function(l,m,w){if(!l){for(l in this.$defaultOptions)if(this.$defaultOptions[l][m])break;if(!this.$defaultOptions[l][m])return!1}var k=this.$defaultOptions[l]||(this.$defaultOptions[l]={});k[m]&&(k.forwardTo?this.setDefaultValue(k.forwardTo,m,w):k[m].value=w)},o.prototype.setDefaultValues=function(l,m){Object.keys(m).forEach(function(w){this.setDefaultValue(l,w,m[w])},this)},o.prototype.setMessages=function(l,m){a=l,m&&m.placeholders&&(h=m.placeholders)},o.prototype.nls=function(l,m,w){a[l]||(i("No message found for the key '"+l+"' in messages with id "+a.$id+", trying to find a translation for the default string '"+m+"'."),a[m]||i("No message found for the default string '"+m+"' in the provided messages. Falling back to the default English message."));var k=a[l]||a[m]||m;return w&&(h==="dollarSigns"&&(k=k.replace(/\$(\$|[\d]+)/g,function(R,T){return T=="$"?"$":w[T]})),h==="curlyBrackets"&&(k=k.replace(/\{([^\}]+)\}/g,function(R,T){return w[T]}))),k},o}();c.prototype.warn=i,c.prototype.reportError=b,d.implement(c.prototype,f),r.AppConfig=c}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(n,r,u){u.exports=`.ace-tm .ace_gutter {
15
+ background: #f0f0f0;
16
+ color: #333;
17
+ }
18
+
19
+ .ace-tm .ace_print-margin {
20
+ width: 1px;
21
+ background: #e8e8e8;
22
+ }
23
+
24
+ .ace-tm .ace_fold {
25
+ background-color: #6B72E6;
26
+ }
27
+
28
+ .ace-tm {
29
+ background-color: #FFFFFF;
30
+ color: black;
31
+ }
32
+
33
+ .ace-tm .ace_cursor {
34
+ color: black;
35
+ }
36
+
37
+ .ace-tm .ace_invisible {
38
+ color: rgb(191, 191, 191);
39
+ }
40
+
41
+ .ace-tm .ace_storage,
42
+ .ace-tm .ace_keyword {
43
+ color: blue;
44
+ }
45
+
46
+ .ace-tm .ace_constant {
47
+ color: rgb(197, 6, 11);
48
+ }
49
+
50
+ .ace-tm .ace_constant.ace_buildin {
51
+ color: rgb(88, 72, 246);
52
+ }
53
+
54
+ .ace-tm .ace_constant.ace_language {
55
+ color: rgb(88, 92, 246);
56
+ }
57
+
58
+ .ace-tm .ace_constant.ace_library {
59
+ color: rgb(6, 150, 14);
60
+ }
61
+
62
+ .ace-tm .ace_invalid {
63
+ background-color: rgba(255, 0, 0, 0.1);
64
+ color: red;
65
+ }
66
+
67
+ .ace-tm .ace_support.ace_function {
68
+ color: rgb(60, 76, 114);
69
+ }
70
+
71
+ .ace-tm .ace_support.ace_constant {
72
+ color: rgb(6, 150, 14);
73
+ }
74
+
75
+ .ace-tm .ace_support.ace_type,
76
+ .ace-tm .ace_support.ace_class {
77
+ color: rgb(109, 121, 222);
78
+ }
79
+
80
+ .ace-tm .ace_keyword.ace_operator {
81
+ color: rgb(104, 118, 135);
82
+ }
83
+
84
+ .ace-tm .ace_string {
85
+ color: rgb(3, 106, 7);
86
+ }
87
+
88
+ .ace-tm .ace_comment {
89
+ color: rgb(76, 136, 107);
90
+ }
91
+
92
+ .ace-tm .ace_comment.ace_doc {
93
+ color: rgb(0, 102, 255);
94
+ }
95
+
96
+ .ace-tm .ace_comment.ace_doc.ace_tag {
97
+ color: rgb(128, 159, 191);
98
+ }
99
+
100
+ .ace-tm .ace_constant.ace_numeric {
101
+ color: rgb(0, 0, 205);
102
+ }
103
+
104
+ .ace-tm .ace_variable {
105
+ color: rgb(49, 132, 149);
106
+ }
107
+
108
+ .ace-tm .ace_xml-pe {
109
+ color: rgb(104, 104, 91);
110
+ }
111
+
112
+ .ace-tm .ace_entity.ace_name.ace_function {
113
+ color: #0000A2;
114
+ }
115
+
116
+
117
+ .ace-tm .ace_heading {
118
+ color: rgb(12, 7, 255);
119
+ }
120
+
121
+ .ace-tm .ace_list {
122
+ color:rgb(185, 6, 144);
123
+ }
124
+
125
+ .ace-tm .ace_meta.ace_tag {
126
+ color:rgb(0, 22, 142);
127
+ }
128
+
129
+ .ace-tm .ace_string.ace_regex {
130
+ color: rgb(255, 0, 0)
131
+ }
132
+
133
+ .ace-tm .ace_marker-layer .ace_selection {
134
+ background: rgb(181, 213, 255);
135
+ }
136
+ .ace-tm.ace_multiselect .ace_selection.ace_start {
137
+ box-shadow: 0 0 3px 0px white;
138
+ }
139
+ .ace-tm .ace_marker-layer .ace_step {
140
+ background: rgb(252, 255, 0);
141
+ }
142
+
143
+ .ace-tm .ace_marker-layer .ace_stack {
144
+ background: rgb(164, 229, 101);
145
+ }
146
+
147
+ .ace-tm .ace_marker-layer .ace_bracket {
148
+ margin: -1px 0 0 -1px;
149
+ border: 1px solid rgb(192, 192, 192);
150
+ }
151
+
152
+ .ace-tm .ace_marker-layer .ace_active-line {
153
+ background: rgba(0, 0, 0, 0.07);
154
+ }
155
+
156
+ .ace-tm .ace_gutter-active-line {
157
+ background-color : #dcdcdc;
158
+ }
159
+
160
+ .ace-tm .ace_marker-layer .ace_selected-word {
161
+ background: rgb(250, 250, 255);
162
+ border: 1px solid rgb(200, 200, 250);
163
+ }
164
+
165
+ .ace-tm .ace_indent-guide {
166
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
167
+ }
168
+
169
+ .ace-tm .ace_indent-guide-active {
170
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
171
+ }
172
+ `}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(n,r,u){r.isDark=!1,r.cssClass="ace-tm",r.cssText=n("./textmate-css"),r.$id="ace/theme/textmate";var d=n("../lib/dom");d.importCssString(r.cssText,r.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(n,r,u){"no use strict";var d=n("./lib/lang"),f=n("./lib/net"),b=n("./lib/dom"),p=n("./lib/app_config").AppConfig;u.exports=r=new p;var g={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(c){if(!g.hasOwnProperty(c))throw new Error("Unknown config key: "+c);return g[c]},r.set=function(c,o){if(g.hasOwnProperty(c))g[c]=o;else if(this.setDefaultValue("",c,o)==!1)throw new Error("Unknown config key: "+c);c=="useStrictCSP"&&b.useStrictCSP(o)},r.all=function(){return d.copyObject(g)},r.$modes={},r.moduleUrl=function(c,o){if(g.$moduleUrls[c])return g.$moduleUrls[c];var l=c.split("/");o=o||l[l.length-2]||"";var m=o=="snippets"?"/":"-",w=l[l.length-1];if(o=="worker"&&m=="-"){var k=new RegExp("^"+o+"[\\-_]|[\\-_]"+o+"$","g");w=w.replace(k,"")}(!w||w==o)&&l.length>1&&(w=l[l.length-2]);var R=g[o+"Path"];return R==null?R=g.basePath:m=="/"&&(o=m=""),R&&R.slice(-1)!="/"&&(R+="/"),R+o+m+w+this.get("suffix")},r.setModuleUrl=function(c,o){return g.$moduleUrls[c]=o};var i=function(c,o){if(c==="ace/theme/textmate"||c==="./theme/textmate")return o(null,n("./theme/textmate"));if(a)return a(c,o);console.error("loader is not configured")},a;r.setLoader=function(c){a=c},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(c,o){var l;if(Array.isArray(c))var m=c[0],w=c[1];else if(typeof c=="string")var w=c;var k=function(R){if(R&&!r.$loading[w])return o&&o(R);if(r.$loading[w]||(r.$loading[w]=[]),r.$loading[w].push(o),!(r.$loading[w].length>1)){var T=function(){i(w,function(S,x){x&&(r.$loaded[w]=x),r._emit("load.module",{name:w,module:x});var M=r.$loading[w];r.$loading[w]=null,M.forEach(function(O){O&&O(x)})})};if(!r.get("packaged"))return T();f.loadScript(r.moduleUrl(w,m),T),h()}};if(r.dynamicModules[w])r.dynamicModules[w]().then(function(R){R.default?k(R.default):k(R)});else{try{l=this.$require(w)}catch{}k(l||r.$loaded[w])}},r.$require=function(c){if(typeof u.require=="function"){var o="require";return u[o](c)}},r.setModuleLoader=function(c,o){r.dynamicModules[c]=o};var h=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"),h=function(){})};r.version="1.40.1"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(n,r,u){n("./lib/fixoldbrowsers");var d=n("./config");d.setLoader(function(g,i){n([g],function(a){i(null,a)})});var f=function(){return this||typeof window<"u"&&window}();u.exports=function(g){d.init=b,d.$require=n,g.require=n},b(!0);function b(g){if(!(!f||!f.document)){d.set("packaged",g||n.packaged||u.packaged||f.define&&(void 0).packaged);var i={},a="",h=document.currentScript||document._currentScript,c=h&&h.ownerDocument||document;h&&h.src&&(a=h.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var o=c.getElementsByTagName("script"),l=0;l<o.length;l++){var m=o[l],w=m.src||m.getAttribute("src");if(w){for(var k=m.attributes,R=0,T=k.length;R<T;R++){var S=k[R];S.name.indexOf("data-ace-")===0&&(i[p(S.name.replace(/^data-ace-/,""))]=S.value)}var x=w.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);x&&(a=x[1])}}a&&(i.base=i.base||a,i.packaged=!0),i.basePath=i.base,i.workerPath=i.workerPath||i.base,i.modePath=i.modePath||i.base,i.themePath=i.themePath||i.base,delete i.base;for(var M in i)typeof i[M]<"u"&&d.set(M,i[M])}}function p(g){return g.replace(/-(.)/g,function(i,a){return a.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(n,r,u){var d=function(){function f(b,p,g,i){this.start={row:b,column:p},this.end={row:g,column:i}}return f.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},f.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},f.prototype.contains=function(b,p){return this.compare(b,p)==0},f.prototype.compareRange=function(b){var p,g=b.end,i=b.start;return p=this.compare(g.row,g.column),p==1?(p=this.compare(i.row,i.column),p==1?2:p==0?1:0):p==-1?-2:(p=this.compare(i.row,i.column),p==-1?-1:p==1?42:0)},f.prototype.comparePoint=function(b){return this.compare(b.row,b.column)},f.prototype.containsRange=function(b){return this.comparePoint(b.start)==0&&this.comparePoint(b.end)==0},f.prototype.intersects=function(b){var p=this.compareRange(b);return p==-1||p==0||p==1},f.prototype.isEnd=function(b,p){return this.end.row==b&&this.end.column==p},f.prototype.isStart=function(b,p){return this.start.row==b&&this.start.column==p},f.prototype.setStart=function(b,p){typeof b=="object"?(this.start.column=b.column,this.start.row=b.row):(this.start.row=b,this.start.column=p)},f.prototype.setEnd=function(b,p){typeof b=="object"?(this.end.column=b.column,this.end.row=b.row):(this.end.row=b,this.end.column=p)},f.prototype.inside=function(b,p){return this.compare(b,p)==0?!(this.isEnd(b,p)||this.isStart(b,p)):!1},f.prototype.insideStart=function(b,p){return this.compare(b,p)==0?!this.isEnd(b,p):!1},f.prototype.insideEnd=function(b,p){return this.compare(b,p)==0?!this.isStart(b,p):!1},f.prototype.compare=function(b,p){return!this.isMultiLine()&&b===this.start.row?p<this.start.column?-1:p>this.end.column?1:0:b<this.start.row?-1:b>this.end.row?1:this.start.row===b?p>=this.start.column?0:-1:this.end.row===b?p<=this.end.column?0:1:0},f.prototype.compareStart=function(b,p){return this.start.row==b&&this.start.column==p?-1:this.compare(b,p)},f.prototype.compareEnd=function(b,p){return this.end.row==b&&this.end.column==p?1:this.compare(b,p)},f.prototype.compareInside=function(b,p){return this.end.row==b&&this.end.column==p?1:this.start.row==b&&this.start.column==p?-1:this.compare(b,p)},f.prototype.clipRows=function(b,p){if(this.end.row>p)var g={row:p+1,column:0};else if(this.end.row<b)var g={row:b,column:0};if(this.start.row>p)var i={row:p+1,column:0};else if(this.start.row<b)var i={row:b,column:0};return f.fromPoints(i||this.start,g||this.end)},f.prototype.extend=function(b,p){var g=this.compare(b,p);if(g==0)return this;if(g==-1)var i={row:b,column:p};else var a={row:b,column:p};return f.fromPoints(i||this.start,a||this.end)},f.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},f.prototype.isMultiLine=function(){return this.start.row!==this.end.row},f.prototype.clone=function(){return f.fromPoints(this.start,this.end)},f.prototype.collapseRows=function(){return this.end.column==0?new f(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new f(this.start.row,0,this.end.row,0)},f.prototype.toScreenRange=function(b){var p=b.documentToScreenPosition(this.start),g=b.documentToScreenPosition(this.end);return new f(p.row,p.column,g.row,g.column)},f.prototype.moveBy=function(b,p){this.start.row+=b,this.start.column+=p,this.end.row+=b,this.end.column+=p},f}();d.fromPoints=function(f,b){return new d(f.row,f.column,b.row,b.column)},d.comparePoints=function(f,b){return f.row-b.row||f.column-b.column},r.Range=d}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(n,r,u){for(var d=n("./oop"),f={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},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},p=0;p<10;p++)b["Digit"+p]=48+p,b["Numpad"+p]=96+p,f.PRINTABLE_KEYS[48+p]=""+p,f.FUNCTION_KEYS[96+p]="Numpad"+p;for(var p=65;p<91;p++){var g=String.fromCharCode(p+32);b["Key"+g.toUpperCase()]=p,f.PRINTABLE_KEYS[p]=g}for(var p=1;p<13;p++)b["F"+p]=111+p,f.FUNCTION_KEYS[111+p]="F"+p;var i={Shift:16,Control:17,Alt:18,Meta:224};for(var a in i)b[a]=b[a+"Left"]=b[a+"Right"]=i[a];r.$codeToKeyCode=b,f.PRINTABLE_KEYS[173]="-";for(var h in f.FUNCTION_KEYS){var c=f.FUNCTION_KEYS[h].toLowerCase();f[c]=parseInt(h,10)}for(var h in f.PRINTABLE_KEYS){var c=f.PRINTABLE_KEYS[h].toLowerCase();f[c]=parseInt(h,10)}d.mixin(f,f.MODIFIER_KEYS),d.mixin(f,f.PRINTABLE_KEYS),d.mixin(f,f.FUNCTION_KEYS),f.enter=f.return,f.escape=f.esc,f.del=f.delete,function(){for(var o=["cmd","ctrl","alt","shift"],l=Math.pow(2,o.length);l--;)f.KEY_MODS[l]=o.filter(function(m){return l&f.KEY_MODS[m]}).join("-")+"-"}(),f.KEY_MODS[0]="",f.KEY_MODS[-1]="input-",d.mixin(r,f),r.default=r,r.keyCodeToString=function(o){var l=f[o];return typeof l!="string"&&(l=String.fromCharCode(o)),l.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,u){var d=n("./keys"),f=n("./useragent"),b=null,p=0,g;function i(){g=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return g={passive:!1},!0}})}catch{}}function a(){return g==null&&i(),g}function h(R,T,S){this.elem=R,this.type=T,this.callback=S}h.prototype.destroy=function(){o(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var c=r.addListener=function(R,T,S,x){R.addEventListener(T,S,a()),x&&x.$toDestroy.push(new h(R,T,S))},o=r.removeListener=function(R,T,S){R.removeEventListener(T,S,a())};r.stopEvent=function(R){return r.stopPropagation(R),r.preventDefault(R),!1},r.stopPropagation=function(R){R.stopPropagation&&R.stopPropagation()},r.preventDefault=function(R){R.preventDefault&&R.preventDefault()},r.getButton=function(R){return R.type=="dblclick"?0:R.type=="contextmenu"||f.isMac&&R.ctrlKey&&!R.altKey&&!R.shiftKey?2:R.button},r.capture=function(R,T,S){var x=R&&R.ownerDocument||document;function M(O){T&&T(O),S&&S(O),o(x,"mousemove",T),o(x,"mouseup",M),o(x,"dragstart",M)}return c(x,"mousemove",T),c(x,"mouseup",M),c(x,"dragstart",M),M},r.addMouseWheelListener=function(R,T,S){c(R,"wheel",function(x){var M=.15,O=x.deltaX||0,F=x.deltaY||0;switch(x.deltaMode){case x.DOM_DELTA_PIXEL:x.wheelX=O*M,x.wheelY=F*M;break;case x.DOM_DELTA_LINE:var L=15;x.wheelX=O*L,x.wheelY=F*L;break;case x.DOM_DELTA_PAGE:var H=150;x.wheelX=O*H,x.wheelY=F*H;break}T(x)},S)},r.addMultiMouseDownListener=function(R,T,S,x,M){var O=0,F,L,H,P={2:"dblclick",3:"tripleclick",4:"quadclick"};function I($){if(r.getButton($)!==0?O=0:$.detail>1?(O++,O>4&&(O=1)):O=1,f.isIE){var C=Math.abs($.clientX-F)>5||Math.abs($.clientY-L)>5;(!H||C)&&(O=1),H&&clearTimeout(H),H=setTimeout(function(){H=null},T[O-1]||600),O==1&&(F=$.clientX,L=$.clientY)}if($._clicks=O,S[x]("mousedown",$),O>4)O=0;else if(O>1)return S[x](P[O],$)}Array.isArray(R)||(R=[R]),R.forEach(function($){c($,"mousedown",I,M)})};function l(R){return 0|(R.ctrlKey?1:0)|(R.altKey?2:0)|(R.shiftKey?4:0)|(R.metaKey?8:0)}r.getModifierString=function(R){return d.KEY_MODS[l(R)]};function m(R,T,S){var x=l(T);if(!S&&T.code&&(S=d.$codeToKeyCode[T.code]||S),!f.isMac&&b){if(T.getModifierState&&(T.getModifierState("OS")||T.getModifierState("Win"))&&(x|=8),b.altGr)if((3&x)!=3)b.altGr=0;else return;if(S===18||S===17){var M=T.location;if(S===17&&M===1)b[S]==1&&(p=T.timeStamp);else if(S===18&&x===3&&M===2){var O=T.timeStamp-p;O<50&&(b.altGr=!0)}}}if(S in d.MODIFIER_KEYS&&(S=-1),!(!x&&S===13&&T.location===3&&(R(T,x,-S),T.defaultPrevented))){if(f.isChromeOS&&x&8){if(R(T,x,S),T.defaultPrevented)return;x&=-9}return!x&&!(S in d.FUNCTION_KEYS)&&!(S in d.PRINTABLE_KEYS)?!1:R(T,x,S)}}r.addCommandKeyListener=function(R,T,S){var x=null;c(R,"keydown",function(M){b[M.keyCode]=(b[M.keyCode]||0)+1;var O=m(T,M,M.keyCode);return x=M.defaultPrevented,O},S),c(R,"keypress",function(M){x&&(M.ctrlKey||M.altKey||M.shiftKey||M.metaKey)&&(r.stopEvent(M),x=null)},S),c(R,"keyup",function(M){b[M.keyCode]=null},S),b||(w(),c(window,"focus",w))};function w(){b=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!f.isOldIE){var k=1;r.nextTick=function(R,T){T=T||window;var S="zero-timeout-message-"+k++,x=function(M){M.data==S&&(r.stopPropagation(M),o(T,"message",x),R())};c(T,"message",x),T.postMessage(S,"*")}}r.$idleBlocked=!1,r.onIdle=function(R,T){return setTimeout(function S(){r.$idleBlocked?setTimeout(S,100):R()},T)},r.$idleBlockId=null,r.blockIdle=function(R){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},R||100)},r.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),r.nextFrame?r.nextFrame=r.nextFrame.bind(window):r.nextFrame=function(R){setTimeout(R,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(n,r,u){var d;u.exports={lineMode:!1,pasteCancelled:function(){return d&&d>Date.now()-50?!0:d=!1},cancel:function(){d=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,r,u){var d=n("../lib/event"),f=n("../config").nls,b=n("../lib/useragent"),p=n("../lib/dom"),g=n("../lib/lang"),i=n("../clipboard"),a=b.isChrome<18,h=b.isIE,c=b.isChrome>63,o=400,l=n("../lib/keys"),m=l.KEY_MODS,w=b.isIOS,k=w?/\s/:/\n/,R=b.isMobile,T;T=function(S,x){var M=p.createElement("textarea");M.className="ace_text-input",M.setAttribute("wrap","off"),M.setAttribute("autocorrect","off"),M.setAttribute("autocapitalize","off"),M.setAttribute("spellcheck","false"),M.style.opacity="0",S.insertBefore(M,S.firstChild);var O=!1,F=!1,L=!1,H=!1,P="";R||(M.style.fontSize="1px");var I=!1,$=!1,C="",N=0,j=0,U=0,K=Number.MAX_SAFE_INTEGER,Z=Number.MIN_SAFE_INTEGER,te=0;try{var he=document.activeElement===M}catch{}this.setNumberOfExtraLines=function(Se){if(K=Number.MAX_SAFE_INTEGER,Z=Number.MIN_SAFE_INTEGER,Se<0){te=0;return}te=Se},this.setAriaLabel=function(){var Se="";if(x.$textInputAriaLabel&&(Se+="".concat(x.$textInputAriaLabel,", ")),x.session){var He=x.session.selection.cursor.row;Se+=f("text-input.aria-label","Cursor at row $0",[He+1])}M.setAttribute("aria-label",Se)},this.setAriaOptions=function(Se){Se.activeDescendant?(M.setAttribute("aria-haspopup","true"),M.setAttribute("aria-autocomplete",Se.inline?"both":"list"),M.setAttribute("aria-activedescendant",Se.activeDescendant)):(M.setAttribute("aria-haspopup","false"),M.setAttribute("aria-autocomplete","both"),M.removeAttribute("aria-activedescendant")),Se.role&&M.setAttribute("role",Se.role),Se.setLabel&&(M.setAttribute("aria-roledescription",f("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),d.addListener(M,"blur",function(Se){$||(x.onBlur(Se),he=!1)},x),d.addListener(M,"focus",function(Se){if(!$){if(he=!0,b.isEdge)try{if(!document.hasFocus())return}catch{}x.onFocus(Se),b.isEdge?setTimeout(ae):ae()}},x),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:x.renderer.enableKeyboardAccessibility}),P||c||this.$focusScroll=="browser")return M.focus({preventScroll:!0});var Se=M.style.top;M.style.position="fixed",M.style.top="0px";try{var He=M.getBoundingClientRect().top!=0}catch{return}var Qe=[];if(He)for(var mt=M.parentElement;mt&&mt.nodeType==1;)Qe.push(mt),mt.setAttribute("ace_nocontext","true"),!mt.parentElement&&mt.getRootNode?mt=mt.getRootNode().host:mt=mt.parentElement;M.focus({preventScroll:!0}),He&&Qe.forEach(function($t){$t.removeAttribute("ace_nocontext")}),setTimeout(function(){M.style.position="",M.style.top=="0px"&&(M.style.top=Se)},0)},this.blur=function(){M.blur()},this.isFocused=function(){return he},x.on("beforeEndOperation",function(){var Se=x.curOp,He=Se&&Se.command&&Se.command.name;if(He!="insertstring"){var Qe=He&&(Se.docChanged||Se.selectionChanged);L&&Qe&&(C=M.value="",Jt()),ae()}}),x.on("changeSelection",this.setAriaLabel);var ne=function(Se,He){for(var Qe=He,mt=1;mt<=Se-K&&mt<2*te+1;mt++)Qe+=x.session.getLine(Se-mt).length+1;return Qe},ae=w?function(Se){if(!(!he||O&&!Se||H)){Se||(Se="");var He=`
173
+ ab`+Se+`cde fg
174
+ `;He!=M.value&&(M.value=C=He);var Qe=4,mt=4+(Se.length||(x.selection.isEmpty()?0:1));(N!=Qe||j!=mt)&&M.setSelectionRange(Qe,mt),N=Qe,j=mt}}:function(){if(!(L||H)&&!(!he&&!Ee)){L=!0;var Se=0,He=0,Qe="";if(x.session){var mt=x.selection,$t=mt.getRange(),Ct=mt.cursor.row;Ct===Z+1?(K=Z+1,Z=K+2*te):Ct===K-1?(Z=K-1,K=Z-2*te):(Ct<K-1||Ct>Z+1)&&(K=Ct>te?Ct-te:0,Z=Ct>te?Ct+te:2*te);for(var Pt=[],Dt=K;Dt<=Z;Dt++)Pt.push(x.session.getLine(Dt));if(Qe=Pt.join(`
175
+ `),Se=ne($t.start.row,$t.start.column),He=ne($t.end.row,$t.end.column),$t.start.row<K){var pt=x.session.getLine(K-1);Se=$t.start.row<K-1?0:Se,He+=pt.length+1,Qe=pt+`
176
+ `+Qe}else if($t.end.row>Z){var kt=x.session.getLine(Z+1);He=$t.end.row>Z+1?kt.length:$t.end.column,He+=Qe.length+1,Qe=Qe+`
177
+ `+kt}else R&&Ct>0&&(Qe=`
178
+ `+Qe,He+=1,Se+=1);Qe.length>o&&(Se<o&&He<o?Qe=Qe.slice(0,o):(Qe=`
179
+ `,Se==He?Se=He=0:(Se=0,He=1)));var $n=Qe+`
180
+
181
+ `;$n!=C&&(M.value=C=$n,N=j=$n.length)}if(Ee&&(N=M.selectionStart,j=M.selectionEnd),j!=He||N!=Se||M.selectionEnd!=j)try{M.setSelectionRange(Se,He),N=Se,j=He}catch{}L=!1}};this.resetSelection=ae,he&&x.onFocus();var ue=function(Se){return Se.selectionStart===0&&Se.selectionEnd>=C.length&&Se.value===C&&C&&Se.selectionEnd!==j},ce=function(Se){L||(O?O=!1:ue(M)?(x.selectAll(),ae()):R&&M.selectionStart!=N&&ae())},ge=null;this.setInputHandler=function(Se){ge=Se},this.getInputHandler=function(){return ge};var Ee=!1,Re=function(Se,He){if(Ee&&(Ee=!1),F)return ae(),Se&&x.onPaste(Se),F=!1,"";for(var Qe=M.selectionStart,mt=M.selectionEnd,$t=N,Ct=C.length-j,Pt=Se,Dt=Se.length-Qe,pt=Se.length-mt,kt=0;$t>0&&C[kt]==Se[kt];)kt++,$t--;for(Pt=Pt.slice(kt),kt=1;Ct>0&&C.length-kt>N-1&&C[C.length-kt]==Se[Se.length-kt];)kt++,Ct--;Dt-=kt-1,pt-=kt-1;var $n=Pt.length-kt+1;if($n<0&&($t=-$n,$n=0),Pt=Pt.slice(0,$n),!He&&!Pt&&!Dt&&!$t&&!Ct&&!pt)return"";H=!0;var Mr=!1;return b.isAndroid&&Pt==". "&&(Pt=" ",Mr=!0),Pt&&!$t&&!Ct&&!Dt&&!pt||I?x.onTextInput(Pt):x.onTextInput(Pt,{extendLeft:$t,extendRight:Ct,restoreStart:Dt,restoreEnd:pt}),H=!1,C=Se,N=Qe,j=mt,U=pt,Mr?`
182
+ `:Pt},Le=function(Se){if(L)return vn();if(Se&&Se.inputType){if(Se.inputType=="historyUndo")return x.execCommand("undo");if(Se.inputType=="historyRedo")return x.execCommand("redo")}var He=M.value,Qe=Re(He,!0);(He.length>o+100||k.test(Qe)||R&&N<1&&N==j)&&ae()},Xe=function(Se,He,Qe){var mt=Se.clipboardData||window.clipboardData;if(!(!mt||a)){var $t=h||Qe?"Text":"text/plain";try{return He?mt.setData($t,He)!==!1:mt.getData($t)}catch(Ct){if(!Qe)return Xe(Ct,He,!0)}}},Ge=function(Se,He){var Qe=x.getCopyText();if(!Qe)return d.preventDefault(Se);Xe(Se,Qe)?(w&&(ae(Qe),O=Qe,setTimeout(function(){O=!1},10)),He?x.onCut():x.onCopy(),d.preventDefault(Se)):(O=!0,M.value=Qe,M.select(),setTimeout(function(){O=!1,ae(),He?x.onCut():x.onCopy()}))},ft=function(Se){Ge(Se,!0)},rt=function(Se){Ge(Se,!1)},gt=function(Se){var He=Xe(Se);i.pasteCancelled()||(typeof He=="string"?(He&&x.onPaste(He,Se),b.isIE&&setTimeout(ae),d.preventDefault(Se)):(M.value="",F=!0))};d.addCommandKeyListener(M,function(Se,He,Qe){if(!L)return x.onCommandKey(Se,He,Qe)},x),d.addListener(M,"select",ce,x),d.addListener(M,"input",Le,x),d.addListener(M,"cut",ft,x),d.addListener(M,"copy",rt,x),d.addListener(M,"paste",gt,x),(!("oncut"in M)||!("oncopy"in M)||!("onpaste"in M))&&d.addListener(S,"keydown",function(Se){if(!(b.isMac&&!Se.metaKey||!Se.ctrlKey))switch(Se.keyCode){case 67:rt(Se);break;case 86:gt(Se);break;case 88:ft(Se);break}},x);var sn=function(Se){if(!(L||!x.onCompositionStart||x.$readOnly)&&(L={},!I)){Se.data&&(L.useTextareaForIME=!1),setTimeout(vn,0),x._signal("compositionStart"),x.on("mousedown",xr);var He=x.getSelectionRange();He.end.row=He.start.row,He.end.column=He.start.column,L.markerRange=He,L.selectionStart=N,x.onCompositionStart(L),L.useTextareaForIME?(C=M.value="",N=0,j=0):(M.msGetInputContext&&(L.context=M.msGetInputContext()),M.getInputContext&&(L.context=M.getInputContext()))}},vn=function(){if(!(!L||!x.onCompositionUpdate||x.$readOnly)){if(I)return xr();if(L.useTextareaForIME)x.onCompositionUpdate(M.value);else{var Se=M.value;Re(Se),L.markerRange&&(L.context&&(L.markerRange.start.column=L.selectionStart=L.context.compositionStartOffset),L.markerRange.end.column=L.markerRange.start.column+j-L.selectionStart+U)}}},Jt=function(Se){!x.onCompositionEnd||x.$readOnly||(L=!1,x.onCompositionEnd(),x.off("mousedown",xr),Se&&Le())};function xr(){$=!0,M.blur(),M.focus(),$=!1}var bn=g.delayedCall(vn,50).schedule.bind(null,null);function Nn(Se){Se.keyCode==27&&M.value.length<M.selectionStart&&(L||(C=M.value),N=j=-1,ae()),bn()}d.addListener(M,"compositionstart",sn,x),d.addListener(M,"compositionupdate",vn,x),d.addListener(M,"keyup",Nn,x),d.addListener(M,"keydown",bn,x),d.addListener(M,"compositionend",Jt,x),this.getElement=function(){return M},this.setCommandMode=function(Se){I=Se,M.readOnly=!1},this.setReadOnly=function(Se){I||(M.readOnly=Se)},this.setCopyWithEmptySelection=function(Se){},this.onContextMenu=function(Se){Ee=!0,ae(),x._emit("nativecontextmenu",{target:x,domEvent:Se}),this.moveToMouse(Se,!0)},this.moveToMouse=function(Se,He){P||(P=M.style.cssText),M.style.cssText=(He?"z-index:100000;":"")+(b.isIE?"opacity:0.1;":"")+"text-indent: -"+(N+j)*x.renderer.characterWidth*.5+"px;";var Qe=x.container.getBoundingClientRect(),mt=p.computedStyle(x.container),$t=Qe.top+(parseInt(mt.borderTopWidth)||0),Ct=Qe.left+(parseInt(mt.borderLeftWidth)||0),Pt=Qe.bottom-$t-M.clientHeight-2,Dt=function(pt){p.translate(M,pt.clientX-Ct-2,Math.min(pt.clientY-$t-2,Pt))};Dt(Se),Se.type=="mousedown"&&(x.renderer.$isMousePressed=!0,clearTimeout(Dn),b.isWin&&d.capture(x.container,Dt,ir))},this.onContextMenuClose=ir;var Dn;function ir(){clearTimeout(Dn),Dn=setTimeout(function(){P&&(M.style.cssText=P,P=""),x.renderer.$isMousePressed=!1,x.renderer.$keepTextAreaAtCursor&&x.renderer.$moveTextAreaToCursor()},0)}var xt=function(Se){x.textInput.onContextMenu(Se),ir()};d.addListener(M,"mouseup",xt,x),d.addListener(M,"mousedown",function(Se){Se.preventDefault(),ir()},x),d.addListener(x.renderer.scroller,"contextmenu",xt,x),d.addListener(M,"contextmenu",xt,x),w&&qe(S,x,M);function qe(Se,He,Qe){var mt=null,$t=!1;Qe.addEventListener("keydown",function(Pt){mt&&clearTimeout(mt),$t=!0},!0),Qe.addEventListener("keyup",function(Pt){mt=setTimeout(function(){$t=!1},100)},!0);var Ct=function(Pt){if(document.activeElement===Qe&&!($t||L||He.$mouseHandler.isMousePressed)&&!O){var Dt=Qe.selectionStart,pt=Qe.selectionEnd,kt=null,$n=0;if(Dt==0?kt=l.up:Dt==1?kt=l.home:pt>j&&C[pt]==`
183
+ `?kt=l.end:Dt<N&&C[Dt-1]==" "?(kt=l.left,$n=m.option):Dt<N||Dt==N&&j!=N&&Dt==pt?kt=l.left:pt>j&&C.slice(0,pt).split(`
184
+ `).length>2?kt=l.down:pt>j&&C[pt-1]==" "?(kt=l.right,$n=m.option):(pt>j||pt==j&&j!=N&&Dt==pt)&&(kt=l.right),Dt!==pt&&($n|=m.shift),kt){var Mr=He.onCommandKey({},$n,kt);if(!Mr&&He.commands){kt=l.keyCodeToString(kt);var ii=He.commands.findKeyCommand($n,kt);ii&&He.execCommand(ii)}N=Dt,j=pt,ae("")}}};document.addEventListener("selectionchange",Ct),He.on("destroy",function(){document.removeEventListener("selectionchange",Ct)})}this.destroy=function(){M.parentElement&&M.parentElement.removeChild(M)}},r.TextInput=T,r.$setUserAgentForTests=function(S,x){R=S,w=x}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,r,u){var d=n("../lib/useragent"),f=0,b=550,p=function(){function a(h){h.$clickSelection=null;var c=h.editor;c.setDefaultHandler("mousedown",this.onMouseDown.bind(h)),c.setDefaultHandler("dblclick",this.onDoubleClick.bind(h)),c.setDefaultHandler("tripleclick",this.onTripleClick.bind(h)),c.setDefaultHandler("quadclick",this.onQuadClick.bind(h)),c.setDefaultHandler("mousewheel",this.onMouseWheel.bind(h));var o=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];o.forEach(function(l){h[l]=this[l]},this),h.selectByLines=this.extendSelectionBy.bind(h,"getLineRange"),h.selectByWords=this.extendSelectionBy.bind(h,"getWordRange")}return a.prototype.onMouseDown=function(h){var c=h.inSelection(),o=h.getDocumentPosition();this.mousedownEvent=h;var l=this.editor,m=h.getButton();if(m!==0){var w=l.getSelectionRange(),k=w.isEmpty();(k||m==1)&&l.selection.moveToPosition(o),m==2&&(l.textInput.onContextMenu(h.domEvent),d.isMozilla||h.preventDefault());return}if(this.mousedownEvent.time=Date.now(),c&&!l.isFocused()&&(l.focus(),this.$focusTimeout&&!this.$clickSelection&&!l.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(h);return}return this.captureMouse(h),this.startSelect(o,h.domEvent._clicks>1),h.preventDefault()},a.prototype.startSelect=function(h,c){h=h||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(h):c||o.selection.moveToPosition(h),c||this.select(),o.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var h,c=this.editor,o=c.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var l=this.$clickSelection.comparePoint(o);if(l==-1)h=this.$clickSelection.end;else if(l==1)h=this.$clickSelection.start;else{var m=i(this.$clickSelection,o);o=m.cursor,h=m.anchor}c.selection.setSelectionAnchor(h.row,h.column)}c.selection.selectToPosition(o),c.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(h){var c,o=this.editor,l=o.renderer.screenToTextCoordinates(this.x,this.y),m=o.selection[h](l.row,l.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(m.start),k=this.$clickSelection.comparePoint(m.end);if(w==-1&&k<=0)c=this.$clickSelection.end,(m.end.row!=l.row||m.end.column!=l.column)&&(l=m.start);else if(k==1&&w>=0)c=this.$clickSelection.start,(m.start.row!=l.row||m.start.column!=l.column)&&(l=m.end);else if(w==-1&&k==1)l=m.end,c=m.start;else{var R=i(this.$clickSelection,l);l=R.cursor,c=R.anchor}o.selection.setSelectionAnchor(c.row,c.column)}o.selection.selectToPosition(l),o.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var h=g(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),c=Date.now();(h>f||c-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(h){var c=h.getDocumentPosition(),o=this.editor,l=o.session,m=l.getBracketRange(c);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=o.selection.getWordRange(c.row,c.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},a.prototype.onTripleClick=function(h){var c=h.getDocumentPosition(),o=this.editor;this.setState("selectByLines");var l=o.getSelectionRange();l.isMultiLine()&&l.contains(c.row,c.column)?(this.$clickSelection=o.selection.getLineRange(l.start.row),this.$clickSelection.end=o.selection.getLineRange(l.end.row).end):this.$clickSelection=o.selection.getLineRange(c.row),this.select()},a.prototype.onQuadClick=function(h){var c=this.editor;c.selectAll(),this.$clickSelection=c.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(h){if(!h.getAccelKey()){h.getShiftKey()&&h.wheelY&&!h.wheelX&&(h.wheelX=h.wheelY,h.wheelY=0);var c=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var o=this.$lastScroll,l=h.domEvent.timeStamp,m=l-o.t,w=m?h.wheelX/m:o.vx,k=m?h.wheelY/m:o.vy;m<b&&(w=(w+o.vx)/2,k=(k+o.vy)/2);var R=Math.abs(w/k),T=!1;if(R>=1&&c.renderer.isScrollableBy(h.wheelX*h.speed,0)&&(T=!0),R<=1&&c.renderer.isScrollableBy(0,h.wheelY*h.speed)&&(T=!0),T)o.allowed=l;else if(l-o.allowed<b){var S=Math.abs(w)<=1.5*Math.abs(o.vx)&&Math.abs(k)<=1.5*Math.abs(o.vy);S?(T=!0,o.allowed=l):o.allowed=0}if(o.t=l,o.vx=w,o.vy=k,T)return c.renderer.scrollBy(h.wheelX*h.speed,h.wheelY*h.speed),h.stop()}},a}();p.prototype.selectEnd=p.prototype.selectByLinesEnd,p.prototype.selectAllEnd=p.prototype.selectByLinesEnd,p.prototype.selectByWordsEnd=p.prototype.selectByLinesEnd,r.DefaultHandlers=p;function g(a,h,c,o){return Math.sqrt(Math.pow(c-a,2)+Math.pow(o-h,2))}function i(a,h){if(a.start.row==a.end.row)var c=2*h.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var c=h.column-4;else var c=2*h.row-a.start.row-a.end.row;return c<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(n,r,u){r.preventParentScroll=function(d){d.stopPropagation();var f=d.currentTarget,b=f.scrollHeight>f.clientHeight;b||d.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(n,r,u){var d=this&&this.__extends||function(){var l=function(m,w){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,R){k.__proto__=R}||function(k,R){for(var T in R)Object.prototype.hasOwnProperty.call(R,T)&&(k[T]=R[T])},l(m,w)};return function(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");l(m,w);function k(){this.constructor=m}m.prototype=w===null?Object.create(w):(k.prototype=w.prototype,new k)}}(),f=this&&this.__values||function(l){var m=typeof Symbol=="function"&&Symbol.iterator,w=m&&l[m],k=0;if(w)return w.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&k>=l.length&&(l=void 0),{value:l&&l[k++],done:!l}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},b=n("./lib/dom");n("./lib/event");var p=n("./range").Range,g=n("./lib/scroll").preventParentScroll,i="ace_tooltip",a=function(){function l(m){this.isOpen=!1,this.$element=null,this.$parentNode=m}return l.prototype.$init=function(){return this.$element=b.createElement("div"),this.$element.className=i,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},l.prototype.getElement=function(){return this.$element||this.$init()},l.prototype.setText=function(m){this.getElement().textContent=m},l.prototype.setHtml=function(m){this.getElement().innerHTML=m},l.prototype.setPosition=function(m,w){this.getElement().style.left=m+"px",this.getElement().style.top=w+"px"},l.prototype.setClassName=function(m){b.addCssClass(this.getElement(),m)},l.prototype.setTheme=function(m){this.$element.className=i+" "+(m.isDark?"ace_dark ":"")+(m.cssClass||"")},l.prototype.show=function(m,w,k){m!=null&&this.setText(m),w!=null&&k!=null&&this.setPosition(w,k),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},l.prototype.hide=function(m){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=i,this.isOpen=!1)},l.prototype.getHeight=function(){return this.getElement().offsetHeight},l.prototype.getWidth=function(){return this.getElement().offsetWidth},l.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},l}(),h=function(){function l(){this.popups=[]}return l.prototype.addPopup=function(m){this.popups.push(m),this.updatePopups()},l.prototype.removePopup=function(m){var w=this.popups.indexOf(m);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},l.prototype.updatePopups=function(){var m,w,k,R;this.popups.sort(function(P,I){return I.priority-P.priority});var T=[];try{for(var S=f(this.popups),x=S.next();!x.done;x=S.next()){var M=x.value,O=!0;try{for(var F=(k=void 0,f(T)),L=F.next();!L.done;L=F.next()){var H=L.value;if(this.doPopupsOverlap(H,M)){O=!1;break}}}catch(P){k={error:P}}finally{try{L&&!L.done&&(R=F.return)&&R.call(F)}finally{if(k)throw k.error}}O?T.push(M):M.hide()}}catch(P){m={error:P}}finally{try{x&&!x.done&&(w=S.return)&&w.call(S)}finally{if(m)throw m.error}}},l.prototype.doPopupsOverlap=function(m,w){var k=m.getElement().getBoundingClientRect(),R=w.getElement().getBoundingClientRect();return k.left<R.right&&k.right>R.left&&k.top<R.bottom&&k.bottom>R.top},l}(),c=new h;r.popupManager=c,r.Tooltip=a;var o=function(l){d(m,l);function m(w){w===void 0&&(w=document.body);var k=l.call(this,w)||this;k.timeout=void 0,k.lastT=0,k.idleTime=350,k.lastEvent=void 0,k.onMouseOut=k.onMouseOut.bind(k),k.onMouseMove=k.onMouseMove.bind(k),k.waitForHover=k.waitForHover.bind(k),k.hide=k.hide.bind(k);var R=k.getElement();return R.style.whiteSpace="pre-wrap",R.style.pointerEvents="auto",R.addEventListener("mouseout",k.onMouseOut),R.tabIndex=-1,R.addEventListener("blur",(function(){R.contains(document.activeElement)||this.hide()}).bind(k)),R.addEventListener("wheel",g),k}return m.prototype.addToEditor=function(w){w.on("mousemove",this.onMouseMove),w.on("mousedown",this.hide),w.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},m.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)},m.prototype.onMouseMove=function(w,k){this.lastEvent=w,this.lastT=Date.now();var R=k.$mouseHandler.isMousePressed;if(this.isOpen){var T=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(T.row,T.column)||R||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||R||(this.lastEvent=w,this.timeout=setTimeout(this.waitForHover,this.idleTime))},m.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var w=Date.now()-this.lastT;if(this.idleTime-w>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-w);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},m.prototype.isOutsideOfText=function(w){var k=w.editor,R=w.getDocumentPosition(),T=k.session.getLine(R.row);if(R.column==T.length){var S=k.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),x=k.session.documentToScreenPosition(R.row,R.column);if(x.column!=S.column||x.row!=S.row)return!0}return!1},m.prototype.setDataProvider=function(w){this.$gatherData=w},m.prototype.showForRange=function(w,k,R,T){var S=10;if(!(T&&T!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var x=w.renderer;this.isOpen||(c.addPopup(this),this.$registerCloseEvents(),this.setTheme(x.theme)),this.isOpen=!0,this.addMarker(k,w.session),this.range=p.fromPoints(k.start,k.end);var M=x.textToScreenCoordinates(k.start.row,k.start.column),O=x.scroller.getBoundingClientRect();M.pageX<O.left&&(M.pageX=O.left);var F=this.getElement();F.innerHTML="",F.appendChild(R),F.style.maxHeight="",F.style.display="block";var L=F.clientHeight,H=F.clientWidth,P=window.innerHeight-M.pageY-x.lineHeight,I=!0;M.pageY-L<0&&M.pageY<P&&(I=!1),F.style.maxHeight=(I?M.pageY:P)-S+"px",F.style.top=I?"":M.pageY+x.lineHeight+"px",F.style.bottom=I?window.innerHeight-M.pageY+"px":"",F.style.left=Math.min(M.pageX,window.innerWidth-H-S)+"px"}},m.prototype.addMarker=function(w,k){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=k,this.marker=k&&k.addMarker(w,"ace_highlight-marker","text")},m.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,c.removePopup(this)))},m.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},m.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},m.prototype.onMouseOut=function(w){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||w.relatedTarget.classList.contains("ace_content")||this.hide())},m}(a);r.HoverTooltip=o}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(n,r,u){var d=this&&this.__extends||function(){var l=function(m,w){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,R){k.__proto__=R}||function(k,R){for(var T in R)Object.prototype.hasOwnProperty.call(R,T)&&(k[T]=R[T])},l(m,w)};return function(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");l(m,w);function k(){this.constructor=m}m.prototype=w===null?Object.create(w):(k.prototype=w.prototype,new k)}}(),f=this&&this.__values||function(l){var m=typeof Symbol=="function"&&Symbol.iterator,w=m&&l[m],k=0;if(w)return w.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&k>=l.length&&(l=void 0),{value:l&&l[k++],done:!l}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},b=n("../lib/dom"),p=n("../lib/event"),g=n("../tooltip").Tooltip,i=n("../config").nls,a=5,h=3;r.GUTTER_TOOLTIP_LEFT_OFFSET=a,r.GUTTER_TOOLTIP_TOP_OFFSET=h;function c(l){var m=l.editor,w=m.renderer.$gutterLayer,k=new o(m,!0);l.editor.setDefaultHandler("guttermousedown",function(O){if(!(!m.isFocused()||O.getButton()!=0)){var F=w.getRegion(O);if(F!="foldWidgets"){var L=O.getDocumentPosition().row,H=m.session.selection;if(O.getShiftKey())H.selectTo(L,0);else{if(O.domEvent.detail==2)return m.selectAll(),O.preventDefault();l.$clickSelection=m.selection.getLineRange(L)}return l.setState("selectByLines"),l.captureMouse(O),O.preventDefault()}}});var R,T;function S(){var O=T.getDocumentPosition().row,F=m.session.getLength();if(O==F){var L=m.renderer.pixelToScreenCoordinates(0,T.y).row,H=T.$pos;if(L>m.session.documentToScreenRow(H.row,H.column))return x()}if(k.showTooltip(O),!!k.isOpen)if(m.on("mousewheel",x),m.on("changeSession",x),window.addEventListener("keydown",x,!0),l.$tooltipFollowsMouse)M(T);else{var P=T.getGutterRow(),I=w.$lines.get(P);if(I){var $=I.element.querySelector(".ace_gutter_annotation"),C=$.getBoundingClientRect(),N=k.getElement().style;N.left=C.right-a+"px",N.top=C.bottom-h+"px"}else M(T)}}function x(O){O&&O.type==="keydown"&&(O.ctrlKey||O.metaKey)||O&&O.type==="mouseout"&&(!O.relatedTarget||k.getElement().contains(O.relatedTarget))||(R&&(R=clearTimeout(R)),k.isOpen&&(k.hideTooltip(),m.off("mousewheel",x),m.off("changeSession",x),window.removeEventListener("keydown",x,!0)))}function M(O){k.setPosition(O.x,O.y)}l.editor.setDefaultHandler("guttermousemove",function(O){var F=O.domEvent.target||O.domEvent.srcElement;if(b.hasCssClass(F,"ace_fold-widget")||b.hasCssClass(F,"ace_custom-widget"))return x();k.isOpen&&l.$tooltipFollowsMouse&&M(O),T=O,!R&&(R=setTimeout(function(){R=null,T&&!l.isMousePressed&&S()},50))}),p.addListener(m.renderer.$gutter,"mouseout",function(O){T=null,k.isOpen&&(R=setTimeout(function(){R=null,x(O)},50))},m)}r.GutterHandler=c;var o=function(l){d(m,l);function m(w,k){k===void 0&&(k=!1);var R=l.call(this,w.container)||this;R.editor=w,R.visibleTooltipRow;var T=R.getElement();return T.setAttribute("role","tooltip"),T.style.pointerEvents="auto",k&&(R.onMouseOut=R.onMouseOut.bind(R),T.addEventListener("mouseout",R.onMouseOut)),R}return m.prototype.onMouseOut=function(w){this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||this.hideTooltip())},m.prototype.setPosition=function(w,k){var R=window.innerWidth||document.documentElement.clientWidth,T=window.innerHeight||document.documentElement.clientHeight,S=this.getWidth(),x=this.getHeight();w+=15,k+=15,w+S>R&&(w-=w+S-R),k+x>T&&(k-=20+x),g.prototype.setPosition.call(this,w,k)},Object.defineProperty(m,"annotationLabels",{get:function(){return{error:{singular:i("gutter-tooltip.aria-label.error.singular","error"),plural:i("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:i("gutter-tooltip.aria-label.security.singular","security finding"),plural:i("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:i("gutter-tooltip.aria-label.warning.singular","warning"),plural:i("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:i("gutter-tooltip.aria-label.info.singular","information message"),plural:i("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:i("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:i("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),m.prototype.showTooltip=function(w){var k,R=this.editor.renderer.$gutterLayer,T=R.$annotations[w],S;T?S={displayText:Array.from(T.displayText),type:Array.from(T.type)}:S={displayText:[],type:[]};var x=R.session.getFoldLine(w);if(x&&R.$showFoldedAnnotations){for(var M={error:[],security:[],warning:[],info:[],hint:[]},O={error:1,security:2,warning:3,info:4,hint:5},F,L=w+1;L<=x.end.row;L++)if(R.$annotations[L])for(var H=0;H<R.$annotations[L].text.length;H++){var P=R.$annotations[L].type[H];M[P].push(R.$annotations[L].text[H]),(!F||O[P]<O[F])&&(F=P)}if(["error","security","warning"].includes(F)){var I="".concat(m.annotationsToSummaryString(M)," in folded code.");S.displayText.push(I),S.type.push(F+"_fold")}}if(S.displayText.length===0)return this.hideTooltip();for(var $={error:[],security:[],warning:[],info:[],hint:[]},C=R.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",L=0;L<S.displayText.length;L++){var N=b.createElement("span"),j=b.createElement("span");(k=j.classList).add.apply(k,["ace_".concat(S.type[L]),C]),j.setAttribute("aria-label","".concat(m.annotationLabels[S.type[L].replace("_fold","")].singular)),j.setAttribute("role","img"),j.appendChild(b.createTextNode(" ")),N.appendChild(j),N.appendChild(b.createTextNode(S.displayText[L])),N.appendChild(b.createElement("br")),$[S.type[L].replace("_fold","")].push(N)}var U=this.getElement();b.removeChildren(U),$.error.forEach(function(K){return U.appendChild(K)}),$.security.forEach(function(K){return U.appendChild(K)}),$.warning.forEach(function(K){return U.appendChild(K)}),$.info.forEach(function(K){return U.appendChild(K)}),$.hint.forEach(function(K){return U.appendChild(K)}),U.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.visibleTooltipRow=w,this.editor._signal("showGutterTooltip",this)},m.prototype.hideTooltip=function(){this.isOpen&&(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this))},m.annotationsToSummaryString=function(w){var k,R,T=[],S=["error","security","warning","info","hint"];try{for(var x=f(S),M=x.next();!M.done;M=x.next()){var O=M.value;if(w[O].length){var F=w[O].length===1?m.annotationLabels[O].singular:m.annotationLabels[O].plural;T.push("".concat(w[O].length," ").concat(F))}}}catch(L){k={error:L}}finally{try{M&&!M.done&&(R=x.return)&&R.call(x)}finally{if(k)throw k.error}}return T.join(", ")},m}(g);r.GutterTooltip=o}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,u){var d=n("../lib/event"),f=n("../lib/useragent"),b=function(){function p(g,i){this.speed,this.wheelX,this.wheelY,this.domEvent=g,this.editor=i,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 p.prototype.stopPropagation=function(){d.stopPropagation(this.domEvent),this.propagationStopped=!0},p.prototype.preventDefault=function(){d.preventDefault(this.domEvent),this.defaultPrevented=!0},p.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},p.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},p.prototype.getGutterRow=function(){var g=this.getDocumentPosition().row,i=this.editor.session.documentToScreenRow(g,0),a=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return i-a},p.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var g=this.editor,i=g.getSelectionRange();if(i.isEmpty())this.$inSelection=!1;else{var a=this.getDocumentPosition();this.$inSelection=i.contains(a.row,a.column)}return this.$inSelection},p.prototype.getButton=function(){return d.getButton(this.domEvent)},p.prototype.getShiftKey=function(){return this.domEvent.shiftKey},p.prototype.getAccelKey=function(){return f.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},p}();r.MouseEvent=b}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(n,r,u){var d=n("../lib/dom"),f=n("../lib/event"),b=n("../lib/useragent"),p=200,g=200,i=5;function a(c){var o=c.editor,l=d.createElement("div");l.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",l.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(ne){c[ne]=this[ne]},this),o.on("mousedown",this.onMouseDown.bind(c));var w=o.container,k,R,T,S,x,M,O=0,F,L,H,P,I;this.onDragStart=function(ne){if(this.cancelDrag||!w.draggable){var ae=this;return setTimeout(function(){ae.startSelect(),ae.captureMouse(ne)},0),ne.preventDefault()}x=o.getSelectionRange();var ue=ne.dataTransfer;ue.effectAllowed=o.getReadOnly()?"copy":"copyMove",o.container.appendChild(l),ue.setDragImage&&ue.setDragImage(l,0,0),setTimeout(function(){o.container.removeChild(l)}),ue.clearData(),ue.setData("Text",o.session.getTextRange()),L=!0,this.setState("drag")},this.onDragEnd=function(ne){if(w.draggable=!1,L=!1,this.setState(null),!o.getReadOnly()){var ae=ne.dataTransfer.dropEffect;!F&&ae=="move"&&o.session.remove(o.getSelectionRange()),o.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return R=ne.clientX,T=ne.clientY,k||j(),O++,ne.dataTransfer.dropEffect=F=he(ne),f.preventDefault(ne)},this.onDragOver=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return R=ne.clientX,T=ne.clientY,k||(j(),O++),K!==null&&(K=null),ne.dataTransfer.dropEffect=F=he(ne),f.preventDefault(ne)},this.onDragLeave=function(ne){if(O--,O<=0&&k)return U(),F=null,f.preventDefault(ne)},this.onDrop=function(ne){if(M){var ae=ne.dataTransfer;if(L)switch(F){case"move":x.contains(M.row,M.column)?x={start:M,end:M}:x=o.moveText(x,M);break;case"copy":x=o.moveText(x,M,!0);break}else{var ue=ae.getData("Text");x={start:M,end:o.session.insert(M,ue)},o.focus(),F=null}return U(),f.preventDefault(ne)}},f.addListener(w,"dragstart",this.onDragStart.bind(c),o),f.addListener(w,"dragend",this.onDragEnd.bind(c),o),f.addListener(w,"dragenter",this.onDragEnter.bind(c),o),f.addListener(w,"dragover",this.onDragOver.bind(c),o),f.addListener(w,"dragleave",this.onDragLeave.bind(c),o),f.addListener(w,"drop",this.onDrop.bind(c),o);function $(ne,ae){var ue=Date.now(),ce=!ae||ne.row!=ae.row,ge=!ae||ne.column!=ae.column;if(!P||ce||ge)o.moveCursorToPosition(ne),P=ue,I={x:R,y:T};else{var Ee=h(I.x,I.y,R,T);Ee>i?P=null:ue-P>=g&&(o.renderer.scrollCursorIntoView(),P=null)}}function C(ne,ae){var ue=Date.now(),ce=o.renderer.layerConfig.lineHeight,ge=o.renderer.layerConfig.characterWidth,Ee=o.renderer.scroller.getBoundingClientRect(),Re={x:{left:R-Ee.left,right:Ee.right-R},y:{top:T-Ee.top,bottom:Ee.bottom-T}},Le=Math.min(Re.x.left,Re.x.right),Xe=Math.min(Re.y.top,Re.y.bottom),Ge={row:ne.row,column:ne.column};Le/ge<=2&&(Ge.column+=Re.x.left<Re.x.right?-3:2),Xe/ce<=1&&(Ge.row+=Re.y.top<Re.y.bottom?-1:1);var ft=ne.row!=Ge.row,rt=ne.column!=Ge.column,gt=!ae||ne.row!=ae.row;ft||rt&&!gt?H?ue-H>=p&&o.renderer.scrollCursorIntoView(Ge):H=ue:H=null}function N(){var ne=M;M=o.renderer.screenToTextCoordinates(R,T),$(M,ne),C(M,ne)}function j(){x=o.selection.toOrientedRange(),k=o.session.addMarker(x,"ace_selection",o.getSelectionStyle()),o.clearSelection(),o.isFocused()&&o.renderer.$cursorLayer.setBlinking(!1),clearInterval(S),N(),S=setInterval(N,20),O=0,f.addListener(document,"mousemove",Z)}function U(){clearInterval(S),o.session.removeMarker(k),k=null,o.selection.fromOrientedRange(x),o.isFocused()&&!L&&o.$resetCursorStyle(),x=null,M=null,O=0,H=null,P=null,f.removeListener(document,"mousemove",Z)}var K=null;function Z(){K==null&&(K=setTimeout(function(){K!=null&&k&&U()},20))}function te(ne){var ae=ne.types;return!ae||Array.prototype.some.call(ae,function(ue){return ue=="text/plain"||ue=="Text"})}function he(ne){var ae=["copy","copymove","all","uninitialized"],ue=["move","copymove","linkmove","all","uninitialized"],ce=b.isMac?ne.altKey:ne.ctrlKey,ge="uninitialized";try{ge=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var Ee="none";return ce&&ae.indexOf(ge)>=0?Ee="copy":ue.indexOf(ge)>=0?Ee="move":ae.indexOf(ge)>=0&&(Ee="copy"),Ee}}(function(){this.dragWait=function(){var c=Date.now()-this.mousedownEvent.time;c>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var c=this.editor.container;c.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(c){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var c=this.editor,o=c.container;o.draggable=!0,c.renderer.$cursorLayer.setBlinking(!1),c.setStyle("ace_dragging");var l=b.isWin?"default":"move";c.renderer.setCursorStyle(l),this.setState("dragReady")},this.onMouseDrag=function(c){var o=this.editor.container;if(b.isIE&&this.state=="dragReady"){var l=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>3&&o.dragDrop()}if(this.state==="dragWait"){var l=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>0&&(o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(c){if(this.$dragEnabled){this.mousedownEvent=c;var o=this.editor,l=c.inSelection(),m=c.getButton(),w=c.domEvent.detail||1;if(w===1&&m===0&&l){if(c.editor.inMultiSelectMode&&(c.getAccelKey()||c.getShiftKey()))return;this.mousedownEvent.time=Date.now();var k=c.domEvent.target||c.domEvent.srcElement;if("unselectable"in k&&(k.unselectable="on"),o.getDragDelay()){if(b.isWebKit){this.cancelDrag=!0;var R=o.container;R.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(c,this.onMouseDrag.bind(this)),c.defaultPrevented=!0}}}}).call(a.prototype);function h(c,o,l,m){return Math.sqrt(Math.pow(l-c,2)+Math.pow(m-o,2))}r.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(n,r,u){var d=n("./mouse_event").MouseEvent,f=n("../lib/event"),b=n("../lib/dom");r.addTouchListeners=function(p,g){var i="scroll",a,h,c,o,l,m,w=0,k,R=0,T=0,S=0,x,M;function O(){var $=window.navigator&&window.navigator.clipboard,C=!1,N=function(){var K=g.getCopyText(),Z=g.session.getUndoManager().hasUndo();M.replaceChild(b.buildDom(C?["span",!K&&j("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],K&&j("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],K&&j("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],$&&j("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Z&&j("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],j("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],j("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),M.firstChild)},j=function(K){return g.commands.canExecute(K,g)},U=function(K){var Z=K.target.getAttribute("action");if(Z=="more"||!C)return C=!C,N();Z=="paste"?$.readText().then(function(te){g.execCommand(Z,te)}):Z&&((Z=="cut"||Z=="copy")&&($?$.writeText(g.getCopyText()):document.execCommand("copy")),g.execCommand(Z)),M.firstChild.style.display="none",C=!1,Z!="openCommandPalette"&&g.focus()};M=b.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(K){i="menu",K.stopPropagation(),K.preventDefault(),g.textInput.focus()},ontouchend:function(K){K.stopPropagation(),K.preventDefault(),U(K)},onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],g.container)}function F(){if(!g.getOption("enableMobileMenu")){M&&L();return}M||O();var $=g.selection.cursor,C=g.renderer.textToScreenCoordinates($.row,$.column),N=g.renderer.textToScreenCoordinates(0,0).pageX,j=g.renderer.scrollLeft,U=g.container.getBoundingClientRect();M.style.top=C.pageY-U.top-3+"px",C.pageX-U.left<U.width-70?(M.style.left="",M.style.right="10px"):(M.style.right="",M.style.left=N+j-U.left+"px"),M.style.display="",M.firstChild.style.display="none",g.on("input",L)}function L($){M&&(M.style.display="none"),g.off("input",L)}function H(){l=null,clearTimeout(l);var $=g.selection.getRange(),C=$.contains(k.row,k.column);($.isEmpty()||!C)&&(g.selection.moveToPosition(k),g.selection.selectWord()),i="wait",F()}function P(){l=null,clearTimeout(l),g.selection.moveToPosition(k);var $=R>=2?g.selection.getLineRange(k.row):g.session.getBracketRange(k);$&&!$.isEmpty()?g.selection.setRange($):g.selection.selectWord(),i="wait"}f.addListener(p,"contextmenu",function($){if(x){var C=g.textInput.getElement();C.focus()}},g),f.addListener(p,"touchstart",function($){var C=$.touches;if(l||C.length>1){clearTimeout(l),l=null,c=-1,i="zoom";return}x=g.$mouseHandler.isMousePressed=!0;var N=g.renderer.layerConfig.lineHeight,j=g.renderer.layerConfig.lineHeight,U=$.timeStamp;o=U;var K=C[0],Z=K.clientX,te=K.clientY;Math.abs(a-Z)+Math.abs(h-te)>N&&(c=-1),a=$.clientX=Z,h=$.clientY=te,T=S=0;var he=new d($,g);if(k=he.getDocumentPosition(),U-c<500&&C.length==1&&!w)R++,$.preventDefault(),$.button=0,P();else{R=0;var ne=g.selection.cursor,ae=g.selection.isEmpty()?ne:g.selection.anchor,ue=g.renderer.$cursorLayer.getPixelPosition(ne,!0),ce=g.renderer.$cursorLayer.getPixelPosition(ae,!0),ge=g.renderer.scroller.getBoundingClientRect(),Ee=g.renderer.layerConfig.offset,Re=g.renderer.scrollLeft,Le=function(ft,rt){return ft=ft/j,rt=rt/N-.75,ft*ft+rt*rt};if($.clientX<ge.left){i="zoom";return}var Xe=Le($.clientX-ge.left-ue.left+Re,$.clientY-ge.top-ue.top+Ee),Ge=Le($.clientX-ge.left-ce.left+Re,$.clientY-ge.top-ce.top+Ee);Xe<3.5&&Ge<3.5&&(i=Xe>Ge?"cursor":"anchor"),Ge<3.5?i="anchor":Xe<3.5?i="cursor":i="scroll",l=setTimeout(H,450)}c=U},g),f.addListener(p,"touchend",function($){x=g.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),i=="zoom"?(i="",w=0):l?(g.selection.moveToPosition(k),w=0,F()):i=="scroll"?(I(),L()):F(),clearTimeout(l),l=null},g),f.addListener(p,"touchmove",function($){l&&(clearTimeout(l),l=null);var C=$.touches;if(!(C.length>1||i=="zoom")){var N=C[0],j=a-N.clientX,U=h-N.clientY;if(i=="wait")if(j*j+U*U>4)i="cursor";else return $.preventDefault();a=N.clientX,h=N.clientY,$.clientX=N.clientX,$.clientY=N.clientY;var K=$.timeStamp,Z=K-o;if(o=K,i=="scroll"){var te=new d($,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),Z!=0&&(T=j/Z,S=U/Z),g._emit("mousewheel",te),te.propagationStopped||(T=S=0)}else{var he=new d($,g),ne=he.getDocumentPosition();i=="cursor"?g.selection.moveCursorToPosition(ne):i=="anchor"&&g.selection.setSelectionAnchor(ne.row,ne.column),g.renderer.scrollCursorIntoView(ne),$.preventDefault()}}},g);function I(){w+=60,m=setInterval(function(){w--<=0&&(clearInterval(m),m=null),Math.abs(T)<.01&&(T=0),Math.abs(S)<.01&&(S=0),w<20&&(T=.9*T),w<20&&(S=.9*S);var $=g.session.getScrollTop();g.renderer.scrollBy(10*T,10*S),$==g.session.getScrollTop()&&(w=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(n,r,u){var d=n("../lib/event"),f=n("../lib/useragent"),b=n("./default_handlers").DefaultHandlers,p=n("./default_gutter_handler").GutterHandler,g=n("./mouse_event").MouseEvent,i=n("./dragdrop_handler").DragdropHandler,a=n("./touch_handler").addTouchListeners,h=n("../config"),c=function(){function o(l){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var m=this;this.editor=l,new b(this),new p(this),new i(this);var w=function(T){var S=!document.hasFocus||!document.hasFocus()||!l.isFocused()&&document.activeElement==(l.textInput&&l.textInput.getElement());S&&window.focus(),l.focus(),setTimeout(function(){l.isFocused()||l.focus()})},k=l.renderer.getMouseEventTarget();d.addListener(k,"click",this.onMouseEvent.bind(this,"click"),l),d.addListener(k,"mousemove",this.onMouseMove.bind(this,"mousemove"),l),d.addMultiMouseDownListener([k,l.renderer.scrollBarV&&l.renderer.scrollBarV.inner,l.renderer.scrollBarH&&l.renderer.scrollBarH.inner,l.textInput&&l.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",l),d.addMouseWheelListener(l.container,this.onMouseWheel.bind(this,"mousewheel"),l),a(l.container,l);var R=l.renderer.$gutter;d.addListener(R,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),l),d.addListener(R,"click",this.onMouseEvent.bind(this,"gutterclick"),l),d.addListener(R,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),l),d.addListener(R,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),l),d.addListener(k,"mousedown",w,l),d.addListener(R,"mousedown",w,l),f.isIE&&l.renderer.scrollBarV&&(d.addListener(l.renderer.scrollBarV.element,"mousedown",w,l),d.addListener(l.renderer.scrollBarH.element,"mousedown",w,l)),l.on("mousemove",function(T){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var S=l.renderer.screenToTextCoordinates(T.x,T.y),x=l.session.selection.getRange(),M=l.renderer;!x.isEmpty()&&x.insideStart(S.row,S.column)?M.setCursorStyle("default"):M.setCursorStyle("")}},l)}return o.prototype.onMouseEvent=function(l,m){this.editor.session&&this.editor._emit(l,new g(m,this.editor))},o.prototype.onMouseMove=function(l,m){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(l,new g(m,this.editor))},o.prototype.onMouseWheel=function(l,m){var w=new g(m,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=m.wheelX,w.wheelY=m.wheelY,this.editor._emit(l,w)},o.prototype.setState=function(l){this.state=l},o.prototype.captureMouse=function(l,m){this.x=l.x,this.y=l.y,this.isMousePressed=!0;var w=this.editor,k=this.editor.renderer;k.$isMousePressed=!0;var R=this,T=function(F){if(F){if(f.isWebKit&&!F.which&&R.releaseMouse)return R.releaseMouse();R.x=F.clientX,R.y=F.clientY,m&&m(F),R.mouseEvent=new g(F,R.editor),R.$mouseMoved=!0}},S=function(F){w.off("beforeEndOperation",M),clearInterval(O),w.session&&x(),R[R.state+"End"]&&R[R.state+"End"](F),R.state="",R.isMousePressed=k.$isMousePressed=!1,k.$keepTextAreaAtCursor&&k.$moveTextAreaToCursor(),R.$onCaptureMouseMove=R.releaseMouse=null,F&&R.onMouseEvent("mouseup",F),w.endOperation()},x=function(){R[R.state]&&R[R.state](),R.$mouseMoved=!1};if(f.isOldIE&&l.domEvent.type=="dblclick")return setTimeout(function(){S(l)});var M=function(F){R.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(R[R.state+"End"]&&R[R.state+"End"](),R.state="",R.releaseMouse())};w.on("beforeEndOperation",M),w.startOperation({command:{name:"mouse"}}),R.$onCaptureMouseMove=T,R.releaseMouse=d.capture(this.editor.container,T,S);var O=setInterval(x,20)},o.prototype.cancelContextMenu=function(){var l=(function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",l),m&&m.domEvent&&d.stopEvent(m.domEvent))}).bind(this);setTimeout(l,10),this.editor.on("nativecontextmenu",l)},o.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},o}();c.prototype.releaseMouse=null,h.defineOptions(c.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:f.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),r.MouseHandler=c}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(n,r,u){var d=n("../lib/dom"),f=function(){function b(p){p.on("click",function(g){var i=g.getDocumentPosition(),a=p.session,h=a.getFoldAt(i.row,i.column,1);h&&(g.getAccelKey()?a.removeFold(h):a.expandFold(h),g.stop());var c=g.domEvent&&g.domEvent.target;c&&d.hasCssClass(c,"ace_inline_button")&&d.hasCssClass(c,"ace_toggle_wrap")&&(a.setOption("wrap",!a.getUseWrapMode()),p.renderer.scrollCursorIntoView())}),p.on("gutterclick",function(g){var i=p.renderer.$gutterLayer.getRegion(g);if(i=="foldWidgets"){var a=g.getDocumentPosition().row,h=p.session;h.foldWidgets&&h.foldWidgets[a]&&p.session.onFoldWidgetClick(a,g),p.isFocused()||p.focus(),g.stop()}}),p.on("gutterdblclick",function(g){var i=p.renderer.$gutterLayer.getRegion(g);if(i=="foldWidgets"){var a=g.getDocumentPosition().row,h=p.session,c=h.getParentFoldRangeData(a,!0),o=c.range||c.firstRange;if(o){a=o.start.row;var l=h.getFoldAt(a,h.getLine(a).length,1);l?h.removeFold(l):(h.addFold("...",o),p.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}g.stop()}})}return b}();r.FoldHandler=f}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(n,r,u){var d=n("../lib/keys"),f=n("../lib/event"),b=function(){function p(g){this.$editor=g,this.$data={editor:g},this.$handlers=[],this.setDefaultHandler(g.commands)}return p.prototype.setDefaultHandler=function(g){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=g,this.addKeyboardHandler(g,0)},p.prototype.setKeyboardHandler=function(g){var i=this.$handlers;if(i[i.length-1]!=g){for(;i[i.length-1]&&i[i.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(i[i.length-1]);this.addKeyboardHandler(g,1)}},p.prototype.addKeyboardHandler=function(g,i){if(g){typeof g=="function"&&!g.handleKeyboard&&(g.handleKeyboard=g);var a=this.$handlers.indexOf(g);a!=-1&&this.$handlers.splice(a,1),i==null?this.$handlers.push(g):this.$handlers.splice(i,0,g),a==-1&&g.attach&&g.attach(this.$editor)}},p.prototype.removeKeyboardHandler=function(g){var i=this.$handlers.indexOf(g);return i==-1?!1:(this.$handlers.splice(i,1),g.detach&&g.detach(this.$editor),!0)},p.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},p.prototype.getStatusText=function(){var g=this.$data,i=g.editor;return this.$handlers.map(function(a){return a.getStatusText&&a.getStatusText(i,g)||""}).filter(Boolean).join(" ")},p.prototype.$callKeyboardHandlers=function(g,i,a,h){for(var c,o=!1,l=this.$editor.commands,m=this.$handlers.length;m--&&(c=this.$handlers[m].handleKeyboard(this.$data,g,i,a,h),!(!(!c||!c.command)&&(c.command=="null"?o=!0:o=l.exec(c.command,this.$editor,c.args,h),o&&h&&g!=-1&&c.passEvent!=!0&&c.command.passEvent!=!0&&f.stopEvent(h),o))););return!o&&g==-1&&(c={command:"insertstring"},o=l.exec("insertstring",this.$editor,i)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",c),o},p.prototype.onCommandKey=function(g,i,a){var h=d.keyCodeToString(a);return this.$callKeyboardHandlers(i,h,a,g)},p.prototype.onTextInput=function(g){return this.$callKeyboardHandlers(-1,g)},p}();r.KeyBinding=b}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(n,r,u){var d=0,f=0,b=!1,p=!1,g=!1,i=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],a=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],h=0,c=1,o=0,l=1,m=2,w=3,k=4,R=5,T=6,S=7,x=8,M=9,O=10,F=11,L=12,H=13,P=14,I=15,$=16,C=17,N=18,j=[N,N,N,N,N,N,N,N,N,T,R,T,x,R,N,N,N,N,N,N,N,N,N,N,N,N,N,N,R,R,R,T,x,k,k,F,F,F,k,k,k,k,k,O,M,O,M,M,m,m,m,m,m,m,m,m,m,m,M,k,k,k,k,k,k,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,k,k,k,k,k,k,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,k,k,k,k,N,N,N,N,N,N,R,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,M,k,F,F,F,F,k,k,k,k,o,k,k,N,k,k,F,F,m,m,k,o,k,k,k,m,o,k,k,k,k,k],U=[x,x,x,x,x,x,x,x,x,x,x,N,N,N,o,l,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,x,R,H,P,I,$,C,M,F,F,F,F,F,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,M,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,x];function K(ne,ae,ue,ce){var ge=d?a:i,Ee=null,Re=null,Le=null,Xe=0,Ge=null,ft=null,rt=-1,gt=null,sn=null,vn=[];if(!ce)for(gt=0,ce=[];gt<ue;gt++)ce[gt]=he(ne[gt]);for(f=d,b=!1,p=!1,g=!1,sn=0;sn<ue;sn++){if(Ee=Xe,vn[sn]=Re=te(ne,ce,vn,sn),Xe=ge[Ee][Re],Ge=Xe&240,Xe&=15,ae[sn]=Le=ge[Xe][5],Ge>0)if(Ge==16){for(gt=rt;gt<sn;gt++)ae[gt]=1;rt=-1}else rt=-1;if(ft=ge[Xe][6],ft)rt==-1&&(rt=sn);else if(rt>-1){for(gt=rt;gt<sn;gt++)ae[gt]=Le;rt=-1}ce[sn]==R&&(ae[sn]=0),f|=Le}if(g){for(gt=0;gt<ue;gt++)if(ce[gt]==T){ae[gt]=d;for(var Jt=gt-1;Jt>=0&&ce[Jt]==x;Jt--)ae[Jt]=d}}}function Z(ne,ae,ue){if(!(f<ne)){if(ne==1&&d==c&&!p){ue.reverse();return}for(var ce=ue.length,ge=0,Ee,Re,Le,Xe;ge<ce;){if(ae[ge]>=ne){for(Ee=ge+1;Ee<ce&&ae[Ee]>=ne;)Ee++;for(Re=ge,Le=Ee-1;Re<Le;Re++,Le--)Xe=ue[Re],ue[Re]=ue[Le],ue[Le]=Xe;ge=Ee}ge++}}}function te(ne,ae,ue,ce){var ge=ae[ce],Ee,Re,Le,Xe;switch(ge){case o:case l:b=!1;case k:case w:return ge;case m:return b?w:m;case S:return b=!0,l;case x:return k;case M:return ce<1||ce+1>=ae.length||(Ee=ue[ce-1])!=m&&Ee!=w||(Re=ae[ce+1])!=m&&Re!=w?k:(b&&(Re=w),Re==Ee?Re:k);case O:return Ee=ce>0?ue[ce-1]:R,Ee==m&&ce+1<ae.length&&ae[ce+1]==m?m:k;case F:if(ce>0&&ue[ce-1]==m)return m;if(b)return k;for(Xe=ce+1,Le=ae.length;Xe<Le&&ae[Xe]==F;)Xe++;return Xe<Le&&ae[Xe]==m?m:k;case L:for(Le=ae.length,Xe=ce+1;Xe<Le&&ae[Xe]==L;)Xe++;if(Xe<Le){var Ge=ne[ce],ft=Ge>=1425&&Ge<=2303||Ge==64286;if(Ee=ae[Xe],ft&&(Ee==l||Ee==S))return l}return ce<1||(Ee=ae[ce-1])==R?k:ue[ce-1];case R:return b=!1,p=!0,d;case T:return g=!0,k;case H:case P:case $:case C:case I:b=!1;case N:return k}}function he(ne){var ae=ne.charCodeAt(0),ue=ae>>8;return ue==0?ae>191?o:j[ae]:ue==5?/[\u0591-\u05f4]/.test(ne)?l:o:ue==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?L:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?w:ae==1642?F:/[\u06f0-\u06f9]/.test(ne)?m:S:ue==32&&ae<=8287?U[ae&255]:ue==254&&ae>=65136?S:k}r.L=o,r.R=l,r.EN=m,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(ne,ae,ue){if(ne.length<2)return{};var ce=ne.split(""),ge=new Array(ce.length),Ee=new Array(ce.length),Re=[];d=ue?c:h,K(ce,Re,ce.length,ae);for(var Le=0;Le<ge.length;ge[Le]=Le,Le++);Z(2,Re,ge),Z(1,Re,ge);for(var Le=0;Le<ge.length-1;Le++)ae[Le]===w?Re[Le]=r.AN:Re[Le]===l&&(ae[Le]>S&&ae[Le]<H||ae[Le]===k||ae[Le]===N)?Re[Le]=r.ON_R:Le>0&&ce[Le-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ce[Le])&&(Re[Le-1]=Re[Le]=r.R_H,Le++);ce[ce.length-1]===r.DOT&&(Re[ce.length-1]=r.B),ce[0]==="‫"&&(Re[0]=r.RLE);for(var Le=0;Le<ge.length;Le++)Ee[Le]=Re[ge[Le]];return{logicalFromVisual:ge,bidiLevels:Ee}},r.hasBidiCharacters=function(ne,ae){for(var ue=!1,ce=0;ce<ne.length;ce++)ae[ce]=he(ne.charAt(ce)),!ue&&(ae[ce]==l||ae[ce]==S||ae[ce]==w)&&(ue=!0);return ue},r.getVisualFromLogicalIdx=function(ne,ae){for(var ue=0;ue<ae.logicalFromVisual.length;ue++)if(ae.logicalFromVisual[ue]==ne)return ue;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(n,r,u){var d=n("./lib/bidiutil"),f=n("./lib/lang"),b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,p=function(){function g(i){this.session=i,this.bidiMap={},this.currentRow=null,this.bidiUtil=d,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(i.getValue())}return g.prototype.isBidiRow=function(i,a,h){return this.seenBidi?(i!==this.currentRow&&(this.currentRow=i,this.updateRowLine(a,h),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},g.prototype.onChange=function(i){this.seenBidi?this.currentRow=null:i.action=="insert"&&b.test(i.lines.join(`
185
+ `))&&(this.seenBidi=!0,this.currentRow=null)},g.prototype.getDocumentRow=function(){var i=0,a=this.session.$screenRowCache;if(a.length){var h=this.session.$getRowCacheIndex(a,this.currentRow);h>=0&&(i=this.session.$docRowCache[h])}return i},g.prototype.getSplitIndex=function(){var i=0,a=this.session.$screenRowCache;if(a.length)for(var h,c=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-i>0&&(h=this.session.$getRowCacheIndex(a,this.currentRow-i-1),h===c);)c=h,i++;else i=this.currentRow;return i},g.prototype.updateRowLine=function(i,a){i===void 0&&(i=this.getDocumentRow());var h=i===this.session.getLength()-1,c=h?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(i),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[i];o&&(a===void 0&&(a=this.getSplitIndex()),a>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[d.L],this.line=a<o.length?this.line.substring(o[a-1],o[a]):this.line.substring(o[o.length-1])):this.line=this.line.substring(0,o[a]),a==o.length&&(this.line+=this.showInvisibles?c:d.DOT))}else this.line+=this.showInvisibles?c:d.DOT;var l=this.session,m=0,w;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(k,R){return k===" "||l.isFullWidth(k.charCodeAt(0))?(w=k===" "?l.getScreenTabSize(R+m):2,m+=w-1,f.stringRepeat(d.DOT,w)):k}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==d.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 i=[];d.hasBidiCharacters(this.line,i)||this.isRtlDir?this.bidiMap=d.doBidiReorder(this.line,i,this.isRtlDir):this.bidiMap={}},g.prototype.markAsDirty=function(){this.currentRow=null},g.prototype.updateCharacterWidths=function(i){if(this.characterWidth!==i.$characterSize.width){this.fontMetrics=i;var a=this.characterWidth=i.$characterSize.width,h=i.$measureCharWidth("ה");this.charWidths[d.L]=this.charWidths[d.EN]=this.charWidths[d.ON_R]=a,this.charWidths[d.R]=this.charWidths[d.AN]=h,this.charWidths[d.R_H]=h*.45,this.charWidths[d.B]=this.charWidths[d.RLE]=0,this.currentRow=null}},g.prototype.setShowInvisibles=function(i){this.showInvisibles=i,this.currentRow=null},g.prototype.setEolChar=function(i){this.EOL=i},g.prototype.setContentWidth=function(i){this.contentWidth=i},g.prototype.isRtlLine=function(i){return this.$isRtl?!0:i!=null?this.session.getLine(i).charAt(0)==this.RLE:this.isRtlDir},g.prototype.setRtlDirection=function(i,a){for(var h=i.getCursorPosition(),c=i.selection.getSelectionAnchor().row;c<=h.row;c++)!a&&i.session.getLine(c).charAt(0)===i.session.$bidiHandler.RLE?i.session.doc.removeInLine(c,0,1):a&&i.session.getLine(c).charAt(0)!==i.session.$bidiHandler.RLE&&i.session.doc.insert({column:0,row:c},i.session.$bidiHandler.RLE)},g.prototype.getPosLeft=function(i){i-=this.wrapIndent;var a=this.line.charAt(0)===this.RLE?1:0,h=i>a?this.session.getOverwrite()?i:i-1:a,c=d.getVisualFromLogicalIdx(h,this.bidiMap),o=this.bidiMap.bidiLevels,l=0;!this.session.getOverwrite()&&i<=a&&o[c]%2!==0&&c++;for(var m=0;m<c;m++)l+=this.charWidths[o[m]];return!this.session.getOverwrite()&&i>a&&o[c]%2===0&&(l+=this.charWidths[o[c]]),this.wrapIndent&&(l+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(l+=this.rtlLineOffset),l},g.prototype.getSelections=function(i,a){var h=this.bidiMap,c=h.bidiLevels,o,l=[],m=0,w=Math.min(i,a)-this.wrapIndent,k=Math.max(i,a)-this.wrapIndent,R=!1,T=!1,S=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var x,M=0;M<c.length;M++)x=h.logicalFromVisual[M],o=c[M],R=x>=w&&x<k,R&&!T?S=m:!R&&T&&l.push({left:S,width:m-S}),m+=this.charWidths[o],T=R;if(R&&M===c.length&&l.push({left:S,width:m-S}),this.isRtlDir)for(var O=0;O<l.length;O++)l[O].left+=this.rtlLineOffset;return l},g.prototype.offsetToCol=function(h){this.isRtlDir&&(h-=this.rtlLineOffset);var a=0,h=Math.max(h,0),c=0,o=0,l=this.bidiMap.bidiLevels,m=this.charWidths[l[o]];for(this.wrapIndent&&(h-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);h>c+m/2;){if(c+=m,o===l.length-1){m=0;break}m=this.charWidths[l[++o]]}return o>0&&l[o-1]%2!==0&&l[o]%2===0?(h<c&&o--,a=this.bidiMap.logicalFromVisual[o]):o>0&&l[o-1]%2===0&&l[o]%2!==0?a=1+(h>c?this.bidiMap.logicalFromVisual[o]:this.bidiMap.logicalFromVisual[o-1]):this.isRtlDir&&o===l.length-1&&m===0&&l[o-1]%2===0||!this.isRtlDir&&o===0&&l[o]%2!==0?a=1+this.bidiMap.logicalFromVisual[o]:(o>0&&l[o-1]%2!==0&&m!==0&&o--,a=this.bidiMap.logicalFromVisual[o]),a===0&&this.isRtlDir&&a++,a+this.wrapIndent},g}();r.BidiHandler=p}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(n,r,u){var d=n("./lib/oop"),f=n("./lib/lang"),b=n("./lib/event_emitter").EventEmitter,p=n("./range").Range,g=function(){function i(a){this.session=a,this.doc=a.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var h=this;this.cursor.on("change",function(c){h.$cursorChanged=!0,h.$silent||h._emit("changeCursor"),!h.$isEmpty&&!h.$silent&&h._emit("changeSelection"),!h.$keepDesiredColumnOnChange&&c.old.column!=c.value.column&&(h.$desiredColumn=null)}),this.anchor.on("change",function(){h.$anchorChanged=!0,!h.$isEmpty&&!h.$silent&&h._emit("changeSelection")})}return i.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},i.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},i.prototype.getCursor=function(){return this.lead.getPosition()},i.prototype.setAnchor=function(a,h){this.$isEmpty=!1,this.anchor.setPosition(a,h)},i.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},i.prototype.getSelectionLead=function(){return this.lead.getPosition()},i.prototype.isBackwards=function(){var a=this.anchor,h=this.lead;return a.row>h.row||a.row==h.row&&a.column>h.column},i.prototype.getRange=function(){var a=this.anchor,h=this.lead;return this.$isEmpty?p.fromPoints(h,h):this.isBackwards()?p.fromPoints(h,a):p.fromPoints(a,h)},i.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},i.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},i.prototype.setRange=function(a,h){var c=h?a.end:a.start,o=h?a.start:a.end;this.$setSelection(c.row,c.column,o.row,o.column)},i.prototype.$setSelection=function(a,h,c,o){if(!this.$silent){var l=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,h),this.cursor.setPosition(c,o),this.$isEmpty=!p.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||l!=this.$isEmpty||m)&&this._emit("changeSelection")}},i.prototype.$moveSelection=function(a){var h=this.lead;this.$isEmpty&&this.setSelectionAnchor(h.row,h.column),a.call(this)},i.prototype.selectTo=function(a,h){this.$moveSelection(function(){this.moveCursorTo(a,h)})},i.prototype.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},i.prototype.moveTo=function(a,h){this.clearSelection(),this.moveCursorTo(a,h)},i.prototype.moveToPosition=function(a){this.clearSelection(),this.moveCursorToPosition(a)},i.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},i.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},i.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},i.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},i.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},i.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},i.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},i.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},i.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},i.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},i.prototype.getWordRange=function(a,h){if(typeof h>"u"){var c=a||this.lead;a=c.row,h=c.column}return this.session.getWordRange(a,h)},i.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},i.prototype.selectAWord=function(){var a=this.getCursor(),h=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(h)},i.prototype.getLineRange=function(a,h){var c=typeof a=="number"?a:this.lead.row,o,l=this.session.getFoldLine(c);return l?(c=l.start.row,o=l.end.row):o=c,h===!0?new p(c,0,o,this.session.getLine(o).length):new p(c,0,o+1,0)},i.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},i.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},i.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},i.prototype.wouldMoveIntoSoftTab=function(a,h,c){var o=a.column,l=a.column+h;return c<0&&(o=a.column-h,l=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(o,l).split(" ").length-1==h},i.prototype.moveCursorLeft=function(){var a=this.lead.getPosition(),h;if(h=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(h.start.row,h.start.column);else if(a.column===0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var c=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,c,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-c):this.moveCursorBy(0,-1)}},i.prototype.moveCursorRight=function(){var a=this.lead.getPosition(),h;if(h=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(h.end.row,h.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 c=this.session.getTabSize(),a=this.lead;this.wouldMoveIntoSoftTab(a,c,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,c):this.moveCursorBy(0,1)}},i.prototype.moveCursorLineStart=function(){var a=this.lead.row,h=this.lead.column,c=this.session.documentToScreenRow(a,h),o=this.session.screenToDocumentPosition(c,0),l=this.session.getDisplayLine(a,null,o.row,o.column),m=l.match(/^\s*/);m[0].length!=h&&!this.session.$useEmacsStyleLineStart&&(o.column+=m[0].length),this.moveCursorToPosition(o)},i.prototype.moveCursorLineEnd=function(){var a=this.lead,h=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==h.column){var c=this.session.getLine(h.row);if(h.column==c.length){var o=c.search(/\s+$/);o>0&&(h.column=o)}}this.moveCursorTo(h.row,h.column)},i.prototype.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,h=this.doc.getLine(a).length;this.moveCursorTo(a,h)},i.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},i.prototype.moveCursorLongWordRight=function(){var a=this.lead.row,h=this.lead.column,c=this.doc.getLine(a),o=c.substring(h);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var l=this.session.getFoldAt(a,h,1);if(l){this.moveCursorTo(l.end.row,l.end.column);return}if(this.session.nonTokenRe.exec(o)&&(h+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=c.substring(h)),h>=c.length){this.moveCursorTo(a,c.length),this.moveCursorRight(),a<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(o)&&(h+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,h)},i.prototype.moveCursorLongWordLeft=function(){var a=this.lead.row,h=this.lead.column,c;if(c=this.session.getFoldAt(a,h,-1)){this.moveCursorTo(c.start.row,c.start.column);return}var o=this.session.getFoldStringAt(a,h,-1);o==null&&(o=this.doc.getLine(a).substring(0,h));var l=f.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(l)&&(h-=this.session.nonTokenRe.lastIndex,l=l.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),h<=0){this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(l)&&(h-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,h)},i.prototype.$shortWordEndIndex=function(a){var h=0,c,o=/\s/,l=this.session.tokenRe;if(l.lastIndex=0,this.session.tokenRe.exec(a))h=this.session.tokenRe.lastIndex;else{for(;(c=a[h])&&o.test(c);)h++;if(h<1){for(l.lastIndex=0;(c=a[h])&&!l.test(c);)if(l.lastIndex=0,h++,o.test(c))if(h>2){h--;break}else{for(;(c=a[h])&&o.test(c);)h++;if(h>2)break}}}return l.lastIndex=0,h},i.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,h=this.lead.column,c=this.doc.getLine(a),o=c.substring(h),l=this.session.getFoldAt(a,h,1);if(l)return this.moveCursorTo(l.end.row,l.end.column);if(h==c.length){var m=this.doc.getLength();do a++,o=this.doc.getLine(a);while(a<m&&/^\s*$/.test(o));/^\s+/.test(o)||(o=""),h=0}var w=this.$shortWordEndIndex(o);this.moveCursorTo(a,h+w)},i.prototype.moveCursorShortWordLeft=function(){var a=this.lead.row,h=this.lead.column,c;if(c=this.session.getFoldAt(a,h,-1))return this.moveCursorTo(c.start.row,c.start.column);var o=this.session.getLine(a).substring(0,h);if(h===0){do a--,o=this.doc.getLine(a);while(a>0&&/^\s*$/.test(o));h=o.length,/\s+$/.test(o)||(o="")}var l=f.stringReverse(o),m=this.$shortWordEndIndex(l);return this.moveCursorTo(a,h-m)},i.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},i.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},i.prototype.moveCursorBy=function(a,h){var c=this.session.documentToScreenPosition(this.lead.row,this.lead.column),o;if(h===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(c.row,this.lead.row)?(o=this.session.$bidiHandler.getPosLeft(c.column),c.column=Math.round(o/this.session.$bidiHandler.charWidths[0])):o=c.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?c.column=this.$desiredColumn:this.$desiredColumn=c.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var l=this.session.lineWidgets[this.lead.row];a<0?a-=l.rowsAbove||0:a>0&&(a+=l.rowCount-(l.rowsAbove||0))}var m=this.session.screenToDocumentPosition(c.row+a,c.column,o);a!==0&&h===0&&m.row===this.lead.row&&(m.column,this.lead.column),this.moveCursorTo(m.row,m.column+h,h===0)},i.prototype.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},i.prototype.moveCursorTo=function(a,h,c){var o=this.session.getFoldAt(a,h,1);o&&(a=o.start.row,h=o.start.column),this.$keepDesiredColumnOnChange=!0;var l=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(l.charAt(h))&&l.charAt(h-1)&&(this.lead.row==a&&this.lead.column==h+1?h=h-1:h=h+1),this.lead.setPosition(a,h),this.$keepDesiredColumnOnChange=!1,c||(this.$desiredColumn=null)},i.prototype.moveCursorToScreen=function(a,h,c){var o=this.session.screenToDocumentPosition(a,h);this.moveCursorTo(o.row,o.column,c)},i.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},i.prototype.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},i.prototype.toOrientedRange=function(a){var h=this.getRange();return a?(a.start.column=h.start.column,a.start.row=h.start.row,a.end.column=h.end.column,a.end.row=h.end.row):a=h,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},i.prototype.getRangeOfMovements=function(a){var h=this.getCursor();try{a(this);var c=this.getCursor();return p.fromPoints(h,c)}catch{return p.fromPoints(h,h)}finally{this.moveCursorToPosition(h)}},i.prototype.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(h){var c=h.clone();return c.isBackwards=h.cursor==h.start,c});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},i.prototype.fromJSON=function(a){if(a.start==null)if(this.rangeList&&a.length>1){this.toSingleRange(a[0]);for(var h=a.length;h--;){var c=p.fromPoints(a[h].start,a[h].end);a[h].isBackwards&&(c.cursor=c.start),this.addRange(c,!0)}return}else a=a[0];this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},i.prototype.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var h=this.ranges.length;h--;)if(!this.ranges[h].isEqual(a[h]))return!1;return!0},i}();g.prototype.setSelectionAnchor=g.prototype.setAnchor,g.prototype.getSelectionAnchor=g.prototype.getAnchor,g.prototype.setSelectionRange=g.prototype.setRange,d.implement(g.prototype,b),r.Selection=g}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(n,r,u){var d=n("./lib/report_error").reportError,f=2e3,b=function(){function p(g){this.splitRegex,this.states=g,this.regExps={},this.matchMappings={};for(var i in this.states){for(var a=this.states[i],h=[],c=0,o=this.matchMappings[i]={defaultToken:"text"},l="g",m=[],w=0;w<a.length;w++){var k=a[w];if(k.defaultToken&&(o.defaultToken=k.defaultToken),k.caseInsensitive&&l.indexOf("i")===-1&&(l+="i"),k.unicode&&l.indexOf("u")===-1&&(l+="u"),k.regex!=null){k.regex instanceof RegExp&&(k.regex=k.regex.toString().slice(1,-1));var R=k.regex,T=new RegExp("(?:("+R+")|(.))").exec("a").length-2;Array.isArray(k.token)?k.token.length==1||T==1?k.token=k.token[0]:T-1!=k.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:k,groupCount:T-1}),k.token=k.token[0]):(k.tokenArray=k.token,k.token=null,k.onMatch=this.$arrayTokens):typeof k.token=="function"&&!k.onMatch&&(T>1?k.onMatch=this.$applyToken:k.onMatch=k.token),T>1&&(/\\\d/.test(k.regex)?R=k.regex.replace(/\\([0-9]+)/g,function(S,x){return"\\"+(parseInt(x,10)+c+1)}):(T=1,R=this.removeCapturingGroups(k.regex)),!k.splitRegex&&typeof k.token!="string"&&m.push(k)),o[c]=w,c+=T,h.push(R),k.onMatch||(k.onMatch=null)}}h.length||(o[0]=0,h.push("$")),m.forEach(function(S){S.splitRegex=this.createSplitterRegexp(S.regex,l)},this),this.regExps[i]=new RegExp("("+h.join(")|(")+")|($)",l)}}return p.prototype.$setMaxTokenCount=function(g){f=g|0},p.prototype.$applyToken=function(g){var i=this.splitRegex.exec(g).slice(1),a=this.token.apply(this,i);if(typeof a=="string")return[{type:a,value:g}];for(var h=[],c=0,o=a.length;c<o;c++)i[c]&&(h[h.length]={type:a[c],value:i[c]});return h},p.prototype.$arrayTokens=function(g){if(!g)return[];var i=this.splitRegex.exec(g);if(!i)return"text";for(var a=[],h=this.tokenArray,c=0,o=h.length;c<o;c++)i[c+1]&&(a[a.length]={type:h[c],value:i[c+1]});return a},p.prototype.removeCapturingGroups=function(g){var i=g.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(a,h){return h?"(?:":a});return i},p.prototype.createSplitterRegexp=function(g,i){if(g.indexOf("(?=")!=-1){var a=0,h=!1,c={};g.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(o,l,m,w,k,R){return h?h=k!="]":k?h=!0:w?(a==c.stack&&(c.end=R+1,c.stack=-1),a--):m&&(a++,m.length!=1&&(c.stack=a,c.start=R)),o}),c.end!=null&&/^\)*$/.test(g.substr(c.end))&&(g=g.substring(0,c.start)+g.substr(c.end))}return g.charAt(0)!="^"&&(g="^"+g),g.charAt(g.length-1)!="$"&&(g+="$"),new RegExp(g,(i||"").replace("g",""))},p.prototype.getLineTokens=function(g,i){if(i&&typeof i!="string"){var a=i.slice(0);i=a[0],i==="#tmp"&&(a.shift(),i=a.shift())}else var a=[];var h=i||"start",c=this.states[h];c||(h="start",c=this.states[h]);var o=this.matchMappings[h],l=this.regExps[h];l.lastIndex=0;for(var m,w=[],k=0,R=0,T={type:null,value:""};m=l.exec(g);){var S=o.defaultToken,x=null,M=m[0],O=l.lastIndex;if(O-M.length>k){var F=g.substring(k,O-M.length);T.type==S?T.value+=F:(T.type&&w.push(T),T={type:S,value:F})}for(var L=0;L<m.length-2;L++)if(m[L+1]!==void 0){x=c[o[L]],x.onMatch?S=x.onMatch(M,h,a,g):S=x.token,x.next&&(typeof x.next=="string"?h=x.next:h=x.next(h,a),c=this.states[h],c||(this.reportError("state doesn't exist",h),h="start",c=this.states[h]),o=this.matchMappings[h],k=O,l=this.regExps[h],l.lastIndex=O),x.consumeLineEnd&&(k=O);break}if(M){if(typeof S=="string")(!x||x.merge!==!1)&&T.type===S?T.value+=M:(T.type&&w.push(T),T={type:S,value:M});else if(S){T.type&&w.push(T),T={type:null,value:""};for(var L=0;L<S.length;L++)w.push(S[L])}}if(k==g.length)break;if(k=O,R++>f){for(R>2*g.length&&this.reportError("infinite loop with in ace tokenizer",{startState:i,line:g});k<g.length;)T.type&&w.push(T),T={value:g.substring(k,k+=500),type:"overflow"};h="start",a=[];break}}return T.type&&w.push(T),a.length>1&&a[0]!==h&&a.unshift("#tmp",h),{tokens:w,state:a.length?a:h}},p}();b.prototype.reportError=d,r.Tokenizer=b}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(n,r,u){var d=n("../lib/deep_copy").deepCopy,f;f=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(g,i){if(!i){for(var a in g)this.$rules[a]=g[a];return}for(var a in g){for(var h=g[a],c=0;c<h.length;c++){var o=h[c];(o.next||o.onMatch)&&(typeof o.next=="string"&&o.next.indexOf(i)!==0&&(o.next=i+o.next),o.nextState&&o.nextState.indexOf(i)!==0&&(o.nextState=i+o.nextState))}this.$rules[i+a]=h}},this.getRules=function(){return this.$rules},this.embedRules=function(g,i,a,h,c){var o=typeof g=="function"?new g().getRules():g;if(h)for(var l=0;l<h.length;l++)h[l]=i+h[l];else{h=[];for(var m in o)h.push(i+m)}if(this.addRules(o,i),a)for(var w=Array.prototype[c?"push":"unshift"],l=0;l<h.length;l++)w.apply(this.$rules[h[l]],d(a));this.$embeds||(this.$embeds=[]),this.$embeds.push(i)},this.getEmbeds=function(){return this.$embeds};var b=function(g,i){return(g!="start"||i.length)&&i.unshift(this.nextState,g),this.nextState},p=function(g,i){return i.shift(),i.shift()||"start"};this.normalizeRules=function(){var g=0,i=this.$rules;function a(h){var c=i[h];c.processed=!0;for(var o=0;o<c.length;o++){var l=c[o],m=null;Array.isArray(l)&&(m=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var w=l.next||l.push;if(w&&Array.isArray(w)){var k=l.stateName;k||(k=l.token,typeof k!="string"&&(k=k[0]||""),i[k]&&(k+=g++)),i[k]=w,l.next=k,a(k)}else w=="pop"&&(l.next=p);if(l.push&&(l.nextState=l.next||l.push,l.next=b,delete l.push),l.rules)for(var R in l.rules)i[R]?i[R].push&&i[R].push.apply(i[R],l.rules[R]):i[R]=l.rules[R];var T=typeof l=="string"?l:l.include;if(T&&(T==="$self"&&(T="start"),Array.isArray(T)?m=T.map(function(x){return i[x]}):m=i[T]),m){var S=[o,1].concat(m);l.noEscape&&(S=S.filter(function(x){return!x.next})),c.splice.apply(c,S),o--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}Object.keys(i).forEach(a,this)},this.createKeywordMapper=function(g,i,a,h){var c=Object.create(null);return this.$keywordList=[],Object.keys(g).forEach(function(o){for(var l=g[o],m=l.split(h||"|"),w=m.length;w--;){var k=m[w];this.$keywordList.push(k),a&&(k=k.toLowerCase()),c[k]=o}},this),g=null,a?function(o){return c[o.toLowerCase()]||i}:function(o){return c[o]||i}},this.getKeywords=function(){return this.$keywords}}).call(f.prototype),r.TextHighlightRules=f}),ace.define("ace/mode/behaviour",["require","exports","module"],function(n,r,u){var d;d=function(){this.$behaviours={}},(function(){this.add=function(f,b,p){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[f]:this.$behaviours[f]={}}this.$behaviours[f][b]=p},this.addBehaviours=function(f){for(var b in f)for(var p in f[b])this.add(b,p,f[b][p])},this.remove=function(f){this.$behaviours&&this.$behaviours[f]&&delete this.$behaviours[f]},this.inherit=function(f,b){if(typeof f=="function")var p=new f().getBehaviours(b);else var p=f.getBehaviours(b);this.addBehaviours(p)},this.getBehaviours=function(f){if(f){for(var b={},p=0;p<f.length;p++)this.$behaviours[f[p]]&&(b[f[p]]=this.$behaviours[f[p]]);return b}else return this.$behaviours}}).call(d.prototype),r.Behaviour=d}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(n,r,u){var d=n("./range").Range,f=function(){function b(p,g,i){this.$session=p,this.$row=g,this.$rowTokens=p.getTokens(g);var a=p.getTokenAt(g,i);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 p;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,p||(p=this.$session.getLength()),this.$row>=p)return this.$row=p-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 p=this.$rowTokens,g=this.$tokenIndex,i=p[g].start;if(i!==void 0)return i;for(i=0;g>0;)g-=1,i+=p[g].value.length;return i},b.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},b.prototype.getCurrentTokenRange=function(){var p=this.$rowTokens[this.$tokenIndex],g=this.getCurrentTokenColumn();return new d(this.$row,g,this.$row,g+p.value.length)},b}();r.TokenIterator=f}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,u){var d=n("../../lib/oop"),f=n("../behaviour").Behaviour,b=n("../../token_iterator").TokenIterator,p=n("../../lib/lang"),g=["text","paren.rparen","rparen","paren","punctuation.operator"],i=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,h={},c={'"':'"',"'":"'"},o=function(w){var k=-1;if(w.multiSelect&&(k=w.selection.index,h.rangeCount!=w.multiSelect.rangeCount&&(h={rangeCount:w.multiSelect.rangeCount})),h[k])return a=h[k];a=h[k]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},l=function(w,k,R,T){var S=w.end.row-w.start.row;return{text:R+k+T,selection:[0,w.start.column+1,S,w.end.column+(S?0:1)]}},m;m=function(w){w=w||{},this.add("braces","insertion",function(k,R,T,S,x){var M=T.getCursorPosition(),O=S.doc.getLine(M.row);if(x=="{"){o(T);var F=T.getSelectionRange(),L=S.doc.getTextRange(F),H=S.getTokenAt(M.row,M.column);if(L!==""&&L!=="{"&&T.getWrapBehavioursEnabled())return l(F,L,"{","}");if(H&&/(?:string)\.quasi|\.xml/.test(H.type)){var P=[/tag\-(?:open|name)/,/attribute\-name/];return P.some(function(K){return K.test(H.type)})||/(string)\.quasi/.test(H.type)&&H.value[M.column-H.start-1]!=="$"?void 0:(m.recordAutoInsert(T,S,"}"),{text:"{}",selection:[1,1]})}else if(m.isSaneInsertion(T,S))return/[\]\}\)]/.test(O[M.column])||T.inMultiSelectMode||w.braces?(m.recordAutoInsert(T,S,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(T,S,"{"),{text:"{",selection:[1,1]})}else if(x=="}"){o(T);var I=O.substring(M.column,M.column+1);if(I=="}"){var $=S.$findOpeningBracket("}",{column:M.column+1,row:M.row});if($!==null&&m.isAutoInsertedClosing(M,O,x))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(x==`
186
+ `||x==`\r
187
+ `){o(T);var C="";m.isMaybeInsertedClosing(M,O)&&(C=p.stringRepeat("}",a.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var I=O.substring(M.column,M.column+1);if(I==="}"){var N=S.findMatchingBracket({row:M.row,column:M.column+1},"}");if(!N)return null;var j=this.$getIndent(S.getLine(N.row))}else if(C)var j=this.$getIndent(O);else{m.clearMaybeInsertedClosing();return}var U=j+S.getTabString();return{text:`
188
+ `+U+`
189
+ `+j+C,selection:[1,U.length,1,U.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(k,R,T,S,x){var M=S.doc.getTextRange(x);if(!x.isMultiLine()&&M=="{"){o(T);var O=S.doc.getLine(x.start.row),F=O.substring(x.end.column,x.end.column+1);if(F=="}")return x.end.column++,x;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(k,R,T,S,x){if(x=="("){o(T);var M=T.getSelectionRange(),O=S.doc.getTextRange(M);if(O!==""&&T.getWrapBehavioursEnabled())return l(M,O,"(",")");if(m.isSaneInsertion(T,S))return m.recordAutoInsert(T,S,")"),{text:"()",selection:[1,1]}}else if(x==")"){o(T);var F=T.getCursorPosition(),L=S.doc.getLine(F.row),H=L.substring(F.column,F.column+1);if(H==")"){var P=S.$findOpeningBracket(")",{column:F.column+1,row:F.row});if(P!==null&&m.isAutoInsertedClosing(F,L,x))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(k,R,T,S,x){var M=S.doc.getTextRange(x);if(!x.isMultiLine()&&M=="("){o(T);var O=S.doc.getLine(x.start.row),F=O.substring(x.start.column+1,x.start.column+2);if(F==")")return x.end.column++,x}}),this.add("brackets","insertion",function(k,R,T,S,x){if(x=="["){o(T);var M=T.getSelectionRange(),O=S.doc.getTextRange(M);if(O!==""&&T.getWrapBehavioursEnabled())return l(M,O,"[","]");if(m.isSaneInsertion(T,S))return m.recordAutoInsert(T,S,"]"),{text:"[]",selection:[1,1]}}else if(x=="]"){o(T);var F=T.getCursorPosition(),L=S.doc.getLine(F.row),H=L.substring(F.column,F.column+1);if(H=="]"){var P=S.$findOpeningBracket("]",{column:F.column+1,row:F.row});if(P!==null&&m.isAutoInsertedClosing(F,L,x))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(k,R,T,S,x){var M=S.doc.getTextRange(x);if(!x.isMultiLine()&&M=="["){o(T);var O=S.doc.getLine(x.start.row),F=O.substring(x.start.column+1,x.start.column+2);if(F=="]")return x.end.column++,x}}),this.add("string_dquotes","insertion",function(k,R,T,S,x){var M=S.$mode.$quotes||c;if(x.length==1&&M[x]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(x)!=-1)return;o(T);var O=x,F=T.getSelectionRange(),L=S.doc.getTextRange(F);if(L!==""&&(L.length!=1||!M[L])&&T.getWrapBehavioursEnabled())return l(F,L,O,O);if(!L){var H=T.getCursorPosition(),P=S.doc.getLine(H.row),I=P.substring(H.column-1,H.column),$=P.substring(H.column,H.column+1),C=S.getTokenAt(H.row,H.column),N=S.getTokenAt(H.row,H.column+1);if(I=="\\"&&C&&/escape/.test(C.type))return null;var j=C&&/string|escape/.test(C.type),U=!N||/string|escape/.test(N.type),K;if($==O)K=j!==U,K&&/string\.end/.test(N.type)&&(K=!1);else{if(j&&!U||j&&U)return null;var Z=S.$mode.tokenRe;Z.lastIndex=0;var te=Z.test(I);Z.lastIndex=0;var he=Z.test($),ne=S.$mode.$pairQuotesAfter,ae=ne&&ne[O]&&ne[O].test(I);if(!ae&&te||he||$&&!/[\s;,.})\]\\]/.test($))return null;var ue=P[H.column-2];if(I==O&&(ue==O||Z.test(ue)))return null;K=!0}return{text:K?O+O:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(k,R,T,S,x){var M=S.$mode.$quotes||c,O=S.doc.getTextRange(x);if(!x.isMultiLine()&&M.hasOwnProperty(O)){o(T);var F=S.doc.getLine(x.start.row),L=F.substring(x.start.column+1,x.start.column+2);if(L==O)return x.end.column++,x}}),w.closeDocComment!==!1&&this.add("doc comment end","insertion",function(k,R,T,S,x){if(k==="doc-start"&&(x===`
190
+ `||x===`\r
191
+ `)&&T.selection.isEmpty()){var M=T.getCursorPosition();if(M.column===0)return;for(var O=S.doc.getLine(M.row),F=S.doc.getLine(M.row+1),L=S.getTokens(M.row),H=0,P=0;P<L.length;P++){H+=L[P].value.length;var I=L[P];if(H>=M.column){if(H===M.column){if(!/\.doc/.test(I.type))return;if(/\*\//.test(I.value)){var $=L[P+1];if(!$||!/\.doc/.test($.type))return}}var C=M.column-(H-I.value.length),N=I.value.indexOf("*/"),j=I.value.indexOf("/**",N>-1?N+2:0);if(j!==-1&&C>j&&C<j+3||N!==-1&&j!==-1&&C>=N&&C<=j||!/\.doc/.test(I.type))return;break}}var U=this.$getIndent(O);if(/\s*\*/.test(F))return/^\s*\*/.test(O)?{text:x+U+"* ",selection:[1,2+U.length,1,2+U.length]}:{text:x+U+" * ",selection:[1,3+U.length,1,3+U.length]};if(/\/\*\*/.test(O.substring(0,M.column)))return{text:x+U+" * "+x+" "+U+"*/",selection:[1,4+U.length,1,4+U.length]}}})},m.isSaneInsertion=function(w,k){var R=w.getCursorPosition(),T=new b(k,R.row,R.column);if(!this.$matchTokenType(T.getCurrentToken()||"text",g)){if(/[)}\]]/.test(w.session.getLine(R.row)[R.column]))return!0;var S=new b(k,R.row,R.column+1);if(!this.$matchTokenType(S.getCurrentToken()||"text",g))return!1}return T.stepForward(),T.getCurrentTokenRow()!==R.row||this.$matchTokenType(T.getCurrentToken()||"text",i)},m.$matchTokenType=function(w,k){return k.indexOf(w.type||w)>-1},m.recordAutoInsert=function(w,k,R){var T=w.getCursorPosition(),S=k.doc.getLine(T.row);this.isAutoInsertedClosing(T,S,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=T.row,a.autoInsertedLineEnd=R+S.substr(T.column),a.autoInsertedBrackets++},m.recordMaybeInsert=function(w,k,R){var T=w.getCursorPosition(),S=k.doc.getLine(T.row);this.isMaybeInsertedClosing(T,S)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=T.row,a.maybeInsertedLineStart=S.substr(0,T.column)+R,a.maybeInsertedLineEnd=S.substr(T.column),a.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(w,k,R){return a.autoInsertedBrackets>0&&w.row===a.autoInsertedRow&&R===a.autoInsertedLineEnd[0]&&k.substr(w.column)===a.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(w,k){return a.maybeInsertedBrackets>0&&w.row===a.maybeInsertedRow&&k.substr(w.column)===a.maybeInsertedLineEnd&&k.substr(0,w.column)==a.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){a.autoInsertedLineEnd=a.autoInsertedLineEnd.substr(1),a.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){a&&(a.maybeInsertedBrackets=0,a.maybeInsertedRow=-1)},d.inherits(m,f),r.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(n,r,u){for(var d=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],f=0,b=[],p=0;p<d.length;p+=2)b.push(f+=d[p]),d[p+1]&&b.push(45,f+=d[p+1]);r.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,r,u){var d=n("../config"),f=n("../tokenizer").Tokenizer,b=n("./text_highlight_rules").TextHighlightRules,p=n("./behaviour/cstyle").CstyleBehaviour,g=n("../unicode"),i=n("../lib/lang"),a=n("../token_iterator").TokenIterator,h=n("../range").Range,c;c=function(){this.HighlightRules=b},(function(){this.$defaultBehaviour=new p,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 f(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(o,l,m,w){var k=l.doc,R=!0,T=!0,S=1/0,x=l.getTabSize(),M=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var O=this.lineCommentStart.map(i.escapeRegExp).join("|"),F=this.lineCommentStart[0];else var O=i.escapeRegExp(this.lineCommentStart),F=this.lineCommentStart;O=new RegExp("^(\\s*)(?:"+O+") ?"),M=l.getUseSoftTabs();var L=function(K,Z){var te=K.match(O);if(te){var he=te[1].length,ne=te[0].length;!$(K,he,ne)&&te[0][ne-1]==" "&&ne--,k.removeInLine(Z,he,ne)}},H=F+" ",P=function(K,Z){(!R||/\S/.test(K))&&($(K,S,S)?k.insertInLine({row:Z,column:S},H):k.insertInLine({row:Z,column:S},F))},I=function(K,Z){return O.test(K)},$=function(K,Z,te){for(var he=0;Z--&&K.charAt(Z)==" ";)he++;if(he%x!=0)return!1;for(var he=0;K.charAt(te++)==" ";)he++;return x>2?he%x!=x-1:he%x==0}}else{if(!this.blockComment)return!1;var F=this.blockComment.start,C=this.blockComment.end,O=new RegExp("^(\\s*)(?:"+i.escapeRegExp(F)+")"),N=new RegExp("(?:"+i.escapeRegExp(C)+")\\s*$"),P=function(ae,ue){I(ae,ue)||(!R||/\S/.test(ae))&&(k.insertInLine({row:ue,column:ae.length},C),k.insertInLine({row:ue,column:S},F))},L=function(ae,ue){var ce;(ce=ae.match(N))&&k.removeInLine(ue,ae.length-ce[0].length,ae.length),(ce=ae.match(O))&&k.removeInLine(ue,ce[1].length,ce[0].length)},I=function(ae,ue){if(O.test(ae))return!0;for(var ce=l.getTokens(ue),ge=0;ge<ce.length;ge++)if(ce[ge].type==="comment")return!0}}function j(K){for(var Z=m;Z<=w;Z++)K(k.getLine(Z),Z)}var U=1/0;j(function(K,Z){var te=K.search(/\S/);te!==-1?(te<S&&(S=te),T&&!I(K,Z)&&(T=!1)):U>K.length&&(U=K.length)}),S==1/0&&(S=U,R=!1,T=!1),M&&S%x!=0&&(S=Math.floor(S/x)*x),j(T?L:P)},this.toggleBlockComment=function(o,l,m,w){var k=this.blockComment;if(k){!k.start&&k[0]&&(k=k[0]);var R=new a(l,w.row,w.column),T=R.getCurrentToken();l.selection;var S=l.selection.toOrientedRange(),x,M;if(T&&/comment/.test(T.type)){for(var O,F;T&&/comment/.test(T.type);){var L=T.value.indexOf(k.start);if(L!=-1){var H=R.getCurrentTokenRow(),P=R.getCurrentTokenColumn()+L;O=new h(H,P,H,P+k.start.length);break}T=R.stepBackward()}for(var R=new a(l,w.row,w.column),T=R.getCurrentToken();T&&/comment/.test(T.type);){var L=T.value.indexOf(k.end);if(L!=-1){var H=R.getCurrentTokenRow(),P=R.getCurrentTokenColumn()+L;F=new h(H,P,H,P+k.end.length);break}T=R.stepForward()}F&&l.remove(F),O&&(l.remove(O),x=O.start.row,M=-k.start.length)}else M=k.start.length,x=m.start.row,l.insert(m.end,k.end),l.insert(m.start,k.start);S.start.row==x&&(S.start.column+=M),S.end.row==x&&(S.end.column+=M),l.selection.fromOrientedRange(S)}},this.getNextLineIndent=function(o,l,m){return this.$getIndent(l)},this.checkOutdent=function(o,l,m){return!1},this.autoOutdent=function(o,l,m){},this.$getIndent=function(o){return o.match(/^\s*/)[0]},this.createWorker=function(o){return null},this.createModeDelegates=function(o){this.$embeds=[],this.$modes={};for(var l in o)if(o[l]){var m=o[l],w=m.prototype.$id,k=d.$modes[w];k||(d.$modes[w]=k=new m),d.$modes[l]||(d.$modes[l]=k),this.$embeds.push(l),this.$modes[l]=k}for(var R=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],T=function(M){(function(O){var F=R[M],L=O[F];O[R[M]]=function(){return this.$delegator(F,arguments,L)}})(S)},S=this,l=0;l<R.length;l++)T(l)},this.$delegator=function(o,l,m){var w=l[0]||"start";if(typeof w!="string"){if(Array.isArray(w[2])){var k=w[2][w[2].length-1],R=this.$modes[k];if(R)return R[o].apply(R,[w[1]].concat([].slice.call(l,1)))}w=w[0]||"start"}for(var T=0;T<this.$embeds.length;T++)if(this.$modes[this.$embeds[T]]){var S=w.split(this.$embeds[T]);if(!S[0]&&S[1]){l[0]=S[1];var R=this.$modes[this.$embeds[T]];return R[o].apply(R,l)}}var x=m.apply(this,l);return m?x:void 0},this.transformAction=function(o,l,m,w,k){if(this.$behaviour){var R=this.$behaviour.getBehaviours();for(var T in R)if(R[T][l]){var S=R[T][l].apply(this,arguments);if(S)return S}}},this.getKeywords=function(o){if(!this.completionKeywords){var l=this.$tokenizer.rules,m=[];for(var w in l)for(var k=l[w],R=0,T=k.length;R<T;R++)if(typeof k[R].token=="string")/keyword|support|storage/.test(k[R].token)&&m.push(k[R].regex);else if(typeof k[R].token=="object"){for(var S=0,x=k[R].token.length;S<x;S++)if(/keyword|support|storage/.test(k[R].token[S])){var w=k[R].regex.match(/\(.+?\)/g)[S];m.push(w.substr(1,w.length-2))}}this.completionKeywords=m}return o?m.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(o,l,m,w){var k=this.$keywordList||this.$createKeywordList();return k.map(function(R){return{name:R,value:R,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(c.prototype),r.Mode=c}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(n,r,u){var d=n("./lib/dom"),f=function(){function b(p){this.session=p,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(p){var g;return this.lineWidgets?g=this.lineWidgets[p]&&this.lineWidgets[p].rowCount||0:g=0,!this.$useWrapMode||!this.$wrapData[p]?1+g:this.$wrapData[p].length+1+g},b.prototype.$getWidgetScreenLength=function(){var p=0;return this.lineWidgets.forEach(function(g){g&&g.rowCount&&!g.hidden&&(p+=g.rowCount)}),p},b.prototype.$onChangeEditor=function(p){this.attach(p.editor)},b.prototype.attach=function(p){p&&p.widgetManager&&p.widgetManager!=this&&p.widgetManager.detach(),this.editor!=p&&(this.detach(),this.editor=p,p&&(p.widgetManager=this,p.renderer.on("beforeRender",this.measureWidgets),p.renderer.on("afterRender",this.renderWidgets)))},b.prototype.detach=function(p){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 i=this.session.lineWidgets;i&&i.forEach(function(a){a&&a.el&&a.el.parentNode&&(a._inDocument=!1,a.el.parentNode.removeChild(a.el))})}},b.prototype.updateOnFold=function(p,g){var i=g.lineWidgets;if(!(!i||!p.action)){for(var a=p.data,h=a.start.row,c=a.end.row,o=p.action=="add",l=h+1;l<c;l++)i[l]&&(i[l].hidden=o);i[c]&&(o?i[h]?i[c].hidden=o:i[h]=i[c]:(i[h]==i[c]&&(i[h]=void 0),i[c].hidden=o))}},b.prototype.updateOnChange=function(p){var g=this.session.lineWidgets;if(g){var i=p.start.row,a=p.end.row-i;if(a!==0)if(p.action=="remove"){var h=g.splice(i+1,a);!g[i]&&h[h.length-1]&&(g[i]=h.pop()),h.forEach(function(o){o&&this.removeLineWidget(o)},this),this.$updateRows()}else{var c=new Array(a);g[i]&&g[i].column!=null&&p.start.column>g[i].column&&i++,c.unshift(i,0),g.splice.apply(g,c),this.$updateRows()}}},b.prototype.$updateRows=function(){var p=this.session.lineWidgets;if(p){var g=!0;p.forEach(function(i,a){if(i)for(g=!1,i.row=a;i.$oldWidget;)i.$oldWidget.row=a,i=i.$oldWidget}),g&&(this.session.lineWidgets=null)}},b.prototype.$registerLineWidget=function(p){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var g=this.session.lineWidgets[p.row];return g&&(p.$oldWidget=g,g.el&&g.el.parentNode&&(g.el.parentNode.removeChild(g.el),g._inDocument=!1)),this.session.lineWidgets[p.row]=p,p},b.prototype.addLineWidget=function(p){if(this.$registerLineWidget(p),p.session=this.session,!this.editor)return p;var g=this.editor.renderer;p.html&&!p.el&&(p.el=d.createElement("div"),p.el.innerHTML=p.html),p.text&&!p.el&&(p.el=d.createElement("div"),p.el.textContent=p.text),p.el&&(d.addCssClass(p.el,"ace_lineWidgetContainer"),p.className&&d.addCssClass(p.el,p.className),p.el.style.position="absolute",p.el.style.zIndex="5",g.container.appendChild(p.el),p._inDocument=!0,p.coverGutter||(p.el.style.zIndex="3"),p.pixelHeight==null&&(p.pixelHeight=p.el.offsetHeight)),p.rowCount==null&&(p.rowCount=p.pixelHeight/g.layerConfig.lineHeight);var i=this.session.getFoldAt(p.row,0);if(p.$fold=i,i){var a=this.session.lineWidgets;p.row==i.end.row&&!a[i.start.row]?a[i.start.row]=p:p.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:p.row}}}),this.$updateRows(),this.renderWidgets(null,g),this.onWidgetChanged(p),p},b.prototype.removeLineWidget=function(p){if(p._inDocument=!1,p.session=null,p.el&&p.el.parentNode&&p.el.parentNode.removeChild(p.el),p.editor&&p.editor.destroy)try{p.editor.destroy()}catch{}if(this.session.lineWidgets){var g=this.session.lineWidgets[p.row];if(g==p)this.session.lineWidgets[p.row]=p.$oldWidget,p.$oldWidget&&this.onWidgetChanged(p.$oldWidget);else for(;g;){if(g.$oldWidget==p){g.$oldWidget=p.$oldWidget;break}g=g.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:p.row}}}),this.$updateRows()},b.prototype.getWidgetsAtRow=function(p){for(var g=this.session.lineWidgets,i=g&&g[p],a=[];i;)a.push(i),i=i.$oldWidget;return a},b.prototype.onWidgetChanged=function(p){this.session._changedWidgets.push(p),this.editor&&this.editor.renderer.updateFull()},b.prototype.measureWidgets=function(p,g){var i=this.session._changedWidgets,a=g.layerConfig;if(!(!i||!i.length)){for(var h=1/0,c=0;c<i.length;c++){var o=i[c];if(!(!o||!o.el)&&o.session==this.session){if(!o._inDocument){if(this.session.lineWidgets[o.row]!=o)continue;o._inDocument=!0,g.container.appendChild(o.el)}o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/a.characterWidth));var l=o.h/a.lineHeight;o.coverLine&&(l-=this.session.getRowLineCount(o.row),l<0&&(l=0)),o.rowCount!=l&&(o.rowCount=l,o.row<h&&(h=o.row))}}h!=1/0&&(this.session._emit("changeFold",{data:{start:{row:h}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},b.prototype.renderWidgets=function(p,g){var i=g.layerConfig,a=this.session.lineWidgets;if(a){for(var h=Math.min(this.firstRow,i.firstRow),c=Math.max(this.lastRow,i.lastRow,a.length);h>0&&!a[h];)h--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,g.$cursorLayer.config=i;for(var o=h;o<=c;o++){var l=a[o];if(!(!l||!l.el)){if(l.hidden){l.el.style.top=-100-(l.pixelHeight||0)+"px";continue}l._inDocument||(l._inDocument=!0,g.container.appendChild(l.el));var m=g.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;l.coverLine||(m+=i.lineHeight*this.session.getRowLineCount(l.row)),l.el.style.top=m-i.offset+"px";var w=l.coverGutter?0:g.gutterWidth;l.fixedWidth||(w-=g.scrollLeft),l.el.style.left=w+"px",l.fullWidth&&l.screenWidth&&(l.el.style.minWidth=i.width+2*i.padding+"px"),l.fixedWidth?l.el.style.right=g.scrollBar.getWidth()+"px":l.el.style.right=""}}}},b}();r.LineWidgets=f}),ace.define("ace/apply_delta",["require","exports","module"],function(n,r,u){r.applyDelta=function(d,f,b){var p=f.start.row,g=f.start.column,i=d[p]||"";switch(f.action){case"insert":var a=f.lines;if(a.length===1)d[p]=i.substring(0,g)+f.lines[0]+i.substring(g);else{var h=[p,1].concat(f.lines);d.splice.apply(d,h),d[p]=i.substring(0,g)+d[p],d[p+f.lines.length-1]+=i.substring(g)}break;case"remove":var c=f.end.column,o=f.end.row;p===o?d[p]=i.substring(0,g)+i.substring(c):d.splice(p,o-p+1,i.substring(0,g)+d[o].substring(c));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,r,u){var d=n("./lib/oop"),f=n("./lib/event_emitter").EventEmitter,b=function(){function i(a,h,c){this.$onChange=this.onChange.bind(this),this.attach(a),typeof h!="number"?this.setPosition(h.row,h.column):this.setPosition(h,c)}return i.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},i.prototype.getDocument=function(){return this.document},i.prototype.onChange=function(a){if(!(a.start.row==a.end.row&&a.start.row!=this.row)&&!(a.start.row>this.row)){var h=g(a,{row:this.row,column:this.column},this.$insertRight);this.setPosition(h.row,h.column,!0)}},i.prototype.setPosition=function(a,h,c){var o;if(c?o={row:a,column:h}:o=this.$clipPositionToDocument(a,h),!(this.row==o.row&&this.column==o.column)){var l={row:this.row,column:this.column};this.row=o.row,this.column=o.column,this._signal("change",{old:l,value:o})}},i.prototype.detach=function(){this.document.off("change",this.$onChange)},i.prototype.attach=function(a){this.document=a||this.document,this.document.on("change",this.$onChange)},i.prototype.$clipPositionToDocument=function(a,h){var c={};return a>=this.document.getLength()?(c.row=Math.max(0,this.document.getLength()-1),c.column=this.document.getLine(c.row).length):a<0?(c.row=0,c.column=0):(c.row=a,c.column=Math.min(this.document.getLine(c.row).length,Math.max(0,h))),h<0&&(c.column=0),c},i}();b.prototype.$insertRight=!1,d.implement(b.prototype,f);function p(i,a,h){var c=h?i.column<=a.column:i.column<a.column;return i.row<a.row||i.row==a.row&&c}function g(i,a,h){var c=i.action=="insert",o=(c?1:-1)*(i.end.row-i.start.row),l=(c?1:-1)*(i.end.column-i.start.column),m=i.start,w=c?m:i.end;return p(a,m,h)?{row:a.row,column:a.column}:p(w,a,!h)?{row:a.row+o,column:a.column+(a.row==w.row?l:0)}:{row:m.row,column:m.column}}r.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,r,u){var d=n("./lib/oop"),f=n("./apply_delta").applyDelta,b=n("./lib/event_emitter").EventEmitter,p=n("./range").Range,g=n("./anchor").Anchor,i=function(){function a(h){this.$lines=[""],h.length===0?this.$lines=[""]:Array.isArray(h)?this.insertMergedLines({row:0,column:0},h):this.insert({row:0,column:0},h)}return a.prototype.setValue=function(h){var c=this.getLength()-1;this.remove(new p(0,0,c,this.getLine(c).length)),this.insert({row:0,column:0},h||"")},a.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},a.prototype.createAnchor=function(h,c){return new g(this,h,c)},a.prototype.$detectNewLine=function(h){var c=h.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=c?c[1]:`
192
+ `,this._signal("changeNewLineMode")},a.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
193
+ `;case"unix":return`
194
+ `;default:return this.$autoNewLine||`
195
+ `}},a.prototype.setNewLineMode=function(h){this.$newLineMode!==h&&(this.$newLineMode=h,this._signal("changeNewLineMode"))},a.prototype.getNewLineMode=function(){return this.$newLineMode},a.prototype.isNewLine=function(h){return h==`\r
196
+ `||h=="\r"||h==`
197
+ `},a.prototype.getLine=function(h){return this.$lines[h]||""},a.prototype.getLines=function(h,c){return this.$lines.slice(h,c+1)},a.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},a.prototype.getLength=function(){return this.$lines.length},a.prototype.getTextRange=function(h){return this.getLinesForRange(h).join(this.getNewLineCharacter())},a.prototype.getLinesForRange=function(h){var c;if(h.start.row===h.end.row)c=[this.getLine(h.start.row).substring(h.start.column,h.end.column)];else{c=this.getLines(h.start.row,h.end.row),c[0]=(c[0]||"").substring(h.start.column);var o=c.length-1;h.end.row-h.start.row==o&&(c[o]=c[o].substring(0,h.end.column))}return c},a.prototype.insertLines=function(h,c){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(h,c)},a.prototype.removeLines=function(h,c){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(h,c)},a.prototype.insertNewLine=function(h){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(h,["",""])},a.prototype.insert=function(h,c){return this.getLength()<=1&&this.$detectNewLine(c),this.insertMergedLines(h,this.$split(c))},a.prototype.insertInLine=function(h,c){var o=this.clippedPos(h.row,h.column),l=this.pos(h.row,h.column+c.length);return this.applyDelta({start:o,end:l,action:"insert",lines:[c]},!0),this.clonePos(l)},a.prototype.clippedPos=function(h,c){var o=this.getLength();h===void 0?h=o:h<0?h=0:h>=o&&(h=o-1,c=void 0);var l=this.getLine(h);return c==null&&(c=l.length),c=Math.min(Math.max(c,0),l.length),{row:h,column:c}},a.prototype.clonePos=function(h){return{row:h.row,column:h.column}},a.prototype.pos=function(h,c){return{row:h,column:c}},a.prototype.$clipPosition=function(h){var c=this.getLength();return h.row>=c?(h.row=Math.max(0,c-1),h.column=this.getLine(c-1).length):(h.row=Math.max(0,h.row),h.column=Math.min(Math.max(h.column,0),this.getLine(h.row).length)),h},a.prototype.insertFullLines=function(h,c){h=Math.min(Math.max(h,0),this.getLength());var o=0;h<this.getLength()?(c=c.concat([""]),o=0):(c=[""].concat(c),h--,o=this.$lines[h].length),this.insertMergedLines({row:h,column:o},c)},a.prototype.insertMergedLines=function(h,c){var o=this.clippedPos(h.row,h.column),l={row:o.row+c.length-1,column:(c.length==1?o.column:0)+c[c.length-1].length};return this.applyDelta({start:o,end:l,action:"insert",lines:c}),this.clonePos(l)},a.prototype.remove=function(h){var c=this.clippedPos(h.start.row,h.start.column),o=this.clippedPos(h.end.row,h.end.column);return this.applyDelta({start:c,end:o,action:"remove",lines:this.getLinesForRange({start:c,end:o})}),this.clonePos(c)},a.prototype.removeInLine=function(h,c,o){var l=this.clippedPos(h,c),m=this.clippedPos(h,o);return this.applyDelta({start:l,end:m,action:"remove",lines:this.getLinesForRange({start:l,end:m})},!0),this.clonePos(l)},a.prototype.removeFullLines=function(h,c){h=Math.min(Math.max(0,h),this.getLength()-1),c=Math.min(Math.max(0,c),this.getLength()-1);var o=c==this.getLength()-1&&h>0,l=c<this.getLength()-1,m=o?h-1:h,w=o?this.getLine(m).length:0,k=l?c+1:c,R=l?0:this.getLine(k).length,T=new p(m,w,k,R),S=this.$lines.slice(h,c+1);return this.applyDelta({start:T.start,end:T.end,action:"remove",lines:this.getLinesForRange(T)}),S},a.prototype.removeNewLine=function(h){h<this.getLength()-1&&h>=0&&this.applyDelta({start:this.pos(h,this.getLine(h).length),end:this.pos(h+1,0),action:"remove",lines:["",""]})},a.prototype.replace=function(h,c){if(h instanceof p||(h=p.fromPoints(h.start,h.end)),c.length===0&&h.isEmpty())return h.start;if(c==this.getTextRange(h))return h.end;this.remove(h);var o;return c?o=this.insert(h.start,c):o=h.start,o},a.prototype.applyDeltas=function(h){for(var c=0;c<h.length;c++)this.applyDelta(h[c])},a.prototype.revertDeltas=function(h){for(var c=h.length-1;c>=0;c--)this.revertDelta(h[c])},a.prototype.applyDelta=function(h,c){var o=h.action=="insert";(o?h.lines.length<=1&&!h.lines[0]:!p.comparePoints(h.start,h.end))||(o&&h.lines.length>2e4?this.$splitAndapplyLargeDelta(h,2e4):(f(this.$lines,h,c),this._signal("change",h)))},a.prototype.$safeApplyDelta=function(h){var c=this.$lines.length;(h.action=="remove"&&h.start.row<c&&h.end.row<c||h.action=="insert"&&h.start.row<=c)&&this.applyDelta(h)},a.prototype.$splitAndapplyLargeDelta=function(h,c){for(var o=h.lines,l=o.length-c+1,m=h.start.row,w=h.start.column,k=0,R=0;k<l;k=R){R+=c-1;var T=o.slice(k,R);T.push(""),this.applyDelta({start:this.pos(m+k,w),end:this.pos(m+R,w=0),action:h.action,lines:T},!0)}h.lines=o.slice(k),h.start.row=m+k,h.start.column=w,this.applyDelta(h,!0)},a.prototype.revertDelta=function(h){this.$safeApplyDelta({start:this.clonePos(h.start),end:this.clonePos(h.end),action:h.action=="insert"?"remove":"insert",lines:h.lines.slice()})},a.prototype.indexToPosition=function(h,c){for(var o=this.$lines||this.getAllLines(),l=this.getNewLineCharacter().length,m=c||0,w=o.length;m<w;m++)if(h-=o[m].length+l,h<0)return{row:m,column:h+o[m].length+l};return{row:w-1,column:h+o[w-1].length+l}},a.prototype.positionToIndex=function(h,c){for(var o=this.$lines||this.getAllLines(),l=this.getNewLineCharacter().length,m=0,w=Math.min(h.row,o.length),k=c||0;k<w;++k)m+=o[k].length+l;return m+h.column},a.prototype.$split=function(h){return h.split(/\r\n|\r|\n/)},a}();i.prototype.$autoNewLine="",i.prototype.$newLineMode="auto",d.implement(i.prototype,b),r.Document=i}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,r,u){var d=n("./lib/oop"),f=n("./lib/event_emitter").EventEmitter,b=function(){function p(g,i){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=g;var a=this;this.$worker=function(){if(a.running){for(var h=new Date,c=a.currentLine,o=-1,l=a.doc,m=c;a.lines[c];)c++;var w=l.getLength(),k=0;for(a.running=!1;c<w;){a.$tokenizeRow(c),o=c;do c++;while(a.lines[c]);if(k++,k%5===0&&new Date-h>20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=c,o==-1&&(o=c),m<=o&&a.fireUpdateEvent(m,o)}}}return p.prototype.setTokenizer=function(g){this.tokenizer=g,this.lines=[],this.states=[],this.start(0)},p.prototype.setDocument=function(g){this.doc=g,this.lines=[],this.states=[],this.stop()},p.prototype.fireUpdateEvent=function(g,i){var a={first:g,last:i};this._signal("update",{data:a})},p.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)},p.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},p.prototype.$updateOnChange=function(g){var i=g.start.row,a=g.end.row-i;if(a===0)this.lines[i]=null;else if(g.action=="remove")this.lines.splice(i,a+1,null),this.states.splice(i,a+1,null);else{var h=Array(a+1);h.unshift(i,1),this.lines.splice.apply(this.lines,h),this.states.splice.apply(this.states,h)}this.currentLine=Math.min(i,this.currentLine,this.doc.getLength()),this.stop()},p.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},p.prototype.getTokens=function(g){return this.lines[g]||this.$tokenizeRow(g)},p.prototype.getState=function(g){return this.currentLine==g&&this.$tokenizeRow(g),this.states[g]||"start"},p.prototype.$tokenizeRow=function(g){var i=this.doc.getLine(g),a=this.states[g-1],h=this.tokenizer.getLineTokens(i,a,g);return this.states[g]+""!=h.state+""?(this.states[g]=h.state,this.lines[g+1]=null,this.currentLine>g+1&&(this.currentLine=g+1)):this.currentLine==g&&(this.currentLine=g+1),this.lines[g]=h.tokens},p.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},p}();d.implement(b.prototype,f),r.BackgroundTokenizer=b}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(n,r,u){var d=n("./lib/lang"),f=n("./range").Range,b=function(){function p(g,i,a){a===void 0&&(a="text"),this.setRegexp(g),this.clazz=i,this.type=a,this.docLen=0}return p.prototype.setRegexp=function(g){this.regExp+""!=g+""&&(this.regExp=g,this.cache=[])},p.prototype.update=function(g,i,a,h){if(this.regExp){for(var c=h.firstRow,o=h.lastRow,l={},m=a.$editor.$search,w=m.$isMultilineSearch(a.$editor.getLastSearchOptions()),k=c;k<=o;k++){var R=this.cache[k];if(R==null||a.getValue().length!=this.docLen){if(w){R=[];var T=m.$multiLineForward(a,this.regExp,k,o);if(T){var S=T.endRow<=o?T.endRow-1:o;S>k&&(k=S),R.push(new f(T.startRow,T.startCol,T.endRow,T.endCol))}R.length>this.MAX_RANGES&&(R=R.slice(0,this.MAX_RANGES))}else R=d.getMatchOffsets(a.getLine(k),this.regExp),R.length>this.MAX_RANGES&&(R=R.slice(0,this.MAX_RANGES)),R=R.map(function(F){return new f(k,F.offset,k,F.offset+F.length)});this.cache[k]=R.length?R:""}if(R.length!==0)for(var x=R.length;x--;){var M=R[x].toScreenRange(a),O=M.toString();l[O]||(l[O]=!0,i.drawSingleLineMarker(g,M,this.clazz,h))}}this.docLen=a.getValue().length}},p}();b.prototype.MAX_RANGES=500,r.SearchHighlight=b}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(n,r,u){var d=function(){function S(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return S.prototype.addSession=function(x){this.$session=x},S.prototype.add=function(x,M,O){if(!this.$fromUndo&&x!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),M===!1||!this.lastDeltas){this.lastDeltas=[];var F=this.$undoStack.length;F>this.$undoDepth-1&&this.$undoStack.splice(0,F-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),x.id=this.$rev=++this.$maxRev}(x.action=="remove"||x.action=="insert")&&(this.$lastDelta=x),this.lastDeltas.push(x)}},S.prototype.addSelection=function(x,M){this.selections.push({value:x,rev:M||this.$rev})},S.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},S.prototype.markIgnored=function(x,M){M==null&&(M=this.$rev+1);for(var O=this.$undoStack,F=O.length;F--;){var L=O[F][0];if(L.id<=x)break;L.id<M&&(L.ignore=!0)}this.lastDeltas=null},S.prototype.getSelection=function(x,M){for(var O=this.selections,F=O.length;F--;){var L=O[F];if(L.rev<x)return M&&(L=O[F+1]),L}},S.prototype.getRevision=function(){return this.$rev},S.prototype.getDeltas=function(x,M){M==null&&(M=this.$rev+1);for(var O=this.$undoStack,F=null,L=0,H=O.length;H--;){var P=O[H][0];if(P.id<M&&!F&&(F=H+1),P.id<=x){L=H+1;break}}return O.slice(L,F)},S.prototype.getChangedRanges=function(x,M){M==null&&(M=this.$rev+1)},S.prototype.getChangedLines=function(x,M){M==null&&(M=this.$rev+1)},S.prototype.undo=function(x,M){this.lastDeltas=null;var O=this.$undoStack;if(f(O,O.length)){x||(x=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var F=O.pop(),L=null;return F&&(L=x.undoChanges(F,M),this.$redoStack.push(F),this.$syncRev()),this.$fromUndo=!1,L}},S.prototype.redo=function(x,M){if(this.lastDeltas=null,x||(x=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var O=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);T(this.$redoStack,O),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(H){H[0].id=++this.$maxRev},this)}var F=this.$redoStack.pop(),L=null;return F&&(L=x.redoChanges(F,M),this.$undoStack.push(F),this.$syncRev()),this.$fromUndo=!1,L},S.prototype.$syncRev=function(){var x=this.$undoStack,M=x[x.length-1],O=M&&M[0].id||0;this.$redoStackBaseRev=O,this.$rev=O},S.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=[]},S.prototype.canUndo=function(){return this.$undoStack.length>0},S.prototype.canRedo=function(){return this.$redoStack.length>0},S.prototype.bookmark=function(x){x==null&&(x=this.$rev),this.mark=x},S.prototype.isAtBookmark=function(){return this.$rev===this.mark},S.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},S.prototype.fromJSON=function(x){this.reset(),this.$undoStack=x.$undoStack,this.$redoStack=x.$redoStack},S.prototype.$prettyPrint=function(x){return x?a(x):a(this.$undoStack)+`
198
+ ---
199
+ `+a(this.$redoStack)},S}();d.prototype.hasUndo=d.prototype.canUndo,d.prototype.hasRedo=d.prototype.canRedo,d.prototype.isClean=d.prototype.isAtBookmark,d.prototype.markClean=d.prototype.bookmark;function f(S,x){for(var M=x;M--;){var O=S[M];if(O&&!O[0].ignore){for(;M<x-1;){var F=o(S[M],S[M+1]);S[M]=F[0],S[M+1]=F[1],M++}return!0}}}var b=n("./range").Range,p=b.comparePoints;b.comparePoints;function g(S){return{row:S.row,column:S.column}}function i(S){return{start:g(S.start),end:g(S.end),action:S.action,lines:S.lines.slice()}}function a(S){if(S=S||this,Array.isArray(S))return S.map(a).join(`
200
+ `);var x="";return S.action?(x=S.action=="insert"?"+":"-",x+="["+S.lines+"]"):S.value&&(Array.isArray(S.value)?x=S.value.map(h).join(`
201
+ `):x=h(S.value)),S.start&&(x+=h(S)),(S.id||S.rev)&&(x+=" ("+(S.id||S.rev)+")"),x}function h(S){return S.start.row+":"+S.start.column+"=>"+S.end.row+":"+S.end.column}function c(S,x){var M=S.action=="insert",O=x.action=="insert";if(M&&O)if(p(x.start,S.end)>=0)m(x,S,-1);else if(p(x.start,S.start)<=0)m(S,x,1);else return null;else if(M&&!O)if(p(x.start,S.end)>=0)m(x,S,-1);else if(p(x.end,S.start)<=0)m(S,x,-1);else return null;else if(!M&&O)if(p(x.start,S.start)>=0)m(x,S,1);else if(p(x.start,S.start)<=0)m(S,x,1);else return null;else if(!M&&!O)if(p(x.start,S.start)>=0)m(x,S,1);else if(p(x.end,S.start)<=0)m(S,x,-1);else return null;return[x,S]}function o(S,x){for(var M=S.length;M--;)for(var O=0;O<x.length;O++)if(!c(S[M],x[O])){for(;M<S.length;){for(;O--;)c(x[O],S[M]);O=x.length,M++}return[S,x]}return S.selectionBefore=x.selectionBefore=S.selectionAfter=x.selectionAfter=null,[x,S]}function l(S,x){var M=S.action=="insert",O=x.action=="insert";if(M&&O)p(S.start,x.start)<0?m(x,S,1):m(S,x,1);else if(M&&!O)p(S.start,x.end)>=0?m(S,x,-1):(p(S.start,x.start)<=0||m(S,b.fromPoints(x.start,S.start),-1),m(x,S,1));else if(!M&&O)p(x.start,S.end)>=0?m(x,S,-1):(p(x.start,S.start)<=0||m(x,b.fromPoints(S.start,x.start),-1),m(S,x,1));else if(!M&&!O)if(p(x.start,S.end)>=0)m(x,S,-1);else if(p(x.end,S.start)<=0)m(S,x,-1);else{var F,L;return p(S.start,x.start)<0&&(F=S,S=k(S,x.start)),p(S.end,x.end)>0&&(L=k(S,x.end)),w(x.end,S.start,S.end,-1),L&&!F&&(S.lines=L.lines,S.start=L.start,S.end=L.end,L=S),[x,F,L].filter(Boolean)}return[x,S]}function m(S,x,M){w(S.start,x.start,x.end,M),w(S.end,x.start,x.end,M)}function w(S,x,M,O){S.row==(O==1?x:M).row&&(S.column+=O*(M.column-x.column)),S.row+=O*(M.row-x.row)}function k(S,x){var M=S.lines,O=S.end;S.end=g(x);var F=S.end.row-S.start.row,L=M.splice(F,M.length),H=F?x.column:x.column-S.start.column;M.push(L[0].substring(0,H)),L[0]=L[0].substr(H);var P={start:g(x),end:O,lines:L,action:S.action};return P}function R(S,x){x=i(x);for(var M=S.length;M--;){for(var O=S[M],F=0;F<O.length;F++){var L=O[F],H=l(L,x);x=H[0],H.length!=2&&(H[2]?(O.splice(F+1,1,H[1],H[2]),F++):H[1]||(O.splice(F,1),F--))}O.length||S.splice(M,1)}return S}function T(S,x){for(var M=0;M<x.length;M++)for(var O=x[M],F=0;F<O.length;F++)R(S,O[F])}r.UndoManager=d}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(n,r,u){var d=n("../range").Range,f=function(){function b(p,g){this.foldData=p,Array.isArray(g)?this.folds=g:g=this.folds=[g];var i=g[g.length-1];this.range=new d(g[0].start.row,g[0].start.column,i.end.row,i.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(a){a.setFoldLine(this)},this)}return b.prototype.shiftRow=function(p){this.start.row+=p,this.end.row+=p,this.folds.forEach(function(g){g.start.row+=p,g.end.row+=p})},b.prototype.addFold=function(p){if(p.sameRow){if(p.start.row<this.startRow||p.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(p),this.folds.sort(function(g,i){return-g.range.compareEnd(i.start.row,i.start.column)}),this.range.compareEnd(p.start.row,p.start.column)>0?(this.end.row=p.end.row,this.end.column=p.end.column):this.range.compareStart(p.end.row,p.end.column)<0&&(this.start.row=p.start.row,this.start.column=p.start.column)}else if(p.start.row==this.end.row)this.folds.push(p),this.end.row=p.end.row,this.end.column=p.end.column;else if(p.end.row==this.start.row)this.folds.unshift(p),this.start.row=p.start.row,this.start.column=p.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");p.foldLine=this},b.prototype.containsRow=function(p){return p>=this.start.row&&p<=this.end.row},b.prototype.walk=function(p,g,i){var a=0,h=this.folds,c,o,l,m=!0;g==null&&(g=this.end.row,i=this.end.column);for(var w=0;w<h.length;w++){if(c=h[w],o=c.range.compareStart(g,i),o==-1){p(null,g,i,a,m);return}if(l=p(null,c.start.row,c.start.column,a,m),l=!l&&p(c.placeholder,c.start.row,c.start.column,a),l||o===0)return;m=!c.sameRow,a=c.end.column}p(null,g,i,a,m)},b.prototype.getNextFoldTo=function(p,g){for(var i,a,h=0;h<this.folds.length;h++){if(i=this.folds[h],a=i.range.compareEnd(p,g),a==-1)return{fold:i,kind:"after"};if(a===0)return{fold:i,kind:"inside"}}return null},b.prototype.addRemoveChars=function(p,g,i){var a=this.getNextFoldTo(p,g),h,c;if(a){if(h=a.fold,a.kind=="inside"&&h.start.column!=g&&h.start.row!=p)window.console&&window.console.log(p,g,h);else if(h.start.row==p){c=this.folds;var o=c.indexOf(h);for(o===0&&(this.start.column+=i),o;o<c.length;o++){if(h=c[o],h.start.column+=i,!h.sameRow)return;h.end.column+=i}this.end.column+=i}}},b.prototype.split=function(p,g){var i=this.getNextFoldTo(p,g);if(!i||i.kind=="inside")return null;var a=i.fold,h=this.folds,c=this.foldData,o=h.indexOf(a),l=h[o-1];this.end.row=l.end.row,this.end.column=l.end.column,h=h.splice(o,h.length-o);var m=new b(c,h);return c.splice(c.indexOf(this)+1,0,m),m},b.prototype.merge=function(p){for(var g=p.folds,i=0;i<g.length;i++)this.addFold(g[i]);var a=this.foldData;a.splice(a.indexOf(p),1)},b.prototype.toString=function(){var p=[this.range.toString()+": ["];return this.folds.forEach(function(g){p.push(" "+g.toString())}),p.push("]"),p.join(`
202
+ `)},b.prototype.idxToPosition=function(p){for(var g=0,i=0;i<this.folds.length;i++){var a=this.folds[i];if(p-=a.start.column-g,p<0)return{row:a.start.row,column:a.start.column+p};if(p-=a.placeholder.length,p<0)return a.start;g=a.end.column}return{row:this.end.row,column:this.end.column+p}},b}();r.FoldLine=f}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(n,r,u){var d=n("./range").Range,f=d.comparePoints,b=function(){function p(){this.ranges=[],this.$bias=1}return p.prototype.pointIndex=function(g,i,a){for(var h=this.ranges,c=a||0;c<h.length;c++){var o=h[c],l=f(g,o.end);if(!(l>0)){var m=f(g,o.start);return l===0?i&&m!==0?-c-2:c:m>0||m===0&&!i?c:-c-1}}return-c-1},p.prototype.add=function(g){var i=!g.isEmpty(),a=this.pointIndex(g.start,i);a<0&&(a=-a-1);var h=this.pointIndex(g.end,i,a);return h<0?h=-h-1:h++,this.ranges.splice(a,h-a,g)},p.prototype.addList=function(g){for(var i=[],a=g.length;a--;)i.push.apply(i,this.add(g[a]));return i},p.prototype.substractPoint=function(g){var i=this.pointIndex(g);if(i>=0)return this.ranges.splice(i,1)},p.prototype.merge=function(){var g=[],i=this.ranges;i=i.sort(function(l,m){return f(l.start,m.start)});for(var a=i[0],h,c=1;c<i.length;c++){h=a,a=i[c];var o=f(h.end,a.start);o<0||o==0&&!h.isEmpty()&&!a.isEmpty()||(f(h.end,a.end)<0&&(h.end.row=a.end.row,h.end.column=a.end.column),i.splice(c,1),g.push(a),a=h,c--)}return this.ranges=i,g},p.prototype.contains=function(g,i){return this.pointIndex({row:g,column:i})>=0},p.prototype.containsPoint=function(g){return this.pointIndex(g)>=0},p.prototype.rangeAtPoint=function(g){var i=this.pointIndex(g);if(i>=0)return this.ranges[i]},p.prototype.clipRows=function(g,i){var a=this.ranges;if(a[0].start.row>i||a[a.length-1].start.row<g)return[];var h=this.pointIndex({row:g,column:0});h<0&&(h=-h-1);var c=this.pointIndex({row:i,column:0},h);c<0&&(c=-c-1);for(var o=[],l=h;l<c;l++)o.push(a[l]);return o},p.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},p.prototype.attach=function(g){this.session&&this.detach(),this.session=g,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},p.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},p.prototype.$onChange=function(g){for(var i=g.start,a=g.end,h=i.row,c=a.row,o=this.ranges,l=0,m=o.length;l<m;l++){var w=o[l];if(w.end.row>=h)break}if(g.action=="insert")for(var k=c-h,R=-i.column+a.column;l<m;l++){var w=o[l];if(w.start.row>h)break;if(w.start.row==h&&w.start.column>=i.column&&(w.start.column==i.column&&this.$bias<=0||(w.start.column+=R,w.start.row+=k)),w.end.row==h&&w.end.column>=i.column){if(w.end.column==i.column&&this.$bias<0)continue;w.end.column==i.column&&R>0&&l<m-1&&w.end.column>w.start.column&&w.end.column==o[l+1].start.column&&(w.end.column-=R),w.end.column+=R,w.end.row+=k}}else for(var k=h-c,R=i.column-a.column;l<m;l++){var w=o[l];if(w.start.row>c)break;w.end.row<c&&(h<w.end.row||h==w.end.row&&i.column<w.end.column)?(w.end.row=h,w.end.column=i.column):w.end.row==c?w.end.column<=a.column?(k||w.end.column>i.column)&&(w.end.column=i.column,w.end.row=i.row):(w.end.column+=R,w.end.row+=k):w.end.row>c&&(w.end.row+=k),w.start.row<c&&(h<w.start.row||h==w.start.row&&i.column<w.start.column)?(w.start.row=h,w.start.column=i.column):w.start.row==c?w.start.column<=a.column?(k||w.start.column>i.column)&&(w.start.column=i.column,w.start.row=i.row):(w.start.column+=R,w.start.row+=k):w.start.row>c&&(w.start.row+=k)}if(k!=0&&l<m)for(;l<m;l++){var w=o[l];w.start.row+=k,w.end.row+=k}},p}();b.prototype.comparePoints=f,r.RangeList=b}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(n,r,u){var d=this&&this.__extends||function(){var h=function(c,o){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,m){l.__proto__=m}||function(l,m){for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(l[w]=m[w])},h(c,o)};return function(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");h(c,o);function l(){this.constructor=c}c.prototype=o===null?Object.create(o):(l.prototype=o.prototype,new l)}}(),f=n("../range_list").RangeList,b=function(h){d(c,h);function c(o,l){var m=h.call(this)||this;return m.foldLine=null,m.placeholder=l,m.range=o,m.start=o.start,m.end=o.end,m.sameRow=o.start.row==o.end.row,m.subFolds=m.ranges=[],m}return c.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},c.prototype.setFoldLine=function(o){this.foldLine=o,this.subFolds.forEach(function(l){l.setFoldLine(o)})},c.prototype.clone=function(){var o=this.range.clone(),l=new c(o,this.placeholder);return this.subFolds.forEach(function(m){l.subFolds.push(m.clone())}),l.collapseChildren=this.collapseChildren,l},c.prototype.addSubFold=function(o){if(!this.range.isEqual(o)){g(o,this.start);for(var l=o.start.row,m=o.start.column,w=0,k=-1;w<this.subFolds.length&&(k=this.subFolds[w].range.compare(l,m),k==1);w++);var R=this.subFolds[w],T=0;if(k==0){if(R.range.containsRange(o))return R.addSubFold(o);T=1}for(var l=o.range.end.row,m=o.range.end.column,S=w,k=-1;S<this.subFolds.length&&(k=this.subFolds[S].range.compare(l,m),k==1);S++);k==0&&S++;for(var x=this.subFolds.splice(w,S-w,o),M=k==0?x.length-1:x.length,O=T;O<M;O++)o.addSubFold(x[O]);return o.setFoldLine(this.foldLine),o}},c.prototype.restoreRange=function(o){return a(o,this.start)},c}(f);function p(h,c){h.row-=c.row,h.row==0&&(h.column-=c.column)}function g(h,c){p(h.start,c),p(h.end,c)}function i(h,c){h.row==0&&(h.column+=c.column),h.row+=c.row}function a(h,c){i(h.start,c),i(h.end,c)}r.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,r,u){var d=n("../range").Range,f=n("./fold_line").FoldLine,b=n("./fold").Fold,p=n("../token_iterator").TokenIterator,g=n("../mouse/mouse_event").MouseEvent;function i(){this.getFoldAt=function(a,h,c){var o=this.getFoldLine(a);if(!o)return null;for(var l=o.folds,m=0;m<l.length;m++){var w=l[m].range;if(w.contains(a,h)){if(c==1&&w.isEnd(a,h)&&!w.isEmpty()||c==-1&&w.isStart(a,h)&&!w.isEmpty())continue;return l[m]}}},this.getFoldsInRange=function(a){var h=a.start,c=a.end,o=this.$foldData,l=[];h.column+=1,c.column-=1;for(var m=0;m<o.length;m++){var w=o[m].range.compareRange(a);if(w!=2){if(w==-2)break;for(var k=o[m].folds,R=0;R<k.length;R++){var T=k[R];if(w=T.range.compareRange(a),w==-2)break;if(w!=2){if(w==42)break;l.push(T)}}}}return h.column-=1,c.column+=1,l},this.getFoldsInRangeList=function(a){if(Array.isArray(a)){var h=[];a.forEach(function(o){h=h.concat(this.getFoldsInRange(o))},this)}else var h=this.getFoldsInRange(a);return h},this.getAllFolds=function(){for(var a=[],h=this.$foldData,c=0;c<h.length;c++)for(var o=0;o<h[c].folds.length;o++)a.push(h[c].folds[o]);return a},this.getFoldStringAt=function(a,h,c,o){if(o=o||this.getFoldLine(a),!o)return null;for(var l={end:{column:0}},m,w,k=0;k<o.folds.length;k++){w=o.folds[k];var R=w.range.compareEnd(a,h);if(R==-1){m=this.getLine(w.start.row).substring(l.end.column,w.start.column);break}else if(R===0)return null;l=w}return m||(m=this.getLine(w.start.row).substring(l.end.column)),c==-1?m.substring(0,h-l.end.column):c==1?m.substring(h-l.end.column):m},this.getFoldLine=function(a,h){var c=this.$foldData,o=0;for(h&&(o=c.indexOf(h)),o==-1&&(o=0),o;o<c.length;o++){var l=c[o];if(l.start.row<=a&&l.end.row>=a)return l;if(l.end.row>a)return null}return null},this.getNextFoldLine=function(a,h){var c=this.$foldData,o=0;for(h&&(o=c.indexOf(h)),o==-1&&(o=0),o;o<c.length;o++){var l=c[o];if(l.end.row>=a)return l}return null},this.getFoldedRowCount=function(a,h){for(var c=this.$foldData,o=h-a+1,l=0;l<c.length;l++){var m=c[l],w=m.end.row,k=m.start.row;if(w>=h){k<h&&(k>=a?o-=h-k:o=0);break}else w>=a&&(k>=a?o-=w-k:o-=w-a+1)}return o},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(h,c){return h.start.row-c.start.row}),a},this.addFold=function(a,h){var c=this.$foldData,o=!1,l;a instanceof b?l=a:(l=new b(h,a),l.collapseChildren=h.collapseChildren),this.$clipRangeToDocument(l.range);var m=l.start.row,w=l.start.column,k=l.end.row,R=l.end.column,T=this.getFoldAt(m,w,1),S=this.getFoldAt(k,R,-1);if(T&&S==T)return T.addSubFold(l);T&&!T.range.isStart(m,w)&&this.removeFold(T),S&&!S.range.isEnd(k,R)&&this.removeFold(S);var x=this.getFoldsInRange(l.range);x.length>0&&(this.removeFolds(x),l.collapseChildren||x.forEach(function(L){l.addSubFold(L)}));for(var M=0;M<c.length;M++){var O=c[M];if(k==O.start.row){O.addFold(l),o=!0;break}else if(m==O.end.row){if(O.addFold(l),o=!0,!l.sameRow){var F=c[M+1];if(F&&F.start.row==k){O.merge(F);break}}break}else if(k<=O.start.row)break}return o||(O=this.$addFoldLine(new f(this.$foldData,l))),this.$useWrapMode?this.$updateWrapData(O.start.row,O.start.row):this.$updateRowLengthCache(O.start.row,O.start.row),this.$modified=!0,this._signal("changeFold",{data:l,action:"add"}),l},this.addFolds=function(a){a.forEach(function(h){this.addFold(h)},this)},this.removeFold=function(a){var h=a.foldLine,c=h.start.row,o=h.end.row,l=this.$foldData,m=h.folds;if(m.length==1)l.splice(l.indexOf(h),1);else if(h.range.isEnd(a.end.row,a.end.column))m.pop(),h.end.row=m[m.length-1].end.row,h.end.column=m[m.length-1].end.column;else if(h.range.isStart(a.start.row,a.start.column))m.shift(),h.start.row=m[0].start.row,h.start.column=m[0].start.column;else if(a.sameRow)m.splice(m.indexOf(a),1);else{var w=h.split(a.start.row,a.start.column);m=w.folds,m.shift(),w.start.row=m[0].start.row,w.start.column=m[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(c,o):this.$updateRowLengthCache(c,o)),this.$modified=!0,this._signal("changeFold",{data:a,action:"remove"})},this.removeFolds=function(a){for(var h=[],c=0;c<a.length;c++)h.push(a[c]);h.forEach(function(o){this.removeFold(o)},this),this.$modified=!0},this.expandFold=function(a){this.removeFold(a),a.subFolds.forEach(function(h){a.restoreRange(h),this.addFold(h)},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(h){this.expandFold(h)},this)},this.unfold=function(a,h){var c,o;if(a==null)c=new d(0,0,this.getLength(),0),h==null&&(h=!0);else if(typeof a=="number")c=new d(a,0,a,this.getLine(a).length);else if("row"in a)c=d.fromPoints(a,a);else{if(Array.isArray(a))return o=[],a.forEach(function(m){o=o.concat(this.unfold(m))},this),o;c=a}o=this.getFoldsInRangeList(c);for(var l=o;o.length==1&&d.comparePoints(o[0].start,c.start)<0&&d.comparePoints(o[0].end,c.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(c);if(h!=!1?this.removeFolds(o):this.expandFolds(o),l.length)return l},this.isRowFolded=function(a,h){return!!this.getFoldLine(a,h)},this.getRowFoldEnd=function(a,h){var c=this.getFoldLine(a,h);return c?c.end.row:a},this.getRowFoldStart=function(a,h){var c=this.getFoldLine(a,h);return c?c.start.row:a},this.getFoldDisplayLine=function(a,h,c,o,l){o==null&&(o=a.start.row),l==null&&(l=0),h==null&&(h=a.end.row),c==null&&(c=this.getLine(h).length);var m=this.doc,w="";return a.walk(function(k,R,T,S){if(!(R<o)){if(R==o){if(T<l)return;S=Math.max(l,S)}k!=null?w+=k:w+=m.getLine(R).substring(S,T)}},h,c),w},this.getDisplayLine=function(a,h,c,o){var l=this.getFoldLine(a);if(l)return this.getFoldDisplayLine(l,a,h,c,o);var m;return m=this.doc.getLine(a),m.substring(o||0,h||m.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(h){var c=h.folds.map(function(o){return o.clone()});return new f(a,c)}),a},this.toggleFold=function(a){var h=this.selection,c=h.getRange(),o,l;if(c.isEmpty()){var m=c.start;if(o=this.getFoldAt(m.row,m.column),o){this.expandFold(o);return}else if(a){var w=this.getFoldLine(m.row);w&&this.expandFolds(w.folds);return}else(l=this.findMatchingBracket(m))?c.comparePoint(l)==1?c.end=l:(c.start=l,c.start.column++,c.end.column--):(l=this.findMatchingBracket({row:m.row,column:m.column+1}))?(c.comparePoint(l)==1?c.end=l:c.start=l,c.start.column++):c=this.getCommentFoldRange(m.row,m.column)||c}else{var k=this.getFoldsInRange(c);if(a&&k.length){this.expandFolds(k);return}else k.length==1&&(o=k[0])}if(o||(o=this.getFoldAt(c.start.row,c.start.column)),o&&o.range.toString()==c.toString()){this.expandFold(o);return}var R="...";if(!c.isMultiLine()){if(R=this.getTextRange(c),R.length<4)return;R=R.trim().substring(0,2)+".."}this.addFold(R,c)},this.getCommentFoldRange=function(a,h,c){var o=new p(this,a,h),l=o.getCurrentToken(),m=l&&l.type;if(l&&/^comment|string/.test(m)){m=m.match(/comment|string/)[0],m=="comment"&&(m+="|doc-start|\\.doc");var w=new RegExp(m),k=new d;if(c!=1){do l=o.stepBackward();while(l&&w.test(l.type));l=o.stepForward()}k.start.row=o.getCurrentTokenRow(),k.start.column=o.getCurrentTokenColumn()+l.value.length,o=new p(this,a,h);var R=this.getState(o.$row);if(c!=-1){var T=-1;do if(l=o.stepForward(),T==-1){var S=this.getState(o.$row);R.toString()!==S.toString()&&(T=o.$row)}else if(o.$row>T)break;while(l&&w.test(l.type));l=o.stepBackward()}else l=o.getCurrentToken();return k.end.row=o.getCurrentTokenRow(),k.end.column=o.getCurrentTokenColumn(),k.start.row==k.end.row&&k.start.column>k.end.column?void 0:k}},this.foldAll=function(a,h,c,o){c==null&&(c=1e5);var l=this.foldWidgets;if(l){h=h||this.getLength(),a=a||0;for(var m=a;m<h;m++)if(l[m]==null&&(l[m]=this.getFoldWidget(m)),l[m]=="start"&&!(o&&!o(m))){var w=this.getFoldWidgetRange(m);w&&w.isMultiLine()&&w.end.row<=h&&w.start.row>=a&&(m=w.end.row,w.collapseChildren=c,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(h){for(var c=a.getTokens(h),o=0;o<c.length;o++){var l=c[o];if(!(l.type=="text"&&/^\s+$/.test(l.value)))return!!/comment/.test(l.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 h=this.$foldMode;this.$setFolding(null),this.$setFolding(h)}},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,h){var c=this.foldWidgets;if(!c||h&&c[a])return{};for(var o=a-1,l;o>=0;){var m=c[o];if(m==null&&(m=c[o]=this.getFoldWidget(o)),m=="start"){var w=this.getFoldWidgetRange(o);if(l||(l=w),w&&w.end.row>=a)break}o--}return{range:o!==-1&&w,firstRange:l}},this.onFoldWidgetClick=function(a,h){h instanceof g&&(h=h.domEvent);var c={children:h.shiftKey,all:h.ctrlKey||h.metaKey,siblings:h.altKey},o=this.$toggleFoldWidget(a,c);if(!o){var l=h.target||h.srcElement;l&&/ace_fold-widget/.test(l.className)&&(l.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,h){if(this.getFoldWidget){var c=this.getFoldWidget(a),o=this.getLine(a),l=c==="end"?-1:1,m=this.getFoldAt(a,l===-1?0:o.length,l);if(m)return h.children||h.all?this.removeFold(m):this.expandFold(m),m;var w=this.getFoldWidgetRange(a,!0);if(w&&!w.isMultiLine()&&(m=this.getFoldAt(w.start.row,w.start.column,1),m&&w.isEqual(m.range)))return this.removeFold(m),m;if(h.siblings){var k=this.getParentFoldRangeData(a);if(k.range)var R=k.range.start.row+1,T=k.range.end.row;this.foldAll(R,T,h.all?1e4:0)}else h.children?(T=w?w.end.row:this.getLength(),this.foldAll(a+1,T,h.all?1e4:0)):w&&(h.all&&(w.collapseChildren=1e4),this.addFold("...",w));return w}},this.toggleFoldWidget=function(a){var h=this.selection.getCursor().row;h=this.getRowFoldStart(h);var c=this.$toggleFoldWidget(h,{});if(!c){var o=this.getParentFoldRangeData(h,!0);if(c=o.range||o.firstRange,c){h=c.start.row;var l=this.getFoldAt(h,this.getLine(h).length,1);l?this.removeFold(l):this.addFold("...",c)}}},this.updateFoldWidgets=function(a){var h=a.start.row,c=a.end.row-h;if(c===0)this.foldWidgets[h]=null;else if(a.action=="remove")this.foldWidgets.splice(h,c+1,null);else{var o=Array(c+1);o.unshift(h,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},this.tokenizerUpdateFoldWidgets=function(a){var h=a.data;h.first!=h.last&&this.foldWidgets.length>h.first&&this.foldWidgets.splice(h.first,this.foldWidgets.length)}}r.Folding=i}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(n,r,u){var d=n("../token_iterator").TokenIterator,f=n("../range").Range;function b(){this.findMatchingBracket=function(p,g){if(p.column==0)return null;var i=g||this.getLine(p.row).charAt(p.column-1);if(i=="")return null;var a=i.match(/([\(\[\{])|([\)\]\}])/);return a?a[1]?this.$findClosingBracket(a[1],p):this.$findOpeningBracket(a[2],p):null},this.getBracketRange=function(p){var g=this.getLine(p.row),i=!0,a,h=g.charAt(p.column-1),c=h&&h.match(/([\(\[\{])|([\)\]\}])/);if(c||(h=g.charAt(p.column),p={row:p.row,column:p.column+1},c=h&&h.match(/([\(\[\{])|([\)\]\}])/),i=!1),!c)return null;if(c[1]){var o=this.$findClosingBracket(c[1],p);if(!o)return null;a=f.fromPoints(p,o),i||(a.end.column++,a.start.column--),a.cursor=a.end}else{var o=this.$findOpeningBracket(c[2],p);if(!o)return null;a=f.fromPoints(o,p),i||(a.start.column++,a.end.column--),a.cursor=a.start}return a},this.getMatchingBracketRanges=function(p,g){var i=this.getLine(p.row),a=/([\(\[\{])|([\)\]\}])/,h=!g&&i.charAt(p.column-1),c=h&&h.match(a);if(c||(h=(g===void 0||g)&&i.charAt(p.column),p={row:p.row,column:p.column+1},c=h&&h.match(a)),!c)return null;var o=new f(p.row,p.column-1,p.row,p.column),l=c[1]?this.$findClosingBracket(c[1],p):this.$findOpeningBracket(c[2],p);if(!l)return[o];var m=new f(l.row,l.column,l.row,l.column+1);return[o,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(p,g,i){var a=this.$brackets[p],h=1,c=new d(this,g.row,g.column),o=c.getCurrentToken();if(o||(o=c.stepForward()),!!o){i||(i=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var l=g.column-c.getCurrentTokenColumn()-2,m=o.value;;){for(;l>=0;){var w=m.charAt(l);if(w==a){if(h-=1,h==0)return{row:c.getCurrentTokenRow(),column:l+c.getCurrentTokenColumn()}}else w==p&&(h+=1);l-=1}do o=c.stepBackward();while(o&&!i.test(o.type));if(o==null)break;m=o.value,l=m.length-1}return null}},this.$findClosingBracket=function(p,g,i){var a=this.$brackets[p],h=1,c=new d(this,g.row,g.column),o=c.getCurrentToken();if(o||(o=c.stepForward()),!!o){i||(i=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var l=g.column-c.getCurrentTokenColumn();;){for(var m=o.value,w=m.length;l<w;){var k=m.charAt(l);if(k==a){if(h-=1,h==0)return{row:c.getCurrentTokenRow(),column:l+c.getCurrentTokenColumn()}}else k==p&&(h+=1);l+=1}do o=c.stepForward();while(o&&!i.test(o.type));if(o==null)break;l=0}return null}},this.getMatchingTags=function(p){var g=new d(this,p.row,p.column),i=this.$findTagName(g);if(i){var a=g.stepBackward();return a.value==="<"?this.$findClosingTag(g,i):this.$findOpeningTag(g,i)}},this.$findTagName=function(p){var g=p.getCurrentToken(),i=!1,a=!1;if(g&&g.type.indexOf("tag-name")===-1)do a?g=p.stepBackward():g=p.stepForward(),g&&(g.value==="/>"?a=!0:g.type.indexOf("tag-name")!==-1&&(i=!0));while(g&&!i);return g},this.$findClosingTag=function(p,g){var i,a=g.value,h=g.value,c=0,o=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);g=p.stepForward();var l=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+g.value.length),m=!1;do{if(i=g,i.type.indexOf("tag-close")!==-1&&!m){var w=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);m=!0}if(g=p.stepForward(),g){if(g.value===">"&&!m){var w=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);m=!0}if(g.type.indexOf("tag-name")!==-1){if(a=g.value,h===a){if(i.value==="<")c++;else if(i.value==="</"&&(c--,c<0)){p.stepBackward();var k=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+2);g=p.stepForward();var R=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+g.value.length);if(g.type.indexOf("tag-close")===-1&&(g=p.stepForward()),g&&g.value===">")var T=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);else return}}}else if(h===a&&g.value==="/>"&&(c--,c<0))var k=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+2),R=k,T=R,w=new f(l.end.row,l.end.column,l.end.row,l.end.column+1)}}while(g&&c>=0);if(o&&w&&k&&T&&l&&R)return{openTag:new f(o.start.row,o.start.column,w.end.row,w.end.column),closeTag:new f(k.start.row,k.start.column,T.end.row,T.end.column),openTagName:l,closeTagName:R}},this.$findOpeningTag=function(p,g){var i=p.getCurrentToken(),a=g.value,h=0,c=p.getCurrentTokenRow(),o=p.getCurrentTokenColumn(),l=o+2,m=new f(c,o,c,l);p.stepForward();var w=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+g.value.length);if(g.type.indexOf("tag-close")===-1&&(g=p.stepForward()),!(!g||g.value!==">")){var k=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);p.stepBackward(),p.stepBackward();do if(g=i,c=p.getCurrentTokenRow(),o=p.getCurrentTokenColumn(),l=o+g.value.length,i=p.stepBackward(),g){if(g.type.indexOf("tag-name")!==-1){if(a===g.value)if(i.value==="<"){if(h++,h>0){var R=new f(c,o,c,l),T=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);do g=p.stepForward();while(g&&g.value!==">");var S=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1)}}else i.value==="</"&&h--}else if(g.value==="/>"){for(var x=0,M=i;M;){if(M.type.indexOf("tag-name")!==-1&&M.value===a){h--;break}else if(M.value==="<")break;M=p.stepBackward(),x++}for(var O=0;O<x;O++)p.stepForward()}}while(i&&h<=0);if(T&&S&&m&&k&&R&&w)return{openTag:new f(T.start.row,T.start.column,S.end.row,S.end.column),closeTag:new f(m.start.row,m.start.column,k.end.row,k.end.column),openTagName:R,closeTagName:w}}}}r.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,r,u){var d=n("./lib/oop"),f=n("./lib/lang"),b=n("./bidihandler").BidiHandler,p=n("./config"),g=n("./lib/event_emitter").EventEmitter,i=n("./selection").Selection,a=n("./mode/text").Mode,h=n("./range").Range,c=n("./line_widgets").LineWidgets,o=n("./document").Document,l=n("./background_tokenizer").BackgroundTokenizer,m=n("./search_highlight").SearchHighlight,w=n("./undomanager").UndoManager,k=function(){function P(I,$){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++P.$uid,this.$foldData.toString=function(){return this.join(`
203
+ `)},this.$gutterCustomWidgets={},this.bgTokenizer=new l(new a().getTokenizer(),this);var C=this;this.bgTokenizer.on("update",function(N){C._signal("tokenizerUpdate",N)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof I!="object"||!I.getLine)&&(I=new o(I)),this.setDocument(I),this.selection=new i(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new b(this),p.resetOptions(this),this.setMode($),p._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return P.prototype.$initOperationListeners=function(){var I=this;this.curOp=null,this.on("change",function(){I.curOp||(I.startOperation(),I.curOp.selectionBefore=I.$lastSel),I.curOp.docChanged=!0},!0),this.on("changeSelection",function(){I.curOp||(I.startOperation(),I.curOp.selectionBefore=I.$lastSel),I.curOp.selectionChanged=!0},!0),this.$operationResetTimer=f.delayedCall(this.endOperation.bind(this,!0))},P.prototype.startOperation=function(I){if(this.curOp){if(!I||this.curOp.command)return;this.prevOp=this.curOp}I||(I={}),this.$operationResetTimer.schedule(),this.curOp={command:I.command||{},args:I.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",I)},P.prototype.endOperation=function(I){if(this.curOp){if(I&&I.returnValue===!1){this.curOp=null,this._signal("endOperation",I);return}if(I==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var $=this.selection.toJSON();this.curOp.selectionAfter=$,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection($),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",I)}},P.prototype.setDocument=function(I){this.doc&&this.doc.off("change",this.$onChange),this.doc=I,I.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},P.prototype.getDocument=function(){return this.doc},Object.defineProperty(P.prototype,"widgetManager",{get:function(){var I=new c(this);return this.widgetManager=I,this.$editor&&I.attach(this.$editor),I},set:function(I){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:I})},enumerable:!1,configurable:!0}),P.prototype.$resetRowCache=function(I){if(!I){this.$docRowCache=[],this.$screenRowCache=[];return}var $=this.$docRowCache.length,C=this.$getRowCacheIndex(this.$docRowCache,I)+1;$>C&&(this.$docRowCache.splice(C,$),this.$screenRowCache.splice(C,$))},P.prototype.$getRowCacheIndex=function(I,$){for(var C=0,N=I.length-1;C<=N;){var j=C+N>>1,U=I[j];if($>U)C=j+1;else if($<U)N=j-1;else return j}return C-1},P.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},P.prototype.onChangeFold=function(I){var $=I.data;this.$resetRowCache($.start.row)},P.prototype.onChange=function(I){this.$modified=!0,this.$bidiHandler.onChange(I),this.$resetRowCache(I.start.row);var $=this.$updateInternalDataOnChange(I);!this.$fromUndo&&this.$undoManager&&($&&$.length&&(this.$undoManager.add({action:"removeFolds",folds:$},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(I,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(I),this._signal("change",I)},P.prototype.onSelectionChange=function(){this._signal("changeSelection")},P.prototype.setValue=function(I){this.doc.setValue(I),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},P.fromJSON=function(I){typeof I=="string"&&(I=JSON.parse(I));var $=new w;$.$undoStack=I.history.undo,$.$redoStack=I.history.redo,$.mark=I.history.mark,$.$rev=I.history.rev;var C=new P(I.value);return I.folds.forEach(function(N){C.addFold("...",h.fromPoints(N.start,N.end))}),C.setAnnotations(I.annotations),C.setBreakpoints(I.breakpoints),C.setMode(I.mode),C.setScrollLeft(I.scrollLeft),C.setScrollTop(I.scrollTop),C.setUndoManager($),C.selection.fromJSON(I.selection),C},P.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(I){return I.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},P.prototype.toString=function(){return this.doc.getValue()},P.prototype.getSelection=function(){return this.selection},P.prototype.getState=function(I){return this.bgTokenizer.getState(I)},P.prototype.getTokens=function(I){return this.bgTokenizer.getTokens(I)},P.prototype.getTokenAt=function(I,$){var C=this.bgTokenizer.getTokens(I),N,j=0;if($==null){var U=C.length-1;j=this.getLine(I).length}else for(var U=0;U<C.length&&(j+=C[U].value.length,!(j>=$));U++);return N=C[U],N?(N.index=U,N.start=j-N.value.length,N):null},P.prototype.setUndoManager=function(I){if(this.$undoManager=I,this.$informUndoManager&&this.$informUndoManager.cancel(),I){var $=this;I.addSession(this),this.$syncInformUndoManager=function(){$.$informUndoManager.cancel(),$.mergeUndoDeltas=!1},this.$informUndoManager=f.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},P.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},P.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},P.prototype.getTabString=function(){return this.getUseSoftTabs()?f.stringRepeat(" ",this.getTabSize()):" "},P.prototype.setUseSoftTabs=function(I){this.setOption("useSoftTabs",I)},P.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},P.prototype.setTabSize=function(I){this.setOption("tabSize",I)},P.prototype.getTabSize=function(){return this.$tabSize},P.prototype.isTabStop=function(I){return this.$useSoftTabs&&I.column%this.$tabSize===0},P.prototype.setNavigateWithinSoftTabs=function(I){this.setOption("navigateWithinSoftTabs",I)},P.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},P.prototype.setOverwrite=function(I){this.setOption("overwrite",I)},P.prototype.getOverwrite=function(){return this.$overwrite},P.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},P.prototype.addGutterDecoration=function(I,$){this.$decorations[I]||(this.$decorations[I]=""),this.$decorations[I]+=" "+$,this._signal("changeBreakpoint",{})},P.prototype.removeGutterCustomWidget=function(I){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(I)},P.prototype.addGutterCustomWidget=function(I,$){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(I,$)},P.prototype.removeGutterDecoration=function(I,$){this.$decorations[I]=(this.$decorations[I]||"").replace(" "+$,""),this._signal("changeBreakpoint",{})},P.prototype.getBreakpoints=function(){return this.$breakpoints},P.prototype.setBreakpoints=function(I){this.$breakpoints=[];for(var $=0;$<I.length;$++)this.$breakpoints[I[$]]="ace_breakpoint";this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},P.prototype.setBreakpoint=function(I,$){$===void 0&&($="ace_breakpoint"),$?this.$breakpoints[I]=$:delete this.$breakpoints[I],this._signal("changeBreakpoint",{})},P.prototype.clearBreakpoint=function(I){delete this.$breakpoints[I],this._signal("changeBreakpoint",{})},P.prototype.addMarker=function(I,$,C,N){var j=this.$markerId++,U={range:I,type:C||"line",renderer:typeof C=="function"?C:null,clazz:$,inFront:!!N,id:j};return N?(this.$frontMarkers[j]=U,this._signal("changeFrontMarker")):(this.$backMarkers[j]=U,this._signal("changeBackMarker")),j},P.prototype.addDynamicMarker=function(I,$){if(I.update){var C=this.$markerId++;return I.id=C,I.inFront=!!$,$?(this.$frontMarkers[C]=I,this._signal("changeFrontMarker")):(this.$backMarkers[C]=I,this._signal("changeBackMarker")),I}},P.prototype.removeMarker=function(I){var $=this.$frontMarkers[I]||this.$backMarkers[I];if($){var C=$.inFront?this.$frontMarkers:this.$backMarkers;delete C[I],this._signal($.inFront?"changeFrontMarker":"changeBackMarker")}},P.prototype.getMarkers=function(I){return I?this.$frontMarkers:this.$backMarkers},P.prototype.highlight=function(I){if(!this.$searchHighlight){var $=new m(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker($)}this.$searchHighlight.setRegexp(I)},P.prototype.highlightLines=function(I,$,C,N){typeof $!="number"&&(C=$,$=I),C||(C="ace_step");var j=new h(I,0,$,1/0);return j.id=this.addMarker(j,C,"fullLine",N),j},P.prototype.setAnnotations=function(I){this.$annotations=I,this._signal("changeAnnotation",{})},P.prototype.getAnnotations=function(){return this.$annotations||[]},P.prototype.clearAnnotations=function(){this.setAnnotations([])},P.prototype.$detectNewLine=function(I){var $=I.match(/^.*?(\r?\n)/m);$?this.$autoNewLine=$[1]:this.$autoNewLine=`
204
+ `},P.prototype.getWordRange=function(I,$){var C=this.getLine(I),N=!1;if($>0&&(N=!!C.charAt($-1).match(this.tokenRe)),N||(N=!!C.charAt($).match(this.tokenRe)),N)var j=this.tokenRe;else if(/^\s+$/.test(C.slice($-1,$+1)))var j=/\s/;else var j=this.nonTokenRe;var U=$;if(U>0){do U--;while(U>=0&&C.charAt(U).match(j));U++}for(var K=$;K<C.length&&C.charAt(K).match(j);)K++;return new h(I,U,I,K)},P.prototype.getAWordRange=function(I,$){for(var C=this.getWordRange(I,$),N=this.getLine(C.end.row);N.charAt(C.end.column).match(/[ \t]/);)C.end.column+=1;return C},P.prototype.setNewLineMode=function(I){this.doc.setNewLineMode(I)},P.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},P.prototype.setUseWorker=function(I){this.setOption("useWorker",I)},P.prototype.getUseWorker=function(){return this.$useWorker},P.prototype.onReloadTokenizer=function(I){var $=I.data;this.bgTokenizer.start($.first),this._signal("tokenizerUpdate",I)},P.prototype.setMode=function(I,$){if(I&&typeof I=="object"){if(I.getTokenizer)return this.$onChangeMode(I);var C=I,N=C.path}else N=I||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a),this.$modes[N]&&!C){this.$onChangeMode(this.$modes[N]),$&&$();return}this.$modeId=N,p.loadModule(["mode",N],(function(j){if(!this.destroyed){if(this.$modeId!==N)return $&&$();this.$modes[N]&&!C?this.$onChangeMode(this.$modes[N]):j&&j.Mode&&(j=new j.Mode(C),C||(this.$modes[N]=j,j.$id=N),this.$onChangeMode(j)),$&&$()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},P.prototype.$onChangeMode=function(I,$){if($||(this.$modeId=I.$id),this.$mode!==I){var C=this.$mode;this.$mode=I,this.$stopWorker(),this.$useWorker&&this.$startWorker();var N=I.getTokenizer();if(N.on!==void 0){var j=this.onReloadTokenizer.bind(this);N.on("update",j)}this.bgTokenizer.setTokenizer(N),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=I.tokenRe,this.nonTokenRe=I.nonTokenRe,$||(I.attachToSession&&I.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(I.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:C,mode:I}))}},P.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},P.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(I){p.warn("Could not load worker",I),this.$worker=null}},P.prototype.getMode=function(){return this.$mode},P.prototype.setScrollTop=function(I){this.$scrollTop===I||isNaN(I)||(this.$scrollTop=I,this._signal("changeScrollTop",I))},P.prototype.getScrollTop=function(){return this.$scrollTop},P.prototype.setScrollLeft=function(I){this.$scrollLeft===I||isNaN(I)||(this.$scrollLeft=I,this._signal("changeScrollLeft",I))},P.prototype.getScrollLeft=function(){return this.$scrollLeft},P.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},P.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var I=0;return this.lineWidgets.forEach(function($){$&&$.screenWidth>I&&(I=$.screenWidth)}),this.lineWidgetWidth=I},P.prototype.$computeWidth=function(I){if(this.$modified||I){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var $=this.doc.getAllLines(),C=this.$rowLengthCache,N=0,j=0,U=this.$foldData[j],K=U?U.start.row:1/0,Z=$.length,te=0;te<Z;te++){if(te>K){if(te=U.end.row+1,te>=Z)break;U=this.$foldData[j++],K=U?U.start.row:1/0}C[te]==null&&(C[te]=this.$getStringScreenWidth($[te])[0]),C[te]>N&&(N=C[te])}this.screenWidth=N}},P.prototype.getLine=function(I){return this.doc.getLine(I)},P.prototype.getLines=function(I,$){return this.doc.getLines(I,$)},P.prototype.getLength=function(){return this.doc.getLength()},P.prototype.getTextRange=function(I){return this.doc.getTextRange(I||this.selection.getRange())},P.prototype.insert=function(I,$){return this.doc.insert(I,$)},P.prototype.remove=function(I){return this.doc.remove(I)},P.prototype.removeFullLines=function(I,$){return this.doc.removeFullLines(I,$)},P.prototype.undoChanges=function(I,$){if(I.length){this.$fromUndo=!0;for(var C=I.length-1;C!=-1;C--){var N=I[C];N.action=="insert"||N.action=="remove"?this.doc.revertDelta(N):N.folds&&this.addFolds(N.folds)}!$&&this.$undoSelect&&(I.selectionBefore?this.selection.fromJSON(I.selectionBefore):this.selection.setRange(this.$getUndoSelection(I,!0))),this.$fromUndo=!1}},P.prototype.redoChanges=function(I,$){if(I.length){this.$fromUndo=!0;for(var C=0;C<I.length;C++){var N=I[C];(N.action=="insert"||N.action=="remove")&&this.doc.$safeApplyDelta(N)}!$&&this.$undoSelect&&(I.selectionAfter?this.selection.fromJSON(I.selectionAfter):this.selection.setRange(this.$getUndoSelection(I,!1))),this.$fromUndo=!1}},P.prototype.setUndoSelect=function(I){this.$undoSelect=I},P.prototype.$getUndoSelection=function(I,$){function C(Z){return $?Z.action!=="insert":Z.action==="insert"}for(var N,j,U=0;U<I.length;U++){var K=I[U];if(K.start){if(!N){C(K)?N=h.fromPoints(K.start,K.end):N=h.fromPoints(K.start,K.start);continue}C(K)?(j=K.start,N.compare(j.row,j.column)==-1&&N.setStart(j),j=K.end,N.compare(j.row,j.column)==1&&N.setEnd(j)):(j=K.start,N.compare(j.row,j.column)==-1&&(N=h.fromPoints(K.start,K.start)))}}return N},P.prototype.replace=function(I,$){return this.doc.replace(I,$)},P.prototype.moveText=function(I,$,C){var N=this.getTextRange(I),j=this.getFoldsInRange(I),U=h.fromPoints($,$);if(!C){this.remove(I);var K=I.start.row-I.end.row,Z=K?-I.end.column:I.start.column-I.end.column;Z&&(U.start.row==I.end.row&&U.start.column>I.end.column&&(U.start.column+=Z),U.end.row==I.end.row&&U.end.column>I.end.column&&(U.end.column+=Z)),K&&U.start.row>=I.end.row&&(U.start.row+=K,U.end.row+=K)}if(U.end=this.insert(U.start,N),j.length){var te=I.start,he=U.start,K=he.row-te.row,Z=he.column-te.column;this.addFolds(j.map(function(ue){return ue=ue.clone(),ue.start.row==te.row&&(ue.start.column+=Z),ue.end.row==te.row&&(ue.end.column+=Z),ue.start.row+=K,ue.end.row+=K,ue}))}return U},P.prototype.indentRows=function(I,$,C){C=C.replace(/\t/g,this.getTabString());for(var N=I;N<=$;N++)this.doc.insertInLine({row:N,column:0},C)},P.prototype.outdentRows=function(I){for(var $=I.collapseRows(),C=new h(0,0,0,0),N=this.getTabSize(),j=$.start.row;j<=$.end.row;++j){var U=this.getLine(j);C.start.row=j,C.end.row=j;for(var K=0;K<N&&U.charAt(K)==" ";++K);K<N&&U.charAt(K)==" "?(C.start.column=K,C.end.column=K+1):(C.start.column=0,C.end.column=K),this.remove(C)}},P.prototype.$moveLines=function(I,$,C){if(I=this.getRowFoldStart(I),$=this.getRowFoldEnd($),C<0){var N=this.getRowFoldStart(I+C);if(N<0)return 0;var j=N-I}else if(C>0){var N=this.getRowFoldEnd($+C);if(N>this.doc.getLength()-1)return 0;var j=N-$}else{I=this.$clipRowToDocument(I),$=this.$clipRowToDocument($);var j=$-I+1}var U=new h(I,0,$,Number.MAX_VALUE),K=this.getFoldsInRange(U).map(function(te){return te=te.clone(),te.start.row+=j,te.end.row+=j,te}),Z=C==0?this.doc.getLines(I,$):this.doc.removeFullLines(I,$);return this.doc.insertFullLines(I+j,Z),K.length&&this.addFolds(K),j},P.prototype.moveLinesUp=function(I,$){return this.$moveLines(I,$,-1)},P.prototype.moveLinesDown=function(I,$){return this.$moveLines(I,$,1)},P.prototype.duplicateLines=function(I,$){return this.$moveLines(I,$,0)},P.prototype.$clipRowToDocument=function(I){return Math.max(0,Math.min(I,this.doc.getLength()-1))},P.prototype.$clipColumnToRow=function(I,$){return $<0?0:Math.min(this.doc.getLine(I).length,$)},P.prototype.$clipPositionToDocument=function(I,$){if($=Math.max(0,$),I<0)I=0,$=0;else{var C=this.doc.getLength();I>=C?(I=C-1,$=this.doc.getLine(C-1).length):$=Math.min(this.doc.getLine(I).length,$)}return{row:I,column:$}},P.prototype.$clipRangeToDocument=function(I){I.start.row<0?(I.start.row=0,I.start.column=0):I.start.column=this.$clipColumnToRow(I.start.row,I.start.column);var $=this.doc.getLength()-1;return I.end.row>$?(I.end.row=$,I.end.column=this.doc.getLine($).length):I.end.column=this.$clipColumnToRow(I.end.row,I.end.column),I},P.prototype.setUseWrapMode=function(I){if(I!=this.$useWrapMode){if(this.$useWrapMode=I,this.$modified=!0,this.$resetRowCache(0),I){var $=this.getLength();this.$wrapData=Array($),this.$updateWrapData(0,$-1)}this._signal("changeWrapMode")}},P.prototype.getUseWrapMode=function(){return this.$useWrapMode},P.prototype.setWrapLimitRange=function(I,$){(this.$wrapLimitRange.min!==I||this.$wrapLimitRange.max!==$)&&(this.$wrapLimitRange={min:I,max:$},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},P.prototype.adjustWrapLimit=function(I,$){var C=this.$wrapLimitRange;C.max<0&&(C={min:$,max:$});var N=this.$constrainWrapLimit(I,C.min,C.max);return N!=this.$wrapLimit&&N>1?(this.$wrapLimit=N,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},P.prototype.$constrainWrapLimit=function(I,$,C){return $&&(I=Math.max($,I)),C&&(I=Math.min(C,I)),I},P.prototype.getWrapLimit=function(){return this.$wrapLimit},P.prototype.setWrapLimit=function(I){this.setWrapLimitRange(I,I)},P.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},P.prototype.$updateInternalDataOnChange=function(I){var $=this.$useWrapMode,C=I.action,N=I.start,j=I.end,U=N.row,K=j.row,Z=K-U,te=null;if(this.$updating=!0,Z!=0)if(C==="remove"){this[$?"$wrapData":"$rowLengthCache"].splice(U,Z);var he=this.$foldData;te=this.getFoldsInRange(I),this.removeFolds(te);var ne=this.getFoldLine(j.row),ae=0;if(ne){ne.addRemoveChars(j.row,j.column,N.column-j.column),ne.shiftRow(-Z);var ue=this.getFoldLine(U);ue&&ue!==ne&&(ue.merge(ne),ne=ue),ae=he.indexOf(ne)+1}for(ae;ae<he.length;ae++){var ne=he[ae];ne.start.row>=j.row&&ne.shiftRow(-Z)}K=U}else{var ce=Array(Z);ce.unshift(U,0);var ge=$?this.$wrapData:this.$rowLengthCache;ge.splice.apply(ge,ce);var he=this.$foldData,ne=this.getFoldLine(U),ae=0;if(ne){var Ee=ne.range.compareInside(N.row,N.column);Ee==0?(ne=ne.split(N.row,N.column),ne&&(ne.shiftRow(Z),ne.addRemoveChars(K,0,j.column-N.column))):Ee==-1&&(ne.addRemoveChars(U,0,j.column-N.column),ne.shiftRow(Z)),ae=he.indexOf(ne)+1}for(ae;ae<he.length;ae++){var ne=he[ae];ne.start.row>=U&&ne.shiftRow(Z)}}else{Z=Math.abs(I.start.column-I.end.column),C==="remove"&&(te=this.getFoldsInRange(I),this.removeFolds(te),Z=-Z);var ne=this.getFoldLine(U);ne&&ne.addRemoveChars(U,N.column,Z)}return $&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,$?this.$updateWrapData(U,K):this.$updateRowLengthCache(U,K),te},P.prototype.$updateRowLengthCache=function(I,$){this.$rowLengthCache[I]=null,this.$rowLengthCache[$]=null},P.prototype.$updateWrapData=function(I,$){var C=this.doc.getAllLines(),N=this.getTabSize(),j=this.$wrapData,U=this.$wrapLimit,K,Z,te=I;for($=Math.min($,C.length-1);te<=$;)Z=this.getFoldLine(te,Z),Z?(K=[],Z.walk((function(he,ne,ae,ue){var ce;if(he!=null){ce=this.$getDisplayTokens(he,K.length),ce[0]=S;for(var ge=1;ge<ce.length;ge++)ce[ge]=x}else ce=this.$getDisplayTokens(C[ne].substring(ue,ae),K.length);K=K.concat(ce)}).bind(this),Z.end.row,C[Z.end.row].length+1),j[Z.start.row]=this.$computeWrapSplits(K,U,N),te=Z.end.row+1):(K=this.$getDisplayTokens(C[te]),j[te]=this.$computeWrapSplits(K,U,N),te++)},P.prototype.$computeWrapSplits=function(I,$,C){if(I.length==0)return[];var N=[],j=I.length,U=0,K=0,Z=this.$wrapAsCode,te=this.$indentedSoftWrap,he=$<=Math.max(2*C,8)||te===!1?0:Math.floor($/2);function ne(){var Ee=0;if(he===0)return Ee;if(te)for(var Re=0;Re<I.length;Re++){var Le=I[Re];if(Le==O)Ee+=1;else if(Le==F)Ee+=C;else{if(Le==L)continue;break}}return Z&&te!==!1&&(Ee+=C),Math.min(Ee,he)}function ae(Ee){for(var Re=Ee-U,Le=U;Le<Ee;Le++){var Xe=I[Le];(Xe===12||Xe===2)&&(Re-=1)}N.length||(ue=ne(),N.indent=ue),K+=Re,N.push(K),U=Ee}for(var ue=0;j-U>$-ue;){var ce=U+$-ue;if(I[ce-1]>=O&&I[ce]>=O){ae(ce);continue}if(I[ce]==S||I[ce]==x){for(ce;ce!=U-1&&I[ce]!=S;ce--);if(ce>U){ae(ce);continue}for(ce=U+$,ce;ce<I.length&&I[ce]==x;ce++);if(ce==I.length)break;ae(ce);continue}for(var ge=Math.max(ce-($-($>>2)),U-1);ce>ge&&I[ce]<S;)ce--;if(Z){for(;ce>ge&&I[ce]<S;)ce--;for(;ce>ge&&I[ce]==M;)ce--}else for(;ce>ge&&I[ce]<O;)ce--;if(ce>ge){ae(++ce);continue}ce=U+$,I[ce]==T&&ce--,ae(ce-ue)}return N},P.prototype.$getDisplayTokens=function(I,$){var C=[],N;$=$||0;for(var j=0;j<I.length;j++){var U=I.charCodeAt(j);if(U==9){N=this.getScreenTabSize(C.length+$),C.push(F);for(var K=1;K<N;K++)C.push(L)}else U==32?C.push(O):U>39&&U<48||U>57&&U<64?C.push(M):U>=4352&&H(U)?C.push(R,T):C.push(R)}return C},P.prototype.$getStringScreenWidth=function(I,$,C){if($==0)return[0,0];$==null&&($=1/0),C=C||0;var N,j;for(j=0;j<I.length&&(N=I.charCodeAt(j),N==9?C+=this.getScreenTabSize(C):N>=4352&&H(N)?C+=2:C+=1,!(C>$));j++);return[C,j]},P.prototype.getRowLength=function(I){var $=1;return this.lineWidgets&&($+=this.lineWidgets[I]&&this.lineWidgets[I].rowCount||0),!this.$useWrapMode||!this.$wrapData[I]?$:this.$wrapData[I].length+$},P.prototype.getRowLineCount=function(I){return!this.$useWrapMode||!this.$wrapData[I]?1:this.$wrapData[I].length+1},P.prototype.getRowWrapIndent=function(I){if(this.$useWrapMode){var $=this.screenToDocumentPosition(I,Number.MAX_VALUE),C=this.$wrapData[$.row];return C.length&&C[0]<$.column?C.indent:0}else return 0},P.prototype.getScreenLastRowColumn=function(I){var $=this.screenToDocumentPosition(I,Number.MAX_VALUE);return this.documentToScreenColumn($.row,$.column)},P.prototype.getDocumentLastRowColumn=function(I,$){var C=this.documentToScreenRow(I,$);return this.getScreenLastRowColumn(C)},P.prototype.getDocumentLastRowColumnPosition=function(I,$){var C=this.documentToScreenRow(I,$);return this.screenToDocumentPosition(C,Number.MAX_VALUE/10)},P.prototype.getRowSplitData=function(I){if(this.$useWrapMode)return this.$wrapData[I]},P.prototype.getScreenTabSize=function(I){return this.$tabSize-(I%this.$tabSize|0)},P.prototype.screenToDocumentRow=function(I,$){return this.screenToDocumentPosition(I,$).row},P.prototype.screenToDocumentColumn=function(I,$){return this.screenToDocumentPosition(I,$).column},P.prototype.screenToDocumentPosition=function(I,$,C){if(I<0)return{row:0,column:0};var N,ae=0,j=0,U,ne=0,K=0,Z=this.$screenRowCache,te=this.$getRowCacheIndex(Z,I),he=Z.length;if(he&&te>=0)var ne=Z[te],ae=this.$docRowCache[te],ue=I>Z[he-1];else var ue=!he;for(var ce=this.getLength()-1,ge=this.getNextFoldLine(ae),Ee=ge?ge.start.row:1/0;ne<=I&&(K=this.getRowLength(ae),!(ne+K>I||ae>=ce));)ne+=K,ae++,ae>Ee&&(ae=ge.end.row+1,ge=this.getNextFoldLine(ae,ge),Ee=ge?ge.start.row:1/0),ue&&(this.$docRowCache.push(ae),this.$screenRowCache.push(ne));if(ge&&ge.start.row<=ae)N=this.getFoldDisplayLine(ge),ae=ge.start.row;else{if(ne+K<=I||ae>ce)return{row:ce,column:this.getLine(ce).length};N=this.getLine(ae),ge=null}var Re=0,Le=Math.floor(I-ne);if(this.$useWrapMode){var Xe=this.$wrapData[ae];Xe&&(U=Xe[Le],Le>0&&Xe.length&&(Re=Xe.indent,j=Xe[Le-1]||Xe[Xe.length-1],N=N.substring(j)))}return C!==void 0&&this.$bidiHandler.isBidiRow(ne+Le,ae,Le)&&($=this.$bidiHandler.offsetToCol(C)),j+=this.$getStringScreenWidth(N,$-Re)[1],this.$useWrapMode&&j>=U&&(j=U-1),ge?ge.idxToPosition(j):{row:ae,column:j}},P.prototype.documentToScreenPosition=function(I,$){if(typeof $>"u")var C=this.$clipPositionToDocument(I.row,I.column);else C=this.$clipPositionToDocument(I,$);I=C.row,$=C.column;var ne=0,N=null,j=null;j=this.getFoldAt(I,$,1),j&&(I=j.start.row,$=j.start.column);var U,he=0,K=this.$docRowCache,Z=this.$getRowCacheIndex(K,I),te=K.length;if(te&&Z>=0)var he=K[Z],ne=this.$screenRowCache[Z],ae=I>K[te-1];else var ae=!te;for(var ue=this.getNextFoldLine(he),ce=ue?ue.start.row:1/0;he<I;){if(he>=ce){if(U=ue.end.row+1,U>I)break;ue=this.getNextFoldLine(U,ue),ce=ue?ue.start.row:1/0}else U=he+1;ne+=this.getRowLength(he),he=U,ae&&(this.$docRowCache.push(he),this.$screenRowCache.push(ne))}var ge="";ue&&he>=ce?(ge=this.getFoldDisplayLine(ue,I,$),N=ue.start.row):(ge=this.getLine(I).substring(0,$),N=I);var Ee=0;if(this.$useWrapMode){var Re=this.$wrapData[N];if(Re){for(var Le=0;ge.length>=Re[Le];)ne++,Le++;ge=ge.substring(Re[Le-1]||0,ge.length),Ee=Le>0?Re.indent:0}}return this.lineWidgets&&this.lineWidgets[he]&&this.lineWidgets[he].rowsAbove&&(ne+=this.lineWidgets[he].rowsAbove),{row:ne,column:Ee+this.$getStringScreenWidth(ge)[0]}},P.prototype.documentToScreenColumn=function(I,$){return this.documentToScreenPosition(I,$).column},P.prototype.documentToScreenRow=function(I,$){return this.documentToScreenPosition(I,$).row},P.prototype.getScreenLength=function(){var I=0,$=null;if(this.$useWrapMode)for(var C=this.$wrapData.length,N=0,j=0,$=this.$foldData[j++],U=$?$.start.row:1/0;N<C;){var K=this.$wrapData[N];I+=K?K.length+1:1,N++,N>U&&(N=$.end.row+1,$=this.$foldData[j++],U=$?$.start.row:1/0)}else{I=this.getLength();for(var Z=this.$foldData,j=0;j<Z.length;j++)$=Z[j],I-=$.end.row-$.start.row}return this.lineWidgets&&(I+=this.$getWidgetScreenLength()),I},P.prototype.$setFontMetrics=function(I){this.$enableVarChar&&(this.$getStringScreenWidth=function($,C,N){if(C===0)return[0,0];C||(C=1/0),N=N||0;var j,U;for(U=0;U<$.length&&(j=$.charAt(U),j===" "?N+=this.getScreenTabSize(N):N+=I.getCharacterWidth(j),!(N>C));U++);return[N,U]})},P.prototype.getPrecedingCharacter=function(){var I=this.selection.getCursor();if(I.column===0)return I.row===0?"":this.doc.getNewLineCharacter();var $=this.getLine(I.row);return $[I.column-1]},P.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},P}();k.$uid=0,k.prototype.$modes=p.$modes,k.prototype.getValue=k.prototype.toString,k.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},k.prototype.$overwrite=!1,k.prototype.$mode=null,k.prototype.$modeId=null,k.prototype.$scrollTop=0,k.prototype.$scrollLeft=0,k.prototype.$wrapLimit=80,k.prototype.$useWrapMode=!1,k.prototype.$wrapLimitRange={min:null,max:null},k.prototype.lineWidgets=null,k.prototype.isFullWidth=H,d.implement(k.prototype,g);var R=1,T=2,S=3,x=4,M=9,O=10,F=11,L=12;function H(P){return P<4352?!1:P>=4352&&P<=4447||P>=4515&&P<=4519||P>=4602&&P<=4607||P>=9001&&P<=9002||P>=11904&&P<=11929||P>=11931&&P<=12019||P>=12032&&P<=12245||P>=12272&&P<=12283||P>=12288&&P<=12350||P>=12353&&P<=12438||P>=12441&&P<=12543||P>=12549&&P<=12589||P>=12593&&P<=12686||P>=12688&&P<=12730||P>=12736&&P<=12771||P>=12784&&P<=12830||P>=12832&&P<=12871||P>=12880&&P<=13054||P>=13056&&P<=19903||P>=19968&&P<=42124||P>=42128&&P<=42182||P>=43360&&P<=43388||P>=44032&&P<=55203||P>=55216&&P<=55238||P>=55243&&P<=55291||P>=63744&&P<=64255||P>=65040&&P<=65049||P>=65072&&P<=65106||P>=65108&&P<=65126||P>=65128&&P<=65131||P>=65281&&P<=65376||P>=65504&&P<=65510}n("./edit_session/folding").Folding.call(k.prototype),n("./edit_session/bracket_match").BracketMatch.call(k.prototype),p.defineOptions(k.prototype,"session",{wrap:{set:function(P){if(!P||P=="off"?P=!1:P=="free"?P=!0:P=="printMargin"?P=-1:typeof P=="string"&&(P=parseInt(P,10)||!1),this.$wrap!=P)if(this.$wrap=P,!P)this.setUseWrapMode(!1);else{var I=typeof P=="number"?P:null;this.setWrapLimitRange(I,I),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(P){P=P=="auto"?this.$mode.type!="text":P!="text",P!=this.$wrapAsCode&&(this.$wrapAsCode=P,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(P){this.$useWorker=P,this.$stopWorker(),P&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(P){P=parseInt(P),P>0&&this.$tabSize!==P&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=P,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(P){this.setFoldStyle(P)},handlesSet:!0},overwrite:{set:function(P){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(P){this.doc.setNewLineMode(P)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(P){this.setMode(P)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=k}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(n,r,u){var d=n("./lib/lang"),f=n("./lib/oop"),b=n("./range").Range,p=function(){function h(){this.$options={}}return h.prototype.set=function(c){return f.mixin(this.$options,c),this},h.prototype.getOptions=function(){return d.copyObject(this.$options)},h.prototype.setOptions=function(c){this.$options=c},h.prototype.find=function(c){var o=this.$options,l=this.$matchIterator(c,o);if(!l)return!1;var m=null;return l.forEach(function(w,k,R,T){return m=new b(w,k,R,T),k==T&&o.start&&o.start.start&&o.skipCurrent!=!1&&m.isEqual(o.start)?(m=null,!1):!0}),m},h.prototype.findAll=function(c){var o=this.$options;if(!o.needle)return[];this.$assembleRegExp(o);var l=o.range,m=l?c.getLines(l.start.row,l.end.row):c.doc.getAllLines(),w=[],k=o.re;if(o.$isMultiLine){var R=k.length,T=m.length-R,S;e:for(var x=k.offset||0;x<=T;x++){for(var M=0;M<R;M++)if(m[x+M].search(k[M])==-1)continue e;var O=m[x],F=m[x+R-1],L=O.length-O.match(k[0])[0].length,H=F.match(k[R-1])[0].length;S&&S.end.row===x&&S.end.column>L||(w.push(S=new b(x,L,x+R-1,H)),R>2&&(x=x+R-2))}}else for(var P,I=0;I<m.length;I++)if(this.$isMultilineSearch(o)){var $=m.length-1;if(P=this.$multiLineForward(c,k,I,$),P){var C=P.endRow<=$?P.endRow-1:$;C>I&&(I=C),w.push(new b(P.startRow,P.startCol,P.endRow,P.endCol))}}else{P=d.getMatchOffsets(m[I],k);for(var M=0;M<P.length;M++){var N=P[M];w.push(new b(I,N.offset,I,N.offset+N.length))}}if(l){for(var j=l.start.column,U=l.end.column,I=0,M=w.length-1;I<M&&w[I].start.column<j&&w[I].start.row==0;)I++;for(var K=l.end.row-l.start.row;I<M&&w[M].end.column>U&&w[M].end.row==K;)M--;for(w=w.slice(I,M+1),I=0,M=w.length;I<M;I++)w[I].start.row+=l.start.row,w[I].end.row+=l.start.row}return w},h.prototype.parseReplaceString=function(c){for(var o={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},l="",m=0,w=c.length;m<w;m++){var k=c.charCodeAt(m);if(k===o.Backslash){if(m++,m>=w){l+="\\";break}var R=c.charCodeAt(m);switch(R){case o.Backslash:l+="\\";break;case o.n:l+=`
205
+ `;break;case o.t:l+=" ";break}continue}if(k===o.DollarSign){if(m++,m>=w){l+="$";break}var T=c.charCodeAt(m);if(T===o.DollarSign){l+="$$";continue}if(T===o.Digit0||T===o.Ampersand){l+="$&";continue}if(o.Digit1<=T&&T<=o.Digit9){l+="$"+c[m];continue}}l+=c[m]}return l||c},h.prototype.replace=function(c,o){var l=this.$options,m=this.$assembleRegExp(l);if(l.$isMultiLine)return o;if(m){var w=this.$isMultilineSearch(l);w&&(c=c.replace(/\r\n|\r|\n/g,`
206
+ `));var k=m.exec(c);if(!k||!w&&k[0].length!=c.length)return null;if(o=l.regExp?this.parseReplaceString(o):o.replace(/\$/g,"$$$$"),o=c.replace(m,o),l.preserveCase){o=o.split("");for(var R=Math.min(c.length,c.length);R--;){var T=c[R];T&&T.toLowerCase()!=T?o[R]=o[R].toUpperCase():o[R]=o[R].toLowerCase()}o=o.join("")}return o}},h.prototype.$assembleRegExp=function(c,o){if(c.needle instanceof RegExp)return c.re=c.needle;var l=c.needle;if(!c.needle)return c.re=!1;c.regExp||(l=d.escapeRegExp(l));var m=c.caseSensitive?"gm":"gmi";try{new RegExp(l,"u"),c.$supportsUnicodeFlag=!0,m+="u"}catch{c.$supportsUnicodeFlag=!1}if(c.wholeWord&&(l=g(l,c)),c.$isMultiLine=!o&&/[\n\r]/.test(l),c.$isMultiLine)return c.re=this.$assembleMultilineRegExp(l,m);try{var w=new RegExp(l,m)}catch{w=!1}return c.re=w},h.prototype.$assembleMultilineRegExp=function(c,o){for(var l=c.replace(/\r\n|\r|\n/g,`$
207
+ ^`).split(`
208
+ `),m=[],w=0;w<l.length;w++)try{m.push(new RegExp(l[w],o))}catch{return!1}return m},h.prototype.$isMultilineSearch=function(c){return c.re&&/\\r\\n|\\r|\\n/.test(c.re.source)&&c.regExp&&!c.$isMultiLine},h.prototype.$multiLineForward=function(c,o,l,m){for(var w,k=a(c,l),R=l;R<=m;){for(var T=0;T<k&&!(R>m);T++){var S=c.getLine(R++);w=w==null?S:w+`
209
+ `+S}var x=o.exec(w);if(o.lastIndex=0,x){var M=w.slice(0,x.index).split(`
210
+ `),O=x[0].split(`
211
+ `),F=l+M.length-1,L=M[M.length-1].length,H=F+O.length-1,P=O.length==1?L+O[0].length:O[O.length-1].length;return{startRow:F,startCol:L,endRow:H,endCol:P}}}return null},h.prototype.$multiLineBackward=function(c,o,l,m,w){for(var k,R=a(c,m),T=c.getLine(m).length-l,S=m;S>=w;){for(var x=0;x<R&&S>=w;x++){var M=c.getLine(S--);k=k==null?M:M+`
212
+ `+k}var O=i(k,o,T);if(O){var F=k.slice(0,O.index).split(`
213
+ `),L=O[0].split(`
214
+ `),H=S+F.length,P=F[F.length-1].length,I=H+L.length-1,$=L.length==1?P+L[0].length:L[L.length-1].length;return{startRow:H,startCol:P,endRow:I,endCol:$}}}return null},h.prototype.$matchIterator=function(c,o){var l=this.$assembleRegExp(o);if(!l)return!1;var m=this.$isMultilineSearch(o),w=this.$multiLineForward,k=this.$multiLineBackward,R=o.backwards==!0,T=o.skipCurrent!=!1,S=l.unicode,x=o.range,M=o.start;M||(M=x?x[R?"end":"start"]:c.selection.getRange()),M.start&&(M=M[T!=R?"end":"start"]);var O=x?x.start.row:0,F=x?x.end.row:c.getLength()-1;if(R)var L=function(I){var $=M.row;if(!P($,M.column,I)){for($--;$>=O;$--)if(P($,Number.MAX_VALUE,I))return;if(o.wrap!=!1){for($=F,O=M.row;$>=O;$--)if(P($,Number.MAX_VALUE,I))return}}};else var L=function(I){var $=M.row;if(!P($,M.column,I)){for($=$+1;$<=F;$++)if(P($,0,I))return;if(o.wrap!=!1){for($=O,F=M.row;$<=F;$++)if(P($,0,I))return}}};if(o.$isMultiLine)var H=l.length,P=function(I,$,C){var N=R?I-H+1:I;if(!(N<0||N+H>c.getLength())){var j=c.getLine(N),U=j.search(l[0]);if(!(!R&&U<$||U===-1)){for(var K=1;K<H;K++)if(j=c.getLine(N+K),j.search(l[K])==-1)return;var Z=j.match(l[H-1])[0].length;if(!(R&&Z>$)&&C(N,U,N+H-1,Z))return!0}}};else if(R)var P=function(I,$,C){if(m){var N=k(c,l,$,I,O);if(!N)return!1;if(C(N.startRow,N.startCol,N.endRow,N.endCol))return!0}else{var j=c.getLine(I),U=[],K,Z=0;for(l.lastIndex=0;K=l.exec(j);){var te=K[0].length;if(Z=K.index,!te){if(Z>=j.length)break;l.lastIndex=Z+=d.skipEmptyMatch(j,Z,S)}if(K.index+te>$)break;U.push(K.index,te)}for(var he=U.length-1;he>=0;he-=2){var ne=U[he-1],te=U[he];if(C(I,ne,I,ne+te))return!0}}};else var P=function(I,$,C){if(l.lastIndex=$,m){var N=w(c,l,I,F);if(N){var j=N.endRow<=F?N.endRow-1:F;j>I&&(I=j)}if(!N)return!1;if(C(N.startRow,N.startCol,N.endRow,N.endCol))return!0}else for(var U=c.getLine(I),K,Z;Z=l.exec(U);){var te=Z[0].length;if(K=Z.index,C(I,K,I,K+te))return!0;if(!te&&(l.lastIndex=K+=d.skipEmptyMatch(U,K,S),K>=U.length))return!1}};return{forEach:L}},h}();function g(h,c){var o=d.supportsLookbehind();function l(R,T){T===void 0&&(T=!0);var S=o&&c.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return S.test(R)||c.regExp?o&&c.$supportsUnicodeFlag?T?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var m=Array.from(h),w=m[0],k=m[m.length-1];return l(w)+h+l(k,!1)}function i(h,c,o){for(var l=null,m=0;m<=h.length;){c.lastIndex=m;var w=c.exec(h);if(!w)break;var k=w.index+w[0].length;if(k>h.length-o)break;(!l||k>l.index+l[0].length)&&(l=w),m=w.index+1}return l}function a(h,c){var o=5e3,l={row:c,column:0},m=h.doc.positionToIndex(l),w=m+o,k=h.doc.indexToPosition(w),R=k.row;return R+1}r.Search=p}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,u){var d=this&&this.__extends||function(){var h=function(c,o){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,m){l.__proto__=m}||function(l,m){for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(l[w]=m[w])},h(c,o)};return function(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");h(c,o);function l(){this.constructor=c}c.prototype=o===null?Object.create(o):(l.prototype=o.prototype,new l)}}(),f=n("../lib/keys"),b=n("../lib/useragent"),p=f.KEY_MODS,g=function(){function h(c,o){this.$init(c,o,!1)}return h.prototype.$init=function(c,o,l){this.platform=o||(b.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(c),this.$singleCommand=l},h.prototype.addCommand=function(c){this.commands[c.name]&&this.removeCommand(c),this.commands[c.name]=c,c.bindKey&&this._buildKeyHash(c)},h.prototype.removeCommand=function(c,o){var l=c&&(typeof c=="string"?c:c.name);c=this.commands[l],o||delete this.commands[l];var m=this.commandKeyBinding;for(var w in m){var k=m[w];if(k==c)delete m[w];else if(Array.isArray(k)){var R=k.indexOf(c);R!=-1&&(k.splice(R,1),k.length==1&&(m[w]=k[0]))}}},h.prototype.bindKey=function(c,o,l){if(typeof c=="object"&&c&&(l==null&&(l=c.position),c=c[this.platform]),!!c){if(typeof o=="function")return this.addCommand({exec:o,bindKey:c,name:o.name||c});c.split("|").forEach(function(m){var w="";if(m.indexOf(" ")!=-1){var k=m.split(/\s+/);m=k.pop(),k.forEach(function(S){var x=this.parseKeys(S),M=p[x.hashId]+x.key;w+=(w?" ":"")+M,this._addCommandToBinding(w,"chainKeys")},this),w+=" "}var R=this.parseKeys(m),T=p[R.hashId]+R.key;this._addCommandToBinding(w+T,o,l)},this)}},h.prototype._addCommandToBinding=function(c,o,l){var m=this.commandKeyBinding,w;if(!o)delete m[c];else if(!m[c]||this.$singleCommand)m[c]=o;else{Array.isArray(m[c])?(w=m[c].indexOf(o))!=-1&&m[c].splice(w,1):m[c]=[m[c]],typeof l!="number"&&(l=i(o));var k=m[c];for(w=0;w<k.length;w++){var R=k[w],T=i(R);if(T>l)break}k.splice(w,0,o)}},h.prototype.addCommands=function(c){c&&Object.keys(c).forEach(function(o){var l=c[o];if(l){if(typeof l=="string")return this.bindKey(l,o);typeof l=="function"&&(l={exec:l}),typeof l=="object"&&(l.name||(l.name=o),this.addCommand(l))}},this)},h.prototype.removeCommands=function(c){Object.keys(c).forEach(function(o){this.removeCommand(c[o])},this)},h.prototype.bindKeys=function(c){Object.keys(c).forEach(function(o){this.bindKey(o,c[o])},this)},h.prototype._buildKeyHash=function(c){this.bindKey(c.bindKey,c)},h.prototype.parseKeys=function(c){var o=c.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(T){return T}),l=o.pop(),m=f[l];if(f.FUNCTION_KEYS[m])l=f.FUNCTION_KEYS[m].toLowerCase();else if(o.length){if(o.length==1&&o[0]=="shift")return{key:l.toUpperCase(),hashId:-1}}else return{key:l,hashId:-1};for(var w=0,k=o.length;k--;){var R=f.KEY_MODS[o[k]];if(R==null)return typeof console<"u"&&console.error("invalid modifier "+o[k]+" in "+c),!1;w|=R}return{key:l,hashId:w}},h.prototype.findKeyCommand=function(c,o){var l=p[c]+o;return this.commandKeyBinding[l]},h.prototype.handleKeyboard=function(c,o,l,m){if(!(m<0)){var w=p[o]+l,k=this.commandKeyBinding[w];return c.$keyChain&&(c.$keyChain+=" "+w,k=this.commandKeyBinding[c.$keyChain]||k),k&&(k=="chainKeys"||k[k.length-1]=="chainKeys")?(c.$keyChain=c.$keyChain||w,{command:"null"}):(c.$keyChain&&((!o||o==4)&&l.length==1?c.$keyChain=c.$keyChain.slice(0,-w.length-1):(o==-1||m>0)&&(c.$keyChain="")),{command:k})}},h.prototype.getStatusText=function(c,o){return o.$keyChain||""},h}();function i(h){return typeof h=="object"&&h.bindKey&&h.bindKey.position||(h.isDefault?-100:0)}var a=function(h){d(c,h);function c(o,l){var m=h.call(this,o,l)||this;return m.$singleCommand=!0,m}return c}(g);a.call=function(h,c,o){g.prototype.$init.call(h,c,o,!0)},g.call=function(h,c,o){g.prototype.$init.call(h,c,o,!1)},r.HashHandler=a,r.MultiHashHandler=g}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(n,r,u){var d=this&&this.__extends||function(){var i=function(a,h){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,o){c.__proto__=o}||function(c,o){for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(c[l]=o[l])},i(a,h)};return function(a,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");i(a,h);function c(){this.constructor=a}a.prototype=h===null?Object.create(h):(c.prototype=h.prototype,new c)}}(),f=n("../lib/oop"),b=n("../keyboard/hash_handler").MultiHashHandler,p=n("../lib/event_emitter").EventEmitter,g=function(i){d(a,i);function a(h,c){var o=i.call(this,c,h)||this;return o.byName=o.commands,o.setDefaultHandler("exec",function(l){return l.args?l.command.exec(l.editor,l.args,l.event,!1):l.command.exec(l.editor,{},l.event,!0)}),o}return a.prototype.exec=function(h,c,o){if(Array.isArray(h)){for(var l=h.length;l--;)if(this.exec(h[l],c,o))return!0;return!1}typeof h=="string"&&(h=this.commands[h]);var m={editor:c,command:h,args:o};return this.canExecute(h,c)?(m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1):(this._signal("commandUnavailable",m),!1)},a.prototype.canExecute=function(h,c){return typeof h=="string"&&(h=this.commands[h]),!(!h||c&&c.$readOnly&&!h.readOnly||this.$checkCommandState!=!1&&h.isAvailable&&!h.isAvailable(c))},a.prototype.toggleRecording=function(h){if(!this.$inReplay)return h&&h._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(c){this.macro.push([c.command,c.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},a.prototype.replay=function(h){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(h);try{this.$inReplay=!0,this.macro.forEach(function(c){typeof c=="string"?this.exec(c,h):this.exec(c[0],h,c[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function(h){return h.map(function(c){return typeof c[0]!="string"&&(c[0]=c[0].name),c[1]||(c=c[0]),c})},a}(b);f.implement(g.prototype,p),r.CommandManager=g}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(n,r,u){var d=n("../lib/lang"),f=n("../config"),b=n("../range").Range;function p(i,a){return{win:i,mac:a}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:p("Ctrl-,","Command-,"),exec:function(i){f.loadModule("ace/ext/settings_menu",function(a){a.init(i),i.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:p("Alt-E","F4"),exec:function(i){f.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(i,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:p("Alt-Shift-E","Shift-F4"),exec:function(i){f.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(i,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:p("Ctrl-A","Command-A"),exec:function(i){i.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:p(null,"Ctrl-L"),exec:function(i){i.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:p("Ctrl-L","Command-L"),exec:function(i,a){typeof a=="number"&&!isNaN(a)&&i.gotoLine(a),i.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:p("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(i){i.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:p("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(i){i.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:p("F2","F2"),exec:function(i){i.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:p("Alt-F2","Alt-F2"),exec:function(i){i.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:p(null,"Ctrl-Command-Option-0"),exec:function(i){i.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:p(null,"Ctrl-Command-Option-0"),exec:function(i){i.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:p("Alt-0","Command-Option-0"),exec:function(i){i.session.foldAll(),i.session.unfold(i.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:p("Alt-Shift-0","Command-Option-Shift-0"),exec:function(i){i.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:p("Ctrl-K","Command-G"),exec:function(i){i.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:p("Ctrl-Shift-K","Command-Shift-G"),exec:function(i){i.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:p("Alt-K","Ctrl-G"),exec:function(i){i.selection.isEmpty()?i.selection.selectWord():i.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:p("Alt-Shift-K","Ctrl-Shift-G"),exec:function(i){i.selection.isEmpty()?i.selection.selectWord():i.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:p("Ctrl-F","Command-F"),exec:function(i){f.loadModule("ace/ext/searchbox",function(a){a.Search(i)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(i){i.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:p("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(i){i.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:p("Ctrl-Home","Command-Home|Command-Up"),exec:function(i){i.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:p("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(i){i.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:p("Up","Up|Ctrl-P"),exec:function(i,a){i.navigateUp(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:p("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(i){i.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:p("Ctrl-End","Command-End|Command-Down"),exec:function(i){i.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:p("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(i){i.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:p("Down","Down|Ctrl-N"),exec:function(i,a){i.navigateDown(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:p("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(i){i.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:p("Ctrl-Left","Option-Left"),exec:function(i){i.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:p("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(i){i.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:p("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(i){i.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:p("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(i){i.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:p("Left","Left|Ctrl-B"),exec:function(i,a){i.navigateLeft(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:p("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(i){i.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:p("Ctrl-Right","Option-Right"),exec:function(i){i.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:p("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(i){i.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:p("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(i){i.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:p("Shift-Right","Shift-Right"),exec:function(i){i.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:p("Right","Right|Ctrl-F"),exec:function(i,a){i.navigateRight(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(i){i.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:p(null,"Option-PageDown"),exec:function(i){i.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:p("PageDown","PageDown|Ctrl-V"),exec:function(i){i.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(i){i.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:p(null,"Option-PageUp"),exec:function(i){i.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(i){i.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:p("Ctrl-Up",null),exec:function(i){i.renderer.scrollBy(0,-2*i.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:p("Ctrl-Down",null),exec:function(i){i.renderer.scrollBy(0,2*i.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(i){i.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(i){i.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:p("Ctrl-Alt-E","Command-Option-E"),exec:function(i){i.commands.toggleRecording(i)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:p("Ctrl-Shift-E","Command-Shift-E"),exec:function(i){i.commands.replay(i)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:p("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(i){i.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:p("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(i){i.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:p("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(i){i.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:p(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(i){},readOnly:!0},{name:"cut",description:"Cut",exec:function(i){var a=i.$copyWithEmptySelection&&i.selection.isEmpty(),h=a?i.selection.getLineRange():i.selection.getRange();i._emit("cut",h),h.isEmpty()||i.session.remove(h),i.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(i,a){i.$handlePaste(a)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:p("Ctrl-D","Command-D"),exec:function(i){i.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:p("Ctrl-Shift-D","Command-Shift-D"),exec:function(i){i.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:p("Ctrl-Alt-S","Command-Alt-S"),exec:function(i){i.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:p("Ctrl-/","Command-/"),exec:function(i){i.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:p("Ctrl-Shift-/","Command-Shift-/"),exec:function(i){i.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:p("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(i){i.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:p("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(i){i.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:p("Ctrl-H","Command-Option-F"),exec:function(i){f.loadModule("ace/ext/searchbox",function(a){a.Search(i,!0)})}},{name:"undo",description:"Undo",bindKey:p("Ctrl-Z","Command-Z"),exec:function(i){i.undo()}},{name:"redo",description:"Redo",bindKey:p("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(i){i.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:p("Alt-Shift-Up","Command-Option-Up"),exec:function(i){i.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:p("Alt-Up","Option-Up"),exec:function(i){i.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:p("Alt-Shift-Down","Command-Option-Down"),exec:function(i){i.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:p("Alt-Down","Option-Down"),exec:function(i){i.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:p("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(i){i.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:p("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(i){i.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:p("Shift-Delete",null),exec:function(i){if(i.selection.isEmpty())i.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:p("Alt-Backspace","Command-Backspace"),exec:function(i){i.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:p("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(i){i.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:p("Ctrl-Shift-Backspace",null),exec:function(i){var a=i.selection.getRange();a.start.column=0,i.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:p("Ctrl-Shift-Delete",null),exec:function(i){var a=i.selection.getRange();a.end.column=Number.MAX_VALUE,i.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:p("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(i){i.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:p("Ctrl-Delete","Alt-Delete"),exec:function(i){i.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:p("Shift-Tab","Shift-Tab"),exec:function(i){i.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:p("Tab","Tab"),exec:function(i){i.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:p("Ctrl-[","Ctrl-["),exec:function(i){i.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:p("Ctrl-]","Ctrl-]"),exec:function(i){i.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(i,a){i.insert(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(i,a){i.insert(d.stringRepeat(a.text||"",a.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:p(null,"Ctrl-O"),exec:function(i){i.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:p("Alt-Shift-X","Ctrl-T"),exec:function(i){i.transposeLetters()},multiSelectAction:function(i){i.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:p("Ctrl-U","Ctrl-U"),exec:function(i){i.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:p("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(i){i.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:p(null,null),exec:function(i){i.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:p("Ctrl-Shift-L","Command-Shift-L"),exec:function(i){var a=i.selection.getRange();a.start.column=a.end.column=0,a.end.row++,i.selection.setRange(a,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:p("Ctrl+F3","F3"),exec:function(i){i.openLink()}},{name:"joinlines",description:"Join lines",bindKey:p(null,null),exec:function(i){for(var a=i.selection.isBackwards(),h=a?i.selection.getSelectionLead():i.selection.getSelectionAnchor(),c=a?i.selection.getSelectionAnchor():i.selection.getSelectionLead(),o=i.session.doc.getLine(h.row).length,l=i.session.doc.getTextRange(i.selection.getRange()),m=l.replace(/\n\s*/," ").length,w=i.session.doc.getLine(h.row),k=h.row+1;k<=c.row+1;k++){var R=d.stringTrimLeft(d.stringTrimRight(i.session.doc.getLine(k)));R.length!==0&&(R=" "+R),w+=R}c.row+1<i.session.doc.getLength()-1&&(w+=i.session.doc.getNewLineCharacter()),i.clearSelection(),i.session.doc.replace(new b(h.row,0,c.row+2,0),w),m>0?(i.selection.moveCursorTo(h.row,h.column),i.selection.selectTo(h.row,h.column+m)):(o=i.session.doc.getLine(h.row).length>o?o+1:o,i.selection.moveCursorTo(h.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:p(null,null),exec:function(i){var a=i.session.doc.getLength()-1,h=i.session.doc.getLine(a).length,c=i.selection.rangeList.ranges,o=[];c.length<1&&(c=[i.selection.getRange()]);for(var l=0;l<c.length;l++)l==c.length-1&&(c[l].end.row===a&&c[l].end.column===h||o.push(new b(c[l].end.row,c[l].end.column,a,h))),l===0?c[l].start.row===0&&c[l].start.column===0||o.push(new b(0,0,c[l].start.row,c[l].start.column)):o.push(new b(c[l-1].end.row,c[l-1].end.column,c[l].start.row,c[l].start.column));i.exitMultiSelectMode(),i.clearSelection();for(var l=0;l<o.length;l++)i.selection.addRange(o[l],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(i){i.selection.clearSelection(),i.navigateLineEnd(),i.insert(`
215
+ `)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(i){i.selection.clearSelection();var a=i.getCursorPosition();i.selection.moveTo(a.row-1,Number.MAX_VALUE),i.insert(`
216
+ `),a.row===0&&i.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(i){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),i.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:p("F1","F1"),exec:function(i){i.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:p(null,null),exec:function(i){i.prompt({$type:"modes"})},readOnly:!0}];for(var g=1;g<9;g++)r.commands.push({name:"foldToLevel"+g,description:"Fold To Level "+g,level:g,exec:function(i){i.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,r,u){var d=n("../lib/keys"),f=n("../mouse/default_gutter_handler").GutterTooltip,b=function(){function g(i){this.editor=i,this.gutterLayer=i.renderer.$gutterLayer,this.element=i.renderer.$gutter,this.lines=i.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new f(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(i){if(this.annotationTooltip.isOpen){i.preventDefault(),i.keyCode===d.escape&&this.annotationTooltip.hideTooltip();return}if(i.target===this.element){if(i.keyCode!=d.enter)return;i.preventDefault();var a=this.editor.getCursorPosition().row;this.editor.isRowVisible(a)||this.editor.scrollToLine(a,!0,!0),setTimeout((function(){var h=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),c=this.$findNearestFoldLaneWidget(h),o=this.$findNearestAnnotation(h);if(!(c===null&&o===null)){var l=this.$findClosestNumber(c,o,h);if(l===c)if(this.activeLane="fold",this.activeRowIndex=c,this.$isCustomWidgetVisible(c)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=o,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(i),setTimeout((function(){this.editor._signal("gutterkeydown",new p(i,this))}).bind(this),10)},g.prototype.$handleGutterKeyboardInteraction=function(i){if(i.keyCode===d.tab){i.preventDefault();return}if(i.keyCode===d.escape){i.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(i.keyCode===d.up){switch(i.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(i.keyCode===d.down){switch(i.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(i.keyCode===d.left){i.preventDefault(),this.$switchLane("annotation");return}if(i.keyCode===d.right){i.preventDefault(),this.$switchLane("fold");return}if(i.keyCode===d.enter||i.keyCode===d.space){switch(i.preventDefault(),this.activeLane){case"fold":var a=this.$rowIndexToRow(this.activeRowIndex),h=this.editor.session.$gutterCustomWidgets[a];if(h)h.callbacks&&h.callbacks.onClick&&h.callbacks.onClick(i,a);else if(this.gutterLayer.session.foldWidgets[a]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),i),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 c=this.lines.cells[this.activeRowIndex].element.childNodes[2],o=c.getBoundingClientRect(),l=this.annotationTooltip.getElement().style;l.left=o.right+"px",l.top=o.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(i){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(i)),h=this.$getFoldWidget(i).style.display!=="none";return a&&h},g.prototype.$isCustomWidgetVisible=function(i){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(i)),h=!!this.$getCustomWidget(i);return a&&h},g.prototype.$isAnnotationVisible=function(i){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(i)),h=this.$getAnnotation(i).style.display!=="none";return a&&h},g.prototype.$getFoldWidget=function(i){var a=this.lines.get(i),h=a.element;return h.childNodes[1]},g.prototype.$getCustomWidget=function(i){var a=this.lines.get(i),h=a.element;return h.childNodes[3]},g.prototype.$getAnnotation=function(i){var a=this.lines.get(i),h=a.element;return h.childNodes[2]},g.prototype.$findNearestFoldLaneWidget=function(i){if(this.$isCustomWidgetVisible(i)||this.$isFoldWidgetVisible(i))return i;for(var a=0;i-a>0||i+a<this.lines.getLength()-1;){if(a++,i-a>=0&&this.$isCustomWidgetVisible(i-a))return i-a;if(i+a<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(i+a))return i+a;if(i-a>=0&&this.$isFoldWidgetVisible(i-a))return i-a;if(i+a<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(i+a))return i+a}return null},g.prototype.$findNearestAnnotation=function(i){if(this.$isAnnotationVisible(i))return i;for(var a=0;i-a>0||i+a<this.lines.getLength()-1;){if(a++,i-a>=0&&this.$isAnnotationVisible(i-a))return i-a;if(i+a<=this.lines.getLength()-1&&this.$isAnnotationVisible(i+a))return i+a}return null},g.prototype.$focusFoldWidget=function(i){if(i!=null){var a=this.$getFoldWidget(i);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},g.prototype.$focusCustomWidget=function(i){if(i!=null){var a=this.$getCustomWidget(i);a&&(a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus())}},g.prototype.$focusAnnotation=function(i){if(i!=null){var a=this.$getAnnotation(i);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},g.prototype.$blurFoldWidget=function(i){var a=this.$getFoldWidget(i);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},g.prototype.$blurCustomWidget=function(i){var a=this.$getCustomWidget(i);a&&(a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur())},g.prototype.$blurAnnotation=function(i){var a=this.$getAnnotation(i);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},g.prototype.$moveFoldWidgetUp=function(){for(var i=this.activeRowIndex;i>0;)if(i--,this.$isFoldWidgetVisible(i)||this.$isCustomWidgetVisible(i)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=i,this.$isFoldWidgetVisible(i)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},g.prototype.$moveFoldWidgetDown=function(){for(var i=this.activeRowIndex;i<this.lines.getLength()-1;)if(i++,this.$isFoldWidgetVisible(i)||this.$isCustomWidgetVisible(i)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=i,this.$isFoldWidgetVisible(i)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},g.prototype.$moveAnnotationUp=function(){for(var i=this.activeRowIndex;i>0;)if(i--,this.$isAnnotationVisible(i)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=i,this.$focusAnnotation(this.activeRowIndex);return}},g.prototype.$moveAnnotationDown=function(){for(var i=this.activeRowIndex;i<this.lines.getLength()-1;)if(i++,this.$isAnnotationVisible(i)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=i,this.$focusAnnotation(this.activeRowIndex);return}},g.prototype.$findClosestNumber=function(i,a,h){return i===null?a:a===null||Math.abs(h-i)<=Math.abs(h-a)?i:a},g.prototype.$switchLane=function(i){switch(i){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 h=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(h===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=h,this.$isCustomWidgetVisible(h)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},g.prototype.$rowIndexToRow=function(i){var a=this.lines.get(i);return a?a.row:null},g.prototype.$rowToRowIndex=function(i){for(var a=0;a<this.lines.getLength();a++){var h=this.lines.get(a);if(h.row==i)return a}return null},g}();r.GutterKeyboardHandler=b;var p=function(){function g(i,a){this.gutterKeyboardHandler=a,this.domEvent=i}return g.prototype.getKey=function(){return d.keyCodeToString(this.domEvent.keyCode)},g.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},g.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},g.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},g}();r.GutterKeyboardEvent=p}),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,r,u){var d=this&&this.__values||function($){var C=typeof Symbol=="function"&&Symbol.iterator,N=C&&$[C],j=0;if(N)return N.call($);if($&&typeof $.length=="number")return{next:function(){return $&&j>=$.length&&($=void 0),{value:$&&$[j++],done:!$}}};throw new TypeError(C?"Object is not iterable.":"Symbol.iterator is not defined.")},f=n("./lib/oop"),b=n("./lib/dom"),p=n("./lib/lang"),g=n("./lib/useragent"),i=n("./keyboard/textinput").TextInput,a=n("./mouse/mouse_handler").MouseHandler,h=n("./mouse/fold_handler").FoldHandler,c=n("./keyboard/keybinding").KeyBinding,o=n("./edit_session").EditSession,l=n("./search").Search,m=n("./range").Range,w=n("./lib/event_emitter").EventEmitter,k=n("./commands/command_manager").CommandManager,R=n("./commands/default_commands").commands,T=n("./config"),S=n("./token_iterator").TokenIterator,x=n("./keyboard/gutter_handler").GutterKeyboardHandler,M=n("./config").nls,O=n("./clipboard"),F=n("./lib/keys"),L=n("./lib/event"),H=n("./tooltip").HoverTooltip,P=function(){function $(C,N,j){this.session,this.$toDestroy=[];var U=C.getContainerElement();this.container=U,this.renderer=C,this.id="editor"+ ++$.$uid,this.commands=new k(g.isMac?"mac":"win",R),typeof document=="object"&&(this.textInput=new i(C.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new h(this)),this.keyBinding=new c(this),this.$search=new l().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=p.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(K,Z){Z._$emitInputEvent.schedule(31)}),this.setSession(N||j&&j.session||new o("")),T.resetOptions(this),j&&this.setOptions(j),T._signal("editor",this)}return $.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},$.prototype.startOperation=function(C){this.session.startOperation(C)},$.prototype.endOperation=function(C){this.session.endOperation(C)},$.prototype.onStartOperation=function(C){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,C||(this.previousCommand=null)},$.prototype.onEndOperation=function(C){if(this.curOp&&this.session){if(C&&C.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var N=this.curOp.command,j=N&&N.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(),K=this.renderer.layerConfig;(U.start.row>=K.lastRow||U.end.row<=K.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}j=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},$.prototype.$historyTracker=function(C){if(this.$mergeUndoDeltas){var N=this.prevOp,j=this.$mergeableCommands,U=N.command&&C.command.name==N.command.name;if(C.command.name=="insertstring"){var K=C.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),U=U&&this.mergeNextCommand&&(!/\s/.test(K)||/\s/.test(N.args)),this.mergeNextCommand=!0}else U=U&&j.indexOf(C.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(U=!1),U?this.session.mergeUndoDeltas=!0:j.indexOf(C.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},$.prototype.setKeyboardHandler=function(C,N){if(C&&typeof C=="string"&&C!="ace"){this.$keybindingId=C;var j=this;T.loadModule(["keybinding",C],function(U){j.$keybindingId==C&&j.keyBinding.setKeyboardHandler(U&&U.handler),N&&N()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(C),N&&N()},$.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},$.prototype.setSession=function(C){if(this.session!=C){this.curOp&&this.endOperation(),this.curOp={};var N=this.session;if(N){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var j=this.session.getSelection();j.off("changeCursor",this.$onCursorChange),j.off("changeSelection",this.$onSelectionChange)}this.session=C,C?(this.$onDocumentChange=this.onDocumentChange.bind(this),C.on("change",this.$onDocumentChange),this.renderer.setSession(C),this.$onChangeMode=this.onChangeMode.bind(this),C.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),C.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),C.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),C.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),C.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),C.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=C.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(C)),this._signal("changeSession",{session:C,oldSession:N}),this.curOp=null,N&&N._signal("changeEditor",{oldEditor:this}),N&&(N.$editor=null),C&&C._signal("changeEditor",{editor:this}),C&&(C.$editor=this),C&&!C.destroyed&&C.bgTokenizer.scheduleStart()}},$.prototype.getSession=function(){return this.session},$.prototype.setValue=function(C,N){return this.session.doc.setValue(C),N?N==1?this.navigateFileEnd():N==-1&&this.navigateFileStart():this.selectAll(),C},$.prototype.getValue=function(){return this.session.getValue()},$.prototype.getSelection=function(){return this.selection},$.prototype.resize=function(C){this.renderer.onResize(C)},$.prototype.setTheme=function(C,N){this.renderer.setTheme(C,N)},$.prototype.getTheme=function(){return this.renderer.getTheme()},$.prototype.setStyle=function(C){this.renderer.setStyle(C)},$.prototype.unsetStyle=function(C){this.renderer.unsetStyle(C)},$.prototype.getFontSize=function(){return this.getOption("fontSize")||b.computedStyle(this.container).fontSize},$.prototype.setFontSize=function(C){this.setOption("fontSize",C)},$.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var C=this;this.$highlightPending=!0,setTimeout(function(){C.$highlightPending=!1;var N=C.session;if(!(!N||N.destroyed)){N.$bracketHighlight&&(N.$bracketHighlight.markerIds.forEach(function(ue){N.removeMarker(ue)}),N.$bracketHighlight=null);var j=C.getCursorPosition(),U=C.getKeyboardHandler(),K=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(C),Z=N.getMatchingBracketRanges(j,K);if(!Z){var te=new S(N,j.row,j.column),he=te.getCurrentToken();if(he&&/\b(?:tag-open|tag-name)/.test(he.type)){var ne=N.getMatchingTags(j);ne&&(Z=[ne.openTagName.isEmpty()?ne.openTag:ne.openTagName,ne.closeTagName.isEmpty()?ne.closeTag:ne.closeTagName])}}if(!Z&&N.$mode.getMatching&&(Z=N.$mode.getMatching(C.session)),!Z){C.getHighlightIndentGuides()&&C.renderer.$textLayer.$highlightIndentGuide();return}var ae="ace_bracket";Array.isArray(Z)?Z.length==1&&(ae="ace_error_bracket"):Z=[Z],Z.length==2&&(m.comparePoints(Z[0].end,Z[1].start)==0?Z=[m.fromPoints(Z[0].start,Z[1].end)]:m.comparePoints(Z[0].start,Z[1].end)==0&&(Z=[m.fromPoints(Z[1].start,Z[0].end)])),N.$bracketHighlight={ranges:Z,markerIds:Z.map(function(ue){return N.addMarker(ue,ae,"text")})},C.getHighlightIndentGuides()&&C.renderer.$textLayer.$highlightIndentGuide()}},50)}},$.prototype.focus=function(){this.textInput.focus()},$.prototype.isFocused=function(){return this.textInput.isFocused()},$.prototype.blur=function(){this.textInput.blur()},$.prototype.onFocus=function(C){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",C))},$.prototype.onBlur=function(C){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",C))},$.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},$.prototype.onDocumentChange=function(C){var N=this.session.$useWrapMode,j=C.start.row==C.end.row?C.end.row:1/0;this.renderer.updateLines(C.start.row,j,N),this._signal("change",C),this.$cursorChange()},$.prototype.onTokenizerUpdate=function(C){var N=C.data;this.renderer.updateLines(N.first,N.last)},$.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},$.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},$.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},$.prototype.$updateHighlightActiveLine=function(){var C=this.getSession(),N;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(N=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(N=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(N=!1)),C.$highlightLineMarker&&!N)C.removeMarker(C.$highlightLineMarker.id),C.$highlightLineMarker=null;else if(!C.$highlightLineMarker&&N){var j=new m(N.row,N.column,N.row,1/0);j.id=C.addMarker(j,"ace_active-line","screenLine"),C.$highlightLineMarker=j}else N&&(C.$highlightLineMarker.start.row=N.row,C.$highlightLineMarker.end.row=N.row,C.$highlightLineMarker.start.column=N.column,C._signal("changeBackMarker"))},$.prototype.onSelectionChange=function(C){var N=this.session;if(N.$selectionMarker&&N.removeMarker(N.$selectionMarker),N.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var j=this.selection.getRange(),U=this.getSelectionStyle();N.$selectionMarker=N.addMarker(j,"ace_selection",U)}var K=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(K),this._signal("changeSelection")},$.prototype.$getSelectionHighLightRegexp=function(){var C=this.session,N=this.getSelectionRange();if(!(N.isEmpty()||N.isMultiLine())){var j=N.start.column,U=N.end.column,K=C.getLine(N.start.row),Z=K.substring(j,U);if(!(Z.length>5e3||!/[\w\d]/.test(Z))){var te=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Z}),he=K.substring(j-1,U+1);if(te.test(he))return te}}},$.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},$.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},$.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},$.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},$.prototype.onChangeMode=function(C){this.renderer.updateText(),this._emit("changeMode",C)},$.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},$.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},$.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},$.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},$.prototype.getCopyText=function(){var C=this.getSelectedText(),N=this.session.doc.getNewLineCharacter(),j=!1;if(!C&&this.$copyWithEmptySelection){j=!0;for(var U=this.selection.getAllRanges(),K=0;K<U.length;K++){var Z=U[K];K&&U[K-1].start.row==Z.start.row||(C+=this.session.getLine(Z.start.row)+N)}}var te={text:C};return this._signal("copy",te),O.lineMode=j?te.text:!1,te.text},$.prototype.onCopy=function(){this.commands.exec("copy",this)},$.prototype.onCut=function(){this.commands.exec("cut",this)},$.prototype.onPaste=function(C,N){var j={text:C,event:N};this.commands.exec("paste",this,j)},$.prototype.$handlePaste=function(C){typeof C=="string"&&(C={text:C}),this._signal("paste",C);var N=C.text,j=N===O.lineMode,U=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)j?U.insert({row:this.selection.lead.row,column:0},N):this.insert(N);else if(j)this.selection.rangeList.ranges.forEach(function(ae){U.insert({row:ae.start.row,column:0},N)});else{var K=N.split(/\r\n|\r|\n/),Z=this.selection.rangeList.ranges,te=K.length==2&&(!K[0]||!K[1]);if(K.length!=Z.length||te)return this.commands.exec("insertstring",this,N);for(var he=Z.length;he--;){var ne=Z[he];ne.isEmpty()||U.remove(ne),U.insert(ne.start,K[he])}}},$.prototype.execCommand=function(C,N){return this.commands.exec(C,this,N)},$.prototype.insert=function(C,N){var j=this.session,U=j.getMode(),K=this.getCursorPosition();if(this.getBehavioursEnabled()&&!N){var Z=U.transformAction(j.getState(K.row),"insertion",this,j,C);Z&&(C!==Z.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),C=Z.text)}if(C==" "&&(C=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&C.indexOf(`
217
+ `)==-1){var te=m.fromPoints(K,K);te.end.column+=C.length,this.session.remove(te)}}else{var te=this.getSelectionRange();K=this.session.remove(te),this.clearSelection()}if(C==`
218
+ `||C==`\r
219
+ `){var ue=j.getLine(K.row);if(K.column>ue.search(/\S|$/)){var he=ue.substr(K.column).search(/\S|$/);j.doc.removeInLine(K.row,K.column,K.column+he)}}this.clearSelection();var ne=K.column,ae=j.getState(K.row),ue=j.getLine(K.row),ce=U.checkOutdent(ae,ue,C);if(j.insert(K,C),Z&&Z.selection&&(Z.selection.length==2?this.selection.setSelectionRange(new m(K.row,ne+Z.selection[0],K.row,ne+Z.selection[1])):this.selection.setSelectionRange(new m(K.row+Z.selection[0],Z.selection[1],K.row+Z.selection[2],Z.selection[3]))),this.$enableAutoIndent){if(j.getDocument().isNewLine(C)){var ge=U.getNextLineIndent(ae,ue.slice(0,K.column),j.getTabString());j.insert({row:K.row+1,column:0},ge)}ce&&U.autoOutdent(ae,j,K.row)}},$.prototype.autoIndent=function(){for(var C=this.session,N=C.getMode(),j=this.selection.isEmpty()?[new m(0,0,C.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",K="",Z="",te=C.getTabString(),he=0;he<j.length;he++)for(var ne=j[he].start.row,ae=j[he].end.row,ue=ne;ue<=ae;ue++){ue>0&&(U=C.getState(ue-1),K=C.getLine(ue-1),Z=N.getNextLineIndent(U,K,te));var ce=C.getLine(ue),ge=N.$getIndent(ce);if(Z!==ge){if(ge.length>0){var Ee=new m(ue,0,ue,ge.length);C.remove(Ee)}Z.length>0&&C.insert({row:ue,column:0},Z)}N.autoOutdent(U,C,ue)}},$.prototype.onTextInput=function(C,N){if(!N)return this.keyBinding.onTextInput(C);this.startOperation({command:{name:"insertstring"}});var j=this.applyComposition.bind(this,C,N);this.selection.rangeCount?this.forEachSelection(j):j(),this.endOperation()},$.prototype.applyComposition=function(C,N){if(N.extendLeft||N.extendRight){var j=this.selection.getRange();j.start.column-=N.extendLeft,j.end.column+=N.extendRight,j.start.column<0&&(j.start.row--,j.start.column+=this.session.getLine(j.start.row).length+1),this.selection.setRange(j),!C&&!j.isEmpty()&&this.remove()}if((C||!this.selection.isEmpty())&&this.insert(C,!0),N.restoreStart||N.restoreEnd){var j=this.selection.getRange();j.start.column-=N.restoreStart,j.end.column-=N.restoreEnd,this.selection.setRange(j)}},$.prototype.onCommandKey=function(C,N,j){return this.keyBinding.onCommandKey(C,N,j)},$.prototype.setOverwrite=function(C){this.session.setOverwrite(C)},$.prototype.getOverwrite=function(){return this.session.getOverwrite()},$.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},$.prototype.setScrollSpeed=function(C){this.setOption("scrollSpeed",C)},$.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},$.prototype.setDragDelay=function(C){this.setOption("dragDelay",C)},$.prototype.getDragDelay=function(){return this.getOption("dragDelay")},$.prototype.setSelectionStyle=function(C){this.setOption("selectionStyle",C)},$.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},$.prototype.setHighlightActiveLine=function(C){this.setOption("highlightActiveLine",C)},$.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},$.prototype.setHighlightGutterLine=function(C){this.setOption("highlightGutterLine",C)},$.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},$.prototype.setHighlightSelectedWord=function(C){this.setOption("highlightSelectedWord",C)},$.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},$.prototype.setAnimatedScroll=function(C){this.renderer.setAnimatedScroll(C)},$.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},$.prototype.setShowInvisibles=function(C){this.renderer.setShowInvisibles(C)},$.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},$.prototype.setDisplayIndentGuides=function(C){this.renderer.setDisplayIndentGuides(C)},$.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},$.prototype.setHighlightIndentGuides=function(C){this.renderer.setHighlightIndentGuides(C)},$.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},$.prototype.setShowPrintMargin=function(C){this.renderer.setShowPrintMargin(C)},$.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},$.prototype.setPrintMarginColumn=function(C){this.renderer.setPrintMarginColumn(C)},$.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},$.prototype.setReadOnly=function(C){this.setOption("readOnly",C)},$.prototype.getReadOnly=function(){return this.getOption("readOnly")},$.prototype.setBehavioursEnabled=function(C){this.setOption("behavioursEnabled",C)},$.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},$.prototype.setWrapBehavioursEnabled=function(C){this.setOption("wrapBehavioursEnabled",C)},$.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},$.prototype.setShowFoldWidgets=function(C){this.setOption("showFoldWidgets",C)},$.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},$.prototype.setFadeFoldWidgets=function(C){this.setOption("fadeFoldWidgets",C)},$.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},$.prototype.remove=function(C){this.selection.isEmpty()&&(C=="left"?this.selection.selectLeft():this.selection.selectRight());var N=this.getSelectionRange();if(this.getBehavioursEnabled()){var j=this.session,U=j.getState(N.start.row),K=j.getMode().transformAction(U,"deletion",this,j,N);if(N.end.column===0){var Z=j.getTextRange(N);if(Z[Z.length-1]==`
220
+ `){var te=j.getLine(N.end.row);/^\s+$/.test(te)&&(N.end.column=te.length)}}K&&(N=K)}this.session.remove(N),this.clearSelection()},$.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},$.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},$.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},$.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var C=this.getSelectionRange();C.start.column==C.end.column&&C.start.row==C.end.row&&(C.end.column=0,C.end.row++),this.session.remove(C),this.clearSelection()},$.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var C=this.getCursorPosition();this.insert(`
221
+ `),this.moveCursorToPosition(C)},$.prototype.setGhostText=function(C,N){this.renderer.setGhostText(C,N)},$.prototype.removeGhostText=function(){this.renderer.removeGhostText()},$.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var C=this.getCursorPosition(),N=C.column;if(N!==0){var j=this.session.getLine(C.row),U,K;N<j.length?(U=j.charAt(N)+j.charAt(N-1),K=new m(C.row,N-1,C.row,N+1)):(U=j.charAt(N-1)+j.charAt(N-2),K=new m(C.row,N-2,C.row,N)),this.session.replace(K,U),this.session.selection.moveToPosition(K.end)}}},$.prototype.toLowerCase=function(){var C=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),j=this.session.getTextRange(N);this.session.replace(N,j.toLowerCase()),this.selection.setSelectionRange(C)},$.prototype.toUpperCase=function(){var C=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var N=this.getSelectionRange(),j=this.session.getTextRange(N);this.session.replace(N,j.toUpperCase()),this.selection.setSelectionRange(C)},$.prototype.indent=function(){var C=this.session,N=this.getSelectionRange();if(N.start.row<N.end.row){var j=this.$getSelectedRows();C.indentRows(j.first,j.last," ");return}else if(N.start.column<N.end.column){var U=C.getTextRange(N);if(!/^\s+$/.test(U)){var j=this.$getSelectedRows();C.indentRows(j.first,j.last," ");return}}var K=C.getLine(N.start.row),Z=N.start,te=C.getTabSize(),he=C.documentToScreenColumn(Z.row,Z.column);if(this.session.getUseSoftTabs())var ne=te-he%te,ae=p.stringRepeat(" ",ne);else{for(var ne=he%te;K[N.start.column-1]==" "&&ne;)N.start.column--,ne--;this.selection.setSelectionRange(N),ae=" "}return this.insert(ae)},$.prototype.blockIndent=function(){var C=this.$getSelectedRows();this.session.indentRows(C.first,C.last," ")},$.prototype.blockOutdent=function(){var C=this.session.getSelection();this.session.outdentRows(C.getRange())},$.prototype.sortLines=function(){for(var C=this.$getSelectedRows(),N=this.session,j=[],U=C.first;U<=C.last;U++)j.push(N.getLine(U));j.sort(function(te,he){return te.toLowerCase()<he.toLowerCase()?-1:te.toLowerCase()>he.toLowerCase()?1:0});for(var K=new m(0,0,0,0),U=C.first;U<=C.last;U++){var Z=N.getLine(U);K.start.row=U,K.end.row=U,K.end.column=Z.length,N.replace(K,j[U-C.first])}},$.prototype.toggleCommentLines=function(){var C=this.session.getState(this.getCursorPosition().row),N=this.$getSelectedRows();this.session.getMode().toggleCommentLines(C,this.session,N.first,N.last)},$.prototype.toggleBlockComment=function(){var C=this.getCursorPosition(),N=this.session.getState(C.row),j=this.getSelectionRange();this.session.getMode().toggleBlockComment(N,this.session,j,C)},$.prototype.getNumberAt=function(C,N){var j=/[\-]?[0-9]+(?:\.[0-9]+)?/g;j.lastIndex=0;for(var U=this.session.getLine(C);j.lastIndex<N;){var K=j.exec(U);if(K.index<=N&&K.index+K[0].length>=N){var Z={value:K[0],start:K.index,end:K.index+K[0].length};return Z}}return null},$.prototype.modifyNumber=function(C){var N=this.selection.getCursor().row,j=this.selection.getCursor().column,U=new m(N,j-1,N,j),K=this.session.getTextRange(U);if(!isNaN(parseFloat(K))&&isFinite(K)){var Z=this.getNumberAt(N,j);if(Z){var te=Z.value.indexOf(".")>=0?Z.start+Z.value.indexOf(".")+1:Z.end,he=Z.start+Z.value.length-te,ne=parseFloat(Z.value);ne*=Math.pow(10,he),te!==Z.end&&j<te?C*=Math.pow(10,Z.end-j-1):C*=Math.pow(10,Z.end-j),ne+=C,ne/=Math.pow(10,he);var ae=ne.toFixed(he),ue=new m(N,Z.start,N,Z.end);this.session.replace(ue,ae),this.moveCursorTo(N,Math.max(Z.start+1,j+ae.length-Z.value.length))}}else this.toggleWord()},$.prototype.toggleWord=function(){var C=this.selection.getCursor().row,N=this.selection.getCursor().column;this.selection.selectWord();var j=this.getSelectedText(),U=this.selection.getWordRange().start.column,K=j.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),Z=N-U-1;Z<0&&(Z=0);var te=0,he=0,ne=this;j.match(/[A-Za-z0-9_]+/)&&K.forEach(function(Ge,ft){he=te+Ge.length,Z>=te&&Z<=he&&(j=Ge,ne.selection.clearSelection(),ne.moveCursorTo(C,te+U),ne.selection.selectTo(C,he+U)),te=he});for(var ae=this.$toggleWordPairs,ue,ce=0;ce<ae.length;ce++)for(var ge=ae[ce],Ee=0;Ee<=1;Ee++){var Re=+!Ee,Le=j.match(new RegExp("^\\s?_?("+p.escapeRegExp(ge[Ee])+")\\s?$","i"));if(Le){var Xe=j.match(new RegExp("([_]|^|\\s)("+p.escapeRegExp(Le[1])+")($|\\s)","g"));Xe&&(ue=j.replace(new RegExp(p.escapeRegExp(ge[Ee]),"i"),function(Ge){var ft=ge[Re];return Ge.toUpperCase()==Ge?ft=ft.toUpperCase():Ge.charAt(0).toUpperCase()==Ge.charAt(0)&&(ft=ft.substr(0,0)+ge[Re].charAt(0).toUpperCase()+ft.substr(1)),ft}),this.insert(ue),ue="")}}},$.prototype.findLinkAt=function(C,N){var j,U,K=this.session.getLine(C),Z=K.split(/((?:https?|ftp):\/\/[\S]+)/),te=N;te<0&&(te=0);var he=0,ne=0,ae;try{for(var ue=d(Z),ce=ue.next();!ce.done;ce=ue.next()){var ge=ce.value;if(ne=he+ge.length,te>=he&&te<=ne&&ge.match(/((?:https?|ftp):\/\/[\S]+)/)){ae=ge.replace(/[\s:.,'";}\]]+$/,"");break}he=ne}}catch(Ee){j={error:Ee}}finally{try{ce&&!ce.done&&(U=ue.return)&&U.call(ue)}finally{if(j)throw j.error}}return ae},$.prototype.openLink=function(){var C=this.selection.getCursor(),N=this.findLinkAt(C.row,C.column);return N&&window.open(N,"_blank"),N!=null},$.prototype.removeLines=function(){var C=this.$getSelectedRows();this.session.removeFullLines(C.first,C.last),this.clearSelection()},$.prototype.duplicateSelection=function(){var C=this.selection,N=this.session,j=C.getRange(),U=C.isBackwards();if(j.isEmpty()){var K=j.start.row;N.duplicateLines(K,K)}else{var Z=U?j.start:j.end,te=N.insert(Z,N.getTextRange(j));j.start=Z,j.end=te,C.setSelectionRange(j,U)}},$.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},$.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},$.prototype.moveText=function(C,N,j){return this.session.moveText(C,N,j)},$.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},$.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},$.prototype.$moveLines=function(C,N){var j,U,K=this.selection;if(!K.inMultiSelectMode||this.inVirtualSelectionMode){var Z=K.toOrientedRange();j=this.$getSelectedRows(Z),U=this.session.$moveLines(j.first,j.last,N?0:C),N&&C==-1&&(U=0),Z.moveBy(U,0),K.fromOrientedRange(Z)}else{var te=K.rangeList.ranges;K.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var he=0,ne=0,ae=te.length,ue=0;ue<ae;ue++){var ce=ue;te[ue].moveBy(he,0),j=this.$getSelectedRows(te[ue]);for(var ge=j.first,Ee=j.last;++ue<ae;){ne&&te[ue].moveBy(ne,0);var Re=this.$getSelectedRows(te[ue]);if(N&&Re.first!=Ee||!N&&Re.first>Ee+1)break;Ee=Re.last}for(ue--,he=this.session.$moveLines(ge,Ee,N?0:C),N&&C==-1&&(ce=ue+1);ce<=ue;)te[ce].moveBy(he,0),ce++;N||(he=0),ne+=he}K.fromOrientedRange(K.ranges[0]),K.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},$.prototype.$getSelectedRows=function(C){return C=(C||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(C.start.row),last:this.session.getRowFoldEnd(C.end.row)}},$.prototype.onCompositionStart=function(C){this.renderer.showComposition(C)},$.prototype.onCompositionUpdate=function(C){this.renderer.setCompositionText(C)},$.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},$.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},$.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},$.prototype.isRowVisible=function(C){return C>=this.getFirstVisibleRow()&&C<=this.getLastVisibleRow()},$.prototype.isRowFullyVisible=function(C){return C>=this.renderer.getFirstFullyVisibleRow()&&C<=this.renderer.getLastFullyVisibleRow()},$.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},$.prototype.$moveByPage=function(C,N){var j=this.renderer,U=this.renderer.layerConfig,K=C*Math.floor(U.height/U.lineHeight);N===!0?this.selection.$moveSelection(function(){this.moveCursorBy(K,0)}):N===!1&&(this.selection.moveCursorBy(K,0),this.selection.clearSelection());var Z=j.scrollTop;j.scrollBy(0,K*U.lineHeight),N!=null&&j.scrollCursorIntoView(null,.5),j.animateScrolling(Z)},$.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},$.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},$.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},$.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},$.prototype.scrollPageDown=function(){this.$moveByPage(1)},$.prototype.scrollPageUp=function(){this.$moveByPage(-1)},$.prototype.scrollToRow=function(C){this.renderer.scrollToRow(C)},$.prototype.scrollToLine=function(C,N,j,U){this.renderer.scrollToLine(C,N,j,U)},$.prototype.centerSelection=function(){var C=this.getSelectionRange(),N={row:Math.floor(C.start.row+(C.end.row-C.start.row)/2),column:Math.floor(C.start.column+(C.end.column-C.start.column)/2)};this.renderer.alignCursor(N,.5)},$.prototype.getCursorPosition=function(){return this.selection.getCursor()},$.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},$.prototype.getSelectionRange=function(){return this.selection.getRange()},$.prototype.selectAll=function(){this.selection.selectAll()},$.prototype.clearSelection=function(){this.selection.clearSelection()},$.prototype.moveCursorTo=function(C,N){this.selection.moveCursorTo(C,N)},$.prototype.moveCursorToPosition=function(C){this.selection.moveCursorToPosition(C)},$.prototype.jumpToMatching=function(C,N){var j=this.getCursorPosition(),U=new S(this.session,j.row,j.column),K=U.getCurrentToken(),Z=0;K&&K.type.indexOf("tag-name")!==-1&&(K=U.stepBackward());var te=K||U.stepForward();if(te){var he,ne=!1,ae={},ue=j.column-te.start,ce,ge={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(te.value.match(/[{}()\[\]]/g)){for(;ue<te.value.length&&!ne;ue++)if(ge[te.value[ue]])switch(ce=ge[te.value[ue]]+"."+te.type.replace("rparen","lparen"),isNaN(ae[ce])&&(ae[ce]=0),te.value[ue]){case"(":case"[":case"{":ae[ce]++;break;case")":case"]":case"}":ae[ce]--,ae[ce]===-1&&(he="bracket",ne=!0);break}}else te.type.indexOf("tag-name")!==-1&&(isNaN(ae[te.value])&&(ae[te.value]=0),K.value==="<"&&Z>1?ae[te.value]++:K.value==="</"&&ae[te.value]--,ae[te.value]===-1&&(he="tag",ne=!0));ne||(K=te,Z++,te=U.stepForward(),ue=0)}while(te&&!ne);if(he){var Ee,Re;if(he==="bracket")Ee=this.session.getBracketRange(j),Ee||(Ee=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ue-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ue-1),Re=Ee.start,(N||Re.row===j.row&&Math.abs(Re.column-j.column)<2)&&(Ee=this.session.getBracketRange(Re)));else if(he==="tag"){if(!te||te.type.indexOf("tag-name")===-1)return;if(Ee=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2,U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2),Ee.compare(j.row,j.column)===0){var Le=this.session.getMatchingTags(j);Le&&(Le.openTag.contains(j.row,j.column)?(Ee=Le.closeTag,Re=Ee.start):(Ee=Le.openTag,Le.closeTag.start.row===j.row&&Le.closeTag.start.column===j.column?Re=Ee.end:Re=Ee.start))}Re=Re||Ee.start}Re=Ee&&Ee.cursor||Re,Re&&(C?Ee&&N?this.selection.setRange(Ee):Ee&&Ee.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Re.row,Re.column):this.selection.moveTo(Re.row,Re.column))}}},$.prototype.gotoLine=function(C,N,j){this.selection.clearSelection(),this.session.unfold({row:C-1,column:N||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(C-1,N||0),this.isRowFullyVisible(C-1)||this.scrollToLine(C-1,!0,j)},$.prototype.navigateTo=function(C,N){this.selection.moveTo(C,N)},$.prototype.navigateUp=function(C){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(-C||-1,0)},$.prototype.navigateDown=function(C){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var N=this.selection.anchor.getPosition();return this.moveCursorToPosition(N)}this.selection.clearSelection(),this.selection.moveCursorBy(C||1,0)},$.prototype.navigateLeft=function(C){if(this.selection.isEmpty())for(C=C||1;C--;)this.selection.moveCursorLeft();else{var N=this.getSelectionRange().start;this.moveCursorToPosition(N)}this.clearSelection()},$.prototype.navigateRight=function(C){if(this.selection.isEmpty())for(C=C||1;C--;)this.selection.moveCursorRight();else{var N=this.getSelectionRange().end;this.moveCursorToPosition(N)}this.clearSelection()},$.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},$.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},$.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},$.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},$.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},$.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},$.prototype.replace=function(C,N){N&&this.$search.set(N);var j=this.$search.find(this.session),U=0;return j&&(this.$tryReplace(j,C)&&(U=1),this.selection.setSelectionRange(j),this.renderer.scrollSelectionIntoView(j.start,j.end)),U},$.prototype.replaceAll=function(C,N){N&&this.$search.set(N);var j=this.$search.findAll(this.session),U=0;if(!j.length)return U;var K=this.getSelectionRange();this.selection.moveTo(0,0);for(var Z=j.length-1;Z>=0;--Z)this.$tryReplace(j[Z],C)&&U++;return this.selection.setSelectionRange(K),U},$.prototype.$tryReplace=function(C,N){var j=this.session.getTextRange(C);return N=this.$search.replace(j,N),N!==null?(C.end=this.session.replace(C,N),C):null},$.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},$.prototype.find=function(C,N,j){N||(N={}),typeof C=="string"||C instanceof RegExp?N.needle=C:typeof C=="object"&&f.mixin(N,C);var U=this.selection.getRange();N.needle==null&&(C=this.session.getTextRange(U)||this.$search.$options.needle,C||(U=this.session.getWordRange(U.start.row,U.start.column),C=this.session.getTextRange(U)),this.$search.set({needle:C})),this.$search.set(N),N.start||this.$search.set({start:U});var K=this.$search.find(this.session);if(N.preventScroll)return K;if(K)return this.revealRange(K,j),K;N.backwards?U.start=U.end:U.end=U.start,this.selection.setRange(U)},$.prototype.findNext=function(C,N){this.find({skipCurrent:!0,backwards:!1},C,N)},$.prototype.findPrevious=function(C,N){this.find(C,{skipCurrent:!0,backwards:!0},N)},$.prototype.revealRange=function(C,N){this.session.unfold(C),this.selection.setSelectionRange(C);var j=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(C.start,C.end,.5),N!==!1&&this.renderer.animateScrolling(j)},$.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},$.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},$.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(C){C.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},$.prototype.setAutoScrollEditorIntoView=function(C){if(C){var N,j=this,U=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var K=this.$scrollAnchor;K.style.cssText="position:absolute",this.container.insertBefore(K,this.container.firstChild);var Z=this.on("changeSelection",function(){U=!0}),te=this.renderer.on("beforeRender",function(){U&&(N=j.renderer.container.getBoundingClientRect())}),he=this.renderer.on("afterRender",function(){if(U&&N&&(j.isFocused()||j.searchBox&&j.searchBox.isFocused())){var ne=j.renderer,ae=ne.$cursorLayer.$pixelPos,ue=ne.layerConfig,ce=ae.top-ue.offset;ae.top>=0&&ce+N.top<0?U=!0:ae.top<ue.height&&ae.top+N.top+ue.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(K.style.top=ce+"px",K.style.left=ae.left+"px",K.style.height=ue.lineHeight+"px",K.scrollIntoView(U)),U=N=null}});this.setAutoScrollEditorIntoView=function(ne){ne||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Z),this.renderer.off("afterRender",he),this.renderer.off("beforeRender",te))}}},$.prototype.$resetCursorStyle=function(){var C=this.$cursorStyle||"ace",N=this.renderer.$cursorLayer;N&&(N.setSmoothBlinking(/smooth/.test(C)),N.isBlinking=!this.$readOnly&&C!="wide",b.setCssClass(N.element,"ace_slim-cursors",/slim/.test(C)))},$.prototype.prompt=function(C,N,j){var U=this;T.loadModule("ace/ext/prompt",function(K){K.prompt(U,C,N,j)})},$}();P.$uid=0,P.prototype.curOp=null,P.prototype.prevOp={},P.prototype.$mergeableCommands=["backspace","del","insertstring"],P.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],f.implement(P.prototype,w),T.defineOptions(P.prototype,"editor",{selectionStyle:{set:function($){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:$})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function($){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function($){var C=this;this.textInput.setReadOnly($),this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(j){var U=!1;if(j&&j.type=="keydown"){if(U=j&&j.key&&j.key.length==1&&!j.ctrlKey&&!j.metaKey,!U)return}else j&&j.type!=="exec"&&(U=!0);if(U){C.hoverTooltip||(C.hoverTooltip=new H);var K=b.createElement("div");K.textContent=M("editor.tooltip.disable-editing","Editing is disabled"),C.hoverTooltip.isOpen||C.hoverTooltip.showForRange(C,C.getSelectionRange(),K)}else C.hoverTooltip&&C.hoverTooltip.isOpen&&C.hoverTooltip.hide()});var N=this.textInput.getElement();$?(L.addListener(N,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(L.removeListener(N,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))},initialValue:!1},copyWithEmptySelection:{set:function($){this.textInput.setCopyWithEmptySelection($)},initialValue:!1},cursorStyle:{set:function($){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function($){this.setAutoScrollEditorIntoView($)}},keyboardHandler:{set:function($){this.setKeyboardHandler($)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function($){this.session.setValue($)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function($){this.setSession($)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function($){this.renderer.$gutterLayer.setShowLineNumbers($),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),$&&this.$relativeLineNumbers?I.attach(this):I.detach(this)},initialValue:!0},relativeLineNumbers:{set:function($){this.$showLineNumbers&&$?I.attach(this):I.detach(this)}},placeholder:{set:function($){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var C=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(C&&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(!C&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),b.addCssClass(this.container,"ace_hasPlaceholder");var N=b.createElement("div");N.className="ace_placeholder",N.textContent=this.$placeholder||"",this.renderer.placeholderNode=N,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!C&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function($){var C={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(U){U.blur(),U.renderer.scroller.focus()},readOnly:!0},N=function(U){if(U.target==this.renderer.scroller&&U.keyCode===F.enter){U.preventDefault();var K=this.getCursorPosition().row;this.isRowVisible(K)||this.scrollToLine(K,!0,!0),this.focus()}},j;$?(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",M("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",M("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",N.bind(this)),this.commands.addCommand(C),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",M("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",M("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 x(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",N.bind(this)),this.commands.removeCommand(C),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),j&&j.removeListener())},initialValue:!1},textInputAriaLabel:{set:function($){this.$textInputAriaLabel=$},initialValue:""},enableMobileMenu:{set:function($){this.$enableMobileMenu=$},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var I={getText:function($,C){return(Math.abs($.selection.lead.row-C)||C+1+(C<9?"·":""))+""},getWidth:function($,C,N){return Math.max(C.toString().length,(N.lastRow+1).toString().length,2)*N.characterWidth},update:function($,C){C.renderer.$loop.schedule(C.renderer.CHANGE_GUTTER)},attach:function($){$.renderer.$gutterLayer.$renderer=this,$.on("changeSelection",this.update),this.update(null,$)},detach:function($){$.renderer.$gutterLayer.$renderer==this&&($.renderer.$gutterLayer.$renderer=null),$.off("changeSelection",this.update),this.update(null,$)}};r.Editor=P}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(n,r,u){var d=n("../lib/dom"),f=function(){function b(p,g){this.element=p,this.canvasHeight=g||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return b.prototype.moveContainer=function(p){d.translate(this.element,0,-(p.firstRowScreen*p.lineHeight%this.canvasHeight)-p.offset*this.$offsetCoefficient)},b.prototype.pageChanged=function(p,g){return Math.floor(p.firstRowScreen*p.lineHeight/this.canvasHeight)!==Math.floor(g.firstRowScreen*g.lineHeight/this.canvasHeight)},b.prototype.computeLineTop=function(p,g,i){var a=g.firstRowScreen*g.lineHeight,h=Math.floor(a/this.canvasHeight),c=i.documentToScreenRow(p,0)*g.lineHeight;return c-h*this.canvasHeight},b.prototype.computeLineHeight=function(p,g,i){return g.lineHeight*i.getRowLineCount(p)},b.prototype.getLength=function(){return this.cells.length},b.prototype.get=function(p){return this.cells[p]},b.prototype.shift=function(){this.$cacheCell(this.cells.shift())},b.prototype.pop=function(){this.$cacheCell(this.cells.pop())},b.prototype.push=function(p){if(Array.isArray(p)){this.cells.push.apply(this.cells,p);for(var g=d.createFragment(this.element),i=0;i<p.length;i++)g.appendChild(p[i].element);this.element.appendChild(g)}else this.cells.push(p),this.element.appendChild(p.element)},b.prototype.unshift=function(p){if(Array.isArray(p)){this.cells.unshift.apply(this.cells,p);for(var g=d.createFragment(this.element),i=0;i<p.length;i++)g.appendChild(p[i].element);this.element.firstChild?this.element.insertBefore(g,this.element.firstChild):this.element.appendChild(g)}else this.cells.unshift(p),this.element.insertAdjacentElement("afterbegin",p.element)},b.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},b.prototype.$cacheCell=function(p){p&&(p.element.remove(),this.cellCache.push(p))},b.prototype.createCell=function(p,g,i,a){var h=this.cellCache.pop();if(!h){var c=d.createElement("div");a&&a(c),this.element.appendChild(c),h={element:c,text:"",row:p}}return h.row=p,h},b}();r.Lines=f}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(n,r,u){var d=n("../lib/dom"),f=n("../lib/oop"),b=n("../lib/lang"),p=n("../lib/event_emitter").EventEmitter,g=n("./lines").Lines,i=n("../config").nls,a=function(){function c(o){this.element=d.createElement("div"),this.element.className="ace_layer ace_gutter-layer",o.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new g(this.element),this.$lines.$offsetCoefficient=1}return c.prototype.setSession=function(o){this.session&&this.session.off("change",this.$updateAnnotations),this.session=o,o&&o.on("change",this.$updateAnnotations)},c.prototype.addGutterDecoration=function(o,l){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(o,l)},c.prototype.removeGutterDecoration=function(o,l){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(o,l)},c.prototype.setAnnotations=function(o){this.$annotations=[];for(var l=0;l<o.length;l++){var m=o[l],w=m.row,k=this.$annotations[w];k||(k=this.$annotations[w]={text:[],type:[],displayText:[]});var R=m.text,T=m.text,S=m.type;R=R?b.escapeHTML(R):m.html||"",T=T||m.html||"",k.text.indexOf(R)===-1&&(k.text.push(R),k.type.push(S),k.displayText.push(T));var x=m.className;x?k.className=x:S==="error"?k.className=" ace_error":S==="security"&&!/\bace_error\b/.test(k.className)?k.className=" ace_security":S==="warning"&&!/\bace_(error|security)\b/.test(k.className)?k.className=" ace_warning":S==="info"&&!k.className?k.className=" ace_info":S==="hint"&&!k.className&&(k.className=" ace_hint")}},c.prototype.$updateAnnotations=function(o){if(this.$annotations.length){var l=o.start.row,m=o.end.row-l;if(m!==0)if(o.action=="remove")this.$annotations.splice(l,m+1,null);else{var w=new Array(m+1);w.unshift(l,1),this.$annotations.splice.apply(this.$annotations,w)}}},c.prototype.update=function(o){this.config=o;var l=this.session,m=o.firstRow,w=Math.min(o.lastRow+o.gutterOffset,l.getLength()-1);this.oldLastRow=w,this.config=o,this.$lines.moveContainer(o),this.$updateCursorRow();for(var k=l.getNextFoldLine(m),R=k?k.start.row:1/0,T=null,S=-1,x=m;;){if(x>R&&(x=k.end.row+1,k=l.getNextFoldLine(x,k),R=k?k.start.row:1/0),x>w){for(;this.$lines.getLength()>S+1;)this.$lines.pop();break}T=this.$lines.get(++S),T?T.row=x:(T=this.$lines.createCell(x,o,this.session,h),this.$lines.push(T)),this.$renderCell(T,o,k,x),x++}this._signal("afterRender"),this.$updateGutterWidth(o)},c.prototype.$updateGutterWidth=function(o){var l=this.session,m=l.gutterRenderer||this.$renderer,w=l.$firstLineNumber,k=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||l.$useWrapMode)&&(k=l.getLength()+w-1);var R=m?m.getWidth(l,k,o):k.toString().length*o.characterWidth,T=this.$padding||this.$computePadding();R+=T.left+T.right,R!==this.gutterWidth&&!isNaN(R)&&(this.gutterWidth=R,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",R))},c.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var o=this.session.selection.getCursor();this.$cursorRow!==o.row&&(this.$cursorRow=o.row)}},c.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var o=this.session.selection.cursor.row;if(this.$cursorRow=o,!(this.$cursorCell&&this.$cursorCell.row==o)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var l=this.$lines.cells;this.$cursorCell=null;for(var m=0;m<l.length;m++){var w=l[m];if(w.row>=this.$cursorRow){if(w.row>this.$cursorRow){var k=this.session.getFoldLine(this.$cursorRow);if(m>0&&k&&k.start.row==l[m-1].row)w=l[m-1];else break}w.element.className="ace_gutter-active-line "+w.element.className,this.$cursorCell=w;break}}}}},c.prototype.scrollLines=function(o){var l=this.config;if(this.config=o,this.$updateCursorRow(),this.$lines.pageChanged(l,o))return this.update(o);this.$lines.moveContainer(o);var m=Math.min(o.lastRow+o.gutterOffset,this.session.getLength()-1),w=this.oldLastRow;if(this.oldLastRow=m,!l||w<o.firstRow)return this.update(o);if(m<l.firstRow)return this.update(o);if(l.firstRow<o.firstRow)for(var k=this.session.getFoldedRowCount(l.firstRow,o.firstRow-1);k>0;k--)this.$lines.shift();if(w>m)for(var k=this.session.getFoldedRowCount(m+1,w);k>0;k--)this.$lines.pop();o.firstRow<l.firstRow&&this.$lines.unshift(this.$renderLines(o,o.firstRow,l.firstRow-1)),m>w&&this.$lines.push(this.$renderLines(o,w+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(o)},c.prototype.$renderLines=function(o,l,m){for(var w=[],k=l,R=this.session.getNextFoldLine(k),T=R?R.start.row:1/0;k>T&&(k=R.end.row+1,R=this.session.getNextFoldLine(k,R),T=R?R.start.row:1/0),!(k>m);){var S=this.$lines.createCell(k,o,this.session,h);this.$renderCell(S,o,R,k),w.push(S),k++}return w},c.prototype.$renderCell=function(o,l,m,w){var k=o.element,R=this.session,T=k.childNodes[0],S=k.childNodes[1],x=k.childNodes[2],M=k.childNodes[3],O=x.firstChild,F=R.$firstLineNumber,L=R.$breakpoints,H=R.$decorations,P=R.gutterRenderer||this.$renderer,I=this.$showFoldWidgets&&R.foldWidgets,$=m?m.start.row:Number.MAX_VALUE,C=l.lineHeight+"px",N=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",j=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",U=(P?P.getText(R,w):w+F).toString();if(this.$highlightGutterLine&&(w==this.$cursorRow||m&&w<this.$cursorRow&&w>=$&&this.$cursorRow<=m.end.row)&&(N+="ace_gutter-active-line ",this.$cursorCell!=o&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=o)),L[w]&&(N+=L[w]),H[w]&&(N+=H[w]),this.$annotations[w]&&w!==$&&(N+=this.$annotations[w].className),I){var K=I[w];K==null&&(K=I[w]=R.getFoldWidget(w))}if(K){var Z="ace_fold-widget ace_"+K,te=K=="start"&&w==$&&w<m.end.row;if(te){Z+=" ace_closed";for(var he="",ne=!1,ae=w+1;ae<=m.end.row;ae++)if(this.$annotations[ae]){if(this.$annotations[ae].className===" ace_error"){ne=!0,he=" ace_error_fold";break}this.$annotations[ae].className===" ace_security"?(ne=!0,he=" ace_security_fold"):this.$annotations[ae].className===" ace_warning"&&he!==" ace_security_fold"&&(ne=!0,he=" ace_warning_fold")}N+=he}else Z+=" ace_open";S.className!=Z&&(S.className=Z),d.setStyle(S.style,"height",C),d.setStyle(S.style,"display","inline-block"),S.setAttribute("role","button"),S.setAttribute("tabindex","-1");var ue=R.getFoldWidgetRange(w);ue?S.setAttribute("aria-label",i("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[ue.start.row+1,ue.end.row+1])):m?S.setAttribute("aria-label",i("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[m.start.row+1,m.end.row+1])):S.setAttribute("aria-label",i("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[w+1])),te?(S.setAttribute("aria-expanded","false"),S.setAttribute("title",i("gutter.code-folding.closed.title","Unfold code"))):(S.setAttribute("aria-expanded","true"),S.setAttribute("title",i("gutter.code-folding.open.title","Fold code")))}else S&&(d.setStyle(S.style,"display","none"),S.setAttribute("tabindex","0"),S.removeAttribute("role"),S.removeAttribute("aria-label"));var ce=this.session.$gutterCustomWidgets[w];if(ce?this.$addCustomWidget(w,ce,o):M&&this.$removeCustomWidget(w,o),ne&&this.$showFoldedAnnotations){x.className="ace_gutter_annotation",O.className=j,O.className+=he,d.setStyle(O.style,"height",C),d.setStyle(x.style,"display","block"),d.setStyle(x.style,"height",C);var ge;switch(he){case" ace_error_fold":ge=i("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security_fold":ge=i("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning_fold":ge=i("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break}x.setAttribute("aria-label",ge),x.setAttribute("tabindex","-1"),x.setAttribute("role","button")}else if(this.$annotations[w]){x.className="ace_gutter_annotation",O.className=j,this.$useSvgGutterIcons?O.className+=this.$annotations[w].className:k.classList.add(this.$annotations[w].className.replace(" ","")),d.setStyle(O.style,"height",C),d.setStyle(x.style,"display","block"),d.setStyle(x.style,"height",C);var ge;switch(this.$annotations[w].className){case" ace_error":ge=i("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security":ge=i("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning":ge=i("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break;case" ace_info":ge=i("gutter.annotation.aria-label.info","Info, read annotations row $0",[U]);break;case" ace_hint":ge=i("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[U]);break}x.setAttribute("aria-label",ge),x.setAttribute("tabindex","-1"),x.setAttribute("role","button")}else d.setStyle(x.style,"display","none"),x.removeAttribute("aria-label"),x.removeAttribute("role"),x.setAttribute("tabindex","0");return U!==T.data&&(T.data=U),k.className!=N&&(k.className=N),d.setStyle(o.element.style,"height",this.$lines.computeLineHeight(w,l,R)+"px"),d.setStyle(o.element.style,"top",this.$lines.computeLineTop(w,l,R)+"px"),o.text=U,x.style.display==="none"&&S.style.display==="none"&&!ce?o.element.setAttribute("aria-hidden",!0):o.element.setAttribute("aria-hidden",!1),o},c.prototype.setHighlightGutterLine=function(o){this.$highlightGutterLine=o},c.prototype.setShowLineNumbers=function(o){this.$renderer=!o&&{getWidth:function(){return 0},getText:function(){return""}}},c.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},c.prototype.setShowFoldWidgets=function(o){o?d.addCssClass(this.element,"ace_folding-enabled"):d.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=o,this.$padding=null},c.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},c.prototype.$hideFoldWidget=function(o,l){var m=l||this.$getGutterCell(o);if(m&&m.element){var w=m.element.childNodes[1];w&&d.setStyle(w.style,"display","none")}},c.prototype.$showFoldWidget=function(o,l){var m=l||this.$getGutterCell(o);if(m&&m.element){var w=m.element.childNodes[1];w&&this.session.foldWidgets&&this.session.foldWidgets[m.row]&&d.setStyle(w.style,"display","inline-block")}},c.prototype.$getGutterCell=function(o){var l=this.$lines.cells,m=this.session.documentToScreenRow(o,0);return l[o-this.config.firstRowScreen-(o-m)]},c.prototype.$addCustomWidget=function(o,l,m){var w=l.className,k=l.label,R=l.title,T=l.callbacks;this.session.$gutterCustomWidgets[o]={className:w,label:k,title:R,callbacks:T},this.$hideFoldWidget(o,m);var S=m||this.$getGutterCell(o);if(S&&S.element){var x=S.element.querySelector(".ace_custom-widget");x&&x.remove(),x=d.createElement("span"),x.className="ace_custom-widget ".concat(w),x.setAttribute("tabindex","-1"),x.setAttribute("role","button"),x.setAttribute("aria-label",k),x.setAttribute("title",R),d.setStyle(x.style,"display","inline-block"),d.setStyle(x.style,"height","inherit"),T&&T.onClick&&x.addEventListener("click",function(M){T.onClick(M,o),M.stopPropagation()}),S.element.appendChild(x)}},c.prototype.$removeCustomWidget=function(o,l){delete this.session.$gutterCustomWidgets[o],this.$showFoldWidget(o,l);var m=l||this.$getGutterCell(o);if(m&&m.element){var w=m.element.querySelector(".ace_custom-widget");w&&m.element.removeChild(w)}},c.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var o=d.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(o.borderLeftWidth)||0)+(parseInt(o.paddingLeft)||0)+1,this.$padding.right=(parseInt(o.borderRightWidth)||0)+(parseInt(o.paddingRight)||0),this.$padding},c.prototype.getRegion=function(o){var l=this.$padding||this.$computePadding(),m=this.element.getBoundingClientRect();if(o.x<l.left+m.left)return"markers";if(this.$showFoldWidgets&&o.x>m.right-l.right)return"foldWidgets"},c}();a.prototype.$fixedWidth=!1,a.prototype.$highlightGutterLine=!0,a.prototype.$renderer="",a.prototype.$showLineNumbers=!0,a.prototype.$showFoldWidgets=!0,f.implement(a.prototype,p);function h(c){var o=document.createTextNode("");c.appendChild(o);var l=d.createElement("span");c.appendChild(l);var m=d.createElement("span");c.appendChild(m);var w=d.createElement("span");return m.appendChild(w),c}r.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(n,r,u){var d=n("../range").Range,f=n("../lib/dom"),b=function(){function g(i){this.element=f.createElement("div"),this.element.className="ace_layer ace_marker-layer",i.appendChild(this.element)}return g.prototype.setPadding=function(i){this.$padding=i},g.prototype.setSession=function(i){this.session=i},g.prototype.setMarkers=function(i){this.markers=i},g.prototype.elt=function(i,a){var h=this.i!=-1&&this.element.childNodes[this.i];h?this.i++:(h=document.createElement("div"),this.element.appendChild(h),this.i=-1),h.style.cssText=a,h.className=i},g.prototype.update=function(i){if(i){this.config=i,this.i=0;var a;for(var h in this.markers){var c=this.markers[h];if(!c.range){c.update(a,this,this.session,i);continue}var o=c.range.clipRows(i.firstRow,i.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),c.renderer){var l=this.$getTop(o.start.row,i),m=this.$padding+o.start.column*i.characterWidth;c.renderer(a,o,m,l,i)}else c.type=="fullLine"?this.drawFullLineMarker(a,o,c.clazz,i):c.type=="screenLine"?this.drawScreenLineMarker(a,o,c.clazz,i):o.isMultiLine()?c.type=="text"?this.drawTextMarker(a,o,c.clazz,i):this.drawMultiLineMarker(a,o,c.clazz,i):this.drawSingleLineMarker(a,o,c.clazz+" ace_start ace_br15",i)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},g.prototype.$getTop=function(i,a){return(i-a.firstRowScreen)*a.lineHeight},g.prototype.drawTextMarker=function(i,a,h,c,o){for(var l=this.session,m=a.start.row,w=a.end.row,k=m,R=0,T=0,S=l.getScreenLastRowColumn(k),x=new d(k,a.start.column,k,T);k<=w;k++)x.start.row=x.end.row=k,x.start.column=k==m?a.start.column:l.getRowWrapIndent(k),x.end.column=S,R=T,T=S,S=k+1<w?l.getScreenLastRowColumn(k+1):k==w?0:a.end.column,this.drawSingleLineMarker(i,x,h+(k==m?" ace_start":"")+" ace_br"+p(k==m||k==m+1&&a.start.column,R<T,T>S,k==w),c,k==w?0:1,o)},g.prototype.drawMultiLineMarker=function(i,a,h,c,o){var l=this.$padding,m=c.lineHeight,w=this.$getTop(a.start.row,c),k=l+a.start.column*c.characterWidth;if(o=o||"",this.session.$bidiHandler.isBidiRow(a.start.row)){var R=a.clone();R.end.row=R.start.row,R.end.column=this.session.getLine(R.start.row).length,this.drawBidiSingleLineMarker(i,R,h+" ace_br1 ace_start",c,null,o)}else this.elt(h+" ace_br1 ace_start","height:"+m+"px;right:"+l+"px;top:"+w+"px;left:"+k+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var R=a.clone();R.start.row=R.end.row,R.start.column=0,this.drawBidiSingleLineMarker(i,R,h+" ace_br12",c,null,o)}else{w=this.$getTop(a.end.row,c);var T=a.end.column*c.characterWidth;this.elt(h+" ace_br12","height:"+m+"px;width:"+T+"px;top:"+w+"px;left:"+l+"px;"+(o||""))}if(m=(a.end.row-a.start.row-1)*c.lineHeight,!(m<=0)){w=this.$getTop(a.start.row+1,c);var S=(a.start.column?1:0)|(a.end.column?0:8);this.elt(h+(S?" ace_br"+S:""),"height:"+m+"px;right:"+l+"px;top:"+w+"px;left:"+l+"px;"+(o||""))}},g.prototype.drawSingleLineMarker=function(i,a,h,c,o,l){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(i,a,h,c,o,l);var m=c.lineHeight,w=(a.end.column+(o||0)-a.start.column)*c.characterWidth,k=this.$getTop(a.start.row,c),R=this.$padding+a.start.column*c.characterWidth;this.elt(h,"height:"+m+"px;width:"+w+"px;top:"+k+"px;left:"+R+"px;"+(l||""))},g.prototype.drawBidiSingleLineMarker=function(i,a,h,c,o,l){var m=c.lineHeight,w=this.$getTop(a.start.row,c),k=this.$padding,R=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);R.forEach(function(T){this.elt(h,"height:"+m+"px;width:"+(T.width+(o||0))+"px;top:"+w+"px;left:"+(k+T.left)+"px;"+(l||""))},this)},g.prototype.drawFullLineMarker=function(i,a,h,c,o){var l=this.$getTop(a.start.row,c),m=c.lineHeight;a.start.row!=a.end.row&&(m+=this.$getTop(a.end.row,c)-l),this.elt(h,"height:"+m+"px;top:"+l+"px;left:0;right:0;"+(o||""))},g.prototype.drawScreenLineMarker=function(i,a,h,c,o){var l=this.$getTop(a.start.row,c),m=c.lineHeight;this.elt(h,"height:"+m+"px;top:"+l+"px;left:0;right:0;"+(o||""))},g}();b.prototype.$padding=0;function p(g,i,a,h){return(g?1:0)|(i?2:0)|(a?4:0)|(h?8:0)}r.Marker=b}),ace.define("ace/layer/text_util",["require","exports","module"],function(n,r,u){var d=new Set(["text","rparen","lparen"]);r.isTextToken=function(f){return d.has(f)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(n,r,u){var d=n("../lib/oop"),f=n("../lib/dom"),b=n("../lib/lang"),p=n("./lines").Lines,g=n("../lib/event_emitter").EventEmitter,i=n("../config").nls,a=n("./text_util").isTextToken,h=function(){function c(o){this.dom=f,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",o.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new p(this.element)}return c.prototype.$updateEolChar=function(){var o=this.session.doc,l=o.getNewLineCharacter()==`
222
+ `&&o.getNewLineMode()!="windows",m=l?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=m)return this.EOL_CHAR=m,!0},c.prototype.setPadding=function(o){this.$padding=o,this.element.style.margin="0 "+o+"px"},c.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},c.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},c.prototype.$setFontMetrics=function(o){this.$fontMetrics=o,this.$fontMetrics.on("changeCharacterSize",(function(l){this._signal("changeCharacterSize",l)}).bind(this)),this.$pollSizeChanges()},c.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},c.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},c.prototype.setSession=function(o){this.session=o,o&&this.$computeTabString()},c.prototype.setShowInvisibles=function(o){return this.showInvisibles==o?!1:(this.showInvisibles=o,typeof o=="string"?(this.showSpaces=/tab/i.test(o),this.showTabs=/space/i.test(o),this.showEOL=/eol/i.test(o)):this.showSpaces=this.showTabs=this.showEOL=o,this.$computeTabString(),!0)},c.prototype.setDisplayIndentGuides=function(o){return this.displayIndentGuides==o?!1:(this.displayIndentGuides=o,this.$computeTabString(),!0)},c.prototype.setHighlightIndentGuides=function(o){return this.$highlightIndentGuides===o?!1:(this.$highlightIndentGuides=o,o)},c.prototype.$computeTabString=function(){var o=this.session.getTabSize();this.tabSize=o;for(var l=this.$tabStrings=[0],m=1;m<o+1;m++)if(this.showTabs){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_tab",w.textContent=b.stringRepeat(this.TAB_CHAR,m),l.push(w)}else l.push(this.dom.createTextNode(b.stringRepeat(" ",m),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var k="ace_indent-guide",R=this.showSpaces?" ace_invisible ace_invisible_space":"",T=this.showSpaces?b.stringRepeat(this.SPACE_CHAR,this.tabSize):b.stringRepeat(" ",this.tabSize),S=this.showTabs?" ace_invisible ace_invisible_tab":"",x=this.showTabs?b.stringRepeat(this.TAB_CHAR,this.tabSize):T,w=this.dom.createElement("span");w.className=k+R,w.textContent=T,this.$tabStrings[" "]=w;var w=this.dom.createElement("span");w.className=k+S,w.textContent=x,this.$tabStrings[" "]=w}},c.prototype.updateLines=function(o,l,m){if(this.config.lastRow!=o.lastRow||this.config.firstRow!=o.firstRow)return this.update(o);this.config=o;for(var w=Math.max(l,o.firstRow),k=Math.min(m,o.lastRow),R=this.element.childNodes,T=0,S=o.firstRow;S<w;S++){var x=this.session.getFoldLine(S);if(x)if(x.containsRow(w)){w=x.start.row;break}else S=x.end.row;T++}for(var M=!1,S=w,x=this.session.getNextFoldLine(S),O=x?x.start.row:1/0;S>O&&(S=x.end.row+1,x=this.session.getNextFoldLine(S,x),O=x?x.start.row:1/0),!(S>k);){var F=R[T++];if(F){this.dom.removeChildren(F),this.$renderLine(F,S,S==O?x:!1),M&&(F.style.top=this.$lines.computeLineTop(S,o,this.session)+"px");var L=o.lineHeight*this.session.getRowLength(S)+"px";F.style.height!=L&&(M=!0,F.style.height=L)}S++}if(M)for(;T<this.$lines.cells.length;){var H=this.$lines.cells[T++];H.element.style.top=this.$lines.computeLineTop(H.row,o,this.session)+"px"}},c.prototype.scrollLines=function(o){var l=this.config;if(this.config=o,this.$lines.pageChanged(l,o))return this.update(o);this.$lines.moveContainer(o);var m=o.lastRow,w=l?l.lastRow:-1;if(!l||w<o.firstRow)return this.update(o);if(m<l.firstRow)return this.update(o);if(!l||l.lastRow<o.firstRow)return this.update(o);if(o.lastRow<l.firstRow)return this.update(o);if(l.firstRow<o.firstRow)for(var k=this.session.getFoldedRowCount(l.firstRow,o.firstRow-1);k>0;k--)this.$lines.shift();if(l.lastRow>o.lastRow)for(var k=this.session.getFoldedRowCount(o.lastRow+1,l.lastRow);k>0;k--)this.$lines.pop();o.firstRow<l.firstRow&&this.$lines.unshift(this.$renderLinesFragment(o,o.firstRow,l.firstRow-1)),o.lastRow>l.lastRow&&this.$lines.push(this.$renderLinesFragment(o,l.lastRow+1,o.lastRow)),this.$highlightIndentGuide()},c.prototype.$renderLinesFragment=function(o,l,m){for(var w=[],k=l,R=this.session.getNextFoldLine(k),T=R?R.start.row:1/0;k>T&&(k=R.end.row+1,R=this.session.getNextFoldLine(k,R),T=R?R.start.row:1/0),!(k>m);){var S=this.$lines.createCell(k,o,this.session),x=S.element;this.dom.removeChildren(x),f.setStyle(x.style,"height",this.$lines.computeLineHeight(k,o,this.session)+"px"),f.setStyle(x.style,"top",this.$lines.computeLineTop(k,o,this.session)+"px"),this.$renderLine(x,k,k==T?R:!1),this.$useLineGroups()?x.className="ace_line_group":x.className="ace_line",w.push(S),k++}return w},c.prototype.update=function(o){this.$lines.moveContainer(o),this.config=o;for(var l=o.firstRow,m=o.lastRow,w=this.$lines;w.getLength();)w.pop();w.push(this.$renderLinesFragment(o,l,m))},c.prototype.$renderToken=function(o,l,m,w){for(var k=this,R=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,T=this.dom.createFragment(this.element),S,x=0;S=R.exec(w);){var M=S[1],O=S[2],F=S[3],L=S[4],H=S[5];if(!(!k.showSpaces&&O)){var P=x!=S.index?w.slice(x,S.index):"";if(x=S.index+S[0].length,P&&T.appendChild(this.dom.createTextNode(P,this.element)),M){var I=k.session.getScreenTabSize(l+S.index);T.appendChild(k.$tabStrings[I].cloneNode(!0)),l+=I-1}else if(O)if(k.showSpaces){var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_space",$.textContent=b.stringRepeat(k.SPACE_CHAR,O.length),T.appendChild($)}else T.appendChild(this.dom.createTextNode(O,this.element));else if(F){var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_space ace_invalid",$.textContent=b.stringRepeat(k.SPACE_CHAR,F.length),T.appendChild($)}else if(L){l+=1;var $=this.dom.createElement("span");$.style.width=k.config.characterWidth*2+"px",$.className=k.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",$.textContent=k.showSpaces?k.SPACE_CHAR:L,T.appendChild($)}else if(H){l+=1;var $=this.dom.createElement("span");$.style.width=k.config.characterWidth*2+"px",$.className="ace_cjk",$.textContent=H,T.appendChild($)}}}if(T.appendChild(this.dom.createTextNode(x?w.slice(x):w,this.element)),a(m.type))o.appendChild(T);else{var C="ace_"+m.type.replace(/\./g," ace_"),$=this.dom.createElement("span");m.type=="fold"&&($.style.width=m.value.length*this.config.characterWidth+"px",$.setAttribute("title",i("inline-fold.closed.title","Unfold code"))),$.className=C,$.appendChild(T),o.appendChild($)}return l+w.length},c.prototype.renderIndentGuide=function(o,l,m){var w=l.search(this.$indentGuideRe);if(w<=0||w>=m)return l;if(l[0]==" "){w-=w%this.tabSize;for(var k=w/this.tabSize,R=0;R<k;R++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),l.substr(w)}else if(l[0]==" "){for(var R=0;R<w;R++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),l.substr(w)}return this.$highlightIndentGuide(),l},c.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var o=this.session.doc.$lines;if(o){var l=this.session.selection.getCursor(),m=/^\s*/.exec(this.session.doc.getLine(l.row))[0].length,w=Math.floor(m/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:w,start:l.row};var k=this.session.$bracketHighlight;if(k){for(var R=this.session.$bracketHighlight.ranges,T=0;T<R.length;T++)if(l.row!==R[T].start.row){this.$highlightIndentGuideMarker.end=R[T].start.row+1,l.row>R[T].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&o[l.row]!==""&&l.column===o[l.row].length){this.$highlightIndentGuideMarker.dir=1;for(var T=l.row+1;T<o.length;T++){var S=o[T],x=/^\s*/.exec(S)[0].length;if(S!==""&&(this.$highlightIndentGuideMarker.end=T,x<=m))break}}this.$renderHighlightIndentGuide()}}},c.prototype.$clearActiveIndentGuide=function(){for(var o=this.element.querySelectorAll(".ace_indent-guide-active"),l=0;l<o.length;l++)o[l].classList.remove("ace_indent-guide-active")},c.prototype.$setIndentGuideActive=function(o,l){var m=this.session.doc.getLine(o.row);if(m!==""){var w=o.element;if(o.element.classList&&o.element.classList.contains("ace_line_group"))if(o.element.childNodes.length>0)w=o.element.childNodes[0];else return;var k=w.childNodes;if(k){var R=k[l-1];R&&R.classList&&R.classList.contains("ace_indent-guide")&&R.classList.add("ace_indent-guide-active")}}},c.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var o=this.$lines.cells;this.$clearActiveIndentGuide();var l=this.$highlightIndentGuideMarker.indentLevel;if(l!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var m=0;m<o.length;m++){var w=o[m];if(this.$highlightIndentGuideMarker.end&&w.row>=this.$highlightIndentGuideMarker.start+1){if(w.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,l)}}else for(var m=o.length-1;m>=0;m--){var w=o[m];if(this.$highlightIndentGuideMarker.end&&w.row<this.$highlightIndentGuideMarker.start){if(w.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(w,l)}}}},c.prototype.$createLineElement=function(o){var l=this.dom.createElement("div");return l.className="ace_line",l.style.height=this.config.lineHeight+"px",l},c.prototype.$renderWrappedLine=function(o,l,m){var w=0,k=0,R=m[0],T=0,S=this.$createLineElement();o.appendChild(S);for(var x=0;x<l.length;x++){var M=l[x],O=M.value;if(x==0&&this.displayIndentGuides){if(w=O.length,O=this.renderIndentGuide(S,O,R),!O)continue;w-=O.length}if(w+O.length<R)T=this.$renderToken(S,T,M,O),w+=O.length;else{for(;w+O.length>=R;)T=this.$renderToken(S,T,M,O.substring(0,R-w)),O=O.substring(R-w),w=R,S=this.$createLineElement(),o.appendChild(S),S.appendChild(this.dom.createTextNode(b.stringRepeat(" ",m.indent),this.element)),k++,T=0,R=m[k]||Number.MAX_VALUE;O.length!=0&&(w+=O.length,T=this.$renderToken(S,T,M,O))}}m[m.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(S,T,null,"",!0)},c.prototype.$renderSimpleLine=function(o,l){for(var m=0,w=0;w<l.length;w++){var k=l[w],R=k.value;if(!(w==0&&this.displayIndentGuides&&(R=this.renderIndentGuide(o,R),!R))){if(m+R.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(o,m,k,R);m=this.$renderToken(o,m,k,R)}}},c.prototype.$renderOverflowMessage=function(o,l,m,w,k){m&&this.$renderToken(o,l,m,w.slice(0,this.MAX_LINE_LENGTH-l));var R=this.dom.createElement("span");R.className="ace_inline_button ace_keyword ace_toggle_wrap",R.textContent=k?"<hide>":"<click to see more...>",o.appendChild(R)},c.prototype.$renderLine=function(o,l,m){if(!m&&m!=!1&&(m=this.session.getFoldLine(l)),m)var w=this.$getFoldLineTokens(l,m);else var w=this.session.getTokens(l);var k=o;if(w.length){var R=this.session.getRowSplitData(l);if(R&&R.length){this.$renderWrappedLine(o,w,R);var k=o.lastChild}else{var k=o;this.$useLineGroups()&&(k=this.$createLineElement(),o.appendChild(k)),this.$renderSimpleLine(k,w)}}else this.$useLineGroups()&&(k=this.$createLineElement(),o.appendChild(k));if(this.showEOL&&k){m&&(l=m.end.row);var T=this.dom.createElement("span");T.className="ace_invisible ace_invisible_eol",T.textContent=l==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,k.appendChild(T)}},c.prototype.$getFoldLineTokens=function(o,l){var m=this.session,w=[];function k(T,S,x){for(var M=0,O=0;O+T[M].value.length<S;)if(O+=T[M].value.length,M++,M==T.length)return;if(O!=S){var F=T[M].value.substring(S-O);F.length>x-S&&(F=F.substring(0,x-S)),w.push({type:T[M].type,value:F}),O=S+F.length,M+=1}for(;O<x&&M<T.length;){var F=T[M].value;F.length+O>x?w.push({type:T[M].type,value:F.substring(0,x-O)}):w.push(T[M]),O+=F.length,M+=1}}var R=m.getTokens(o);return l.walk(function(T,S,x,M,O){T!=null?w.push({type:"fold",value:T}):(O&&(R=m.getTokens(S)),R.length&&k(R,M,x))},l.end.row,this.session.getLine(l.end.row).length),w},c.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},c}();h.prototype.EOF_CHAR="¶",h.prototype.EOL_CHAR_LF="¬",h.prototype.EOL_CHAR_CRLF="¤",h.prototype.EOL_CHAR=h.prototype.EOL_CHAR_LF,h.prototype.TAB_CHAR="—",h.prototype.SPACE_CHAR="·",h.prototype.$padding=0,h.prototype.MAX_LINE_LENGTH=1e4,h.prototype.showInvisibles=!1,h.prototype.showSpaces=!1,h.prototype.showTabs=!1,h.prototype.showEOL=!1,h.prototype.displayIndentGuides=!0,h.prototype.$highlightIndentGuides=!0,h.prototype.$tabStrings=[],h.prototype.destroy={},h.prototype.onChangeTabSize=h.prototype.$computeTabString,d.implement(h.prototype,g),r.Text=h}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(n,r,u){var d=n("../lib/dom"),f=function(){function b(p){this.element=d.createElement("div"),this.element.className="ace_layer ace_cursor-layer",p.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),d.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return b.prototype.$updateOpacity=function(p){for(var g=this.cursors,i=g.length;i--;)d.setStyle(g[i].style,"opacity",p?"":"0")},b.prototype.$startCssAnimation=function(){for(var p=this.cursors,g=p.length;g--;)p[g].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&d.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},b.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,d.removeCssClass(this.element,"ace_animate-blinking")},b.prototype.setPadding=function(p){this.$padding=p},b.prototype.setSession=function(p){this.session=p},b.prototype.setBlinking=function(p){p!=this.isBlinking&&(this.isBlinking=p,this.restartTimer())},b.prototype.setBlinkInterval=function(p){p!=this.blinkInterval&&(this.blinkInterval=p,this.restartTimer())},b.prototype.setSmoothBlinking=function(p){p!=this.smoothBlinking&&(this.smoothBlinking=p,d.setCssClass(this.element,"ace_smooth-blinking",p),this.$updateCursors(!0),this.restartTimer())},b.prototype.addCursor=function(){var p=d.createElement("div");return p.className="ace_cursor",this.element.appendChild(p),this.cursors.push(p),p},b.prototype.removeCursor=function(){if(this.cursors.length>1){var p=this.cursors.pop();return p.parentNode.removeChild(p),p}},b.prototype.hideCursor=function(){this.isVisible=!1,d.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},b.prototype.showCursor=function(){this.isVisible=!0,d.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},b.prototype.restartTimer=function(){var p=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,d.removeCssClass(this.element,"ace_smooth-blinking")),p(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&d.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),d.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var g=(function(){this.timeoutId=setTimeout(function(){p(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){p(!0),g()},this.blinkInterval),g()}},b.prototype.getPixelPosition=function(p,g){if(!this.config||!this.session)return{left:0,top:0};p||(p=this.session.selection.getCursor());var i=this.session.documentToScreenPosition(p),a=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,p.row)?this.session.$bidiHandler.getPosLeft(i.column):i.column*this.config.characterWidth),h=(i.row-(g?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:a,top:h}},b.prototype.isCursorInView=function(p,g){return p.top>=0&&p.top<g.maxHeight},b.prototype.update=function(p){this.config=p;var g=this.session.$selectionMarkers,i=0,a=0;(g===void 0||g.length===0)&&(g=[{cursor:null}]);for(var i=0,h=g.length;i<h;i++){var c=this.getPixelPosition(g[i].cursor,!0);if(!((c.top>p.height+p.offset||c.top<0)&&i>1)){var o=this.cursors[a++]||this.addCursor(),l=o.style;this.drawCursor?this.drawCursor(o,c,p,g[i],this.session):this.isCursorInView(c,p)?(d.setStyle(l,"display","block"),d.translate(o,c.left,c.top),d.setStyle(l,"width",Math.round(p.characterWidth)+"px"),d.setStyle(l,"height",p.lineHeight+"px")):d.setStyle(l,"display","none")}}for(;this.cursors.length>a;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=c,this.restartTimer()},b.prototype.$setOverwrite=function(p){p!=this.overwrite&&(this.overwrite=p,p?d.addCssClass(this.element,"ace_overwrite-cursors"):d.removeCssClass(this.element,"ace_overwrite-cursors"))},b.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},b}();f.prototype.$padding=0,f.prototype.drawCursor=null,r.Cursor=f}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,u){var d=this&&this.__extends||function(){var o=function(l,m){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,k){w.__proto__=k}||function(w,k){for(var R in k)Object.prototype.hasOwnProperty.call(k,R)&&(w[R]=k[R])},o(l,m)};return function(l,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");o(l,m);function w(){this.constructor=l}l.prototype=m===null?Object.create(m):(w.prototype=m.prototype,new w)}}(),f=n("./lib/oop"),b=n("./lib/dom"),p=n("./lib/event"),g=n("./lib/event_emitter").EventEmitter,i=32768,a=function(){function o(l,m){this.element=b.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+m,this.inner=b.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),l.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,p.addListener(this.element,"scroll",this.onScroll.bind(this)),p.addListener(this.element,"mousedown",p.preventDefault)}return o.prototype.setVisible=function(l){this.element.style.display=l?"":"none",this.isVisible=l,this.coeff=1},o}();f.implement(a.prototype,g);var h=function(o){d(l,o);function l(m,w){var k=o.call(this,m,"-v")||this;return k.scrollTop=0,k.scrollHeight=0,w.$scrollbarWidth=k.width=b.scrollbarWidth(m.ownerDocument),k.inner.style.width=k.element.style.width=(k.width||15)+5+"px",k.$minWidth=0,k}return l.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var m=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-m)/(this.coeff-m)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},l.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},l.prototype.setHeight=function(m){this.element.style.height=m+"px"},l.prototype.setScrollHeight=function(m){this.scrollHeight=m,m>i?(this.coeff=i/m,m=i):this.coeff!=1&&(this.coeff=1),this.inner.style.height=m+"px"},l.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},l}(a);h.prototype.setInnerHeight=h.prototype.setScrollHeight;var c=function(o){d(l,o);function l(m,w){var k=o.call(this,m,"-h")||this;return k.scrollLeft=0,k.height=w.$scrollbarWidth,k.inner.style.height=k.element.style.height=(k.height||15)+5+"px",k}return l.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},l.prototype.getHeight=function(){return this.isVisible?this.height:0},l.prototype.setWidth=function(m){this.element.style.width=m+"px"},l.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},l.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},l.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},l}(a);r.ScrollBar=h,r.ScrollBarV=h,r.ScrollBarH=c,r.VScrollBar=h,r.HScrollBar=c}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,u){var d=this&&this.__extends||function(){var c=function(o,l){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,w){m.__proto__=w}||function(m,w){for(var k in w)Object.prototype.hasOwnProperty.call(w,k)&&(m[k]=w[k])},c(o,l)};return function(o,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");c(o,l);function m(){this.constructor=o}o.prototype=l===null?Object.create(l):(m.prototype=l.prototype,new m)}}(),f=n("./lib/oop"),b=n("./lib/dom"),p=n("./lib/event"),g=n("./lib/event_emitter").EventEmitter;b.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
223
+ position: absolute;
224
+ background: rgba(128, 128, 128, 0.6);
225
+ -moz-box-sizing: border-box;
226
+ box-sizing: border-box;
227
+ border: 1px solid #bbb;
228
+ border-radius: 2px;
229
+ z-index: 8;
230
+ }
231
+ .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
232
+ position: absolute;
233
+ z-index: 6;
234
+ background: none;
235
+ overflow: hidden!important;
236
+ }
237
+ .ace_editor>.ace_sb-v {
238
+ z-index: 6;
239
+ right: 0;
240
+ top: 0;
241
+ width: 12px;
242
+ }
243
+ .ace_editor>.ace_sb-v div {
244
+ z-index: 8;
245
+ right: 0;
246
+ width: 100%;
247
+ }
248
+ .ace_editor>.ace_sb-h {
249
+ bottom: 0;
250
+ left: 0;
251
+ height: 12px;
252
+ }
253
+ .ace_editor>.ace_sb-h div {
254
+ bottom: 0;
255
+ height: 100%;
256
+ }
257
+ .ace_editor>.ace_sb_grabbed {
258
+ z-index: 8;
259
+ background: #000;
260
+ }`,"ace_scrollbar.css",!1);var i=function(){function c(o,l){this.element=b.createElement("div"),this.element.className="ace_sb"+l,this.inner=b.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,o.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,p.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return c.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1},c}();f.implement(i.prototype,g);var a=function(c){d(o,c);function o(l,m){var w=c.call(this,l,"-v")||this;return w.scrollTop=0,w.scrollHeight=0,w.parent=l,w.width=w.VScrollWidth,w.renderer=m,w.inner.style.width=w.element.style.width=(w.width||15)+"px",w.$minWidth=0,w}return o.prototype.onMouseDown=function(l,m){if(l==="mousedown"&&!(p.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var w=this,k=m.clientY,R=function(L){k=L.clientY},T=function(){clearInterval(O)},S=m.clientY,x=this.thumbTop,M=function(){if(k!==void 0){var L=w.scrollTopFromThumbTop(x+k-S);L!==w.scrollTop&&w._emit("scroll",{data:L})}};p.capture(this.inner,R,T);var O=setInterval(M,20);return p.preventDefault(m)}var F=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(F)}),p.preventDefault(m)}},o.prototype.getHeight=function(){return this.height},o.prototype.scrollTopFromThumbTop=function(l){var m=l*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return m=m>>0,m<0?m=0:m>this.pageHeight-this.viewHeight&&(m=this.pageHeight-this.viewHeight),m},o.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},o.prototype.setHeight=function(l){this.height=Math.max(0,l),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},o.prototype.setScrollHeight=function(l,m){this.pageHeight===l&&!m||(this.pageHeight=l,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},o.prototype.setScrollTop=function(l){this.scrollTop=l,l<0&&(l=0),this.thumbTop=l*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},o}(i);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var h=function(c){d(o,c);function o(l,m){var w=c.call(this,l,"-h")||this;return w.scrollLeft=0,w.scrollWidth=0,w.height=w.HScrollHeight,w.inner.style.height=w.element.style.height=(w.height||12)+"px",w.renderer=m,w}return o.prototype.onMouseDown=function(l,m){if(l==="mousedown"&&!(p.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var w=this,k=m.clientX,R=function(L){k=L.clientX},T=function(){clearInterval(O)},S=m.clientX,x=this.thumbLeft,M=function(){if(k!==void 0){var L=w.scrollLeftFromThumbLeft(x+k-S);L!==w.scrollLeft&&w._emit("scroll",{data:L})}};p.capture(this.inner,R,T);var O=setInterval(M,20);return p.preventDefault(m)}var F=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(F)}),p.preventDefault(m)}},o.prototype.getHeight=function(){return this.isVisible?this.height:0},o.prototype.scrollLeftFromThumbLeft=function(l){var m=l*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return m=m>>0,m<0?m=0:m>this.pageWidth-this.viewWidth&&(m=this.pageWidth-this.viewWidth),m},o.prototype.setWidth=function(l){this.width=Math.max(0,l),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},o.prototype.setScrollWidth=function(l,m){this.pageWidth===l&&!m||(this.pageWidth=l,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},o.prototype.setScrollLeft=function(l){this.scrollLeft=l,l<0&&(l=0),this.thumbLeft=l*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},o}(i);h.prototype.setInnerWidth=h.prototype.setScrollWidth,r.ScrollBar=a,r.ScrollBarV=a,r.ScrollBarH=h,r.VScrollBar=a,r.HScrollBar=h}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(n,r,u){var d=n("./lib/event"),f=function(){function b(p,g){this.onRender=p,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=g||window;var i=this;this._flush=function(a){i.pending=!1;var h=i.changes;if(h&&(d.blockIdle(100),i.changes=0,i.onRender(h)),i.changes){if(i.$recursionLimit--<0)return;i.schedule()}else i.$recursionLimit=2}}return b.prototype.schedule=function(p){this.changes=this.changes|p,this.changes&&!this.pending&&(d.nextFrame(this._flush),this.pending=!0)},b.prototype.clear=function(p){var g=this.changes;return this.changes=0,g},b}();r.RenderLoop=f}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(n,r,u){var d=n("../lib/oop"),f=n("../lib/dom"),b=n("../lib/lang"),p=n("../lib/event"),g=n("../lib/useragent"),i=n("../lib/event_emitter").EventEmitter,a=512,h=typeof ResizeObserver=="function",c=200,o=function(){function l(m){this.el=f.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=f.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=f.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),m.appendChild(this.el),this.$measureNode.textContent=b.stringRepeat("X",a),this.$characterSize={width:0,height:0},h?this.$addObserver():this.checkForSizeChanges()}return l.prototype.$setMeasureNodeStyles=function(m,w){m.width=m.height="auto",m.left=m.top="0px",m.visibility="hidden",m.position="absolute",m.whiteSpace="pre",g.isIE<8?m["font-family"]="inherit":m.font="inherit",m.overflow=w?"hidden":"visible"},l.prototype.checkForSizeChanges=function(m){if(m===void 0&&(m=this.$measureSizes()),m&&(this.$characterSize.width!==m.width||this.$characterSize.height!==m.height)){this.$measureNode.style.fontWeight="bold";var w=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=m,this.charSizes=Object.create(null),this.allowBoldFonts=w&&w.width===m.width&&w.height===m.height,this._emit("changeCharacterSize",{data:m})}},l.prototype.$addObserver=function(){var m=this;this.$observer=new window.ResizeObserver(function(w){m.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},l.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var m=this;return this.$pollSizeChangesTimer=p.onIdle(function w(){m.checkForSizeChanges(),p.onIdle(w,500)},500)},l.prototype.setPolling=function(m){m?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},l.prototype.$measureSizes=function(m){var w={height:(m||this.$measureNode).clientHeight,width:(m||this.$measureNode).clientWidth/a};return w.width===0||w.height===0?null:w},l.prototype.$measureCharWidth=function(m){this.$main.textContent=b.stringRepeat(m,a);var w=this.$main.getBoundingClientRect();return w.width/a},l.prototype.getCharacterWidth=function(m){var w=this.charSizes[m];return w===void 0&&(w=this.charSizes[m]=this.$measureCharWidth(m)/this.$characterSize.width),w},l.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},l.prototype.$getZoom=function(m){return!m||!m.parentElement?1:(Number(window.getComputedStyle(m).zoom)||1)*this.$getZoom(m.parentElement)},l.prototype.$initTransformMeasureNodes=function(){var m=function(w,k){return["div",{style:"position: absolute;top:"+w+"px;left:"+k+"px;"}]};this.els=f.buildDom([m(0,0),m(c,0),m(0,c),m(c,c)],this.el)},l.prototype.transformCoordinates=function(m,w){if(m){var k=this.$getZoom(this.el);m=x(1/k,m)}function R(Z,te,he){var ne=Z[1]*te[0]-Z[0]*te[1];return[(-te[1]*he[0]+te[0]*he[1])/ne,(+Z[1]*he[0]-Z[0]*he[1])/ne]}function T(Z,te){return[Z[0]-te[0],Z[1]-te[1]]}function S(Z,te){return[Z[0]+te[0],Z[1]+te[1]]}function x(Z,te){return[Z*te[0],Z*te[1]]}this.els||this.$initTransformMeasureNodes();function M(Z){var te=Z.getBoundingClientRect();return[te.left,te.top]}var O=M(this.els[0]),F=M(this.els[1]),L=M(this.els[2]),H=M(this.els[3]),P=R(T(H,F),T(H,L),T(S(F,L),S(H,O))),I=x(1+P[0],T(F,O)),$=x(1+P[1],T(L,O));if(w){var C=w,N=P[0]*C[0]/c+P[1]*C[1]/c+1,j=S(x(C[0],I),x(C[1],$));return S(x(1/N/c,j),O)}var U=T(m,O),K=R(T(I,x(P[0],U)),T($,x(P[1],U)),U);return x(c,K)},l}();o.prototype.$characterSize={width:0,height:0},d.implement(o.prototype,i),r.FontMetrics=o}),ace.define("ace/css/editor-css",["require","exports","module"],function(n,r,u){u.exports=`
261
+ .ace_br1 {border-top-left-radius : 3px;}
262
+ .ace_br2 {border-top-right-radius : 3px;}
263
+ .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
264
+ .ace_br4 {border-bottom-right-radius: 3px;}
265
+ .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
266
+ .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
267
+ .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
268
+ .ace_br8 {border-bottom-left-radius : 3px;}
269
+ .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
270
+ .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
271
+ .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
272
+ .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
273
+ .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
274
+ .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
275
+ .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
276
+
277
+
278
+ .ace_editor {
279
+ position: relative;
280
+ overflow: hidden;
281
+ padding: 0;
282
+ font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
283
+ direction: ltr;
284
+ text-align: left;
285
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
286
+ forced-color-adjust: none;
287
+ }
288
+
289
+ .ace_scroller {
290
+ position: absolute;
291
+ overflow: hidden;
292
+ top: 0;
293
+ bottom: 0;
294
+ background-color: inherit;
295
+ -ms-user-select: none;
296
+ -moz-user-select: none;
297
+ -webkit-user-select: none;
298
+ user-select: none;
299
+ cursor: text;
300
+ }
301
+
302
+ .ace_content {
303
+ position: absolute;
304
+ box-sizing: border-box;
305
+ min-width: 100%;
306
+ contain: style size layout;
307
+ font-variant-ligatures: no-common-ligatures;
308
+ }
309
+ .ace_invisible {
310
+ font-variant-ligatures: none;
311
+ }
312
+
313
+ .ace_keyboard-focus:focus {
314
+ box-shadow: inset 0 0 0 2px #5E9ED6;
315
+ outline: none;
316
+ }
317
+
318
+ .ace_dragging .ace_scroller:before{
319
+ position: absolute;
320
+ top: 0;
321
+ left: 0;
322
+ right: 0;
323
+ bottom: 0;
324
+ content: '';
325
+ background: rgba(250, 250, 250, 0.01);
326
+ z-index: 1000;
327
+ }
328
+ .ace_dragging.ace_dark .ace_scroller:before{
329
+ background: rgba(0, 0, 0, 0.01);
330
+ }
331
+
332
+ .ace_gutter {
333
+ position: absolute;
334
+ overflow : hidden;
335
+ width: auto;
336
+ top: 0;
337
+ bottom: 0;
338
+ left: 0;
339
+ cursor: default;
340
+ z-index: 4;
341
+ -ms-user-select: none;
342
+ -moz-user-select: none;
343
+ -webkit-user-select: none;
344
+ user-select: none;
345
+ contain: style size layout;
346
+ }
347
+
348
+ .ace_gutter-active-line {
349
+ position: absolute;
350
+ left: 0;
351
+ right: 0;
352
+ }
353
+
354
+ .ace_scroller.ace_scroll-left:after {
355
+ content: "";
356
+ position: absolute;
357
+ top: 0;
358
+ right: 0;
359
+ bottom: 0;
360
+ left: 0;
361
+ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
362
+ pointer-events: none;
363
+ }
364
+
365
+ .ace_gutter-cell, .ace_gutter-cell_svg-icons {
366
+ position: absolute;
367
+ top: 0;
368
+ left: 0;
369
+ right: 0;
370
+ padding-left: 19px;
371
+ padding-right: 6px;
372
+ background-repeat: no-repeat;
373
+ }
374
+
375
+ .ace_gutter-cell_svg-icons .ace_gutter_annotation {
376
+ margin-left: -14px;
377
+ float: left;
378
+ }
379
+
380
+ .ace_gutter-cell .ace_gutter_annotation {
381
+ margin-left: -19px;
382
+ float: left;
383
+ }
384
+
385
+ .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 {
386
+ 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==");
387
+ background-repeat: no-repeat;
388
+ background-position: 2px center;
389
+ }
390
+
391
+ .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
392
+ 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==");
393
+ background-repeat: no-repeat;
394
+ background-position: 2px center;
395
+ }
396
+
397
+ .ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
398
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
399
+ background-repeat: no-repeat;
400
+ background-position: 2px center;
401
+ }
402
+
403
+ .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 {
404
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
405
+ }
406
+
407
+ .ace_icon_svg.ace_error {
408
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
409
+ background-color: crimson;
410
+ }
411
+ .ace_icon_svg.ace_security {
412
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
413
+ background-color: crimson;
414
+ }
415
+ .ace_icon_svg.ace_warning {
416
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
417
+ background-color: darkorange;
418
+ }
419
+ .ace_icon_svg.ace_info {
420
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
421
+ background-color: royalblue;
422
+ }
423
+ .ace_icon_svg.ace_hint {
424
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
425
+ background-color: silver;
426
+ }
427
+
428
+ .ace_icon_svg.ace_error_fold {
429
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
430
+ background-color: crimson;
431
+ }
432
+ .ace_icon_svg.ace_security_fold {
433
+ -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
434
+ background-color: crimson;
435
+ }
436
+ .ace_icon_svg.ace_warning_fold {
437
+ -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
438
+ background-color: darkorange;
439
+ }
440
+
441
+ .ace_scrollbar {
442
+ contain: strict;
443
+ position: absolute;
444
+ right: 0;
445
+ bottom: 0;
446
+ z-index: 6;
447
+ }
448
+
449
+ .ace_scrollbar-inner {
450
+ position: absolute;
451
+ cursor: text;
452
+ left: 0;
453
+ top: 0;
454
+ }
455
+
456
+ .ace_scrollbar-v{
457
+ overflow-x: hidden;
458
+ overflow-y: scroll;
459
+ top: 0;
460
+ }
461
+
462
+ .ace_scrollbar-h {
463
+ overflow-x: scroll;
464
+ overflow-y: hidden;
465
+ left: 0;
466
+ }
467
+
468
+ .ace_print-margin {
469
+ position: absolute;
470
+ height: 100%;
471
+ }
472
+
473
+ .ace_text-input {
474
+ position: absolute;
475
+ z-index: 0;
476
+ width: 0.5em;
477
+ height: 1em;
478
+ opacity: 0;
479
+ background: transparent;
480
+ -moz-appearance: none;
481
+ appearance: none;
482
+ border: none;
483
+ resize: none;
484
+ outline: none;
485
+ overflow: hidden;
486
+ font: inherit;
487
+ padding: 0 1px;
488
+ margin: 0 -1px;
489
+ contain: strict;
490
+ -ms-user-select: text;
491
+ -moz-user-select: text;
492
+ -webkit-user-select: text;
493
+ user-select: text;
494
+ /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
495
+ white-space: pre!important;
496
+ }
497
+ .ace_text-input.ace_composition {
498
+ background: transparent;
499
+ color: inherit;
500
+ z-index: 1000;
501
+ opacity: 1;
502
+ }
503
+ .ace_composition_placeholder { color: transparent }
504
+ .ace_composition_marker {
505
+ border-bottom: 1px solid;
506
+ position: absolute;
507
+ border-radius: 0;
508
+ margin-top: 1px;
509
+ }
510
+
511
+ [ace_nocontext=true] {
512
+ transform: none!important;
513
+ filter: none!important;
514
+ clip-path: none!important;
515
+ mask : none!important;
516
+ contain: none!important;
517
+ perspective: none!important;
518
+ mix-blend-mode: initial!important;
519
+ z-index: auto;
520
+ }
521
+
522
+ .ace_layer {
523
+ z-index: 1;
524
+ position: absolute;
525
+ overflow: hidden;
526
+ /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
527
+ word-wrap: normal;
528
+ white-space: pre;
529
+ height: 100%;
530
+ width: 100%;
531
+ box-sizing: border-box;
532
+ /* setting pointer-events: auto; on node under the mouse, which changes
533
+ during scroll, will break mouse wheel scrolling in Safari */
534
+ pointer-events: none;
535
+ }
536
+
537
+ .ace_gutter-layer {
538
+ position: relative;
539
+ width: auto;
540
+ text-align: right;
541
+ pointer-events: auto;
542
+ height: 1000000px;
543
+ contain: style size layout;
544
+ }
545
+
546
+ .ace_text-layer {
547
+ font: inherit !important;
548
+ position: absolute;
549
+ height: 1000000px;
550
+ width: 1000000px;
551
+ contain: style size layout;
552
+ }
553
+
554
+ .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
555
+ contain: style size layout;
556
+ position: absolute;
557
+ top: 0;
558
+ left: 0;
559
+ right: 0;
560
+ }
561
+
562
+ .ace_hidpi .ace_text-layer,
563
+ .ace_hidpi .ace_gutter-layer,
564
+ .ace_hidpi .ace_content,
565
+ .ace_hidpi .ace_gutter {
566
+ contain: strict;
567
+ }
568
+ .ace_hidpi .ace_text-layer > .ace_line,
569
+ .ace_hidpi .ace_text-layer > .ace_line_group {
570
+ contain: strict;
571
+ }
572
+
573
+ .ace_cjk {
574
+ display: inline-block;
575
+ text-align: center;
576
+ }
577
+
578
+ .ace_cursor-layer {
579
+ z-index: 4;
580
+ }
581
+
582
+ .ace_cursor {
583
+ z-index: 4;
584
+ position: absolute;
585
+ box-sizing: border-box;
586
+ border-left: 2px solid;
587
+ /* workaround for smooth cursor repaintng whole screen in chrome */
588
+ transform: translatez(0);
589
+ }
590
+
591
+ .ace_multiselect .ace_cursor {
592
+ border-left-width: 1px;
593
+ }
594
+
595
+ .ace_slim-cursors .ace_cursor {
596
+ border-left-width: 1px;
597
+ }
598
+
599
+ .ace_overwrite-cursors .ace_cursor {
600
+ border-left-width: 0;
601
+ border-bottom: 1px solid;
602
+ }
603
+
604
+ .ace_hidden-cursors .ace_cursor {
605
+ opacity: 0.2;
606
+ }
607
+
608
+ .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
609
+ opacity: 0;
610
+ }
611
+
612
+ .ace_smooth-blinking .ace_cursor {
613
+ transition: opacity 0.18s;
614
+ }
615
+
616
+ .ace_animate-blinking .ace_cursor {
617
+ animation-duration: 1000ms;
618
+ animation-timing-function: step-end;
619
+ animation-name: blink-ace-animate;
620
+ animation-iteration-count: infinite;
621
+ }
622
+
623
+ .ace_animate-blinking.ace_smooth-blinking .ace_cursor {
624
+ animation-duration: 1000ms;
625
+ animation-timing-function: ease-in-out;
626
+ animation-name: blink-ace-animate-smooth;
627
+ }
628
+
629
+ @keyframes blink-ace-animate {
630
+ from, to { opacity: 1; }
631
+ 60% { opacity: 0; }
632
+ }
633
+
634
+ @keyframes blink-ace-animate-smooth {
635
+ from, to { opacity: 1; }
636
+ 45% { opacity: 1; }
637
+ 60% { opacity: 0; }
638
+ 85% { opacity: 0; }
639
+ }
640
+
641
+ .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
642
+ position: absolute;
643
+ z-index: 3;
644
+ }
645
+
646
+ .ace_marker-layer .ace_selection {
647
+ position: absolute;
648
+ z-index: 5;
649
+ }
650
+
651
+ .ace_marker-layer .ace_bracket {
652
+ position: absolute;
653
+ z-index: 6;
654
+ }
655
+
656
+ .ace_marker-layer .ace_error_bracket {
657
+ position: absolute;
658
+ border-bottom: 1px solid #DE5555;
659
+ border-radius: 0;
660
+ }
661
+
662
+ .ace_marker-layer .ace_active-line {
663
+ position: absolute;
664
+ z-index: 2;
665
+ }
666
+
667
+ .ace_marker-layer .ace_selected-word {
668
+ position: absolute;
669
+ z-index: 4;
670
+ box-sizing: border-box;
671
+ }
672
+
673
+ .ace_line .ace_fold {
674
+ box-sizing: border-box;
675
+
676
+ display: inline-block;
677
+ height: 11px;
678
+ margin-top: -2px;
679
+ vertical-align: middle;
680
+
681
+ background-image:
682
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
683
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
684
+ background-repeat: no-repeat, repeat-x;
685
+ background-position: center center, top left;
686
+ color: transparent;
687
+
688
+ border: 1px solid black;
689
+ border-radius: 2px;
690
+
691
+ cursor: pointer;
692
+ pointer-events: auto;
693
+ }
694
+
695
+ .ace_dark .ace_fold {
696
+ }
697
+
698
+ .ace_fold:hover{
699
+ background-image:
700
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
701
+ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
702
+ }
703
+
704
+ .ace_tooltip {
705
+ background-color: #f5f5f5;
706
+ border: 1px solid gray;
707
+ border-radius: 1px;
708
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
709
+ color: black;
710
+ padding: 3px 4px;
711
+ position: fixed;
712
+ z-index: 999999;
713
+ box-sizing: border-box;
714
+ cursor: default;
715
+ white-space: pre-wrap;
716
+ word-wrap: break-word;
717
+ line-height: normal;
718
+ font-style: normal;
719
+ font-weight: normal;
720
+ letter-spacing: normal;
721
+ pointer-events: none;
722
+ overflow: auto;
723
+ max-width: min(33em, 66vw);
724
+ overscroll-behavior: contain;
725
+ }
726
+ .ace_tooltip pre {
727
+ white-space: pre-wrap;
728
+ }
729
+
730
+ .ace_tooltip.ace_dark {
731
+ background-color: #636363;
732
+ color: #fff;
733
+ }
734
+
735
+ .ace_tooltip:focus {
736
+ outline: 1px solid #5E9ED6;
737
+ }
738
+
739
+ .ace_icon {
740
+ display: inline-block;
741
+ width: 18px;
742
+ vertical-align: top;
743
+ }
744
+
745
+ .ace_icon_svg {
746
+ display: inline-block;
747
+ width: 12px;
748
+ vertical-align: top;
749
+ -webkit-mask-repeat: no-repeat;
750
+ -webkit-mask-size: 12px;
751
+ -webkit-mask-position: center;
752
+ }
753
+
754
+ .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
755
+ padding-right: 13px;
756
+ }
757
+
758
+ .ace_fold-widget, .ace_custom-widget {
759
+ box-sizing: border-box;
760
+
761
+ margin: 0 -12px 0 1px;
762
+ display: none;
763
+ width: 11px;
764
+ vertical-align: top;
765
+
766
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
767
+ background-repeat: no-repeat;
768
+ background-position: center;
769
+
770
+ border-radius: 3px;
771
+
772
+ border: 1px solid transparent;
773
+ cursor: pointer;
774
+ }
775
+
776
+ .ace_custom-widget {
777
+ background: none;
778
+ }
779
+
780
+ .ace_folding-enabled .ace_fold-widget {
781
+ display: inline-block;
782
+ }
783
+
784
+ .ace_fold-widget.ace_end {
785
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
786
+ }
787
+
788
+ .ace_fold-widget.ace_closed {
789
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
790
+ }
791
+
792
+ .ace_fold-widget:hover {
793
+ border: 1px solid rgba(0, 0, 0, 0.3);
794
+ background-color: rgba(255, 255, 255, 0.2);
795
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
796
+ }
797
+
798
+ .ace_fold-widget:active {
799
+ border: 1px solid rgba(0, 0, 0, 0.4);
800
+ background-color: rgba(0, 0, 0, 0.05);
801
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
802
+ }
803
+ /**
804
+ * Dark version for fold widgets
805
+ */
806
+ .ace_dark .ace_fold-widget {
807
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
808
+ }
809
+ .ace_dark .ace_fold-widget.ace_end {
810
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
811
+ }
812
+ .ace_dark .ace_fold-widget.ace_closed {
813
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
814
+ }
815
+ .ace_dark .ace_fold-widget:hover {
816
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
817
+ background-color: rgba(255, 255, 255, 0.1);
818
+ }
819
+ .ace_dark .ace_fold-widget:active {
820
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
821
+ }
822
+
823
+ .ace_inline_button {
824
+ border: 1px solid lightgray;
825
+ display: inline-block;
826
+ margin: -1px 8px;
827
+ padding: 0 5px;
828
+ pointer-events: auto;
829
+ cursor: pointer;
830
+ }
831
+ .ace_inline_button:hover {
832
+ border-color: gray;
833
+ background: rgba(200,200,200,0.2);
834
+ display: inline-block;
835
+ pointer-events: auto;
836
+ }
837
+
838
+ .ace_fold-widget.ace_invalid {
839
+ background-color: #FFB4B4;
840
+ border-color: #DE5555;
841
+ }
842
+
843
+ .ace_fade-fold-widgets .ace_fold-widget {
844
+ transition: opacity 0.4s ease 0.05s;
845
+ opacity: 0;
846
+ }
847
+
848
+ .ace_fade-fold-widgets:hover .ace_fold-widget {
849
+ transition: opacity 0.05s ease 0.05s;
850
+ opacity:1;
851
+ }
852
+
853
+ .ace_underline {
854
+ text-decoration: underline;
855
+ }
856
+
857
+ .ace_bold {
858
+ font-weight: bold;
859
+ }
860
+
861
+ .ace_nobold .ace_bold {
862
+ font-weight: normal;
863
+ }
864
+
865
+ .ace_italic {
866
+ font-style: italic;
867
+ }
868
+
869
+
870
+ .ace_error-marker {
871
+ background-color: rgba(255, 0, 0,0.2);
872
+ position: absolute;
873
+ z-index: 9;
874
+ }
875
+
876
+ .ace_highlight-marker {
877
+ background-color: rgba(255, 255, 0,0.2);
878
+ position: absolute;
879
+ z-index: 8;
880
+ }
881
+
882
+ .ace_mobile-menu {
883
+ position: absolute;
884
+ line-height: 1.5;
885
+ border-radius: 4px;
886
+ -ms-user-select: none;
887
+ -moz-user-select: none;
888
+ -webkit-user-select: none;
889
+ user-select: none;
890
+ background: white;
891
+ box-shadow: 1px 3px 2px grey;
892
+ border: 1px solid #dcdcdc;
893
+ color: black;
894
+ }
895
+ .ace_dark > .ace_mobile-menu {
896
+ background: #333;
897
+ color: #ccc;
898
+ box-shadow: 1px 3px 2px grey;
899
+ border: 1px solid #444;
900
+
901
+ }
902
+ .ace_mobile-button {
903
+ padding: 2px;
904
+ cursor: pointer;
905
+ overflow: hidden;
906
+ }
907
+ .ace_mobile-button:hover {
908
+ background-color: #eee;
909
+ opacity:1;
910
+ }
911
+ .ace_mobile-button:active {
912
+ background-color: #ddd;
913
+ }
914
+
915
+ .ace_placeholder {
916
+ position: relative;
917
+ font-family: arial;
918
+ transform: scale(0.9);
919
+ transform-origin: left;
920
+ white-space: pre;
921
+ opacity: 0.7;
922
+ margin: 0 10px;
923
+ z-index: 1;
924
+ }
925
+
926
+ .ace_ghost_text {
927
+ opacity: 0.5;
928
+ font-style: italic;
929
+ }
930
+
931
+ .ace_ghost_text_container > div {
932
+ white-space: pre;
933
+ }
934
+
935
+ .ghost_text_line_wrapped::after {
936
+ content: "↩";
937
+ position: absolute;
938
+ }
939
+
940
+ .ace_lineWidgetContainer.ace_ghost_text {
941
+ margin: 0px 4px
942
+ }
943
+
944
+ .ace_screenreader-only {
945
+ position:absolute;
946
+ left:-10000px;
947
+ top:auto;
948
+ width:1px;
949
+ height:1px;
950
+ overflow:hidden;
951
+ }
952
+
953
+ .ace_hidden_token {
954
+ display: none;
955
+ }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(n,r,u){var d=n("../lib/dom"),f=n("../lib/oop"),b=n("../lib/event_emitter").EventEmitter,p=function(){function g(i,a){this.canvas=d.createElement("canvas"),this.renderer=a,this.pixelRatio=1,this.maxHeight=a.layerConfig.maxHeight,this.lineHeight=a.layerConfig.lineHeight,this.canvasHeight=i.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=i.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},i.element.appendChild(this.canvas)}return g.prototype.$updateDecorators=function(i){var a=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(i){this.maxHeight=i.maxHeight,this.lineHeight=i.lineHeight,this.canvasHeight=i.height;var h=(i.lastRow+1)*this.lineHeight;h<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var c=this.canvas.getContext("2d");function o(H,P){return H.priority<P.priority?-1:H.priority>P.priority?1:0}var l=this.renderer.session.$annotations;if(c.clearRect(0,0,this.canvas.width,this.canvas.height),l){var m={info:1,warning:2,error:3};l.forEach(function(H){H.priority=m[H.type]||null}),l=l.sort(o);for(var w=this.renderer.session.$foldData,k=0;k<l.length;k++){var R=l[k].row,T=this.compensateFoldRows(R,w),S=Math.round((R-T)*this.lineHeight*this.heightRatio),x=Math.round((R-T)*this.lineHeight*this.heightRatio),M=Math.round(((R-T)*this.lineHeight+this.lineHeight)*this.heightRatio),O=M-x;if(O<this.minDecorationHeight){var F=(x+M)/2|0;F<this.halfMinDecorationHeight?F=this.halfMinDecorationHeight:F+this.halfMinDecorationHeight>this.canvasHeight&&(F=this.canvasHeight-this.halfMinDecorationHeight),x=Math.round(F-this.halfMinDecorationHeight),M=Math.round(F+this.halfMinDecorationHeight)}c.fillStyle=a[l[k].type]||null,c.fillRect(0,S,this.canvasWidth,M-x)}}var L=this.renderer.session.selection.getCursor();if(L){var T=this.compensateFoldRows(L.row,w),S=Math.round((L.row-T)*this.lineHeight*this.heightRatio);c.fillStyle="rgba(0, 0, 0, 0.5)",c.fillRect(0,S,this.canvasWidth,2)}},g.prototype.compensateFoldRows=function(i,a){var h=0;if(a&&a.length>0)for(var c=0;c<a.length;c++)i>a[c].start.row&&i<a[c].end.row?h+=i-a[c].start.row:i>=a[c].end.row&&(h+=a[c].end.row-a[c].start.row);return h},g}();f.implement(p.prototype,b),r.Decorator=p}),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,r,u){var d=n("./lib/oop"),f=n("./lib/dom"),b=n("./lib/lang"),p=n("./config"),g=n("./layer/gutter").Gutter,i=n("./layer/marker").Marker,a=n("./layer/text").Text,h=n("./layer/cursor").Cursor,c=n("./scrollbar").HScrollBar,o=n("./scrollbar").VScrollBar,l=n("./scrollbar_custom").HScrollBar,m=n("./scrollbar_custom").VScrollBar,w=n("./renderloop").RenderLoop,k=n("./layer/font_metrics").FontMetrics,R=n("./lib/event_emitter").EventEmitter,T=n("./css/editor-css"),S=n("./layer/decorators").Decorator,x=n("./lib/useragent"),M=n("./layer/text_util").isTextToken;f.importCssString(T,"ace_editor.css",!1);var O=function(){function F(L,H){var P=this;this.container=L||f.createElement("div"),f.addCssClass(this.container,"ace_editor"),f.HI_DPI&&f.addCssClass(this.container,"ace_hidpi"),this.setTheme(H),p.get("useStrictCSP")==null&&p.set("useStrictCSP",!1),this.$gutter=f.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=f.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=f.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new g(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new i(this.content);var I=this.$textLayer=new a(this.content);this.canvas=I.element,this.$markerFront=new i(this.content),this.$cursorLayer=new h(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new o(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.on("scroll",function($){P.$scrollAnimation||P.session.setScrollTop($.data-P.scrollMargin.top)}),this.scrollBarH.on("scroll",function($){P.$scrollAnimation||P.session.setScrollLeft($.data-P.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new k(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function($){P.updateCharacterSize(),P.onResize(!0,P.gutterWidth,P.$size.width,P.$size.height),P._signal("changeCharacterSize",$)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!x.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(),p.resetOptions(this),p._signal("renderer",this)}return F.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),f.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},F.prototype.setSession=function(L){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=L,L&&this.scrollMargin.top&&L.getScrollTop()<=0&&L.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(L),this.$markerBack.setSession(L),this.$markerFront.setSession(L),this.$gutterLayer.setSession(L),this.$textLayer.setSession(L),L&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},F.prototype.updateLines=function(L,H,P){if(H===void 0&&(H=1/0),this.$changedLines?(this.$changedLines.firstRow>L&&(this.$changedLines.firstRow=L),this.$changedLines.lastRow<H&&(this.$changedLines.lastRow=H)):this.$changedLines={firstRow:L,lastRow:H},this.$changedLines.lastRow<this.layerConfig.firstRow)if(P)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},F.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},F.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},F.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},F.prototype.updateFull=function(L){L?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},F.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},F.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},F.prototype.onResize=function(L,H,P,I){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=L?1:0;var $=this.container;I||(I=$.clientHeight||$.scrollHeight),!I&&this.$maxLines&&this.lineHeight>1&&(!$.style.height||$.style.height=="0px")&&($.style.height="1px",I=$.clientHeight||$.scrollHeight),P||(P=$.clientWidth||$.scrollWidth);var C=this.$updateCachedSize(L,H,P,I);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!P&&!I)return this.resizing=0;L&&(this.$gutterLayer.$padding=null),L?this.$renderChanges(C|this.$changes,!0):this.$loop.schedule(C|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},F.prototype.$updateCachedSize=function(L,H,P,I){I-=this.$extraHeight||0;var $=0,C=this.$size,N={width:C.width,height:C.height,scrollerHeight:C.scrollerHeight,scrollerWidth:C.scrollerWidth};if(I&&(L||C.height!=I)&&(C.height=I,$|=this.CHANGE_SIZE,C.scrollerHeight=C.height,this.$horizScroll&&(C.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(C.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",$=$|this.CHANGE_SCROLL),P&&(L||C.width!=P)){$|=this.CHANGE_SIZE,C.width=P,H==null&&(H=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=H,f.setStyle(this.scrollBarH.element.style,"left",H+"px"),f.setStyle(this.scroller.style,"left",H+this.margin.left+"px"),C.scrollerWidth=Math.max(0,P-H-this.scrollBarV.getWidth()-this.margin.h),f.setStyle(this.$gutter.style,"left",this.margin.left+"px");var j=this.scrollBarV.getWidth()+"px";f.setStyle(this.scrollBarH.element.style,"right",j),f.setStyle(this.scroller.style,"right",j),f.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(C.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||L)&&($|=this.CHANGE_FULL)}return C.$dirty=!P||!I,$&&this._signal("resize",N),$},F.prototype.onGutterResize=function(L){var H=this.$showGutter?L:0;H!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,H,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},F.prototype.adjustWrapLimit=function(){var L=this.$size.scrollerWidth-this.$padding*2,H=Math.floor(L/this.characterWidth);return this.session.adjustWrapLimit(H,this.$showPrintMargin&&this.$printMarginColumn)},F.prototype.setAnimatedScroll=function(L){this.setOption("animatedScroll",L)},F.prototype.getAnimatedScroll=function(){return this.$animatedScroll},F.prototype.setShowInvisibles=function(L){this.setOption("showInvisibles",L),this.session.$bidiHandler.setShowInvisibles(L)},F.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},F.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},F.prototype.setDisplayIndentGuides=function(L){this.setOption("displayIndentGuides",L)},F.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},F.prototype.setHighlightIndentGuides=function(L){this.setOption("highlightIndentGuides",L)},F.prototype.setShowPrintMargin=function(L){this.setOption("showPrintMargin",L)},F.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},F.prototype.setPrintMarginColumn=function(L){this.setOption("printMarginColumn",L)},F.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},F.prototype.getShowGutter=function(){return this.getOption("showGutter")},F.prototype.setShowGutter=function(L){return this.setOption("showGutter",L)},F.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},F.prototype.setFadeFoldWidgets=function(L){this.setOption("fadeFoldWidgets",L)},F.prototype.setHighlightGutterLine=function(L){this.setOption("highlightGutterLine",L)},F.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},F.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var L=f.createElement("div");L.className="ace_layer ace_print-margin-layer",this.$printMarginEl=f.createElement("div"),this.$printMarginEl.className="ace_print-margin",L.appendChild(this.$printMarginEl),this.content.insertBefore(L,this.content.firstChild)}var H=this.$printMarginEl.style;H.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",H.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},F.prototype.getContainerElement=function(){return this.container},F.prototype.getMouseEventTarget=function(){return this.scroller},F.prototype.getTextAreaContainer=function(){return this.container},F.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var L=this.textarea.style,H=this.$composition;if(!this.$keepTextAreaAtCursor&&!H){f.translate(this.textarea,-100,0);return}var P=this.$cursorLayer.$pixelPos;if(P){H&&H.markerRange&&(P=this.$cursorLayer.getPixelPosition(H.markerRange.start,!0));var I=this.layerConfig,$=P.top,C=P.left;$-=I.offset;var N=H&&H.useTextareaForIME||x.isMobile?this.lineHeight:1;if($<0||$>I.height-N){f.translate(this.textarea,0,0);return}var j=1,U=this.$size.height-N;if(!H)$+=this.lineHeight;else if(H.useTextareaForIME){var K=this.textarea.value;j=this.characterWidth*this.session.$getStringScreenWidth(K)[0]}else $+=this.lineHeight+2;C-=this.scrollLeft,C>this.$size.scrollerWidth-j&&(C=this.$size.scrollerWidth-j),C+=this.gutterWidth+this.margin.left,f.setStyle(L,"height",N+"px"),f.setStyle(L,"width",j+"px"),f.translate(this.textarea,Math.min(C,this.$size.scrollerWidth-j),Math.min($,U))}}},F.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},F.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},F.prototype.getLastFullyVisibleRow=function(){var L=this.layerConfig,H=L.lastRow,P=this.session.documentToScreenRow(H,0)*L.lineHeight;return P-this.session.getScrollTop()>L.height-L.lineHeight?H-1:H},F.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},F.prototype.setPadding=function(L){this.$padding=L,this.$textLayer.setPadding(L),this.$cursorLayer.setPadding(L),this.$markerFront.setPadding(L),this.$markerBack.setPadding(L),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},F.prototype.setScrollMargin=function(L,H,P,I){var $=this.scrollMargin;$.top=L|0,$.bottom=H|0,$.right=I|0,$.left=P|0,$.v=$.top+$.bottom,$.h=$.left+$.right,$.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-$.top),this.updateFull()},F.prototype.setMargin=function(L,H,P,I){var $=this.margin;$.top=L|0,$.bottom=H|0,$.right=I|0,$.left=P|0,$.v=$.top+$.bottom,$.h=$.left+$.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},F.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},F.prototype.setHScrollBarAlwaysVisible=function(L){this.setOption("hScrollBarAlwaysVisible",L)},F.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},F.prototype.setVScrollBarAlwaysVisible=function(L){this.setOption("vScrollBarAlwaysVisible",L)},F.prototype.$updateScrollBarV=function(){var L=this.layerConfig.maxHeight,H=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(L-=(H-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>L-H&&(L=this.scrollTop+H,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(L+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},F.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},F.prototype.freeze=function(){this.$frozen=!0},F.prototype.unfreeze=function(){this.$frozen=!1},F.prototype.$renderChanges=function(L,H){if(this.$changes&&(L|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!L&&!H){this.$changes|=L;return}if(this.$size.$dirty)return this.$changes|=L,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",L),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var P=this.layerConfig;if(L&this.CHANGE_FULL||L&this.CHANGE_SIZE||L&this.CHANGE_TEXT||L&this.CHANGE_LINES||L&this.CHANGE_SCROLL||L&this.CHANGE_H_SCROLL){if(L|=this.$computeLayerConfig()|this.$loop.clear(),P.firstRow!=this.layerConfig.firstRow&&P.firstRowScreen==this.layerConfig.firstRowScreen){var I=this.scrollTop+(P.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;I>0&&(this.scrollTop=I,L=L|this.CHANGE_SCROLL,L|=this.$computeLayerConfig()|this.$loop.clear())}P=this.layerConfig,this.$updateScrollBarV(),L&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),f.translate(this.content,-this.scrollLeft,-P.offset);var $=P.width+2*this.$padding+"px",C=P.minHeight+"px";f.setStyle(this.content.style,"width",$),f.setStyle(this.content.style,"height",C)}if(L&this.CHANGE_H_SCROLL&&(f.translate(this.content,-this.scrollLeft,-P.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),L&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(P),this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P),this.$markerBack.update(P),this.$markerFront.update(P),this.$cursorLayer.update(P),this.$moveTextAreaToCursor(),this._signal("afterRender",L);return}if(L&this.CHANGE_SCROLL){this.$changedLines=null,L&this.CHANGE_TEXT||L&this.CHANGE_LINES?this.$textLayer.update(P):this.$textLayer.scrollLines(P),this.$showGutter&&(L&this.CHANGE_GUTTER||L&this.CHANGE_LINES?this.$gutterLayer.update(P):this.$gutterLayer.scrollLines(P)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P),this.$markerBack.update(P),this.$markerFront.update(P),this.$cursorLayer.update(P),this.$moveTextAreaToCursor(),this._signal("afterRender",L);return}L&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(P),this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):L&this.CHANGE_LINES?((this.$updateLines()||L&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):L&this.CHANGE_TEXT||L&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)):L&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(P),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(P)),L&this.CHANGE_CURSOR&&(this.$cursorLayer.update(P),this.$moveTextAreaToCursor()),L&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(P),L&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(P),this._signal("afterRender",L)},F.prototype.$autosize=function(){var L=this.session.getScreenLength()*this.lineHeight,H=this.$maxLines*this.lineHeight,P=Math.min(H,Math.max((this.$minLines||1)*this.lineHeight,L))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(P+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&P>this.$maxPixelHeight&&(P=this.$maxPixelHeight);var I=P<=2*this.lineHeight,$=!I&&L>H;if(P!=this.desiredHeight||this.$size.height!=this.desiredHeight||$!=this.$vScroll){$!=this.$vScroll&&(this.$vScroll=$,this.scrollBarV.setVisible($));var C=this.container.clientWidth;this.container.style.height=P+"px",this.$updateCachedSize(!0,this.$gutterWidth,C,P),this.desiredHeight=P,this._signal("autosize")}},F.prototype.$computeLayerConfig=function(){var L=this.session,H=this.$size,P=H.height<=2*this.lineHeight,I=this.session.getScreenLength(),$=I*this.lineHeight,C=this.$getLongestLine(),N=!P&&(this.$hScrollBarAlwaysVisible||H.scrollerWidth-C-2*this.$padding<0),j=this.$horizScroll!==N;j&&(this.$horizScroll=N,this.scrollBarH.setVisible(N));var U=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),P=H.height<=2*this.lineHeight);var K=H.scrollerHeight+this.lineHeight,Z=!this.$maxLines&&this.$scrollPastEnd?(H.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;$+=Z;var te=this.scrollMargin;this.session.setScrollTop(Math.max(-te.top,Math.min(this.scrollTop,$-H.scrollerHeight+te.bottom))),this.session.setScrollLeft(Math.max(-te.left,Math.min(this.scrollLeft,C+2*this.$padding-H.scrollerWidth+te.right)));var he=!P&&(this.$vScrollBarAlwaysVisible||H.scrollerHeight-$+Z<0||this.scrollTop>te.top),ne=U!==he;ne&&(this.$vScroll=he,this.scrollBarV.setVisible(he));var ae=this.scrollTop%this.lineHeight,ue=Math.ceil(K/this.lineHeight)-1,ce=Math.max(0,Math.round((this.scrollTop-ae)/this.lineHeight)),ge=ce+ue,Ee,Re,Le=this.lineHeight;ce=L.screenToDocumentRow(ce,0);var Xe=L.getFoldLine(ce);Xe&&(ce=Xe.start.row),Ee=L.documentToScreenRow(ce,0),Re=L.getRowLength(ce)*Le,ge=Math.min(L.screenToDocumentRow(ge,0),L.getLength()-1),K=H.scrollerHeight+L.getRowLength(ge)*Le+Re,ae=this.scrollTop-Ee*Le;var Ge=0;return(this.layerConfig.width!=C||j)&&(Ge=this.CHANGE_H_SCROLL),(j||ne)&&(Ge|=this.$updateCachedSize(!0,this.gutterWidth,H.width,H.height),this._signal("scrollbarVisibilityChanged"),ne&&(C=this.$getLongestLine())),this.layerConfig={width:C,padding:this.$padding,firstRow:ce,firstRowScreen:Ee,lastRow:ge,lineHeight:Le,characterWidth:this.characterWidth,minHeight:K,maxHeight:$,offset:ae,gutterOffset:Le?Math.max(0,Math.ceil((ae+H.height-H.scrollerHeight)/Le)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(C-this.$padding),Ge},F.prototype.$updateLines=function(){if(this.$changedLines){var L=this.$changedLines.firstRow,H=this.$changedLines.lastRow;this.$changedLines=null;var P=this.layerConfig;if(!(L>P.lastRow+1)&&!(H<P.firstRow)){if(H===1/0){this.$showGutter&&this.$gutterLayer.update(P),this.$textLayer.update(P);return}return this.$textLayer.updateLines(P,L,H),!0}}},F.prototype.$getLongestLine=function(){var L=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(L+=1),this.$textLayer&&L>this.$textLayer.MAX_LINE_LENGTH&&(L=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(L*this.characterWidth))},F.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},F.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},F.prototype.addGutterDecoration=function(L,H){this.$gutterLayer.addGutterDecoration(L,H)},F.prototype.removeGutterDecoration=function(L,H){this.$gutterLayer.removeGutterDecoration(L,H)},F.prototype.updateBreakpoints=function(L){this._rows=L,this.$loop.schedule(this.CHANGE_GUTTER)},F.prototype.setAnnotations=function(L){this.$gutterLayer.setAnnotations(L),this.$loop.schedule(this.CHANGE_GUTTER)},F.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},F.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},F.prototype.showCursor=function(){this.$cursorLayer.showCursor()},F.prototype.scrollSelectionIntoView=function(L,H,P){this.scrollCursorIntoView(L,P),this.scrollCursorIntoView(H,P)},F.prototype.scrollCursorIntoView=function(L,H,P){if(this.$size.scrollerHeight!==0){var I=this.$cursorLayer.getPixelPosition(L),$=I.left,C=I.top,N=P&&P.top||0,j=P&&P.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var U=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;U+N>C?(H&&U+N>C+this.lineHeight&&(C-=H*this.$size.scrollerHeight),C===0&&(C=-this.scrollMargin.top),this.session.setScrollTop(C)):U+this.$size.scrollerHeight-j<C+this.lineHeight&&(H&&U+this.$size.scrollerHeight-j<C-this.lineHeight&&(C+=H*this.$size.scrollerHeight),this.session.setScrollTop(C+this.lineHeight+j-this.$size.scrollerHeight));var K=this.scrollLeft,Z=2*this.layerConfig.characterWidth;$-Z<K?($-=Z,$<this.$padding+Z&&($=-this.scrollMargin.left),this.session.setScrollLeft($)):($+=Z,K+this.$size.scrollerWidth<$+this.characterWidth?this.session.setScrollLeft(Math.round($+this.characterWidth-this.$size.scrollerWidth)):K<=this.$padding&&$-K<this.characterWidth&&this.session.setScrollLeft(0))}},F.prototype.getScrollTop=function(){return this.session.getScrollTop()},F.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},F.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},F.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},F.prototype.scrollToRow=function(L){this.session.setScrollTop(L*this.lineHeight)},F.prototype.alignCursor=function(L,H){typeof L=="number"&&(L={row:L,column:0});var P=this.$cursorLayer.getPixelPosition(L),I=this.$size.scrollerHeight-this.lineHeight,$=P.top-I*(H||0);return this.session.setScrollTop($),$},F.prototype.$calcSteps=function(L,H){var P=0,I=this.STEPS,$=[],C=function(N,j,U){return U*(Math.pow(N-1,3)+1)+j};for(P=0;P<I;++P)$.push(C(P/this.STEPS,L,H-L));return $},F.prototype.scrollToLine=function(L,H,P,I){var $=this.$cursorLayer.getPixelPosition({row:L,column:0}),C=$.top;H&&(C-=this.$size.scrollerHeight/2);var N=this.scrollTop;this.session.setScrollTop(C),P!==!1&&this.animateScrolling(N,I)},F.prototype.animateScrolling=function(L,H){var P=this.scrollTop;if(!this.$animatedScroll)return;var I=this;if(L==P)return;if(this.$scrollAnimation){var $=this.$scrollAnimation.steps;if($.length&&(L=$[0],L==P))return}var C=I.$calcSteps(L,P);this.$scrollAnimation={from:L,to:P,steps:C},clearInterval(this.$timer),I.session.setScrollTop(C.shift()),I.session.$scrollTop=P;function N(){I.$timer=clearInterval(I.$timer),I.$scrollAnimation=null,I.$stopAnimation=!1,H&&H()}this.$timer=setInterval(function(){if(I.$stopAnimation){N();return}if(!I.session)return clearInterval(I.$timer);C.length?(I.session.setScrollTop(C.shift()),I.session.$scrollTop=P):P!=null?(I.session.$scrollTop=-1,I.session.setScrollTop(P),P=null):N()},10)},F.prototype.scrollToY=function(L){this.scrollTop!==L&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=L)},F.prototype.scrollToX=function(L){this.scrollLeft!==L&&(this.scrollLeft=L),this.$loop.schedule(this.CHANGE_H_SCROLL)},F.prototype.scrollTo=function(L,H){this.session.setScrollTop(H),this.session.setScrollLeft(L)},F.prototype.scrollBy=function(L,H){H&&this.session.setScrollTop(this.session.getScrollTop()+H),L&&this.session.setScrollLeft(this.session.getScrollLeft()+L)},F.prototype.isScrollableBy=function(L,H){if(H<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||H>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||L<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||L>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},F.prototype.pixelToScreenCoordinates=function(L,H){var P;if(this.$hasCssTransforms){P={top:0,left:0};var I=this.$fontMetrics.transformCoordinates([L,H]);L=I[1]-this.gutterWidth-this.margin.left,H=I[0]}else P=this.scroller.getBoundingClientRect();var $=L+this.scrollLeft-P.left-this.$padding,C=$/this.characterWidth,N=Math.floor((H+this.scrollTop-P.top)/this.lineHeight),j=this.$blockCursor?Math.floor(C):Math.round(C);return{row:N,column:j,side:C-j>0?1:-1,offsetX:$}},F.prototype.screenToTextCoordinates=function(L,H){var P;if(this.$hasCssTransforms){P={top:0,left:0};var I=this.$fontMetrics.transformCoordinates([L,H]);L=I[1]-this.gutterWidth-this.margin.left,H=I[0]}else P=this.scroller.getBoundingClientRect();var $=L+this.scrollLeft-P.left-this.$padding,C=$/this.characterWidth,N=this.$blockCursor?Math.floor(C):Math.round(C),j=Math.floor((H+this.scrollTop-P.top)/this.lineHeight);return this.session.screenToDocumentPosition(j,Math.max(N,0),$)},F.prototype.textToScreenCoordinates=function(L,H){var P=this.scroller.getBoundingClientRect(),I=this.session.documentToScreenPosition(L,H),$=this.$padding+(this.session.$bidiHandler.isBidiRow(I.row,L)?this.session.$bidiHandler.getPosLeft(I.column):Math.round(I.column*this.characterWidth)),C=I.row*this.lineHeight;return{pageX:P.left+$-this.scrollLeft,pageY:P.top+C-this.scrollTop}},F.prototype.visualizeFocus=function(){f.addCssClass(this.container,"ace_focus")},F.prototype.visualizeBlur=function(){f.removeCssClass(this.container,"ace_focus")},F.prototype.showComposition=function(L){this.$composition=L,L.cssText||(L.cssText=this.textarea.style.cssText),L.useTextareaForIME==null&&(L.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(f.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):L.markerId=this.session.addMarker(L.markerRange,"ace_composition_marker","text")},F.prototype.setCompositionText=function(L){var H=this.session.selection.cursor;this.addToken(L,"composition_placeholder",H.row,H.column),this.$moveTextAreaToCursor()},F.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),f.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var L=this.session.selection.cursor;this.removeExtraToken(L.row,L.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},F.prototype.setGhostText=function(L,H){var P=this.session.selection.cursor,I=H||{row:P.row,column:P.column};this.removeGhostText();var $=this.$calculateWrappedTextChunks(L,I);this.addToken($[0].text,"ghost_text",I.row,I.column),this.$ghostText={text:L,position:{row:I.row,column:I.column}};var C=f.createElement("div");if($.length>1){var N=this.hideTokensAfterPosition(I.row,I.column),j;$.slice(1).forEach(function(ne){var ae=f.createElement("div"),ue=f.createElement("span");ue.className="ace_ghost_text",ne.wrapped&&(ae.className="ghost_text_line_wrapped"),ne.text.length===0&&(ne.text=" "),ue.appendChild(f.createTextNode(ne.text)),ae.appendChild(ue),C.appendChild(ae),j=ae}),N.forEach(function(ne){var ae=f.createElement("span");M(ne.type)||(ae.className="ace_"+ne.type.replace(/\./g," ace_")),ae.appendChild(f.createTextNode(ne.value)),j.appendChild(ae)}),this.$ghostTextWidget={el:C,row:I.row,column:I.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var U=this.$cursorLayer.getPixelPosition(I,!0),K=this.container,Z=K.getBoundingClientRect().height,te=$.length*this.lineHeight,he=te<Z-U.top;if(he)return;te<Z?this.scrollBy(0,($.length-1)*this.lineHeight):this.scrollToRow(I.row)}},F.prototype.$calculateWrappedTextChunks=function(L,H){var P=this.$size.scrollerWidth-this.$padding*2,I=Math.floor(P/this.characterWidth)-2;I=I<=0?60:I;for(var $=L.split(/\r?\n/),C=[],N=0;N<$.length;N++){var j=this.session.$getDisplayTokens($[N],H.column),U=this.session.$computeWrapSplits(j,I,this.session.$tabSize);if(U.length>0){var K=0;U.push($[N].length);for(var Z=0;Z<U.length;Z++){var te=$[N].slice(K,U[Z]);C.push({text:te,wrapped:!0}),K=U[Z]}}else C.push({text:$[N],wrapped:!1})}return C},F.prototype.removeGhostText=function(){if(this.$ghostText){var L=this.$ghostText.position;this.removeExtraToken(L.row,L.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},F.prototype.addToken=function(L,H,P,I){var $=this.session;$.bgTokenizer.lines[P]=null;var C={type:H,value:L},N=$.getTokens(P);if(I==null||!N.length)N.push(C);else for(var j=0,U=0;U<N.length;U++){var K=N[U];if(j+=K.value.length,I<=j){var Z=K.value.length-(j-I),te=K.value.slice(0,Z),he=K.value.slice(Z);N.splice(U,1,{type:K.type,value:te},C,{type:K.type,value:he});break}}this.updateLines(P,P)},F.prototype.hideTokensAfterPosition=function(L,H){for(var P=this.session.getTokens(L),I=0,$=!1,C=[],N=0;N<P.length;N++){var j=P[N];if(I+=j.value.length,j.type!=="ghost_text"){if($){C.push({type:j.type,value:j.value}),j.type="hidden_token";continue}I===H&&($=!0)}}return this.updateLines(L,L),C},F.prototype.removeExtraToken=function(L,H){this.session.bgTokenizer.lines[L]=null,this.updateLines(L,L)},F.prototype.setTheme=function(L,H){var P=this;if(this.$themeId=L,P._dispatchEvent("themeChange",{theme:L}),!L||typeof L=="string"){var I=L||this.$options.theme.initialValue;p.loadModule(["theme",I],$)}else $(L);function $(C){if(P.$themeId!=L)return H&&H();if(!C||!C.cssClass)throw new Error("couldn't load module "+L+" or it didn't call define");C.$id&&(P.$themeId=C.$id),f.importCssString(C.cssText,C.cssClass,P.container),P.theme&&f.removeCssClass(P.container,P.theme.cssClass);var N="padding"in C?C.padding:"padding"in(P.theme||{})?4:P.$padding;P.$padding&&N!=P.$padding&&P.setPadding(N),P.$theme=C.cssClass,P.theme=C,f.addCssClass(P.container,C.cssClass),f.setCssClass(P.container,"ace_dark",C.isDark),P.$size&&(P.$size.width=0,P.$updateSizeAsync()),P._dispatchEvent("themeLoaded",{theme:C}),H&&H(),x.isSafari&&P.scroller&&(P.scroller.style.background="red",P.scroller.style.background="")}},F.prototype.getTheme=function(){return this.$themeId},F.prototype.setStyle=function(L,H){f.setCssClass(this.container,L,H!==!1)},F.prototype.unsetStyle=function(L){f.removeCssClass(this.container,L)},F.prototype.setCursorStyle=function(L){f.setStyle(this.scroller.style,"cursor",L)},F.prototype.setMouseCursor=function(L){f.setStyle(this.scroller.style,"cursor",L)},F.prototype.attachToShadowRoot=function(){f.importCssString(T,"ace_editor.css",this.container)},F.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},F.prototype.$updateCustomScrollbar=function(L){var H=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,L===!0?(this.scrollBarV=new m(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollTop(P.data-H.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollLeft(P.data-H.scrollMargin.left)}),this.$scrollDecorator=new S(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new o(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollTop(P.data-H.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(P){H.$scrollAnimation||H.session.setScrollLeft(P.data-H.scrollMargin.left)}))},F.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var L=this;this.$resizeTimer=b.delayedCall(function(){L.destroyed||L.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(H){var P=H[0].contentRect.width,I=H[0].contentRect.height;Math.abs(L.$size.width-P)>1||Math.abs(L.$size.height-I)>1?L.$resizeTimer.delay():L.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},F}();O.prototype.CHANGE_CURSOR=1,O.prototype.CHANGE_MARKER=2,O.prototype.CHANGE_GUTTER=4,O.prototype.CHANGE_SCROLL=8,O.prototype.CHANGE_LINES=16,O.prototype.CHANGE_TEXT=32,O.prototype.CHANGE_SIZE=64,O.prototype.CHANGE_MARKER_BACK=128,O.prototype.CHANGE_MARKER_FRONT=256,O.prototype.CHANGE_FULL=512,O.prototype.CHANGE_H_SCROLL=1024,O.prototype.$changes=0,O.prototype.$padding=null,O.prototype.$frozen=!1,O.prototype.STEPS=8,d.implement(O.prototype,R),p.defineOptions(O.prototype,"renderer",{useResizeObserver:{set:function(F){!F&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):F&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(F){this.$textLayer.setShowInvisibles(F)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(F){typeof F=="number"&&(this.$printMarginColumn=F),this.$showPrintMargin=!!F,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(F){this.$gutter.style.display=F?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(F){this.$gutterLayer.$useSvgGutterIcons=F},initialValue:!1},showFoldedAnnotations:{set:function(F){this.$gutterLayer.$showFoldedAnnotations=F},initialValue:!1},fadeFoldWidgets:{set:function(F){f.setCssClass(this.$gutter,"ace_fade-fold-widgets",F)},initialValue:!1},showFoldWidgets:{set:function(F){this.$gutterLayer.setShowFoldWidgets(F),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(F){this.$textLayer.setDisplayIndentGuides(F)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(F){this.$textLayer.setHighlightIndentGuides(F)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(F){this.$gutterLayer.setHighlightGutterLine(F),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(F){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(F){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(F){typeof F=="number"&&(F=F+"px"),this.container.style.fontSize=F,this.updateFontSize()},initialValue:12},fontFamily:{set:function(F){this.container.style.fontFamily=F,this.updateFontSize()}},maxLines:{set:function(F){this.updateFull()}},minLines:{set:function(F){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(F){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(F){F=+F||0,this.$scrollPastEnd!=F&&(this.$scrollPastEnd=F,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(F){this.$gutterLayer.$fixedWidth=!!F,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(F){this.$updateCustomScrollbar(F)},initialValue:!1},theme:{set:function(F){this.setTheme(F)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!x.isMobile&&!x.isIE}}),r.VirtualRenderer=O}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(n,r,u){var d=n("../lib/oop"),f=n("../lib/net"),b=n("../lib/event_emitter").EventEmitter,p=n("../config");function g(c){var o="importScripts('"+f.qualifyURL(c)+"');";try{return new Blob([o],{type:"application/javascript"})}catch{var l=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new l;return m.append(o),m.getBlob("application/javascript")}}function i(c){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(p.get("loadWorkerFromBlob")){var o=g(c),l=window.URL||window.webkitURL,m=l.createObjectURL(o);return new Worker(m)}return new Worker(c)}var a=function(c){c.postMessage||(c=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=c,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(){d.implement(this,b),this.$createWorkerFromOldConfig=function(c,o,l,m,w){if(n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl),p.get("packaged")||!n.toUrl)m=m||p.moduleUrl(o,"worker");else{var k=this.$normalizePath;m=m||k(n.toUrl("ace/worker/worker.js",null,"_"));var R={};c.forEach(function(T){R[T]=k(n.toUrl(T,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=i(m),w&&this.send("importScripts",w),this.$worker.postMessage({init:!0,tlns:R,module:o,classname:l}),this.$worker},this.onMessage=function(c){var o=c.data;switch(o.type){case"event":this._signal(o.name,{data:o.data});break;case"call":var l=this.callbacks[o.id];l&&(l(o.data),delete this.callbacks[o.id]);break;case"error":this.reportError(o.data);break;case"log":window.console&&console.log&&console.log.apply(console,o.data);break}},this.reportError=function(c){window.console&&console.error&&console.error(c)},this.$normalizePath=function(c){return f.qualifyURL(c)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(c){c.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(c,o){this.$worker.postMessage({command:c,args:o})},this.call=function(c,o,l){if(l){var m=this.callbackId++;this.callbacks[m]=l,o.push(m)}this.send(c,o)},this.emit=function(c,o){try{o.data&&o.data.err&&(o.data.err={message:o.data.err.message,stack:o.data.err.stack,code:o.data.err.code}),this.$worker&&this.$worker.postMessage({event:c,data:{data:o.data}})}catch(l){console.error(l.stack)}},this.attachToDocument=function(c){this.$doc&&this.terminate(),this.$doc=c,this.call("setValue",[c.getValue()]),c.on("change",this.changeListener,!0)},this.changeListener=function(c){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),c.action=="insert"?this.deltaQueue.push(c.start,c.lines):this.deltaQueue.push(c.start,c.end)},this.$sendDeltaQueue=function(){var c=this.deltaQueue;c&&(this.deltaQueue=null,c.length>50&&c.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:c}))}}).call(a.prototype);var h=function(c,o,l){var m=null,w=!1,k=Object.create(b),R=[],T=new a({messageBuffer:R,terminate:function(){},postMessage:function(x){R.push(x),m&&(w?setTimeout(S):S())}});T.setEmitSync=function(x){w=x};var S=function(){var x=R.shift();x.command?m[x.command].apply(m,x.args):x.event&&k._signal(x.event,x.data)};return k.postMessage=function(x){T.onMessage({data:x})},k.callback=function(x,M){this.postMessage({type:"call",id:M,data:x})},k.emit=function(x,M){this.postMessage({type:"event",name:x,data:M})},p.loadModule(["worker",o],function(x){for(m=new x[l](k);R.length;)S()}),T};r.UIWorkerClient=h,r.WorkerClient=a,r.createWorker=i}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(n,r,u){var d=n("./range").Range,f=n("./lib/event_emitter").EventEmitter,b=n("./lib/oop"),p=function(){function g(i,a,h,c,o,l){var m=this;this.length=a,this.session=i,this.doc=i.getDocument(),this.mainClass=o,this.othersClass=l,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=c,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=h;var w=i.getUndoManager().$undoStack||i.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=w.length,this.setup(),i.selection.on("changeCursor",this.$onCursorChange)}return g.prototype.setup=function(){var i=this,a=this.doc,h=this.session;this.selectionBefore=h.selection.toJSON(),h.selection.inMultiSelectMode&&h.selection.toSingleRange(),this.pos=a.createAnchor(this.$pos.row,this.$pos.column);var c=this.pos;c.$insertRight=!0,c.detach(),c.markerId=h.addMarker(new d(c.row,c.column,c.row,c.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(o){var l=a.createAnchor(o.row,o.column);l.$insertRight=!0,l.detach(),i.others.push(l)}),h.setUndoSelect(!1)},g.prototype.showOtherMarkers=function(){if(!this.othersActive){var i=this.session,a=this;this.othersActive=!0,this.others.forEach(function(h){h.markerId=i.addMarker(new d(h.row,h.column,h.row,h.column+a.length),a.othersClass,null,!1)})}},g.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var i=0;i<this.others.length;i++)this.session.removeMarker(this.others[i].markerId)}},g.prototype.onUpdate=function(i){if(this.$updating)return this.updateAnchors(i);var a=i;if(a.start.row===a.end.row&&a.start.row===this.pos.row){this.$updating=!0;var h=i.action==="insert"?a.end.column-a.start.column:a.start.column-a.end.column,c=a.start.column>=this.pos.column&&a.start.column<=this.pos.column+this.length+1,o=a.start.column-this.pos.column;if(this.updateAnchors(i),c&&(this.length+=h),c&&!this.session.$fromUndo){if(i.action==="insert")for(var l=this.others.length-1;l>=0;l--){var m=this.others[l],w={row:m.row,column:m.column+o};this.doc.insertMergedLines(w,i.lines)}else if(i.action==="remove")for(var l=this.others.length-1;l>=0;l--){var m=this.others[l],w={row:m.row,column:m.column+o};this.doc.remove(new d(w.row,w.column,w.row,w.column-h))}}this.$updating=!1,this.updateMarkers()}},g.prototype.updateAnchors=function(i){this.pos.onChange(i);for(var a=this.others.length;a--;)this.others[a].onChange(i);this.updateMarkers()},g.prototype.updateMarkers=function(){if(!this.$updating){var i=this,a=this.session,h=function(o,l){a.removeMarker(o.markerId),o.markerId=a.addMarker(new d(o.row,o.column,o.row,o.column+i.length),l,null,!1)};h(this.pos,this.mainClass);for(var c=this.others.length;c--;)h(this.others[c],this.othersClass)}},g.prototype.onCursorChange=function(i){if(!(this.$updating||!this.session)){var a=this.session.selection.getCursor();a.row===this.pos.row&&a.column>=this.pos.column&&a.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",i)):(this.hideOtherMarkers(),this._emit("cursorLeave",i))}},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 i=this.session.getUndoManager(),a=(i.$undoStack||i.$undostack).length-this.$undoStackDepth,h=0;h<a;h++)i.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},g}();b.implement(p.prototype,f),r.PlaceHolder=p}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,u){var d=n("../lib/event"),f=n("../lib/useragent");function b(g,i){return g.row==i.row&&g.column==i.column}function p(g){var i=g.domEvent,a=i.altKey,h=i.shiftKey,c=i.ctrlKey,o=g.getAccelKey(),l=g.getButton();if(c&&f.isMac&&(l=i.button),g.editor.inMultiSelectMode&&l==2){g.editor.textInput.onContextMenu(g.domEvent);return}if(!c&&!a&&!o){l===0&&g.editor.inMultiSelectMode&&g.editor.exitMultiSelectMode();return}if(l===0){var m=g.editor,w=m.selection,k=m.inMultiSelectMode,R=g.getDocumentPosition(),T=w.getCursor(),S=g.inSelection()||w.isEmpty()&&b(R,T),x=g.x,M=g.y,O=function(te){x=te.clientX,M=te.clientY},F=m.session,L=m.renderer.pixelToScreenCoordinates(x,M),H=L,P;if(m.$mouseHandler.$enableJumpToDef)c&&a||o&&a?P=h?"block":"add":a&&m.$blockSelectEnabled&&(P="block");else if(o&&!a){if(P="add",!k&&h)return}else a&&m.$blockSelectEnabled&&(P="block");if(P&&f.isMac&&i.ctrlKey&&m.$mouseHandler.cancelContextMenu(),P=="add"){if(!k&&S)return;if(!k){var I=w.toOrientedRange();m.addSelectionMarker(I)}var $=w.rangeList.rangeAtPoint(R);m.inVirtualSelectionMode=!0,h&&($=null,I=w.ranges[0]||I,m.removeSelectionMarker(I)),m.once("mouseup",function(){var te=w.toOrientedRange();$&&te.isEmpty()&&b($.cursor,te.cursor)?w.substractPoint(te.cursor):(h?w.substractPoint(I.cursor):I&&(m.removeSelectionMarker(I),w.addRange(I)),w.addRange(te)),m.inVirtualSelectionMode=!1})}else if(P=="block"){g.stop(),m.inVirtualSelectionMode=!0;var C,N=[],j=function(){var te=m.renderer.pixelToScreenCoordinates(x,M),he=F.screenToDocumentPosition(te.row,te.column,te.offsetX);b(H,te)&&b(he,w.lead)||(H=te,m.selection.moveToPosition(he),m.renderer.scrollCursorIntoView(),m.removeSelectionMarkers(N),N=w.rectangularRangeBlock(H,L),m.$mouseHandler.$clickSelection&&N.length==1&&N[0].isEmpty()&&(N[0]=m.$mouseHandler.$clickSelection.clone()),N.forEach(m.addSelectionMarker,m),m.updateSelectionMarkers())};k&&!o?w.toSingleRange():!k&&o&&(C=w.toOrientedRange(),m.addSelectionMarker(C)),h?L=F.documentToScreenPosition(w.lead):w.moveToPosition(R),H={row:-1,column:-1};var U=function(te){j(),clearInterval(Z),m.removeSelectionMarkers(N),N.length||(N=[w.toOrientedRange()]),C&&(m.removeSelectionMarker(C),w.toSingleRange(C));for(var he=0;he<N.length;he++)w.addRange(N[he]);m.inVirtualSelectionMode=!1,m.$mouseHandler.$clickSelection=null},K=j;d.capture(m.container,O,U);var Z=setInterval(function(){K()},20);return g.preventDefault()}}}r.onMouseDown=p}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(n,r,u){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(f){f.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(f){f.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(f){f.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(f){f.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(f){f.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(f){f.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(f){f.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(f){f.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(f){f.multiSelect.rangeCount>1?f.multiSelect.joinSelections():f.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(f){f.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(f){f.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(f){f.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],r.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(f){f.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(f){return f&&f.inMultiSelectMode}}];var d=n("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new d(r.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(n,r,u){var d=n("./range_list").RangeList,f=n("./range").Range,b=n("./selection").Selection,p=n("./mouse/multi_select_handler").onMouseDown,g=n("./lib/event"),i=n("./lib/lang"),a=n("./commands/multi_select_commands");r.commands=a.defaultCommands.concat(a.multiSelectCommands);var h=n("./search").Search,c=new h;function o(T,S,x){return c.$options.wrap=!0,c.$options.needle=S,c.$options.backwards=x==-1,c.find(T)}var l=n("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(l.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(T,S){if(T){if(!this.inMultiSelectMode&&this.rangeCount===0){var x=this.toOrientedRange();if(this.rangeList.add(x),this.rangeList.add(T),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),S||this.fromOrientedRange(T);this.rangeList.removeAll(),this.rangeList.add(x),this.$onAddRange(x)}T.cursor||(T.cursor=T.end);var M=this.rangeList.add(T);return this.$onAddRange(T),M.length&&this.$onRemoveRange(M),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),S||this.fromOrientedRange(T)}},this.toSingleRange=function(T){T=T||this.ranges[0];var S=this.rangeList.removeAll();S.length&&this.$onRemoveRange(S),T&&this.fromOrientedRange(T)},this.substractPoint=function(T){var S=this.rangeList.substractPoint(T);if(S)return this.$onRemoveRange(S),S[0]},this.mergeOverlappingRanges=function(){var T=this.rangeList.merge();T.length&&this.$onRemoveRange(T)},this.$onAddRange=function(T){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(T),this._signal("addRange",{range:T})},this.$onRemoveRange=function(T){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var S=this.rangeList.ranges.pop();T.push(S),this.rangeCount=0}for(var x=T.length;x--;){var M=this.ranges.indexOf(T[x]);this.ranges.splice(M,1)}this._signal("removeRange",{ranges:T}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),S=S||this.ranges[0],S&&!S.isEqual(this.getRange())&&this.fromOrientedRange(S)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new d,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var T=this.ranges.length?this.ranges:[this.getRange()],S=[],x=0;x<T.length;x++){var M=T[x],O=M.start.row,F=M.end.row;if(O===F)S.push(M.clone());else{for(S.push(new f(O,M.start.column,O,this.session.getLine(O).length));++O<F;)S.push(this.getLineRange(O,!0));S.push(new f(F,0,F,M.end.column))}x==0&&!this.isBackwards()&&(S=S.reverse())}this.toSingleRange();for(var x=S.length;x--;)this.addRange(S[x])},this.joinSelections=function(){var T=this.rangeList.ranges,S=T[T.length-1],x=f.fromPoints(T[0].start,S.end);this.toSingleRange(),this.setSelectionRange(x,S.cursor==S.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var T=this.rangeList.ranges,S=T[T.length-1],x=f.fromPoints(T[0].start,S.end);this.toSingleRange(),this.setSelectionRange(x,S.cursor==S.start)}else{var M=this.session.documentToScreenPosition(this.cursor),O=this.session.documentToScreenPosition(this.anchor),F=this.rectangularRangeBlock(M,O);F.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(T,S,x){var M=[],O=T.column<S.column;if(O)var F=T.column,L=S.column,H=T.offsetX,P=S.offsetX;else var F=S.column,L=T.column,H=S.offsetX,P=T.offsetX;var I=T.row<S.row;if(I)var $=T.row,C=S.row;else var $=S.row,C=T.row;F<0&&(F=0),$<0&&($=0),$==C&&(x=!0);for(var N,j=$;j<=C;j++){var U=f.fromPoints(this.session.screenToDocumentPosition(j,F,H),this.session.screenToDocumentPosition(j,L,P));if(U.isEmpty()){if(N&&w(U.end,N))break;N=U.end}U.cursor=O?U.start:U.end,M.push(U)}if(I&&M.reverse(),!x){for(var K=M.length-1;M[K].isEmpty()&&K>0;)K--;if(K>0)for(var Z=0;M[Z].isEmpty();)Z++;for(var te=K;te>=Z;te--)M[te].isEmpty()&&M.splice(te,1)}return M}}).call(b.prototype);var m=n("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(T){T.cursor||(T.cursor=T.end);var S=this.getSelectionStyle();return T.marker=this.session.addMarker(T,"ace_selection",S),this.session.$selectionMarkers.push(T),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,T},this.removeSelectionMarker=function(T){if(T.marker){this.session.removeMarker(T.marker);var S=this.session.$selectionMarkers.indexOf(T);S!=-1&&this.session.$selectionMarkers.splice(S,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(T){for(var S=this.session.$selectionMarkers,x=T.length;x--;){var M=T[x];if(M.marker){this.session.removeMarker(M.marker);var O=S.indexOf(M);O!=-1&&S.splice(O,1)}}this.session.selectionMarkerCount=S.length},this.$onAddRange=function(T){this.addSelectionMarker(T.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(T){this.removeSelectionMarkers(T.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(T){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(T){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(T){var S=T.command,x=T.editor;if(x.multiSelect){if(S.multiSelectAction)S.multiSelectAction=="forEach"?M=x.forEachSelection(S,T.args):S.multiSelectAction=="forEachLine"?M=x.forEachSelection(S,T.args,!0):S.multiSelectAction=="single"?(x.exitMultiSelectMode(),M=S.exec(x,T.args||{})):M=S.multiSelectAction(x,T.args||{});else{var M=S.exec(x,T.args||{});x.multiSelect.addRange(x.multiSelect.toOrientedRange()),x.multiSelect.mergeOverlappingRanges()}return M}},this.forEachSelection=function(T,S,x){if(!this.inVirtualSelectionMode){var M=x&&x.keepOrder,O=x==!0||x&&x.$byLines,F=this.session,L=this.selection,H=L.rangeList,P=(M?L:H).ranges,I;if(!P.length)return T.exec?T.exec(this,S||{}):T(this,S||{});var $=L._eventRegistry;L._eventRegistry={};var C=new b(F);this.inVirtualSelectionMode=!0;for(var N=P.length;N--;){if(O)for(;N>0&&P[N].start.row==P[N-1].end.row;)N--;C.fromOrientedRange(P[N]),C.index=N,this.selection=F.selection=C;var j=T.exec?T.exec(this,S||{}):T(this,S||{});!I&&j!==void 0&&(I=j),C.toOrientedRange(P[N])}C.detach(),this.selection=F.selection=L,this.inVirtualSelectionMode=!1,L._eventRegistry=$,L.mergeOverlappingRanges(),L.ranges[0]&&L.fromOrientedRange(L.ranges[0]);var U=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),U&&U.from==U.to&&this.renderer.animateScrolling(U.from),I}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var T="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var S=this.multiSelect.rangeList.ranges,x=[],M=0;M<S.length;M++)x.push(this.session.getTextRange(S[M]));var O=this.session.getDocument().getNewLineCharacter();T=x.join(O),T.length==(x.length-1)*O.length&&(T="")}else this.selection.isEmpty()||(T=this.session.getTextRange(this.getSelectionRange()));return T},this.$checkMultiselectChange=function(T,S){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var x=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&S==this.multiSelect.anchor)return;var M=S==this.multiSelect.anchor?x.cursor==x.start?x.end:x.start:x.cursor;M.row!=S.row||this.session.$clipPositionToDocument(M.row,M.column).column!=S.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(T,S,x){if(S=S||{},S.needle=T||S.needle,S.needle==null){var M=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();S.needle=this.session.getTextRange(M)}this.$search.set(S);var O=this.$search.findAll(this.session);if(!O.length)return 0;var F=this.multiSelect;x||F.toSingleRange(O[0]);for(var L=O.length;L--;)F.addRange(O[L],!0);return M&&F.rangeList.rangeAtPoint(M.start)&&F.addRange(M,!0),O.length},this.selectMoreLines=function(T,S){var x=this.selection.toOrientedRange(),M=x.cursor==x.end,O=this.session.documentToScreenPosition(x.cursor);this.selection.$desiredColumn&&(O.column=this.selection.$desiredColumn);var F=this.session.screenToDocumentPosition(O.row+T,O.column);if(x.isEmpty())var H=F;else var L=this.session.documentToScreenPosition(M?x.end:x.start),H=this.session.screenToDocumentPosition(L.row+T,L.column);if(M){var P=f.fromPoints(F,H);P.cursor=P.start}else{var P=f.fromPoints(H,F);P.cursor=P.end}if(P.desiredColumn=O.column,!this.selection.inMultiSelectMode)this.selection.addRange(x);else if(S)var I=x.cursor;this.selection.addRange(P),I&&this.selection.substractPoint(I)},this.transposeSelections=function(T){for(var S=this.session,x=S.multiSelect,M=x.ranges,O=M.length;O--;){var F=M[O];if(F.isEmpty()){var L=S.getWordRange(F.start.row,F.start.column);F.start.row=L.start.row,F.start.column=L.start.column,F.end.row=L.end.row,F.end.column=L.end.column}}x.mergeOverlappingRanges();for(var H=[],O=M.length;O--;){var F=M[O];H.unshift(S.getTextRange(F))}T<0?H.unshift(H.pop()):H.push(H.shift());for(var O=M.length;O--;){var F=M[O],P=F.clone();S.replace(F,H[O]),F.start.row=P.start.row,F.start.column=P.start.column}x.fromOrientedRange(x.ranges[0])},this.selectMore=function(T,S,x){var M=this.session,O=M.multiSelect,F=O.toOrientedRange();if(!(F.isEmpty()&&(F=M.getWordRange(F.start.row,F.start.column),F.cursor=T==-1?F.start:F.end,this.multiSelect.addRange(F),x))){var L=M.getTextRange(F),H=o(M,L,T);H&&(H.cursor=T==-1?H.start:H.end,this.session.unfold(H),this.multiSelect.addRange(H),this.renderer.scrollCursorIntoView(null,.5)),S&&this.multiSelect.substractPoint(F.cursor)}},this.alignCursors=function(){var T=this.session,S=T.multiSelect,x=S.ranges,M=-1,O=x.filter(function(K){if(K.cursor.row==M)return!0;M=K.cursor.row});if(!x.length||O.length==x.length-1){var F=this.selection.getRange(),L=F.start.row,H=F.end.row,P=L==H;if(P){var I=this.session.getLength(),$;do $=this.session.getLine(H);while(/[=:]/.test($)&&++H<I);do $=this.session.getLine(L);while(/[=:]/.test($)&&--L>0);L<0&&(L=0),H>=I&&(H=I-1)}var C=this.session.removeFullLines(L,H);C=this.$reAlignText(C,P),this.session.insert({row:L,column:0},C.join(`
956
+ `)+`
957
+ `),P||(F.start.column=0,F.end.column=C[C.length-1].length),this.selection.setRange(F)}else{O.forEach(function(K){S.substractPoint(K.cursor)});var N=0,j=1/0,U=x.map(function(K){var Z=K.cursor,te=T.getLine(Z.row),he=te.substr(Z.column).search(/\S/g);return he==-1&&(he=0),Z.column>N&&(N=Z.column),he<j&&(j=he),he});x.forEach(function(K,Z){var te=K.cursor,he=N-te.column,ne=U[Z]-j;he>ne?T.insert(te,i.stringRepeat(" ",he-ne)):T.remove(new f(te.row,te.column,te.row,te.column-he+ne)),K.start.column=K.end.column=N,K.start.row=K.end.row=te.row,K.cursor=K.end}),S.fromOrientedRange(x[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(T,S){var x=!0,M=!0,O,F,L;return T.map(function(C){var N=C.match(/(\s*)(.*?)(\s*)([=:].*)/);return N?O==null?(O=N[1].length,F=N[2].length,L=N[3].length,N):(O+F+L!=N[1].length+N[2].length+N[3].length&&(M=!1),O!=N[1].length&&(x=!1),O>N[1].length&&(O=N[1].length),F<N[2].length&&(F=N[2].length),L>N[3].length&&(L=N[3].length),N):[C]}).map(S?P:x?M?I:P:$);function H(C){return i.stringRepeat(" ",C)}function P(C){return C[2]?H(O)+C[2]+H(F-C[2].length+L)+C[4].replace(/^([=:])\s+/,"$1 "):C[0]}function I(C){return C[2]?H(O+F-C[2].length)+C[2]+H(L)+C[4].replace(/^([=:])\s+/,"$1 "):C[0]}function $(C){return C[2]?H(O)+C[2]+H(L)+C[4].replace(/^([=:])\s+/,"$1 "):C[0]}}}).call(m.prototype);function w(T,S){return T.row==S.row&&T.column==S.column}r.onSessionChange=function(T){var S=T.session;S&&!S.multiSelect&&(S.$selectionMarkers=[],S.selection.$initRangeList(),S.multiSelect=S.selection),this.multiSelect=S&&S.multiSelect;var x=T.oldSession;x&&(x.multiSelect.off("addRange",this.$onAddRange),x.multiSelect.off("removeRange",this.$onRemoveRange),x.multiSelect.off("multiSelect",this.$onMultiSelect),x.multiSelect.off("singleSelect",this.$onSingleSelect),x.multiSelect.lead.off("change",this.$checkMultiselectChange),x.multiSelect.anchor.off("change",this.$checkMultiselectChange)),S&&(S.multiSelect.on("addRange",this.$onAddRange),S.multiSelect.on("removeRange",this.$onRemoveRange),S.multiSelect.on("multiSelect",this.$onMultiSelect),S.multiSelect.on("singleSelect",this.$onSingleSelect),S.multiSelect.lead.on("change",this.$checkMultiselectChange),S.multiSelect.anchor.on("change",this.$checkMultiselectChange)),S&&this.inMultiSelectMode!=S.selection.inMultiSelectMode&&(S.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function k(T){T.$multiselectOnSessionChange||(T.$onAddRange=T.$onAddRange.bind(T),T.$onRemoveRange=T.$onRemoveRange.bind(T),T.$onMultiSelect=T.$onMultiSelect.bind(T),T.$onSingleSelect=T.$onSingleSelect.bind(T),T.$multiselectOnSessionChange=r.onSessionChange.bind(T),T.$checkMultiselectChange=T.$checkMultiselectChange.bind(T),T.$multiselectOnSessionChange(T),T.on("changeSession",T.$multiselectOnSessionChange),T.on("mousedown",p),T.commands.addCommands(a.defaultCommands),R(T))}function R(T){if(!T.textInput)return;var S=T.textInput.getElement(),x=!1;g.addListener(S,"keydown",function(O){var F=O.keyCode==18&&!(O.ctrlKey||O.shiftKey||O.metaKey);T.$blockSelectEnabled&&F?x||(T.renderer.setMouseCursor("crosshair"),x=!0):x&&M()},T),g.addListener(S,"keyup",M,T),g.addListener(S,"blur",M,T);function M(O){x&&(T.renderer.setMouseCursor(""),x=!1)}}r.MultiSelect=k,n("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(T){k(this),T?this.on("mousedown",p):this.off("mousedown",p)},value:!0},enableBlockSelect:{set:function(T){this.$blockSelectEnabled=T},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(n,r,u){var d=n("../../range").Range,f=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(b,p,g){var i=b.getLine(g);return this.foldingStartMarker.test(i)?"start":p=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(b,p,g){return null},this.indentationBlock=function(b,p,g){var i=/\S/,a=b.getLine(p),h=a.search(i);if(h!=-1){for(var c=g||a.length,o=b.getLength(),l=p,m=p;++p<o;){var w=b.getLine(p).search(i);if(w!=-1){if(w<=h){var k=b.getTokenAt(p,0);if(!k||k.type!=="string")break}m=p}}if(m>l){var R=b.getLine(m).length;return new d(l,c,m,R)}}},this.openingBracketBlock=function(b,p,g,i,a){var h={row:g,column:i+1},c=b.$findClosingBracket(p,h,a);if(c){var o=b.foldWidgets[c.row];return o==null&&(o=b.getFoldWidget(c.row)),o=="start"&&c.row>h.row&&(c.row--,c.column=b.getLine(c.row).length),d.fromPoints(h,c)}},this.closingBracketBlock=function(b,p,g,i,a){var h={row:g,column:i},c=b.$findOpeningBracket(p,h);if(c)return c.column++,h.column--,d.fromPoints(c,h)}}).call(f.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(n,r,u){var d=n("../lib/dom"),f=n("../range").Range,b=n("../config").nls;function p(i,a,h){for(var c=0,o=i.length-1;c<=o;){var l=c+o>>1,m=h(a,i[l]);if(m>0)c=l+1;else if(m<0)o=l-1;else return l}return-(c+1)}function g(i,a,h){var c=i.getAnnotations().sort(f.comparePoints);if(c.length){var o=p(c,{row:a,column:-1},f.comparePoints);o<0&&(o=-o-1),o>=c.length?o=h>0?0:c.length-1:o===0&&h<0&&(o=c.length-1);var l=c[o];if(!(!l||!h)){if(l.row===a){do l=c[o+=h];while(l&&l.row===a);if(!l)return c.slice()}var m=[];a=l.row;do m[h<0?"unshift":"push"](l),l=c[o+=h];while(l&&l.row==a);return m.length&&m}}}r.showErrorMarker=function(i,a){var h=i.session,c=i.getCursorPosition(),o=c.row,l=h.widgetManager.getWidgetsAtRow(o).filter(function(O){return O.type=="errorMarker"})[0];l?l.destroy():o-=a;var m=g(h,o,a),w;if(m){var k=m[0];c.column=(k.pos&&typeof k.column!="number"?k.pos.sc:k.column)||0,c.row=k.row,w=i.renderer.$gutterLayer.$annotations[c.row]}else{if(l)return;w={displayText:[b("error-marker.good-state","Looks good!")],className:"ace_ok"}}i.session.unfold(c.row),i.selection.moveToPosition(c);var R={row:c.row,fixedWidth:!0,coverGutter:!0,el:d.createElement("div"),type:"errorMarker"},T=R.el.appendChild(d.createElement("div")),S=R.el.appendChild(d.createElement("div"));S.className="error_widget_arrow "+w.className;var x=i.renderer.$cursorLayer.getPixelPosition(c).left;S.style.left=x+i.renderer.gutterWidth-5+"px",R.el.className="error_widget_wrapper",T.className="error_widget "+w.className,w.displayText.forEach(function(O,F){T.appendChild(d.createTextNode(O)),F<w.displayText.length-1&&T.appendChild(d.createElement("br"))}),T.appendChild(d.createElement("div"));var M=function(O,F,L){if(F===0&&(L==="esc"||L==="return"))return R.destroy(),{command:"null"}};R.destroy=function(){i.$mouseHandler.isMousePressed||(i.keyBinding.removeKeyboardHandler(M),h.widgetManager.removeLineWidget(R),i.off("changeSelection",R.destroy),i.off("changeSession",R.destroy),i.off("mouseup",R.destroy),i.off("change",R.destroy))},i.keyBinding.addKeyboardHandler(M),i.on("changeSelection",R.destroy),i.on("changeSession",R.destroy),i.on("mouseup",R.destroy),i.on("change",R.destroy),i.session.widgetManager.addLineWidget(R),R.el.onmousedown=i.focus.bind(i),i.renderer.scrollCursorIntoView(null,.5,{bottom:R.el.offsetHeight})},d.importCssString(`
958
+ .error_widget_wrapper {
959
+ background: inherit;
960
+ color: inherit;
961
+ border:none
962
+ }
963
+ .error_widget {
964
+ border-top: solid 2px;
965
+ border-bottom: solid 2px;
966
+ margin: 5px 0;
967
+ padding: 10px 40px;
968
+ white-space: pre-wrap;
969
+ }
970
+ .error_widget.ace_error, .error_widget_arrow.ace_error{
971
+ border-color: #ff5a5a
972
+ }
973
+ .error_widget.ace_warning, .error_widget_arrow.ace_warning{
974
+ border-color: #F1D817
975
+ }
976
+ .error_widget.ace_info, .error_widget_arrow.ace_info{
977
+ border-color: #5a5a5a
978
+ }
979
+ .error_widget.ace_ok, .error_widget_arrow.ace_ok{
980
+ border-color: #5aaa5a
981
+ }
982
+ .error_widget_arrow {
983
+ position: absolute;
984
+ border: solid 5px;
985
+ border-top-color: transparent!important;
986
+ border-right-color: transparent!important;
987
+ border-left-color: transparent!important;
988
+ top: -5px;
989
+ }
990
+ `,"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,r,u){n("./loader_build")(r);var d=n("./lib/dom"),f=n("./range").Range,b=n("./editor").Editor,p=n("./edit_session").EditSession,g=n("./undomanager").UndoManager,i=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"),r.config=n("./config"),r.edit=function(h,c){if(typeof h=="string"){var o=h;if(h=document.getElementById(o),!h)throw new Error("ace.edit can't find div #"+o)}if(h&&h.env&&h.env.editor instanceof b)return h.env.editor;var l="";if(h&&/input|textarea/i.test(h.tagName)){var m=h;l=m.value,h=d.createElement("pre"),m.parentNode.replaceChild(h,m)}else h&&(l=h.textContent,h.innerHTML="");var w=r.createEditSession(l),k=new b(new i(h),w,c),R={document:w,editor:k,onResize:k.resize.bind(k,null)};return m&&(R.textarea=m),k.on("destroy",function(){R.editor.container.env=null}),k.container.env=k.env=R,k},r.createEditSession=function(h,c){var o=new p(h,c);return o.setUndoManager(new g),o},r.Range=f,r.Editor=b,r.EditSession=p,r.UndoManager=g,r.VirtualRenderer=i;var a=r.config.version;r.version=a}),function(){ace.require(["ace/ace"],function(n){n&&(n.config.init(!0),n.define=ace.define);var r=function(){return this}();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=n);for(var u in n)n.hasOwnProperty(u)&&(r.ace[u]=n[u]);r.ace.default=r.ace,t&&(t.exports=r.ace)})}()}($g)),$g.exports}var jr=wS(),Ag={exports:{}},Eg;function xS(){return Eg||(Eg=1,function(t,e){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,u){var d=n("../lib/oop"),f=n("./text_highlight_rules").TextHighlightRules,b=r.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};r.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},r.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},r.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var p=r.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},g=r.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},i=r.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},a=r.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},h=r.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},c=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},o=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},l=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},m=function(){var w="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",k="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",R="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",T="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",S=this.$keywords=this.createKeywordMapper({keyword:k,"constant.language":R,"variable.language":T,"support.function":w,"invalid.deprecated":"debugger"},"identifier"),x=`\\\\(?: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})*})`,M={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};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:x},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:x},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(O,F,L){L.length&&(L=[]);var H=O[O.length-1];return L.unshift(H,F),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(O,F,L){L.length&&(L=[]);var H=O[O.length-1];return L.unshift(H,F),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(O,F,L){L.length&&(L=[]);var H=O[O.length-1];return L.unshift(H,F),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(O,F,L){L.length&&(L=[]);var H=O[O.length-1];return L.unshift(H,F),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(O,F,L){L.length&&(L=[]);var H=O[O.length-1];return L.unshift(H,F),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},l,{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\\?(?:"+x+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},h,c,b,p,o,g,i,a,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:S,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(O,F,L){var H=O[2]=="-"||O[2]=="~"?"indentedHeredoc":"heredoc",P=O.split(this.splitRegex);return L.push(H,P[3]),[{type:"constant",value:P[1]},{type:"string",value:P[2]},{type:"support.class",value:P[3]},{type:"string",value:P[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(O,F,L){return O===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(O,F,L){return O===L[1]?(L.shift(),L.shift(),this.next=L[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(O,F){return F[0]==="heredoc"||F[0]==="indentedHeredoc"?F[0]:O}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(O,F,L){return this.next="",O=="}"&&L.length>1&&L[1]!="start"&&(L.shift(),this.next=L.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(O,F,L){return L.length&&O===L[0]?(L.unshift(O,F),this.token):"string"}},{token:"constant.language.escape",regex:x},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(O,F,L){return L.length&&O===M[L[0]]?(L.shift(),this.next=L.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(O,F,L){return L.length&&O===L[0]?(L.unshift(O,F),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(O,F,L){return L.length&&O===M[L[0]]?(L.shift(),this.next=L.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(O,F,L){return L.length&&O===L[0]?(L.unshift(O,F),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(O,F,L){return L.length&&O===M[L[0]]?(L.shift(),this.next=L.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(O,F,L){return L.length&&O===L[0]?(L.unshift(O,F),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:x},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(O,F,L){return L.length&&O===M[L[0]]?(L.shift(),this.next=L.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(O,F,L){return L.length&&O===L[0]?(L.unshift(O,F),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(O,F,L){return L.length&&O[0]===M[L[0]]?(L.shift(),this.next=L.shift(),this.token):(this.next="","constant.language.escape")}},{include:"regex"},{defaultToken:"string.regexp"}],regex:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"constant.language.escape",regex:/\\[AGbBzZ]/},{token:"constant.language.escape",regex:/\\g<[a-zA-Z0-9]*>/},{token:["constant.language.escape","regexp.keyword","constant.language.escape"],regex:/(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/},{token:["constant.language.escape","invalid","constant.language.escape"],regex:/(\\p{\^?)([^/]*)(})/},{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:/[/][imxouesn]*/,next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"regexp.keyword",regex:/\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/},{token:"constant.language.escape",regex:/\[\^?/,push:"regex_character_class"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:/&?&?\[\^?/,push:"regex_character_class"},{token:"constant.language.escape",regex:"]",next:"pop"},{token:"constant.language.escape",regex:"-"},{defaultToken:"string.regexp.characterclass"}]},this.normalizeRules()};d.inherits(m,f),r.RubyHighlightRules=m}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,u){var d=n("../range").Range,f=function(){};(function(){this.checkOutdent=function(b,p){return/^\s+$/.test(b)?/^\s*\}/.test(p):!1},this.autoOutdent=function(b,p){var g=b.getLine(p),i=g.match(/^(\s*\})/);if(!i)return 0;var a=i[1].length,h=b.findMatchingBracket({row:p,column:a});if(!h||h.row==p)return 0;var c=this.$getIndent(b.getLine(h.row));b.replace(new d(p,0,p,a-1),c)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(f.prototype),r.MatchingBraceOutdent=f}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(n,r,u){var d=n("../../lib/oop"),f=n("./fold_mode").FoldMode,b=n("../../range").Range,p=n("../../token_iterator").TokenIterator,g=r.FoldMode=function(){};d.inherits(g,f),(function(){this.indentKeywords={class:1,def:1,module:1,do:1,unless:1,if:1,while:1,for:1,until:1,begin:1,else:0,elsif:0,rescue:0,ensure:0,when:0,end:-1,case:1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(i,a,h){var c=i.getLine(h),o=this.foldingStartMarker.test(c),l=this.foldingStopMarker.test(c);if(o&&!l){var m=c.match(this.foldingStartMarker);if(m[1]){if((m[1]=="if"||m[1]=="else"||m[1]=="while"||m[1]=="until"||m[1]=="unless")&&(m[1]=="else"&&/^\s*else\s*$/.test(c)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(c)===!1)||m[1]=="when"&&/\sthen\s/.test(c)===!0)return;if(i.getTokenAt(h,m.index+2).type==="keyword")return"start"}else if(!m[3]||i.getTokenAt(h,m.index+1).type==="comment.multiline")return"start"}if(a!="markbeginend"||!l||o&&l)return"";var m=c.match(this.foldingStopMarker);if(m[3]==="end"){if(i.getTokenAt(h,m.index+1).type==="keyword")return"end"}else if(!m[1]||i.getTokenAt(h,m.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(i,a,h){var c=i.doc.getLine(h),o=this.foldingStartMarker.exec(c);if(o)return o[1]||o[3]?this.rubyBlock(i,h,o.index+2):this.openingBracketBlock(i,"{",h,o.index);var o=this.foldingStopMarker.exec(c);if(o)return o[3]==="end"&&i.getTokenAt(h,o.index+1).type==="keyword"?this.rubyBlock(i,h,o.index+1):o[1]==="=end"&&i.getTokenAt(h,o.index+1).type==="comment.multiline"?this.rubyBlock(i,h,o.index+1):this.closingBracketBlock(i,"}",h,o.index+o[0].length)},this.rubyBlock=function(i,a,h,c){var o=new p(i,a,h),l=o.getCurrentToken();if(!(!l||l.type!="keyword"&&l.type!="comment.multiline")){var m=l.value,w=i.getLine(a);switch(l.value){case"if":case"unless":case"while":case"until":var k=new RegExp("^\\s*"+l.value);if(!k.test(w))return;var R=this.indentKeywords[m];break;case"when":if(/\sthen\s/.test(w))return;case"elsif":case"rescue":case"ensure":var R=1;break;case"else":var k=new RegExp("^\\s*"+l.value+"\\s*$");if(!k.test(w))return;var R=1;break;default:var R=this.indentKeywords[m]}var T=[m];if(R){var S=R===-1?i.getLine(a-1).length:i.getLine(a).length,x=a,M=[];if(M.push(o.getCurrentTokenRange()),o.step=R===-1?o.stepBackward:o.stepForward,l.type=="comment.multiline"){for(;l=o.step();)if(l.type==="comment.multiline"){if(R==1){if(S=6,l.value=="=end")break}else if(l.value=="=begin")break}}else for(;l=o.step();){var O=!1;if(l.type==="keyword"){var F=R*this.indentKeywords[l.value];switch(w=i.getLine(o.getCurrentTokenRow()),l.value){case"do":for(var L=o.$tokenIndex-1;L>=0;L--){var H=o.$rowTokens[L];if(H&&(H.value=="while"||H.value=="until"||H.value=="for")){F=0;break}}break;case"else":var k=new RegExp("^\\s*"+l.value+"\\s*$");(!k.test(w)||m=="case")&&(F=0,O=!0);break;case"if":case"unless":case"while":case"until":var k=new RegExp("^\\s*"+l.value);k.test(w)||(F=0,O=!0);break;case"when":(/\sthen\s/.test(w)||m=="case")&&(F=0,O=!0)}if(F>0)T.unshift(l.value);else if(F<=0&&O===!1){if(T.shift(),!T.length&&((m=="while"||m=="until"||m=="for")&&l.value!="do"||l.value=="do"&&R==-1&&F!=0||l.value!="do"))break;F===0&&T.unshift(l.value)}}}if(!l)return null;if(c)return M.push(o.getCurrentTokenRange()),M;var a=o.getCurrentTokenRow();if(R===-1){if(l.type==="comment.multiline")var P=6;else var P=i.getLine(a).length;return new b(a,P,x-1,S)}return new b(x,S,a-1,i.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,r,u){var d=n("../lib/oop"),f=n("./text").Mode,b=n("./ruby_highlight_rules").RubyHighlightRules,p=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("../range").Range,i=n("./folding/ruby").FoldMode,a=function(){this.HighlightRules=b,this.$outdent=new p,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new i,this.indentKeywords=this.foldingRules.indentKeywords};d.inherits(a,f),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(h,c,o){var l=this.$getIndent(c),m=this.getTokenizer().getLineTokens(c,h),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return l;if(h=="start"){var k=c.match(/^.*[\{\(\[]\s*$/),R=c.match(/^\s*(class|def|module)\s.*$/),T=c.match(/.*do(\s*|\s+\|.*\|\s*)$/),S=c.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(k||R||T||S)&&(l+=o)}return l},this.checkOutdent=function(h,c,o){return/^\s+(end|else|rescue|ensure)$/.test(c+o)||this.$outdent.checkOutdent(c,o)},this.autoOutdent=function(h,c,o){var l=c.getLine(o);if(/}/.test(l))return this.$outdent.autoOutdent(c,o);var m=this.$getIndent(l),w=c.getLine(o-1),k=this.$getIndent(w),R=c.getTabString();k.length<=m.length&&m.slice(-R.length)==R&&c.remove(new g(o,m.length-R.length,o,m.length))},this.getMatching=function(h,c,o){if(c==null){var l=h.selection.lead;o=l.column,c=l.row}var m=h.getTokenAt(c,o);if(m&&m.value in this.indentKeywords)return this.foldingRules.rubyBlock(h,c,o,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(a.prototype),r.Mode=a}),function(){ace.require(["ace/mode/ruby"],function(n){t&&(t.exports=n)})}()}(Ag)),Ag.exports}xS();var Rg={exports:{}},Mg;function kS(){return Mg||(Mg=1,function(t,e){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,u){var d=n("../lib/oop"),f=n("./text_highlight_rules").TextHighlightRules,b=function(){var p="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__",i="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",a=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":i,"variable.language":"self|cls","constant.language":g,keyword:p},"identifier"),h="[uU]?",c="[rR]",o="[fF]",l="(?:[rR][fF]|[fF][rR])",m="(?:(?:[1-9]\\d*)|(?:0))",w="(?:0[oO]?[0-7]+)",k="(?:0[xX][\\dA-Fa-f]+)",R="(?:0[bB][01]+)",T="(?:"+m+"|"+w+"|"+k+"|"+R+")",S="(?:[eE][+-]?\\d+)",x="(?:\\.\\d+)",M="(?:\\d+)",O="(?:(?:"+M+"?"+x+")|(?:"+M+"\\.))",F="(?:(?:"+O+"|"+M+")"+S+")",L="(?:"+F+"|"+O+")",H=`\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})`;this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:h+'"{3}',next:"qqstring3"},{token:"string",regex:h+'"(?=.)',next:"qqstring"},{token:"string",regex:h+"'{3}",next:"qstring3"},{token:"string",regex:h+"'(?=.)",next:"qstring"},{token:"string",regex:c+'"{3}',next:"rawqqstring3"},{token:"string",regex:c+'"(?=.)',next:"rawqqstring"},{token:"string",regex:c+"'{3}",next:"rawqstring3"},{token:"string",regex:c+"'(?=.)",next:"rawqstring"},{token:"string",regex:o+'"{3}',next:"fqqstring3"},{token:"string",regex:o+'"(?=.)',next:"fqqstring"},{token:"string",regex:o+"'{3}",next:"fqstring3"},{token:"string",regex:o+"'(?=.)",next:"fqstring"},{token:"string",regex:l+'"{3}',next:"rfqqstring3"},{token:"string",regex:l+'"(?=.)',next:"rfqqstring"},{token:"string",regex:l+"'{3}",next:"rfqstring3"},{token:"string",regex:l+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:["keyword","text","entity.name.function"],regex:"(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:H},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:H},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],rawqqstring3:[{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],rawqstring3:[{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],rawqqstring:[{token:"string",regex:"\\\\$",next:"rawqqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],rawqstring:[{token:"string",regex:"\\\\$",next:"rawqstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],fqqstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:H},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:H},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:H},{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring3:[{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring3:[{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring:[{token:"string",regex:"\\\\$",next:"rfqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring:[{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstringParRules:[{token:"paren.lparen",regex:"[\\[\\(]"},{token:"paren.rparen",regex:"[\\]\\)]"},{token:"string",regex:"\\s+"},{token:"string",regex:"'[^']*'"},{token:"string",regex:'"[^"]*"'},{token:"function.support",regex:"(!s|!r|!a)"},{include:"constants"},{token:"paren.rparen",regex:"}",next:"pop"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"}],constants:[{token:"constant.numeric",regex:"(?:"+L+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:L},{token:"constant.numeric",regex:T+"[lL]\\b"},{token:"constant.numeric",regex:T+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};d.inherits(b,f),r.PythonHighlightRules=b}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(n,r,u){var d=n("../../lib/oop"),f=n("./fold_mode").FoldMode,b=r.FoldMode=function(p){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+p+")(?:\\s*)(?:#.*)?$")};d.inherits(b,f),(function(){this.getFoldWidgetRange=function(p,g,i){var a=p.getLine(i),h=a.match(this.foldingStartMarker);if(h)return h[1]?this.openingBracketBlock(p,h[1],i,h.index):h[2]?this.indentationBlock(p,i,h.index+h[2].length):this.indentationBlock(p,i)}}).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,r,u){var d=n("../lib/oop"),f=n("./text").Mode,b=n("./python_highlight_rules").PythonHighlightRules,p=n("./folding/pythonic").FoldMode,g=n("../range").Range,i=function(){this.HighlightRules=b,this.foldingRules=new p("\\:"),this.$behaviour=this.$defaultBehaviour};d.inherits(i,f),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(h,c,o){var l=this.$getIndent(c),m=this.getTokenizer().getLineTokens(c,h),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return l;if(h=="start"){var k=c.match(/^.*[\{\(\[:]\s*$/);k&&(l+=o)}return l};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(h,c,o){if(o!==`\r
991
+ `&&o!=="\r"&&o!==`
992
+ `)return!1;var l=this.getTokenizer().getLineTokens(c.trim(),h).tokens;if(!l)return!1;do var m=l.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&a[m.value]:!1},this.autoOutdent=function(h,c,o){o+=1;var l=this.$getIndent(c.getLine(o)),m=c.getTabString();l.slice(-m.length)==m&&c.remove(new g(o,l.length-m.length,o,l.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(i.prototype),r.Mode=i}),function(){ace.require(["ace/mode/python"],function(n){t&&(t.exports=n)})}()}(Rg)),Rg.exports}kS();var Lg={exports:{}},Og;function SS(){return Og||(Og=1,function(t,e){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,u){var d=n("../lib/oop"),f=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"}]}};d.inherits(b,f),r.JsonHighlightRules=b}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,u){var d=n("../range").Range,f=function(){};(function(){this.checkOutdent=function(b,p){return/^\s+$/.test(b)?/^\s*\}/.test(p):!1},this.autoOutdent=function(b,p){var g=b.getLine(p),i=g.match(/^(\s*\})/);if(!i)return 0;var a=i[1].length,h=b.findMatchingBracket({row:p,column:a});if(!h||h.row==p)return 0;var c=this.$getIndent(b.getLine(h.row));b.replace(new d(p,0,p,a-1),c)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(f.prototype),r.MatchingBraceOutdent=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,u){var d=n("../../lib/oop"),f=n("../../range").Range,b=n("./fold_mode").FoldMode,p=r.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end)))};d.inherits(p,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,i,a){var h=g.getLine(a);if(this.singleLineBlockCommentRe.test(h)&&!this.startRegionRe.test(h)&&!this.tripleStarBlockCommentRe.test(h))return"";var c=this._getFoldWidgetBase(g,i,a);return!c&&this.startRegionRe.test(h)?"start":c},this.getFoldWidgetRange=function(g,i,a,h){var c=g.getLine(a);if(this.startRegionRe.test(c))return this.getCommentRegionBlock(g,c,a);var o=c.match(this.foldingStartMarker);if(o){var l=o.index;if(o[1])return this.openingBracketBlock(g,o[1],a,l);var m=g.getCommentFoldRange(a,l+o[0].length,1);return m&&!m.isMultiLine()&&(h?m=this.getSectionRange(g,a):i!="all"&&(m=null)),m}if(i!=="markbegin"){var o=c.match(this.foldingStopMarker);if(o){var l=o.index+o[0].length;return o[1]?this.closingBracketBlock(g,o[1],a,l):g.getCommentFoldRange(a,l,-1)}}},this.getSectionRange=function(g,i){var a=g.getLine(i),h=a.search(/\S/),c=i,o=a.length;i+=1;for(var l=i,m=g.getLength();++i<m;){a=g.getLine(i);var w=a.search(/\S/);if(w!==-1){if(h>w)break;var k=this.getFoldWidgetRange(g,"all",i);if(k){if(k.start.row<=c)break;if(k.isMultiLine())i=k.end.row;else if(h==w)break}l=i}}return new f(c,o,l,g.getLine(l).length)},this.getCommentRegionBlock=function(g,i,a){for(var h=i.search(/\s*$/),c=g.getLength(),o=a,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++a<c;){i=g.getLine(a);var w=l.exec(i);if(w&&(w[1]?m--:m++,!m))break}var k=a;if(k>o)return new f(o,h,k,i.length)}}).call(p.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,r,u){var d=n("../lib/oop"),f=n("./text").Mode,b=n("./json_highlight_rules").JsonHighlightRules,p=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("./folding/cstyle").FoldMode,i=n("../worker/worker_client").WorkerClient,a=function(){this.HighlightRules=b,this.$outdent=new p,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new g};d.inherits(a,f),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(h,c,o){var l=this.$getIndent(c);if(h=="start"){var m=c.match(/^.*[\{\(\[]\s*$/);m&&(l+=o)}return l},this.checkOutdent=function(h,c,o){return this.$outdent.checkOutdent(c,o)},this.autoOutdent=function(h,c,o){this.$outdent.autoOutdent(c,o)},this.createWorker=function(h){var c=new i(["ace"],"ace/mode/json_worker","JsonWorker");return c.attachToDocument(h.getDocument()),c.on("annotate",function(o){h.setAnnotations(o.data)}),c.on("terminate",function(){h.clearAnnotations()}),c},this.$id="ace/mode/json"}).call(a.prototype),r.Mode=a}),function(){ace.require(["ace/mode/json"],function(n){t&&(t.exports=n)})}()}(Lg)),Lg.exports}SS();var Ig={exports:{}},Ng;function _S(){return Ng||(Ng=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,r,u){var d=n("../lib/oop");n("../lib/lang");var f=n("./text_highlight_rules").TextHighlightRules,b=r.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",p=r.supportFunction="rgb|rgba|url|attr|counter|counters",g=r.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",i=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",a=r.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",h=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",c=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",o=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",l=function(){var m=this.createKeywordMapper({"support.function":p,"support.constant":g,"support.type":b,"support.constant.color":i,"support.constant.fonts":a},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:h},{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:"("+h+")(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:h},{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:c},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:o},{include:"url"},{token:m,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};d.inherits(l,f),r.CssHighlightRules=l}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,u){var d=n("../lib/oop"),f=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()};d.inherits(b,f),b.getTagRule=function(p){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},b.getStartRule=function(p){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:p}},b.getEndRule=function(p){return{token:"comment.doc",regex:"\\*\\/",next:p}},r.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,r,u){function d(){var h=i.replace("\\d","\\d\\-"),c={onMatch:function(l,m,w){var k=l.charAt(1)=="/"?2:1;return k==1?(m!=this.nextState?w.unshift(this.next,this.nextState,0):w.unshift(this.next),w[2]++):k==2&&m==this.nextState&&(w[1]--,(!w[1]||w[1]<0)&&(w.shift(),w.shift())),[{type:"meta.tag.punctuation."+(k==1?"":"end-")+"tag-open.xml",value:l.slice(0,k)},{type:"meta.tag.tag-name.xml",value:l.substr(k)}]},regex:"</?(?:"+h+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(c);var o={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[o,c,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(l,m,w){return m==w[0]&&w.shift(),l.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:l}]},nextState:"jsx"},o,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:h},{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"}]},c],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(h){return[{token:"comment",regex:/\/\*/,next:[p.getTagRule(),{token:"comment",regex:"\\*\\/",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[p.getTagRule(),{token:"comment",regex:"$|^",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var b=n("../lib/oop"),p=n("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,g=n("./text_highlight_rules").TextHighlightRules,i="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",a=function(h){var c={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},o=this.createKeywordMapper(c,"identifier"),l="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",m="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",w="(function)(\\s*)(\\*?)",k={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(c).join("|")+"\\b)"+i+")(\\s*)(\\()"};this.$rules={no_regex:[p.getStartRule("doc-start"),f("no_regex"),k,{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:"("+i+")(\\s*)(=)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+i+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+i+")(\\s*)(:)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+l+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:o,regex:i},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:i},{regex:"",token:"empty",next:"no_regex"}],start:[p.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{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:[f("function_arguments"),{token:"variable.parameter",regex:i},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!h||!h.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(R,T,S){if(this.next=R=="{"?this.nextState:"",R=="{"&&S.length)S.unshift("start",T);else if(R=="}"&&S.length&&(S.shift(),this.next=S.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return R=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:m},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+i+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!h||h.jsx!=0)&&d.call(this)),this.embedRules(p,"doc-",[p.getEndRule("no_regex")]),this.normalizeRules()};b.inherits(a,g),r.JavaScriptHighlightRules=a}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,u){var d=n("../lib/oop"),f=n("./text_highlight_rules").TextHighlightRules,b=function(p){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(p,g,i){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+i+".tag-name.xml"],regex:"(<)("+i+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:g+"start"}]}),this.$rules[i+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(a,h,c){return c.splice(0),this.token}}],this.embedRules(p,g,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+i+".tag-name.xml"],regex:"(</)("+i+"(?=\\s|>|$))",next:i+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(f.prototype),d.inherits(b,f),r.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,r,u){var d=n("../lib/oop"),f=n("../lib/lang"),b=n("./css_highlight_rules").CssHighlightRules,p=n("./javascript_highlight_rules").JavaScriptHighlightRules,g=n("./xml_highlight_rules").XmlHighlightRules,i=f.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),a=function(){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(h,c){var o=i[c];return["meta.tag.punctuation."+(h=="<"?"":"end-")+"tag-open.xml","meta.tag"+(o?"."+o:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(b,"css-","style"),this.embedTagRules(new p({jsx:!1}).getRules(),"js-","script"),this.constructor===a&&this.normalizeRules()};d.inherits(a,g),r.HtmlHighlightRules=a}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(n,r,u){var d=n("../config").$modes,f=n("../lib/oop"),b=n("../lib/lang"),p=n("./text_highlight_rules").TextHighlightRules,g=n("./html_highlight_rules").HtmlHighlightRules,i=function(h){return"(?:[^"+b.escapeRegExp(h)+"\\\\]|\\\\.)*"},a=function(){g.call(this);var h={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(o,l,m,w){var k=o.match(/^(\s*)([`~]+)(.*)/),R=/[\w-]+|$/.exec(k[3])[0];return d[R]||(R=""),m.unshift("githubblock",[],[k[1],k[2],R],l),this.token},next:"githubblock"},c=[{token:"support.function",regex:".*",onMatch:function(o,l,m,w){var k=m[1],R=m[2][0],T=m[2][1],S=m[2][2],x=/^(\s*)(`+|~+)\s*$/.exec(o);if(x&&x[1].length<R.length+3&&x[2].length>=T.length&&x[2][0]==T[0])return m.splice(0,3),this.next=m.shift(),this.token;if(this.next="",S&&d[S]){var M=d[S].getTokenizer().getLineTokens(o,k.slice(0));return m[1]=M.state,M.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(o){return"markup.heading."+o.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},h,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+i("]")+")(\\]\\s*\\[)("+i("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+i("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+i('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},h,{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:c}),this.normalizeRules()};f.inherits(a,p),r.MarkdownHighlightRules=a}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(n,r,u){var d=n("../../lib/oop"),f=n("./fold_mode").FoldMode,b=n("../../range").Range,p=r.FoldMode=function(){};d.inherits(p,f),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(g,i,a){var h=g.getLine(a);return this.foldingStartMarker.test(h)?h[0]=="`"&&g.bgTokenizer.getState(a)=="start"?"end":"start":""},this.getFoldWidgetRange=function(g,i,a){function h(O){return R=g.getTokens(O)[0],R&&R.type.lastIndexOf(T,0)===0}function c(){var O=R.value[0];return O=="="?6:O=="-"?5:7-R.value.search(/[^#]|$/)}var o=g.getLine(a),l=o.length,m=g.getLength(),w=a,k=a;if(o.match(this.foldingStartMarker)){if(o[0]=="`"){if(g.bgTokenizer.getState(a)!=="start"){for(;++a<m&&(o=g.getLine(a),!(o[0]=="`"&o.substring(0,3)=="```")););return new b(w,l,a,0)}for(;a-- >0&&(o=g.getLine(a),!(o[0]=="`"&o.substring(0,3)=="```")););return new b(a,o.length,w,0)}var R,T="markup.heading";if(h(a)){for(var S=c();++a<m;)if(h(a)){var x=c();if(x>=S)break}if(k=a-(!R||["=","-"].indexOf(R.value[0])==-1?1:2),k>w)for(;k>w&&/^\s*$/.test(g.getLine(k));)k--;if(k>w){var M=g.getLine(k).length;return new b(w,l,k,M)}}}}}).call(p.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,u){var d=n("../range").Range,f=function(){};(function(){this.checkOutdent=function(b,p){return/^\s+$/.test(b)?/^\s*\}/.test(p):!1},this.autoOutdent=function(b,p){var g=b.getLine(p),i=g.match(/^(\s*\})/);if(!i)return 0;var a=i[1].length,h=b.findMatchingBracket({row:p,column:a});if(!h||h.row==p)return 0;var c=this.$getIndent(b.getLine(h.row));b.replace(new d(p,0,p,a-1),c)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(f.prototype),r.MatchingBraceOutdent=f}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(n,r,u){function d(i,a){return i&&i.type.lastIndexOf(a+".xml")>-1}var f=n("../../lib/oop"),b=n("../behaviour").Behaviour,p=n("../../token_iterator").TokenIterator,g=function(){this.add("string_dquotes","insertion",function(i,a,h,c,o){if(o=='"'||o=="'"){var l=o,m=c.doc.getTextRange(h.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&h.getWrapBehavioursEnabled())return{text:l+m+l,selection:!1};var w=h.getCursorPosition(),k=c.doc.getLine(w.row),R=k.substring(w.column,w.column+1),T=new p(c,w.row,w.column),S=T.getCurrentToken();if(R==l&&(d(S,"attribute-value")||d(S,"string")))return{text:"",selection:[1,1]};if(S||(S=T.stepBackward()),!S)return;for(;d(S,"tag-whitespace")||d(S,"whitespace");)S=T.stepBackward();var x=!R||R.match(/\s/);if(d(S,"attribute-equals")&&(x||R==">")||d(S,"decl-attribute-equals")&&(x||R=="?"))return{text:l+l,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(i,a,h,c,o){var l=c.doc.getTextRange(o);if(!o.isMultiLine()&&(l=='"'||l=="'")){var m=c.doc.getLine(o.start.row),w=m.substring(o.start.column+1,o.start.column+2);if(w==l)return o.end.column++,o}}),this.add("autoclosing","insertion",function(i,a,h,c,o){if(o==">"){var l=h.getSelectionRange().start,m=new p(c,l.row,l.column),w=m.getCurrentToken()||m.stepBackward();if(!w||!(d(w,"tag-name")||d(w,"tag-whitespace")||d(w,"attribute-name")||d(w,"attribute-equals")||d(w,"attribute-value"))||d(w,"reference.attribute-value"))return;if(d(w,"attribute-value")){var k=m.getCurrentTokenColumn()+w.value.length;if(l.column<k)return;if(l.column==k){var R=m.stepForward();if(R&&d(R,"attribute-value"))return;m.stepBackward()}}if(/^\s*>/.test(c.getLine(l.row).slice(l.column)))return;for(;!d(w,"tag-name");)if(w=m.stepBackward(),w.value=="<"){w=m.stepForward();break}var T=m.getCurrentTokenRow(),S=m.getCurrentTokenColumn();if(d(m.stepBackward(),"end-tag-open"))return;var x=w.value;return T==l.row&&(x=x.substring(0,l.column-S)),this.voidElements&&this.voidElements.hasOwnProperty(x.toLowerCase())?void 0:{text:"></"+x+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(i,a,h,c,o){if(o==`
993
+ `){var l=h.getCursorPosition(),m=c.getLine(l.row),w=new p(c,l.row,l.column),k=w.getCurrentToken();if(d(k,"")&&k.type.indexOf("tag-close")!==-1){if(k.value=="/>")return;for(;k&&k.type.indexOf("tag-name")===-1;)k=w.stepBackward();if(!k)return;var R=k.value,T=w.getCurrentTokenRow();if(k=w.stepBackward(),!k||k.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[R]||!this.voidElements){var S=c.getTokenAt(l.row,l.column+1),m=c.getLine(T),x=this.$getIndent(m),M=x+c.getTabString();return S&&S.value==="</"?{text:`
994
+ `+M+`
995
+ `+x,selection:[1,M.length,1,M.length]}:{text:`
996
+ `+M}}}}})};f.inherits(g,b),r.XmlBehaviour=g}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(n,r,u){var d=n("../../lib/oop"),f=n("../../token_iterator").TokenIterator,b=n("../behaviour/cstyle").CstyleBehaviour,p=n("../behaviour/xml").XmlBehaviour,g=function(){var i=new p({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(i),this.inherit(b),this.add("autoclosing-fragment","insertion",function(a,h,c,o,l){if(l==">"){var m=c.getSelectionRange().start,w=new f(o,m.row,m.column),k=w.getCurrentToken()||w.stepBackward();if(!k)return;if(k.value=="<")return{text:"></>",selection:[1,1]}}})};d.inherits(g,b),r.JavaScriptBehaviour=g}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,u){function d(a,h){return a&&a.type&&a.type.lastIndexOf(h+".xml")>-1}var f=n("../../lib/oop"),b=n("../../range").Range,p=n("./fold_mode").FoldMode,g=r.FoldMode=function(a,h){p.call(this),this.voidElements=a||{},this.optionalEndTags=f.mixin({},this.voidElements),h&&f.mixin(this.optionalEndTags,h)};f.inherits(g,p);var i=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(a,h,c){var o=this._getFirstTagInLine(a,c);return o?o.closing||!o.tagName&&o.selfClosing?h==="markbeginend"?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())||this._findEndTagInLine(a,c,o.tagName,o.end.column)?"":"start":this.getCommentFoldWidget(a,c)},this.getCommentFoldWidget=function(a,h){return/comment/.test(a.getState(h))&&/<!-/.test(a.getLine(h))?"start":""},this._getFirstTagInLine=function(a,h){for(var c=a.getTokens(h),o=new i,l=0;l<c.length;l++){var m=c[l];if(d(m,"tag-open")){if(o.end.column=o.start.column+m.value.length,o.closing=d(m,"end-tag-open"),m=c[++l],!m)return null;if(o.tagName=m.value,m.value===""){if(m=c[++l],!m)return null;o.tagName=m.value}for(o.end.column+=m.value.length,l++;l<c.length;l++)if(m=c[l],o.end.column+=m.value.length,d(m,"tag-close")){o.selfClosing=m.value=="/>";break}return o}if(d(m,"tag-close"))return o.selfClosing=m.value=="/>",o;o.start.column+=m.value.length}return null},this._findEndTagInLine=function(a,h,c,o){for(var l=a.getTokens(h),m=0,w=0;w<l.length;w++){var k=l[w];if(m+=k.value.length,!(m<o-1)&&d(k,"end-tag-open")&&(k=l[w+1],d(k,"tag-name")&&k.value===""&&(k=l[w+2]),k&&k.value==c))return!0}return!1},this.getFoldWidgetRange=function(a,h,c){var o=this._getFirstTagInLine(a,c);if(!o)return this.getCommentFoldWidget(a,c)&&a.getCommentFoldRange(c,a.getLine(c).length);var l=a.getMatchingTags({row:c,column:0});if(l)return new b(l.openTag.end.row,l.openTag.end.column,l.closeTag.start.row,l.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,r,u){var d=n("../../lib/oop"),f=n("../../range").Range,b=n("./fold_mode").FoldMode,p=r.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end)))};d.inherits(p,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,i,a){var h=g.getLine(a);if(this.singleLineBlockCommentRe.test(h)&&!this.startRegionRe.test(h)&&!this.tripleStarBlockCommentRe.test(h))return"";var c=this._getFoldWidgetBase(g,i,a);return!c&&this.startRegionRe.test(h)?"start":c},this.getFoldWidgetRange=function(g,i,a,h){var c=g.getLine(a);if(this.startRegionRe.test(c))return this.getCommentRegionBlock(g,c,a);var o=c.match(this.foldingStartMarker);if(o){var l=o.index;if(o[1])return this.openingBracketBlock(g,o[1],a,l);var m=g.getCommentFoldRange(a,l+o[0].length,1);return m&&!m.isMultiLine()&&(h?m=this.getSectionRange(g,a):i!="all"&&(m=null)),m}if(i!=="markbegin"){var o=c.match(this.foldingStopMarker);if(o){var l=o.index+o[0].length;return o[1]?this.closingBracketBlock(g,o[1],a,l):g.getCommentFoldRange(a,l,-1)}}},this.getSectionRange=function(g,i){var a=g.getLine(i),h=a.search(/\S/),c=i,o=a.length;i+=1;for(var l=i,m=g.getLength();++i<m;){a=g.getLine(i);var w=a.search(/\S/);if(w!==-1){if(h>w)break;var k=this.getFoldWidgetRange(g,"all",i);if(k){if(k.start.row<=c)break;if(k.isMultiLine())i=k.end.row;else if(h==w)break}l=i}}return new f(c,o,l,g.getLine(l).length)},this.getCommentRegionBlock=function(g,i,a){for(var h=i.search(/\s*$/),c=g.getLength(),o=a,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++a<c;){i=g.getLine(a);var w=l.exec(i);if(w&&(w[1]?m--:m++,!m))break}var k=a;if(k>o)return new f(o,h,k,i.length)}}).call(p.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(n,r,u){var d=n("../../lib/oop"),f=n("./xml").FoldMode,b=n("./cstyle").FoldMode,p=r.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end))),this.xmlFoldMode=new f};d.inherits(p,b),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(g,i,a){var h=this.getFoldWidgetBase(g,i,a);return h||this.xmlFoldMode.getFoldWidget(g,i,a)},this.getFoldWidgetRange=function(g,i,a,h){var c=this.getFoldWidgetRangeBase(g,i,a,h);return c||this.xmlFoldMode.getFoldWidgetRange(g,i,a)}}).call(p.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,r,u){var d=n("../lib/oop"),f=n("./text").Mode,b=n("./javascript_highlight_rules").JavaScriptHighlightRules,p=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("../worker/worker_client").WorkerClient,i=n("./behaviour/javascript").JavaScriptBehaviour,a=n("./folding/javascript").FoldMode,h=function(){this.HighlightRules=b,this.$outdent=new p,this.$behaviour=new i,this.foldingRules=new a};d.inherits(h,f),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(c,o,l){var m=this.$getIndent(o),w=this.getTokenizer().getLineTokens(o,c),k=w.tokens,R=w.state;if(k.length&&k[k.length-1].type=="comment")return m;if(c=="start"||c=="no_regex"){var T=o.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);T&&(m+=l)}else if(c=="doc-start"&&(R=="start"||R=="no_regex"))return"";return m},this.checkOutdent=function(c,o,l){return this.$outdent.checkOutdent(o,l)},this.autoOutdent=function(c,o,l){this.$outdent.autoOutdent(o,l)},this.createWorker=function(c){var o=new g(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return o.attachToDocument(c.getDocument()),o.on("annotate",function(l){c.setAnnotations(l.data)}),o.on("terminate",function(){c.clearAnnotations()}),o},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(h.prototype),r.Mode=h}),ace.define("ace/mode/css_completions",["require","exports","module"],function(n,r,u){var d={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},f=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var b=document.createElement("c").style;for(var p in b)if(typeof b[p]=="string"){var g=p.replace(/[A-Z]/g,function(i){return"-"+i.toLowerCase()});d.hasOwnProperty(g)||(d[g]=1)}}this.completionsDefined=!0},this.getCompletions=function(b,p,g,i){if(this.completionsDefined||this.defineCompletions(),b==="ruleset"||p.$mode.$id=="ace/mode/scss"){var a=p.getLine(g.row).substr(0,g.column),h=/\([^)]*$/.test(a);return h&&(a=a.substr(a.lastIndexOf("(")+1)),/:[^;]+$/.test(a)?this.getPropertyValueCompletions(b,p,g,i):this.getPropertyCompletions(b,p,g,i,h)}return[]},this.getPropertyCompletions=function(b,p,g,i,a){a=a||!1;var h=Object.keys(d);return h.map(function(c){return{caption:c,snippet:c+": $0"+(a?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(b,p,g,i){var a=p.getLine(g.row).substr(0,g.column),h=(/([\w\-]+):[^:]*$/.exec(a)||{})[1];if(!h)return[];var c=[];return h in d&&typeof d[h]=="object"&&(c=Object.keys(d[h])),c.map(function(o){return{caption:o,snippet:o,meta:"property value",score:1e6}})}}).call(f.prototype),r.CssCompletions=f}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(n,r,u){var d=n("../../lib/oop");n("../behaviour").Behaviour;var f=n("./cstyle").CstyleBehaviour,b=n("../../token_iterator").TokenIterator,p=function(){this.inherit(f),this.add("colon","insertion",function(g,i,a,h,c){if(c===":"&&a.selection.isEmpty()){var o=a.getCursorPosition(),l=new b(h,o.row,o.column),m=l.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=l.stepBackward()),m&&m.type==="support.type"){var w=h.doc.getLine(o.row),k=w.substring(o.column,o.column+1);if(k===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(w.substring(o.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(g,i,a,h,c){var o=h.doc.getTextRange(c);if(!c.isMultiLine()&&o===":"){var l=a.getCursorPosition(),m=new b(h,l.row,l.column),w=m.getCurrentToken();if(w&&w.value.match(/\s+/)&&(w=m.stepBackward()),w&&w.type==="support.type"){var k=h.doc.getLine(c.start.row),R=k.substring(c.end.column,c.end.column+1);if(R===";")return c.end.column++,c}}}),this.add("semicolon","insertion",function(g,i,a,h,c){if(c===";"&&a.selection.isEmpty()){var o=a.getCursorPosition(),l=h.doc.getLine(o.row),m=l.substring(o.column,o.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(g,i,a,h,c){if(c==="!"&&a.selection.isEmpty()){var o=a.getCursorPosition(),l=h.doc.getLine(o.row);if(/^\s*(;|}|$)/.test(l.substring(o.column)))return{text:"!important",selection:[10,10]}}})};d.inherits(p,f),r.CssBehaviour=p}),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,r,u){var d=n("../lib/oop"),f=n("./text").Mode,b=n("./css_highlight_rules").CssHighlightRules,p=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("../worker/worker_client").WorkerClient,i=n("./css_completions").CssCompletions,a=n("./behaviour/css").CssBehaviour,h=n("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=b,this.$outdent=new p,this.$behaviour=new a,this.$completer=new i,this.foldingRules=new h};d.inherits(c,f),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(o,l,m){var w=this.$getIndent(l),k=this.getTokenizer().getLineTokens(l,o).tokens;if(k.length&&k[k.length-1].type=="comment")return w;var R=l.match(/^.*\{\s*$/);return R&&(w+=m),w},this.checkOutdent=function(o,l,m){return this.$outdent.checkOutdent(l,m)},this.autoOutdent=function(o,l,m){this.$outdent.autoOutdent(l,m)},this.getCompletions=function(o,l,m,w){return this.$completer.getCompletions(o,l,m,w)},this.createWorker=function(o){var l=new g(["ace"],"ace/mode/css_worker","Worker");return l.attachToDocument(o.getDocument()),l.on("annotate",function(m){o.setAnnotations(m.data)}),l.on("terminate",function(){o.clearAnnotations()}),l},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(n,r,u){var d=n("../../lib/oop"),f=n("./fold_mode").FoldMode,b=r.FoldMode=function(p,g){this.defaultMode=p,this.subModes=g};d.inherits(b,f),(function(){this.$getMode=function(p){typeof p!="string"&&(p=p[0]);for(var g in this.subModes)if(p.indexOf(g)===0)return this.subModes[g];return null},this.$tryMode=function(p,g,i,a){var h=this.$getMode(p);return h?h.getFoldWidget(g,i,a):""},this.getFoldWidget=function(p,g,i){return this.$tryMode(p.getState(i-1),p,g,i)||this.$tryMode(p.getState(i),p,g,i)||this.defaultMode.getFoldWidget(p,g,i)},this.getFoldWidgetRange=function(p,g,i){var a=this.$getMode(p.getState(i-1));return(!a||!a.getFoldWidget(p,g,i))&&(a=this.$getMode(p.getState(i))),(!a||!a.getFoldWidget(p,g,i))&&(a=this.defaultMode),a.getFoldWidgetRange(p,g,i)}}).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,r,u){var d=n("../../lib/oop"),f=n("./mixed").FoldMode,b=n("./xml").FoldMode,p=n("./cstyle").FoldMode,g=r.FoldMode=function(i,a){f.call(this,new b(i,a),{"js-":new p,"css-":new p})};d.inherits(g,f)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(n,r,u){function d(l,m){return l.type.lastIndexOf(m+".xml")>-1}function f(l,m){for(var w=new p(l,m.row,m.column),k=w.getCurrentToken();k&&!d(k,"tag-name");)k=w.stepBackward();if(k)return k.value}function b(l,m){for(var w=new p(l,m.row,m.column),k=w.getCurrentToken();k&&!d(k,"attribute-name");)k=w.stepBackward();if(k)return k.value}var p=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"],i=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],a=g.concat(i),h={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:{}},c=Object.keys(h),o=function(){};(function(){this.getCompletions=function(l,m,w,k){var R=m.getTokenAt(w.row,w.column);if(!R)return[];if(d(R,"tag-name")||d(R,"tag-open")||d(R,"end-tag-open"))return this.getTagCompletions(l,m,w,k);if(d(R,"tag-whitespace")||d(R,"attribute-name"))return this.getAttributeCompletions(l,m,w,k);if(d(R,"attribute-value"))return this.getAttributeValueCompletions(l,m,w,k);var T=m.getLine(w.row).substr(0,w.column);return/&[a-z]*$/i.test(T)?this.getHTMLEntityCompletions(l,m,w,k):[]},this.getTagCompletions=function(l,m,w,k){return c.map(function(R){return{value:R,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(l,m,w,k){var R=f(m,w);if(!R)return[];var T=a;return R in h&&(T=T.concat(Object.keys(h[R]))),T.map(function(S){return{caption:S,snippet:S+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(l,m,w,k){var R=f(m,w),T=b(m,w);if(!R)return[];var S=[];return R in h&&T in h[R]&&typeof h[R][T]=="object"&&(S=Object.keys(h[R][T])),S.map(function(x){return{caption:x,snippet:x,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(l,m,w,k){var R=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return R.map(function(T){return{caption:T,snippet:T,meta:"html entity",score:1e6}})}}).call(o.prototype),r.HtmlCompletions=o}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(n,r,u){var d=n("../lib/oop"),f=n("../lib/lang"),b=n("./text").Mode,p=n("./javascript").Mode,g=n("./css").Mode,i=n("./html_highlight_rules").HtmlHighlightRules,a=n("./behaviour/xml").XmlBehaviour,h=n("./folding/html").FoldMode,c=n("./html_completions").HtmlCompletions,o=n("../worker/worker_client").WorkerClient,l=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],w=function(k){this.fragmentContext=k&&k.fragmentContext,this.HighlightRules=i,this.$behaviour=new a,this.$completer=new c,this.createModeDelegates({"js-":p,"css-":g}),this.foldingRules=new h(this.voidElements,f.arrayToMap(m))};d.inherits(w,b),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=f.arrayToMap(l),this.getNextLineIndent=function(k,R,T){return this.$getIndent(R)},this.checkOutdent=function(k,R,T){return!1},this.getCompletions=function(k,R,T,S){return this.$completer.getCompletions(k,R,T,S)},this.createWorker=function(k){if(this.constructor==w){var R=new o(["ace"],"ace/mode/html_worker","Worker");return R.attachToDocument(k.getDocument()),this.fragmentContext&&R.call("setOptions",[{context:this.fragmentContext}]),R.on("error",function(T){k.setAnnotations(T.data)}),R.on("terminate",function(){k.clearAnnotations()}),R}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(w.prototype),r.Mode=w}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,u){var d=n("../lib/oop"),f=n("./text_highlight_rules").TextHighlightRules,b=r.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",p=r.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",g=function(){var i=this.createKeywordMapper({keyword:b,"support.function.builtin":p,"invalid.deprecated":"debugger"},"identifier"),a="(?:(?:[1-9]\\d*)|(?:0))",h="(?:\\.\\d+)",c="(?:\\d+)",o="(?:(?:"+c+"?"+h+")|(?:"+c+"\\.))",l="(?:(?:"+o+"|"+c+"))",m="(?:"+l+"|"+o+")",w="(?:&"+c+")",k="[a-zA-Z_][a-zA-Z0-9_]*",R="(?:"+k+"(?==))",T="(?:\\$(?:SHLVL|\\$|\\!|\\?))",S="(?:"+k+"\\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(x,M,O){var F=x[2]=="-"?"indentedHeredoc":"heredoc",L=x.split(this.splitRegex);return O.push(F,L[4]),[{type:"constant",value:L[1]},{type:"text",value:L[2]},{type:"string",value:L[3]},{type:"support.class",value:L[4]},{type:"string",value:L[5]}]},rules:{heredoc:[{onMatch:function(x,M,O){return x===O[1]?(O.shift(),O.shift(),this.next=O[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(x,M,O){return x===O[1]?(O.shift(),O.shift(),this.next=O[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(x,M){return M[0]==="heredoc"||M[0]==="indentedHeredoc"?M[0]:x}},{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:T},{token:"variable",regex:R},{include:"variables"},{token:"support.function",regex:S},{token:"support.function",regex:w},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:m},{token:"constant.numeric",regex:a+"\\b"},{token:i,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};d.inherits(g,f),r.ShHighlightRules=g}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(n,r,u){var d=n("../lib/oop"),f=n("./text").Mode,b=n("./sh_highlight_rules").ShHighlightRules,p=n("../range").Range,g=n("./folding/cstyle").FoldMode,i=function(){this.HighlightRules=b,this.foldingRules=new g,this.$behaviour=this.$defaultBehaviour};d.inherits(i,f),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(h,c,o){var l=this.$getIndent(c),m=this.getTokenizer().getLineTokens(c,h),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return l;if(h=="start"){var k=c.match(/^.*[\{\(\[:]\s*$/);k&&(l+=o)}return l};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(h,c,o){if(o!==`\r
997
+ `&&o!=="\r"&&o!==`
998
+ `)return!1;var l=this.getTokenizer().getLineTokens(c.trim(),h).tokens;if(!l)return!1;do var m=l.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&a[m.value]:!1},this.autoOutdent=function(h,c,o){o+=1;var l=this.$getIndent(c.getLine(o)),m=c.getTabString();l.slice(-m.length)==m&&c.remove(new p(o,l.length-m.length,o,l.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(i.prototype),r.Mode=i}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(n,r,u){var d=n("../lib/oop"),f=n("../lib/lang"),b=n("./text").Mode,p=n("./xml_highlight_rules").XmlHighlightRules,g=n("./behaviour/xml").XmlBehaviour,i=n("./folding/xml").FoldMode,a=n("../worker/worker_client").WorkerClient,h=function(){this.HighlightRules=p,this.$behaviour=new g,this.foldingRules=new i};d.inherits(h,b),(function(){this.voidElements=f.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(c){var o=new a(["ace"],"ace/mode/xml_worker","Worker");return o.attachToDocument(c.getDocument()),o.on("error",function(l){c.setAnnotations(l.data)}),o.on("terminate",function(){c.clearAnnotations()}),o},this.$id="ace/mode/xml"}).call(h.prototype),r.Mode=h}),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,r,u){var d=n("../lib/oop"),f=n("./behaviour/cstyle").CstyleBehaviour,b=n("./text").Mode,p=n("./markdown_highlight_rules").MarkdownHighlightRules,g=n("./folding/markdown").FoldMode,i=function(){this.HighlightRules=p,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 f({braces:!0})};d.inherits(i,b),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(a,h,c){if(a=="listblock"){var o=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(h);if(!o)return"";var l=o[2];return l||(l=parseInt(o[3],10)+1+"."),o[1]+l+o[4]}return this.$getIndent(h)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(i.prototype),r.Mode=i}),function(){ace.require(["ace/mode/markdown"],function(n){t&&(t.exports=n)})}()}(Ig)),Ig.exports}_S();var Dg={exports:{}},Fg;function CS(){return Fg||(Fg=1,function(t,e){ace.define("ace/theme/twilight-css",["require","exports","module"],function(n,r,u){u.exports=`.ace-twilight .ace_gutter {
999
+ background: #232323;
1000
+ color: #E2E2E2
1001
+ }
1002
+
1003
+ .ace-twilight .ace_print-margin {
1004
+ width: 1px;
1005
+ background: #232323
1006
+ }
1007
+
1008
+ .ace-twilight {
1009
+ background-color: #141414;
1010
+ color: #F8F8F8
1011
+ }
1012
+
1013
+ .ace-twilight .ace_cursor {
1014
+ color: #A7A7A7
1015
+ }
1016
+
1017
+ .ace-twilight .ace_marker-layer .ace_selection {
1018
+ background: rgba(221, 240, 255, 0.20)
1019
+ }
1020
+
1021
+ .ace-twilight.ace_multiselect .ace_selection.ace_start {
1022
+ box-shadow: 0 0 3px 0px #141414;
1023
+ }
1024
+
1025
+ .ace-twilight .ace_marker-layer .ace_step {
1026
+ background: rgb(102, 82, 0)
1027
+ }
1028
+
1029
+ .ace-twilight .ace_marker-layer .ace_bracket {
1030
+ margin: -1px 0 0 -1px;
1031
+ border: 1px solid rgba(255, 255, 255, 0.25)
1032
+ }
1033
+
1034
+ .ace-twilight .ace_marker-layer .ace_active-line {
1035
+ background: rgba(255, 255, 255, 0.031)
1036
+ }
1037
+
1038
+ .ace-twilight .ace_gutter-active-line {
1039
+ background-color: rgba(255, 255, 255, 0.031)
1040
+ }
1041
+
1042
+ .ace-twilight .ace_marker-layer .ace_selected-word {
1043
+ border: 1px solid rgba(221, 240, 255, 0.20)
1044
+ }
1045
+
1046
+ .ace-twilight .ace_invisible {
1047
+ color: rgba(255, 255, 255, 0.25)
1048
+ }
1049
+
1050
+ .ace-twilight .ace_keyword,
1051
+ .ace-twilight .ace_meta {
1052
+ color: #CDA869
1053
+ }
1054
+
1055
+ .ace-twilight .ace_constant,
1056
+ .ace-twilight .ace_constant.ace_character,
1057
+ .ace-twilight .ace_constant.ace_character.ace_escape,
1058
+ .ace-twilight .ace_constant.ace_other,
1059
+ .ace-twilight .ace_heading,
1060
+ .ace-twilight .ace_markup.ace_heading,
1061
+ .ace-twilight .ace_support.ace_constant {
1062
+ color: #CF6A4C
1063
+ }
1064
+
1065
+ .ace-twilight .ace_invalid.ace_illegal {
1066
+ color: #F8F8F8;
1067
+ background-color: rgba(86, 45, 86, 0.75)
1068
+ }
1069
+
1070
+ .ace-twilight .ace_invalid.ace_deprecated {
1071
+ text-decoration: underline;
1072
+ font-style: italic;
1073
+ color: #D2A8A1
1074
+ }
1075
+
1076
+ .ace-twilight .ace_support {
1077
+ color: #9B859D
1078
+ }
1079
+
1080
+ .ace-twilight .ace_fold {
1081
+ background-color: #AC885B;
1082
+ border-color: #F8F8F8
1083
+ }
1084
+
1085
+ .ace-twilight .ace_support.ace_function {
1086
+ color: #DAD085
1087
+ }
1088
+
1089
+ .ace-twilight .ace_list,
1090
+ .ace-twilight .ace_markup.ace_list,
1091
+ .ace-twilight .ace_storage {
1092
+ color: #F9EE98
1093
+ }
1094
+
1095
+ .ace-twilight .ace_entity.ace_name.ace_function,
1096
+ .ace-twilight .ace_meta.ace_tag {
1097
+ color: #AC885B
1098
+ }
1099
+
1100
+ .ace-twilight .ace_string {
1101
+ color: #8F9D6A
1102
+ }
1103
+
1104
+ .ace-twilight .ace_string.ace_regexp {
1105
+ color: #E9C062
1106
+ }
1107
+
1108
+ .ace-twilight .ace_comment {
1109
+ font-style: italic;
1110
+ color: #5F5A60
1111
+ }
1112
+
1113
+ .ace-twilight .ace_variable {
1114
+ color: #7587A6
1115
+ }
1116
+
1117
+ .ace-twilight .ace_xml-pe {
1118
+ color: #494949
1119
+ }
1120
+
1121
+ .ace-twilight .ace_indent-guide {
1122
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
1123
+ }
1124
+
1125
+ .ace-twilight .ace_indent-guide-active {
1126
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
1127
+ }
1128
+ `}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(n,r,u){r.isDark=!0,r.cssClass="ace-twilight",r.cssText=n("./twilight-css");var d=n("../lib/dom");d.importCssString(r.cssText,r.cssClass,!1)}),function(){ace.require(["ace/theme/twilight"],function(n){t&&(t.exports=n)})}()}(Dg)),Dg.exports}CS();var Pg={exports:{}},Bg;function $S(){return Bg||(Bg=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,r,u){function d(x){var M=new Date().toLocaleString("en-us",x);return M.length==1?"0"+M:M}var f=n("./lib/dom"),b=n("./lib/oop"),p=n("./lib/event_emitter").EventEmitter,g=n("./lib/lang"),i=n("./range").Range,a=n("./range_list").RangeList,h=n("./keyboard/hash_handler").HashHandler,c=n("./tokenizer").Tokenizer,o=n("./clipboard"),l={CURRENT_WORD:function(x){return x.session.getTextRange(x.session.getWordRange())},SELECTION:function(x,M,O){var F=x.session.getTextRange();return O?F.replace(/\n\r?([ \t]*\S)/g,`
1129
+ `+O+"$1"):F},CURRENT_LINE:function(x){return x.session.getLine(x.getCursorPosition().row)},PREV_LINE:function(x){return x.session.getLine(x.getCursorPosition().row-1)},LINE_INDEX:function(x){return x.getCursorPosition().row},LINE_NUMBER:function(x){return x.getCursorPosition().row+1},SOFT_TABS:function(x){return x.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(x){return x.session.getTabSize()},CLIPBOARD:function(x){return o.getText&&o.getText()},FILENAME:function(x){return/[^/\\]*$/.exec(this.FILEPATH(x))[0]},FILENAME_BASE:function(x){return/[^/\\]*$/.exec(this.FILEPATH(x))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(x){return this.FILEPATH(x).replace(/[^/\\]*$/,"")},FILEPATH:function(x){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(x){var M=x.session.$mode||{};return M.blockComment&&M.blockComment.start||""},BLOCK_COMMENT_END:function(x){var M=x.session.$mode||{};return M.blockComment&&M.blockComment.end||""},LINE_COMMENT:function(x){var M=x.session.$mode||{};return M.lineCommentStart||""},CURRENT_YEAR:d.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:d.bind(null,{year:"2-digit"}),CURRENT_MONTH:d.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:d.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:d.bind(null,{month:"short"}),CURRENT_DATE:d.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:d.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:d.bind(null,{weekday:"short"}),CURRENT_HOUR:d.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:d.bind(null,{minute:"2-digit"}),CURRENT_SECOND:d.bind(null,{second:"2-digit"})};l.SELECTED_TEXT=l.SELECTION;var m=function(){function x(){this.snippetMap={},this.snippetNameMap={},this.variables=l}return x.prototype.getTokenizer=function(){return x.$tokenizer||this.createTokenizer()},x.prototype.createTokenizer=function(){function M(L){return L=L.substr(1),/^\d+$/.test(L)?[{tabstopId:parseInt(L,10)}]:[{text:L}]}function O(L){return"(?:[^\\\\"+L+"]|\\\\.)"}var F={regex:"/("+O("/")+"+)/",onMatch:function(L,H,P){var I=P[0];return I.fmtString=!0,I.guard=L.slice(1,-1),I.flag="",""},next:"formatString"};return x.$tokenizer=new c({start:[{regex:/\\./,onMatch:function(L,H,P){var I=L[1];return(I=="}"&&P.length||"`$\\".indexOf(I)!=-1)&&(L=I),[L]}},{regex:/}/,onMatch:function(L,H,P){return[P.length?P.shift():L]}},{regex:/\$(?:\d+|\w+)/,onMatch:M},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(L,H,P){var I=M(L.substr(1));return P.unshift(I[0]),I},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+O("\\|")+"*\\|",onMatch:function(L,H,P){var I=L.slice(1,-1).replace(/\\[,|\\]|,/g,function($){return $.length==2?$[1]:"\0"}).split("\0").map(function($){return{value:$}});return P[0].choices=I,[I[0]]},next:"start"},F,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(L,H,P){return P.length&&P[0].expectElse?(P[0].expectElse=!1,P[0].ifEnd={elseEnd:P[0]},[P[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(L,H,P){var I=L[1];return I=="}"&&P.length||"`$\\".indexOf(I)!=-1?L=I:I=="n"?L=`
1130
+ `:I=="t"?L=" ":"ulULE".indexOf(I)!=-1&&(L={changeCase:I,local:I>"a"}),[L]}},{regex:"/\\w*}",onMatch:function(L,H,P){var I=P.shift();return I&&(I.flag=L.slice(1,-1)),this.next=I&&I.tabstopId?"start":"",[I||L]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(L,H,P){return[{text:L.slice(1)}]}},{regex:/\${\w+/,onMatch:function(L,H,P){var I={text:L.slice(2)};return P.unshift(I),[I]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(L,H,P){var I=P.shift();return this.next=I&&I.tabstopId?"start":"",[I||L]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(L,H,P){var I=P[0];return I.formatFunction=L.slice(2,-1),[P.shift()]},next:"formatString"},F,{regex:/:[\?\-+]?/,onMatch:function(L,H,P){L[1]=="+"&&(P[0].ifEnd=P[0]),L[1]=="?"&&(P[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),x.$tokenizer},x.prototype.tokenizeTmSnippet=function(M,O){return this.getTokenizer().getLineTokens(M,O).tokens.map(function(F){return F.value||F})},x.prototype.getVariableValue=function(M,O,F){if(/^\d+$/.test(O))return(this.variables.__||{})[O]||"";if(/^[A-Z]\d+$/.test(O))return(this.variables[O[0]+"__"]||{})[O.substr(1)]||"";if(O=O.replace(/^TM_/,""),!this.variables.hasOwnProperty(O))return"";var L=this.variables[O];return typeof L=="function"&&(L=this.variables[O](M,O,F)),L??""},x.prototype.tmStrFormat=function(M,O,F){if(!O.fmt)return M;var L=O.flag||"",H=O.guard;H=new RegExp(H,L.replace(/[^gim]/g,""));var P=typeof O.fmt=="string"?this.tokenizeTmSnippet(O.fmt,"formatString"):O.fmt,I=this,$=M.replace(H,function(){var C=I.variables.__;I.variables.__=[].slice.call(arguments);for(var N=I.resolveVariables(P,F),j="E",U=0;U<N.length;U++){var K=N[U];if(typeof K=="object")if(N[U]="",K.changeCase&&K.local){var Z=N[U+1];Z&&typeof Z=="string"&&(K.changeCase=="u"?N[U]=Z[0].toUpperCase():N[U]=Z[0].toLowerCase(),N[U+1]=Z.substr(1))}else K.changeCase&&(j=K.changeCase);else j=="U"?N[U]=K.toUpperCase():j=="L"&&(N[U]=K.toLowerCase())}return I.variables.__=C,N.join("")});return $},x.prototype.tmFormatFunction=function(M,O,F){return O.formatFunction=="upcase"?M.toUpperCase():O.formatFunction=="downcase"?M.toLowerCase():M},x.prototype.resolveVariables=function(M,O){function F(j){var U=M.indexOf(j,I+1);U!=-1&&(I=U)}for(var L=[],H="",P=!0,I=0;I<M.length;I++){var $=M[I];if(typeof $=="string"){L.push($),$==`
1131
+ `?(P=!0,H=""):P&&(H=/^\t*/.exec($)[0],P=/\S/.test($));continue}if($){if(P=!1,$.fmtString){var C=M.indexOf($,I+1);C==-1&&(C=M.length),$.fmt=M.slice(I+1,C),I=C}if($.text){var N=this.getVariableValue(O,$.text,H)+"";$.fmtString&&(N=this.tmStrFormat(N,$,O)),$.formatFunction&&(N=this.tmFormatFunction(N,$,O)),N&&!$.ifEnd?(L.push(N),F($)):!N&&$.ifEnd&&F($.ifEnd)}else $.elseEnd?F($.elseEnd):($.tabstopId!=null||$.changeCase!=null)&&L.push($)}}return L},x.prototype.getDisplayTextForSnippet=function(M,O){var F=w.call(this,M,O);return F.text},x.prototype.insertSnippetForSelection=function(M,O,F){F===void 0&&(F={});var L=w.call(this,M,O,F),H=M.getSelectionRange(),P=M.session.replace(H,L.text),I=new k(M),$=M.inVirtualSelectionMode&&M.selection.index;I.addTabstops(L.tabstops,H.start,P,$)},x.prototype.insertSnippet=function(M,O,F){F===void 0&&(F={});var L=this;if(M.inVirtualSelectionMode)return L.insertSnippetForSelection(M,O,F);M.forEachSelection(function(){L.insertSnippetForSelection(M,O,F)},null,{keepOrder:!0}),M.tabstopManager&&M.tabstopManager.tabNext()},x.prototype.$getScope=function(M){var O=M.session.$mode.$id||"";if(O=O.split("/").pop(),O==="html"||O==="php"){O==="php"&&!M.session.$mode.inlinePhp&&(O="html");var F=M.getCursorPosition(),L=M.session.getState(F.row);typeof L=="object"&&(L=L[0]),L.substring&&(L.substring(0,3)=="js-"?O="javascript":L.substring(0,4)=="css-"?O="css":L.substring(0,4)=="php-"&&(O="php"))}return O},x.prototype.getActiveScopes=function(M){var O=this.$getScope(M),F=[O],L=this.snippetMap;return L[O]&&L[O].includeScopes&&F.push.apply(F,L[O].includeScopes),F.push("_"),F},x.prototype.expandWithTab=function(M,O){var F=this,L=M.forEachSelection(function(){return F.expandSnippetForSelection(M,O)},null,{keepOrder:!0});return L&&M.tabstopManager&&M.tabstopManager.tabNext(),L},x.prototype.expandSnippetForSelection=function(M,O){var F=M.getCursorPosition(),L=M.session.getLine(F.row),H=L.substring(0,F.column),P=L.substr(F.column),I=this.snippetMap,$;return this.getActiveScopes(M).some(function(C){var N=I[C];return N&&($=this.findMatchingSnippet(N,H,P)),!!$},this),$?(O&&O.dryRun||(M.session.doc.removeInLine(F.row,F.column-$.replaceBefore.length,F.column+$.replaceAfter.length),this.variables.M__=$.matchBefore,this.variables.T__=$.matchAfter,this.insertSnippetForSelection(M,$.content),this.variables.M__=this.variables.T__=null),!0):!1},x.prototype.findMatchingSnippet=function(M,O,F){for(var L=M.length;L--;){var H=M[L];if(!(H.startRe&&!H.startRe.test(O))&&!(H.endRe&&!H.endRe.test(F))&&!(!H.startRe&&!H.endRe))return H.matchBefore=H.startRe?H.startRe.exec(O):[""],H.matchAfter=H.endRe?H.endRe.exec(F):[""],H.replaceBefore=H.triggerRe?H.triggerRe.exec(O)[0]:"",H.replaceAfter=H.endTriggerRe?H.endTriggerRe.exec(F)[0]:"",H}},x.prototype.register=function(M,O){function F(C){return C&&!/^\^?\(.*\)\$?$|^\\b$/.test(C)&&(C="(?:"+C+")"),C||""}function L(C,N,j){return C=F(C),N=F(N),C=N+C,C&&C[C.length-1]!="$"&&(C+="$"),new RegExp(C)}function H(C){C.scope||(C.scope=O||"_"),O=C.scope,P[O]||(P[O]=[],I[O]={});var N=I[O];if(C.name){var j=N[C.name];j&&$.unregister(j),N[C.name]=C}P[O].push(C),C.prefix&&(C.tabTrigger=C.prefix),!C.content&&C.body&&(C.content=Array.isArray(C.body)?C.body.join(`
1132
+ `):C.body),C.tabTrigger&&!C.trigger&&(!C.guard&&/^\w/.test(C.tabTrigger)&&(C.guard="\\b"),C.trigger=g.escapeRegExp(C.tabTrigger)),!(!C.trigger&&!C.guard&&!C.endTrigger&&!C.endGuard)&&(C.startRe=L(C.trigger,C.guard),C.triggerRe=new RegExp(C.trigger),C.endRe=L(C.endTrigger,C.endGuard),C.endTriggerRe=new RegExp(C.endTrigger))}var P=this.snippetMap,I=this.snippetNameMap,$=this;M||(M=[]),Array.isArray(M)?M.forEach(H):Object.keys(M).forEach(function(C){H(M[C])}),this._signal("registerSnippets",{scope:O})},x.prototype.unregister=function(M,O){function F(P){var I=H[P.scope||O];if(I&&I[P.name]){delete I[P.name];var $=L[P.scope||O],C=$&&$.indexOf(P);C>=0&&$.splice(C,1)}}var L=this.snippetMap,H=this.snippetNameMap;M.content?F(M):Array.isArray(M)&&M.forEach(F)},x.prototype.parseSnippetFile=function(M){M=M.replace(/\r/g,"");for(var O=[],F={},L=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,H;H=L.exec(M);){if(H[1])try{F=JSON.parse(H[1]),O.push(F)}catch{}if(H[4])F.content=H[4].replace(/^\t/gm,""),O.push(F),F={};else{var P=H[2],I=H[3];if(P=="regex"){var $=/\/((?:[^\/\\]|\\.)*)|$/g;F.guard=$.exec(I)[1],F.trigger=$.exec(I)[1],F.endTrigger=$.exec(I)[1],F.endGuard=$.exec(I)[1]}else P=="snippet"?(F.tabTrigger=I.match(/^\S*/)[0],F.name||(F.name=I)):P&&(F[P]=I)}}return O},x.prototype.getSnippetByName=function(M,O){var F=this.snippetNameMap,L;return this.getActiveScopes(O).some(function(H){var P=F[H];return P&&(L=P[M]),!!L},this),L},x}();b.implement(m.prototype,p);var w=function(x,M,O){function F(ce){for(var ge=[],Ee=0;Ee<ce.length;Ee++){var Re=ce[Ee];if(typeof Re=="object"){if(N[Re.tabstopId])continue;var Le=ce.lastIndexOf(Re,Ee-1);Re=ge[Le]||{tabstopId:Re.tabstopId}}ge[Ee]=Re}return ge}O===void 0&&(O={});var L=x.getCursorPosition(),H=x.session.getLine(L.row),P=x.session.getTabString(),I=H.match(/^\s*/)[0];L.column<I.length&&(I=I.slice(0,L.column)),M=M.replace(/\r/g,"");var $=this.tokenizeTmSnippet(M);$=this.resolveVariables($,x),$=$.map(function(ce){return ce==`
1133
+ `&&!O.excludeExtraIndent?ce+I:typeof ce=="string"?ce.replace(/\t/g,P):ce});var C=[];$.forEach(function(ce,ge){if(typeof ce=="object"){var Ee=ce.tabstopId,Re=C[Ee];if(Re||(Re=C[Ee]=[],Re.index=Ee,Re.value="",Re.parents={}),Re.indexOf(ce)===-1){ce.choices&&!Re.choices&&(Re.choices=ce.choices),Re.push(ce);var Le=$.indexOf(ce,ge+1);if(Le!==-1){var Xe=$.slice(ge+1,Le),Ge=Xe.some(function(ft){return typeof ft=="object"});Ge&&!Re.value?Re.value=Xe:Xe.length&&(!Re.value||typeof Re.value!="string")&&(Re.value=Xe.join(""))}}}}),C.forEach(function(ce){ce.length=0});for(var N={},j=0;j<$.length;j++){var U=$[j];if(typeof U=="object"){var K=U.tabstopId,Z=C[K],te=$.indexOf(U,j+1);if(N[K]){N[K]===U&&(delete N[K],Object.keys(N).forEach(function(ce){Z.parents[ce]=!0}));continue}N[K]=U;var he=Z.value;typeof he!="string"?he=F(he):U.fmt&&(he=this.tmStrFormat(he,U,x)),$.splice.apply($,[j+1,Math.max(0,te-j)].concat(he,U)),Z.indexOf(U)===-1&&Z.push(U)}}var ne=0,ae=0,ue="";return $.forEach(function(ce){if(typeof ce=="string"){var ge=ce.split(`
1134
+ `);ge.length>1?(ae=ge[ge.length-1].length,ne+=ge.length-1):ae+=ce.length,ue+=ce}else ce&&(ce.start?ce.end={row:ne,column:ae}:ce.start={row:ne,column:ae})}),{text:ue,tabstops:C,tokens:$}},k=function(){function x(M){if(this.index=0,this.ranges=[],this.tabstops=[],M.tabstopManager)return M.tabstopManager;M.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(M)}return x.prototype.attach=function(M){this.$openTabstops=null,this.selectedTabstop=null,this.editor=M,this.session=M.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)},x.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},x.prototype.onChange=function(M){for(var O=M.action[0]=="r",F=this.selectedTabstop||{},L=F.parents||{},H=this.tabstops.slice(),P=0;P<H.length;P++){var I=H[P],$=I==F||L[I.index];if(I.rangeList.$bias=$?0:1,M.action=="remove"&&I!==F){var C=I.parents&&I.parents[F.index],N=I.rangeList.pointIndex(M.start,C);N=N<0?-N-1:N+1;var j=I.rangeList.pointIndex(M.end,C);j=j<0?-j-1:j-1;for(var U=I.rangeList.ranges.slice(N,j),K=0;K<U.length;K++)this.removeRange(U[K])}I.rangeList.$onChange(M)}var Z=this.session;!this.$inChange&&O&&Z.getLength()==1&&!Z.getValue()&&this.detach()},x.prototype.updateLinkedFields=function(){var M=this.selectedTabstop;if(!(!M||!M.hasLinkedRanges||!M.firstNonLinked)){this.$inChange=!0;for(var O=this.session,F=O.getTextRange(M.firstNonLinked),L=0;L<M.length;L++){var H=M[L];if(H.linked){var P=H.original,I=r.snippetManager.tmStrFormat(F,P,this.editor);O.replace(H,I)}}this.$inChange=!1}},x.prototype.onAfterExec=function(M){M.command&&!M.command.readOnly&&this.updateLinkedFields()},x.prototype.onChangeSelection=function(){if(this.editor){for(var M=this.editor.selection.lead,O=this.editor.selection.anchor,F=this.editor.selection.isEmpty(),L=0;L<this.ranges.length;L++)if(!this.ranges[L].linked){var H=this.ranges[L].contains(M.row,M.column),P=F||this.ranges[L].contains(O.row,O.column);if(H&&P)return}this.detach()}},x.prototype.onChangeSession=function(){this.detach()},x.prototype.tabNext=function(M){var O=this.tabstops.length,F=this.index+(M||1);F=Math.min(Math.max(F,1),O),F==O&&(F=0),this.selectTabstop(F),this.updateTabstopMarkers(),F===0&&this.detach()},x.prototype.selectTabstop=function(M){this.$openTabstops=null;var O=this.tabstops[this.index];if(O&&this.addTabstopMarkers(O),this.index=M,O=this.tabstops[this.index],!(!O||!O.length)){this.selectedTabstop=O;var F=O.firstNonLinked||O;if(O.choices&&(F.cursor=F.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(F);else{var L=this.editor.multiSelect;L.toSingleRange(F);for(var H=0;H<O.length;H++)O.hasLinkedRanges&&O[H].linked||L.addRange(O[H].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},x.prototype.addTabstops=function(M,O,F){var L=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!M[0]){var H=i.fromPoints(F,F);T(H.start,O),T(H.end,O),M[0]=[H],M[0].index=0}var P=this.index,I=[P+1,0],$=this.ranges,C=this.snippetId=(this.snippetId||0)+1;M.forEach(function(N,j){var U=this.$openTabstops[j]||N;U.snippetId=C;for(var K=0;K<N.length;K++){var Z=N[K],te=i.fromPoints(Z.start,Z.end||Z.start);R(te.start,O),R(te.end,O),te.original=Z,te.tabstop=U,$.push(te),U!=N?U.unshift(te):U[K]=te,Z.fmtString||U.firstNonLinked&&L?(te.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=te)}U.firstNonLinked||(U.hasLinkedRanges=!1),U===N&&(I.push(U),this.$openTabstops[j]=U),this.addTabstopMarkers(U),U.rangeList=U.rangeList||new a,U.rangeList.$bias=0,U.rangeList.addList(U)},this),I.length>2&&(this.tabstops.length&&I.push(I.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,I))},x.prototype.addTabstopMarkers=function(M){var O=this.session;M.forEach(function(F){F.markerId||(F.markerId=O.addMarker(F,"ace_snippet-marker","text"))})},x.prototype.removeTabstopMarkers=function(M){var O=this.session;M.forEach(function(F){O.removeMarker(F.markerId),F.markerId=null})},x.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var M=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&M--,this.tabstops.forEach(function(O){O.snippetId===M?this.addTabstopMarkers(O):this.removeTabstopMarkers(O)},this)}},x.prototype.removeRange=function(M){var O=M.tabstop.indexOf(M);O!=-1&&M.tabstop.splice(O,1),O=this.ranges.indexOf(M),O!=-1&&this.ranges.splice(O,1),O=M.tabstop.rangeList.ranges.indexOf(M),O!=-1&&M.tabstop.splice(O,1),this.session.removeMarker(M.markerId),M.tabstop.length||(O=this.tabstops.indexOf(M.tabstop),O!=-1&&this.tabstops.splice(O,1),this.tabstops.length||this.detach())},x}();k.prototype.keyboardHandler=new h,k.prototype.keyboardHandler.bindKeys({Tab:function(x){r.snippetManager&&r.snippetManager.expandWithTab(x)||(x.tabstopManager.tabNext(1),x.renderer.scrollCursorIntoView())},"Shift-Tab":function(x){x.tabstopManager.tabNext(-1),x.renderer.scrollCursorIntoView()},Esc:function(x){x.tabstopManager.detach()}});var R=function(x,M){x.row==0&&(x.column+=M.column),x.row+=M.row},T=function(x,M){x.row==M.row&&(x.column-=M.column),x.row-=M.row};f.importCssString(`
1135
+ .ace_snippet-marker {
1136
+ -moz-box-sizing: border-box;
1137
+ box-sizing: border-box;
1138
+ background: rgba(194, 193, 208, 0.09);
1139
+ border: 1px dotted rgba(211, 208, 235, 0.62);
1140
+ position: absolute;
1141
+ }`,"snippets.css",!1),r.snippetManager=new m;var S=n("./editor").Editor;(function(){this.insertSnippet=function(x,M){return r.snippetManager.insertSnippet(this,x,M)},this.expandSnippet=function(x){return r.snippetManager.expandWithTab(this,x)}}).call(S.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,r,u){var d=n("../virtual_renderer").VirtualRenderer,f=n("../editor").Editor,b=n("../range").Range,p=n("../lib/event"),g=n("../lib/lang"),i=n("../lib/dom"),a=n("../config").nls,h=n("./../lib/useragent"),c=function(R){return"suggest-aria-id:".concat(R)},o=h.isSafari?"menu":"listbox",l=h.isSafari?"menuitem":"option",m=h.isSafari?"aria-current":"aria-selected",w=function(R){var T=new d(R);T.$maxLines=4;var S=new f(T);return S.setHighlightActiveLine(!1),S.setShowPrintMargin(!1),S.renderer.setShowGutter(!1),S.renderer.setHighlightGutterLine(!1),S.$mouseHandler.$focusTimeout=0,S.$highlightTagPending=!0,S},k=function(){function R(T){var S=i.createElement("div"),x=w(S);T&&T.appendChild(S),S.style.display="none",x.renderer.content.style.cursor="default",x.renderer.setStyle("ace_autocomplete"),x.renderer.$textLayer.element.setAttribute("role",o),x.renderer.$textLayer.element.setAttribute("aria-roledescription",a("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),x.renderer.$textLayer.element.setAttribute("aria-label",a("autocomplete.popup.aria-label","Autocomplete suggestions")),x.renderer.textarea.setAttribute("aria-hidden","true"),x.setOption("displayIndentGuides",!1),x.setOption("dragDelay",150);var M=function(){};x.focus=M,x.$isFocused=!0,x.renderer.$cursorLayer.restartTimer=M,x.renderer.$cursorLayer.element.style.opacity="0",x.renderer.$maxLines=8,x.renderer.$keepTextAreaAtCursor=!1,x.setHighlightActiveLine(!1),x.session.highlight(""),x.session.$searchHighlight.clazz="ace_highlight-marker",x.on("mousedown",function($){var C=$.getDocumentPosition();x.selection.moveToPosition(C),L.start.row=L.end.row=C.row,$.stop()});var O,F=new b(-1,0,-1,1/0),L=new b(-1,0,-1,1/0);L.id=x.session.addMarker(L,"ace_active-line","fullLine"),x.setSelectOnHover=function($){$?F.id&&(x.session.removeMarker(F.id),F.id=null):F.id=x.session.addMarker(F,"ace_line-hover","fullLine")},x.setSelectOnHover(!1),x.on("mousemove",function($){if(!O){O=$;return}if(!(O.x==$.x&&O.y==$.y)){O=$,O.scrollTop=x.renderer.scrollTop,x.isMouseOver=!0;var C=O.getDocumentPosition().row;F.start.row!=C&&(F.id||x.setRow(C),P(C))}}),x.renderer.on("beforeRender",function(){if(O&&F.start.row!=-1){O.$pos=null;var $=O.getDocumentPosition().row;F.id||x.setRow($),P($,!0)}}),x.renderer.on("afterRender",function(){for(var $=x.renderer.$textLayer,C=$.config.firstRow,N=$.config.lastRow;C<=N;C++){var j=$.element.childNodes[C-$.config.firstRow];j.setAttribute("role",l),j.setAttribute("aria-roledescription",a("autocomplete.popup.item.aria-roledescription","item")),j.setAttribute("aria-setsize",x.data.length),j.setAttribute("aria-describedby","doc-tooltip"),j.setAttribute("aria-posinset",C+1);var U=x.getData(C);if(U){var K="".concat(U.caption||U.value).concat(U.meta?", ".concat(U.meta):"");j.setAttribute("aria-label",K)}var Z=j.querySelectorAll(".ace_completion-highlight");Z.forEach(function(te){te.setAttribute("role","mark")})}}),x.renderer.on("afterRender",function(){var $=x.getRow(),C=x.renderer.$textLayer,N=C.element.childNodes[$-C.config.firstRow],j=document.activeElement;if(N!==x.selectedNode&&x.selectedNode&&(i.removeCssClass(x.selectedNode,"ace_selected"),x.selectedNode.removeAttribute(m),x.selectedNode.removeAttribute("id")),j.removeAttribute("aria-activedescendant"),x.selectedNode=N,N){var U=c($);i.addCssClass(N,"ace_selected"),N.id=U,C.element.setAttribute("aria-activedescendant",U),j.setAttribute("aria-activedescendant",U),N.setAttribute(m,"true")}});var H=function(){P(-1)},P=function($,C){$!==F.start.row&&(F.start.row=F.end.row=$,C||x.session._emit("changeBackMarker"),x._emit("changeHoverMarker"))};x.getHoveredRow=function(){return F.start.row},p.addListener(x.container,"mouseout",function(){x.isMouseOver=!1,H()}),x.on("hide",H),x.on("changeSelection",H),x.session.doc.getLength=function(){return x.data.length},x.session.doc.getLine=function($){var C=x.data[$];return typeof C=="string"?C:C&&C.value||""};var I=x.session.bgTokenizer;return I.$tokenizeRow=function($){function C(ce,ge){ce&&j.push({type:(N.className||"")+(ge||""),value:ce})}var N=x.data[$],j=[];if(!N)return j;typeof N=="string"&&(N={value:N});for(var U=N.caption||N.value||N.name,K=U.toLowerCase(),Z=(x.filterText||"").toLowerCase(),te=0,he=0,ne=0;ne<=Z.length;ne++)if(ne!=he&&(N.matchMask&1<<ne||ne==Z.length)){var ae=Z.slice(he,ne);he=ne;var ue=K.indexOf(ae,te);if(ue==-1)continue;C(U.slice(te,ue),""),te=ue+ae.length,C(U.slice(ue,te),"completion-highlight")}return C(U.slice(te,U.length),""),j.push({type:"completion-spacer",value:" "}),N.meta&&j.push({type:"completion-meta",value:N.meta}),N.message&&j.push({type:"completion-message",value:N.message}),j},I.$updateOnChange=M,I.start=M,x.session.$computeWidth=function(){return this.screenWidth=0},x.isOpen=!1,x.isTopdown=!1,x.autoSelect=!0,x.filterText="",x.isMouseOver=!1,x.data=[],x.setData=function($,C){x.filterText=C||"",x.setValue(g.stringRepeat(`
1142
+ `,$.length),-1),x.data=$||[],x.setRow(0)},x.getData=function($){return x.data[$]},x.getRow=function(){return L.start.row},x.setRow=function($){$=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,$)),L.start.row!=$&&(x.selection.clearSelection(),L.start.row=L.end.row=$||0,x.session._emit("changeBackMarker"),x.moveCursorTo($||0,0),x.isOpen&&x._signal("select"))},x.on("changeSelection",function(){x.isOpen&&x.setRow(x.selection.lead.row),x.renderer.scrollCursorIntoView()}),x.hide=function(){this.container.style.display="none",x.anchorPos=null,x.anchor=null,x.isOpen&&(x.isOpen=!1,this._signal("hide"))},x.tryShow=function($,C,N,j){if(!j&&x.isOpen&&x.anchorPos&&x.anchor&&x.anchorPos.top===$.top&&x.anchorPos.left===$.left&&x.anchor===N)return!0;var U=this.container,K=this.renderer.scrollBar.width||10,Z=window.innerHeight-K,te=window.innerWidth-K,he=this.renderer,ne=he.$maxLines*C*1.4,ae={top:0,bottom:0},ue=Z-$.top-3*this.$borderSize-C,ce=$.top-3*this.$borderSize;N||(ce<=ue||ue>=ne?N="bottom":N="top"),N==="top"?(ae.bottom=$.top-this.$borderSize,ae.top=ae.bottom-ne):N==="bottom"&&(ae.top=$.top+C+this.$borderSize,ae.bottom=ae.top+ne);var ge=ae.top>=0&&ae.bottom<=Z;if(!j&&!ge)return!1;ge?he.$maxPixelHeight=null:N==="top"?he.$maxPixelHeight=ce:he.$maxPixelHeight=ue,N==="top"?(U.style.top="",U.style.bottom=Z+K-ae.bottom+"px",x.isTopdown=!1):(U.style.top=ae.top+"px",U.style.bottom="",x.isTopdown=!0),U.style.display="";var Ee=$.left;return Ee+U.offsetWidth>te&&(Ee=te-U.offsetWidth),U.style.left=Ee+"px",U.style.right="",x.isOpen||(x.isOpen=!0,this._signal("show"),O=null),x.anchorPos=$,x.anchor=N,!0},x.show=function($,C,N){this.tryShow($,C,N?"bottom":void 0,!0)},x.goTo=function($){var C=this.getRow(),N=this.session.getLength()-1;switch($){case"up":C=C<=0?N:C-1;break;case"down":C=C>=N?-1:C+1;break;case"start":C=0;break;case"end":C=N}this.setRow(C)},x.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},x.$imageSize=0,x.$borderSize=1,x}return R}();i.importCssString(`
1143
+ .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1144
+ background-color: #CAD6FA;
1145
+ z-index: 1;
1146
+ }
1147
+ .ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
1148
+ background-color: #3a674e;
1149
+ }
1150
+ .ace_editor.ace_autocomplete .ace_line-hover {
1151
+ border: 1px solid #abbffe;
1152
+ margin-top: -1px;
1153
+ background: rgba(233,233,253,0.4);
1154
+ position: absolute;
1155
+ z-index: 2;
1156
+ }
1157
+ .ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
1158
+ border: 1px solid rgba(109, 150, 13, 0.8);
1159
+ background: rgba(58, 103, 78, 0.62);
1160
+ }
1161
+ .ace_completion-meta {
1162
+ opacity: 0.5;
1163
+ margin-left: 0.9em;
1164
+ }
1165
+ .ace_completion-message {
1166
+ margin-left: 0.9em;
1167
+ color: blue;
1168
+ }
1169
+ .ace_editor.ace_autocomplete .ace_completion-highlight{
1170
+ color: #2d69c7;
1171
+ }
1172
+ .ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
1173
+ color: #93ca12;
1174
+ }
1175
+ .ace_editor.ace_autocomplete {
1176
+ width: 300px;
1177
+ z-index: 200000;
1178
+ border: 1px lightgray solid;
1179
+ position: fixed;
1180
+ box-shadow: 2px 3px 5px rgba(0,0,0,.2);
1181
+ line-height: 1.4;
1182
+ background: #fefefe;
1183
+ color: #111;
1184
+ }
1185
+ .ace_dark.ace_editor.ace_autocomplete {
1186
+ border: 1px #484747 solid;
1187
+ box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
1188
+ line-height: 1.4;
1189
+ background: #25282c;
1190
+ color: #c1c1c1;
1191
+ }
1192
+ .ace_autocomplete .ace_text-layer {
1193
+ width: calc(100% - 8px);
1194
+ }
1195
+ .ace_autocomplete .ace_line {
1196
+ display: flex;
1197
+ align-items: center;
1198
+ }
1199
+ .ace_autocomplete .ace_line > * {
1200
+ min-width: 0;
1201
+ flex: 0 0 auto;
1202
+ }
1203
+ .ace_autocomplete .ace_line .ace_ {
1204
+ flex: 0 1 auto;
1205
+ overflow: hidden;
1206
+ text-overflow: ellipsis;
1207
+ }
1208
+ .ace_autocomplete .ace_completion-spacer {
1209
+ flex: 1;
1210
+ }
1211
+ .ace_autocomplete.ace_loading:after {
1212
+ content: "";
1213
+ position: absolute;
1214
+ top: 0px;
1215
+ height: 2px;
1216
+ width: 8%;
1217
+ background: blue;
1218
+ z-index: 100;
1219
+ animation: ace_progress 3s infinite linear;
1220
+ animation-delay: 300ms;
1221
+ transform: translateX(-100%) scaleX(1);
1222
+ }
1223
+ @keyframes ace_progress {
1224
+ 0% { transform: translateX(-100%) scaleX(1) }
1225
+ 50% { transform: translateX(625%) scaleX(2) }
1226
+ 100% { transform: translateX(1500%) scaleX(3) }
1227
+ }
1228
+ @media (prefers-reduced-motion) {
1229
+ .ace_autocomplete.ace_loading:after {
1230
+ transform: translateX(625%) scaleX(2);
1231
+ animation: none;
1232
+ }
1233
+ }
1234
+ `,"autocompletion.css",!1),r.AcePopup=k,r.$singleLineEditor=w,r.getAriaId=c}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(n,r,u){var d=function(){function f(b){this.editor=b,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return f.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(),i=this.popup.renderer.$textLayer,a=i.element.childNodes[g-i.config.firstRow];if(a){for(var h="doc-tooltip ",c=0;c<this._lines.length;c++)h+="ace-inline-screenreader-line-".concat(c," ");a.setAttribute("aria-describedby",h)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=b.split(/\r\n|\r|\n/);var p=this.createCodeBlock();this.screenReaderDiv.appendChild(p)},f.prototype.destroy=function(){this.screenReaderDiv.remove()},f.prototype.createCodeBlock=function(){var b=document.createElement("pre");b.setAttribute("id","ace-inline-screenreader");for(var p=0;p<this._lines.length;p++){var g=document.createElement("code");g.setAttribute("id","ace-inline-screenreader-line-".concat(p));var i=document.createTextNode(this._lines[p]);g.appendChild(i),b.appendChild(g)}return b},f}();r.AceInlineScreenReader=d}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(n,r,u){var d=n("../snippets").snippetManager,f=n("./inline_screenreader").AceInlineScreenReader,b=function(){function p(){this.editor=null}return p.prototype.show=function(g,i,a){if(a=a||"",g&&this.editor&&this.editor!==g&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!g||!i)return!1;this.inlineScreenReader||(this.inlineScreenReader=new f(g));var h=i.snippet?d.getDisplayTextForSnippet(g,i.snippet):i.value;return i.hideInlinePreview||!h||!h.startsWith(a)?!1:(this.editor=g,this.inlineScreenReader.setScreenReaderContent(h),h=h.slice(a.length),h===""?g.removeGhostText():g.setGhostText(h),!0)},p.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},p.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},p.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},p}();r.AceInline=b}),ace.define("ace/autocomplete/util",["require","exports","module"],function(n,r,u){r.parForEach=function(f,b,p){var g=0,i=f.length;i===0&&p();for(var a=0;a<i;a++)b(f[a],function(h,c){g++,g===i&&p(h,c)})};var d=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(f,b,p){p=p||d;for(var g=[],i=b-1;i>=0&&p.test(f[i]);i--)g.push(f[i]);return g.reverse().join("")},r.retrieveFollowingIdentifier=function(f,b,p){p=p||d;for(var g=[],i=b;i<f.length&&p.test(f[i]);i++)g.push(f[i]);return g},r.getCompletionPrefix=function(f){var b=f.getCursorPosition(),p=f.session.getLine(b.row),g;return f.completers.forEach((function(i){i.identifierRegexps&&i.identifierRegexps.forEach((function(a){!g&&a&&(g=this.retrievePrecedingIdentifier(p,b.column,a))}).bind(this))}).bind(this)),g||this.retrievePrecedingIdentifier(p,b.column)},r.triggerAutocomplete=function(f,p){var p=p??f.session.getPrecedingCharacter();return f.completers.some(function(g){if(g.triggerCharacters&&Array.isArray(g.triggerCharacters))return g.triggerCharacters.includes(p)})}}),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,r,u){var d=n("./keyboard/hash_handler").HashHandler,f=n("./autocomplete/popup").AcePopup,b=n("./autocomplete/inline").AceInline,p=n("./autocomplete/popup").getAriaId,g=n("./autocomplete/util"),i=n("./lib/lang"),a=n("./lib/dom"),h=n("./snippets").snippetManager,c=n("./config"),o=n("./lib/event"),l=n("./lib/scroll").preventParentScroll,m=function(T,S){S.completer&&S.completer.destroy()},w=function(){function T(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new d,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=i.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=i.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=i.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=i.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=i.delayedCall((function(){var S=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!S||this.editor.completers.length===0||(this.completions=new R(T.completionsForLoading),this.openPopup(this.editor,S.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty(T,"completionsForLoading",{get:function(){return[{caption:c.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),T.prototype.$init=function(){return this.popup=new f(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(S){this.insertMatch(),S.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),o.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},T.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new b,this.inlineRenderer},T.prototype.getPopup=function(){return this.popup||this.$init()},T.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},T.prototype.$seen=function(S){!this.hasSeen.has(S)&&S&&S.completer&&S.completer.onSeen&&typeof S.completer.onSeen=="function"&&(S.completer.onSeen(this.editor,S),this.hasSeen.add(S))},T.prototype.$onPopupChange=function(S){if(this.inlineRenderer&&this.inlineEnabled){var x=S?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(x),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)},T.prototype.$updateGhostText=function(S){var x=this.base.row,M=this.base.column,O=this.editor.getCursorPosition().column,F=this.editor.session.getLine(x).slice(M,O);this.inlineRenderer.show(this.editor,S,F)?this.$seen(S):this.inlineRenderer.hide()},T.prototype.$onPopupRender=function(){var S=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var x=this.popup.getFirstVisibleRow();x<=this.popup.getLastVisibleRow();x++){var M=this.popup.getData(x);M&&(!S||M.hideInlinePreview)&&this.$seen(M)}},T.prototype.$onPopupShow=function(S){this.$onPopupChange(S),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},T.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var S=this.editor.container.parentNode,x=[];S;)x.push(S),S.addEventListener("scroll",this.onLayoutChange,{passive:!0}),S=S.parentNode;this.$elements=x}},T.prototype.unObserveLayoutChanges=function(){var S=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(x){x.removeEventListener("scroll",S.onLayoutChange,{passive:!0})}),this.$elements=null},T.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},T.prototype.$updatePopupPosition=function(){var S=this.editor,x=S.renderer,M=x.layerConfig.lineHeight,O=x.$cursorLayer.getPixelPosition(this.base,!0);O.left-=this.popup.getTextLeftOffset();var F=S.container.getBoundingClientRect();O.top+=F.top-x.layerConfig.offset,O.left+=F.left-S.renderer.scrollLeft,O.left+=x.gutterWidth;var L={top:O.top,left:O.left};x.$ghostText&&x.$ghostTextWidget&&this.base.row===x.$ghostText.position.row&&(L.top+=x.$ghostTextWidget.el.offsetHeight);var H=S.container.getBoundingClientRect().bottom-M,P=H<L.top?{top:H,left:L.left}:L;this.popup.tryShow(P,M,"bottom")||this.popup.tryShow(O,M,"top")||this.popup.show(O,M)},T.prototype.openPopup=function(S,x,M){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var O=this.popup.getRow(),F=this.popup.data[O];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:p(this.popup.getRow()),inline:this.inlineEnabled}),S.keyBinding.addKeyboardHandler(this.keyboardHandler);var L;this.stickySelection&&(L=this.popup.data.indexOf(F)),(!L||L===-1)&&(L=0),this.popup.setRow(this.autoSelect?L:-1),L===O&&F!==this.completions.filtered[L]&&this.$onPopupChange();var H=this.inlineRenderer&&this.inlineEnabled;if(L===O&&H){var P=this.popup.getData(this.popup.getRow());this.$updateGhostText(P)}M||(this.popup.setTheme(S.getTheme()),this.popup.setFontSize(S.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},T.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()},T.prototype.changeListener=function(S){var x=this.editor.selection.lead;(x.row!=this.base.row||x.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},T.prototype.blurListener=function(S){var x=document.activeElement,M=this.editor.textInput.getElement(),O=S.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(S.relatedTarget),F=this.popup&&this.popup.container;x!=M&&x.parentNode!=F&&!O&&x!=this.tooltipNode&&S.relatedTarget!=M&&this.detach()},T.prototype.mousedownListener=function(S){this.detach()},T.prototype.mousewheelListener=function(S){this.popup&&!this.popup.isMouseOver&&this.detach()},T.prototype.mouseOutListener=function(S){this.popup.isOpen&&this.$updatePopupPosition()},T.prototype.goTo=function(S){this.popup.goTo(S)},T.prototype.insertMatch=function(S,x){if(S||(S=this.popup.getData(this.popup.getRow())),!S)return!1;if(S.value==="")return this.detach();var M=this.completions,O=this.getCompletionProvider().insertMatch(this.editor,S,M.filterText,x);return this.completions==M&&this.detach(),O},T.prototype.showPopup=function(S,x){this.editor&&this.detach(),this.activated=!0,this.editor=S,S.completer!=this&&(S.completer&&S.completer.detach(),S.completer=this),S.on("changeSelection",this.changeListener),S.on("blur",this.blurListener),S.on("mousedown",this.mousedownListener),S.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,x)},T.prototype.getCompletionProvider=function(S){return this.completionProvider||(this.completionProvider=new k(S)),this.completionProvider},T.prototype.gatherCompletions=function(S,x){return this.getCompletionProvider().gatherCompletions(S,x)},T.prototype.updateCompletions=function(S,x){if(S&&this.base&&this.completions){var O=this.editor.getCursorPosition(),F=this.editor.session.getTextRange({start:this.base,end:O});if(F==this.completions.filterText)return;if(this.completions.setFilter(F),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==F&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,F,S);return}if(x&&x.matches){var O=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(O.row,O.column),this.base.$insertRight=!0,this.completions=new R(x.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",S)}var M=this.editor.getSession(),O=this.editor.getCursorPosition(),F=g.getCompletionPrefix(this.editor);this.base=M.doc.createAnchor(O.row,O.column-F.length),this.base.$insertRight=!0;var L={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:F,pos:O}).provideCompletions(this.editor,L,(function(H,P,I){var $=P.filtered,C=g.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),I){if(!$.length){var N=!this.autoShown&&this.emptyMessage;if(typeof N=="function"&&(N=this.emptyMessage(C)),N){var j=[{caption:N,value:""}];this.completions=new R(j),this.openPopup(this.editor,C,S),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if($.length==1&&$[0].value==C&&!$[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&$.length==1)return this.insertMatch($[0])}this.completions=!I&&this.showLoadingState?new R(T.completionsForLoading.concat($),P.filterText):P,this.openPopup(this.editor,C,S),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!I)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},T.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},T.prototype.updateDocTooltip=function(){var S=this.popup,x=this.completions&&this.completions.filtered,M=x&&(x[S.getHoveredRow()]||x[S.getRow()]),O=null;if(!M||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var F=this.editor.completers.length,L=0;L<F;L++){var H=this.editor.completers[L];if(H.getDocTooltip&&M.completerId===H.id){O=H.getDocTooltip(M);break}}if(!O&&typeof M!="string"&&(O=M),typeof O=="string"&&(O={docText:O}),!O||!O.docHTML&&!O.docText)return this.hideDocTooltip();this.showDocTooltip(O)},T.prototype.showDocTooltip=function(S){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",l));var x=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(x.isDark?"ace_dark ":"")+(x.cssClass||"");var M=this.tooltipNode;S.docHTML?M.innerHTML=S.docHTML:S.docText&&(M.textContent=S.docText),M.parentNode||this.popup.container.appendChild(this.tooltipNode);var O=this.popup,F=O.container.getBoundingClientRect(),L=400,H=300,P=O.renderer.scrollBar.width||10,I=F.left,$=window.innerWidth-F.right-P,C=O.isTopdown?F.top:window.innerHeight-P-F.bottom,N=[Math.min($/L,1),Math.min(I/L,1),Math.min(C/H*.9)],j=Math.max.apply(Math,N),U=M.style;U.display="block",j==N[0]?(U.left=F.right+1+"px",U.right="",U.maxWidth=L*j+"px",U.top=F.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-F.top,H)+"px"):j==N[1]?(U.right=window.innerWidth-F.left+"px",U.left="",U.maxWidth=L*j+"px",U.top=F.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-F.top,H)+"px"):j==N[2]&&(U.left=window.innerWidth-F.left+"px",U.maxWidth=Math.min(L,window.innerWidth)+"px",O.isTopdown?(U.top=F.bottom+"px",U.left=F.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(window.innerHeight-P-F.bottom,H)+"px"):(U.top=O.container.offsetTop-M.offsetHeight+"px",U.left=F.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(O.container.offsetTop,H)+"px"))},T.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var S=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==S&&this.editor.focus(),this.tooltipNode=null,S.parentNode&&S.parentNode.removeChild(S)}},T.prototype.onTooltipClick=function(S){for(var x=S.target;x&&x!=this.tooltipNode;){if(x.nodeName=="A"&&x.href){x.rel="noreferrer",x.target="_blank";break}x=x.parentNode}},T.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var S=this.popup.container;S&&S.parentNode&&S.parentNode.removeChild(S)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",m),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},T.for=function(S){return S.completer instanceof T||(S.completer&&(S.completer.destroy(),S.completer=null),c.get("sharedPopups")?(T.$sharedInstance||(T.$sharedInstance=new T),S.completer=T.$sharedInstance):(S.completer=new T,S.once("destroy",m))),S.completer},T}();w.prototype.commands={Up:function(T){T.completer.goTo("up")},Down:function(T){T.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(T){T.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(T){T.completer.goTo("end")},Esc:function(T){T.completer.detach()},Return:function(T){return T.completer.insertMatch()},"Shift-Return":function(T){T.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(T){var S=T.completer.insertMatch();if(S||T.tabstopManager)return S;T.completer.goTo("down")},Backspace:function(T){T.execCommand("backspace");var S=g.getCompletionPrefix(T);!S&&T.completer&&T.completer.detach()},PageUp:function(T){T.completer.popup.gotoPageUp()},PageDown:function(T){T.completer.popup.gotoPageDown()}},w.startCommand={name:"startAutocomplete",exec:function(T,S){var x=w.for(T);x.autoInsert=!1,x.autoSelect=!0,x.autoShown=!1,x.showPopup(T,S),x.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var k=function(){function T(S){this.initialPosition=S,this.active=!0}return T.prototype.insertByIndex=function(S,x,M){return!this.completions||!this.completions.filtered?!1:this.insertMatch(S,this.completions.filtered[x],M)},T.prototype.insertMatch=function(S,x,M){if(!x)return!1;if(S.startOperation({command:{name:"insertMatch"}}),x.completer&&x.completer.insertMatch)x.completer.insertMatch(S,x);else{if(!this.completions)return!1;var O=this.completions.filterText.length,F=0;if(x.range&&x.range.start.row===x.range.end.row&&(O-=this.initialPosition.prefix.length,O+=this.initialPosition.pos.column-x.range.start.column,F+=x.range.end.column-this.initialPosition.pos.column),O||F){var L;S.selection.getAllRanges?L=S.selection.getAllRanges():L=[S.getSelectionRange()];for(var H=0,P;P=L[H];H++)P.start.column-=O,P.end.column+=F,S.session.remove(P)}x.snippet?h.insertSnippet(S,x.snippet):this.$insertString(S,x),x.completer&&x.completer.onInsert&&typeof x.completer.onInsert=="function"&&x.completer.onInsert(S,x),x.command&&x.command==="startAutocomplete"&&S.execCommand(x.command)}return S.endOperation(),!0},T.prototype.$insertString=function(S,x){var M=x.value||x;S.execCommand("insertstring",M)},T.prototype.gatherCompletions=function(S,x){var M=S.getSession(),O=S.getCursorPosition(),F=g.getCompletionPrefix(S),L=[];this.completers=S.completers;var H=S.completers.length;return S.completers.forEach(function(P,I){P.getCompletions(S,M,O,F,function($,C){P.hideInlinePreview&&(C=C.map(function(N){return Object.assign(N,{hideInlinePreview:P.hideInlinePreview})})),!$&&C&&(L=L.concat(C)),x(null,{prefix:g.getCompletionPrefix(S),matches:L,finished:--H===0})})}),!0},T.prototype.provideCompletions=function(S,x,M){var O=(function(P){var I=P.prefix,$=P.matches;this.completions=new R($),x.exactMatch&&(this.completions.exactMatch=!0),x.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(I),(P.finished||this.completions.filtered.length)&&M(null,this.completions,P.finished)}).bind(this),F=!0,L=null;if(this.gatherCompletions(S,(function(P,I){if(this.active){P&&(M(P,[],!0),this.detach());var $=I.prefix;if($.indexOf(I.prefix)===0){if(F){L=I;return}O(I)}}}).bind(this)),F=!1,L){var H=L;L=null,O(H)}},T.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(S){typeof S.cancel=="function"&&S.cancel()})},T}(),R=function(){function T(S,x){this.all=S,this.filtered=S,this.filterText=x||"",this.exactMatch=!1,this.ignoreCaption=!1}return T.prototype.setFilter=function(S){if(S.length>this.filterText&&S.lastIndexOf(this.filterText,0)===0)var x=this.filtered;else var x=this.all;this.filterText=S,x=this.filterCompletions(x,this.filterText),x=x.sort(function(O,F){return F.exactMatch-O.exactMatch||F.$score-O.$score||(O.caption||O.value).localeCompare(F.caption||F.value)});var M=null;x=x.filter(function(O){var F=O.snippet||O.caption||O.value;return F===M?!1:(M=F,!0)}),this.filtered=x},T.prototype.filterCompletions=function(S,x){var M=[],O=x.toUpperCase(),F=x.toLowerCase();e:for(var L=0,H;H=S[L];L++){if(H.skipFilter){H.$score=H.score,M.push(H);continue}var P=!this.ignoreCaption&&H.caption||H.value||H.snippet;if(P){var I=-1,$=0,C=0,N,j;if(this.exactMatch){if(x!==P.substr(0,x.length))continue e}else{var U=P.toLowerCase().indexOf(F);if(U>-1)C=U;else for(var K=0;K<x.length;K++){var Z=P.indexOf(F[K],I+1),te=P.indexOf(O[K],I+1);if(N=Z>=0&&(te<0||Z<te)?Z:te,N<0)continue e;j=N-I-1,j>0&&(I===-1&&(C+=10),C+=j,$|=1<<K),I=N}}H.matchMask=$,H.exactMatch=C?0:1,H.$score=(H.score||0)-C,M.push(H)}}return M},T}();r.Autocomplete=w,r.CompletionProvider=k,r.FilteredList=R}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(n,r,u){function d(g,i){var a=g.getTextRange(b.fromPoints({row:0,column:0},i));return a.split(p).length-1}function f(g,i){var a=d(g,i),h=g.getValue().split(p),c=Object.create(null),o=h[a];return h.forEach(function(l,m){if(!(!l||l===o)){var w=Math.abs(a-m),k=h.length-w;c[l]?c[l]=Math.max(k,c[l]):c[l]=k}}),c}var b=n("../range").Range,p=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.getCompletions=function(g,i,a,h,c){var o=f(i,a),l=Object.keys(o);c(null,l.map(function(m){return{caption:m,value:m,score:o[m],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(n,r,u){var d=n("../snippets").snippetManager,f=n("../autocomplete").Autocomplete,b=n("../config"),p=n("../lib/lang"),g=n("../autocomplete/util"),i=n("../autocomplete/text_completer"),a={getCompletions:function(O,F,L,H,P){if(F.$mode.completer)return F.$mode.completer.getCompletions(O,F,L,H,P);var I=O.session.getState(L.row),$=F.$mode.getCompletions(I,F,L,H);$=$.map(function(C){return C.completerId=a.id,C}),P(null,$)},id:"keywordCompleter"},h=function(O){var F={};return O.replace(/\${(\d+)(:(.*?))?}/g,function(L,H,P,I){return F[H]=I||""}).replace(/\$(\d+?)/g,function(L,H){return F[H]})},c={getCompletions:function(O,F,L,H,P){var I=[],$=F.getTokenAt(L.row,L.column);$&&$.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?I.push("html-tag"):I=d.getActiveScopes(O);var C=d.snippetMap,N=[];I.forEach(function(j){for(var U=C[j]||[],K=U.length;K--;){var Z=U[K],te=Z.name||Z.tabTrigger;te&&N.push({caption:te,snippet:Z.content,meta:Z.tabTrigger&&!Z.name?Z.tabTrigger+"⇥ ":"snippet",completerId:c.id})}},this),P(null,N)},getDocTooltip:function(O){O.snippet&&!O.docHTML&&(O.docHTML=["<b>",p.escapeHTML(O.caption),"</b>","<hr></hr>",p.escapeHTML(h(O.snippet))].join(""))},id:"snippetCompleter"},o=[c,i,a];r.setCompleters=function(O){o.length=0,O&&o.push.apply(o,O)},r.addCompleter=function(O){o.push(O)},r.textCompleter=i,r.keyWordCompleter=a,r.snippetCompleter=c;var l={name:"expandSnippet",exec:function(O){return d.expandWithTab(O)},bindKey:"Tab"},m=function(O,F){w(F.session.$mode)},w=function(O){typeof O=="string"&&(O=b.$modes[O]),O&&(d.files||(d.files={}),k(O.$id,O.snippetFileId),O.modes&&O.modes.forEach(w))},k=function(O,F){!F||!O||d.files[O]||(d.files[O]={},b.loadModule(F,function(L){L&&(d.files[O]=L,!L.snippets&&L.snippetText&&(L.snippets=d.parseSnippetFile(L.snippetText)),d.register(L.snippets||[],L.scope),L.includeScopes&&(d.snippetMap[L.scope].includeScopes=L.includeScopes,L.includeScopes.forEach(function(H){w("ace/mode/"+H)})))}))},R=function(O){var F=O.editor,L=F.completer&&F.completer.activated;if(O.command.name==="backspace")L&&!g.getCompletionPrefix(F)&&F.completer.detach();else if(O.command.name==="insertstring"&&!L){T=O;var H=O.editor.$liveAutocompletionDelay;H?S.delay(H):x(O)}},T,S=p.delayedCall(function(){x(T)},0),x=function(O){var F=O.editor,L=g.getCompletionPrefix(F),H=O.args,P=g.triggerAutocomplete(F,H);if(L&&L.length>=F.$liveAutocompletionThreshold||P){var I=f.for(F);I.autoShown=!0,I.showPopup(F)}},M=n("../editor").Editor;n("../config").defineOptions(M.prototype,"editor",{enableBasicAutocompletion:{set:function(O){O?(this.completers||(this.completers=Array.isArray(O)?O:o),this.commands.addCommand(f.startCommand)):this.commands.removeCommand(f.startCommand)},value:!1},enableLiveAutocompletion:{set:function(O){O?(this.completers||(this.completers=Array.isArray(O)?O:o),this.commands.on("afterExec",R)):this.commands.off("afterExec",R)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(O){O?(this.commands.addCommand(l),this.on("changeMode",m),m(null,this)):(this.commands.removeCommand(l),this.off("changeMode",m))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(n){t&&(t.exports=n)})}()}(Pg)),Pg.exports}$S();var jg={exports:{}},Wg;function TS(){return Wg||(Wg=1,function(t,e){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(n,r,u){u.exports=`
1235
+
1236
+ /* ------------------------------------------------------------------------------------------
1237
+ * Editor Search Form
1238
+ * --------------------------------------------------------------------------------------- */
1239
+ .ace_search {
1240
+ background-color: #ddd;
1241
+ color: #666;
1242
+ border: 1px solid #cbcbcb;
1243
+ border-top: 0 none;
1244
+ overflow: hidden;
1245
+ margin: 0;
1246
+ padding: 4px 6px 0 4px;
1247
+ position: absolute;
1248
+ top: 0;
1249
+ z-index: 99;
1250
+ white-space: normal;
1251
+ }
1252
+ .ace_search.left {
1253
+ border-left: 0 none;
1254
+ border-radius: 0px 0px 5px 0px;
1255
+ left: 0;
1256
+ }
1257
+ .ace_search.right {
1258
+ border-radius: 0px 0px 0px 5px;
1259
+ border-right: 0 none;
1260
+ right: 0;
1261
+ }
1262
+
1263
+ .ace_search_form, .ace_replace_form {
1264
+ margin: 0 20px 4px 0;
1265
+ overflow: hidden;
1266
+ line-height: 1.9;
1267
+ }
1268
+ .ace_replace_form {
1269
+ margin-right: 0;
1270
+ }
1271
+ .ace_search_form.ace_nomatch {
1272
+ outline: 1px solid red;
1273
+ }
1274
+
1275
+ .ace_search_field {
1276
+ border-radius: 3px 0 0 3px;
1277
+ background-color: white;
1278
+ color: black;
1279
+ border: 1px solid #cbcbcb;
1280
+ border-right: 0 none;
1281
+ outline: 0;
1282
+ padding: 0;
1283
+ font-size: inherit;
1284
+ margin: 0;
1285
+ line-height: inherit;
1286
+ padding: 0 6px;
1287
+ min-width: 17em;
1288
+ vertical-align: top;
1289
+ min-height: 1.8em;
1290
+ box-sizing: content-box;
1291
+ }
1292
+ .ace_searchbtn {
1293
+ border: 1px solid #cbcbcb;
1294
+ line-height: inherit;
1295
+ display: inline-block;
1296
+ padding: 0 6px;
1297
+ background: #fff;
1298
+ border-right: 0 none;
1299
+ border-left: 1px solid #dcdcdc;
1300
+ cursor: pointer;
1301
+ margin: 0;
1302
+ position: relative;
1303
+ color: #666;
1304
+ }
1305
+ .ace_searchbtn:last-child {
1306
+ border-radius: 0 3px 3px 0;
1307
+ border-right: 1px solid #cbcbcb;
1308
+ }
1309
+ .ace_searchbtn:disabled {
1310
+ background: none;
1311
+ cursor: default;
1312
+ }
1313
+ .ace_searchbtn:hover {
1314
+ background-color: #eef1f6;
1315
+ }
1316
+ .ace_searchbtn.prev, .ace_searchbtn.next {
1317
+ padding: 0px 0.7em
1318
+ }
1319
+ .ace_searchbtn.prev:after, .ace_searchbtn.next:after {
1320
+ content: "";
1321
+ border: solid 2px #888;
1322
+ width: 0.5em;
1323
+ height: 0.5em;
1324
+ border-width: 2px 0 0 2px;
1325
+ display:inline-block;
1326
+ transform: rotate(-45deg);
1327
+ }
1328
+ .ace_searchbtn.next:after {
1329
+ border-width: 0 2px 2px 0 ;
1330
+ }
1331
+ .ace_searchbtn_close {
1332
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
1333
+ border-radius: 50%;
1334
+ border: 0 none;
1335
+ color: #656565;
1336
+ cursor: pointer;
1337
+ font: 16px/16px Arial;
1338
+ padding: 0;
1339
+ height: 14px;
1340
+ width: 14px;
1341
+ top: 9px;
1342
+ right: 7px;
1343
+ position: absolute;
1344
+ }
1345
+ .ace_searchbtn_close:hover {
1346
+ background-color: #656565;
1347
+ background-position: 50% 100%;
1348
+ color: white;
1349
+ }
1350
+
1351
+ .ace_button {
1352
+ margin-left: 2px;
1353
+ cursor: pointer;
1354
+ -webkit-user-select: none;
1355
+ -moz-user-select: none;
1356
+ -o-user-select: none;
1357
+ -ms-user-select: none;
1358
+ user-select: none;
1359
+ overflow: hidden;
1360
+ opacity: 0.7;
1361
+ border: 1px solid rgba(100,100,100,0.23);
1362
+ padding: 1px;
1363
+ box-sizing: border-box!important;
1364
+ color: black;
1365
+ }
1366
+
1367
+ .ace_button:hover {
1368
+ background-color: #eee;
1369
+ opacity:1;
1370
+ }
1371
+ .ace_button:active {
1372
+ background-color: #ddd;
1373
+ }
1374
+
1375
+ .ace_button.checked {
1376
+ border-color: #3399ff;
1377
+ opacity:1;
1378
+ }
1379
+
1380
+ .ace_search_options{
1381
+ margin-bottom: 3px;
1382
+ text-align: right;
1383
+ -webkit-user-select: none;
1384
+ -moz-user-select: none;
1385
+ -o-user-select: none;
1386
+ -ms-user-select: none;
1387
+ user-select: none;
1388
+ clear: both;
1389
+ }
1390
+
1391
+ .ace_search_counter {
1392
+ float: left;
1393
+ font-family: arial;
1394
+ padding: 0 8px;
1395
+ }`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(n,r,u){var d=n("../lib/dom"),f=n("../lib/lang"),b=n("../lib/event"),p=n("./searchbox-css"),g=n("../keyboard/hash_handler").HashHandler,i=n("../lib/keys"),a=n("../config").nls,h=999;d.importCssString(p,"ace_searchbox",!1);var c=function(){function m(w,k,R){this.activeInput,this.element=d.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),d.importCssString(p,"ace_searchbox",w.container),b.addListener(this.element,"touchstart",function(T){T.stopPropagation()},w)}return m.prototype.setEditor=function(w){w.searchBox=this,w.renderer.scroller.appendChild(this.element),this.editor=w},m.prototype.setSession=function(w){this.searchRange=null,this.$syncOptions(!0)},m.prototype.onEditorInput=function(){this.find(!1,!1,!0)},m.prototype.$initElements=function(w){this.searchBox=w.querySelector(".ace_search_form"),this.replaceBox=w.querySelector(".ace_replace_form"),this.searchOption=w.querySelector("[action=searchInSelection]"),this.replaceOption=w.querySelector("[action=toggleReplace]"),this.regExpOption=w.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=w.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=w.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=w.querySelector(".ace_search_counter")},m.prototype.$init=function(){var w=this.element;this.$initElements(w);var k=this;b.addListener(w,"mousedown",function(R){setTimeout(function(){k.activeInput.focus()},0),b.stopPropagation(R)}),b.addListener(w,"click",function(R){var T=R.target||R.srcElement,S=T.getAttribute("action");S&&k[S]?k[S]():k.$searchBarKb.commands[S]&&k.$searchBarKb.commands[S].exec(k),b.stopPropagation(R)}),b.addCommandKeyListener(w,function(R,T,S){var x=i.keyCodeToString(S),M=k.$searchBarKb.findKeyCommand(T,x);M&&M.exec&&(M.exec(k),b.stopEvent(R))}),this.$onChange=f.delayedCall(function(){k.find(!1,!1)}),b.addListener(this.searchInput,"input",function(){k.$onChange.schedule(20)}),b.addListener(this.searchInput,"focus",function(){k.activeInput=k.searchInput,k.searchInput.value&&k.highlight()}),b.addListener(this.replaceInput,"focus",function(){k.activeInput=k.replaceInput,k.searchInput.value&&k.highlight()})},m.prototype.setSearchRange=function(w){this.searchRange=w,w?this.searchRangeMarker=this.editor.session.addMarker(w,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},m.prototype.$syncOptions=function(w){d.setCssClass(this.replaceOption,"checked",this.searchRange),d.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",d.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),d.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),d.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var k=this.editor.getReadOnly();this.replaceOption.style.display=k?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!k?"":"none",this.find(!1,!1,w)},m.prototype.highlight=function(w){this.editor.session.highlight(w||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},m.prototype.find=function(w,k,R){var T=this.editor.find(this.searchInput.value,{skipCurrent:w,backwards:k,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:R,range:this.searchRange}),S=!T&&this.searchInput.value;d.setCssClass(this.searchBox,"ace_nomatch",S),this.editor._emit("findSearchBox",{match:!S}),this.highlight(),this.updateCounter()},m.prototype.updateCounter=function(){var w=this.editor,k=w.$search.$options.re,R=k.unicode,T=0,S=0;if(k){var x=this.searchRange?w.session.getTextRange(this.searchRange):w.getValue();w.$search.$isMultilineSearch(w.getLastSearchOptions())&&(x=x.replace(/\r\n|\r|\n/g,`
1396
+ `),w.session.doc.$autoNewLine=`
1397
+ `);var M=w.session.doc.positionToIndex(w.selection.anchor);this.searchRange&&(M-=w.session.doc.positionToIndex(this.searchRange.start));for(var O=k.lastIndex=0,F;(F=k.exec(x))&&(T++,O=F.index,O<=M&&S++,!(T>h||!F[0]&&(k.lastIndex=O+=f.skipEmptyMatch(x,O,R),O>=x.length))););}this.searchCounter.textContent=a("search-box.search-counter","$0 of $1",[S,T>h?h+"+":T])},m.prototype.findNext=function(){this.find(!0,!1)},m.prototype.findPrev=function(){this.find(!0,!0)},m.prototype.findAll=function(){var w=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),k=!w&&this.searchInput.value;d.setCssClass(this.searchBox,"ace_nomatch",k),this.editor._emit("findSearchBox",{match:!k}),this.highlight(),this.hide()},m.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},m.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},m.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},m.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.editor.off("input",this.$onEditorInput),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},m.prototype.show=function(w,k){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=k,this.editor.$search.$options.regExp&&(w=f.escapeRegExp(w)),w&&(this.searchInput.value=w),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},m.prototype.isFocused=function(){var w=document.activeElement;return w==this.searchInput||w==this.replaceInput},m}(),o=new g;o.bindKeys({"Ctrl-f|Command-f":function(m){var w=m.isReplace=!m.isReplace;m.replaceBox.style.display=w?"":"none",m.replaceOption.checked=!1,m.$syncOptions(),m.searchInput.focus()},"Ctrl-H|Command-Option-F":function(m){m.editor.getReadOnly()||(m.replaceOption.checked=!0,m.$syncOptions(),m.replaceInput.focus())},"Ctrl-G|Command-G":function(m){m.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(m){m.findPrev()},esc:function(m){setTimeout(function(){m.hide()})},Return:function(m){m.activeInput==m.replaceInput&&m.replace(),m.findNext()},"Shift-Return":function(m){m.activeInput==m.replaceInput&&m.replace(),m.findPrev()},"Alt-Return":function(m){m.activeInput==m.replaceInput&&m.replaceAll(),m.findAll()},Tab:function(m){(m.activeInput==m.replaceInput?m.searchInput:m.replaceInput).focus()}}),o.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(m){m.regExpOption.checked=!m.regExpOption.checked,m.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(m){m.caseSensitiveOption.checked=!m.caseSensitiveOption.checked,m.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(m){m.wholeWordOption.checked=!m.wholeWordOption.checked,m.$syncOptions()}},{name:"toggleReplace",exec:function(m){m.replaceOption.checked=!m.replaceOption.checked,m.$syncOptions()}},{name:"searchInSelection",exec:function(m){m.searchOption.checked=!m.searchRange,m.setSearchRange(m.searchOption.checked&&m.editor.getSelectionRange()),m.$syncOptions()}}]);var l=new g([{bindKey:"Esc",name:"closeSearchBar",exec:function(m){m.searchBox.hide()}}]);c.prototype.$searchBarKb=o,c.prototype.$closeSearchBarKb=l,r.SearchBox=c,r.Search=function(m,w){var k=m.searchBox||new c(m);k.show(m.session.getTextRange(),w)}}),function(){ace.require(["ace/ext/searchbox"],function(n){t&&(t.exports=n)})}()}(jg)),jg.exports}TS();var AS=Object.defineProperty,ES=(t,e,n)=>e in t?AS(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nc=(t,e,n)=>ES(t,typeof e!="symbol"?e+"":e,n);function zg(t,e){return function(){return t.apply(e,arguments)}}const{toString:RS}=Object.prototype,{getPrototypeOf:fh}=Object,{iterator:rc,toStringTag:Hg}=Symbol,ic=(t=>e=>{const n=RS.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Hi=t=>(t=t.toLowerCase(),e=>ic(e)===t),oc=t=>e=>typeof e===t,{isArray:ha}=Array,Qa=oc("undefined");function MS(t){return t!==null&&!Qa(t)&&t.constructor!==null&&!Qa(t.constructor)&&Zr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Ug=Hi("ArrayBuffer");function LS(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ug(t.buffer),e}const OS=oc("string"),Zr=oc("function"),qg=oc("number"),sc=t=>t!==null&&typeof t=="object",IS=t=>t===!0||t===!1,ac=t=>{if(ic(t)!=="object")return!1;const e=fh(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Hg in t)&&!(rc in t)},NS=Hi("Date"),DS=Hi("File"),FS=Hi("Blob"),PS=Hi("FileList"),BS=t=>sc(t)&&Zr(t.pipe),jS=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Zr(t.append)&&((e=ic(t))==="formdata"||e==="object"&&Zr(t.toString)&&t.toString()==="[object FormData]"))},WS=Hi("URLSearchParams"),[zS,HS,US,qS]=["ReadableStream","Request","Response","Headers"].map(Hi),VS=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Za(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,u;if(typeof t!="object"&&(t=[t]),ha(t))for(r=0,u=t.length;r<u;r++)e.call(null,t[r],r,t);else{const d=n?Object.getOwnPropertyNames(t):Object.keys(t),f=d.length;let b;for(r=0;r<f;r++)b=d[r],e.call(null,t[b],b,t)}}function Vg(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,u;for(;r-- >0;)if(u=n[r],e===u.toLowerCase())return u;return null}const Cs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Kg=t=>!Qa(t)&&t!==Cs;function gh(){const{caseless:t}=Kg(this)&&this||{},e={},n=(r,u)=>{const d=t&&Vg(e,u)||u;ac(e[d])&&ac(r)?e[d]=gh(e[d],r):ac(r)?e[d]=gh({},r):ha(r)?e[d]=r.slice():e[d]=r};for(let r=0,u=arguments.length;r<u;r++)arguments[r]&&Za(arguments[r],n);return e}const KS=(t,e,n,{allOwnKeys:r}={})=>(Za(e,(u,d)=>{n&&Zr(u)?t[d]=zg(u,n):t[d]=u},{allOwnKeys:r}),t),GS=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),YS=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},XS=(t,e,n,r)=>{let u,d,f;const b={};if(e=e||{},t==null)return e;do{for(u=Object.getOwnPropertyNames(t),d=u.length;d-- >0;)f=u[d],(!r||r(f,t,e))&&!b[f]&&(e[f]=t[f],b[f]=!0);t=n!==!1&&fh(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},QS=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},ZS=t=>{if(!t)return null;if(ha(t))return t;let e=t.length;if(!qg(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},JS=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&fh(Uint8Array)),e_=(t,e)=>{const n=(t&&t[rc]).call(t);let r;for(;(r=n.next())&&!r.done;){const u=r.value;e.call(t,u[0],u[1])}},t_=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},n_=Hi("HTMLFormElement"),r_=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),Gg=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),i_=Hi("RegExp"),Yg=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Za(n,(u,d)=>{let f;(f=e(u,d,t))!==!1&&(r[d]=f||u)}),Object.defineProperties(t,r)},o_=t=>{Yg(t,(e,n)=>{if(Zr(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Zr(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},s_=(t,e)=>{const n={},r=u=>{u.forEach(d=>{n[d]=!0})};return ha(t)?r(t):r(String(t).split(e)),n},a_=()=>{},l_=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function c_(t){return!!(t&&Zr(t.append)&&t[Hg]==="FormData"&&t[rc])}const u_=t=>{const e=new Array(10),n=(r,u)=>{if(sc(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[u]=r;const d=ha(r)?[]:{};return Za(r,(f,b)=>{const p=n(f,u+1);!Qa(p)&&(d[b]=p)}),e[u]=void 0,d}}return r};return n(t,0)},h_=Hi("AsyncFunction"),d_=t=>t&&(sc(t)||Zr(t))&&Zr(t.then)&&Zr(t.catch),Xg=((t,e)=>t?setImmediate:e?((n,r)=>(Cs.addEventListener("message",({source:u,data:d})=>{u===Cs&&d===n&&r.length&&r.shift()()},!1),u=>{r.push(u),Cs.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Zr(Cs.postMessage)),p_=typeof queueMicrotask<"u"?queueMicrotask.bind(Cs):typeof process<"u"&&process.nextTick||Xg,f_=t=>t!=null&&Zr(t[rc]),$e={isArray:ha,isArrayBuffer:Ug,isBuffer:MS,isFormData:jS,isArrayBufferView:LS,isString:OS,isNumber:qg,isBoolean:IS,isObject:sc,isPlainObject:ac,isReadableStream:zS,isRequest:HS,isResponse:US,isHeaders:qS,isUndefined:Qa,isDate:NS,isFile:DS,isBlob:FS,isRegExp:i_,isFunction:Zr,isStream:BS,isURLSearchParams:WS,isTypedArray:JS,isFileList:PS,forEach:Za,merge:gh,extend:KS,trim:VS,stripBOM:GS,inherits:YS,toFlatObject:XS,kindOf:ic,kindOfTest:Hi,endsWith:QS,toArray:ZS,forEachEntry:e_,matchAll:t_,isHTMLForm:n_,hasOwnProperty:Gg,hasOwnProp:Gg,reduceDescriptors:Yg,freezeMethods:o_,toObjectSet:s_,toCamelCase:r_,noop:a_,toFiniteNumber:l_,findKey:Vg,global:Cs,isContextDefined:Kg,isSpecCompliantForm:c_,toJSONObject:u_,isAsyncFn:h_,isThenable:d_,setImmediate:Xg,asap:p_,isIterable:f_};function Mt(t,e,n,r,u){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),r&&(this.request=r),u&&(this.response=u,this.status=u.status?u.status:null)}$e.inherits(Mt,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 Qg=Mt.prototype,Zg={};["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=>{Zg[t]={value:t}}),Object.defineProperties(Mt,Zg),Object.defineProperty(Qg,"isAxiosError",{value:!0}),Mt.from=(t,e,n,r,u,d)=>{const f=Object.create(Qg);return $e.toFlatObject(t,f,function(b){return b!==Error.prototype},b=>b!=="isAxiosError"),Mt.call(f,t.message,e,n,r,u),f.cause=t,f.name=t.name,d&&Object.assign(f,d),f};const g_=null;function mh(t){return $e.isPlainObject(t)||$e.isArray(t)}function Jg(t){return $e.endsWith(t,"[]")?t.slice(0,-2):t}function em(t,e,n){return t?t.concat(e).map(function(r,u){return r=Jg(r),!n&&u?"["+r+"]":r}).join(n?".":""):e}function m_(t){return $e.isArray(t)&&!t.some(mh)}const y_=$e.toFlatObject($e,{},null,function(t){return/^is[A-Z]/.test(t)});function lc(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(c,o){return!$e.isUndefined(o[c])});const r=n.metaTokens,u=n.visitor||g,d=n.dots,f=n.indexes,b=(n.Blob||typeof Blob<"u"&&Blob)&&$e.isSpecCompliantForm(e);if(!$e.isFunction(u))throw new TypeError("visitor must be a function");function p(c){if(c===null)return"";if($e.isDate(c))return c.toISOString();if(!b&&$e.isBlob(c))throw new Mt("Blob is not supported. Use a Buffer instead.");return $e.isArrayBuffer(c)||$e.isTypedArray(c)?b&&typeof Blob=="function"?new Blob([c]):Buffer.from(c):c}function g(c,o,l){let m=c;if(c&&!l&&typeof c=="object"){if($e.endsWith(o,"{}"))o=r?o:o.slice(0,-2),c=JSON.stringify(c);else if($e.isArray(c)&&m_(c)||($e.isFileList(c)||$e.endsWith(o,"[]"))&&(m=$e.toArray(c)))return o=Jg(o),m.forEach(function(w,k){!($e.isUndefined(w)||w===null)&&e.append(f===!0?em([o],k,d):f===null?o:o+"[]",p(w))}),!1}return mh(c)?!0:(e.append(em(l,o,d),p(c)),!1)}const i=[],a=Object.assign(y_,{defaultVisitor:g,convertValue:p,isVisitable:mh});function h(c,o){if(!$e.isUndefined(c)){if(i.indexOf(c)!==-1)throw Error("Circular reference detected in "+o.join("."));i.push(c),$e.forEach(c,function(l,m){(!($e.isUndefined(l)||l===null)&&u.call(e,l,$e.isString(m)?m.trim():m,o,a))===!0&&h(l,o?o.concat(m):[m])}),i.pop()}}if(!$e.isObject(t))throw new TypeError("data must be an object");return h(t),e}function tm(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function yh(t,e){this._pairs=[],t&&lc(t,this,e)}const nm=yh.prototype;nm.append=function(t,e){this._pairs.push([t,e])},nm.toString=function(t){const e=t?function(n){return t.call(this,n,tm)}:tm;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function v_(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function rm(t,e,n){if(!e)return t;const r=n&&n.encode||v_;$e.isFunction(n)&&(n={serialize:n});const u=n&&n.serialize;let d;if(u?d=u(e,n):d=$e.isURLSearchParams(e)?e.toString():new yh(e,n).toString(r),d){const f=t.indexOf("#");f!==-1&&(t=t.slice(0,f)),t+=(t.indexOf("?")===-1?"?":"&")+d}return t}class im{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.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 om={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},b_=typeof URLSearchParams<"u"?URLSearchParams:yh,w_=typeof FormData<"u"?FormData:null,x_=typeof Blob<"u"?Blob:null,k_={isBrowser:!0,classes:{URLSearchParams:b_,FormData:w_,Blob:x_},protocols:["http","https","file","blob","url","data"]},vh=typeof window<"u"&&typeof document<"u",bh=typeof navigator=="object"&&navigator||void 0,S_=vh&&(!bh||["ReactNative","NativeScript","NS"].indexOf(bh.product)<0),__=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",C_=vh&&window.location.href||"http://localhost",$_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:vh,hasStandardBrowserEnv:S_,hasStandardBrowserWebWorkerEnv:__,navigator:bh,origin:C_},Symbol.toStringTag,{value:"Module"})),Tr={...$_,...k_};function T_(t,e){return lc(t,new Tr.classes.URLSearchParams,Object.assign({visitor:function(n,r,u,d){return Tr.isNode&&$e.isBuffer(n)?(this.append(r,n.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)}},e))}function A_(t){return $e.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function E_(t){const e={},n=Object.keys(t);let r;const u=n.length;let d;for(r=0;r<u;r++)d=n[r],e[d]=t[d];return e}function sm(t){function e(n,r,u,d){let f=n[d++];if(f==="__proto__")return!0;const b=Number.isFinite(+f),p=d>=n.length;return f=!f&&$e.isArray(u)?u.length:f,p?($e.hasOwnProp(u,f)?u[f]=[u[f],r]:u[f]=r,!b):((!u[f]||!$e.isObject(u[f]))&&(u[f]=[]),e(n,r,u[f],d)&&$e.isArray(u[f])&&(u[f]=E_(u[f])),!b)}if($e.isFormData(t)&&$e.isFunction(t.entries)){const n={};return $e.forEachEntry(t,(r,u)=>{e(A_(r),u,n,0)}),n}return null}function R_(t,e,n){if($e.isString(t))try{return(e||JSON.parse)(t),$e.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Ja={transitional:om,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,u=$e.isObject(t);if(u&&$e.isHTMLForm(t)&&(t=new FormData(t)),$e.isFormData(t))return r?JSON.stringify(sm(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 d;if(u){if(n.indexOf("application/x-www-form-urlencoded")>-1)return T_(t,this.formSerializer).toString();if((d=$e.isFileList(t))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return lc(d?{"files[]":t}:t,f&&new f,this.formSerializer)}}return u||r?(e.setContentType("application/json",!1),R_(t)):t}],transformResponse:[function(t){const e=this.transitional||Ja.transitional,n=e&&e.forcedJSONParsing,r=this.responseType==="json";if($e.isResponse(t)||$e.isReadableStream(t))return t;if(t&&$e.isString(t)&&(n&&!this.responseType||r)){const u=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(d){if(u)throw d.name==="SyntaxError"?Mt.from(d,Mt.ERR_BAD_RESPONSE,this,null,this.response):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Tr.classes.FormData,Blob:Tr.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=>{Ja.headers[t]={}});const M_=$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"]),L_=t=>{const e={};let n,r,u;return t&&t.split(`
1398
+ `).forEach(function(d){u=d.indexOf(":"),n=d.substring(0,u).trim().toLowerCase(),r=d.substring(u+1).trim(),!(!n||e[n]&&M_[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},am=Symbol("internals");function el(t){return t&&String(t).trim().toLowerCase()}function cc(t){return t===!1||t==null?t:$e.isArray(t)?t.map(cc):String(t)}function O_(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const I_=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function wh(t,e,n,r,u){if($e.isFunction(r))return r.call(this,e,n);if(u&&(e=n),!!$e.isString(e)){if($e.isString(r))return e.indexOf(r)!==-1;if($e.isRegExp(r))return r.test(e)}}function N_(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function D_(t,e){const n=$e.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(u,d,f){return this[r].call(this,e,u,d,f)},configurable:!0})})}let Jr=class{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function u(f,b,p){const g=el(b);if(!g)throw new Error("header name must be a non-empty string");const i=$e.findKey(r,g);(!i||r[i]===void 0||p===!0||p===void 0&&r[i]!==!1)&&(r[i||b]=cc(f))}const d=(f,b)=>$e.forEach(f,(p,g)=>u(p,g,b));if($e.isPlainObject(t)||t instanceof this.constructor)d(t,e);else if($e.isString(t)&&(t=t.trim())&&!I_(t))d(L_(t),e);else if($e.isObject(t)&&$e.isIterable(t)){let f={},b,p;for(const g of t){if(!$e.isArray(g))throw TypeError("Object iterator must return a key-value pair");f[p=g[0]]=(b=f[p])?$e.isArray(b)?[...b,g[1]]:[b,g[1]]:g[1]}d(f,e)}else t!=null&&u(e,t,n);return this}get(t,e){if(t=el(t),t){const n=$e.findKey(this,t);if(n){const r=this[n];if(!e)return r;if(e===!0)return O_(r);if($e.isFunction(e))return e.call(this,r,n);if($e.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=el(t),t){const n=$e.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||wh(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let r=!1;function u(d){if(d=el(d),d){const f=$e.findKey(n,d);f&&(!e||wh(n,n[f],f,e))&&(delete n[f],r=!0)}}return $e.isArray(t)?t.forEach(u):u(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const u=e[n];(!t||wh(this,this[u],u,t,!0))&&(delete this[u],r=!0)}return r}normalize(t){const e=this,n={};return $e.forEach(this,(r,u)=>{const d=$e.findKey(n,u);if(d){e[d]=cc(r),delete e[u];return}const f=t?N_(u):String(u).trim();f!==u&&delete e[u],e[f]=cc(r),n[f]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return $e.forEach(this,(n,r)=>{n!=null&&n!==!1&&(e[r]=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(`
1399
+ `)}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(r=>n.set(r)),n}static accessor(t){const e=(this[am]=this[am]={accessors:{}}).accessors,n=this.prototype;function r(u){const d=el(u);e[d]||(D_(n,u),e[d]=!0)}return $e.isArray(t)?t.forEach(r):r(t),this}};Jr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$e.reduceDescriptors(Jr.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),$e.freezeMethods(Jr);function xh(t,e){const n=this||Ja,r=e||n,u=Jr.from(r.headers);let d=r.data;return $e.forEach(t,function(f){d=f.call(n,d,u.normalize(),e?e.status:void 0)}),u.normalize(),d}function lm(t){return!!(t&&t.__CANCEL__)}function da(t,e,n){Mt.call(this,t??"canceled",Mt.ERR_CANCELED,e,n),this.name="CanceledError"}$e.inherits(da,Mt,{__CANCEL__:!0});function cm(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Mt("Request failed with status code "+n.status,[Mt.ERR_BAD_REQUEST,Mt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function F_(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function P_(t,e){t=t||10;const n=new Array(t),r=new Array(t);let u=0,d=0,f;return e=e!==void 0?e:1e3,function(b){const p=Date.now(),g=r[d];f||(f=p),n[u]=b,r[u]=p;let i=d,a=0;for(;i!==u;)a+=n[i++],i=i%t;if(u=(u+1)%t,u===d&&(d=(d+1)%t),p-f<e)return;const h=g&&p-g;return h?Math.round(a*1e3/h):void 0}}function B_(t,e){let n=0,r=1e3/e,u,d;const f=(b,p=Date.now())=>{n=p,u=null,d&&(clearTimeout(d),d=null),t.apply(null,b)};return[(...b)=>{const p=Date.now(),g=p-n;g>=r?f(b,p):(u=b,d||(d=setTimeout(()=>{d=null,f(u)},r-g)))},()=>u&&f(u)]}const uc=(t,e,n=3)=>{let r=0;const u=P_(50,250);return B_(d=>{const f=d.loaded,b=d.lengthComputable?d.total:void 0,p=f-r,g=u(p),i=f<=b;r=f;const a={loaded:f,total:b,progress:b?f/b:void 0,bytes:p,rate:g||void 0,estimated:g&&b&&i?(b-f)/g:void 0,event:d,lengthComputable:b!=null,[e?"download":"upload"]:!0};t(a)},n)},um=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},hm=t=>(...e)=>$e.asap(()=>t(...e)),j_=Tr.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Tr.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Tr.origin),Tr.navigator&&/(msie|trident)/i.test(Tr.navigator.userAgent)):()=>!0,W_=Tr.hasStandardBrowserEnv?{write(t,e,n,r,u,d){const f=[t+"="+encodeURIComponent(e)];$e.isNumber(n)&&f.push("expires="+new Date(n).toGMTString()),$e.isString(r)&&f.push("path="+r),$e.isString(u)&&f.push("domain="+u),d===!0&&f.push("secure"),document.cookie=f.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 z_(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function H_(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function dm(t,e,n){let r=!z_(e);return t&&(r||n==!1)?H_(t,e):e}const pm=t=>t instanceof Jr?{...t}:t;function $s(t,e){e=e||{};const n={};function r(g,i,a,h){return $e.isPlainObject(g)&&$e.isPlainObject(i)?$e.merge.call({caseless:h},g,i):$e.isPlainObject(i)?$e.merge({},i):$e.isArray(i)?i.slice():i}function u(g,i,a,h){if($e.isUndefined(i)){if(!$e.isUndefined(g))return r(void 0,g,a,h)}else return r(g,i,a,h)}function d(g,i){if(!$e.isUndefined(i))return r(void 0,i)}function f(g,i){if($e.isUndefined(i)){if(!$e.isUndefined(g))return r(void 0,g)}else return r(void 0,i)}function b(g,i,a){if(a in e)return r(g,i);if(a in t)return r(void 0,g)}const p={url:d,method:d,data:d,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,withXSRFToken:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,responseEncoding:f,validateStatus:b,headers:(g,i,a)=>u(pm(g),pm(i),a,!0)};return $e.forEach(Object.keys(Object.assign({},t,e)),function(g){const i=p[g]||u,a=i(t[g],e[g],g);$e.isUndefined(a)&&i!==b||(n[g]=a)}),n}const fm=t=>{const e=$s({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:u,xsrfCookieName:d,headers:f,auth:b}=e;e.headers=f=Jr.from(f),e.url=rm(dm(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),b&&f.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):"")));let p;if($e.isFormData(n)){if(Tr.hasStandardBrowserEnv||Tr.hasStandardBrowserWebWorkerEnv)f.setContentType(void 0);else if((p=f.getContentType())!==!1){const[g,...i]=p?p.split(";").map(a=>a.trim()).filter(Boolean):[];f.setContentType([g||"multipart/form-data",...i].join("; "))}}if(Tr.hasStandardBrowserEnv&&(r&&$e.isFunction(r)&&(r=r(e)),r||r!==!1&&j_(e.url))){const g=u&&d&&W_.read(d);g&&f.set(u,g)}return e},U_=typeof XMLHttpRequest<"u",q_=U_&&function(t){return new Promise(function(e,n){const r=fm(t);let u=r.data;const d=Jr.from(r.headers).normalize();let{responseType:f,onUploadProgress:b,onDownloadProgress:p}=r,g,i,a,h,c;function o(){h&&h(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let l=new XMLHttpRequest;l.open(r.method.toUpperCase(),r.url,!0),l.timeout=r.timeout;function m(){if(!l)return;const k=Jr.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),R={data:!f||f==="text"||f==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:k,config:t,request:l};cm(function(T){e(T),o()},function(T){n(T),o()},R),l=null}"onloadend"in l?l.onloadend=m:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(m)},l.onabort=function(){l&&(n(new Mt("Request aborted",Mt.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new Mt("Network Error",Mt.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let k=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const R=r.transitional||om;r.timeoutErrorMessage&&(k=r.timeoutErrorMessage),n(new Mt(k,R.clarifyTimeoutError?Mt.ETIMEDOUT:Mt.ECONNABORTED,t,l)),l=null},u===void 0&&d.setContentType(null),"setRequestHeader"in l&&$e.forEach(d.toJSON(),function(k,R){l.setRequestHeader(R,k)}),$e.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),f&&f!=="json"&&(l.responseType=r.responseType),p&&([a,c]=uc(p,!0),l.addEventListener("progress",a)),b&&l.upload&&([i,h]=uc(b),l.upload.addEventListener("progress",i),l.upload.addEventListener("loadend",h)),(r.cancelToken||r.signal)&&(g=k=>{l&&(n(!k||k.type?new da(null,t,l):k),l.abort(),l=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const w=F_(r.url);if(w&&Tr.protocols.indexOf(w)===-1){n(new Mt("Unsupported protocol "+w+":",Mt.ERR_BAD_REQUEST,t));return}l.send(u||null)})},V_=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,u;const d=function(g){if(!u){u=!0,b();const i=g instanceof Error?g:this.reason;r.abort(i instanceof Mt?i:new da(i instanceof Error?i.message:i))}};let f=e&&setTimeout(()=>{f=null,d(new Mt(`timeout ${e} of ms exceeded`,Mt.ETIMEDOUT))},e);const b=()=>{t&&(f&&clearTimeout(f),f=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),t=null)};t.forEach(g=>g.addEventListener("abort",d));const{signal:p}=r;return p.unsubscribe=()=>$e.asap(b),p}},K_=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,u;for(;r<n;)u=r+e,yield t.slice(r,u),r=u},G_=async function*(t,e){for await(const n of Y_(t))yield*K_(n,e)},Y_=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},gm=(t,e,n,r)=>{const u=G_(t,e);let d=0,f,b=p=>{f||(f=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:g,value:i}=await u.next();if(g){b(),p.close();return}let a=i.byteLength;if(n){let h=d+=a;n(h)}p.enqueue(new Uint8Array(i))}catch(g){throw b(g),g}},cancel(p){return b(p),u.return()}},{highWaterMark:2})},hc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",mm=hc&&typeof ReadableStream=="function",X_=hc&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),ym=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Q_=mm&&ym(()=>{let t=!1;const e=new Request(Tr.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),vm=64*1024,kh=mm&&ym(()=>$e.isReadableStream(new Response("").body)),dc={stream:kh&&(t=>t.body)};hc&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!dc[e]&&(dc[e]=$e.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Mt(`Response type '${e}' is not supported`,Mt.ERR_NOT_SUPPORT,r)})})})(new Response);const Z_=async t=>{if(t==null)return 0;if($e.isBlob(t))return t.size;if($e.isSpecCompliantForm(t))return(await new Request(Tr.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 X_(t)).byteLength},J_=async(t,e)=>$e.toFiniteNumber(t.getContentLength())??Z_(e),eC=hc&&(async t=>{let{url:e,method:n,data:r,signal:u,cancelToken:d,timeout:f,onDownloadProgress:b,onUploadProgress:p,responseType:g,headers:i,withCredentials:a="same-origin",fetchOptions:h}=fm(t);g=g?(g+"").toLowerCase():"text";let c=V_([u,d&&d.toAbortSignal()],f),o;const l=c&&c.unsubscribe&&(()=>{c.unsubscribe()});let m;try{if(p&&Q_&&n!=="get"&&n!=="head"&&(m=await J_(i,r))!==0){let S=new Request(e,{method:"POST",body:r,duplex:"half"}),x;if($e.isFormData(r)&&(x=S.headers.get("content-type"))&&i.setContentType(x),S.body){const[M,O]=um(m,uc(hm(p)));r=gm(S.body,vm,M,O)}}$e.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;o=new Request(e,{...h,signal:c,method:n.toUpperCase(),headers:i.normalize().toJSON(),body:r,duplex:"half",credentials:w?a:void 0});let k=await fetch(o);const R=kh&&(g==="stream"||g==="response");if(kh&&(b||R&&l)){const S={};["status","statusText","headers"].forEach(F=>{S[F]=k[F]});const x=$e.toFiniteNumber(k.headers.get("content-length")),[M,O]=b&&um(x,uc(hm(b),!0))||[];k=new Response(gm(k.body,vm,M,()=>{O&&O(),l&&l()}),S)}g=g||"text";let T=await dc[$e.findKey(dc,g)||"text"](k,t);return!R&&l&&l(),await new Promise((S,x)=>{cm(S,x,{data:T,headers:Jr.from(k.headers),status:k.status,statusText:k.statusText,config:t,request:o})})}catch(w){throw l&&l(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new Mt("Network Error",Mt.ERR_NETWORK,t,o),{cause:w.cause||w}):Mt.from(w,w&&w.code,t,o)}}),Sh={http:g_,xhr:q_,fetch:eC};$e.forEach(Sh,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const bm=t=>`- ${t}`,tC=t=>$e.isFunction(t)||t===null||t===!1,wm={getAdapter:t=>{t=$e.isArray(t)?t:[t];const{length:e}=t;let n,r;const u={};for(let d=0;d<e;d++){n=t[d];let f;if(r=n,!tC(n)&&(r=Sh[(f=String(n)).toLowerCase()],r===void 0))throw new Mt(`Unknown adapter '${f}'`);if(r)break;u[f||"#"+d]=r}if(!r){const d=Object.entries(u).map(([b,p])=>`adapter ${b} `+(p===!1?"is not supported by the environment":"is not available in the build"));let f=e?d.length>1?`since :
1400
+ `+d.map(bm).join(`
1401
+ `):" "+bm(d[0]):"as no adapter specified";throw new Mt("There is no suitable adapter to dispatch the request "+f,"ERR_NOT_SUPPORT")}return r},adapters:Sh};function _h(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new da(null,t)}function xm(t){return _h(t),t.headers=Jr.from(t.headers),t.data=xh.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),wm.getAdapter(t.adapter||Ja.adapter)(t).then(function(e){return _h(t),e.data=xh.call(t,t.transformResponse,e),e.headers=Jr.from(e.headers),e},function(e){return lm(e)||(_h(t),e&&e.response&&(e.response.data=xh.call(t,t.transformResponse,e.response),e.response.headers=Jr.from(e.response.headers))),Promise.reject(e)})}const km="1.9.0",pc={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{pc[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const Sm={};pc.transitional=function(t,e,n){function r(u,d){return"[Axios v"+km+"] Transitional option '"+u+"'"+d+(n?". "+n:"")}return(u,d,f)=>{if(t===!1)throw new Mt(r(d," has been removed"+(e?" in "+e:"")),Mt.ERR_DEPRECATED);return e&&!Sm[d]&&(Sm[d]=!0,console.warn(r(d," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(u,d,f):!0}},pc.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function nC(t,e,n){if(typeof t!="object")throw new Mt("options must be an object",Mt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let u=r.length;for(;u-- >0;){const d=r[u],f=e[d];if(f){const b=t[d],p=b===void 0||f(b,d,t);if(p!==!0)throw new Mt("option "+d+" must be "+p,Mt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Mt("Unknown option "+d,Mt.ERR_BAD_OPTION)}}const fc={assertOptions:nC,validators:pc},lo=fc.validators;let Ts=class{constructor(t){this.defaults=t||{},this.interceptors={request:new im,response:new im}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const u=r.stack?r.stack.replace(/^.+\n/,""):"";try{n.stack?u&&!String(n.stack).endsWith(u.replace(/^.+\n.+\n/,""))&&(n.stack+=`
1402
+ `+u):n.stack=u}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=$s(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:u}=e;n!==void 0&&fc.assertOptions(n,{silentJSONParsing:lo.transitional(lo.boolean),forcedJSONParsing:lo.transitional(lo.boolean),clarifyTimeoutError:lo.transitional(lo.boolean)},!1),r!=null&&($e.isFunction(r)?e.paramsSerializer={serialize:r}:fc.assertOptions(r,{encode:lo.function,serialize:lo.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),fc.assertOptions(e,{baseUrl:lo.spelling("baseURL"),withXsrfToken:lo.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let d=u&&$e.merge(u.common,u[e.method]);u&&$e.forEach(["delete","get","head","post","put","patch","common"],c=>{delete u[c]}),e.headers=Jr.concat(d,u);const f=[];let b=!0;this.interceptors.request.forEach(function(c){typeof c.runWhen=="function"&&c.runWhen(e)===!1||(b=b&&c.synchronous,f.unshift(c.fulfilled,c.rejected))});const p=[];this.interceptors.response.forEach(function(c){p.push(c.fulfilled,c.rejected)});let g,i=0,a;if(!b){const c=[xm.bind(this),void 0];for(c.unshift.apply(c,f),c.push.apply(c,p),a=c.length,g=Promise.resolve(e);i<a;)g=g.then(c[i++],c[i++]);return g}a=f.length;let h=e;for(i=0;i<a;){const c=f[i++],o=f[i++];try{h=c(h)}catch(l){o.call(this,l);break}}try{g=xm.call(this,h)}catch(c){return Promise.reject(c)}for(i=0,a=p.length;i<a;)g=g.then(p[i++],p[i++]);return g}getUri(t){t=$s(this.defaults,t);const e=dm(t.baseURL,t.url,t.allowAbsoluteUrls);return rm(e,t.params,t.paramsSerializer)}};$e.forEach(["delete","get","head","options"],function(t){Ts.prototype[t]=function(e,n){return this.request($s(n||{},{method:t,url:e,data:(n||{}).data}))}}),$e.forEach(["post","put","patch"],function(t){function e(n){return function(r,u,d){return this.request($s(d||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:u}))}}Ts.prototype[t]=e(),Ts.prototype[t+"Form"]=e(!0)});let rC=class Fx{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(u){n=u});const r=this;this.promise.then(u=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](u);r._listeners=null}),this.promise.then=u=>{let d;const f=new Promise(b=>{r.subscribe(b),d=b}).then(u);return f.cancel=function(){r.unsubscribe(d)},f},e(function(u,d,f){r.reason||(r.reason=new da(u,d,f),n(r.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=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Fx(function(n){e=n}),cancel:e}}};function iC(t){return function(e){return t.apply(null,e)}}function oC(t){return $e.isObject(t)&&t.isAxiosError===!0}const Ch={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(Ch).forEach(([t,e])=>{Ch[e]=t});function _m(t){const e=new Ts(t),n=zg(Ts.prototype.request,e);return $e.extend(n,Ts.prototype,e,{allOwnKeys:!0}),$e.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return _m($s(t,r))},n}const Un=_m(Ja);Un.Axios=Ts,Un.CanceledError=da,Un.CancelToken=rC,Un.isCancel=lm,Un.VERSION=km,Un.toFormData=lc,Un.AxiosError=Mt,Un.Cancel=Un.CanceledError,Un.all=function(t){return Promise.all(t)},Un.spread=iC,Un.isAxiosError=oC,Un.mergeConfig=$s,Un.AxiosHeaders=Jr,Un.formToJSON=t=>sm($e.isHTMLForm(t)?new FormData(t):t),Un.getAdapter=wm.getAdapter,Un.HttpStatusCode=Ch,Un.default=Un;const{Axios:BB,AxiosError:jB,CanceledError:WB,isCancel:zB,CancelToken:HB,VERSION:UB,all:qB,Cancel:VB,isAxiosError:KB,spread:GB,toFormData:YB,AxiosHeaders:XB,HttpStatusCode:QB,formToJSON:ZB,getAdapter:JB,mergeConfig:ej}=Un,$h=Un.create({baseURL:location.origin,timeout:6e4,params:{}});$h.interceptors.response.use(t=>t,t=>{var e,n,r,u,d,f,b,p,g,i,a;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(o){o&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let h=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(h+=`${t.response.statusText} `),(r=(n=t.response)==null?void 0:n.config)!=null&&r.data&&(h+=`${t.response.config.data} `),(d=(u=t.response)==null?void 0:u.data)!=null&&d.message?h+=`${t.response.data.message}`:(b=(f=t.response)==null?void 0:f.data)!=null&&b.exception?h+=`${t.response.data.exception}`:(i=(g=(p=t.response)==null?void 0:p.data)==null?void 0:g.error)!=null&&i.message?(t.response.data.error.class&&(h+=`${t.response.data.error.class} `),h+=`${t.response.data.error.message}`):h+=`${(a=t.response)==null?void 0:a.data}`;const{$cosmosNotify:c}=window;throw c&&c.serious({title:"Network error",body:h}),t}else throw t});const gc=async function(t,e,{data:n,params:r={},headers:u,noAuth:d=!1,noScope:f=!1,onUploadProgress:b=!1}={}){if(!d){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}u.Authorization=localStorage.openc3Token}return u.manual=!0,!f&&!r.scope&&(r.scope=window.openc3Scope),$h({method:t,url:e,data:n,params:r,headers:u,onUploadProgress:b})},Th={Accept:"application/json"},Cm={...Th,"Content-Type":"application/json"},tj=Wi("F",{get:function(t,{params:e,headers:n=Th,noScope:r,noAuth:u,onUploadProgress:d}={}){return gc("get",t,{params:e,headers:n,noScope:r,noAuth:u,onUploadProgress:d})},put:function(t,{data:e,params:n,headers:r=Cm,noScope:u,noAuth:d,onUploadProgress:f}={}){return gc("put",t,{data:e,params:n,headers:r,noScope:u,noAuth:d,onUploadProgress:f})},post:function(t,{data:e,params:n,headers:r=Cm,noScope:u,noAuth:d,onUploadProgress:f}={}){return gc("post",t,{data:e,params:n,headers:r,noScope:u,noAuth:d,onUploadProgress:f})},delete:function(t,{params:e,headers:n=Th,noScope:r,noAuth:u,onUploadProgress:d}={}){return gc("delete",t,{params:e,headers:n,noScope:r,noAuth:u,onUploadProgress:d})}});let mc=()=>({emit(t,...e){for(let n=this.events[t]||[],r=0,u=n.length;r<u;r++)n[r](...e)},events:{},on(t,e){var n;return((n=this.events)[t]||(n[t]=[])).push(e),()=>{var r;this.events[t]=(r=this.events[t])==null?void 0:r.filter(u=>e!==u)}}});class tl extends Error{constructor(e,n){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=n,this.name="ReasonError"}}class Ah extends tl{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class sC extends tl{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class Ui extends tl{constructor(e,n){n?super(e,n):super("Disconnected",e),this.name="DisconnectedError"}}class aC extends Ui{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function $m(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 lC{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:r,info:u})=>(n[r]=u,n),{})}}const As=Symbol("state");class Tm{constructor(e={}){this.emitter=mc(),this.params=Object.freeze(e),this.presence=new lC(this),this.initialConnect=!0,this[As]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=$m({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[As]}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[As]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[As]="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[As]="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[As]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[As]="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 r=this.receiver?this.receiver.logger:null;r&&r.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 r=this.emitter.on(e,(...u)=>{r(),n(...u)});return r}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 r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(u=>u()),e()})),r.push(this.on("close",u=>{r.forEach(d=>d()),n(u||new tl("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class cC{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(r=>r[e](n[0])):this.channels.forEach(r=>r[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,r={promise:new Promise(d=>{n=d}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),n(r)},canceled:!1,acquired:!1},u=this._pendingTop;return this._pendings.push(r),u&&await u.promise,this.gvl&&await this.gvl.acquire(r,e),r.acquired=!0,r}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 uC{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 hC{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new uC),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:n,unsubscribe:r}){let u=this._subscriptions[e]=new cC(e);return u.remoteId=this._localToRemote[e],u.subscriber=n,u.unsubscriber=r,u.gvl=this.glv,u}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,n){this._localToRemote[e]=n;let r=this.get(e);r&&(r.remoteId=n)}}class dC{constructor(e={}){this.subscriptions=new hC(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 r=n.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(e)}transmit(e,n,r){let u=this._remoteToLocal[e];if(!u){this._pendingMessages.push([e,n,r]);return}let d=this.subscriptions.get(u);d&&d.channels.forEach(f=>{f.receive(n,r)})}notify(e,n,r){let u=this._remoteToLocal[e];if(!u)return;let d=this.subscriptions.get(u);d&&d.channels.forEach(f=>f.emit(n,r))}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 r of this._pendingMessages)r[0]===e?this.transmit(r[0],r[1],r[2]):n.push(r);this._pendingMessages=n}}const Am={debug:0,info:1,warn:2,error:3};class Em{constructor(e){this.level=e||"warn"}log(e,n,r){Am[e]<Am[this.level]||this.writeLogEntry(e,n,r)}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 nl extends Em{writeLogEntry(){}}class pC{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let fC=0;class Rm{constructor(e={}){let{logger:n}=e;this.logger=n||new nl,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,n){let r={channel:e};n&&Object.assign(r,n);let u=$m(r);if(this.pendingUnsubscriptions[u]){let f=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${f}`,u),new Promise(b=>{setTimeout(()=>{b(this.subscribe(e,n))},f)})}if(this.pendingSubscriptions[u])return this.logger.warn("subscription is already pending, skipping",u),Promise.reject(Error("Already subscribing"));let d=this.subscribeRetryInterval;return new Promise((f,b)=>{let p=++fC;this.pendingSubscriptions[u]={resolve:f,reject:b,id:p},this.cable.send(this.buildSubscribeRequest(u)),this.maybeRetrySubscribe(p,u,d)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,n,r){setTimeout(()=>{let u=this.pendingSubscriptions[n];u&&u.id===e&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,n),this.cable.send(this.buildSubscribeRequest(n)),this.maybeExpireSubscribe(e,n,r))},r)}maybeExpireSubscribe(e,n,r){setTimeout(()=>{let u=this.pendingSubscriptions[n];u&&u.id===e&&(delete this.pendingSubscriptions[n],u.reject(new sC(`Haven't received subscription ack in ${r*2}ms for ${n}`)))},r)}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,r){return n==="$whisper"?this.whisper(e,r):(r||(r={}),r.action=n,this.cable.send({command:"message",identifier:e,data:JSON.stringify(r)}),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:r,message:u,reason:d,reconnect:f}=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 Ui(d);this.reset(b),f===!1?this.cable.closed(b):this.cable.disconnected(b);return}if(n==="confirm_subscription"){let b=this.pendingSubscriptions[r];if(!b){this.logger.error("subscription not found, unsubscribing",{type:n,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],b.resolve(r)}if(n==="reject_subscription"){let b=this.pendingSubscriptions[r];return b?(delete this.pendingSubscriptions[r],b.reject(new Ah)):this.logger.error("subscription not found",{type:n,identifier:r})}if(u)return{identifier:r,message:u};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 Mm=()=>Date.now()/1e3|0;class gC extends Rm{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=Mm()),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:r,message:u}=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[r]||(this.subscriptionStreams[r]=new Set),super.receive(e);if(n==="ping")return this.restoreSince&&(this.restoreSince=Mm()),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",r);return}if(n==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",r);return}if(n==="welcome"){if(this.disableSessionRecovery||(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),e.restored){let d=e.restored_ids||Object.keys(this.subscriptionStreams);for(let f of d)this.cable.send({identifier:f,command:"history",history:this.historyRequestFor(f)}),this.presenceInfo[f]&&this.cable.send({identifier:f,command:"join",presence:this.presenceInfo[f]});return this.cable.restored(d)}return this.cable.connected(this.sessionId)}if(n==="presence"){let d=u.type;if(d==="info"){let f=this.pendingPresence[r];f&&(delete this.pendingPresence[r],f.resolve(u))}else if(d==="error"){let f=this.pendingPresence[r];f&&(delete this.pendingPresence[r],f.reject(new Error("failed to retrieve presence")))}return{type:n,identifier:r,message:u}}if(u){let d=this.trackStreamPosition(r,e.stream_id,e.epoch,e.offset);return{identifier:r,message:u,meta:d}}this.logger.warn(`unknown message type: ${n}`,{message:e})}perform(e,n,r){switch(n){case"$presence:join":return this.join(e,r);case"$presence:leave":return this.leave(e,r);case"$presence:info":return this.presence(e,r)}return super.perform(e,n,r)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let n=super.buildSubscribeRequest(e),r=this.historyRequestFor(e);r&&(n.history=r,this.pendingHistory[e]=!0);let u=this.presenceInfo[e];return u&&(n.presence=u),n}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let n={},r=!1;if(this.subscriptionStreams[e])for(let u of this.subscriptionStreams[e]){let d=this.streamsPositions[u];d&&(r=!0,n[u]=d)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:n}}trackStreamPosition(e,n,r,u){if(!(!n||!r))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(n),this.streamsPositions[n]={epoch:r,offset:u},{stream:n,epoch:r,offset:u}}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((r,u)=>{this.pendingPresence[e]={resolve:r,reject:u},this.cable.send({command:"presence",identifier:e,data:n})})}}class mC extends tl{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Eh extends Tm{constructor(e,n){super(n),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}nc(Eh,"identifier","__ghost__");const yC="$pubsub";class Rh extends Tm{async perform(e,n){if(e.startsWith("$"))return super.perform(e,n);throw Error("not implemented")}}nc(Rh,"identifier",yC);const Es=Symbol("state");let vC=class{constructor({transport:t,protocol:e,encoder:n,logger:r,lazy:u,hubOptions:d,performFailures:f,transportConfigurator:b}){this.emitter=mc(),this.transport=t,this.encoder=n,this.logger=r||new nl,this.protocol=e,this.performFailures=f||"throw",this.protocol.attached(this),this.hub=new dC(d||{}),this[Es]="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,u===!1&&this.connect().catch(()=>{})}get state(){return this[Es]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[Es]="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[Es]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new Ui("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[Es]="connected",this.hub.subscriptions.all().forEach(r=>{t&&r.remoteId&&t.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new Ui("recovery_failed")),this._resubscribe(r))});let 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 Ui(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[Es]="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 Ui?t:new Ui(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[Es]="closed";let n=e||new Ui("cable_closed");this.hub.subscriptions.all().forEach(r=>r.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:r,identifier:u,message:d,meta:f}=n;r?this.hub.notify(u,r,d):this.hub.transmit(u,d,f)}}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 Rh({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new Rh({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let n,r;return typeof t=="string"&&(r=t,t=Eh),n=r?new t(r,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:r=>this._subscribe(r,t.channelId,t.params),unsubscribe:r=>this._unsubscribe(r)});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 r=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let u=await t.acquire("subscribed");if(u.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),u.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),u.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),u.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),t.notify("connected"),u.release();return}let d={identifier:e,params:n};this.logger.debug("subscribing",d);try{let f=await this.protocol.subscribe(e,n);this.hub.subscribe(r,f),this.logger.debug("subscribed",{...d,remoteId:f}),t.notify("connected")}catch(f){if(f){if(f instanceof Ah&&this.logger.warn("rejected",d),f instanceof Ui){this.logger.debug("disconnected during subscription; will retry on connect",d),u.release();return}this.logger.error("failed to subscribe",{error:f,...d})}t.close(f),this.hub.unsubscribe(r)}u.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 r=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),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(r),this.logger.debug("unsubscribed remotely",{id:e})}catch(u){u&&(u instanceof Ui?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:u}):this.logger.error("unsubscribe failed",{id:e,error:u}))}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(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(t,e,n){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new mC;let r=this.hub.subscriptions.get(t);if(!r)throw Error(`Subscription not found: ${t}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let u=r.remoteId,d={id:u,action:e,payload:n};this.logger.debug("perform",d);try{let f=await this.protocol.perform(u,e,n);return f&&this.logger.debug("perform result",{message:f,request:d}),f}catch(f){throw this.logger.error("perform failed",{error:f,request:d}),f}}on(t,e){return this.emitter.on(t,e)}once(t,e){let n=this.emitter.on(t,(...r)=>{n(),e(...r)});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(r=>r()),t()})),n.push(this.on("close",r=>{n.forEach(u=>u()),e(r)})),n.push(this.on("disconnect",r=>{n.forEach(u=>u()),e(r)}))}),this._pendingConnect)}};const bC={maxMissingPings:2,maxReconnectAttempts:1/0},pa=()=>Date.now(),Lm=(t,e)=>{e=e||{};let{backoffRate:n,jitterRatio:r,maxInterval:u}=e;return n=n||2,r===void 0&&(r=.5),d=>{let f=t*n**d,b=f*n,p=f+(b-f)*Math.random(),g=2*(Math.random()-.5)*r;return p=p*(1+g),u&&u<p&&(p=u),p}};let Om=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},bC,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 nl,this.state="pending_connect",this.attempts=0,this.disconnectedAt=pa()}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=pa(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=pa(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=pa(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=pa()})),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=pa()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new aC))}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 wC{constructor(e,n={}){this.transports=e,this.transport=null,this.emitter=mc(),this.unbind=[],this.logger=n.logger||new nl}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(r){this.logger.debug(`Failed to connect via ${n.displayName()}: ${r.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(r=>{r.setParam(e,n)})}setToken(e,n){this.transports.forEach(r=>{r.setToken(e,n)})}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...u)=>{r(),n(...u)});return r}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 xC{constructor(e,n={}){this.url=e;let r=n.websocketImplementation;if(r)this.Impl=r;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=mc();let{format:u,subprotocol:d,authStrategy:f}=n;this.format=u||"text",this.connectionOptions=n.websocketOptions,this.authStrategy=f||"param",this.authProtocol="",this.subprotocol=d}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,r)=>{let u=[];u.push(this.once("open",()=>{u.forEach(d=>d()),n()})),u.push(this.once("close",()=>{u.forEach(d=>d()),r(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,n){let r=new URL(this.url);r.searchParams.set(e,n);let u=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(u)}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 r=`x-${n}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(u=>u.toLowerCase()===r)||r,this.connectionOptions.headers[r]=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 r=this.emitter.on(e,(...u)=>{r(),n(...u)});return r}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 Im={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function kC(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({},Im,e);let{protocol:n,websocketImplementation:r,websocketFormat:u,websocketOptions:d,websocketAuthStrategy:f,fallbacks:b,logLevel:p,logger:g,transport:i,encoder:a,lazy:h,monitor:c,pingInterval:o,reconnectStrategy:l,maxMissingPings:m,maxReconnectAttempts:w,subprotocol:k,tokenRefresher:R,historyTimestamp:T,protocolOptions:S,concurrentSubscribes:x,performFailures:M,transportConfigurator:O,auth:F}=e;if(g=g||new nl(p),typeof n=="string"){k=k||n;let P=n.substring(0,n.lastIndexOf("-")),I=n.substring(n.lastIndexOf("-")+1);if(S=S||{},P==="actioncable-v1")n=new Rm({logger:g,...S});else if(P==="actioncable-v1-ext")n=new gC({logger:g,historyTimestamp:T,...S});else throw Error(`Protocol is not supported yet: ${n}`);if(I==="json")a=a||new pC,u=u||"text";else if(I==="msgpack"){if(u="binary",!a)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(I==="protobuf"){if(u=u||"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");i=i||new xC(t,{websocketImplementation:r,websocketOptions:d,subprotocol:k,authStrategy:f,format:u}),b&&(i=new wC([i,...b],{logger:g})),F&&F.token&&i.setToken(F.token,F.param||"jid"),l=l||Lm(o),c!==!1&&(c=c||new Om({pingInterval:o,reconnectStrategy:l,maxMissingPings:m,maxReconnectAttempts:w,logger:g}));let L={concurrentSubscribes:x},H=new vC({protocol:n,transport:i,encoder:a,logger:g,lazy:h,hubOptions:L,performFailures:M,transportConfigurator:O});return c&&(c.watch(H),H.monitor=c),R&&SC(H,async()=>{try{await R(i)}catch(P){return g.error("Failed to refresh authentication token: "+P),!1}return H.connect().catch(()=>{}),!0}),H}function SC(t,e){let n=!1;t.on("connect",()=>n=!1),t.on("close",async r=>{if(r){if(n){t.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(n=!0,await e())}})}class _C{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 CC extends Eh{constructor(e,n,r){super(e,n),this.subscription=new _C(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:u})=>this.subscription.notify("connected",{reconnected:u})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",u=>this.subscription.notify("received",u)),this.on("close",u=>{u&&u instanceof Ah?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class $C{constructor(e){this.cable=e}create(e,n){let r,u;typeof e=="object"?(r=e.channel,delete e.channel,u=e):(r=e,u={});let d=new CC(r,u,n);return d.subscription.notify("initialized"),this.cable.subscribe(d),d.subscription}findAll(e){return this.cable.hub.channels.filter(n=>n.identifier===e).map(n=>n.subscription)}}class TC{constructor(e){this.cable=e,this.subscriptions=new $C(e)}}class AC extends Em{writeLogEntry(e,n,r){r?console[e](n,r):console[e](n)}}class EC extends Om{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=u=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:u})},r=()=>this.disconnect(new Ui("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",r,!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",r,!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 RC=["cable","action-cable"],MC="/cable",yc=(t,e)=>{for(let n of RC){let r=t.head.querySelector(`meta[name='${n}-${e}']`);if(r)return r.getAttribute("content")}},Nm=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,LC=()=>{if(typeof document<"u"&&document.head){let t=yc(document,"url");if(t)return Nm(t)}return Nm(MC)},OC=()=>{if(typeof document<"u"&&document.head){let t=yc(document,"history-timestamp");if(t)return t|0}},IC=()=>{if(typeof document<"u"&&document.head)return yc(document,"token")},NC=()=>{if(typeof document<"u"&&document.head)return yc(document,"token-param")};function DC(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||LC(),e=e||{},e.historyTimestamp||(e.historyTimestamp=OC());let n=IC();if(n){let g=NC();e.auth=Object.assign({token:n,param:g},e.auth||{})}e=Object.assign({},Im,e);let{logLevel:r,logger:u,pingInterval:d,reconnectStrategy:f,maxMissingPings:b,maxReconnectAttempts:p}=e;return u=e.logger=e.logger||new AC(r),f=e.reconnectStrategy=e.reconnectStrategy||Lm(d),e.monitor!==!1&&(e.monitor=e.monitor||new EC({pingInterval:d,reconnectStrategy:f,maxMissingPings:b,maxReconnectAttempts:p,logger:u})),kC(t,e)}function FC(t,e){let n=DC(t,e);return new TC(n)}class PC{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,n,r={},u={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(d=>{if(d&&OpenC3Auth.setTokens(),this._cable==null){let f=this._url+"?scope="+encodeURIComponent(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);f=new URL(f,document.baseURI).href,this._cable=FC(f)}return this._cable.subscriptions.create({channel:e,...u},r)})}recordPing(){}}Wi("P",PC);class BC{constructor(e,n,r="",u=""){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=r,this.url=u}}Wi("b",BC);function Mh(t){return jC.test(t)}const jC=/^-?[0-9]+$/;function Dm(t){return WC.test(t)}const WC=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Fm(t,e){const n=Number.parseFloat(t),r=String(n),u=Pm(t),d=Pm(r);return!!(u===d||(e==null?void 0:e.approx)===!0&&!Mh(t)&&d.length>=14&&u.startsWith(d.substring(0,14)))}let rl=function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t}({});function zC(t){if(Fm(t,{approx:!1}))return;if(Mh(t))return rl.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?rl.underflow:rl.truncate_float:rl.overflow}function Pm(t){return t.replace(HC,"").replace(qC,"").replace(VC,"").replace(UC,"")}const HC=/[eE][+-]?\d+$/,UC=/^-?(0*)?/,qC=/\./,VC=/0+$/;class KC{constructor(e){if(nc(this,"isLosslessNumber",!0),!Dm(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=zC(this.value);if(e===void 0||e===rl.truncate_float)return Number.parseFloat(this.value);if(Mh(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 GC(t){return t&&typeof t=="object"&&t.isLosslessNumber===!0||!1}function YC(t){return new KC(t)}function XC(t,e){return Lh({"":t},"",t,e)}function Lh(t,e,n,r){return Array.isArray(n)?r.call(t,e,ZC(n,r)):n&&typeof n=="object"&&!GC(n)?r.call(t,e,QC(n,r)):r.call(t,e,n)}function QC(t,e){for(const n of Object.keys(t)){const r=Lh(t,n,t[n],e);r!==void 0?t[n]=r:delete t[n]}return t}function ZC(t,e){for(let n=0;n<t.length;n++)t[n]=Lh(t,String(n),t[n],e);return t}function JC(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:YC,r=0;const u=b();return o(u),m(),e?XC(u,e):u;function d(){if(t.charCodeAt(r)===o$){r++,g();const $={};let C=!0;for(;r<t.length&&t.charCodeAt(r)!==jm;){C?C=!1:(h(),g());const N=r,j=i();if(j===void 0){R();return}g(),c();const U=b();if(U===void 0){F();return}Object.prototype.hasOwnProperty.call($,j)&&!Oh(U,$[j])&&T(j,N+1),$[j]=U}return t.charCodeAt(r)!==jm&&S(),r++,$}}function f(){if(t.charCodeAt(r)===s$){r++,g();const $=[];let C=!0;for(;r<t.length&&t.charCodeAt(r)!==Wm;){C?C=!1:h();const N=b();l(N),$.push(N)}return t.charCodeAt(r)!==Wm&&x(),r++,$}}function b(){g();const $=i()??a()??d()??f()??p("true",!0)??p("false",!1)??p("null",null);return g(),$}function p($,C){if(t.slice(r,r+$.length)===$)return r+=$.length,C}function g(){for(;e$(t.charCodeAt(r));)r++}function i(){if(t.charCodeAt(r)===Ih){r++;let $="";for(;r<t.length&&t.charCodeAt(r)!==Ih;){if(t.charCodeAt(r)===i$){const C=t[r+1],N=r$[C];N!==void 0?($+=N,r++):C==="u"?vc(t.charCodeAt(r+2))&&vc(t.charCodeAt(r+3))&&vc(t.charCodeAt(r+4))&&vc(t.charCodeAt(r+5))?($+=String.fromCharCode(Number.parseInt(t.slice(r+2,r+6),16)),r+=5):L(r):O(r)}else n$(t.charCodeAt(r))?$+=t[r]:M(t[r]);r++}return k(),r++,$}}function a(){const $=r;if(t.charCodeAt(r)===zm&&(r++,w($)),t.charCodeAt(r)===Nh)r++;else if(t$(t.charCodeAt(r)))for(r++;bc(t.charCodeAt(r));)r++;if(t.charCodeAt(r)===f$)for(r++,w($);bc(t.charCodeAt(r));)r++;if(t.charCodeAt(r)===b$||t.charCodeAt(r)===v$)for(r++,(t.charCodeAt(r)===zm||t.charCodeAt(r)===h$)&&r++,w($);bc(t.charCodeAt(r));)r++;if(r>$)return n(t.slice($,r))}function h(){if(t.charCodeAt(r)!==p$)throw new SyntaxError(`Comma ',' expected after value ${I()}`);r++}function c(){if(t.charCodeAt(r)!==g$)throw new SyntaxError(`Colon ':' expected after property name ${I()}`);r++}function o($){if($===void 0)throw new SyntaxError(`JSON value expected ${I()}`)}function l($){if($===void 0)throw new SyntaxError(`Array item expected ${I()}`)}function m(){if(r<t.length)throw new SyntaxError(`Expected end of input ${I()}`)}function w($){if(!bc(t.charCodeAt(r))){const C=t.slice($,r);throw new SyntaxError(`Invalid number '${C}', expecting a digit ${I()}`)}}function k(){if(t.charCodeAt(r)!==Ih)throw new SyntaxError(`End of string '"' expected ${I()}`)}function R(){throw new SyntaxError(`Quoted object key expected ${I()}`)}function T($,C){throw new SyntaxError(`Duplicate key '${$}' encountered at position ${C}`)}function S(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${I()}`)}function x(){throw new SyntaxError(`Array item or end of array ']' expected ${I()}`)}function M($){throw new SyntaxError(`Invalid character '${$}' ${H()}`)}function O($){const C=t.slice($,$+2);throw new SyntaxError(`Invalid escape character '${C}' ${H()}`)}function F(){throw new SyntaxError(`Object value expected after ':' ${H()}`)}function L($){const C=t.slice($,$+6);throw new SyntaxError(`Invalid unicode character '${C}' ${H()}`)}function H(){return`at position ${r}`}function P(){return r<t.length?`but got '${t[r]}'`:"but reached end of input"}function I(){return`${P()} ${H()}`}}function e$(t){return t===a$||t===l$||t===c$||t===u$}function vc(t){return t>=Nh&&t<=Dh||t>=m$&&t<=w$||t>=y$&&t<=x$}function bc(t){return t>=Nh&&t<=Dh}function t$(t){return t>=d$&&t<=Dh}function n$(t){return t>=32&&t<=1114111}function Oh(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((n,r)=>Oh(n,e[r])):Bm(t)&&Bm(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(n=>Oh(t[n],e[n])):!1}function Bm(t){return typeof t=="object"&&t!==null}const r$={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
1403
+ `,r:"\r",t:" "},i$=92,o$=123,jm=125,s$=91,Wm=93,a$=32,l$=10,c$=9,u$=13,Ih=34,h$=43,zm=45,Nh=48,d$=49,Dh=57,p$=44,f$=46,g$=58,m$=65,y$=97,v$=69,b$=101,w$=70,x$=102;function Hm(t,e,n,r){return u(t);function u(p,g){if(Array.isArray(r)){const i=r.find(a=>a.test(p));if(i){const a=i.stringify(p);if(typeof a!="string"||!Dm(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 p=="boolean"||typeof p=="number"||typeof p=="string"||p===null||p instanceof Date||p instanceof Boolean||p instanceof Number||p instanceof String)return JSON.stringify(p);if(p!=null&&p.isLosslessNumber||typeof p=="bigint")return p.toString();if(Array.isArray(p))return d(p);if(p&&typeof p=="object")return f(p)}function d(p,g){if(p.length===0)return"[]";let i="[";for(let a=0;a<p.length;a++){const h=p[a];typeof h<"u"&&typeof h!="function"?i+=u(h):i+="null",a<p.length-1&&(i+=",")}return i+="]",i}function f(p,g){if(typeof p.toJSON=="function")return Hm(p.toJSON(),e,n,void 0);const i=Array.isArray(e)?e.map(String):Object.keys(p);if(i.length===0)return"{}";let a=!0,h="{";for(const c of i){const o=p[c];if(b(c,o)){a?a=!1:h+=",";const l=JSON.stringify(c);h+=`${l}:`,h+=u(o)}}return h+="}",h}function b(p,g){return typeof g<"u"&&typeof g!="function"&&typeof g!="symbol"}}function k$(t){return Fm(t)?parseFloat(t):BigInt(t)}class Um{constructor(){nc(this,"id",1)}async exec(e,n,r={},u={},d=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,u.manual=!0,(await $h.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:n,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...u},timeout:d,transformRequest:[(f,b)=>Hm(f)],transformResponse:[f=>JC(f,void 0,k$)]})).data.result}catch(f){let b=new Error;throw f.response?(b.name=f.response.data.error.data.class,b.message=f.response.data.error.data.message,b.object=f.response.data.error):f.request?(b.name="Request error",b.message="Request error, no response received"):b.name="Unknown error",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,...r){return this.exec("interface_cmd",[e,n,...r])}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,r){return this.exec("get_item",[e,n,r])}get_param(e,n,r){return this.exec("get_param",[e,n,r])}get_parameter(e,n,r){return this.exec("get_param",[e,n,r])}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,r,u=30){const d=await this.exec("get_tlm_packet",[e,n],{type:r,stale_time:u});if(d!=null){let f=d.length,b=null;for(let p=0;p<f;p++)b=this.decode_openc3_type(d[p][1]),b!==null&&(d[p][1]=b)}return d}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])}async get_tlm_values(e,n=30,r=null){let u={stale_time:n};r!==null&&(u.cache_timeout=r);const d=await this.exec("get_tlm_values",[e],u,{},1e4);let f=d[0].length,b=null;for(let p=0;p<f;p++)b=this.decode_openc3_type(d[0][p]),b!==null&&(d[0][p]=b);return d}get_limits(e,n,r){return this.exec("get_limits",[e,n,r])}async tlm(e,n,r,u="CONVERTED"){let d=null;if(n===void 0)d=await this.exec("tlm",[e]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(n))d=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 d=await this.exec("tlm",[e,n,r],{type:u});let f=this.decode_openc3_type(d);return f!==null&&(d=f),d}async inject_tlm(e,n,r=null,u="CONVERTED"){await this.exec("inject_tlm",[e,n,r],{type:u})}set_tlm(e,n,r,u){return this.exec("set_tlm",[e,n,r],{type:u})}override_tlm(e,n,r,u){return this.exec("override_tlm",[e,n,r],{type:u})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,n,r,u){return this.exec("normalize_tlm",[e,n,r],{type:u})}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,r,u="CONVERTED"){return this.exec("get_cmd_value",[e,n,r,u])}get_cmd_buffer(e,n){return this.exec("get_cmd_buffer",[e,n])}_cmd(e,n,r,u,d){let f=null;for(let b in u)Object.prototype.hasOwnProperty.call(u,b)&&(f=this.encode_openc3_type(u[b]),f!==null&&(u[b]=f));return this.exec(e,[n,r,u],{},d)}get_cmd_hazardous(e,n,r,u={}){return n===void 0?this.exec("get_cmd_hazardous",e,{},u):this._cmd("get_cmd_hazardous",e,n,r,u)}cmd(e,n,r,u={}){return n===void 0?this.exec("cmd",e,{},u):this._cmd("cmd",e,n,r,u)}cmd_no_range_check(e,n,r,u={}){return n===void 0?this.exec("cmd_no_range_check",e,{},u):this._cmd("cmd_no_range_check",e,n,r,u)}cmd_raw(e,n,r,u={}){return n===void 0?this.exec("cmd_raw",e,{},u):this._cmd("cmd_raw",e,n,r,u)}cmd_raw_no_range_check(e,n,r,u={}){return n===void 0?this.exec("cmd_raw_no_range_check",e,{},u):this._cmd("cmd_raw_no_range_check",e,n,r,u)}cmd_no_hazardous_check(e,n,r,u={}){return n===void 0?this.exec("cmd_no_hazardous_check",e,{},u):this._cmd("cmd_no_hazardous_check",e,n,r,u)}cmd_no_checks(e,n,r,u={}){return n===void 0?this.exec("cmd_no_checks",e,{},u):this._cmd("cmd_no_checks",e,n,r,u)}cmd_raw_no_hazardous_check(e,n,r,u={}){return n===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},u):this._cmd("cmd_raw_no_hazardous_check",e,n,r,u)}cmd_raw_no_checks(e,n,r,u={}){return n===void 0?this.exec("cmd_raw_no_checks",e,{},u):this._cmd("cmd_raw_no_checks",e,n,r,u)}build_cmd(e,n,r){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r)}build_command(e,n,r){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r)}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,r){return this.exec("save_config",[e,n,r])}delete_config(e,n){return this.exec("delete_config",[e,n])}enable_limits(e,n,r){return this.exec("enable_limits",[e,n,r])}disable_limits(e,n,r){return this.exec("disable_limits",[e,n,r])}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){return this.exec("get_setting",[e])}get_settings(e){return this.exec("get_settings",e)}set_setting(e,n){return this.exec("set_setting",[e,n])}update_news(){return this.exec("update_news",[])}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),r=await crypto.subtle.digest("SHA-256",n),u=new Uint8Array(r);return Array.from(u).map(d=>d.toString(16).padStart(2,"0")).join("")}}}Wi("B",Um);var qm={exports:{}},Vm;function S$(){return Vm||(Vm=1,function(t,e){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(n,r,u){function d(g,i){function a(F,L,H){if(!(F.length<L)){var P=F.slice(0,L),I=F.slice(L),$=/^(?:(\s+)|(\S+)(\s+))/.exec(I),C=/(?:(\s+)|(\s+)(\S+))$/.exec(P),N=0,j=0;if(C&&!C[2]&&(N=L-C[1].length,j=L),$&&!$[2]&&(N||(N=L),j=L+$[1].length),N)return{start:N,end:j};if(C&&C[2]&&C.index>H)return{start:C.index,end:C.index+C[2].length};if($&&$[2])return N=L+$[2].length,{start:N,end:N+$[3].length}}}for(var h=i.column||g.getOption("printMarginColumn"),c=i.allowMerge!=0,o=Math.min(i.startRow,i.endRow),l=Math.max(i.startRow,i.endRow),m=g.session;o<=l;){var w=m.getLine(o);if(w.length>h){var k=a(w,h,5);if(k){var R=/^\s*/.exec(w)[0];m.replace(new b(o,k.start,o,k.end),`
1404
+ `+R)}l++}else if(c&&/\S/.test(w)&&o!=l){var T=m.getLine(o+1);if(T&&/\S/.test(T)){var S=w.replace(/\s+$/,""),x=T.replace(/^\s+/,""),M=S+" "+x,k=a(M,h,5);if(k&&k.start>S.length||M.length<h){var O=new b(o,S.length,o+1,T.length-x.length);m.replace(O," "),o--,l--}else S.length<w.length&&m.remove(new b(o,S.length,o,w.length))}}o++}}function f(g){if(g.command.name=="insertstring"&&/\S/.test(g.args)){var i=g.editor,a=i.selection.cursor;if(a.column<=i.renderer.$printMarginColumn)return;var h=i.session.$undoManager.$lastDelta;d(i,{startRow:a.row,endRow:a.row,allowMerge:!1}),h!=i.session.$undoManager.$lastDelta&&i.session.markUndoGroup()}}var b=n("../range").Range,p=n("../editor").Editor;n("../config").defineOptions(p.prototype,"editor",{hardWrap:{set:function(g){g?this.commands.on("afterExec",f):this.commands.off("afterExec",f)},value:!1}}),r.hardWrap=d}),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,r,u){function d(v){return{row:v.line,column:v.ch}}function f(v){return new Fe(v.row,v.column)}function b(v,A,_){if(A.line===_.line&&A.ch>=_.ch-1){var D=v.getLine(A.line),B=D.charCodeAt(A.ch);55296<=B&&B<=55551&&(_.ch+=1)}return{start:A,end:_}}function p(v){v.setOption("disableInput",!0),v.setOption("showCursorWhenSelecting",!1),je.signal(v,"vim-mode-change",{mode:"normal"}),v.on("cursorActivity",is),M(v),je.on(v.getInputField(),"paste",i(v))}function g(v){v.setOption("disableInput",!1),v.off("cursorActivity",is),je.off(v.getInputField(),"paste",i(v)),v.state.vim=null,mr&&clearTimeout(mr)}function i(v){var A=v.state.vim;return A.onPasteFn||(A.onPasteFn=function(){A.insertMode||(v.setCursor(ge(v.getCursor(),0,1)),jn.enterInsertMode(v,{},A))}),A.onPasteFn}function a(v,A){return A>=v.firstLine()&&A<=v.lastLine()}function h(v){return/^[a-z]$/.test(v)}function c(v){return"()[]{}".indexOf(v)!=-1}function o(v){return Da.test(v)}function l(v){return ln.test(v)}function m(v){return/^\s*$/.test(v)}function w(v){return".?!".indexOf(v)!=-1}function k(v,A){for(var _=0;_<A.length;_++)if(A[_]==v)return!0;return!1}function R(v,A,_,D,B){if(A===void 0&&!B)throw Error("defaultValue is required unless callback is provided");if(_||(_="string"),Gt[v]={type:_,defaultValue:A,callback:B},D)for(var W=0;W<D.length;W++)Gt[D[W]]=Gt[v];A&&T(v,A)}function T(v,A,_,D){var B=Gt[v];D=D||{};var W=D.scope;if(!B)return new Error("Unknown option: "+v);if(B.type=="boolean"){if(A&&A!==!0)return new Error("Invalid argument: "+v+"="+A);A!==!1&&(A=!0)}B.callback?(W!=="local"&&B.callback(A,void 0),W!=="global"&&_&&B.callback(A,_)):(W!=="local"&&(B.value=B.type=="boolean"?!!A:A),W!=="global"&&_&&(_.state.vim.options[v]={value:A}))}function S(v,A,_){var D=Gt[v];_=_||{};var B=_.scope;if(!D)return new Error("Unknown option: "+v);if(D.callback){var W=A&&D.callback(void 0,A);return B!=="global"&&W!==void 0?W:B!=="local"?D.callback():void 0}var W=B!=="global"&&A&&A.state.vim.options[v];return(W||B!=="local"&&D||{}).value}function x(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Pn()}function M(v){return v.state.vim||(v.state.vim={inputState:new $,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),v.state.vim}function O(){ze={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Li(),macroModeState:new x,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new K({}),searchHistoryController:new Z,exCommandHistoryController:new Z};for(var v in Gt){var A=Gt[v];A.value=A.defaultValue}}function F(v){function A(Y){typeof Y=="string"?_n.value=Y:_n=null}if(v[0]=="<"){var _=v.toLowerCase().slice(1,-1),D=_.split("-");if(_=D.pop()||"",_=="lt")v="<";else if(_=="space")v=" ";else if(_=="cr")v=`
1405
+ `;else if(Oi[_]){var B=_n.value,W={key:Oi[_],target:{value:B,selectionEnd:B.length,selectionStart:B.length}};_n.onKeyDown&&_n.onKeyDown(W,_n.value,A),_n&&_n.onKeyUp&&_n.onKeyUp(W,_n.value,A);return}}if(v==`
1406
+ `){var V=_n;_n=null,V.onClose&&V.onClose(V.value)}else _n.value=(_n.value||"")+v}function L(v,A,_){var D=pn;if(_){if(Hr.indexOf(_)!=-1)return;Hr.push(_),pn=_.noremap!=0}try{for(var B=M(v),W=/<(?:[CSMA]-)*\w+>|./gi,V;V=W.exec(A);){var Y=V[0],Q=B.insertMode;if(_n){F(Y);continue}var re=St.handleKey(v,Y,"mapping");if(!re&&Q&&B.insertMode){if(Y[0]=="<"){var se=Y.toLowerCase().slice(1,-1),ve=se.split("-");if(se=ve.pop()||"",se=="lt")Y="<";else if(se=="space")Y=" ";else if(se=="cr")Y=`
1407
+ `;else{if(Oi.hasOwnProperty(se)){Y=Oi[se],ss(v,Y);continue}Y=Y[0],W.lastIndex=V.index+1}}v.replaceSelection(Y)}}}finally{if(Hr.pop(),pn=Hr.length?D:!1,!Hr.length&&_n){var ke=_n;_n=null,Ir(v,ke)}}}function H(v,A){var _=v.key;if(!Ur[_]){_.length>1&&_[0]=="n"&&(_=_.replace("Numpad","")),_=or[_]||_;var D="";if(v.ctrlKey&&(D+="C-"),v.altKey&&(D+="A-"),v.metaKey&&(D+="M-"),je.isMac&&v.altKey&&!v.metaKey&&!v.ctrlKey&&(D=D.slice(2)),(D||_.length>1)&&v.shiftKey&&(D+="S-"),A&&!A.expectLiteralNext&&_.length==1){if(Xn.keymap&&_ in Xn.keymap)(Xn.remapCtrl!=0||!D)&&(_=Xn.keymap[_]);else if(_.charCodeAt(0)>255){var B=v.code&&v.code.slice(-1)||"";v.shiftKey||(B=B.toLowerCase()),B&&(_=B)}}return D+=_,D.length>1&&(D="<"+D+">"),D}}function P(v,A){Xn.string!==v&&(Xn=I(v)),Xn.remapCtrl=A}function I(v){function A(D){return D.split(/\\?(.)/).filter(Boolean)}var _={};return v?(v.split(/((?:[^\\,]|\\.)+),/).map(function(D){if(D){var B=D.split(/((?:[^\\;]|\\.)+);/);if(B.length==3){var W=A(B[1]),V=A(B[2]);if(W.length!==V.length)return;for(var Y=0;Y<W.length;++Y)_[W[Y]]=V[Y]}else if(B.length==1){var Q=A(D);if(Q.length%2!==0)return;for(var Y=0;Y<Q.length;Y+=2)_[Q[Y]]=Q[Y+1]}}}),{keymap:_,string:v}):{keymap:_,string:""}}function $(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}function C(v,A){v.state.vim.inputState=new $,v.state.vim.expectLiteralNext=!1,je.signal(v,"vim-command-done",A)}function N(){this.removed=[],this.inserted=""}function j(v,A,_){this.clear(),this.keyBuffer=[v||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!A,this.blockwise=!!_}function U(v,A){var _=ze.registerController.registers;if(!v||v.length!=1)throw Error("Register name must be 1 character");_[v]=A,an.push(v)}function K(v){this.registers=v,this.unnamedRegister=v['"']=new j,v["."]=new j,v[":"]=new j,v["/"]=new j,v["+"]=new j}function Z(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function te(v,A){ai[v]=A}function he(v,A){for(var _=[],D=0;D<A;D++)_.push(v);return _}function ne(v,A){us[v]=A}function ae(v,A){jn[v]=A}function ue(v,A,_){var D=v.state.vim,B=D.insertMode||D.visualMode,W=Math.min(Math.max(v.firstLine(),A.line),v.lastLine()),V=v.getLine(W),Y=V.length-1+ +!!B,Q=Math.min(Math.max(0,A.ch),Y),re=V.charCodeAt(Q);if(56320<=re&&re<=57343){var se=1;_&&_.line==W&&_.ch>Q&&(se=-1),Q+=se,Q>Y&&(Q-=2)}return new Fe(W,Q)}function ce(v){var A={};for(var _ in v)v.hasOwnProperty(_)&&(A[_]=v[_]);return A}function ge(v,A,_){return typeof A=="object"&&(_=A.ch,A=A.line),new Fe(v.line+A,v.ch+_)}function Ee(v,A,_,D){D.operator&&(_="operatorPending");for(var B,W=[],V=[],Y=pn?A.length-No:0,Q=Y;Q<A.length;Q++){var re=A[Q];_=="insert"&&re.context!="insert"||re.context&&re.context!=_||D.operator&&re.type=="action"||!(B=Re(v,re.keys))||(B=="partial"&&W.push(re),B=="full"&&V.push(re))}return{partial:W.length&&W,full:V.length&&V}}function Re(v,A){var _=A.slice(-11)=="<character>",D=A.slice(-10)=="<register>";if(_||D){var B=A.length-(_?11:10),W=v.slice(0,B),V=A.slice(0,B);return W==V&&v.length>B?"full":V.indexOf(W)==0?"partial":!1}return v==A?"full":A.indexOf(v)==0?"partial":!1}function Le(v){var A=/^.*(<[^>]+>)$/.exec(v),_=A?A[1]:v.slice(-1);if(_.length>1)switch(_){case"<CR>":_=`
1408
+ `;break;case"<Space>":_=" ";break;default:_=""}return _}function Xe(v,A,_){return function(){for(var D=0;D<_;D++)A(v)}}function Ge(v){return new Fe(v.line,v.ch)}function ft(v,A){return v.ch==A.ch&&v.line==A.line}function rt(v,A){return v.line<A.line?!0:v.line==A.line&&v.ch<A.ch}function gt(v,A){return arguments.length>2&&(A=gt.apply(void 0,Array.prototype.slice.call(arguments,1))),rt(v,A)?v:A}function sn(v,A){return arguments.length>2&&(A=sn.apply(void 0,Array.prototype.slice.call(arguments,1))),rt(v,A)?A:v}function vn(v,A,_){var D=rt(v,A),B=rt(A,_);return D&&B}function Jt(v,A){return v.getLine(A).length}function xr(v){return v.trim?v.trim():v.replace(/^\s+|\s+$/g,"")}function bn(v){return v.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Nn(v,A,_){var D=Jt(v,A),B=new Array(_-D+1).join(" ");v.setCursor(new Fe(A,D)),v.replaceRange(B,v.getCursor())}function Dn(v,A){var _=[],D=v.listSelections(),B=Ge(v.clipPos(A)),W=!ft(A,B),V=v.getCursor("head"),Y=xt(D,V),Q=ft(D[Y].head,D[Y].anchor),re=D.length-1,se=re-Y>Y?re:0,ve=D[se].anchor,ke=Math.min(ve.line,B.line),me=Math.max(ve.line,B.line),be=ve.ch,De=B.ch,Ne=D[se].head.ch-be,Ve=De-be;Ne>0&&Ve<=0?(be++,W||De--):Ne<0&&Ve>=0?(be--,Q||De++):Ne<0&&Ve==-1&&(be--,De++);for(var ct=ke;ct<=me;ct++){var Je={anchor:new Fe(ct,be),head:new Fe(ct,De)};_.push(Je)}return v.setSelections(_),A.ch=De,ve.ch=be,ve}function ir(v,A,_){for(var D=[],B=0;B<_;B++){var W=ge(A,B,0);D.push({anchor:W,head:W})}v.setSelections(D,0)}function xt(v,A,_){for(var D=0;D<v.length;D++){var B=ft(v[D].anchor,A),W=ft(v[D].head,A);if(B||W)return D}return-1}function qe(v,A){var _=A.lastSelection,D=function(){var W=v.listSelections(),V=W[0],Y=W[W.length-1],Q=rt(V.anchor,V.head)?V.anchor:V.head,re=rt(Y.anchor,Y.head)?Y.head:Y.anchor;return[Q,re]},B=function(){var W=v.getCursor(),V=v.getCursor(),Y=_.visualBlock;if(Y){var Q=Y.width,re=Y.height;V=new Fe(W.line+re,W.ch+Q);for(var se=[],ve=W.line;ve<V.line;ve++){var ke=new Fe(ve,W.ch),me=new Fe(ve,V.ch),be={anchor:ke,head:me};se.push(be)}v.setSelections(se)}else{var De=_.anchorMark.find(),Ne=_.headMark.find(),Ve=Ne.line-De.line,ct=Ne.ch-De.ch;V={line:V.line+Ve,ch:Ve?V.ch:ct+V.ch},_.visualLine&&(W=new Fe(W.line,0),V=new Fe(V.line,Jt(v,V.line))),v.setSelection(W,V)}return[W,V]};return A.visualMode?D():B()}function Se(v,A){var _=A.sel.anchor,D=A.sel.head;A.lastPastedText&&(D=v.posFromIndex(v.indexFromPos(_)+A.lastPastedText.length),A.lastPastedText=null),A.lastSelection={anchorMark:v.setBookmark(_),headMark:v.setBookmark(D),anchor:Ge(_),head:Ge(D),visualMode:A.visualMode,visualLine:A.visualLine,visualBlock:A.visualBlock}}function He(v,A,_,D){var B=v.state.vim.sel,W=D?A:B.head,V=D?A:B.anchor,Y;return rt(_,A)&&(Y=_,_=A,A=Y),rt(W,V)?(W=gt(A,W),V=sn(V,_)):(V=gt(A,V),W=sn(W,_),W=ge(W,0,-1),W.ch==-1&&W.line!=v.firstLine()&&(W=new Fe(W.line-1,Jt(v,W.line-1)))),[V,W]}function Qe(v,A,B){var D=v.state.vim;A=A||D.sel;var B=B||D.visualLine?"line":D.visualBlock?"block":"char",W=mt(v,A,B);v.setSelections(W.ranges,W.primary)}function mt(v,A,_,D){var B=Ge(A.head),W=Ge(A.anchor);if(_=="char"){var V=!D&&!rt(A.head,A.anchor)?1:0,Y=rt(A.head,A.anchor)?1:0;return B=ge(A.head,0,V),W=ge(A.anchor,0,Y),{ranges:[{anchor:W,head:B}],primary:0}}if(_=="line"){if(rt(A.head,A.anchor))B.ch=0,W.ch=Jt(v,W.line);else{W.ch=0;var Q=v.lastLine();B.line>Q&&(B.line=Q),B.ch=Jt(v,B.line)}return{ranges:[{anchor:W,head:B}],primary:0}}if(_=="block"){var re=Math.min(W.line,B.line),se=W.ch,ve=Math.max(W.line,B.line),ke=B.ch;se<ke?ke+=1:se+=1;for(var me=ve-re+1,be=B.line==re?0:me-1,De=[],Ne=0;Ne<me;Ne++)De.push({anchor:new Fe(re+Ne,se),head:new Fe(re+Ne,ke)});return{ranges:De,primary:be}}}function $t(v){var A=v.getCursor("head");return v.getSelection().length==1&&(A=gt(A,v.getCursor("anchor"))),A}function Ct(v,A){var _=v.state.vim;A!==!1&&v.setCursor(ue(v,_.sel.head)),Se(v,_),_.visualMode=!1,_.visualLine=!1,_.visualBlock=!1,_.insertMode||je.signal(v,"vim-mode-change",{mode:"normal"})}function Pt(v,A,_){var D=v.getRange(A,_);if(/\n\s*$/.test(D)){var B=D.split(`
1409
+ `);B.pop();for(var W,W=B.pop();B.length>0&&W&&m(W);W=B.pop())_.line--,_.ch=0;W?(_.line--,_.ch=Jt(v,_.line)):_.ch=0}}function Dt(v,A,_){A.ch=0,_.ch=0,_.line++}function pt(v){if(!v)return 0;var A=v.search(/\S/);return A==-1?v.length:A}function kt(v,A,_){var D=A.inclusive,B=A.innerWord,W=A.bigWord,V=A.noSymbol,Y=A.multiline,Q=_||$t(v),re=v.getLine(Q.line),se=re,ve=Q.line,ke=ve,me=Q.ch,be,De=V?Do[0]:Mi[0];if(B&&/\s/.test(re.charAt(me)))De=function(kn){return/\s/.test(kn)};else{for(;!De(re.charAt(me));)if(me++,me>=re.length){if(!Y)return null;me--,be=To(v,Q,!0,W,!0);break}W?De=Mi[0]:(De=Do[0],De(re.charAt(me))||(De=Do[1]))}for(var Ne=me,Ve=me;De(re.charAt(Ve))&&Ve>=0;)Ve--;if(Ve++,be)Ne=be.to,ke=be.line,se=v.getLine(ke),!se&&Ne==0&&Ne++;else for(;De(re.charAt(Ne))&&Ne<re.length;)Ne++;if(D){var ct=Ne,Je=Q.ch<=Ve&&/\s/.test(re.charAt(Q.ch));if(!Je)for(;/\s/.test(se.charAt(Ne))&&Ne<se.length;)Ne++;if(ct==Ne||Je){for(var nt=Ve;/\s/.test(re.charAt(Ve-1))&&Ve>0;)Ve--;!Ve&&!Je&&(Ve=nt)}}return{start:new Fe(ve,Ve),end:new Fe(ke,Ne)}}function $n(v,A,_){var D=A;if(!je.findMatchingTag||!je.findEnclosingTag)return{start:D,end:D};var B=je.findMatchingTag(v,A)||je.findEnclosingTag(v,A);return!B||!B.open||!B.close?{start:D,end:D}:_?{start:B.open.from,end:B.close.to}:{start:B.open.to,end:B.close.from}}function Mr(v,A,_){ft(A,_)||ze.jumpList.add(v,A,_)}function ii(v,A){ze.lastCharacterSearch.increment=v,ze.lastCharacterSearch.forward=A.forward,ze.lastCharacterSearch.selectedCharacter=A.selectedCharacter}function Xi(v,A,_,D){var B=Ge(v.getCursor()),W=_?1:-1,V=_?v.lineCount():-1,Y=B.ch,Q=B.line,re=v.getLine(Q),se={lineText:re,nextCh:re.charAt(Y),lastCh:null,index:Y,symb:D,reverseSymb:(_?{")":"(","}":"{"}:{"(":")","{":"}"})[D],forward:_,depth:0,curMoveThrough:!1},ve=vi[D];if(!ve)return B;var ke=bi[ve].init,me=bi[ve].isComplete;for(ke&&ke(se);Q!==V&&A;){if(se.index+=W,se.nextCh=se.lineText.charAt(se.index),!se.nextCh){if(Q+=W,se.lineText=v.getLine(Q)||"",W>0)se.index=0;else{var be=se.lineText.length;se.index=be>0?be-1:0}se.nextCh=se.lineText.charAt(se.index)}me(se)&&(B.line=Q,B.ch=se.index,A--)}return se.nextCh||se.curMoveThrough?new Fe(Q,se.index):B}function To(v,A,_,D,B){var W=A.line,V=A.ch,Y=v.getLine(W),Q=_?1:-1,re=D?Mi:Do;if(B&&Y==""){if(W+=Q,Y=v.getLine(W),!a(v,W))return null;V=_?0:Y.length}for(;;){if(B&&Y=="")return{from:0,to:0,line:W};for(var se=Q>0?Y.length:-1,ve=se,ke=se;V!=se;){for(var me=!1,be=0;be<re.length&&!me;++be)if(re[be](Y.charAt(V))){for(ve=V;V!=se&&re[be](Y.charAt(V));)V+=Q;if(ke=V,me=ve!=ke,ve==A.ch&&W==A.line&&ke==ve+Q)continue;return{from:Math.min(ve,ke+1),to:Math.max(ve,ke),line:W}}me||(V+=Q)}if(W+=Q,!a(v,W))return null;Y=v.getLine(W),V=Q>0?0:Y.length}}function kr(v,A,_,D,B,W){var V=Ge(A),Y=[];(D&&!B||!D&&B)&&_++;for(var Q=!D||!B,re=0;re<_;re++){var se=To(v,A,D,W,Q);if(!se){var ve=Jt(v,v.lastLine());Y.push(D?{line:v.lastLine(),from:ve,to:ve}:{line:0,from:0,to:0});break}Y.push(se),A=new Fe(se.line,D?se.to-1:se.from)}var ke=Y.length!=_,me=Y[0],be=Y.pop();return D&&!B?(!ke&&(me.from!=V.ch||me.line!=V.line)&&(be=Y.pop()),new Fe(be.line,be.from)):D&&B?new Fe(be.line,be.to-1):!D&&B?(!ke&&(me.to!=V.ch||me.line!=V.line)&&(be=Y.pop()),new Fe(be.line,be.to)):new Fe(be.line,be.from)}function Ao(v,A,_,D,B){var W=A,V=new Fe(W.line+_.repeat-1,1/0),Y=v.clipPos(V);return Y.ch--,B||(D.lastHPos=1/0,D.lastHSPos=v.charCoords(Y,"div").left),V}function Jo(v,A,_,D,B){for(var W=B||v.getCursor(),V=W.ch,Y,Q=0;Q<A;Q++){var re=v.getLine(W.line);if(Y=kl(V,re,D,_),Y==-1)return null;V=Y}return new Fe(v.getCursor().line,Y)}function xl(v,A){var _=v.getCursor().line;return ue(v,new Fe(_,A-1))}function gi(v,A,_,D){!k(_,wo)&&!nn.test(_)||(A.marks[_]&&A.marks[_].clear(),A.marks[_]=v.setBookmark(D))}function kl(v,A,_,D,B){var W;return D?(W=A.indexOf(_,v+1),W!=-1):(W=A.lastIndexOf(_,v-1),W!=-1),W}function zs(v,A,_,D,B){function W(Ve){return!/\S/.test(v.getLine(Ve))}function V(Ve,ct,Je){return Je?W(Ve)!=W(Ve+ct):!W(Ve)&&W(Ve+ct)}function Y(Ve){D=D>0?1:-1;var ct=v.ace.session.getFoldLine(Ve);ct&&Ve+D>ct.start.row&&Ve+D<ct.end.row&&(D=(D>0?ct.end.row:ct.start.row)-Ve)}var Q=A.line,re=v.firstLine(),se=v.lastLine(),ve,ke,me=Q;if(D){for(;re<=me&&me<=se&&_>0;)Y(me),V(me,D)&&_--,me+=D;return new Fe(me,0)}var be=v.state.vim;if(be.visualLine&&V(Q,1,!0)){var De=be.sel.anchor;V(De.line,-1,!0)&&(!B||De.line!=Q)&&(Q+=1)}var Ne=W(Q);for(me=Q;me<=se&&_;me++)V(me,1,!0)&&(!B||W(me)!=Ne)&&_--;for(ke=new Fe(me,0),me>se&&!Ne?Ne=!0:B=!1,me=Q;me>re&&!((!B||W(me)==Ne||me==Q)&&V(me,-1,!0));me--);return ve=new Fe(me,0),{start:ve,end:ke}}function Ea(v,A,_,D,B){function W(re){re.pos+re.dir<0||re.pos+re.dir>=re.line.length?re.line=null:re.pos+=re.dir}function V(re,se,ve,ke){var me=re.getLine(se),be={line:me,ln:se,pos:ve,dir:ke};if(be.line==="")return{ln:be.ln,pos:be.pos};var De=be.pos;for(W(be);be.line!==null;){if(De=be.pos,w(be.line[be.pos])){if(!B)return{ln:be.ln,pos:be.pos+1};for(W(be);be.line!==null&&m(be.line[be.pos]);)De=be.pos,W(be);return{ln:be.ln,pos:De+1}}W(be)}return{ln:be.ln,pos:De+1}}function Y(re,se,ve,ke){var me=re.getLine(se),be={line:me,ln:se,pos:ve,dir:ke};if(be.line==="")return{ln:be.ln,pos:be.pos};var De=be.pos;for(W(be);be.line!==null;){if(!m(be.line[be.pos])&&!w(be.line[be.pos]))De=be.pos;else if(w(be.line[be.pos]))return B?m(be.line[be.pos+1])?{ln:be.ln,pos:be.pos+1}:{ln:be.ln,pos:De}:{ln:be.ln,pos:De};W(be)}return be.line=me,B&&m(be.line[be.pos])?{ln:be.ln,pos:be.pos}:{ln:be.ln,pos:De}}for(var Q={ln:A.line,pos:A.ch};_>0;)D<0?Q=Y(v,Q.ln,Q.pos,D):Q=V(v,Q.ln,Q.pos,D),_--;return new Fe(Q.ln,Q.pos)}function Qi(v,A,_,D){function B(Q,re){if(re.pos+re.dir<0||re.pos+re.dir>=re.line.length){if(re.ln+=re.dir,!a(Q,re.ln)){re.line=null,re.ln=null,re.pos=null;return}re.line=Q.getLine(re.ln),re.pos=re.dir>0?0:re.line.length-1}else re.pos+=re.dir}function W(Q,re,se,ve){var Ne=Q.getLine(re),ke=Ne==="",me={line:Ne,ln:re,pos:se,dir:ve},be={ln:me.ln,pos:me.pos},De=me.line==="";for(B(Q,me);me.line!==null;){if(be.ln=me.ln,be.pos=me.pos,me.line===""&&!De)return{ln:me.ln,pos:me.pos};if(ke&&me.line!==""&&!m(me.line[me.pos]))return{ln:me.ln,pos:me.pos};w(me.line[me.pos])&&!ke&&(me.pos===me.line.length-1||m(me.line[me.pos+1]))&&(ke=!0),B(Q,me)}var Ne=Q.getLine(be.ln);be.pos=0;for(var Ve=Ne.length-1;Ve>=0;--Ve)if(!m(Ne[Ve])){be.pos=Ve;break}return be}function V(Q,re,se,ve){var De=Q.getLine(re),ke={line:De,ln:re,pos:se,dir:ve},me={ln:ke.ln,pos:null},be=ke.line==="";for(B(Q,ke);ke.line!==null;){if(ke.line===""&&!be)return me.pos!==null?me:{ln:ke.ln,pos:ke.pos};if(!(!w(ke.line[ke.pos])||me.pos===null||ke.ln===me.ln&&ke.pos+1===me.pos))return me;ke.line!==""&&!m(ke.line[ke.pos])&&(be=!1,me={ln:ke.ln,pos:ke.pos}),B(Q,ke)}var De=Q.getLine(me.ln);me.pos=0;for(var Ne=0;Ne<De.length;++Ne)if(!m(De[Ne])){me.pos=Ne;break}return me}for(var Y={ln:A.line,pos:A.ch};_>0;)D<0?Y=V(v,Y.ln,Y.pos,D):Y=W(v,Y.ln,Y.pos,D),_--;return new Fe(Y.ln,Y.pos)}function Gn(v,A,_,D){var B=A,W,V,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[_],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[_],re=v.getLine(B.line).charAt(B.ch),se=re===Q?1:0;if(W=v.scanForBracket(new Fe(B.line,B.ch+se),-1,void 0,{bracketRegex:Y}),V=v.scanForBracket(new Fe(B.line,B.ch+se),1,void 0,{bracketRegex:Y}),!W||!V)return null;if(W=W.pos,V=V.pos,W.line==V.line&&W.ch>V.ch||W.line>V.line){var ve=W;W=V,V=ve}return D?V.ch+=1:W.ch+=1,{start:W,end:V}}function Lr(v,A,_,D){var B=Ge(A),W=v.getLine(B.line),V=W.split(""),Y,Q,re,se,ve=V.indexOf(_);if(B.ch<ve)B.ch=ve;else if(ve<B.ch&&V[B.ch]==_){var ke=/string/.test(v.getTokenTypeAt(ge(A,0,1))),me=/string/.test(v.getTokenTypeAt(A)),be=ke&&!me;be||(Q=B.ch,--B.ch)}if(V[B.ch]==_&&!Q)Y=B.ch+1;else for(re=B.ch;re>-1&&!Y;re--)V[re]==_&&(Y=re+1);if(Y&&!Q)for(re=Y,se=V.length;re<se&&!Q;re++)V[re]==_&&(Q=re);return!Y||!Q?{start:B,end:B}:(D&&(--Y,++Q),{start:new Fe(B.line,Y),end:new Fe(B.line,Q)})}function Zi(){}function Mn(v){var A=v.state.vim;return A.searchState_||(A.searchState_=new Zi)}function Or(v){return Ji(v,"/")}function go(v){return Hs(v,"/")}function Ji(v,A){var _=Hs(v,A)||[];if(!_.length)return[];var D=[];if(_[0]===0){for(var B=0;B<_.length;B++)typeof _[B]=="number"&&D.push(v.substring(_[B]+1,_[B+1]));return D}}function Hs(v,A){A||(A="/");for(var _=!1,D=[],B=0;B<v.length;B++){var W=v.charAt(B);!_&&W==A&&D.push(B),_=!_&&W=="\\"}return D}function Ra(v){for(var A="|(){",_="}",D=!1,B=[],W=-1;W<v.length;W++){var V=v.charAt(W)||"",Y=v.charAt(W+1)||"",Q=Y&&A.indexOf(Y)!=-1;D?((V!=="\\"||!Q)&&B.push(V),D=!1):V==="\\"?(D=!0,Y&&_.indexOf(Y)!=-1&&(Q=!0),(!Q||Y==="\\")&&B.push(V)):(B.push(V),Q&&Y!=="\\"&&B.push("\\"))}return B.join("")}function Sl(v){for(var A=!1,_=[],D=-1;D<v.length;D++){var B=v.charAt(D)||"",W=v.charAt(D+1)||"";Ii[B+W]?(_.push(Ii[B+W]),D++):A?(_.push(B),A=!1):B==="\\"?(A=!0,o(W)||W==="$"?_.push("$"):W!=="/"&&W!=="\\"&&_.push("\\")):(B==="$"&&_.push("$"),_.push(B),W==="/"&&_.push("\\"))}return _.join("")}function _l(v){for(var A=new je.StringStream(v),_=[];!A.eol();){for(;A.peek()&&A.peek()!="\\";)_.push(A.next());var D=!1;for(var B in gr)if(A.match(B,!0)){D=!0,_.push(gr[B]);break}D||_.push(A.next())}return _.join("")}function eo(v,A,_){var D=ze.registerController.getRegister("/");if(D.setText(v),v instanceof RegExp)return v;var B=go(v),W,V;if(!B.length)W=v;else{W=v.substring(0,B[0]);var Y=v.substring(B[0]);V=Y.indexOf("i")!=-1}if(!W)return null;S("pcre")||(W=Ra(W)),_&&(A=/^[^A-Z]*$/.test(W));var Q=new RegExp(W,A||V?"im":"m");return Q}function mi(v){typeof v=="string"&&(v=document.createElement(v));for(var A,_=1;_<arguments.length;_++)if(A=arguments[_])if(typeof A!="object"&&(A=document.createTextNode(A)),A.nodeType)v.appendChild(A);else for(var D in A)Object.prototype.hasOwnProperty.call(A,D)&&(D[0]==="$"?v.style[D.slice(1)]=A[D]:v.setAttribute(D,A[D]));return v}function Kt(v,A){var _=mi("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},A);v.openNotification?v.openNotification(_,{bottom:!0,duration:5e3}):alert(_.innerText)}function Ma(v,A){return mi("div",{$display:"flex"},mi("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},v,mi("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),A&&mi("span",{$color:"#888"},A))}function Ir(v,A){if(Hr.length){A.value||(A.value=""),_n=A;return}var _=Ma(A.prefix,A.desc);if(v.openDialog)v.openDialog(_,A.onClose,{onKeyDown:A.onKeyDown,onKeyUp:A.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:A.value});else{var D="";typeof A.prefix!="string"&&A.prefix&&(D+=A.prefix.textContent),A.desc&&(D+=" "+A.desc),A.onClose(prompt(D,""))}}function Yn(v,A){if(v instanceof RegExp&&A instanceof RegExp){for(var _=["global","multiline","ignoreCase","source"],D=0;D<_.length;D++){var B=_[D];if(v[B]!==A[B])return!1}return!0}return!1}function wn(v,A,_,D){if(A){var B=Mn(v),W=eo(A,!!_,!!D);if(W)return Ai(v,W),Yn(W,B.getQuery())||B.setQuery(W),W}}function Fn(v){if(v.source.charAt(0)=="^")var A=!0;return{token:function(_){if(A&&!_.sol()){_.skipToEnd();return}var D=_.match(v,!1);if(D)return D[0].length==0?(_.next(),"searching"):!_.sol()&&(_.backUp(1),!v.exec(_.next()+D[0]))?(_.next(),null):(_.match(v),"searching");for(;!_.eol()&&(_.next(),!_.match(v,!1)););},query:v}}function Ai(v,A){clearTimeout(mr);var _=Mn(v);_.highlightTimeout=mr,mr=setTimeout(function(){if(v.state.vim){var D=Mn(v);D.highlightTimeout=null;var B=D.getOverlay();(!B||A!=B.query)&&(B&&v.removeOverlay(B),B=Fn(A),v.addOverlay(B),v.showMatchesOnScrollbar&&(D.getScrollbarAnnotate()&&D.getScrollbarAnnotate().clear(),D.setScrollbarAnnotate(v.showMatchesOnScrollbar(A))),D.setOverlay(B))}},50)}function Nr(v,A,_,D){return D===void 0&&(D=1),v.operation(function(){for(var B=v.getCursor(),W=v.getSearchCursor(_,B),V=0;V<D;V++){var Y=W.find(A);if(V==0&&Y&&ft(W.from(),B)){var Q=A?W.from():W.to();Y=W.find(A),Y&&!Y[0]&&ft(W.from(),Q)&&v.getLine(Q.line).length==Q.ch&&(Y=W.find(A))}if(!Y&&(W=v.getSearchCursor(_,A?new Fe(v.lastLine()):new Fe(v.firstLine(),0)),!W.find(A)))return}return W.from()})}function Ei(v,A,_,D,B){return D===void 0&&(D=1),v.operation(function(){var W=v.getCursor(),V=v.getSearchCursor(_,W),Y=V.find(!A);!B.visualMode&&Y&&ft(V.from(),W)&&V.find(!A);for(var Q=0;Q<D;Q++)if(Y=V.find(A),!Y&&(V=v.getSearchCursor(_,A?new Fe(v.lastLine()):new Fe(v.firstLine(),0)),!V.find(A)))return;return[V.from(),V.to()]})}function es(v){var A=Mn(v);A.highlightTimeout&&(clearTimeout(A.highlightTimeout),A.highlightTimeout=null),v.removeOverlay(Mn(v).getOverlay()),A.setOverlay(null),A.getScrollbarAnnotate()&&(A.getScrollbarAnnotate().clear(),A.setScrollbarAnnotate(null))}function Us(v,A,_){return typeof v!="number"&&(v=v.line),A instanceof Array?k(v,A):typeof _=="number"?v>=A&&v<=_:v==A}function mo(v){var A=v.ace.renderer;return{top:A.getFirstFullyVisibleRow(),bottom:A.getLastFullyVisibleRow()}}function oi(v,A,_){if(_=="'"||_=="`")return ze.jumpList.find(v,-1)||new Fe(0,0);if(_==".")return Eo(v);var D=A.marks[_];return D&&D.find()}function Eo(v){if(v.getLastEditEnd)return v.getLastEditEnd();for(var A=v.doc.history.done,_=A.length;_--;)if(A[_].changes)return Ge(A[_].changes[0].to)}function ts(v,A,_,D,B,W,V,Y,Q){function re(){v.operation(function(){for(;!De;)se(),ke();me()})}function se(){var Je=v.getRange(W.from(),W.to()),nt=Je.replace(V,Y),kn=W.to().line;W.replace(nt),Ve=W.to().line,B+=Ve-kn,ct=Ve<kn}function ve(){var Je=Ne&&Ge(W.to()),nt=W.findNext();return nt&&!nt[0]&&Je&&ft(W.from(),Je)&&(nt=W.findNext()),nt}function ke(){for(;ve()&&Us(W.from(),D,B);)if(!(!_&&W.from().line==Ve&&!ct)){v.scrollIntoView(W.from(),30),v.setSelection(W.from(),W.to()),Ne=W.from(),De=!1;return}De=!0}function me(Je){if(Je&&Je(),v.focus(),Ne){v.setCursor(Ne);var nt=v.state.vim;nt.exMode=!1,nt.lastHPos=nt.lastHSPos=Ne.ch}Q&&Q()}function be(Je,nt,kn){je.e_stop(Je);var ht=H(Je);switch(ht){case"y":se(),ke();break;case"n":ke();break;case"a":var Tn=Q;Q=void 0,v.operation(re),Q=Tn;break;case"l":se();case"q":case"<Esc>":case"<C-c>":case"<C-[>":me(kn)}return De&&me(kn),!0}v.state.vim.exMode=!0;var De=!1,Ne,Ve,ct;if(ke(),De){Kt(v,"No matches for "+V.source);return}if(!A){re(),Q&&Q();return}Ir(v,{prefix:mi("span","replace with ",mi("strong",Y)," (y/n/a/q/l)"),onKeyDown:be})}function si(v,A){var _=v.state.vim,D=ze.macroModeState,B=ze.registerController.getRegister("."),W=D.isPlaying,V=D.lastInsertModeChanges;W||(v.off("change",Ro),_.insertEnd&&_.insertEnd.clear(),_.insertEnd=null,je.off(v.getInputField(),"keydown",Gs)),!W&&_.insertModeRepeat>1&&(La(v,_,_.insertModeRepeat-1,!0),_.lastEditInputState.repeatOverride=_.insertModeRepeat),delete _.insertModeRepeat,_.insertMode=!1,A||v.setCursor(v.getCursor().line,v.getCursor().ch-1),v.setOption("keyMap","vim"),v.setOption("disableInput",!0),v.toggleOverwrite(!1),B.setText(V.changes.join("")),je.signal(v,"vim-mode-change",{mode:"normal"}),D.isRecording&&hr(D)}function ns(v){Ln.unshift(v)}function qs(v,A,_,D,B){var W={keys:v,type:A};W[A]=_,W[A+"Args"]=D;for(var V in B)W[V]=B[V];ns(W)}function Vs(v,A,_,D){var B=ze.registerController.getRegister(D);if(D==":"){B.keyBuffer[0]&&_r.processCommand(v,B.keyBuffer[0]),_.isPlaying=!1;return}var W=B.keyBuffer,V=0;_.isPlaying=!0,_.replaySearchQueries=B.searchQueries.slice(0);for(var Y=0;Y<W.length;Y++)for(var Q=W[Y],re,se;Q;)if(re=/<\w+-.+?>|<\w+>|./.exec(Q),se=re[0],Q=Q.substring(re.index+se.length),St.handleKey(v,se,"macro"),A.insertMode){var ve=B.insertModeChanges[V++].changes;ze.macroModeState.lastInsertModeChanges.changes=ve,as(v,ve,1),si(v)}_.isPlaying=!1}function rs(v,A){if(!v.isPlaying){var _=v.latestRegister,D=ze.registerController.getRegister(_);D&&D.pushText(A)}}function hr(v){if(!v.isPlaying){var A=v.latestRegister,_=ze.registerController.getRegister(A);_&&_.pushInsertModeChanges&&_.pushInsertModeChanges(v.lastInsertModeChanges)}}function Ks(v,A){if(!v.isPlaying){var _=v.latestRegister,D=ze.registerController.getRegister(_);D&&D.pushSearchQuery&&D.pushSearchQuery(A)}}function Ro(v,A){var _=ze.macroModeState,D=_.lastInsertModeChanges;if(!_.isPlaying)for(var B=v.state.vim;A;){if(D.expectCursorActivityForChange=!0,D.ignoreCount>1)D.ignoreCount--;else if(A.origin=="+input"||A.origin=="paste"||A.origin===void 0){var W=v.listSelections().length;W>1&&(D.ignoreCount=W);var V=A.text.join(`
1410
+ `);if(D.maybeReset&&(D.changes=[],D.maybeReset=!1),V)if(v.state.overwrite&&!/\n/.test(V))D.changes.push([V]);else{if(V.length>1){var Y=B&&B.insertEnd&&B.insertEnd.find(),Q=v.getCursor();if(Y&&Y.line==Q.line){var re=Y.ch-Q.ch;re>0&&re<V.length&&(D.changes.push([V,re]),V="")}}V&&D.changes.push(V)}}A=A.next}}function is(v){var A=v.state.vim;if(A.insertMode){var _=ze.macroModeState;if(_.isPlaying)return;var D=_.lastInsertModeChanges;D.expectCursorActivityForChange?D.expectCursorActivityForChange=!1:(D.maybeReset=!0,A.insertEnd&&A.insertEnd.clear(),A.insertEnd=v.setBookmark(v.getCursor(),{insertLeft:!0}))}else v.curOp.isVimOp||os(v,A)}function os(v,A,_){var D=v.getCursor("anchor"),B=v.getCursor("head");if(A.visualMode&&!v.somethingSelected()?Ct(v,!1):!A.visualMode&&!A.insertMode&&v.somethingSelected()&&(A.visualMode=!0,A.visualLine=!1,je.signal(v,"vim-mode-change",{mode:"visual"})),A.visualMode){var W=rt(B,D)?0:-1,V=rt(B,D)?-1:0;B=ge(B,0,W),D=ge(D,0,V),A.sel={anchor:D,head:B},gi(v,A,"<",gt(B,D)),gi(v,A,">",sn(B,D))}else!A.insertMode&&!_&&(A.lastHPos=v.getCursor().ch)}function yo(v,A){this.keyName=v,this.key=A.key,this.ctrlKey=A.ctrlKey,this.altKey=A.altKey,this.metaKey=A.metaKey,this.shiftKey=A.shiftKey}function Gs(v){var A=ze.macroModeState,_=A.lastInsertModeChanges,D=je.keyName?je.keyName(v):v.key;D&&(D.indexOf("Delete")!=-1||D.indexOf("Backspace")!=-1)&&(_.maybeReset&&(_.changes=[],_.maybeReset=!1),_.changes.push(new yo(D,v)))}function La(v,A,_,D){function B(){Y?Bn.processAction(v,A,A.lastEditActionCommand):Bn.evalInput(v,A)}function W(se){if(V.lastInsertModeChanges.changes.length>0){se=A.lastEditActionCommand?se:1;var ve=V.lastInsertModeChanges;as(v,ve.changes,se)}}var V=ze.macroModeState;V.isPlaying=!0;var Y=!!A.lastEditActionCommand,Q=A.inputState;if(A.inputState=A.lastEditInputState,Y&&A.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<_;re++)B(),W(1);else D||B(),W(_);A.inputState=Q,A.insertMode&&!D&&si(v),V.isPlaying=!1}function ss(v,A){je.lookupKey(A,"vim-insert",function(_){return typeof _=="string"?je.commands[_](v):_(v),!0})}function as(v,A,_){var D=v.getCursor("head"),B=ze.macroModeState.lastInsertModeChanges.visualBlock;B&&(ir(v,D,B+1),_=v.listSelections().length,v.setCursor(D));for(var W=0;W<_;W++){B&&v.setCursor(ge(D,W,0));for(var V=0;V<A.length;V++){var Y=A[V];if(Y instanceof yo)ss(v,Y.keyName);else if(typeof Y=="string")v.replaceSelection(Y);else{var Q=v.getCursor(),re=ge(Q,0,Y[0].length-(Y[1]||0));v.replaceRange(Y[0],Q,Y[1]?Q:re),v.setCursor(re)}}}B&&v.setCursor(ge(D,0,1))}function Ys(v,A,_,D){A.length>1&&A[0]=="n"&&(A=A.replace("numpad","")),A=Dr[A]||A;var B="";if(_.ctrlKey&&(B+="C-"),_.altKey&&(B+="A-"),(B||A.length>1)&&_.shiftKey&&(B+="S-"),D&&!D.expectLiteralNext&&A.length==1){if(Xn.keymap&&A in Xn.keymap)(Xn.remapCtrl!==!1||!B)&&(A=Xn.keymap[A]);else if(A.charCodeAt(0)>255){var W=_.code&&_.code.slice(-1)||"";_.shiftKey||(W=W.toLowerCase()),W&&(A=W)}}return B+=A,B.length>1&&(B="<"+B+">"),B}function ls(v){var A=new v.constructor;return Object.keys(v).forEach(function(_){if(_!="insertEnd"){var D=v[_];Array.isArray(D)?D=D.slice():D&&typeof D=="object"&&D.constructor!=Object&&(D=ls(D)),A[_]=D}}),v.sel&&(A.sel={head:v.sel.head&&Ge(v.sel.head),anchor:v.sel.anchor&&Ge(v.sel.anchor)}),A}function Mo(v,A,_){var D=!1,B=St.maybeInitVimState_(v),W=B.visualBlock||B.wasInVisualBlock,V=v.ace.inMultiSelectMode;if(B.wasInVisualBlock&&!V?B.wasInVisualBlock=!1:V&&B.visualBlock&&(B.wasInVisualBlock=!0),A=="<Esc>"&&!B.insertMode&&!B.visualMode&&V)v.ace.exitMultiSelectMode();else if(W||!V||v.ace.inVirtualSelectionMode)D=St.handleKey(v,A,_);else{var Y=ls(B),Q=B.inputState.changeQueueList||[];v.operation(function(){v.curOp.isVimOp=!0;var re=0;v.ace.forEachSelection(function(){var se=v.ace.selection;v.state.vim.lastHPos=se.$desiredColumn==null?se.lead.column:se.$desiredColumn,v.state.vim.inputState.changeQueue=Q[re];var ve=v.getCursor("head"),ke=v.getCursor("anchor"),me=rt(ve,ke)?0:-1,be=rt(ve,ke)?-1:0;ve=ge(ve,0,me),ke=ge(ke,0,be),v.state.vim.sel.head=ve,v.state.vim.sel.anchor=ke,D=wi(v,A,_),se.$desiredColumn=v.state.vim.lastHPos==-1?null:v.state.vim.lastHPos,v.ace.inVirtualSelectionMode&&(Q[re]=v.state.vim.inputState.changeQueue),v.virtualSelectionMode()&&(v.state.vim=ls(Y)),re++}),v.curOp.cursorActivity&&!D&&(v.curOp.cursorActivity=!1),B.status=v.state.vim.status,v.state.vim=B,B.inputState.changeQueueList=Q,B.inputState.changeQueue=null},!0)}return D&&!B.visualMode&&!B.insert&&B.visualMode!=v.somethingSelected()&&os(v,B,!0),D}function Ri(v,A){A.off("beforeEndOperation",Ri);var _=A.state.cm.vimCmd;_&&A.execCommand(_.exec?_:_.name,_.args),A.curOp=A.prevOp}var dr=n("../range").Range,vo=n("../lib/event_emitter").EventEmitter,to=n("../lib/dom"),Oa=n("../lib/oop"),Cl=n("../lib/keys"),Lo=n("../lib/event"),no=n("../search").Search,Oo=n("../lib/useragent"),cs=n("../search_highlight").SearchHighlight,Io=n("../commands/multi_select_commands"),Ia=n("../mode/text").Mode.prototype.tokenRe,bo=n("../ext/hardwrap").hardWrap;n("../multi_select");var je=function(v){this.ace=v,this.state={},this.marks={},this.options={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};je.Pos=function(v,A){if(!(this instanceof Fe))return new Fe(v,A);this.line=v,this.ch=A},je.defineOption=function(v,A,_){},je.commands={redo:function(v){v.ace.redo()},undo:function(v){v.ace.undo()},newlineAndIndent:function(v){v.ace.insert(`
1411
+ `)},goLineLeft:function(v){v.ace.selection.moveCursorLineStart()},goLineRight:function(v){v.ace.selection.moveCursorLineEnd()}},je.keyMap={},je.addClass=je.rmClass=function(){},je.e_stop=je.e_preventDefault=Lo.stopEvent,je.keyName=function(v){var A=Cl[v.keyCode]||v.key||"";return A.length==1&&(A=A.toUpperCase()),A=Lo.getModifierString(v).replace(/(^|-)\w/g,function(_){return _.toUpperCase()})+A,A},je.keyMap.default=function(v){return function(A){var _=A.ace.commands.commandKeyBinding[v.toLowerCase()];return _&&A.ace.execCommand(_)!==!1}},je.lookupKey=function v(A,_,D){_||(_="default"),typeof _=="string"&&(_=je.keyMap[_]||je.keyMap.default);var B=typeof _=="function"?_(A):_[A];if(B===!1)return"nothing";if(B==="...")return"multi";if(B!=null&&D(B))return"handled";if(_.fallthrough){if(!Array.isArray(_.fallthrough))return v(A,_.fallthrough,D);for(var W=0;W<_.fallthrough.length;W++){var V=v(A,_.fallthrough[W],D);if(V)return V}}},je.findMatchingTag=function(v,A){return v.findMatchingTag(A)},je.findEnclosingTag=function(v,A){},je.signal=function(v,A,_){return v._signal(A,_)},je.on=Lo.addListener,je.off=Lo.removeListener,je.isWordChar=function(v){return v<""?/^\w$/.test(v):(Ia.lastIndex=0,Ia.test(v))},(function(){Oa.implement(je.prototype,vo),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 D={text:_.action[0]=="i"?_.lines:[]},B=this.curOp=this.curOp||{};B.changeHandlers||(B.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),B.lastChange?B.lastChange.next=B.lastChange=D:B.lastChange=B.change=D,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(Io.keyboardHandler)},this.operation=function(_,D){if(!D&&this.curOp||D&&this.curOp&&this.curOp.force)return _();if((D||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var B=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var W=this.curOp=this.curOp||{};this.curOp.force=D;var V=_();return this.ace.curOp&&this.ace.curOp.command.name=="vim"&&(this.state.dialog&&(this.ace.curOp.command.scrollIntoView=this.ace.curOp.vimDialogScroll),this.ace.endOperation(),!W.cursorActivity&&!W.lastChange&&B&&(this.ace.prevOp=B)),(D||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),V},this.onBeforeEndOperation=function(){var _=this.curOp;_&&(_.change&&this.signal("change",_.change,_),_&&_.cursorActivity&&this.signal("cursorActivity",null,_),this.curOp=null)},this.signal=function(_,D,B){var W=B?B[_+"Handlers"]:(this._eventRegistry||{})[_];if(W){W=W.slice();for(var V=0;V<W.length;V++)W[V](this,D)}},this.firstLine=function(){return 0},this.lastLine=function(){return this.ace.session.getLength()-1},this.lineCount=function(){return this.ace.session.getLength()},this.setCursor=function(_,D){typeof _=="object"&&(D=_.ch,_=_.line);var B=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:_,column:D}),this.ace.selection.moveTo(_,D),B&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(_){var D=this.ace.selection,B=_=="anchor"?D.isEmpty()?D.lead:D.anchor:_=="head"||!_?D.lead:D.getRange()[_];return f(B)},this.listSelections=function(_){var D=this.ace.multiSelect.rangeList.ranges;return!D.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:D.map(function(B){return{anchor:this.clipPos(f(B.cursor==B.end?B.start:B.end)),head:this.clipPos(f(B.cursor))}},this)},this.setSelections=function(_,D){var B=this.ace.multiSelect,W=_.map(function(re){var se=d(re.anchor),ve=d(re.head),ke=dr.comparePoints(se,ve)<0?new dr.fromPoints(se,ve):new dr.fromPoints(ve,se);return ke.cursor=dr.comparePoints(ke.start,ve)?ke.end:ke.start,ke});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(W[0]);return}D?W[D]&&W.push(W.splice(D,1)[0]):W=W.reverse(),B.toSingleRange(W[0].clone());for(var V=this.ace.session,Y=0;Y<W.length;Y++){var Q=V.$clipRangeToDocument(W[Y]);B.addRange(Q)}},this.setSelection=function(_,D,B){var W=this.ace.selection;W.moveTo(_.line,_.ch),W.selectTo(D.line,D.ch),B&&B.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(_){return!this.ace.selection.isEmpty()},this.clipPos=function(_){var D=this.ace.session.$clipPositionToDocument(_.line,_.ch);return f(D)},this.foldCode=function(_){this.ace.session.$toggleFoldWidget(_.line,{})},this.markText=function(_){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(_){var D=_.action=="insert",B=_.start,W=_.end,V=(W.row-B.row)*(D?1:-1),Y=(W.column-B.column)*(D?1:-1);D&&(W=B);for(var Q in this.marks){var re=this.marks[Q],se=dr.comparePoints(re,B);if(!(se<0)){if(se===0&&D)if(!re.$insertRight)se=1;else{if(re.bias!=1){re.bias=-1;continue}se=1}var ve=D?se:dr.comparePoints(re,W);if(ve>0){re.row+=V,re.column+=re.row==W.row?Y:0;continue}!D&&ve<=0&&(re.row=B.row,re.column=B.column,ve===0&&(re.bias=1))}}};var v=function(_,D,B,W){this.cm=_,this.id=D,this.row=B,this.column=W,_.marks[this.id]=this};v.prototype.clear=function(){delete this.cm.marks[this.id]},v.prototype.find=function(){return f(this)},this.setBookmark=function(_,D){var B=new v(this,this.$uid++,_.line,_.ch);return(!D||!D.insertLeft)&&(B.$insertRight=!0),this.marks[B.id]=B,B},this.moveH=function(_,D){if(D=="char"){var B=this.ace.selection;B.clearSelection(),B.moveCursorBy(0,_)}},this.findPosV=function(_,D,B,W){if(B=="page"){var V=this.ace.renderer,Y=V.layerConfig;D*=Math.floor(Y.height/Y.lineHeight),B="line"}if(B=="line"){var Q=this.ace.session.documentToScreenPosition(_.line,_.ch);W!=null&&(Q.column=W),Q.row+=D,Q.row=Math.min(Math.max(0,Q.row),this.ace.session.getScreenLength()-1);var re=this.ace.session.screenToDocumentPosition(Q.row,Q.column);return f(re)}debugger},this.charCoords=function(_,D){if(D=="div"||!D){var B=this.ace.session.documentToScreenPosition(_.line,_.ch);return{left:B.column,top:B.row}}if(D=="local"){var W=this.ace.renderer,B=this.ace.session.documentToScreenPosition(_.line,_.ch),V=W.layerConfig.lineHeight,Y=W.layerConfig.characterWidth,Q=V*B.row;return{left:B.column*Y,top:Q,bottom:Q+V}}},this.coordsChar=function(_,D){var B=this.ace.renderer;if(D=="local"){var W=Math.max(0,Math.floor(_.top/B.lineHeight)),V=Math.max(0,Math.floor(_.left/B.characterWidth)),Y=B.session.screenToDocumentPosition(W,V);return f(Y)}if(D=="div")throw"not implemented"},this.getSearchCursor=function(_,D,B){var W=!1,V=!1;_ instanceof RegExp&&!_.global&&(W=!_.ignoreCase,_=_.source,V=!0),_=="\\n"&&(_=`
1412
+ `,V=!1);var Y=new no;D.ch==null&&(D.ch=Number.MAX_VALUE);var Q={row:D.line,column:D.ch},re=this,se=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(ve){Y.setOptions({needle:_,caseSensitive:W,wrap:!1,backwards:ve,regExp:V,start:se||Q});var ke=Y.find(re.ace.session);return se=ke,se&&[!se.isEmpty()]},from:function(){return se&&f(se.start)},to:function(){return se&&f(se.end)},replace:function(ve){se&&(se.end=re.ace.session.doc.replace(se,ve))}}},this.scrollTo=function(_,D){var B=this.ace.renderer,W=B.layerConfig,V=W.maxHeight;V-=(B.$size.scrollerHeight-B.lineHeight)*B.$scrollPastEnd,D!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(D,V))),_!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(_,W.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(_,D){if(_){var B=this.ace.renderer,W={top:0,bottom:D};B.scrollCursorIntoView(d(_),B.lineHeight*2/B.$size.scrollerHeight,W)}},this.getLine=function(_){return this.ace.session.getLine(_)},this.getRange=function(_,D){return this.ace.session.getTextRange(new dr(_.line,_.ch,D.line,D.ch))},this.replaceRange=function(_,D,B){B||(B=D);var W=new dr(D.line,D.ch,B.line,B.ch);return this.ace.session.$clipRangeToDocument(W),this.ace.session.replace(W,_)},this.replaceSelection=this.replaceSelections=function(_){var D=Array.isArray(_)&&_,B=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(B.getRange(),D?_[0]||"":_);return}B.inVirtualSelectionMode=!0;var W=B.rangeList.ranges;W.length||(W=[this.ace.multiSelect.getRange()]);for(var V=W.length;V--;)this.ace.session.replace(W[V],D?_[V]||"":_);B.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 A={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(_,D){switch(this.state[_]=D,_){case"indentWithTabs":_=A[_],D=!D;break;case"keyMap":this.state.$keyMap=D;return;default:_=A[_]}_&&this.ace.setOption(_,D)},this.getOption=function(_){var D,B=A[_];switch(B&&(D=this.ace.getOption(B)),_){case"indentWithTabs":return _=A[_],!D;case"keyMap":return this.state.$keyMap||"vim"}return B?D:this.state[_]},this.toggleOverwrite=function(_){return this.state.overwrite=_,this.ace.setOverwrite(_)},this.addOverlay=function(_){if(!this.$searchHighlight||!this.$searchHighlight.session){var D=new cs(null,"ace_highlight-marker","text"),B=this.ace.session.addDynamicMarker(D);D.id=B.id,D.session=this.ace.session,D.destroy=function(V){D.session.off("change",D.updateOnChange),D.session.off("changeEditor",D.destroy),D.session.removeMarker(D.id),D.session=null},D.updateOnChange=function(V){var Y=V.start.row;Y==V.end.row?D.cache[Y]=void 0:D.cache.splice(Y,D.cache.length)},D.session.on("changeEditor",D.destroy),D.session.on("change",D.updateOnChange)}var W=new RegExp(_.query.source,"gmi");this.$searchHighlight=_.highlight=D,this.$searchHighlight.setRegexp(W),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(_){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var _=this.ace.renderer,D=_.layerConfig;return{left:_.scrollLeft,top:_.scrollTop,height:D.maxHeight,width:D.width,clientHeight:D.height,clientWidth:D.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(_){return this.ace.setValue(_,-1)},this.getTokenTypeAt=function(_){var D=this.ace.session.getTokenAt(_.line,_.ch);return D&&/comment|string/.test(D.type)?"string":""},this.findMatchingBracket=function(_){var D=this.ace.session.findMatchingBracket(d(_));return{to:D&&f(D)}},this.findMatchingTag=function(_){var D=this.ace.session.getMatchingTags(d(_));if(D)return{open:{from:f(D.openTag.start),to:f(D.openTag.end)},close:{from:f(D.closeTag.start),to:f(D.closeTag.end)}}},this.indentLine=function(_,D){D===!0?this.ace.session.indentRows(_,_," "):D===!1&&this.ace.session.outdentRows(new dr(_,0,_,0))},this.indexFromPos=function(_){return this.ace.session.doc.positionToIndex(d(_))},this.posFromIndex=function(_){return f(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(_,D,B,W){var V=W.bracketRegex.source,Y=/paren|text|operator|tag/;if(D==1)var Q=this.ace.session.$findClosingBracket(V.slice(1,2),d(_),Y);else{var Q=this.ace.session.$findOpeningBracket(V.slice(-2,-1),{row:_.line,column:_.ch+1},Y);!Q&&W.bracketRegex&&W.bracketRegex.test(this.getLine(_.line)[_.ch-1])&&(Q={row:_.line,column:_.ch-1})}return Q&&{pos:f(Q)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(_){if(je.commands.hasOwnProperty(_))return je.commands[_](this);if(_=="indentAuto")return this.ace.execCommand("autoindent");console.log(_+" is not implemented")},this.getLineNumber=function(_){var D=this.$lineHandleChanges;if(!D)return null;for(var B=_.row,W=0;W<D.length;W++){var V=D[W];if(V.start.row!=V.end.row){if(V.action[0]=="i")V.start.row<B&&(B+=V.end.row-V.start.row);else if(V.start.row<B){if(B<V.end.row||B==V.end.row&&V.start.column>0)return null;B-=V.end.row-V.start.row}}}return B},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 f(_.$lastDelta.end)}}).call(je.prototype);var Na=je.StringStream=function(v,A){this.pos=this.start=0,this.string=v,this.tabSize=A||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Na.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(v){var A=this.string.charAt(this.pos);if(typeof v=="string")var _=A==v;else var _=A&&(v.test?v.test(A):v(A));if(_)return++this.pos,A},eatWhile:function(v){for(var A=this.pos;this.eat(v););return this.pos>A},eatSpace:function(){for(var v=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>v},skipToEnd:function(){this.pos=this.string.length},skipTo:function(v){var A=this.string.indexOf(v,this.pos);if(A>-1)return this.pos=A,!0},backUp:function(v){this.pos-=v},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(v,A,_){if(typeof v!="string"){var D=this.string.slice(this.pos).match(v);return D&&D.index>0?null:(D&&A!==!1&&(this.pos+=D[0].length),D)}var B=function(V){return _?V.toLowerCase():V},W=this.string.substr(this.pos,v.length);if(B(W)==B(v))return A!==!1&&(this.pos+=v.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(v,A){this.lineStart+=v;try{return A()}finally{this.lineStart-=v}}},je.defineExtension=function(v,A){je.prototype[v]=A},to.importCssString(`.normal-mode .ace_cursor{
1413
+ border: none;
1414
+ background-color: rgba(255,0,0,0.5);
1415
+ }
1416
+ .normal-mode .ace_hidden-cursors .ace_cursor{
1417
+ background-color: transparent;
1418
+ border: 1px solid red;
1419
+ opacity: 0.7
1420
+ }
1421
+ .ace_dialog {
1422
+ position: absolute;
1423
+ left: 0; right: 0;
1424
+ background: inherit;
1425
+ z-index: 15;
1426
+ padding: .1em .8em;
1427
+ overflow: hidden;
1428
+ color: inherit;
1429
+ }
1430
+ .ace_dialog-top {
1431
+ border-bottom: 1px solid #444;
1432
+ top: 0;
1433
+ }
1434
+ .ace_dialog-bottom {
1435
+ border-top: 1px solid #444;
1436
+ bottom: 0;
1437
+ }
1438
+ .ace_dialog input {
1439
+ border: none;
1440
+ outline: none;
1441
+ background: transparent;
1442
+ width: 20em;
1443
+ color: inherit;
1444
+ font-family: monospace;
1445
+ }`,"vimMode",!1),function(){function v(_,D,B){var W=_.ace.container,V;return V=W.appendChild(document.createElement("div")),B?V.className="ace_dialog ace_dialog-bottom":V.className="ace_dialog ace_dialog-top",typeof D=="string"?V.innerHTML=D:V.appendChild(D),V}function A(_,D){_.state.currentNotificationClose&&_.state.currentNotificationClose(),_.state.currentNotificationClose=D}je.defineExtension("openDialog",function(_,D,B){function W(ve){if(typeof ve=="string")re.value=ve;else{if(Y||ve&&ve.type=="blur"&&document.activeElement===re)return;Q.state.dialog==V&&(Q.state.dialog=null,Q.focus()),Y=!0,V.remove(),B.onClose&&B.onClose(V);var ke=Q;ke.state.vim&&(ke.state.vim.status=null,ke.ace._signal("changeStatus"),ke.ace.renderer.$loop.schedule(ke.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){B||(B={}),A(this,null);var V=v(this,_,B.bottom),Y=!1,Q=this;this.state.dialog=V;var re=V.getElementsByTagName("input")[0],se;return re?(B.value&&(re.value=B.value,B.selectValueOnOpen!==!1&&re.select()),B.onInput&&je.on(re,"input",function(ve){B.onInput(ve,re.value,W)}),B.onKeyUp&&je.on(re,"keyup",function(ve){B.onKeyUp(ve,re.value,W)}),je.on(re,"keydown",function(ve){B&&B.onKeyDown&&B.onKeyDown(ve,re.value,W)||(ve.keyCode==13&&D(re.value),(ve.keyCode==27||B.closeOnEnter!==!1&&ve.keyCode==13)&&(je.e_stop(ve),W()))}),B.closeOnBlur!==!1&&je.on(re,"blur",W),re.focus()):(se=V.getElementsByTagName("button")[0])&&(je.on(se,"click",function(){W(),Q.focus()}),B.closeOnBlur!==!1&&je.on(se,"blur",W),se.focus()),W}}),je.defineExtension("openNotification",function(_,D){function B(){V||(V=!0,clearTimeout(Y),W.remove())}if(!this.virtualSelectionMode()){A(this,B);var W=v(this,_,D&&D.bottom),V=!1,Y,Q=D&&typeof D.duration<"u"?D.duration:5e3;return je.on(W,"click",function(re){je.e_preventDefault(re),B()}),Q&&(Y=setTimeout(B,Q)),B}})}();var Fe=je.Pos,Ln=[{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"}],No=Ln.length,yi=[{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"}],Xn=I(""),Da=/[\d]/,Do=[je.isWordChar,function(v){return v&&!je.isWordChar(v)&&!/\s/.test(v)}],Mi=[function(v){return/\S/.test(v)}],wo=["<",">"],an=["-",'"',".",":","_","/","+"],nn=/^\w$/,ln;try{ln=new RegExp("^[\\p{Lu}]$","u")}catch{ln=/^[A-Z]$/}var Gt={};R("filetype",void 0,"string",["ft"],function(v,A){if(A!==void 0){if(v===void 0){var _=A.getOption("mode");return _=="null"?"":_}var _=v==""?"null":v;A.setOption("mode",_)}}),R("textwidth",80,"number",["tw"],function(v,A){if(A!==void 0){if(v===void 0){var _=A.getOption("textwidth");return _}var D=Math.round(v);D>1&&A.setOption("textwidth",D)}});var Li=function(){function v(Q,re,se){function ve(De){var Ne=++B%D,Ve=Y[Ne];Ve&&Ve.clear(),Y[Ne]=Q.setBookmark(De)}var ke=B%D,me=Y[ke];if(me){var be=me.find();be&&!ft(be,re)&&ve(re)}else ve(re);ve(se),W=B,V=B-D+1,V<0&&(V=0)}function A(Q,re){B+=re,B>W?B=W:B<V&&(B=V);var se=Y[(D+B)%D];if(se&&!se.find()){var ve=re>0?1:-1,ke,me=Q.getCursor();do if(B+=ve,se=Y[(D+B)%D],se&&(ke=se.find())&&!ft(me,ke))break;while(B<W&&B>V)}return se}function _(Q,re){var se=B,ve=A(Q,re);return B=se,ve&&ve.find()}var D=100,B=-1,W=0,V=0,Y=new Array(D);return{cachedCursor:void 0,add:v,find:_,move:A}},Pn=function(v){return v?{changes:v.changes,expectCursorActivityForChange:v.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};x.prototype={exitMacroRecordMode:function(){var v=ze.macroModeState;v.onRecordingDone&&v.onRecordingDone(),v.onRecordingDone=void 0,v.isRecording=!1},enterMacroRecordMode:function(v,A){var _=ze.registerController.getRegister(A);if(_){if(_.clear(),this.latestRegister=A,v.openDialog){var D=mi("span",{class:"cm-vim-message"},"recording @"+A);this.onRecordingDone=v.openDialog(D,null,{bottom:!0})}this.isRecording=!0}}};var ze,xn,St={enterVimMode:p,leaveVimMode:g,buildKeyMap:function(){},getRegisterController:function(){return ze.registerController},resetVimGlobalState_:O,getVimGlobalState_:function(){return ze},maybeInitVimState_:M,suppressErrorLogging:!1,InsertModeKey:yo,map:function(v,A,_){_r.map(v,A,_)},unmap:function(v,A){return _r.unmap(v,A)},noremap:function(v,A,_){_r.map(v,A,_,!0)},mapclear:function(v){var A=Ln.length,_=No,D=Ln.slice(0,A-_);if(Ln=Ln.slice(A-_),v)for(var B=D.length-1;B>=0;B--){var W=D[B];if(v!==W.context)if(W.context)this._mapCommand(W);else{var V=["normal","insert","visual"];for(var Y in V)if(V[Y]!==v){var Q={};for(var re in W)Q[re]=W[re];Q.context=V[Y],this._mapCommand(Q)}}}},langmap:P,vimKeyFromEvent:H,setOption:T,getOption:S,defineOption:R,defineEx:function(v,A,_){if(!A)A=v;else if(v.indexOf(A)!==0)throw new Error('(Vim.defineEx) "'+A+'" is not a prefix of "'+v+'", command not registered');Xs[v]=_,_r.commandMap_[A]={name:v,shortName:A,type:"api"}},handleKey:function(v,A,_){var D=this.findKey(v,A,_);if(typeof D=="function")return D()},multiSelectHandleKey:Mo,findKey:function(v,A,_){function D(){var re=ze.macroModeState;if(re.isRecording){if(A=="q")return re.exitMacroRecordMode(),C(v),!0;_!="mapping"&&rs(re,A)}}function B(){if(A=="<Esc>"){if(Y.visualMode)Ct(v);else{if(!Y.insertMode)return;si(v)}return C(v),!0}}function W(){if(B())return!0;Y.inputState.keyBuffer.push(A);var re=Y.inputState.keyBuffer.join(""),se=A.length==1,ve=Bn.matchCommand(re,Ln,Y.inputState,"insert"),ke=Y.inputState.changeQueue;if(ve.type=="none")return C(v),!1;if(ve.type=="partial"){if(ve.expectLiteralNext&&(Y.expectLiteralNext=!0),xn&&window.clearTimeout(xn),xn=se&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&C(v)},S("insertModeEscKeysTimeout")),se){var me=v.listSelections();(!ke||ke.removed.length!=me.length)&&(ke=Y.inputState.changeQueue=new N),ke.inserted+=A;for(var be=0;be<me.length;be++){var De=gt(me[be].anchor,me[be].head),Ne=sn(me[be].anchor,me[be].head),Ve=v.getRange(De,v.state.overwrite?ge(Ne,0,1):Ne);ke.removed[be]=(ke.removed[be]||"")+Ve}}return!se}if(Y.expectLiteralNext=!1,xn&&window.clearTimeout(xn),ve.command&&ke){for(var me=v.listSelections(),be=0;be<me.length;be++){var ct=me[be].head;v.replaceRange(ke.removed[be]||"",ge(ct,0,-ke.inserted.length),ct,"+input")}ze.macroModeState.lastInsertModeChanges.changes.pop()}return ve.command||C(v),ve.command}function V(){if(D()||B())return!0;Y.inputState.keyBuffer.push(A);var re=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var se=/^(\d*)(.*)$/.exec(re);if(!se)return C(v),!1;var ve=Y.visualMode?"visual":"normal",ke=se[2]||se[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==ke&&(ke=Y.inputState.operatorShortcut);var me=Bn.matchCommand(ke,Ln,Y.inputState,ve);return me.type=="none"?(C(v),!1):me.type=="partial"?(me.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):me.type=="clear"?(C(v),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,se=/^(\d*)(.*)$/.exec(re),se[1]&&se[1]!="0"&&Y.inputState.pushRepeatDigit(se[1]),me.command)}var Y=M(v),Q;return Y.insertMode?Q=W():Q=V(),Q===!1?!Y.insertMode&&A.length===1?function(){return!0}:void 0:Q===!0?function(){return!0}:function(){if(!((Q.operator||Q.isEdit)&&v.getOption("readOnly")))return v.operation(function(){v.curOp.isVimOp=!0;try{Q.type=="keyToKey"?L(v,Q.toKeys,Q):Bn.processCommand(v,Y,Q)}catch(re){throw v.state.vim=void 0,M(v),St.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(v,A){_r.processCommand(v,A)},defineMotion:te,defineAction:ae,defineOperator:ne,mapCommand:qs,_mapCommand:ns,defineRegister:U,exitVisualMode:Ct,exitInsertMode:si},Hr=[],pn=!1,_n,or={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},Ur={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},Oi={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(or)).forEach(function(v){Oi[(or[v]||"").toLowerCase()]=Oi[v.toLowerCase()]=v}),R("langmap",void 0,"string",["lmap"],function(v,A){if(v===void 0)return Xn.string;P(v)}),$.prototype.pushRepeatDigit=function(v){this.operator?this.motionRepeat=this.motionRepeat.concat(v):this.prefixRepeat=this.prefixRepeat.concat(v)},$.prototype.getRepeat=function(){var v=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(v=1,this.prefixRepeat.length>0&&(v*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(v*=parseInt(this.motionRepeat.join(""),10))),v},j.prototype={setText:function(v,A,_){this.keyBuffer=[v||""],this.linewise=!!A,this.blockwise=!!_},pushText:function(v,A){A&&(this.linewise||this.keyBuffer.push(`
1446
+ `),this.linewise=!0),this.keyBuffer.push(v)},pushInsertModeChanges:function(v){this.insertModeChanges.push(Pn(v))},pushSearchQuery:function(v){this.searchQueries.push(v)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},K.prototype={pushText:function(v,A,_,D,B){if(v!=="_"){D&&_.charAt(_.length-1)!==`
1447
+ `&&(_+=`
1448
+ `);var W=this.isValidRegister(v)?this.getRegister(v):null;if(!W){switch(A){case"yank":this.registers[0]=new j(_,D,B);break;case"delete":case"change":_.indexOf(`
1449
+ `)==-1?this.registers["-"]=new j(_,D):(this.shiftNumericRegisters_(),this.registers[1]=new j(_,D))}this.unnamedRegister.setText(_,D,B);return}var V=l(v);V?W.pushText(_,D):W.setText(_,D,B),v==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(_),this.unnamedRegister.setText(W.toString(),D)}},getRegister:function(v){return this.isValidRegister(v)?(v=v.toLowerCase(),this.registers[v]||(this.registers[v]=new j),this.registers[v]):this.unnamedRegister},isValidRegister:function(v){return v&&(k(v,an)||nn.test(v))},shiftNumericRegisters_:function(){for(var v=9;v>=2;v--)this.registers[v]=this.getRegister(""+(v-1))}},Z.prototype={nextMatch:function(v,A){var _=this.historyBuffer,D=A?-1:1;this.initialPrefix===null&&(this.initialPrefix=v);for(var B=this.iterator+D;A?B>=0:B<_.length;B+=D)for(var W=_[B],V=0;V<=W.length;V++)if(this.initialPrefix==W.substring(0,V))return this.iterator=B,W;if(B>=_.length)return this.iterator=_.length,this.initialPrefix;if(B<0)return v},pushInput:function(v){var A=this.historyBuffer.indexOf(v);A>-1&&this.historyBuffer.splice(A,1),v.length&&this.historyBuffer.push(v)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Bn={matchCommand:function(v,A,_,D){var B=Ee(v,A,D,_);if(!B.full&&!B.partial)return{type:"none"};if(!B.full&&B.partial)return{type:"partial",expectLiteralNext:B.partial.length==1&&B.partial[0].keys.slice(-11)=="<character>"};for(var W,V=0;V<B.full.length;V++){var Y=B.full[V];W||(W=Y)}if(W.keys.slice(-11)=="<character>"||W.keys.slice(-10)=="<register>"){var Q=Le(v);if(!Q||Q.length>1)return{type:"clear"};_.selectedCharacter=Q}return{type:"full",command:W}},processCommand:function(v,A,_){switch(A.inputState.repeatOverride=_.repeatOverride,_.type){case"motion":this.processMotion(v,A,_);break;case"operator":this.processOperator(v,A,_);break;case"operatorMotion":this.processOperatorMotion(v,A,_);break;case"action":this.processAction(v,A,_);break;case"search":this.processSearch(v,A,_);break;case"ex":case"keyToEx":this.processEx(v,A,_);break}},processMotion:function(v,A,_){A.inputState.motion=_.motion,A.inputState.motionArgs=ce(_.motionArgs),this.evalInput(v,A)},processOperator:function(v,A,_){var D=A.inputState;if(D.operator){if(D.operator==_.operator){D.motion="expandToLine",D.motionArgs={linewise:!0},this.evalInput(v,A);return}C(v)}D.operator=_.operator,D.operatorArgs=ce(_.operatorArgs),_.keys.length>1&&(D.operatorShortcut=_.keys),_.exitVisualBlock&&(A.visualBlock=!1,Qe(v)),A.visualMode&&this.evalInput(v,A)},processOperatorMotion:function(v,A,_){var D=A.visualMode,B=ce(_.operatorMotionArgs);B&&D&&B.visualLine&&(A.visualLine=!0),this.processOperator(v,A,_),D||this.processMotion(v,A,_)},processAction:function(v,A,_){var D=A.inputState,B=D.getRepeat(),W=!!B,V=ce(_.actionArgs)||{};D.selectedCharacter&&(V.selectedCharacter=D.selectedCharacter),_.operator&&this.processOperator(v,A,_),_.motion&&this.processMotion(v,A,_),(_.motion||_.operator)&&this.evalInput(v,A),V.repeat=B||1,V.repeatIsExplicit=W,V.registerName=D.registerName,C(v),A.lastMotion=null,_.isEdit&&this.recordLastEdit(A,D,_),jn[_.action](v,V,A)},processSearch:function(v,A,_){function D(Ne,Ve,ct){ze.searchHistoryController.pushInput(Ne),ze.searchHistoryController.reset();try{wn(v,Ne,Ve,ct)}catch{Kt(v,"Invalid regex: "+Ne),C(v);return}Bn.processMotion(v,A,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:_.searchArgs.toJumplist}})}function B(Ne){D(Ne,!0,!0);var Ve=ze.macroModeState;Ve.isRecording&&Ks(Ve,Ne)}function W(Ne,Ve,ct){var Je=H(Ne),nt,kn;Je=="<Up>"||Je=="<Down>"?(nt=Je=="<Up>",kn=Ne.target?Ne.target.selectionEnd:0,Ve=ze.searchHistoryController.nextMatch(Ve,nt)||"",ct(Ve),kn&&Ne.target&&(Ne.target.selectionEnd=Ne.target.selectionStart=Math.min(kn,Ne.target.value.length))):Je&&Je!="<Left>"&&Je!="<Right>"&&ze.searchHistoryController.reset();var ht;try{ht=wn(v,Ve,!0,!0)}catch{}ht?v.scrollIntoView(Nr(v,!Y,ht),30):(es(v),v.scrollTo(ve.left,ve.top))}function V(Ne,Ve,ct){var Je=H(Ne);Je=="<Esc>"||Je=="<C-c>"||Je=="<C-[>"||Je=="<BS>"&&Ve==""?(ze.searchHistoryController.pushInput(Ve),ze.searchHistoryController.reset(),wn(v,se),es(v),v.scrollTo(ve.left,ve.top),je.e_stop(Ne),C(v),ct(),v.focus()):Je=="<Up>"||Je=="<Down>"?je.e_stop(Ne):Je=="<C-u>"&&(je.e_stop(Ne),ct(""))}if(v.getSearchCursor){var Y=_.searchArgs.forward,Q=_.searchArgs.wholeWordOnly;Mn(v).setReversed(!Y);var re=Y?"/":"?",se=Mn(v).getQuery(),ve=v.getScrollInfo();switch(_.searchArgs.querySrc){case"prompt":var ke=ze.macroModeState;if(ke.isPlaying){var De=ke.replaySearchQueries.shift();D(De,!0,!1)}else Ir(v,{onClose:B,prefix:re,desc:"(JavaScript regexp)",onKeyUp:W,onKeyDown:V});break;case"wordUnderCursor":var me=kt(v,{noSymbol:!0}),be=!0;if(me||(me=kt(v,{noSymbol:!1}),be=!1),!me){Kt(v,"No word under cursor"),C(v);return}var De=v.getLine(me.start.line).substring(me.start.ch,me.end.ch);be&&Q?De="\\b"+De+"\\b":De=bn(De),ze.jumpList.cachedCursor=v.getCursor(),v.setCursor(me.start),D(De,!0,!1)}}},processEx:function(v,A,_){function D(W){ze.exCommandHistoryController.pushInput(W),ze.exCommandHistoryController.reset(),_r.processCommand(v,W),v.state.vim&&C(v)}function B(W,V,Y){var Q=H(W),re,se;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&V=="")&&(ze.exCommandHistoryController.pushInput(V),ze.exCommandHistoryController.reset(),je.e_stop(W),C(v),Y(),v.focus()),Q=="<Up>"||Q=="<Down>"?(je.e_stop(W),re=Q=="<Up>",se=W.target?W.target.selectionEnd:0,V=ze.exCommandHistoryController.nextMatch(V,re)||"",Y(V),se&&W.target&&(W.target.selectionEnd=W.target.selectionStart=Math.min(se,W.target.value.length))):Q=="<C-u>"?(je.e_stop(W),Y("")):Q&&Q!="<Left>"&&Q!="<Right>"&&ze.exCommandHistoryController.reset()}_.type=="keyToEx"?_r.processCommand(v,_.exArgs.input):A.visualMode?Ir(v,{onClose:D,prefix:":",value:"'<,'>",onKeyDown:B,selectValueOnOpen:!1}):Ir(v,{onClose:D,prefix:":",onKeyDown:B})},evalInput:function(v,A){var _=A.inputState,D=_.motion,B=_.motionArgs||{},W=_.operator,V=_.operatorArgs||{},Y=_.registerName,Q=A.sel,re=Ge(A.visualMode?ue(v,Q.head):v.getCursor("head")),se=Ge(A.visualMode?ue(v,Q.anchor):v.getCursor("anchor")),ve=Ge(re),ke=Ge(se),me,be,De;if(W&&this.recordLastEdit(A,_),_.repeatOverride!==void 0?De=_.repeatOverride:De=_.getRepeat(),De>0&&B.explicitRepeat?B.repeatIsExplicit=!0:(B.noRepeat||!B.explicitRepeat&&De===0)&&(De=1,B.repeatIsExplicit=!1),_.selectedCharacter&&(B.selectedCharacter=V.selectedCharacter=_.selectedCharacter),B.repeat=De,C(v),D){var Ne=ai[D](v,re,B,A,_);if(A.lastMotion=ai[D],!Ne)return;if(B.toJumplist){!W&&v.ace.curOp!=null&&(v.ace.curOp.command.scrollIntoView="center-animate");var Ve=ze.jumpList,ct=Ve.cachedCursor;ct?(Mr(v,ct,Ne),delete Ve.cachedCursor):Mr(v,re,Ne)}Ne instanceof Array?(be=Ne[0],me=Ne[1]):me=Ne,me||(me=Ge(re)),A.visualMode?((!A.visualBlock||me.ch!==1/0)&&(me=ue(v,me,ve)),be&&(be=ue(v,be)),be=be||ke,Q.anchor=be,Q.head=me,Qe(v),gi(v,A,"<",rt(be,me)?be:me),gi(v,A,">",rt(be,me)?me:be)):W||(v.ace.curOp&&(v.ace.curOp.vimDialogScroll="center-animate"),me=ue(v,me,ve),v.setCursor(me.line,me.ch))}if(W){if(V.lastSel){be=ke;var Je=V.lastSel,nt=Math.abs(Je.head.line-Je.anchor.line),kn=Math.abs(Je.head.ch-Je.anchor.ch);Je.visualLine?me=new Fe(ke.line+nt,ke.ch):Je.visualBlock?me=new Fe(ke.line+nt,ke.ch+kn):Je.head.line==Je.anchor.line?me=new Fe(ke.line,ke.ch+kn):me=new Fe(ke.line+nt,ke.ch),A.visualMode=!0,A.visualLine=Je.visualLine,A.visualBlock=Je.visualBlock,Q=A.sel={anchor:be,head:me},Qe(v)}else A.visualMode&&(V.lastSel={anchor:Ge(Q.anchor),head:Ge(Q.head),visualBlock:A.visualBlock,visualLine:A.visualLine});var ht,Tn,Tt,It,sr;if(A.visualMode){ht=gt(Q.head,Q.anchor),Tn=sn(Q.head,Q.anchor),Tt=A.visualLine||V.linewise,It=A.visualBlock?"block":Tt?"line":"char";var yr=b(v,ht,Tn);if(sr=mt(v,{anchor:yr.start,head:yr.end},It),Tt){var An=sr.ranges;if(It=="block")for(var q=0;q<An.length;q++)An[q].head.ch=Jt(v,An[q].head.line);else It=="line"&&(An[0].head=new Fe(An[0].head.line+1,0))}}else{if(ht=Ge(be||ke),Tn=Ge(me||ve),rt(Tn,ht)){var X=ht;ht=Tn,Tn=X}Tt=B.linewise||V.linewise,Tt?Dt(v,ht,Tn):B.forward&&Pt(v,ht,Tn),It="char";var ie=!B.inclusive||Tt,yr=b(v,ht,Tn);sr=mt(v,{anchor:yr.start,head:yr.end},It,ie)}v.setSelections(sr.ranges,sr.primary),A.lastMotion=null,V.repeat=De,V.registerName=Y,V.linewise=Tt;var oe=us[W](v,V,sr.ranges,ke,me);A.visualMode&&Ct(v,oe!=null),oe&&v.setCursor(oe)}},recordLastEdit:function(v,A,_){var D=ze.macroModeState;D.isPlaying||(v.lastEditInputState=A,v.lastEditActionCommand=_,D.lastInsertModeChanges.changes=[],D.lastInsertModeChanges.expectCursorActivityForChange=!1,D.lastInsertModeChanges.visualBlock=v.visualBlock?v.sel.head.line-v.sel.anchor.line:0)}},ai={moveToTopLine:function(v,A,_){var D=mo(v).top+_.repeat-1;return new Fe(D,pt(v.getLine(D)))},moveToMiddleLine:function(v){var A=mo(v),_=Math.floor((A.top+A.bottom)*.5);return new Fe(_,pt(v.getLine(_)))},moveToBottomLine:function(v,A,_){var D=mo(v).bottom-_.repeat+1;return new Fe(D,pt(v.getLine(D)))},expandToLine:function(v,A,_){var D=A;return new Fe(D.line+_.repeat-1,1/0)},findNext:function(v,A,_){var D=Mn(v),B=D.getQuery();if(B){var W=!_.forward;return W=D.isReversed()?!W:W,Ai(v,B),Nr(v,W,B,_.repeat)}},findAndSelectNextInclusive:function(v,A,_,D,B){var W=Mn(v),V=W.getQuery();if(V){var Y=!_.forward;Y=W.isReversed()?!Y:Y;var Q=Ei(v,Y,V,_.repeat,D);if(Q){if(B.operator)return Q;var re=Q[0],se=new Fe(Q[1].line,Q[1].ch-1);if(D.visualMode){(D.visualLine||D.visualBlock)&&(D.visualLine=!1,D.visualBlock=!1,je.signal(v,"vim-mode-change",{mode:"visual",subMode:""}));var ve=D.sel.anchor;if(ve)return W.isReversed()?_.forward?[ve,re]:[ve,se]:_.forward?[ve,se]:[ve,re]}else D.visualMode=!0,D.visualLine=!1,D.visualBlock=!1,je.signal(v,"vim-mode-change",{mode:"visual",subMode:""});return Y?[se,re]:[re,se]}}},goToMark:function(v,A,_,D){var B=oi(v,D,_.selectedCharacter);return B?_.linewise?{line:B.line,ch:pt(v.getLine(B.line))}:B:null},moveToOtherHighlightedEnd:function(v,A,_,D){if(D.visualBlock&&_.sameLine){var B=D.sel;return[ue(v,new Fe(B.anchor.line,B.head.ch)),ue(v,new Fe(B.head.line,B.anchor.ch))]}return[D.sel.head,D.sel.anchor]},jumpToMark:function(v,A,_,D){for(var B=A,W=0;W<_.repeat;W++){var V=B;for(var Y in D.marks)if(h(Y)){var Q=D.marks[Y].find(),re=_.forward?rt(Q,V):rt(V,Q);if(!re&&!(_.linewise&&Q.line==V.line)){var se=ft(V,B),ve=_.forward?vn(V,Q,B):vn(B,Q,V);(se||ve)&&(B=Q)}}}return _.linewise&&(B=new Fe(B.line,pt(v.getLine(B.line)))),B},moveByCharacters:function(v,A,_){var D=A,B=_.repeat,W=_.forward?D.ch+B:D.ch-B;return new Fe(D.line,W)},moveByLines:function(v,A,_,D){var B=A,W=B.ch;switch(D.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:W=D.lastHPos;break;default:D.lastHPos=W}var V=_.repeat+(_.repeatOffset||0),Y=_.forward?B.line+V:B.line-V,Q=v.firstLine(),re=v.lastLine();if(Y<Q&&B.line==Q)return this.moveToStartOfLine(v,A,_,D);if(Y>re&&B.line==re)return Ao(v,A,_,D,!0);var se=v.ace.session.getFoldLine(Y);return se&&(_.forward?Y>se.start.row&&(Y=se.end.row+1):Y=se.start.row),_.toFirstChar&&(W=pt(v.getLine(Y)),D.lastHPos=W),D.lastHSPos=v.charCoords(new Fe(Y,W),"div").left,new Fe(Y,W)},moveByDisplayLines:function(v,A,_,D){var B=A;switch(D.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:D.lastHSPos=v.charCoords(B,"div").left}var W=_.repeat,Q=v.findPosV(B,_.forward?W:-W,"line",D.lastHSPos);if(Q.hitSide)if(_.forward)var V=v.charCoords(Q,"div"),Y={top:V.top+8,left:D.lastHSPos},Q=v.coordsChar(Y,"div");else{var re=v.charCoords(new Fe(v.firstLine(),0),"div");re.left=D.lastHSPos,Q=v.coordsChar(re,"div")}return D.lastHPos=Q.ch,Q},moveByPage:function(v,A,_){var D=A,B=_.repeat;return v.findPosV(D,_.forward?B:-B,"page")},moveByParagraph:function(v,A,_){var D=_.forward?1:-1;return zs(v,A,_.repeat,D)},moveBySentence:function(v,A,_){var D=_.forward?1:-1;return Qi(v,A,_.repeat,D)},moveByScroll:function(v,A,_,D){var B=v.getScrollInfo(),W=null,V=_.repeat;V||(V=B.clientHeight/(2*v.defaultTextHeight()));var Y=v.charCoords(A,"local");if(_.repeat=V,W=ai.moveByDisplayLines(v,A,_,D),!W)return null;var Q=v.charCoords(W,"local");return v.scrollTo(null,B.top+Q.top-Y.top),W},moveByWords:function(v,A,_){return kr(v,A,_.repeat,!!_.forward,!!_.wordEnd,!!_.bigWord)},moveTillCharacter:function(v,A,_){var D=_.repeat,B=Jo(v,D,_.forward,_.selectedCharacter,A),W=_.forward?-1:1;return ii(W,_),B?(B.ch+=W,B):null},moveToCharacter:function(v,A,_){var D=_.repeat;return ii(0,_),Jo(v,D,_.forward,_.selectedCharacter,A)||A},moveToSymbol:function(v,A,_){var D=_.repeat;return Xi(v,D,_.forward,_.selectedCharacter)||A},moveToColumn:function(v,A,_,D){var B=_.repeat;return D.lastHPos=B-1,D.lastHSPos=v.charCoords(A,"div").left,xl(v,B)},moveToEol:function(v,A,_,D){return Ao(v,A,_,D,!1)},moveToFirstNonWhiteSpaceCharacter:function(v,A){var _=A;return new Fe(_.line,pt(v.getLine(_.line)))},moveToMatchedSymbol:function(v,A){for(var _=A,D=_.line,B=_.ch,W=v.getLine(D),V;B<W.length;B++)if(V=W.charAt(B),V&&c(V)){var Y=v.getTokenTypeAt(new Fe(D,B+1));if(Y!=="string"&&Y!=="comment")break}if(B<W.length){var Q=/[<>]/.test(W[B])?/[(){}[\]<>]/:/[(){}[\]]/,re=v.findMatchingBracket(new Fe(D,B+1),{bracketRegex:Q});return re.to}return _},moveToStartOfLine:function(v,A){return new Fe(A.line,0)},moveToLineOrEdgeOfDocument:function(v,A,_){var D=_.forward?v.lastLine():v.firstLine();return _.repeatIsExplicit&&(D=_.repeat-v.getOption("firstLineNumber")),new Fe(D,pt(v.getLine(D)))},moveToStartOfDisplayLine:function(v){return v.execCommand("goLineLeft"),v.getCursor()},moveToEndOfDisplayLine:function(v){v.execCommand("goLineRight");var A=v.getCursor();return A.sticky=="before"&&A.ch--,A},textObjectManipulation:function(v,A,_,D){var B={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},W={"'":!0,'"':!0,"`":!0},V=_.selectedCharacter;V=="b"?V="(":V=="B"&&(V="{");var Y=!_.textObjectInner,Q,re;if(B[V]){if(re=!0,Q=Gn(v,A,V,Y),!Q){var se=v.getSearchCursor(new RegExp("\\"+V,"g"),A);se.find()&&(Q=Gn(v,se.from(),V,Y))}}else if(W[V])re=!0,Q=Lr(v,A,V,Y);else if(V==="W"||V==="w")for(var ve=_.repeat||1;ve-- >0;){var ke=kt(v,{inclusive:Y,innerWord:!Y,bigWord:V==="W",noSymbol:V==="W",multiline:!0},Q&&Q.end);ke&&(Q||(Q=ke),Q.end=ke.end)}else if(V==="p")if(Q=zs(v,A,_.repeat,0,Y),_.linewise=!0,D.visualMode)D.visualLine||(D.visualLine=!0);else{var me=D.inputState.operatorArgs;me&&(me.linewise=!0),Q.end.line--}else if(V==="t")Q=$n(v,A,Y);else if(V==="s"){var be=v.getLine(A.line);A.ch>0&&w(be[A.ch])&&(A.ch-=1);var De=Ea(v,A,_.repeat,1,Y),Ne=Ea(v,A,_.repeat,-1,Y);m(v.getLine(Ne.line)[Ne.ch])&&m(v.getLine(De.line)[De.ch-1])&&(Ne={line:Ne.line,ch:Ne.ch+1}),Q={start:Ne,end:De}}return Q?v.state.vim.visualMode?He(v,Q.start,Q.end,re):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(v,A,_){var D=ze.lastCharacterSearch,B=_.repeat,W=_.forward===D.forward,V=(D.increment?1:0)*(W?-1:1);v.moveH(-V,"char"),_.inclusive=!!W;var Y=Jo(v,B,W,D.selectedCharacter);return Y?(Y.ch+=V,Y):(v.moveH(V,"char"),A)}},us={change:function(v,A,_){var D,B,W=v.state.vim,V=_[0].anchor,Y=_[0].head;if(W.visualMode)if(A.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,v.setSelection(V,Y),B=v.getSelection(),v.replaceSelection(""),D=V;else{B=v.getSelection();var Q=he("",_.length);v.replaceSelections(Q),D=gt(_[0].head,_[0].anchor)}else{B=v.getRange(V,Y);var re=W.lastEditInputState||{};if(re.motion=="moveByWords"&&!m(B)){var se=/\s+$/.exec(B);se&&re.motionArgs&&re.motionArgs.forward&&(Y=ge(Y,0,-se[0].length),B=B.slice(0,-se[0].length))}A.linewise&&(V=new Fe(V.line,pt(v.getLine(V.line))),Y.line>V.line&&(Y=new Fe(Y.line-1,Number.MAX_VALUE))),v.replaceRange("",V,Y),D=V}ze.registerController.pushText(A.registerName,"change",B,A.linewise,_.length>1),jn.enterInsertMode(v,{head:D},v.state.vim)},delete:function(v,A,_){var D,B,W=v.state.vim;if(W.visualBlock){B=v.getSelection();var V=he("",_.length);v.replaceSelections(V),D=gt(_[0].head,_[0].anchor)}else{var Y=_[0].anchor,Q=_[0].head;A.linewise&&Q.line!=v.firstLine()&&Y.line==v.lastLine()&&Y.line==Q.line-1&&(Y.line==v.firstLine()?Y.ch=0:Y=new Fe(Y.line-1,Jt(v,Y.line-1))),B=v.getRange(Y,Q),v.replaceRange("",Y,Q),D=Y,A.linewise&&(D=ai.moveToFirstNonWhiteSpaceCharacter(v,Y))}return ze.registerController.pushText(A.registerName,"delete",B,A.linewise,W.visualBlock),ue(v,D)},indent:function(v,A,_){var D=v.state.vim,B=D.visualMode?A.repeat:1;if(D.visualBlock){for(var W=v.getOption("tabSize"),V=v.getOption("indentWithTabs")?" ":" ".repeat(W),Y,Q=_.length-1;Q>=0;Q--)if(Y=gt(_[Q].anchor,_[Q].head),A.indentRight)v.replaceRange(V.repeat(B),Y,Y);else{for(var re=v.getLine(Y.line),se=0,ve=0;ve<B;ve++){var ke=re[Y.ch+se];if(ke==" ")se++;else{if(ke!=" ")break;se++;for(var me=1;me<V.length&&(ke=re[Y.ch+se],ke===" ");me++)se++}}v.replaceRange("",Y,ge(Y,0,se))}return Y}if(v.indentMore)for(var ve=0;ve<B;ve++)A.indentRight?v.indentMore():v.indentLess();else{var be=_[0].anchor.line,De=D.visualBlock?_[_.length-1].anchor.line:_[0].head.line;A.linewise&&De--;for(var Q=be;Q<=De;Q++)for(var ve=0;ve<B;ve++)v.indentLine(Q,A.indentRight)}return ai.moveToFirstNonWhiteSpaceCharacter(v,_[0].anchor)},indentAuto:function(v,A,_){return v.execCommand("indentAuto"),ai.moveToFirstNonWhiteSpaceCharacter(v,_[0].anchor)},hardWrap:function(v,A,_,D,B){if(v.hardWrap){var W=_[0].anchor.line,V=_[0].head.line;A.linewise&&V--;var Y=v.hardWrap({from:W,to:V});return Y>W&&A.linewise&&Y--,A.keepCursor?D:new Fe(Y,0)}},changeCase:function(v,A,_,D,B){for(var W=v.getSelections(),V=[],Y=A.toLower,Q=0;Q<W.length;Q++){var re=W[Q],se="";if(Y===!0)se=re.toLowerCase();else if(Y===!1)se=re.toUpperCase();else for(var ve=0;ve<re.length;ve++){var ke=re.charAt(ve);se+=l(ke)?ke.toLowerCase():ke.toUpperCase()}V.push(se)}return v.replaceSelections(V),A.shouldMoveCursor?B:!v.state.vim.visualMode&&A.linewise&&_[0].anchor.line+1==_[0].head.line?ai.moveToFirstNonWhiteSpaceCharacter(v,D):A.linewise?D:gt(_[0].anchor,_[0].head)},yank:function(v,A,_,D){var B=v.state.vim,W=v.getSelection(),V=B.visualMode?gt(B.sel.anchor,B.sel.head,_[0].head,_[0].anchor):D;return ze.registerController.pushText(A.registerName,"yank",W,A.linewise,B.visualBlock),V}},jn={jumpListWalk:function(v,A,_){if(!_.visualMode){var D=A.repeat,B=A.forward,W=ze.jumpList,V=W.move(v,B?D:-D),Y=V?V.find():void 0;Y=Y||v.getCursor(),v.setCursor(Y),v.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(v,A,_){if(!_.visualMode){var D=A.repeat||1,B=v.defaultTextHeight(),W=v.getScrollInfo().top,V=B*D,Y=A.forward?W+V:W-V,Q=Ge(v.getCursor()),re=v.charCoords(Q,"local");if(A.forward)Y>re.top?(Q.line+=(Y-re.top)/B,Q.line=Math.ceil(Q.line),v.setCursor(Q),re=v.charCoords(Q,"local"),v.scrollTo(null,re.top)):v.scrollTo(null,Y);else{var se=Y+v.getScrollInfo().clientHeight;se<re.bottom?(Q.line-=(re.bottom-se)/B,Q.line=Math.floor(Q.line),v.setCursor(Q),re=v.charCoords(Q,"local"),v.scrollTo(null,re.bottom-v.getScrollInfo().clientHeight)):v.scrollTo(null,Y)}}},scrollToCursor:function(v,A){var _=v.getCursor().line,D=v.charCoords(new Fe(_,0),"local"),B=v.getScrollInfo().clientHeight,W=D.top;switch(A.position){case"center":W=D.bottom-B/2;break;case"bottom":var V=new Fe(_,v.getLine(_).length-1),Y=v.charCoords(V,"local"),Q=Y.bottom-W;W=W-B+Q}v.scrollTo(null,W)},replayMacro:function(v,A,_){var D=A.selectedCharacter,B=A.repeat,W=ze.macroModeState;for(D=="@"?D=W.latestRegister:W.latestRegister=D;B--;)Vs(v,_,W,D)},enterMacroRecordMode:function(v,A){var _=ze.macroModeState,D=A.selectedCharacter;ze.registerController.isValidRegister(D)&&_.enterMacroRecordMode(v,D)},toggleOverwrite:function(v){v.state.overwrite?(v.toggleOverwrite(!1),v.setOption("keyMap","vim-insert"),je.signal(v,"vim-mode-change",{mode:"insert"})):(v.toggleOverwrite(!0),v.setOption("keyMap","vim-replace"),je.signal(v,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(v,A,_){if(!v.getOption("readOnly")){_.insertMode=!0,_.insertModeRepeat=A&&A.repeat||1;var D=A?A.insertAt:null,B=_.sel,W=A.head||v.getCursor("head"),V=v.listSelections().length;if(D=="eol")W=new Fe(W.line,Jt(v,W.line));else if(D=="bol")W=new Fe(W.line,0);else if(D=="charAfter"){var Y=b(v,W,ge(W,0,1));W=Y.end}else if(D=="firstNonBlank"){var Y=b(v,W,ai.moveToFirstNonWhiteSpaceCharacter(v,W));W=Y.end}else if(D=="startOfSelectedArea"){if(!_.visualMode)return;_.visualBlock?(W=new Fe(Math.min(B.head.line,B.anchor.line),Math.min(B.head.ch,B.anchor.ch)),V=Math.abs(B.head.line-B.anchor.line)+1):B.head.line<B.anchor.line?W=B.head:W=new Fe(B.anchor.line,0)}else if(D=="endOfSelectedArea"){if(!_.visualMode)return;_.visualBlock?(W=new Fe(Math.min(B.head.line,B.anchor.line),Math.max(B.head.ch,B.anchor.ch)+1),V=Math.abs(B.head.line-B.anchor.line)+1):B.head.line>=B.anchor.line?W=ge(B.head,0,1):W=new Fe(B.anchor.line,0)}else if(D=="inplace"){if(_.visualMode)return}else D=="lastEdit"&&(W=Eo(v)||W);v.setOption("disableInput",!1),A&&A.replace?(v.toggleOverwrite(!0),v.setOption("keyMap","vim-replace"),je.signal(v,"vim-mode-change",{mode:"replace"})):(v.toggleOverwrite(!1),v.setOption("keyMap","vim-insert"),je.signal(v,"vim-mode-change",{mode:"insert"})),ze.macroModeState.isPlaying||(v.on("change",Ro),_.insertEnd&&_.insertEnd.clear(),_.insertEnd=v.setBookmark(W,{insertLeft:!0}),je.on(v.getInputField(),"keydown",Gs)),_.visualMode&&Ct(v),ir(v,W,V)}},toggleVisualMode:function(v,A,_){var D=A.repeat,B=v.getCursor(),W;if(_.visualMode)_.visualLine^A.linewise||_.visualBlock^A.blockwise?(_.visualLine=!!A.linewise,_.visualBlock=!!A.blockwise,je.signal(v,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""}),Qe(v)):Ct(v);else{_.visualMode=!0,_.visualLine=!!A.linewise,_.visualBlock=!!A.blockwise,W=ue(v,new Fe(B.line,B.ch+D-1));var V=b(v,B,W);_.sel={anchor:V.start,head:V.end},je.signal(v,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""}),Qe(v),gi(v,_,"<",gt(B,W)),gi(v,_,">",sn(B,W))}},reselectLastSelection:function(v,A,_){var D=_.lastSelection;if(_.visualMode&&Se(v,_),D){var B=D.anchorMark.find(),W=D.headMark.find();if(!B||!W)return;_.sel={anchor:B,head:W},_.visualMode=!0,_.visualLine=D.visualLine,_.visualBlock=D.visualBlock,Qe(v),gi(v,_,"<",gt(B,W)),gi(v,_,">",sn(B,W)),je.signal(v,"vim-mode-change",{mode:"visual",subMode:_.visualLine?"linewise":_.visualBlock?"blockwise":""})}},joinLines:function(v,A,_){var D,B;if(_.visualMode){if(D=v.getCursor("anchor"),B=v.getCursor("head"),rt(B,D)){var W=B;B=D,D=W}B.ch=Jt(v,B.line)-1}else{var V=Math.max(A.repeat,2);D=v.getCursor(),B=ue(v,new Fe(D.line+V-1,1/0))}for(var Y=0,Q=D.line;Q<B.line;Q++){Y=Jt(v,D.line);var re="",se=0;if(!A.keepSpaces){var ve=v.getLine(D.line+1);se=ve.search(/\S/),se==-1?se=ve.length:re=" "}v.replaceRange(re,new Fe(D.line,Y),new Fe(D.line+1,se))}var ke=ue(v,new Fe(D.line,Y));_.visualMode&&Ct(v,!1),v.setCursor(ke)},newLineAndEnterInsertMode:function(v,A,_){_.insertMode=!0;var D=Ge(v.getCursor());if(D.line===v.firstLine()&&!A.after)v.replaceRange(`
1450
+ `,new Fe(v.firstLine(),0)),v.setCursor(v.firstLine(),0);else{D.line=A.after?D.line:D.line-1,D.ch=Jt(v,D.line),v.setCursor(D);var B=je.commands.newlineAndIndentContinueComment||je.commands.newlineAndIndent;B(v)}this.enterInsertMode(v,{repeat:A.repeat},_)},paste:function(v,A,_){var D=this,B=ze.registerController.getRegister(A.registerName),W=function(){var V=B.toString();D.continuePaste(v,A,_,V,B)};A.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(V){D.continuePaste(v,A,_,V,B)},function(){W()}):W()},continuePaste:function(v,A,_,D,B){var W=Ge(v.getCursor());if(D){if(A.matchIndent){var V=v.getOption("tabSize"),Y=function(An){var q=An.split(" ").length-1,X=An.split(" ").length-1;return q*V+X*1},Q=v.getLine(v.getCursor().line),re=Y(Q.match(/^\s*/)[0]),se=D.replace(/\n$/,""),ve=D!==se,ke=Y(D.match(/^\s*/)[0]),D=se.replace(/^\s*/gm,function(An){var q=re+(Y(An)-ke);if(q<0)return"";if(v.getOption("indentWithTabs")){var X=Math.floor(q/V);return Array(X+1).join(" ")}return Array(q+1).join(" ")});D+=ve?`
1451
+ `:""}if(A.repeat>1)var D=Array(A.repeat+1).join(D);var me=B.linewise,be=B.blockwise;if(be){D=D.split(`
1452
+ `),me&&D.pop();for(var De=0;De<D.length;De++)D[De]=D[De]==""?" ":D[De];W.ch+=A.after?1:0,W.ch=Math.min(Jt(v,W.line),W.ch)}else me?_.visualMode?D=_.visualLine?D.slice(0,-1):`
1453
+ `+D.slice(0,D.length-1)+`
1454
+ `:A.after?(D=`
1455
+ `+D.slice(0,D.length-1),W.ch=Jt(v,W.line)):W.ch=0:W.ch+=A.after?1:0;var Ne;if(_.visualMode){_.lastPastedText=D;var Ve,ct=qe(v,_),Je=ct[0],nt=ct[1],kn=v.getSelection(),ht=v.listSelections(),Tn=new Array(ht.length).join("1").split("1");_.lastSelection&&(Ve=_.lastSelection.headMark.find()),ze.registerController.unnamedRegister.setText(kn),be?(v.replaceSelections(Tn),nt=new Fe(Je.line+D.length-1,Je.ch),v.setCursor(Je),Dn(v,nt),v.replaceSelections(D),Ne=Je):_.visualBlock?(v.replaceSelections(Tn),v.setCursor(Je),v.replaceRange(D,Je,Je),Ne=Je):(v.replaceRange(D,Je,nt),Ne=v.posFromIndex(v.indexFromPos(Je)+D.length-1)),Ve&&(_.lastSelection.headMark=v.setBookmark(Ve)),me&&(Ne.ch=0)}else if(be){v.setCursor(W);for(var De=0;De<D.length;De++){var Tt=W.line+De;Tt>v.lastLine()&&v.replaceRange(`
1456
+ `,new Fe(Tt,0));var It=Jt(v,Tt);It<W.ch&&Nn(v,Tt,W.ch)}v.setCursor(W),Dn(v,new Fe(W.line+D.length-1,W.ch)),v.replaceSelections(D),Ne=W}else if(v.replaceRange(D,W),me){var Tt=A.after?W.line+1:W.line;Ne=new Fe(Tt,pt(v.getLine(Tt)))}else Ne=Ge(W),/\n/.test(D)||(Ne.ch+=D.length-(A.after?1:0));_.visualMode&&Ct(v,!1),v.setCursor(Ne)}},undo:function(v,A){v.operation(function(){Xe(v,je.commands.undo,A.repeat)(),v.setCursor(ue(v,v.getCursor("start")))})},redo:function(v,A){Xe(v,je.commands.redo,A.repeat)()},setRegister:function(v,A,_){_.inputState.registerName=A.selectedCharacter},insertRegister:function(v,A,_){var D=A.selectedCharacter,B=ze.registerController.getRegister(D),W=B&&B.toString();W&&v.replaceSelection(W)},oneNormalCommand:function(v,A,_){si(v,!0),_.insertModeReturn=!0,je.on(v,"vim-command-done",function D(){_.visualMode||(_.insertModeReturn&&(_.insertModeReturn=!1,_.insertMode||jn.enterInsertMode(v,{},_)),je.off(v,"vim-command-done",D))})},setMark:function(v,A,_){var D=A.selectedCharacter;gi(v,_,D,v.getCursor())},replace:function(v,A,_){var D=A.selectedCharacter,B=v.getCursor(),W,V,Y=v.listSelections();if(_.visualMode)B=v.getCursor("start"),V=v.getCursor("end");else{var Q=v.getLine(B.line);W=B.ch+A.repeat,W>Q.length&&(W=Q.length),V=new Fe(B.line,W)}var re=b(v,B,V);if(B=re.start,V=re.end,D==`
1457
+ `)_.visualMode||v.replaceRange("",B,V),(je.commands.newlineAndIndentContinueComment||je.commands.newlineAndIndent)(v);else{var se=v.getRange(B,V);if(se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,D),se=se.replace(/[^\n]/g,D),_.visualBlock){var ve=new Array(v.getOption("tabSize")+1).join(" ");se=v.getSelection(),se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,D),se=se.replace(/\t/g,ve).replace(/[^\n]/g,D).split(`
1458
+ `),v.replaceSelections(se)}else v.replaceRange(se,B,V);_.visualMode?(B=rt(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,v.setCursor(B),Ct(v,!1)):v.setCursor(ge(V,0,-1))}},incrementNumberToken:function(v,A){for(var _=v.getCursor(),D=v.getLine(_.line),B=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,W,V,Y,Q;(W=B.exec(D))!==null&&(V=W.index,Y=V+W[0].length,!(_.ch<Y)););if(!(!A.backtrack&&Y<=_.ch)&&W){var re=W[2]||W[4],se=W[3]||W[5],ve=A.increase?1:-1,ke={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],me=parseInt(W[1]+se,ke)+ve*A.repeat;Q=me.toString(ke);var be=re?new Array(se.length-Q.length+1+W[1].length).join("0"):"";Q.charAt(0)==="-"?Q="-"+re+be+Q.substr(1):Q=re+be+Q;var De=new Fe(_.line,V),Ne=new Fe(_.line,Y);v.replaceRange(Q,De,Ne),v.setCursor(new Fe(_.line,V+Q.length-1))}},repeatLastEdit:function(v,A,_){var D=_.lastEditInputState;if(D){var B=A.repeat;B&&A.repeatIsExplicit?_.lastEditInputState.repeatOverride=B:B=_.lastEditInputState.repeatOverride||B,La(v,_,B,!1)}},indent:function(v,A){v.indentLine(v.getCursor().line,A.indentRight)},exitInsertMode:si},vi={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},bi={bracket:{isComplete:function(v){if(v.nextCh===v.symb){if(v.depth++,v.depth>=1)return!0}else v.nextCh===v.reverseSymb&&v.depth--;return!1}},section:{init:function(v){v.curMoveThrough=!0,v.symb=(v.forward?"]":"[")===v.symb?"{":"}"},isComplete:function(v){return v.index===0&&v.nextCh===v.symb}},comment:{isComplete:function(v){var A=v.lastCh==="*"&&v.nextCh==="/";return v.lastCh=v.nextCh,A}},method:{init:function(v){v.symb=v.symb==="m"?"{":"}",v.reverseSymb=v.symb==="{"?"}":"{"},isComplete:function(v){return v.nextCh===v.symb}},preprocess:{init:function(v){v.index=0},isComplete:function(v){if(v.nextCh==="#"){var A=v.lineText.match(/^#(\w+)/)[1];if(A==="endif"){if(v.forward&&v.depth===0)return!0;v.depth++}else if(A==="if"){if(!v.forward&&v.depth===0)return!0;v.depth--}if(A==="else"&&v.depth===0)return!0}return!1}}};R("pcre",!0,"boolean"),Zi.prototype={getQuery:function(){return ze.query},setQuery:function(v){ze.query=v},getOverlay:function(){return this.searchOverlay},setOverlay:function(v){this.searchOverlay=v},isReversed:function(){return ze.isReversed},setReversed:function(v){ze.isReversed=v},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(v){this.annotate=v}};var Ii={"\\n":`
1459
+ `,"\\r":"\r","\\t":" "},gr={"\\/":"/","\\\\":"\\","\\n":`
1460
+ `,"\\r":"\r","\\t":" ","\\&":"&"},mr=0,Sr=function(){this.buildCommandMap_()};Sr.prototype={processCommand:function(v,A,_){var D=this;v.operation(function(){v.curOp.isVimOp=!0,D._processCommand(v,A,_)})},_processCommand:function(v,A,_){var D=v.state.vim,B=ze.registerController.getRegister(":"),W=B.toString(),V=new je.StringStream(A);B.setText(A);var Y=_||{};Y.input=A;try{this.parseInput_(v,V,Y)}catch(se){throw Kt(v,se.toString()),se}D.visualMode&&Ct(v);var Q,re;if(!Y.commandName)Y.line!==void 0&&(re="move");else if(Q=this.matchCommand_(Y.commandName),Q){if(re=Q.name,Q.excludeFromCommandHistory&&B.setText(W),this.parseCommandArgs_(V,Y,Q),Q.type=="exToKey"){L(v,Q.toKeys,Q);return}if(Q.type=="exToEx"){this.processCommand(v,Q.toInput);return}}if(!re){Kt(v,'Not an editor command ":'+A+'"');return}try{Xs[re](v,Y),(!Q||!Q.possiblyAsync)&&Y.callback&&Y.callback()}catch(se){throw Kt(v,se.toString()),se}},parseInput_:function(v,A,_){if(A.eatWhile(":"),A.eat("%")?(_.line=v.firstLine(),_.lineEnd=v.lastLine()):(_.line=this.parseLineSpec_(v,A),_.line!==void 0&&A.eat(",")&&(_.lineEnd=this.parseLineSpec_(v,A))),_.line==null)if(v.state.vim.visualMode){var D=oi(v,v.state.vim,"<");_.selectionLine=D&&D.line,D=oi(v,v.state.vim,">"),_.selectionLineEnd=D&&D.line}else _.selectionLine=v.getCursor().line;else _.selectionLine=_.line,_.selectionLineEnd=_.lineEnd;var B=A.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return B?_.commandName=B[1]:_.commandName=A.match(/.*/)[0],_},parseLineSpec_:function(v,A){var _=A.match(/^(\d+)/);if(_)return parseInt(_[1],10)-1;switch(A.next()){case".":return this.parseLineSpecOffset_(A,v.getCursor().line);case"$":return this.parseLineSpecOffset_(A,v.lastLine());case"'":var D=A.next(),B=oi(v,v.state.vim,D);if(!B)throw new Error("Mark not set");return this.parseLineSpecOffset_(A,B.line);case"-":case"+":return A.backUp(1),this.parseLineSpecOffset_(A,v.getCursor().line);default:return A.backUp(1),void 0}},parseLineSpecOffset_:function(v,A){var _=v.match(/^([+-])?(\d+)/);if(_){var D=parseInt(_[2],10);_[1]=="-"?A-=D:A+=D}return A},parseCommandArgs_:function(v,A,_){if(!v.eol()){A.argString=v.match(/.*/)[0];var D=_.argDelimiter||/\s+/,B=xr(A.argString).split(D);B.length&&B[0]&&(A.args=B)}},matchCommand_:function(v){for(var A=v.length;A>0;A--){var _=v.substring(0,A);if(this.commandMap_[_]){var D=this.commandMap_[_];if(D.name.indexOf(v)===0)return D}}return null},buildCommandMap_:function(){this.commandMap_={};for(var v=0;v<yi.length;v++){var A=yi[v],_=A.shortName||A.name;this.commandMap_[_]=A}},map:function(v,A,_,D){if(v!=":"&&v.charAt(0)==":"){if(_)throw Error("Mode not supported for ex mappings");var B=v.substring(1);A!=":"&&A.charAt(0)==":"?this.commandMap_[B]={name:B,type:"exToEx",toInput:A.substring(1),user:!0}:this.commandMap_[B]={name:B,type:"exToKey",toKeys:A,user:!0}}else{var W={keys:v,type:"keyToKey",toKeys:A,noremap:!!D};_&&(W.context=_),Ln.unshift(W)}},unmap:function(v,A){if(v!=":"&&v.charAt(0)==":"){if(A)throw Error("Mode not supported for ex mappings");var _=v.substring(1);if(this.commandMap_[_]&&this.commandMap_[_].user)return delete this.commandMap_[_],!0}else for(var D=v,B=0;B<Ln.length;B++)if(D==Ln[B].keys&&Ln[B].context===A)return Ln.splice(B,1),!0}};var Xs={colorscheme:function(v,A){if(!A.args||A.args.length<1){Kt(v,v.getOption("theme"));return}v.setOption("theme",A.args[0])},map:function(v,A,_,D){var B=A.args;if(!B||B.length<2){v&&Kt(v,"Invalid mapping: "+A.input);return}_r.map(B[0],B[1],_,D)},imap:function(v,A){this.map(v,A,"insert")},nmap:function(v,A){this.map(v,A,"normal")},vmap:function(v,A){this.map(v,A,"visual")},omap:function(v,A){this.map(v,A,"operatorPending")},noremap:function(v,A){this.map(v,A,void 0,!0)},inoremap:function(v,A){this.map(v,A,"insert",!0)},nnoremap:function(v,A){this.map(v,A,"normal",!0)},vnoremap:function(v,A){this.map(v,A,"visual",!0)},onoremap:function(v,A){this.map(v,A,"operatorPending",!0)},unmap:function(v,A,_){var D=A.args;(!D||D.length<1||!_r.unmap(D[0],_))&&v&&Kt(v,"No such mapping: "+A.input)},mapclear:function(v,A){St.mapclear()},imapclear:function(v,A){St.mapclear("insert")},nmapclear:function(v,A){St.mapclear("normal")},vmapclear:function(v,A){St.mapclear("visual")},omapclear:function(v,A){St.mapclear("operatorPending")},move:function(v,A){Bn.processCommand(v,v.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:A.line+1})},set:function(v,A){var _=A.args,D=A.setCfg||{};if(!_||_.length<1){v&&Kt(v,"Invalid mapping: "+A.input);return}var B=_[0].split("="),W=B[0],V=B[1],Y=!1,Q=!1;if(W.charAt(W.length-1)=="?"){if(V)throw Error("Trailing characters: "+A.argString);W=W.substring(0,W.length-1),Y=!0}else W.charAt(W.length-1)=="!"&&(W=W.substring(0,W.length-1),Q=!0);V===void 0&&W.substring(0,2)=="no"&&(W=W.substring(2),V=!1);var re=Gt[W]&&Gt[W].type=="boolean";if(re&&(Q?V=!S(W,v,D):V==null&&(V=!0)),!re&&V===void 0||Y){var se=S(W,v,D);se instanceof Error?Kt(v,se.message):se===!0||se===!1?Kt(v," "+(se?"":"no")+W):Kt(v," "+W+"="+se)}else{var ve=T(W,V,v,D);ve instanceof Error&&Kt(v,ve.message)}},setlocal:function(v,A){A.setCfg={scope:"local"},this.set(v,A)},setglobal:function(v,A){A.setCfg={scope:"global"},this.set(v,A)},registers:function(v,A){var _=A.args,D=ze.registerController.registers,B=`----------Registers----------
1461
+
1462
+ `;if(_){var W;_=_.join("");for(var V=0;V<_.length;V++)if(W=_.charAt(V),!!ze.registerController.isValidRegister(W)){var Y=D[W]||new j;B+='"'+W+" "+Y.toString()+`
1463
+ `}}else for(var W in D){var Q=D[W].toString();Q.length&&(B+='"'+W+" "+Q+`
1464
+ `)}Kt(v,B)},sort:function(v,A){function _(){if(A.argString){var Tt=new je.StringStream(A.argString);if(Tt.eat("!")&&(W=!0),Tt.eol())return;if(!Tt.eatSpace())return"Invalid arguments";var It=Tt.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!It&&!Tt.eol())return"Invalid arguments";if(It[1]){V=It[1].indexOf("i")!=-1,Y=It[1].indexOf("u")!=-1;var sr=It[1].indexOf("d")!=-1||It[1].indexOf("n")!=-1&&1,yr=It[1].indexOf("x")!=-1&&1,An=It[1].indexOf("o")!=-1&&1;if(sr+yr+An>1)return"Invalid arguments";Q=sr&&"decimal"||yr&&"hex"||An&&"octal"}It[2]&&(re=new RegExp(It[2].substr(1,It[2].length-2),V?"i":""))}}function D(Tt,It){if(W){var sr;sr=Tt,Tt=It,It=sr}V&&(Tt=Tt.toLowerCase(),It=It.toLowerCase());var yr=Q&&Ne.exec(Tt),An=Q&&Ne.exec(It);return yr?(yr=parseInt((yr[1]+yr[2]).toLowerCase(),Ve),An=parseInt((An[1]+An[2]).toLowerCase(),Ve),yr-An):Tt<It?-1:1}function B(Tt,It){if(W){var sr;sr=Tt,Tt=It,It=sr}return V&&(Tt[0]=Tt[0].toLowerCase(),It[0]=It[0].toLowerCase()),Tt[0]<It[0]?-1:1}var W,V,Y,Q,re,se=_();if(se){Kt(v,se+": "+A.argString);return}var ve=A.line||v.firstLine(),ke=A.lineEnd||A.line||v.lastLine();if(ve!=ke){var me=new Fe(ve,0),be=new Fe(ke,Jt(v,ke)),De=v.getRange(me,be).split(`
1465
+ `),Ne=re||(Q=="decimal"?/(-?)([\d]+)/:Q=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Q=="octal"?/([0-7]+)/:null),Ve=Q=="decimal"?10:Q=="hex"?16:Q=="octal"?8:null,ct=[],Je=[];if(Q||re)for(var nt=0;nt<De.length;nt++){var kn=re?De[nt].match(re):null;kn&&kn[0]!=""?ct.push(kn):!re&&Ne.exec(De[nt])?ct.push(De[nt]):Je.push(De[nt])}else Je=De;if(ct.sort(re?B:D),re)for(var nt=0;nt<ct.length;nt++)ct[nt]=ct[nt].input;else Q||Je.sort(D);if(De=W?ct.concat(Je):Je.concat(ct),Y){var ht=De,Tn;De=[];for(var nt=0;nt<ht.length;nt++)ht[nt]!=Tn&&De.push(ht[nt]),Tn=ht[nt]}v.replaceRange(De.join(`
1466
+ `),me,be)}},vglobal:function(v,A){this.global(v,A)},normal:function(v,A){var _=A.argString;if(_&&_[0]=="!"&&(_=_.slice(1),pn=!0),_=_.trimStart(),!_){Kt(v,"Argument is required.");return}var D=A.line;if(typeof D=="number")for(var B=isNaN(A.lineEnd)?D:A.lineEnd,W=D;W<=B;W++)v.setCursor(W,0),L(v,A.argString.trimStart()),v.state.vim.insertMode&&si(v,!0);else L(v,A.argString.trimStart()),v.state.vim.insertMode&&si(v,!0)},global:function(v,A){var _=A.argString;if(!_){Kt(v,"Regular Expression missing from global");return}var D=A.commandName[0]==="v";_[0]==="!"&&A.commandName[0]==="g"&&(D=!0,_=_.slice(1));var B=A.line!==void 0?A.line:v.firstLine(),W=A.lineEnd||A.line||v.lastLine(),V=Or(_),Y=_,Q;if(V.length&&(Y=V[0],Q=V.slice(1,V.length).join("/")),Y)try{wn(v,Y,!0,!0)}catch{Kt(v,"Invalid regex: "+Y);return}for(var re=Mn(v).getQuery(),se=[],ve=B;ve<=W;ve++){var ke=v.getLine(ve),me=re.test(ke);me!==D&&se.push(Q?v.getLineHandle(ve):ke)}if(!Q){Kt(v,se.join(`
1467
+ `));return}var be=0,De=function(){if(be<se.length){var Ne=se[be++],Ve=v.getLineNumber(Ne);if(Ve==null){De();return}var ct=Ve+1+Q;_r.processCommand(v,ct,{callback:De})}else v.releaseLineHandles&&v.releaseLineHandles()};De()},substitute:function(v,A){if(!v.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var _=A.argString,D=_?Ji(_,_[0]):[],B,W="",V,Y,Q,re=!1,se=!1;if(D.length)B=D[0],S("pcre")&&B!==""&&(B=new RegExp(B).source),W=D[1],W!==void 0&&(S("pcre")?W=_l(W.replace(/([^\\])&/g,"$1$$&")):W=Sl(W),ze.lastSubstituteReplacePart=W),V=D[2]?D[2].split(" "):[];else if(_&&_.length){Kt(v,"Substitutions should be of the form :s/pattern/replace/");return}if(V&&(Y=V[0],Q=parseInt(V[1]),Y&&(Y.indexOf("c")!=-1&&(re=!0),Y.indexOf("g")!=-1&&(se=!0),S("pcre")?B=B+"/"+Y:B=B.replace(/\//g,"\\/")+"/"+Y)),B)try{wn(v,B,!0,!0)}catch{Kt(v,"Invalid regex: "+B);return}if(W=W||ze.lastSubstituteReplacePart,W===void 0){Kt(v,"No previous substitute regular expression");return}var ve=Mn(v),ke=ve.getQuery(),me=A.line!==void 0?A.line:v.getCursor().line,be=A.lineEnd||me;me==v.firstLine()&&be==v.lastLine()&&(be=1/0),Q&&(me=be,be=me+Q-1);var De=ue(v,new Fe(me,0)),Ne=v.getSearchCursor(ke,De);ts(v,re,se,me,be,Ne,ke,W,A.callback)},startinsert:function(v,A){L(v,A.argString=="!"?"A":"i",{})},redo:je.commands.redo,undo:je.commands.undo,write:function(v){je.commands.save?je.commands.save(v):v.save&&v.save()},nohlsearch:function(v){es(v)},yank:function(v){var A=Ge(v.getCursor()),_=A.line,D=v.getLine(_);ze.registerController.pushText("0","yank",D,!0,!0)},delete:function(v,A){var _=A.selectionLine,D=isNaN(A.selectionLineEnd)?_:A.selectionLineEnd;us.delete(v,{linewise:!0},[{anchor:new Fe(_,0),head:new Fe(D+1,0)}])},join:function(v,A){var _=A.selectionLine,D=isNaN(A.selectionLineEnd)?_:A.selectionLineEnd;v.setCursor(new Fe(_,0)),jn.joinLines(v,{repeat:D-_},v.state.vim)},delmarks:function(v,A){if(!A.argString||!xr(A.argString)){Kt(v,"Argument required");return}for(var _=v.state.vim,D=new je.StringStream(xr(A.argString));!D.eol();){D.eatSpace();var B=D.pos;if(!D.match(/[a-zA-Z]/,!1)){Kt(v,"Invalid argument: "+A.argString.substring(B));return}var W=D.next();if(D.match("-",!0)){if(!D.match(/[a-zA-Z]/,!1)){Kt(v,"Invalid argument: "+A.argString.substring(B));return}var V=W,Y=D.next();if(!(h(V)&&h(Y)||l(V)&&l(Y))){Kt(v,"Invalid argument: "+V+"-");return}var Q=V.charCodeAt(0),re=Y.charCodeAt(0);if(Q>=re){Kt(v,"Invalid argument: "+A.argString.substring(B));return}for(var se=0;se<=re-Q;se++){var ve=String.fromCharCode(Q+se);delete _.marks[ve]}}else delete _.marks[W]}}},_r=new Sr;R("insertModeEscKeysTimeout",200,"number"),je.Vim=St;var Dr={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"},wi=St.handleKey.bind(St);St.handleKey=function(v,A,_){return v.operation(function(){return wi(v,A,_)},!0)},O(),r.CodeMirror=je;var xi=St.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(v,A,_,D,B){var W=this.state.vim||{},V=_.characterWidth,Y=_.lineHeight,Q=A.top,re=A.left;if(!W.insertMode){var se=D.cursor?dr.comparePoints(D.cursor,D.start)<=0:B.selection.isBackwards()||B.selection.isEmpty();!se&&re>V&&(re-=V)}!W.insertMode&&W.status&&(Y/=2,Q+=Y),to.translate(v,re,Q),to.setStyle(v.style,"width",V+"px"),to.setStyle(v.style,"height",Y+"px")},$getDirectionForHighlight:function(v){var A=v.state.cm,_=xi(A);if(!_.insertMode)return v.session.selection.isBackwards()||v.session.selection.isEmpty()},handleKeyboard:function(v,A,_,D,B){var W=v.editor,V=W.state.cm,Y=xi(V);if(D!=-1){if(Y.insertMode||(A==-1?(_.charCodeAt(0)>255&&v.inputKey&&(_=v.inputKey,_&&v.inputHash==4&&(_=_.toUpperCase())),v.inputChar=_):A==4||A==0?v.inputKey==_&&v.inputHash==A&&v.inputChar?(_=v.inputChar,A=-1):(v.inputChar=null,v.inputKey=_,v.inputHash=A):v.inputChar=v.inputKey=null),V.state.overwrite&&Y.insertMode&&_=="backspace"&&A==0)return{command:"gotoleft"};if(_=="c"&&A==1&&!Oo.isMac&&W.getCopyText())return W.once("copy",function(){Y.insertMode?W.selection.clearSelection():V.operation(function(){Ct(V)})}),{command:"null",passEvent:!0};if(_=="esc"&&!Y.insertMode&&!Y.visualMode&&!V.ace.inMultiSelectMode){var Q=Mn(V),re=Q.getOverlay();re&&V.removeOverlay(re)}if(A==-1||A&1||A===0&&_.length>1){var se=Y.insertMode,ve=Ys(A,_,B||{},Y);Y.status==null&&(Y.status="");var ke=Mo(V,ve,"user");return Y=xi(V),ke&&Y.status!=null?Y.status+=ve:Y.status==null&&(Y.status=""),V._signal("changeStatus"),!ke&&(A!=-1||se)?void 0:{command:"null",passEvent:!ke}}}},attach:function(v){function A(){var D=xi(_).insertMode;_.ace.renderer.setStyle("normal-mode",!D),v.textInput.setCommandMode(!D),v.renderer.$keepTextAreaAtCursor=D,v.renderer.$blockCursor=!D}v.state||(v.state={});var _=new je(v);v.state.cm=_,v.$vimModeHandler=this,p(_),xi(_).status=null,_.on("vim-command-done",function(){_.virtualSelectionMode()||(xi(_).status=null,_.ace._signal("changeStatus"),_.ace.session.markUndoGroup())}),_.on("changeStatus",function(){_.ace.renderer.updateCursor(),_.ace._signal("changeStatus")}),_.on("vim-mode-change",function(){_.virtualSelectionMode()||(A(),_._signal("changeStatus"))}),A(),v.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(_)},detach:function(v){var A=v.state.cm;g(A),A.destroy(),v.state.cm=null,v.$vimModeHandler=null,v.renderer.$cursorLayer.drawCursor=null,v.renderer.setStyle("normal-mode",!1),v.textInput.setCommandMode(!1),v.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(v){var A=v.state.cm,_=xi(A);if(_.insertMode)return"INSERT";var D="";return _.visualMode&&(D+="VISUAL",_.visualLine&&(D+=" LINE"),_.visualBlock&&(D+=" BLOCK")),_.status&&(D+=(D?" ":"")+_.status),D}},St.defineOption({name:"wrap",set:function(v,A){A&&A.ace.setOption("wrap",v)},type:"boolean"},!1),St.defineEx("write","w",function(){console.log(":write is not implemented")}),Ln.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"}}),Ln.push({keys:"gq",type:"operator",operator:"hardWrap"}),St.defineOperator("hardWrap",function(v,A,_,D,B){var W=_[0].anchor.line,V=_[0].head.line;return A.linewise&&V--,bo(v.ace,{startRow:W,endRow:V}),Fe(V,0)}),R("textwidth",void 0,"number",["tw"],function(v,A){if(A!==void 0){if(v===void 0){var _=A.ace.getOption("printMarginColumn");return _}var D=Math.round(v);D>1&&A.ace.setOption("printMarginColumn",D)}}),jn.aceCommand=function(v,A,_){v.vimCmd=A,v.ace.inVirtualSelectionMode?v.ace.on("beforeEndOperation",Ri):Ri(null,v.ace)},jn.fold=function(v,A,_){v.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(A.all?2:0)+(A.open?1:0)])},No=Ln.length,r.handler.defaultKeymap=Ln,r.handler.actions=jn,r.Vim=St}),function(){ace.require(["ace/keyboard/vim"],function(n){t&&(t.exports=n)})}()}(qm)),qm.exports}S$();var wc={exports:{}};/**
1468
+ * @license
1469
+ * Lodash <https://lodash.com/>
1470
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
1471
+ * Released under MIT license <https://lodash.com/license>
1472
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1473
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1474
+ */var _$=wc.exports,Km;function C$(){return Km||(Km=1,function(t,e){(function(){var n,r="4.17.21",u=200,d="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",f="Expected a function",b="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",g=500,i="__lodash_placeholder__",a=1,h=2,c=4,o=1,l=2,m=1,w=2,k=4,R=8,T=16,S=32,x=64,M=128,O=256,F=512,L=30,H="...",P=800,I=16,$=1,C=2,N=3,j=1/0,U=9007199254740991,K=17976931348623157e292,Z=NaN,te=4294967295,he=te-1,ne=te>>>1,ae=[["ary",M],["bind",m],["bindKey",w],["curry",R],["curryRight",T],["flip",F],["partial",S],["partialRight",x],["rearg",O]],ue="[object Arguments]",ce="[object Array]",ge="[object AsyncFunction]",Ee="[object Boolean]",Re="[object Date]",Le="[object DOMException]",Xe="[object Error]",Ge="[object Function]",ft="[object GeneratorFunction]",rt="[object Map]",gt="[object Number]",sn="[object Null]",vn="[object Object]",Jt="[object Promise]",xr="[object Proxy]",bn="[object RegExp]",Nn="[object Set]",Dn="[object String]",ir="[object Symbol]",xt="[object Undefined]",qe="[object WeakMap]",Se="[object WeakSet]",He="[object ArrayBuffer]",Qe="[object DataView]",mt="[object Float32Array]",$t="[object Float64Array]",Ct="[object Int8Array]",Pt="[object Int16Array]",Dt="[object Int32Array]",pt="[object Uint8Array]",kt="[object Uint8ClampedArray]",$n="[object Uint16Array]",Mr="[object Uint32Array]",ii=/\b__p \+= '';/g,Xi=/\b(__p \+=) '' \+/g,To=/(__e\(.*?\)|\b__t\)) \+\n'';/g,kr=/&(?:amp|lt|gt|quot|#39);/g,Ao=/[&<>"']/g,Jo=RegExp(kr.source),xl=RegExp(Ao.source),gi=/<%-([\s\S]+?)%>/g,kl=/<%([\s\S]+?)%>/g,zs=/<%=([\s\S]+?)%>/g,Ea=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qi=/^\w*$/,Gn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Lr=/[\\^$.*+?()[\]{}|]/g,Zi=RegExp(Lr.source),Mn=/^\s+/,Or=/\s/,go=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ji=/\{\n\/\* \[wrapped with (.+)\] \*/,Hs=/,? & /,Ra=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Sl=/[()=,{}\[\]\/\s]/,_l=/\\(\\)?/g,eo=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,mi=/\w*$/,Kt=/^[-+]0x[0-9a-f]+$/i,Ma=/^0b[01]+$/i,Ir=/^\[object .+?Constructor\]$/,Yn=/^0o[0-7]+$/i,wn=/^(?:0|[1-9]\d*)$/,Fn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ai=/($^)/,Nr=/['\n\r\u2028\u2029\\]/g,Ei="\\ud800-\\udfff",es="\\u0300-\\u036f",Us="\\ufe20-\\ufe2f",mo="\\u20d0-\\u20ff",oi=es+Us+mo,Eo="\\u2700-\\u27bf",ts="a-z\\xdf-\\xf6\\xf8-\\xff",si="\\xac\\xb1\\xd7\\xf7",ns="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",qs="\\u2000-\\u206f",Vs=" \\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",rs="A-Z\\xc0-\\xd6\\xd8-\\xde",hr="\\ufe0e\\ufe0f",Ks=si+ns+qs+Vs,Ro="['’]",is="["+Ei+"]",os="["+Ks+"]",yo="["+oi+"]",Gs="\\d+",La="["+Eo+"]",ss="["+ts+"]",as="[^"+Ei+Ks+Gs+Eo+ts+rs+"]",Ys="\\ud83c[\\udffb-\\udfff]",ls="(?:"+yo+"|"+Ys+")",Mo="[^"+Ei+"]",Ri="(?:\\ud83c[\\udde6-\\uddff]){2}",dr="[\\ud800-\\udbff][\\udc00-\\udfff]",vo="["+rs+"]",to="\\u200d",Oa="(?:"+ss+"|"+as+")",Cl="(?:"+vo+"|"+as+")",Lo="(?:"+Ro+"(?:d|ll|m|re|s|t|ve))?",no="(?:"+Ro+"(?:D|LL|M|RE|S|T|VE))?",Oo=ls+"?",cs="["+hr+"]?",Io="(?:"+to+"(?:"+[Mo,Ri,dr].join("|")+")"+cs+Oo+")*",Ia="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bo="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",je=cs+Oo+Io,Na="(?:"+[La,Ri,dr].join("|")+")"+je,Fe="(?:"+[Mo+yo+"?",yo,Ri,dr,is].join("|")+")",Ln=RegExp(Ro,"g"),No=RegExp(yo,"g"),yi=RegExp(Ys+"(?="+Ys+")|"+Fe+je,"g"),Xn=RegExp([vo+"?"+ss+"+"+Lo+"(?="+[os,vo,"$"].join("|")+")",Cl+"+"+no+"(?="+[os,vo+Oa,"$"].join("|")+")",vo+"?"+Oa+"+"+Lo,vo+"+"+no,bo,Ia,Gs,Na].join("|"),"g"),Da=RegExp("["+to+Ei+oi+hr+"]"),Do=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Mi=["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"],wo=-1,an={};an[mt]=an[$t]=an[Ct]=an[Pt]=an[Dt]=an[pt]=an[kt]=an[$n]=an[Mr]=!0,an[ue]=an[ce]=an[He]=an[Ee]=an[Qe]=an[Re]=an[Xe]=an[Ge]=an[rt]=an[gt]=an[vn]=an[bn]=an[Nn]=an[Dn]=an[qe]=!1;var nn={};nn[ue]=nn[ce]=nn[He]=nn[Qe]=nn[Ee]=nn[Re]=nn[mt]=nn[$t]=nn[Ct]=nn[Pt]=nn[Dt]=nn[rt]=nn[gt]=nn[vn]=nn[bn]=nn[Nn]=nn[Dn]=nn[ir]=nn[pt]=nn[kt]=nn[$n]=nn[Mr]=!0,nn[Xe]=nn[Ge]=nn[qe]=!1;var ln={À:"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"},Gt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Li={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Pn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ze=parseFloat,xn=parseInt,St=typeof Xo=="object"&&Xo&&Xo.Object===Object&&Xo,Hr=typeof self=="object"&&self&&self.Object===Object&&self,pn=St||Hr||Function("return this")(),_n=e&&!e.nodeType&&e,or=_n&&!0&&t&&!t.nodeType&&t,Ur=or&&or.exports===_n,Oi=Ur&&St.process,Bn=function(){try{var pe=or&&or.require&&or.require("util").types;return pe||Oi&&Oi.binding&&Oi.binding("util")}catch{}}(),ai=Bn&&Bn.isArrayBuffer,us=Bn&&Bn.isDate,jn=Bn&&Bn.isMap,vi=Bn&&Bn.isRegExp,bi=Bn&&Bn.isSet,Ii=Bn&&Bn.isTypedArray;function gr(pe,_e,xe){switch(xe.length){case 0:return pe.call(_e);case 1:return pe.call(_e,xe[0]);case 2:return pe.call(_e,xe[0],xe[1]);case 3:return pe.call(_e,xe[0],xe[1],xe[2])}return pe.apply(_e,xe)}function mr(pe,_e,xe,Ue){for(var dt=-1,Nt=pe==null?0:pe.length;++dt<Nt;){var en=pe[dt];_e(Ue,en,xe(en),pe)}return Ue}function Sr(pe,_e){for(var xe=-1,Ue=pe==null?0:pe.length;++xe<Ue&&_e(pe[xe],xe,pe)!==!1;);return pe}function Xs(pe,_e){for(var xe=pe==null?0:pe.length;xe--&&_e(pe[xe],xe,pe)!==!1;);return pe}function _r(pe,_e){for(var xe=-1,Ue=pe==null?0:pe.length;++xe<Ue;)if(!_e(pe[xe],xe,pe))return!1;return!0}function Dr(pe,_e){for(var xe=-1,Ue=pe==null?0:pe.length,dt=0,Nt=[];++xe<Ue;){var en=pe[xe];_e(en,xe,pe)&&(Nt[dt++]=en)}return Nt}function wi(pe,_e){var xe=pe==null?0:pe.length;return!!xe&&se(pe,_e,0)>-1}function xi(pe,_e,xe){for(var Ue=-1,dt=pe==null?0:pe.length;++Ue<dt;)if(xe(_e,pe[Ue]))return!0;return!1}function v(pe,_e){for(var xe=-1,Ue=pe==null?0:pe.length,dt=Array(Ue);++xe<Ue;)dt[xe]=_e(pe[xe],xe,pe);return dt}function A(pe,_e){for(var xe=-1,Ue=_e.length,dt=pe.length;++xe<Ue;)pe[dt+xe]=_e[xe];return pe}function _(pe,_e,xe,Ue){var dt=-1,Nt=pe==null?0:pe.length;for(Ue&&Nt&&(xe=pe[++dt]);++dt<Nt;)xe=_e(xe,pe[dt],dt,pe);return xe}function D(pe,_e,xe,Ue){var dt=pe==null?0:pe.length;for(Ue&&dt&&(xe=pe[--dt]);dt--;)xe=_e(xe,pe[dt],dt,pe);return xe}function B(pe,_e){for(var xe=-1,Ue=pe==null?0:pe.length;++xe<Ue;)if(_e(pe[xe],xe,pe))return!0;return!1}var W=be("length");function V(pe){return pe.split("")}function Y(pe){return pe.match(Ra)||[]}function Q(pe,_e,xe){var Ue;return xe(pe,function(dt,Nt,en){if(_e(dt,Nt,en))return Ue=Nt,!1}),Ue}function re(pe,_e,xe,Ue){for(var dt=pe.length,Nt=xe+(Ue?1:-1);Ue?Nt--:++Nt<dt;)if(_e(pe[Nt],Nt,pe))return Nt;return-1}function se(pe,_e,xe){return _e===_e?et(pe,_e,xe):re(pe,ke,xe)}function ve(pe,_e,xe,Ue){for(var dt=xe-1,Nt=pe.length;++dt<Nt;)if(Ue(pe[dt],_e))return dt;return-1}function ke(pe){return pe!==pe}function me(pe,_e){var xe=pe==null?0:pe.length;return xe?ct(pe,_e)/xe:Z}function be(pe){return function(_e){return _e==null?n:_e[pe]}}function De(pe){return function(_e){return pe==null?n:pe[_e]}}function Ne(pe,_e,xe,Ue,dt){return dt(pe,function(Nt,en,Bt){xe=Ue?(Ue=!1,Nt):_e(xe,Nt,en,Bt)}),xe}function Ve(pe,_e){var xe=pe.length;for(pe.sort(_e);xe--;)pe[xe]=pe[xe].value;return pe}function ct(pe,_e){for(var xe,Ue=-1,dt=pe.length;++Ue<dt;){var Nt=_e(pe[Ue]);Nt!==n&&(xe=xe===n?Nt:xe+Nt)}return xe}function Je(pe,_e){for(var xe=-1,Ue=Array(pe);++xe<pe;)Ue[xe]=_e(xe);return Ue}function nt(pe,_e){return v(_e,function(xe){return[xe,pe[xe]]})}function kn(pe){return pe&&pe.slice(0,Wt(pe)+1).replace(Mn,"")}function ht(pe){return function(_e){return pe(_e)}}function Tn(pe,_e){return v(_e,function(xe){return pe[xe]})}function Tt(pe,_e){return pe.has(_e)}function It(pe,_e){for(var xe=-1,Ue=pe.length;++xe<Ue&&se(_e,pe[xe],0)>-1;);return xe}function sr(pe,_e){for(var xe=pe.length;xe--&&se(_e,pe[xe],0)>-1;);return xe}function yr(pe,_e){for(var xe=pe.length,Ue=0;xe--;)pe[xe]===_e&&++Ue;return Ue}var An=De(ln),q=De(Gt);function X(pe){return"\\"+Pn[pe]}function ie(pe,_e){return pe==null?n:pe[_e]}function oe(pe){return Da.test(pe)}function fe(pe){return Do.test(pe)}function we(pe){for(var _e,xe=[];!(_e=pe.next()).done;)xe.push(_e.value);return xe}function Me(pe){var _e=-1,xe=Array(pe.size);return pe.forEach(function(Ue,dt){xe[++_e]=[dt,Ue]}),xe}function Be(pe,_e){return function(xe){return pe(_e(xe))}}function We(pe,_e){for(var xe=-1,Ue=pe.length,dt=0,Nt=[];++xe<Ue;){var en=pe[xe];(en===_e||en===i)&&(pe[xe]=i,Nt[dt++]=xe)}return Nt}function Ke(pe){var _e=-1,xe=Array(pe.size);return pe.forEach(function(Ue){xe[++_e]=Ue}),xe}function Ze(pe){var _e=-1,xe=Array(pe.size);return pe.forEach(function(Ue){xe[++_e]=[Ue,Ue]}),xe}function et(pe,_e,xe){for(var Ue=xe-1,dt=pe.length;++Ue<dt;)if(pe[Ue]===_e)return Ue;return-1}function _t(pe,_e,xe){for(var Ue=xe+1;Ue--;)if(pe[Ue]===_e)return Ue;return Ue}function Ht(pe){return oe(pe)?at(pe):W(pe)}function At(pe){return oe(pe)?mn(pe):V(pe)}function Wt(pe){for(var _e=pe.length;_e--&&Or.test(pe.charAt(_e)););return _e}var yt=De(Li);function at(pe){for(var _e=yi.lastIndex=0;yi.test(pe);)++_e;return _e}function mn(pe){return pe.match(yi)||[]}function En(pe){return pe.match(Xn)||[]}var ar=function pe(_e){_e=_e==null?pn:Xt.defaults(pn.Object(),_e,Xt.pick(pn,Mi));var xe=_e.Array,Ue=_e.Date,dt=_e.Error,Nt=_e.Function,en=_e.Math,Bt=_e.Object,qr=_e.RegExp,Ni=_e.String,fn=_e.TypeError,vr=xe.prototype,Fo=Nt.prototype,Wn=Bt.prototype,Qs=_e["__core-js_shared__"],du=Fo.toString,dn=Wn.hasOwnProperty,gI=0,Kw=function(){var s=/[^.]+$/.exec(Qs&&Qs.keys&&Qs.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),pu=Wn.toString,mI=du.call(Bt),yI=pn._,vI=qr("^"+du.call(dn).replace(Lr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fu=Ur?_e.Buffer:n,hs=_e.Symbol,gu=_e.Uint8Array,Gw=fu?fu.allocUnsafe:n,mu=Be(Bt.getPrototypeOf,Bt),Yw=Bt.create,Xw=Wn.propertyIsEnumerable,yu=vr.splice,Qw=hs?hs.isConcatSpreadable:n,$l=hs?hs.iterator:n,Zs=hs?hs.toStringTag:n,vu=function(){try{var s=ra(Bt,"defineProperty");return s({},"",{}),s}catch{}}(),bI=_e.clearTimeout!==pn.clearTimeout&&_e.clearTimeout,wI=Ue&&Ue.now!==pn.Date.now&&Ue.now,xI=_e.setTimeout!==pn.setTimeout&&_e.setTimeout,bu=en.ceil,wu=en.floor,Tp=Bt.getOwnPropertySymbols,kI=fu?fu.isBuffer:n,Zw=_e.isFinite,SI=vr.join,_I=Be(Bt.keys,Bt),pr=en.max,Fr=en.min,CI=Ue.now,$I=_e.parseInt,Jw=en.random,TI=vr.reverse,Ap=ra(_e,"DataView"),Tl=ra(_e,"Map"),Ep=ra(_e,"Promise"),Fa=ra(_e,"Set"),Al=ra(_e,"WeakMap"),El=ra(Bt,"create"),xu=Al&&new Al,Pa={},AI=ia(Ap),EI=ia(Tl),RI=ia(Ep),MI=ia(Fa),LI=ia(Al),ku=hs?hs.prototype:n,Rl=ku?ku.valueOf:n,e0=ku?ku.toString:n;function J(s){if(zn(s)&&!Et(s)&&!(s instanceof Yt)){if(s instanceof Di)return s;if(dn.call(s,"__wrapped__"))return tx(s)}return new Di(s)}var Ba=function(){function s(){}return function(y){if(!On(y))return{};if(Yw)return Yw(y);s.prototype=y;var E=new s;return s.prototype=n,E}}();function Su(){}function Di(s,y){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!y,this.__index__=0,this.__values__=n}J.templateSettings={escape:gi,evaluate:kl,interpolate:zs,variable:"",imports:{_:J}},J.prototype=Su.prototype,J.prototype.constructor=J,Di.prototype=Ba(Su.prototype),Di.prototype.constructor=Di;function Yt(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=te,this.__views__=[]}function OI(){var s=new Yt(this.__wrapped__);return s.__actions__=li(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=li(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=li(this.__views__),s}function II(){if(this.__filtered__){var s=new Yt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function NI(){var s=this.__wrapped__.value(),y=this.__dir__,E=Et(s),z=y<0,G=E?s.length:0,ee=K2(0,G,this.__views__),le=ee.start,de=ee.end,ye=de-le,Oe=z?de:le-1,Ie=this.__iteratees__,Pe=Ie.length,Ye=0,st=Fr(ye,this.__takeCount__);if(!E||!z&&G==ye&&st==ye)return _0(s,this.__actions__);var bt=[];e:for(;ye--&&Ye<st;){Oe+=y;for(var jt=-1,wt=s[Oe];++jt<Pe;){var qt=Ie[jt],Qt=qt.iteratee,_i=qt.type,Gr=Qt(wt);if(_i==C)wt=Gr;else if(!Gr){if(_i==$)continue e;break e}}bt[Ye++]=wt}return bt}Yt.prototype=Ba(Su.prototype),Yt.prototype.constructor=Yt;function Js(s){var y=-1,E=s==null?0:s.length;for(this.clear();++y<E;){var z=s[y];this.set(z[0],z[1])}}function DI(){this.__data__=El?El(null):{},this.size=0}function FI(s){var y=this.has(s)&&delete this.__data__[s];return this.size-=y?1:0,y}function PI(s){var y=this.__data__;if(El){var E=y[s];return E===p?n:E}return dn.call(y,s)?y[s]:n}function BI(s){var y=this.__data__;return El?y[s]!==n:dn.call(y,s)}function jI(s,y){var E=this.__data__;return this.size+=this.has(s)?0:1,E[s]=El&&y===n?p:y,this}Js.prototype.clear=DI,Js.prototype.delete=FI,Js.prototype.get=PI,Js.prototype.has=BI,Js.prototype.set=jI;function Po(s){var y=-1,E=s==null?0:s.length;for(this.clear();++y<E;){var z=s[y];this.set(z[0],z[1])}}function WI(){this.__data__=[],this.size=0}function zI(s){var y=this.__data__,E=_u(y,s);if(E<0)return!1;var z=y.length-1;return E==z?y.pop():yu.call(y,E,1),--this.size,!0}function HI(s){var y=this.__data__,E=_u(y,s);return E<0?n:y[E][1]}function UI(s){return _u(this.__data__,s)>-1}function qI(s,y){var E=this.__data__,z=_u(E,s);return z<0?(++this.size,E.push([s,y])):E[z][1]=y,this}Po.prototype.clear=WI,Po.prototype.delete=zI,Po.prototype.get=HI,Po.prototype.has=UI,Po.prototype.set=qI;function Bo(s){var y=-1,E=s==null?0:s.length;for(this.clear();++y<E;){var z=s[y];this.set(z[0],z[1])}}function VI(){this.size=0,this.__data__={hash:new Js,map:new(Tl||Po),string:new Js}}function KI(s){var y=Du(this,s).delete(s);return this.size-=y?1:0,y}function GI(s){return Du(this,s).get(s)}function YI(s){return Du(this,s).has(s)}function XI(s,y){var E=Du(this,s),z=E.size;return E.set(s,y),this.size+=E.size==z?0:1,this}Bo.prototype.clear=VI,Bo.prototype.delete=KI,Bo.prototype.get=GI,Bo.prototype.has=YI,Bo.prototype.set=XI;function ea(s){var y=-1,E=s==null?0:s.length;for(this.__data__=new Bo;++y<E;)this.add(s[y])}function QI(s){return this.__data__.set(s,p),this}function ZI(s){return this.__data__.has(s)}ea.prototype.add=ea.prototype.push=QI,ea.prototype.has=ZI;function ro(s){var y=this.__data__=new Po(s);this.size=y.size}function JI(){this.__data__=new Po,this.size=0}function e2(s){var y=this.__data__,E=y.delete(s);return this.size=y.size,E}function t2(s){return this.__data__.get(s)}function n2(s){return this.__data__.has(s)}function r2(s,y){var E=this.__data__;if(E instanceof Po){var z=E.__data__;if(!Tl||z.length<u-1)return z.push([s,y]),this.size=++E.size,this;E=this.__data__=new Bo(z)}return E.set(s,y),this.size=E.size,this}ro.prototype.clear=JI,ro.prototype.delete=e2,ro.prototype.get=t2,ro.prototype.has=n2,ro.prototype.set=r2;function t0(s,y){var E=Et(s),z=!E&&oa(s),G=!E&&!z&&ms(s),ee=!E&&!z&&!G&&Ha(s),le=E||z||G||ee,de=le?Je(s.length,Ni):[],ye=de.length;for(var Oe in s)(y||dn.call(s,Oe))&&!(le&&(Oe=="length"||G&&(Oe=="offset"||Oe=="parent")||ee&&(Oe=="buffer"||Oe=="byteLength"||Oe=="byteOffset")||Ho(Oe,ye)))&&de.push(Oe);return de}function n0(s){var y=s.length;return y?s[jp(0,y-1)]:n}function i2(s,y){return Fu(li(s),ta(y,0,s.length))}function o2(s){return Fu(li(s))}function Rp(s,y,E){(E!==n&&!io(s[y],E)||E===n&&!(y in s))&&jo(s,y,E)}function Ml(s,y,E){var z=s[y];(!(dn.call(s,y)&&io(z,E))||E===n&&!(y in s))&&jo(s,y,E)}function _u(s,y){for(var E=s.length;E--;)if(io(s[E][0],y))return E;return-1}function s2(s,y,E,z){return ds(s,function(G,ee,le){y(z,G,E(G),le)}),z}function r0(s,y){return s&&ko(y,br(y),s)}function a2(s,y){return s&&ko(y,ui(y),s)}function jo(s,y,E){y=="__proto__"&&vu?vu(s,y,{configurable:!0,enumerable:!0,value:E,writable:!0}):s[y]=E}function Mp(s,y){for(var E=-1,z=y.length,G=xe(z),ee=s==null;++E<z;)G[E]=ee?n:df(s,y[E]);return G}function ta(s,y,E){return s===s&&(E!==n&&(s=s<=E?s:E),y!==n&&(s=s>=y?s:y)),s}function Fi(s,y,E,z,G,ee){var le,de=y&a,ye=y&h,Oe=y&c;if(E&&(le=G?E(s,z,G,ee):E(s)),le!==n)return le;if(!On(s))return s;var Ie=Et(s);if(Ie){if(le=Y2(s),!de)return li(s,le)}else{var Pe=Pr(s),Ye=Pe==Ge||Pe==ft;if(ms(s))return T0(s,de);if(Pe==vn||Pe==ue||Ye&&!G){if(le=ye||Ye?{}:V0(s),!de)return ye?P2(s,a2(le,s)):F2(s,r0(le,s))}else{if(!nn[Pe])return G?s:{};le=X2(s,Pe,de)}}ee||(ee=new ro);var st=ee.get(s);if(st)return st;ee.set(s,le),xx(s)?s.forEach(function(wt){le.add(Fi(wt,y,E,wt,s,ee))}):bx(s)&&s.forEach(function(wt,qt){le.set(qt,Fi(wt,y,E,qt,s,ee))});var bt=Oe?ye?Qp:Xp:ye?ui:br,jt=Ie?n:bt(s);return Sr(jt||s,function(wt,qt){jt&&(qt=wt,wt=s[qt]),Ml(le,qt,Fi(wt,y,E,qt,s,ee))}),le}function l2(s){var y=br(s);return function(E){return i0(E,s,y)}}function i0(s,y,E){var z=E.length;if(s==null)return!z;for(s=Bt(s);z--;){var G=E[z],ee=y[G],le=s[G];if(le===n&&!(G in s)||!ee(le))return!1}return!0}function o0(s,y,E){if(typeof s!="function")throw new fn(f);return Pl(function(){s.apply(n,E)},y)}function Ll(s,y,E,z){var G=-1,ee=wi,le=!0,de=s.length,ye=[],Oe=y.length;if(!de)return ye;E&&(y=v(y,ht(E))),z?(ee=xi,le=!1):y.length>=u&&(ee=Tt,le=!1,y=new ea(y));e:for(;++G<de;){var Ie=s[G],Pe=E==null?Ie:E(Ie);if(Ie=z||Ie!==0?Ie:0,le&&Pe===Pe){for(var Ye=Oe;Ye--;)if(y[Ye]===Pe)continue e;ye.push(Ie)}else ee(y,Pe,z)||ye.push(Ie)}return ye}var ds=L0(xo),s0=L0(Op,!0);function c2(s,y){var E=!0;return ds(s,function(z,G,ee){return E=!!y(z,G,ee),E}),E}function Cu(s,y,E){for(var z=-1,G=s.length;++z<G;){var ee=s[z],le=y(ee);if(le!=null&&(de===n?le===le&&!Si(le):E(le,de)))var de=le,ye=ee}return ye}function u2(s,y,E,z){var G=s.length;for(E=Ft(E),E<0&&(E=-E>G?0:G+E),z=z===n||z>G?G:Ft(z),z<0&&(z+=G),z=E>z?0:Sx(z);E<z;)s[E++]=y;return s}function a0(s,y){var E=[];return ds(s,function(z,G,ee){y(z,G,ee)&&E.push(z)}),E}function Cr(s,y,E,z,G){var ee=-1,le=s.length;for(E||(E=Z2),G||(G=[]);++ee<le;){var de=s[ee];y>0&&E(de)?y>1?Cr(de,y-1,E,z,G):A(G,de):z||(G[G.length]=de)}return G}var Lp=O0(),l0=O0(!0);function xo(s,y){return s&&Lp(s,y,br)}function Op(s,y){return s&&l0(s,y,br)}function $u(s,y){return Dr(y,function(E){return Uo(s[E])})}function na(s,y){y=fs(y,s);for(var E=0,z=y.length;s!=null&&E<z;)s=s[So(y[E++])];return E&&E==z?s:n}function c0(s,y,E){var z=y(s);return Et(s)?z:A(z,E(s))}function Vr(s){return s==null?s===n?xt:sn:Zs&&Zs in Bt(s)?V2(s):oN(s)}function Ip(s,y){return s>y}function h2(s,y){return s!=null&&dn.call(s,y)}function d2(s,y){return s!=null&&y in Bt(s)}function p2(s,y,E){return s>=Fr(y,E)&&s<pr(y,E)}function Np(s,y,E){for(var z=E?xi:wi,G=s[0].length,ee=s.length,le=ee,de=xe(ee),ye=1/0,Oe=[];le--;){var Ie=s[le];le&&y&&(Ie=v(Ie,ht(y))),ye=Fr(Ie.length,ye),de[le]=!E&&(y||G>=120&&Ie.length>=120)?new ea(le&&Ie):n}Ie=s[0];var Pe=-1,Ye=de[0];e:for(;++Pe<G&&Oe.length<ye;){var st=Ie[Pe],bt=y?y(st):st;if(st=E||st!==0?st:0,!(Ye?Tt(Ye,bt):z(Oe,bt,E))){for(le=ee;--le;){var jt=de[le];if(!(jt?Tt(jt,bt):z(s[le],bt,E)))continue e}Ye&&Ye.push(bt),Oe.push(st)}}return Oe}function f2(s,y,E,z){return xo(s,function(G,ee,le){y(z,E(G),ee,le)}),z}function Ol(s,y,E){y=fs(y,s),s=X0(s,y);var z=s==null?s:s[So(Bi(y))];return z==null?n:gr(z,s,E)}function u0(s){return zn(s)&&Vr(s)==ue}function g2(s){return zn(s)&&Vr(s)==He}function m2(s){return zn(s)&&Vr(s)==Re}function Il(s,y,E,z,G){return s===y?!0:s==null||y==null||!zn(s)&&!zn(y)?s!==s&&y!==y:y2(s,y,E,z,Il,G)}function y2(s,y,E,z,G,ee){var le=Et(s),de=Et(y),ye=le?ce:Pr(s),Oe=de?ce:Pr(y);ye=ye==ue?vn:ye,Oe=Oe==ue?vn:Oe;var Ie=ye==vn,Pe=Oe==vn,Ye=ye==Oe;if(Ye&&ms(s)){if(!ms(y))return!1;le=!0,Ie=!1}if(Ye&&!Ie)return ee||(ee=new ro),le||Ha(s)?H0(s,y,E,z,G,ee):U2(s,y,ye,E,z,G,ee);if(!(E&o)){var st=Ie&&dn.call(s,"__wrapped__"),bt=Pe&&dn.call(y,"__wrapped__");if(st||bt){var jt=st?s.value():s,wt=bt?y.value():y;return ee||(ee=new ro),G(jt,wt,E,z,ee)}}return Ye?(ee||(ee=new ro),q2(s,y,E,z,G,ee)):!1}function v2(s){return zn(s)&&Pr(s)==rt}function Dp(s,y,E,z){var G=E.length,ee=G,le=!z;if(s==null)return!ee;for(s=Bt(s);G--;){var de=E[G];if(le&&de[2]?de[1]!==s[de[0]]:!(de[0]in s))return!1}for(;++G<ee;){de=E[G];var ye=de[0],Oe=s[ye],Ie=de[1];if(le&&de[2]){if(Oe===n&&!(ye in s))return!1}else{var Pe=new ro;if(z)var Ye=z(Oe,Ie,ye,s,y,Pe);if(!(Ye===n?Il(Ie,Oe,o|l,z,Pe):Ye))return!1}}return!0}function h0(s){if(!On(s)||eN(s))return!1;var y=Uo(s)?vI:Ir;return y.test(ia(s))}function b2(s){return zn(s)&&Vr(s)==bn}function w2(s){return zn(s)&&Pr(s)==Nn}function x2(s){return zn(s)&&Hu(s.length)&&!!an[Vr(s)]}function d0(s){return typeof s=="function"?s:s==null?hi:typeof s=="object"?Et(s)?g0(s[0],s[1]):f0(s):Ix(s)}function Fp(s){if(!Fl(s))return _I(s);var y=[];for(var E in Bt(s))dn.call(s,E)&&E!="constructor"&&y.push(E);return y}function k2(s){if(!On(s))return iN(s);var y=Fl(s),E=[];for(var z in s)z=="constructor"&&(y||!dn.call(s,z))||E.push(z);return E}function Pp(s,y){return s<y}function p0(s,y){var E=-1,z=ci(s)?xe(s.length):[];return ds(s,function(G,ee,le){z[++E]=y(G,ee,le)}),z}function f0(s){var y=Jp(s);return y.length==1&&y[0][2]?G0(y[0][0],y[0][1]):function(E){return E===s||Dp(E,s,y)}}function g0(s,y){return tf(s)&&K0(y)?G0(So(s),y):function(E){var z=df(E,s);return z===n&&z===y?pf(E,s):Il(y,z,o|l)}}function Tu(s,y,E,z,G){s!==y&&Lp(y,function(ee,le){if(G||(G=new ro),On(ee))S2(s,y,le,E,Tu,z,G);else{var de=z?z(rf(s,le),ee,le+"",s,y,G):n;de===n&&(de=ee),Rp(s,le,de)}},ui)}function S2(s,y,E,z,G,ee,le){var de=rf(s,E),ye=rf(y,E),Oe=le.get(ye);if(Oe){Rp(s,E,Oe);return}var Ie=ee?ee(de,ye,E+"",s,y,le):n,Pe=Ie===n;if(Pe){var Ye=Et(ye),st=!Ye&&ms(ye),bt=!Ye&&!st&&Ha(ye);Ie=ye,Ye||st||bt?Et(de)?Ie=de:Qn(de)?Ie=li(de):st?(Pe=!1,Ie=T0(ye,!0)):bt?(Pe=!1,Ie=A0(ye,!0)):Ie=[]:Bl(ye)||oa(ye)?(Ie=de,oa(de)?Ie=_x(de):(!On(de)||Uo(de))&&(Ie=V0(ye))):Pe=!1}Pe&&(le.set(ye,Ie),G(Ie,ye,z,ee,le),le.delete(ye)),Rp(s,E,Ie)}function m0(s,y){var E=s.length;if(E)return y+=y<0?E:0,Ho(y,E)?s[y]:n}function y0(s,y,E){y.length?y=v(y,function(ee){return Et(ee)?function(le){return na(le,ee.length===1?ee[0]:ee)}:ee}):y=[hi];var z=-1;y=v(y,ht(vt()));var G=p0(s,function(ee,le,de){var ye=v(y,function(Oe){return Oe(ee)});return{criteria:ye,index:++z,value:ee}});return Ve(G,function(ee,le){return D2(ee,le,E)})}function _2(s,y){return v0(s,y,function(E,z){return pf(s,z)})}function v0(s,y,E){for(var z=-1,G=y.length,ee={};++z<G;){var le=y[z],de=na(s,le);E(de,le)&&Nl(ee,fs(le,s),de)}return ee}function C2(s){return function(y){return na(y,s)}}function Bp(s,y,E,z){var G=z?ve:se,ee=-1,le=y.length,de=s;for(s===y&&(y=li(y)),E&&(de=v(s,ht(E)));++ee<le;)for(var ye=0,Oe=y[ee],Ie=E?E(Oe):Oe;(ye=G(de,Ie,ye,z))>-1;)de!==s&&yu.call(de,ye,1),yu.call(s,ye,1);return s}function b0(s,y){for(var E=s?y.length:0,z=E-1;E--;){var G=y[E];if(E==z||G!==ee){var ee=G;Ho(G)?yu.call(s,G,1):Hp(s,G)}}return s}function jp(s,y){return s+wu(Jw()*(y-s+1))}function $2(s,y,E,z){for(var G=-1,ee=pr(bu((y-s)/(E||1)),0),le=xe(ee);ee--;)le[z?ee:++G]=s,s+=E;return le}function Wp(s,y){var E="";if(!s||y<1||y>U)return E;do y%2&&(E+=s),y=wu(y/2),y&&(s+=s);while(y);return E}function zt(s,y){return of(Y0(s,y,hi),s+"")}function T2(s){return n0(Ua(s))}function A2(s,y){var E=Ua(s);return Fu(E,ta(y,0,E.length))}function Nl(s,y,E,z){if(!On(s))return s;y=fs(y,s);for(var G=-1,ee=y.length,le=ee-1,de=s;de!=null&&++G<ee;){var ye=So(y[G]),Oe=E;if(ye==="__proto__"||ye==="constructor"||ye==="prototype")return s;if(G!=le){var Ie=de[ye];Oe=z?z(Ie,ye,de):n,Oe===n&&(Oe=On(Ie)?Ie:Ho(y[G+1])?[]:{})}Ml(de,ye,Oe),de=de[ye]}return s}var w0=xu?function(s,y){return xu.set(s,y),s}:hi,E2=vu?function(s,y){return vu(s,"toString",{configurable:!0,enumerable:!1,value:gf(y),writable:!0})}:hi;function R2(s){return Fu(Ua(s))}function Pi(s,y,E){var z=-1,G=s.length;y<0&&(y=-y>G?0:G+y),E=E>G?G:E,E<0&&(E+=G),G=y>E?0:E-y>>>0,y>>>=0;for(var ee=xe(G);++z<G;)ee[z]=s[z+y];return ee}function M2(s,y){var E;return ds(s,function(z,G,ee){return E=y(z,G,ee),!E}),!!E}function Au(s,y,E){var z=0,G=s==null?z:s.length;if(typeof y=="number"&&y===y&&G<=ne){for(;z<G;){var ee=z+G>>>1,le=s[ee];le!==null&&!Si(le)&&(E?le<=y:le<y)?z=ee+1:G=ee}return G}return zp(s,y,hi,E)}function zp(s,y,E,z){var G=0,ee=s==null?0:s.length;if(ee===0)return 0;y=E(y);for(var le=y!==y,de=y===null,ye=Si(y),Oe=y===n;G<ee;){var Ie=wu((G+ee)/2),Pe=E(s[Ie]),Ye=Pe!==n,st=Pe===null,bt=Pe===Pe,jt=Si(Pe);if(le)var wt=z||bt;else Oe?wt=bt&&(z||Ye):de?wt=bt&&Ye&&(z||!st):ye?wt=bt&&Ye&&!st&&(z||!jt):st||jt?wt=!1:wt=z?Pe<=y:Pe<y;wt?G=Ie+1:ee=Ie}return Fr(ee,he)}function x0(s,y){for(var E=-1,z=s.length,G=0,ee=[];++E<z;){var le=s[E],de=y?y(le):le;if(!E||!io(de,ye)){var ye=de;ee[G++]=le===0?0:le}}return ee}function k0(s){return typeof s=="number"?s:Si(s)?Z:+s}function ki(s){if(typeof s=="string")return s;if(Et(s))return v(s,ki)+"";if(Si(s))return e0?e0.call(s):"";var y=s+"";return y=="0"&&1/s==-1/0?"-0":y}function ps(s,y,E){var z=-1,G=wi,ee=s.length,le=!0,de=[],ye=de;if(E)le=!1,G=xi;else if(ee>=u){var Oe=y?null:z2(s);if(Oe)return Ke(Oe);le=!1,G=Tt,ye=new ea}else ye=y?[]:de;e:for(;++z<ee;){var Ie=s[z],Pe=y?y(Ie):Ie;if(Ie=E||Ie!==0?Ie:0,le&&Pe===Pe){for(var Ye=ye.length;Ye--;)if(ye[Ye]===Pe)continue e;y&&ye.push(Pe),de.push(Ie)}else G(ye,Pe,E)||(ye!==de&&ye.push(Pe),de.push(Ie))}return de}function Hp(s,y){return y=fs(y,s),s=X0(s,y),s==null||delete s[So(Bi(y))]}function S0(s,y,E,z){return Nl(s,y,E(na(s,y)),z)}function Eu(s,y,E,z){for(var G=s.length,ee=z?G:-1;(z?ee--:++ee<G)&&y(s[ee],ee,s););return E?Pi(s,z?0:ee,z?ee+1:G):Pi(s,z?ee+1:0,z?G:ee)}function _0(s,y){var E=s;return E instanceof Yt&&(E=E.value()),_(y,function(z,G){return G.func.apply(G.thisArg,A([z],G.args))},E)}function Up(s,y,E){var z=s.length;if(z<2)return z?ps(s[0]):[];for(var G=-1,ee=xe(z);++G<z;)for(var le=s[G],de=-1;++de<z;)de!=G&&(ee[G]=Ll(ee[G]||le,s[de],y,E));return ps(Cr(ee,1),y,E)}function C0(s,y,E){for(var z=-1,G=s.length,ee=y.length,le={};++z<G;){var de=z<ee?y[z]:n;E(le,s[z],de)}return le}function qp(s){return Qn(s)?s:[]}function Vp(s){return typeof s=="function"?s:hi}function fs(s,y){return Et(s)?s:tf(s,y)?[s]:ex(un(s))}var L2=zt;function gs(s,y,E){var z=s.length;return E=E===n?z:E,!y&&E>=z?s:Pi(s,y,E)}var $0=bI||function(s){return pn.clearTimeout(s)};function T0(s,y){if(y)return s.slice();var E=s.length,z=Gw?Gw(E):new s.constructor(E);return s.copy(z),z}function Kp(s){var y=new s.constructor(s.byteLength);return new gu(y).set(new gu(s)),y}function O2(s,y){var E=y?Kp(s.buffer):s.buffer;return new s.constructor(E,s.byteOffset,s.byteLength)}function I2(s){var y=new s.constructor(s.source,mi.exec(s));return y.lastIndex=s.lastIndex,y}function N2(s){return Rl?Bt(Rl.call(s)):{}}function A0(s,y){var E=y?Kp(s.buffer):s.buffer;return new s.constructor(E,s.byteOffset,s.length)}function E0(s,y){if(s!==y){var E=s!==n,z=s===null,G=s===s,ee=Si(s),le=y!==n,de=y===null,ye=y===y,Oe=Si(y);if(!de&&!Oe&&!ee&&s>y||ee&&le&&ye&&!de&&!Oe||z&&le&&ye||!E&&ye||!G)return 1;if(!z&&!ee&&!Oe&&s<y||Oe&&E&&G&&!z&&!ee||de&&E&&G||!le&&G||!ye)return-1}return 0}function D2(s,y,E){for(var z=-1,G=s.criteria,ee=y.criteria,le=G.length,de=E.length;++z<le;){var ye=E0(G[z],ee[z]);if(ye){if(z>=de)return ye;var Oe=E[z];return ye*(Oe=="desc"?-1:1)}}return s.index-y.index}function R0(s,y,E,z){for(var G=-1,ee=s.length,le=E.length,de=-1,ye=y.length,Oe=pr(ee-le,0),Ie=xe(ye+Oe),Pe=!z;++de<ye;)Ie[de]=y[de];for(;++G<le;)(Pe||G<ee)&&(Ie[E[G]]=s[G]);for(;Oe--;)Ie[de++]=s[G++];return Ie}function M0(s,y,E,z){for(var G=-1,ee=s.length,le=-1,de=E.length,ye=-1,Oe=y.length,Ie=pr(ee-de,0),Pe=xe(Ie+Oe),Ye=!z;++G<Ie;)Pe[G]=s[G];for(var st=G;++ye<Oe;)Pe[st+ye]=y[ye];for(;++le<de;)(Ye||G<ee)&&(Pe[st+E[le]]=s[G++]);return Pe}function li(s,y){var E=-1,z=s.length;for(y||(y=xe(z));++E<z;)y[E]=s[E];return y}function ko(s,y,E,z){var G=!E;E||(E={});for(var ee=-1,le=y.length;++ee<le;){var de=y[ee],ye=z?z(E[de],s[de],de,E,s):n;ye===n&&(ye=s[de]),G?jo(E,de,ye):Ml(E,de,ye)}return E}function F2(s,y){return ko(s,ef(s),y)}function P2(s,y){return ko(s,U0(s),y)}function Ru(s,y){return function(E,z){var G=Et(E)?mr:s2,ee=y?y():{};return G(E,s,vt(z,2),ee)}}function ja(s){return zt(function(y,E){var z=-1,G=E.length,ee=G>1?E[G-1]:n,le=G>2?E[2]:n;for(ee=s.length>3&&typeof ee=="function"?(G--,ee):n,le&&Kr(E[0],E[1],le)&&(ee=G<3?n:ee,G=1),y=Bt(y);++z<G;){var de=E[z];de&&s(y,de,z,ee)}return y})}function L0(s,y){return function(E,z){if(E==null)return E;if(!ci(E))return s(E,z);for(var G=E.length,ee=y?G:-1,le=Bt(E);(y?ee--:++ee<G)&&z(le[ee],ee,le)!==!1;);return E}}function O0(s){return function(y,E,z){for(var G=-1,ee=Bt(y),le=z(y),de=le.length;de--;){var ye=le[s?de:++G];if(E(ee[ye],ye,ee)===!1)break}return y}}function B2(s,y,E){var z=y&m,G=Dl(s);function ee(){var le=this&&this!==pn&&this instanceof ee?G:s;return le.apply(z?E:this,arguments)}return ee}function I0(s){return function(y){y=un(y);var E=oe(y)?At(y):n,z=E?E[0]:y.charAt(0),G=E?gs(E,1).join(""):y.slice(1);return z[s]()+G}}function Wa(s){return function(y){return _(Lx(Mx(y).replace(Ln,"")),s,"")}}function Dl(s){return function(){var y=arguments;switch(y.length){case 0:return new s;case 1:return new s(y[0]);case 2:return new s(y[0],y[1]);case 3:return new s(y[0],y[1],y[2]);case 4:return new s(y[0],y[1],y[2],y[3]);case 5:return new s(y[0],y[1],y[2],y[3],y[4]);case 6:return new s(y[0],y[1],y[2],y[3],y[4],y[5]);case 7:return new s(y[0],y[1],y[2],y[3],y[4],y[5],y[6])}var E=Ba(s.prototype),z=s.apply(E,y);return On(z)?z:E}}function j2(s,y,E){var z=Dl(s);function G(){for(var ee=arguments.length,le=xe(ee),de=ee,ye=za(G);de--;)le[de]=arguments[de];var Oe=ee<3&&le[0]!==ye&&le[ee-1]!==ye?[]:We(le,ye);if(ee-=Oe.length,ee<E)return B0(s,y,Mu,G.placeholder,n,le,Oe,n,n,E-ee);var Ie=this&&this!==pn&&this instanceof G?z:s;return gr(Ie,this,le)}return G}function N0(s){return function(y,E,z){var G=Bt(y);if(!ci(y)){var ee=vt(E,3);y=br(y),E=function(de){return ee(G[de],de,G)}}var le=s(y,E,z);return le>-1?G[ee?y[le]:le]:n}}function D0(s){return zo(function(y){var E=y.length,z=E,G=Di.prototype.thru;for(s&&y.reverse();z--;){var ee=y[z];if(typeof ee!="function")throw new fn(f);if(G&&!le&&Nu(ee)=="wrapper")var le=new Di([],!0)}for(z=le?z:E;++z<E;){ee=y[z];var de=Nu(ee),ye=de=="wrapper"?Zp(ee):n;ye&&nf(ye[0])&&ye[1]==(M|R|S|O)&&!ye[4].length&&ye[9]==1?le=le[Nu(ye[0])].apply(le,ye[3]):le=ee.length==1&&nf(ee)?le[de]():le.thru(ee)}return function(){var Oe=arguments,Ie=Oe[0];if(le&&Oe.length==1&&Et(Ie))return le.plant(Ie).value();for(var Pe=0,Ye=E?y[Pe].apply(this,Oe):Ie;++Pe<E;)Ye=y[Pe].call(this,Ye);return Ye}})}function Mu(s,y,E,z,G,ee,le,de,ye,Oe){var Ie=y&M,Pe=y&m,Ye=y&w,st=y&(R|T),bt=y&F,jt=Ye?n:Dl(s);function wt(){for(var qt=arguments.length,Qt=xe(qt),_i=qt;_i--;)Qt[_i]=arguments[_i];if(st)var Gr=za(wt),Ci=yr(Qt,Gr);if(z&&(Qt=R0(Qt,z,G,st)),ee&&(Qt=M0(Qt,ee,le,st)),qt-=Ci,st&&qt<Oe){var Zn=We(Qt,Gr);return B0(s,y,Mu,wt.placeholder,E,Qt,Zn,de,ye,Oe-qt)}var oo=Pe?E:this,Vo=Ye?oo[s]:s;return qt=Qt.length,de?Qt=sN(Qt,de):bt&&qt>1&&Qt.reverse(),Ie&&ye<qt&&(Qt.length=ye),this&&this!==pn&&this instanceof wt&&(Vo=jt||Dl(Vo)),Vo.apply(oo,Qt)}return wt}function F0(s,y){return function(E,z){return f2(E,s,y(z),{})}}function Lu(s,y){return function(E,z){var G;if(E===n&&z===n)return y;if(E!==n&&(G=E),z!==n){if(G===n)return z;typeof E=="string"||typeof z=="string"?(E=ki(E),z=ki(z)):(E=k0(E),z=k0(z)),G=s(E,z)}return G}}function Gp(s){return zo(function(y){return y=v(y,ht(vt())),zt(function(E){var z=this;return s(y,function(G){return gr(G,z,E)})})})}function Ou(s,y){y=y===n?" ":ki(y);var E=y.length;if(E<2)return E?Wp(y,s):y;var z=Wp(y,bu(s/Ht(y)));return oe(y)?gs(At(z),0,s).join(""):z.slice(0,s)}function W2(s,y,E,z){var G=y&m,ee=Dl(s);function le(){for(var de=-1,ye=arguments.length,Oe=-1,Ie=z.length,Pe=xe(Ie+ye),Ye=this&&this!==pn&&this instanceof le?ee:s;++Oe<Ie;)Pe[Oe]=z[Oe];for(;ye--;)Pe[Oe++]=arguments[++de];return gr(Ye,G?E:this,Pe)}return le}function P0(s){return function(y,E,z){return z&&typeof z!="number"&&Kr(y,E,z)&&(E=z=n),y=qo(y),E===n?(E=y,y=0):E=qo(E),z=z===n?y<E?1:-1:qo(z),$2(y,E,z,s)}}function Iu(s){return function(y,E){return typeof y=="string"&&typeof E=="string"||(y=ji(y),E=ji(E)),s(y,E)}}function B0(s,y,E,z,G,ee,le,de,ye,Oe){var Ie=y&R,Pe=Ie?le:n,Ye=Ie?n:le,st=Ie?ee:n,bt=Ie?n:ee;y|=Ie?S:x,y&=~(Ie?x:S),y&k||(y&=-4);var jt=[s,y,G,st,Pe,bt,Ye,de,ye,Oe],wt=E.apply(n,jt);return nf(s)&&Q0(wt,jt),wt.placeholder=z,Z0(wt,s,y)}function Yp(s){var y=en[s];return function(E,z){if(E=ji(E),z=z==null?0:Fr(Ft(z),292),z&&Zw(E)){var G=(un(E)+"e").split("e"),ee=y(G[0]+"e"+(+G[1]+z));return G=(un(ee)+"e").split("e"),+(G[0]+"e"+(+G[1]-z))}return y(E)}}var z2=Fa&&1/Ke(new Fa([,-0]))[1]==j?function(s){return new Fa(s)}:vf;function j0(s){return function(y){var E=Pr(y);return E==rt?Me(y):E==Nn?Ze(y):nt(y,s(y))}}function Wo(s,y,E,z,G,ee,le,de){var ye=y&w;if(!ye&&typeof s!="function")throw new fn(f);var Oe=z?z.length:0;if(Oe||(y&=-97,z=G=n),le=le===n?le:pr(Ft(le),0),de=de===n?de:Ft(de),Oe-=G?G.length:0,y&x){var Ie=z,Pe=G;z=G=n}var Ye=ye?n:Zp(s),st=[s,y,E,z,G,Ie,Pe,ee,le,de];if(Ye&&rN(st,Ye),s=st[0],y=st[1],E=st[2],z=st[3],G=st[4],de=st[9]=st[9]===n?ye?0:s.length:pr(st[9]-Oe,0),!de&&y&(R|T)&&(y&=-25),!y||y==m)var bt=B2(s,y,E);else y==R||y==T?bt=j2(s,y,de):(y==S||y==(m|S))&&!G.length?bt=W2(s,y,E,z):bt=Mu.apply(n,st);var jt=Ye?w0:Q0;return Z0(jt(bt,st),s,y)}function W0(s,y,E,z){return s===n||io(s,Wn[E])&&!dn.call(z,E)?y:s}function z0(s,y,E,z,G,ee){return On(s)&&On(y)&&(ee.set(y,s),Tu(s,y,n,z0,ee),ee.delete(y)),s}function H2(s){return Bl(s)?n:s}function H0(s,y,E,z,G,ee){var le=E&o,de=s.length,ye=y.length;if(de!=ye&&!(le&&ye>de))return!1;var Oe=ee.get(s),Ie=ee.get(y);if(Oe&&Ie)return Oe==y&&Ie==s;var Pe=-1,Ye=!0,st=E&l?new ea:n;for(ee.set(s,y),ee.set(y,s);++Pe<de;){var bt=s[Pe],jt=y[Pe];if(z)var wt=le?z(jt,bt,Pe,y,s,ee):z(bt,jt,Pe,s,y,ee);if(wt!==n){if(wt)continue;Ye=!1;break}if(st){if(!B(y,function(qt,Qt){if(!Tt(st,Qt)&&(bt===qt||G(bt,qt,E,z,ee)))return st.push(Qt)})){Ye=!1;break}}else if(!(bt===jt||G(bt,jt,E,z,ee))){Ye=!1;break}}return ee.delete(s),ee.delete(y),Ye}function U2(s,y,E,z,G,ee,le){switch(E){case Qe:if(s.byteLength!=y.byteLength||s.byteOffset!=y.byteOffset)return!1;s=s.buffer,y=y.buffer;case He:return!(s.byteLength!=y.byteLength||!ee(new gu(s),new gu(y)));case Ee:case Re:case gt:return io(+s,+y);case Xe:return s.name==y.name&&s.message==y.message;case bn:case Dn:return s==y+"";case rt:var de=Me;case Nn:var ye=z&o;if(de||(de=Ke),s.size!=y.size&&!ye)return!1;var Oe=le.get(s);if(Oe)return Oe==y;z|=l,le.set(s,y);var Ie=H0(de(s),de(y),z,G,ee,le);return le.delete(s),Ie;case ir:if(Rl)return Rl.call(s)==Rl.call(y)}return!1}function q2(s,y,E,z,G,ee){var le=E&o,de=Xp(s),ye=de.length,Oe=Xp(y),Ie=Oe.length;if(ye!=Ie&&!le)return!1;for(var Pe=ye;Pe--;){var Ye=de[Pe];if(!(le?Ye in y:dn.call(y,Ye)))return!1}var st=ee.get(s),bt=ee.get(y);if(st&&bt)return st==y&&bt==s;var jt=!0;ee.set(s,y),ee.set(y,s);for(var wt=le;++Pe<ye;){Ye=de[Pe];var qt=s[Ye],Qt=y[Ye];if(z)var _i=le?z(Qt,qt,Ye,y,s,ee):z(qt,Qt,Ye,s,y,ee);if(!(_i===n?qt===Qt||G(qt,Qt,E,z,ee):_i)){jt=!1;break}wt||(wt=Ye=="constructor")}if(jt&&!wt){var Gr=s.constructor,Ci=y.constructor;Gr!=Ci&&"constructor"in s&&"constructor"in y&&!(typeof Gr=="function"&&Gr instanceof Gr&&typeof Ci=="function"&&Ci instanceof Ci)&&(jt=!1)}return ee.delete(s),ee.delete(y),jt}function zo(s){return of(Y0(s,n,ix),s+"")}function Xp(s){return c0(s,br,ef)}function Qp(s){return c0(s,ui,U0)}var Zp=xu?function(s){return xu.get(s)}:vf;function Nu(s){for(var y=s.name+"",E=Pa[y],z=dn.call(Pa,y)?E.length:0;z--;){var G=E[z],ee=G.func;if(ee==null||ee==s)return G.name}return y}function za(s){var y=dn.call(J,"placeholder")?J:s;return y.placeholder}function vt(){var s=J.iteratee||mf;return s=s===mf?d0:s,arguments.length?s(arguments[0],arguments[1]):s}function Du(s,y){var E=s.__data__;return J2(y)?E[typeof y=="string"?"string":"hash"]:E.map}function Jp(s){for(var y=br(s),E=y.length;E--;){var z=y[E],G=s[z];y[E]=[z,G,K0(G)]}return y}function ra(s,y){var E=ie(s,y);return h0(E)?E:n}function V2(s){var y=dn.call(s,Zs),E=s[Zs];try{s[Zs]=n;var z=!0}catch{}var G=pu.call(s);return z&&(y?s[Zs]=E:delete s[Zs]),G}var ef=Tp?function(s){return s==null?[]:(s=Bt(s),Dr(Tp(s),function(y){return Xw.call(s,y)}))}:bf,U0=Tp?function(s){for(var y=[];s;)A(y,ef(s)),s=mu(s);return y}:bf,Pr=Vr;(Ap&&Pr(new Ap(new ArrayBuffer(1)))!=Qe||Tl&&Pr(new Tl)!=rt||Ep&&Pr(Ep.resolve())!=Jt||Fa&&Pr(new Fa)!=Nn||Al&&Pr(new Al)!=qe)&&(Pr=function(s){var y=Vr(s),E=y==vn?s.constructor:n,z=E?ia(E):"";if(z)switch(z){case AI:return Qe;case EI:return rt;case RI:return Jt;case MI:return Nn;case LI:return qe}return y});function K2(s,y,E){for(var z=-1,G=E.length;++z<G;){var ee=E[z],le=ee.size;switch(ee.type){case"drop":s+=le;break;case"dropRight":y-=le;break;case"take":y=Fr(y,s+le);break;case"takeRight":s=pr(s,y-le);break}}return{start:s,end:y}}function G2(s){var y=s.match(Ji);return y?y[1].split(Hs):[]}function q0(s,y,E){y=fs(y,s);for(var z=-1,G=y.length,ee=!1;++z<G;){var le=So(y[z]);if(!(ee=s!=null&&E(s,le)))break;s=s[le]}return ee||++z!=G?ee:(G=s==null?0:s.length,!!G&&Hu(G)&&Ho(le,G)&&(Et(s)||oa(s)))}function Y2(s){var y=s.length,E=new s.constructor(y);return y&&typeof s[0]=="string"&&dn.call(s,"index")&&(E.index=s.index,E.input=s.input),E}function V0(s){return typeof s.constructor=="function"&&!Fl(s)?Ba(mu(s)):{}}function X2(s,y,E){var z=s.constructor;switch(y){case He:return Kp(s);case Ee:case Re:return new z(+s);case Qe:return O2(s,E);case mt:case $t:case Ct:case Pt:case Dt:case pt:case kt:case $n:case Mr:return A0(s,E);case rt:return new z;case gt:case Dn:return new z(s);case bn:return I2(s);case Nn:return new z;case ir:return N2(s)}}function Q2(s,y){var E=y.length;if(!E)return s;var z=E-1;return y[z]=(E>1?"& ":"")+y[z],y=y.join(E>2?", ":" "),s.replace(go,`{
1475
+ /* [wrapped with `+y+`] */
1476
+ `)}function Z2(s){return Et(s)||oa(s)||!!(Qw&&s&&s[Qw])}function Ho(s,y){var E=typeof s;return y=y??U,!!y&&(E=="number"||E!="symbol"&&wn.test(s))&&s>-1&&s%1==0&&s<y}function Kr(s,y,E){if(!On(E))return!1;var z=typeof y;return(z=="number"?ci(E)&&Ho(y,E.length):z=="string"&&y in E)?io(E[y],s):!1}function tf(s,y){if(Et(s))return!1;var E=typeof s;return E=="number"||E=="symbol"||E=="boolean"||s==null||Si(s)?!0:Qi.test(s)||!Ea.test(s)||y!=null&&s in Bt(y)}function J2(s){var y=typeof s;return y=="string"||y=="number"||y=="symbol"||y=="boolean"?s!=="__proto__":s===null}function nf(s){var y=Nu(s),E=J[y];if(typeof E!="function"||!(y in Yt.prototype))return!1;if(s===E)return!0;var z=Zp(E);return!!z&&s===z[0]}function eN(s){return!!Kw&&Kw in s}var tN=Qs?Uo:wf;function Fl(s){var y=s&&s.constructor,E=typeof y=="function"&&y.prototype||Wn;return s===E}function K0(s){return s===s&&!On(s)}function G0(s,y){return function(E){return E==null?!1:E[s]===y&&(y!==n||s in Bt(E))}}function nN(s){var y=Wu(s,function(z){return E.size===g&&E.clear(),z}),E=y.cache;return y}function rN(s,y){var E=s[1],z=y[1],G=E|z,ee=G<(m|w|M),le=z==M&&E==R||z==M&&E==O&&s[7].length<=y[8]||z==(M|O)&&y[7].length<=y[8]&&E==R;if(!(ee||le))return s;z&m&&(s[2]=y[2],G|=E&m?0:k);var de=y[3];if(de){var ye=s[3];s[3]=ye?R0(ye,de,y[4]):de,s[4]=ye?We(s[3],i):y[4]}return de=y[5],de&&(ye=s[5],s[5]=ye?M0(ye,de,y[6]):de,s[6]=ye?We(s[5],i):y[6]),de=y[7],de&&(s[7]=de),z&M&&(s[8]=s[8]==null?y[8]:Fr(s[8],y[8])),s[9]==null&&(s[9]=y[9]),s[0]=y[0],s[1]=G,s}function iN(s){var y=[];if(s!=null)for(var E in Bt(s))y.push(E);return y}function oN(s){return pu.call(s)}function Y0(s,y,E){return y=pr(y===n?s.length-1:y,0),function(){for(var z=arguments,G=-1,ee=pr(z.length-y,0),le=xe(ee);++G<ee;)le[G]=z[y+G];G=-1;for(var de=xe(y+1);++G<y;)de[G]=z[G];return de[y]=E(le),gr(s,this,de)}}function X0(s,y){return y.length<2?s:na(s,Pi(y,0,-1))}function sN(s,y){for(var E=s.length,z=Fr(y.length,E),G=li(s);z--;){var ee=y[z];s[z]=Ho(ee,E)?G[ee]:n}return s}function rf(s,y){if(!(y==="constructor"&&typeof s[y]=="function")&&y!="__proto__")return s[y]}var Q0=J0(w0),Pl=xI||function(s,y){return pn.setTimeout(s,y)},of=J0(E2);function Z0(s,y,E){var z=y+"";return of(s,Q2(z,aN(G2(z),E)))}function J0(s){var y=0,E=0;return function(){var z=CI(),G=I-(z-E);if(E=z,G>0){if(++y>=P)return arguments[0]}else y=0;return s.apply(n,arguments)}}function Fu(s,y){var E=-1,z=s.length,G=z-1;for(y=y===n?z:y;++E<y;){var ee=jp(E,G),le=s[ee];s[ee]=s[E],s[E]=le}return s.length=y,s}var ex=nN(function(s){var y=[];return s.charCodeAt(0)===46&&y.push(""),s.replace(Gn,function(E,z,G,ee){y.push(G?ee.replace(_l,"$1"):z||E)}),y});function So(s){if(typeof s=="string"||Si(s))return s;var y=s+"";return y=="0"&&1/s==-1/0?"-0":y}function ia(s){if(s!=null){try{return du.call(s)}catch{}try{return s+""}catch{}}return""}function aN(s,y){return Sr(ae,function(E){var z="_."+E[0];y&E[1]&&!wi(s,z)&&s.push(z)}),s.sort()}function tx(s){if(s instanceof Yt)return s.clone();var y=new Di(s.__wrapped__,s.__chain__);return y.__actions__=li(s.__actions__),y.__index__=s.__index__,y.__values__=s.__values__,y}function lN(s,y,E){(E?Kr(s,y,E):y===n)?y=1:y=pr(Ft(y),0);var z=s==null?0:s.length;if(!z||y<1)return[];for(var G=0,ee=0,le=xe(bu(z/y));G<z;)le[ee++]=Pi(s,G,G+=y);return le}function cN(s){for(var y=-1,E=s==null?0:s.length,z=0,G=[];++y<E;){var ee=s[y];ee&&(G[z++]=ee)}return G}function uN(){var s=arguments.length;if(!s)return[];for(var y=xe(s-1),E=arguments[0],z=s;z--;)y[z-1]=arguments[z];return A(Et(E)?li(E):[E],Cr(y,1))}var hN=zt(function(s,y){return Qn(s)?Ll(s,Cr(y,1,Qn,!0)):[]}),dN=zt(function(s,y){var E=Bi(y);return Qn(E)&&(E=n),Qn(s)?Ll(s,Cr(y,1,Qn,!0),vt(E,2)):[]}),pN=zt(function(s,y){var E=Bi(y);return Qn(E)&&(E=n),Qn(s)?Ll(s,Cr(y,1,Qn,!0),n,E):[]});function fN(s,y,E){var z=s==null?0:s.length;return z?(y=E||y===n?1:Ft(y),Pi(s,y<0?0:y,z)):[]}function gN(s,y,E){var z=s==null?0:s.length;return z?(y=E||y===n?1:Ft(y),y=z-y,Pi(s,0,y<0?0:y)):[]}function mN(s,y){return s&&s.length?Eu(s,vt(y,3),!0,!0):[]}function yN(s,y){return s&&s.length?Eu(s,vt(y,3),!0):[]}function vN(s,y,E,z){var G=s==null?0:s.length;return G?(E&&typeof E!="number"&&Kr(s,y,E)&&(E=0,z=G),u2(s,y,E,z)):[]}function nx(s,y,E){var z=s==null?0:s.length;if(!z)return-1;var G=E==null?0:Ft(E);return G<0&&(G=pr(z+G,0)),re(s,vt(y,3),G)}function rx(s,y,E){var z=s==null?0:s.length;if(!z)return-1;var G=z-1;return E!==n&&(G=Ft(E),G=E<0?pr(z+G,0):Fr(G,z-1)),re(s,vt(y,3),G,!0)}function ix(s){var y=s==null?0:s.length;return y?Cr(s,1):[]}function bN(s){var y=s==null?0:s.length;return y?Cr(s,j):[]}function wN(s,y){var E=s==null?0:s.length;return E?(y=y===n?1:Ft(y),Cr(s,y)):[]}function xN(s){for(var y=-1,E=s==null?0:s.length,z={};++y<E;){var G=s[y];z[G[0]]=G[1]}return z}function ox(s){return s&&s.length?s[0]:n}function kN(s,y,E){var z=s==null?0:s.length;if(!z)return-1;var G=E==null?0:Ft(E);return G<0&&(G=pr(z+G,0)),se(s,y,G)}function SN(s){var y=s==null?0:s.length;return y?Pi(s,0,-1):[]}var _N=zt(function(s){var y=v(s,qp);return y.length&&y[0]===s[0]?Np(y):[]}),CN=zt(function(s){var y=Bi(s),E=v(s,qp);return y===Bi(E)?y=n:E.pop(),E.length&&E[0]===s[0]?Np(E,vt(y,2)):[]}),$N=zt(function(s){var y=Bi(s),E=v(s,qp);return y=typeof y=="function"?y:n,y&&E.pop(),E.length&&E[0]===s[0]?Np(E,n,y):[]});function TN(s,y){return s==null?"":SI.call(s,y)}function Bi(s){var y=s==null?0:s.length;return y?s[y-1]:n}function AN(s,y,E){var z=s==null?0:s.length;if(!z)return-1;var G=z;return E!==n&&(G=Ft(E),G=G<0?pr(z+G,0):Fr(G,z-1)),y===y?_t(s,y,G):re(s,ke,G,!0)}function EN(s,y){return s&&s.length?m0(s,Ft(y)):n}var RN=zt(sx);function sx(s,y){return s&&s.length&&y&&y.length?Bp(s,y):s}function MN(s,y,E){return s&&s.length&&y&&y.length?Bp(s,y,vt(E,2)):s}function LN(s,y,E){return s&&s.length&&y&&y.length?Bp(s,y,n,E):s}var ON=zo(function(s,y){var E=s==null?0:s.length,z=Mp(s,y);return b0(s,v(y,function(G){return Ho(G,E)?+G:G}).sort(E0)),z});function IN(s,y){var E=[];if(!(s&&s.length))return E;var z=-1,G=[],ee=s.length;for(y=vt(y,3);++z<ee;){var le=s[z];y(le,z,s)&&(E.push(le),G.push(z))}return b0(s,G),E}function sf(s){return s==null?s:TI.call(s)}function NN(s,y,E){var z=s==null?0:s.length;return z?(E&&typeof E!="number"&&Kr(s,y,E)?(y=0,E=z):(y=y==null?0:Ft(y),E=E===n?z:Ft(E)),Pi(s,y,E)):[]}function DN(s,y){return Au(s,y)}function FN(s,y,E){return zp(s,y,vt(E,2))}function PN(s,y){var E=s==null?0:s.length;if(E){var z=Au(s,y);if(z<E&&io(s[z],y))return z}return-1}function BN(s,y){return Au(s,y,!0)}function jN(s,y,E){return zp(s,y,vt(E,2),!0)}function WN(s,y){var E=s==null?0:s.length;if(E){var z=Au(s,y,!0)-1;if(io(s[z],y))return z}return-1}function zN(s){return s&&s.length?x0(s):[]}function HN(s,y){return s&&s.length?x0(s,vt(y,2)):[]}function UN(s){var y=s==null?0:s.length;return y?Pi(s,1,y):[]}function qN(s,y,E){return s&&s.length?(y=E||y===n?1:Ft(y),Pi(s,0,y<0?0:y)):[]}function VN(s,y,E){var z=s==null?0:s.length;return z?(y=E||y===n?1:Ft(y),y=z-y,Pi(s,y<0?0:y,z)):[]}function KN(s,y){return s&&s.length?Eu(s,vt(y,3),!1,!0):[]}function GN(s,y){return s&&s.length?Eu(s,vt(y,3)):[]}var YN=zt(function(s){return ps(Cr(s,1,Qn,!0))}),XN=zt(function(s){var y=Bi(s);return Qn(y)&&(y=n),ps(Cr(s,1,Qn,!0),vt(y,2))}),QN=zt(function(s){var y=Bi(s);return y=typeof y=="function"?y:n,ps(Cr(s,1,Qn,!0),n,y)});function ZN(s){return s&&s.length?ps(s):[]}function JN(s,y){return s&&s.length?ps(s,vt(y,2)):[]}function eD(s,y){return y=typeof y=="function"?y:n,s&&s.length?ps(s,n,y):[]}function af(s){if(!(s&&s.length))return[];var y=0;return s=Dr(s,function(E){if(Qn(E))return y=pr(E.length,y),!0}),Je(y,function(E){return v(s,be(E))})}function ax(s,y){if(!(s&&s.length))return[];var E=af(s);return y==null?E:v(E,function(z){return gr(y,n,z)})}var tD=zt(function(s,y){return Qn(s)?Ll(s,y):[]}),nD=zt(function(s){return Up(Dr(s,Qn))}),rD=zt(function(s){var y=Bi(s);return Qn(y)&&(y=n),Up(Dr(s,Qn),vt(y,2))}),iD=zt(function(s){var y=Bi(s);return y=typeof y=="function"?y:n,Up(Dr(s,Qn),n,y)}),oD=zt(af);function sD(s,y){return C0(s||[],y||[],Ml)}function aD(s,y){return C0(s||[],y||[],Nl)}var lD=zt(function(s){var y=s.length,E=y>1?s[y-1]:n;return E=typeof E=="function"?(s.pop(),E):n,ax(s,E)});function lx(s){var y=J(s);return y.__chain__=!0,y}function cD(s,y){return y(s),s}function Pu(s,y){return y(s)}var uD=zo(function(s){var y=s.length,E=y?s[0]:0,z=this.__wrapped__,G=function(ee){return Mp(ee,s)};return y>1||this.__actions__.length||!(z instanceof Yt)||!Ho(E)?this.thru(G):(z=z.slice(E,+E+(y?1:0)),z.__actions__.push({func:Pu,args:[G],thisArg:n}),new Di(z,this.__chain__).thru(function(ee){return y&&!ee.length&&ee.push(n),ee}))});function hD(){return lx(this)}function dD(){return new Di(this.value(),this.__chain__)}function pD(){this.__values__===n&&(this.__values__=kx(this.value()));var s=this.__index__>=this.__values__.length,y=s?n:this.__values__[this.__index__++];return{done:s,value:y}}function fD(){return this}function gD(s){for(var y,E=this;E instanceof Su;){var z=tx(E);z.__index__=0,z.__values__=n,y?G.__wrapped__=z:y=z;var G=z;E=E.__wrapped__}return G.__wrapped__=s,y}function mD(){var s=this.__wrapped__;if(s instanceof Yt){var y=s;return this.__actions__.length&&(y=new Yt(this)),y=y.reverse(),y.__actions__.push({func:Pu,args:[sf],thisArg:n}),new Di(y,this.__chain__)}return this.thru(sf)}function yD(){return _0(this.__wrapped__,this.__actions__)}var vD=Ru(function(s,y,E){dn.call(s,E)?++s[E]:jo(s,E,1)});function bD(s,y,E){var z=Et(s)?_r:c2;return E&&Kr(s,y,E)&&(y=n),z(s,vt(y,3))}function wD(s,y){var E=Et(s)?Dr:a0;return E(s,vt(y,3))}var xD=N0(nx),kD=N0(rx);function SD(s,y){return Cr(Bu(s,y),1)}function _D(s,y){return Cr(Bu(s,y),j)}function CD(s,y,E){return E=E===n?1:Ft(E),Cr(Bu(s,y),E)}function cx(s,y){var E=Et(s)?Sr:ds;return E(s,vt(y,3))}function ux(s,y){var E=Et(s)?Xs:s0;return E(s,vt(y,3))}var $D=Ru(function(s,y,E){dn.call(s,E)?s[E].push(y):jo(s,E,[y])});function TD(s,y,E,z){s=ci(s)?s:Ua(s),E=E&&!z?Ft(E):0;var G=s.length;return E<0&&(E=pr(G+E,0)),Uu(s)?E<=G&&s.indexOf(y,E)>-1:!!G&&se(s,y,E)>-1}var AD=zt(function(s,y,E){var z=-1,G=typeof y=="function",ee=ci(s)?xe(s.length):[];return ds(s,function(le){ee[++z]=G?gr(y,le,E):Ol(le,y,E)}),ee}),ED=Ru(function(s,y,E){jo(s,E,y)});function Bu(s,y){var E=Et(s)?v:p0;return E(s,vt(y,3))}function RD(s,y,E,z){return s==null?[]:(Et(y)||(y=y==null?[]:[y]),E=z?n:E,Et(E)||(E=E==null?[]:[E]),y0(s,y,E))}var MD=Ru(function(s,y,E){s[E?0:1].push(y)},function(){return[[],[]]});function LD(s,y,E){var z=Et(s)?_:Ne,G=arguments.length<3;return z(s,vt(y,4),E,G,ds)}function OD(s,y,E){var z=Et(s)?D:Ne,G=arguments.length<3;return z(s,vt(y,4),E,G,s0)}function ID(s,y){var E=Et(s)?Dr:a0;return E(s,zu(vt(y,3)))}function ND(s){var y=Et(s)?n0:T2;return y(s)}function DD(s,y,E){(E?Kr(s,y,E):y===n)?y=1:y=Ft(y);var z=Et(s)?i2:A2;return z(s,y)}function FD(s){var y=Et(s)?o2:R2;return y(s)}function PD(s){if(s==null)return 0;if(ci(s))return Uu(s)?Ht(s):s.length;var y=Pr(s);return y==rt||y==Nn?s.size:Fp(s).length}function BD(s,y,E){var z=Et(s)?B:M2;return E&&Kr(s,y,E)&&(y=n),z(s,vt(y,3))}var jD=zt(function(s,y){if(s==null)return[];var E=y.length;return E>1&&Kr(s,y[0],y[1])?y=[]:E>2&&Kr(y[0],y[1],y[2])&&(y=[y[0]]),y0(s,Cr(y,1),[])}),ju=wI||function(){return pn.Date.now()};function WD(s,y){if(typeof y!="function")throw new fn(f);return s=Ft(s),function(){if(--s<1)return y.apply(this,arguments)}}function hx(s,y,E){return y=E?n:y,y=s&&y==null?s.length:y,Wo(s,M,n,n,n,n,y)}function dx(s,y){var E;if(typeof y!="function")throw new fn(f);return s=Ft(s),function(){return--s>0&&(E=y.apply(this,arguments)),s<=1&&(y=n),E}}var lf=zt(function(s,y,E){var z=m;if(E.length){var G=We(E,za(lf));z|=S}return Wo(s,z,y,E,G)}),px=zt(function(s,y,E){var z=m|w;if(E.length){var G=We(E,za(px));z|=S}return Wo(y,z,s,E,G)});function fx(s,y,E){y=E?n:y;var z=Wo(s,R,n,n,n,n,n,y);return z.placeholder=fx.placeholder,z}function gx(s,y,E){y=E?n:y;var z=Wo(s,T,n,n,n,n,n,y);return z.placeholder=gx.placeholder,z}function mx(s,y,E){var z,G,ee,le,de,ye,Oe=0,Ie=!1,Pe=!1,Ye=!0;if(typeof s!="function")throw new fn(f);y=ji(y)||0,On(E)&&(Ie=!!E.leading,Pe="maxWait"in E,ee=Pe?pr(ji(E.maxWait)||0,y):ee,Ye="trailing"in E?!!E.trailing:Ye);function st(Zn){var oo=z,Vo=G;return z=G=n,Oe=Zn,le=s.apply(Vo,oo),le}function bt(Zn){return Oe=Zn,de=Pl(qt,y),Ie?st(Zn):le}function jt(Zn){var oo=Zn-ye,Vo=Zn-Oe,Nx=y-oo;return Pe?Fr(Nx,ee-Vo):Nx}function wt(Zn){var oo=Zn-ye,Vo=Zn-Oe;return ye===n||oo>=y||oo<0||Pe&&Vo>=ee}function qt(){var Zn=ju();if(wt(Zn))return Qt(Zn);de=Pl(qt,jt(Zn))}function Qt(Zn){return de=n,Ye&&z?st(Zn):(z=G=n,le)}function _i(){de!==n&&$0(de),Oe=0,z=ye=G=de=n}function Gr(){return de===n?le:Qt(ju())}function Ci(){var Zn=ju(),oo=wt(Zn);if(z=arguments,G=this,ye=Zn,oo){if(de===n)return bt(ye);if(Pe)return $0(de),de=Pl(qt,y),st(ye)}return de===n&&(de=Pl(qt,y)),le}return Ci.cancel=_i,Ci.flush=Gr,Ci}var zD=zt(function(s,y){return o0(s,1,y)}),HD=zt(function(s,y,E){return o0(s,ji(y)||0,E)});function UD(s){return Wo(s,F)}function Wu(s,y){if(typeof s!="function"||y!=null&&typeof y!="function")throw new fn(f);var E=function(){var z=arguments,G=y?y.apply(this,z):z[0],ee=E.cache;if(ee.has(G))return ee.get(G);var le=s.apply(this,z);return E.cache=ee.set(G,le)||ee,le};return E.cache=new(Wu.Cache||Bo),E}Wu.Cache=Bo;function zu(s){if(typeof s!="function")throw new fn(f);return function(){var y=arguments;switch(y.length){case 0:return!s.call(this);case 1:return!s.call(this,y[0]);case 2:return!s.call(this,y[0],y[1]);case 3:return!s.call(this,y[0],y[1],y[2])}return!s.apply(this,y)}}function qD(s){return dx(2,s)}var VD=L2(function(s,y){y=y.length==1&&Et(y[0])?v(y[0],ht(vt())):v(Cr(y,1),ht(vt()));var E=y.length;return zt(function(z){for(var G=-1,ee=Fr(z.length,E);++G<ee;)z[G]=y[G].call(this,z[G]);return gr(s,this,z)})}),cf=zt(function(s,y){var E=We(y,za(cf));return Wo(s,S,n,y,E)}),yx=zt(function(s,y){var E=We(y,za(yx));return Wo(s,x,n,y,E)}),KD=zo(function(s,y){return Wo(s,O,n,n,n,y)});function GD(s,y){if(typeof s!="function")throw new fn(f);return y=y===n?y:Ft(y),zt(s,y)}function YD(s,y){if(typeof s!="function")throw new fn(f);return y=y==null?0:pr(Ft(y),0),zt(function(E){var z=E[y],G=gs(E,0,y);return z&&A(G,z),gr(s,this,G)})}function XD(s,y,E){var z=!0,G=!0;if(typeof s!="function")throw new fn(f);return On(E)&&(z="leading"in E?!!E.leading:z,G="trailing"in E?!!E.trailing:G),mx(s,y,{leading:z,maxWait:y,trailing:G})}function QD(s){return hx(s,1)}function ZD(s,y){return cf(Vp(y),s)}function JD(){if(!arguments.length)return[];var s=arguments[0];return Et(s)?s:[s]}function eF(s){return Fi(s,c)}function tF(s,y){return y=typeof y=="function"?y:n,Fi(s,c,y)}function nF(s){return Fi(s,a|c)}function rF(s,y){return y=typeof y=="function"?y:n,Fi(s,a|c,y)}function iF(s,y){return y==null||i0(s,y,br(y))}function io(s,y){return s===y||s!==s&&y!==y}var oF=Iu(Ip),sF=Iu(function(s,y){return s>=y}),oa=u0(function(){return arguments}())?u0:function(s){return zn(s)&&dn.call(s,"callee")&&!Xw.call(s,"callee")},Et=xe.isArray,aF=ai?ht(ai):g2;function ci(s){return s!=null&&Hu(s.length)&&!Uo(s)}function Qn(s){return zn(s)&&ci(s)}function lF(s){return s===!0||s===!1||zn(s)&&Vr(s)==Ee}var ms=kI||wf,cF=us?ht(us):m2;function uF(s){return zn(s)&&s.nodeType===1&&!Bl(s)}function hF(s){if(s==null)return!0;if(ci(s)&&(Et(s)||typeof s=="string"||typeof s.splice=="function"||ms(s)||Ha(s)||oa(s)))return!s.length;var y=Pr(s);if(y==rt||y==Nn)return!s.size;if(Fl(s))return!Fp(s).length;for(var E in s)if(dn.call(s,E))return!1;return!0}function dF(s,y){return Il(s,y)}function pF(s,y,E){E=typeof E=="function"?E:n;var z=E?E(s,y):n;return z===n?Il(s,y,n,E):!!z}function uf(s){if(!zn(s))return!1;var y=Vr(s);return y==Xe||y==Le||typeof s.message=="string"&&typeof s.name=="string"&&!Bl(s)}function fF(s){return typeof s=="number"&&Zw(s)}function Uo(s){if(!On(s))return!1;var y=Vr(s);return y==Ge||y==ft||y==ge||y==xr}function vx(s){return typeof s=="number"&&s==Ft(s)}function Hu(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=U}function On(s){var y=typeof s;return s!=null&&(y=="object"||y=="function")}function zn(s){return s!=null&&typeof s=="object"}var bx=jn?ht(jn):v2;function gF(s,y){return s===y||Dp(s,y,Jp(y))}function mF(s,y,E){return E=typeof E=="function"?E:n,Dp(s,y,Jp(y),E)}function yF(s){return wx(s)&&s!=+s}function vF(s){if(tN(s))throw new dt(d);return h0(s)}function bF(s){return s===null}function wF(s){return s==null}function wx(s){return typeof s=="number"||zn(s)&&Vr(s)==gt}function Bl(s){if(!zn(s)||Vr(s)!=vn)return!1;var y=mu(s);if(y===null)return!0;var E=dn.call(y,"constructor")&&y.constructor;return typeof E=="function"&&E instanceof E&&du.call(E)==mI}var hf=vi?ht(vi):b2;function xF(s){return vx(s)&&s>=-9007199254740991&&s<=U}var xx=bi?ht(bi):w2;function Uu(s){return typeof s=="string"||!Et(s)&&zn(s)&&Vr(s)==Dn}function Si(s){return typeof s=="symbol"||zn(s)&&Vr(s)==ir}var Ha=Ii?ht(Ii):x2;function kF(s){return s===n}function SF(s){return zn(s)&&Pr(s)==qe}function _F(s){return zn(s)&&Vr(s)==Se}var CF=Iu(Pp),$F=Iu(function(s,y){return s<=y});function kx(s){if(!s)return[];if(ci(s))return Uu(s)?At(s):li(s);if($l&&s[$l])return we(s[$l]());var y=Pr(s),E=y==rt?Me:y==Nn?Ke:Ua;return E(s)}function qo(s){if(!s)return s===0?s:0;if(s=ji(s),s===j||s===-1/0){var y=s<0?-1:1;return y*K}return s===s?s:0}function Ft(s){var y=qo(s),E=y%1;return y===y?E?y-E:y:0}function Sx(s){return s?ta(Ft(s),0,te):0}function ji(s){if(typeof s=="number")return s;if(Si(s))return Z;if(On(s)){var y=typeof s.valueOf=="function"?s.valueOf():s;s=On(y)?y+"":y}if(typeof s!="string")return s===0?s:+s;s=kn(s);var E=Ma.test(s);return E||Yn.test(s)?xn(s.slice(2),E?2:8):Kt.test(s)?Z:+s}function _x(s){return ko(s,ui(s))}function TF(s){return s?ta(Ft(s),-9007199254740991,U):s===0?s:0}function un(s){return s==null?"":ki(s)}var AF=ja(function(s,y){if(Fl(y)||ci(y)){ko(y,br(y),s);return}for(var E in y)dn.call(y,E)&&Ml(s,E,y[E])}),Cx=ja(function(s,y){ko(y,ui(y),s)}),qu=ja(function(s,y,E,z){ko(y,ui(y),s,z)}),EF=ja(function(s,y,E,z){ko(y,br(y),s,z)}),RF=zo(Mp);function MF(s,y){var E=Ba(s);return y==null?E:r0(E,y)}var LF=zt(function(s,y){s=Bt(s);var E=-1,z=y.length,G=z>2?y[2]:n;for(G&&Kr(y[0],y[1],G)&&(z=1);++E<z;)for(var ee=y[E],le=ui(ee),de=-1,ye=le.length;++de<ye;){var Oe=le[de],Ie=s[Oe];(Ie===n||io(Ie,Wn[Oe])&&!dn.call(s,Oe))&&(s[Oe]=ee[Oe])}return s}),OF=zt(function(s){return s.push(n,z0),gr($x,n,s)});function IF(s,y){return Q(s,vt(y,3),xo)}function NF(s,y){return Q(s,vt(y,3),Op)}function DF(s,y){return s==null?s:Lp(s,vt(y,3),ui)}function FF(s,y){return s==null?s:l0(s,vt(y,3),ui)}function PF(s,y){return s&&xo(s,vt(y,3))}function BF(s,y){return s&&Op(s,vt(y,3))}function jF(s){return s==null?[]:$u(s,br(s))}function WF(s){return s==null?[]:$u(s,ui(s))}function df(s,y,E){var z=s==null?n:na(s,y);return z===n?E:z}function zF(s,y){return s!=null&&q0(s,y,h2)}function pf(s,y){return s!=null&&q0(s,y,d2)}var HF=F0(function(s,y,E){y!=null&&typeof y.toString!="function"&&(y=pu.call(y)),s[y]=E},gf(hi)),UF=F0(function(s,y,E){y!=null&&typeof y.toString!="function"&&(y=pu.call(y)),dn.call(s,y)?s[y].push(E):s[y]=[E]},vt),qF=zt(Ol);function br(s){return ci(s)?t0(s):Fp(s)}function ui(s){return ci(s)?t0(s,!0):k2(s)}function VF(s,y){var E={};return y=vt(y,3),xo(s,function(z,G,ee){jo(E,y(z,G,ee),z)}),E}function KF(s,y){var E={};return y=vt(y,3),xo(s,function(z,G,ee){jo(E,G,y(z,G,ee))}),E}var GF=ja(function(s,y,E){Tu(s,y,E)}),$x=ja(function(s,y,E,z){Tu(s,y,E,z)}),YF=zo(function(s,y){var E={};if(s==null)return E;var z=!1;y=v(y,function(ee){return ee=fs(ee,s),z||(z=ee.length>1),ee}),ko(s,Qp(s),E),z&&(E=Fi(E,a|h|c,H2));for(var G=y.length;G--;)Hp(E,y[G]);return E});function XF(s,y){return Tx(s,zu(vt(y)))}var QF=zo(function(s,y){return s==null?{}:_2(s,y)});function Tx(s,y){if(s==null)return{};var E=v(Qp(s),function(z){return[z]});return y=vt(y),v0(s,E,function(z,G){return y(z,G[0])})}function ZF(s,y,E){y=fs(y,s);var z=-1,G=y.length;for(G||(G=1,s=n);++z<G;){var ee=s==null?n:s[So(y[z])];ee===n&&(z=G,ee=E),s=Uo(ee)?ee.call(s):ee}return s}function JF(s,y,E){return s==null?s:Nl(s,y,E)}function eP(s,y,E,z){return z=typeof z=="function"?z:n,s==null?s:Nl(s,y,E,z)}var Ax=j0(br),Ex=j0(ui);function tP(s,y,E){var z=Et(s),G=z||ms(s)||Ha(s);if(y=vt(y,4),E==null){var ee=s&&s.constructor;G?E=z?new ee:[]:On(s)?E=Uo(ee)?Ba(mu(s)):{}:E={}}return(G?Sr:xo)(s,function(le,de,ye){return y(E,le,de,ye)}),E}function nP(s,y){return s==null?!0:Hp(s,y)}function rP(s,y,E){return s==null?s:S0(s,y,Vp(E))}function iP(s,y,E,z){return z=typeof z=="function"?z:n,s==null?s:S0(s,y,Vp(E),z)}function Ua(s){return s==null?[]:Tn(s,br(s))}function oP(s){return s==null?[]:Tn(s,ui(s))}function sP(s,y,E){return E===n&&(E=y,y=n),E!==n&&(E=ji(E),E=E===E?E:0),y!==n&&(y=ji(y),y=y===y?y:0),ta(ji(s),y,E)}function aP(s,y,E){return y=qo(y),E===n?(E=y,y=0):E=qo(E),s=ji(s),p2(s,y,E)}function lP(s,y,E){if(E&&typeof E!="boolean"&&Kr(s,y,E)&&(y=E=n),E===n&&(typeof y=="boolean"?(E=y,y=n):typeof s=="boolean"&&(E=s,s=n)),s===n&&y===n?(s=0,y=1):(s=qo(s),y===n?(y=s,s=0):y=qo(y)),s>y){var z=s;s=y,y=z}if(E||s%1||y%1){var G=Jw();return Fr(s+G*(y-s+ze("1e-"+((G+"").length-1))),y)}return jp(s,y)}var cP=Wa(function(s,y,E){return y=y.toLowerCase(),s+(E?Rx(y):y)});function Rx(s){return ff(un(s).toLowerCase())}function Mx(s){return s=un(s),s&&s.replace(Fn,An).replace(No,"")}function uP(s,y,E){s=un(s),y=ki(y);var z=s.length;E=E===n?z:ta(Ft(E),0,z);var G=E;return E-=y.length,E>=0&&s.slice(E,G)==y}function hP(s){return s=un(s),s&&xl.test(s)?s.replace(Ao,q):s}function dP(s){return s=un(s),s&&Zi.test(s)?s.replace(Lr,"\\$&"):s}var pP=Wa(function(s,y,E){return s+(E?"-":"")+y.toLowerCase()}),fP=Wa(function(s,y,E){return s+(E?" ":"")+y.toLowerCase()}),gP=I0("toLowerCase");function mP(s,y,E){s=un(s),y=Ft(y);var z=y?Ht(s):0;if(!y||z>=y)return s;var G=(y-z)/2;return Ou(wu(G),E)+s+Ou(bu(G),E)}function yP(s,y,E){s=un(s),y=Ft(y);var z=y?Ht(s):0;return y&&z<y?s+Ou(y-z,E):s}function vP(s,y,E){s=un(s),y=Ft(y);var z=y?Ht(s):0;return y&&z<y?Ou(y-z,E)+s:s}function bP(s,y,E){return E||y==null?y=0:y&&(y=+y),$I(un(s).replace(Mn,""),y||0)}function wP(s,y,E){return(E?Kr(s,y,E):y===n)?y=1:y=Ft(y),Wp(un(s),y)}function xP(){var s=arguments,y=un(s[0]);return s.length<3?y:y.replace(s[1],s[2])}var kP=Wa(function(s,y,E){return s+(E?"_":"")+y.toLowerCase()});function SP(s,y,E){return E&&typeof E!="number"&&Kr(s,y,E)&&(y=E=n),E=E===n?te:E>>>0,E?(s=un(s),s&&(typeof y=="string"||y!=null&&!hf(y))&&(y=ki(y),!y&&oe(s))?gs(At(s),0,E):s.split(y,E)):[]}var _P=Wa(function(s,y,E){return s+(E?" ":"")+ff(y)});function CP(s,y,E){return s=un(s),E=E==null?0:ta(Ft(E),0,s.length),y=ki(y),s.slice(E,E+y.length)==y}function $P(s,y,E){var z=J.templateSettings;E&&Kr(s,y,E)&&(y=n),s=un(s),y=qu({},y,z,W0);var G=qu({},y.imports,z.imports,W0),ee=br(G),le=Tn(G,ee),de,ye,Oe=0,Ie=y.interpolate||Ai,Pe="__p += '",Ye=qr((y.escape||Ai).source+"|"+Ie.source+"|"+(Ie===zs?eo:Ai).source+"|"+(y.evaluate||Ai).source+"|$","g"),st="//# sourceURL="+(dn.call(y,"sourceURL")?(y.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++wo+"]")+`
1477
+ `;s.replace(Ye,function(wt,qt,Qt,_i,Gr,Ci){return Qt||(Qt=_i),Pe+=s.slice(Oe,Ci).replace(Nr,X),qt&&(de=!0,Pe+=`' +
1478
+ __e(`+qt+`) +
1479
+ '`),Gr&&(ye=!0,Pe+=`';
1480
+ `+Gr+`;
1481
+ __p += '`),Qt&&(Pe+=`' +
1482
+ ((__t = (`+Qt+`)) == null ? '' : __t) +
1483
+ '`),Oe=Ci+wt.length,wt}),Pe+=`';
1484
+ `;var bt=dn.call(y,"variable")&&y.variable;if(!bt)Pe=`with (obj) {
1485
+ `+Pe+`
1486
+ }
1487
+ `;else if(Sl.test(bt))throw new dt(b);Pe=(ye?Pe.replace(ii,""):Pe).replace(Xi,"$1").replace(To,"$1;"),Pe="function("+(bt||"obj")+`) {
1488
+ `+(bt?"":`obj || (obj = {});
1489
+ `)+"var __t, __p = ''"+(de?", __e = _.escape":"")+(ye?`, __j = Array.prototype.join;
1490
+ function print() { __p += __j.call(arguments, '') }
1491
+ `:`;
1492
+ `)+Pe+`return __p
1493
+ }`;var jt=Ox(function(){return Nt(ee,st+"return "+Pe).apply(n,le)});if(jt.source=Pe,uf(jt))throw jt;return jt}function TP(s){return un(s).toLowerCase()}function AP(s){return un(s).toUpperCase()}function EP(s,y,E){if(s=un(s),s&&(E||y===n))return kn(s);if(!s||!(y=ki(y)))return s;var z=At(s),G=At(y),ee=It(z,G),le=sr(z,G)+1;return gs(z,ee,le).join("")}function RP(s,y,E){if(s=un(s),s&&(E||y===n))return s.slice(0,Wt(s)+1);if(!s||!(y=ki(y)))return s;var z=At(s),G=sr(z,At(y))+1;return gs(z,0,G).join("")}function MP(s,y,E){if(s=un(s),s&&(E||y===n))return s.replace(Mn,"");if(!s||!(y=ki(y)))return s;var z=At(s),G=It(z,At(y));return gs(z,G).join("")}function LP(s,y){var E=L,z=H;if(On(y)){var G="separator"in y?y.separator:G;E="length"in y?Ft(y.length):E,z="omission"in y?ki(y.omission):z}s=un(s);var ee=s.length;if(oe(s)){var le=At(s);ee=le.length}if(E>=ee)return s;var de=E-Ht(z);if(de<1)return z;var ye=le?gs(le,0,de).join(""):s.slice(0,de);if(G===n)return ye+z;if(le&&(de+=ye.length-de),hf(G)){if(s.slice(de).search(G)){var Oe,Ie=ye;for(G.global||(G=qr(G.source,un(mi.exec(G))+"g")),G.lastIndex=0;Oe=G.exec(Ie);)var Pe=Oe.index;ye=ye.slice(0,Pe===n?de:Pe)}}else if(s.indexOf(ki(G),de)!=de){var Ye=ye.lastIndexOf(G);Ye>-1&&(ye=ye.slice(0,Ye))}return ye+z}function OP(s){return s=un(s),s&&Jo.test(s)?s.replace(kr,yt):s}var IP=Wa(function(s,y,E){return s+(E?" ":"")+y.toUpperCase()}),ff=I0("toUpperCase");function Lx(s,y,E){return s=un(s),y=E?n:y,y===n?fe(s)?En(s):Y(s):s.match(y)||[]}var Ox=zt(function(s,y){try{return gr(s,n,y)}catch(E){return uf(E)?E:new dt(E)}}),NP=zo(function(s,y){return Sr(y,function(E){E=So(E),jo(s,E,lf(s[E],s))}),s});function DP(s){var y=s==null?0:s.length,E=vt();return s=y?v(s,function(z){if(typeof z[1]!="function")throw new fn(f);return[E(z[0]),z[1]]}):[],zt(function(z){for(var G=-1;++G<y;){var ee=s[G];if(gr(ee[0],this,z))return gr(ee[1],this,z)}})}function FP(s){return l2(Fi(s,a))}function gf(s){return function(){return s}}function PP(s,y){return s==null||s!==s?y:s}var BP=D0(),jP=D0(!0);function hi(s){return s}function mf(s){return d0(typeof s=="function"?s:Fi(s,a))}function WP(s){return f0(Fi(s,a))}function zP(s,y){return g0(s,Fi(y,a))}var HP=zt(function(s,y){return function(E){return Ol(E,s,y)}}),UP=zt(function(s,y){return function(E){return Ol(s,E,y)}});function yf(s,y,E){var z=br(y),G=$u(y,z);E==null&&!(On(y)&&(G.length||!z.length))&&(E=y,y=s,s=this,G=$u(y,br(y)));var ee=!(On(E)&&"chain"in E)||!!E.chain,le=Uo(s);return Sr(G,function(de){var ye=y[de];s[de]=ye,le&&(s.prototype[de]=function(){var Oe=this.__chain__;if(ee||Oe){var Ie=s(this.__wrapped__),Pe=Ie.__actions__=li(this.__actions__);return Pe.push({func:ye,args:arguments,thisArg:s}),Ie.__chain__=Oe,Ie}return ye.apply(s,A([this.value()],arguments))})}),s}function qP(){return pn._===this&&(pn._=yI),this}function vf(){}function VP(s){return s=Ft(s),zt(function(y){return m0(y,s)})}var KP=Gp(v),GP=Gp(_r),YP=Gp(B);function Ix(s){return tf(s)?be(So(s)):C2(s)}function XP(s){return function(y){return s==null?n:na(s,y)}}var QP=P0(),ZP=P0(!0);function bf(){return[]}function wf(){return!1}function JP(){return{}}function eB(){return""}function tB(){return!0}function nB(s,y){if(s=Ft(s),s<1||s>U)return[];var E=te,z=Fr(s,te);y=vt(y),s-=te;for(var G=Je(z,y);++E<s;)y(E);return G}function rB(s){return Et(s)?v(s,So):Si(s)?[s]:li(ex(un(s)))}function iB(s){var y=++gI;return un(s)+y}var oB=Lu(function(s,y){return s+y},0),sB=Yp("ceil"),aB=Lu(function(s,y){return s/y},1),lB=Yp("floor");function cB(s){return s&&s.length?Cu(s,hi,Ip):n}function uB(s,y){return s&&s.length?Cu(s,vt(y,2),Ip):n}function hB(s){return me(s,hi)}function dB(s,y){return me(s,vt(y,2))}function pB(s){return s&&s.length?Cu(s,hi,Pp):n}function fB(s,y){return s&&s.length?Cu(s,vt(y,2),Pp):n}var gB=Lu(function(s,y){return s*y},1),mB=Yp("round"),yB=Lu(function(s,y){return s-y},0);function vB(s){return s&&s.length?ct(s,hi):0}function bB(s,y){return s&&s.length?ct(s,vt(y,2)):0}return J.after=WD,J.ary=hx,J.assign=AF,J.assignIn=Cx,J.assignInWith=qu,J.assignWith=EF,J.at=RF,J.before=dx,J.bind=lf,J.bindAll=NP,J.bindKey=px,J.castArray=JD,J.chain=lx,J.chunk=lN,J.compact=cN,J.concat=uN,J.cond=DP,J.conforms=FP,J.constant=gf,J.countBy=vD,J.create=MF,J.curry=fx,J.curryRight=gx,J.debounce=mx,J.defaults=LF,J.defaultsDeep=OF,J.defer=zD,J.delay=HD,J.difference=hN,J.differenceBy=dN,J.differenceWith=pN,J.drop=fN,J.dropRight=gN,J.dropRightWhile=mN,J.dropWhile=yN,J.fill=vN,J.filter=wD,J.flatMap=SD,J.flatMapDeep=_D,J.flatMapDepth=CD,J.flatten=ix,J.flattenDeep=bN,J.flattenDepth=wN,J.flip=UD,J.flow=BP,J.flowRight=jP,J.fromPairs=xN,J.functions=jF,J.functionsIn=WF,J.groupBy=$D,J.initial=SN,J.intersection=_N,J.intersectionBy=CN,J.intersectionWith=$N,J.invert=HF,J.invertBy=UF,J.invokeMap=AD,J.iteratee=mf,J.keyBy=ED,J.keys=br,J.keysIn=ui,J.map=Bu,J.mapKeys=VF,J.mapValues=KF,J.matches=WP,J.matchesProperty=zP,J.memoize=Wu,J.merge=GF,J.mergeWith=$x,J.method=HP,J.methodOf=UP,J.mixin=yf,J.negate=zu,J.nthArg=VP,J.omit=YF,J.omitBy=XF,J.once=qD,J.orderBy=RD,J.over=KP,J.overArgs=VD,J.overEvery=GP,J.overSome=YP,J.partial=cf,J.partialRight=yx,J.partition=MD,J.pick=QF,J.pickBy=Tx,J.property=Ix,J.propertyOf=XP,J.pull=RN,J.pullAll=sx,J.pullAllBy=MN,J.pullAllWith=LN,J.pullAt=ON,J.range=QP,J.rangeRight=ZP,J.rearg=KD,J.reject=ID,J.remove=IN,J.rest=GD,J.reverse=sf,J.sampleSize=DD,J.set=JF,J.setWith=eP,J.shuffle=FD,J.slice=NN,J.sortBy=jD,J.sortedUniq=zN,J.sortedUniqBy=HN,J.split=SP,J.spread=YD,J.tail=UN,J.take=qN,J.takeRight=VN,J.takeRightWhile=KN,J.takeWhile=GN,J.tap=cD,J.throttle=XD,J.thru=Pu,J.toArray=kx,J.toPairs=Ax,J.toPairsIn=Ex,J.toPath=rB,J.toPlainObject=_x,J.transform=tP,J.unary=QD,J.union=YN,J.unionBy=XN,J.unionWith=QN,J.uniq=ZN,J.uniqBy=JN,J.uniqWith=eD,J.unset=nP,J.unzip=af,J.unzipWith=ax,J.update=rP,J.updateWith=iP,J.values=Ua,J.valuesIn=oP,J.without=tD,J.words=Lx,J.wrap=ZD,J.xor=nD,J.xorBy=rD,J.xorWith=iD,J.zip=oD,J.zipObject=sD,J.zipObjectDeep=aD,J.zipWith=lD,J.entries=Ax,J.entriesIn=Ex,J.extend=Cx,J.extendWith=qu,yf(J,J),J.add=oB,J.attempt=Ox,J.camelCase=cP,J.capitalize=Rx,J.ceil=sB,J.clamp=sP,J.clone=eF,J.cloneDeep=nF,J.cloneDeepWith=rF,J.cloneWith=tF,J.conformsTo=iF,J.deburr=Mx,J.defaultTo=PP,J.divide=aB,J.endsWith=uP,J.eq=io,J.escape=hP,J.escapeRegExp=dP,J.every=bD,J.find=xD,J.findIndex=nx,J.findKey=IF,J.findLast=kD,J.findLastIndex=rx,J.findLastKey=NF,J.floor=lB,J.forEach=cx,J.forEachRight=ux,J.forIn=DF,J.forInRight=FF,J.forOwn=PF,J.forOwnRight=BF,J.get=df,J.gt=oF,J.gte=sF,J.has=zF,J.hasIn=pf,J.head=ox,J.identity=hi,J.includes=TD,J.indexOf=kN,J.inRange=aP,J.invoke=qF,J.isArguments=oa,J.isArray=Et,J.isArrayBuffer=aF,J.isArrayLike=ci,J.isArrayLikeObject=Qn,J.isBoolean=lF,J.isBuffer=ms,J.isDate=cF,J.isElement=uF,J.isEmpty=hF,J.isEqual=dF,J.isEqualWith=pF,J.isError=uf,J.isFinite=fF,J.isFunction=Uo,J.isInteger=vx,J.isLength=Hu,J.isMap=bx,J.isMatch=gF,J.isMatchWith=mF,J.isNaN=yF,J.isNative=vF,J.isNil=wF,J.isNull=bF,J.isNumber=wx,J.isObject=On,J.isObjectLike=zn,J.isPlainObject=Bl,J.isRegExp=hf,J.isSafeInteger=xF,J.isSet=xx,J.isString=Uu,J.isSymbol=Si,J.isTypedArray=Ha,J.isUndefined=kF,J.isWeakMap=SF,J.isWeakSet=_F,J.join=TN,J.kebabCase=pP,J.last=Bi,J.lastIndexOf=AN,J.lowerCase=fP,J.lowerFirst=gP,J.lt=CF,J.lte=$F,J.max=cB,J.maxBy=uB,J.mean=hB,J.meanBy=dB,J.min=pB,J.minBy=fB,J.stubArray=bf,J.stubFalse=wf,J.stubObject=JP,J.stubString=eB,J.stubTrue=tB,J.multiply=gB,J.nth=EN,J.noConflict=qP,J.noop=vf,J.now=ju,J.pad=mP,J.padEnd=yP,J.padStart=vP,J.parseInt=bP,J.random=lP,J.reduce=LD,J.reduceRight=OD,J.repeat=wP,J.replace=xP,J.result=ZF,J.round=mB,J.runInContext=pe,J.sample=ND,J.size=PD,J.snakeCase=kP,J.some=BD,J.sortedIndex=DN,J.sortedIndexBy=FN,J.sortedIndexOf=PN,J.sortedLastIndex=BN,J.sortedLastIndexBy=jN,J.sortedLastIndexOf=WN,J.startCase=_P,J.startsWith=CP,J.subtract=yB,J.sum=vB,J.sumBy=bB,J.template=$P,J.times=nB,J.toFinite=qo,J.toInteger=Ft,J.toLength=Sx,J.toLower=TP,J.toNumber=ji,J.toSafeInteger=TF,J.toString=un,J.toUpper=AP,J.trim=EP,J.trimEnd=RP,J.trimStart=MP,J.truncate=LP,J.unescape=OP,J.uniqueId=iB,J.upperCase=IP,J.upperFirst=ff,J.each=cx,J.eachRight=ux,J.first=ox,yf(J,function(){var s={};return xo(J,function(y,E){dn.call(J.prototype,E)||(s[E]=y)}),s}(),{chain:!1}),J.VERSION=r,Sr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){J[s].placeholder=J}),Sr(["drop","take"],function(s,y){Yt.prototype[s]=function(E){E=E===n?1:pr(Ft(E),0);var z=this.__filtered__&&!y?new Yt(this):this.clone();return z.__filtered__?z.__takeCount__=Fr(E,z.__takeCount__):z.__views__.push({size:Fr(E,te),type:s+(z.__dir__<0?"Right":"")}),z},Yt.prototype[s+"Right"]=function(E){return this.reverse()[s](E).reverse()}}),Sr(["filter","map","takeWhile"],function(s,y){var E=y+1,z=E==$||E==N;Yt.prototype[s]=function(G){var ee=this.clone();return ee.__iteratees__.push({iteratee:vt(G,3),type:E}),ee.__filtered__=ee.__filtered__||z,ee}}),Sr(["head","last"],function(s,y){var E="take"+(y?"Right":"");Yt.prototype[s]=function(){return this[E](1).value()[0]}}),Sr(["initial","tail"],function(s,y){var E="drop"+(y?"":"Right");Yt.prototype[s]=function(){return this.__filtered__?new Yt(this):this[E](1)}}),Yt.prototype.compact=function(){return this.filter(hi)},Yt.prototype.find=function(s){return this.filter(s).head()},Yt.prototype.findLast=function(s){return this.reverse().find(s)},Yt.prototype.invokeMap=zt(function(s,y){return typeof s=="function"?new Yt(this):this.map(function(E){return Ol(E,s,y)})}),Yt.prototype.reject=function(s){return this.filter(zu(vt(s)))},Yt.prototype.slice=function(s,y){s=Ft(s);var E=this;return E.__filtered__&&(s>0||y<0)?new Yt(E):(s<0?E=E.takeRight(-s):s&&(E=E.drop(s)),y!==n&&(y=Ft(y),E=y<0?E.dropRight(-y):E.take(y-s)),E)},Yt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Yt.prototype.toArray=function(){return this.take(te)},xo(Yt.prototype,function(s,y){var E=/^(?:filter|find|map|reject)|While$/.test(y),z=/^(?:head|last)$/.test(y),G=J[z?"take"+(y=="last"?"Right":""):y],ee=z||/^find/.test(y);G&&(J.prototype[y]=function(){var le=this.__wrapped__,de=z?[1]:arguments,ye=le instanceof Yt,Oe=de[0],Ie=ye||Et(le),Pe=function(qt){var Qt=G.apply(J,A([qt],de));return z&&Ye?Qt[0]:Qt};Ie&&E&&typeof Oe=="function"&&Oe.length!=1&&(ye=Ie=!1);var Ye=this.__chain__,st=!!this.__actions__.length,bt=ee&&!Ye,jt=ye&&!st;if(!ee&&Ie){le=jt?le:new Yt(this);var wt=s.apply(le,de);return wt.__actions__.push({func:Pu,args:[Pe],thisArg:n}),new Di(wt,Ye)}return bt&&jt?s.apply(this,de):(wt=this.thru(Pe),bt?z?wt.value()[0]:wt.value():wt)})}),Sr(["pop","push","shift","sort","splice","unshift"],function(s){var y=vr[s],E=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",z=/^(?:pop|shift)$/.test(s);J.prototype[s]=function(){var G=arguments;if(z&&!this.__chain__){var ee=this.value();return y.apply(Et(ee)?ee:[],G)}return this[E](function(le){return y.apply(Et(le)?le:[],G)})}}),xo(Yt.prototype,function(s,y){var E=J[y];if(E){var z=E.name+"";dn.call(Pa,z)||(Pa[z]=[]),Pa[z].push({name:y,func:E})}}),Pa[Mu(n,w).name]=[{name:"wrapper",func:n}],Yt.prototype.clone=OI,Yt.prototype.reverse=II,Yt.prototype.value=NI,J.prototype.at=uD,J.prototype.chain=hD,J.prototype.commit=dD,J.prototype.next=pD,J.prototype.plant=gD,J.prototype.reverse=mD,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=yD,J.prototype.first=J.prototype.head,$l&&(J.prototype[$l]=fD),J},Xt=ar();or?((or.exports=Xt)._=Xt,_n._=Xt):pn._=Xt}).call(_$)}(wc,wc.exports)),wc.exports}var $$=C$();Wi("O",tc($$)).debounce(function(){this.rebuildDisplayText()},300);var Gm={exports:{}},Ym;function T$(){return Ym||(Ym=1,function(t,e){(function(){ace.require(["ace/mode/text"],function(n){t&&(t.exports=n)})})()}(Gm)),Gm.exports}T$();const A$=!0,lr="u-",E$="uplot",R$=lr+"hz",M$=lr+"vt",L$=lr+"title",O$=lr+"wrap",I$=lr+"under",N$=lr+"over",D$=lr+"axis",Rs=lr+"off",F$=lr+"select",P$=lr+"cursor-x",B$=lr+"cursor-y",j$=lr+"cursor-pt",W$=lr+"legend",z$=lr+"live",H$=lr+"inline",U$=lr+"series",q$=lr+"marker",Xm=lr+"label",V$=lr+"value",il="width",ol="height",sl="top",Qm="bottom",fa="left",Fh="right",Ph="#000",Zm=Ph+"0",Bh="mousemove",Jm="mousedown",jh="mouseup",ey="mouseenter",ty="mouseleave",ny="dblclick",K$="resize",G$="scroll",ry="change",xc="dppxchange",Wh="--",ga=typeof window<"u",zh=ga?document:null,ma=ga?window:null,Y$=ga?navigator:null;let rn,kc;function Hh(){let t=devicePixelRatio;rn!=t&&(rn=t,kc&&Vh(ry,kc,Hh),kc=matchMedia(`(min-resolution: ${rn-.001}dppx) and (max-resolution: ${rn+.001}dppx)`),Ms(ry,kc,Hh),ma.dispatchEvent(new CustomEvent(xc)))}function di(t,e){if(e!=null){let n=t.classList;!n.contains(e)&&n.add(e)}}function Uh(t,e){let n=t.classList;n.contains(e)&&n.remove(e)}function Sn(t,e,n){t.style[e]=n+"px"}function qi(t,e,n,r){let u=zh.createElement(t);return e!=null&&di(u,e),n!=null&&n.insertBefore(u,r),u}function $i(t,e){return qi("div",t,e)}const iy=new WeakMap;function co(t,e,n,r,u){let d="translate("+e+"px,"+n+"px)",f=iy.get(t);d!=f&&(t.style.transform=d,iy.set(t,d),e<0||n<0||e>r||n>u?di(t,Rs):Uh(t,Rs))}const oy=new WeakMap;function sy(t,e,n){let r=e+n,u=oy.get(t);r!=u&&(oy.set(t,r),t.style.background=e,t.style.borderColor=n)}const ay=new WeakMap;function ly(t,e,n,r){let u=e+""+n,d=ay.get(t);u!=d&&(ay.set(t,u),t.style.height=n+"px",t.style.width=e+"px",t.style.marginLeft=r?-e/2+"px":0,t.style.marginTop=r?-n/2+"px":0)}const qh={passive:!0},X$={...qh,capture:!0};function Ms(t,e,n,r){e.addEventListener(t,n,r?X$:qh)}function Vh(t,e,n,r){e.removeEventListener(t,n,qh)}ga&&Hh();function Vi(t,e,n,r){let u;n=n||0,r=r||e.length-1;let d=r<=2147483647;for(;r-n>1;)u=d?n+r>>1:fi((n+r)/2),e[u]<t?n=u:r=u;return t-e[n]<=e[r]-t?n:r}function cy(t){return(e,n,r)=>{let u=-1,d=-1;for(let f=n;f<=r;f++)if(t(e[f])){u=f;break}for(let f=r;f>=n;f--)if(t(e[f])){d=f;break}return[u,d]}}const uy=t=>t!=null,hy=t=>t!=null&&t>0,Sc=cy(uy),Q$=cy(hy);function Z$(t,e,n,r=0,u=!1){let d=u?Q$:Sc,f=u?hy:uy;[e,n]=d(t,e,n);let b=t[e],p=t[e];if(e>-1)if(r==1)b=t[e],p=t[n];else if(r==-1)b=t[n],p=t[e];else for(let g=e;g<=n;g++){let i=t[g];f(i)&&(i<b?b=i:i>p&&(p=i))}return[b??wr,p??-1/0]}function _c(t,e,n,r){let u=fy(t),d=fy(e);t==e&&(u==-1?(t*=n,e/=n):(t/=n,e*=n));let f=n==10?Co:gy,b=u==1?fi:Ti,p=d==1?Ti:fi,g=b(f(cr(t))),i=p(f(cr(e))),a=ya(n,g),h=ya(n,i);return n==10&&(g<0&&(a=gn(a,-g)),i<0&&(h=gn(h,-i))),r||n==2?(t=a*u,e=h*d):(t=ky(t,a),e=Tc(e,h)),[t,e]}function Kh(t,e,n,r){let u=_c(t,e,n,r);return t==0&&(u[0]=0),e==0&&(u[1]=0),u}const Gh=.1,dy={mode:3,pad:Gh},al={pad:0,soft:null,mode:0},J$={min:al,max:al};function Cc(t,e,n,r){return Ac(n)?py(t,e,n):(al.pad=n,al.soft=r?0:null,al.mode=r?3:0,py(t,e,J$))}function tn(t,e){return t??e}function eT(t,e,n){for(e=tn(e,0),n=tn(n,t.length-1);e<=n;){if(t[e]!=null)return!0;e++}return!1}function py(t,e,n){let r=n.min,u=n.max,d=tn(r.pad,0),f=tn(u.pad,0),b=tn(r.hard,-1/0),p=tn(u.hard,wr),g=tn(r.soft,wr),i=tn(u.soft,-1/0),a=tn(r.mode,0),h=tn(u.mode,0),c=e-t,o=Co(c),l=Wr(cr(t),cr(e)),m=Co(l),w=cr(m-o);(c<1e-24||w>10)&&(c=0,(t==0||e==0)&&(c=1e-24,a==2&&g!=wr&&(d=0),h==2&&i!=-1/0&&(f=0)));let k=c||l||1e3,R=Co(k),T=ya(10,fi(R)),S=k*(c==0?t==0?.1:1:d),x=gn(ky(t-S,T/10),24),M=t>=g&&(a==1||a==3&&x<=g||a==2&&x>=g)?g:wr,O=Wr(b,x<M&&t>=M?M:Ki(M,x)),F=k*(c==0?e==0?.1:1:f),L=gn(Tc(e+F,T/10),24),H=e<=i&&(h==1||h==3&&L>=i||h==2&&L<=i)?i:-1/0,P=Ki(p,L>H&&e<=H?H:Wr(H,L));return O==P&&O==0&&(P=100),[O,P]}const tT=new Intl.NumberFormat(ga?Y$.language:"en-US"),Yh=t=>tT.format(t),pi=Math,$c=pi.PI,cr=pi.abs,fi=pi.floor,ur=pi.round,Ti=pi.ceil,Ki=pi.min,Wr=pi.max,ya=pi.pow,fy=pi.sign,Co=pi.log10,gy=pi.log2,nT=(t,e=1)=>pi.sinh(t)*e,Xh=(t,e=1)=>pi.asinh(t/e),wr=1/0;function my(t){return(Co((t^t>>31)-(t>>31))|0)+1}function Qh(t,e,n){return Ki(Wr(t,e),n)}function yy(t){return typeof t=="function"}function Vt(t){return yy(t)?t:()=>t}const rT=()=>{},vy=t=>t,by=(t,e)=>e,iT=t=>null,wy=t=>!0,xy=(t,e)=>t==e,oT=/\.\d*?(?=9{6,}|0{6,})/gm,Ls=t=>{if(_y(t)||Qo.has(t))return t;const e=`${t}`,n=e.match(oT);if(n==null)return t;let r=n[0].length-1;if(e.indexOf("e-")!=-1){let[u,d]=e.split("e");return+`${Ls(u)}e${d}`}return gn(t,r)};function Os(t,e){return Ls(gn(Ls(t/e))*e)}function Tc(t,e){return Ls(Ti(Ls(t/e))*e)}function ky(t,e){return Ls(fi(Ls(t/e))*e)}function gn(t,e=0){if(_y(t))return t;let n=10**e,r=t*n*(1+Number.EPSILON);return ur(r)/n}const Qo=new Map;function Sy(t){return((""+t).split(".")[1]||"").length}function ll(t,e,n,r){let u=[],d=r.map(Sy);for(let f=e;f<n;f++){let b=cr(f),p=gn(ya(t,f),b);for(let g=0;g<r.length;g++){let i=t==10?+`${r[g]}e${f}`:r[g]*p,a=(f>=0?0:b)+(f>=d[g]?0:d[g]),h=t==10?i:gn(i,a);u.push(h),Qo.set(h,a)}}return u}const cl={},Zh=[],va=[null,null],Zo=Array.isArray,_y=Number.isInteger,sT=t=>t===void 0;function Cy(t){return typeof t=="string"}function Ac(t){let e=!1;if(t!=null){let n=t.constructor;e=n==null||n==Object}return e}function aT(t){return t!=null&&typeof t=="object"}const lT=Object.getPrototypeOf(Uint8Array),$y="__proto__";function ba(t,e=Ac){let n;if(Zo(t)){let r=t.find(u=>u!=null);if(Zo(r)||e(r)){n=Array(t.length);for(let u=0;u<t.length;u++)n[u]=ba(t[u],e)}else n=t.slice()}else if(t instanceof lT)n=t.slice();else if(e(t)){n={};for(let r in t)r!=$y&&(n[r]=ba(t[r],e))}else n=t;return n}function nr(t){let e=arguments;for(let n=1;n<e.length;n++){let r=e[n];for(let u in r)u!=$y&&(Ac(t[u])?nr(t[u],ba(r[u])):t[u]=ba(r[u]))}return t}const cT=0,uT=1,hT=2;function dT(t,e,n){for(let r=0,u,d=-1;r<e.length;r++){let f=e[r];if(f>d){for(u=f-1;u>=0&&t[u]==null;)t[u--]=null;for(u=f+1;u<n&&t[u]==null;)t[d=u++]=null}}}function pT(t,e){if(mT(t)){let f=t[0].slice();for(let b=1;b<t.length;b++)f.push(...t[b].slice(1));return yT(f[0])||(f=gT(f)),f}let n=new Set;for(let f=0;f<t.length;f++){let b=t[f][0],p=b.length;for(let g=0;g<p;g++)n.add(b[g])}let r=[Array.from(n).sort((f,b)=>f-b)],u=r[0].length,d=new Map;for(let f=0;f<u;f++)d.set(r[0][f],f);for(let f=0;f<t.length;f++){let b=t[f],p=b[0];for(let g=1;g<b.length;g++){let i=b[g],a=Array(u).fill(void 0),h=e?e[f][g]:uT,c=[];for(let o=0;o<i.length;o++){let l=i[o],m=d.get(p[o]);l===null?h!=cT&&(a[m]=l,h==hT&&c.push(m)):a[m]=l}dT(a,c,u),r.push(a)}}return r}const fT=typeof queueMicrotask>"u"?t=>Promise.resolve().then(t):queueMicrotask;function gT(t){let e=t[0],n=e.length,r=Array(n);for(let d=0;d<r.length;d++)r[d]=d;r.sort((d,f)=>e[d]-e[f]);let u=[];for(let d=0;d<t.length;d++){let f=t[d],b=Array(n);for(let p=0;p<n;p++)b[p]=f[r[p]];u.push(b)}return u}function mT(t){let e=t[0][0],n=e.length;for(let r=1;r<t.length;r++){let u=t[r][0];if(u.length!=n)return!1;if(u!=e){for(let d=0;d<n;d++)if(u[d]!=e[d])return!1}}return!0}function yT(t,e=100){const n=t.length;if(n<=1)return!0;let r=0,u=n-1;for(;r<=u&&t[r]==null;)r++;for(;u>=r&&t[u]==null;)u--;if(u<=r)return!0;const d=Wr(1,fi((u-r+1)/e));for(let f=t[r],b=r+d;b<=u;b+=d){const p=t[b];if(p!=null){if(p<=f)return!1;f=p}}return!0}const Ty=["January","February","March","April","May","June","July","August","September","October","November","December"],Ay=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Ey(t){return t.slice(0,3)}const vT=Ay.map(Ey),bT=Ty.map(Ey),wT={MMMM:Ty,MMM:bT,WWWW:Ay,WWW:vT};function ul(t){return(t<10?"0":"")+t}function xT(t){return(t<10?"00":t<100?"0":"")+t}const kT={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=>ul(t.getMonth()+1),M:t=>t.getMonth()+1,DD:t=>ul(t.getDate()),D:t=>t.getDate(),WWWW:(t,e)=>e.WWWW[t.getDay()],WWW:(t,e)=>e.WWW[t.getDay()],HH:t=>ul(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=>ul(t.getMinutes()),m:t=>t.getMinutes(),ss:t=>ul(t.getSeconds()),s:t=>t.getSeconds(),fff:t=>xT(t.getMilliseconds())};function Jh(t,e){e=e||wT;let n=[],r=/\{([a-z]+)\}|[^{]+/gi,u;for(;u=r.exec(t);)n.push(u[0][0]=="{"?kT[u[1]]:u[0]);return d=>{let f="";for(let b=0;b<n.length;b++)f+=typeof n[b]=="string"?n[b]:n[b](d,e);return f}}const ST=new Intl.DateTimeFormat().resolvedOptions().timeZone;function _T(t,e){let n;return e=="UTC"||e=="Etc/UTC"?n=new Date(+t+t.getTimezoneOffset()*6e4):e==ST?n=t:(n=new Date(t.toLocaleString("en-US",{timeZone:e})),n.setMilliseconds(t.getMilliseconds())),n}const Ry=t=>t%1==0,Ec=[1,2,2.5,5],CT=ll(10,-32,0,Ec),My=ll(10,0,32,Ec),$T=My.filter(Ry),Is=CT.concat(My),ed=`
1494
+ `,Ly="{YYYY}",Oy=ed+Ly,Iy="{M}/{D}",hl=ed+Iy,Rc=hl+"/{YY}",Ny="{aa}",TT="{h}:{mm}",wa=TT+Ny,Dy=ed+wa,Fy=":{ss}",cn=null;function Py(t){let e=t*1e3,n=e*60,r=n*60,u=r*24,d=u*30,f=u*365,b=(t==1?ll(10,0,3,Ec).filter(Ry):ll(10,-3,0,Ec)).concat([e,e*5,e*10,e*15,e*30,n,n*5,n*10,n*15,n*30,r,r*2,r*3,r*4,r*6,r*8,r*12,u,u*2,u*3,u*4,u*5,u*6,u*7,u*8,u*9,u*10,u*15,d,d*2,d*3,d*4,d*6,f,f*2,f*5,f*10,f*25,f*50,f*100]);const p=[[f,Ly,cn,cn,cn,cn,cn,cn,1],[u*28,"{MMM}",Oy,cn,cn,cn,cn,cn,1],[u,Iy,Oy,cn,cn,cn,cn,cn,1],[r,"{h}"+Ny,Rc,cn,hl,cn,cn,cn,1],[n,wa,Rc,cn,hl,cn,cn,cn,1],[e,Fy,Rc+" "+wa,cn,hl+" "+wa,cn,Dy,cn,1],[t,Fy+".{fff}",Rc+" "+wa,cn,hl+" "+wa,cn,Dy,cn,1]];function g(i){return(a,h,c,o,l,m)=>{let w=[],k=l>=f,R=l>=d&&l<f,T=i(c),S=gn(T*t,3),x=td(T.getFullYear(),k?0:T.getMonth(),R||k?1:T.getDate()),M=gn(x*t,3);if(R||k){let O=R?l/d:0,F=k?l/f:0,L=S==M?S:gn(td(x.getFullYear()+F,x.getMonth()+O,1)*t,3),H=new Date(ur(L/t)),P=H.getFullYear(),I=H.getMonth();for(let $=0;L<=o;$++){let C=td(P+F*$,I+O*$,1),N=C-i(gn(C*t,3));L=gn((+C+N)*t,3),L<=o&&w.push(L)}}else{let O=l>=u?u:l,F=fi(c)-fi(S),L=M+F+Tc(S-M,O);w.push(L);let H=i(L),P=H.getHours()+H.getMinutes()/n+H.getSeconds()/r,I=l/r,$=a.axes[h]._space,C=m/$;for(;L=gn(L+l,t==1?0:3),!(L>o);)if(I>1){let N=fi(gn(P+I,6))%24,j=i(L).getHours()-N;j>1&&(j=-1),L-=j*r,P=(P+I)%24;let U=w[w.length-1];gn((L-U)/l,3)*C>=.7&&w.push(L)}else w.push(L)}return w}}return[b,p,g]}const[AT,ET,RT]=Py(1),[MT,LT,OT]=Py(.001);ll(2,-53,53,[1]);function By(t,e){return t.map(n=>n.map((r,u)=>u==0||u==8||r==null?r:e(u==1||n[8]==0?r:n[1]+r)))}function jy(t,e){return(n,r,u,d,f)=>{let b=e.find(o=>f>=o[0])||e[e.length-1],p,g,i,a,h,c;return r.map(o=>{let l=t(o),m=l.getFullYear(),w=l.getMonth(),k=l.getDate(),R=l.getHours(),T=l.getMinutes(),S=l.getSeconds(),x=m!=p&&b[2]||w!=g&&b[3]||k!=i&&b[4]||R!=a&&b[5]||T!=h&&b[6]||S!=c&&b[7]||b[1];return p=m,g=w,i=k,a=R,h=T,c=S,x(l)})}}function IT(t,e){let n=Jh(e);return(r,u,d,f,b)=>u.map(p=>n(t(p)))}function td(t,e,n){return new Date(t,e,n)}function Wy(t,e){return e(t)}const NT="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function zy(t,e){return(n,r,u,d)=>d==null?Wh:e(t(r))}function DT(t,e){let n=t.series[e];return n.width?n.stroke(t,e):n.points.width?n.points.stroke(t,e):null}function FT(t,e){return t.series[e].fill(t,e)}const PT={show:!0,live:!0,isolate:!1,mount:rT,markers:{show:!0,width:2,stroke:DT,fill:FT,dash:"solid"},idx:null,idxs:null,values:[]};function BT(t,e){let n=t.cursor.points,r=$i(),u=n.size(t,e);Sn(r,il,u),Sn(r,ol,u);let d=u/-2;Sn(r,"marginLeft",d),Sn(r,"marginTop",d);let f=n.width(t,e,u);return f&&Sn(r,"borderWidth",f),r}function jT(t,e){let n=t.series[e].points;return n._fill||n._stroke}function WT(t,e){let n=t.series[e].points;return n._stroke||n._fill}function zT(t,e){return t.series[e].points.size}const nd=[0,0];function HT(t,e,n){return nd[0]=e,nd[1]=n,nd}function Mc(t,e,n,r=!0){return u=>{u.button==0&&(!r||u.target==e)&&n(u)}}function rd(t,e,n,r=!0){return u=>{(!r||u.target==e)&&n(u)}}const UT={show:!0,x:!0,y:!0,lock:!1,move:HT,points:{one:!1,show:BT,size:zT,width:0,stroke:WT,fill:jT},bind:{mousedown:Mc,mouseup:Mc,click:Mc,dblclick:Mc,mousemove:rd,mouseleave:rd,mouseenter:rd},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,r,u)=>r-u,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},Hy={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},id=nr({},Hy,{filter:by}),Uy=nr({},id,{size:10}),qy=nr({},Hy,{show:!1}),od='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"',Vy="bold "+od,Ky=1.5,Gy={show:!0,scale:"x",stroke:Ph,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Vy,side:2,grid:id,ticks:Uy,border:qy,font:od,lineGap:Ky,rotate:0},qT="Value",VT="Time",Yy={show:!0,scale:"x",auto:!1,sorted:1,min:wr,max:-1/0,idxs:[]};function KT(t,e,n,r,u){return e.map(d=>d==null?"":Yh(d))}function GT(t,e,n,r,u,d,f){let b=[],p=Qo.get(u)||0;n=f?n:gn(Tc(n,u),p);for(let g=n;g<=r;g=gn(g+u,p))b.push(Object.is(g,-0)?0:g);return b}function sd(t,e,n,r,u,d,f){const b=[],p=t.scales[t.axes[e].scale].log,g=p==10?Co:gy,i=fi(g(n));u=ya(p,i),p==10&&(u=Is[Vi(u,Is)]);let a=n,h=u*p;p==10&&(h=Is[Vi(h,Is)]);do b.push(a),a=a+u,p==10&&!Qo.has(a)&&(a=gn(a,Qo.get(u))),a>=h&&(u=a,h=u*p,p==10&&(h=Is[Vi(h,Is)]));while(a<=r);return b}function YT(t,e,n,r,u,d,f){let b=t.scales[t.axes[e].scale].asinh,p=r>b?sd(t,e,Wr(b,n),r,u):[b],g=r>=0&&n<=0?[0]:[];return(n<-b?sd(t,e,Wr(b,-r),-n,u):[b]).reverse().map(i=>-i).concat(g,p)}const Xy=/./,XT=/[12357]/,QT=/[125]/,Qy=/1/,ad=(t,e,n,r)=>t.map((u,d)=>e==4&&u==0||d%r==0&&n.test(u.toExponential()[u<0?1:0])?u:null);function ZT(t,e,n,r,u){let d=t.axes[n],f=d.scale,b=t.scales[f],p=t.valToPos,g=d._space,i=p(10,f),a=p(9,f)-i>=g?Xy:p(7,f)-i>=g?XT:p(5,f)-i>=g?QT:Qy;if(a==Qy){let h=cr(p(1,f)-i);if(h<g)return ad(e.slice().reverse(),b.distr,a,Ti(g/h)).reverse()}return ad(e,b.distr,a,1)}function JT(t,e,n,r,u){let d=t.axes[n],f=d.scale,b=d._space,p=t.valToPos,g=cr(p(1,f)-p(2,f));return g<b?ad(e.slice().reverse(),3,Xy,Ti(b/g)).reverse():e}function eA(t,e,n,r){return r==null?Wh:e==null?"":Yh(e)}const Zy={show:!0,scale:"y",stroke:Ph,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Vy,side:3,grid:id,ticks:Uy,border:qy,font:od,lineGap:Ky,rotate:0};function tA(t,e){let n=3+(t||1)*2;return gn(n*e,3)}function nA(t,e){let{scale:n,idxs:r}=t.series[0],u=t._data[0],d=t.valToPos(u[r[0]],n,!0),f=t.valToPos(u[r[1]],n,!0),b=cr(f-d),p=t.series[e],g=b/(p.points.space*rn);return r[1]-r[0]<=g}const Jy={scale:null,auto:!0,sorted:0,min:wr,max:-1/0},ev=(t,e,n,r,u)=>u,tv={show:!0,auto:!0,sorted:0,gaps:ev,alpha:1,facets:[nr({},Jy,{scale:"x"}),nr({},Jy,{scale:"y"})]},nv={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:ev,alpha:1,points:{show:nA,filter:null},values:null,min:wr,max:-1/0,idxs:[],path:null,clip:null};function rA(t,e,n,r,u){return n/10}const rv={time:A$,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},iA=nr({},rv,{time:!1,ori:1}),iv={};function ov(t,e){let n=iv[t];return n||(n={key:t,plots:[],sub(r){n.plots.push(r)},unsub(r){n.plots=n.plots.filter(u=>u!=r)},pub(r,u,d,f,b,p,g){for(let i=0;i<n.plots.length;i++)n.plots[i]!=u&&n.plots[i].pub(r,u,d,f,b,p,g)}},t!=null&&(iv[t]=n)),n}const xa=1,ld=2;function Ns(t,e,n){const r=t.mode,u=t.series[e],d=r==2?t._data[e]:t._data,f=t.scales,b=t.bbox;let p=d[0],g=r==2?d[1]:d[e],i=r==2?f[u.facets[0].scale]:f[t.series[0].scale],a=r==2?f[u.facets[1].scale]:f[u.scale],h=b.left,c=b.top,o=b.width,l=b.height,m=t.valToPosH,w=t.valToPosV;return i.ori==0?n(u,p,g,i,a,m,w,h,c,o,l,Oc,ka,Nc,lv,uv):n(u,p,g,i,a,w,m,c,h,l,o,Ic,Sa,hd,cv,hv)}function cd(t,e){let n=0,r=0,u=tn(t.bands,Zh);for(let d=0;d<u.length;d++){let f=u[d];f.series[0]==e?n=f.dir:f.series[1]==e&&(f.dir==1?r|=1:r|=2)}return[n,r==1?-1:r==2?1:r==3?2:0]}function oA(t,e,n,r,u){let d=t.mode,f=t.series[e],b=d==2?f.facets[1].scale:f.scale,p=t.scales[b];return u==-1?p.min:u==1?p.max:p.distr==3?p.dir==1?p.min:p.max:0}function $o(t,e,n,r,u,d){return Ns(t,e,(f,b,p,g,i,a,h,c,o,l,m)=>{let w=f.pxRound;const k=g.dir*(g.ori==0?1:-1),R=g.ori==0?ka:Sa;let T,S;k==1?(T=n,S=r):(T=r,S=n);let x=w(a(b[T],g,l,c)),M=w(h(p[T],i,m,o)),O=w(a(b[S],g,l,c)),F=w(h(d==1?i.max:i.min,i,m,o)),L=new Path2D(u);return R(L,O,F),R(L,x,F),R(L,x,M),L})}function Lc(t,e,n,r,u,d){let f=null;if(t.length>0){f=new Path2D;const b=e==0?Nc:hd;let p=n;for(let a=0;a<t.length;a++){let h=t[a];if(h[1]>h[0]){let c=h[0]-p;c>0&&b(f,p,r,c,r+d),p=h[1]}}let g=n+u-p,i=10;g>0&&b(f,p,r-i/2,g,r+d+i)}return f}function sA(t,e,n){let r=t[t.length-1];r&&r[0]==e?r[1]=n:t.push([e,n])}function ud(t,e,n,r,u,d,f){let b=[],p=t.length;for(let g=u==1?n:r;g>=n&&g<=r;g+=u)if(e[g]===null){let i=g,a=g;if(u==1)for(;++g<=r&&e[g]===null;)a=g;else for(;--g>=n&&e[g]===null;)a=g;let h=d(t[i]),c=a==i?h:d(t[a]),o=i-u;h=f<=0&&o>=0&&o<p?d(t[o]):h;let l=a+u;c=f>=0&&l>=0&&l<p?d(t[l]):c,c>=h&&b.push([h,c])}return b}function sv(t){return t==0?vy:t==1?ur:e=>Os(e,t)}function av(t){let e=t==0?Oc:Ic,n=t==0?(u,d,f,b,p,g)=>{u.arcTo(d,f,b,p,g)}:(u,d,f,b,p,g)=>{u.arcTo(f,d,p,b,g)},r=t==0?(u,d,f,b,p)=>{u.rect(d,f,b,p)}:(u,d,f,b,p)=>{u.rect(f,d,p,b)};return(u,d,f,b,p,g=0,i=0)=>{g==0&&i==0?r(u,d,f,b,p):(g=Ki(g,b/2,p/2),i=Ki(i,b/2,p/2),e(u,d+g,f),n(u,d+b,f,d+b,f+p,g),n(u,d+b,f+p,d,f+p,i),n(u,d,f+p,d,f,i),n(u,d,f,d+b,f,g),u.closePath())}}const Oc=(t,e,n)=>{t.moveTo(e,n)},Ic=(t,e,n)=>{t.moveTo(n,e)},ka=(t,e,n)=>{t.lineTo(e,n)},Sa=(t,e,n)=>{t.lineTo(n,e)},Nc=av(0),hd=av(1),lv=(t,e,n,r,u,d)=>{t.arc(e,n,r,u,d)},cv=(t,e,n,r,u,d)=>{t.arc(n,e,r,u,d)},uv=(t,e,n,r,u,d,f)=>{t.bezierCurveTo(e,n,r,u,d,f)},hv=(t,e,n,r,u,d,f)=>{t.bezierCurveTo(n,e,u,r,f,d)};function dv(t){return(e,n,r,u,d)=>Ns(e,n,(f,b,p,g,i,a,h,c,o,l,m)=>{let{pxRound:w,points:k}=f,R,T;g.ori==0?(R=Oc,T=lv):(R=Ic,T=cv);const S=gn(k.width*rn,3);let x=(k.size-k.width)/2*rn,M=gn(x*2,3),O=new Path2D,F=new Path2D,{left:L,top:H,width:P,height:I}=e.bbox;Nc(F,L-M,H-M,P+M*2,I+M*2);const $=C=>{if(p[C]!=null){let N=w(a(b[C],g,l,c)),j=w(h(p[C],i,m,o));R(O,N+x,j),T(O,N,j,x,0,$c*2)}};if(d)d.forEach($);else for(let C=r;C<=u;C++)$(C);return{stroke:S>0?O:null,fill:O,clip:F,flags:xa|ld}})}function pv(t){return(e,n,r,u,d,f)=>{r!=u&&(d!=r&&f!=r&&t(e,n,r),d!=u&&f!=u&&t(e,n,u),t(e,n,f))}}const aA=pv(ka),lA=pv(Sa);function fv(t){const e=tn(t==null?void 0:t.alignGaps,0);return(n,r,u,d)=>Ns(n,r,(f,b,p,g,i,a,h,c,o,l,m)=>{[u,d]=Sc(p,u,d);let w=f.pxRound,k=P=>w(a(P,g,l,c)),R=P=>w(h(P,i,m,o)),T,S;g.ori==0?(T=ka,S=aA):(T=Sa,S=lA);const x=g.dir*(g.ori==0?1:-1),M={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:xa},O=M.stroke;let F=!1;if(d-u>=l*4){let P=he=>n.posToVal(he,g.key,!0),I=null,$=null,C,N,j,U=k(b[x==1?u:d]),K=k(b[u]),Z=k(b[d]),te=P(x==1?K+1:Z-1);for(let he=x==1?u:d;he>=u&&he<=d;he+=x){let ne=b[he],ae=(x==1?ne<te:ne>te)?U:k(ne),ue=p[he];ae==U?ue!=null?(N=ue,I==null?(T(O,ae,R(N)),C=I=$=N):N<I?I=N:N>$&&($=N)):ue===null&&(F=!0):(I!=null&&S(O,U,R(I),R($),R(C),R(N)),ue!=null?(N=ue,T(O,ae,R(N)),I=$=C=N):(I=$=null,ue===null&&(F=!0)),U=ae,te=P(U+x))}I!=null&&I!=$&&j!=U&&S(O,U,R(I),R($),R(C),R(N))}else for(let P=x==1?u:d;P>=u&&P<=d;P+=x){let I=p[P];I===null?F=!0:I!=null&&T(O,k(b[P]),R(I))}let[L,H]=cd(n,r);if(f.fill!=null||L!=0){let P=M.fill=new Path2D(O),I=f.fillTo(n,r,f.min,f.max,L),$=R(I),C=k(b[u]),N=k(b[d]);x==-1&&([N,C]=[C,N]),T(P,N,$),T(P,C,$)}if(!f.spanGaps){let P=[];F&&P.push(...ud(b,p,u,d,x,k,e)),M.gaps=P=f.gaps(n,r,u,d,P),M.clip=Lc(P,g.ori,c,o,l,m)}return H!=0&&(M.band=H==2?[$o(n,r,u,d,O,-1),$o(n,r,u,d,O,1)]:$o(n,r,u,d,O,H)),M})}function cA(t){const e=tn(t.align,1),n=tn(t.ascDesc,!1),r=tn(t.alignGaps,0),u=tn(t.extend,!1);return(d,f,b,p)=>Ns(d,f,(g,i,a,h,c,o,l,m,w,k,R)=>{[b,p]=Sc(a,b,p);let T=g.pxRound,{left:S,width:x}=d.bbox,M=Z=>T(o(Z,h,k,m)),O=Z=>T(l(Z,c,R,w)),F=h.ori==0?ka:Sa;const L={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:xa},H=L.stroke,P=h.dir*(h.ori==0?1:-1);let I=O(a[P==1?b:p]),$=M(i[P==1?b:p]),C=$,N=$;u&&e==-1&&(N=S,F(H,N,I)),F(H,$,I);for(let Z=P==1?b:p;Z>=b&&Z<=p;Z+=P){let te=a[Z];if(te==null)continue;let he=M(i[Z]),ne=O(te);e==1?F(H,he,I):F(H,C,ne),F(H,he,ne),I=ne,C=he}let j=C;u&&e==1&&(j=S+x,F(H,j,I));let[U,K]=cd(d,f);if(g.fill!=null||U!=0){let Z=L.fill=new Path2D(H),te=g.fillTo(d,f,g.min,g.max,U),he=O(te);F(Z,j,he),F(Z,N,he)}if(!g.spanGaps){let Z=[];Z.push(...ud(i,a,b,p,P,M,r));let te=g.width*rn/2,he=n||e==1?te:-te,ne=n||e==-1?-te:te;Z.forEach(ae=>{ae[0]+=he,ae[1]+=ne}),L.gaps=Z=g.gaps(d,f,b,p,Z),L.clip=Lc(Z,h.ori,m,w,k,R)}return K!=0&&(L.band=K==2?[$o(d,f,b,p,H,-1),$o(d,f,b,p,H,1)]:$o(d,f,b,p,H,K)),L})}function gv(t,e,n,r,u,d,f=wr){if(t.length>1){let b=null;for(let p=0,g=1/0;p<t.length;p++)if(e[p]!==void 0){if(b!=null){let i=cr(t[p]-t[b]);i<g&&(g=i,f=cr(n(t[p],r,u,d)-n(t[b],r,u,d)))}b=p}}return f}function uA(t){t=t||cl;const e=tn(t.size,[.6,wr,1]),n=t.align||0,r=t.gap||0;let u=t.radius;u=u==null?[0,0]:typeof u=="number"?[u,0]:u;const d=Vt(u),f=1-e[0],b=tn(e[1],wr),p=tn(e[2],1),g=tn(t.disp,cl),i=tn(t.each,c=>{}),{fill:a,stroke:h}=g;return(c,o,l,m)=>Ns(c,o,(w,k,R,T,S,x,M,O,F,L,H)=>{let P=w.pxRound,I=n,$=r*rn,C=b*rn,N=p*rn,j,U;T.ori==0?[j,U]=d(c,o):[U,j]=d(c,o);const K=T.dir*(T.ori==0?1:-1);let Z=T.ori==0?Nc:hd,te=T.ori==0?i:(qe,Se,He,Qe,mt,$t,Ct)=>{i(qe,Se,He,mt,Qe,Ct,$t)},he=tn(c.bands,Zh).find(qe=>qe.series[0]==o),ne=he!=null?he.dir:0,ae=w.fillTo(c,o,w.min,w.max,ne),ue=P(M(ae,S,H,F)),ce,ge,Ee,Re=L,Le=P(w.width*rn),Xe=!1,Ge=null,ft=null,rt=null,gt=null;a!=null&&(Le==0||h!=null)&&(Xe=!0,Ge=a.values(c,o,l,m),ft=new Map,new Set(Ge).forEach(qe=>{qe!=null&&ft.set(qe,new Path2D)}),Le>0&&(rt=h.values(c,o,l,m),gt=new Map,new Set(rt).forEach(qe=>{qe!=null&&gt.set(qe,new Path2D)})));let{x0:sn,size:vn}=g;if(sn!=null&&vn!=null){I=1,k=sn.values(c,o,l,m),sn.unit==2&&(k=k.map(Se=>c.posToVal(O+Se*L,T.key,!0)));let qe=vn.values(c,o,l,m);vn.unit==2?ge=qe[0]*L:ge=x(qe[0],T,L,O)-x(0,T,L,O),Re=gv(k,R,x,T,L,O,Re),Ee=Re-ge+$}else Re=gv(k,R,x,T,L,O,Re),Ee=Re*f+$,ge=Re-Ee;Ee<1&&(Ee=0),Le>=ge/2&&(Le=0),Ee<5&&(P=vy);let Jt=Ee>0,xr=Re-Ee-(Jt?Le:0);ge=P(Qh(xr,N,C)),ce=(I==0?ge/2:I==K?0:ge)-I*K*((I==0?$/2:0)+(Jt?Le/2:0));const bn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Nn=Xe?null:new Path2D;let Dn=null;if(he!=null)Dn=c.data[he.series[1]];else{let{y0:qe,y1:Se}=g;qe!=null&&Se!=null&&(R=Se.values(c,o,l,m),Dn=qe.values(c,o,l,m))}let ir=j*ge,xt=U*ge;for(let qe=K==1?l:m;qe>=l&&qe<=m;qe+=K){let Se=R[qe];if(Se==null)continue;if(Dn!=null){let pt=Dn[qe]??0;if(Se-pt==0)continue;ue=M(pt,S,H,F)}let He=T.distr!=2||g!=null?k[qe]:qe,Qe=x(He,T,L,O),mt=M(tn(Se,ae),S,H,F),$t=P(Qe-ce),Ct=P(Wr(mt,ue)),Pt=P(Ki(mt,ue)),Dt=Ct-Pt;if(Se!=null){let pt=Se<0?xt:ir,kt=Se<0?ir:xt;Xe?(Le>0&&rt[qe]!=null&&Z(gt.get(rt[qe]),$t,Pt+fi(Le/2),ge,Wr(0,Dt-Le),pt,kt),Ge[qe]!=null&&Z(ft.get(Ge[qe]),$t,Pt+fi(Le/2),ge,Wr(0,Dt-Le),pt,kt)):Z(Nn,$t,Pt+fi(Le/2),ge,Wr(0,Dt-Le),pt,kt),te(c,o,qe,$t-Le/2,Pt,ge+Le,Dt)}}return Le>0?bn.stroke=Xe?gt:Nn:Xe||(bn._fill=w.width==0?w._fill:w._stroke??w._fill,bn.width=0),bn.fill=Xe?ft:Nn,bn})}function hA(t,e){const n=tn(e==null?void 0:e.alignGaps,0);return(r,u,d,f)=>Ns(r,u,(b,p,g,i,a,h,c,o,l,m,w)=>{[d,f]=Sc(g,d,f);let k=b.pxRound,R=j=>k(h(j,i,m,o)),T=j=>k(c(j,a,w,l)),S,x,M;i.ori==0?(S=Oc,M=ka,x=uv):(S=Ic,M=Sa,x=hv);const O=i.dir*(i.ori==0?1:-1);let F=R(p[O==1?d:f]),L=F,H=[],P=[];for(let j=O==1?d:f;j>=d&&j<=f;j+=O)if(g[j]!=null){let U=p[j],K=R(U);H.push(L=K),P.push(T(g[j]))}const I={stroke:t(H,P,S,M,x,k),fill:null,clip:null,band:null,gaps:null,flags:xa},$=I.stroke;let[C,N]=cd(r,u);if(b.fill!=null||C!=0){let j=I.fill=new Path2D($),U=b.fillTo(r,u,b.min,b.max,C),K=T(U);M(j,L,K),M(j,F,K)}if(!b.spanGaps){let j=[];j.push(...ud(p,g,d,f,O,R,n)),I.gaps=j=b.gaps(r,u,d,f,j),I.clip=Lc(j,i.ori,o,l,m,w)}return N!=0&&(I.band=N==2?[$o(r,u,d,f,$,-1),$o(r,u,d,f,$,1)]:$o(r,u,d,f,$,N)),I})}function dA(t){return hA(pA,t)}function pA(t,e,n,r,u,d){const f=t.length;if(f<2)return null;const b=new Path2D;if(n(b,t[0],e[0]),f==2)r(b,t[1],e[1]);else{let p=Array(f),g=Array(f-1),i=Array(f-1),a=Array(f-1);for(let h=0;h<f-1;h++)i[h]=e[h+1]-e[h],a[h]=t[h+1]-t[h],g[h]=i[h]/a[h];p[0]=g[0];for(let h=1;h<f-1;h++)g[h]===0||g[h-1]===0||g[h-1]>0!=g[h]>0?p[h]=0:(p[h]=3*(a[h-1]+a[h])/((2*a[h]+a[h-1])/g[h-1]+(a[h]+2*a[h-1])/g[h]),isFinite(p[h])||(p[h]=0));p[f-1]=g[f-2];for(let h=0;h<f-1;h++)u(b,t[h]+a[h]/3,e[h]+p[h]*a[h]/3,t[h+1]-a[h]/3,e[h+1]-p[h+1]*a[h]/3,t[h+1],e[h+1])}return b}const dd=new Set;function mv(){for(let t of dd)t.syncRect(!0)}ga&&(Ms(K$,ma,mv),Ms(G$,ma,mv,!0),Ms(xc,ma,()=>{Ar.pxRatio=rn}));const fA=fv(),gA=dv();function yv(t,e,n,r){return(r?[t[0],t[1]].concat(t.slice(2)):[t[0]].concat(t.slice(1))).map((u,d)=>pd(u,d,e,n))}function mA(t,e){return t.map((n,r)=>r==0?{}:nr({},e,n))}function pd(t,e,n,r){return nr({},e==0?n:r,t)}function vv(t,e,n){return e==null?va:[e,n]}const yA=vv;function vA(t,e,n){return e==null?va:Cc(e,n,Gh,!0)}function bv(t,e,n,r){return e==null?va:_c(e,n,t.scales[r].log,!1)}const bA=bv;function wv(t,e,n,r){return e==null?va:Kh(e,n,t.scales[r].log,!1)}const wA=wv;function xA(t,e,n,r,u){let d=Wr(my(t),my(e)),f=e-t,b=Vi(u/r*f,n);do{let p=n[b],g=r*p/f;if(g>=u&&d+(p<5?Qo.get(p):0)<=17)return[p,g]}while(++b<n.length);return[0,0]}function xv(t){let e,n;return t=t.replace(/(\d+)px/,(r,u)=>(e=ur((n=+u)*rn))+"px"),[t,e,n]}function kA(t){t.show&&[t.font,t.labelFont].forEach(e=>{let n=gn(e[2]*rn,1);e[0]=e[0].replace(/[0-9.]+px/,n+"px"),e[1]=n})}function Ar(t,e,n){const r={mode:tn(t.mode,1)},u=r.mode;function d(q,X,ie,oe){let fe=X.valToPct(q);return oe+ie*(X.dir==-1?1-fe:fe)}function f(q,X,ie,oe){let fe=X.valToPct(q);return oe+ie*(X.dir==-1?fe:1-fe)}function b(q,X,ie,oe){return X.ori==0?d(q,X,ie,oe):f(q,X,ie,oe)}r.valToPosH=d,r.valToPosV=f;let p=!1;r.status=0;const g=r.root=$i(E$);if(t.id!=null&&(g.id=t.id),di(g,t.class),t.title){let q=$i(L$,g);q.textContent=t.title}const i=qi("canvas"),a=r.ctx=i.getContext("2d"),h=$i(O$,g);Ms("click",h,q=>{q.target===o&&(ln!=Mi||Gt!=wo)&&Pn.click(r,q)},!0);const c=r.under=$i(I$,h);h.appendChild(i);const o=r.over=$i(N$,h);t=ba(t);const l=+tn(t.pxAlign,1),m=sv(l);(t.plugins||[]).forEach(q=>{q.opts&&(t=q.opts(r,t)||t)});const w=t.ms||.001,k=r.series=u==1?yv(t.series||[],Yy,nv,!1):mA(t.series||[null],tv),R=r.axes=yv(t.axes||[],Gy,Zy,!0),T=r.scales={},S=r.bands=t.bands||[];S.forEach(q=>{q.fill=Vt(q.fill||null),q.dir=tn(q.dir,-1)});const x=u==2?k[1].facets[0].scale:k[0].scale,M={axes:Lo,series:La},O=(t.drawOrder||["axes","series"]).map(q=>M[q]);function F(q){const X=q.distr==3?ie=>Co(ie>0?ie:q.clamp(r,ie,q.min,q.max,q.key)):q.distr==4?ie=>Xh(ie,q.asinh):q.distr==100?ie=>q.fwd(ie):ie=>ie;return ie=>{let oe=X(ie),{_min:fe,_max:we}=q,Me=we-fe;return(oe-fe)/Me}}function L(q){let X=T[q];if(X==null){let ie=(t.scales||cl)[q]||cl;if(ie.from!=null){L(ie.from);let oe=nr({},T[ie.from],ie,{key:q});oe.valToPct=F(oe),T[q]=oe}else{X=T[q]=nr({},q==x?rv:iA,ie),X.key=q;let oe=X.time,fe=X.range,we=Zo(fe);if((q!=x||u==2&&!oe)&&(we&&(fe[0]==null||fe[1]==null)&&(fe={min:fe[0]==null?dy:{mode:1,hard:fe[0],soft:fe[0]},max:fe[1]==null?dy:{mode:1,hard:fe[1],soft:fe[1]}},we=!1),!we&&Ac(fe))){let Me=fe;fe=(Be,We,Ke)=>We==null?va:Cc(We,Ke,Me)}X.range=Vt(fe||(oe?yA:q==x?X.distr==3?bA:X.distr==4?wA:vv:X.distr==3?bv:X.distr==4?wv:vA)),X.auto=Vt(we?!1:X.auto),X.clamp=Vt(X.clamp||rA),X._min=X._max=null,X.valToPct=F(X)}}}L("x"),L("y"),u==1&&k.forEach(q=>{L(q.scale)}),R.forEach(q=>{L(q.scale)});for(let q in t.scales)L(q);const H=T[x],P=H.distr;let I,$;H.ori==0?(di(g,R$),I=d,$=f):(di(g,M$),I=f,$=d);const C={};for(let q in T){let X=T[q];(X.min!=null||X.max!=null)&&(C[q]={min:X.min,max:X.max},X.min=X.max=null)}const N=t.tzDate||(q=>new Date(ur(q/w))),j=t.fmtDate||Jh,U=w==1?RT(N):OT(N),K=jy(N,By(w==1?ET:LT,j)),Z=zy(N,Wy(NT,j)),te=[],he=r.legend=nr({},PT,t.legend),ne=r.cursor=nr({},UT,{drag:{y:u==2}},t.cursor),ae=he.show,ue=ne.show,ce=he.markers;he.idxs=te,ce.width=Vt(ce.width),ce.dash=Vt(ce.dash),ce.stroke=Vt(ce.stroke),ce.fill=Vt(ce.fill);let ge,Ee,Re,Le=[],Xe=[],Ge,ft=!1,rt={};if(he.live){const q=k[1]?k[1].values:null;ft=q!=null,Ge=ft?q(r,1,0):{_:0};for(let X in Ge)rt[X]=Wh}if(ae)if(ge=qi("table",W$,g),Re=qi("tbody",null,ge),he.mount(r,ge),ft){Ee=qi("thead",null,ge,Re);let q=qi("tr",null,Ee);qi("th",null,q);for(var gt in Ge)qi("th",Xm,q).textContent=gt}else di(ge,H$),he.live&&di(ge,z$);const sn={show:!0},vn={show:!1};function Jt(q,X){if(X==0&&(ft||!he.live||u==2))return va;let ie=[],oe=qi("tr",U$,Re,Re.childNodes[X]);di(oe,q.class),q.show||di(oe,Rs);let fe=qi("th",null,oe);if(ce.show){let Be=$i(q$,fe);if(X>0){let We=ce.width(r,X);We&&(Be.style.border=We+"px "+ce.dash(r,X)+" "+ce.stroke(r,X)),Be.style.background=ce.fill(r,X)}}let we=$i(Xm,fe);q.label instanceof HTMLElement?we.appendChild(q.label):we.textContent=q.label,X>0&&(ce.show||(we.style.color=q.width>0?ce.stroke(r,X):ce.fill(r,X)),bn("click",fe,Be=>{if(ne._lock)return;Qi(Be);let We=k.indexOf(q);if((Be.ctrlKey||Be.metaKey)!=he.isolate){let Ke=k.some((Ze,et)=>et>0&&et!=We&&Ze.show);k.forEach((Ze,et)=>{et>0&&Ur(et,Ke?et==We?sn:vn:sn,!0,ht.setSeries)})}else Ur(We,{show:!q.show},!0,ht.setSeries)},!1),Zi&&bn(ey,fe,Be=>{ne._lock||(Qi(Be),Ur(k.indexOf(q),Ii,!0,ht.setSeries))},!1));for(var Me in Ge){let Be=qi("td",V$,oe);Be.textContent="--",ie.push(Be)}return[oe,ie]}const xr=new Map;function bn(q,X,ie,oe=!0){const fe=xr.get(X)||{},we=ne.bind[q](r,X,ie,oe);we&&(Ms(q,X,fe[q]=we),xr.set(X,fe))}function Nn(q,X,ie){const oe=xr.get(X)||{};for(let fe in oe)(q==null||fe==q)&&(Vh(fe,X,oe[fe]),delete oe[fe]);q==null&&xr.delete(X)}let Dn=0,ir=0,xt=0,qe=0,Se=0,He=0,Qe=Se,mt=He,$t=xt,Ct=qe,Pt=0,Dt=0,pt=0,kt=0;r.bbox={};let $n=!1,Mr=!1,ii=!1,Xi=!1,To=!1,kr=!1;function Ao(q,X,ie){(ie||q!=r.width||X!=r.height)&&Jo(q,X),no(!1),ii=!0,Mr=!0,bo()}function Jo(q,X){r.width=Dn=xt=q,r.height=ir=qe=X,Se=He=0,zs(),Ea();let ie=r.bbox;Pt=ie.left=Os(Se*rn,.5),Dt=ie.top=Os(He*rn,.5),pt=ie.width=Os(xt*rn,.5),kt=ie.height=Os(qe*rn,.5)}const xl=3;function gi(){let q=!1,X=0;for(;!q;){X++;let ie=Oa(X),oe=Cl(X);q=X==xl||ie&&oe,q||(Jo(r.width,r.height),Mr=!0)}}function kl({width:q,height:X}){Ao(q,X)}r.setSize=kl;function zs(){let q=!1,X=!1,ie=!1,oe=!1;R.forEach((fe,we)=>{if(fe.show&&fe._show){let{side:Me,_size:Be}=fe,We=Me%2,Ke=fe.label!=null?fe.labelSize:0,Ze=Be+Ke;Ze>0&&(We?(xt-=Ze,Me==3?(Se+=Ze,oe=!0):ie=!0):(qe-=Ze,Me==0?(He+=Ze,q=!0):X=!0))}}),eo[0]=q,eo[1]=ie,eo[2]=X,eo[3]=oe,xt-=Ir[1]+Ir[3],Se+=Ir[3],qe-=Ir[2]+Ir[0],He+=Ir[0]}function Ea(){let q=Se+xt,X=He+qe,ie=Se,oe=He;function fe(we,Me){switch(we){case 1:return q+=Me,q-Me;case 2:return X+=Me,X-Me;case 3:return ie-=Me,ie+Me;case 0:return oe-=Me,oe+Me}}R.forEach((we,Me)=>{if(we.show&&we._show){let Be=we.side;we._pos=fe(Be,we._size),we.label!=null&&(we._lpos=fe(Be,we.labelSize))}})}if(ne.dataIdx==null){let q=ne.hover,X=q.skip=new Set(q.skip??[]);X.add(void 0);let ie=q.prox=Vt(q.prox),oe=q.bias??(q.bias=0);ne.dataIdx=(fe,we,Me,Be)=>{if(we==0)return Me;let We=Me,Ke=ie(fe,we,Me,Be)??wr,Ze=Ke>=0&&Ke<wr,et=H.ori==0?xt:qe,_t=ne.left,Ht=e[0],At=e[we];if(X.has(At[Me])){We=null;let Wt=null,yt=null,at;if(oe==0||oe==-1)for(at=Me;Wt==null&&at-- >0;)X.has(At[at])||(Wt=at);if(oe==0||oe==1)for(at=Me;yt==null&&at++<At.length;)X.has(At[at])||(yt=at);if(Wt!=null||yt!=null)if(Ze){let mn=Wt==null?-1/0:I(Ht[Wt],H,et,0),En=yt==null?1/0:I(Ht[yt],H,et,0),ar=_t-mn,Xt=En-_t;ar<=Xt?ar<=Ke&&(We=Wt):Xt<=Ke&&(We=yt)}else We=yt==null?Wt:Wt==null?yt:Me-Wt<=yt-Me?Wt:yt}else Ze&&cr(_t-I(Ht[Me],H,et,0))>Ke&&(We=null);return We}}const Qi=q=>{ne.event=q};ne.idxs=te,ne._lock=!1;let Gn=ne.points;Gn.show=Vt(Gn.show),Gn.size=Vt(Gn.size),Gn.stroke=Vt(Gn.stroke),Gn.width=Vt(Gn.width),Gn.fill=Vt(Gn.fill);const Lr=r.focus=nr({},t.focus||{alpha:.3},ne.focus),Zi=Lr.prox>=0,Mn=Zi&&Gn.one;let Or=[],go=[],Ji=[];function Hs(q,X){let ie=Gn.show(r,X);if(ie instanceof HTMLElement)return di(ie,j$),di(ie,q.class),co(ie,-10,-10,xt,qe),o.insertBefore(ie,Or[X]),ie}function Ra(q,X){if(u==1||X>0){let ie=u==1&&T[q.scale].time,oe=q.value;q.value=ie?Cy(oe)?zy(N,Wy(oe,j)):oe||Z:oe||eA,q.label=q.label||(ie?VT:qT)}if(Mn||X>0){q.width=q.width==null?1:q.width,q.paths=q.paths||fA||iT,q.fillTo=Vt(q.fillTo||oA),q.pxAlign=+tn(q.pxAlign,l),q.pxRound=sv(q.pxAlign),q.stroke=Vt(q.stroke||null),q.fill=Vt(q.fill||null),q._stroke=q._fill=q._paths=q._focus=null;let ie=tA(Wr(1,q.width),1),oe=q.points=nr({},{size:ie,width:Wr(1,ie*.2),stroke:q.stroke,space:ie*2,paths:gA,_stroke:null,_fill:null},q.points);oe.show=Vt(oe.show),oe.filter=Vt(oe.filter),oe.fill=Vt(oe.fill),oe.stroke=Vt(oe.stroke),oe.paths=Vt(oe.paths),oe.pxAlign=q.pxAlign}if(ae){let ie=Jt(q,X);Le.splice(X,0,ie[0]),Xe.splice(X,0,ie[1]),he.values.push(null)}if(ue){te.splice(X,0,null);let ie=null;Mn?X==0&&(ie=Hs(q,X)):X>0&&(ie=Hs(q,X)),Or.splice(X,0,ie),go.splice(X,0,0),Ji.splice(X,0,0)}nt("addSeries",X)}function Sl(q,X){X=X??k.length,q=u==1?pd(q,X,Yy,nv):pd(q,X,{},tv),k.splice(X,0,q),Ra(k[X],X)}r.addSeries=Sl;function _l(q){if(k.splice(q,1),ae){he.values.splice(q,1),Xe.splice(q,1);let X=Le.splice(q,1)[0];Nn(null,X.firstChild),X.remove()}ue&&(te.splice(q,1),Or.splice(q,1)[0].remove(),go.splice(q,1),Ji.splice(q,1)),nt("delSeries",q)}r.delSeries=_l;const eo=[!1,!1,!1,!1];function mi(q,X){if(q._show=q.show,q.show){let ie=q.side%2,oe=T[q.scale];oe==null&&(q.scale=ie?k[1].scale:x,oe=T[q.scale]);let fe=oe.time;q.size=Vt(q.size),q.space=Vt(q.space),q.rotate=Vt(q.rotate),Zo(q.incrs)&&q.incrs.forEach(Me=>{!Qo.has(Me)&&Qo.set(Me,Sy(Me))}),q.incrs=Vt(q.incrs||(oe.distr==2?$T:fe?w==1?AT:MT:Is)),q.splits=Vt(q.splits||(fe&&oe.distr==1?U:oe.distr==3?sd:oe.distr==4?YT:GT)),q.stroke=Vt(q.stroke),q.grid.stroke=Vt(q.grid.stroke),q.ticks.stroke=Vt(q.ticks.stroke),q.border.stroke=Vt(q.border.stroke);let we=q.values;q.values=Zo(we)&&!Zo(we[0])?Vt(we):fe?Zo(we)?jy(N,By(we,j)):Cy(we)?IT(N,we):we||K:we||KT,q.filter=Vt(q.filter||(oe.distr>=3&&oe.log==10?ZT:oe.distr==3&&oe.log==2?JT:by)),q.font=xv(q.font),q.labelFont=xv(q.labelFont),q._size=q.size(r,null,X,0),q._space=q._rotate=q._incrs=q._found=q._splits=q._values=null,q._size>0&&(eo[X]=!0,q._el=$i(D$,h))}}function Kt(q,X,ie,oe){let[fe,we,Me,Be]=ie,We=X%2,Ke=0;return We==0&&(Be||we)&&(Ke=X==0&&!fe||X==2&&!Me?ur(Gy.size/3):0),We==1&&(fe||Me)&&(Ke=X==1&&!we||X==3&&!Be?ur(Zy.size/2):0),Ke}const Ma=r.padding=(t.padding||[Kt,Kt,Kt,Kt]).map(q=>Vt(tn(q,Kt))),Ir=r._padding=Ma.map((q,X)=>q(r,X,eo,0));let Yn,wn=null,Fn=null;const Ai=u==1?k[0].idxs:null;let Nr=null,Ei=!1;function es(q,X){if(e=q??[],r.data=r._data=e,u==2){Yn=0;for(let ie=1;ie<k.length;ie++)Yn+=e[ie][0].length}else{e.length==0&&(r.data=r._data=e=[[]]),Nr=e[0],Yn=Nr.length;let ie=e;if(P==2){ie=e.slice();let oe=ie[0]=Array(Yn);for(let fe=0;fe<Yn;fe++)oe[fe]=fe}r._data=e=ie}if(no(!0),nt("setData"),P==2&&(ii=!0),X!==!1){let ie=H;ie.auto(r,Ei)?Us():or(x,ie.min,ie.max),Xi=Xi||ne.left>=0,kr=!0,bo()}}r.setData=es;function Us(){Ei=!0;let q,X;u==1&&(Yn>0?(wn=Ai[0]=0,Fn=Ai[1]=Yn-1,q=e[0][wn],X=e[0][Fn],P==2?(q=wn,X=Fn):q==X&&(P==3?[q,X]=_c(q,q,H.log,!1):P==4?[q,X]=Kh(q,q,H.log,!1):H.time?X=q+ur(86400/w):[q,X]=Cc(q,X,Gh,!0))):(wn=Ai[0]=q=null,Fn=Ai[1]=X=null)),or(x,q,X)}let mo,oi,Eo,ts,si,ns,qs,Vs,rs,hr;function Ks(q,X,ie,oe,fe,we){q??(q=Zm),ie??(ie=Zh),oe??(oe="butt"),fe??(fe=Zm),we??(we="round"),q!=mo&&(a.strokeStyle=mo=q),fe!=oi&&(a.fillStyle=oi=fe),X!=Eo&&(a.lineWidth=Eo=X),we!=si&&(a.lineJoin=si=we),oe!=ns&&(a.lineCap=ns=oe),ie!=ts&&a.setLineDash(ts=ie)}function Ro(q,X,ie,oe){X!=oi&&(a.fillStyle=oi=X),q!=qs&&(a.font=qs=q),ie!=Vs&&(a.textAlign=Vs=ie),oe!=rs&&(a.textBaseline=rs=oe)}function is(q,X,ie,oe,fe=0){if(oe.length>0&&q.auto(r,Ei)&&(X==null||X.min==null)){let we=tn(wn,0),Me=tn(Fn,oe.length-1),Be=ie.min==null?Z$(oe,we,Me,fe,q.distr==3):[ie.min,ie.max];q.min=Ki(q.min,ie.min=Be[0]),q.max=Wr(q.max,ie.max=Be[1])}}const os={min:null,max:null};function yo(){for(let oe in T){let fe=T[oe];C[oe]==null&&(fe.min==null||C[x]!=null&&fe.auto(r,Ei))&&(C[oe]=os)}for(let oe in T){let fe=T[oe];C[oe]==null&&fe.from!=null&&C[fe.from]!=null&&(C[oe]=os)}C[x]!=null&&no(!0);let q={};for(let oe in C){let fe=C[oe];if(fe!=null){let we=q[oe]=ba(T[oe],aT);if(fe.min!=null)nr(we,fe);else if(oe!=x||u==2)if(Yn==0&&we.from==null){let Me=we.range(r,null,null,oe);we.min=Me[0],we.max=Me[1]}else we.min=wr,we.max=-1/0}}if(Yn>0){k.forEach((oe,fe)=>{if(u==1){let we=oe.scale,Me=C[we];if(Me==null)return;let Be=q[we];if(fe==0){let We=Be.range(r,Be.min,Be.max,we);Be.min=We[0],Be.max=We[1],wn=Vi(Be.min,e[0]),Fn=Vi(Be.max,e[0]),Fn-wn>1&&(e[0][wn]<Be.min&&wn++,e[0][Fn]>Be.max&&Fn--),oe.min=Nr[wn],oe.max=Nr[Fn]}else oe.show&&oe.auto&&is(Be,Me,oe,e[fe],oe.sorted);oe.idxs[0]=wn,oe.idxs[1]=Fn}else if(fe>0&&oe.show&&oe.auto){let[we,Me]=oe.facets,Be=we.scale,We=Me.scale,[Ke,Ze]=e[fe],et=q[Be],_t=q[We];et!=null&&is(et,C[Be],we,Ke,we.sorted),_t!=null&&is(_t,C[We],Me,Ze,Me.sorted),oe.min=Me.min,oe.max=Me.max}});for(let oe in q){let fe=q[oe],we=C[oe];if(fe.from==null&&(we==null||we.min==null)){let Me=fe.range(r,fe.min==wr?null:fe.min,fe.max==-1/0?null:fe.max,oe);fe.min=Me[0],fe.max=Me[1]}}}for(let oe in q){let fe=q[oe];if(fe.from!=null){let we=q[fe.from];if(we.min==null)fe.min=fe.max=null;else{let Me=fe.range(r,we.min,we.max,oe);fe.min=Me[0],fe.max=Me[1]}}}let X={},ie=!1;for(let oe in q){let fe=q[oe],we=T[oe];if(we.min!=fe.min||we.max!=fe.max){we.min=fe.min,we.max=fe.max;let Me=we.distr;we._min=Me==3?Co(we.min):Me==4?Xh(we.min,we.asinh):Me==100?we.fwd(we.min):we.min,we._max=Me==3?Co(we.max):Me==4?Xh(we.max,we.asinh):Me==100?we.fwd(we.max):we.max,X[oe]=ie=!0}}if(ie){k.forEach((oe,fe)=>{u==2?fe>0&&X.y&&(oe._paths=null):X[oe.scale]&&(oe._paths=null)});for(let oe in X)ii=!0,nt("setScale",oe);ue&&ne.left>=0&&(Xi=kr=!0)}for(let oe in C)C[oe]=null}function Gs(q){let X=Qh(wn-1,0,Yn-1),ie=Qh(Fn+1,0,Yn-1);for(;q[X]==null&&X>0;)X--;for(;q[ie]==null&&ie<Yn-1;)ie++;return[X,ie]}function La(){if(Yn>0){let q=k.some(X=>X._focus)&&hr!=Lr.alpha;q&&(a.globalAlpha=hr=Lr.alpha),k.forEach((X,ie)=>{if(ie>0&&X.show&&(ss(ie,!1),ss(ie,!0),X._paths==null)){let oe=hr;hr!=X.alpha&&(a.globalAlpha=hr=X.alpha);let fe=u==2?[0,e[ie][0].length-1]:Gs(e[ie]);X._paths=X.paths(r,ie,fe[0],fe[1]),hr!=oe&&(a.globalAlpha=hr=oe)}}),k.forEach((X,ie)=>{if(ie>0&&X.show){let oe=hr;hr!=X.alpha&&(a.globalAlpha=hr=X.alpha),X._paths!=null&&as(ie,!1);{let fe=X._paths!=null?X._paths.gaps:null,we=X.points.show(r,ie,wn,Fn,fe),Me=X.points.filter(r,ie,we,fe);(we||Me)&&(X.points._paths=X.points.paths(r,ie,wn,Fn,Me),as(ie,!0))}hr!=oe&&(a.globalAlpha=hr=oe),nt("drawSeries",ie)}}),q&&(a.globalAlpha=hr=1)}}function ss(q,X){let ie=X?k[q].points:k[q];ie._stroke=ie.stroke(r,q),ie._fill=ie.fill(r,q)}function as(q,X){let ie=X?k[q].points:k[q],{stroke:oe,fill:fe,clip:we,flags:Me,_stroke:Be=ie._stroke,_fill:We=ie._fill,_width:Ke=ie.width}=ie._paths;Ke=gn(Ke*rn,3);let Ze=null,et=Ke%2/2;X&&We==null&&(We=Ke>0?"#fff":Be);let _t=ie.pxAlign==1&&et>0;if(_t&&a.translate(et,et),!X){let Ht=Pt-Ke/2,At=Dt-Ke/2,Wt=pt+Ke,yt=kt+Ke;Ze=new Path2D,Ze.rect(Ht,At,Wt,yt)}X?Mo(Be,Ke,ie.dash,ie.cap,We,oe,fe,Me,we):Ys(q,Be,Ke,ie.dash,ie.cap,We,oe,fe,Me,Ze,we),_t&&a.translate(-et,-et)}function Ys(q,X,ie,oe,fe,we,Me,Be,We,Ke,Ze){let et=!1;We!=0&&S.forEach((_t,Ht)=>{if(_t.series[0]==q){let At=k[_t.series[1]],Wt=e[_t.series[1]],yt=(At._paths||cl).band;Zo(yt)&&(yt=_t.dir==1?yt[0]:yt[1]);let at,mn=null;At.show&&yt&&eT(Wt,wn,Fn)?(mn=_t.fill(r,Ht)||we,at=At._paths.clip):yt=null,Mo(X,ie,oe,fe,mn,Me,Be,We,Ke,Ze,at,yt),et=!0}}),et||Mo(X,ie,oe,fe,we,Me,Be,We,Ke,Ze)}const ls=xa|ld;function Mo(q,X,ie,oe,fe,we,Me,Be,We,Ke,Ze,et){Ks(q,X,ie,oe,fe),(We||Ke||et)&&(a.save(),We&&a.clip(We),Ke&&a.clip(Ke)),et?(Be&ls)==ls?(a.clip(et),Ze&&a.clip(Ze),dr(fe,Me),Ri(q,we,X)):Be&ld?(dr(fe,Me),a.clip(et),Ri(q,we,X)):Be&xa&&(a.save(),a.clip(et),Ze&&a.clip(Ze),dr(fe,Me),a.restore(),Ri(q,we,X)):(dr(fe,Me),Ri(q,we,X)),(We||Ke||et)&&a.restore()}function Ri(q,X,ie){ie>0&&(X instanceof Map?X.forEach((oe,fe)=>{a.strokeStyle=mo=fe,a.stroke(oe)}):X!=null&&q&&a.stroke(X))}function dr(q,X){X instanceof Map?X.forEach((ie,oe)=>{a.fillStyle=oi=oe,a.fill(ie)}):X!=null&&q&&a.fill(X)}function vo(q,X,ie,oe){let fe=R[q],we;if(oe<=0)we=[0,0];else{let Me=fe._space=fe.space(r,q,X,ie,oe),Be=fe._incrs=fe.incrs(r,q,X,ie,oe,Me);we=xA(X,ie,Be,oe,Me)}return fe._found=we}function to(q,X,ie,oe,fe,we,Me,Be,We,Ke){let Ze=Me%2/2;l==1&&a.translate(Ze,Ze),Ks(Be,Me,We,Ke,Be),a.beginPath();let et,_t,Ht,At,Wt=fe+(oe==0||oe==3?-we:we);ie==0?(_t=fe,At=Wt):(et=fe,Ht=Wt);for(let yt=0;yt<q.length;yt++)X[yt]!=null&&(ie==0?et=Ht=q[yt]:_t=At=q[yt],a.moveTo(et,_t),a.lineTo(Ht,At));a.stroke(),l==1&&a.translate(-Ze,-Ze)}function Oa(q){let X=!0;return R.forEach((ie,oe)=>{if(!ie.show)return;let fe=T[ie.scale];if(fe.min==null){ie._show&&(X=!1,ie._show=!1,no(!1));return}else ie._show||(X=!1,ie._show=!0,no(!1));let we=ie.side,Me=we%2,{min:Be,max:We}=fe,[Ke,Ze]=vo(oe,Be,We,Me==0?xt:qe);if(Ze==0)return;let et=fe.distr==2,_t=ie._splits=ie.splits(r,oe,Be,We,Ke,Ze,et),Ht=fe.distr==2?_t.map(at=>Nr[at]):_t,At=fe.distr==2?Nr[_t[1]]-Nr[_t[0]]:Ke,Wt=ie._values=ie.values(r,ie.filter(r,Ht,oe,Ze,At),oe,Ze,At);ie._rotate=we==2?ie.rotate(r,Wt,oe,Ze):0;let yt=ie._size;ie._size=Ti(ie.size(r,Wt,oe,q)),yt!=null&&ie._size!=yt&&(X=!1)}),X}function Cl(q){let X=!0;return Ma.forEach((ie,oe)=>{let fe=ie(r,oe,eo,q);fe!=Ir[oe]&&(X=!1),Ir[oe]=fe}),X}function Lo(){for(let q=0;q<R.length;q++){let X=R[q];if(!X.show||!X._show)continue;let ie=X.side,oe=ie%2,fe,we,Me=X.stroke(r,q),Be=ie==0||ie==3?-1:1,[We,Ke]=X._found;if(X.label!=null){let fn=X.labelGap*Be,vr=ur((X._lpos+fn)*rn);Ro(X.labelFont[0],Me,"center",ie==2?sl:Qm),a.save(),oe==1?(fe=we=0,a.translate(vr,ur(Dt+kt/2)),a.rotate((ie==3?-$c:$c)/2)):(fe=ur(Pt+pt/2),we=vr);let Fo=yy(X.label)?X.label(r,q,We,Ke):X.label;a.fillText(Fo,fe,we),a.restore()}if(Ke==0)continue;let Ze=T[X.scale],et=oe==0?pt:kt,_t=oe==0?Pt:Dt,Ht=X._splits,At=Ze.distr==2?Ht.map(fn=>Nr[fn]):Ht,Wt=Ze.distr==2?Nr[Ht[1]]-Nr[Ht[0]]:We,yt=X.ticks,at=X.border,mn=yt.show?yt.size:0,En=ur(mn*rn),ar=ur((X.alignTo==2?X._size-mn-X.gap:X.gap)*rn),Xt=X._rotate*-$c/180,pe=m(X._pos*rn),_e=(En+ar)*Be,xe=pe+_e;we=oe==0?xe:0,fe=oe==1?xe:0;let Ue=X.font[0],dt=X.align==1?fa:X.align==2?Fh:Xt>0?fa:Xt<0?Fh:oe==0?"center":ie==3?Fh:fa,Nt=Xt||oe==1?"middle":ie==2?sl:Qm;Ro(Ue,Me,dt,Nt);let en=X.font[1]*X.lineGap,Bt=Ht.map(fn=>m(b(fn,Ze,et,_t))),qr=X._values;for(let fn=0;fn<qr.length;fn++){let vr=qr[fn];if(vr!=null){oe==0?fe=Bt[fn]:we=Bt[fn],vr=""+vr;let Fo=vr.indexOf(`
1495
+ `)==-1?[vr]:vr.split(/\n/gm);for(let Wn=0;Wn<Fo.length;Wn++){let Qs=Fo[Wn];Xt?(a.save(),a.translate(fe,we+Wn*en),a.rotate(Xt),a.fillText(Qs,0,0),a.restore()):a.fillText(Qs,fe,we+Wn*en)}}}yt.show&&to(Bt,yt.filter(r,At,q,Ke,Wt),oe,ie,pe,En,gn(yt.width*rn,3),yt.stroke(r,q),yt.dash,yt.cap);let Ni=X.grid;Ni.show&&to(Bt,Ni.filter(r,At,q,Ke,Wt),oe,oe==0?2:1,oe==0?Dt:Pt,oe==0?kt:pt,gn(Ni.width*rn,3),Ni.stroke(r,q),Ni.dash,Ni.cap),at.show&&to([pe],[1],oe==0?1:0,oe==0?1:2,oe==1?Dt:Pt,oe==1?kt:pt,gn(at.width*rn,3),at.stroke(r,q),at.dash,at.cap)}nt("drawAxes")}function no(q){k.forEach((X,ie)=>{ie>0&&(X._paths=null,q&&(u==1?(X.min=null,X.max=null):X.facets.forEach(oe=>{oe.min=null,oe.max=null})))})}let Oo=!1,cs=!1,Io=[];function Ia(){cs=!1;for(let q=0;q<Io.length;q++)nt(...Io[q]);Io.length=0}function bo(){Oo||(fT(Na),Oo=!0)}function je(q,X=!1){Oo=!0,cs=X,q(r),Na(),X&&Io.length>0&&queueMicrotask(Ia)}r.batch=je;function Na(){if($n&&(yo(),$n=!1),ii&&(gi(),ii=!1),Mr){if(Sn(c,fa,Se),Sn(c,sl,He),Sn(c,il,xt),Sn(c,ol,qe),Sn(o,fa,Se),Sn(o,sl,He),Sn(o,il,xt),Sn(o,ol,qe),Sn(h,il,Dn),Sn(h,ol,ir),i.width=ur(Dn*rn),i.height=ur(ir*rn),R.forEach(({_el:q,_show:X,_size:ie,_pos:oe,side:fe})=>{if(q!=null)if(X){let we=fe===3||fe===0?ie:0,Me=fe%2==1;Sn(q,Me?"left":"top",oe-we),Sn(q,Me?"width":"height",ie),Sn(q,Me?"top":"left",Me?He:Se),Sn(q,Me?"height":"width",Me?qe:xt),Uh(q,Rs)}else di(q,Rs)}),mo=oi=Eo=si=ns=qs=Vs=rs=ts=null,hr=1,B(!0),Se!=Qe||He!=mt||xt!=$t||qe!=Ct){no(!1);let q=xt/$t,X=qe/Ct;if(ue&&!Xi&&ne.left>=0){ne.left*=q,ne.top*=X,yi&&co(yi,ur(ne.left),0,xt,qe),Xn&&co(Xn,0,ur(ne.top),xt,qe);for(let ie=0;ie<Or.length;ie++){let oe=Or[ie];oe!=null&&(go[ie]*=q,Ji[ie]*=X,co(oe,Ti(go[ie]),Ti(Ji[ie]),xt,qe))}}if(St.show&&!To&&St.left>=0&&St.width>0){St.left*=q,St.width*=q,St.top*=X,St.height*=X;for(let ie in Y)Sn(Hr,ie,St[ie])}Qe=Se,mt=He,$t=xt,Ct=qe}nt("setSize"),Mr=!1}Dn>0&&ir>0&&(a.clearRect(0,0,i.width,i.height),nt("drawClear"),O.forEach(q=>q()),nt("draw")),St.show&&To&&(pn(St),To=!1),ue&&Xi&&(_(null,!0,!1),Xi=!1),he.show&&he.live&&kr&&(v(),kr=!1),p||(p=!0,r.status=1,nt("ready")),Ei=!1,Oo=!1}r.redraw=(q,X)=>{ii=X||!1,q!==!1?or(x,H.min,H.max):bo()};function Fe(q,X){let ie=T[q];if(ie.from==null){if(Yn==0){let oe=ie.range(r,X.min,X.max,q);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(Yn>1&&X.min!=null&&X.max!=null&&X.max-X.min<1e-16)return;q==x&&ie.distr==2&&Yn>0&&(X.min=Vi(X.min,e[0]),X.max=Vi(X.max,e[0]),X.min==X.max&&X.max++),C[q]=X,$n=!0,bo()}}r.setScale=Fe;let Ln,No,yi,Xn,Da,Do,Mi,wo,an,nn,ln,Gt,Li=!1;const Pn=ne.drag;let ze=Pn.x,xn=Pn.y;ue&&(ne.x&&(Ln=$i(P$,o)),ne.y&&(No=$i(B$,o)),H.ori==0?(yi=Ln,Xn=No):(yi=No,Xn=Ln),ln=ne.left,Gt=ne.top);const St=r.select=nr({show:!0,over:!0,left:0,width:0,top:0,height:0},t.select),Hr=St.show?$i(F$,St.over?o:c):null;function pn(q,X){if(St.show){for(let ie in q)St[ie]=q[ie],ie in Y&&Sn(Hr,ie,q[ie]);X!==!1&&nt("setSelect")}}r.setSelect=pn;function _n(q){if(k[q].show)ae&&Uh(Le[q],Rs);else if(ae&&di(Le[q],Rs),ue){let X=Mn?Or[0]:Or[q];X!=null&&co(X,-10,-10,xt,qe)}}function or(q,X,ie){Fe(q,{min:X,max:ie})}function Ur(q,X,ie,oe){X.focus!=null&&gr(q),X.show!=null&&k.forEach((fe,we)=>{we>0&&(q==we||q==null)&&(fe.show=X.show,_n(we),u==2?(or(fe.facets[0].scale,null,null),or(fe.facets[1].scale,null,null)):or(fe.scale,null,null),bo())}),ie!==!1&&nt("setSeries",q,X),oe&&It("setSeries",r,q,X)}r.setSeries=Ur;function Oi(q,X){nr(S[q],X)}function Bn(q,X){q.fill=Vt(q.fill||null),q.dir=tn(q.dir,-1),X=X??S.length,S.splice(X,0,q)}function ai(q){q==null?S.length=0:S.splice(q,1)}r.addBand=Bn,r.setBand=Oi,r.delBand=ai;function us(q,X){k[q].alpha=X,ue&&Or[q]!=null&&(Or[q].style.opacity=X),ae&&Le[q]&&(Le[q].style.opacity=X)}let jn,vi,bi;const Ii={focus:!0};function gr(q){if(q!=bi){let X=q==null,ie=Lr.alpha!=1;k.forEach((oe,fe)=>{if(u==1||fe>0){let we=X||fe==0||fe==q;oe._focus=X?null:we,ie&&us(fe,we?1:Lr.alpha)}}),bi=q,ie&&bo()}}ae&&Zi&&bn(ty,ge,q=>{ne._lock||(Qi(q),bi!=null&&Ur(null,Ii,!0,ht.setSeries))});function mr(q,X,ie){let oe=T[X];ie&&(q=q/rn-(oe.ori==1?He:Se));let fe=xt;oe.ori==1&&(fe=qe,q=fe-q),oe.dir==-1&&(q=fe-q);let we=oe._min,Me=oe._max,Be=q/fe,We=we+(Me-we)*Be,Ke=oe.distr;return Ke==3?ya(10,We):Ke==4?nT(We,oe.asinh):Ke==100?oe.bwd(We):We}function Sr(q,X){let ie=mr(q,x,X);return Vi(ie,e[0],wn,Fn)}r.valToIdx=q=>Vi(q,e[0]),r.posToIdx=Sr,r.posToVal=mr,r.valToPos=(q,X,ie)=>T[X].ori==0?d(q,T[X],ie?pt:xt,ie?Pt:0):f(q,T[X],ie?kt:qe,ie?Dt:0),r.setCursor=(q,X,ie)=>{ln=q.left,Gt=q.top,_(null,X,ie)};function Xs(q,X){Sn(Hr,fa,St.left=q),Sn(Hr,il,St.width=X)}function _r(q,X){Sn(Hr,sl,St.top=q),Sn(Hr,ol,St.height=X)}let Dr=H.ori==0?Xs:_r,wi=H.ori==1?Xs:_r;function xi(){if(ae&&he.live)for(let q=u==2?1:0;q<k.length;q++){if(q==0&&ft)continue;let X=he.values[q],ie=0;for(let oe in X)Xe[q][ie++].firstChild.nodeValue=X[oe]}}function v(q,X){if(q!=null&&(q.idxs?q.idxs.forEach((ie,oe)=>{te[oe]=ie}):sT(q.idx)||te.fill(q.idx),he.idx=te[0]),ae&&he.live){for(let ie=0;ie<k.length;ie++)(ie>0||u==1&&!ft)&&A(ie,te[ie]);xi()}kr=!1,X!==!1&&nt("setLegend")}r.setLegend=v;function A(q,X){let ie=k[q],oe=q==0&&P==2?Nr:e[q],fe;ft?fe=ie.values(r,q,X)??rt:(fe=ie.value(r,X==null?null:oe[X],q,X),fe=fe==null?rt:{_:fe}),he.values[q]=fe}function _(q,X,ie){an=ln,nn=Gt,[ln,Gt]=ne.move(r,ln,Gt),ne.left=ln,ne.top=Gt,ue&&(yi&&co(yi,ur(ln),0,xt,qe),Xn&&co(Xn,0,ur(Gt),xt,qe));let oe,fe=wn>Fn;jn=wr,vi=null;let we=H.ori==0?xt:qe,Me=H.ori==1?xt:qe;if(ln<0||Yn==0||fe){oe=ne.idx=null;for(let Be=0;Be<k.length;Be++){let We=Or[Be];We!=null&&co(We,-10,-10,xt,qe)}Zi&&Ur(null,Ii,!0,q==null&&ht.setSeries),he.live&&(te.fill(oe),kr=!0)}else{let Be,We,Ke;u==1&&(Be=H.ori==0?ln:Gt,We=mr(Be,x),oe=ne.idx=Vi(We,e[0],wn,Fn),Ke=I(e[0][oe],H,we,0));let Ze=-10,et=-10,_t=0,Ht=0,At=!0,Wt="",yt="";for(let at=u==2?1:0;at<k.length;at++){let mn=k[at],En=te[at],ar=En==null?null:u==1?e[at][En]:e[at][1][En],Xt=ne.dataIdx(r,at,oe,We),pe=Xt==null?null:u==1?e[at][Xt]:e[at][1][Xt];if(kr=kr||pe!=ar||Xt!=En,te[at]=Xt,at>0&&mn.show){let _e=Xt==null?-10:Xt==oe?Ke:I(u==1?e[0][Xt]:e[at][0][Xt],H,we,0),xe=pe==null?-10:$(pe,u==1?T[mn.scale]:T[mn.facets[1].scale],Me,0);if(Zi&&pe!=null){let Ue=H.ori==1?ln:Gt,dt=cr(Lr.dist(r,at,Xt,xe,Ue));if(dt<jn){let Nt=Lr.bias;if(Nt!=0){let en=mr(Ue,mn.scale),Bt=pe>=0?1:-1,qr=en>=0?1:-1;qr==Bt&&(qr==1?Nt==1?pe>=en:pe<=en:Nt==1?pe<=en:pe>=en)&&(jn=dt,vi=at)}else jn=dt,vi=at}}if(kr||Mn){let Ue,dt;H.ori==0?(Ue=_e,dt=xe):(Ue=xe,dt=_e);let Nt,en,Bt,qr,Ni,fn,vr=!0,Fo=Gn.bbox;if(Fo!=null){vr=!1;let Wn=Fo(r,at);Bt=Wn.left,qr=Wn.top,Nt=Wn.width,en=Wn.height}else Bt=Ue,qr=dt,Nt=en=Gn.size(r,at);if(fn=Gn.fill(r,at),Ni=Gn.stroke(r,at),Mn)at==vi&&jn<=Lr.prox&&(Ze=Bt,et=qr,_t=Nt,Ht=en,At=vr,Wt=fn,yt=Ni);else{let Wn=Or[at];Wn!=null&&(go[at]=Bt,Ji[at]=qr,ly(Wn,Nt,en,vr),sy(Wn,fn,Ni),co(Wn,Ti(Bt),Ti(qr),xt,qe))}}}}if(Mn){let at=Lr.prox,mn=bi==null?jn<=at:jn>at||vi!=bi;if(kr||mn){let En=Or[0];En!=null&&(go[0]=Ze,Ji[0]=et,ly(En,_t,Ht,At),sy(En,Wt,yt),co(En,Ti(Ze),Ti(et),xt,qe))}}}if(St.show&&Li)if(q!=null){let[Be,We]=ht.scales,[Ke,Ze]=ht.match,[et,_t]=q.cursor.sync.scales,Ht=q.cursor.drag;if(ze=Ht._x,xn=Ht._y,ze||xn){let{left:At,top:Wt,width:yt,height:at}=q.select,mn=q.scales[et].ori,En=q.posToVal,ar,Xt,pe,_e,xe,Ue=Be!=null&&Ke(Be,et),dt=We!=null&&Ze(We,_t);Ue&&ze?(mn==0?(ar=At,Xt=yt):(ar=Wt,Xt=at),pe=T[Be],_e=I(En(ar,et),pe,we,0),xe=I(En(ar+Xt,et),pe,we,0),Dr(Ki(_e,xe),cr(xe-_e))):Dr(0,we),dt&&xn?(mn==1?(ar=At,Xt=yt):(ar=Wt,Xt=at),pe=T[We],_e=$(En(ar,_t),pe,Me,0),xe=$(En(ar+Xt,_t),pe,Me,0),wi(Ki(_e,xe),cr(xe-_e))):wi(0,Me)}else Q()}else{let Be=cr(an-Da),We=cr(nn-Do);if(H.ori==1){let _t=Be;Be=We,We=_t}ze=Pn.x&&Be>=Pn.dist,xn=Pn.y&&We>=Pn.dist;let Ke=Pn.uni;Ke!=null?ze&&xn&&(ze=Be>=Ke,xn=We>=Ke,!ze&&!xn&&(We>Be?xn=!0:ze=!0)):Pn.x&&Pn.y&&(ze||xn)&&(ze=xn=!0);let Ze,et;ze&&(H.ori==0?(Ze=Mi,et=ln):(Ze=wo,et=Gt),Dr(Ki(Ze,et),cr(et-Ze)),xn||wi(0,Me)),xn&&(H.ori==1?(Ze=Mi,et=ln):(Ze=wo,et=Gt),wi(Ki(Ze,et),cr(et-Ze)),ze||Dr(0,we)),!ze&&!xn&&(Dr(0,0),wi(0,0))}if(Pn._x=ze,Pn._y=xn,q==null){if(ie){if(Tn!=null){let[Be,We]=ht.scales;ht.values[0]=Be!=null?mr(H.ori==0?ln:Gt,Be):null,ht.values[1]=We!=null?mr(H.ori==1?ln:Gt,We):null}It(Bh,r,ln,Gt,xt,qe,oe)}if(Zi){let Be=ie&&ht.setSeries,We=Lr.prox;bi==null?jn<=We&&Ur(vi,Ii,!0,Be):jn>We?Ur(null,Ii,!0,Be):vi!=bi&&Ur(vi,Ii,!0,Be)}}kr&&(he.idx=oe,v()),X!==!1&&nt("setCursor")}let D=null;Object.defineProperty(r,"rect",{get(){return D==null&&B(!1),D}});function B(q=!1){q?D=null:(D=o.getBoundingClientRect(),nt("syncRect",D))}function W(q,X,ie,oe,fe,we,Me){ne._lock||Li&&q!=null&&q.movementX==0&&q.movementY==0||(V(q,X,ie,oe,fe,we,Me,!1,q!=null),q!=null?_(null,!0,!0):_(X,!0,!1))}function V(q,X,ie,oe,fe,we,Me,Be,We){if(D==null&&B(!1),Qi(q),q!=null)ie=q.clientX-D.left,oe=q.clientY-D.top;else{if(ie<0||oe<0){ln=-10,Gt=-10;return}let[Ke,Ze]=ht.scales,et=X.cursor.sync,[_t,Ht]=et.values,[At,Wt]=et.scales,[yt,at]=ht.match,mn=X.axes[0].side%2==1,En=H.ori==0?xt:qe,ar=H.ori==1?xt:qe,Xt=mn?we:fe,pe=mn?fe:we,_e=mn?oe:ie,xe=mn?ie:oe;if(At!=null?ie=yt(Ke,At)?b(_t,T[Ke],En,0):-10:ie=En*(_e/Xt),Wt!=null?oe=at(Ze,Wt)?b(Ht,T[Ze],ar,0):-10:oe=ar*(xe/pe),H.ori==1){let Ue=ie;ie=oe,oe=Ue}}We&&(X==null||X.cursor.event.type==Bh)&&((ie<=1||ie>=xt-1)&&(ie=Os(ie,xt)),(oe<=1||oe>=qe-1)&&(oe=Os(oe,qe))),Be?(Da=ie,Do=oe,[Mi,wo]=ne.move(r,ie,oe)):(ln=ie,Gt=oe)}const Y={width:0,height:0,left:0,top:0};function Q(){pn(Y,!1)}let re,se,ve,ke;function me(q,X,ie,oe,fe,we,Me){Li=!0,ze=xn=Pn._x=Pn._y=!1,V(q,X,ie,oe,fe,we,Me,!0,!1),q!=null&&(bn(jh,zh,be,!1),It(Jm,r,Mi,wo,xt,qe,null));let{left:Be,top:We,width:Ke,height:Ze}=St;re=Be,se=We,ve=Ke,ke=Ze}function be(q,X,ie,oe,fe,we,Me){Li=Pn._x=Pn._y=!1,V(q,X,ie,oe,fe,we,Me,!1,!0);let{left:Be,top:We,width:Ke,height:Ze}=St,et=Ke>0||Ze>0,_t=re!=Be||se!=We||ve!=Ke||ke!=Ze;if(et&&_t&&pn(St),Pn.setScale&&et&&_t){let Ht=Be,At=Ke,Wt=We,yt=Ze;if(H.ori==1&&(Ht=We,At=Ze,Wt=Be,yt=Ke),ze&&or(x,mr(Ht,x),mr(Ht+At,x)),xn)for(let at in T){let mn=T[at];at!=x&&mn.from==null&&mn.min!=wr&&or(at,mr(Wt+yt,at),mr(Wt,at))}Q()}else ne.lock&&(ne._lock=!ne._lock,_(X,!0,q!=null));q!=null&&(Nn(jh,zh),It(jh,r,ln,Gt,xt,qe,null))}function De(q,X,ie,oe,fe,we,Me){if(ne._lock)return;Qi(q);let Be=Li;if(Li){let We=!0,Ke=!0,Ze=10,et,_t;H.ori==0?(et=ze,_t=xn):(et=xn,_t=ze),et&&_t&&(We=ln<=Ze||ln>=xt-Ze,Ke=Gt<=Ze||Gt>=qe-Ze),et&&We&&(ln=ln<Mi?0:xt),_t&&Ke&&(Gt=Gt<wo?0:qe),_(null,!0,!0),Li=!1}ln=-10,Gt=-10,te.fill(null),_(null,!0,!0),Be&&(Li=Be)}function Ne(q,X,ie,oe,fe,we,Me){ne._lock||(Qi(q),Us(),Q(),q!=null&&It(ny,r,ln,Gt,xt,qe,null))}function Ve(){R.forEach(kA),Ao(r.width,r.height,!0)}Ms(xc,ma,Ve);const ct={};ct.mousedown=me,ct.mousemove=W,ct.mouseup=be,ct.dblclick=Ne,ct.setSeries=(q,X,ie,oe)=>{let fe=ht.match[2];ie=fe(r,X,ie),ie!=-1&&Ur(ie,oe,!0,!1)},ue&&(bn(Jm,o,me),bn(Bh,o,W),bn(ey,o,q=>{Qi(q),B(!1)}),bn(ty,o,De),bn(ny,o,Ne),dd.add(r),r.syncRect=B);const Je=r.hooks=t.hooks||{};function nt(q,X,ie){cs?Io.push([q,X,ie]):q in Je&&Je[q].forEach(oe=>{oe.call(null,r,X,ie)})}(t.plugins||[]).forEach(q=>{for(let X in q.hooks)Je[X]=(Je[X]||[]).concat(q.hooks[X])});const kn=(q,X,ie)=>ie,ht=nr({key:null,setSeries:!1,filters:{pub:wy,sub:wy},scales:[x,k[1]?k[1].scale:null],match:[xy,xy,kn],values:[null,null]},ne.sync);ht.match.length==2&&ht.match.push(kn),ne.sync=ht;const Tn=ht.key,Tt=ov(Tn);function It(q,X,ie,oe,fe,we,Me){ht.filters.pub(q,X,ie,oe,fe,we,Me)&&Tt.pub(q,X,ie,oe,fe,we,Me)}Tt.sub(r);function sr(q,X,ie,oe,fe,we,Me){ht.filters.sub(q,X,ie,oe,fe,we,Me)&&ct[q](null,X,ie,oe,fe,we,Me)}r.pub=sr;function yr(){Tt.unsub(r),dd.delete(r),xr.clear(),Vh(xc,ma,Ve),g.remove(),ge==null||ge.remove(),nt("destroy")}r.destroy=yr;function An(){nt("init",t,e),es(e||t.data,!1),C[x]?Fe(x,C[x]):Us(),To=St.show&&(St.width>0||St.height>0),Xi=kr=!0,Ao(t.width,t.height)}return k.forEach(Ra),R.forEach(mi),n?n instanceof HTMLElement?(n.appendChild(g),An()):n(r,An):An(),r}Ar.assign=nr,Ar.fmtNum=Yh,Ar.rangeNum=Cc,Ar.rangeLog=_c,Ar.rangeAsinh=Kh,Ar.orient=Ns,Ar.pxRatio=rn,Ar.join=pT,Ar.fmtDate=Jh,Ar.tzDate=_T,Ar.sync=ov;{Ar.addGap=sA,Ar.clipGaps=Lc;let t=Ar.paths={points:dv};t.linear=fv,t.stepped=cA,t.bars=uA,t.spline=dA}var kv,Sv;function SA(){return Sv||(Sv=1,kv=function(t,e,n,r,u){var d,f;if(r===void 0)r=0;else if(r=r|0,r<0||r>=t.length)throw new RangeError("invalid lower bound");if(u===void 0)u=t.length-1;else if(u=u|0,u<r||u>=t.length)throw new RangeError("invalid upper bound");for(;r<=u;)if(d=r+(u-r>>>1),f=+n(t[d],e,d,t),f<0)r=d+1;else if(f>0)u=d-1;else return d;return~r}),kv}var _A=SA();const rj=Wi("a",tc(_A));var fd,_v;function CA(){if(_v)return fd;_v=1;function t(e,n,r){var u=-1,d=e.length;n<0&&(n=-n>d?0:d+n),r=r>d?d:r,r<0&&(r+=d),d=n>r?0:r-n>>>0,n>>>=0;for(var f=Array(d);++u<d;)f[u]=e[u+n];return f}return fd=t,fd}var gd,Cv;function $A(){if(Cv)return gd;Cv=1;var t=CA();function e(n,r,u){var d=n.length;return u=u===void 0?d:u,!r&&u>=d?n:t(n,r,u)}return gd=e,gd}var md,$v;function Tv(){if($v)return md;$v=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",u=e+n+r,d="\\ufe0e\\ufe0f",f="\\u200d",b=RegExp("["+f+t+u+d+"]");function p(g){return b.test(g)}return md=p,md}var yd,Av;function TA(){if(Av)return yd;Av=1;function t(e){return e.split("")}return yd=t,yd}var vd,Ev;function AA(){if(Ev)return vd;Ev=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",u=e+n+r,d="\\ufe0e\\ufe0f",f="["+t+"]",b="["+u+"]",p="\\ud83c[\\udffb-\\udfff]",g="(?:"+b+"|"+p+")",i="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",c="\\u200d",o=g+"?",l="["+d+"]?",m="(?:"+c+"(?:"+[i,a,h].join("|")+")"+l+o+")*",w=l+o+m,k="(?:"+[i+b+"?",b,a,h,f].join("|")+")",R=RegExp(p+"(?="+p+")|"+k+w,"g");function T(S){return S.match(R)||[]}return vd=T,vd}var bd,Rv;function EA(){if(Rv)return bd;Rv=1;var t=TA(),e=Tv(),n=AA();function r(u){return e(u)?n(u):t(u)}return bd=r,bd}var wd,Mv;function RA(){if(Mv)return wd;Mv=1;var t=typeof Xo=="object"&&Xo&&Xo.Object===Object&&Xo;return wd=t,wd}var xd,Lv;function MA(){if(Lv)return xd;Lv=1;var t=RA(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return xd=n,xd}var kd,Ov;function Sd(){if(Ov)return kd;Ov=1;var t=MA(),e=t.Symbol;return kd=e,kd}var _d,Iv;function LA(){if(Iv)return _d;Iv=1;function t(e,n){for(var r=-1,u=e==null?0:e.length,d=Array(u);++r<u;)d[r]=n(e[r],r,e);return d}return _d=t,_d}var Cd,Nv;function OA(){if(Nv)return Cd;Nv=1;var t=Array.isArray;return Cd=t,Cd}var $d,Dv;function IA(){if(Dv)return $d;Dv=1;var t=Sd(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,u=t?t.toStringTag:void 0;function d(f){var b=n.call(f,u),p=f[u];try{f[u]=void 0;var g=!0}catch{}var i=r.call(f);return g&&(b?f[u]=p:delete f[u]),i}return $d=d,$d}var Td,Fv;function NA(){if(Fv)return Td;Fv=1;var t=Object.prototype,e=t.toString;function n(r){return e.call(r)}return Td=n,Td}var Ad,Pv;function DA(){if(Pv)return Ad;Pv=1;var t=Sd(),e=IA(),n=NA(),r="[object Null]",u="[object Undefined]",d=t?t.toStringTag:void 0;function f(b){return b==null?b===void 0?u:r:d&&d in Object(b)?e(b):n(b)}return Ad=f,Ad}var Ed,Bv;function FA(){if(Bv)return Ed;Bv=1;function t(e){return e!=null&&typeof e=="object"}return Ed=t,Ed}var Rd,jv;function PA(){if(jv)return Rd;jv=1;var t=DA(),e=FA(),n="[object Symbol]";function r(u){return typeof u=="symbol"||e(u)&&t(u)==n}return Rd=r,Rd}var Md,Wv;function BA(){if(Wv)return Md;Wv=1;var t=Sd(),e=LA(),n=OA(),r=PA(),u=t?t.prototype:void 0,d=u?u.toString:void 0;function f(b){if(typeof b=="string")return b;if(n(b))return e(b,f)+"";if(r(b))return d?d.call(b):"";var p=b+"";return p=="0"&&1/b==-1/0?"-0":p}return Md=f,Md}var Ld,zv;function Dc(){if(zv)return Ld;zv=1;var t=BA();function e(n){return n==null?"":t(n)}return Ld=e,Ld}var Od,Hv;function jA(){if(Hv)return Od;Hv=1;var t=$A(),e=Tv(),n=EA(),r=Dc();function u(d){return function(f){f=r(f);var b=e(f)?n(f):void 0,p=b?b[0]:f.charAt(0),g=b?t(b,1).join(""):f.slice(1);return p[d]()+g}}return Od=u,Od}var Id,Uv;function qv(){if(Uv)return Id;Uv=1;var t=jA(),e=t("toUpperCase");return Id=e,Id}var WA=qv();const zA=tc(WA);var Nd,Vv;function HA(){if(Vv)return Nd;Vv=1;var t=Dc(),e=qv();function n(r){return e(t(r).toLowerCase())}return Nd=n,Nd}var Dd,Kv;function UA(){if(Kv)return Dd;Kv=1;function t(e,n,r,u){var d=-1,f=e==null?0:e.length;for(u&&f&&(r=e[++d]);++d<f;)r=n(r,e[d],d,e);return r}return Dd=t,Dd}var Fd,Gv;function qA(){if(Gv)return Fd;Gv=1;function t(e){return function(n){return e==null?void 0:e[n]}}return Fd=t,Fd}var Pd,Yv;function VA(){if(Yv)return Pd;Yv=1;var t=qA(),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 Pd=n,Pd}var Bd,Xv;function KA(){if(Xv)return Bd;Xv=1;var t=VA(),e=Dc(),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",u="\\ufe20-\\ufe2f",d="\\u20d0-\\u20ff",f=r+u+d,b="["+f+"]",p=RegExp(b,"g");function g(i){return i=e(i),i&&i.replace(n,t).replace(p,"")}return Bd=g,Bd}var jd,Qv;function GA(){if(Qv)return jd;Qv=1;var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(n){return n.match(t)||[]}return jd=e,jd}var Wd,Zv;function YA(){if(Zv)return Wd;Zv=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 Wd=e,Wd}var zd,Jv;function XA(){if(Jv)return zd;Jv=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",u=e+n+r,d="\\u2700-\\u27bf",f="a-z\\xdf-\\xf6\\xf8-\\xff",b="\\xac\\xb1\\xd7\\xf7",p="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",g="\\u2000-\\u206f",i=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="A-Z\\xc0-\\xd6\\xd8-\\xde",h="\\ufe0e\\ufe0f",c=b+p+g+i,o="['’]",l="["+c+"]",m="["+u+"]",w="\\d+",k="["+d+"]",R="["+f+"]",T="[^"+t+c+w+d+f+a+"]",S="\\ud83c[\\udffb-\\udfff]",x="(?:"+m+"|"+S+")",M="[^"+t+"]",O="(?:\\ud83c[\\udde6-\\uddff]){2}",F="[\\ud800-\\udbff][\\udc00-\\udfff]",L="["+a+"]",H="\\u200d",P="(?:"+R+"|"+T+")",I="(?:"+L+"|"+T+")",$="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",C="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",N=x+"?",j="["+h+"]?",U="(?:"+H+"(?:"+[M,O,F].join("|")+")"+j+N+")*",K="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",te=j+N+U,he="(?:"+[k,O,F].join("|")+")"+te,ne=RegExp([L+"?"+R+"+"+$+"(?="+[l,L,"$"].join("|")+")",I+"+"+C+"(?="+[l,L+P,"$"].join("|")+")",L+"?"+P+"+"+$,L+"+"+C,Z,K,w,he].join("|"),"g");function ae(ue){return ue.match(ne)||[]}return zd=ae,zd}var Hd,eb;function QA(){if(eb)return Hd;eb=1;var t=GA(),e=YA(),n=Dc(),r=XA();function u(d,f,b){return d=n(d),f=b?void 0:f,f===void 0?e(d)?r(d):t(d):d.match(f)||[]}return Hd=u,Hd}var Ud,tb;function ZA(){if(tb)return Ud;tb=1;var t=UA(),e=KA(),n=QA(),r="['’]",u=RegExp(r,"g");function d(f){return function(b){return t(n(e(b).replace(u,"")),f,"")}}return Ud=d,Ud}var qd,nb;function JA(){if(nb)return qd;nb=1;var t=HA(),e=ZA(),n=e(function(r,u,d){return u=u.toLowerCase(),r+(d?t(u):u)});return qd=n,qd}var eE=JA();const tE=tc(eE),nE=Object.assign({"./ArrayWidget.vue":()=>lt(()=>ut.import("./ArrayWidget-DAZApfkV-ebccd0f4d889c29f4fc9.js"),void 0),"./ArrayplotWidget.vue":()=>lt(()=>ut.import("./ArrayplotWidget-BfsxDplv-5a4489357d9ff132532a.js"),void 0),"./BlockWidget.vue":()=>lt(()=>ut.import("./BlockWidget-SDCUWcMQ-e2b62bbb13b0fdc0807b.js"),void 0),"./ButtonWidget.vue":()=>lt(()=>ut.import("./ButtonWidget-BVMjwC19-b0bd858eff2e771adb60.js"),void 0),"./CanvasWidget.vue":()=>lt(()=>ut.import("./CanvasWidget-bVkufjRQ-ee93db2c318c8dc389f5.js"),void 0),"./CanvasdotWidget.vue":()=>lt(()=>ut.import("./CanvasdotWidget-DpniFfca-842cea0eec113ba110ca.js"),void 0),"./CanvasimageWidget.vue":()=>lt(()=>ut.import("./CanvasimageWidget-DHOSz-dJ-ee3f3a519e04249fdefb.js"),void 0),"./CanvasimagevalueWidget.vue":()=>lt(()=>ut.import("./CanvasimagevalueWidget-zrURWWUL-8e3ea53d3bb625eeda31.js"),void 0),"./CanvaslabelWidget.vue":()=>lt(()=>ut.import("./CanvaslabelWidget-D-XAMifp-8bb424fc472620555810.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>lt(()=>ut.import("./CanvaslabelvalueWidget-BsIdBtEb-da8737e2f5234db9adca.js"),void 0),"./CanvaslineWidget.vue":()=>lt(()=>ut.import("./CanvaslineWidget-CA2aPGRg-265f482fb826e4dd24d8.js"),void 0),"./CanvaslinevalueWidget.vue":()=>lt(()=>ut.import("./CanvaslinevalueWidget-J7epKRlo-aa62cb914efaa2c72f52.js"),void 0),"./CheckbuttonWidget.vue":()=>lt(()=>ut.import("./CheckbuttonWidget-ByH-PDRG-4f7a57213fb35ee98b7a.js"),void 0),"./ComboboxWidget.vue":()=>lt(()=>ut.import("./ComboboxWidget-Bdm_fMzW-c95c43221acf90ccb8bf.js"),void 0),"./DateWidget.vue":()=>lt(()=>ut.import("./DateWidget-BaQqthC7-fde9ff5a1209a56e895c.js"),void 0),"./DynamicWidget.vue":()=>lt(()=>ut.import("./DynamicWidget-CfMtj7H8-9a26deabef7527b1d8ab.js"),void 0),"./FormatvalueWidget.vue":()=>lt(()=>ut.import("./FormatvalueWidget--H5B9i_Y-d972db1320f5a94fd483.js"),void 0),"./HorizontalWidget.vue":()=>lt(()=>ut.import("./HorizontalWidget-D_gzrOWs-1e415f375dff1c2e3f95.js"),void 0),"./HorizontalboxWidget.vue":()=>lt(()=>ut.import("./HorizontalboxWidget-GDcjO-UB-5b917112309608b987b6.js"),void 0),"./HorizontallineWidget.vue":()=>lt(()=>ut.import("./HorizontallineWidget-DZvOYFxf-6182e61b2c7066616d03.js"),void 0),"./IframeWidget.vue":()=>lt(()=>ut.import("./IframeWidget-CuUav9b3-6fb109f3a35943867bd8.js"),void 0),"./ImageviewerWidget.vue":()=>lt(()=>ut.import("./ImageviewerWidget-BMZ6REN4-ef48468d98dd8f5a79f6.js"),void 0),"./LabelWidget.vue":()=>lt(()=>ut.import("./LabelWidget-oh6FIG6s-2cd043da76ed4f5d4800.js"),void 0),"./LabelledWidget.vue":()=>lt(()=>ut.import("./LabelledWidget-Bic36les-1f05122087725dfbae7d.js"),void 0),"./LabelprogressbarWidget.vue":()=>lt(()=>ut.import("./LabelprogressbarWidget-CqIiGoDb-6a58a65027d4cbc2db8e.js"),void 0),"./LabelsparklineWidget.vue":()=>lt(()=>ut.import("./LabelsparklineWidget-DLhmqO02-ef54f37a096804eacb9c.js"),void 0),"./LabelvalueWidget.vue":()=>lt(()=>ut.import("./LabelvalueWidget-BefwSSVq-bd0b491f02e8812bd08c.js"),void 0),"./LabelvaluedescWidget.vue":()=>lt(()=>ut.import("./LabelvaluedescWidget-NxrCzznm-eb3e6ff299590a1515e8.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>lt(()=>ut.import("./LabelvaluelimitsbarWidget-pq7qoolL-3b9b32a4088758e11188.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>lt(()=>ut.import("./LabelvaluelimitscolumnWidget-edkpogsl-511ba940a2e3cf0d3d42.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>lt(()=>ut.import("./LabelvaluerangebarWidget-DpJNv9dh-97033bbb64e51ef23dc4.js"),void 0),"./LedWidget.vue":()=>lt(()=>ut.import("./LedWidget--4eSxBnn-a6c51c7de962ba5a2887.js"),void 0),"./LimitsbarWidget.vue":()=>lt(()=>ut.import("./LimitsbarWidget-BQaumgRt-129d114da18318240cdf.js"),void 0),"./LimitscolorWidget.vue":()=>lt(()=>ut.import("./LimitscolorWidget-BBF9sRtF-5cc3ec96819788f36cc3.js"),void 0),"./LimitscolumnWidget.vue":()=>lt(()=>ut.import("./LimitscolumnWidget-DZZtSoXw-12bfe588e9b471a113dc.js"),void 0),"./LinegraphWidget.vue":()=>lt(()=>ut.import("./LinegraphWidget-DTLZmyWs-fb5e1bbe3e9621d0f4fc.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>lt(()=>ut.import("./MatrixbycolumnsWidget-dpgZz4wR-e8b84ab48c85481196b1.js"),void 0),"./ProgressbarWidget.vue":()=>lt(()=>ut.import("./ProgressbarWidget-7cYr8136-b518f3206a8405331f39.js"),void 0),"./RadiobuttonWidget.vue":()=>lt(()=>ut.import("./RadiobuttonWidget-DTfn-7F2-b5df32ec6974df358e53.js"),void 0),"./RadiogroupWidget.vue":()=>lt(()=>ut.import("./RadiogroupWidget-DWvTpw94-baf879b48df1c5b5143f.js"),void 0),"./RangebarWidget.vue":()=>lt(()=>ut.import("./RangebarWidget-CG2Y7eYp-810bc4c4575ef798b32e.js"),void 0),"./RollupWidget.vue":()=>lt(()=>ut.import("./RollupWidget-C6HKTfCR-f6fa049267cd86e6e79d.js"),void 0),"./ScrollwindowWidget.vue":()=>lt(()=>ut.import("./ScrollwindowWidget-DvhBCYd2-bab70d51dd7fea9d693a.js"),void 0),"./SignalWidget.vue":()=>lt(()=>ut.import("./SignalWidget-BZIoGjam-3dbafc090093c226eb8f.js"),void 0),"./SpacerWidget.vue":()=>lt(()=>ut.import("./SpacerWidget-YBS8RZIE-609507312e41b6a0a5ad.js"),void 0),"./SparklineWidget.vue":()=>lt(()=>ut.import("./SparklineWidget-BMhY9vYe-a4d97a65ca561ac787ae.js"),void 0),"./TabbookWidget.vue":()=>lt(()=>ut.import("./TabbookWidget-RfET19pq-348326c13dbdf781b7f1.js"),void 0),"./TextboxWidget.vue":()=>lt(()=>ut.import("./TextboxWidget-M8vFBSxS-f0028e771ba4f025d303.js"),void 0),"./TextfieldWidget.vue":()=>lt(()=>ut.import("./TextfieldWidget-Dev7lCsT-699275f13ec44b3df372.js"),void 0),"./TimeWidget.vue":()=>lt(()=>ut.import("./TimeWidget-CQzn13rQ-b02f9f2b022360235af0.js"),void 0),"./TitleWidget.vue":()=>lt(()=>ut.import("./TitleWidget-C4zbSian-561471f698709b4641a3.js"),void 0),"./ValueWidget.vue":()=>lt(()=>ut.import("./ValueWidget-BVI6uUVX-41dda1c5e85d02dd8dd4.js"),void 0),"./ValuelimitsbarWidget.vue":()=>lt(()=>ut.import("./ValuelimitsbarWidget-BiIcery0-d5fb3cf3e0859e4aa8e6.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>lt(()=>ut.import("./ValuelimitscolumnWidget-BiRI8GbI-3ccd0ae1d705b2b4c93d.js"),void 0),"./ValuerangebarWidget.vue":()=>lt(()=>ut.import("./ValuerangebarWidget-CtMFQu9--f52986e29bb622dbdf11.js"),void 0),"./VerticalWidget.vue":()=>lt(()=>ut.import("./VerticalWidget-CRmcpQBn-5e4566b3eb1377166740.js"),void 0),"./VerticalboxWidget.vue":()=>lt(()=>ut.import("./VerticalboxWidget-C-qChjug-7a3e96c97106bed30f19.js"),void 0)}),rE=Object.entries(nE).reduce((t,[e,n])=>{e=e.split("/").pop();const r=zA(tE(e.replace(/\.\w+$/,"")));return{...t,[r]:kf(n)}},{}),ij=Wi("U",{components:rE}),iE={methods:{buildLanguageMode(t,e){let n=jr.require("ace/lib/oop"),r=Object.getOwnPropertyNames(Um.prototype).filter(p=>p!=="constructor").filter(p=>p!=="exec").concat(["check","check_raw","check_formatted","check_with_units","check_exception","check_tolerance","check_expression","wait","wait_tolerance","wait_expression","wait_check","wait_check_tolerance","wait_check_expression","wait_packet","wait_check_packet","disable_instrumentation","set_line_delay","get_line_delay","set_max_output","get_max_output"]),u=new RegExp(`(\\b${r.join("\\b|\\b")}\\b)`),d=function(){t.call(this);for(let p in this.$rules)this.$rules[p].unshift({regex:u,token:"support.function"})};n.inherits(d,t);let f=jr.require("ace/mode/matching_brace_outdent").MatchingBraceOutdent,b=jr.require("ace/mode/behaviour/cstyle").CstyleBehaviour;return[n,function(){this.HighlightRules=d,this.$outdent=new f,this.$behaviour=new b,this.foldingRules=new e,this.indentKeywords=this.foldingRules.indentKeywords}]},buildRubyMode(){const[t,e]=this.buildLanguageMode(jr.require("ace/mode/ruby_highlight_rules").RubyHighlightRules,jr.require("ace/mode/folding/ruby").FoldMode);let n=jr.require("ace/mode/ruby").Mode;return t.inherits(e,n),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildPythonMode(){const[t,e]=this.buildLanguageMode(jr.require("ace/mode/python_highlight_rules").PythonHighlightRules,jr.require("ace/mode/folding/pythonic").FoldMode);let n=jr.require("ace/mode/python").Mode;return t.inherits(e,n),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildJsonMode(){const[t,e]=this.buildLanguageMode(jr.require("ace/mode/json_highlight_rules").JsonHighlightRules,jr.require("ace/mode/folding/ruby").FoldMode);let n=jr.require("ace/mode/json").Mode;return t.inherits(e,n),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildMarkdownMode(){const[t,e]=this.buildLanguageMode(jr.require("ace/mode/markdown_highlight_rules").MarkdownHighlightRules,jr.require("ace/mode/folding/markdown").FoldMode);let n=jr.require("ace/mode/markdown").Mode;return t.inherits(e,n),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e}}},oE={mixins:[iE],props:{content:{type:String,required:!0},type:String,name:String,modelValue:Boolean,filename:{type:String,required:!1}},data(){return{editor:null,mode:null}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},title:function(){return`${this.type}: ${this.name}`}},mounted(){this.editor=ace.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");let t=null;switch(this.filename?this.filename.split(".").pop():"txt"){case"json":const e=this.buildJsonMode();t=new e,this.editor.setOptions({useWorker:!1});break;case"py":case"pyi":const n=this.buildPythonMode();t=new n;break;case"md":const r=this.buildMarkdownMode();t=new r;break;default:const u=this.buildRubyMode();t=new u;break}this.editor.session.setMode(t),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.content),this.editor.clearSelection(),this.editor.focus(),this.editor.setReadOnly(!0)},beforeUnmount(){this.editor&&this.editor.destroy()},methods:{close:function(){this.show=!this.show},download:function(){const t=new Blob([this.editor.getValue()],{type:"text/plain"});let e=`${this.type.toLowerCase()}_${this.name.toLowerCase()}.json`;this.filename&&(e=this.filename);const n=document.createElement("a");n.href=URL.createObjectURL(t),n.setAttribute("download",e),n.click()}}},sE=["textContent"],aE={class:"mx-2"},lE={ref:"editor",class:"editor"};function cE(t,e,n,r,u,d){const f=Ut("v-spacer"),b=Ut("v-btn"),p=Ut("v-toolbar"),g=Ut("v-card-text"),i=Ut("v-card-actions"),a=Ut("v-card"),h=Ut("v-dialog");return Zt(),Jn(h,{modelValue:d.show,"onUpdate:modelValue":e[1]||(e[1]=c=>d.show=c),width:"85vw"},{default:it(()=>[ot(a,null,{default:it(()=>[ot(p,{height:"24"},{default:it(()=>[ot(f),fr("span",{textContent:Br(d.title)},null,8,sE),ot(f),fr("div",aE,[ot(b,{icon:"mdi-download",variant:"text",density:"compact","data-test":"downloadIcon",onClick:d.download},null,8,["onClick"])])]),_:1}),ot(g,null,{default:it(()=>[fr("pre",lE,null,512)]),_:1}),ot(i,{class:"pr-6 pb-4 pt-0"},{default:it(()=>[ot(f),ot(b,{variant:"flat",onClick:e[0]||(e[0]=c=>d.show=!d.show)},{default:it(()=>e[2]||(e[2]=[er(" Ok ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const uE=Vu(oE,[["render",cE],["__scopeId","data-v-69e71dd8"]]),hE={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(t){return t.replaceAll(" ","-").toLowerCase()},subMenuClick(t){t.command(t),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},dE={class:"app-title mr-2"};function pE(t,e,n,r,u,d){const f=Ut("v-col"),b=Ut("v-row"),p=Ut("v-icon"),g=Ut("v-btn"),i=Ut("v-divider"),a=Ut("v-list-item-title"),h=Ut("v-list-item"),c=Ut("v-list"),o=Ut("v-menu"),l=Ut("v-radio"),m=Ut("v-list-item-action"),w=Ut("v-radio-group"),k=Ut("v-checkbox");return Zt(),Jn(Sf,{to:"#openc3-menu"},[ot(b,{"no-gutters":""},{default:it(()=>[ot(f,{"align-self":"end"},{default:it(()=>[fr("span",dE,Br(n.title),1)]),_:1})]),_:1}),ot(b,{dense:"",class:"flex-nowrap"},{default:it(()=>[(Zt(!0),Yr(_o,null,Ko(n.menus,(R,T)=>(Zt(),Jn(o,{ref_for:!0,ref:"topmenu",key:T},{activator:it(({props:S})=>[ot(g,Ku({ref_for:!0},S,{variant:"outlined",class:"mx-1 menu-button",text:R.label,"data-test":d.formatDT(`${n.title} ${R.label}`)}),{append:it(()=>[ot(p,{class:"menu-button-icon"},{default:it(()=>e[0]||(e[0]=[er(" mdi-menu-down ")])),_:1})]),_:2},1040,["text","data-test"])]),default:it(()=>[ot(c,null,{default:it(()=>[(Zt(!0),Yr(_o,null,Ko(R.items,(S,x)=>(Zt(),Yr(_o,null,[S.divider?(Zt(),Jn(i,{key:x+"-divider"})):S.subMenu&&S.subMenu.length>0?(Zt(),Yr("div",{key:x+"-submenu"},[(Zt(),Jn(o,{"open-on-hover":"",location:"right",key:x},{activator:it(({props:M})=>[(Zt(),Jn(h,Ku({ref_for:!0},M,{disabled:S.disabled,key:x}),Gu({append:it(()=>[ot(p,null,{default:it(()=>e[1]||(e[1]=[er(" mdi-chevron-right ")])),_:1})]),default:it(()=>[!S.radio&&!S.checkbox?(Zt(),Jn(a,{key:0,style:Yu("cursor: pointer;"+(S.disabled?"opacity: 0.2":""))},{default:it(()=>[er(Br(S.label),1)]),_:2},1032,["style"])):so("",!0)]),_:2},[S.icon?{name:"prepend",fn:it(()=>[ot(p,{disabled:S.disabled},{default:it(()=>[er(Br(S.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:it(()=>[ot(c,null,{default:it(()=>[(Zt(!0),Yr(_o,null,Ko(S.subMenu,(M,O)=>(Zt(),Jn(h,{key:O,"prepend-icon":M.icon,onClick:F=>d.subMenuClick(M)},{default:it(()=>[ot(a,null,{default:it(()=>[er(Br(M.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):S.radioGroup?(Zt(),Jn(w,{"model-value":S.value,"onUpdate:modelValue":S.command,key:x+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:it(()=>[(Zt(!0),Yr(_o,null,Ko(S.choices,(M,O)=>(Zt(),Jn(h,{key:O+"-choice"},{default:it(()=>[ot(m,{class:"list-action"},{default:it(()=>[ot(l,{color:"secondary",label:M.label,value:M.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(Zt(),Jn(h,{onClick:M=>S.command(S),disabled:S.disabled,"data-test":d.formatDT(`${n.title} ${R.label} ${S.label}`),key:x+"-list"},Gu({default:it(()=>[S.checkbox?(Zt(),Jn(m,{key:0,class:"list-action"},{default:it(()=>[ot(k,{modelValue:S.checked,"onUpdate:modelValue":M=>S.checked=M,label:S.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):so("",!0),!S.radio&&!S.checkbox?(Zt(),Jn(a,{key:1,style:Yu("cursor: pointer;"+(S.disabled?"opacity: 0.2":""))},{default:it(()=>[er(Br(S.label),1)]),_:2},1032,["style"])):so("",!0)]),_:2},[S.icon?{name:"prepend",fn:it(()=>[ot(p,{icon:S.icon,disabled:S.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const fE=Vu(hE,[["render",pE],["__scopeId","data-v-4d454b93"]]);function rb(t,e){return function(){return t.apply(e,arguments)}}const{toString:gE}=Object.prototype,{getPrototypeOf:Vd}=Object,{iterator:Fc,toStringTag:ib}=Symbol,Pc=(t=>e=>{const n=gE.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Gi=t=>(t=t.toLowerCase(),e=>Pc(e)===t),Bc=t=>e=>typeof e===t,{isArray:_a}=Array,dl=Bc("undefined");function mE(t){return t!==null&&!dl(t)&&t.constructor!==null&&!dl(t.constructor)&&ei(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const ob=Gi("ArrayBuffer");function yE(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ob(t.buffer),e}const vE=Bc("string"),ei=Bc("function"),sb=Bc("number"),jc=t=>t!==null&&typeof t=="object",bE=t=>t===!0||t===!1,Wc=t=>{if(Pc(t)!=="object")return!1;const e=Vd(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(ib in t)&&!(Fc in t)},wE=Gi("Date"),xE=Gi("File"),kE=Gi("Blob"),SE=Gi("FileList"),_E=t=>jc(t)&&ei(t.pipe),CE=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||ei(t.append)&&((e=Pc(t))==="formdata"||e==="object"&&ei(t.toString)&&t.toString()==="[object FormData]"))},$E=Gi("URLSearchParams"),[TE,AE,EE,RE]=["ReadableStream","Request","Response","Headers"].map(Gi),ME=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function pl(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,u;if(typeof t!="object"&&(t=[t]),_a(t))for(r=0,u=t.length;r<u;r++)e.call(null,t[r],r,t);else{const d=n?Object.getOwnPropertyNames(t):Object.keys(t),f=d.length;let b;for(r=0;r<f;r++)b=d[r],e.call(null,t[b],b,t)}}function ab(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,u;for(;r-- >0;)if(u=n[r],e===u.toLowerCase())return u;return null}const Ds=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lb=t=>!dl(t)&&t!==Ds;function Kd(){const{caseless:t}=lb(this)&&this||{},e={},n=(r,u)=>{const d=t&&ab(e,u)||u;Wc(e[d])&&Wc(r)?e[d]=Kd(e[d],r):Wc(r)?e[d]=Kd({},r):_a(r)?e[d]=r.slice():e[d]=r};for(let r=0,u=arguments.length;r<u;r++)arguments[r]&&pl(arguments[r],n);return e}const LE=(t,e,n,{allOwnKeys:r}={})=>(pl(e,(u,d)=>{n&&ei(u)?t[d]=rb(u,n):t[d]=u},{allOwnKeys:r}),t),OE=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),IE=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},NE=(t,e,n,r)=>{let u,d,f;const b={};if(e=e||{},t==null)return e;do{for(u=Object.getOwnPropertyNames(t),d=u.length;d-- >0;)f=u[d],(!r||r(f,t,e))&&!b[f]&&(e[f]=t[f],b[f]=!0);t=n!==!1&&Vd(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},DE=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},FE=t=>{if(!t)return null;if(_a(t))return t;let e=t.length;if(!sb(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},PE=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Vd(Uint8Array)),BE=(t,e)=>{const n=(t&&t[Fc]).call(t);let r;for(;(r=n.next())&&!r.done;){const u=r.value;e.call(t,u[0],u[1])}},jE=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},WE=Gi("HTMLFormElement"),zE=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),cb=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),HE=Gi("RegExp"),ub=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};pl(n,(u,d)=>{let f;(f=e(u,d,t))!==!1&&(r[d]=f||u)}),Object.defineProperties(t,r)},UE=t=>{ub(t,(e,n)=>{if(ei(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(ei(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},qE=(t,e)=>{const n={},r=u=>{u.forEach(d=>{n[d]=!0})};return _a(t)?r(t):r(String(t).split(e)),n},VE=()=>{},KE=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function GE(t){return!!(t&&ei(t.append)&&t[ib]==="FormData"&&t[Fc])}const YE=t=>{const e=new Array(10),n=(r,u)=>{if(jc(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[u]=r;const d=_a(r)?[]:{};return pl(r,(f,b)=>{const p=n(f,u+1);!dl(p)&&(d[b]=p)}),e[u]=void 0,d}}return r};return n(t,0)},XE=Gi("AsyncFunction"),QE=t=>t&&(jc(t)||ei(t))&&ei(t.then)&&ei(t.catch),hb=((t,e)=>t?setImmediate:e?((n,r)=>(Ds.addEventListener("message",({source:u,data:d})=>{u===Ds&&d===n&&r.length&&r.shift()()},!1),u=>{r.push(u),Ds.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ei(Ds.postMessage)),ZE=typeof queueMicrotask<"u"?queueMicrotask.bind(Ds):typeof process<"u"&&process.nextTick||hb,JE=t=>t!=null&&ei(t[Fc]),Te={isArray:_a,isArrayBuffer:ob,isBuffer:mE,isFormData:CE,isArrayBufferView:yE,isString:vE,isNumber:sb,isBoolean:bE,isObject:jc,isPlainObject:Wc,isReadableStream:TE,isRequest:AE,isResponse:EE,isHeaders:RE,isUndefined:dl,isDate:wE,isFile:xE,isBlob:kE,isRegExp:HE,isFunction:ei,isStream:_E,isURLSearchParams:$E,isTypedArray:PE,isFileList:SE,forEach:pl,merge:Kd,extend:LE,trim:ME,stripBOM:OE,inherits:IE,toFlatObject:NE,kindOf:Pc,kindOfTest:Gi,endsWith:DE,toArray:FE,forEachEntry:BE,matchAll:jE,isHTMLForm:WE,hasOwnProperty:cb,hasOwnProp:cb,reduceDescriptors:ub,freezeMethods:UE,toObjectSet:qE,toCamelCase:zE,noop:VE,toFiniteNumber:KE,findKey:ab,global:Ds,isContextDefined:lb,isSpecCompliantForm:GE,toJSONObject:YE,isAsyncFn:XE,isThenable:QE,setImmediate:hb,asap:ZE,isIterable:JE};function Lt(t,e,n,r,u){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),r&&(this.request=r),u&&(this.response=u,this.status=u.status?u.status:null)}Te.inherits(Lt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Te.toJSONObject(this.config),code:this.code,status:this.status}}});const db=Lt.prototype,pb={};["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=>{pb[t]={value:t}}),Object.defineProperties(Lt,pb),Object.defineProperty(db,"isAxiosError",{value:!0}),Lt.from=(t,e,n,r,u,d)=>{const f=Object.create(db);return Te.toFlatObject(t,f,function(b){return b!==Error.prototype},b=>b!=="isAxiosError"),Lt.call(f,t.message,e,n,r,u),f.cause=t,f.name=t.name,d&&Object.assign(f,d),f};const eR=null;function Gd(t){return Te.isPlainObject(t)||Te.isArray(t)}function fb(t){return Te.endsWith(t,"[]")?t.slice(0,-2):t}function gb(t,e,n){return t?t.concat(e).map(function(r,u){return r=fb(r),!n&&u?"["+r+"]":r}).join(n?".":""):e}function tR(t){return Te.isArray(t)&&!t.some(Gd)}const nR=Te.toFlatObject(Te,{},null,function(t){return/^is[A-Z]/.test(t)});function zc(t,e,n){if(!Te.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=Te.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(c,o){return!Te.isUndefined(o[c])});const r=n.metaTokens,u=n.visitor||g,d=n.dots,f=n.indexes,b=(n.Blob||typeof Blob<"u"&&Blob)&&Te.isSpecCompliantForm(e);if(!Te.isFunction(u))throw new TypeError("visitor must be a function");function p(c){if(c===null)return"";if(Te.isDate(c))return c.toISOString();if(!b&&Te.isBlob(c))throw new Lt("Blob is not supported. Use a Buffer instead.");return Te.isArrayBuffer(c)||Te.isTypedArray(c)?b&&typeof Blob=="function"?new Blob([c]):Buffer.from(c):c}function g(c,o,l){let m=c;if(c&&!l&&typeof c=="object"){if(Te.endsWith(o,"{}"))o=r?o:o.slice(0,-2),c=JSON.stringify(c);else if(Te.isArray(c)&&tR(c)||(Te.isFileList(c)||Te.endsWith(o,"[]"))&&(m=Te.toArray(c)))return o=fb(o),m.forEach(function(w,k){!(Te.isUndefined(w)||w===null)&&e.append(f===!0?gb([o],k,d):f===null?o:o+"[]",p(w))}),!1}return Gd(c)?!0:(e.append(gb(l,o,d),p(c)),!1)}const i=[],a=Object.assign(nR,{defaultVisitor:g,convertValue:p,isVisitable:Gd});function h(c,o){if(!Te.isUndefined(c)){if(i.indexOf(c)!==-1)throw Error("Circular reference detected in "+o.join("."));i.push(c),Te.forEach(c,function(l,m){(!(Te.isUndefined(l)||l===null)&&u.call(e,l,Te.isString(m)?m.trim():m,o,a))===!0&&h(l,o?o.concat(m):[m])}),i.pop()}}if(!Te.isObject(t))throw new TypeError("data must be an object");return h(t),e}function mb(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Yd(t,e){this._pairs=[],t&&zc(t,this,e)}const yb=Yd.prototype;yb.append=function(t,e){this._pairs.push([t,e])},yb.toString=function(t){const e=t?function(n){return t.call(this,n,mb)}:mb;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function rR(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function vb(t,e,n){if(!e)return t;const r=n&&n.encode||rR;Te.isFunction(n)&&(n={serialize:n});const u=n&&n.serialize;let d;if(u?d=u(e,n):d=Te.isURLSearchParams(e)?e.toString():new Yd(e,n).toString(r),d){const f=t.indexOf("#");f!==-1&&(t=t.slice(0,f)),t+=(t.indexOf("?")===-1?"?":"&")+d}return t}let bb=class{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Te.forEach(this.handlers,function(n){n!==null&&e(n)})}};const wb={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},iR=typeof URLSearchParams<"u"?URLSearchParams:Yd,oR=typeof FormData<"u"?FormData:null,sR=typeof Blob<"u"?Blob:null,aR={isBrowser:!0,classes:{URLSearchParams:iR,FormData:oR,Blob:sR},protocols:["http","https","file","blob","url","data"]},Xd=typeof window<"u"&&typeof document<"u",Qd=typeof navigator=="object"&&navigator||void 0,lR=Xd&&(!Qd||["ReactNative","NativeScript","NS"].indexOf(Qd.product)<0),cR=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",uR=Xd&&window.location.href||"http://localhost",hR=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xd,hasStandardBrowserEnv:lR,hasStandardBrowserWebWorkerEnv:cR,navigator:Qd,origin:uR},Symbol.toStringTag,{value:"Module"})),Er={...hR,...aR};function dR(t,e){return zc(t,new Er.classes.URLSearchParams,Object.assign({visitor:function(n,r,u,d){return Er.isNode&&Te.isBuffer(n)?(this.append(r,n.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)}},e))}function pR(t){return Te.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function fR(t){const e={},n=Object.keys(t);let r;const u=n.length;let d;for(r=0;r<u;r++)d=n[r],e[d]=t[d];return e}function xb(t){function e(n,r,u,d){let f=n[d++];if(f==="__proto__")return!0;const b=Number.isFinite(+f),p=d>=n.length;return f=!f&&Te.isArray(u)?u.length:f,p?(Te.hasOwnProp(u,f)?u[f]=[u[f],r]:u[f]=r,!b):((!u[f]||!Te.isObject(u[f]))&&(u[f]=[]),e(n,r,u[f],d)&&Te.isArray(u[f])&&(u[f]=fR(u[f])),!b)}if(Te.isFormData(t)&&Te.isFunction(t.entries)){const n={};return Te.forEachEntry(t,(r,u)=>{e(pR(r),u,n,0)}),n}return null}function gR(t,e,n){if(Te.isString(t))try{return(e||JSON.parse)(t),Te.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const fl={transitional:wb,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,u=Te.isObject(t);if(u&&Te.isHTMLForm(t)&&(t=new FormData(t)),Te.isFormData(t))return r?JSON.stringify(xb(t)):t;if(Te.isArrayBuffer(t)||Te.isBuffer(t)||Te.isStream(t)||Te.isFile(t)||Te.isBlob(t)||Te.isReadableStream(t))return t;if(Te.isArrayBufferView(t))return t.buffer;if(Te.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(u){if(n.indexOf("application/x-www-form-urlencoded")>-1)return dR(t,this.formSerializer).toString();if((d=Te.isFileList(t))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return zc(d?{"files[]":t}:t,f&&new f,this.formSerializer)}}return u||r?(e.setContentType("application/json",!1),gR(t)):t}],transformResponse:[function(t){const e=this.transitional||fl.transitional,n=e&&e.forcedJSONParsing,r=this.responseType==="json";if(Te.isResponse(t)||Te.isReadableStream(t))return t;if(t&&Te.isString(t)&&(n&&!this.responseType||r)){const u=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(d){if(u)throw d.name==="SyntaxError"?Lt.from(d,Lt.ERR_BAD_RESPONSE,this,null,this.response):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Er.classes.FormData,Blob:Er.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Te.forEach(["delete","get","head","post","put","patch"],t=>{fl.headers[t]={}});const mR=Te.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),yR=t=>{const e={};let n,r,u;return t&&t.split(`
1496
+ `).forEach(function(d){u=d.indexOf(":"),n=d.substring(0,u).trim().toLowerCase(),r=d.substring(u+1).trim(),!(!n||e[n]&&mR[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},kb=Symbol("internals");function gl(t){return t&&String(t).trim().toLowerCase()}function Hc(t){return t===!1||t==null?t:Te.isArray(t)?t.map(Hc):String(t)}function vR(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const bR=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Zd(t,e,n,r,u){if(Te.isFunction(r))return r.call(this,e,n);if(u&&(e=n),!!Te.isString(e)){if(Te.isString(r))return e.indexOf(r)!==-1;if(Te.isRegExp(r))return r.test(e)}}function wR(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function xR(t,e){const n=Te.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(u,d,f){return this[r].call(this,e,u,d,f)},configurable:!0})})}let ti=class{constructor(e){e&&this.set(e)}set(e,n,r){const u=this;function d(b,p,g){const i=gl(p);if(!i)throw new Error("header name must be a non-empty string");const a=Te.findKey(u,i);(!a||u[a]===void 0||g===!0||g===void 0&&u[a]!==!1)&&(u[a||p]=Hc(b))}const f=(b,p)=>Te.forEach(b,(g,i)=>d(g,i,p));if(Te.isPlainObject(e)||e instanceof this.constructor)f(e,n);else if(Te.isString(e)&&(e=e.trim())&&!bR(e))f(yR(e),n);else if(Te.isObject(e)&&Te.isIterable(e)){let b={},p,g;for(const i of e){if(!Te.isArray(i))throw TypeError("Object iterator must return a key-value pair");b[g=i[0]]=(p=b[g])?Te.isArray(p)?[...p,i[1]]:[p,i[1]]:i[1]}f(b,n)}else e!=null&&d(n,e,r);return this}get(e,n){if(e=gl(e),e){const r=Te.findKey(this,e);if(r){const u=this[r];if(!n)return u;if(n===!0)return vR(u);if(Te.isFunction(n))return n.call(this,u,r);if(Te.isRegExp(n))return n.exec(u);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=gl(e),e){const r=Te.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Zd(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let u=!1;function d(f){if(f=gl(f),f){const b=Te.findKey(r,f);b&&(!n||Zd(r,r[b],b,n))&&(delete r[b],u=!0)}}return Te.isArray(e)?e.forEach(d):d(e),u}clear(e){const n=Object.keys(this);let r=n.length,u=!1;for(;r--;){const d=n[r];(!e||Zd(this,this[d],d,e,!0))&&(delete this[d],u=!0)}return u}normalize(e){const n=this,r={};return Te.forEach(this,(u,d)=>{const f=Te.findKey(r,d);if(f){n[f]=Hc(u),delete n[d];return}const b=e?wR(d):String(d).trim();b!==d&&delete n[d],n[b]=Hc(u),r[b]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return Te.forEach(this,(r,u)=>{r!=null&&r!==!1&&(n[u]=e&&Te.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
1497
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(u=>r.set(u)),r}static accessor(e){const n=(this[kb]=this[kb]={accessors:{}}).accessors,r=this.prototype;function u(d){const f=gl(d);n[f]||(xR(r,d),n[f]=!0)}return Te.isArray(e)?e.forEach(u):u(e),this}};ti.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Te.reduceDescriptors(ti.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),Te.freezeMethods(ti);function Jd(t,e){const n=this||fl,r=e||n,u=ti.from(r.headers);let d=r.data;return Te.forEach(t,function(f){d=f.call(n,d,u.normalize(),e?e.status:void 0)}),u.normalize(),d}function Sb(t){return!!(t&&t.__CANCEL__)}function Ca(t,e,n){Lt.call(this,t??"canceled",Lt.ERR_CANCELED,e,n),this.name="CanceledError"}Te.inherits(Ca,Lt,{__CANCEL__:!0});function _b(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Lt("Request failed with status code "+n.status,[Lt.ERR_BAD_REQUEST,Lt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function kR(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function SR(t,e){t=t||10;const n=new Array(t),r=new Array(t);let u=0,d=0,f;return e=e!==void 0?e:1e3,function(b){const p=Date.now(),g=r[d];f||(f=p),n[u]=b,r[u]=p;let i=d,a=0;for(;i!==u;)a+=n[i++],i=i%t;if(u=(u+1)%t,u===d&&(d=(d+1)%t),p-f<e)return;const h=g&&p-g;return h?Math.round(a*1e3/h):void 0}}function _R(t,e){let n=0,r=1e3/e,u,d;const f=(b,p=Date.now())=>{n=p,u=null,d&&(clearTimeout(d),d=null),t.apply(null,b)};return[(...b)=>{const p=Date.now(),g=p-n;g>=r?f(b,p):(u=b,d||(d=setTimeout(()=>{d=null,f(u)},r-g)))},()=>u&&f(u)]}const Uc=(t,e,n=3)=>{let r=0;const u=SR(50,250);return _R(d=>{const f=d.loaded,b=d.lengthComputable?d.total:void 0,p=f-r,g=u(p),i=f<=b;r=f;const a={loaded:f,total:b,progress:b?f/b:void 0,bytes:p,rate:g||void 0,estimated:g&&b&&i?(b-f)/g:void 0,event:d,lengthComputable:b!=null,[e?"download":"upload"]:!0};t(a)},n)},Cb=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},$b=t=>(...e)=>Te.asap(()=>t(...e)),CR=Er.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Er.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Er.origin),Er.navigator&&/(msie|trident)/i.test(Er.navigator.userAgent)):()=>!0,$R=Er.hasStandardBrowserEnv?{write(t,e,n,r,u,d){const f=[t+"="+encodeURIComponent(e)];Te.isNumber(n)&&f.push("expires="+new Date(n).toGMTString()),Te.isString(r)&&f.push("path="+r),Te.isString(u)&&f.push("domain="+u),d===!0&&f.push("secure"),document.cookie=f.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 TR(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function AR(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Tb(t,e,n){let r=!TR(e);return t&&(r||n==!1)?AR(t,e):e}const Ab=t=>t instanceof ti?{...t}:t;function Fs(t,e){e=e||{};const n={};function r(g,i,a,h){return Te.isPlainObject(g)&&Te.isPlainObject(i)?Te.merge.call({caseless:h},g,i):Te.isPlainObject(i)?Te.merge({},i):Te.isArray(i)?i.slice():i}function u(g,i,a,h){if(Te.isUndefined(i)){if(!Te.isUndefined(g))return r(void 0,g,a,h)}else return r(g,i,a,h)}function d(g,i){if(!Te.isUndefined(i))return r(void 0,i)}function f(g,i){if(Te.isUndefined(i)){if(!Te.isUndefined(g))return r(void 0,g)}else return r(void 0,i)}function b(g,i,a){if(a in e)return r(g,i);if(a in t)return r(void 0,g)}const p={url:d,method:d,data:d,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,withXSRFToken:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,responseEncoding:f,validateStatus:b,headers:(g,i,a)=>u(Ab(g),Ab(i),a,!0)};return Te.forEach(Object.keys(Object.assign({},t,e)),function(g){const i=p[g]||u,a=i(t[g],e[g],g);Te.isUndefined(a)&&i!==b||(n[g]=a)}),n}const Eb=t=>{const e=Fs({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:u,xsrfCookieName:d,headers:f,auth:b}=e;e.headers=f=ti.from(f),e.url=vb(Tb(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),b&&f.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):"")));let p;if(Te.isFormData(n)){if(Er.hasStandardBrowserEnv||Er.hasStandardBrowserWebWorkerEnv)f.setContentType(void 0);else if((p=f.getContentType())!==!1){const[g,...i]=p?p.split(";").map(a=>a.trim()).filter(Boolean):[];f.setContentType([g||"multipart/form-data",...i].join("; "))}}if(Er.hasStandardBrowserEnv&&(r&&Te.isFunction(r)&&(r=r(e)),r||r!==!1&&CR(e.url))){const g=u&&d&&$R.read(d);g&&f.set(u,g)}return e},ER=typeof XMLHttpRequest<"u",RR=ER&&function(t){return new Promise(function(e,n){const r=Eb(t);let u=r.data;const d=ti.from(r.headers).normalize();let{responseType:f,onUploadProgress:b,onDownloadProgress:p}=r,g,i,a,h,c;function o(){h&&h(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let l=new XMLHttpRequest;l.open(r.method.toUpperCase(),r.url,!0),l.timeout=r.timeout;function m(){if(!l)return;const k=ti.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),R={data:!f||f==="text"||f==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:k,config:t,request:l};_b(function(T){e(T),o()},function(T){n(T),o()},R),l=null}"onloadend"in l?l.onloadend=m:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(m)},l.onabort=function(){l&&(n(new Lt("Request aborted",Lt.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new Lt("Network Error",Lt.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let k=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const R=r.transitional||wb;r.timeoutErrorMessage&&(k=r.timeoutErrorMessage),n(new Lt(k,R.clarifyTimeoutError?Lt.ETIMEDOUT:Lt.ECONNABORTED,t,l)),l=null},u===void 0&&d.setContentType(null),"setRequestHeader"in l&&Te.forEach(d.toJSON(),function(k,R){l.setRequestHeader(R,k)}),Te.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),f&&f!=="json"&&(l.responseType=r.responseType),p&&([a,c]=Uc(p,!0),l.addEventListener("progress",a)),b&&l.upload&&([i,h]=Uc(b),l.upload.addEventListener("progress",i),l.upload.addEventListener("loadend",h)),(r.cancelToken||r.signal)&&(g=k=>{l&&(n(!k||k.type?new Ca(null,t,l):k),l.abort(),l=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const w=kR(r.url);if(w&&Er.protocols.indexOf(w)===-1){n(new Lt("Unsupported protocol "+w+":",Lt.ERR_BAD_REQUEST,t));return}l.send(u||null)})},MR=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,u;const d=function(g){if(!u){u=!0,b();const i=g instanceof Error?g:this.reason;r.abort(i instanceof Lt?i:new Ca(i instanceof Error?i.message:i))}};let f=e&&setTimeout(()=>{f=null,d(new Lt(`timeout ${e} of ms exceeded`,Lt.ETIMEDOUT))},e);const b=()=>{t&&(f&&clearTimeout(f),f=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),t=null)};t.forEach(g=>g.addEventListener("abort",d));const{signal:p}=r;return p.unsubscribe=()=>Te.asap(b),p}},LR=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,u;for(;r<n;)u=r+e,yield t.slice(r,u),r=u},OR=async function*(t,e){for await(const n of IR(t))yield*LR(n,e)},IR=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Rb=(t,e,n,r)=>{const u=OR(t,e);let d=0,f,b=p=>{f||(f=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:g,value:i}=await u.next();if(g){b(),p.close();return}let a=i.byteLength;if(n){let h=d+=a;n(h)}p.enqueue(new Uint8Array(i))}catch(g){throw b(g),g}},cancel(p){return b(p),u.return()}},{highWaterMark:2})},qc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Mb=qc&&typeof ReadableStream=="function",NR=qc&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Lb=(t,...e)=>{try{return!!t(...e)}catch{return!1}},DR=Mb&&Lb(()=>{let t=!1;const e=new Request(Er.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Ob=64*1024,ep=Mb&&Lb(()=>Te.isReadableStream(new Response("").body)),Vc={stream:ep&&(t=>t.body)};qc&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Vc[e]&&(Vc[e]=Te.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Lt(`Response type '${e}' is not supported`,Lt.ERR_NOT_SUPPORT,r)})})})(new Response);const FR=async t=>{if(t==null)return 0;if(Te.isBlob(t))return t.size;if(Te.isSpecCompliantForm(t))return(await new Request(Er.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(Te.isArrayBufferView(t)||Te.isArrayBuffer(t))return t.byteLength;if(Te.isURLSearchParams(t)&&(t=t+""),Te.isString(t))return(await NR(t)).byteLength},PR=async(t,e)=>Te.toFiniteNumber(t.getContentLength())??FR(e),BR=qc&&(async t=>{let{url:e,method:n,data:r,signal:u,cancelToken:d,timeout:f,onDownloadProgress:b,onUploadProgress:p,responseType:g,headers:i,withCredentials:a="same-origin",fetchOptions:h}=Eb(t);g=g?(g+"").toLowerCase():"text";let c=MR([u,d&&d.toAbortSignal()],f),o;const l=c&&c.unsubscribe&&(()=>{c.unsubscribe()});let m;try{if(p&&DR&&n!=="get"&&n!=="head"&&(m=await PR(i,r))!==0){let S=new Request(e,{method:"POST",body:r,duplex:"half"}),x;if(Te.isFormData(r)&&(x=S.headers.get("content-type"))&&i.setContentType(x),S.body){const[M,O]=Cb(m,Uc($b(p)));r=Rb(S.body,Ob,M,O)}}Te.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;o=new Request(e,{...h,signal:c,method:n.toUpperCase(),headers:i.normalize().toJSON(),body:r,duplex:"half",credentials:w?a:void 0});let k=await fetch(o);const R=ep&&(g==="stream"||g==="response");if(ep&&(b||R&&l)){const S={};["status","statusText","headers"].forEach(F=>{S[F]=k[F]});const x=Te.toFiniteNumber(k.headers.get("content-length")),[M,O]=b&&Cb(x,Uc($b(b),!0))||[];k=new Response(Rb(k.body,Ob,M,()=>{O&&O(),l&&l()}),S)}g=g||"text";let T=await Vc[Te.findKey(Vc,g)||"text"](k,t);return!R&&l&&l(),await new Promise((S,x)=>{_b(S,x,{data:T,headers:ti.from(k.headers),status:k.status,statusText:k.statusText,config:t,request:o})})}catch(w){throw l&&l(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new Lt("Network Error",Lt.ERR_NETWORK,t,o),{cause:w.cause||w}):Lt.from(w,w&&w.code,t,o)}}),tp={http:eR,xhr:RR,fetch:BR};Te.forEach(tp,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Ib=t=>`- ${t}`,jR=t=>Te.isFunction(t)||t===null||t===!1,Nb={getAdapter:t=>{t=Te.isArray(t)?t:[t];const{length:e}=t;let n,r;const u={};for(let d=0;d<e;d++){n=t[d];let f;if(r=n,!jR(n)&&(r=tp[(f=String(n)).toLowerCase()],r===void 0))throw new Lt(`Unknown adapter '${f}'`);if(r)break;u[f||"#"+d]=r}if(!r){const d=Object.entries(u).map(([b,p])=>`adapter ${b} `+(p===!1?"is not supported by the environment":"is not available in the build"));let f=e?d.length>1?`since :
1498
+ `+d.map(Ib).join(`
1499
+ `):" "+Ib(d[0]):"as no adapter specified";throw new Lt("There is no suitable adapter to dispatch the request "+f,"ERR_NOT_SUPPORT")}return r},adapters:tp};function np(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ca(null,t)}function Db(t){return np(t),t.headers=ti.from(t.headers),t.data=Jd.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Nb.getAdapter(t.adapter||fl.adapter)(t).then(function(e){return np(t),e.data=Jd.call(t,t.transformResponse,e),e.headers=ti.from(e.headers),e},function(e){return Sb(e)||(np(t),e&&e.response&&(e.response.data=Jd.call(t,t.transformResponse,e.response),e.response.headers=ti.from(e.response.headers))),Promise.reject(e)})}const Fb="1.9.0",Kc={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Kc[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const Pb={};Kc.transitional=function(t,e,n){function r(u,d){return"[Axios v"+Fb+"] Transitional option '"+u+"'"+d+(n?". "+n:"")}return(u,d,f)=>{if(t===!1)throw new Lt(r(d," has been removed"+(e?" in "+e:"")),Lt.ERR_DEPRECATED);return e&&!Pb[d]&&(Pb[d]=!0,console.warn(r(d," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(u,d,f):!0}},Kc.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function WR(t,e,n){if(typeof t!="object")throw new Lt("options must be an object",Lt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let u=r.length;for(;u-- >0;){const d=r[u],f=e[d];if(f){const b=t[d],p=b===void 0||f(b,d,t);if(p!==!0)throw new Lt("option "+d+" must be "+p,Lt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Lt("Unknown option "+d,Lt.ERR_BAD_OPTION)}}const Gc={assertOptions:WR,validators:Kc},uo=Gc.validators;let Ps=class{constructor(e){this.defaults=e||{},this.interceptors={request:new bb,response:new bb}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let u={};Error.captureStackTrace?Error.captureStackTrace(u):u=new Error;const d=u.stack?u.stack.replace(/^.+\n/,""):"";try{r.stack?d&&!String(r.stack).endsWith(d.replace(/^.+\n.+\n/,""))&&(r.stack+=`
1500
+ `+d):r.stack=d}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Fs(this.defaults,n);const{transitional:r,paramsSerializer:u,headers:d}=n;r!==void 0&&Gc.assertOptions(r,{silentJSONParsing:uo.transitional(uo.boolean),forcedJSONParsing:uo.transitional(uo.boolean),clarifyTimeoutError:uo.transitional(uo.boolean)},!1),u!=null&&(Te.isFunction(u)?n.paramsSerializer={serialize:u}:Gc.assertOptions(u,{encode:uo.function,serialize:uo.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Gc.assertOptions(n,{baseUrl:uo.spelling("baseURL"),withXsrfToken:uo.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let f=d&&Te.merge(d.common,d[n.method]);d&&Te.forEach(["delete","get","head","post","put","patch","common"],o=>{delete d[o]}),n.headers=ti.concat(f,d);const b=[];let p=!0;this.interceptors.request.forEach(function(o){typeof o.runWhen=="function"&&o.runWhen(n)===!1||(p=p&&o.synchronous,b.unshift(o.fulfilled,o.rejected))});const g=[];this.interceptors.response.forEach(function(o){g.push(o.fulfilled,o.rejected)});let i,a=0,h;if(!p){const o=[Db.bind(this),void 0];for(o.unshift.apply(o,b),o.push.apply(o,g),h=o.length,i=Promise.resolve(n);a<h;)i=i.then(o[a++],o[a++]);return i}h=b.length;let c=n;for(a=0;a<h;){const o=b[a++],l=b[a++];try{c=o(c)}catch(m){l.call(this,m);break}}try{i=Db.call(this,c)}catch(o){return Promise.reject(o)}for(a=0,h=g.length;a<h;)i=i.then(g[a++],g[a++]);return i}getUri(e){e=Fs(this.defaults,e);const n=Tb(e.baseURL,e.url,e.allowAbsoluteUrls);return vb(n,e.params,e.paramsSerializer)}};Te.forEach(["delete","get","head","options"],function(t){Ps.prototype[t]=function(e,n){return this.request(Fs(n||{},{method:t,url:e,data:(n||{}).data}))}}),Te.forEach(["post","put","patch"],function(t){function e(n){return function(r,u,d){return this.request(Fs(d||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:u}))}}Ps.prototype[t]=e(),Ps.prototype[t+"Form"]=e(!0)});let zR=class Px{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(u){n=u});const r=this;this.promise.then(u=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](u);r._listeners=null}),this.promise.then=u=>{let d;const f=new Promise(b=>{r.subscribe(b),d=b}).then(u);return f.cancel=function(){r.unsubscribe(d)},f},e(function(u,d,f){r.reason||(r.reason=new Ca(u,d,f),n(r.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=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Px(function(n){e=n}),cancel:e}}};function HR(t){return function(e){return t.apply(null,e)}}function UR(t){return Te.isObject(t)&&t.isAxiosError===!0}const rp={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(rp).forEach(([t,e])=>{rp[e]=t});function Bb(t){const e=new Ps(t),n=rb(Ps.prototype.request,e);return Te.extend(n,Ps.prototype,e,{allOwnKeys:!0}),Te.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Bb(Fs(t,r))},n}const rr=Wi("E",Bb(fl));rr.Axios=Ps,rr.CanceledError=Ca,rr.CancelToken=zR,rr.isCancel=Sb,rr.VERSION=Fb,rr.toFormData=zc,rr.AxiosError=Lt,rr.Cancel=rr.CanceledError,rr.all=function(t){return Promise.all(t)},rr.spread=HR,rr.isAxiosError=UR,rr.mergeConfig=Fs,rr.AxiosHeaders=ti,rr.formToJSON=t=>xb(Te.isHTMLForm(t)?new FormData(t):t),rr.getAdapter=Nb.getAdapter,rr.HttpStatusCode=rp,rr.default=rr;const{Axios:oj,AxiosError:sj,CanceledError:aj,isCancel:lj,CancelToken:cj,VERSION:uj,all:hj,Cancel:dj,isAxiosError:pj,spread:fj,toFormData:gj,AxiosHeaders:mj,HttpStatusCode:yj,formToJSON:vj,getAdapter:bj,mergeConfig:wj}=rr;function jb(){return Object.assign({},la())}function qR(t,e,n){const r=Cn(t,void 0);return r.setTime(r.getTime()+e*Jl),r}function VR(t,e){const n=()=>tr(void 0,NaN),r=XR(t);let u;if(r.date){const p=QR(r.date,2);u=ZR(p.restDateString,p.year)}if(!u||isNaN(+u))return n();const d=+u;let f=0,b;if(r.time&&(f=JR(r.time),isNaN(f)))return n();if(r.timezone){if(b=eM(r.timezone),isNaN(b))return n()}else{const p=new Date(d+f),g=Cn(0,void 0);return g.setFullYear(p.getUTCFullYear(),p.getUTCMonth(),p.getUTCDate()),g.setHours(p.getUTCHours(),p.getUTCMinutes(),p.getUTCSeconds(),p.getUTCMilliseconds()),g}return Cn(d+f+b,void 0)}const Yc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},KR=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,GR=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,YR=/^([+-])(\d{2})(?::?(\d{2}))?$/;function XR(t){const e={},n=t.split(Yc.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],Yc.timeZoneDelimiter.test(e.date)&&(e.date=t.split(Yc.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const u=Yc.timezone.exec(r);u?(e.time=r.replace(u[1],""),e.timezone=u[1]):e.time=r}return e}function QR(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const u=r[1]?parseInt(r[1]):null,d=r[2]?parseInt(r[2]):null;return{year:d===null?u:d*100,restDateString:t.slice((r[1]||r[2]).length)}}function ZR(t,e){if(e===null)return new Date(NaN);const n=t.match(KR);if(!n)return new Date(NaN);const r=!!n[4],u=ml(n[1]),d=ml(n[2])-1,f=ml(n[3]),b=ml(n[4]),p=ml(n[5])-1;if(r)return oM(e,b,p)?tM(e,b,p):new Date(NaN);{const g=new Date(0);return!rM(e,d,f)||!iM(e,u)?new Date(NaN):(g.setUTCFullYear(e,d,Math.max(u,f)),g)}}function ml(t){return t?parseInt(t):1}function JR(t){const e=t.match(GR);if(!e)return NaN;const n=ip(e[1]),r=ip(e[2]),u=ip(e[3]);return sM(n,r,u)?n*ch+r*Jl+u*1e3:NaN}function ip(t){return t&&parseFloat(t.replace(",","."))||0}function eM(t){if(t==="Z")return 0;const e=t.match(YR);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),u=e[3]&&parseInt(e[3])||0;return aM(r,u)?n*(r*ch+u*Jl):NaN}function tM(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const u=r.getUTCDay()||7,d=(e-1)*7+n+1-u;return r.setUTCDate(r.getUTCDate()+d),r}const nM=[31,null,31,30,31,30,31,31,30,31,30,31];function Wb(t){return t%400===0||t%4===0&&t%100!==0}function rM(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(nM[e]||(Wb(t)?29:28))}function iM(t,e){return e>=1&&e<=(Wb(t)?366:365)}function oM(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function sM(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function aM(t,e){return e>=0&&e<=59}function lM(t,e,n){return qR(t,-e)}function zb(t,e,n){const r=jb(),u=hM(t,n.timeZone,n.locale??r.locale);return"formatToParts"in u?cM(u,e):uM(u,e)}function cM(t,e){const n=t.formatToParts(e);for(let r=n.length-1;r>=0;--r)if(n[r].type==="timeZoneName")return n[r].value}function uM(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}function hM(t,e,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:e,timeZoneName:t})}function dM(t,e){const n=yM(e);return"formatToParts"in n?fM(n,t):gM(n,t)}const pM={year:0,month:1,day:2,hour:3,minute:4,second:5};function fM(t,e){try{const n=t.formatToParts(e),r=[];for(let u=0;u<n.length;u++){const d=pM[n[u].type];d!==void 0&&(r[d]=parseInt(n[u].value,10))}return r}catch(n){if(n instanceof RangeError)return[NaN];throw n}}function gM(t,e){const n=t.format(e),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const op={},Hb=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")),mM=Hb==="06/25/2014, 00:00:00"||Hb==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function yM(t){return op[t]||(op[t]=mM?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"})),op[t]}function Ub(t,e,n,r,u,d,f){const b=new Date(0);return b.setUTCFullYear(t,e,n),b.setUTCHours(r,u,d,f),b}const qb=36e5,vM=6e4,sp={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function ap(t,e,n){if(!t)return 0;let r=sp.timezoneZ.exec(t);if(r)return 0;let u,d;if(r=sp.timezoneHH.exec(t),r)return u=parseInt(r[1],10),Vb(u)?-(u*qb):NaN;if(r=sp.timezoneHHMM.exec(t),r){u=parseInt(r[2],10);const f=parseInt(r[3],10);return Vb(u,f)?(d=Math.abs(u)*qb+f*vM,r[1]==="+"?-d:d):NaN}if(xM(t)){e=new Date(e||Date.now());const f=n?e:bM(e),b=lp(f,t);return-(n?b:wM(e,b,t))}return NaN}function bM(t){return Ub(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}function lp(t,e){const n=dM(t,e),r=Ub(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let u=t.getTime();const d=u%1e3;return u-=d>=0?d:1e3+d,r-u}function wM(t,e,n){let r=t.getTime()-e;const u=lp(new Date(r),n);if(e===u)return e;r-=u-e;const d=lp(new Date(r),n);return u===d?u:Math.max(u,d)}function Vb(t,e){return-23<=t&&t<=23&&(e==null||0<=e&&e<=59)}const Kb={};function xM(t){if(Kb[t])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:t}),Kb[t]=!0,!0}catch{return!1}}const kM=60*1e3,SM={X:function(t,e,n){const r=cp(n.timeZone,t);if(r===0)return"Z";switch(e){case"X":return Gb(r);case"XXXX":case"XX":return $a(r);case"XXXXX":case"XXX":default:return $a(r,":")}},x:function(t,e,n){const r=cp(n.timeZone,t);switch(e){case"x":return Gb(r);case"xxxx":case"xx":return $a(r);case"xxxxx":case"xxx":default:return $a(r,":")}},O:function(t,e,n){const r=cp(n.timeZone,t);switch(e){case"O":case"OO":case"OOO":return"GMT"+_M(r,":");case"OOOO":default:return"GMT"+$a(r,":")}},z:function(t,e,n){switch(e){case"z":case"zz":case"zzz":return zb("short",t,n);case"zzzz":default:return zb("long",t,n)}}};function cp(t,e){const n=t?ap(t,e,!0)/kM:(e==null?void 0:e.getTimezoneOffset())??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+t);return n}function Xc(t,e){const n=t<0?"-":"";let r=Math.abs(t).toString();for(;r.length<e;)r="0"+r;return n+r}function $a(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),u=Xc(Math.floor(r/60),2),d=Xc(Math.floor(r%60),2);return n+u+e+d}function Gb(t,e){return t%60===0?(t>0?"-":"+")+Xc(Math.abs(t)/60,2):$a(t,e)}function _M(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),u=Math.floor(r/60),d=r%60;return d===0?n+String(u):n+String(u)+e+Xc(d,2)}function Yb(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 CM=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,up=36e5,Xb=6e4,$M=2,zr={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:CM};function Qb(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?$M: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 r=TM(t),{year:u,restDateString:d}=AM(r.date,n),f=EM(d,u);if(f===null||isNaN(f.getTime()))return new Date(NaN);if(f){const b=f.getTime();let p=0,g;if(r.time&&(p=RM(r.time),p===null||isNaN(p)))return new Date(NaN);if(r.timeZone||e.timeZone){if(g=ap(r.timeZone||e.timeZone,new Date(b+p)),isNaN(g))return new Date(NaN)}else g=Yb(new Date(b+p)),g=Yb(new Date(b+p+g));return new Date(b+p+g)}else return new Date(NaN)}function TM(t){const e={};let n=zr.dateTimePattern.exec(t),r;if(n?(e.date=n[1],r=n[3]):(n=zr.datePattern.exec(t),n?(e.date=n[1],r=n[2]):(e.date=null,r=t)),r){const u=zr.timeZone.exec(r);u?(e.time=r.replace(u[1],""),e.timeZone=u[1].trim()):e.time=r}return e}function AM(t,e){if(t){const n=zr.YYY[e],r=zr.YYYYY[e];let u=zr.YYYY.exec(t)||r.exec(t);if(u){const d=u[1];return{year:parseInt(d,10),restDateString:t.slice(d.length)}}if(u=zr.YY.exec(t)||n.exec(t),u){const d=u[1];return{year:parseInt(d,10)*100,restDateString:t.slice(d.length)}}}return{year:null}}function EM(t,e){if(e===null)return null;let n,r,u;if(!t||!t.length)return n=new Date(0),n.setUTCFullYear(e),n;let d=zr.MM.exec(t);if(d)return n=new Date(0),r=parseInt(d[1],10)-1,ew(e,r)?(n.setUTCFullYear(e,r),n):new Date(NaN);if(d=zr.DDD.exec(t),d){n=new Date(0);const f=parseInt(d[1],10);return OM(e,f)?(n.setUTCFullYear(e,0,f),n):new Date(NaN)}if(d=zr.MMDD.exec(t),d){n=new Date(0),r=parseInt(d[1],10)-1;const f=parseInt(d[2],10);return ew(e,r,f)?(n.setUTCFullYear(e,r,f),n):new Date(NaN)}if(d=zr.Www.exec(t),d)return u=parseInt(d[1],10)-1,tw(u)?Zb(e,u):new Date(NaN);if(d=zr.WwwD.exec(t),d){u=parseInt(d[1],10)-1;const f=parseInt(d[2],10)-1;return tw(u,f)?Zb(e,u,f):new Date(NaN)}return null}function RM(t){let e,n,r=zr.HH.exec(t);if(r)return e=parseFloat(r[1].replace(",",".")),hp(e)?e%24*up:NaN;if(r=zr.HHMM.exec(t),r)return e=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),hp(e,n)?e%24*up+n*Xb:NaN;if(r=zr.HHMMSS.exec(t),r){e=parseInt(r[1],10),n=parseInt(r[2],10);const u=parseFloat(r[3].replace(",","."));return hp(e,n,u)?e%24*up+n*Xb+u*1e3:NaN}return null}function Zb(t,e,n){e=e||0,n=n||0;const r=new Date(0);r.setUTCFullYear(t,0,4);const u=r.getUTCDay()||7,d=e*7+n+1-u;return r.setUTCDate(r.getUTCDate()+d),r}const MM=[31,28,31,30,31,30,31,31,30,31,30,31],LM=[31,29,31,30,31,30,31,31,30,31,30,31];function Jb(t){return t%400===0||t%4===0&&t%100!==0}function ew(t,e,n){if(e<0||e>11)return!1;if(n!=null){if(n<1)return!1;const r=Jb(t);if(r&&n>LM[e]||!r&&n>MM[e])return!1}return!0}function OM(t,e){if(e<1)return!1;const n=Jb(t);return!(n&&e>366||!n&&e>365)}function tw(t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function hp(t,e,n){return!(t<0||t>=25||e!=null&&(e<0||e>=60)||n!=null&&(n<0||n>=60))}const IM=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function NM(t,e,n={}){e=String(e);const r=e.match(IM);if(r){const u=Qb(n.originalDate||t,n);e=r.reduce(function(d,f){if(f[0]==="'")return d;const b=d.indexOf(f),p=d[b-1]==="'",g=d.replace(f,"'"+SM[f[0]](u,f,n)+"'");return p?g.substring(0,b-1)+g.substring(b+1):g},e)}return _s(t,e,n)}function DM(t,e,n){t=Qb(t,n);const r=ap(e,t,!0),u=new Date(t.getTime()-r),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}function Qc(t,e,n,r){return r={...r,timeZone:e,originalDate:t},NM(DM(t,e,{timeZone:r.timeZone}),n,r)}const Zc="yyyy-MM-dd",nw="HH:mm:ss.SSS",rw="HH:mm:ss",Jc=`${Zc} ${nw}`,iw=`${Zc} ${rw}`,xj=Wi("R",{methods:{parseDateTime(t,e){return t.includes(" ")&&(t=t.replace(" ","T")),e&&e==="UTC"&&(t+="Z"),Date.parse(t)},formatUtcToLocal(t,e){return _s(!e||e==="local"?lM(t,t.getTimezoneOffset()):t,Jc)},formatDateTime(t,e){return!e||e==="local"?_s(t,Jc):Qc(t,e,Jc)},formatDateTimeHMS(t,e){return!e||e==="local"?_s(t,iw):Qc(t,e,iw)},formatDate:function(t,e){return!e||e==="local"?_s(t,Zc):Qc(t,this.timeZone,Zc)},formatTime:function(t,e,n=nw){return!e||e==="local"?_s(t,n):Qc(t,this.timeZone,n)},formatTimeHMS:function(t,e){return this.formatTime(t,e,rw)},formatTimestamp(t,e){return this.formatDateTime(VR(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 FM=Object.defineProperty,PM=(t,e,n)=>e in t?FM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,tt=(t,e,n)=>PM(t,typeof e!="symbol"?e+"":e,n);function dp(t,e,n){const r=Cn(t,n==null?void 0:n.in);return isNaN(e)?tr((n==null?void 0:n.in)||t,NaN):(e&&r.setDate(r.getDate()+e),r)}function BM(t,e){const n=Cn(t,void 0).getDay();return n===0?7:n}function jM(t,e){const n=WM(e)?new e(0):tr(e,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}function WM(t){var e;return typeof t=="function"&&((e=t.prototype)==null?void 0:e.constructor)===t}const zM=10;class ow{constructor(){tt(this,"subPriority",0)}validate(e,n){return!0}}class HM extends ow{constructor(e,n,r,u,d){super(),this.value=e,this.validateValue=n,this.setValue=r,this.priority=u,d&&(this.subPriority=d)}validate(e,n){return this.validateValue(e,this.value,n)}set(e,n,r){return this.setValue(e,n,this.value,r)}}class UM extends ow{constructor(e,n){super(),tt(this,"priority",zM),tt(this,"subPriority",-1),this.context=e||(r=>tr(n,r))}set(e,n){return n.timestampIsSet?e:tr(e,jM(e,this.context))}}class on{run(e,n,r,u){const d=this.parse(e,n,r,u);return d?{setter:new HM(d.value,this.validate,this.set,this.priority,this.subPriority),rest:d.rest}:null}validate(e,n,r){return!0}}class qM extends on{constructor(){super(...arguments),tt(this,"priority",140),tt(this,"incompatibleTokens",["R","u","t","T"])}parse(e,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"});case"GGGGG":return r.era(e,{width:"narrow"});case"GGGG":default:return r.era(e,{width:"wide"})||r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"})}}set(e,n,r){return n.era=r,e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}}const qn={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}/},ho={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 Vn(t,e){return t&&{value:e(t.value),rest:t.rest}}function Rn(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function po(t,e){const n=e.match(t);if(!n)return null;if(n[0]==="Z")return{value:0,rest:e.slice(1)};const r=n[1]==="+"?1:-1,u=n[2]?parseInt(n[2],10):0,d=n[3]?parseInt(n[3],10):0,f=n[5]?parseInt(n[5],10):0;return{value:r*(u*ch+d*Jl+f*kk),rest:e.slice(n[0].length)}}function sw(t){return Rn(qn.anyDigitsSigned,t)}function In(t,e){switch(t){case 1:return Rn(qn.singleDigit,e);case 2:return Rn(qn.twoDigits,e);case 3:return Rn(qn.threeDigits,e);case 4:return Rn(qn.fourDigits,e);default:return Rn(new RegExp("^\\d{1,"+t+"}"),e)}}function aw(t,e){switch(t){case 1:return Rn(qn.singleDigitSigned,e);case 2:return Rn(qn.twoDigitsSigned,e);case 3:return Rn(qn.threeDigitsSigned,e);case 4:return Rn(qn.fourDigitsSigned,e);default:return Rn(new RegExp("^-?\\d{1,"+t+"}"),e)}}function pp(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 lw(t,e){const n=e>0,r=n?e:1-e;let u;if(r<=50)u=t||100;else{const d=r+50,f=Math.trunc(d/100)*100,b=t>=d%100;u=t+f-(b?100:0)}return n?u:1-u}function cw(t){return t%400===0||t%4===0&&t%100!==0}class VM extends on{constructor(){super(...arguments),tt(this,"priority",130),tt(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,n,r){const u=d=>({year:d,isTwoDigitYear:n==="yy"});switch(n){case"y":return Vn(In(4,e),u);case"yo":return Vn(r.ordinalNumber(e,{unit:"year"}),u);default:return Vn(In(n.length,e),u)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r){const u=e.getFullYear();if(r.isTwoDigitYear){const f=lw(r.year,u);return e.setFullYear(f,0,1),e.setHours(0,0,0,0),e}const d=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(d,0,1),e.setHours(0,0,0,0),e}}class KM extends on{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,r){const u=d=>({year:d,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Vn(In(4,e),u);case"Yo":return Vn(r.ordinalNumber(e,{unit:"year"}),u);default:return Vn(In(n.length,e),u)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r,u){const d=hh(e,u);if(r.isTwoDigitYear){const b=lw(r.year,d);return e.setFullYear(b,0,u.firstWeekContainsDate),e.setHours(0,0,0,0),Go(e,u)}const f=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(f,0,u.firstWeekContainsDate),e.setHours(0,0,0,0),Go(e,u)}}class GM extends on{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 aw(n==="R"?4:n.length,e)}set(e,n,r){const u=tr(e,0);return u.setFullYear(r,0,4),u.setHours(0,0,0,0),ca(u)}}class YM extends on{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 aw(n==="u"?4:n.length,e)}set(e,n,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}}class XM extends on{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,r){switch(n){case"Q":case"QQ":return In(n.length,e);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(e,{width:"wide",context:"formatting"})||r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=1&&n<=4}set(e,n,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}}class QM extends on{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,r){switch(n){case"q":case"qq":return In(n.length,e);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(e,{width:"wide",context:"standalone"})||r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=1&&n<=4}set(e,n,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}}class ZM extends on{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,r){const u=d=>d-1;switch(n){case"M":return Vn(Rn(qn.month,e),u);case"MM":return Vn(In(2,e),u);case"Mo":return Vn(r.ordinalNumber(e,{unit:"month"}),u);case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(e,{width:"wide",context:"formatting"})||r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}}class JM extends on{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,r){const u=d=>d-1;switch(n){case"L":return Vn(Rn(qn.month,e),u);case"LL":return Vn(In(2,e),u);case"Lo":return Vn(r.ordinalNumber(e,{unit:"month"}),u);case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(e,{width:"wide",context:"standalone"})||r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}}function eL(t,e,n){const r=Cn(t,n==null?void 0:n.in),u=vg(r,n)-e;return r.setDate(r.getDate()-u*7),Cn(r,n==null?void 0:n.in)}class tL extends on{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,r){switch(n){case"w":return Rn(qn.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return In(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,r,u){return Go(eL(e,r,u),u)}}function nL(t,e,n){const r=Cn(t,void 0),u=yg(r)-e;return r.setDate(r.getDate()-u*7),r}class rL extends on{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,r){switch(n){case"I":return Rn(qn.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return In(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,r){return ca(nL(e,r))}}const iL=[31,28,31,30,31,30,31,31,30,31,30,31],oL=[31,29,31,30,31,30,31,31,30,31,30,31];class sL extends on{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,r){switch(n){case"d":return Rn(qn.date,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return In(n.length,e)}}validate(e,n){const r=e.getFullYear(),u=cw(r),d=e.getMonth();return u?n>=1&&n<=oL[d]:n>=1&&n<=iL[d]}set(e,n,r){return e.setDate(r),e.setHours(0,0,0,0),e}}class aL extends on{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,r){switch(n){case"D":case"DD":return Rn(qn.dayOfYear,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return In(n.length,e)}}validate(e,n){const r=e.getFullYear();return cw(r)?n>=1&&n<=366:n>=1&&n<=365}set(e,n,r){return e.setMonth(0,r),e.setHours(0,0,0,0),e}}function fp(t,e,n){var r,u,d,f;const b=la(),p=(n==null?void 0:n.weekStartsOn)??((u=(r=n==null?void 0:n.locale)==null?void 0:r.options)==null?void 0:u.weekStartsOn)??b.weekStartsOn??((f=(d=b.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??0,g=Cn(t,n==null?void 0:n.in),i=g.getDay(),a=(e%7+7)%7,h=7-p,c=e<0||e>6?e-(i+h)%7:(a+h)%7-(i+h)%7;return dp(g,c,n)}class lL extends on{constructor(){super(...arguments),tt(this,"priority",90),tt(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,u){return e=fp(e,r,u),e.setHours(0,0,0,0),e}}class cL extends on{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,r,u){const d=f=>{const b=Math.floor((f-1)/7)*7;return(f+u.weekStartsOn+6)%7+b};switch(n){case"e":case"ee":return Vn(In(n.length,e),d);case"eo":return Vn(r.ordinalNumber(e,{unit:"day"}),d);case"eee":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeeee":return r.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,u){return e=fp(e,r,u),e.setHours(0,0,0,0),e}}class uL extends on{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,r,u){const d=f=>{const b=Math.floor((f-1)/7)*7;return(f+u.weekStartsOn+6)%7+b};switch(n){case"c":case"cc":return Vn(In(n.length,e),d);case"co":return Vn(r.ordinalNumber(e,{unit:"day"}),d);case"ccc":return r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"ccccc":return r.day(e,{width:"narrow",context:"standalone"});case"cccccc":return r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(e,{width:"wide",context:"standalone"})||r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,u){return e=fp(e,r,u),e.setHours(0,0,0,0),e}}function hL(t,e,n){const r=Cn(t,void 0),u=BM(r),d=e-u;return dp(r,d,n)}class dL extends on{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,r){const u=d=>d===0?7:d;switch(n){case"i":case"ii":return In(n.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return Vn(r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),u);case"iiiii":return Vn(r.day(e,{width:"narrow",context:"formatting"}),u);case"iiiiii":return Vn(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),u);case"iiii":default:return Vn(r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),u)}}validate(e,n){return n>=1&&n<=7}set(e,n,r){return e=hL(e,r),e.setHours(0,0,0,0),e}}class pL extends on{constructor(){super(...arguments),tt(this,"priority",80),tt(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(pp(r),0,0,0),e}}class fL extends on{constructor(){super(...arguments),tt(this,"priority",80),tt(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(pp(r),0,0,0),e}}class gL extends on{constructor(){super(...arguments),tt(this,"priority",80),tt(this,"incompatibleTokens",["a","b","t","T"])}parse(e,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(pp(r),0,0,0),e}}class mL extends on{constructor(){super(...arguments),tt(this,"priority",70),tt(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,n,r){switch(n){case"h":return Rn(qn.hour12h,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return In(n.length,e)}}validate(e,n){return n>=1&&n<=12}set(e,n,r){const u=e.getHours()>=12;return u&&r<12?e.setHours(r+12,0,0,0):!u&&r===12?e.setHours(0,0,0,0):e.setHours(r,0,0,0),e}}class yL extends on{constructor(){super(...arguments),tt(this,"priority",70),tt(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,n,r){switch(n){case"H":return Rn(qn.hour23h,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return In(n.length,e)}}validate(e,n){return n>=0&&n<=23}set(e,n,r){return e.setHours(r,0,0,0),e}}class vL extends on{constructor(){super(...arguments),tt(this,"priority",70),tt(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,n,r){switch(n){case"K":return Rn(qn.hour11h,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return In(n.length,e)}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.getHours()>=12&&r<12?e.setHours(r+12,0,0,0):e.setHours(r,0,0,0),e}}class bL extends on{constructor(){super(...arguments),tt(this,"priority",70),tt(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,n,r){switch(n){case"k":return Rn(qn.hour24h,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return In(n.length,e)}}validate(e,n){return n>=1&&n<=24}set(e,n,r){const u=r<=24?r%24:r;return e.setHours(u,0,0,0),e}}class wL extends on{constructor(){super(...arguments),tt(this,"priority",60),tt(this,"incompatibleTokens",["t","T"])}parse(e,n,r){switch(n){case"m":return Rn(qn.minute,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return In(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,r){return e.setMinutes(r,0,0),e}}class xL extends on{constructor(){super(...arguments),tt(this,"priority",50),tt(this,"incompatibleTokens",["t","T"])}parse(e,n,r){switch(n){case"s":return Rn(qn.second,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return In(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,r){return e.setSeconds(r,0),e}}class kL extends on{constructor(){super(...arguments),tt(this,"priority",30),tt(this,"incompatibleTokens",["t","T"])}parse(e,n){const r=u=>Math.trunc(u*Math.pow(10,-n.length+3));return Vn(In(n.length,e),r)}set(e,n,r){return e.setMilliseconds(r),e}}class SL extends on{constructor(){super(...arguments),tt(this,"priority",10),tt(this,"incompatibleTokens",["t","T","x"])}parse(e,n){switch(n){case"X":return po(ho.basicOptionalMinutes,e);case"XX":return po(ho.basic,e);case"XXXX":return po(ho.basicOptionalSeconds,e);case"XXXXX":return po(ho.extendedOptionalSeconds,e);case"XXX":default:return po(ho.extended,e)}}set(e,n,r){return n.timestampIsSet?e:tr(e,e.getTime()-ec(e)-r)}}class _L extends on{constructor(){super(...arguments),tt(this,"priority",10),tt(this,"incompatibleTokens",["t","T","X"])}parse(e,n){switch(n){case"x":return po(ho.basicOptionalMinutes,e);case"xx":return po(ho.basic,e);case"xxxx":return po(ho.basicOptionalSeconds,e);case"xxxxx":return po(ho.extendedOptionalSeconds,e);case"xxx":default:return po(ho.extended,e)}}set(e,n,r){return n.timestampIsSet?e:tr(e,e.getTime()-ec(e)-r)}}class CL extends on{constructor(){super(...arguments),tt(this,"priority",40),tt(this,"incompatibleTokens","*")}parse(e){return sw(e)}set(e,n,r){return[tr(e,r*1e3),{timestampIsSet:!0}]}}class $L extends on{constructor(){super(...arguments),tt(this,"priority",20),tt(this,"incompatibleTokens","*")}parse(e){return sw(e)}set(e,n,r){return[tr(e,r),{timestampIsSet:!0}]}}const TL={G:new qM,y:new VM,Y:new KM,R:new GM,u:new YM,Q:new XM,q:new QM,M:new ZM,L:new JM,w:new tL,I:new rL,d:new sL,D:new aL,E:new lL,e:new cL,c:new uL,i:new dL,a:new pL,b:new fL,B:new gL,h:new mL,H:new yL,K:new vL,k:new bL,m:new wL,s:new xL,S:new kL,X:new SL,x:new _L,t:new CL,T:new $L},AL=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,EL=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,RL=/^'([^]*?)'?$/,ML=/''/g,LL=/\S/,OL=/[a-zA-Z]/;function IL(t,e,n,r){var u,d,f,b;const p=()=>tr(n,NaN),g=jb(),i=g.locale??mg,a=g.firstWeekContainsDate??((d=(u=g.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,h=g.weekStartsOn??((b=(f=g.locale)==null?void 0:f.options)==null?void 0:b.weekStartsOn)??0;if(!e)return t?p():Cn(n,void 0);const c={firstWeekContainsDate:a,weekStartsOn:h,locale:i},o=[new UM(void 0,n)],l=e.match(EL).map(T=>{const S=T[0];if(S in dh){const x=dh[S];return x(T,i.formatLong)}return T}).join("").match(AL),m=[];for(let T of l){Cg(T)&&ph(T,e,t),_g(T)&&ph(T,e,t);const S=T[0],x=TL[S];if(x){const{incompatibleTokens:M}=x;if(Array.isArray(M)){const F=m.find(L=>M.includes(L.token)||L.token===S);if(F)throw new RangeError(`The format string mustn't contain \`${F.fullToken}\` and \`${T}\` at the same time`)}else if(x.incompatibleTokens==="*"&&m.length>0)throw new RangeError(`The format string mustn't contain \`${T}\` and any other token at the same time`);m.push({token:S,fullToken:T});const O=x.run(t,T,i.match,c);if(!O)return p();o.push(O.setter),t=O.rest}else{if(S.match(OL))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(T==="''"?T="'":S==="'"&&(T=NL(T)),t.indexOf(T)===0)t=t.slice(T.length);else return p()}}if(t.length>0&&LL.test(t))return p();const w=o.map(T=>T.priority).sort((T,S)=>S-T).filter((T,S,x)=>x.indexOf(T)===S).map(T=>o.filter(S=>S.priority===T).sort((S,x)=>x.subPriority-S.subPriority)).map(T=>T[0]);let k=Cn(n,void 0);if(isNaN(+k))return p();const R={};for(const T of w){if(!T.validate(k,c))return p();const S=T.set(k,R,c);Array.isArray(S)?(k=S[0],Object.assign(R,S[1])):k=S}return k}function NL(t){return t.match(RL)[1].replace(ML,"'")}function uw(t,e){return function(){return t.apply(e,arguments)}}const{toString:DL}=Object.prototype,{getPrototypeOf:gp}=Object,{iterator:eu,toStringTag:hw}=Symbol,tu=(t=>e=>{const n=DL.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Yi=t=>(t=t.toLowerCase(),e=>tu(e)===t),nu=t=>e=>typeof e===t,{isArray:Ta}=Array,yl=nu("undefined");function FL(t){return t!==null&&!yl(t)&&t.constructor!==null&&!yl(t.constructor)&&ni(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const dw=Yi("ArrayBuffer");function PL(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&dw(t.buffer),e}const BL=nu("string"),ni=nu("function"),pw=nu("number"),ru=t=>t!==null&&typeof t=="object",jL=t=>t===!0||t===!1,iu=t=>{if(tu(t)!=="object")return!1;const e=gp(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(hw in t)&&!(eu in t)},WL=Yi("Date"),zL=Yi("File"),HL=Yi("Blob"),UL=Yi("FileList"),qL=t=>ru(t)&&ni(t.pipe),VL=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||ni(t.append)&&((e=tu(t))==="formdata"||e==="object"&&ni(t.toString)&&t.toString()==="[object FormData]"))},KL=Yi("URLSearchParams"),[GL,YL,XL,QL]=["ReadableStream","Request","Response","Headers"].map(Yi),ZL=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function vl(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,u;if(typeof t!="object"&&(t=[t]),Ta(t))for(r=0,u=t.length;r<u;r++)e.call(null,t[r],r,t);else{const d=n?Object.getOwnPropertyNames(t):Object.keys(t),f=d.length;let b;for(r=0;r<f;r++)b=d[r],e.call(null,t[b],b,t)}}function fw(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,u;for(;r-- >0;)if(u=n[r],e===u.toLowerCase())return u;return null}const Bs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,gw=t=>!yl(t)&&t!==Bs;function mp(){const{caseless:t}=gw(this)&&this||{},e={},n=(r,u)=>{const d=t&&fw(e,u)||u;iu(e[d])&&iu(r)?e[d]=mp(e[d],r):iu(r)?e[d]=mp({},r):Ta(r)?e[d]=r.slice():e[d]=r};for(let r=0,u=arguments.length;r<u;r++)arguments[r]&&vl(arguments[r],n);return e}const JL=(t,e,n,{allOwnKeys:r}={})=>(vl(e,(u,d)=>{n&&ni(u)?t[d]=uw(u,n):t[d]=u},{allOwnKeys:r}),t),eO=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),tO=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},nO=(t,e,n,r)=>{let u,d,f;const b={};if(e=e||{},t==null)return e;do{for(u=Object.getOwnPropertyNames(t),d=u.length;d-- >0;)f=u[d],(!r||r(f,t,e))&&!b[f]&&(e[f]=t[f],b[f]=!0);t=n!==!1&&gp(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},rO=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},iO=t=>{if(!t)return null;if(Ta(t))return t;let e=t.length;if(!pw(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},oO=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&gp(Uint8Array)),sO=(t,e)=>{const r=(t&&t[eu]).call(t);let u;for(;(u=r.next())&&!u.done;){const d=u.value;e.call(t,d[0],d[1])}},aO=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},lO=Yi("HTMLFormElement"),cO=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,u){return r.toUpperCase()+u}),mw=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),uO=Yi("RegExp"),yw=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};vl(n,(u,d)=>{let f;(f=e(u,d,t))!==!1&&(r[d]=f||u)}),Object.defineProperties(t,r)},hO=t=>{yw(t,(e,n)=>{if(ni(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(ni(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},dO=(t,e)=>{const n={},r=u=>{u.forEach(d=>{n[d]=!0})};return Ta(t)?r(t):r(String(t).split(e)),n},pO=()=>{},fO=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function gO(t){return!!(t&&ni(t.append)&&t[hw]==="FormData"&&t[eu])}const mO=t=>{const e=new Array(10),n=(r,u)=>{if(ru(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[u]=r;const d=Ta(r)?[]:{};return vl(r,(f,b)=>{const p=n(f,u+1);!yl(p)&&(d[b]=p)}),e[u]=void 0,d}}return r};return n(t,0)},yO=Yi("AsyncFunction"),vO=t=>t&&(ru(t)||ni(t))&&ni(t.then)&&ni(t.catch),vw=((t,e)=>t?setImmediate:e?((n,r)=>(Bs.addEventListener("message",({source:u,data:d})=>{u===Bs&&d===n&&r.length&&r.shift()()},!1),u=>{r.push(u),Bs.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ni(Bs.postMessage)),bO=typeof queueMicrotask<"u"?queueMicrotask.bind(Bs):typeof process<"u"&&process.nextTick||vw,Ae={isArray:Ta,isArrayBuffer:dw,isBuffer:FL,isFormData:VL,isArrayBufferView:PL,isString:BL,isNumber:pw,isBoolean:jL,isObject:ru,isPlainObject:iu,isReadableStream:GL,isRequest:YL,isResponse:XL,isHeaders:QL,isUndefined:yl,isDate:WL,isFile:zL,isBlob:HL,isRegExp:uO,isFunction:ni,isStream:qL,isURLSearchParams:KL,isTypedArray:oO,isFileList:UL,forEach:vl,merge:mp,extend:JL,trim:ZL,stripBOM:eO,inherits:tO,toFlatObject:nO,kindOf:tu,kindOfTest:Yi,endsWith:rO,toArray:iO,forEachEntry:sO,matchAll:aO,isHTMLForm:lO,hasOwnProperty:mw,hasOwnProp:mw,reduceDescriptors:yw,freezeMethods:hO,toObjectSet:dO,toCamelCase:cO,noop:pO,toFiniteNumber:fO,findKey:fw,global:Bs,isContextDefined:gw,isSpecCompliantForm:gO,toJSONObject:mO,isAsyncFn:yO,isThenable:vO,setImmediate:vw,asap:bO,isIterable:t=>t!=null&&ni(t[eu])};function Ot(t,e,n,r,u){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),r&&(this.request=r),u&&(this.response=u,this.status=u.status?u.status:null)}Ae.inherits(Ot,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 bw=Ot.prototype,ww={};["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=>{ww[t]={value:t}}),Object.defineProperties(Ot,ww),Object.defineProperty(bw,"isAxiosError",{value:!0}),Ot.from=(t,e,n,r,u,d)=>{const f=Object.create(bw);return Ae.toFlatObject(t,f,function(p){return p!==Error.prototype},b=>b!=="isAxiosError"),Ot.call(f,t.message,e,n,r,u),f.cause=t,f.name=t.name,d&&Object.assign(f,d),f};const wO=null;function yp(t){return Ae.isPlainObject(t)||Ae.isArray(t)}function xw(t){return Ae.endsWith(t,"[]")?t.slice(0,-2):t}function kw(t,e,n){return t?t.concat(e).map(function(u,d){return u=xw(u),!n&&d?"["+u+"]":u}).join(n?".":""):e}function xO(t){return Ae.isArray(t)&&!t.some(yp)}const kO=Ae.toFlatObject(Ae,{},null,function(e){return/^is[A-Z]/.test(e)});function ou(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,m){return!Ae.isUndefined(m[l])});const r=n.metaTokens,u=n.visitor||i,d=n.dots,f=n.indexes,p=(n.Blob||typeof Blob<"u"&&Blob)&&Ae.isSpecCompliantForm(e);if(!Ae.isFunction(u))throw new TypeError("visitor must be a function");function g(o){if(o===null)return"";if(Ae.isDate(o))return o.toISOString();if(!p&&Ae.isBlob(o))throw new Ot("Blob is not supported. Use a Buffer instead.");return Ae.isArrayBuffer(o)||Ae.isTypedArray(o)?p&&typeof Blob=="function"?new Blob([o]):Buffer.from(o):o}function i(o,l,m){let w=o;if(o&&!m&&typeof o=="object"){if(Ae.endsWith(l,"{}"))l=r?l:l.slice(0,-2),o=JSON.stringify(o);else if(Ae.isArray(o)&&xO(o)||(Ae.isFileList(o)||Ae.endsWith(l,"[]"))&&(w=Ae.toArray(o)))return l=xw(l),w.forEach(function(R,T){!(Ae.isUndefined(R)||R===null)&&e.append(f===!0?kw([l],T,d):f===null?l:l+"[]",g(R))}),!1}return yp(o)?!0:(e.append(kw(m,l,d),g(o)),!1)}const a=[],h=Object.assign(kO,{defaultVisitor:i,convertValue:g,isVisitable:yp});function c(o,l){if(!Ae.isUndefined(o)){if(a.indexOf(o)!==-1)throw Error("Circular reference detected in "+l.join("."));a.push(o),Ae.forEach(o,function(w,k){(!(Ae.isUndefined(w)||w===null)&&u.call(e,w,Ae.isString(k)?k.trim():k,l,h))===!0&&c(w,l?l.concat(k):[k])}),a.pop()}}if(!Ae.isObject(t))throw new TypeError("data must be an object");return c(t),e}function Sw(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function vp(t,e){this._pairs=[],t&&ou(t,this,e)}const _w=vp.prototype;_w.append=function(e,n){this._pairs.push([e,n])},_w.toString=function(e){const n=e?function(r){return e.call(this,r,Sw)}:Sw;return this._pairs.map(function(u){return n(u[0])+"="+n(u[1])},"").join("&")};function SO(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Cw(t,e,n){if(!e)return t;const r=n&&n.encode||SO;Ae.isFunction(n)&&(n={serialize:n});const u=n&&n.serialize;let d;if(u?d=u(e,n):d=Ae.isURLSearchParams(e)?e.toString():new vp(e,n).toString(r),d){const f=t.indexOf("#");f!==-1&&(t=t.slice(0,f)),t+=(t.indexOf("?")===-1?"?":"&")+d}return t}class $w{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.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(r){r!==null&&e(r)})}}const Tw={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},_O={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:vp,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},bp=typeof window<"u"&&typeof document<"u",wp=typeof navigator=="object"&&navigator||void 0,CO=bp&&(!wp||["ReactNative","NativeScript","NS"].indexOf(wp.product)<0),$O=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",TO=bp&&window.location.href||"http://localhost",Rr={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:bp,hasStandardBrowserEnv:CO,hasStandardBrowserWebWorkerEnv:$O,navigator:wp,origin:TO},Symbol.toStringTag,{value:"Module"})),..._O};function AO(t,e){return ou(t,new Rr.classes.URLSearchParams,Object.assign({visitor:function(n,r,u,d){return Rr.isNode&&Ae.isBuffer(n)?(this.append(r,n.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)}},e))}function EO(t){return Ae.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function RO(t){const e={},n=Object.keys(t);let r;const u=n.length;let d;for(r=0;r<u;r++)d=n[r],e[d]=t[d];return e}function Aw(t){function e(n,r,u,d){let f=n[d++];if(f==="__proto__")return!0;const b=Number.isFinite(+f),p=d>=n.length;return f=!f&&Ae.isArray(u)?u.length:f,p?(Ae.hasOwnProp(u,f)?u[f]=[u[f],r]:u[f]=r,!b):((!u[f]||!Ae.isObject(u[f]))&&(u[f]=[]),e(n,r,u[f],d)&&Ae.isArray(u[f])&&(u[f]=RO(u[f])),!b)}if(Ae.isFormData(t)&&Ae.isFunction(t.entries)){const n={};return Ae.forEachEntry(t,(r,u)=>{e(EO(r),u,n,0)}),n}return null}function MO(t,e,n){if(Ae.isString(t))try{return(e||JSON.parse)(t),Ae.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const bl={transitional:Tw,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",u=r.indexOf("application/json")>-1,d=Ae.isObject(e);if(d&&Ae.isHTMLForm(e)&&(e=new FormData(e)),Ae.isFormData(e))return u?JSON.stringify(Aw(e)):e;if(Ae.isArrayBuffer(e)||Ae.isBuffer(e)||Ae.isStream(e)||Ae.isFile(e)||Ae.isBlob(e)||Ae.isReadableStream(e))return e;if(Ae.isArrayBufferView(e))return e.buffer;if(Ae.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let b;if(d){if(r.indexOf("application/x-www-form-urlencoded")>-1)return AO(e,this.formSerializer).toString();if((b=Ae.isFileList(e))||r.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return ou(b?{"files[]":e}:e,p&&new p,this.formSerializer)}}return d||u?(n.setContentType("application/json",!1),MO(e)):e}],transformResponse:[function(e){const n=this.transitional||bl.transitional,r=n&&n.forcedJSONParsing,u=this.responseType==="json";if(Ae.isResponse(e)||Ae.isReadableStream(e))return e;if(e&&Ae.isString(e)&&(r&&!this.responseType||u)){const f=!(n&&n.silentJSONParsing)&&u;try{return JSON.parse(e)}catch(b){if(f)throw b.name==="SyntaxError"?Ot.from(b,Ot.ERR_BAD_RESPONSE,this,null,this.response):b}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Rr.classes.FormData,Blob:Rr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ae.forEach(["delete","get","head","post","put","patch"],t=>{bl.headers[t]={}});const LO=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"]),OO=t=>{const e={};let n,r,u;return t&&t.split(`
1501
+ `).forEach(function(f){u=f.indexOf(":"),n=f.substring(0,u).trim().toLowerCase(),r=f.substring(u+1).trim(),!(!n||e[n]&&LO[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Ew=Symbol("internals");function wl(t){return t&&String(t).trim().toLowerCase()}function su(t){return t===!1||t==null?t:Ae.isArray(t)?t.map(su):String(t)}function IO(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const NO=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function xp(t,e,n,r,u){if(Ae.isFunction(r))return r.call(this,e,n);if(u&&(e=n),!!Ae.isString(e)){if(Ae.isString(r))return e.indexOf(r)!==-1;if(Ae.isRegExp(r))return r.test(e)}}function DO(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function FO(t,e){const n=Ae.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(u,d,f){return this[r].call(this,e,u,d,f)},configurable:!0})})}let ri=class{constructor(e){e&&this.set(e)}set(e,n,r){const u=this;function d(b,p,g){const i=wl(p);if(!i)throw new Error("header name must be a non-empty string");const a=Ae.findKey(u,i);(!a||u[a]===void 0||g===!0||g===void 0&&u[a]!==!1)&&(u[a||p]=su(b))}const f=(b,p)=>Ae.forEach(b,(g,i)=>d(g,i,p));if(Ae.isPlainObject(e)||e instanceof this.constructor)f(e,n);else if(Ae.isString(e)&&(e=e.trim())&&!NO(e))f(OO(e),n);else if(Ae.isObject(e)&&Ae.isIterable(e)){let b={},p,g;for(const i of e){if(!Ae.isArray(i))throw TypeError("Object iterator must return a key-value pair");b[g=i[0]]=(p=b[g])?Ae.isArray(p)?[...p,i[1]]:[p,i[1]]:i[1]}f(b,n)}else e!=null&&d(n,e,r);return this}get(e,n){if(e=wl(e),e){const r=Ae.findKey(this,e);if(r){const u=this[r];if(!n)return u;if(n===!0)return IO(u);if(Ae.isFunction(n))return n.call(this,u,r);if(Ae.isRegExp(n))return n.exec(u);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=wl(e),e){const r=Ae.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||xp(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let u=!1;function d(f){if(f=wl(f),f){const b=Ae.findKey(r,f);b&&(!n||xp(r,r[b],b,n))&&(delete r[b],u=!0)}}return Ae.isArray(e)?e.forEach(d):d(e),u}clear(e){const n=Object.keys(this);let r=n.length,u=!1;for(;r--;){const d=n[r];(!e||xp(this,this[d],d,e,!0))&&(delete this[d],u=!0)}return u}normalize(e){const n=this,r={};return Ae.forEach(this,(u,d)=>{const f=Ae.findKey(r,d);if(f){n[f]=su(u),delete n[d];return}const b=e?DO(d):String(d).trim();b!==d&&delete n[d],n[b]=su(u),r[b]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return Ae.forEach(this,(r,u)=>{r!=null&&r!==!1&&(n[u]=e&&Ae.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
1502
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(u=>r.set(u)),r}static accessor(e){const r=(this[Ew]=this[Ew]={accessors:{}}).accessors,u=this.prototype;function d(f){const b=wl(f);r[b]||(FO(u,f),r[b]=!0)}return Ae.isArray(e)?e.forEach(d):d(e),this}};ri.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ae.reduceDescriptors(ri.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),Ae.freezeMethods(ri);function kp(t,e){const n=this||bl,r=e||n,u=ri.from(r.headers);let d=r.data;return Ae.forEach(t,function(b){d=b.call(n,d,u.normalize(),e?e.status:void 0)}),u.normalize(),d}function Rw(t){return!!(t&&t.__CANCEL__)}function Aa(t,e,n){Ot.call(this,t??"canceled",Ot.ERR_CANCELED,e,n),this.name="CanceledError"}Ae.inherits(Aa,Ot,{__CANCEL__:!0});function Mw(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Ot("Request failed with status code "+n.status,[Ot.ERR_BAD_REQUEST,Ot.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function PO(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function BO(t,e){t=t||10;const n=new Array(t),r=new Array(t);let u=0,d=0,f;return e=e!==void 0?e:1e3,function(p){const g=Date.now(),i=r[d];f||(f=g),n[u]=p,r[u]=g;let a=d,h=0;for(;a!==u;)h+=n[a++],a=a%t;if(u=(u+1)%t,u===d&&(d=(d+1)%t),g-f<e)return;const c=i&&g-i;return c?Math.round(h*1e3/c):void 0}}function jO(t,e){let n=0,r=1e3/e,u,d;const f=(g,i=Date.now())=>{n=i,u=null,d&&(clearTimeout(d),d=null),t.apply(null,g)};return[(...g)=>{const i=Date.now(),a=i-n;a>=r?f(g,i):(u=g,d||(d=setTimeout(()=>{d=null,f(u)},r-a)))},()=>u&&f(u)]}const au=(t,e,n=3)=>{let r=0;const u=BO(50,250);return jO(d=>{const f=d.loaded,b=d.lengthComputable?d.total:void 0,p=f-r,g=u(p),i=f<=b;r=f;const a={loaded:f,total:b,progress:b?f/b:void 0,bytes:p,rate:g||void 0,estimated:g&&b&&i?(b-f)/g:void 0,event:d,lengthComputable:b!=null,[e?"download":"upload"]:!0};t(a)},n)},Lw=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Ow=t=>(...e)=>Ae.asap(()=>t(...e)),WO=Rr.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Rr.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Rr.origin),Rr.navigator&&/(msie|trident)/i.test(Rr.navigator.userAgent)):()=>!0,zO=Rr.hasStandardBrowserEnv?{write(t,e,n,r,u,d){const f=[t+"="+encodeURIComponent(e)];Ae.isNumber(n)&&f.push("expires="+new Date(n).toGMTString()),Ae.isString(r)&&f.push("path="+r),Ae.isString(u)&&f.push("domain="+u),d===!0&&f.push("secure"),document.cookie=f.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 HO(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function UO(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Iw(t,e,n){let r=!HO(e);return t&&(r||n==!1)?UO(t,e):e}const Nw=t=>t instanceof ri?{...t}:t;function js(t,e){e=e||{};const n={};function r(g,i,a,h){return Ae.isPlainObject(g)&&Ae.isPlainObject(i)?Ae.merge.call({caseless:h},g,i):Ae.isPlainObject(i)?Ae.merge({},i):Ae.isArray(i)?i.slice():i}function u(g,i,a,h){if(Ae.isUndefined(i)){if(!Ae.isUndefined(g))return r(void 0,g,a,h)}else return r(g,i,a,h)}function d(g,i){if(!Ae.isUndefined(i))return r(void 0,i)}function f(g,i){if(Ae.isUndefined(i)){if(!Ae.isUndefined(g))return r(void 0,g)}else return r(void 0,i)}function b(g,i,a){if(a in e)return r(g,i);if(a in t)return r(void 0,g)}const p={url:d,method:d,data:d,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,withXSRFToken:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,responseEncoding:f,validateStatus:b,headers:(g,i,a)=>u(Nw(g),Nw(i),a,!0)};return Ae.forEach(Object.keys(Object.assign({},t,e)),function(i){const a=p[i]||u,h=a(t[i],e[i],i);Ae.isUndefined(h)&&a!==b||(n[i]=h)}),n}const Dw=t=>{const e=js({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:u,xsrfCookieName:d,headers:f,auth:b}=e;e.headers=f=ri.from(f),e.url=Cw(Iw(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),b&&f.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):"")));let p;if(Ae.isFormData(n)){if(Rr.hasStandardBrowserEnv||Rr.hasStandardBrowserWebWorkerEnv)f.setContentType(void 0);else if((p=f.getContentType())!==!1){const[g,...i]=p?p.split(";").map(a=>a.trim()).filter(Boolean):[];f.setContentType([g||"multipart/form-data",...i].join("; "))}}if(Rr.hasStandardBrowserEnv&&(r&&Ae.isFunction(r)&&(r=r(e)),r||r!==!1&&WO(e.url))){const g=u&&d&&zO.read(d);g&&f.set(u,g)}return e},qO=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,r){const u=Dw(t);let d=u.data;const f=ri.from(u.headers).normalize();let{responseType:b,onUploadProgress:p,onDownloadProgress:g}=u,i,a,h,c,o;function l(){c&&c(),o&&o(),u.cancelToken&&u.cancelToken.unsubscribe(i),u.signal&&u.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;m.open(u.method.toUpperCase(),u.url,!0),m.timeout=u.timeout;function w(){if(!m)return;const R=ri.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),S={data:!b||b==="text"||b==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:R,config:t,request:m};Mw(function(M){n(M),l()},function(M){r(M),l()},S),m=null}"onloadend"in m?m.onloadend=w:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(w)},m.onabort=function(){m&&(r(new Ot("Request aborted",Ot.ECONNABORTED,t,m)),m=null)},m.onerror=function(){r(new Ot("Network Error",Ot.ERR_NETWORK,t,m)),m=null},m.ontimeout=function(){let T=u.timeout?"timeout of "+u.timeout+"ms exceeded":"timeout exceeded";const S=u.transitional||Tw;u.timeoutErrorMessage&&(T=u.timeoutErrorMessage),r(new Ot(T,S.clarifyTimeoutError?Ot.ETIMEDOUT:Ot.ECONNABORTED,t,m)),m=null},d===void 0&&f.setContentType(null),"setRequestHeader"in m&&Ae.forEach(f.toJSON(),function(T,S){m.setRequestHeader(S,T)}),Ae.isUndefined(u.withCredentials)||(m.withCredentials=!!u.withCredentials),b&&b!=="json"&&(m.responseType=u.responseType),g&&([h,o]=au(g,!0),m.addEventListener("progress",h)),p&&m.upload&&([a,c]=au(p),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",c)),(u.cancelToken||u.signal)&&(i=R=>{m&&(r(!R||R.type?new Aa(null,t,m):R),m.abort(),m=null)},u.cancelToken&&u.cancelToken.subscribe(i),u.signal&&(u.signal.aborted?i():u.signal.addEventListener("abort",i)));const k=PO(u.url);if(k&&Rr.protocols.indexOf(k)===-1){r(new Ot("Unsupported protocol "+k+":",Ot.ERR_BAD_REQUEST,t));return}m.send(d||null)})},VO=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,u;const d=function(g){if(!u){u=!0,b();const i=g instanceof Error?g:this.reason;r.abort(i instanceof Ot?i:new Aa(i instanceof Error?i.message:i))}};let f=e&&setTimeout(()=>{f=null,d(new Ot(`timeout ${e} of ms exceeded`,Ot.ETIMEDOUT))},e);const b=()=>{t&&(f&&clearTimeout(f),f=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),t=null)};t.forEach(g=>g.addEventListener("abort",d));const{signal:p}=r;return p.unsubscribe=()=>Ae.asap(b),p}},KO=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,u;for(;r<n;)u=r+e,yield t.slice(r,u),r=u},GO=async function*(t,e){for await(const n of YO(t))yield*KO(n,e)},YO=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Fw=(t,e,n,r)=>{const u=GO(t,e);let d=0,f,b=p=>{f||(f=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:g,value:i}=await u.next();if(g){b(),p.close();return}let a=i.byteLength;if(n){let h=d+=a;n(h)}p.enqueue(new Uint8Array(i))}catch(g){throw b(g),g}},cancel(p){return b(p),u.return()}},{highWaterMark:2})},lu=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Pw=lu&&typeof ReadableStream=="function",XO=lu&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Bw=(t,...e)=>{try{return!!t(...e)}catch{return!1}},QO=Pw&&Bw(()=>{let t=!1;const e=new Request(Rr.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),jw=64*1024,Sp=Pw&&Bw(()=>Ae.isReadableStream(new Response("").body)),cu={stream:Sp&&(t=>t.body)};lu&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!cu[e]&&(cu[e]=Ae.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Ot(`Response type '${e}' is not supported`,Ot.ERR_NOT_SUPPORT,r)})})})(new Response);const ZO=async t=>{if(t==null)return 0;if(Ae.isBlob(t))return t.size;if(Ae.isSpecCompliantForm(t))return(await new Request(Rr.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 XO(t)).byteLength},JO=async(t,e)=>{const n=Ae.toFiniteNumber(t.getContentLength());return n??ZO(e)},_p={http:wO,xhr:qO,fetch:lu&&(async t=>{let{url:e,method:n,data:r,signal:u,cancelToken:d,timeout:f,onDownloadProgress:b,onUploadProgress:p,responseType:g,headers:i,withCredentials:a="same-origin",fetchOptions:h}=Dw(t);g=g?(g+"").toLowerCase():"text";let c=VO([u,d&&d.toAbortSignal()],f),o;const l=c&&c.unsubscribe&&(()=>{c.unsubscribe()});let m;try{if(p&&QO&&n!=="get"&&n!=="head"&&(m=await JO(i,r))!==0){let S=new Request(e,{method:"POST",body:r,duplex:"half"}),x;if(Ae.isFormData(r)&&(x=S.headers.get("content-type"))&&i.setContentType(x),S.body){const[M,O]=Lw(m,au(Ow(p)));r=Fw(S.body,jw,M,O)}}Ae.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;o=new Request(e,{...h,signal:c,method:n.toUpperCase(),headers:i.normalize().toJSON(),body:r,duplex:"half",credentials:w?a:void 0});let k=await fetch(o);const R=Sp&&(g==="stream"||g==="response");if(Sp&&(b||R&&l)){const S={};["status","statusText","headers"].forEach(F=>{S[F]=k[F]});const x=Ae.toFiniteNumber(k.headers.get("content-length")),[M,O]=b&&Lw(x,au(Ow(b),!0))||[];k=new Response(Fw(k.body,jw,M,()=>{O&&O(),l&&l()}),S)}g=g||"text";let T=await cu[Ae.findKey(cu,g)||"text"](k,t);return!R&&l&&l(),await new Promise((S,x)=>{Mw(S,x,{data:T,headers:ri.from(k.headers),status:k.status,statusText:k.statusText,config:t,request:o})})}catch(w){throw l&&l(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new Ot("Network Error",Ot.ERR_NETWORK,t,o),{cause:w.cause||w}):Ot.from(w,w&&w.code,t,o)}})};Ae.forEach(_p,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Ww=t=>`- ${t}`,eI=t=>Ae.isFunction(t)||t===null||t===!1,zw={getAdapter:t=>{t=Ae.isArray(t)?t:[t];const{length:e}=t;let n,r;const u={};for(let d=0;d<e;d++){n=t[d];let f;if(r=n,!eI(n)&&(r=_p[(f=String(n)).toLowerCase()],r===void 0))throw new Ot(`Unknown adapter '${f}'`);if(r)break;u[f||"#"+d]=r}if(!r){const d=Object.entries(u).map(([b,p])=>`adapter ${b} `+(p===!1?"is not supported by the environment":"is not available in the build"));let f=e?d.length>1?`since :
1503
+ `+d.map(Ww).join(`
1504
+ `):" "+Ww(d[0]):"as no adapter specified";throw new Ot("There is no suitable adapter to dispatch the request "+f,"ERR_NOT_SUPPORT")}return r},adapters:_p};function Cp(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Aa(null,t)}function Hw(t){return Cp(t),t.headers=ri.from(t.headers),t.data=kp.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),zw.getAdapter(t.adapter||bl.adapter)(t).then(function(r){return Cp(t),r.data=kp.call(t,t.transformResponse,r),r.headers=ri.from(r.headers),r},function(r){return Rw(r)||(Cp(t),r&&r.response&&(r.response.data=kp.call(t,t.transformResponse,r.response),r.response.headers=ri.from(r.response.headers))),Promise.reject(r)})}const Uw="1.9.0",uu={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{uu[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const qw={};uu.transitional=function(e,n,r){function u(d,f){return"[Axios v"+Uw+"] Transitional option '"+d+"'"+f+(r?". "+r:"")}return(d,f,b)=>{if(e===!1)throw new Ot(u(f," has been removed"+(n?" in "+n:"")),Ot.ERR_DEPRECATED);return n&&!qw[f]&&(qw[f]=!0,console.warn(u(f," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(d,f,b):!0}},uu.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function tI(t,e,n){if(typeof t!="object")throw new Ot("options must be an object",Ot.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let u=r.length;for(;u-- >0;){const d=r[u],f=e[d];if(f){const b=t[d],p=b===void 0||f(b,d,t);if(p!==!0)throw new Ot("option "+d+" must be "+p,Ot.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ot("Unknown option "+d,Ot.ERR_BAD_OPTION)}}const hu={assertOptions:tI,validators:uu},fo=hu.validators;let Ws=class{constructor(e){this.defaults=e||{},this.interceptors={request:new $w,response:new $w}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let u={};Error.captureStackTrace?Error.captureStackTrace(u):u=new Error;const d=u.stack?u.stack.replace(/^.+\n/,""):"";try{r.stack?d&&!String(r.stack).endsWith(d.replace(/^.+\n.+\n/,""))&&(r.stack+=`
1505
+ `+d):r.stack=d}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=js(this.defaults,n);const{transitional:r,paramsSerializer:u,headers:d}=n;r!==void 0&&hu.assertOptions(r,{silentJSONParsing:fo.transitional(fo.boolean),forcedJSONParsing:fo.transitional(fo.boolean),clarifyTimeoutError:fo.transitional(fo.boolean)},!1),u!=null&&(Ae.isFunction(u)?n.paramsSerializer={serialize:u}:hu.assertOptions(u,{encode:fo.function,serialize:fo.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),hu.assertOptions(n,{baseUrl:fo.spelling("baseURL"),withXsrfToken:fo.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let f=d&&Ae.merge(d.common,d[n.method]);d&&Ae.forEach(["delete","get","head","post","put","patch","common"],o=>{delete d[o]}),n.headers=ri.concat(f,d);const b=[];let p=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(n)===!1||(p=p&&l.synchronous,b.unshift(l.fulfilled,l.rejected))});const g=[];this.interceptors.response.forEach(function(l){g.push(l.fulfilled,l.rejected)});let i,a=0,h;if(!p){const o=[Hw.bind(this),void 0];for(o.unshift.apply(o,b),o.push.apply(o,g),h=o.length,i=Promise.resolve(n);a<h;)i=i.then(o[a++],o[a++]);return i}h=b.length;let c=n;for(a=0;a<h;){const o=b[a++],l=b[a++];try{c=o(c)}catch(m){l.call(this,m);break}}try{i=Hw.call(this,c)}catch(o){return Promise.reject(o)}for(a=0,h=g.length;a<h;)i=i.then(g[a++],g[a++]);return i}getUri(e){e=js(this.defaults,e);const n=Iw(e.baseURL,e.url,e.allowAbsoluteUrls);return Cw(n,e.params,e.paramsSerializer)}};Ae.forEach(["delete","get","head","options"],function(e){Ws.prototype[e]=function(n,r){return this.request(js(r||{},{method:e,url:n,data:(r||{}).data}))}}),Ae.forEach(["post","put","patch"],function(e){function n(r){return function(d,f,b){return this.request(js(b||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:d,data:f}))}}Ws.prototype[e]=n(),Ws.prototype[e+"Form"]=n(!0)});let nI=class Bx{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(d){n=d});const r=this;this.promise.then(u=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](u);r._listeners=null}),this.promise.then=u=>{let d;const f=new Promise(b=>{r.subscribe(b),d=b}).then(u);return f.cancel=function(){r.unsubscribe(d)},f},e(function(d,f,b){r.reason||(r.reason=new Aa(d,f,b),n(r.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=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Bx(function(u){e=u}),cancel:e}}};function rI(t){return function(n){return t.apply(null,n)}}function iI(t){return Ae.isObject(t)&&t.isAxiosError===!0}const $p={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($p).forEach(([t,e])=>{$p[e]=t});function Vw(t){const e=new Ws(t),n=uw(Ws.prototype.request,e);return Ae.extend(n,Ws.prototype,e,{allOwnKeys:!0}),Ae.extend(n,e,null,{allOwnKeys:!0}),n.create=function(u){return Vw(js(t,u))},n}const Kn=Vw(bl);Kn.Axios=Ws,Kn.CanceledError=Aa,Kn.CancelToken=nI,Kn.isCancel=Rw,Kn.VERSION=Uw,Kn.toFormData=ou,Kn.AxiosError=Ot,Kn.Cancel=Kn.CanceledError,Kn.all=function(e){return Promise.all(e)},Kn.spread=rI,Kn.isAxiosError=iI,Kn.mergeConfig=js,Kn.AxiosHeaders=ri,Kn.formToJSON=t=>Aw(Ae.isHTMLForm(t)?new FormData(t):t),Kn.getAdapter=zw.getAdapter,Kn.HttpStatusCode=$p,Kn.default=Kn;const{Axios:Ej,AxiosError:Rj,CanceledError:Mj,isCancel:Lj,CancelToken:Oj,VERSION:Ij,all:Nj,Cancel:Dj,isAxiosError:Fj,spread:Pj,toFormData:Bj,AxiosHeaders:jj,HttpStatusCode:Wj,formToJSON:zj,getAdapter:Hj,mergeConfig:Uj}=Kn,oI={components:{TopBar:fE,OutputDialog:uE},data(){return{title:"Bucket Explorer",search:"",root:"",mode:"bucket",buckets:[],volumes:[],uploadPathDialog:!1,optionsDialog:!1,refreshInterval:60,updater:null,updating:!1,path:"",file:null,files:[],showDialog:!1,dialogName:"",dialogContent:"",dialogFilename:"",sortBy:[{key:"modified",order:"desc"}],headers:[{title:"Name",value:"name",sortable:!0,nowrap:!0},{title:"Size",value:"size",sortable:!0},{title:"ModifiedDate",value:"modified",sortable:!0},{title:"Action",value:"action",align:"end",nowrap:!0}],menus:[{label:"File",items:[{label:"Options",icon:"mdi-cog",command:()=>{this.optionsDialog=!0}}]}]}},computed:{folderTotal(){return this.files.reduce((t,e)=>t+(e.size?e.size:0),0).toLocaleString()},breadcrumbPath(){const t=this.path.split("/");return t.map((e,n)=>({name:e,path:t.slice(0,n+1).join("/")+"/"}))}},watch:{file:async function(){this.file!==null&&(this.uploadFilePath=`${this.path}${this.file.name}`,this.uploadPathDialog=!0)},refreshInterval(){this.changeUpdater()}},created(){var t;if(xs.get("/openc3-api/storage/buckets").then(e=>{this.buckets=e.data}),xs.get("/openc3-api/storage/volumes").then(e=>{this.volumes=e.data}),(t=this.$route.params.path)!=null&&t.length){this.updating=!0;let e=this.$route.params.path[0].split("/");e[0]===""?(this.mode="volume",this.root=`/${e[1]}`,this.path=e.slice(2).join("/")):(this.mode="bucket",this.root=e[0],this.path=e.slice(1).join("/")),this.updateFiles()}this.changeUpdater()},beforeUnmount(){this.clearUpdater()},methods:{isText(t){if(["Rakefile","Dockerfile"].includes(t))return!0;let e=t.split(".").pop();return["txt","md","rb","py","pyi","cfg","html","js","json","info","vue","sh","bat","csv"].includes(e)},gotoPath(t){this.updating||(this.updating=!0,this.path=t,this.update())},update(){this.updating=!0,this.$router.push({name:"Bucket Explorer",params:{path:`${this.root}/${this.path}`}}),this.updateFiles()},changeUpdater(){this.clearUpdater(),this.updater=setInterval(()=>{this.root&&this.updateFiles()},this.refreshInterval*1e3)},clearUpdater(){this.updater!=null&&(clearInterval(this.updater),this.updater=null)},selectBucket(t){this.updating||(this.updating=!0,this.mode="bucket",this.root=t,this.path="",this.update())},selectVolume(t){this.updating||(this.updating=!0,this.mode="volume",this.root=t,this.path="",this.update())},backArrow(){if(this.path!==""&&!this.updating){this.updating=!0;let t=this.path.split("/");this.path=t.slice(0,t.length-2).join("/"),t.length>2&&(this.path+="/"),this.update()}},fileClick(t,{item:e}){e.icon==="mdi-folder"&&(this.updating||(this.updating=!0,this.root===""?this.root=e.name:this.path+=`${e.name}/`,this.update()))},viewFile(t){let e=this.root.toUpperCase();this.mode==="volume"&&(e=e.slice(1)),xs.get(`/openc3-api/storage/download_file/${encodeURIComponent(this.path)}${t}?${this.mode}=OPENC3_${e}_${this.mode.toUpperCase()}`).then(n=>{this.dialogName=t,this.dialogFilename=t,this.dialogContent=window.atob(n.data.contents),this.showDialog=!0})},downloadFile(t){let e=this.root.toUpperCase(),n="download";this.mode==="volume"&&(n="download_file",e=e.slice(1)),xs.get(`/openc3-api/storage/${n}/${encodeURIComponent(this.path)}${t}?${this.mode}=OPENC3_${e}_${this.mode.toUpperCase()}`).then(r=>{let u=null;if(this.mode==="bucket")u=r.data.url;else{const f=window.atob(r.data.contents),b=new Uint8Array(f.length);for(let g=0;g<f.length;++g)b[g]=f.charCodeAt(g);const p=new Blob([b]);u=URL.createObjectURL(p)}const d=document.createElement("a");d.href=u,d.setAttribute("download",t),d.click()}).catch(r=>{this.$notify.caution({title:`Unable to download file ${this.path}${t} from bucket ${this.root}`})})},async uploadFile(){this.uploadPathDialog=!1,this.uploadFilePath.startsWith("/")&&(this.uploadFilePath=this.uploadFilePath.slice(1));const{data:t}=await xs.get(`/openc3-api/storage/upload/${encodeURIComponent(this.uploadFilePath)}?bucket=OPENC3_${this.root.toUpperCase()}_BUCKET`);await Kn({...t,data:this.file}),this.file=null;let e=this.uploadFilePath.split("/");e.length>1?this.path=e.slice(0,-1).join("/")+"/":this.path="",this.updateFiles()},deleteFile(t){let e=this.root.toUpperCase();this.mode==="volume"&&(e=e.slice(1)),this.$dialog.confirm(`Are you sure you want to delete: ${t}`,{okText:"Delete",cancelText:"Cancel"}).then(n=>xs.delete(`/openc3-api/storage/delete/${encodeURIComponent(this.path)}${t}?${this.mode}=OPENC3_${e}_${this.mode.toUpperCase()}`)).then(n=>{this.updateFiles()}).catch(n=>{})},updateFiles(){let t=this.root.toUpperCase();this.mode==="volume"&&(t=t.slice(1)),xs.get(`/openc3-api/storage/files/OPENC3_${t}_${this.mode.toUpperCase()}/${this.path}`).then(e=>{this.files=e.data[0].map(n=>({name:n,icon:"mdi-folder"})),this.files=this.files.concat(e.data[1].map(n=>({name:n.name,icon:"mdi-file",size:n.size,modified:n.modified}))),this.updating=!1}).catch(({response:e})=>{var n;this.files=[],(n=e.data)!=null&&n.message?this.$notify.caution({title:e.data.message}):this.$notify.caution({title:e.message}),this.updating=!1})}}},sI={style:{"padding-left":"5px","padding-top":"5px"}},aI={key:0,style:{"padding-left":"5px"}},lI={class:".text-body-1 ma-2 font-size","data-test":"file-path"},cI=["onClick"],uI={class:"ma-2 font-size"},hI={key:0,class:"ma-2",style:{display:"flex"}},dI={class:"mx-1"},pI={class:"pa-3"};function fI(t,e,n,r,u,d){const f=Ut("top-bar"),b=Ut("v-icon"),p=Ut("v-avatar"),g=Ut("v-chip"),i=Ut("v-spacer"),a=Ut("v-text-field"),h=Ut("v-card-title"),c=Ut("v-btn"),o=Ut("v-file-input"),l=Ut("v-row"),m=Ut("v-data-table"),w=Ut("v-card"),k=Ut("v-toolbar"),R=Ut("v-card-text"),T=Ut("v-dialog"),S=Ut("output-dialog");return Zt(),Yr("div",null,[ot(f,{title:u.title,menus:u.menus},null,8,["title","menus"]),ot(w,{width:"100%"},{default:it(()=>[fr("div",sI,[e[12]||(e[12]=fr("span",{class:"ma-2 font-size"},"Buckets:",-1)),(Zt(!0),Yr(_o,null,Ko(u.buckets,(x,M)=>(Zt(),Jn(g,{key:M,variant:"elevated",color:"primary",class:"ma-2",onClick:ys(O=>d.selectBucket(x),["stop"])},{default:it(()=>[ot(p,{start:""},{default:it(()=>[ot(b,null,{default:it(()=>e[11]||(e[11]=[er("mdi-bucket")])),_:1})]),_:1}),er(" "+Br(x),1)]),_:2},1032,["onClick"]))),128))]),u.volumes.length!==0?(Zt(),Yr("div",aI,[e[14]||(e[14]=fr("span",{class:"ma-2 font-size"},"Volumes:",-1)),(Zt(!0),Yr(_o,null,Ko(u.volumes,(x,M)=>(Zt(),Jn(g,{key:M,variant:"elevated",color:"primary",class:"ma-2",onClick:ys(O=>d.selectVolume(x),["stop"])},{default:it(()=>[ot(p,{start:""},{default:it(()=>[ot(b,null,{default:it(()=>e[13]||(e[13]=[er("mdi-folder")])),_:1})]),_:1}),er(" "+Br(x),1)]),_:2},1032,["onClick"]))),128))])):so("",!0),ot(h,{class:"pt-0 d-flex align-center justify-content-space-between"},{default:it(()=>[er(Br(u.root)+" Files ",1),ot(i),ot(a,{modelValue:u.search,"onUpdate:modelValue":e[0]||(e[0]=x=>u.search=x),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search","data-test":"search-input"},null,8,["modelValue"])]),_:1}),ot(m,{"sort-by":u.sortBy,"onUpdate:sortBy":e[2]||(e[2]=x=>u.sortBy=x),headers:u.headers,items:u.files,search:u.search,"items-per-page":-1,"items-per-page-options":[10,20,50,100,-1],"multi-sort":"",density:"compact",hover:"","onClick:row":ys(d.fileClick,["stop"])},{top:it(()=>[ot(l,{class:"ma-0",style:{"background-color":"var(--color-background-surface-header)"}},{default:it(()=>[ot(c,{icon:"mdi-chevron-left-box-outline",variant:"text",density:"compact",class:"ml-3 mt-1","data-test":"be-nav-back","aria-label":"Navigate Back",onClick:ys(d.backArrow,["stop"])},null,8,["onClick"]),fr("div",lI,[(Zt(!0),Yr(_o,null,Ko(d.breadcrumbPath,(x,M)=>(Zt(),Yr("span",{key:M},[e[15]||(e[15]=er(" / ")),fr("a",{style:{cursor:"pointer"},onClick:ys(O=>d.gotoPath(x.path),["prevent"])},Br(x.name),9,cI)]))),128))]),ot(i),fr("div",uI,[er(" Folder Size: "+Br(d.folderTotal)+" ",1),e[16]||(e[16]=fr("span",{class:"small-font-size"},"(not recursive)",-1))]),ot(i),u.mode==="bucket"?(Zt(),Yr("div",hI,[e[17]||(e[17]=fr("span",{class:"font-size"},"Upload File",-1)),ot(o,{modelValue:u.file,"onUpdate:modelValue":e[1]||(e[1]=x=>u.file=x),"hide-input":"","hide-details":"",class:"mr-1 file-input","prepend-icon":"mdi-upload","data-test":"upload-file"},null,8,["modelValue"])])):so("",!0)]),_:1})]),"item.name":it(({item:x})=>[ot(b,{class:"mr-2"},{default:it(()=>[er(Br(x.icon),1)]),_:2},1024),er(" "+Br(x.name),1)]),"item.size":it(({item:x})=>[er(Br(x.size?x.size.toLocaleString():""),1)]),"item.action":it(({item:x})=>[x.icon==="mdi-file"&&d.isText(x.name)?(Zt(),Jn(c,{key:0,icon:"mdi-eye",variant:"text",density:"compact",class:"mr-3","data-test":"view-file","aria-label":"View File",onClick:M=>d.viewFile(x.name)},null,8,["onClick"])):so("",!0),x.icon==="mdi-file"?(Zt(),Jn(c,{key:1,icon:"mdi-download-box",variant:"text",density:"compact",class:"mr-3","data-test":"download-file","aria-label":"Download File",onClick:M=>d.downloadFile(x.name)},null,8,["onClick"])):so("",!0),x.icon==="mdi-file"?(Zt(),Jn(c,{key:2,icon:"mdi-delete",variant:"text",density:"compact","data-test":"delete-file","aria-label":"Delete File",onClick:M=>d.deleteFile(x.name)},null,8,["onClick"])):so("",!0)]),_:1},8,["sort-by","headers","items","search","onClick:row"])]),_:1}),ot(T,{modelValue:u.uploadPathDialog,"onUpdate:modelValue":e[5]||(e[5]=x=>u.uploadPathDialog=x),"max-width":"600"},{default:it(()=>[ot(w,null,{default:it(()=>[ot(k,{height:"24"},{default:it(()=>[ot(i),e[18]||(e[18]=fr("span",null," Upload Path ",-1)),ot(i)]),_:1}),ot(R,null,{default:it(()=>[fr("div",dI,[ot(l,{class:"my-2"},{default:it(()=>e[19]||(e[19]=[fr("span",null," This file path can be modified. New directories will be automatically created. ",-1)])),_:1}),ot(l,null,{default:it(()=>[ot(a,{modelValue:t.uploadFilePath,"onUpdate:modelValue":e[3]||(e[3]=x=>t.uploadFilePath=x),"hide-details":"",label:"File Path","data-test":"upload-file-path"},null,8,["modelValue"])]),_:1}),ot(l,{class:"mt-6"},{default:it(()=>[ot(i),ot(c,{variant:"outlined",class:"mx-2","data-test":"upload-file-cancel-btn",onClick:e[4]||(e[4]=x=>u.uploadPathDialog=!1)},{default:it(()=>e[20]||(e[20]=[er(" Cancel ")])),_:1}),ot(c,{class:"mx-2",color:"primary",type:"submit","data-test":"upload-file-submit-btn",onClick:ys(d.uploadFile,["prevent"])},{default:it(()=>e[21]||(e[21]=[er(" Upload ")])),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),ot(T,{modelValue:u.optionsDialog,"onUpdate:modelValue":e[7]||(e[7]=x=>u.optionsDialog=x),"max-width":"300",onKeydown:e[8]||(e[8]=_f(x=>u.optionsDialog=!1,["esc"]))},{default:it(()=>[ot(w,null,{default:it(()=>[ot(k,{height:"24"},{default:it(()=>[ot(i),e[22]||(e[22]=fr("span",null,"Options",-1)),ot(i)]),_:1}),ot(R,null,{default:it(()=>[fr("div",pI,[ot(a,{modelValue:u.refreshInterval,"onUpdate:modelValue":e[6]||(e[6]=x=>u.refreshInterval=x),min:"1",max:"3600",step:"100",type:"number",label:"Refresh Interval (s)","data-test":"refresh-interval"},null,8,["modelValue"])])]),_:1})]),_:1})]),_:1},8,["modelValue"]),u.showDialog?(Zt(),Jn(S,{key:0,modelValue:u.showDialog,"onUpdate:modelValue":e[9]||(e[9]=x=>u.showDialog=x),type:"File",content:u.dialogContent,name:u.dialogName,filename:u.dialogFilename,onSubmit:e[10]||(e[10]=x=>u.showDialog=!1)},null,8,["modelValue","content","name","filename"])):so("",!0)])}Wi("d",Object.freeze(Object.defineProperty({__proto__:null,default:xf(oI,[["render",fI],["__scopeId","data-v-5d442166"]])},Symbol.toStringTag,{value:"Module"})))}}});