openc3-cosmos-tool-bucketexplorer 6.4.2 → 6.5.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 (91) hide show
  1. checksums.yaml +4 -4
  2. data/tools/bucketexplorer/ArrayWidget-CC3iwyQc-eb49566847eaa53d99e3.js +2 -0
  3. data/tools/bucketexplorer/{ArrayplotWidget-BmRSuGhA-f6862ab94817045106e8.js → ArrayplotWidget-CiQdsmVy-bfe7a410cdff8ae9a86e.js} +1 -1
  4. data/tools/bucketexplorer/{BarColumn-DtYw6Gmq-1d814bd21a37f840faaf.js → BarColumn-BhjcS87D-9b18b4b8d9028cc9ea1f.js} +1 -1
  5. data/tools/bucketexplorer/{BlockWidget-Dpxbw455-2976def345e9987b8c99.js → BlockWidget-LLPHBYVU-20865226117b3524b4fe.js} +2 -2
  6. data/tools/bucketexplorer/{BucketExplorer-4dbc381406671c45daaf.js → BucketExplorer-e9ffea10ba996f7968f5.js} +37 -37
  7. data/tools/bucketexplorer/{ButtonWidget-8iOpXmpp-468476c52fb27fa48b49.js → ButtonWidget-Co0KMkIG-c5b32e1eb722360a9fe4.js} +1 -1
  8. data/tools/bucketexplorer/CanvasWidget-DPrxnI7M-e8097be368a99cc7c1bc.js +1 -0
  9. data/tools/bucketexplorer/CanvasdotWidget-s1ALDR4k-231651581f2e7a93096f.js +1 -0
  10. data/tools/bucketexplorer/{CanvasimageWidget-CFiCpITu-6b16307b98b3fe29b4a5.js → CanvasimageWidget-Cs-KjdqK-ca4686d2035f5be14197.js} +1 -1
  11. data/tools/bucketexplorer/{CanvasimagevalueWidget-fu6vbAY0-ba660812c51b02095e2e.js → CanvasimagevalueWidget-B-wBQisl-20c4d60b9a60bd687fd4.js} +1 -1
  12. data/tools/bucketexplorer/CanvaslabelWidget-CLBK52pP-1d00a2100d9f2912fe95.js +1 -0
  13. data/tools/bucketexplorer/{CanvaslabelvalueWidget-BOFa8-NU-a362de79bac15d770477.js → CanvaslabelvalueWidget-CAa70y_o-1a3e381dcce52b66a3a6.js} +1 -1
  14. data/tools/bucketexplorer/{CanvaslineWidget-l3ko0QXk-3abd111328cfa7b0065c.js → CanvaslineWidget-PdwVJOQ5-49dc67d81eaf868468e4.js} +1 -1
  15. data/tools/bucketexplorer/{CanvaslinevalueWidget-BCZoO-Z6-a250fb30e196b64458a4.js → CanvaslinevalueWidget-CKrp1f3Z-6925e485805a5a18ec22.js} +1 -1
  16. data/tools/bucketexplorer/CheckbuttonWidget-CTSfH4NN-1b827f07e14bf76b1c28.js +1 -0
  17. data/tools/bucketexplorer/ComboboxWidget-BQzv9zk5-f4f38fac65a606d0f633.js +1 -0
  18. data/tools/bucketexplorer/{DateWidget-Dggqab-F-4897c589542d0608ad6c.js → DateWidget-DKXxXT1g-d6b879d87fa8d1f2f441.js} +1 -1
  19. data/tools/bucketexplorer/{DetailsDialog-BhSAQDSK-3f42576edd917120fa8f.js → DetailsDialog-DEjAO6yp-44528e0eba9abe59f218.js} +1 -1
  20. data/tools/bucketexplorer/{DynamicWidget-CfMtj7H8-8ea1921cefc33ff13c25.js → DynamicWidget-CfMtj7H8-edc166a458351229d350.js} +1 -1
  21. data/tools/bucketexplorer/{FormatvalueWidget-B9_PbzY2-fe00d0f467eb0fb8fb9f.js → FormatvalueWidget-7Yp9jfgX-2e24441da6da1b7c9f84.js} +1 -1
  22. data/tools/bucketexplorer/{Graph-B29y4d5A-8e2cef0461e95e10d923.js → Graph-hzxapkW--a9297ba88d7a847a3c32.js} +1 -1
  23. data/tools/bucketexplorer/{GraphWidget-oBxPa3EB-755fecae748d956c2d97.js → GraphWidget-Dn0ZaxHo-28ce105ef373ff09c3c4.js} +1 -1
  24. data/tools/bucketexplorer/{HorizontalWidget-BWgZL_Oz-01a88a61ceb1a703ebaf.js → HorizontalWidget-BFzi3rMl-42fff8b2092361939c58.js} +1 -1
  25. data/tools/bucketexplorer/{HorizontalboxWidget-yMYUnNB8-6ca8ca3b60538399cc66.js → HorizontalboxWidget-DIagyace-8ab82de4824ab733aebf.js} +1 -1
  26. data/tools/bucketexplorer/HorizontallineWidget-BOZNWM3a-bac0226661186f3f1bcf.js +1 -0
  27. data/tools/bucketexplorer/{IframeWidget-DA4P_mJT-9a8205977a28ac4ff0e2.js → IframeWidget-BU24bhc2-ad743b54baf47bac52ff.js} +1 -1
  28. data/tools/bucketexplorer/{ImageLoader-rvd9t-mk-fac774da4278942b60fc.js → ImageLoader-xxDrxPAX-6c72f7990463d59e6902.js} +1 -1
  29. data/tools/bucketexplorer/ImageviewerWidget-YMA4CVsl-740455e04161df5097e7.js +1 -0
  30. data/tools/bucketexplorer/{LabelWidget-CY0saBoK-8b890a6a0da1d11f94e2.js → LabelWidget-2402SA18-8d6c144e0a2fd4afaa93.js} +1 -1
  31. data/tools/bucketexplorer/LabelledWidget-Cbubzj_g-667d7a04e47b73f9278a.js +1 -0
  32. data/tools/bucketexplorer/LabelprogressbarWidget-s8V7w6LJ-f6146d7a0fbfe3fe1e1a.js +1 -0
  33. data/tools/bucketexplorer/{LabelsparklineWidget-D_yrQrn6-8d485a4ff77f224d8021.js → LabelsparklineWidget-qbM_OXLh-7d7a5d1fc9d7c1ad7be3.js} +1 -1
  34. data/tools/bucketexplorer/LabelvalueWidget-B5Ihc2yP-d0238292267bb45c839d.js +1 -0
  35. data/tools/bucketexplorer/{LabelvaluedescWidget-3vNoH6Mc-94355300201e4c687c00.js → LabelvaluedescWidget-Cl3JHPGR-4354cc740bde65476fa6.js} +1 -1
  36. data/tools/bucketexplorer/LabelvaluelimitsbarWidget-DnpfRyHl-3b2ac0080483292f176a.js +1 -0
  37. data/tools/bucketexplorer/{LabelvaluelimitscolumnWidget-BZ6nwifg-6e16fb40a486e672112b.js → LabelvaluelimitscolumnWidget-D4L9L5oa-61d80ec7355408b3d92f.js} +1 -1
  38. data/tools/bucketexplorer/LabelvaluerangebarWidget-BivnHCbE-780b1390f392fb916fba.js +1 -0
  39. data/tools/bucketexplorer/Layout-B7KU2jmu-47f46afd9edb587e2acb.js +1 -0
  40. data/tools/bucketexplorer/{LedWidget-DSxpmIOK-7bcb0c9bb54d16552769.js → LedWidget-DpdthKEd-a36b44b2af0c1118b147.js} +1 -1
  41. data/tools/bucketexplorer/{LimitsbarWidget-BoPTdVV5-9aec81c2075aa85dac4d.js → LimitsbarWidget-CLyj3Kb--178c6ffc136d19677e25.js} +1 -1
  42. data/tools/bucketexplorer/{LimitscolorWidget-Bt3qOvrv-9fc6263422a189babdab.js → LimitscolorWidget-ChvzYoug-5978413c40891a7e38db.js} +1 -1
  43. data/tools/bucketexplorer/{LimitscolumnWidget-Ce6YnUBz-5bec46b1d174ab4dab82.js → LimitscolumnWidget-IOhsLFZ1-d1c62768956ae1346061.js} +1 -1
  44. data/tools/bucketexplorer/{LinegraphWidget-XAbg0jj2-1b7a4994ed889c49006e.js → LinegraphWidget-DZdqMqjw-939a28086716712d5958.js} +1 -1
  45. data/tools/bucketexplorer/{MatrixbycolumnsWidget-5MgJFZtz-8d55011d6030c1054002.js → MatrixbycolumnsWidget-BzGYMhJ2-c04b4f98e9bd9a004e8e.js} +1 -1
  46. data/tools/bucketexplorer/{ProgressbarWidget-CDwDOFIy-10ec10df40ff2cb7bded.js → ProgressbarWidget-Bre-0zcS-9c9931c5460ee134cadc.js} +1 -1
  47. data/tools/bucketexplorer/RadiobuttonWidget-CLbfhrkc-f967b8c3d4905a3a0e39.js +1 -0
  48. data/tools/bucketexplorer/{RadiogroupWidget-BvRnuGA2-4dd45aa3f7c5dadddf2b.js → RadiogroupWidget-DvRc70_Q-34cc318e7eda06be9ffc.js} +1 -1
  49. data/tools/bucketexplorer/{RangebarWidget-aHmgV0qs-427673617cf9a5531a35.js → RangebarWidget-BvzVWcfZ-b98f768dd9ff34657e16.js} +1 -1
  50. data/tools/bucketexplorer/{RollupWidget-D1jUPrUQ-dd1cd202441fd4c89f94.js → RollupWidget-KT243Ed8-74e8aebd86700e42793e.js} +1 -1
  51. data/tools/bucketexplorer/{ScrollwindowWidget-Cn0o3b4E-7fb731a019b673772330.js → ScrollwindowWidget-DcpdXyrP-a1945701814c80701d87.js} +1 -1
  52. data/tools/bucketexplorer/{SignalWidget-BQBzqdU--5a54888c5361f7acd19c.js → SignalWidget-CoTi0Uzy-b11b4a277a10245de254.js} +1 -1
  53. data/tools/bucketexplorer/SpacerWidget-CTekSgNO-2866af3ce98c84c7d8f2.js +1 -0
  54. data/tools/bucketexplorer/SparklineWidget-BxwPKrIr-a07db358343e06983f6c.js +1 -0
  55. data/tools/bucketexplorer/{TabbookWidget-C-aDdEoD-ff891ba581909eeb2fdb.js → TabbookWidget-B6Nx3Kmt-9679339a3b4f1597ccf4.js} +1 -1
  56. data/tools/bucketexplorer/{TextboxWidget-Dd2ccpUQ-a2e4c5aa686d7d8767de.js → TextboxWidget-DJgAfLFU-ea01c82d81b0d8f57bd4.js} +1 -1
  57. data/tools/bucketexplorer/TextfieldWidget-Bc2xGs8v-efdce12056c28c55a0c2.js +1 -0
  58. data/tools/bucketexplorer/{TimeWidget-C_site21-5fcc7d4cb8ef4d3be4c9.js → TimeWidget-DO6ZuMLO-22b61dad29d3ddc9631c.js} +1 -1
  59. data/tools/bucketexplorer/TitleWidget-CkZhMme1-4a83d2946a3ed7ea4d03.js +1 -0
  60. data/tools/bucketexplorer/{VWidget-DuUens7G-77d092546b71991b4788.js → VWidget-DzhcRBQe-b03125af287f0ca9af43.js} +1 -1
  61. data/tools/bucketexplorer/{ValueWidget-cbjxVV3B-d99969dbea88c8db89b9.js → ValueWidget-tieHz2H1-77514d901c76c233568c.js} +1 -1
  62. data/tools/bucketexplorer/ValuelimitsbarWidget-oFqxZu0t-a5f4ffb74cddc53a8567.js +1 -0
  63. data/tools/bucketexplorer/{ValuelimitscolumnWidget-BBTuSCK9-b43377a4f673cfd911b5.js → ValuelimitscolumnWidget-DYBv8POg-3b87704cac9f02f72c41.js} +1 -1
  64. data/tools/bucketexplorer/{ValuerangebarWidget-Ct7iGtu0-43c52835e0320214aba5.js → ValuerangebarWidget-m3gFyG4v-eaf03cf8f36a7e1a2d45.js} +1 -1
  65. data/tools/bucketexplorer/{VerticalWidget-DJn02myf-1888ea9527fa57a21775.js → VerticalWidget-CcdRZmQK-6741c2c5ac3d10a8f624.js} +1 -1
  66. data/tools/bucketexplorer/VerticalboxWidget-DfsCYhrX-47cb15eb6e128c511a86.js +1 -0
  67. data/tools/bucketexplorer/{Widget-CP2CtyUr-f41e11f75a3d25b0b95c.js → Widget-B5HKasz2-ed6f5757bb72647e8abd.js} +1 -1
  68. data/tools/bucketexplorer/{main-a09e44869aaec5ab5bef.js → main-bd874d2de6d4cc23822a.js} +1 -1
  69. data/tools/bucketexplorer/main.js +1 -1
  70. metadata +68 -68
  71. data/tools/bucketexplorer/ArrayWidget-D0fKsdTb-a926546df7a4518ee3b6.js +0 -2
  72. data/tools/bucketexplorer/CanvasWidget-B0iU38rA-99d1a412388b9554d961.js +0 -1
  73. data/tools/bucketexplorer/CanvasdotWidget-C9viSVBs-1a7994467cc2c1404927.js +0 -1
  74. data/tools/bucketexplorer/CanvaslabelWidget-BVqHq3Vp-80a49fd7d2a810a03033.js +0 -1
  75. data/tools/bucketexplorer/CheckbuttonWidget-BN7e1d5b-a0e7fe73990645fea111.js +0 -1
  76. data/tools/bucketexplorer/ComboboxWidget-Bb5RGXDB-4f7040b69b2ee7b49031.js +0 -1
  77. data/tools/bucketexplorer/HorizontallineWidget-C4zMx7z2-87ac2e29a2ee0c96284b.js +0 -1
  78. data/tools/bucketexplorer/ImageviewerWidget-B1wK0hK4-81c24c87b26333d4e02e.js +0 -1
  79. data/tools/bucketexplorer/LabelledWidget-B3ZOYaGy-4b8f9db56d64f4c48c3c.js +0 -1
  80. data/tools/bucketexplorer/LabelprogressbarWidget-CmXcESTg-b5ff18b3646a9db1dcb5.js +0 -1
  81. data/tools/bucketexplorer/LabelvalueWidget-dNaNfsBE-cca505a4e4b57eef4f9c.js +0 -1
  82. data/tools/bucketexplorer/LabelvaluelimitsbarWidget-7VppYVIN-61aedef34abaa830da5d.js +0 -1
  83. data/tools/bucketexplorer/LabelvaluerangebarWidget-IyuXLNsw-82772ab9dddcb0adb147.js +0 -1
  84. data/tools/bucketexplorer/Layout-BqMhhhws-5ea986c1715e3dd0ffc2.js +0 -1
  85. data/tools/bucketexplorer/RadiobuttonWidget-cQ8V8LaD-de5541f59874a828fc5a.js +0 -1
  86. data/tools/bucketexplorer/SpacerWidget-C0RmQY3t-52dc81b065547eb3e07b.js +0 -1
  87. data/tools/bucketexplorer/SparklineWidget-BTH9rvcX-7e09d97155b1e7881489.js +0 -1
  88. data/tools/bucketexplorer/TextfieldWidget-DY3aFTnP-3c23a66c961d295c9df0.js +0 -1
  89. data/tools/bucketexplorer/TitleWidget-Bx81VfQD-60b8b3c39f30cc7fe91b.js +0 -1
  90. data/tools/bucketexplorer/ValuelimitsbarWidget-cQb2o_xH-cf7ca46e373c950e2936.js +0 -1
  91. data/tools/bucketexplorer/VerticalboxWidget-DHQMxtF3-c2ff040dfcf2ae7a0fa4.js +0 -1
@@ -1,10 +1,10 @@
1
- System.register(["./main-a09e44869aaec5ab5bef.js","vue","single-spa"],function(Wi,ut){"use strict";var lt,Ku,xf,kf,Ut,Jn,Zt,it,ot,fr,Br,er,Sf,Yr,_o,Ko,Gu,Yu,so,Xu,ys,_f;return{setters:[yn=>{lt=yn._,Ku=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,Gu=yn.mergeProps,Yu=yn.createSlots,so=yn.createCommentVNode,Xu=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:Qu}=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=Qu(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),p=d.length;let b;for(r=0;r<p;r++)b=d[r],e.call(null,t[b],b,t)}}function Mf(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,Rf=t=>!qa(t)&&t!==vs;function Zu(){const{caseless:t}=Rf(this)&&this||{},e={},n=(r,u)=>{const d=t&&Mf(e,u)||u;Ul(e[d])&&Ul(r)?e[d]=Zu(e[d],r):Ul(r)?e[d]=Zu({},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,p;const b={};if(e=e||{},t==null)return e;do{for(u=Object.getOwnPropertyNames(t),d=u.length;d-- >0;)p=u[d],(!r||r(p,t,e))&&!b[p]&&(e[p]=t[p],b[p]=!0);t=n!==!1&&Qu(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"&&Qu(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 p;(p=e(u,d,t))!==!1&&(r[d]=p||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,(p,b)=>{const f=n(p,u+1);!qa(f)&&(d[b]=f)}),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:Zu,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:Mf,global:vs,isContextDefined:Rf,isSpecCompliantForm:x1,toJSONObject:k1,isAsyncFn:S1,isThenable:_1,setImmediate:If,asap:C1,isIterable:$1};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)}Ce.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:Ce.toJSONObject(this.config),code:this.code,status:this.status}}});const Nf=Mt.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(Mt,Df),Object.defineProperty(Nf,"isAxiosError",{value:!0}),Mt.from=(t,e,n,r,u,d)=>{const p=Object.create(Nf);return Ce.toFlatObject(t,p,function(b){return b!==Error.prototype},b=>b!=="isAxiosError"),Mt.call(p,t.message,e,n,r,u),p.cause=t,p.name=t.name,d&&Object.assign(p,d),p};const T1=null;function Ju(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(Ju)}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,p=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 f(c){if(c===null)return"";if(Ce.isDate(c))return c.toISOString();if(!b&&Ce.isBlob(c))throw new Mt("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(p===!0?Pf([o],k,d):p===null?o:o+"[]",f(w))}),!1}return Ju(c)?!0:(e.append(Pf(l,o,d),f(c)),!1)}const i=[],a=Object.assign(E1,{defaultVisitor:g,convertValue:f,isVisitable:Ju});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 eh(t,e){this._pairs=[],t&&ql(t,this,e)}const jf=eh.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 M1(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||M1;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 eh(e,n).toString(r),d){const p=t.indexOf("#");p!==-1&&(t=t.slice(0,p)),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},R1=typeof URLSearchParams<"u"?URLSearchParams:eh,L1=typeof FormData<"u"?FormData:null,O1=typeof Blob<"u"?Blob:null,I1={isBrowser:!0,classes:{URLSearchParams:R1,FormData:L1,Blob:O1},protocols:["http","https","file","blob","url","data"]},th=typeof window<"u"&&typeof document<"u",nh=typeof navigator=="object"&&navigator||void 0,N1=th&&(!nh||["ReactNative","NativeScript","NS"].indexOf(nh.product)<0),D1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",F1=th&&window.location.href||"http://localhost",P1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:th,hasStandardBrowserEnv:N1,hasStandardBrowserWebWorkerEnv:D1,navigator:nh,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 p=n[d++];if(p==="__proto__")return!0;const b=Number.isFinite(+p),f=d>=n.length;return p=!p&&Ce.isArray(u)?u.length:p,f?(Ce.hasOwnProp(u,p)?u[p]=[u[p],r]:u[p]=r,!b):((!u[p]||!Ce.isObject(u[p]))&&(u[p]=[]),e(n,r,u[p],d)&&Ce.isArray(u[p])&&(u[p]=W1(u[p])),!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 p=this.env&&this.env.FormData;return ql(d?{"files[]":t}:t,p&&new p,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"?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:$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(`
1
+ System.register(["./main-bd874d2de6d4cc23822a.js","vue","single-spa"],function(Wi,ut){"use strict";var lt,Ku,xf,kf,Ut,er,Zt,it,ot,gr,Br,tr,Sf,Yr,_o,Ko,Gu,Yu,so,Xu,ys,_f;return{setters:[vn=>{lt=vn._,Ku=vn.d,xf=vn.a},vn=>{kf=vn.defineAsyncComponent,Ut=vn.resolveComponent,er=vn.createBlock,Zt=vn.openBlock,it=vn.withCtx,ot=vn.createVNode,gr=vn.createElementVNode,Br=vn.toDisplayString,tr=vn.createTextVNode,Sf=vn.Teleport,Yr=vn.createElementBlock,_o=vn.Fragment,Ko=vn.renderList,Gu=vn.mergeProps,Yu=vn.createSlots,so=vn.createCommentVNode,Xu=vn.normalizeStyle,ys=vn.withModifiers,_f=vn.withKeys},null],execute:function(){var vn=document.createElement("style");vn.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(vn),Wi({$:gg,c:IL,l:$n,m:Ar,y:nr,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:Qu}=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=Qu(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),p=d.length;let b;for(r=0;r<p;r++)b=d[r],e.call(null,t[b],b,t)}}function Mf(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,Rf=t=>!qa(t)&&t!==vs;function Zu(){const{caseless:t}=Rf(this)&&this||{},e={},n=(r,u)=>{const d=t&&Mf(e,u)||u;Ul(e[d])&&Ul(r)?e[d]=Zu(e[d],r):Ul(r)?e[d]=Zu({},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,p;const b={};if(e=e||{},t==null)return e;do{for(u=Object.getOwnPropertyNames(t),d=u.length;d-- >0;)p=u[d],(!r||r(p,t,e))&&!b[p]&&(e[p]=t[p],b[p]=!0);t=n!==!1&&Qu(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"&&Qu(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 p;(p=e(u,d,t))!==!1&&(r[d]=p||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,(p,b)=>{const f=n(p,u+1);!qa(f)&&(d[b]=f)}),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:Zu,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:Mf,global:vs,isContextDefined:Rf,isSpecCompliantForm:x1,toJSONObject:k1,isAsyncFn:S1,isThenable:_1,setImmediate:If,asap:C1,isIterable:$1};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)}Ce.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:Ce.toJSONObject(this.config),code:this.code,status:this.status}}});const Nf=Mt.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(Mt,Df),Object.defineProperty(Nf,"isAxiosError",{value:!0}),Mt.from=(t,e,n,r,u,d)=>{const p=Object.create(Nf);return Ce.toFlatObject(t,p,function(b){return b!==Error.prototype},b=>b!=="isAxiosError"),Mt.call(p,t.message,e,n,r,u),p.cause=t,p.name=t.name,d&&Object.assign(p,d),p};const T1=null;function Ju(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(Ju)}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,p=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 f(c){if(c===null)return"";if(Ce.isDate(c))return c.toISOString();if(!b&&Ce.isBlob(c))throw new Mt("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(p===!0?Pf([o],k,d):p===null?o:o+"[]",f(w))}),!1}return Ju(c)?!0:(e.append(Pf(l,o,d),f(c)),!1)}const i=[],a=Object.assign(E1,{defaultVisitor:g,convertValue:f,isVisitable:Ju});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 eh(t,e){this._pairs=[],t&&ql(t,this,e)}const jf=eh.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 M1(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||M1;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 eh(e,n).toString(r),d){const p=t.indexOf("#");p!==-1&&(t=t.slice(0,p)),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},R1=typeof URLSearchParams<"u"?URLSearchParams:eh,L1=typeof FormData<"u"?FormData:null,O1=typeof Blob<"u"?Blob:null,I1={isBrowser:!0,classes:{URLSearchParams:R1,FormData:L1,Blob:O1},protocols:["http","https","file","blob","url","data"]},th=typeof window<"u"&&typeof document<"u",nh=typeof navigator=="object"&&navigator||void 0,N1=th&&(!nh||["ReactNative","NativeScript","NS"].indexOf(nh.product)<0),D1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",F1=th&&window.location.href||"http://localhost",P1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:th,hasStandardBrowserEnv:N1,hasStandardBrowserWebWorkerEnv:D1,navigator:nh,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 p=n[d++];if(p==="__proto__")return!0;const b=Number.isFinite(+p),f=d>=n.length;return p=!p&&Ce.isArray(u)?u.length:p,f?(Ce.hasOwnProp(u,p)?u[p]=[u[p],r]:u[p]=r,!b):((!u[p]||!Ce.isObject(u[p]))&&(u[p]=[]),e(n,r,u[p],d)&&Ce.isArray(u[p])&&(u[p]=W1(u[p])),!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 p=this.env&&this.env.FormData;return ql(d?{"files[]":t}:t,p&&new p,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"?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:$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
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 rh(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,p){return this[r].call(this,e,u,d,p)},configurable:!0})})}let Qr=class{constructor(e){e&&this.set(e)}set(e,n,r){const u=this;function d(b,f,g){const i=Ga(f);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||f]=Vl(b))}const p=(b,f)=>Ce.forEach(b,(g,i)=>d(g,i,f));if(Ce.isPlainObject(e)||e instanceof this.constructor)p(e,n);else if(Ce.isString(e)&&(e=e.trim())&&!V1(e))p(U1(e),n);else if(Ce.isObject(e)&&Ce.isIterable(e)){let b={},f,g;for(const i of e){if(!Ce.isArray(i))throw TypeError("Object iterator must return a key-value pair");b[g=i[0]]=(f=b[g])?Ce.isArray(f)?[...f,i[1]]:[f,i[1]]:i[1]}p(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||rh(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let u=!1;function d(p){if(p=Ga(p),p){const b=Ce.findKey(r,p);b&&(!n||rh(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||rh(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 p=Ce.findKey(r,d);if(p){n[p]=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
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 p=Ga(d);n[p]||(G1(r,d),n[p]=!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 ih(t,e){const n=this||Ka,r=e||n,u=Qr.from(r.headers);let d=r.data;return Ce.forEach(t,function(p){d=p.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){Mt.call(this,t??"canceled",Mt.ERR_CANCELED,e,n),this.name="CanceledError"}Ce.inherits(aa,Mt,{__CANCEL__:!0});function Kf(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 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,p;return e=e!==void 0?e:1e3,function(b){const f=Date.now(),g=r[d];p||(p=f),n[u]=b,r[u]=f;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),f-p<e)return;const h=g&&f-g;return h?Math.round(a*1e3/h):void 0}}function Q1(t,e){let n=0,r=1e3/e,u,d;const p=(b,f=Date.now())=>{n=f,u=null,d&&(clearTimeout(d),d=null),t.apply(null,b)};return[(...b)=>{const f=Date.now(),g=f-n;g>=r?p(b,f):(u=b,d||(d=setTimeout(()=>{d=null,p(u)},r-g)))},()=>u&&p(u)]}const Kl=(t,e,n=3)=>{let r=0;const u=X1(50,250);return Q1(d=>{const p=d.loaded,b=d.lengthComputable?d.total:void 0,f=p-r,g=u(f),i=p<=b;r=p;const a={loaded:p,total:b,progress:b?p/b:void 0,bytes:f,rate:g||void 0,estimated:g&&b&&i?(b-p)/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 p=[t+"="+encodeURIComponent(e)];Ce.isNumber(n)&&p.push("expires="+new Date(n).toGMTString()),Ce.isString(r)&&p.push("path="+r),Ce.isString(u)&&p.push("domain="+u),d===!0&&p.push("secure"),document.cookie=p.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 p(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 f={url:d,method:d,data:d,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,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=f[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:p,auth:b}=e;e.headers=p=Qr.from(p),e.url=Wf(Xf(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),b&&p.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):"")));let f;if(Ce.isFormData(n)){if($r.hasStandardBrowserEnv||$r.hasStandardBrowserWebWorkerEnv)p.setContentType(void 0);else if((f=p.getContentType())!==!1){const[g,...i]=f?f.split(";").map(a=>a.trim()).filter(Boolean):[];p.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&&p.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:p,onUploadProgress:b,onDownloadProgress:f}=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()),M={data:!p||p==="text"||p==="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()},M),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 M=r.transitional||Hf;r.timeoutErrorMessage&&(k=r.timeoutErrorMessage),n(new Mt(k,M.clarifyTimeoutError?Mt.ETIMEDOUT:Mt.ECONNABORTED,t,l)),l=null},u===void 0&&d.setContentType(null),"setRequestHeader"in l&&Ce.forEach(d.toJSON(),function(k,M){l.setRequestHeader(M,k)}),Ce.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),p&&p!=="json"&&(l.responseType=r.responseType),f&&([a,c]=Kl(f,!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 Mt("Unsupported protocol "+w+":",Mt.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 Mt?i:new aa(i instanceof Error?i.message:i))}};let p=e&&setTimeout(()=>{p=null,d(new Mt(`timeout ${e} of ms exceeded`,Mt.ETIMEDOUT))},e);const b=()=>{t&&(p&&clearTimeout(p),p=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),t=null)};t.forEach(g=>g.addEventListener("abort",d));const{signal:f}=r;return f.unsubscribe=()=>Ce.asap(b),f}},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,p,b=f=>{p||(p=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:g,value:i}=await u.next();if(g){b(),f.close();return}let a=i.byteLength;if(n){let h=d+=a;n(h)}f.enqueue(new Uint8Array(i))}catch(g){throw b(g),g}},cancel(f){return b(f),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,oh=eg&&tg(()=>Ce.isReadableStream(new Response("").body)),Yl={stream:oh&&(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 Mt(`Response type '${e}' is not supported`,Mt.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:p,onDownloadProgress:b,onUploadProgress:f,responseType:g,headers:i,withCredentials:a="same-origin",fetchOptions:h}=Zf(t);g=g?(g+"").toLowerCase():"text";let c=ik([u,d&&d.toAbortSignal()],p),o;const l=c&&c.unsubscribe&&(()=>{c.unsubscribe()});let m;try{if(f&&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[R,O]=Gf(m,Kl(Yf(f)));r=Jf(S.body,ng,R,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 M=oh&&(g==="stream"||g==="response");if(oh&&(b||M&&l)){const S={};["status","statusText","headers"].forEach(F=>{S[F]=k[F]});const x=Ce.toFiniteNumber(k.headers.get("content-length")),[R,O]=b&&Gf(x,Kl(Yf(b),!0))||[];k=new Response(Jf(k.body,ng,R,()=>{O&&O(),l&&l()}),S)}g=g||"text";let T=await Yl[Ce.findKey(Yl,g)||"text"](k,t);return!M&&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 Mt("Network Error",Mt.ERR_NETWORK,t,o),{cause:w.cause||w}):Mt.from(w,w&&w.code,t,o)}}),sh={http:T1,xhr:rk,fetch:dk};Ce.forEach(sh,(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 p;if(r=n,!pk(n)&&(r=sh[(p=String(n)).toLowerCase()],r===void 0))throw new Mt(`Unknown adapter '${p}'`);if(r)break;u[p||"#"+d]=r}if(!r){const d=Object.entries(u).map(([b,f])=>`adapter ${b} `+(f===!1?"is not supported by the environment":"is not available in the build"));let p=e?d.length>1?`since :
5
5
  `+d.map(rg).join(`
6
6
  `):" "+rg(d[0]):"as no adapter specified";throw new Mt("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return r},adapters:sh};function ah(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new aa(null,t)}function og(t){return ah(t),t.headers=Qr.from(t.headers),t.data=ih.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 ah(t),e.data=ih.call(t,t.transformResponse,e),e.headers=Qr.from(e.headers),e},function(e){return Vf(e)||(ah(t),e&&e.response&&(e.response.data=ih.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,p)=>{if(t===!1)throw new Mt(r(d," has been removed"+(e?" in "+e:"")),Mt.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,p):!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 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],p=e[d];if(p){const b=t[d],f=b===void 0||p(b,d,t);if(f!==!0)throw new Mt("option "+d+" must be "+f,Mt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Mt("Unknown option "+d,Mt.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 p=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(p,d);const b=[];let f=!0;this.interceptors.request.forEach(function(o){typeof o.runWhen=="function"&&o.runWhen(n)===!1||(f=f&&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(!f){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 p=new Promise(b=>{r.subscribe(b),d=b}).then(u);return p.cancel=function(){r.unsubscribe(d)},p},e(function(u,d,p){r.reason||(r.reason=new aa(u,d,p),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 lh={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(lh).forEach(([t,e])=>{lh[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=Mt,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=lh,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:MB,AxiosHeaders:RB,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,p,b,f,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=(p=t.response)==null?void 0:p.data)!=null&&b.exception?h+=`${t.response.data.exception}`:(i=(g=(f=t.response)==null?void 0:f.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:p=!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,!p&&!r.scope&&(r.scope=window.openc3Scope),cg({method:t,url:e,data:n,params:r,headers:u,onUploadProgress:b})},ch={Accept:"application/json"},ug={...ch,"Content-Type":"application/json"},xs={get:function(t,{params:e,headers:n=ch,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:p}={}){return Zl("put",t,{data:e,params:n,headers:r,noScope:u,noAuth:d,onUploadProgress:p})},post:function(t,{data:e,params:n,headers:r=ug,noScope:u,noAuth:d,onUploadProgress:p}={}){return Zl("post",t,{data:e,params:n,headers:r,noScope:u,noAuth:d,onUploadProgress:p})},delete:function(t,{params:e,headers:n=ch,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,uh=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 p=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)??p.weekStartsOn??((d=(u=p.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,f=Cn(t,e==null?void 0:e.in),g=f.getDay(),i=(g<b?7:0)+g-b;return f.setDate(f.getDate()-i),f.setHours(0,0,0,0),f}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),p=tr(n,0);p.setFullYear(r,0,4),p.setHours(0,0,0,0);const b=ca(p);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),p=fg(u),b=+d-ec(d),f=+p-ec(p);return Math.round((b-f)/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"}},Mk=(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 hh(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const Rk={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:hh({formats:Rk,defaultWidth:"full"}),time:hh({formats:Lk,defaultWidth:"full"}),dateTime:hh({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 p=t.defaultFormattingWidth||t.defaultWidth,b=n!=null&&n.width?String(n.width):p;u=t.formattingValues[b]||t.formattingValues[p]}else{const p=t.defaultWidth,b=n!=null&&n.width?String(n.width):t.defaultWidth;u=t.values[b]||t.values[p]}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 p=d[0],b=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],f=Array.isArray(b)?Vk(b,a=>a.test(p)):qk(b,a=>a.test(p));let g;g=t.valueCallback?t.valueCallback(f):f,g=n.valueCallback?n.valueCallback(g):g;const i=e.slice(p.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 p=t.valueCallback?t.valueCallback(d[0]):d[0];p=n.valueCallback?n.valueCallback(p):p;const b=e.slice(u.length);return{value:p,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:Mk,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 dh(t,e){var n,r,u,d;const p=Cn(t,e==null?void 0:e.in),b=p.getFullYear(),f=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)??f.firstWeekContainsDate??((d=(u=f.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+p>=+a?b+1:+p>=+c?b:b-1}function lS(t,e){var n,r,u,d;const p=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)??p.firstWeekContainsDate??((d=(u=p.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,f=dh(t,e),g=tr((e==null?void 0:e.in)||t,0);return g.setFullYear(f,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=dh(t,r),d=u>0?u:1-u;if(e==="YY"){const p=d%100;return hn(p,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))},ph={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 fh(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,p,b,f,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??((p=(d=a.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??1,o=(n==null?void 0:n.weekStartsOn)??((f=(b=n==null?void 0:n.locale)==null?void 0:b.options)==null?void 0:f.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 M=k[0];if(M==="p"||M==="P"){const T=ph[M];return T(k,h.formatLong)}return k}).join("").match(fS).map(k=>{if(k==="''")return{isToken:!1,value:"'"};const M=k[0];if(M==="'")return{isToken:!1,value:bS(k)};if(bg[M])return{isToken:!0,value:k};if(M.match(vS))throw new RangeError("Format string contains an unescaped latin alphabet character `"+M+"`");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 M=k.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Cg(M)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&_g(M))&&fh(M,e,String(t));const T=bg[M[0]];return T(l,M,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=f(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=f(i,a[l]);if(w==null&&p.original)return;o.push(w)}return h&&h.apply(null,o)||!0}},p=function(i,a){var h=d("",i,a);return h==null&&p.original?p.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},f=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)&&(p.original=a.require,a.require=p,a.require.packaged=!0)}g(n)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(n,r,u){function d(p,b,f){Object.defineProperty(p,b,{value:f,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||d(String.prototype,"startsWith",function(p,b){return b=b||0,this.lastIndexOf(p,b)===b}),String.prototype.endsWith||d(String.prototype,"endsWith",function(p,b){var f=this;(b===void 0||b>f.length)&&(b=f.length),b-=p.length;var g=f.indexOf(p,b);return g!==-1&&g===b}),String.prototype.repeat||d(String.prototype,"repeat",function(p){for(var b="",f=this;p>0;)p&1&&(b+=f),(p>>=1)&&(f+=f);return b}),String.prototype.includes||d(String.prototype,"includes",function(p,b){return this.indexOf(p,b)!=-1}),Object.assign||(Object.assign=function(p){if(p==null)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(p),f=1;f<arguments.length;f++){var g=arguments[f];g!=null&&Object.keys(g).forEach(function(i){b[i]=g[i]})}return b}),Object.values||(Object.values=function(p){return Object.keys(p).map(function(b){return p[b]})}),Array.prototype.find||d(Array.prototype,"find",function(p){for(var b=this.length,f=arguments[1],g=0;g<b;g++){var i=this[g];if(p.call(f,i,g,this))return i}}),Array.prototype.findIndex||d(Array.prototype,"findIndex",function(p){for(var b=this.length,f=arguments[1],g=0;g<b;g++){var i=this[g];if(p.call(f,i,g,this))return g}}),Array.prototype.includes||d(Array.prototype,"includes",function(p,b){return this.indexOf(p,b)!=-1}),Array.prototype.fill||d(Array.prototype,"fill",function(p){for(var b=this,f=b.length>>>0,g=arguments[1],i=g>>0,a=i<0?Math.max(f+i,0):Math.min(i,f),h=arguments[2],c=h===void 0?f:h>>0,o=c<0?Math.max(f+c,0):Math.min(c,f);a<o;)b[a]=p,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(p){if(typeof p!="object"||!p)return p;var b;if(Array.isArray(p)){b=[];for(var f=0;f<p.length;f++)b[f]=d(p[f]);return b}if(Object.prototype.toString.call(p)!=="[object Object]")return p;b={};for(var f in p)b[f]=d(p[f]);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,f){for(var g="";f>0;)f&1&&(g+=b),(f>>=1)&&(b+=b);return g};var d=/^\s\s*/,p=/\s\s*$/;r.stringTrimLeft=function(b){return b.replace(d,"")},r.stringTrimRight=function(b){return b.replace(p,"")},r.copyObject=function(b){var f={};for(var g in b)f[g]=b[g];return f},r.copyArray=function(b){for(var f=[],g=0,i=b.length;g<i;g++)b[g]&&typeof b[g]=="object"?f[g]=this.copyObject(b[g]):f[g]=b[g];return f},r.deepCopy=n("./deep_copy").deepCopy,r.arrayToMap=function(b){for(var f={},g=0;g<b.length;g++)f[b[g]]=1;return f},r.createMap=function(b){var f=Object.create(null);for(var g in b)f[g]=b[g];return f},r.arrayRemove=function(b,f){for(var g=0;g<=b.length;g++)f===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,f){var g=[];return b.replace(f,function(i){g.push({offset:arguments[arguments.length-2],length:i.length})}),g},r.deferredCall=function(b){var f=null,g=function(){f=null,b()},i=function(a){return i.cancel(),f=setTimeout(g,a||0),i};return i.schedule=i,i.call=function(){return this.cancel(),b(),i},i.cancel=function(){return clearTimeout(f),f=null,i},i.isPending=function(){return f},i},r.delayedCall=function(b,f){var g=null,i=function(){g=null,b()},a=function(h){g==null&&(g=setTimeout(i,h||f))};return a.delay=function(h){g&&clearTimeout(g),g=setTimeout(i,h||f)},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,f,g){return g&&b.codePointAt(f)>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:{},p=(/mac|win|linux/i.exec(d.platform)||["other"])[0].toLowerCase(),b=d.userAgent||"",f=d.appName||"";r.isWin=p=="win",r.isMac=p=="mac",r.isLinux=p=="linux",r.isIE=f=="Microsoft Internet Explorer"||f.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"),p="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 M=h(c[k],o,l);M&&w.push(M)}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(R){var O=S[R];R==="class"?T.className=Array.isArray(O)?O.join(" "):O:typeof O=="function"||R=="value"||R[0]=="$"?T[R]=O:R==="ref"?l&&(l[O]=T):R==="style"?typeof O=="string"&&(T.style.cssText=O):O!=null&&T.setAttribute(R,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||p,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,f=[];r.useStrictCSP=function(h){b=h,h==!1?g():f||(f=[])};function g(){var h=f;f=null,h&&h.forEach(function(c){i(c[0],c[1])})}function i(h,c,o){if(!(typeof document>"u")){if(f){if(o)g();else if(o===!1)return f.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+=`
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 p=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(p,d);const b=[];let f=!0;this.interceptors.request.forEach(function(o){typeof o.runWhen=="function"&&o.runWhen(n)===!1||(f=f&&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(!f){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 p=new Promise(b=>{r.subscribe(b),d=b}).then(u);return p.cancel=function(){r.unsubscribe(d)},p},e(function(u,d,p){r.reason||(r.reason=new aa(u,d,p),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 lh={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(lh).forEach(([t,e])=>{lh[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 Un=lg(Ka);Un.Axios=ws,Un.CanceledError=aa,Un.CancelToken=gk,Un.isCancel=Vf,Un.VERSION=sg,Un.toFormData=ql,Un.AxiosError=Mt,Un.Cancel=Un.CanceledError,Un.all=function(t){return Promise.all(t)},Un.spread=mk,Un.isAxiosError=yk,Un.mergeConfig=bs,Un.AxiosHeaders=Qr,Un.formToJSON=t=>Uf(Ce.isHTMLForm(t)?new FormData(t):t),Un.getAdapter=ig.getAdapter,Un.HttpStatusCode=lh,Un.default=Un;const{Axios:wB,AxiosError:xB,CanceledError:kB,isCancel:SB,CancelToken:_B,VERSION:CB,all:$B,Cancel:TB,isAxiosError:AB,spread:EB,toFormData:MB,AxiosHeaders:RB,HttpStatusCode:LB,formToJSON:OB,getAdapter:IB,mergeConfig:NB}=Un,cg=Un.create({baseURL:location.origin,timeout:6e4,params:{}});cg.interceptors.response.use(t=>t,t=>{var e,n,r,u,d,p,b,f,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=(p=t.response)==null?void 0:p.data)!=null&&b.exception?h+=`${t.response.data.exception}`:(i=(g=(f=t.response)==null?void 0:f.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:p=!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,!p&&!r.scope&&(r.scope=window.openc3Scope),cg({method:t,url:e,data:n,params:r,headers:u,onUploadProgress:b})},ch={Accept:"application/json"},ug={...ch,"Content-Type":"application/json"},xs={get:function(t,{params:e,headers:n=ch,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:p}={}){return Zl("put",t,{data:e,params:n,headers:r,noScope:u,noAuth:d,onUploadProgress:p})},post:function(t,{data:e,params:n,headers:r=ug,noScope:u,noAuth:d,onUploadProgress:p}={}){return Zl("post",t,{data:e,params:n,headers:r,noScope:u,noAuth:d,onUploadProgress:p})},delete:function(t,{params:e,headers:n=ch,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,uh=36e5,kk=1e3,dg=Symbol.for("constructDateFrom");function nr(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 $n(t,e){return nr(e||t,t)}let Sk={};function la(){return Sk}function Go(t,e){var n,r,u,d;const p=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)??p.weekStartsOn??((d=(u=p.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,f=$n(t,e==null?void 0:e.in),g=f.getDay(),i=(g<b?7:0)+g-b;return f.setDate(f.getDate()-i),f.setHours(0,0,0,0),f}function ca(t,e){return Go(t,{...e,weekStartsOn:1})}function pg(t,e){const n=$n(t,void 0),r=n.getFullYear(),u=nr(n,0);u.setFullYear(r+1,0,4),u.setHours(0,0,0,0);const d=ca(u),p=nr(n,0);p.setFullYear(r,0,4),p.setHours(0,0,0,0);const b=ca(p);return n.getTime()>=d.getTime()?r+1:n.getTime()>=b.getTime()?r:r-1}function ec(t){const e=$n(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=nr.bind(null,e.find(r=>typeof r=="object"));return e.map(n)}function fg(t,e){const n=$n(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),p=fg(u),b=+d-ec(d),f=+p-ec(p);return Math.round((b-f)/864e5)}function $k(t,e){const n=pg(t),r=nr(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(+$n(t)))}function Ak(t,e){const n=$n(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"}},Mk=(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 hh(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const Rk={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:hh({formats:Rk,defaultWidth:"full"}),time:hh({formats:Lk,defaultWidth:"full"}),dateTime:hh({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 p=t.defaultFormattingWidth||t.defaultWidth,b=n!=null&&n.width?String(n.width):p;u=t.formattingValues[b]||t.formattingValues[p]}else{const p=t.defaultWidth,b=n!=null&&n.width?String(n.width):t.defaultWidth;u=t.values[b]||t.values[p]}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 p=d[0],b=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],f=Array.isArray(b)?Vk(b,a=>a.test(p)):qk(b,a=>a.test(p));let g;g=t.valueCallback?t.valueCallback(f):f,g=n.valueCallback?n.valueCallback(g):g;const i=e.slice(p.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 p=t.valueCallback?t.valueCallback(d[0]):d[0];p=n.valueCallback?n.valueCallback(p):p;const b=e.slice(u.length);return{value:p,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:Mk,formatLong:Ik,formatRelative:Dk,localize:Uk,match:sS,options:{weekStartsOn:0,firstWeekContainsDate:1}};function aS(t,e){const n=$n(t,void 0);return Ck(n,Ak(n))+1}function yg(t,e){const n=$n(t,void 0),r=+ca(n)-+$k(n);return Math.round(r/6048e5)+1}function dh(t,e){var n,r,u,d;const p=$n(t,e==null?void 0:e.in),b=p.getFullYear(),f=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)??f.firstWeekContainsDate??((d=(u=f.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,i=nr((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=nr((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+p>=+a?b+1:+p>=+c?b:b-1}function lS(t,e){var n,r,u,d;const p=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)??p.firstWeekContainsDate??((d=(u=p.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,f=dh(t,e),g=nr((e==null?void 0:e.in)||t,0);return g.setFullYear(f,0,b),g.setHours(0,0,0,0),Go(g,e)}function vg(t,e){const n=$n(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=dh(t,r),d=u>0?u:1-u;if(e==="YY"){const p=d%100;return hn(p,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))},ph={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 fh(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,p,b,f,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??((p=(d=a.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??1,o=(n==null?void 0:n.weekStartsOn)??((f=(b=n==null?void 0:n.locale)==null?void 0:b.options)==null?void 0:f.weekStartsOn)??a.weekStartsOn??((i=(g=a.locale)==null?void 0:g.options)==null?void 0:i.weekStartsOn)??0,l=$n(t,n==null?void 0:n.in);if(!gg(l))throw new RangeError("Invalid time value");let m=e.match(gS).map(k=>{const M=k[0];if(M==="p"||M==="P"){const T=ph[M];return T(k,h.formatLong)}return k}).join("").match(fS).map(k=>{if(k==="''")return{isToken:!1,value:"'"};const M=k[0];if(M==="'")return{isToken:!1,value:bS(k)};if(bg[M])return{isToken:!0,value:k};if(M.match(vS))throw new RangeError("Format string contains an unescaped latin alphabet character `"+M+"`");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 M=k.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Cg(M)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&_g(M))&&fh(M,e,String(t));const T=bg[M[0]];return T(l,M,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=f(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=f(i,a[l]);if(w==null&&p.original)return;o.push(w)}return h&&h.apply(null,o)||!0}},p=function(i,a){var h=d("",i,a);return h==null&&p.original?p.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},f=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)&&(p.original=a.require,a.require=p,a.require.packaged=!0)}g(n)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(n,r,u){function d(p,b,f){Object.defineProperty(p,b,{value:f,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||d(String.prototype,"startsWith",function(p,b){return b=b||0,this.lastIndexOf(p,b)===b}),String.prototype.endsWith||d(String.prototype,"endsWith",function(p,b){var f=this;(b===void 0||b>f.length)&&(b=f.length),b-=p.length;var g=f.indexOf(p,b);return g!==-1&&g===b}),String.prototype.repeat||d(String.prototype,"repeat",function(p){for(var b="",f=this;p>0;)p&1&&(b+=f),(p>>=1)&&(f+=f);return b}),String.prototype.includes||d(String.prototype,"includes",function(p,b){return this.indexOf(p,b)!=-1}),Object.assign||(Object.assign=function(p){if(p==null)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(p),f=1;f<arguments.length;f++){var g=arguments[f];g!=null&&Object.keys(g).forEach(function(i){b[i]=g[i]})}return b}),Object.values||(Object.values=function(p){return Object.keys(p).map(function(b){return p[b]})}),Array.prototype.find||d(Array.prototype,"find",function(p){for(var b=this.length,f=arguments[1],g=0;g<b;g++){var i=this[g];if(p.call(f,i,g,this))return i}}),Array.prototype.findIndex||d(Array.prototype,"findIndex",function(p){for(var b=this.length,f=arguments[1],g=0;g<b;g++){var i=this[g];if(p.call(f,i,g,this))return g}}),Array.prototype.includes||d(Array.prototype,"includes",function(p,b){return this.indexOf(p,b)!=-1}),Array.prototype.fill||d(Array.prototype,"fill",function(p){for(var b=this,f=b.length>>>0,g=arguments[1],i=g>>0,a=i<0?Math.max(f+i,0):Math.min(i,f),h=arguments[2],c=h===void 0?f:h>>0,o=c<0?Math.max(f+c,0):Math.min(c,f);a<o;)b[a]=p,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(p){if(typeof p!="object"||!p)return p;var b;if(Array.isArray(p)){b=[];for(var f=0;f<p.length;f++)b[f]=d(p[f]);return b}if(Object.prototype.toString.call(p)!=="[object Object]")return p;b={};for(var f in p)b[f]=d(p[f]);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,f){for(var g="";f>0;)f&1&&(g+=b),(f>>=1)&&(b+=b);return g};var d=/^\s\s*/,p=/\s\s*$/;r.stringTrimLeft=function(b){return b.replace(d,"")},r.stringTrimRight=function(b){return b.replace(p,"")},r.copyObject=function(b){var f={};for(var g in b)f[g]=b[g];return f},r.copyArray=function(b){for(var f=[],g=0,i=b.length;g<i;g++)b[g]&&typeof b[g]=="object"?f[g]=this.copyObject(b[g]):f[g]=b[g];return f},r.deepCopy=n("./deep_copy").deepCopy,r.arrayToMap=function(b){for(var f={},g=0;g<b.length;g++)f[b[g]]=1;return f},r.createMap=function(b){var f=Object.create(null);for(var g in b)f[g]=b[g];return f},r.arrayRemove=function(b,f){for(var g=0;g<=b.length;g++)f===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,f){var g=[];return b.replace(f,function(i){g.push({offset:arguments[arguments.length-2],length:i.length})}),g},r.deferredCall=function(b){var f=null,g=function(){f=null,b()},i=function(a){return i.cancel(),f=setTimeout(g,a||0),i};return i.schedule=i,i.call=function(){return this.cancel(),b(),i},i.cancel=function(){return clearTimeout(f),f=null,i},i.isPending=function(){return f},i},r.delayedCall=function(b,f){var g=null,i=function(){g=null,b()},a=function(h){g==null&&(g=setTimeout(i,h||f))};return a.delay=function(h){g&&clearTimeout(g),g=setTimeout(i,h||f)},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,f,g){return g&&b.codePointAt(f)>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:{},p=(/mac|win|linux/i.exec(d.platform)||["other"])[0].toLowerCase(),b=d.userAgent||"",f=d.appName||"";r.isWin=p=="win",r.isMac=p=="mac",r.isLinux=p=="linux",r.isIE=f=="Microsoft Internet Explorer"||f.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"),p="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 M=h(c[k],o,l);M&&w.push(M)}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(R){var O=S[R];R==="class"?T.className=Array.isArray(O)?O.join(" "):O:typeof O=="function"||R=="value"||R[0]=="$"?T[R]=O:R==="ref"?l&&(l[O]=T):R==="style"?typeof O=="string"&&(T.style.cssText=O):O!=null&&T.setAttribute(R,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||p,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,f=[];r.useStrictCSP=function(h){b=h,h==!1?g():f||(f=[])};function g(){var h=f;f=null,h&&h.forEach(function(c){i(c[0],c[1])})}function i(h,c,o){if(!(typeof document>"u")){if(f){if(o)g();else if(o===!1)return f.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
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
9
  * based on code from:
10
10
  *
@@ -176,12 +176,12 @@ System.register(["./main-a09e44869aaec5ab5bef.js","vue","single-spa"],function(W
176
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
177
  `+kt}else M&&Ct>0&&(Qe=`
178
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+`
179
+ `,Se==He?Se=He=0:(Se=0,He=1)));var Tn=Qe+`
180
180
 
181
- `;$n!=C&&(R.value=C=$n,N=j=$n.length)}if(Ee&&(N=R.selectionStart,j=R.selectionEnd),j!=He||N!=Se||R.selectionEnd!=j)try{R.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(R)?(x.selectAll(),ae()):M&&R.selectionStart!=N&&ae())},ge=null;this.setInputHandler=function(Se){ge=Se},this.getInputHandler=function(){return ge};var Ee=!1,Me=function(Se,He){if(Ee&&(Ee=!1),F)return ae(),Se&&x.onPaste(Se),F=!1,"";for(var Qe=R.selectionStart,mt=R.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 Rr=!1;return b.isAndroid&&Pt==". "&&(Pt=" ",Rr=!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,Rr?`
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=R.value,Qe=Me(He,!0);(He.length>o+100||k.test(Qe)||M&&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,R.value=Qe,R.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)):(R.value="",F=!0))};d.addCommandKeyListener(R,function(Se,He,Qe){if(!L)return x.onCommandKey(Se,He,Qe)},x),d.addListener(R,"select",ce,x),d.addListener(R,"input",Le,x),d.addListener(R,"cut",ft,x),d.addListener(R,"copy",rt,x),d.addListener(R,"paste",gt,x),(!("oncut"in R)||!("oncopy"in R)||!("onpaste"in R))&&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=R.value="",N=0,j=0):(R.msGetInputContext&&(L.context=R.msGetInputContext()),R.getInputContext&&(L.context=R.getInputContext()))}},vn=function(){if(!(!L||!x.onCompositionUpdate||x.$readOnly)){if(I)return xr();if(L.useTextareaForIME)x.onCompositionUpdate(R.value);else{var Se=R.value;Me(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,R.blur(),R.focus(),$=!1}var bn=g.delayedCall(vn,50).schedule.bind(null,null);function Nn(Se){Se.keyCode==27&&R.value.length<R.selectionStart&&(L||(C=R.value),N=j=-1,ae()),bn()}d.addListener(R,"compositionstart",sn,x),d.addListener(R,"compositionupdate",vn,x),d.addListener(R,"keyup",Nn,x),d.addListener(R,"keydown",bn,x),d.addListener(R,"compositionend",Jt,x),this.getElement=function(){return R},this.setCommandMode=function(Se){I=Se,R.readOnly=!1},this.setReadOnly=function(Se){I||(R.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=R.style.cssText),R.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=f.computedStyle(x.container),$t=Qe.top+(parseInt(mt.borderTopWidth)||0),Ct=Qe.left+(parseInt(mt.borderLeftWidth)||0),Pt=Qe.bottom-$t-R.clientHeight-2,Dt=function(pt){f.translate(R,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&&(R.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(R,"mouseup",xt,x),d.addListener(R,"mousedown",function(Se){Se.preventDefault(),ir()},x),d.addListener(x.renderer.scroller,"contextmenu",xt,x),d.addListener(R,"contextmenu",xt,x),w&&qe(S,x,R);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 Rr=He.onCommandKey({},$n,kt);if(!Rr&&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(){R.parentElement&&R.parentElement.removeChild(R)}},r.TextInput=T,r.$setUserAgentForTests=function(S,x){M=S,w=x}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,r,u){var d=n("../lib/useragent"),p=0,b=550,f=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 M=i(this.$clickSelection,l);l=M.cursor,c=M.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>p||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 M=Math.abs(w/k),T=!1;if(M>=1&&c.renderer.isScrollableBy(h.wheelX*h.speed,0)&&(T=!0),M<=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}();f.prototype.selectEnd=f.prototype.selectByLinesEnd,f.prototype.selectAllEnd=f.prototype.selectByLinesEnd,f.prototype.selectByWordsEnd=f.prototype.selectByLinesEnd,r.DefaultHandlers=f;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 p=d.currentTarget,b=p.scrollHeight>p.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,M){k.__proto__=M}||function(k,M){for(var T in M)Object.prototype.hasOwnProperty.call(M,T)&&(k[T]=M[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)}}(),p=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 f=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,M;this.popups.sort(function(P,I){return I.priority-P.priority});var T=[];try{for(var S=p(this.popups),x=S.next();!x.done;x=S.next()){var R=x.value,O=!0;try{for(var F=(k=void 0,p(T)),L=F.next();!L.done;L=F.next()){var H=L.value;if(this.doPopupsOverlap(H,R)){O=!1;break}}}catch(P){k={error:P}}finally{try{L&&!L.done&&(M=F.return)&&M.call(F)}finally{if(k)throw k.error}}O?T.push(R):R.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(),M=w.getElement().getBoundingClientRect();return k.left<M.right&&k.right>M.left&&k.top<M.bottom&&k.bottom>M.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 M=k.getElement();return M.style.whiteSpace="pre-wrap",M.style.pointerEvents="auto",M.addEventListener("mouseout",k.onMouseOut),M.tabIndex=-1,M.addEventListener("blur",(function(){M.contains(document.activeElement)||this.hide()}).bind(k)),M.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 M=k.$mouseHandler.isMousePressed;if(this.isOpen){var T=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(T.row,T.column)||M||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||M||(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,M=w.getDocumentPosition(),T=k.session.getLine(M.row);if(M.column==T.length){var S=k.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),x=k.session.documentToScreenPosition(M.row,M.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,M,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=f.fromPoints(k.start,k.end);var R=x.textToScreenCoordinates(k.start.row,k.start.column),O=x.scroller.getBoundingClientRect();R.pageX<O.left&&(R.pageX=O.left);var F=this.getElement();F.innerHTML="",F.appendChild(M),F.style.maxHeight="",F.style.display="block";var L=F.clientHeight,H=F.clientWidth,P=window.innerHeight-R.pageY-x.lineHeight,I=!0;R.pageY-L<0&&R.pageY<P&&(I=!1),F.style.maxHeight=(I?R.pageY:P)-S+"px",F.style.top=I?"":R.pageY+x.lineHeight+"px",F.style.bottom=I?window.innerHeight-R.pageY+"px":"",F.style.left=Math.min(R.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,M){k.__proto__=M}||function(k,M){for(var T in M)Object.prototype.hasOwnProperty.call(M,T)&&(k[T]=M[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)}}(),p=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"),f=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 M,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)R(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 R(T)}}function x(O){O&&O.type==="keydown"&&(O.ctrlKey||O.metaKey)||O&&O.type==="mouseout"&&(!O.relatedTarget||k.getElement().contains(O.relatedTarget))||(M&&(M=clearTimeout(M)),k.isOpen&&(k.hideTooltip(),m.off("mousewheel",x),m.off("changeSession",x),window.removeEventListener("keydown",x,!0)))}function R(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&&R(O),T=O,!M&&(M=setTimeout(function(){M=null,T&&!l.isMousePressed&&S()},50))}),f.addListener(m.renderer.$gutter,"mouseout",function(O){T=null,k.isOpen&&(M=setTimeout(function(){M=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 M=l.call(this,w.container)||this;M.editor=w,M.visibleTooltipRow;var T=M.getElement();return T.setAttribute("role","tooltip"),T.style.pointerEvents="auto",k&&(M.onMouseOut=M.onMouseOut.bind(M),T.addEventListener("mouseout",M.onMouseOut)),M}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 M=window.innerWidth||document.documentElement.clientWidth,T=window.innerHeight||document.documentElement.clientHeight,S=this.getWidth(),x=this.getHeight();w+=15,k+=15,w+S>M&&(w-=w+S-M),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,M=this.editor.renderer.$gutterLayer,T=M.$annotations[w],S;T?S={displayText:Array.from(T.displayText),type:Array.from(T.type)}:S={displayText:[],type:[]};var x=M.session.getFoldLine(w);if(x&&M.$showFoldedAnnotations){for(var R={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(M.$annotations[L])for(var H=0;H<M.$annotations[L].text.length;H++){var P=M.$annotations[L].type[H];R[P].push(M.$annotations[L].text[H]),(!F||O[P]<O[F])&&(F=P)}if(["error","security","warning"].includes(F)){var I="".concat(m.annotationsToSummaryString(R)," 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=M.$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,M,T=[],S=["error","security","warning","info","hint"];try{for(var x=p(S),R=x.next();!R.done;R=x.next()){var O=R.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{R&&!R.done&&(M=x.return)&&M.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"),p=n("../lib/useragent"),b=function(){function f(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 f.prototype.stopPropagation=function(){d.stopPropagation(this.domEvent),this.propagationStopped=!0},f.prototype.preventDefault=function(){d.preventDefault(this.domEvent),this.defaultPrevented=!0},f.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},f.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},f.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},f.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},f.prototype.getButton=function(){return d.getButton(this.domEvent)},f.prototype.getShiftKey=function(){return this.domEvent.shiftKey},f.prototype.getAccelKey=function(){return p.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},f}();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"),p=n("../lib/event"),b=n("../lib/useragent"),f=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,M,T,S,x,R,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 M=ne.clientX,T=ne.clientY,k||j(),O++,ne.dataTransfer.dropEffect=F=he(ne),p.preventDefault(ne)},this.onDragOver=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return M=ne.clientX,T=ne.clientY,k||(j(),O++),K!==null&&(K=null),ne.dataTransfer.dropEffect=F=he(ne),p.preventDefault(ne)},this.onDragLeave=function(ne){if(O--,O<=0&&k)return U(),F=null,p.preventDefault(ne)},this.onDrop=function(ne){if(R){var ae=ne.dataTransfer;if(L)switch(F){case"move":x.contains(R.row,R.column)?x={start:R,end:R}:x=o.moveText(x,R);break;case"copy":x=o.moveText(x,R,!0);break}else{var ue=ae.getData("Text");x={start:R,end:o.session.insert(R,ue)},o.focus(),F=null}return U(),p.preventDefault(ne)}},p.addListener(w,"dragstart",this.onDragStart.bind(c),o),p.addListener(w,"dragend",this.onDragEnd.bind(c),o),p.addListener(w,"dragenter",this.onDragEnter.bind(c),o),p.addListener(w,"dragover",this.onDragOver.bind(c),o),p.addListener(w,"dragleave",this.onDragLeave.bind(c),o),p.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:M,y:T};else{var Ee=h(I.x,I.y,M,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(),Me={x:{left:M-Ee.left,right:Ee.right-M},y:{top:T-Ee.top,bottom:Ee.bottom-T}},Le=Math.min(Me.x.left,Me.x.right),Xe=Math.min(Me.y.top,Me.y.bottom),Ge={row:ne.row,column:ne.column};Le/ge<=2&&(Ge.column+=Me.x.left<Me.x.right?-3:2),Xe/ce<=1&&(Ge.row+=Me.y.top<Me.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>=f&&o.renderer.scrollCursorIntoView(Ge):H=ue:H=null}function N(){var ne=R;R=o.renderer.screenToTextCoordinates(M,T),$(R,ne),C(R,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,p.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,R=null,O=0,H=null,P=null,p.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 M=o.container;M.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,p=n("../lib/event"),b=n("../lib/dom");r.addTouchListeners=function(f,g){var i="scroll",a,h,c,o,l,m,w=0,k,M=0,T=0,S=0,x,R;function O(){var $=window.navigator&&window.navigator.clipboard,C=!1,N=function(){var K=g.getCopyText(),Z=g.session.getUndoManager().hasUndo();R.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"]),R.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)),R.firstChild.style.display="none",C=!1,Z!="openCommandPalette"&&g.focus()};R=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")){R&&L();return}R||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();R.style.top=C.pageY-U.top-3+"px",C.pageX-U.left<U.width-70?(R.style.left="",R.style.right="10px"):(R.style.right="",R.style.left=N+j-U.left+"px"),R.style.display="",R.firstChild.style.display="none",g.on("input",L)}function L($){R&&(R.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 $=M>=2?g.selection.getLineRange(k.row):g.session.getBracketRange(k);$&&!$.isEmpty()?g.selection.setRange($):g.selection.selectWord(),i="wait"}p.addListener(f,"contextmenu",function($){if(x){var C=g.textInput.getElement();C.focus()}},g),p.addListener(f,"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)M++,$.preventDefault(),$.button=0,P();else{M=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,Me=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+Me,$.clientY-ge.top-ue.top+Ee),Ge=Le($.clientX-ge.left-ce.left+Me,$.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),p.addListener(f,"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),p.addListener(f,"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"),p=n("../lib/useragent"),b=n("./default_handlers").DefaultHandlers,f=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 f(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 M=l.renderer.$gutter;d.addListener(M,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),l),d.addListener(M,"click",this.onMouseEvent.bind(this,"gutterclick"),l),d.addListener(M,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),l),d.addListener(M,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),l),d.addListener(k,"mousedown",w,l),d.addListener(M,"mousedown",w,l),p.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(),R=l.renderer;!x.isEmpty()&&x.insideStart(S.row,S.column)?R.setCursorStyle("default"):R.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 M=this,T=function(F){if(F){if(p.isWebKit&&!F.which&&M.releaseMouse)return M.releaseMouse();M.x=F.clientX,M.y=F.clientY,m&&m(F),M.mouseEvent=new g(F,M.editor),M.$mouseMoved=!0}},S=function(F){w.off("beforeEndOperation",R),clearInterval(O),w.session&&x(),M[M.state+"End"]&&M[M.state+"End"](F),M.state="",M.isMousePressed=k.$isMousePressed=!1,k.$keepTextAreaAtCursor&&k.$moveTextAreaToCursor(),M.$onCaptureMouseMove=M.releaseMouse=null,F&&M.onMouseEvent("mouseup",F),w.endOperation()},x=function(){M[M.state]&&M[M.state](),M.$mouseMoved=!1};if(p.isOldIE&&l.domEvent.type=="dblclick")return setTimeout(function(){S(l)});var R=function(F){M.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(M[M.state+"End"]&&M[M.state+"End"](),M.state="",M.releaseMouse())};w.on("beforeEndOperation",R),w.startOperation({command:{name:"mouse"}}),M.$onCaptureMouseMove=T,M.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:p.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"),p=function(){function b(f){f.on("click",function(g){var i=g.getDocumentPosition(),a=f.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()),f.renderer.scrollCursorIntoView())}),f.on("gutterclick",function(g){var i=f.renderer.$gutterLayer.getRegion(g);if(i=="foldWidgets"){var a=g.getDocumentPosition().row,h=f.session;h.foldWidgets&&h.foldWidgets[a]&&f.session.onFoldWidgetClick(a,g),f.isFocused()||f.focus(),g.stop()}}),f.on("gutterdblclick",function(g){var i=f.renderer.$gutterLayer.getRegion(g);if(i=="foldWidgets"){var a=g.getDocumentPosition().row,h=f.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),f.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}g.stop()}})}return b}();r.FoldHandler=p}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(n,r,u){var d=n("../lib/keys"),p=n("../lib/event"),b=function(){function f(g){this.$editor=g,this.$data={editor:g},this.$handlers=[],this.setDefaultHandler(g.commands)}return f.prototype.setDefaultHandler=function(g){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=g,this.addKeyboardHandler(g,0)},f.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)}},f.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)}},f.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)},f.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},f.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(" ")},f.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&&p.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},f.prototype.onCommandKey=function(g,i,a){var h=d.keyCodeToString(a);return this.$callKeyboardHandlers(i,h,a,g)},f.prototype.onTextInput=function(g){return this.$callKeyboardHandlers(-1,g)},f}();r.KeyBinding=b}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(n,r,u){var d=0,p=0,b=!1,f=!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,M=5,T=6,S=7,x=8,R=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,M,T,x,M,N,N,N,N,N,N,N,N,N,N,N,N,N,N,M,M,M,T,x,k,k,F,F,F,k,k,k,k,k,O,R,O,R,R,m,m,m,m,m,m,m,m,m,m,R,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,M,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,R,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,M,H,P,I,$,C,R,F,F,F,F,F,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,R,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,Me=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(p=d,b=!1,f=!1,g=!1,sn=0;sn<ue;sn++){if(Ee=Xe,vn[sn]=Me=te(ne,ce,vn,sn),Xe=ge[Ee][Me],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]==M&&(ae[sn]=0),p|=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(!(p<ne)){if(ne==1&&d==c&&!f){ue.reverse();return}for(var ce=ue.length,ge=0,Ee,Me,Le,Xe;ge<ce;){if(ae[ge]>=ne){for(Ee=ge+1;Ee<ce&&ae[Ee]>=ne;)Ee++;for(Me=ge,Le=Ee-1;Me<Le;Me++,Le--)Xe=ue[Me],ue[Me]=ue[Le],ue[Le]=Xe;ge=Ee}ge++}}}function te(ne,ae,ue,ce){var ge=ae[ce],Ee,Me,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 R:return ce<1||ce+1>=ae.length||(Ee=ue[ce-1])!=m&&Ee!=w||(Me=ae[ce+1])!=m&&Me!=w?k:(b&&(Me=w),Me==Ee?Me:k);case O:return Ee=ce>0?ue[ce-1]:M,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])==M?k:ue[ce-1];case M:return b=!1,f=!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),Me=[];d=ue?c:h,K(ce,Me,ce.length,ae);for(var Le=0;Le<ge.length;ge[Le]=Le,Le++);Z(2,Me,ge),Z(1,Me,ge);for(var Le=0;Le<ge.length-1;Le++)ae[Le]===w?Me[Le]=r.AN:Me[Le]===l&&(ae[Le]>S&&ae[Le]<H||ae[Le]===k||ae[Le]===N)?Me[Le]=r.ON_R:Le>0&&ce[Le-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ce[Le])&&(Me[Le-1]=Me[Le]=r.R_H,Le++);ce[ce.length-1]===r.DOT&&(Me[ce.length-1]=r.B),ce[0]==="‫"&&(Me[0]=r.RLE);for(var Le=0;Le<ge.length;Le++)Ee[Le]=Me[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"),p=n("./lib/lang"),b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,f=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(`
181
+ `;Tn!=C&&(R.value=C=Tn,N=j=Tn.length)}if(Ee&&(N=R.selectionStart,j=R.selectionEnd),j!=He||N!=Se||R.selectionEnd!=j)try{R.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(R)?(x.selectAll(),ae()):M&&R.selectionStart!=N&&ae())},ge=null;this.setInputHandler=function(Se){ge=Se},this.getInputHandler=function(){return ge};var Ee=!1,Me=function(Se,He){if(Ee&&(Ee=!1),F)return ae(),Se&&x.onPaste(Se),F=!1,"";for(var Qe=R.selectionStart,mt=R.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 Tn=Pt.length-kt+1;if(Tn<0&&($t=-Tn,Tn=0),Pt=Pt.slice(0,Tn),!He&&!Pt&&!Dt&&!$t&&!Ct&&!pt)return"";H=!0;var Rr=!1;return b.isAndroid&&Pt==". "&&(Pt=" ",Rr=!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,Rr?`
182
+ `:Pt},Le=function(Se){if(L)return bn();if(Se&&Se.inputType){if(Se.inputType=="historyUndo")return x.execCommand("undo");if(Se.inputType=="historyRedo")return x.execCommand("redo")}var He=R.value,Qe=Me(He,!0);(He.length>o+100||k.test(Qe)||M&&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,R.value=Qe,R.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)):(R.value="",F=!0))};d.addCommandKeyListener(R,function(Se,He,Qe){if(!L)return x.onCommandKey(Se,He,Qe)},x),d.addListener(R,"select",ce,x),d.addListener(R,"input",Le,x),d.addListener(R,"cut",ft,x),d.addListener(R,"copy",rt,x),d.addListener(R,"paste",gt,x),(!("oncut"in R)||!("oncopy"in R)||!("onpaste"in R))&&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(bn,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=R.value="",N=0,j=0):(R.msGetInputContext&&(L.context=R.msGetInputContext()),R.getInputContext&&(L.context=R.getInputContext()))}},bn=function(){if(!(!L||!x.onCompositionUpdate||x.$readOnly)){if(I)return xr();if(L.useTextareaForIME)x.onCompositionUpdate(R.value);else{var Se=R.value;Me(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,R.blur(),R.focus(),$=!1}var wn=g.delayedCall(bn,50).schedule.bind(null,null);function Dn(Se){Se.keyCode==27&&R.value.length<R.selectionStart&&(L||(C=R.value),N=j=-1,ae()),wn()}d.addListener(R,"compositionstart",sn,x),d.addListener(R,"compositionupdate",bn,x),d.addListener(R,"keyup",Dn,x),d.addListener(R,"keydown",wn,x),d.addListener(R,"compositionend",Jt,x),this.getElement=function(){return R},this.setCommandMode=function(Se){I=Se,R.readOnly=!1},this.setReadOnly=function(Se){I||(R.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=R.style.cssText),R.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=f.computedStyle(x.container),$t=Qe.top+(parseInt(mt.borderTopWidth)||0),Ct=Qe.left+(parseInt(mt.borderLeftWidth)||0),Pt=Qe.bottom-$t-R.clientHeight-2,Dt=function(pt){f.translate(R,pt.clientX-Ct-2,Math.min(pt.clientY-$t-2,Pt))};Dt(Se),Se.type=="mousedown"&&(x.renderer.$isMousePressed=!0,clearTimeout(Fn),b.isWin&&d.capture(x.container,Dt,or))},this.onContextMenuClose=or;var Fn;function or(){clearTimeout(Fn),Fn=setTimeout(function(){P&&(R.style.cssText=P,P=""),x.renderer.$isMousePressed=!1,x.renderer.$keepTextAreaAtCursor&&x.renderer.$moveTextAreaToCursor()},0)}var xt=function(Se){x.textInput.onContextMenu(Se),or()};d.addListener(R,"mouseup",xt,x),d.addListener(R,"mousedown",function(Se){Se.preventDefault(),or()},x),d.addListener(x.renderer.scroller,"contextmenu",xt,x),d.addListener(R,"contextmenu",xt,x),w&&qe(S,x,R);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,Tn=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,Tn=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,Tn=m.option):(pt>j||pt==j&&j!=N&&Dt==pt)&&(kt=l.right),Dt!==pt&&(Tn|=m.shift),kt){var Rr=He.onCommandKey({},Tn,kt);if(!Rr&&He.commands){kt=l.keyCodeToString(kt);var ii=He.commands.findKeyCommand(Tn,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(){R.parentElement&&R.parentElement.removeChild(R)}},r.TextInput=T,r.$setUserAgentForTests=function(S,x){M=S,w=x}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,r,u){var d=n("../lib/useragent"),p=0,b=550,f=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 M=i(this.$clickSelection,l);l=M.cursor,c=M.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>p||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 M=Math.abs(w/k),T=!1;if(M>=1&&c.renderer.isScrollableBy(h.wheelX*h.speed,0)&&(T=!0),M<=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}();f.prototype.selectEnd=f.prototype.selectByLinesEnd,f.prototype.selectAllEnd=f.prototype.selectByLinesEnd,f.prototype.selectByWordsEnd=f.prototype.selectByLinesEnd,r.DefaultHandlers=f;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 p=d.currentTarget,b=p.scrollHeight>p.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,M){k.__proto__=M}||function(k,M){for(var T in M)Object.prototype.hasOwnProperty.call(M,T)&&(k[T]=M[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)}}(),p=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 f=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,M;this.popups.sort(function(P,I){return I.priority-P.priority});var T=[];try{for(var S=p(this.popups),x=S.next();!x.done;x=S.next()){var R=x.value,O=!0;try{for(var F=(k=void 0,p(T)),L=F.next();!L.done;L=F.next()){var H=L.value;if(this.doPopupsOverlap(H,R)){O=!1;break}}}catch(P){k={error:P}}finally{try{L&&!L.done&&(M=F.return)&&M.call(F)}finally{if(k)throw k.error}}O?T.push(R):R.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(),M=w.getElement().getBoundingClientRect();return k.left<M.right&&k.right>M.left&&k.top<M.bottom&&k.bottom>M.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 M=k.getElement();return M.style.whiteSpace="pre-wrap",M.style.pointerEvents="auto",M.addEventListener("mouseout",k.onMouseOut),M.tabIndex=-1,M.addEventListener("blur",(function(){M.contains(document.activeElement)||this.hide()}).bind(k)),M.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 M=k.$mouseHandler.isMousePressed;if(this.isOpen){var T=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(T.row,T.column)||M||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||M||(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,M=w.getDocumentPosition(),T=k.session.getLine(M.row);if(M.column==T.length){var S=k.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),x=k.session.documentToScreenPosition(M.row,M.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,M,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=f.fromPoints(k.start,k.end);var R=x.textToScreenCoordinates(k.start.row,k.start.column),O=x.scroller.getBoundingClientRect();R.pageX<O.left&&(R.pageX=O.left);var F=this.getElement();F.innerHTML="",F.appendChild(M),F.style.maxHeight="",F.style.display="block";var L=F.clientHeight,H=F.clientWidth,P=window.innerHeight-R.pageY-x.lineHeight,I=!0;R.pageY-L<0&&R.pageY<P&&(I=!1),F.style.maxHeight=(I?R.pageY:P)-S+"px",F.style.top=I?"":R.pageY+x.lineHeight+"px",F.style.bottom=I?window.innerHeight-R.pageY+"px":"",F.style.left=Math.min(R.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,M){k.__proto__=M}||function(k,M){for(var T in M)Object.prototype.hasOwnProperty.call(M,T)&&(k[T]=M[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)}}(),p=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"),f=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 M,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)R(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 R(T)}}function x(O){O&&O.type==="keydown"&&(O.ctrlKey||O.metaKey)||O&&O.type==="mouseout"&&(!O.relatedTarget||k.getElement().contains(O.relatedTarget))||(M&&(M=clearTimeout(M)),k.isOpen&&(k.hideTooltip(),m.off("mousewheel",x),m.off("changeSession",x),window.removeEventListener("keydown",x,!0)))}function R(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&&R(O),T=O,!M&&(M=setTimeout(function(){M=null,T&&!l.isMousePressed&&S()},50))}),f.addListener(m.renderer.$gutter,"mouseout",function(O){T=null,k.isOpen&&(M=setTimeout(function(){M=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 M=l.call(this,w.container)||this;M.editor=w,M.visibleTooltipRow;var T=M.getElement();return T.setAttribute("role","tooltip"),T.style.pointerEvents="auto",k&&(M.onMouseOut=M.onMouseOut.bind(M),T.addEventListener("mouseout",M.onMouseOut)),M}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 M=window.innerWidth||document.documentElement.clientWidth,T=window.innerHeight||document.documentElement.clientHeight,S=this.getWidth(),x=this.getHeight();w+=15,k+=15,w+S>M&&(w-=w+S-M),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,M=this.editor.renderer.$gutterLayer,T=M.$annotations[w],S;T?S={displayText:Array.from(T.displayText),type:Array.from(T.type)}:S={displayText:[],type:[]};var x=M.session.getFoldLine(w);if(x&&M.$showFoldedAnnotations){for(var R={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(M.$annotations[L])for(var H=0;H<M.$annotations[L].text.length;H++){var P=M.$annotations[L].type[H];R[P].push(M.$annotations[L].text[H]),(!F||O[P]<O[F])&&(F=P)}if(["error","security","warning"].includes(F)){var I="".concat(m.annotationsToSummaryString(R)," 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=M.$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,M,T=[],S=["error","security","warning","info","hint"];try{for(var x=p(S),R=x.next();!R.done;R=x.next()){var O=R.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{R&&!R.done&&(M=x.return)&&M.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"),p=n("../lib/useragent"),b=function(){function f(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 f.prototype.stopPropagation=function(){d.stopPropagation(this.domEvent),this.propagationStopped=!0},f.prototype.preventDefault=function(){d.preventDefault(this.domEvent),this.defaultPrevented=!0},f.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},f.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},f.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},f.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},f.prototype.getButton=function(){return d.getButton(this.domEvent)},f.prototype.getShiftKey=function(){return this.domEvent.shiftKey},f.prototype.getAccelKey=function(){return p.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},f}();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"),p=n("../lib/event"),b=n("../lib/useragent"),f=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,M,T,S,x,R,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 M=ne.clientX,T=ne.clientY,k||j(),O++,ne.dataTransfer.dropEffect=F=he(ne),p.preventDefault(ne)},this.onDragOver=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return M=ne.clientX,T=ne.clientY,k||(j(),O++),K!==null&&(K=null),ne.dataTransfer.dropEffect=F=he(ne),p.preventDefault(ne)},this.onDragLeave=function(ne){if(O--,O<=0&&k)return U(),F=null,p.preventDefault(ne)},this.onDrop=function(ne){if(R){var ae=ne.dataTransfer;if(L)switch(F){case"move":x.contains(R.row,R.column)?x={start:R,end:R}:x=o.moveText(x,R);break;case"copy":x=o.moveText(x,R,!0);break}else{var ue=ae.getData("Text");x={start:R,end:o.session.insert(R,ue)},o.focus(),F=null}return U(),p.preventDefault(ne)}},p.addListener(w,"dragstart",this.onDragStart.bind(c),o),p.addListener(w,"dragend",this.onDragEnd.bind(c),o),p.addListener(w,"dragenter",this.onDragEnter.bind(c),o),p.addListener(w,"dragover",this.onDragOver.bind(c),o),p.addListener(w,"dragleave",this.onDragLeave.bind(c),o),p.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:M,y:T};else{var Ee=h(I.x,I.y,M,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(),Me={x:{left:M-Ee.left,right:Ee.right-M},y:{top:T-Ee.top,bottom:Ee.bottom-T}},Le=Math.min(Me.x.left,Me.x.right),Xe=Math.min(Me.y.top,Me.y.bottom),Ge={row:ne.row,column:ne.column};Le/ge<=2&&(Ge.column+=Me.x.left<Me.x.right?-3:2),Xe/ce<=1&&(Ge.row+=Me.y.top<Me.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>=f&&o.renderer.scrollCursorIntoView(Ge):H=ue:H=null}function N(){var ne=R;R=o.renderer.screenToTextCoordinates(M,T),$(R,ne),C(R,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,p.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,R=null,O=0,H=null,P=null,p.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 M=o.container;M.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,p=n("../lib/event"),b=n("../lib/dom");r.addTouchListeners=function(f,g){var i="scroll",a,h,c,o,l,m,w=0,k,M=0,T=0,S=0,x,R;function O(){var $=window.navigator&&window.navigator.clipboard,C=!1,N=function(){var K=g.getCopyText(),Z=g.session.getUndoManager().hasUndo();R.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"]),R.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)),R.firstChild.style.display="none",C=!1,Z!="openCommandPalette"&&g.focus()};R=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")){R&&L();return}R||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();R.style.top=C.pageY-U.top-3+"px",C.pageX-U.left<U.width-70?(R.style.left="",R.style.right="10px"):(R.style.right="",R.style.left=N+j-U.left+"px"),R.style.display="",R.firstChild.style.display="none",g.on("input",L)}function L($){R&&(R.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 $=M>=2?g.selection.getLineRange(k.row):g.session.getBracketRange(k);$&&!$.isEmpty()?g.selection.setRange($):g.selection.selectWord(),i="wait"}p.addListener(f,"contextmenu",function($){if(x){var C=g.textInput.getElement();C.focus()}},g),p.addListener(f,"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)M++,$.preventDefault(),$.button=0,P();else{M=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,Me=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+Me,$.clientY-ge.top-ue.top+Ee),Ge=Le($.clientX-ge.left-ce.left+Me,$.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),p.addListener(f,"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),p.addListener(f,"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"),p=n("../lib/useragent"),b=n("./default_handlers").DefaultHandlers,f=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 f(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 M=l.renderer.$gutter;d.addListener(M,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),l),d.addListener(M,"click",this.onMouseEvent.bind(this,"gutterclick"),l),d.addListener(M,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),l),d.addListener(M,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),l),d.addListener(k,"mousedown",w,l),d.addListener(M,"mousedown",w,l),p.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(),R=l.renderer;!x.isEmpty()&&x.insideStart(S.row,S.column)?R.setCursorStyle("default"):R.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 M=this,T=function(F){if(F){if(p.isWebKit&&!F.which&&M.releaseMouse)return M.releaseMouse();M.x=F.clientX,M.y=F.clientY,m&&m(F),M.mouseEvent=new g(F,M.editor),M.$mouseMoved=!0}},S=function(F){w.off("beforeEndOperation",R),clearInterval(O),w.session&&x(),M[M.state+"End"]&&M[M.state+"End"](F),M.state="",M.isMousePressed=k.$isMousePressed=!1,k.$keepTextAreaAtCursor&&k.$moveTextAreaToCursor(),M.$onCaptureMouseMove=M.releaseMouse=null,F&&M.onMouseEvent("mouseup",F),w.endOperation()},x=function(){M[M.state]&&M[M.state](),M.$mouseMoved=!1};if(p.isOldIE&&l.domEvent.type=="dblclick")return setTimeout(function(){S(l)});var R=function(F){M.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(M[M.state+"End"]&&M[M.state+"End"](),M.state="",M.releaseMouse())};w.on("beforeEndOperation",R),w.startOperation({command:{name:"mouse"}}),M.$onCaptureMouseMove=T,M.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:p.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"),p=function(){function b(f){f.on("click",function(g){var i=g.getDocumentPosition(),a=f.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()),f.renderer.scrollCursorIntoView())}),f.on("gutterclick",function(g){var i=f.renderer.$gutterLayer.getRegion(g);if(i=="foldWidgets"){var a=g.getDocumentPosition().row,h=f.session;h.foldWidgets&&h.foldWidgets[a]&&f.session.onFoldWidgetClick(a,g),f.isFocused()||f.focus(),g.stop()}}),f.on("gutterdblclick",function(g){var i=f.renderer.$gutterLayer.getRegion(g);if(i=="foldWidgets"){var a=g.getDocumentPosition().row,h=f.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),f.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}g.stop()}})}return b}();r.FoldHandler=p}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(n,r,u){var d=n("../lib/keys"),p=n("../lib/event"),b=function(){function f(g){this.$editor=g,this.$data={editor:g},this.$handlers=[],this.setDefaultHandler(g.commands)}return f.prototype.setDefaultHandler=function(g){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=g,this.addKeyboardHandler(g,0)},f.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)}},f.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)}},f.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)},f.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},f.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(" ")},f.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&&p.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},f.prototype.onCommandKey=function(g,i,a){var h=d.keyCodeToString(a);return this.$callKeyboardHandlers(i,h,a,g)},f.prototype.onTextInput=function(g){return this.$callKeyboardHandlers(-1,g)},f}();r.KeyBinding=b}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(n,r,u){var d=0,p=0,b=!1,f=!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,M=5,T=6,S=7,x=8,R=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,M,T,x,M,N,N,N,N,N,N,N,N,N,N,N,N,N,N,M,M,M,T,x,k,k,F,F,F,k,k,k,k,k,O,R,O,R,R,m,m,m,m,m,m,m,m,m,m,R,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,M,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,R,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,M,H,P,I,$,C,R,F,F,F,F,F,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,R,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,Me=null,Le=null,Xe=0,Ge=null,ft=null,rt=-1,gt=null,sn=null,bn=[];if(!ce)for(gt=0,ce=[];gt<ue;gt++)ce[gt]=he(ne[gt]);for(p=d,b=!1,f=!1,g=!1,sn=0;sn<ue;sn++){if(Ee=Xe,bn[sn]=Me=te(ne,ce,bn,sn),Xe=ge[Ee][Me],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]==M&&(ae[sn]=0),p|=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(!(p<ne)){if(ne==1&&d==c&&!f){ue.reverse();return}for(var ce=ue.length,ge=0,Ee,Me,Le,Xe;ge<ce;){if(ae[ge]>=ne){for(Ee=ge+1;Ee<ce&&ae[Ee]>=ne;)Ee++;for(Me=ge,Le=Ee-1;Me<Le;Me++,Le--)Xe=ue[Me],ue[Me]=ue[Le],ue[Le]=Xe;ge=Ee}ge++}}}function te(ne,ae,ue,ce){var ge=ae[ce],Ee,Me,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 R:return ce<1||ce+1>=ae.length||(Ee=ue[ce-1])!=m&&Ee!=w||(Me=ae[ce+1])!=m&&Me!=w?k:(b&&(Me=w),Me==Ee?Me:k);case O:return Ee=ce>0?ue[ce-1]:M,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])==M?k:ue[ce-1];case M:return b=!1,f=!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),Me=[];d=ue?c:h,K(ce,Me,ce.length,ae);for(var Le=0;Le<ge.length;ge[Le]=Le,Le++);Z(2,Me,ge),Z(1,Me,ge);for(var Le=0;Le<ge.length-1;Le++)ae[Le]===w?Me[Le]=r.AN:Me[Le]===l&&(ae[Le]>S&&ae[Le]<H||ae[Le]===k||ae[Le]===N)?Me[Le]=r.ON_R:Le>0&&ce[Le-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ce[Le])&&(Me[Le-1]=Me[Le]=r.R_H,Le++);ce[ce.length-1]===r.DOT&&(Me[ce.length-1]=r.B),ce[0]==="‫"&&(Me[0]=r.RLE);for(var Le=0;Le<ge.length;Le++)Ee[Le]=Me[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"),p=n("./lib/lang"),b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,f=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
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,M){return k===" "||l.isFullWidth(k.charCodeAt(0))?(w=k===" "?l.getScreenTabSize(M+m):2,m+=w-1,p.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,M=!1,T=!1,S=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var x,R=0;R<c.length;R++)x=h.logicalFromVisual[R],o=c[R],M=x>=w&&x<k,M&&!T?S=m:!M&&T&&l.push({left:S,width:m-S}),m+=this.charWidths[o],T=M;if(M&&R===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=f}),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"),p=n("./lib/lang"),b=n("./lib/event_emitter").EventEmitter,f=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?f.fromPoints(h,h):this.isBackwards()?f.fromPoints(h,a):f.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=!f.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 f(c,0,o,this.session.getLine(o).length):new f(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=p.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=p.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 f.fromPoints(h,c)}catch{return f.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=f.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,p=2e3,b=function(){function f(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 M=k.regex,T=new RegExp("(?:("+M+")|(.))").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)?M=k.regex.replace(/\\([0-9]+)/g,function(S,x){return"\\"+(parseInt(x,10)+c+1)}):(T=1,M=this.removeCapturingGroups(k.regex)),!k.splitRegex&&typeof k.token!="string"&&m.push(k)),o[c]=w,c+=T,h.push(M),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 f.prototype.$setMaxTokenCount=function(g){p=g|0},f.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},f.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},f.prototype.removeCapturingGroups=function(g){var i=g.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(a,h){return h?"(?:":a});return i},f.prototype.createSplitterRegexp=function(g,i){if(g.indexOf("(?=")!=-1){var a=0,h=!1,c={};g.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(o,l,m,w,k,M){return h?h=k!="]":k?h=!0:w?(a==c.stack&&(c.end=M+1,c.stack=-1),a--):m&&(a++,m.length!=1&&(c.stack=a,c.start=M)),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",""))},f.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,M=0,T={type:null,value:""};m=l.exec(g);){var S=o.defaultToken,x=null,R=m[0],O=l.lastIndex;if(O-R.length>k){var F=g.substring(k,O-R.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(R,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(R){if(typeof S=="string")(!x||x.merge!==!1)&&T.type===S?T.value+=R:(T.type&&w.push(T),T={type:S,value:R});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,M++>p){for(M>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}},f}();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,p;p=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},f=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=f);if(l.push&&(l.nextState=l.next||l.push,l.next=b,delete l.push),l.rules)for(var M in l.rules)i[M]?i[M].push&&i[M].push.apply(i[M],l.rules[M]):i[M]=l.rules[M];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(p.prototype),r.TextHighlightRules=p}),ace.define("ace/mode/behaviour",["require","exports","module"],function(n,r,u){var d;d=function(){this.$behaviours={}},(function(){this.add=function(p,b,f){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[p]:this.$behaviours[p]={}}this.$behaviours[p][b]=f},this.addBehaviours=function(p){for(var b in p)for(var f in p[b])this.add(b,f,p[b][f])},this.remove=function(p){this.$behaviours&&this.$behaviours[p]&&delete this.$behaviours[p]},this.inherit=function(p,b){if(typeof p=="function")var f=new p().getBehaviours(b);else var f=p.getBehaviours(b);this.addBehaviours(f)},this.getBehaviours=function(p){if(p){for(var b={},f=0;f<p.length;f++)this.$behaviours[p[f]]&&(b[p[f]]=this.$behaviours[p[f]]);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,p=function(){function b(f,g,i){this.$session=f,this.$row=g,this.$rowTokens=f.getTokens(g);var a=f.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 f;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,f||(f=this.$session.getLength()),this.$row>=f)return this.$row=f-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 f=this.$rowTokens,g=this.$tokenIndex,i=f[g].start;if(i!==void 0)return i;for(i=0;g>0;)g-=1,i+=f[g].value.length;return i},b.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},b.prototype.getCurrentTokenRange=function(){var f=this.$rowTokens[this.$tokenIndex],g=this.getCurrentTokenColumn();return new d(this.$row,g,this.$row,g+f.value.length)},b}();r.TokenIterator=p}),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"),p=n("../behaviour").Behaviour,b=n("../../token_iterator").TokenIterator,f=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,M,T){var S=w.end.row-w.start.row;return{text:M+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,M,T,S,x){var R=T.getCursorPosition(),O=S.doc.getLine(R.row);if(x=="{"){o(T);var F=T.getSelectionRange(),L=S.doc.getTextRange(F),H=S.getTokenAt(R.row,R.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[R.column-H.start-1]!=="$"?void 0:(m.recordAutoInsert(T,S,"}"),{text:"{}",selection:[1,1]})}else if(m.isSaneInsertion(T,S))return/[\]\}\)]/.test(O[R.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(R.column,R.column+1);if(I=="}"){var $=S.$findOpeningBracket("}",{column:R.column+1,row:R.row});if($!==null&&m.isAutoInsertedClosing(R,O,x))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(x==`
186
186
  `||x==`\r
187
187
  `){o(T);var C="";m.isMaybeInsertedClosing(R,O)&&(C=f.stringRepeat("}",a.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var I=O.substring(R.column,R.column+1);if(I==="}"){var N=S.findMatchingBracket({row:R.row,column:R.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:`
@@ -1399,17 +1399,17 @@ System.register(["./main-a09e44869aaec5ab5bef.js","vue","single-spa"],function(W
1399
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 kh(t,e){const n=this||Ja,r=e||n,u=Jr.from(r.headers);let d=r.data;return $e.forEach(t,function(p){d=p.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){Rt.call(this,t??"canceled",Rt.ERR_CANCELED,e,n),this.name="CanceledError"}$e.inherits(da,Rt,{__CANCEL__:!0});function cm(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 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,p;return e=e!==void 0?e:1e3,function(b){const f=Date.now(),g=r[d];p||(p=f),n[u]=b,r[u]=f;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),f-p<e)return;const h=g&&f-g;return h?Math.round(a*1e3/h):void 0}}function B_(t,e){let n=0,r=1e3/e,u,d;const p=(b,f=Date.now())=>{n=f,u=null,d&&(clearTimeout(d),d=null),t.apply(null,b)};return[(...b)=>{const f=Date.now(),g=f-n;g>=r?p(b,f):(u=b,d||(d=setTimeout(()=>{d=null,p(u)},r-g)))},()=>u&&p(u)]}const uc=(t,e,n=3)=>{let r=0;const u=P_(50,250);return B_(d=>{const p=d.loaded,b=d.lengthComputable?d.total:void 0,f=p-r,g=u(f),i=p<=b;r=p;const a={loaded:p,total:b,progress:b?p/b:void 0,bytes:f,rate:g||void 0,estimated:g&&b&&i?(b-p)/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 p=[t+"="+encodeURIComponent(e)];$e.isNumber(n)&&p.push("expires="+new Date(n).toGMTString()),$e.isString(r)&&p.push("path="+r),$e.isString(u)&&p.push("domain="+u),d===!0&&p.push("secure"),document.cookie=p.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 p(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 f={url:d,method:d,data:d,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,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=f[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:p,auth:b}=e;e.headers=p=Jr.from(p),e.url=rm(dm(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),b&&p.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):"")));let f;if($e.isFormData(n)){if(Tr.hasStandardBrowserEnv||Tr.hasStandardBrowserWebWorkerEnv)p.setContentType(void 0);else if((f=p.getContentType())!==!1){const[g,...i]=f?f.split(";").map(a=>a.trim()).filter(Boolean):[];p.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&&p.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:p,onUploadProgress:b,onDownloadProgress:f}=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()),M={data:!p||p==="text"||p==="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()},M),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 M=r.transitional||om;r.timeoutErrorMessage&&(k=r.timeoutErrorMessage),n(new Rt(k,M.clarifyTimeoutError?Rt.ETIMEDOUT:Rt.ECONNABORTED,t,l)),l=null},u===void 0&&d.setContentType(null),"setRequestHeader"in l&&$e.forEach(d.toJSON(),function(k,M){l.setRequestHeader(M,k)}),$e.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),p&&p!=="json"&&(l.responseType=r.responseType),f&&([a,c]=uc(f,!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 Rt("Unsupported protocol "+w+":",Rt.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 Rt?i:new da(i instanceof Error?i.message:i))}};let p=e&&setTimeout(()=>{p=null,d(new Rt(`timeout ${e} of ms exceeded`,Rt.ETIMEDOUT))},e);const b=()=>{t&&(p&&clearTimeout(p),p=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),t=null)};t.forEach(g=>g.addEventListener("abort",d));const{signal:f}=r;return f.unsubscribe=()=>$e.asap(b),f}},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,p,b=f=>{p||(p=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:g,value:i}=await u.next();if(g){b(),f.close();return}let a=i.byteLength;if(n){let h=d+=a;n(h)}f.enqueue(new Uint8Array(i))}catch(g){throw b(g),g}},cancel(f){return b(f),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,Sh=mm&&ym(()=>$e.isReadableStream(new Response("").body)),dc={stream:Sh&&(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 Rt(`Response type '${e}' is not supported`,Rt.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:p,onDownloadProgress:b,onUploadProgress:f,responseType:g,headers:i,withCredentials:a="same-origin",fetchOptions:h}=fm(t);g=g?(g+"").toLowerCase():"text";let c=V_([u,d&&d.toAbortSignal()],p),o;const l=c&&c.unsubscribe&&(()=>{c.unsubscribe()});let m;try{if(f&&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[R,O]=um(m,uc(hm(f)));r=gm(S.body,vm,R,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 M=Sh&&(g==="stream"||g==="response");if(Sh&&(b||M&&l)){const S={};["status","statusText","headers"].forEach(F=>{S[F]=k[F]});const x=$e.toFiniteNumber(k.headers.get("content-length")),[R,O]=b&&um(x,uc(hm(b),!0))||[];k=new Response(gm(k.body,vm,R,()=>{O&&O(),l&&l()}),S)}g=g||"text";let T=await dc[$e.findKey(dc,g)||"text"](k,t);return!M&&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 Rt("Network Error",Rt.ERR_NETWORK,t,o),{cause:w.cause||w}):Rt.from(w,w&&w.code,t,o)}}),_h={http:g_,xhr:q_,fetch:eC};$e.forEach(_h,(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 p;if(r=n,!tC(n)&&(r=_h[(p=String(n)).toLowerCase()],r===void 0))throw new Rt(`Unknown adapter '${p}'`);if(r)break;u[p||"#"+d]=r}if(!r){const d=Object.entries(u).map(([b,f])=>`adapter ${b} `+(f===!1?"is not supported by the environment":"is not available in the build"));let p=e?d.length>1?`since :
1400
1400
  `+d.map(bm).join(`
1401
1401
  `):" "+bm(d[0]):"as no adapter specified";throw new Rt("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return r},adapters:_h};function Ch(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new da(null,t)}function xm(t){return Ch(t),t.headers=Jr.from(t.headers),t.data=kh.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 Ch(t),e.data=kh.call(t,t.transformResponse,e),e.headers=Jr.from(e.headers),e},function(e){return lm(e)||(Ch(t),e&&e.response&&(e.response.data=kh.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,p)=>{if(t===!1)throw new Rt(r(d," has been removed"+(e?" in "+e:"")),Rt.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,p):!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 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],p=e[d];if(p){const b=t[d],f=b===void 0||p(b,d,t);if(f!==!0)throw new Rt("option "+d+" must be "+f,Rt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Rt("Unknown option "+d,Rt.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 p=[];let b=!0;this.interceptors.request.forEach(function(c){typeof c.runWhen=="function"&&c.runWhen(e)===!1||(b=b&&c.synchronous,p.unshift(c.fulfilled,c.rejected))});const f=[];this.interceptors.response.forEach(function(c){f.push(c.fulfilled,c.rejected)});let g,i=0,a;if(!b){const c=[xm.bind(this),void 0];for(c.unshift.apply(c,p),c.push.apply(c,f),a=c.length,g=Promise.resolve(e);i<a;)g=g.then(c[i++],c[i++]);return g}a=p.length;let h=e;for(i=0;i<a;){const c=p[i++],o=p[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=f.length;i<a;)g=g.then(f[i++],f[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 p=new Promise(b=>{r.subscribe(b),d=b}).then(u);return p.cancel=function(){r.unsubscribe(d)},p},e(function(u,d,p){r.reason||(r.reason=new da(u,d,p),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 $h={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($h).forEach(([t,e])=>{$h[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=Rt,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=$h,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,Th=Un.create({baseURL:location.origin,timeout:6e4,params:{}});Th.interceptors.response.use(t=>t,t=>{var e,n,r,u,d,p,b,f,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=(p=t.response)==null?void 0:p.data)!=null&&b.exception?h+=`${t.response.data.exception}`:(i=(g=(f=t.response)==null?void 0:f.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:p=!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,!p&&!r.scope&&(r.scope=window.openc3Scope),Th({method:t,url:e,data:n,params:r,headers:u,onUploadProgress:b})},Ah={Accept:"application/json"},Cm={...Ah,"Content-Type":"application/json"},tj=Wi("F",{get:function(t,{params:e,headers:n=Ah,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:p}={}){return gc("put",t,{data:e,params:n,headers:r,noScope:u,noAuth:d,onUploadProgress:p})},post:function(t,{data:e,params:n,headers:r=Cm,noScope:u,noAuth:d,onUploadProgress:p}={}){return gc("post",t,{data:e,params:n,headers:r,noScope:u,noAuth:d,onUploadProgress:p})},delete:function(t,{params:e,headers:n=Ah,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 Eh 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(p=>{p.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(p=>p.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 Mm{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 p=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${p}`,u),new Promise(b=>{setTimeout(()=>{b(this.subscribe(e,n))},p)})}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((p,b)=>{let f=++fC;this.pendingSubscriptions[u]={resolve:p,reject:b,id:f},this.cable.send(this.buildSubscribeRequest(u)),this.maybeRetrySubscribe(f,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:p}=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),p===!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 Eh)):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 Rm=()=>Date.now()/1e3|0;class gC extends Mm{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=Rm()),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=Rm()),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 p of d)this.cable.send({identifier:p,command:"history",history:this.historyRequestFor(p)}),this.presenceInfo[p]&&this.cable.send({identifier:p,command:"join",presence:this.presenceInfo[p]});return this.cable.restored(d)}return this.cable.connected(this.sessionId)}if(n==="presence"){let d=u.type;if(d==="info"){let p=this.pendingPresence[r];p&&(delete this.pendingPresence[r],p.resolve(u))}else if(d==="error"){let p=this.pendingPresence[r];p&&(delete this.pendingPresence[r],p.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 Mh extends Tm{constructor(e,n){super(n),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}nc(Mh,"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:p,transportConfigurator:b}){this.emitter=mc(),this.transport=t,this.encoder=n,this.logger=r||new nl,this.protocol=e,this.performFailures=p||"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:p}=n;r?this.hub.notify(u,r,d):this.hub.transmit(u,d,p)}}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=Mh),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 p=await this.protocol.subscribe(e,n);this.hub.subscribe(r,p),this.logger.debug("subscribed",{...d,remoteId:p}),t.notify("connected")}catch(p){if(p){if(p instanceof Eh&&this.logger.warn("rejected",d),p instanceof Ui){this.logger.debug("disconnected during subscription; will retry on connect",d),u.release();return}this.logger.error("failed to subscribe",{error:p,...d})}t.close(p),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 p=await this.protocol.perform(u,e,n);return p&&this.logger.debug("perform result",{message:p,request:d}),p}catch(p){throw this.logger.error("perform failed",{error:p,request:d}),p}}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 p=t*n**d,b=p*n,f=p+(b-p)*Math.random(),g=2*(Math.random()-.5)*r;return f=f*(1+g),u&&u<f&&(f=u),f}};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:p}=n;this.format=u||"text",this.connectionOptions=n.websocketOptions,this.authStrategy=p||"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:p,fallbacks:b,logLevel:f,logger:g,transport:i,encoder:a,lazy:h,monitor:c,pingInterval:o,reconnectStrategy:l,maxMissingPings:m,maxReconnectAttempts:w,subprotocol:k,tokenRefresher:M,historyTimestamp:T,protocolOptions:S,concurrentSubscribes:x,performFailures:R,transportConfigurator:O,auth:F}=e;if(g=g||new nl(f),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 Mm({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:p,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:R,transportConfigurator:O});return c&&(c.watch(H),H.monitor=c),M&&SC(H,async()=>{try{await M(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 Mh{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 Eh?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 MC=["cable","action-cable"],RC="/cable",yc=(t,e)=>{for(let n of MC){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(RC)},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:p,maxMissingPings:b,maxReconnectAttempts:f}=e;return u=e.logger=e.logger||new AC(r),p=e.reconnectStrategy=e.reconnectStrategy||Lm(d),e.monitor!==!1&&(e.monitor=e.monitor||new EC({pingInterval:d,reconnectStrategy:p,maxMissingPings:b,maxReconnectAttempts:f,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 p=this._url+"?scope="+encodeURIComponent(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);p=new URL(p,document.baseURI).href,this._cable=FC(p)}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 vc(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&&!vc(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(vc(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(vc(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){M();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 p(){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()??p()??f("true",!0)??f("false",!1)??f("null",null);return g(),$}function f($,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"?bc(t.charCodeAt(r+2))&&bc(t.charCodeAt(r+3))&&bc(t.charCodeAt(r+4))&&bc(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]:R(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++;wc(t.charCodeAt(r));)r++;if(t.charCodeAt(r)===f$)for(r++,w($);wc(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($);wc(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(!wc(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 M(){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 R($){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 bc(t){return t>=Nh&&t<=Dh||t>=m$&&t<=w$||t>=y$&&t<=x$}function wc(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:`
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 p=[];let b=!0;this.interceptors.request.forEach(function(c){typeof c.runWhen=="function"&&c.runWhen(e)===!1||(b=b&&c.synchronous,p.unshift(c.fulfilled,c.rejected))});const f=[];this.interceptors.response.forEach(function(c){f.push(c.fulfilled,c.rejected)});let g,i=0,a;if(!b){const c=[xm.bind(this),void 0];for(c.unshift.apply(c,p),c.push.apply(c,f),a=c.length,g=Promise.resolve(e);i<a;)g=g.then(c[i++],c[i++]);return g}a=p.length;let h=e;for(i=0;i<a;){const c=p[i++],o=p[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=f.length;i<a;)g=g.then(f[i++],f[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 p=new Promise(b=>{r.subscribe(b),d=b}).then(u);return p.cancel=function(){r.unsubscribe(d)},p},e(function(u,d,p){r.reason||(r.reason=new da(u,d,p),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 $h={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($h).forEach(([t,e])=>{$h[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 qn=_m(Ja);qn.Axios=Ts,qn.CanceledError=da,qn.CancelToken=rC,qn.isCancel=lm,qn.VERSION=km,qn.toFormData=lc,qn.AxiosError=Rt,qn.Cancel=qn.CanceledError,qn.all=function(t){return Promise.all(t)},qn.spread=iC,qn.isAxiosError=oC,qn.mergeConfig=$s,qn.AxiosHeaders=Jr,qn.formToJSON=t=>sm($e.isHTMLForm(t)?new FormData(t):t),qn.getAdapter=wm.getAdapter,qn.HttpStatusCode=$h,qn.default=qn;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}=qn,Th=qn.create({baseURL:location.origin,timeout:6e4,params:{}});Th.interceptors.response.use(t=>t,t=>{var e,n,r,u,d,p,b,f,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=(p=t.response)==null?void 0:p.data)!=null&&b.exception?h+=`${t.response.data.exception}`:(i=(g=(f=t.response)==null?void 0:f.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:p=!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,!p&&!r.scope&&(r.scope=window.openc3Scope),Th({method:t,url:e,data:n,params:r,headers:u,onUploadProgress:b})},Ah={Accept:"application/json"},Cm={...Ah,"Content-Type":"application/json"},tj=Wi("F",{get:function(t,{params:e,headers:n=Ah,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:p}={}){return gc("put",t,{data:e,params:n,headers:r,noScope:u,noAuth:d,onUploadProgress:p})},post:function(t,{data:e,params:n,headers:r=Cm,noScope:u,noAuth:d,onUploadProgress:p}={}){return gc("post",t,{data:e,params:n,headers:r,noScope:u,noAuth:d,onUploadProgress:p})},delete:function(t,{params:e,headers:n=Ah,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 Eh 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(p=>{p.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(p=>p.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 Mm{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 p=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${p}`,u),new Promise(b=>{setTimeout(()=>{b(this.subscribe(e,n))},p)})}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((p,b)=>{let f=++fC;this.pendingSubscriptions[u]={resolve:p,reject:b,id:f},this.cable.send(this.buildSubscribeRequest(u)),this.maybeRetrySubscribe(f,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:p}=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),p===!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 Eh)):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 Rm=()=>Date.now()/1e3|0;class gC extends Mm{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=Rm()),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=Rm()),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 p of d)this.cable.send({identifier:p,command:"history",history:this.historyRequestFor(p)}),this.presenceInfo[p]&&this.cable.send({identifier:p,command:"join",presence:this.presenceInfo[p]});return this.cable.restored(d)}return this.cable.connected(this.sessionId)}if(n==="presence"){let d=u.type;if(d==="info"){let p=this.pendingPresence[r];p&&(delete this.pendingPresence[r],p.resolve(u))}else if(d==="error"){let p=this.pendingPresence[r];p&&(delete this.pendingPresence[r],p.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 Mh extends Tm{constructor(e,n){super(n),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}nc(Mh,"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:p,transportConfigurator:b}){this.emitter=mc(),this.transport=t,this.encoder=n,this.logger=r||new nl,this.protocol=e,this.performFailures=p||"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:p}=n;r?this.hub.notify(u,r,d):this.hub.transmit(u,d,p)}}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=Mh),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 p=await this.protocol.subscribe(e,n);this.hub.subscribe(r,p),this.logger.debug("subscribed",{...d,remoteId:p}),t.notify("connected")}catch(p){if(p){if(p instanceof Eh&&this.logger.warn("rejected",d),p instanceof Ui){this.logger.debug("disconnected during subscription; will retry on connect",d),u.release();return}this.logger.error("failed to subscribe",{error:p,...d})}t.close(p),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 p=await this.protocol.perform(u,e,n);return p&&this.logger.debug("perform result",{message:p,request:d}),p}catch(p){throw this.logger.error("perform failed",{error:p,request:d}),p}}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 p=t*n**d,b=p*n,f=p+(b-p)*Math.random(),g=2*(Math.random()-.5)*r;return f=f*(1+g),u&&u<f&&(f=u),f}};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:p}=n;this.format=u||"text",this.connectionOptions=n.websocketOptions,this.authStrategy=p||"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:p,fallbacks:b,logLevel:f,logger:g,transport:i,encoder:a,lazy:h,monitor:c,pingInterval:o,reconnectStrategy:l,maxMissingPings:m,maxReconnectAttempts:w,subprotocol:k,tokenRefresher:M,historyTimestamp:T,protocolOptions:S,concurrentSubscribes:x,performFailures:R,transportConfigurator:O,auth:F}=e;if(g=g||new nl(f),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 Mm({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:p,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:R,transportConfigurator:O});return c&&(c.watch(H),H.monitor=c),M&&SC(H,async()=>{try{await M(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 Mh{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 Eh?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 MC=["cable","action-cable"],RC="/cable",yc=(t,e)=>{for(let n of MC){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(RC)},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:p,maxMissingPings:b,maxReconnectAttempts:f}=e;return u=e.logger=e.logger||new AC(r),p=e.reconnectStrategy=e.reconnectStrategy||Lm(d),e.monitor!==!1&&(e.monitor=e.monitor||new EC({pingInterval:d,reconnectStrategy:p,maxMissingPings:b,maxReconnectAttempts:f,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 p=this._url+"?scope="+encodeURIComponent(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);p=new URL(p,document.baseURI).href,this._cable=FC(p)}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 vc(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&&!vc(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(vc(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(vc(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){M();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 p(){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()??p()??f("true",!0)??f("false",!1)??f("null",null);return g(),$}function f($,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"?bc(t.charCodeAt(r+2))&&bc(t.charCodeAt(r+3))&&bc(t.charCodeAt(r+4))&&bc(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]:R(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++;wc(t.charCodeAt(r));)r++;if(t.charCodeAt(r)===f$)for(r++,w($);wc(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($);wc(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(!wc(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 M(){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 R($){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 bc(t){return t>=Nh&&t<=Dh||t>=m$&&t<=w$||t>=y$&&t<=x$}function wc(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
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(f,g){if(Array.isArray(r)){const i=r.find(a=>a.test(f));if(i){const a=i.stringify(f);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 f=="boolean"||typeof f=="number"||typeof f=="string"||f===null||f instanceof Date||f instanceof Boolean||f instanceof Number||f instanceof String)return JSON.stringify(f);if(f!=null&&f.isLosslessNumber||typeof f=="bigint")return f.toString();if(Array.isArray(f))return d(f);if(f&&typeof f=="object")return p(f)}function d(f,g){if(f.length===0)return"[]";let i="[";for(let a=0;a<f.length;a++){const h=f[a];typeof h<"u"&&typeof h!="function"?i+=u(h):i+="null",a<f.length-1&&(i+=",")}return i+="]",i}function p(f,g){if(typeof f.toJSON=="function")return Hm(f.toJSON(),e,n,void 0);const i=Array.isArray(e)?e.map(String):Object.keys(f);if(i.length===0)return"{}";let a=!0,h="{";for(const c of i){const o=f[c];if(b(c,o)){a?a=!1:h+=",";const l=JSON.stringify(c);h+=`${l}:`,h+=u(o)}}return h+="}",h}function b(f,g){return typeof g<"u"&&typeof g!="function"&&typeof g!="symbol"}}function k$(t){return vc(t)&&!Fm(t)?BigInt(t):parseFloat(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 Th.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:[(p,b)=>Hm(p)],transformResponse:[p=>JC(p,void 0,k$)]})).data.result}catch(p){let b=new Error;throw p.response?(b.name=p.response.data.error.data.class,b.message=p.response.data.error.data.message,b.object=p.response.data.error):p.request?(b.name="Request error",b.message="Request error, no response received"):b=p,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 p=d.length,b=null;for(let f=0;f<p;f++)b=this.decode_openc3_type(d[f][1]),b!==null&&(d[f][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 p=d[0].length,b=null;for(let f=0;f<p;f++)b=this.decode_openc3_type(d[0][f]),b!==null&&(d[0][f]=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 p=this.decode_openc3_type(d);return p!==null&&(d=p),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 p=null;for(let b in u)Object.prototype.hasOwnProperty.call(u,b)&&(p=this.encode_openc3_type(u[b]),p!==null&&(u[b]=p));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 M=/^\s*/.exec(w)[0];m.replace(new b(o,k.start,o,k.end),`
1404
- `+M)}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+/,""),R=S+" "+x,k=a(R,h,5);if(k&&k.start>S.length||R.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 p(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,f=n("../editor").Editor;n("../config").defineOptions(f.prototype,"editor",{hardWrap:{set:function(g){g?this.commands.on("afterExec",p):this.commands.off("afterExec",p)},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 p(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 f(v){v.setOption("disableInput",!0),v.setOption("showCursorWhenSelecting",!1),je.signal(v,"vim-mode-change",{mode:"normal"}),v.on("cursorActivity",is),R(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 M(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 R(v){return v.state.vim||(v.state.vim={inputState:new $,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),v.state.vim}function O(){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=R(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=Me(v,re.keys))||(B=="partial"&&W.push(re),B=="full"&&V.push(re))}return{partial:W.length&&W,full:V.length&&V}}function Me(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]:Ri[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=Ri[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 Rr(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?Ri: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 Rn(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 Ma(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=Ma(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 Ra(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 _=Ra(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=Rn(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 _=Rn(v);_.highlightTimeout=mr,mr=setTimeout(function(){if(v.state.vim){var D=Rn(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=Rn(v);A.highlightTimeout&&(clearTimeout(A.highlightTimeout),A.highlightTimeout=null),v.removeOverlay(Rn(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",Mo),_.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 Mo(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 Ro(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 Mi(v,A){A.off("beforeEndOperation",Mi);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 p(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(p(B.cursor==B.end?B.start:B.end)),head:this.clipPos(p(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 p(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 p(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 p(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 p(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&&p(se.start)},to:function(){return se&&p(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&&p(D)}},this.findMatchingTag=function(_){var D=this.ace.session.getMatchingTags(d(_));if(D)return{open:{from:p(D.openTag.start),to:p(D.openTag.end)},close:{from:p(D.closeTag.start),to:p(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 p(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:p(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 p(_.$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{
1404
+ `+M)}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+/,""),R=S+" "+x,k=a(R,h,5);if(k&&k.start>S.length||R.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 p(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,f=n("../editor").Editor;n("../config").defineOptions(f.prototype,"editor",{hardWrap:{set:function(g){g?this.commands.on("afterExec",p):this.commands.off("afterExec",p)},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 p(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 f(v){v.setOption("disableInput",!0),v.setOption("showCursorWhenSelecting",!1),je.signal(v,"vim-mode-change",{mode:"normal"}),v.on("cursorActivity",is),R(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,yr&&clearTimeout(yr)}function i(v){var A=v.state.vim;return A.onPasteFn||(A.onPasteFn=function(){A.insertMode||(v.setCursor(ge(v.getCursor(),0,1)),Wn.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 M(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=Bn()}function R(v){return v.state.vim||(v.state.vim={inputState:new $,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),v.state.vim}function O(){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"?Cn.value=Y:Cn=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=Cn.value,W={key:Oi[_],target:{value:B,selectionEnd:B.length,selectionStart:B.length}};Cn.onKeyDown&&Cn.onKeyDown(W,Cn.value,A),Cn&&Cn.onKeyUp&&Cn.onKeyUp(W,Cn.value,A);return}}if(v==`
1406
+ `){var V=Cn;Cn=null,V.onClose&&V.onClose(V.value)}else Cn.value=(Cn.value||"")+v}function L(v,A,_){var D=pn;if(_){if(Hr.indexOf(_)!=-1)return;Hr.push(_),pn=_.noremap!=0}try{for(var B=R(v),W=/<(?:[CSMA]-)*\w+>|./gi,V;V=W.exec(A);){var Y=V[0],Q=B.insertMode;if(Cn){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&&Cn){var ke=Cn;Cn=null,Ir(v,ke)}}}function H(v,A){var _=v.key;if(!Ur[_]){_.length>1&&_[0]=="n"&&(_=_.replace("Numpad","")),_=sr[_]||_;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(Qn.keymap&&_ in Qn.keymap)(Qn.remapCtrl!=0||!D)&&(_=Qn.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){Qn.string!==v&&(Qn=I(v)),Qn.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){Wn[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=Me(v,re.keys))||(B=="partial"&&W.push(re),B=="full"&&V.push(re))}return{partial:W.length&&W,full:V.length&&V}}function Me(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 bn(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 wn(v){return v.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Dn(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 Fn(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 or(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]:Ri[0];if(B&&/\s/.test(re.charAt(me)))De=function(Sn){return/\s/.test(Sn)};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=Ri[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 Tn(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 Rr(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?Ri: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 Yn(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 Ln(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 Ma(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 mr)if(A.match(B,!0)){D=!0,_.push(mr[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=Ma(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 Ra(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=""),Cn=A;return}var _=Ra(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 Xn(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 xn(v,A,_,D){if(A){var B=Ln(v),W=eo(A,!!_,!!D);if(W)return Ai(v,W),Xn(W,B.getQuery())||B.setQuery(W),W}}function Pn(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(yr);var _=Ln(v);_.highlightTimeout=yr,yr=setTimeout(function(){if(v.state.vim){var D=Ln(v);D.highlightTimeout=null;var B=D.getOverlay();(!B||A!=B.query)&&(B&&v.removeOverlay(B),B=Pn(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=Ln(v);A.highlightTimeout&&(clearTimeout(A.highlightTimeout),A.highlightTimeout=null),v.removeOverlay(Ln(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),Sn=W.to().line;W.replace(nt),Ve=W.to().line,B+=Ve-Sn,ct=Ve<Sn}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,Sn){je.e_stop(Je);var ht=H(Je);switch(ht){case"y":se(),ke();break;case"n":ke();break;case"a":var An=Q;Q=void 0,v.operation(re),Q=An;break;case"l":se();case"q":case"<Esc>":case"<C-c>":case"<C-[>":me(Sn)}return De&&me(Sn),!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",Mo),_.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&&dr(D)}function ns(v){On.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 dr(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 Mo(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?jn.processAction(v,A,A.lastEditActionCommand):jn.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&&(or(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(Qn.keymap&&A in Qn.keymap)(Qn.remapCtrl!==!1||!B)&&(A=Qn.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 Ro(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 Mi(v,A){A.off("beforeEndOperation",Mi);var _=A.state.cm.vimCmd;_&&A.execCommand(_.exec?_:_.name,_.args),A.curOp=A.prevOp}var pr=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 p(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(p(B.cursor==B.end?B.start:B.end)),head:this.clipPos(p(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=pr.comparePoints(se,ve)<0?new pr.fromPoints(se,ve):new pr.fromPoints(ve,se);return ke.cursor=pr.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 p(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=pr.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:pr.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 p(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 p(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 p(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&&p(se.start)},to:function(){return se&&p(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 pr(_.line,_.ch,D.line,D.ch))},this.replaceRange=function(_,D,B){B||(B=D);var W=new pr(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&&p(D)}},this.findMatchingTag=function(_){var D=this.ace.session.getMatchingTags(d(_));if(D)return{open:{from:p(D.openTag.start),to:p(D.openTag.end)},close:{from:p(D.closeTag.start),to:p(D.closeTag.end)}}},this.indentLine=function(_,D){D===!0?this.ace.session.indentRows(_,_," "):D===!1&&this.ace.session.outdentRows(new pr(_,0,_,0))},this.indexFromPos=function(_){return this.ace.session.doc.positionToIndex(d(_))},this.posFromIndex=function(_){return p(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:p(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 p(_.$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
1413
  border: none;
1414
1414
  background-color: rgba(255,0,0,0.5);
1415
1415
  }
@@ -1442,38 +1442,38 @@ System.register(["./main-a09e44869aaec5ab5bef.js","vue","single-spa"],function(W
1442
1442
  width: 20em;
1443
1443
  color: inherit;
1444
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)}],Ri=[function(v){return/\S/.test(v)}],wo=["<",">"],an=["-",'"',".",":","_","/","+"],nn=/^\w$/,ln;try{ln=new RegExp("^[\\p{Lu}]$","u")}catch{ln=/^[A-Z]$/}var Gt={};M("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",_)}}),M("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:f,leaveVimMode:g,buildKeyMap:function(){},getRegisterController:function(){return ze.registerController},resetVimGlobalState_:O,getVimGlobalState_:function(){return ze},maybeInitVimState_:R,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:M,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:Ro,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=R(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,R(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}),M("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)!==`
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,On=[{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=On.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"}],Qn=I(""),Da=/[\d]/,Do=[je.isWordChar,function(v){return v&&!je.isWordChar(v)&&!/\s/.test(v)}],Ri=[function(v){return/\S/.test(v)}],wo=["<",">"],an=["-",'"',".",":","_","/","+"],nn=/^\w$/,ln;try{ln=new RegExp("^[\\p{Lu}]$","u")}catch{ln=/^[A-Z]$/}var Gt={};M("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",_)}}),M("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}},Bn=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,kn,St={enterVimMode:f,leaveVimMode:g,buildKeyMap:function(){},getRegisterController:function(){return ze.registerController},resetVimGlobalState_:O,getVimGlobalState_:function(){return ze},maybeInitVimState_:R,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=On.length,_=No,D=On.slice(0,A-_);if(On=On.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:M,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:Ro,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=jn.matchCommand(re,On,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),kn&&window.clearTimeout(kn),kn=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,kn&&window.clearTimeout(kn),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=jn.matchCommand(ke,On,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=R(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):jn.processCommand(v,Y,Q)}catch(re){throw v.state.vim=void 0,R(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,Cn,sr={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(sr)).forEach(function(v){Oi[(sr[v]||"").toLowerCase()]=Oi[v.toLowerCase()]=v}),M("langmap",void 0,"string",["lmap"],function(v,A){if(v===void 0)return Qn.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(Bn(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
1447
  `&&(_+=`
1448
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;Rn(v).setReversed(!Y);var re=Y?"/":"?",se=Rn(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?(Rr(v,ct,Ne),delete Ve.cachedCursor):Rr(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=Rn(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=Rn(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",Mo),_.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?`
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 jn={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,_),Wn[_.action](v,V,A)},processSearch:function(v,A,_){function D(Ne,Ve,ct){ze.searchHistoryController.pushInput(Ne),ze.searchHistoryController.reset();try{xn(v,Ne,Ve,ct)}catch{Kt(v,"Invalid regex: "+Ne),C(v);return}jn.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,Sn;Je=="<Up>"||Je=="<Down>"?(nt=Je=="<Up>",Sn=Ne.target?Ne.target.selectionEnd:0,Ve=ze.searchHistoryController.nextMatch(Ve,nt)||"",ct(Ve),Sn&&Ne.target&&(Ne.target.selectionEnd=Ne.target.selectionStart=Math.min(Sn,Ne.target.value.length))):Je&&Je!="<Left>"&&Je!="<Right>"&&ze.searchHistoryController.reset();var ht;try{ht=xn(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(),xn(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;Ln(v).setReversed(!Y);var re=Y?"/":"?",se=Ln(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=wn(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?(Rr(v,ct,Ne),delete Ve.cachedCursor):Rr(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),Sn=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+Sn):Je.head.line==Je.anchor.line?me=new Fe(ke.line,ke.ch+Sn):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,An,Tt,It,ar;if(A.visualMode){ht=gt(Q.head,Q.anchor),An=sn(Q.head,Q.anchor),Tt=A.visualLine||V.linewise,It=A.visualBlock?"block":Tt?"line":"char";var vr=b(v,ht,An);if(ar=mt(v,{anchor:vr.start,head:vr.end},It),Tt){var En=ar.ranges;if(It=="block")for(var q=0;q<En.length;q++)En[q].head.ch=Jt(v,En[q].head.line);else It=="line"&&(En[0].head=new Fe(En[0].head.line+1,0))}}else{if(ht=Ge(be||ke),An=Ge(me||ve),rt(An,ht)){var X=ht;ht=An,An=X}Tt=B.linewise||V.linewise,Tt?Dt(v,ht,An):B.forward&&Pt(v,ht,An),It="char";var ie=!B.inclusive||Tt,vr=b(v,ht,An);ar=mt(v,{anchor:vr.start,head:vr.end},It,ie)}v.setSelections(ar.ranges,ar.primary),A.lastMotion=null,V.repeat=De,V.registerName=Y,V.linewise=Tt;var oe=us[W](v,V,ar.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=Ln(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=Ln(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?bn(V,Q,B):bn(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=Yn(v,A,V,Y),!Q){var se=v.getSearchCursor(new RegExp("\\"+V,"g"),A);se.find()&&(Q=Yn(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=Tn(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),Wn.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}},Wn={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",Mo),_.insertEnd&&_.insertEnd.clear(),_.insertEnd=v.setBookmark(W,{insertLeft:!0}),je.on(v.getInputField(),"keydown",Gs)),_.visualMode&&Ct(v),or(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(En){var q=En.split(" ").length-1,X=En.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(En){var q=re+(Y(En)-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
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
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
1453
  `+D.slice(0,D.length-1)+`
1454
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==`
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],Sn=v.getSelection(),ht=v.listSelections(),An=new Array(ht.length).join("1").split("1");_.lastSelection&&(Ve=_.lastSelection.headMark.find()),ze.registerController.unnamedRegister.setText(Sn),be?(v.replaceSelections(An),nt=new Fe(Je.line+D.length-1,Je.ch),v.setCursor(Je),Fn(v,nt),v.replaceSelections(D),Ne=Je):_.visualBlock?(v.replaceSelections(An),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&&Dn(v,Tt,W.ch)}v.setCursor(W),Fn(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||Wn.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
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
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}}};M("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----------
1459
+ `,"\\r":"\r","\\t":" "},mr={"\\/":"/","\\\\":"\\","\\n":`
1460
+ `,"\\r":"\r","\\t":" ","\\&":"&"},yr=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=_),On.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<On.length;B++)if(D==On[B].keys&&On[B].context===A)return On.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){jn.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
1461
 
1462
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
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=Rn(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=Rn(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;M("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=Rn(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=Ro(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,f(_),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)}),M("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",Mi):Mi(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 xc={exports:{}};/**
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 ar=It[1].indexOf("d")!=-1||It[1].indexOf("n")!=-1&&1,vr=It[1].indexOf("x")!=-1&&1,En=It[1].indexOf("o")!=-1&&1;if(ar+vr+En>1)return"Invalid arguments";Q=ar&&"decimal"||vr&&"hex"||En&&"octal"}It[2]&&(re=new RegExp(It[2].substr(1,It[2].length-2),V?"i":""))}}function D(Tt,It){if(W){var ar;ar=Tt,Tt=It,It=ar}V&&(Tt=Tt.toLowerCase(),It=It.toLowerCase());var vr=Q&&Ne.exec(Tt),En=Q&&Ne.exec(It);return vr?(vr=parseInt((vr[1]+vr[2]).toLowerCase(),Ve),En=parseInt((En[1]+En[2]).toLowerCase(),Ve),vr-En):Tt<It?-1:1}function B(Tt,It){if(W){var ar;ar=Tt,Tt=It,It=ar}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 Sn=re?De[nt].match(re):null;Sn&&Sn[0]!=""?ct.push(Sn):!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,An;De=[];for(var nt=0;nt<ht.length;nt++)ht[nt]!=An&&De.push(ht[nt]),An=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{xn(v,Y,!0,!0)}catch{Kt(v,"Invalid regex: "+Y);return}for(var re=Ln(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{xn(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=Ln(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)),Wn.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;M("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?pr.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=Ln(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=Ro(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,f(_),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")}),On.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"}}),On.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)}),M("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)}}),Wn.aceCommand=function(v,A,_){v.vimCmd=A,v.ace.inVirtualSelectionMode?v.ace.on("beforeEndOperation",Mi):Mi(null,v.ace)},Wn.fold=function(v,A,_){v.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(A.all?2:0)+(A.open?1:0)])},No=On.length,r.handler.defaultKeymap=On,r.handler.actions=Wn,r.Vim=St}),function(){ace.require(["ace/keyboard/vim"],function(n){t&&(t.exports=n)})}()}(qm)),qm.exports}S$();var xc={exports:{}};/**
1468
1468
  * @license
1469
1469
  * Lodash <https://lodash.com/>
1470
1470
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
1471
1471
  * Released under MIT license <https://lodash.com/license>
1472
1472
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1473
1473
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1474
- */var _$=xc.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.",p="Expected a function",b="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",g=500,i="__lodash_placeholder__",a=1,h=2,c=4,o=1,l=2,m=1,w=2,k=4,M=8,T=16,S=32,x=64,R=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",R],["bind",m],["bindKey",w],["curry",M],["curryRight",T],["flip",F],["partial",S],["partialRight",x],["rearg",O]],ue="[object Arguments]",ce="[object Array]",ge="[object AsyncFunction]",Ee="[object Boolean]",Me="[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]",Rr="[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),Rn=/^\s+/,Or=/\s/,go=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ji=/\{\n\/\* \[wrapped with (.+)\] \*/,Hs=/,? & /,Ma=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Sl=/[()=,{}\[\]\/\s]/,_l=/\\(\\)?/g,eo=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,mi=/\w*$/,Kt=/^[-+]0x[0-9a-f]+$/i,Ra=/^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,Mo="['’]",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+")",Ro="[^"+Ei+"]",Mi="(?:\\ud83c[\\udde6-\\uddff]){2}",dr="[\\ud800-\\udbff][\\udc00-\\udfff]",vo="["+rs+"]",to="\\u200d",Oa="(?:"+ss+"|"+as+")",Cl="(?:"+vo+"|"+as+")",Lo="(?:"+Mo+"(?:d|ll|m|re|s|t|ve))?",no="(?:"+Mo+"(?:D|LL|M|RE|S|T|VE))?",Oo=ls+"?",cs="["+hr+"]?",Io="(?:"+to+"(?:"+[Ro,Mi,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,Mi,dr].join("|")+")"+je,Fe="(?:"+[Ro+yo+"?",yo,Mi,dr,is].join("|")+")",Ln=RegExp(Mo,"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 ]/,Ri=["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[Rr]=!0,an[ue]=an[ce]=an[He]=an[Ee]=an[Qe]=an[Me]=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[Me]=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[Rr]=!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(Ma)||[]}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(Rn,"")}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 Re(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,Ri));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__"],pu=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:""}(),fu=Wn.toString,mI=pu.call(Bt),yI=pn._,vI=qr("^"+pu.call(dn).replace(Lr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),gu=Ur?_e.Buffer:n,hs=_e.Symbol,mu=_e.Uint8Array,Gw=gu?gu.allocUnsafe:n,yu=Be(Bt.getPrototypeOf,Bt),Yw=Bt.create,Xw=Wn.propertyIsEnumerable,vu=vr.splice,Qw=hs?hs.isConcatSpreadable:n,$l=hs?hs.iterator:n,Zs=hs?hs.toStringTag:n,bu=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,wu=en.ceil,xu=en.floor,Tp=Bt.getOwnPropertySymbols,kI=gu?gu.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"),ku=Al&&new Al,Pa={},AI=ia(Ap),EI=ia(Tl),MI=ia(Ep),RI=ia(Fa),LI=ia(Al),Su=hs?hs.prototype:n,Ml=Su?Su.valueOf:n,e0=Su?Su.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 _u(){}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=_u.prototype,J.prototype.constructor=J,Di.prototype=Ba(_u.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(_u.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===f?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?f: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=Cu(y,s);if(E<0)return!1;var z=y.length-1;return E==z?y.pop():vu.call(y,E,1),--this.size,!0}function HI(s){var y=this.__data__,E=Cu(y,s);return E<0?n:y[E][1]}function UI(s){return Cu(this.__data__,s)>-1}function qI(s,y){var E=this.__data__,z=Cu(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=Fu(this,s).delete(s);return this.size-=y?1:0,y}function GI(s){return Fu(this,s).get(s)}function YI(s){return Fu(this,s).has(s)}function XI(s,y){var E=Fu(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,f),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 Pu(li(s),ta(y,0,s.length))}function o2(s){return Pu(li(s))}function Mp(s,y,E){(E!==n&&!io(s[y],E)||E===n&&!(y in s))&&jo(s,y,E)}function Rl(s,y,E){var z=s[y];(!(dn.call(s,y)&&io(z,E))||E===n&&!(y in s))&&jo(s,y,E)}function Cu(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__"&&bu?bu(s,y,{configurable:!0,enumerable:!0,value:E,writable:!0}):s[y]=E}function Rp(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]),Rl(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(p);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 $u(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 Tu(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)==Me}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)&&Uu(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 Au(s,y,E,z,G){s!==y&&Lp(y,function(ee,le){if(G||(G=new ro),On(ee))S2(s,y,le,E,Au,z,G);else{var de=z?z(rf(s,le),ee,le+"",s,y,G):n;de===n&&(de=ee),Mp(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){Mp(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)),Mp(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&&vu.call(de,ye,1),vu.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)?vu.call(s,G,1):Hp(s,G)}}return s}function jp(s,y){return s+xu(Jw()*(y-s+1))}function $2(s,y,E,z){for(var G=-1,ee=pr(wu((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=xu(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 Pu(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])?[]:{})}Rl(de,ye,Oe),de=de[ye]}return s}var w0=ku?function(s,y){return ku.set(s,y),s}:hi,E2=bu?function(s,y){return bu(s,"toString",{configurable:!0,enumerable:!1,value:gf(y),writable:!0})}:hi;function M2(s){return Pu(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 R2(s,y){var E;return ds(s,function(z,G,ee){return E=y(z,G,ee),!E}),!!E}function Eu(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=xu((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 Mu(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 mu(y).set(new mu(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 Ml?Bt(Ml.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 M0(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 R0(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):Rl(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(Rx(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,Lu,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(p);if(G&&!le&&Du(ee)=="wrapper")var le=new Di([],!0)}for(z=le?z:E;++z<E;){ee=y[z];var de=Du(ee),ye=de=="wrapper"?Zp(ee):n;ye&&nf(ye[0])&&ye[1]==(R|M|S|O)&&!ye[4].length&&ye[9]==1?le=le[Du(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 Lu(s,y,E,z,G,ee,le,de,ye,Oe){var Ie=y&R,Pe=y&m,Ye=y&w,st=y&(M|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=M0(Qt,z,G,st)),ee&&(Qt=R0(Qt,ee,le,st)),qt-=Ci,st&&qt<Oe){var Zn=We(Qt,Gr);return B0(s,y,Lu,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 Ou(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 Iu(s,y){y=y===n?" ":ki(y);var E=y.length;if(E<2)return E?Wp(y,s):y;var z=Wp(y,wu(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 Nu(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&M,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?Re(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(p);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&(M|T)&&(y&=-25),!y||y==m)var bt=B2(s,y,E);else y==M||y==T?bt=j2(s,y,de):(y==S||y==(m|S))&&!G.length?bt=W2(s,y,E,z):bt=Lu.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),Au(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 mu(s),new mu(y)));case Ee:case Me: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=Re;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(Ml)return Ml.call(s)==Ml.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=ku?function(s){return ku.get(s)}:vf;function Du(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 Fu(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=fu.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=yu(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 MI:return Jt;case RI: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&&Uu(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(yu(s)):{}}function X2(s,y,E){var z=s.constructor;switch(y){case He:return Kp(s);case Ee:case Me: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 Rr: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,`{
1474
+ */var _$=xc.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.",p="Expected a function",b="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",g=500,i="__lodash_placeholder__",a=1,h=2,c=4,o=1,l=2,m=1,w=2,k=4,M=8,T=16,S=32,x=64,R=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",R],["bind",m],["bindKey",w],["curry",M],["curryRight",T],["flip",F],["partial",S],["partialRight",x],["rearg",O]],ue="[object Arguments]",ce="[object Array]",ge="[object AsyncFunction]",Ee="[object Boolean]",Me="[object Date]",Le="[object DOMException]",Xe="[object Error]",Ge="[object Function]",ft="[object GeneratorFunction]",rt="[object Map]",gt="[object Number]",sn="[object Null]",bn="[object Object]",Jt="[object Promise]",xr="[object Proxy]",wn="[object RegExp]",Dn="[object Set]",Fn="[object String]",or="[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]",Tn="[object Uint16Array]",Rr="[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*$/,Yn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Lr=/[\\^$.*+?()[\]{}|]/g,Zi=RegExp(Lr.source),Ln=/^\s+/,Or=/\s/,go=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ji=/\{\n\/\* \[wrapped with (.+)\] \*/,Hs=/,? & /,Ma=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Sl=/[()=,{}\[\]\/\s]/,_l=/\\(\\)?/g,eo=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,mi=/\w*$/,Kt=/^[-+]0x[0-9a-f]+$/i,Ra=/^0b[01]+$/i,Ir=/^\[object .+?Constructor\]$/,Xn=/^0o[0-7]+$/i,xn=/^(?:0|[1-9]\d*)$/,Pn=/[\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",dr="\\ufe0e\\ufe0f",Ks=si+ns+qs+Vs,Mo="['’]",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+")",Ro="[^"+Ei+"]",Mi="(?:\\ud83c[\\udde6-\\uddff]){2}",pr="[\\ud800-\\udbff][\\udc00-\\udfff]",vo="["+rs+"]",to="\\u200d",Oa="(?:"+ss+"|"+as+")",Cl="(?:"+vo+"|"+as+")",Lo="(?:"+Mo+"(?:d|ll|m|re|s|t|ve))?",no="(?:"+Mo+"(?:D|LL|M|RE|S|T|VE))?",Oo=ls+"?",cs="["+dr+"]?",Io="(?:"+to+"(?:"+[Ro,Mi,pr].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,Mi,pr].join("|")+")"+je,Fe="(?:"+[Ro+yo+"?",yo,Mi,pr,is].join("|")+")",On=RegExp(Mo,"g"),No=RegExp(yo,"g"),yi=RegExp(Ys+"(?="+Ys+")|"+Fe+je,"g"),Qn=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+dr+"]"),Do=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ri=["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[Tn]=an[Rr]=!0,an[ue]=an[ce]=an[He]=an[Ee]=an[Qe]=an[Me]=an[Xe]=an[Ge]=an[rt]=an[gt]=an[bn]=an[wn]=an[Dn]=an[Fn]=an[qe]=!1;var nn={};nn[ue]=nn[ce]=nn[He]=nn[Qe]=nn[Ee]=nn[Me]=nn[mt]=nn[$t]=nn[Ct]=nn[Pt]=nn[Dt]=nn[rt]=nn[gt]=nn[bn]=nn[wn]=nn[Dn]=nn[Fn]=nn[or]=nn[pt]=nn[kt]=nn[Tn]=nn[Rr]=!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;":"'"},Bn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ze=parseFloat,kn=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")(),Cn=e&&!e.nodeType&&e,sr=Cn&&!0&&t&&!t.nodeType&&t,Ur=sr&&sr.exports===Cn,Oi=Ur&&St.process,jn=function(){try{var pe=sr&&sr.require&&sr.require("util").types;return pe||Oi&&Oi.binding&&Oi.binding("util")}catch{}}(),ai=jn&&jn.isArrayBuffer,us=jn&&jn.isDate,Wn=jn&&jn.isMap,vi=jn&&jn.isRegExp,bi=jn&&jn.isSet,Ii=jn&&jn.isTypedArray;function mr(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 yr(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(Ma)||[]}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 Sn(pe){return pe&&pe.slice(0,Wt(pe)+1).replace(Ln,"")}function ht(pe){return function(_e){return pe(_e)}}function An(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 ar(pe,_e){for(var xe=pe.length;xe--&&se(_e,pe[xe],0)>-1;);return xe}function vr(pe,_e){for(var xe=pe.length,Ue=0;xe--;)pe[xe]===_e&&++Ue;return Ue}var En=De(ln),q=De(Gt);function X(pe){return"\\"+Bn[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 Re(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)?yn(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 yn(pe){return pe.match(yi)||[]}function Mn(pe){return pe.match(Qn)||[]}var lr=function pe(_e){_e=_e==null?pn:Xt.defaults(pn.Object(),_e,Xt.pick(pn,Ri));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,br=xe.prototype,Fo=Nt.prototype,zn=Bt.prototype,Qs=_e["__core-js_shared__"],pu=Fo.toString,dn=zn.hasOwnProperty,gI=0,Kw=function(){var s=/[^.]+$/.exec(Qs&&Qs.keys&&Qs.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),fu=zn.toString,mI=pu.call(Bt),yI=pn._,vI=qr("^"+pu.call(dn).replace(Lr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),gu=Ur?_e.Buffer:n,hs=_e.Symbol,mu=_e.Uint8Array,Gw=gu?gu.allocUnsafe:n,yu=Be(Bt.getPrototypeOf,Bt),Yw=Bt.create,Xw=zn.propertyIsEnumerable,vu=br.splice,Qw=hs?hs.isConcatSpreadable:n,$l=hs?hs.iterator:n,Zs=hs?hs.toStringTag:n,bu=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,wu=en.ceil,xu=en.floor,Tp=Bt.getOwnPropertySymbols,kI=gu?gu.isBuffer:n,Zw=_e.isFinite,SI=br.join,_I=Be(Bt.keys,Bt),fr=en.max,Fr=en.min,CI=Ue.now,$I=_e.parseInt,Jw=en.random,TI=br.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"),ku=Al&&new Al,Pa={},AI=ia(Ap),EI=ia(Tl),MI=ia(Ep),RI=ia(Fa),LI=ia(Al),Su=hs?hs.prototype:n,Ml=Su?Su.valueOf:n,e0=Su?Su.toString:n;function J(s){if(Hn(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(!In(y))return{};if(Yw)return Yw(y);s.prototype=y;var E=new s;return s.prototype=n,E}}();function _u(){}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=_u.prototype,J.prototype.constructor=J,Di.prototype=Ba(_u.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(_u.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===f?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?f: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=Cu(y,s);if(E<0)return!1;var z=y.length-1;return E==z?y.pop():vu.call(y,E,1),--this.size,!0}function HI(s){var y=this.__data__,E=Cu(y,s);return E<0?n:y[E][1]}function UI(s){return Cu(this.__data__,s)>-1}function qI(s,y){var E=this.__data__,z=Cu(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=Fu(this,s).delete(s);return this.size-=y?1:0,y}function GI(s){return Fu(this,s).get(s)}function YI(s){return Fu(this,s).has(s)}function XI(s,y){var E=Fu(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,f),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 Pu(li(s),ta(y,0,s.length))}function o2(s){return Pu(li(s))}function Mp(s,y,E){(E!==n&&!io(s[y],E)||E===n&&!(y in s))&&jo(s,y,E)}function Rl(s,y,E){var z=s[y];(!(dn.call(s,y)&&io(z,E))||E===n&&!(y in s))&&jo(s,y,E)}function Cu(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,wr(y),s)}function a2(s,y){return s&&ko(y,ui(y),s)}function jo(s,y,E){y=="__proto__"&&bu?bu(s,y,{configurable:!0,enumerable:!0,value:E,writable:!0}):s[y]=E}function Rp(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(!In(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==bn||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:wr,jt=Ie?n:bt(s);return Sr(jt||s,function(wt,qt){jt&&(qt=wt,wt=s[qt]),Rl(le,qt,Fi(wt,y,E,qt,s,ee))}),le}function l2(s){var y=wr(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(p);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 $u(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,wr)}function Op(s,y){return s&&l0(s,y,wr)}function Tu(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<fr(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:mr(z,s,E)}function u0(s){return Hn(s)&&Vr(s)==ue}function g2(s){return Hn(s)&&Vr(s)==He}function m2(s){return Hn(s)&&Vr(s)==Me}function Il(s,y,E,z,G){return s===y?!0:s==null||y==null||!Hn(s)&&!Hn(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?bn:ye,Oe=Oe==ue?bn:Oe;var Ie=ye==bn,Pe=Oe==bn,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 Hn(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(!In(s)||eN(s))return!1;var y=Uo(s)?vI:Ir;return y.test(ia(s))}function b2(s){return Hn(s)&&Vr(s)==wn}function w2(s){return Hn(s)&&Pr(s)==Dn}function x2(s){return Hn(s)&&Uu(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(!In(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 Au(s,y,E,z,G){s!==y&&Lp(y,function(ee,le){if(G||(G=new ro),In(ee))S2(s,y,le,E,Au,z,G);else{var de=z?z(rf(s,le),ee,le+"",s,y,G):n;de===n&&(de=ee),Mp(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){Mp(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:Zn(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):(!In(de)||Uo(de))&&(Ie=V0(ye))):Pe=!1}Pe&&(le.set(ye,Ie),G(Ie,ye,z,ee,le),le.delete(ye)),Mp(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&&vu.call(de,ye,1),vu.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)?vu.call(s,G,1):Hp(s,G)}}return s}function jp(s,y){return s+xu(Jw()*(y-s+1))}function $2(s,y,E,z){for(var G=-1,ee=fr(wu((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=xu(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 Pu(E,ta(y,0,E.length))}function Nl(s,y,E,z){if(!In(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=In(Ie)?Ie:Ho(y[G+1])?[]:{})}Rl(de,ye,Oe),de=de[ye]}return s}var w0=ku?function(s,y){return ku.set(s,y),s}:hi,E2=bu?function(s,y){return bu(s,"toString",{configurable:!0,enumerable:!1,value:gf(y),writable:!0})}:hi;function M2(s){return Pu(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 R2(s,y){var E;return ds(s,function(z,G,ee){return E=y(z,G,ee),!E}),!!E}function Eu(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=xu((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==-j?"-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 Mu(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 Zn(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 mu(y).set(new mu(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 Ml?Bt(Ml.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 M0(s,y,E,z){for(var G=-1,ee=s.length,le=E.length,de=-1,ye=y.length,Oe=fr(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 R0(s,y,E,z){for(var G=-1,ee=s.length,le=-1,de=E.length,ye=-1,Oe=y.length,Ie=fr(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):Rl(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)?yr: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(Rx(y).replace(On,"")),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 In(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,Lu,G.placeholder,n,le,Oe,n,n,E-ee);var Ie=this&&this!==pn&&this instanceof G?z:s;return mr(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=wr(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(p);if(G&&!le&&Du(ee)=="wrapper")var le=new Di([],!0)}for(z=le?z:E;++z<E;){ee=y[z];var de=Du(ee),ye=de=="wrapper"?Zp(ee):n;ye&&nf(ye[0])&&ye[1]==(R|M|S|O)&&!ye[4].length&&ye[9]==1?le=le[Du(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 Lu(s,y,E,z,G,ee,le,de,ye,Oe){var Ie=y&R,Pe=y&m,Ye=y&w,st=y&(M|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=vr(Qt,Gr);if(z&&(Qt=M0(Qt,z,G,st)),ee&&(Qt=R0(Qt,ee,le,st)),qt-=Ci,st&&qt<Oe){var Jn=We(Qt,Gr);return B0(s,y,Lu,wt.placeholder,E,Qt,Jn,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 Ou(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 mr(G,z,E)})})})}function Iu(s,y){y=y===n?" ":ki(y);var E=y.length;if(E<2)return E?Wp(y,s):y;var z=Wp(y,wu(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 mr(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 Nu(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&M,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?Re(y):E==Dn?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(p);var Oe=z?z.length:0;if(Oe||(y&=-97,z=G=n),le=le===n?le:fr(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:fr(st[9]-Oe,0),!de&&y&(M|T)&&(y&=-25),!y||y==m)var bt=B2(s,y,E);else y==M||y==T?bt=j2(s,y,de):(y==S||y==(m|S))&&!G.length?bt=W2(s,y,E,z):bt=Lu.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,zn[E])&&!dn.call(z,E)?y:s}function z0(s,y,E,z,G,ee){return In(s)&&In(y)&&(ee.set(y,s),Au(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 mu(s),new mu(y)));case Ee:case Me:case gt:return io(+s,+y);case Xe:return s.name==y.name&&s.message==y.message;case wn:case Fn:return s==y+"";case rt:var de=Re;case Dn: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 or:if(Ml)return Ml.call(s)==Ml.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,wr,ef)}function Qp(s){return c0(s,ui,U0)}var Zp=ku?function(s){return ku.get(s)}:vf;function Du(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 Fu(s,y){var E=s.__data__;return J2(y)?E[typeof y=="string"?"string":"hash"]:E.map}function Jp(s){for(var y=wr(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=fu.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=yu(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)!=Dn||Al&&Pr(new Al)!=qe)&&(Pr=function(s){var y=Vr(s),E=y==bn?s.constructor:n,z=E?ia(E):"";if(z)switch(z){case AI:return Qe;case EI:return rt;case MI:return Jt;case RI:return Dn;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=fr(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&&Uu(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(yu(s)):{}}function X2(s,y,E){var z=s.constructor;switch(y){case He:return Kp(s);case Ee:case Me: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 Tn:case Rr:return A0(s,E);case rt:return new z;case gt:case Fn:return new z(s);case wn:return I2(s);case Dn:return new z;case or: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
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=Du(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=zu(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|R),le=z==R&&E==M||z==R&&E==O&&s[7].length<=y[8]||z==(R|O)&&y[7].length<=y[8]&&E==M;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?M0(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?R0(ye,de,y[6]):de,s[6]=ye?We(s[5],i):y[6]),de=y[7],de&&(s[7]=de),z&R&&(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 fu.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 Pu(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 pu.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(wu(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?Mu(s,vt(y,3),!0,!0):[]}function yN(s,y){return s&&s.length?Mu(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 MN=zt(sx);function sx(s,y){return s&&s.length&&y&&y.length?Bp(s,y):s}function RN(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=Rp(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 Eu(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=Eu(s,y);if(z<E&&io(s[z],y))return z}return-1}function BN(s,y){return Eu(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=Eu(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?Mu(s,vt(y,3),!1,!0):[]}function GN(s,y){return s&&s.length?Mu(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||[],Rl)}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 Bu(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 Rp(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:Bu,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 _u;){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:Bu,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(ju(s,y),1)}function _D(s,y){return Cr(ju(s,y),j)}function CD(s,y,E){return E=E===n?1:Ft(E),Cr(ju(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)),qu(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 ju(s,y){var E=Et(s)?v:p0;return E(s,vt(y,3))}function MD(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 RD=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,Hu(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:M2;return y(s)}function PD(s){if(s==null)return 0;if(ci(s))return qu(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:R2;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),[])}),Wu=wI||function(){return pn.Date.now()};function WD(s,y){if(typeof y!="function")throw new fn(p);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,R,n,n,n,n,y)}function dx(s,y){var E;if(typeof y!="function")throw new fn(p);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,M,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(p);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=Wu();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(Wu())}function Ci(){var Zn=Wu(),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 zu(s,y){if(typeof s!="function"||y!=null&&typeof y!="function")throw new fn(p);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(zu.Cache||Bo),E}zu.Cache=Bo;function Hu(s){if(typeof s!="function")throw new fn(p);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(p);return y=y===n?y:Ft(y),zt(s,y)}function YD(s,y){if(typeof s!="function")throw new fn(p);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(p);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=Nu(Ip),sF=Nu(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&&Uu(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 Uu(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=yu(s);if(y===null)return!0;var E=dn.call(y,"constructor")&&y.constructor;return typeof E=="function"&&E instanceof E&&pu.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 qu(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=Nu(Pp),$F=Nu(function(s,y){return s<=y});function kx(s){if(!s)return[];if(ci(s))return qu(s)?At(s):li(s);if($l&&s[$l])return we(s[$l]());var y=Pr(s),E=y==rt?Re: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=Ra.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)&&Rl(s,E,y[E])}),Cx=ja(function(s,y){ko(y,ui(y),s)}),Vu=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)}),MF=zo(Rp);function RF(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?[]:Tu(s,br(s))}function WF(s){return s==null?[]:Tu(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=fu.call(y)),s[y]=E},gf(hi)),UF=F0(function(s,y,E){y!=null&&typeof y.toString!="function"&&(y=fu.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){Au(s,y,E)}),$x=ja(function(s,y,E,z){Au(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,Hu(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(yu(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?Mx(y):y)});function Mx(s){return ff(un(s).toLowerCase())}function Rx(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 Iu(xu(G),E)+s+Iu(wu(G),E)}function yP(s,y,E){s=un(s),y=Ft(y);var z=y?Ht(s):0;return y&&z<y?s+Iu(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?Iu(y-z,E)+s:s}function bP(s,y,E){return E||y==null?y=0:y&&(y=+y),$I(un(s).replace(Rn,""),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=Vu({},y,z,W0);var G=Vu({},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+"]")+`
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"&&xn.test(s))&&s>-1&&s%1==0&&s<y}function Kr(s,y,E){if(!In(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=Du(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||zn;return s===E}function K0(s){return s===s&&!In(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=zu(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|R),le=z==R&&E==M||z==R&&E==O&&s[7].length<=y[8]||z==(R|O)&&y[7].length<=y[8]&&E==M;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?M0(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?R0(ye,de,y[6]):de,s[6]=ye?We(s[5],i):y[6]),de=y[7],de&&(s[7]=de),z&R&&(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 fu.call(s)}function Y0(s,y,E){return y=fr(y===n?s.length-1:y,0),function(){for(var z=arguments,G=-1,ee=fr(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),mr(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 Pu(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(Yn,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==-j?"-0":y}function ia(s){if(s!=null){try{return pu.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=fr(Ft(y),0);var z=s==null?0:s.length;if(!z||y<1)return[];for(var G=0,ee=0,le=xe(wu(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 Zn(s)?Ll(s,Cr(y,1,Zn,!0)):[]}),dN=zt(function(s,y){var E=Bi(y);return Zn(E)&&(E=n),Zn(s)?Ll(s,Cr(y,1,Zn,!0),vt(E,2)):[]}),pN=zt(function(s,y){var E=Bi(y);return Zn(E)&&(E=n),Zn(s)?Ll(s,Cr(y,1,Zn,!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?Mu(s,vt(y,3),!0,!0):[]}function yN(s,y){return s&&s.length?Mu(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=fr(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?fr(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=fr(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?fr(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 MN=zt(sx);function sx(s,y){return s&&s.length&&y&&y.length?Bp(s,y):s}function RN(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=Rp(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 Eu(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=Eu(s,y);if(z<E&&io(s[z],y))return z}return-1}function BN(s,y){return Eu(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=Eu(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?Mu(s,vt(y,3),!1,!0):[]}function GN(s,y){return s&&s.length?Mu(s,vt(y,3)):[]}var YN=zt(function(s){return ps(Cr(s,1,Zn,!0))}),XN=zt(function(s){var y=Bi(s);return Zn(y)&&(y=n),ps(Cr(s,1,Zn,!0),vt(y,2))}),QN=zt(function(s){var y=Bi(s);return y=typeof y=="function"?y:n,ps(Cr(s,1,Zn,!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(Zn(E))return y=fr(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 mr(y,n,z)})}var tD=zt(function(s,y){return Zn(s)?Ll(s,y):[]}),nD=zt(function(s){return Up(Dr(s,Zn))}),rD=zt(function(s){var y=Bi(s);return Zn(y)&&(y=n),Up(Dr(s,Zn),vt(y,2))}),iD=zt(function(s){var y=Bi(s);return y=typeof y=="function"?y:n,Up(Dr(s,Zn),n,y)}),oD=zt(af);function sD(s,y){return C0(s||[],y||[],Rl)}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 Bu(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 Rp(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:Bu,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 _u;){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:Bu,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(ju(s,y),1)}function _D(s,y){return Cr(ju(s,y),j)}function CD(s,y,E){return E=E===n?1:Ft(E),Cr(ju(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=fr(G+E,0)),qu(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?mr(y,le,E):Ol(le,y,E)}),ee}),ED=Ru(function(s,y,E){jo(s,E,y)});function ju(s,y){var E=Et(s)?v:p0;return E(s,vt(y,3))}function MD(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 RD=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,Hu(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:M2;return y(s)}function PD(s){if(s==null)return 0;if(ci(s))return qu(s)?Ht(s):s.length;var y=Pr(s);return y==rt||y==Dn?s.size:Fp(s).length}function BD(s,y,E){var z=Et(s)?B:R2;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),[])}),Wu=wI||function(){return pn.Date.now()};function WD(s,y){if(typeof y!="function")throw new fn(p);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,R,n,n,n,n,y)}function dx(s,y){var E;if(typeof y!="function")throw new fn(p);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,M,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(p);y=ji(y)||0,In(E)&&(Ie=!!E.leading,Pe="maxWait"in E,ee=Pe?fr(ji(E.maxWait)||0,y):ee,Ye="trailing"in E?!!E.trailing:Ye);function st(Jn){var oo=z,Vo=G;return z=G=n,Oe=Jn,le=s.apply(Vo,oo),le}function bt(Jn){return Oe=Jn,de=Pl(qt,y),Ie?st(Jn):le}function jt(Jn){var oo=Jn-ye,Vo=Jn-Oe,Nx=y-oo;return Pe?Fr(Nx,ee-Vo):Nx}function wt(Jn){var oo=Jn-ye,Vo=Jn-Oe;return ye===n||oo>=y||oo<0||Pe&&Vo>=ee}function qt(){var Jn=Wu();if(wt(Jn))return Qt(Jn);de=Pl(qt,jt(Jn))}function Qt(Jn){return de=n,Ye&&z?st(Jn):(z=G=n,le)}function _i(){de!==n&&$0(de),Oe=0,z=ye=G=de=n}function Gr(){return de===n?le:Qt(Wu())}function Ci(){var Jn=Wu(),oo=wt(Jn);if(z=arguments,G=this,ye=Jn,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 zu(s,y){if(typeof s!="function"||y!=null&&typeof y!="function")throw new fn(p);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(zu.Cache||Bo),E}zu.Cache=Bo;function Hu(s){if(typeof s!="function")throw new fn(p);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 mr(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(p);return y=y===n?y:Ft(y),zt(s,y)}function YD(s,y){if(typeof s!="function")throw new fn(p);return y=y==null?0:fr(Ft(y),0),zt(function(E){var z=E[y],G=gs(E,0,y);return z&&A(G,z),mr(s,this,G)})}function XD(s,y,E){var z=!0,G=!0;if(typeof s!="function")throw new fn(p);return In(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,wr(y))}function io(s,y){return s===y||s!==s&&y!==y}var oF=Nu(Ip),sF=Nu(function(s,y){return s>=y}),oa=u0(function(){return arguments}())?u0:function(s){return Hn(s)&&dn.call(s,"callee")&&!Xw.call(s,"callee")},Et=xe.isArray,aF=ai?ht(ai):g2;function ci(s){return s!=null&&Uu(s.length)&&!Uo(s)}function Zn(s){return Hn(s)&&ci(s)}function lF(s){return s===!0||s===!1||Hn(s)&&Vr(s)==Ee}var ms=kI||wf,cF=us?ht(us):m2;function uF(s){return Hn(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==Dn)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(!Hn(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(!In(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 Uu(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=U}function In(s){var y=typeof s;return s!=null&&(y=="object"||y=="function")}function Hn(s){return s!=null&&typeof s=="object"}var bx=Wn?ht(Wn):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"||Hn(s)&&Vr(s)==gt}function Bl(s){if(!Hn(s)||Vr(s)!=bn)return!1;var y=yu(s);if(y===null)return!0;var E=dn.call(y,"constructor")&&y.constructor;return typeof E=="function"&&E instanceof E&&pu.call(E)==mI}var hf=vi?ht(vi):b2;function xF(s){return vx(s)&&s>=-U&&s<=U}var xx=bi?ht(bi):w2;function qu(s){return typeof s=="string"||!Et(s)&&Hn(s)&&Vr(s)==Fn}function Si(s){return typeof s=="symbol"||Hn(s)&&Vr(s)==or}var Ha=Ii?ht(Ii):x2;function kF(s){return s===n}function SF(s){return Hn(s)&&Pr(s)==qe}function _F(s){return Hn(s)&&Vr(s)==Se}var CF=Nu(Pp),$F=Nu(function(s,y){return s<=y});function kx(s){if(!s)return[];if(ci(s))return qu(s)?At(s):li(s);if($l&&s[$l])return we(s[$l]());var y=Pr(s),E=y==rt?Re:y==Dn?Ke:Ua;return E(s)}function qo(s){if(!s)return s===0?s:0;if(s=ji(s),s===j||s===-j){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(In(s)){var y=typeof s.valueOf=="function"?s.valueOf():s;s=In(y)?y+"":y}if(typeof s!="string")return s===0?s:+s;s=Sn(s);var E=Ra.test(s);return E||Xn.test(s)?kn(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),-U,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,wr(y),s);return}for(var E in y)dn.call(y,E)&&Rl(s,E,y[E])}),Cx=ja(function(s,y){ko(y,ui(y),s)}),Vu=ja(function(s,y,E,z){ko(y,ui(y),s,z)}),EF=ja(function(s,y,E,z){ko(y,wr(y),s,z)}),MF=zo(Rp);function RF(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,zn[Oe])&&!dn.call(s,Oe))&&(s[Oe]=ee[Oe])}return s}),OF=zt(function(s){return s.push(n,z0),mr($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?[]:Tu(s,wr(s))}function WF(s){return s==null?[]:Tu(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=fu.call(y)),s[y]=E},gf(hi)),UF=F0(function(s,y,E){y!=null&&typeof y.toString!="function"&&(y=fu.call(y)),dn.call(s,y)?s[y].push(E):s[y]=[E]},vt),qF=zt(Ol);function wr(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){Au(s,y,E)}),$x=ja(function(s,y,E,z){Au(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,Hu(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(wr),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:[]:In(s)?E=Uo(ee)?Ba(yu(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?[]:An(s,wr(s))}function oP(s){return s==null?[]:An(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?Mx(y):y)});function Mx(s){return ff(un(s).toLowerCase())}function Rx(s){return s=un(s),s&&s.replace(Pn,En).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 Iu(xu(G),E)+s+Iu(wu(G),E)}function yP(s,y,E){s=un(s),y=Ft(y);var z=y?Ht(s):0;return y&&z<y?s+Iu(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?Iu(y-z,E)+s:s}function bP(s,y,E){return E||y==null?y=0:y&&(y=+y),$I(un(s).replace(Ln,""),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=Vu({},y,z,W0);var G=Vu({},y.imports,z.imports,W0),ee=wr(G),le=An(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
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
1478
  __e(`+qt+`) +
1479
1479
  '`),Gr&&(ye=!0,Pe+=`';
@@ -1490,16 +1490,16 @@ __p += '`),Qt&&(Pe+=`' +
1490
1490
  function print() { __p += __j.call(arguments, '') }
1491
1491
  `:`;
1492
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 MP(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 RP(s,y,E){if(s=un(s),s&&(E||y===n))return s.replace(Rn,"");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(p);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=Tu(y,z);E==null&&!(On(y)&&(G.length||!z.length))&&(E=y,y=s,s=this,G=Tu(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=Ou(function(s,y){return s+y},0),sB=Yp("ceil"),aB=Ou(function(s,y){return s/y},1),lB=Yp("floor");function cB(s){return s&&s.length?$u(s,hi,Ip):n}function uB(s,y){return s&&s.length?$u(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?$u(s,hi,Pp):n}function fB(s,y){return s&&s.length?$u(s,vt(y,2),Pp):n}var gB=Ou(function(s,y){return s*y},1),mB=Yp("round"),yB=Ou(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=Vu,J.assignWith=EF,J.at=MF,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=RF,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=ju,J.mapKeys=VF,J.mapValues=KF,J.matches=WP,J.matchesProperty=zP,J.memoize=zu,J.merge=GF,J.mergeWith=$x,J.method=HP,J.methodOf=UP,J.mixin=yf,J.negate=Hu,J.nthArg=VP,J.omit=YF,J.omitBy=XF,J.once=qD,J.orderBy=MD,J.over=KP,J.overArgs=VD,J.overEvery=GP,J.overSome=YP,J.partial=cf,J.partialRight=yx,J.partition=RD,J.pick=QF,J.pickBy=Tx,J.property=Ix,J.propertyOf=XP,J.pull=MN,J.pullAll=sx,J.pullAllBy=RN,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=Bu,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=Vu,yf(J,J),J.add=oB,J.attempt=Ox,J.camelCase=cP,J.capitalize=Mx,J.ceil=sB,J.clamp=sP,J.clone=eF,J.cloneDeep=nF,J.cloneDeepWith=rF,J.cloneWith=tF,J.conformsTo=iF,J.deburr=Rx,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=Uu,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=qu,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=Wu,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=MP,J.trimStart=RP,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(Hu(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:Bu,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[Lu(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(_$)}(xc,xc.exports)),xc.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",M$=lr+"hz",R$=lr+"vt",L$=lr+"title",O$=lr+"wrap",I$=lr+"under",N$=lr+"over",D$=lr+"axis",Ms=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",kc="dppxchange",Wh="--",ga=typeof window<"u",zh=ga?document:null,ma=ga?window:null,Y$=ga?navigator:null;let rn,Sc;function Hh(){let t=devicePixelRatio;rn!=t&&(rn=t,Sc&&Vh(ry,Sc,Hh),Sc=matchMedia(`(min-resolution: ${rn-.001}dppx) and (max-resolution: ${rn+.001}dppx)`),Rs(ry,Sc,Hh),ma.dispatchEvent(new CustomEvent(kc)))}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)",p=iy.get(t);d!=p&&(t.style.transform=d,iy.set(t,d),e<0||n<0||e>r||n>u?di(t,Ms):Uh(t,Ms))}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 Rs(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 p=n;p<=r;p++)if(t(e[p])){u=p;break}for(let p=r;p>=n;p--)if(t(e[p])){d=p;break}return[u,d]}}const uy=t=>t!=null,hy=t=>t!=null&&t>0,_c=cy(uy),Q$=cy(hy);function Z$(t,e,n,r=0,u=!1){let d=u?Q$:_c,p=u?hy:uy;[e,n]=d(t,e,n);let b=t[e],f=t[e];if(e>-1)if(r==1)b=t[e],f=t[n];else if(r==-1)b=t[n],f=t[e];else for(let g=e;g<=n;g++){let i=t[g];p(i)&&(i<b?b=i:i>f&&(f=i))}return[b??wr,f??-1/0]}function Cc(t,e,n,r){let u=fy(t),d=fy(e);t==e&&(u==-1?(t*=n,e/=n):(t/=n,e*=n));let p=n==10?Co:gy,b=u==1?fi:Ti,f=d==1?Ti:fi,g=b(p(cr(t))),i=f(p(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=Ac(e,h)),[t,e]}function Kh(t,e,n,r){let u=Cc(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 $c(t,e,n,r){return Ec(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),p=tn(u.pad,0),b=tn(r.hard,-1/0),f=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&&(p=0)));let k=c||l||1e3,M=Co(k),T=ya(10,fi(M)),S=k*(c==0?t==0?.1:1:d),x=gn(ky(t-S,T/10),24),R=t>=g&&(a==1||a==3&&x<=g||a==2&&x>=g)?g:wr,O=Wr(b,x<R&&t>=R?R:Ki(R,x)),F=k*(c==0?e==0?.1:1:p),L=gn(Ac(e+F,T/10),24),H=e<=i&&(h==1||h==3&&L>=i||h==2&&L<=i)?i:-1/0,P=Ki(f,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,Tc=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 Ac(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 p=e;p<n;p++){let b=cr(p),f=gn(ya(t,p),b);for(let g=0;g<r.length;g++){let i=t==10?+`${r[g]}e${p}`:r[g]*f,a=(p>=0?0:b)+(p>=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 Ec(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=Ec){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&&(Ec(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 p=e[r];if(p>d){for(u=p-1;u>=0&&t[u]==null;)t[u--]=null;for(u=p+1;u<n&&t[u]==null;)t[d=u++]=null}}}function pT(t,e){if(mT(t)){let p=t[0].slice();for(let b=1;b<t.length;b++)p.push(...t[b].slice(1));return yT(p[0])||(p=gT(p)),p}let n=new Set;for(let p=0;p<t.length;p++){let b=t[p][0],f=b.length;for(let g=0;g<f;g++)n.add(b[g])}let r=[Array.from(n).sort((p,b)=>p-b)],u=r[0].length,d=new Map;for(let p=0;p<u;p++)d.set(r[0][p],p);for(let p=0;p<t.length;p++){let b=t[p],f=b[0];for(let g=1;g<b.length;g++){let i=b[g],a=Array(u).fill(void 0),h=e?e[p][g]:uT,c=[];for(let o=0;o<i.length;o++){let l=i[o],m=d.get(f[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,p)=>e[d]-e[p]);let u=[];for(let d=0;d<t.length;d++){let p=t[d],b=Array(n);for(let f=0;f<n;f++)b[f]=p[r[f]];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 p=t[r],b=r+d;b<=u;b+=d){const f=t[b];if(f!=null){if(f<=p)return!1;p=f}}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 p="";for(let b=0;b<n.length;b++)p+=typeof n[b]=="string"?n[b]:n[b](d,e);return p}}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 My=t=>t%1==0,Mc=[1,2,2.5,5],CT=ll(10,-32,0,Mc),Ry=ll(10,0,32,Mc),$T=Ry.filter(My),Is=CT.concat(Ry),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,p=u*365,b=(t==1?ll(10,0,3,Mc).filter(My):ll(10,-3,0,Mc)).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,p,p*2,p*5,p*10,p*25,p*50,p*100]);const f=[[p,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>=p,M=l>=d&&l<p,T=i(c),S=gn(T*t,3),x=td(T.getFullYear(),k?0:T.getMonth(),M||k?1:T.getDate()),R=gn(x*t,3);if(M||k){let O=M?l/d:0,F=k?l/p:0,L=S==R?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=R+F+Ac(S-R,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,f,g]}const[AT,ET,MT]=Py(1),[RT,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,p)=>{let b=e.find(o=>p>=o[0])||e[e.length-1],f,g,i,a,h,c;return r.map(o=>{let l=t(o),m=l.getFullYear(),w=l.getMonth(),k=l.getDate(),M=l.getHours(),T=l.getMinutes(),S=l.getSeconds(),x=m!=f&&b[2]||w!=g&&b[3]||k!=i&&b[4]||M!=a&&b[5]||T!=h&&b[6]||S!=c&&b[7]||b[1];return f=m,g=w,i=k,a=M,h=T,c=S,x(l)})}}function IT(t,e){let n=Jh(e);return(r,u,d,p,b)=>u.map(f=>n(t(f)))}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 p=n.width(t,e,u);return p&&Sn(r,"borderWidth",p),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 Lc(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:Lc,mouseup:Lc,click:Lc,dblclick:Lc,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,p){let b=[],f=Qo.get(u)||0;n=p?n:gn(Ac(n,u),f);for(let g=n;g<=r;g=gn(g+u,f))b.push(Object.is(g,-0)?0:g);return b}function sd(t,e,n,r,u,d,p){const b=[],f=t.scales[t.axes[e].scale].log,g=f==10?Co:gy,i=fi(g(n));u=ya(f,i),f==10&&(u=Is[Vi(u,Is)]);let a=n,h=u*f;f==10&&(h=Is[Vi(h,Is)]);do b.push(a),a=a+u,f==10&&!Qo.has(a)&&(a=gn(a,Qo.get(u))),a>=h&&(u=a,h=u*f,f==10&&(h=Is[Vi(h,Is)]));while(a<=r);return b}function YT(t,e,n,r,u,d,p){let b=t.scales[t.axes[e].scale].asinh,f=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,f)}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],p=d.scale,b=t.scales[p],f=t.valToPos,g=d._space,i=f(10,p),a=f(9,p)-i>=g?Xy:f(7,p)-i>=g?XT:f(5,p)-i>=g?QT:Qy;if(a==Qy){let h=cr(f(1,p)-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],p=d.scale,b=d._space,f=t.valToPos,g=cr(f(1,p)-f(2,p));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),p=t.valToPos(u[r[1]],n,!0),b=cr(p-d),f=t.series[e],g=b/(f.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,p,b,f,g){for(let i=0;i<n.plots.length;i++)n.plots[i]!=u&&n.plots[i].pub(r,u,d,p,b,f,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,p=t.scales,b=t.bbox;let f=d[0],g=r==2?d[1]:d[e],i=r==2?p[u.facets[0].scale]:p[t.series[0].scale],a=r==2?p[u.facets[1].scale]:p[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,f,g,i,a,m,w,h,c,o,l,Ic,ka,Dc,lv,uv):n(u,f,g,i,a,w,m,c,h,l,o,Nc,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 p=u[d];p.series[0]==e?n=p.dir:p.series[1]==e&&(p.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,p=t.series[e],b=d==2?p.facets[1].scale:p.scale,f=t.scales[b];return u==-1?f.min:u==1?f.max:f.distr==3?f.dir==1?f.min:f.max:0}function $o(t,e,n,r,u,d){return Ns(t,e,(p,b,f,g,i,a,h,c,o,l,m)=>{let w=p.pxRound;const k=g.dir*(g.ori==0?1:-1),M=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)),R=w(h(f[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 M(L,O,F),M(L,x,F),M(L,x,R),L})}function Oc(t,e,n,r,u,d){let p=null;if(t.length>0){p=new Path2D;const b=e==0?Dc:hd;let f=n;for(let a=0;a<t.length;a++){let h=t[a];if(h[1]>h[0]){let c=h[0]-f;c>0&&b(p,f,r,c,r+d),f=h[1]}}let g=n+u-f,i=10;g>0&&b(p,f,r-i/2,g,r+d+i)}return p}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,p){let b=[],f=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=p<=0&&o>=0&&o<f?d(t[o]):h;let l=a+u;c=p>=0&&l>=0&&l<f?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?Ic:Nc,n=t==0?(u,d,p,b,f,g)=>{u.arcTo(d,p,b,f,g)}:(u,d,p,b,f,g)=>{u.arcTo(p,d,f,b,g)},r=t==0?(u,d,p,b,f)=>{u.rect(d,p,b,f)}:(u,d,p,b,f)=>{u.rect(p,d,f,b)};return(u,d,p,b,f,g=0,i=0)=>{g==0&&i==0?r(u,d,p,b,f):(g=Ki(g,b/2,f/2),i=Ki(i,b/2,f/2),e(u,d+g,p),n(u,d+b,p,d+b,p+f,g),n(u,d+b,p+f,d,p+f,i),n(u,d,p+f,d,p,i),n(u,d,p,d+b,p,g),u.closePath())}}const Ic=(t,e,n)=>{t.moveTo(e,n)},Nc=(t,e,n)=>{t.moveTo(n,e)},ka=(t,e,n)=>{t.lineTo(e,n)},Sa=(t,e,n)=>{t.lineTo(n,e)},Dc=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,p)=>{t.bezierCurveTo(e,n,r,u,d,p)},hv=(t,e,n,r,u,d,p)=>{t.bezierCurveTo(n,e,u,r,p,d)};function dv(t){return(e,n,r,u,d)=>Ns(e,n,(p,b,f,g,i,a,h,c,o,l,m)=>{let{pxRound:w,points:k}=p,M,T;g.ori==0?(M=Ic,T=lv):(M=Nc,T=cv);const S=gn(k.width*rn,3);let x=(k.size-k.width)/2*rn,R=gn(x*2,3),O=new Path2D,F=new Path2D,{left:L,top:H,width:P,height:I}=e.bbox;Dc(F,L-R,H-R,P+R*2,I+R*2);const $=C=>{if(f[C]!=null){let N=w(a(b[C],g,l,c)),j=w(h(f[C],i,m,o));M(O,N+x,j),T(O,N,j,x,0,Tc*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,p)=>{r!=u&&(d!=r&&p!=r&&t(e,n,r),d!=u&&p!=u&&t(e,n,u),t(e,n,p))}}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,(p,b,f,g,i,a,h,c,o,l,m)=>{[u,d]=_c(f,u,d);let w=p.pxRound,k=P=>w(a(P,g,l,c)),M=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),R={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:xa},O=R.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=f[he];ae==U?ue!=null?(N=ue,I==null?(T(O,ae,M(N)),C=I=$=N):N<I?I=N:N>$&&($=N)):ue===null&&(F=!0):(I!=null&&S(O,U,M(I),M($),M(C),M(N)),ue!=null?(N=ue,T(O,ae,M(N)),I=$=C=N):(I=$=null,ue===null&&(F=!0)),U=ae,te=P(U+x))}I!=null&&I!=$&&j!=U&&S(O,U,M(I),M($),M(C),M(N))}else for(let P=x==1?u:d;P>=u&&P<=d;P+=x){let I=f[P];I===null?F=!0:I!=null&&T(O,k(b[P]),M(I))}let[L,H]=cd(n,r);if(p.fill!=null||L!=0){let P=R.fill=new Path2D(O),I=p.fillTo(n,r,p.min,p.max,L),$=M(I),C=k(b[u]),N=k(b[d]);x==-1&&([N,C]=[C,N]),T(P,N,$),T(P,C,$)}if(!p.spanGaps){let P=[];F&&P.push(...ud(b,f,u,d,x,k,e)),R.gaps=P=p.gaps(n,r,u,d,P),R.clip=Oc(P,g.ori,c,o,l,m)}return H!=0&&(R.band=H==2?[$o(n,r,u,d,O,-1),$o(n,r,u,d,O,1)]:$o(n,r,u,d,O,H)),R})}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,p,b,f)=>Ns(d,p,(g,i,a,h,c,o,l,m,w,k,M)=>{[b,f]=_c(a,b,f);let T=g.pxRound,{left:S,width:x}=d.bbox,R=Z=>T(o(Z,h,k,m)),O=Z=>T(l(Z,c,M,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:f]),$=R(i[P==1?b:f]),C=$,N=$;u&&e==-1&&(N=S,F(H,N,I)),F(H,$,I);for(let Z=P==1?b:f;Z>=b&&Z<=f;Z+=P){let te=a[Z];if(te==null)continue;let he=R(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,p);if(g.fill!=null||U!=0){let Z=L.fill=new Path2D(H),te=g.fillTo(d,p,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,f,P,R,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,p,b,f,Z),L.clip=Oc(Z,h.ori,m,w,k,M)}return K!=0&&(L.band=K==2?[$o(d,p,b,f,H,-1),$o(d,p,b,f,H,1)]:$o(d,p,b,f,H,K)),L})}function gv(t,e,n,r,u,d,p=wr){if(t.length>1){let b=null;for(let f=0,g=1/0;f<t.length;f++)if(e[f]!==void 0){if(b!=null){let i=cr(t[f]-t[b]);i<g&&(g=i,p=cr(n(t[f],r,u,d)-n(t[b],r,u,d)))}b=f}}return p}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),p=1-e[0],b=tn(e[1],wr),f=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,M,T,S,x,R,O,F,L,H)=>{let P=w.pxRound,I=n,$=r*rn,C=b*rn,N=f*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?Dc: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(R(ae,S,H,F)),ce,ge,Ee,Me=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),Me=gv(k,M,x,T,L,O,Me),Ee=Me-ge+$}else Me=gv(k,M,x,T,L,O,Me),Ee=Me*p+$,ge=Me-Ee;Ee<1&&(Ee=0),Le>=ge/2&&(Le=0),Ee<5&&(P=vy);let Jt=Ee>0,xr=Me-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&&(M=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=M[qe];if(Se==null)continue;if(Dn!=null){let pt=Dn[qe]??0;if(Se-pt==0)continue;ue=R(pt,S,H,F)}let He=T.distr!=2||g!=null?k[qe]:qe,Qe=x(He,T,L,O),mt=R(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,p)=>Ns(r,u,(b,f,g,i,a,h,c,o,l,m,w)=>{[d,p]=_c(g,d,p);let k=b.pxRound,M=j=>k(h(j,i,m,o)),T=j=>k(c(j,a,w,l)),S,x,R;i.ori==0?(S=Ic,R=ka,x=uv):(S=Nc,R=Sa,x=hv);const O=i.dir*(i.ori==0?1:-1);let F=M(f[O==1?d:p]),L=F,H=[],P=[];for(let j=O==1?d:p;j>=d&&j<=p;j+=O)if(g[j]!=null){let U=f[j],K=M(U);H.push(L=K),P.push(T(g[j]))}const I={stroke:t(H,P,S,R,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);R(j,L,K),R(j,F,K)}if(!b.spanGaps){let j=[];j.push(...ud(f,g,d,p,O,M,n)),I.gaps=j=b.gaps(r,u,d,p,j),I.clip=Oc(j,i.ori,o,l,m,w)}return N!=0&&(I.band=N==2?[$o(r,u,d,p,$,-1),$o(r,u,d,p,$,1)]:$o(r,u,d,p,$,N)),I})}function dA(t){return hA(pA,t)}function pA(t,e,n,r,u,d){const p=t.length;if(p<2)return null;const b=new Path2D;if(n(b,t[0],e[0]),p==2)r(b,t[1],e[1]);else{let f=Array(p),g=Array(p-1),i=Array(p-1),a=Array(p-1);for(let h=0;h<p-1;h++)i[h]=e[h+1]-e[h],a[h]=t[h+1]-t[h],g[h]=i[h]/a[h];f[0]=g[0];for(let h=1;h<p-1;h++)g[h]===0||g[h-1]===0||g[h-1]>0!=g[h]>0?f[h]=0:(f[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(f[h])||(f[h]=0));f[p-1]=g[p-2];for(let h=0;h<p-1;h++)u(b,t[h]+a[h]/3,e[h]+f[h]*a[h]/3,t[h+1]-a[h]/3,e[h+1]-f[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&&(Rs(K$,ma,mv),Rs(G$,ma,mv,!0),Rs(kc,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:$c(e,n,Gh,!0)}function bv(t,e,n,r){return e==null?va:Cc(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)),p=e-t,b=Vi(u/r*p,n);do{let f=n[b],g=r*f/p;if(g>=u&&d+(f<5?Qo.get(f):0)<=17)return[f,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 p(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):p(q,X,ie,oe)}r.valToPosH=d,r.valToPosV=p;let f=!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);Rs("click",h,q=>{q.target===o&&(ln!=Ri||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),M=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,R={axes:Lo,series:La},O=(t.drawOrder||["axes","series"]).map(q=>R[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,Re=we-fe;return(oe-fe)/Re}}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&&Ec(fe))){let Re=fe;fe=(Be,We,Ke)=>We==null?va:$c(We,Ke,Re)}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)}),M.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,M$),I=d,$=p):(di(g,R$),I=p,$=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?MT(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,Me,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),Me=qi("tbody",null,ge),he.mount(r,ge),ft){Ee=qi("thead",null,ge,Me);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$,Me,Me.childNodes[X]);di(oe,q.class),q.show||di(oe,Ms);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 Re 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&&(Rs(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,Rr=!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,Rr=!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),Rr=!0)}}function kl({width:q,height:X}){Ao(q,X)}r.setSize=kl;function zs(){let q=!1,X=!1,ie=!1,oe=!1;M.forEach((fe,we)=>{if(fe.show&&fe._show){let{side:Re,_size:Be}=fe,We=Re%2,Ke=fe.label!=null?fe.labelSize:0,Ze=Be+Ke;Ze>0&&(We?(xt-=Ze,Re==3?(Se+=Ze,oe=!0):ie=!0):(qe-=Ze,Re==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,Re){switch(we){case 1:return q+=Re,q-Re;case 2:return X+=Re,X-Re;case 3:return ie-=Re,ie+Re;case 0:return oe-=Re,oe+Re}}M.forEach((we,Re)=>{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,Re,Be)=>{if(we==0)return Re;let We=Re,Ke=ie(fe,we,Re,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[Re])){We=null;let Wt=null,yt=null,at;if(oe==0||oe==-1)for(at=Re;Wt==null&&at-- >0;)X.has(At[at])||(Wt=at);if(oe==0||oe==1)for(at=Re;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:Re-Wt<=yt-Re?Wt:yt}else Ze&&cr(_t-I(Ht[Re],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,Rn=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 Ma(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(Rn||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;Rn?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),Ma(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(Re=>{!Qo.has(Re)&&Qo.set(Re,Sy(Re))}),q.incrs=Vt(q.incrs||(oe.distr==2?$T:fe?w==1?AT:RT: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,Re,Be]=ie,We=X%2,Ke=0;return We==0&&(Be||we)&&(Ke=X==0&&!fe||X==2&&!Re?ur(Gy.size/3):0),We==1&&(fe||Re)&&(Ke=X==1&&!we||X==3&&!Be?ur(Zy.size/2):0),Ke}const Ra=r.padding=(t.padding||[Kt,Kt,Kt,Kt]).map(q=>Vt(tn(q,Kt))),Ir=r._padding=Ra.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]=Cc(q,q,H.log,!1):P==4?[q,X]=Kh(q,q,H.log,!1):H.time?X=q+ur(86400/w):[q,X]=$c(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 Mo(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),Re=tn(Fn,oe.length-1),Be=ie.min==null?Z$(oe,we,Re,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 Re=we.range(r,null,null,oe);we.min=Re[0],we.max=Re[1]}else we.min=wr,we.max=-1/0}}if(Yn>0){k.forEach((oe,fe)=>{if(u==1){let we=oe.scale,Re=C[we];if(Re==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,Re,oe,e[fe],oe.sorted);oe.idxs[0]=wn,oe.idxs[1]=Fn}else if(fe>0&&oe.show&&oe.auto){let[we,Re]=oe.facets,Be=we.scale,We=Re.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],Re,Ze,Re.sorted),oe.min=Re.min,oe.max=Re.max}});for(let oe in q){let fe=q[oe],we=C[oe];if(fe.from==null&&(we==null||we.min==null)){let Re=fe.range(r,fe.min==wr?null:fe.min,fe.max==-1/0?null:fe.max,oe);fe.min=Re[0],fe.max=Re[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 Re=fe.range(r,we.min,we.max,oe);fe.min=Re[0],fe.max=Re[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 Re=we.distr;we._min=Re==3?Co(we.min):Re==4?Xh(we.min,we.asinh):Re==100?we.fwd(we.min):we.min,we._max=Re==3?Co(we.max):Re==4?Xh(we.max,we.asinh):Re==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),Re=X.points.filter(r,ie,we,fe);(we||Re)&&(X.points._paths=X.points.paths(r,ie,wn,Fn,Re),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:Re,_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?Ro(Be,Ke,ie.dash,ie.cap,We,oe,fe,Re,we):Ys(q,Be,Ke,ie.dash,ie.cap,We,oe,fe,Re,Ze,we),_t&&a.translate(-et,-et)}function Ys(q,X,ie,oe,fe,we,Re,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,Ro(X,ie,oe,fe,mn,Re,Be,We,Ke,Ze,at,yt),et=!0}}),et||Ro(X,ie,oe,fe,we,Re,Be,We,Ke,Ze)}const ls=xa|ld;function Ro(q,X,ie,oe,fe,we,Re,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,Re),Mi(q,we,X)):Be&ld?(dr(fe,Re),a.clip(et),Mi(q,we,X)):Be&xa&&(a.save(),a.clip(et),Ze&&a.clip(Ze),dr(fe,Re),a.restore(),Mi(q,we,X)):(dr(fe,Re),Mi(q,we,X)),(We||Ke||et)&&a.restore()}function Mi(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=M[q],we;if(oe<=0)we=[0,0];else{let Re=fe._space=fe.space(r,q,X,ie,oe),Be=fe._incrs=fe.incrs(r,q,X,ie,oe,Re);we=xA(X,ie,Be,oe,Re)}return fe._found=we}function to(q,X,ie,oe,fe,we,Re,Be,We,Ke){let Ze=Re%2/2;l==1&&a.translate(Ze,Ze),Ks(Be,Re,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 M.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,Re=we%2,{min:Be,max:We}=fe,[Ke,Ze]=vo(oe,Be,We,Re==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 Ra.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<M.length;q++){let X=M[q];if(!X.show||!X._show)continue;let ie=X.side,oe=ie%2,fe,we,Re=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);Mo(X.labelFont[0],Re,"center",ie==2?sl:Qm),a.save(),oe==1?(fe=we=0,a.translate(vr,ur(Dt+kt/2)),a.rotate((ie==3?-Tc:Tc)/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*-Tc/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;Mo(Ue,Re,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),Rr){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),M.forEach(({_el:q,_show:X,_size:ie,_pos:oe,side:fe})=>{if(q!=null)if(X){let we=fe===3||fe===0?ie:0,Re=fe%2==1;Sn(q,Re?"left":"top",oe-we),Sn(q,Re?"width":"height",ie),Sn(q,Re?"top":"left",Re?He:Se),Sn(q,Re?"height":"width",Re?qe:xt),Uh(q,Ms)}else di(q,Ms)}),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"),Rr=!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),f||(f=!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,Ri,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],Ms);else if(ae&&di(Le[q],Ms),ue){let X=Rn?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,Re=oe._max,Be=q/fe,We=we+(Re-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):p(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,Re=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],Re,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||Rn){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),Rn)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(Rn){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,Re,0),xe=$(En(ar+Xt,_t),pe,Re,0),wi(Ki(_e,xe),cr(xe-_e))):wi(0,Re)}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=Ri,et=ln):(Ze=wo,et=Gt),Dr(Ki(Ze,et),cr(et-Ze)),xn||wi(0,Re)),xn&&(H.ori==1?(Ze=Ri,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,Re){ne._lock||Li&&q!=null&&q.movementX==0&&q.movementY==0||(V(q,X,ie,oe,fe,we,Re,!1,q!=null),q!=null?_(null,!0,!0):_(X,!0,!1))}function V(q,X,ie,oe,fe,we,Re,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,[Ri,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,Re){Li=!0,ze=xn=Pn._x=Pn._y=!1,V(q,X,ie,oe,fe,we,Re,!0,!1),q!=null&&(bn(jh,zh,be,!1),It(Jm,r,Ri,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,Re){Li=Pn._x=Pn._y=!1,V(q,X,ie,oe,fe,we,Re,!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,Re){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<Ri?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,Re){ne._lock||(Qi(q),Us(),Q(),q!=null&&It(ny,r,ln,Gt,xt,qe,null))}function Ve(){M.forEach(kA),Ao(r.width,r.height,!0)}Rs(kc,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,Re){ht.filters.pub(q,X,ie,oe,fe,we,Re)&&Tt.pub(q,X,ie,oe,fe,we,Re)}Tt.sub(r);function sr(q,X,ie,oe,fe,we,Re){ht.filters.sub(q,X,ie,oe,fe,we,Re)&&ct[q](null,X,ie,oe,fe,we,Re)}r.pub=sr;function yr(){Tt.unsub(r),dd.delete(r),xr.clear(),Vh(kc,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(Ma),M.forEach(mi),n?n instanceof HTMLElement?(n.appendChild(g),An()):n(r,An):An(),r}Ar.assign=nr,Ar.fmtNum=Yh,Ar.rangeNum=$c,Ar.rangeLog=Cc,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=Oc;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,p;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),p=+n(t[d],e,d,t),p<0)r=d+1;else if(p>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 p=Array(d);++u<d;)p[u]=e[u+n];return p}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",p="\\u200d",b=RegExp("["+p+t+u+d+"]");function f(g){return b.test(g)}return md=f,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",p="["+t+"]",b="["+u+"]",f="\\ud83c[\\udffb-\\udfff]",g="(?:"+b+"|"+f+")",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,p].join("|")+")",M=RegExp(f+"(?="+f+")|"+k+w,"g");function T(S){return S.match(M)||[]}return vd=T,vd}var bd,Mv;function EA(){if(Mv)return bd;Mv=1;var t=TA(),e=Tv(),n=AA();function r(u){return e(u)?n(u):t(u)}return bd=r,bd}var wd,Rv;function MA(){if(Rv)return wd;Rv=1;var t=typeof Xo=="object"&&Xo&&Xo.Object===Object&&Xo;return wd=t,wd}var xd,Lv;function RA(){if(Lv)return xd;Lv=1;var t=MA(),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=RA(),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(p){var b=n.call(p,u),f=p[u];try{p[u]=void 0;var g=!0}catch{}var i=r.call(p);return g&&(b?p[u]=f:delete p[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 p(b){return b==null?b===void 0?u:r:d&&d in Object(b)?e(b):n(b)}return Ad=p,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 Md,jv;function PA(){if(jv)return Md;jv=1;var t=DA(),e=FA(),n="[object Symbol]";function r(u){return typeof u=="symbol"||e(u)&&t(u)==n}return Md=r,Md}var Rd,Wv;function BA(){if(Wv)return Rd;Wv=1;var t=Sd(),e=LA(),n=OA(),r=PA(),u=t?t.prototype:void 0,d=u?u.toString:void 0;function p(b){if(typeof b=="string")return b;if(n(b))return e(b,p)+"";if(r(b))return d?d.call(b):"";var f=b+"";return f=="0"&&1/b==-1/0?"-0":f}return Rd=p,Rd}var Ld,zv;function Fc(){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=Fc();function u(d){return function(p){p=r(p);var b=e(p)?n(p):void 0,f=b?b[0]:p.charAt(0),g=b?t(b,1).join(""):p.slice(1);return f[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=Fc(),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,p=e==null?0:e.length;for(u&&p&&(r=e[++d]);++d<p;)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=Fc(),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",u="\\ufe20-\\ufe2f",d="\\u20d0-\\u20ff",p=r+u+d,b="["+p+"]",f=RegExp(b,"g");function g(i){return i=e(i),i&&i.replace(n,t).replace(f,"")}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",p="a-z\\xdf-\\xf6\\xf8-\\xff",b="\\xac\\xb1\\xd7\\xf7",f="\\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+f+g+i,o="['’]",l="["+c+"]",m="["+u+"]",w="\\d+",k="["+d+"]",M="["+p+"]",T="[^"+t+c+w+d+p+a+"]",S="\\ud83c[\\udffb-\\udfff]",x="(?:"+m+"|"+S+")",R="[^"+t+"]",O="(?:\\ud83c[\\udde6-\\uddff]){2}",F="[\\ud800-\\udbff][\\udc00-\\udfff]",L="["+a+"]",H="\\u200d",P="(?:"+M+"|"+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+"(?:"+[R,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+"?"+M+"+"+$+"(?="+[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=Fc(),r=XA();function u(d,p,b){return d=n(d),p=b?void 0:p,p===void 0?e(d)?r(d):t(d):d.match(p)||[]}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(p){return function(b){return t(n(e(b).replace(u,"")),p,"")}}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-D0fKsdTb-a926546df7a4518ee3b6.js"),void 0),"./ArrayplotWidget.vue":()=>lt(()=>ut.import("./ArrayplotWidget-BmRSuGhA-f6862ab94817045106e8.js"),void 0),"./BlockWidget.vue":()=>lt(()=>ut.import("./BlockWidget-Dpxbw455-2976def345e9987b8c99.js"),void 0),"./ButtonWidget.vue":()=>lt(()=>ut.import("./ButtonWidget-8iOpXmpp-468476c52fb27fa48b49.js"),void 0),"./CanvasWidget.vue":()=>lt(()=>ut.import("./CanvasWidget-B0iU38rA-99d1a412388b9554d961.js"),void 0),"./CanvasdotWidget.vue":()=>lt(()=>ut.import("./CanvasdotWidget-C9viSVBs-1a7994467cc2c1404927.js"),void 0),"./CanvasimageWidget.vue":()=>lt(()=>ut.import("./CanvasimageWidget-CFiCpITu-6b16307b98b3fe29b4a5.js"),void 0),"./CanvasimagevalueWidget.vue":()=>lt(()=>ut.import("./CanvasimagevalueWidget-fu6vbAY0-ba660812c51b02095e2e.js"),void 0),"./CanvaslabelWidget.vue":()=>lt(()=>ut.import("./CanvaslabelWidget-BVqHq3Vp-80a49fd7d2a810a03033.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>lt(()=>ut.import("./CanvaslabelvalueWidget-BOFa8-NU-a362de79bac15d770477.js"),void 0),"./CanvaslineWidget.vue":()=>lt(()=>ut.import("./CanvaslineWidget-l3ko0QXk-3abd111328cfa7b0065c.js"),void 0),"./CanvaslinevalueWidget.vue":()=>lt(()=>ut.import("./CanvaslinevalueWidget-BCZoO-Z6-a250fb30e196b64458a4.js"),void 0),"./CheckbuttonWidget.vue":()=>lt(()=>ut.import("./CheckbuttonWidget-BN7e1d5b-a0e7fe73990645fea111.js"),void 0),"./ComboboxWidget.vue":()=>lt(()=>ut.import("./ComboboxWidget-Bb5RGXDB-4f7040b69b2ee7b49031.js"),void 0),"./DateWidget.vue":()=>lt(()=>ut.import("./DateWidget-Dggqab-F-4897c589542d0608ad6c.js"),void 0),"./DynamicWidget.vue":()=>lt(()=>ut.import("./DynamicWidget-CfMtj7H8-8ea1921cefc33ff13c25.js"),void 0),"./FormatvalueWidget.vue":()=>lt(()=>ut.import("./FormatvalueWidget-B9_PbzY2-fe00d0f467eb0fb8fb9f.js"),void 0),"./HorizontalWidget.vue":()=>lt(()=>ut.import("./HorizontalWidget-BWgZL_Oz-01a88a61ceb1a703ebaf.js"),void 0),"./HorizontalboxWidget.vue":()=>lt(()=>ut.import("./HorizontalboxWidget-yMYUnNB8-6ca8ca3b60538399cc66.js"),void 0),"./HorizontallineWidget.vue":()=>lt(()=>ut.import("./HorizontallineWidget-C4zMx7z2-87ac2e29a2ee0c96284b.js"),void 0),"./IframeWidget.vue":()=>lt(()=>ut.import("./IframeWidget-DA4P_mJT-9a8205977a28ac4ff0e2.js"),void 0),"./ImageviewerWidget.vue":()=>lt(()=>ut.import("./ImageviewerWidget-B1wK0hK4-81c24c87b26333d4e02e.js"),void 0),"./LabelWidget.vue":()=>lt(()=>ut.import("./LabelWidget-CY0saBoK-8b890a6a0da1d11f94e2.js"),void 0),"./LabelledWidget.vue":()=>lt(()=>ut.import("./LabelledWidget-B3ZOYaGy-4b8f9db56d64f4c48c3c.js"),void 0),"./LabelprogressbarWidget.vue":()=>lt(()=>ut.import("./LabelprogressbarWidget-CmXcESTg-b5ff18b3646a9db1dcb5.js"),void 0),"./LabelsparklineWidget.vue":()=>lt(()=>ut.import("./LabelsparklineWidget-D_yrQrn6-8d485a4ff77f224d8021.js"),void 0),"./LabelvalueWidget.vue":()=>lt(()=>ut.import("./LabelvalueWidget-dNaNfsBE-cca505a4e4b57eef4f9c.js"),void 0),"./LabelvaluedescWidget.vue":()=>lt(()=>ut.import("./LabelvaluedescWidget-3vNoH6Mc-94355300201e4c687c00.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>lt(()=>ut.import("./LabelvaluelimitsbarWidget-7VppYVIN-61aedef34abaa830da5d.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>lt(()=>ut.import("./LabelvaluelimitscolumnWidget-BZ6nwifg-6e16fb40a486e672112b.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>lt(()=>ut.import("./LabelvaluerangebarWidget-IyuXLNsw-82772ab9dddcb0adb147.js"),void 0),"./LedWidget.vue":()=>lt(()=>ut.import("./LedWidget-DSxpmIOK-7bcb0c9bb54d16552769.js"),void 0),"./LimitsbarWidget.vue":()=>lt(()=>ut.import("./LimitsbarWidget-BoPTdVV5-9aec81c2075aa85dac4d.js"),void 0),"./LimitscolorWidget.vue":()=>lt(()=>ut.import("./LimitscolorWidget-Bt3qOvrv-9fc6263422a189babdab.js"),void 0),"./LimitscolumnWidget.vue":()=>lt(()=>ut.import("./LimitscolumnWidget-Ce6YnUBz-5bec46b1d174ab4dab82.js"),void 0),"./LinegraphWidget.vue":()=>lt(()=>ut.import("./LinegraphWidget-XAbg0jj2-1b7a4994ed889c49006e.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>lt(()=>ut.import("./MatrixbycolumnsWidget-5MgJFZtz-8d55011d6030c1054002.js"),void 0),"./ProgressbarWidget.vue":()=>lt(()=>ut.import("./ProgressbarWidget-CDwDOFIy-10ec10df40ff2cb7bded.js"),void 0),"./RadiobuttonWidget.vue":()=>lt(()=>ut.import("./RadiobuttonWidget-cQ8V8LaD-de5541f59874a828fc5a.js"),void 0),"./RadiogroupWidget.vue":()=>lt(()=>ut.import("./RadiogroupWidget-BvRnuGA2-4dd45aa3f7c5dadddf2b.js"),void 0),"./RangebarWidget.vue":()=>lt(()=>ut.import("./RangebarWidget-aHmgV0qs-427673617cf9a5531a35.js"),void 0),"./RollupWidget.vue":()=>lt(()=>ut.import("./RollupWidget-D1jUPrUQ-dd1cd202441fd4c89f94.js"),void 0),"./ScrollwindowWidget.vue":()=>lt(()=>ut.import("./ScrollwindowWidget-Cn0o3b4E-7fb731a019b673772330.js"),void 0),"./SignalWidget.vue":()=>lt(()=>ut.import("./SignalWidget-BQBzqdU--5a54888c5361f7acd19c.js"),void 0),"./SpacerWidget.vue":()=>lt(()=>ut.import("./SpacerWidget-C0RmQY3t-52dc81b065547eb3e07b.js"),void 0),"./SparklineWidget.vue":()=>lt(()=>ut.import("./SparklineWidget-BTH9rvcX-7e09d97155b1e7881489.js"),void 0),"./TabbookWidget.vue":()=>lt(()=>ut.import("./TabbookWidget-C-aDdEoD-ff891ba581909eeb2fdb.js"),void 0),"./TextboxWidget.vue":()=>lt(()=>ut.import("./TextboxWidget-Dd2ccpUQ-a2e4c5aa686d7d8767de.js"),void 0),"./TextfieldWidget.vue":()=>lt(()=>ut.import("./TextfieldWidget-DY3aFTnP-3c23a66c961d295c9df0.js"),void 0),"./TimeWidget.vue":()=>lt(()=>ut.import("./TimeWidget-C_site21-5fcc7d4cb8ef4d3be4c9.js"),void 0),"./TitleWidget.vue":()=>lt(()=>ut.import("./TitleWidget-Bx81VfQD-60b8b3c39f30cc7fe91b.js"),void 0),"./ValueWidget.vue":()=>lt(()=>ut.import("./ValueWidget-cbjxVV3B-d99969dbea88c8db89b9.js"),void 0),"./ValuelimitsbarWidget.vue":()=>lt(()=>ut.import("./ValuelimitsbarWidget-cQb2o_xH-cf7ca46e373c950e2936.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>lt(()=>ut.import("./ValuelimitscolumnWidget-BBTuSCK9-b43377a4f673cfd911b5.js"),void 0),"./ValuerangebarWidget.vue":()=>lt(()=>ut.import("./ValuerangebarWidget-Ct7iGtu0-43c52835e0320214aba5.js"),void 0),"./VerticalWidget.vue":()=>lt(()=>ut.import("./VerticalWidget-DJn02myf-1888ea9527fa57a21775.js"),void 0),"./VerticalboxWidget.vue":()=>lt(()=>ut.import("./VerticalboxWidget-DHQMxtF3-c2ff040dfcf2ae7a0fa4.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(f=>f!=="constructor").filter(f=>f!=="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 f in this.$rules)this.$rules[f].unshift({regex:u,token:"support.function"})};n.inherits(d,t);let p=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 p,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 p=Ut("v-spacer"),b=Ut("v-btn"),f=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(f,{height:"24"},{default:it(()=>[ot(p),fr("span",{textContent:Br(d.title)},null,8,sE),ot(p),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(p),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=Ku(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 p=Ut("v-col"),b=Ut("v-row"),f=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(p,{"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,(M,T)=>(Zt(),Jn(o,{ref_for:!0,ref:"topmenu",key:T},{activator:it(({props:S})=>[ot(g,Gu({ref_for:!0},S,{variant:"outlined",class:"mx-1 menu-button",text:M.label,"data-test":d.formatDT(`${n.title} ${M.label}`)}),{append:it(()=>[ot(f,{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(M.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:R})=>[(Zt(),Jn(h,Gu({ref_for:!0},R,{disabled:S.disabled,key:x}),Yu({append:it(()=>[ot(f,null,{default:it(()=>e[1]||(e[1]=[er(" mdi-chevron-right ")])),_:1})]),default:it(()=>[!S.radio&&!S.checkbox?(Zt(),Jn(a,{key:0,style:Xu("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(f,{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,(R,O)=>(Zt(),Jn(h,{key:O,"prepend-icon":R.icon,onClick:F=>d.subMenuClick(R)},{default:it(()=>[ot(a,null,{default:it(()=>[er(Br(R.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,(R,O)=>(Zt(),Jn(h,{key:O+"-choice"},{default:it(()=>[ot(m,{class:"list-action"},{default:it(()=>[ot(l,{color:"secondary",label:R.label,value:R.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(Zt(),Jn(h,{onClick:R=>S.command(S),disabled:S.disabled,"data-test":d.formatDT(`${n.title} ${M.label} ${S.label}`),key:x+"-list"},Yu({default:it(()=>[S.checkbox?(Zt(),Jn(m,{key:0,class:"list-action"},{default:it(()=>[ot(k,{modelValue:S.checked,"onUpdate:modelValue":R=>S.checked=R,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:Xu("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(f,{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=Ku(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:Pc,toStringTag:ib}=Symbol,Bc=(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=>Bc(e)===t),jc=t=>e=>typeof e===t,{isArray:_a}=Array,dl=jc("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=jc("string"),ei=jc("function"),sb=jc("number"),Wc=t=>t!==null&&typeof t=="object",bE=t=>t===!0||t===!1,zc=t=>{if(Bc(t)!=="object")return!1;const e=Vd(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(ib in t)&&!(Pc in t)},wE=Gi("Date"),xE=Gi("File"),kE=Gi("Blob"),SE=Gi("FileList"),_E=t=>Wc(t)&&ei(t.pipe),CE=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||ei(t.append)&&((e=Bc(t))==="formdata"||e==="object"&&ei(t.toString)&&t.toString()==="[object FormData]"))},$E=Gi("URLSearchParams"),[TE,AE,EE,ME]=["ReadableStream","Request","Response","Headers"].map(Gi),RE=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),p=d.length;let b;for(r=0;r<p;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;zc(e[d])&&zc(r)?e[d]=Kd(e[d],r):zc(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,p;const b={};if(e=e||{},t==null)return e;do{for(u=Object.getOwnPropertyNames(t),d=u.length;d-- >0;)p=u[d],(!r||r(p,t,e))&&!b[p]&&(e[p]=t[p],b[p]=!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[Pc]).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 p;(p=e(u,d,t))!==!1&&(r[d]=p||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[Pc])}const YE=t=>{const e=new Array(10),n=(r,u)=>{if(Wc(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[u]=r;const d=_a(r)?[]:{};return pl(r,(p,b)=>{const f=n(p,u+1);!dl(f)&&(d[b]=f)}),e[u]=void 0,d}}return r};return n(t,0)},XE=Gi("AsyncFunction"),QE=t=>t&&(Wc(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[Pc]),Te={isArray:_a,isArrayBuffer:ob,isBuffer:mE,isFormData:CE,isArrayBufferView:yE,isString:vE,isNumber:sb,isBoolean:bE,isObject:Wc,isPlainObject:zc,isReadableStream:TE,isRequest:AE,isResponse:EE,isHeaders:ME,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:RE,stripBOM:OE,inherits:IE,toFlatObject:NE,kindOf:Bc,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 p=Object.create(db);return Te.toFlatObject(t,p,function(b){return b!==Error.prototype},b=>b!=="isAxiosError"),Lt.call(p,t.message,e,n,r,u),p.cause=t,p.name=t.name,d&&Object.assign(p,d),p};const eM=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 tM(t){return Te.isArray(t)&&!t.some(Gd)}const nM=Te.toFlatObject(Te,{},null,function(t){return/^is[A-Z]/.test(t)});function Hc(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,p=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 f(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)&&tM(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(p===!0?gb([o],k,d):p===null?o:o+"[]",f(w))}),!1}return Gd(c)?!0:(e.append(gb(l,o,d),f(c)),!1)}const i=[],a=Object.assign(nM,{defaultVisitor:g,convertValue:f,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&&Hc(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 rM(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||rM;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 p=t.indexOf("#");p!==-1&&(t=t.slice(0,p)),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},iM=typeof URLSearchParams<"u"?URLSearchParams:Yd,oM=typeof FormData<"u"?FormData:null,sM=typeof Blob<"u"?Blob:null,aM={isBrowser:!0,classes:{URLSearchParams:iM,FormData:oM,Blob:sM},protocols:["http","https","file","blob","url","data"]},Xd=typeof window<"u"&&typeof document<"u",Qd=typeof navigator=="object"&&navigator||void 0,lM=Xd&&(!Qd||["ReactNative","NativeScript","NS"].indexOf(Qd.product)<0),cM=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",uM=Xd&&window.location.href||"http://localhost",hM=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xd,hasStandardBrowserEnv:lM,hasStandardBrowserWebWorkerEnv:cM,navigator:Qd,origin:uM},Symbol.toStringTag,{value:"Module"})),Er={...hM,...aM};function dM(t,e){return Hc(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 pM(t){return Te.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function fM(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 p=n[d++];if(p==="__proto__")return!0;const b=Number.isFinite(+p),f=d>=n.length;return p=!p&&Te.isArray(u)?u.length:p,f?(Te.hasOwnProp(u,p)?u[p]=[u[p],r]:u[p]=r,!b):((!u[p]||!Te.isObject(u[p]))&&(u[p]=[]),e(n,r,u[p],d)&&Te.isArray(u[p])&&(u[p]=fM(u[p])),!b)}if(Te.isFormData(t)&&Te.isFunction(t.entries)){const n={};return Te.forEachEntry(t,(r,u)=>{e(pM(r),u,n,0)}),n}return null}function gM(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 dM(t,this.formSerializer).toString();if((d=Te.isFileList(t))||n.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return Hc(d?{"files[]":t}:t,p&&new p,this.formSerializer)}}return u||r?(e.setContentType("application/json",!1),gM(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 mM=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"]),yM=t=>{const e={};let n,r,u;return t&&t.split(`
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 Sn(s);if(!s||!(y=ki(y)))return s;var z=At(s),G=At(y),ee=It(z,G),le=ar(z,G)+1;return gs(z,ee,le).join("")}function MP(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=ar(z,At(y))+1;return gs(z,0,G).join("")}function RP(s,y,E){if(s=un(s),s&&(E||y===n))return s.replace(Ln,"");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(In(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)?Mn(s):Y(s):s.match(y)||[]}var Ox=zt(function(s,y){try{return mr(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(p);return[E(z[0]),z[1]]}):[],zt(function(z){for(var G=-1;++G<y;){var ee=s[G];if(mr(ee[0],this,z))return mr(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=wr(y),G=Tu(y,z);E==null&&!(In(y)&&(G.length||!z.length))&&(E=y,y=s,s=this,G=Tu(y,wr(y)));var ee=!(In(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=Ou(function(s,y){return s+y},0),sB=Yp("ceil"),aB=Ou(function(s,y){return s/y},1),lB=Yp("floor");function cB(s){return s&&s.length?$u(s,hi,Ip):n}function uB(s,y){return s&&s.length?$u(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?$u(s,hi,Pp):n}function fB(s,y){return s&&s.length?$u(s,vt(y,2),Pp):n}var gB=Ou(function(s,y){return s*y},1),mB=Yp("round"),yB=Ou(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=Vu,J.assignWith=EF,J.at=MF,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=RF,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=wr,J.keysIn=ui,J.map=ju,J.mapKeys=VF,J.mapValues=KF,J.matches=WP,J.matchesProperty=zP,J.memoize=zu,J.merge=GF,J.mergeWith=$x,J.method=HP,J.methodOf=UP,J.mixin=yf,J.negate=Hu,J.nthArg=VP,J.omit=YF,J.omitBy=XF,J.once=qD,J.orderBy=MD,J.over=KP,J.overArgs=VD,J.overEvery=GP,J.overSome=YP,J.partial=cf,J.partialRight=yx,J.partition=RD,J.pick=QF,J.pickBy=Tx,J.property=Ix,J.propertyOf=XP,J.pull=MN,J.pullAll=sx,J.pullAllBy=RN,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=Bu,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=Vu,yf(J,J),J.add=oB,J.attempt=Ox,J.camelCase=cP,J.capitalize=Mx,J.ceil=sB,J.clamp=sP,J.clone=eF,J.cloneDeep=nF,J.cloneDeepWith=rF,J.cloneWith=tF,J.conformsTo=iF,J.deburr=Rx,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=Zn,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=Uu,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=In,J.isObjectLike=Hn,J.isPlainObject=Bl,J.isRegExp=hf,J.isSafeInteger=xF,J.isSet=xx,J.isString=qu,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=Wu,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=MP,J.trimStart=RP,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:fr(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(Hu(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:Bu,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=br[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[Lu(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=lr();sr?((sr.exports=Xt)._=Xt,Cn._=Xt):pn._=Xt}).call(_$)}(xc,xc.exports)),xc.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,cr="u-",E$="uplot",M$=cr+"hz",R$=cr+"vt",L$=cr+"title",O$=cr+"wrap",I$=cr+"under",N$=cr+"over",D$=cr+"axis",Ms=cr+"off",F$=cr+"select",P$=cr+"cursor-x",B$=cr+"cursor-y",j$=cr+"cursor-pt",W$=cr+"legend",z$=cr+"live",H$=cr+"inline",U$=cr+"series",q$=cr+"marker",Xm=cr+"label",V$=cr+"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",kc="dppxchange",Wh="--",ga=typeof window<"u",zh=ga?document:null,ma=ga?window:null,Y$=ga?navigator:null;let rn,Sc;function Hh(){let t=devicePixelRatio;rn!=t&&(rn=t,Sc&&Vh(ry,Sc,Hh),Sc=matchMedia(`(min-resolution: ${rn-.001}dppx) and (max-resolution: ${rn+.001}dppx)`),Rs(ry,Sc,Hh),ma.dispatchEvent(new CustomEvent(kc)))}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 _n(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)",p=iy.get(t);d!=p&&(t.style.transform=d,iy.set(t,d),e<0||n<0||e>r||n>u?di(t,Ms):Uh(t,Ms))}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 Rs(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 p=n;p<=r;p++)if(t(e[p])){u=p;break}for(let p=r;p>=n;p--)if(t(e[p])){d=p;break}return[u,d]}}const uy=t=>t!=null,hy=t=>t!=null&&t>0,_c=cy(uy),Q$=cy(hy);function Z$(t,e,n,r=0,u=!1){let d=u?Q$:_c,p=u?hy:uy;[e,n]=d(t,e,n);let b=t[e],f=t[e];if(e>-1)if(r==1)b=t[e],f=t[n];else if(r==-1)b=t[n],f=t[e];else for(let g=e;g<=n;g++){let i=t[g];p(i)&&(i<b?b=i:i>f&&(f=i))}return[b??gn,f??-gn]}function Cc(t,e,n,r){let u=fy(t),d=fy(e);t==e&&(u==-1?(t*=n,e/=n):(t/=n,e*=n));let p=n==10?Co:gy,b=u==1?fi:Ti,f=d==1?Ti:fi,g=b(p(ur(t))),i=f(p(ur(e))),a=ya(n,g),h=ya(n,i);return n==10&&(g<0&&(a=mn(a,-g)),i<0&&(h=mn(h,-i))),r||n==2?(t=a*u,e=h*d):(t=ky(t,a),e=Ac(e,h)),[t,e]}function Kh(t,e,n,r){let u=Cc(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 $c(t,e,n,r){return Ec(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),p=tn(u.pad,0),b=tn(r.hard,-gn),f=tn(u.hard,gn),g=tn(r.soft,gn),i=tn(u.soft,-gn),a=tn(r.mode,0),h=tn(u.mode,0),c=e-t,o=Co(c),l=Wr(ur(t),ur(e)),m=Co(l),w=ur(m-o);(c<1e-24||w>10)&&(c=0,(t==0||e==0)&&(c=1e-24,a==2&&g!=gn&&(d=0),h==2&&i!=-gn&&(p=0)));let k=c||l||1e3,M=Co(k),T=ya(10,fi(M)),S=k*(c==0?t==0?.1:1:d),x=mn(ky(t-S,T/10),24),R=t>=g&&(a==1||a==3&&x<=g||a==2&&x>=g)?g:gn,O=Wr(b,x<R&&t>=R?R:Ki(R,x)),F=k*(c==0?e==0?.1:1:p),L=mn(Ac(e+F,T/10),24),H=e<=i&&(h==1||h==3&&L>=i||h==2&&L<=i)?i:-gn,P=Ki(f,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,Tc=pi.PI,ur=pi.abs,fi=pi.floor,hr=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),gn=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 mn(t,r)};function Os(t,e){return Ls(mn(Ls(t/e))*e)}function Ac(t,e){return Ls(Ti(Ls(t/e))*e)}function ky(t,e){return Ls(fi(Ls(t/e))*e)}function mn(t,e=0){if(_y(t))return t;let n=10**e,r=t*n*(1+Number.EPSILON);return hr(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 p=e;p<n;p++){let b=ur(p),f=mn(ya(t,p),b);for(let g=0;g<r.length;g++){let i=t==10?+`${r[g]}e${p}`:r[g]*f,a=(p>=0?0:b)+(p>=d[g]?0:d[g]),h=t==10?i:mn(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 Ec(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=Ec){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 rr(t){let e=arguments;for(let n=1;n<e.length;n++){let r=e[n];for(let u in r)u!=$y&&(Ec(t[u])?rr(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 p=e[r];if(p>d){for(u=p-1;u>=0&&t[u]==null;)t[u--]=null;for(u=p+1;u<n&&t[u]==null;)t[d=u++]=null}}}function pT(t,e){if(mT(t)){let p=t[0].slice();for(let b=1;b<t.length;b++)p.push(...t[b].slice(1));return yT(p[0])||(p=gT(p)),p}let n=new Set;for(let p=0;p<t.length;p++){let b=t[p][0],f=b.length;for(let g=0;g<f;g++)n.add(b[g])}let r=[Array.from(n).sort((p,b)=>p-b)],u=r[0].length,d=new Map;for(let p=0;p<u;p++)d.set(r[0][p],p);for(let p=0;p<t.length;p++){let b=t[p],f=b[0];for(let g=1;g<b.length;g++){let i=b[g],a=Array(u).fill(void 0),h=e?e[p][g]:uT,c=[];for(let o=0;o<i.length;o++){let l=i[o],m=d.get(f[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,p)=>e[d]-e[p]);let u=[];for(let d=0;d<t.length;d++){let p=t[d],b=Array(n);for(let f=0;f<n;f++)b[f]=p[r[f]];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 p=t[r],b=r+d;b<=u;b+=d){const f=t[b];if(f!=null){if(f<=p)return!1;p=f}}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 p="";for(let b=0;b<n.length;b++)p+=typeof n[b]=="string"?n[b]:n[b](d,e);return p}}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 My=t=>t%1==0,Mc=[1,2,2.5,5],CT=ll(10,-32,0,Mc),Ry=ll(10,0,32,Mc),$T=Ry.filter(My),Is=CT.concat(Ry),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,p=u*365,b=(t==1?ll(10,0,3,Mc).filter(My):ll(10,-3,0,Mc)).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,p,p*2,p*5,p*10,p*25,p*50,p*100]);const f=[[p,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>=p,M=l>=d&&l<p,T=i(c),S=mn(T*t,3),x=td(T.getFullYear(),k?0:T.getMonth(),M||k?1:T.getDate()),R=mn(x*t,3);if(M||k){let O=M?l/d:0,F=k?l/p:0,L=S==R?S:mn(td(x.getFullYear()+F,x.getMonth()+O,1)*t,3),H=new Date(hr(L/t)),P=H.getFullYear(),I=H.getMonth();for(let $=0;L<=o;$++){let C=td(P+F*$,I+O*$,1),N=C-i(mn(C*t,3));L=mn((+C+N)*t,3),L<=o&&w.push(L)}}else{let O=l>=u?u:l,F=fi(c)-fi(S),L=R+F+Ac(S-R,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=mn(L+l,t==1?0:3),!(L>o);)if(I>1){let N=fi(mn(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];mn((L-U)/l,3)*C>=.7&&w.push(L)}else w.push(L)}return w}}return[b,f,g]}const[AT,ET,MT]=Py(1),[RT,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,p)=>{let b=e.find(o=>p>=o[0])||e[e.length-1],f,g,i,a,h,c;return r.map(o=>{let l=t(o),m=l.getFullYear(),w=l.getMonth(),k=l.getDate(),M=l.getHours(),T=l.getMinutes(),S=l.getSeconds(),x=m!=f&&b[2]||w!=g&&b[3]||k!=i&&b[4]||M!=a&&b[5]||T!=h&&b[6]||S!=c&&b[7]||b[1];return f=m,g=w,i=k,a=M,h=T,c=S,x(l)})}}function IT(t,e){let n=Jh(e);return(r,u,d,p,b)=>u.map(f=>n(t(f)))}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);_n(r,il,u),_n(r,ol,u);let d=u/-2;_n(r,"marginLeft",d),_n(r,"marginTop",d);let p=n.width(t,e,u);return p&&_n(r,"borderWidth",p),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 Lc(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:Lc,mouseup:Lc,click:Lc,dblclick:Lc,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=rr({},Hy,{filter:by}),Uy=rr({},id,{size:10}),qy=rr({},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:gn,max:-gn,idxs:[]};function KT(t,e,n,r,u){return e.map(d=>d==null?"":Yh(d))}function GT(t,e,n,r,u,d,p){let b=[],f=Qo.get(u)||0;n=p?n:mn(Ac(n,u),f);for(let g=n;g<=r;g=mn(g+u,f))b.push(Object.is(g,-0)?0:g);return b}function sd(t,e,n,r,u,d,p){const b=[],f=t.scales[t.axes[e].scale].log,g=f==10?Co:gy,i=fi(g(n));u=ya(f,i),f==10&&(u=Is[Vi(u,Is)]);let a=n,h=u*f;f==10&&(h=Is[Vi(h,Is)]);do b.push(a),a=a+u,f==10&&!Qo.has(a)&&(a=mn(a,Qo.get(u))),a>=h&&(u=a,h=u*f,f==10&&(h=Is[Vi(h,Is)]));while(a<=r);return b}function YT(t,e,n,r,u,d,p){let b=t.scales[t.axes[e].scale].asinh,f=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,f)}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],p=d.scale,b=t.scales[p],f=t.valToPos,g=d._space,i=f(10,p),a=f(9,p)-i>=g?Xy:f(7,p)-i>=g?XT:f(5,p)-i>=g?QT:Qy;if(a==Qy){let h=ur(f(1,p)-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],p=d.scale,b=d._space,f=t.valToPos,g=ur(f(1,p)-f(2,p));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 mn(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),p=t.valToPos(u[r[1]],n,!0),b=ur(p-d),f=t.series[e],g=b/(f.points.space*rn);return r[1]-r[0]<=g}const Jy={scale:null,auto:!0,sorted:0,min:gn,max:-gn},ev=(t,e,n,r,u)=>u,tv={show:!0,auto:!0,sorted:0,gaps:ev,alpha:1,facets:[rr({},Jy,{scale:"x"}),rr({},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:gn,max:-gn,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=rr({},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,p,b,f,g){for(let i=0;i<n.plots.length;i++)n.plots[i]!=u&&n.plots[i].pub(r,u,d,p,b,f,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,p=t.scales,b=t.bbox;let f=d[0],g=r==2?d[1]:d[e],i=r==2?p[u.facets[0].scale]:p[t.series[0].scale],a=r==2?p[u.facets[1].scale]:p[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,f,g,i,a,m,w,h,c,o,l,Ic,ka,Dc,lv,uv):n(u,f,g,i,a,w,m,c,h,l,o,Nc,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 p=u[d];p.series[0]==e?n=p.dir:p.series[1]==e&&(p.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,p=t.series[e],b=d==2?p.facets[1].scale:p.scale,f=t.scales[b];return u==-1?f.min:u==1?f.max:f.distr==3?f.dir==1?f.min:f.max:0}function $o(t,e,n,r,u,d){return Ns(t,e,(p,b,f,g,i,a,h,c,o,l,m)=>{let w=p.pxRound;const k=g.dir*(g.ori==0?1:-1),M=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)),R=w(h(f[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 M(L,O,F),M(L,x,F),M(L,x,R),L})}function Oc(t,e,n,r,u,d){let p=null;if(t.length>0){p=new Path2D;const b=e==0?Dc:hd;let f=n;for(let a=0;a<t.length;a++){let h=t[a];if(h[1]>h[0]){let c=h[0]-f;c>0&&b(p,f,r,c,r+d),f=h[1]}}let g=n+u-f,i=10;g>0&&b(p,f,r-i/2,g,r+d+i)}return p}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,p){let b=[],f=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=p<=0&&o>=0&&o<f?d(t[o]):h;let l=a+u;c=p>=0&&l>=0&&l<f?d(t[l]):c,c>=h&&b.push([h,c])}return b}function sv(t){return t==0?vy:t==1?hr:e=>Os(e,t)}function av(t){let e=t==0?Ic:Nc,n=t==0?(u,d,p,b,f,g)=>{u.arcTo(d,p,b,f,g)}:(u,d,p,b,f,g)=>{u.arcTo(p,d,f,b,g)},r=t==0?(u,d,p,b,f)=>{u.rect(d,p,b,f)}:(u,d,p,b,f)=>{u.rect(p,d,f,b)};return(u,d,p,b,f,g=0,i=0)=>{g==0&&i==0?r(u,d,p,b,f):(g=Ki(g,b/2,f/2),i=Ki(i,b/2,f/2),e(u,d+g,p),n(u,d+b,p,d+b,p+f,g),n(u,d+b,p+f,d,p+f,i),n(u,d,p+f,d,p,i),n(u,d,p,d+b,p,g),u.closePath())}}const Ic=(t,e,n)=>{t.moveTo(e,n)},Nc=(t,e,n)=>{t.moveTo(n,e)},ka=(t,e,n)=>{t.lineTo(e,n)},Sa=(t,e,n)=>{t.lineTo(n,e)},Dc=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,p)=>{t.bezierCurveTo(e,n,r,u,d,p)},hv=(t,e,n,r,u,d,p)=>{t.bezierCurveTo(n,e,u,r,p,d)};function dv(t){return(e,n,r,u,d)=>Ns(e,n,(p,b,f,g,i,a,h,c,o,l,m)=>{let{pxRound:w,points:k}=p,M,T;g.ori==0?(M=Ic,T=lv):(M=Nc,T=cv);const S=mn(k.width*rn,3);let x=(k.size-k.width)/2*rn,R=mn(x*2,3),O=new Path2D,F=new Path2D,{left:L,top:H,width:P,height:I}=e.bbox;Dc(F,L-R,H-R,P+R*2,I+R*2);const $=C=>{if(f[C]!=null){let N=w(a(b[C],g,l,c)),j=w(h(f[C],i,m,o));M(O,N+x,j),T(O,N,j,x,0,Tc*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,p)=>{r!=u&&(d!=r&&p!=r&&t(e,n,r),d!=u&&p!=u&&t(e,n,u),t(e,n,p))}}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,(p,b,f,g,i,a,h,c,o,l,m)=>{[u,d]=_c(f,u,d);let w=p.pxRound,k=P=>w(a(P,g,l,c)),M=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),R={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:xa},O=R.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=f[he];ae==U?ue!=null?(N=ue,I==null?(T(O,ae,M(N)),C=I=$=N):N<I?I=N:N>$&&($=N)):ue===null&&(F=!0):(I!=null&&S(O,U,M(I),M($),M(C),M(N)),ue!=null?(N=ue,T(O,ae,M(N)),I=$=C=N):(I=$=null,ue===null&&(F=!0)),U=ae,te=P(U+x))}I!=null&&I!=$&&j!=U&&S(O,U,M(I),M($),M(C),M(N))}else for(let P=x==1?u:d;P>=u&&P<=d;P+=x){let I=f[P];I===null?F=!0:I!=null&&T(O,k(b[P]),M(I))}let[L,H]=cd(n,r);if(p.fill!=null||L!=0){let P=R.fill=new Path2D(O),I=p.fillTo(n,r,p.min,p.max,L),$=M(I),C=k(b[u]),N=k(b[d]);x==-1&&([N,C]=[C,N]),T(P,N,$),T(P,C,$)}if(!p.spanGaps){let P=[];F&&P.push(...ud(b,f,u,d,x,k,e)),R.gaps=P=p.gaps(n,r,u,d,P),R.clip=Oc(P,g.ori,c,o,l,m)}return H!=0&&(R.band=H==2?[$o(n,r,u,d,O,-1),$o(n,r,u,d,O,1)]:$o(n,r,u,d,O,H)),R})}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,p,b,f)=>Ns(d,p,(g,i,a,h,c,o,l,m,w,k,M)=>{[b,f]=_c(a,b,f);let T=g.pxRound,{left:S,width:x}=d.bbox,R=Z=>T(o(Z,h,k,m)),O=Z=>T(l(Z,c,M,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:f]),$=R(i[P==1?b:f]),C=$,N=$;u&&e==-1&&(N=S,F(H,N,I)),F(H,$,I);for(let Z=P==1?b:f;Z>=b&&Z<=f;Z+=P){let te=a[Z];if(te==null)continue;let he=R(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,p);if(g.fill!=null||U!=0){let Z=L.fill=new Path2D(H),te=g.fillTo(d,p,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,f,P,R,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,p,b,f,Z),L.clip=Oc(Z,h.ori,m,w,k,M)}return K!=0&&(L.band=K==2?[$o(d,p,b,f,H,-1),$o(d,p,b,f,H,1)]:$o(d,p,b,f,H,K)),L})}function gv(t,e,n,r,u,d,p=gn){if(t.length>1){let b=null;for(let f=0,g=1/0;f<t.length;f++)if(e[f]!==void 0){if(b!=null){let i=ur(t[f]-t[b]);i<g&&(g=i,p=ur(n(t[f],r,u,d)-n(t[b],r,u,d)))}b=f}}return p}function uA(t){t=t||cl;const e=tn(t.size,[.6,gn,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),p=1-e[0],b=tn(e[1],gn),f=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,M,T,S,x,R,O,F,L,H)=>{let P=w.pxRound,I=n,$=r*rn,C=b*rn,N=f*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?Dc: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(R(ae,S,H,F)),ce,ge,Ee,Me=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:bn}=g;if(sn!=null&&bn!=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=bn.values(c,o,l,m);bn.unit==2?ge=qe[0]*L:ge=x(qe[0],T,L,O)-x(0,T,L,O),Me=gv(k,M,x,T,L,O,Me),Ee=Me-ge+$}else Me=gv(k,M,x,T,L,O,Me),Ee=Me*p+$,ge=Me-Ee;Ee<1&&(Ee=0),Le>=ge/2&&(Le=0),Ee<5&&(P=vy);let Jt=Ee>0,xr=Me-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 wn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Dn=Xe?null:new Path2D;let Fn=null;if(he!=null)Fn=c.data[he.series[1]];else{let{y0:qe,y1:Se}=g;qe!=null&&Se!=null&&(M=Se.values(c,o,l,m),Fn=qe.values(c,o,l,m))}let or=j*ge,xt=U*ge;for(let qe=K==1?l:m;qe>=l&&qe<=m;qe+=K){let Se=M[qe];if(Se==null)continue;if(Fn!=null){let pt=Fn[qe]??0;if(Se-pt==0)continue;ue=R(pt,S,H,F)}let He=T.distr!=2||g!=null?k[qe]:qe,Qe=x(He,T,L,O),mt=R(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:or,kt=Se<0?or: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(Dn,$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?wn.stroke=Xe?gt:Dn:Xe||(wn._fill=w.width==0?w._fill:w._stroke??w._fill,wn.width=0),wn.fill=Xe?ft:Dn,wn})}function hA(t,e){const n=tn(e==null?void 0:e.alignGaps,0);return(r,u,d,p)=>Ns(r,u,(b,f,g,i,a,h,c,o,l,m,w)=>{[d,p]=_c(g,d,p);let k=b.pxRound,M=j=>k(h(j,i,m,o)),T=j=>k(c(j,a,w,l)),S,x,R;i.ori==0?(S=Ic,R=ka,x=uv):(S=Nc,R=Sa,x=hv);const O=i.dir*(i.ori==0?1:-1);let F=M(f[O==1?d:p]),L=F,H=[],P=[];for(let j=O==1?d:p;j>=d&&j<=p;j+=O)if(g[j]!=null){let U=f[j],K=M(U);H.push(L=K),P.push(T(g[j]))}const I={stroke:t(H,P,S,R,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);R(j,L,K),R(j,F,K)}if(!b.spanGaps){let j=[];j.push(...ud(f,g,d,p,O,M,n)),I.gaps=j=b.gaps(r,u,d,p,j),I.clip=Oc(j,i.ori,o,l,m,w)}return N!=0&&(I.band=N==2?[$o(r,u,d,p,$,-1),$o(r,u,d,p,$,1)]:$o(r,u,d,p,$,N)),I})}function dA(t){return hA(pA,t)}function pA(t,e,n,r,u,d){const p=t.length;if(p<2)return null;const b=new Path2D;if(n(b,t[0],e[0]),p==2)r(b,t[1],e[1]);else{let f=Array(p),g=Array(p-1),i=Array(p-1),a=Array(p-1);for(let h=0;h<p-1;h++)i[h]=e[h+1]-e[h],a[h]=t[h+1]-t[h],g[h]=i[h]/a[h];f[0]=g[0];for(let h=1;h<p-1;h++)g[h]===0||g[h-1]===0||g[h-1]>0!=g[h]>0?f[h]=0:(f[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(f[h])||(f[h]=0));f[p-1]=g[p-2];for(let h=0;h<p-1;h++)u(b,t[h]+a[h]/3,e[h]+f[h]*a[h]/3,t[h+1]-a[h]/3,e[h+1]-f[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&&(Rs(K$,ma,mv),Rs(G$,ma,mv,!0),Rs(kc,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?{}:rr({},e,n))}function pd(t,e,n,r){return rr({},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:$c(e,n,Gh,!0)}function bv(t,e,n,r){return e==null?va:Cc(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)),p=e-t,b=Vi(u/r*p,n);do{let f=n[b],g=r*f/p;if(g>=u&&d+(f<5?Qo.get(f):0)<=17)return[f,g]}while(++b<n.length);return[0,0]}function xv(t){let e,n;return t=t.replace(/(\d+)px/,(r,u)=>(e=hr((n=+u)*rn))+"px"),[t,e,n]}function kA(t){t.show&&[t.font,t.labelFont].forEach(e=>{let n=mn(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 p(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):p(q,X,ie,oe)}r.valToPosH=d,r.valToPosV=p;let f=!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);Rs("click",h,q=>{q.target===o&&(ln!=Ri||Gt!=wo)&&Bn.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),M=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,R={axes:Lo,series:La},O=(t.drawOrder||["axes","series"]).map(q=>R[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,Re=we-fe;return(oe-fe)/Re}}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=rr({},T[ie.from],ie,{key:q});oe.valToPct=F(oe),T[q]=oe}else{X=T[q]=rr({},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&&Ec(fe))){let Re=fe;fe=(Be,We,Ke)=>We==null?va:$c(We,Ke,Re)}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)}),M.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,M$),I=d,$=p):(di(g,R$),I=p,$=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(hr(q/w))),j=t.fmtDate||Jh,U=w==1?MT(N):OT(N),K=jy(N,By(w==1?ET:LT,j)),Z=zy(N,Wy(NT,j)),te=[],he=r.legend=rr({},PT,t.legend),ne=r.cursor=rr({},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,Me,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),Me=qi("tbody",null,ge),he.mount(r,ge),ft){Ee=qi("thead",null,ge,Me);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},bn={show:!1};function Jt(q,X){if(X==0&&(ft||!he.live||u==2))return va;let ie=[],oe=qi("tr",U$,Me,Me.childNodes[X]);di(oe,q.class),q.show||di(oe,Ms);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)),wn("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:bn:sn,!0,ht.setSeries)})}else Ur(We,{show:!q.show},!0,ht.setSeries)},!1),Zi&&wn(ey,fe,Be=>{ne._lock||(Qi(Be),Ur(k.indexOf(q),Ii,!0,ht.setSeries))},!1));for(var Re in Ge){let Be=qi("td",V$,oe);Be.textContent="--",ie.push(Be)}return[oe,ie]}const xr=new Map;function wn(q,X,ie,oe=!0){const fe=xr.get(X)||{},we=ne.bind[q](r,X,ie,oe);we&&(Rs(q,X,fe[q]=we),xr.set(X,fe))}function Dn(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 Fn=0,or=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 Tn=!1,Rr=!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,Rr=!0,bo()}function Jo(q,X){r.width=Fn=xt=q,r.height=or=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),Rr=!0)}}function kl({width:q,height:X}){Ao(q,X)}r.setSize=kl;function zs(){let q=!1,X=!1,ie=!1,oe=!1;M.forEach((fe,we)=>{if(fe.show&&fe._show){let{side:Re,_size:Be}=fe,We=Re%2,Ke=fe.label!=null?fe.labelSize:0,Ze=Be+Ke;Ze>0&&(We?(xt-=Ze,Re==3?(Se+=Ze,oe=!0):ie=!0):(qe-=Ze,Re==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,Re){switch(we){case 1:return q+=Re,q-Re;case 2:return X+=Re,X-Re;case 3:return ie-=Re,ie+Re;case 0:return oe-=Re,oe+Re}}M.forEach((we,Re)=>{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,Re,Be)=>{if(we==0)return Re;let We=Re,Ke=ie(fe,we,Re,Be)??gn,Ze=Ke>=0&&Ke<gn,et=H.ori==0?xt:qe,_t=ne.left,Ht=e[0],At=e[we];if(X.has(At[Re])){We=null;let Wt=null,yt=null,at;if(oe==0||oe==-1)for(at=Re;Wt==null&&at-- >0;)X.has(At[at])||(Wt=at);if(oe==0||oe==1)for(at=Re;yt==null&&at++<At.length;)X.has(At[at])||(yt=at);if(Wt!=null||yt!=null)if(Ze){let yn=Wt==null?-1/0:I(Ht[Wt],H,et,0),Mn=yt==null?1/0:I(Ht[yt],H,et,0),lr=_t-yn,Xt=Mn-_t;lr<=Xt?lr<=Ke&&(We=Wt):Xt<=Ke&&(We=yt)}else We=yt==null?Wt:Wt==null?yt:Re-Wt<=yt-Re?Wt:yt}else Ze&&ur(_t-I(Ht[Re],H,et,0))>Ke&&(We=null);return We}}const Qi=q=>{ne.event=q};ne.idxs=te,ne._lock=!1;let Yn=ne.points;Yn.show=Vt(Yn.show),Yn.size=Vt(Yn.size),Yn.stroke=Vt(Yn.stroke),Yn.width=Vt(Yn.width),Yn.fill=Vt(Yn.fill);const Lr=r.focus=rr({},t.focus||{alpha:.3},ne.focus),Zi=Lr.prox>=0,Ln=Zi&&Yn.one;let Or=[],go=[],Ji=[];function Hs(q,X){let ie=Yn.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 Ma(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(Ln||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=rr({},{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;Ln?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),Ma(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];Dn(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(Re=>{!Qo.has(Re)&&Qo.set(Re,Sy(Re))}),q.incrs=Vt(q.incrs||(oe.distr==2?$T:fe?w==1?AT:RT: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,Re,Be]=ie,We=X%2,Ke=0;return We==0&&(Be||we)&&(Ke=X==0&&!fe||X==2&&!Re?hr(Gy.size/3):0),We==1&&(fe||Re)&&(Ke=X==1&&!we||X==3&&!Be?hr(Zy.size/2):0),Ke}const Ra=r.padding=(t.padding||[Kt,Kt,Kt,Kt]).map(q=>Vt(tn(q,Kt))),Ir=r._padding=Ra.map((q,X)=>q(r,X,eo,0));let Xn,xn=null,Pn=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){Xn=0;for(let ie=1;ie<k.length;ie++)Xn+=e[ie][0].length}else{e.length==0&&(r.data=r._data=e=[[]]),Nr=e[0],Xn=Nr.length;let ie=e;if(P==2){ie=e.slice();let oe=ie[0]=Array(Xn);for(let fe=0;fe<Xn;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():sr(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&&(Xn>0?(xn=Ai[0]=0,Pn=Ai[1]=Xn-1,q=e[0][xn],X=e[0][Pn],P==2?(q=xn,X=Pn):q==X&&(P==3?[q,X]=Cc(q,q,H.log,!1):P==4?[q,X]=Kh(q,q,H.log,!1):H.time?X=q+hr(86400/w):[q,X]=$c(q,X,Gh,!0))):(xn=Ai[0]=q=null,Pn=Ai[1]=X=null)),sr(x,q,X)}let mo,oi,Eo,ts,si,ns,qs,Vs,rs,dr;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 Mo(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(xn,0),Re=tn(Pn,oe.length-1),Be=ie.min==null?Z$(oe,we,Re,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)rr(we,fe);else if(oe!=x||u==2)if(Xn==0&&we.from==null){let Re=we.range(r,null,null,oe);we.min=Re[0],we.max=Re[1]}else we.min=gn,we.max=-gn}}if(Xn>0){k.forEach((oe,fe)=>{if(u==1){let we=oe.scale,Re=C[we];if(Re==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],xn=Vi(Be.min,e[0]),Pn=Vi(Be.max,e[0]),Pn-xn>1&&(e[0][xn]<Be.min&&xn++,e[0][Pn]>Be.max&&Pn--),oe.min=Nr[xn],oe.max=Nr[Pn]}else oe.show&&oe.auto&&is(Be,Re,oe,e[fe],oe.sorted);oe.idxs[0]=xn,oe.idxs[1]=Pn}else if(fe>0&&oe.show&&oe.auto){let[we,Re]=oe.facets,Be=we.scale,We=Re.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],Re,Ze,Re.sorted),oe.min=Re.min,oe.max=Re.max}});for(let oe in q){let fe=q[oe],we=C[oe];if(fe.from==null&&(we==null||we.min==null)){let Re=fe.range(r,fe.min==gn?null:fe.min,fe.max==-gn?null:fe.max,oe);fe.min=Re[0],fe.max=Re[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 Re=fe.range(r,we.min,we.max,oe);fe.min=Re[0],fe.max=Re[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 Re=we.distr;we._min=Re==3?Co(we.min):Re==4?Xh(we.min,we.asinh):Re==100?we.fwd(we.min):we.min,we._max=Re==3?Co(we.max):Re==4?Xh(we.max,we.asinh):Re==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(xn-1,0,Xn-1),ie=Qh(Pn+1,0,Xn-1);for(;q[X]==null&&X>0;)X--;for(;q[ie]==null&&ie<Xn-1;)ie++;return[X,ie]}function La(){if(Xn>0){let q=k.some(X=>X._focus)&&dr!=Lr.alpha;q&&(a.globalAlpha=dr=Lr.alpha),k.forEach((X,ie)=>{if(ie>0&&X.show&&(ss(ie,!1),ss(ie,!0),X._paths==null)){let oe=dr;dr!=X.alpha&&(a.globalAlpha=dr=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]),dr!=oe&&(a.globalAlpha=dr=oe)}}),k.forEach((X,ie)=>{if(ie>0&&X.show){let oe=dr;dr!=X.alpha&&(a.globalAlpha=dr=X.alpha),X._paths!=null&&as(ie,!1);{let fe=X._paths!=null?X._paths.gaps:null,we=X.points.show(r,ie,xn,Pn,fe),Re=X.points.filter(r,ie,we,fe);(we||Re)&&(X.points._paths=X.points.paths(r,ie,xn,Pn,Re),as(ie,!0))}dr!=oe&&(a.globalAlpha=dr=oe),nt("drawSeries",ie)}}),q&&(a.globalAlpha=dr=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:Re,_stroke:Be=ie._stroke,_fill:We=ie._fill,_width:Ke=ie.width}=ie._paths;Ke=mn(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?Ro(Be,Ke,ie.dash,ie.cap,We,oe,fe,Re,we):Ys(q,Be,Ke,ie.dash,ie.cap,We,oe,fe,Re,Ze,we),_t&&a.translate(-et,-et)}function Ys(q,X,ie,oe,fe,we,Re,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,yn=null;At.show&&yt&&eT(Wt,xn,Pn)?(yn=_t.fill(r,Ht)||we,at=At._paths.clip):yt=null,Ro(X,ie,oe,fe,yn,Re,Be,We,Ke,Ze,at,yt),et=!0}}),et||Ro(X,ie,oe,fe,we,Re,Be,We,Ke,Ze)}const ls=xa|ld;function Ro(q,X,ie,oe,fe,we,Re,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),pr(fe,Re),Mi(q,we,X)):Be&ld?(pr(fe,Re),a.clip(et),Mi(q,we,X)):Be&xa&&(a.save(),a.clip(et),Ze&&a.clip(Ze),pr(fe,Re),a.restore(),Mi(q,we,X)):(pr(fe,Re),Mi(q,we,X)),(We||Ke||et)&&a.restore()}function Mi(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 pr(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=M[q],we;if(oe<=0)we=[0,0];else{let Re=fe._space=fe.space(r,q,X,ie,oe),Be=fe._incrs=fe.incrs(r,q,X,ie,oe,Re);we=xA(X,ie,Be,oe,Re)}return fe._found=we}function to(q,X,ie,oe,fe,we,Re,Be,We,Ke){let Ze=Re%2/2;l==1&&a.translate(Ze,Ze),Ks(Be,Re,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 M.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,Re=we%2,{min:Be,max:We}=fe,[Ke,Ze]=vo(oe,Be,We,Re==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 Ra.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<M.length;q++){let X=M[q];if(!X.show||!X._show)continue;let ie=X.side,oe=ie%2,fe,we,Re=X.stroke(r,q),Be=ie==0||ie==3?-1:1,[We,Ke]=X._found;if(X.label!=null){let fn=X.labelGap*Be,br=hr((X._lpos+fn)*rn);Mo(X.labelFont[0],Re,"center",ie==2?sl:Qm),a.save(),oe==1?(fe=we=0,a.translate(br,hr(Dt+kt/2)),a.rotate((ie==3?-Tc:Tc)/2)):(fe=hr(Pt+pt/2),we=br);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,yn=yt.show?yt.size:0,Mn=hr(yn*rn),lr=hr((X.alignTo==2?X._size-yn-X.gap:X.gap)*rn),Xt=X._rotate*-Tc/180,pe=m(X._pos*rn),_e=(Mn+lr)*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;Mo(Ue,Re,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 br=qr[fn];if(br!=null){oe==0?fe=Bt[fn]:we=Bt[fn],br=""+br;let Fo=br.indexOf(`
1495
+ `)==-1?[br]:br.split(/\n/gm);for(let zn=0;zn<Fo.length;zn++){let Qs=Fo[zn];Xt?(a.save(),a.translate(fe,we+zn*en),a.rotate(Xt),a.fillText(Qs,0,0),a.restore()):a.fillText(Qs,fe,we+zn*en)}}}yt.show&&to(Bt,yt.filter(r,At,q,Ke,Wt),oe,ie,pe,Mn,mn(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,mn(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,mn(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(Tn&&(yo(),Tn=!1),ii&&(gi(),ii=!1),Rr){if(_n(c,fa,Se),_n(c,sl,He),_n(c,il,xt),_n(c,ol,qe),_n(o,fa,Se),_n(o,sl,He),_n(o,il,xt),_n(o,ol,qe),_n(h,il,Fn),_n(h,ol,or),i.width=hr(Fn*rn),i.height=hr(or*rn),M.forEach(({_el:q,_show:X,_size:ie,_pos:oe,side:fe})=>{if(q!=null)if(X){let we=fe===3||fe===0?ie:0,Re=fe%2==1;_n(q,Re?"left":"top",oe-we),_n(q,Re?"width":"height",ie),_n(q,Re?"top":"left",Re?He:Se),_n(q,Re?"height":"width",Re?qe:xt),Uh(q,Ms)}else di(q,Ms)}),mo=oi=Eo=si=ns=qs=Vs=rs=ts=null,dr=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,hr(ne.left),0,xt,qe),Qn&&co(Qn,0,hr(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)_n(Hr,ie,St[ie])}Qe=Se,mt=He,$t=xt,Ct=qe}nt("setSize"),Rr=!1}Fn>0&&or>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),f||(f=!0,r.status=1,nt("ready")),Ei=!1,Oo=!1}r.redraw=(q,X)=>{ii=X||!1,q!==!1?sr(x,H.min,H.max):bo()};function Fe(q,X){let ie=T[q];if(ie.from==null){if(Xn==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(Xn>1&&X.min!=null&&X.max!=null&&X.max-X.min<1e-16)return;q==x&&ie.distr==2&&Xn>0&&(X.min=Vi(X.min,e[0]),X.max=Vi(X.max,e[0]),X.min==X.max&&X.max++),C[q]=X,Tn=!0,bo()}}r.setScale=Fe;let On,No,yi,Qn,Da,Do,Ri,wo,an,nn,ln,Gt,Li=!1;const Bn=ne.drag;let ze=Bn.x,kn=Bn.y;ue&&(ne.x&&(On=$i(P$,o)),ne.y&&(No=$i(B$,o)),H.ori==0?(yi=On,Qn=No):(yi=No,Qn=On),ln=ne.left,Gt=ne.top);const St=r.select=rr({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&&_n(Hr,ie,q[ie]);X!==!1&&nt("setSelect")}}r.setSelect=pn;function Cn(q){if(k[q].show)ae&&Uh(Le[q],Ms);else if(ae&&di(Le[q],Ms),ue){let X=Ln?Or[0]:Or[q];X!=null&&co(X,-10,-10,xt,qe)}}function sr(q,X,ie){Fe(q,{min:X,max:ie})}function Ur(q,X,ie,oe){X.focus!=null&&mr(q),X.show!=null&&k.forEach((fe,we)=>{we>0&&(q==we||q==null)&&(fe.show=X.show,Cn(we),u==2?(sr(fe.facets[0].scale,null,null),sr(fe.facets[1].scale,null,null)):sr(fe.scale,null,null),bo())}),ie!==!1&&nt("setSeries",q,X),oe&&It("setSeries",r,q,X)}r.setSeries=Ur;function Oi(q,X){rr(S[q],X)}function jn(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=jn,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 Wn,vi,bi;const Ii={focus:!0};function mr(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&&wn(ty,ge,q=>{ne._lock||(Qi(q),bi!=null&&Ur(null,Ii,!0,ht.setSeries))});function yr(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,Re=oe._max,Be=q/fe,We=we+(Re-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=yr(q,x,X);return Vi(ie,e[0],xn,Pn)}r.valToIdx=q=>Vi(q,e[0]),r.posToIdx=Sr,r.posToVal=yr,r.valToPos=(q,X,ie)=>T[X].ori==0?d(q,T[X],ie?pt:xt,ie?Pt:0):p(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){_n(Hr,fa,St.left=q),_n(Hr,il,St.width=X)}function _r(q,X){_n(Hr,sl,St.top=q),_n(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,hr(ln),0,xt,qe),Qn&&co(Qn,0,hr(Gt),xt,qe));let oe,fe=xn>Pn;Wn=gn,vi=null;let we=H.ori==0?xt:qe,Re=H.ori==1?xt:qe;if(ln<0||Xn==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=yr(Be,x),oe=ne.idx=Vi(We,e[0],xn,Pn),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 yn=k[at],Mn=te[at],lr=Mn==null?null:u==1?e[at][Mn]:e[at][1][Mn],Xt=ne.dataIdx(r,at,oe,We),pe=Xt==null?null:u==1?e[at][Xt]:e[at][1][Xt];if(kr=kr||pe!=lr||Xt!=Mn,te[at]=Xt,at>0&&yn.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[yn.scale]:T[yn.facets[1].scale],Re,0);if(Zi&&pe!=null){let Ue=H.ori==1?ln:Gt,dt=ur(Lr.dist(r,at,Xt,xe,Ue));if(dt<Wn){let Nt=Lr.bias;if(Nt!=0){let en=yr(Ue,yn.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)&&(Wn=dt,vi=at)}else Wn=dt,vi=at}}if(kr||Ln){let Ue,dt;H.ori==0?(Ue=_e,dt=xe):(Ue=xe,dt=_e);let Nt,en,Bt,qr,Ni,fn,br=!0,Fo=Yn.bbox;if(Fo!=null){br=!1;let zn=Fo(r,at);Bt=zn.left,qr=zn.top,Nt=zn.width,en=zn.height}else Bt=Ue,qr=dt,Nt=en=Yn.size(r,at);if(fn=Yn.fill(r,at),Ni=Yn.stroke(r,at),Ln)at==vi&&Wn<=Lr.prox&&(Ze=Bt,et=qr,_t=Nt,Ht=en,At=br,Wt=fn,yt=Ni);else{let zn=Or[at];zn!=null&&(go[at]=Bt,Ji[at]=qr,ly(zn,Nt,en,br),sy(zn,fn,Ni),co(zn,Ti(Bt),Ti(qr),xt,qe))}}}}if(Ln){let at=Lr.prox,yn=bi==null?Wn<=at:Wn>at||vi!=bi;if(kr||yn){let Mn=Or[0];Mn!=null&&(go[0]=Ze,Ji[0]=et,ly(Mn,_t,Ht,At),sy(Mn,Wt,yt),co(Mn,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,kn=Ht._y,ze||kn){let{left:At,top:Wt,width:yt,height:at}=q.select,yn=q.scales[et].ori,Mn=q.posToVal,lr,Xt,pe,_e,xe,Ue=Be!=null&&Ke(Be,et),dt=We!=null&&Ze(We,_t);Ue&&ze?(yn==0?(lr=At,Xt=yt):(lr=Wt,Xt=at),pe=T[Be],_e=I(Mn(lr,et),pe,we,0),xe=I(Mn(lr+Xt,et),pe,we,0),Dr(Ki(_e,xe),ur(xe-_e))):Dr(0,we),dt&&kn?(yn==1?(lr=At,Xt=yt):(lr=Wt,Xt=at),pe=T[We],_e=$(Mn(lr,_t),pe,Re,0),xe=$(Mn(lr+Xt,_t),pe,Re,0),wi(Ki(_e,xe),ur(xe-_e))):wi(0,Re)}else Q()}else{let Be=ur(an-Da),We=ur(nn-Do);if(H.ori==1){let _t=Be;Be=We,We=_t}ze=Bn.x&&Be>=Bn.dist,kn=Bn.y&&We>=Bn.dist;let Ke=Bn.uni;Ke!=null?ze&&kn&&(ze=Be>=Ke,kn=We>=Ke,!ze&&!kn&&(We>Be?kn=!0:ze=!0)):Bn.x&&Bn.y&&(ze||kn)&&(ze=kn=!0);let Ze,et;ze&&(H.ori==0?(Ze=Ri,et=ln):(Ze=wo,et=Gt),Dr(Ki(Ze,et),ur(et-Ze)),kn||wi(0,Re)),kn&&(H.ori==1?(Ze=Ri,et=ln):(Ze=wo,et=Gt),wi(Ki(Ze,et),ur(et-Ze)),ze||Dr(0,we)),!ze&&!kn&&(Dr(0,0),wi(0,0))}if(Bn._x=ze,Bn._y=kn,q==null){if(ie){if(An!=null){let[Be,We]=ht.scales;ht.values[0]=Be!=null?yr(H.ori==0?ln:Gt,Be):null,ht.values[1]=We!=null?yr(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?Wn<=We&&Ur(vi,Ii,!0,Be):Wn>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,Re){ne._lock||Li&&q!=null&&q.movementX==0&&q.movementY==0||(V(q,X,ie,oe,fe,we,Re,!1,q!=null),q!=null?_(null,!0,!0):_(X,!0,!1))}function V(q,X,ie,oe,fe,we,Re,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,yn=X.axes[0].side%2==1,Mn=H.ori==0?xt:qe,lr=H.ori==1?xt:qe,Xt=yn?we:fe,pe=yn?fe:we,_e=yn?oe:ie,xe=yn?ie:oe;if(At!=null?ie=yt(Ke,At)?b(_t,T[Ke],Mn,0):-10:ie=Mn*(_e/Xt),Wt!=null?oe=at(Ze,Wt)?b(Ht,T[Ze],lr,0):-10:oe=lr*(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,[Ri,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,Re){Li=!0,ze=kn=Bn._x=Bn._y=!1,V(q,X,ie,oe,fe,we,Re,!0,!1),q!=null&&(wn(jh,zh,be,!1),It(Jm,r,Ri,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,Re){Li=Bn._x=Bn._y=!1,V(q,X,ie,oe,fe,we,Re,!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),Bn.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&&sr(x,yr(Ht,x),yr(Ht+At,x)),kn)for(let at in T){let yn=T[at];at!=x&&yn.from==null&&yn.min!=gn&&sr(at,yr(Wt+yt,at),yr(Wt,at))}Q()}else ne.lock&&(ne._lock=!ne._lock,_(X,!0,q!=null));q!=null&&(Dn(jh,zh),It(jh,r,ln,Gt,xt,qe,null))}function De(q,X,ie,oe,fe,we,Re){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=kn):(et=kn,_t=ze),et&&_t&&(We=ln<=Ze||ln>=xt-Ze,Ke=Gt<=Ze||Gt>=qe-Ze),et&&We&&(ln=ln<Ri?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,Re){ne._lock||(Qi(q),Us(),Q(),q!=null&&It(ny,r,ln,Gt,xt,qe,null))}function Ve(){M.forEach(kA),Ao(r.width,r.height,!0)}Rs(kc,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&&(wn(Jm,o,me),wn(Bh,o,W),wn(ey,o,q=>{Qi(q),B(!1)}),wn(ty,o,De),wn(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 Sn=(q,X,ie)=>ie,ht=rr({key:null,setSeries:!1,filters:{pub:wy,sub:wy},scales:[x,k[1]?k[1].scale:null],match:[xy,xy,Sn],values:[null,null]},ne.sync);ht.match.length==2&&ht.match.push(Sn),ne.sync=ht;const An=ht.key,Tt=ov(An);function It(q,X,ie,oe,fe,we,Re){ht.filters.pub(q,X,ie,oe,fe,we,Re)&&Tt.pub(q,X,ie,oe,fe,we,Re)}Tt.sub(r);function ar(q,X,ie,oe,fe,we,Re){ht.filters.sub(q,X,ie,oe,fe,we,Re)&&ct[q](null,X,ie,oe,fe,we,Re)}r.pub=ar;function vr(){Tt.unsub(r),dd.delete(r),xr.clear(),Vh(kc,ma,Ve),g.remove(),ge==null||ge.remove(),nt("destroy")}r.destroy=vr;function En(){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(Ma),M.forEach(mi),n?n instanceof HTMLElement?(n.appendChild(g),En()):n(r,En):En(),r}Ar.assign=rr,Ar.fmtNum=Yh,Ar.rangeNum=$c,Ar.rangeLog=Cc,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=Oc;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,p;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),p=+n(t[d],e,d,t),p<0)r=d+1;else if(p>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 p=Array(d);++u<d;)p[u]=e[u+n];return p}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",p="\\u200d",b=RegExp("["+p+t+u+d+"]");function f(g){return b.test(g)}return md=f,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",p="["+t+"]",b="["+u+"]",f="\\ud83c[\\udffb-\\udfff]",g="(?:"+b+"|"+f+")",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,p].join("|")+")",M=RegExp(f+"(?="+f+")|"+k+w,"g");function T(S){return S.match(M)||[]}return vd=T,vd}var bd,Mv;function EA(){if(Mv)return bd;Mv=1;var t=TA(),e=Tv(),n=AA();function r(u){return e(u)?n(u):t(u)}return bd=r,bd}var wd,Rv;function MA(){if(Rv)return wd;Rv=1;var t=typeof Xo=="object"&&Xo&&Xo.Object===Object&&Xo;return wd=t,wd}var xd,Lv;function RA(){if(Lv)return xd;Lv=1;var t=MA(),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=RA(),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(p){var b=n.call(p,u),f=p[u];try{p[u]=void 0;var g=!0}catch{}var i=r.call(p);return g&&(b?p[u]=f:delete p[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 p(b){return b==null?b===void 0?u:r:d&&d in Object(b)?e(b):n(b)}return Ad=p,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 Md,jv;function PA(){if(jv)return Md;jv=1;var t=DA(),e=FA(),n="[object Symbol]";function r(u){return typeof u=="symbol"||e(u)&&t(u)==n}return Md=r,Md}var Rd,Wv;function BA(){if(Wv)return Rd;Wv=1;var t=Sd(),e=LA(),n=OA(),r=PA(),u=t?t.prototype:void 0,d=u?u.toString:void 0;function p(b){if(typeof b=="string")return b;if(n(b))return e(b,p)+"";if(r(b))return d?d.call(b):"";var f=b+"";return f=="0"&&1/b==-1/0?"-0":f}return Rd=p,Rd}var Ld,zv;function Fc(){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=Fc();function u(d){return function(p){p=r(p);var b=e(p)?n(p):void 0,f=b?b[0]:p.charAt(0),g=b?t(b,1).join(""):p.slice(1);return f[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=Fc(),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,p=e==null?0:e.length;for(u&&p&&(r=e[++d]);++d<p;)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=Fc(),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",u="\\ufe20-\\ufe2f",d="\\u20d0-\\u20ff",p=r+u+d,b="["+p+"]",f=RegExp(b,"g");function g(i){return i=e(i),i&&i.replace(n,t).replace(f,"")}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",p="a-z\\xdf-\\xf6\\xf8-\\xff",b="\\xac\\xb1\\xd7\\xf7",f="\\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+f+g+i,o="['’]",l="["+c+"]",m="["+u+"]",w="\\d+",k="["+d+"]",M="["+p+"]",T="[^"+t+c+w+d+p+a+"]",S="\\ud83c[\\udffb-\\udfff]",x="(?:"+m+"|"+S+")",R="[^"+t+"]",O="(?:\\ud83c[\\udde6-\\uddff]){2}",F="[\\ud800-\\udbff][\\udc00-\\udfff]",L="["+a+"]",H="\\u200d",P="(?:"+M+"|"+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+"(?:"+[R,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+"?"+M+"+"+$+"(?="+[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=Fc(),r=XA();function u(d,p,b){return d=n(d),p=b?void 0:p,p===void 0?e(d)?r(d):t(d):d.match(p)||[]}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(p){return function(b){return t(n(e(b).replace(u,"")),p,"")}}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-CC3iwyQc-eb49566847eaa53d99e3.js"),void 0),"./ArrayplotWidget.vue":()=>lt(()=>ut.import("./ArrayplotWidget-CiQdsmVy-bfe7a410cdff8ae9a86e.js"),void 0),"./BlockWidget.vue":()=>lt(()=>ut.import("./BlockWidget-LLPHBYVU-20865226117b3524b4fe.js"),void 0),"./ButtonWidget.vue":()=>lt(()=>ut.import("./ButtonWidget-Co0KMkIG-c5b32e1eb722360a9fe4.js"),void 0),"./CanvasWidget.vue":()=>lt(()=>ut.import("./CanvasWidget-DPrxnI7M-e8097be368a99cc7c1bc.js"),void 0),"./CanvasdotWidget.vue":()=>lt(()=>ut.import("./CanvasdotWidget-s1ALDR4k-231651581f2e7a93096f.js"),void 0),"./CanvasimageWidget.vue":()=>lt(()=>ut.import("./CanvasimageWidget-Cs-KjdqK-ca4686d2035f5be14197.js"),void 0),"./CanvasimagevalueWidget.vue":()=>lt(()=>ut.import("./CanvasimagevalueWidget-B-wBQisl-20c4d60b9a60bd687fd4.js"),void 0),"./CanvaslabelWidget.vue":()=>lt(()=>ut.import("./CanvaslabelWidget-CLBK52pP-1d00a2100d9f2912fe95.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>lt(()=>ut.import("./CanvaslabelvalueWidget-CAa70y_o-1a3e381dcce52b66a3a6.js"),void 0),"./CanvaslineWidget.vue":()=>lt(()=>ut.import("./CanvaslineWidget-PdwVJOQ5-49dc67d81eaf868468e4.js"),void 0),"./CanvaslinevalueWidget.vue":()=>lt(()=>ut.import("./CanvaslinevalueWidget-CKrp1f3Z-6925e485805a5a18ec22.js"),void 0),"./CheckbuttonWidget.vue":()=>lt(()=>ut.import("./CheckbuttonWidget-CTSfH4NN-1b827f07e14bf76b1c28.js"),void 0),"./ComboboxWidget.vue":()=>lt(()=>ut.import("./ComboboxWidget-BQzv9zk5-f4f38fac65a606d0f633.js"),void 0),"./DateWidget.vue":()=>lt(()=>ut.import("./DateWidget-DKXxXT1g-d6b879d87fa8d1f2f441.js"),void 0),"./DynamicWidget.vue":()=>lt(()=>ut.import("./DynamicWidget-CfMtj7H8-edc166a458351229d350.js"),void 0),"./FormatvalueWidget.vue":()=>lt(()=>ut.import("./FormatvalueWidget-7Yp9jfgX-2e24441da6da1b7c9f84.js"),void 0),"./HorizontalWidget.vue":()=>lt(()=>ut.import("./HorizontalWidget-BFzi3rMl-42fff8b2092361939c58.js"),void 0),"./HorizontalboxWidget.vue":()=>lt(()=>ut.import("./HorizontalboxWidget-DIagyace-8ab82de4824ab733aebf.js"),void 0),"./HorizontallineWidget.vue":()=>lt(()=>ut.import("./HorizontallineWidget-BOZNWM3a-bac0226661186f3f1bcf.js"),void 0),"./IframeWidget.vue":()=>lt(()=>ut.import("./IframeWidget-BU24bhc2-ad743b54baf47bac52ff.js"),void 0),"./ImageviewerWidget.vue":()=>lt(()=>ut.import("./ImageviewerWidget-YMA4CVsl-740455e04161df5097e7.js"),void 0),"./LabelWidget.vue":()=>lt(()=>ut.import("./LabelWidget-2402SA18-8d6c144e0a2fd4afaa93.js"),void 0),"./LabelledWidget.vue":()=>lt(()=>ut.import("./LabelledWidget-Cbubzj_g-667d7a04e47b73f9278a.js"),void 0),"./LabelprogressbarWidget.vue":()=>lt(()=>ut.import("./LabelprogressbarWidget-s8V7w6LJ-f6146d7a0fbfe3fe1e1a.js"),void 0),"./LabelsparklineWidget.vue":()=>lt(()=>ut.import("./LabelsparklineWidget-qbM_OXLh-7d7a5d1fc9d7c1ad7be3.js"),void 0),"./LabelvalueWidget.vue":()=>lt(()=>ut.import("./LabelvalueWidget-B5Ihc2yP-d0238292267bb45c839d.js"),void 0),"./LabelvaluedescWidget.vue":()=>lt(()=>ut.import("./LabelvaluedescWidget-Cl3JHPGR-4354cc740bde65476fa6.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>lt(()=>ut.import("./LabelvaluelimitsbarWidget-DnpfRyHl-3b2ac0080483292f176a.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>lt(()=>ut.import("./LabelvaluelimitscolumnWidget-D4L9L5oa-61d80ec7355408b3d92f.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>lt(()=>ut.import("./LabelvaluerangebarWidget-BivnHCbE-780b1390f392fb916fba.js"),void 0),"./LedWidget.vue":()=>lt(()=>ut.import("./LedWidget-DpdthKEd-a36b44b2af0c1118b147.js"),void 0),"./LimitsbarWidget.vue":()=>lt(()=>ut.import("./LimitsbarWidget-CLyj3Kb--178c6ffc136d19677e25.js"),void 0),"./LimitscolorWidget.vue":()=>lt(()=>ut.import("./LimitscolorWidget-ChvzYoug-5978413c40891a7e38db.js"),void 0),"./LimitscolumnWidget.vue":()=>lt(()=>ut.import("./LimitscolumnWidget-IOhsLFZ1-d1c62768956ae1346061.js"),void 0),"./LinegraphWidget.vue":()=>lt(()=>ut.import("./LinegraphWidget-DZdqMqjw-939a28086716712d5958.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>lt(()=>ut.import("./MatrixbycolumnsWidget-BzGYMhJ2-c04b4f98e9bd9a004e8e.js"),void 0),"./ProgressbarWidget.vue":()=>lt(()=>ut.import("./ProgressbarWidget-Bre-0zcS-9c9931c5460ee134cadc.js"),void 0),"./RadiobuttonWidget.vue":()=>lt(()=>ut.import("./RadiobuttonWidget-CLbfhrkc-f967b8c3d4905a3a0e39.js"),void 0),"./RadiogroupWidget.vue":()=>lt(()=>ut.import("./RadiogroupWidget-DvRc70_Q-34cc318e7eda06be9ffc.js"),void 0),"./RangebarWidget.vue":()=>lt(()=>ut.import("./RangebarWidget-BvzVWcfZ-b98f768dd9ff34657e16.js"),void 0),"./RollupWidget.vue":()=>lt(()=>ut.import("./RollupWidget-KT243Ed8-74e8aebd86700e42793e.js"),void 0),"./ScrollwindowWidget.vue":()=>lt(()=>ut.import("./ScrollwindowWidget-DcpdXyrP-a1945701814c80701d87.js"),void 0),"./SignalWidget.vue":()=>lt(()=>ut.import("./SignalWidget-CoTi0Uzy-b11b4a277a10245de254.js"),void 0),"./SpacerWidget.vue":()=>lt(()=>ut.import("./SpacerWidget-CTekSgNO-2866af3ce98c84c7d8f2.js"),void 0),"./SparklineWidget.vue":()=>lt(()=>ut.import("./SparklineWidget-BxwPKrIr-a07db358343e06983f6c.js"),void 0),"./TabbookWidget.vue":()=>lt(()=>ut.import("./TabbookWidget-B6Nx3Kmt-9679339a3b4f1597ccf4.js"),void 0),"./TextboxWidget.vue":()=>lt(()=>ut.import("./TextboxWidget-DJgAfLFU-ea01c82d81b0d8f57bd4.js"),void 0),"./TextfieldWidget.vue":()=>lt(()=>ut.import("./TextfieldWidget-Bc2xGs8v-efdce12056c28c55a0c2.js"),void 0),"./TimeWidget.vue":()=>lt(()=>ut.import("./TimeWidget-DO6ZuMLO-22b61dad29d3ddc9631c.js"),void 0),"./TitleWidget.vue":()=>lt(()=>ut.import("./TitleWidget-CkZhMme1-4a83d2946a3ed7ea4d03.js"),void 0),"./ValueWidget.vue":()=>lt(()=>ut.import("./ValueWidget-tieHz2H1-77514d901c76c233568c.js"),void 0),"./ValuelimitsbarWidget.vue":()=>lt(()=>ut.import("./ValuelimitsbarWidget-oFqxZu0t-a5f4ffb74cddc53a8567.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>lt(()=>ut.import("./ValuelimitscolumnWidget-DYBv8POg-3b87704cac9f02f72c41.js"),void 0),"./ValuerangebarWidget.vue":()=>lt(()=>ut.import("./ValuerangebarWidget-m3gFyG4v-eaf03cf8f36a7e1a2d45.js"),void 0),"./VerticalWidget.vue":()=>lt(()=>ut.import("./VerticalWidget-CcdRZmQK-6741c2c5ac3d10a8f624.js"),void 0),"./VerticalboxWidget.vue":()=>lt(()=>ut.import("./VerticalboxWidget-DfsCYhrX-47cb15eb6e128c511a86.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(f=>f!=="constructor").filter(f=>f!=="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 f in this.$rules)this.$rules[f].unshift({regex:u,token:"support.function"})};n.inherits(d,t);let p=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 p,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 p=Ut("v-spacer"),b=Ut("v-btn"),f=Ut("v-toolbar"),g=Ut("v-card-text"),i=Ut("v-card-actions"),a=Ut("v-card"),h=Ut("v-dialog");return Zt(),er(h,{modelValue:d.show,"onUpdate:modelValue":e[1]||(e[1]=c=>d.show=c),width:"85vw"},{default:it(()=>[ot(a,null,{default:it(()=>[ot(f,{height:"24"},{default:it(()=>[ot(p),gr("span",{textContent:Br(d.title)},null,8,sE),ot(p),gr("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(()=>[gr("pre",lE,null,512)]),_:1}),ot(i,{class:"pr-6 pb-4 pt-0"},{default:it(()=>[ot(p),ot(b,{variant:"flat",onClick:e[0]||(e[0]=c=>d.show=!d.show)},{default:it(()=>e[2]||(e[2]=[tr(" Ok ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const uE=Ku(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 p=Ut("v-col"),b=Ut("v-row"),f=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(),er(Sf,{to:"#openc3-menu"},[ot(b,{"no-gutters":""},{default:it(()=>[ot(p,{"align-self":"end"},{default:it(()=>[gr("span",dE,Br(n.title),1)]),_:1})]),_:1}),ot(b,{dense:"",class:"flex-nowrap"},{default:it(()=>[(Zt(!0),Yr(_o,null,Ko(n.menus,(M,T)=>(Zt(),er(o,{ref_for:!0,ref:"topmenu",key:T},{activator:it(({props:S})=>[ot(g,Gu({ref_for:!0},S,{variant:"outlined",class:"mx-1 menu-button",text:M.label,"data-test":d.formatDT(`${n.title} ${M.label}`)}),{append:it(()=>[ot(f,{class:"menu-button-icon"},{default:it(()=>e[0]||(e[0]=[tr(" mdi-menu-down ")])),_:1})]),_:2},1040,["text","data-test"])]),default:it(()=>[ot(c,null,{default:it(()=>[(Zt(!0),Yr(_o,null,Ko(M.items,(S,x)=>(Zt(),Yr(_o,null,[S.divider?(Zt(),er(i,{key:x+"-divider"})):S.subMenu&&S.subMenu.length>0?(Zt(),Yr("div",{key:x+"-submenu"},[(Zt(),er(o,{"open-on-hover":"",location:"right",key:x},{activator:it(({props:R})=>[(Zt(),er(h,Gu({ref_for:!0},R,{disabled:S.disabled,key:x}),Yu({append:it(()=>[ot(f,null,{default:it(()=>e[1]||(e[1]=[tr(" mdi-chevron-right ")])),_:1})]),default:it(()=>[!S.radio&&!S.checkbox?(Zt(),er(a,{key:0,style:Xu("cursor: pointer;"+(S.disabled?"opacity: 0.2":""))},{default:it(()=>[tr(Br(S.label),1)]),_:2},1032,["style"])):so("",!0)]),_:2},[S.icon?{name:"prepend",fn:it(()=>[ot(f,{disabled:S.disabled},{default:it(()=>[tr(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,(R,O)=>(Zt(),er(h,{key:O,"prepend-icon":R.icon,onClick:F=>d.subMenuClick(R)},{default:it(()=>[ot(a,null,{default:it(()=>[tr(Br(R.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):S.radioGroup?(Zt(),er(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,(R,O)=>(Zt(),er(h,{key:O+"-choice"},{default:it(()=>[ot(m,{class:"list-action"},{default:it(()=>[ot(l,{color:"secondary",label:R.label,value:R.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(Zt(),er(h,{onClick:R=>S.command(S),disabled:S.disabled,"data-test":d.formatDT(`${n.title} ${M.label} ${S.label}`),key:x+"-list"},Yu({default:it(()=>[S.checkbox?(Zt(),er(m,{key:0,class:"list-action"},{default:it(()=>[ot(k,{modelValue:S.checked,"onUpdate:modelValue":R=>S.checked=R,label:S.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):so("",!0),!S.radio&&!S.checkbox?(Zt(),er(a,{key:1,style:Xu("cursor: pointer;"+(S.disabled?"opacity: 0.2":""))},{default:it(()=>[tr(Br(S.label),1)]),_:2},1032,["style"])):so("",!0)]),_:2},[S.icon?{name:"prepend",fn:it(()=>[ot(f,{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=Ku(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:Pc,toStringTag:ib}=Symbol,Bc=(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=>Bc(e)===t),jc=t=>e=>typeof e===t,{isArray:_a}=Array,dl=jc("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=jc("string"),ei=jc("function"),sb=jc("number"),Wc=t=>t!==null&&typeof t=="object",bE=t=>t===!0||t===!1,zc=t=>{if(Bc(t)!=="object")return!1;const e=Vd(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(ib in t)&&!(Pc in t)},wE=Gi("Date"),xE=Gi("File"),kE=Gi("Blob"),SE=Gi("FileList"),_E=t=>Wc(t)&&ei(t.pipe),CE=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||ei(t.append)&&((e=Bc(t))==="formdata"||e==="object"&&ei(t.toString)&&t.toString()==="[object FormData]"))},$E=Gi("URLSearchParams"),[TE,AE,EE,ME]=["ReadableStream","Request","Response","Headers"].map(Gi),RE=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),p=d.length;let b;for(r=0;r<p;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;zc(e[d])&&zc(r)?e[d]=Kd(e[d],r):zc(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,p;const b={};if(e=e||{},t==null)return e;do{for(u=Object.getOwnPropertyNames(t),d=u.length;d-- >0;)p=u[d],(!r||r(p,t,e))&&!b[p]&&(e[p]=t[p],b[p]=!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[Pc]).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 p;(p=e(u,d,t))!==!1&&(r[d]=p||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[Pc])}const YE=t=>{const e=new Array(10),n=(r,u)=>{if(Wc(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[u]=r;const d=_a(r)?[]:{};return pl(r,(p,b)=>{const f=n(p,u+1);!dl(f)&&(d[b]=f)}),e[u]=void 0,d}}return r};return n(t,0)},XE=Gi("AsyncFunction"),QE=t=>t&&(Wc(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[Pc]),Te={isArray:_a,isArrayBuffer:ob,isBuffer:mE,isFormData:CE,isArrayBufferView:yE,isString:vE,isNumber:sb,isBoolean:bE,isObject:Wc,isPlainObject:zc,isReadableStream:TE,isRequest:AE,isResponse:EE,isHeaders:ME,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:RE,stripBOM:OE,inherits:IE,toFlatObject:NE,kindOf:Bc,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 p=Object.create(db);return Te.toFlatObject(t,p,function(b){return b!==Error.prototype},b=>b!=="isAxiosError"),Lt.call(p,t.message,e,n,r,u),p.cause=t,p.name=t.name,d&&Object.assign(p,d),p};const eM=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 tM(t){return Te.isArray(t)&&!t.some(Gd)}const nM=Te.toFlatObject(Te,{},null,function(t){return/^is[A-Z]/.test(t)});function Hc(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,p=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 f(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)&&tM(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(p===!0?gb([o],k,d):p===null?o:o+"[]",f(w))}),!1}return Gd(c)?!0:(e.append(gb(l,o,d),f(c)),!1)}const i=[],a=Object.assign(nM,{defaultVisitor:g,convertValue:f,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&&Hc(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 rM(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||rM;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 p=t.indexOf("#");p!==-1&&(t=t.slice(0,p)),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},iM=typeof URLSearchParams<"u"?URLSearchParams:Yd,oM=typeof FormData<"u"?FormData:null,sM=typeof Blob<"u"?Blob:null,aM={isBrowser:!0,classes:{URLSearchParams:iM,FormData:oM,Blob:sM},protocols:["http","https","file","blob","url","data"]},Xd=typeof window<"u"&&typeof document<"u",Qd=typeof navigator=="object"&&navigator||void 0,lM=Xd&&(!Qd||["ReactNative","NativeScript","NS"].indexOf(Qd.product)<0),cM=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",uM=Xd&&window.location.href||"http://localhost",hM=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xd,hasStandardBrowserEnv:lM,hasStandardBrowserWebWorkerEnv:cM,navigator:Qd,origin:uM},Symbol.toStringTag,{value:"Module"})),Er={...hM,...aM};function dM(t,e){return Hc(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 pM(t){return Te.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function fM(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 p=n[d++];if(p==="__proto__")return!0;const b=Number.isFinite(+p),f=d>=n.length;return p=!p&&Te.isArray(u)?u.length:p,f?(Te.hasOwnProp(u,p)?u[p]=[u[p],r]:u[p]=r,!b):((!u[p]||!Te.isObject(u[p]))&&(u[p]=[]),e(n,r,u[p],d)&&Te.isArray(u[p])&&(u[p]=fM(u[p])),!b)}if(Te.isFormData(t)&&Te.isFunction(t.entries)){const n={};return Te.forEachEntry(t,(r,u)=>{e(pM(r),u,n,0)}),n}return null}function gM(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 dM(t,this.formSerializer).toString();if((d=Te.isFileList(t))||n.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return Hc(d?{"files[]":t}:t,p&&new p,this.formSerializer)}}return u||r?(e.setContentType("application/json",!1),gM(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 mM=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"]),yM=t=>{const e={};let n,r,u;return t&&t.split(`
1496
1496
  `).forEach(function(d){u=d.indexOf(":"),n=d.substring(0,u).trim().toLowerCase(),r=d.substring(u+1).trim(),!(!n||e[n]&&mM[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 Uc(t){return t===!1||t==null?t:Te.isArray(t)?t.map(Uc):String(t)}function vM(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 bM=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 wM(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function xM(t,e){const n=Te.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(u,d,p){return this[r].call(this,e,u,d,p)},configurable:!0})})}let ti=class{constructor(e){e&&this.set(e)}set(e,n,r){const u=this;function d(b,f,g){const i=gl(f);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||f]=Uc(b))}const p=(b,f)=>Te.forEach(b,(g,i)=>d(g,i,f));if(Te.isPlainObject(e)||e instanceof this.constructor)p(e,n);else if(Te.isString(e)&&(e=e.trim())&&!bM(e))p(yM(e),n);else if(Te.isObject(e)&&Te.isIterable(e)){let b={},f,g;for(const i of e){if(!Te.isArray(i))throw TypeError("Object iterator must return a key-value pair");b[g=i[0]]=(f=b[g])?Te.isArray(f)?[...f,i[1]]:[f,i[1]]:i[1]}p(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 vM(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(p){if(p=gl(p),p){const b=Te.findKey(r,p);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 p=Te.findKey(r,d);if(p){n[p]=Uc(u),delete n[d];return}const b=e?wM(d):String(d).trim();b!==d&&delete n[d],n[b]=Uc(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
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 p=gl(d);n[p]||(xM(r,d),n[p]=!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(p){d=p.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 kM(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function SM(t,e){t=t||10;const n=new Array(t),r=new Array(t);let u=0,d=0,p;return e=e!==void 0?e:1e3,function(b){const f=Date.now(),g=r[d];p||(p=f),n[u]=b,r[u]=f;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),f-p<e)return;const h=g&&f-g;return h?Math.round(a*1e3/h):void 0}}function _M(t,e){let n=0,r=1e3/e,u,d;const p=(b,f=Date.now())=>{n=f,u=null,d&&(clearTimeout(d),d=null),t.apply(null,b)};return[(...b)=>{const f=Date.now(),g=f-n;g>=r?p(b,f):(u=b,d||(d=setTimeout(()=>{d=null,p(u)},r-g)))},()=>u&&p(u)]}const qc=(t,e,n=3)=>{let r=0;const u=SM(50,250);return _M(d=>{const p=d.loaded,b=d.lengthComputable?d.total:void 0,f=p-r,g=u(f),i=p<=b;r=p;const a={loaded:p,total:b,progress:b?p/b:void 0,bytes:f,rate:g||void 0,estimated:g&&b&&i?(b-p)/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)),CM=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,$M=Er.hasStandardBrowserEnv?{write(t,e,n,r,u,d){const p=[t+"="+encodeURIComponent(e)];Te.isNumber(n)&&p.push("expires="+new Date(n).toGMTString()),Te.isString(r)&&p.push("path="+r),Te.isString(u)&&p.push("domain="+u),d===!0&&p.push("secure"),document.cookie=p.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 TM(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function AM(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Tb(t,e,n){let r=!TM(e);return t&&(r||n==!1)?AM(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 p(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 f={url:d,method:d,data:d,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,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=f[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:p,auth:b}=e;e.headers=p=ti.from(p),e.url=vb(Tb(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),b&&p.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):"")));let f;if(Te.isFormData(n)){if(Er.hasStandardBrowserEnv||Er.hasStandardBrowserWebWorkerEnv)p.setContentType(void 0);else if((f=p.getContentType())!==!1){const[g,...i]=f?f.split(";").map(a=>a.trim()).filter(Boolean):[];p.setContentType([g||"multipart/form-data",...i].join("; "))}}if(Er.hasStandardBrowserEnv&&(r&&Te.isFunction(r)&&(r=r(e)),r||r!==!1&&CM(e.url))){const g=u&&d&&$M.read(d);g&&p.set(u,g)}return e},EM=typeof XMLHttpRequest<"u",MM=EM&&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:p,onUploadProgress:b,onDownloadProgress:f}=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()),M={data:!p||p==="text"||p==="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()},M),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 M=r.transitional||wb;r.timeoutErrorMessage&&(k=r.timeoutErrorMessage),n(new Lt(k,M.clarifyTimeoutError?Lt.ETIMEDOUT:Lt.ECONNABORTED,t,l)),l=null},u===void 0&&d.setContentType(null),"setRequestHeader"in l&&Te.forEach(d.toJSON(),function(k,M){l.setRequestHeader(M,k)}),Te.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),p&&p!=="json"&&(l.responseType=r.responseType),f&&([a,c]=qc(f,!0),l.addEventListener("progress",a)),b&&l.upload&&([i,h]=qc(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=kM(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)})},RM=(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 p=e&&setTimeout(()=>{p=null,d(new Lt(`timeout ${e} of ms exceeded`,Lt.ETIMEDOUT))},e);const b=()=>{t&&(p&&clearTimeout(p),p=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),t=null)};t.forEach(g=>g.addEventListener("abort",d));const{signal:f}=r;return f.unsubscribe=()=>Te.asap(b),f}},LM=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},OM=async function*(t,e){for await(const n of IM(t))yield*LM(n,e)},IM=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()}},Mb=(t,e,n,r)=>{const u=OM(t,e);let d=0,p,b=f=>{p||(p=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:g,value:i}=await u.next();if(g){b(),f.close();return}let a=i.byteLength;if(n){let h=d+=a;n(h)}f.enqueue(new Uint8Array(i))}catch(g){throw b(g),g}},cancel(f){return b(f),u.return()}},{highWaterMark:2})},Vc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Rb=Vc&&typeof ReadableStream=="function",NM=Vc&&(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}},DM=Rb&&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=Rb&&Lb(()=>Te.isReadableStream(new Response("").body)),Kc={stream:ep&&(t=>t.body)};Vc&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Kc[e]&&(Kc[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 FM=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 NM(t)).byteLength},PM=async(t,e)=>Te.toFiniteNumber(t.getContentLength())??FM(e),BM=Vc&&(async t=>{let{url:e,method:n,data:r,signal:u,cancelToken:d,timeout:p,onDownloadProgress:b,onUploadProgress:f,responseType:g,headers:i,withCredentials:a="same-origin",fetchOptions:h}=Eb(t);g=g?(g+"").toLowerCase():"text";let c=RM([u,d&&d.toAbortSignal()],p),o;const l=c&&c.unsubscribe&&(()=>{c.unsubscribe()});let m;try{if(f&&DM&&n!=="get"&&n!=="head"&&(m=await PM(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[R,O]=Cb(m,qc($b(f)));r=Mb(S.body,Ob,R,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 M=ep&&(g==="stream"||g==="response");if(ep&&(b||M&&l)){const S={};["status","statusText","headers"].forEach(F=>{S[F]=k[F]});const x=Te.toFiniteNumber(k.headers.get("content-length")),[R,O]=b&&Cb(x,qc($b(b),!0))||[];k=new Response(Mb(k.body,Ob,R,()=>{O&&O(),l&&l()}),S)}g=g||"text";let T=await Kc[Te.findKey(Kc,g)||"text"](k,t);return!M&&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:eM,xhr:MM,fetch:BM};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}`,jM=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 p;if(r=n,!jM(n)&&(r=tp[(p=String(n)).toLowerCase()],r===void 0))throw new Lt(`Unknown adapter '${p}'`);if(r)break;u[p||"#"+d]=r}if(!r){const d=Object.entries(u).map(([b,f])=>`adapter ${b} `+(f===!1?"is not supported by the environment":"is not available in the build"));let p=e?d.length>1?`since :
1498
1498
  `+d.map(Ib).join(`
1499
1499
  `):" "+Ib(d[0]):"as no adapter specified";throw new Lt("There is no suitable adapter to dispatch the request "+p,"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",Gc={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Gc[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const Pb={};Gc.transitional=function(t,e,n){function r(u,d){return"[Axios v"+Fb+"] Transitional option '"+u+"'"+d+(n?". "+n:"")}return(u,d,p)=>{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,p):!0}},Gc.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function WM(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],p=e[d];if(p){const b=t[d],f=b===void 0||p(b,d,t);if(f!==!0)throw new Lt("option "+d+" must be "+f,Lt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Lt("Unknown option "+d,Lt.ERR_BAD_OPTION)}}const Yc={assertOptions:WM,validators:Gc},uo=Yc.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&&Yc.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}:Yc.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),Yc.assertOptions(n,{baseUrl:uo.spelling("baseURL"),withXsrfToken:uo.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let p=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(p,d);const b=[];let f=!0;this.interceptors.request.forEach(function(o){typeof o.runWhen=="function"&&o.runWhen(n)===!1||(f=f&&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(!f){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 zM=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 p=new Promise(b=>{r.subscribe(b),d=b}).then(u);return p.cancel=function(){r.unsubscribe(d)},p},e(function(u,d,p){r.reason||(r.reason=new Ca(u,d,p),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 HM(t){return function(e){return t.apply(null,e)}}function UM(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=zM,rr.isCancel=Sb,rr.VERSION=Fb,rr.toFormData=Hc,rr.AxiosError=Lt,rr.Cancel=rr.CanceledError,rr.all=function(t){return Promise.all(t)},rr.spread=HM,rr.isAxiosError=UM,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 qM(t,e,n){const r=Cn(t,void 0);return r.setTime(r.getTime()+e*Jl),r}function VM(t,e){const n=()=>tr(void 0,NaN),r=XM(t);let u;if(r.date){const f=QM(r.date,2);u=ZM(f.restDateString,f.year)}if(!u||isNaN(+u))return n();const d=+u;let p=0,b;if(r.time&&(p=JM(r.time),isNaN(p)))return n();if(r.timezone){if(b=eR(r.timezone),isNaN(b))return n()}else{const f=new Date(d+p),g=Cn(0,void 0);return g.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),g.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),g}return Cn(d+p+b,void 0)}const Xc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},KM=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,GM=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,YM=/^([+-])(\d{2})(?::?(\d{2}))?$/;function XM(t){const e={},n=t.split(Xc.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],Xc.timeZoneDelimiter.test(e.date)&&(e.date=t.split(Xc.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const u=Xc.timezone.exec(r);u?(e.time=r.replace(u[1],""),e.timezone=u[1]):e.time=r}return e}function QM(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 ZM(t,e){if(e===null)return new Date(NaN);const n=t.match(KM);if(!n)return new Date(NaN);const r=!!n[4],u=ml(n[1]),d=ml(n[2])-1,p=ml(n[3]),b=ml(n[4]),f=ml(n[5])-1;if(r)return oR(e,b,f)?tR(e,b,f):new Date(NaN);{const g=new Date(0);return!rR(e,d,p)||!iR(e,u)?new Date(NaN):(g.setUTCFullYear(e,d,Math.max(u,p)),g)}}function ml(t){return t?parseInt(t):1}function JM(t){const e=t.match(GM);if(!e)return NaN;const n=ip(e[1]),r=ip(e[2]),u=ip(e[3]);return sR(n,r,u)?n*uh+r*Jl+u*1e3:NaN}function ip(t){return t&&parseFloat(t.replace(",","."))||0}function eR(t){if(t==="Z")return 0;const e=t.match(YM);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),u=e[3]&&parseInt(e[3])||0;return aR(r,u)?n*(r*uh+u*Jl):NaN}function tR(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 nR=[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 rR(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(nR[e]||(Wb(t)?29:28))}function iR(t,e){return e>=1&&e<=(Wb(t)?366:365)}function oR(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function sR(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function aR(t,e){return e>=0&&e<=59}function lR(t,e,n){return qM(t,-e)}function zb(t,e,n){const r=jb(),u=hR(t,n.timeZone,n.locale??r.locale);return"formatToParts"in u?cR(u,e):uR(u,e)}function cR(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 uR(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}function hR(t,e,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:e,timeZoneName:t})}function dR(t,e){const n=yR(e);return"formatToParts"in n?fR(n,t):gR(n,t)}const pR={year:0,month:1,day:2,hour:3,minute:4,second:5};function fR(t,e){try{const n=t.formatToParts(e),r=[];for(let u=0;u<n.length;u++){const d=pR[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 gR(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")),mR=Hb==="06/25/2014, 00:00:00"||Hb==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function yR(t){return op[t]||(op[t]=mR?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,p){const b=new Date(0);return b.setUTCFullYear(t,e,n),b.setUTCHours(r,u,d,p),b}const qb=36e5,vR=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 p=parseInt(r[3],10);return Vb(u,p)?(d=Math.abs(u)*qb+p*vR,r[1]==="+"?-d:d):NaN}if(xR(t)){e=new Date(e||Date.now());const p=n?e:bR(e),b=lp(p,t);return-(n?b:wR(e,b,t))}return NaN}function bR(t){return Ub(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}function lp(t,e){const n=dR(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 wR(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 xR(t){if(Kb[t])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:t}),Kb[t]=!0,!0}catch{return!1}}const kR=60*1e3,SR={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"+_R(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)/kR:(e==null?void 0:e.getTimezoneOffset())??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+t);return n}function Qc(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=Qc(Math.floor(r/60),2),d=Qc(Math.floor(r%60),2);return n+u+e+d}function Gb(t,e){return t%60===0?(t>0?"-":"+")+Qc(Math.abs(t)/60,2):$a(t,e)}function _R(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+Qc(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 CR=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,up=36e5,Xb=6e4,$R=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:CR};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?$R: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=TR(t),{year:u,restDateString:d}=AR(r.date,n),p=ER(d,u);if(p===null||isNaN(p.getTime()))return new Date(NaN);if(p){const b=p.getTime();let f=0,g;if(r.time&&(f=MR(r.time),f===null||isNaN(f)))return new Date(NaN);if(r.timeZone||e.timeZone){if(g=ap(r.timeZone||e.timeZone,new Date(b+f)),isNaN(g))return new Date(NaN)}else g=Yb(new Date(b+f)),g=Yb(new Date(b+f+g));return new Date(b+f+g)}else return new Date(NaN)}function TR(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 AR(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 ER(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 p=parseInt(d[1],10);return OR(e,p)?(n.setUTCFullYear(e,0,p),n):new Date(NaN)}if(d=zr.MMDD.exec(t),d){n=new Date(0),r=parseInt(d[1],10)-1;const p=parseInt(d[2],10);return ew(e,r,p)?(n.setUTCFullYear(e,r,p),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 p=parseInt(d[2],10)-1;return tw(u,p)?Zb(e,u,p):new Date(NaN)}return null}function MR(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 RR=[31,28,31,30,31,30,31,31,30,31,30,31],LR=[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>LR[e]||!r&&n>RR[e])return!1}return!0}function OR(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 IR=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function NR(t,e,n={}){e=String(e);const r=e.match(IR);if(r){const u=Qb(n.originalDate||t,n);e=r.reduce(function(d,p){if(p[0]==="'")return d;const b=d.indexOf(p),f=d[b-1]==="'",g=d.replace(p,"'"+SR[p[0]](u,p,n)+"'");return f?g.substring(0,b-1)+g.substring(b+1):g},e)}return _s(t,e,n)}function DR(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 Zc(t,e,n,r){return r={...r,timeZone:e,originalDate:t},NR(DR(t,e,{timeZone:r.timeZone}),n,r)}const Jc="yyyy-MM-dd",nw="HH:mm:ss.SSS",rw="HH:mm:ss",eu=`${Jc} ${nw}`,iw=`${Jc} ${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"?lR(t,t.getTimezoneOffset()):t,eu)},formatDateTime(t,e){return!e||e==="local"?_s(t,eu):Zc(t,e,eu)},formatDateTimeHMS(t,e){return!e||e==="local"?_s(t,iw):Zc(t,e,iw)},formatDate:function(t,e){return!e||e==="local"?_s(t,Jc):Zc(t,this.timeZone,Jc)},formatTime:function(t,e,n=nw){return!e||e==="local"?_s(t,n):Zc(t,this.timeZone,n)},formatTimeHMS:function(t,e){return this.formatTime(t,e,rw)},formatTimestamp(t,e){return this.formatDateTime(VM(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 FR=Object.defineProperty,PR=(t,e,n)=>e in t?FR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,tt=(t,e,n)=>PR(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 BR(t,e){const n=Cn(t,void 0).getDay();return n===0?7:n}function jR(t,e){const n=WR(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 WR(t){var e;return typeof t=="function"&&((e=t.prototype)==null?void 0:e.constructor)===t}const zR=10;class ow{constructor(){tt(this,"subPriority",0)}validate(e,n){return!0}}class HR 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 UR extends ow{constructor(e,n){super(),tt(this,"priority",zR),tt(this,"subPriority",-1),this.context=e||(r=>tr(n,r))}set(e,n){return n.timestampIsSet?e:tr(e,jR(e,this.context))}}class on{run(e,n,r,u){const d=this.parse(e,n,r,u);return d?{setter:new HR(d.value,this.validate,this.set,this.priority,this.subPriority),rest:d.rest}:null}validate(e,n,r){return!0}}class qR 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 Mn(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,p=n[5]?parseInt(n[5],10):0;return{value:r*(u*uh+d*Jl+p*kk),rest:e.slice(n[0].length)}}function sw(t){return Mn(qn.anyDigitsSigned,t)}function In(t,e){switch(t){case 1:return Mn(qn.singleDigit,e);case 2:return Mn(qn.twoDigits,e);case 3:return Mn(qn.threeDigits,e);case 4:return Mn(qn.fourDigits,e);default:return Mn(new RegExp("^\\d{1,"+t+"}"),e)}}function aw(t,e){switch(t){case 1:return Mn(qn.singleDigitSigned,e);case 2:return Mn(qn.twoDigitsSigned,e);case 3:return Mn(qn.threeDigitsSigned,e);case 4:return Mn(qn.fourDigitsSigned,e);default:return Mn(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,p=Math.trunc(d/100)*100,b=t>=d%100;u=t+p-(b?100:0)}return n?u:1-u}function cw(t){return t%400===0||t%4===0&&t%100!==0}class VR 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 p=lw(r.year,u);return e.setFullYear(p,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 KR 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=dh(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 p=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(p,0,u.firstWeekContainsDate),e.setHours(0,0,0,0),Go(e,u)}}class GR 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 YR 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 XR 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 QR 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 ZR 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(Mn(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 JR 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(Mn(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 Mn(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 Mn(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 Mn(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 Mn(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,p;const b=la(),f=(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??((p=(d=b.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??0,g=Cn(t,n==null?void 0:n.in),i=g.getDay(),a=(e%7+7)%7,h=7-f,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=p=>{const b=Math.floor((p-1)/7)*7;return(p+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=p=>{const b=Math.floor((p-1)/7)*7;return(p+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=BR(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 Mn(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 Mn(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 Mn(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 Mn(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 Mn(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 Mn(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 qR,y:new VR,Y:new KR,R:new GR,u:new YR,Q:new XR,q:new QR,M:new ZR,L:new JR,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,ML=/^'([^]*?)'?$/,RL=/''/g,LL=/\S/,OL=/[a-zA-Z]/;function IL(t,e,n,r){var u,d,p,b;const f=()=>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=(p=g.locale)==null?void 0:p.options)==null?void 0:b.weekStartsOn)??0;if(!e)return t?f():Cn(n,void 0);const c={firstWeekContainsDate:a,weekStartsOn:h,locale:i},o=[new UR(void 0,n)],l=e.match(EL).map(T=>{const S=T[0];if(S in ph){const x=ph[S];return x(T,i.formatLong)}return T}).join("").match(AL),m=[];for(let T of l){Cg(T)&&fh(T,e,t),_g(T)&&fh(T,e,t);const S=T[0],x=TL[S];if(x){const{incompatibleTokens:R}=x;if(Array.isArray(R)){const F=m.find(L=>R.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 f();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 f()}}if(t.length>0&&LL.test(t))return f();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 f();const M={};for(const T of w){if(!T.validate(k,c))return f();const S=T.set(k,M,c);Array.isArray(S)?(k=S[0],Object.assign(M,S[1])):k=S}return k}function NL(t){return t.match(ML)[1].replace(RL,"'")}function uw(t,e){return function(){return t.apply(e,arguments)}}const{toString:DL}=Object.prototype,{getPrototypeOf:gp}=Object,{iterator:tu,toStringTag:hw}=Symbol,nu=(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=>nu(e)===t),ru=t=>e=>typeof e===t,{isArray:Ta}=Array,yl=ru("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=ru("string"),ni=ru("function"),pw=ru("number"),iu=t=>t!==null&&typeof t=="object",jL=t=>t===!0||t===!1,ou=t=>{if(nu(t)!=="object")return!1;const e=gp(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(hw in t)&&!(tu in t)},WL=Yi("Date"),zL=Yi("File"),HL=Yi("Blob"),UL=Yi("FileList"),qL=t=>iu(t)&&ni(t.pipe),VL=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||ni(t.append)&&((e=nu(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),p=d.length;let b;for(r=0;r<p;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;ou(e[d])&&ou(r)?e[d]=mp(e[d],r):ou(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,p;const b={};if(e=e||{},t==null)return e;do{for(u=Object.getOwnPropertyNames(t),d=u.length;d-- >0;)p=u[d],(!r||r(p,t,e))&&!b[p]&&(e[p]=t[p],b[p]=!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[tu]).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 p;(p=e(u,d,t))!==!1&&(r[d]=p||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[tu])}const mO=t=>{const e=new Array(10),n=(r,u)=>{if(iu(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[u]=r;const d=Ta(r)?[]:{};return vl(r,(p,b)=>{const f=n(p,u+1);!yl(f)&&(d[b]=f)}),e[u]=void 0,d}}return r};return n(t,0)},yO=Yi("AsyncFunction"),vO=t=>t&&(iu(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:iu,isPlainObject:ou,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:nu,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[tu])};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 p=Object.create(bw);return Ae.toFlatObject(t,p,function(f){return f!==Error.prototype},b=>b!=="isAxiosError"),Ot.call(p,t.message,e,n,r,u),p.cause=t,p.name=t.name,d&&Object.assign(p,d),p};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 su(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,p=n.indexes,f=(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(!f&&Ae.isBlob(o))throw new Ot("Blob is not supported. Use a Buffer instead.");return Ae.isArrayBuffer(o)||Ae.isTypedArray(o)?f&&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(M,T){!(Ae.isUndefined(M)||M===null)&&e.append(p===!0?kw([l],T,d):p===null?l:l+"[]",g(M))}),!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&&su(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 p=t.indexOf("#");p!==-1&&(t=t.slice(0,p)),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",Mr={...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 su(t,new Mr.classes.URLSearchParams,Object.assign({visitor:function(n,r,u,d){return Mr.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 MO(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 p=n[d++];if(p==="__proto__")return!0;const b=Number.isFinite(+p),f=d>=n.length;return p=!p&&Ae.isArray(u)?u.length:p,f?(Ae.hasOwnProp(u,p)?u[p]=[u[p],r]:u[p]=r,!b):((!u[p]||!Ae.isObject(u[p]))&&(u[p]=[]),e(n,r,u[p],d)&&Ae.isArray(u[p])&&(u[p]=MO(u[p])),!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 RO(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 f=this.env&&this.env.FormData;return su(b?{"files[]":e}:e,f&&new f,this.formSerializer)}}return d||u?(n.setContentType("application/json",!1),RO(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 p=!(n&&n.silentJSONParsing)&&u;try{return JSON.parse(e)}catch(b){if(p)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:Mr.classes.FormData,Blob:Mr.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(`
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&&Yc.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}:Yc.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),Yc.assertOptions(n,{baseUrl:uo.spelling("baseURL"),withXsrfToken:uo.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let p=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(p,d);const b=[];let f=!0;this.interceptors.request.forEach(function(o){typeof o.runWhen=="function"&&o.runWhen(n)===!1||(f=f&&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(!f){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 zM=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 p=new Promise(b=>{r.subscribe(b),d=b}).then(u);return p.cancel=function(){r.unsubscribe(d)},p},e(function(u,d,p){r.reason||(r.reason=new Ca(u,d,p),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 HM(t){return function(e){return t.apply(null,e)}}function UM(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 ir=Wi("E",Bb(fl));ir.Axios=Ps,ir.CanceledError=Ca,ir.CancelToken=zM,ir.isCancel=Sb,ir.VERSION=Fb,ir.toFormData=Hc,ir.AxiosError=Lt,ir.Cancel=ir.CanceledError,ir.all=function(t){return Promise.all(t)},ir.spread=HM,ir.isAxiosError=UM,ir.mergeConfig=Fs,ir.AxiosHeaders=ti,ir.formToJSON=t=>xb(Te.isHTMLForm(t)?new FormData(t):t),ir.getAdapter=Nb.getAdapter,ir.HttpStatusCode=rp,ir.default=ir;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}=ir;function jb(){return Object.assign({},la())}function qM(t,e,n){const r=$n(t,void 0);return r.setTime(r.getTime()+e*Jl),r}function VM(t,e){const n=()=>nr(void 0,NaN),r=XM(t);let u;if(r.date){const f=QM(r.date,2);u=ZM(f.restDateString,f.year)}if(!u||isNaN(+u))return n();const d=+u;let p=0,b;if(r.time&&(p=JM(r.time),isNaN(p)))return n();if(r.timezone){if(b=eR(r.timezone),isNaN(b))return n()}else{const f=new Date(d+p),g=$n(0,void 0);return g.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),g.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),g}return $n(d+p+b,void 0)}const Xc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},KM=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,GM=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,YM=/^([+-])(\d{2})(?::?(\d{2}))?$/;function XM(t){const e={},n=t.split(Xc.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],Xc.timeZoneDelimiter.test(e.date)&&(e.date=t.split(Xc.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const u=Xc.timezone.exec(r);u?(e.time=r.replace(u[1],""),e.timezone=u[1]):e.time=r}return e}function QM(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 ZM(t,e){if(e===null)return new Date(NaN);const n=t.match(KM);if(!n)return new Date(NaN);const r=!!n[4],u=ml(n[1]),d=ml(n[2])-1,p=ml(n[3]),b=ml(n[4]),f=ml(n[5])-1;if(r)return oR(e,b,f)?tR(e,b,f):new Date(NaN);{const g=new Date(0);return!rR(e,d,p)||!iR(e,u)?new Date(NaN):(g.setUTCFullYear(e,d,Math.max(u,p)),g)}}function ml(t){return t?parseInt(t):1}function JM(t){const e=t.match(GM);if(!e)return NaN;const n=ip(e[1]),r=ip(e[2]),u=ip(e[3]);return sR(n,r,u)?n*uh+r*Jl+u*1e3:NaN}function ip(t){return t&&parseFloat(t.replace(",","."))||0}function eR(t){if(t==="Z")return 0;const e=t.match(YM);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),u=e[3]&&parseInt(e[3])||0;return aR(r,u)?n*(r*uh+u*Jl):NaN}function tR(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 nR=[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 rR(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(nR[e]||(Wb(t)?29:28))}function iR(t,e){return e>=1&&e<=(Wb(t)?366:365)}function oR(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function sR(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function aR(t,e){return e>=0&&e<=59}function lR(t,e,n){return qM(t,-e)}function zb(t,e,n){const r=jb(),u=hR(t,n.timeZone,n.locale??r.locale);return"formatToParts"in u?cR(u,e):uR(u,e)}function cR(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 uR(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}function hR(t,e,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:e,timeZoneName:t})}function dR(t,e){const n=yR(e);return"formatToParts"in n?fR(n,t):gR(n,t)}const pR={year:0,month:1,day:2,hour:3,minute:4,second:5};function fR(t,e){try{const n=t.formatToParts(e),r=[];for(let u=0;u<n.length;u++){const d=pR[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 gR(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")),mR=Hb==="06/25/2014, 00:00:00"||Hb==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function yR(t){return op[t]||(op[t]=mR?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,p){const b=new Date(0);return b.setUTCFullYear(t,e,n),b.setUTCHours(r,u,d,p),b}const qb=36e5,vR=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 p=parseInt(r[3],10);return Vb(u,p)?(d=Math.abs(u)*qb+p*vR,r[1]==="+"?-d:d):NaN}if(xR(t)){e=new Date(e||Date.now());const p=n?e:bR(e),b=lp(p,t);return-(n?b:wR(e,b,t))}return NaN}function bR(t){return Ub(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}function lp(t,e){const n=dR(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 wR(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 xR(t){if(Kb[t])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:t}),Kb[t]=!0,!0}catch{return!1}}const kR=60*1e3,SR={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"+_R(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)/kR:(e==null?void 0:e.getTimezoneOffset())??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+t);return n}function Qc(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=Qc(Math.floor(r/60),2),d=Qc(Math.floor(r%60),2);return n+u+e+d}function Gb(t,e){return t%60===0?(t>0?"-":"+")+Qc(Math.abs(t)/60,2):$a(t,e)}function _R(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+Qc(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 CR=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,up=36e5,Xb=6e4,$R=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:CR};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?$R: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=TR(t),{year:u,restDateString:d}=AR(r.date,n),p=ER(d,u);if(p===null||isNaN(p.getTime()))return new Date(NaN);if(p){const b=p.getTime();let f=0,g;if(r.time&&(f=MR(r.time),f===null||isNaN(f)))return new Date(NaN);if(r.timeZone||e.timeZone){if(g=ap(r.timeZone||e.timeZone,new Date(b+f)),isNaN(g))return new Date(NaN)}else g=Yb(new Date(b+f)),g=Yb(new Date(b+f+g));return new Date(b+f+g)}else return new Date(NaN)}function TR(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 AR(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 ER(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 p=parseInt(d[1],10);return OR(e,p)?(n.setUTCFullYear(e,0,p),n):new Date(NaN)}if(d=zr.MMDD.exec(t),d){n=new Date(0),r=parseInt(d[1],10)-1;const p=parseInt(d[2],10);return ew(e,r,p)?(n.setUTCFullYear(e,r,p),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 p=parseInt(d[2],10)-1;return tw(u,p)?Zb(e,u,p):new Date(NaN)}return null}function MR(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 RR=[31,28,31,30,31,30,31,31,30,31,30,31],LR=[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>LR[e]||!r&&n>RR[e])return!1}return!0}function OR(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 IR=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function NR(t,e,n={}){e=String(e);const r=e.match(IR);if(r){const u=Qb(n.originalDate||t,n);e=r.reduce(function(d,p){if(p[0]==="'")return d;const b=d.indexOf(p),f=d[b-1]==="'",g=d.replace(p,"'"+SR[p[0]](u,p,n)+"'");return f?g.substring(0,b-1)+g.substring(b+1):g},e)}return _s(t,e,n)}function DR(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 Zc(t,e,n,r){return r={...r,timeZone:e,originalDate:t},NR(DR(t,e,{timeZone:r.timeZone}),n,r)}const Jc="yyyy-MM-dd",nw="HH:mm:ss.SSS",rw="HH:mm:ss",eu=`${Jc} ${nw}`,iw=`${Jc} ${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"?lR(t,t.getTimezoneOffset()):t,eu)},formatDateTime(t,e){return!e||e==="local"?_s(t,eu):Zc(t,e,eu)},formatDateTimeHMS(t,e){return!e||e==="local"?_s(t,iw):Zc(t,e,iw)},formatDate:function(t,e){return!e||e==="local"?_s(t,Jc):Zc(t,this.timeZone,Jc)},formatTime:function(t,e,n=nw){return!e||e==="local"?_s(t,n):Zc(t,this.timeZone,n)},formatTimeHMS:function(t,e){return this.formatTime(t,e,rw)},formatTimestamp(t,e){return this.formatDateTime(VM(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 FR=Object.defineProperty,PR=(t,e,n)=>e in t?FR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,tt=(t,e,n)=>PR(t,typeof e!="symbol"?e+"":e,n);function dp(t,e,n){const r=$n(t,n==null?void 0:n.in);return isNaN(e)?nr((n==null?void 0:n.in)||t,NaN):(e&&r.setDate(r.getDate()+e),r)}function BR(t,e){const n=$n(t,void 0).getDay();return n===0?7:n}function jR(t,e){const n=WR(e)?new e(0):nr(e,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}function WR(t){var e;return typeof t=="function"&&((e=t.prototype)==null?void 0:e.constructor)===t}const zR=10;class ow{constructor(){tt(this,"subPriority",0)}validate(e,n){return!0}}class HR 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 UR extends ow{constructor(e,n){super(),tt(this,"priority",zR),tt(this,"subPriority",-1),this.context=e||(r=>nr(n,r))}set(e,n){return n.timestampIsSet?e:nr(e,jR(e,this.context))}}class on{run(e,n,r,u){const d=this.parse(e,n,r,u);return d?{setter:new HR(d.value,this.validate,this.set,this.priority,this.subPriority),rest:d.rest}:null}validate(e,n,r){return!0}}class qR 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 Vn={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 Kn(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,p=n[5]?parseInt(n[5],10):0;return{value:r*(u*uh+d*Jl+p*kk),rest:e.slice(n[0].length)}}function sw(t){return Rn(Vn.anyDigitsSigned,t)}function Nn(t,e){switch(t){case 1:return Rn(Vn.singleDigit,e);case 2:return Rn(Vn.twoDigits,e);case 3:return Rn(Vn.threeDigits,e);case 4:return Rn(Vn.fourDigits,e);default:return Rn(new RegExp("^\\d{1,"+t+"}"),e)}}function aw(t,e){switch(t){case 1:return Rn(Vn.singleDigitSigned,e);case 2:return Rn(Vn.twoDigitsSigned,e);case 3:return Rn(Vn.threeDigitsSigned,e);case 4:return Rn(Vn.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,p=Math.trunc(d/100)*100,b=t>=d%100;u=t+p-(b?100:0)}return n?u:1-u}function cw(t){return t%400===0||t%4===0&&t%100!==0}class VR 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 Kn(Nn(4,e),u);case"yo":return Kn(r.ordinalNumber(e,{unit:"year"}),u);default:return Kn(Nn(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 p=lw(r.year,u);return e.setFullYear(p,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 KR 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 Kn(Nn(4,e),u);case"Yo":return Kn(r.ordinalNumber(e,{unit:"year"}),u);default:return Kn(Nn(n.length,e),u)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r,u){const d=dh(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 p=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(p,0,u.firstWeekContainsDate),e.setHours(0,0,0,0),Go(e,u)}}class GR 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=nr(e,0);return u.setFullYear(r,0,4),u.setHours(0,0,0,0),ca(u)}}class YR 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 XR 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 Nn(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 QR 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 Nn(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 ZR 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 Kn(Rn(Vn.month,e),u);case"MM":return Kn(Nn(2,e),u);case"Mo":return Kn(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 JR 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 Kn(Rn(Vn.month,e),u);case"LL":return Kn(Nn(2,e),u);case"Lo":return Kn(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=$n(t,n==null?void 0:n.in),u=vg(r,n)-e;return r.setDate(r.getDate()-u*7),$n(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(Vn.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return Nn(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=$n(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(Vn.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return Nn(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(Vn.date,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return Nn(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(Vn.dayOfYear,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return Nn(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,p;const b=la(),f=(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??((p=(d=b.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??0,g=$n(t,n==null?void 0:n.in),i=g.getDay(),a=(e%7+7)%7,h=7-f,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=p=>{const b=Math.floor((p-1)/7)*7;return(p+u.weekStartsOn+6)%7+b};switch(n){case"e":case"ee":return Kn(Nn(n.length,e),d);case"eo":return Kn(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=p=>{const b=Math.floor((p-1)/7)*7;return(p+u.weekStartsOn+6)%7+b};switch(n){case"c":case"cc":return Kn(Nn(n.length,e),d);case"co":return Kn(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=$n(t,void 0),u=BR(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 Nn(n.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return Kn(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 Kn(r.day(e,{width:"narrow",context:"formatting"}),u);case"iiiiii":return Kn(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),u);case"iiii":default:return Kn(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(Vn.hour12h,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return Nn(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(Vn.hour23h,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return Nn(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(Vn.hour11h,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return Nn(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(Vn.hour24h,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return Nn(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(Vn.minute,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return Nn(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(Vn.second,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return Nn(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 Kn(Nn(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:nr(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:nr(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[nr(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[nr(e,r),{timestampIsSet:!0}]}}const TL={G:new qR,y:new VR,Y:new KR,R:new GR,u:new YR,Q:new XR,q:new QR,M:new ZR,L:new JR,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,ML=/^'([^]*?)'?$/,RL=/''/g,LL=/\S/,OL=/[a-zA-Z]/;function IL(t,e,n,r){var u,d,p,b;const f=()=>nr(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=(p=g.locale)==null?void 0:p.options)==null?void 0:b.weekStartsOn)??0;if(!e)return t?f():$n(n,void 0);const c={firstWeekContainsDate:a,weekStartsOn:h,locale:i},o=[new UR(void 0,n)],l=e.match(EL).map(T=>{const S=T[0];if(S in ph){const x=ph[S];return x(T,i.formatLong)}return T}).join("").match(AL),m=[];for(let T of l){Cg(T)&&fh(T,e,t),_g(T)&&fh(T,e,t);const S=T[0],x=TL[S];if(x){const{incompatibleTokens:R}=x;if(Array.isArray(R)){const F=m.find(L=>R.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 f();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 f()}}if(t.length>0&&LL.test(t))return f();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=$n(n,void 0);if(isNaN(+k))return f();const M={};for(const T of w){if(!T.validate(k,c))return f();const S=T.set(k,M,c);Array.isArray(S)?(k=S[0],Object.assign(M,S[1])):k=S}return k}function NL(t){return t.match(ML)[1].replace(RL,"'")}function uw(t,e){return function(){return t.apply(e,arguments)}}const{toString:DL}=Object.prototype,{getPrototypeOf:gp}=Object,{iterator:tu,toStringTag:hw}=Symbol,nu=(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=>nu(e)===t),ru=t=>e=>typeof e===t,{isArray:Ta}=Array,yl=ru("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=ru("string"),ni=ru("function"),pw=ru("number"),iu=t=>t!==null&&typeof t=="object",jL=t=>t===!0||t===!1,ou=t=>{if(nu(t)!=="object")return!1;const e=gp(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(hw in t)&&!(tu in t)},WL=Yi("Date"),zL=Yi("File"),HL=Yi("Blob"),UL=Yi("FileList"),qL=t=>iu(t)&&ni(t.pipe),VL=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||ni(t.append)&&((e=nu(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),p=d.length;let b;for(r=0;r<p;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;ou(e[d])&&ou(r)?e[d]=mp(e[d],r):ou(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,p;const b={};if(e=e||{},t==null)return e;do{for(u=Object.getOwnPropertyNames(t),d=u.length;d-- >0;)p=u[d],(!r||r(p,t,e))&&!b[p]&&(e[p]=t[p],b[p]=!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[tu]).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 p;(p=e(u,d,t))!==!1&&(r[d]=p||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[tu])}const mO=t=>{const e=new Array(10),n=(r,u)=>{if(iu(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[u]=r;const d=Ta(r)?[]:{};return vl(r,(p,b)=>{const f=n(p,u+1);!yl(f)&&(d[b]=f)}),e[u]=void 0,d}}return r};return n(t,0)},yO=Yi("AsyncFunction"),vO=t=>t&&(iu(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:iu,isPlainObject:ou,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:nu,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[tu])};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 p=Object.create(bw);return Ae.toFlatObject(t,p,function(f){return f!==Error.prototype},b=>b!=="isAxiosError"),Ot.call(p,t.message,e,n,r,u),p.cause=t,p.name=t.name,d&&Object.assign(p,d),p};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 su(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,p=n.indexes,f=(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(!f&&Ae.isBlob(o))throw new Ot("Blob is not supported. Use a Buffer instead.");return Ae.isArrayBuffer(o)||Ae.isTypedArray(o)?f&&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(M,T){!(Ae.isUndefined(M)||M===null)&&e.append(p===!0?kw([l],T,d):p===null?l:l+"[]",g(M))}),!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&&su(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 p=t.indexOf("#");p!==-1&&(t=t.slice(0,p)),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",Mr={...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 su(t,new Mr.classes.URLSearchParams,Object.assign({visitor:function(n,r,u,d){return Mr.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 MO(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 p=n[d++];if(p==="__proto__")return!0;const b=Number.isFinite(+p),f=d>=n.length;return p=!p&&Ae.isArray(u)?u.length:p,f?(Ae.hasOwnProp(u,p)?u[p]=[u[p],r]:u[p]=r,!b):((!u[p]||!Ae.isObject(u[p]))&&(u[p]=[]),e(n,r,u[p],d)&&Ae.isArray(u[p])&&(u[p]=MO(u[p])),!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 RO(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 f=this.env&&this.env.FormData;return su(b?{"files[]":e}:e,f&&new f,this.formSerializer)}}return d||u?(n.setContentType("application/json",!1),RO(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 p=!(n&&n.silentJSONParsing)&&u;try{return JSON.parse(e)}catch(b){if(p)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:Mr.classes.FormData,Blob:Mr.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
1501
  `).forEach(function(p){u=p.indexOf(":"),n=p.substring(0,u).trim().toLowerCase(),r=p.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 au(t){return t===!1||t==null?t:Ae.isArray(t)?t.map(au):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,p){return this[r].call(this,e,u,d,p)},configurable:!0})})}let ri=class{constructor(e){e&&this.set(e)}set(e,n,r){const u=this;function d(b,f,g){const i=wl(f);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||f]=au(b))}const p=(b,f)=>Ae.forEach(b,(g,i)=>d(g,i,f));if(Ae.isPlainObject(e)||e instanceof this.constructor)p(e,n);else if(Ae.isString(e)&&(e=e.trim())&&!NO(e))p(OO(e),n);else if(Ae.isObject(e)&&Ae.isIterable(e)){let b={},f,g;for(const i of e){if(!Ae.isArray(i))throw TypeError("Object iterator must return a key-value pair");b[g=i[0]]=(f=b[g])?Ae.isArray(f)?[...f,i[1]]:[f,i[1]]:i[1]}p(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(p){if(p=wl(p),p){const b=Ae.findKey(r,p);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 p=Ae.findKey(r,d);if(p){n[p]=au(u),delete n[d];return}const b=e?DO(d):String(d).trim();b!==d&&delete n[d],n[b]=au(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
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(p){const b=wl(p);r[b]||(FO(u,p),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 Mw(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 Rw(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,p;return e=e!==void 0?e:1e3,function(f){const g=Date.now(),i=r[d];p||(p=g),n[u]=f,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-p<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 p=(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?p(g,i):(u=g,d||(d=setTimeout(()=>{d=null,p(u)},r-a)))},()=>u&&p(u)]}const lu=(t,e,n=3)=>{let r=0;const u=BO(50,250);return jO(d=>{const p=d.loaded,b=d.lengthComputable?d.total:void 0,f=p-r,g=u(f),i=p<=b;r=p;const a={loaded:p,total:b,progress:b?p/b:void 0,bytes:f,rate:g||void 0,estimated:g&&b&&i?(b-p)/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=Mr.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Mr.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Mr.origin),Mr.navigator&&/(msie|trident)/i.test(Mr.navigator.userAgent)):()=>!0,zO=Mr.hasStandardBrowserEnv?{write(t,e,n,r,u,d){const p=[t+"="+encodeURIComponent(e)];Ae.isNumber(n)&&p.push("expires="+new Date(n).toGMTString()),Ae.isString(r)&&p.push("path="+r),Ae.isString(u)&&p.push("domain="+u),d===!0&&p.push("secure"),document.cookie=p.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 p(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 f={url:d,method:d,data:d,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,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=f[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:p,auth:b}=e;e.headers=p=ri.from(p),e.url=Cw(Iw(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),b&&p.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):"")));let f;if(Ae.isFormData(n)){if(Mr.hasStandardBrowserEnv||Mr.hasStandardBrowserWebWorkerEnv)p.setContentType(void 0);else if((f=p.getContentType())!==!1){const[g,...i]=f?f.split(";").map(a=>a.trim()).filter(Boolean):[];p.setContentType([g||"multipart/form-data",...i].join("; "))}}if(Mr.hasStandardBrowserEnv&&(r&&Ae.isFunction(r)&&(r=r(e)),r||r!==!1&&WO(e.url))){const g=u&&d&&zO.read(d);g&&p.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 p=ri.from(u.headers).normalize();let{responseType:b,onUploadProgress:f,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 M=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:M,config:t,request:m};Rw(function(R){n(R),l()},function(R){r(R),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&&p.setContentType(null),"setRequestHeader"in m&&Ae.forEach(p.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]=lu(g,!0),m.addEventListener("progress",h)),f&&m.upload&&([a,c]=lu(f),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",c)),(u.cancelToken||u.signal)&&(i=M=>{m&&(r(!M||M.type?new Aa(null,t,m):M),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&&Mr.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 p=e&&setTimeout(()=>{p=null,d(new Ot(`timeout ${e} of ms exceeded`,Ot.ETIMEDOUT))},e);const b=()=>{t&&(p&&clearTimeout(p),p=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),t=null)};t.forEach(g=>g.addEventListener("abort",d));const{signal:f}=r;return f.unsubscribe=()=>Ae.asap(b),f}},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,p,b=f=>{p||(p=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:g,value:i}=await u.next();if(g){b(),f.close();return}let a=i.byteLength;if(n){let h=d+=a;n(h)}f.enqueue(new Uint8Array(i))}catch(g){throw b(g),g}},cancel(f){return b(f),u.return()}},{highWaterMark:2})},cu=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Pw=cu&&typeof ReadableStream=="function",XO=cu&&(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(Mr.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)),uu={stream:Sp&&(t=>t.body)};cu&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!uu[e]&&(uu[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(Mr.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:cu&&(async t=>{let{url:e,method:n,data:r,signal:u,cancelToken:d,timeout:p,onDownloadProgress:b,onUploadProgress:f,responseType:g,headers:i,withCredentials:a="same-origin",fetchOptions:h}=Dw(t);g=g?(g+"").toLowerCase():"text";let c=VO([u,d&&d.toAbortSignal()],p),o;const l=c&&c.unsubscribe&&(()=>{c.unsubscribe()});let m;try{if(f&&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[R,O]=Lw(m,lu(Ow(f)));r=Fw(S.body,jw,R,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 M=Sp&&(g==="stream"||g==="response");if(Sp&&(b||M&&l)){const S={};["status","statusText","headers"].forEach(F=>{S[F]=k[F]});const x=Ae.toFiniteNumber(k.headers.get("content-length")),[R,O]=b&&Lw(x,lu(Ow(b),!0))||[];k=new Response(Fw(k.body,jw,R,()=>{O&&O(),l&&l()}),S)}g=g||"text";let T=await uu[Ae.findKey(uu,g)||"text"](k,t);return!M&&l&&l(),await new Promise((S,x)=>{Rw(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 p;if(r=n,!eI(n)&&(r=_p[(p=String(n)).toLowerCase()],r===void 0))throw new Ot(`Unknown adapter '${p}'`);if(r)break;u[p||"#"+d]=r}if(!r){const d=Object.entries(u).map(([b,f])=>`adapter ${b} `+(f===!1?"is not supported by the environment":"is not available in the build"));let p=e?d.length>1?`since :
1503
1503
  `+d.map(Ww).join(`
1504
1504
  `):" "+Ww(d[0]):"as no adapter specified";throw new Ot("There is no suitable adapter to dispatch the request "+p,"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 Mw(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",hu={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{hu[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const qw={};hu.transitional=function(e,n,r){function u(d,p){return"[Axios v"+Uw+"] Transitional option '"+d+"'"+p+(r?". "+r:"")}return(d,p,b)=>{if(e===!1)throw new Ot(u(p," has been removed"+(n?" in "+n:"")),Ot.ERR_DEPRECATED);return n&&!qw[p]&&(qw[p]=!0,console.warn(u(p," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(d,p,b):!0}},hu.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],p=e[d];if(p){const b=t[d],f=b===void 0||p(b,d,t);if(f!==!0)throw new Ot("option "+d+" must be "+f,Ot.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ot("Unknown option "+d,Ot.ERR_BAD_OPTION)}}const du={assertOptions:tI,validators:hu},fo=du.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&&du.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}:du.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),du.assertOptions(n,{baseUrl:fo.spelling("baseURL"),withXsrfToken:fo.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let p=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(p,d);const b=[];let f=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(n)===!1||(f=f&&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(!f){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,p,b){return this.request(js(b||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:d,data:p}))}}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 p=new Promise(b=>{r.subscribe(b),d=b}).then(u);return p.cancel=function(){r.unsubscribe(d)},p},e(function(d,p,b){r.reason||(r.reason=new Aa(d,p,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=Mw,Kn.VERSION=Uw,Kn.toFormData=su,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:Mj,CanceledError:Rj,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 p=window.atob(r.data.contents),b=new Uint8Array(p.length);for(let g=0;g<p.length;++g)b[g]=p.charCodeAt(g);const f=new Blob([b]);u=URL.createObjectURL(f)}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 p=Ut("top-bar"),b=Ut("v-icon"),f=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"),M=Ut("v-card-text"),T=Ut("v-dialog"),S=Ut("output-dialog");return Zt(),Yr("div",null,[ot(p,{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,R)=>(Zt(),Jn(g,{key:R,variant:"elevated",color:"primary",class:"ma-2",onClick:ys(O=>d.selectBucket(x),["stop"])},{default:it(()=>[ot(f,{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,R)=>(Zt(),Jn(g,{key:R,variant:"elevated",color:"primary",class:"ma-2",onClick:ys(O=>d.selectVolume(x),["stop"])},{default:it(()=>[ot(f,{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,R)=>(Zt(),Yr("span",{key:R},[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:R=>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:R=>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:R=>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(M,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(M,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"})))}}});
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&&du.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}:du.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),du.assertOptions(n,{baseUrl:fo.spelling("baseURL"),withXsrfToken:fo.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let p=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(p,d);const b=[];let f=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(n)===!1||(f=f&&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(!f){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,p,b){return this.request(js(b||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:d,data:p}))}}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 p=new Promise(b=>{r.subscribe(b),d=b}).then(u);return p.cancel=function(){r.unsubscribe(d)},p},e(function(d,p,b){r.reason||(r.reason=new Aa(d,p,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 Gn=Vw(bl);Gn.Axios=Ws,Gn.CanceledError=Aa,Gn.CancelToken=nI,Gn.isCancel=Mw,Gn.VERSION=Uw,Gn.toFormData=su,Gn.AxiosError=Ot,Gn.Cancel=Gn.CanceledError,Gn.all=function(e){return Promise.all(e)},Gn.spread=rI,Gn.isAxiosError=iI,Gn.mergeConfig=js,Gn.AxiosHeaders=ri,Gn.formToJSON=t=>Aw(Ae.isHTMLForm(t)?new FormData(t):t),Gn.getAdapter=zw.getAdapter,Gn.HttpStatusCode=$p,Gn.default=Gn;const{Axios:Ej,AxiosError:Mj,CanceledError:Rj,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}=Gn,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 p=window.atob(r.data.contents),b=new Uint8Array(p.length);for(let g=0;g<p.length;++g)b[g]=p.charCodeAt(g);const f=new Blob([b]);u=URL.createObjectURL(f)}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 Gn({...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 p=Ut("top-bar"),b=Ut("v-icon"),f=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"),M=Ut("v-card-text"),T=Ut("v-dialog"),S=Ut("output-dialog");return Zt(),Yr("div",null,[ot(p,{title:u.title,menus:u.menus},null,8,["title","menus"]),ot(w,{width:"100%"},{default:it(()=>[gr("div",sI,[e[12]||(e[12]=gr("span",{class:"ma-2 font-size"},"Buckets:",-1)),(Zt(!0),Yr(_o,null,Ko(u.buckets,(x,R)=>(Zt(),er(g,{key:R,variant:"elevated",color:"primary",class:"ma-2",onClick:ys(O=>d.selectBucket(x),["stop"])},{default:it(()=>[ot(f,{start:""},{default:it(()=>[ot(b,null,{default:it(()=>e[11]||(e[11]=[tr("mdi-bucket")])),_:1})]),_:1}),tr(" "+Br(x),1)]),_:2},1032,["onClick"]))),128))]),u.volumes.length!==0?(Zt(),Yr("div",aI,[e[14]||(e[14]=gr("span",{class:"ma-2 font-size"},"Volumes:",-1)),(Zt(!0),Yr(_o,null,Ko(u.volumes,(x,R)=>(Zt(),er(g,{key:R,variant:"elevated",color:"primary",class:"ma-2",onClick:ys(O=>d.selectVolume(x),["stop"])},{default:it(()=>[ot(f,{start:""},{default:it(()=>[ot(b,null,{default:it(()=>e[13]||(e[13]=[tr("mdi-folder")])),_:1})]),_:1}),tr(" "+Br(x),1)]),_:2},1032,["onClick"]))),128))])):so("",!0),ot(h,{class:"pt-0 d-flex align-center justify-content-space-between"},{default:it(()=>[tr(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"]),gr("div",lI,[(Zt(!0),Yr(_o,null,Ko(d.breadcrumbPath,(x,R)=>(Zt(),Yr("span",{key:R},[e[15]||(e[15]=tr(" / ")),gr("a",{style:{cursor:"pointer"},onClick:ys(O=>d.gotoPath(x.path),["prevent"])},Br(x.name),9,cI)]))),128))]),ot(i),gr("div",uI,[tr(" Folder Size: "+Br(d.folderTotal)+" ",1),e[16]||(e[16]=gr("span",{class:"small-font-size"},"(not recursive)",-1))]),ot(i),u.mode==="bucket"?(Zt(),Yr("div",hI,[e[17]||(e[17]=gr("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(()=>[tr(Br(x.icon),1)]),_:2},1024),tr(" "+Br(x.name),1)]),"item.size":it(({item:x})=>[tr(Br(x.size?x.size.toLocaleString():""),1)]),"item.action":it(({item:x})=>[x.icon==="mdi-file"&&d.isText(x.name)?(Zt(),er(c,{key:0,icon:"mdi-eye",variant:"text",density:"compact",class:"mr-3","data-test":"view-file","aria-label":"View File",onClick:R=>d.viewFile(x.name)},null,8,["onClick"])):so("",!0),x.icon==="mdi-file"?(Zt(),er(c,{key:1,icon:"mdi-download-box",variant:"text",density:"compact",class:"mr-3","data-test":"download-file","aria-label":"Download File",onClick:R=>d.downloadFile(x.name)},null,8,["onClick"])):so("",!0),x.icon==="mdi-file"?(Zt(),er(c,{key:2,icon:"mdi-delete",variant:"text",density:"compact","data-test":"delete-file","aria-label":"Delete File",onClick:R=>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]=gr("span",null," Upload Path ",-1)),ot(i)]),_:1}),ot(M,null,{default:it(()=>[gr("div",dI,[ot(l,{class:"my-2"},{default:it(()=>e[19]||(e[19]=[gr("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]=[tr(" 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]=[tr(" 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]=gr("span",null,"Options",-1)),ot(i)]),_:1}),ot(M,null,{default:it(()=>[gr("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(),er(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"})))}}});