vibedoc 1.0.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.
- package/.next/BUILD_ID +1 -0
- package/.next/app-build-manifest.json +92 -0
- package/.next/app-path-routes-manifest.json +1 -0
- package/.next/build-manifest.json +32 -0
- package/.next/package.json +1 -0
- package/.next/prerender-manifest.js +1 -0
- package/.next/prerender-manifest.json +1 -0
- package/.next/react-loadable-manifest.json +282 -0
- package/.next/required-server-files.json +1 -0
- package/.next/routes-manifest.json +1 -0
- package/.next/server/app/(app)/activity/page.js +1 -0
- package/.next/server/app/(app)/activity/page.js.nft.json +1 -0
- package/.next/server/app/(app)/activity/page_client-reference-manifest.js +1 -0
- package/.next/server/app/(app)/board/page.js +2 -0
- package/.next/server/app/(app)/board/page.js.nft.json +1 -0
- package/.next/server/app/(app)/board/page_client-reference-manifest.js +1 -0
- package/.next/server/app/(app)/docs/page.js +2 -0
- package/.next/server/app/(app)/docs/page.js.nft.json +1 -0
- package/.next/server/app/(app)/docs/page_client-reference-manifest.js +1 -0
- package/.next/server/app/(app)/memory/page.js +7 -0
- package/.next/server/app/(app)/memory/page.js.nft.json +1 -0
- package/.next/server/app/(app)/memory/page_client-reference-manifest.js +1 -0
- package/.next/server/app/(app)/settings/page.js +21 -0
- package/.next/server/app/(app)/settings/page.js.nft.json +1 -0
- package/.next/server/app/(app)/settings/page_client-reference-manifest.js +1 -0
- package/.next/server/app/(app)/setup/page.js +1 -0
- package/.next/server/app/(app)/setup/page.js.nft.json +1 -0
- package/.next/server/app/(app)/setup/page_client-reference-manifest.js +1 -0
- package/.next/server/app/_not-found/page.js +1 -0
- package/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
- package/.next/server/app/_not-found.html +1 -0
- package/.next/server/app/_not-found.meta +6 -0
- package/.next/server/app/_not-found.rsc +9 -0
- package/.next/server/app/activity.html +1 -0
- package/.next/server/app/activity.meta +5 -0
- package/.next/server/app/activity.rsc +13 -0
- package/.next/server/app/api/activity/route.js +1 -0
- package/.next/server/app/api/activity/route.js.nft.json +1 -0
- package/.next/server/app/api/backlinks/route.js +1 -0
- package/.next/server/app/api/backlinks/route.js.nft.json +1 -0
- package/.next/server/app/api/context/route.js +1 -0
- package/.next/server/app/api/context/route.js.nft.json +1 -0
- package/.next/server/app/api/decisions/route.js +1 -0
- package/.next/server/app/api/decisions/route.js.nft.json +1 -0
- package/.next/server/app/api/docs/route.js +1 -0
- package/.next/server/app/api/docs/route.js.nft.json +1 -0
- package/.next/server/app/api/events/route.js +3 -0
- package/.next/server/app/api/events/route.js.nft.json +1 -0
- package/.next/server/app/api/mcp/route.js +103 -0
- package/.next/server/app/api/mcp/route.js.nft.json +1 -0
- package/.next/server/app/api/memory/route.js +1 -0
- package/.next/server/app/api/memory/route.js.nft.json +1 -0
- package/.next/server/app/api/projects/route.js +1 -0
- package/.next/server/app/api/projects/route.js.nft.json +1 -0
- package/.next/server/app/api/projects.body +1 -0
- package/.next/server/app/api/projects.meta +1 -0
- package/.next/server/app/api/settings/route.js +1 -0
- package/.next/server/app/api/settings/route.js.nft.json +1 -0
- package/.next/server/app/api/setup/generate/route.js +130 -0
- package/.next/server/app/api/setup/generate/route.js.nft.json +1 -0
- package/.next/server/app/api/setup/write/route.js +1 -0
- package/.next/server/app/api/setup/write/route.js.nft.json +1 -0
- package/.next/server/app/api/summary/route.js +1 -0
- package/.next/server/app/api/summary/route.js.nft.json +1 -0
- package/.next/server/app/api/tasks/route.js +1 -0
- package/.next/server/app/api/tasks/route.js.nft.json +1 -0
- package/.next/server/app/board.html +1 -0
- package/.next/server/app/board.meta +5 -0
- package/.next/server/app/board.rsc +13 -0
- package/.next/server/app/docs.html +1 -0
- package/.next/server/app/docs.meta +5 -0
- package/.next/server/app/docs.rsc +13 -0
- package/.next/server/app/index.html +1 -0
- package/.next/server/app/index.meta +6 -0
- package/.next/server/app/index.rsc +6 -0
- package/.next/server/app/memory.html +1 -0
- package/.next/server/app/memory.meta +5 -0
- package/.next/server/app/memory.rsc +13 -0
- package/.next/server/app/page.js +1 -0
- package/.next/server/app/page.js.nft.json +1 -0
- package/.next/server/app/page_client-reference-manifest.js +1 -0
- package/.next/server/app/settings.html +1 -0
- package/.next/server/app/settings.meta +5 -0
- package/.next/server/app/settings.rsc +13 -0
- package/.next/server/app/setup.html +1 -0
- package/.next/server/app/setup.meta +5 -0
- package/.next/server/app/setup.rsc +13 -0
- package/.next/server/app-paths-manifest.json +24 -0
- package/.next/server/chunks/191.js +91 -0
- package/.next/server/chunks/357.js +2 -0
- package/.next/server/chunks/486.js +12 -0
- package/.next/server/chunks/491.js +2 -0
- package/.next/server/chunks/778.js +9 -0
- package/.next/server/chunks/80.js +60 -0
- package/.next/server/chunks/900.js +6 -0
- package/.next/server/chunks/945.js +20 -0
- package/.next/server/chunks/font-manifest.json +1 -0
- package/.next/server/font-manifest.json +1 -0
- package/.next/server/functions-config-manifest.json +1 -0
- package/.next/server/interception-route-rewrite-manifest.js +1 -0
- package/.next/server/middleware-build-manifest.js +1 -0
- package/.next/server/middleware-manifest.json +6 -0
- package/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/.next/server/next-font-manifest.js +1 -0
- package/.next/server/next-font-manifest.json +1 -0
- package/.next/server/pages/404.html +1 -0
- package/.next/server/pages/500.html +1 -0
- package/.next/server/pages/_app.js +1 -0
- package/.next/server/pages/_app.js.nft.json +1 -0
- package/.next/server/pages/_document.js +1 -0
- package/.next/server/pages/_document.js.nft.json +1 -0
- package/.next/server/pages/_error.js +1 -0
- package/.next/server/pages/_error.js.nft.json +1 -0
- package/.next/server/pages-manifest.json +1 -0
- package/.next/server/server-reference-manifest.js +1 -0
- package/.next/server/server-reference-manifest.json +1 -0
- package/.next/server/webpack-runtime.js +1 -0
- package/.next/static/chunks/1088.464d783cc5eea9de.js +1 -0
- package/.next/static/chunks/1222.e874d92bfc1bc6c7.js +1 -0
- package/.next/static/chunks/1347.3e7d2ed21b663e48.js +1 -0
- package/.next/static/chunks/1433.2f2e32dffc1c27c8.js +1 -0
- package/.next/static/chunks/1472.5e71f95e6296fd63.js +36 -0
- package/.next/static/chunks/1594.09677134642da9ff.js +93 -0
- package/.next/static/chunks/1638.2e37b49b302bcb6a.js +174 -0
- package/.next/static/chunks/2244.cf7a2544ebeb1e19.js +82 -0
- package/.next/static/chunks/228-e44243a26f6475e2.js +9 -0
- package/.next/static/chunks/2306.509ed7c364442601.js +2 -0
- package/.next/static/chunks/2412.949844de7f2bbdc3.js +262 -0
- package/.next/static/chunks/2565.eb3605e7c90e3c7e.js +131 -0
- package/.next/static/chunks/2591.56cbda5d4e6e2943.js +56 -0
- package/.next/static/chunks/2597.ba1681ae114a4aa7.js +29 -0
- package/.next/static/chunks/2647.011471b532619487.js +59 -0
- package/.next/static/chunks/2794.65caa79043b402f7.js +1 -0
- package/.next/static/chunks/2861.4fff66e909869a6d.js +148 -0
- package/.next/static/chunks/2894.5a2b6bbc2c48843d.js +43 -0
- package/.next/static/chunks/3795.50eafedfcd5f01d6.js +24 -0
- package/.next/static/chunks/3904.54baab606637ae6e.js +1 -0
- package/.next/static/chunks/4236.17567db90ef651b7.js +1 -0
- package/.next/static/chunks/4316-6345e1b4bb694a29.js +1 -0
- package/.next/static/chunks/490-ed8ba8bf24ab2f3d.js +1 -0
- package/.next/static/chunks/4982.9f5dde29b741d6dd.js +63 -0
- package/.next/static/chunks/5083.ffcecc2fefa6de50.js +55 -0
- package/.next/static/chunks/5218.35990037cf2fd97c.js +155 -0
- package/.next/static/chunks/5340.5ddd859da4765a69.js +1 -0
- package/.next/static/chunks/5453.47f6d134b08a854e.js +4 -0
- package/.next/static/chunks/5808.d42ab07c5de599fd.js +1 -0
- package/.next/static/chunks/6429.08e2027051a6966c.js +1 -0
- package/.next/static/chunks/6482.03215b09c8639bc2.js +7 -0
- package/.next/static/chunks/6842-aed3c9b445ee77d1.js +2 -0
- package/.next/static/chunks/6864.4be1f9d162073932.js +1 -0
- package/.next/static/chunks/6886.f44c1de05dae9abc.js +1 -0
- package/.next/static/chunks/68bc8b64.37fd49721fa7b320.js +136 -0
- package/.next/static/chunks/6bded0d7-aec80afe2d60204d.js +1 -0
- package/.next/static/chunks/7123.fdc5241f4c912578.js +62 -0
- package/.next/static/chunks/7235.d4cff43d3f970540.js +1 -0
- package/.next/static/chunks/7241.499111c9d51ab606.js +1 -0
- package/.next/static/chunks/7251.17e3ab4cd5935b2e.js +166 -0
- package/.next/static/chunks/7283.d294d5aebfe1c65f.js +215 -0
- package/.next/static/chunks/7292.0dfaab300ca1050a.js +1 -0
- package/.next/static/chunks/7527.0ccae900ac492b8c.js +1 -0
- package/.next/static/chunks/7697-812a5639d661760b.js +1 -0
- package/.next/static/chunks/7722.d7a4456b068af3c0.js +24 -0
- package/.next/static/chunks/7725-63beec2ffb219859.js +16 -0
- package/.next/static/chunks/8130.609cf9a280803973.js +1 -0
- package/.next/static/chunks/8338.2415ec79a5f31092.js +1 -0
- package/.next/static/chunks/845-0e3438196b5ef62c.js +1 -0
- package/.next/static/chunks/8836.71b3f39cb9a95d62.js +5 -0
- package/.next/static/chunks/942c9eea.2013b980eeaebb14.js +53 -0
- package/.next/static/chunks/94c12b52-436125ce5f9c910a.js +1 -0
- package/.next/static/chunks/9528.4d4672f83c5035ab.js +1 -0
- package/.next/static/chunks/9580.942737df82878943.js +1 -0
- package/.next/static/chunks/9672.cb194a5bbad5f696.js +1 -0
- package/.next/static/chunks/app/(app)/activity/page-91b9d738c33e19b5.js +1 -0
- package/.next/static/chunks/app/(app)/board/page-33f5e3998a8445ca.js +1 -0
- package/.next/static/chunks/app/(app)/docs/page-17670ed46c3594e6.js +1 -0
- package/.next/static/chunks/app/(app)/layout-34b4046ccf919d3f.js +1 -0
- package/.next/static/chunks/app/(app)/memory/page-b3aa8c5e028caf75.js +1 -0
- package/.next/static/chunks/app/(app)/settings/page-f264516b9005f933.js +16 -0
- package/.next/static/chunks/app/(app)/setup/page-9fd82b10016eca64.js +16 -0
- package/.next/static/chunks/app/_not-found/page-73e8eefca2388c5f.js +1 -0
- package/.next/static/chunks/app/layout-7054561bfe7eec9c.js +1 -0
- package/.next/static/chunks/app/page-f71834a10930be30.js +1 -0
- package/.next/static/chunks/b09b44eb.fa180e586fdf600b.js +1 -0
- package/.next/static/chunks/ea0025a9.12db9045daafb0c1.js +1 -0
- package/.next/static/chunks/efcceb14.8fc58c5c4428a08e.js +1 -0
- package/.next/static/chunks/framework-20afca218c33ed8b.js +33 -0
- package/.next/static/chunks/main-6224705d81e790a3.js +1 -0
- package/.next/static/chunks/main-app-02ed5dd91baaafdc.js +1 -0
- package/.next/static/chunks/pages/_app-db7a259df1c8778b.js +1 -0
- package/.next/static/chunks/pages/_error-76163253f7e717d4.js +1 -0
- package/.next/static/chunks/polyfills-78c92fac7aa8fdd8.js +1 -0
- package/.next/static/chunks/webpack-648d3cb0a281bce5.js +1 -0
- package/.next/static/css/615004f0fff77145.css +5 -0
- package/.next/static/r-2w-yCd6mM7TOOETgGaA/_buildManifest.js +1 -0
- package/.next/static/r-2w-yCd6mM7TOOETgGaA/_ssgManifest.js +1 -0
- package/README.md +160 -0
- package/bin/vibedoc.js +54 -0
- package/next.config.js +7 -0
- package/package.json +80 -0
- package/ws-server.js +12 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4316],{46366:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]])},56622:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},27881:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]])},25902:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]])},30445:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},42008:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]])},86725:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]])},80261:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]])},25612:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]])},92231:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("heading-1",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]])},82772:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("heading-2",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]])},60031:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("heading-3",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]])},58797:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]])},75255:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]])},69195:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("list-ordered",[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]])},73473:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]])},47953:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},92560:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},48354:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},42921:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]])},35710:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("square-check-big",[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},95371:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]])},39098:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},8892:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(98009).Z)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])},44492:function(e,t,n){"use strict";var r,i;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(i=n.g.process)?void 0:i.env)?n.g.process:n(84191)},84191:function(e){!function(){var t={229:function(e){var t,n,r,i=e.exports={};function s(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function l(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var a=[],h=!1,c=-1;function u(){h&&r&&(h=!1,r.length?a=r.concat(a):c=-1,a.length&&f())}function f(){if(!h){var e=l(u);h=!0;for(var t=a.length;t;){for(r=a,a=[];++c<t;)r&&r[c].run();c=-1,t=a.length}r=null,h=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];a.push(new d(e,t)),1!==a.length||h||l(f)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var s=n[e]={exports:{}},o=!0;try{t[e](s,s.exports,r),o=!1}finally{o&&delete n[e]}return s.exports}r.ab="//";var i=r(229);e.exports=i}()},9553:function(e,t,n){"use strict";n.d(t,{B1:function(){return eA},GA:function(){return ex},Gn:function(){return el},Mb:function(){return a},TK:function(){return o},eC:function(){return h},vQ:function(){return ed},ys:function(){return eC}});var r=n(78775),i=n(47824),s=n(17781);class o{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=(0,s.qz)(this.state).resolveInner(this.pos,-1);for(;t&&0>e.indexOf(t.name);)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(f(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return null==this.abortListeners}addEventListener(e,t,n){"abort"==e&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function l(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function a(e){let t=e.map(e=>"string"==typeof e?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=l(t)+l(n)+"*$";return[RegExp("^"+r),new RegExp(r)]}(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function h(e,t){return n=>{for(let t=(0,s.qz)(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}class c{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}}function u(e){return e.selection.main.from}function f(e,t){var n;let{source:r}=e,i=t&&"^"!=r[0],s="$"!=r[r.length-1];return i||s?RegExp(`${i?"^":""}(?:${r})${s?"$":""}`,null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}let d=r.q6.define(),p=new WeakMap;function m(e){if(!Array.isArray(e))return e;let t=p.get(e);return t||p.set(e,t=a(e)),t}let g=r.Py.define(),y=r.Py.define();class v{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=(0,r.gm)(e,t),i=(0,r.nZ)(n);this.chars.push(n);let s=e.slice(t,t+i),o=s.toUpperCase();this.folded.push((0,r.gm)(o==s?s.toLowerCase():o,0)),t+=i}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(0==this.pattern.length)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:i,precise:s,byWord:o}=this;if(1==t.length){let i=(0,r.gm)(e,0),s=(0,r.nZ)(i),o=s==e.length?0:-100;if(i==t[0]);else{if(i!=n[0])return null;o+=-200}return this.ret(o,[0,s])}let l=e.indexOf(this.pattern);if(0==l)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let a=t.length,h=0;if(l<0){for(let s=0,o=Math.min(e.length,200);s<o&&h<a;){let o=(0,r.gm)(e,s);(o==t[h]||o==n[h])&&(i[h++]=s),s+=(0,r.nZ)(o)}if(h<a)return null}let c=0,u=0,f=!1,d=0,p=-1,m=-1,g=/[a-z]/.test(e),y=!0;for(let i=0,h=Math.min(e.length,200),v=0;i<h&&u<a;){let h=(0,r.gm)(e,i);l<0&&(c<a&&h==t[c]&&(s[c++]=i),d<a&&(h==t[d]||h==n[d]?(0==d&&(p=i),m=i+1,d++):d=0));let x,w=h<255?h>=48&&h<=57||h>=97&&h<=122?2:h>=65&&h<=90?1:0:(x=(0,r.bg)(h))!=x.toLowerCase()?1:x!=x.toUpperCase()?2:0;(!i||1==w&&g||0==v&&0!=w)&&(t[u]==h||n[u]==h&&(f=!0)?o[u++]=i:o.length&&(y=!1)),v=w,i+=(0,r.nZ)(h)}return u==a&&0==o[0]&&y?this.result(-100+(f?-200:0),o,e):d==a&&0==p?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):d==a?this.ret(-900-e.length,[p,m]):u==a?this.result(-100+(f?-200:0)+-700+(y?0:-1100),o,e):2==t.length?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,n){let i=[],s=0;for(let e of t){let t=e+(this.astral?(0,r.nZ)((0,r.gm)(n,e)):1);s&&i[s-1]==e?i[s-1]=t:(i[s++]=e,i[s++]=t)}return this.ret(e-n.length,i)}}class x{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return null==n?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}}let w=r.r$.define({combine:e=>(0,r.BO)(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:k,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>b(e(n),t(n)),optionClass:(e,t)=>n=>b(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})});function b(e,t){return e?t?e+" "+t:e:t}function k(e,t,n,r,s,o){let l=e.textDirection==i.Direction.RTL,a=l,h=!1,c="top",u,f,d=t.left-s.left,p=s.right-t.right,m=r.right-r.left,g=r.bottom-r.top;if(a&&d<Math.min(m,p)?a=!1:!a&&p<Math.min(m,d)&&(a=!0),m<=(a?d:p))u=Math.max(s.top,Math.min(n.top,s.bottom-g))-t.top,f=Math.min(400,a?d:p);else{h=!0,f=Math.min(400,(l?t.right:s.right-t.left)-30);let e=s.bottom-t.bottom;e>=g||e>t.top?u=n.bottom-t.top:(c="bottom",u=t.bottom-n.top)}let y=(t.bottom-t.top)/o.offsetHeight,v=(t.right-t.left)/o.offsetWidth;return{style:`${c}: ${u/y}px; max-width: ${f/v}px`,class:"cm-completionInfo-"+(h?l?"left-narrow":"right-narrow":a?"left":"right")}}let S=r.Py.define();function C(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.floor((e-t)/n);return{from:e-(r+1)*n,to:e-r*n}}class A{constructor(e,t,n){let r;this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:s,selected:o}=i.open,l=e.state.facet(w);this.optionContent=(r=l.addToOptions.slice(),l.icons&&r.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>"cm-completionIcon-"+e)),t.setAttribute("aria-hidden","true"),t},position:20}),r.push({render(e,t,n,r){let i=document.createElement("span");i.className="cm-completionLabel";let s=e.displayLabel||e.label,o=0;for(let e=0;e<r.length;){let t=r[e++],n=r[e++];t>o&&i.appendChild(document.createTextNode(s.slice(o,t)));let l=i.appendChild(document.createElement("span"));l.appendChild(document.createTextNode(s.slice(t,n))),l.className="cm-completionMatchedText",o=n}return o<s.length&&i.appendChild(document.createTextNode(s.slice(o))),i},position:50},{render(e){if(!e.detail)return null;let t=document.createElement("span");return t.className="cm-completionDetail",t.textContent=e.detail,t},position:80}),r.sort((e,t)=>e.position-t.position).map(e=>e.render)),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=C(s.length,o,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",n=>{let{options:r}=e.state.field(t).open;for(let t=n.target,i;t&&t!=this.dom;t=t.parentNode)if("LI"==t.nodeName&&(i=/-(\d+)$/.exec(t.id))&&+i[1]<r.length){this.applyCompletion(e,r[+i[1]]),n.preventDefault();return}if(n.target==this.list){let t=this.list.classList.contains("cm-completionListIncompleteTop")&&n.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains("cm-completionListIncompleteBottom")&&n.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;null!=t&&(e.dispatch({effects:S.of(t)}),n.preventDefault())}}),this.dom.addEventListener("focusout",t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(w).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:y.of(null)})}),this.showOptions(s,i.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=r){let{options:i,selected:s,disabled:o}=n.open;r.open&&r.open.options==i||(this.range=C(i.length,s,e.state.facet(w).maxRenderedOptions),this.showOptions(i,n.id)),this.updateSel(),o!=(null===(t=r.open)||void 0===t?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!o)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=C(t.options.length,t.selected,this.view.state.facet(w).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:s}=r;if(!s)return;let o="string"==typeof s?document.createTextNode(s):s(r);if(!o)return;"then"in o?o.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,r)}).catch(e=>(0,i.logException)(this.view.state,e,"completion info")):(this.addInfoPane(o,r),n.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",n.id="cm-completionInfo-"+Math.floor(65535*Math.random()).toString(16),null!=e.nodeType)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){var t,n;let r,i,s,o=null;for(let t=this.list.firstChild,n=this.range.from;t;t=t.nextSibling,n++)"LI"==t.nodeName&&t.id?n==e?t.hasAttribute("aria-selected")||(t.setAttribute("aria-selected","true"),o=t):t.hasAttribute("aria-selected")&&(t.removeAttribute("aria-selected"),t.removeAttribute("aria-describedby")):n--;return o&&(t=this.list,n=o,r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),s=r.height/t.offsetHeight,i.top<r.top?t.scrollTop-=(r.top-i.top)/s:i.bottom>r.bottom&&(t.scrollTop+=(i.bottom-r.bottom)/s)),o}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(w).positionInfo(this.view,t,r,n,i,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,n){let r=document.createElement("ul");r.id=t,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions")),r.addEventListener("mousedown",e=>{e.target==r&&e.preventDefault()});let i=null;for(let s=n.from;s<n.to;s++){let{completion:o,match:l}=e[s],{section:a}=o;if(a){let e="string"==typeof a?a:a.name;e!=i&&(s>n.from||0==n.from)&&(i=e,"string"!=typeof a&&a.header?r.appendChild(a.header(a)):r.appendChild(document.createElement("completion-section")).textContent=e)}let h=r.appendChild(document.createElement("li"));h.id=t+"-"+s,h.setAttribute("role","option");let c=this.optionClass(o);for(let e of(c&&(h.className=c),this.optionContent)){let t=e(o,this.view.state,this.view,l);t&&h.appendChild(t)}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function M(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}class T{constructor(e,t,n,r,i,s){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=s}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new T(this.options,O(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,r,i,s){if(r&&!s&&e.some(e=>e.isPending))return r.setDisabled();let o=function(e,t){let n=[],r=null,i=null,s=e=>{n.push(e);let{section:t}=e.completion;if(t){r||(r=[]);let e="string"==typeof t?t:t.name;r.some(t=>t.name==e)||r.push("string"==typeof t?{name:e}:t)}},o=t.facet(w);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(!1===r.result.filter)for(let t of r.result.options)s(new c(t,r.source,e?e(t):[],1e9-n.length));else{let n=t.sliceDoc(r.from,r.to),l,a=o.filterStrict?new x(n):new v(n);for(let t of r.result.options)if(l=a.match(t.label)){let n=t.displayLabel?e?e(t,l.matched):[]:l.matched,o=l.score+(t.boost||0);if(s(new c(t,r.source,n,o)),"object"==typeof t.section&&"dynamic"===t.section.rank){let{name:e}=t.section;i||(i=Object.create(null)),i[e]=Math.max(o,i[e]||-1e9)}}}}if(r){let e=Object.create(null),t=0;for(let n of r.sort((e,t)=>("dynamic"===e.rank&&"dynamic"===t.rank?i[t.name]-i[e.name]:0)||("number"==typeof e.rank?e.rank:1e9)-("number"==typeof t.rank?t.rank:1e9)||(e.name<t.name?-1:1)))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e["string"==typeof n?n:n.name])}}let l=[],a=null,h=o.compareCompletions;for(let e of n.sort((e,t)=>t.score-e.score||h(e.completion,t.completion))){let t=e.completion;a&&a.label==t.label&&a.detail==t.detail&&(null==a.type||null==t.type||a.type==t.type)&&a.apply==t.apply&&a.boost==t.boost?M(e.completion)>M(a)&&(l[l.length-1]=e):l.push(e),a=e.completion}return l}(e,t);if(!o.length)return r&&e.some(e=>e.isPending)?r.setDisabled():null;let l=t.facet(w).selectOnOpen?0:-1;if(r&&r.selected!=l&&-1!=r.selected){let e=r.options[r.selected].completion;for(let t=0;t<o.length;t++)if(o[t].completion==e){l=t;break}}return new T(o,O(n,l),{pos:e.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:V,above:i.aboveCursor},r?r.timestamp:Date.now(),l,!1)}map(e){return new T(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new T(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class D{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new D(P,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(w),r=(n.override||t.languageDataAt("autocomplete",u(t)).map(m)).map(t=>(this.active.find(e=>e.source==t)||new B(t,this.active.some(e=>0!=e.state)?1:0)).update(e,n));r.length==this.active.length&&r.every((e,t)=>e==this.active[t])&&(r=this.active);let i=this.open,s=e.effects.some(e=>e.is(L));for(let o of(i&&e.docChanged&&(i=i.map(e.changes)),e.selection||r.some(t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to))||!function(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;r<t.length&&!t[r].hasResult();)r++;let i=n==e.length,s=r==t.length;if(i||s)return i==s;if(e[n++].result!=t[r++].result)return!1}}(r,this.active)||s?i=T.build(r,t,this.id,i,n,s):i&&i.disabled&&!r.some(e=>e.isPending)&&(i=null),!i&&r.every(e=>!e.isPending)&&r.some(e=>e.hasResult())&&(r=r.map(e=>e.hasResult()?new B(e.source,0):e)),e.effects))o.is(S)&&(i=i&&i.setSelected(o.value,this.id));return r==this.active&&i==this.open?this:new D(r,this.id,i)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?I:E}}let I={"aria-autocomplete":"list"},E={};function O(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}let P=[];function R(e,t){if(e.isUserEvent("input.complete")){let n=e.annotation(d);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent("input.type");return n&&t.activateOnTyping?5:n?1:e.isUserEvent("delete.backward")?2:e.selection?8:e.docChanged?16:0}class B{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return 1==this.state}update(e,t){let n=R(e,t),r=this;for(let t of((8&n||16&n&&this.touches(e))&&(r=new B(r.source,0)),4&n&&0==r.state&&(r=new B(this.source,1)),r=r.updateFor(e,n),e.effects))if(t.is(g))r=new B(r.source,1,t.value);else if(t.is(y))r=new B(r.source,0);else if(t.is(L))for(let e of t.value)e.source==r.source&&(r=e);return r}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(u(e.state))}}class N extends B{constructor(e,t,n,r,i,s){super(e,3,t),this.limit=n,this.result=r,this.from=i,this.to=s}hasResult(){return!0}updateFor(e,t){var n;if(!(3&t))return this.map(e.changes);let r=this.result;r.map&&!e.changes.empty&&(r=r.map(r,e.changes));let i=e.changes.mapPos(this.from),s=e.changes.mapPos(this.to,1),l=u(e.state);if(l>s||!r||2&t&&(u(e.startState)==this.from||l<this.limit))return new B(this.source,4&t?1:0);let a=e.changes.mapPos(this.limit);return!function(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return"function"==typeof e?e(i,n,r,t):f(e,!0).test(i)}(r.validFor,e.state,i,s)?r.update&&(r=r.update(r,i,s,new o(e.state,l,!1)))?new N(this.source,this.explicit,a,r,r.from,null!==(n=r.to)&&void 0!==n?n:u(e.state)):new B(this.source,1,this.explicit):new N(this.source,this.explicit,a,r,i,s)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new N(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new B(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}let L=r.Py.define({map:(e,t)=>e.map(e=>e.map(t))}),j=r.QQ.define({create:()=>D.start(),update:(e,t)=>e.update(t),provide:e=>[i.showTooltip.from(e,e=>e.tooltip),i.EditorView.contentAttributes.from(e,e=>e.attrs)]});function J(e,t){let n=t.completion.apply||t.completion.label,i=e.state.field(j).active.find(e=>e.source==t.source);return i instanceof N&&("string"==typeof n?e.dispatch({...function(e,t,n,i){let{main:s}=e.selection,o=n-s.from,l=i-s.from;return{...e.changeByRange(a=>{if(a!=s&&n!=i&&e.sliceDoc(a.from+o,a.from+l)!=e.sliceDoc(n,i))return{range:a};let h=e.toText(t);return{changes:{from:a.from+o,to:i==s.from?a.to:a.from+l,insert:h},range:r.jT.cursor(a.from+o+h.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}(e.state,n,i.from,i.to),annotations:d.of(t.completion)}):n(e,t.completion,i.from,i.to),!0)}let V=e=>new A(e,j,J);function F(e,t="option"){return n=>{let r=n.state.field(j,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(w).interactionDelay)return!1;let s=1,o;"page"==t&&(o=(0,i.getTooltip)(n,r.open.tooltip))&&(s=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:l}=r.open.options,a=r.open.selected>-1?r.open.selected+s*(e?1:-1):e?0:l-1;return a<0?a="page"==t?0:l-1:a>=l&&(a="page"==t?l-1:0),n.dispatch({effects:S.of(a)}),!0}}let q=e=>!!e.state.field(j,!1)&&(e.dispatch({effects:g.of(!0)}),!0);class z{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}let W=i.ViewPlugin.fromClass(class{constructor(e){for(let t of(this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0,e.state.field(j).active))t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(j),n=e.state.facet(w);if(!e.selectionSet&&!e.docChanged&&e.startState.field(j)==t)return;let r=e.transactions.some(e=>{let t=R(e,n);return 8&t||(e.selection||e.docChanged)&&!(3&t)});for(let t=0;t<this.running.length;t++){let n=this.running[t];if(r||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>50&&Date.now()-n.time>1e3){for(let e of n.context.abortListeners)try{e()}catch(e){(0,i.logException)(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(g)))&&(this.pendingStart=!0);let s=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),s):-1,0!=this.composing)for(let t of e.transactions)t.isUserEvent("input.type")?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(j);for(let e of t.active)e.isPending&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(w).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=u(t),r=new o(t,n,e.explicit,this.view),s=new z(e,r);this.running.push(s),Promise.resolve(e.source(r)).then(e=>{s.context.aborted||(s.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:y.of(null)}),(0,i.logException)(this.view.state,e)})}scheduleAccept(){this.running.every(e=>void 0!==e.done)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(w).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(w),r=this.view.state.field(j);for(let i=0;i<this.running.length;i++){let s=this.running[i];if(void 0===s.done)continue;if(this.running.splice(i--,1),s.done){let r=u(s.updates.length?s.updates[0].startState:this.view.state),i=Math.min(r,s.done.from+(s.active.explicit?0:1)),o=new N(s.active.source,s.active.explicit,i,s.done,s.done.from,null!==(e=s.done.to)&&void 0!==e?e:r);for(let e of s.updates)o=o.update(e,n);if(o.hasResult()){t.push(o);continue}}let o=r.active.find(e=>e.source==s.active.source);if(o&&o.isPending){if(null==s.done){let e=new B(s.active.source,0);for(let t of s.updates)e=e.update(t,n);e.isPending||t.push(e)}else this.startQuery(o)}}(t.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:L.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(j,!1);if(t&&t.tooltip&&this.view.state.facet(w).closeOnBlur){let n=t.open&&(0,i.getTooltip)(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||setTimeout(()=>this.view.dispatch({effects:y.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout(()=>this.view.dispatch({effects:g.of(!1)}),20),this.composing=0}}}),_="object"==typeof navigator&&/Win/.test(navigator.platform),$=r.Wl.highest(i.EditorView.domEventHandlers({keydown(e,t){let n=t.state.field(j,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(_&&e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(e=>e.source==r.source),s=r.completion.commitCharacters||i.result.commitCharacters;return s&&s.indexOf(e.key)>-1&&J(t,r),!1}})),Z=i.EditorView.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xb7\xb7\xb7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'\uD835\uDC65'"}},".cm-completionIcon-constant":{"&:after":{content:"'\uD835\uDC36'"}},".cm-completionIcon-type":{"&:after":{content:"'\uD835\uDC61'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\uD83D\uDD11︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class U{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}}class H{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,r.gc.TrackDel),n=e.mapPos(this.to,1,r.gc.TrackDel);return null==t||null==n?null:new H(this.field,t,n)}}class K{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),o=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=o,l=/^\t*/.exec(i)[0].length;for(let t=0;t<l;t++)n+=e.facet(s.c);r.push(t+n.length-l),i=n+i.slice(l)}n.push(i),t+=i.length+1}return{text:n,ranges:this.fieldPositions.map(e=>new H(e.field,r[e.line]+e.from,r[e.line]+e.to))}}static parse(e){let t=[],n=[],r=[],i;for(let s of e.split(/\r\n?|\n/)){for(;i=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(s);){let e=i[1]?+i[1]:null,o=i[2]||i[3]||"",l=-1,a=o.replace(/\\[{}]/g,e=>e[1]);for(let n=0;n<t.length;n++)(null!=e?t[n].seq==e:a&&t[n].name==a)&&(l=n);if(l<0){let n=0;for(;n<t.length&&(null==e||null!=t[n].seq&&t[n].seq<e);)n++;for(let i of(t.splice(n,0,{seq:e,name:a}),l=n,r))i.field>=l&&i.field++}for(let e of r)if(e.line==n.length&&e.from>i.index){let t=i[2]?3+(i[1]||"").length:2;e.from-=t,e.to-=t}r.push(new U(l,n.length,i.index,i.index+a.length)),s=s.slice(0,i.index)+o+s.slice(i.index+i[0].length)}s=s.replace(/\\([{}])/g,(e,t,i)=>{for(let e of r)e.line==n.length&&e.from>i&&(e.from--,e.to--);return t}),n.push(s)}return new K(n,r)}}let Q=i.Decoration.widget({widget:new class extends i.WidgetType{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),G=i.Decoration.mark({class:"cm-snippetField"});class Y{constructor(e,t){this.ranges=e,this.active=t,this.deco=i.Decoration.set(e.map(e=>(e.from==e.to?Q:G).range(e.from,e.to)),!0)}map(e){let t=[];for(let n of this.ranges){let r=n.map(e);if(!r)return null;t.push(r)}return new Y(t,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}}let X=r.Py.define({map:(e,t)=>e&&e.map(t)}),ee=r.Py.define(),et=r.QQ.define({create:()=>null,update(e,t){for(let n of t.effects){if(n.is(X))return n.value;if(n.is(ee)&&e)return new Y(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>i.EditorView.decorations.from(e,e=>e?e.deco:i.Decoration.none)});function en(e,t){return r.jT.create(e.filter(e=>e.field==t).map(e=>r.jT.range(e.from,e.to)))}function er(e){return({state:t,dispatch:n})=>{let r=t.field(et,!1);if(!r||e<0&&0==r.active)return!1;let i=r.active+e,s=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:en(r.ranges,i),effects:X.of(s?null:new Y(r.ranges,i)),scrollIntoView:!0})),!0}}let ei=[{key:"Tab",run:er(1),shift:er(-1)},{key:"Escape",run:({state:e,dispatch:t})=>!!e.field(et,!1)&&(t(e.update({effects:X.of(null)})),!0)}],es=r.r$.define({combine:e=>e.length?e[0]:ei}),eo=r.Wl.highest(i.keymap.compute([es],e=>e.facet(es)));function el(e,t){let n;return{...t,apply:(n=K.parse(e),(e,t,i,s)=>{let{text:o,ranges:l}=n.instantiate(e.state,i),{main:a}=e.state.selection,h={changes:{from:i,to:s==a.from?a.to:s,insert:r.xv.of(o)},scrollIntoView:!0,annotations:t?[d.of(t),r.YW.userEvent.of("input.complete")]:void 0};if(l.length&&(h.selection=en(l,0)),l.some(e=>e.field>0)){let t=new Y(l,0),n=h.effects=[X.of(t)];void 0===e.state.field(et,!1)&&n.push(r.Py.appendConfig.of([et,eo,ea,Z]))}e.dispatch(e.state.update(h))})}}let ea=i.EditorView.domEventHandlers({mousedown(e,t){let n=t.state.field(et,!1),r;if(!n||null==(r=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;let i=n.ranges.find(e=>e.from<=r&&e.to>=r);return!!i&&i.field!=n.active&&(t.dispatch({selection:en(n.ranges,i.field),effects:X.of(n.ranges.some(e=>e.field>i.field)?new Y(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),eh={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ec=r.Py.define({map(e,t){let n=t.mapPos(e,-1,r.gc.TrackAfter);return null==n?void 0:n}}),eu=new class extends r.uU{};eu.startSide=1,eu.endSide=-1;let ef=r.QQ.define({create:()=>r.Xs.empty,update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(ec)&&(e=e.update({add:[eu.range(n.value,n.value+1)]}));return e}});function ed(){return[ev,ef]}let ep="()[]{}<>\xab\xbb\xbb\xab[]{}";function em(e){for(let t=0;t<ep.length;t+=2)if(ep.charCodeAt(t)==e)return ep.charAt(t+1);return(0,r.bg)(e<128?e:e+1)}function eg(e,t){return e.languageDataAt("closeBrackets",t)[0]||eh}let ey="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),ev=i.EditorView.inputHandler.of((e,t,n,i)=>{if((ey?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let o=e.state.selection.main;if(i.length>2||2==i.length&&1==(0,r.nZ)((0,r.gm)(i,0))||t!=o.from||n!=o.to)return!1;let l=function(e,t){let n=eg(e,e.selection.main.head),i=n.brackets||eh.brackets;for(let o of i){let l=em((0,r.gm)(o,0));if(t==o)return l==o?function(e,t,n,i){let o=i.stringPrefixes||eh.stringPrefixes,l=null,a=e.changeByRange(i=>{if(!i.empty)return{changes:[{insert:t,from:i.from},{insert:t,from:i.to}],effects:ec.of(i.to+t.length),range:r.jT.range(i.anchor+t.length,i.head+t.length)};let a=i.head,h=eb(e.doc,a),c;if(h==t){if(ek(e,a))return{changes:{insert:t+t,from:a},effects:ec.of(a+t.length),range:r.jT.cursor(a+t.length)};if(ew(e,a)){let i=n&&e.sliceDoc(a,a+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:a,to:a+i.length,insert:i},range:r.jT.cursor(a+i.length)}}}else if(n&&e.sliceDoc(a-2*t.length,a)==t+t&&(c=eS(e,a-2*t.length,o))>-1&&ek(e,c))return{changes:{insert:t+t+t+t,from:a},effects:ec.of(a+t.length),range:r.jT.cursor(a+t.length)};else if(e.charCategorizer(a)(h)!=r.D0.Word&&eS(e,a,o)>-1&&!function(e,t,n,r){let i=(0,s.qz)(e).resolveInner(t,-1),o=r.reduce((e,t)=>Math.max(e,t.length),0);for(let s=0;s<5;s++){let s=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),l=s.indexOf(n);if(!l||l>-1&&r.indexOf(s.slice(0,l))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+l;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let a=i.to==t&&i.parent;if(!a)break;i=a}return!1}(e,a,t,o))return{changes:{insert:t+t,from:a},effects:ec.of(a+t.length),range:r.jT.cursor(a+t.length)};return{range:l=i}});return l?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}(e,o,i.indexOf(o+o+o)>-1,n):function(e,t,n,i){let s=null,o=e.changeByRange(o=>{if(!o.empty)return{changes:[{insert:t,from:o.from},{insert:n,from:o.to}],effects:ec.of(o.to+t.length),range:r.jT.range(o.anchor+t.length,o.head+t.length)};let l=eb(e.doc,o.head);return!l||/\s/.test(l)||i.indexOf(l)>-1?{changes:{insert:t+n,from:o.head},effects:ec.of(o.head+t.length),range:r.jT.cursor(o.head+t.length)}:{range:s=o}});return s?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}(e,o,l,n.before||eh.before);if(t==l&&ew(e,e.selection.main.from))return function(e,t,n){let i=null,s=e.changeByRange(t=>t.empty&&eb(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:r.jT.cursor(t.head+n.length)}:i={range:t});return i?null:e.update(s,{scrollIntoView:!0,userEvent:"input.type"})}(e,0,l)}return null}(e.state,i);return!!l&&(e.dispatch(l),!0)}),ex=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=eg(e,e.selection.main.head).brackets||eh.brackets,i=null,s=e.changeByRange(t=>{if(t.empty){var s,o;let i;let l=(s=e.doc,o=t.head,i=s.sliceString(o-2,o),(0,r.nZ)((0,r.gm)(i,0))==i.length?i:i.slice(1));for(let i of n)if(i==l&&eb(e.doc,t.head)==em((0,r.gm)(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:r.jT.cursor(t.head-i.length)}}return{range:i=t}});return i||t(e.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!i}}];function ew(e,t){let n=!1;return e.field(ef).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function eb(e,t){let n=e.sliceString(t,t+2);return n.slice(0,(0,r.nZ)((0,r.gm)(n,0)))}function ek(e,t){let n=(0,s.qz)(e).resolveInner(t+1);return n.parent&&n.from==t}function eS(e,t,n){let i=e.charCategorizer(t);if(i(e.sliceDoc(t-1,t))!=r.D0.Word)return t;for(let s of n){let n=t-s.length;if(e.sliceDoc(n,t)==s&&i(e.sliceDoc(n-1,n))!=r.D0.Word)return n}return -1}function eC(e={}){return[$,j,w.of(e),W,eM,Z]}let eA=[{key:"Ctrl-Space",run:q},{mac:"Alt-`",run:q},{mac:"Alt-i",run:q},{key:"Escape",run:e=>{let t=e.state.field(j,!1);return!!(t&&t.active.some(e=>0!=e.state))&&(e.dispatch({effects:y.of(null)}),!0)}},{key:"ArrowDown",run:F(!0)},{key:"ArrowUp",run:F(!1)},{key:"PageDown",run:F(!0,"page")},{key:"PageUp",run:F(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(j,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(w).interactionDelay)&&J(e,t.open.options[t.open.selected])}}],eM=r.Wl.highest(i.keymap.computeN([w],e=>e.facet(w).defaultKeymap?[eA]:[]))},17781:function(e,t,n){"use strict";n.d(t,{Be:function(){return v},Dv:function(){return _},Gn:function(){return P},K0:function(){return O},KC:function(){return u},Qf:function(){return ef},R_:function(){return ex},SQ:function(){return f},SS:function(){return E},Um:function(){return eP},a0:function(){return eI},c:function(){return D},c6:function(){return M},e7:function(){return et},kU:function(){return c},mi:function(){return ec},n$:function(){return eD},nF:function(){return eg},nY:function(){return q},pp:function(){return h},qp:function(){return p},qz:function(){return m},ri:function(){return A},rs:function(){return z},tC:function(){return F},uj:function(){return R},vw:function(){return j},x0:function(){return W},y1:function(){return I},ze:function(){return V}});var r,i=n(26416),s=n(78775),o=n(47824),l=n(21328),a=n(69433);let h=new i.md;function c(e){return s.r$.define({combine:e?t=>t.concat(e):void 0})}let u=new i.md;class f{constructor(e,t,n=[],r=""){this.data=e,this.name=r,s.yy.prototype.hasOwnProperty("tree")||Object.defineProperty(s.yy.prototype,"tree",{get(){return m(this)}}),this.parser=t,this.extension=[C.of(this),s.yy.languageData.of((e,t,n)=>{let r=d(e,t,n),i=r.type.prop(h);if(!i)return[];let s=e.facet(i),o=r.type.prop(u);if(o){let i=r.resolve(t-r.from,n);for(let t of o)if(t.test(i,e)){let n=e.facet(t.facet);return"replace"==t.type?n:n.concat(s)}}return s})].concat(n)}isActiveAt(e,t,n=-1){return d(e,t,n).type.prop(h)==this.data}findRegions(e){let t=e.facet(C);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(h)==this.data){n.push({from:t,to:t+e.length});return}let s=e.prop(i.md.mounted);if(s){if(s.tree.prop(h)==this.data){if(s.overlay)for(let e of s.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(s.overlay){let e=n.length;if(r(s.tree,s.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let s=e.children[n];s instanceof i.mp&&r(s,e.positions[n]+t)}};return r(m(e),0),n}get allowsNesting(){return!0}}function d(e,t,n){let r=e.facet(C),s=m(e).topNode;if(!r||r.allowsNesting)for(let e=s;e;e=e.enter(t,n,i.vj.ExcludeBuffers|i.vj.EnterBracketed))e.type.isTop&&(s=e);return s}f.setState=s.Py.define();class p extends f{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){let t=c(e.languageData);return new p(t,e.parser.configure({props:[h.add(e=>e.isTop?t:void 0)]}),e.name)}configure(e,t){return new p(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function m(e){let t=e.field(f.state,!1);return t?t.tree:i.mp.empty}class g{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let y=null;class v{constructor(e,t,n=[],r,i,s,o,l){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=s,this.skipped=o,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new v(e,t,[],i.mp.empty,0,n,[],null)}startParse(){return this.parser.startParse(new g(this.state.doc),this.fragments)}work(e,t){return(null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=i.mp.empty&&this.isDone(null!=t?t:this.state.doc.length))?(this.takeTree(),!0):this.withContext(()=>{var n;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let r=this.parse.advance();if(r){if(this.fragments=this.withoutTempSkipped(i.i9.addTree(r,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(n=this.parse.stoppedAt)&&void 0!==n?n:this.state.doc.length,this.tree=r,this.parse=null,!(this.treeLen<(null!=t?t:this.state.doc.length)))return!0;this.parse=this.startParse()}if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(i.i9.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=y;y=this;try{return e()}finally{y=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=x(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:r,treeLen:s,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges((e,n,r,i)=>t.push({fromA:e,toA:n,fromB:r,toB:i})),n=i.i9.applyChanges(n,t),r=i.mp.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length)for(let t of(l=[],this.skipped)){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);n<r&&l.push({from:n,to:r})}}return new v(this.parser,t,n,r,s,o,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:r}=this.skipped[t];n<e.to&&r>e.from&&(this.fragments=x(this.fragments,n,r),this.skipped.splice(t--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends i._b{createParse(t,n,r){let s=r[0].from,o=r[r.length-1].to;return{parsedPos:s,advance(){let t=y;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=o,new i.mp(i.Jq.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return y}}function x(e,t,n){return i.i9.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class w{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new w(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=v.create(e.facet(C).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new w(n)}}f.state=s.QQ.define({create:w.init,update(e,t){for(let e of t.effects)if(e.is(f.setState))return e.value;return t.startState.facet(C)!=t.state.facet(C)?w.init(t.state):e.apply(t)}});let b=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(b=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});let k="undefined"!=typeof navigator&&(null===(r=navigator.scheduling)||void 0===r?void 0:r.isInputPending)?()=>navigator.scheduling.isInputPending():null,S=o.ViewPlugin.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(f.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(f.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=b(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:r}}=this.view,i=n.field(f.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,e&&!k?Math.max(25,e.timeRemaining()-5):1e9),o=i.context.treeLen<r&&n.doc.length>r+1e3,l=i.context.work(()=>k&&k()||Date.now()>s,r+(o?0:1e5));this.chunkBudget-=Date.now()-t,(l||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:f.setState.of(new w(i.context))})),this.chunkBudget>0&&!(l&&!o)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>(0,o.logException)(this.view.state,e)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),C=s.r$.define({combine:e=>e.length?e[0]:null,enables:e=>[f.state,S,o.EditorView.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]});class A{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}class M{constructor(e,t,n,r,i,s){this.name=e,this.alias=t,this.extensions=n,this.filename=r,this.loadFunc=i,this.support=s,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:t,support:n}=e;if(!t){if(!n)throw RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");t=()=>Promise.resolve(n)}return new M(e.name,(e.alias||[]).concat(e.name).map(e=>e.toLowerCase()),e.extensions||[],e.filename,t,n)}static matchFilename(e,t){for(let n of e)if(n.filename&&n.filename.test(t))return n;let n=/\.([^.]+)$/.exec(t);if(n){for(let t of e)if(t.extensions.indexOf(n[1])>-1)return t}return null}static matchLanguageName(e,t,n=!0){for(let n of(t=t.toLowerCase(),e))if(n.alias.some(e=>e==t))return n;if(n)for(let n of e)for(let e of n.alias){let r=t.indexOf(e);if(r>-1&&(e.length>2||!/\w/.test(t[r-1])&&!/\w/.test(t[r+e.length])))return n}return null}}let T=s.r$.define(),D=s.r$.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function I(e){let t=e.facet(D);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function E(e,t){let n="",r=e.tabSize,i=e.facet(D)[0];if(" "==i){for(;t>=r;)n+=" ",t-=r;i=" "}for(let e=0;e<t;e++)n+=i;return n}function O(e,t){for(let n of(e instanceof s.yy&&(e=new P(e)),e.state.facet(T))){let r=n(e,t);if(void 0!==r)return r}let n=m(e.state);return n.length>=t?function(e,t,n){let r=t.resolveStack(n),i=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let e=[];for(let t=i;t&&!(t.from<r.node.from||t.to>r.node.to||t.from==r.node.from&&t.type==r.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)r={node:e[t],next:r}}return B(r,e,n)}(e,n,t):null}class P{constructor(e,t={}){this.state=e,this.options=t,this.unit=I(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return null!=r&&r>=n.from&&r<=n.to?i&&r==e?{text:"",from:e}:(t<0?r<e:r<=e)?{text:n.text.slice(r-n.from),from:r}:{text:n.text.slice(0,r-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:r}=this.lineAt(e,t);return n.slice(e-r,Math.min(n.length,e+100-r))}column(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.countColumn(n,e-r),s=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return s>-1&&(i+=s-this.countColumn(n,n.search(/\S|$/))),i}countColumn(e,t=e.length){return(0,s.IS)(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.options.overrideIndentation;if(i){let e=i(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}let R=new i.md;function B(e,t,n){for(let r=e;r;r=r.next){let e=function(e){let t=e.type.prop(R);if(t)return t;let n=e.firstChild,r;if(n&&(r=n.type.prop(i.md.closedBy))){let t=e.lastChild,n=t&&r.indexOf(t.name)>-1;return e=>J(e,!0,1,void 0,n&&!(e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak)?t.from:void 0)}return null==e.parent?N:null}(r.node);if(e)return e(L.create(t,n,r))}return 0}function N(){return 0}class L extends P{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new L(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(function(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return B(this.context.next,this.base,this.pos)}}function j({closing:e,align:t=!0,units:n=1}){return r=>J(r,t,n,e)}function J(e,t,n,r,i){let s=e.textAfter,o=s.match(/^\s*/)[0].length,l=r&&s.slice(o,o+r.length)==r||i==e.pos+o,a=t?function(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,s=e.state.doc.lineAt(n.from),o=null==i||i<=s.from?s.to:Math.min(s.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped){if(i.from>=o)return null;let e=/^ */.exec(s.text.slice(n.to-s.from))[0].length;return{from:n.from,to:n.to+e}}e=i.to}}(e):null;return a?l?e.column(a.from):e.column(a.to):e.baseIndent+(l?0:e.unit*n)}let V=e=>e.baseIndent;function F({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}function q(){return s.yy.transactionFilter.of(e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:r}=e.newSelection.main,i=n.lineAt(r);if(r>i.from+200)return e;let s=n.sliceString(i.from,r);if(!t.some(e=>e.test(s)))return e;let{state:o}=e,l=-1,a=[];for(let{head:e}of o.selection.ranges){let t=o.doc.lineAt(e);if(t.from==l)continue;l=t.from;let n=O(o,t.from);if(null==n)continue;let r=/^\s*/.exec(t.text)[0],i=E(o,n);r!=i&&a.push({from:t.from,to:t.from+r.length,insert:i})}return a.length?[e,{changes:a,sequential:!0}]:e})}let z=s.r$.define(),W=new i.md;function _(e){let t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}function $(e,t,n){for(let r of e.facet(z)){let i=r(e,t,n);if(i)return i}return function(e,t,n){let r=m(e);if(r.length<n)return null;let i=r.resolveStack(n,1),s=null;for(let o=i;o;o=o.next){let i=o.node;if(i.to<=n||i.from>n)continue;if(s&&i.from<t)break;let l=i.type.prop(W);if(l&&(i.to<r.length-50||r.length==e.doc.length||!function(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}(i))){let r=l(i,e);r&&r.from<=n&&r.from>=t&&r.to>n&&(s=r)}}return s}(e,t,n)}function Z(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}let U=s.Py.define({map:Z}),H=s.Py.define({map:Z});function K(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some(e=>e.from<=n&&e.to>=n)||t.push(e.lineBlockAt(n));return t}let Q=s.QQ.define({create:()=>o.Decoration.none,update(e,t){for(let n of(t.isUserEvent("delete")&&t.changes.iterChangedRanges((t,n)=>e=G(e,t,n)),e=e.map(t.changes),t.effects))if(n.is(U)&&!function(e,t,n){let r=!1;return e.between(t,t,(e,i)=>{e==t&&i==n&&(r=!0)}),r}(e,n.value.from,n.value.to)){let{preparePlaceholder:r}=t.state.facet(er),i=r?o.Decoration.replace({widget:new el(r(t.state,n.value))}):eo;e=e.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(H)&&(e=e.update({filter:(e,t)=>n.value.from!=e||n.value.to!=t,filterFrom:n.value.from,filterTo:n.value.to}));return t.selection&&(e=G(e,t.selection.main.head)),e},provide:e=>o.EditorView.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(e,t)=>{n.push(e,t)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n<e.length;){let r=e[n++],i=e[n++];if("number"!=typeof r||"number"!=typeof i)throw RangeError("Invalid JSON for fold state");t.push(eo.range(r,i))}return o.Decoration.set(t,!0)}});function G(e,t,n=t){let r=!1;return e.between(t,n,(e,i)=>{e<n&&i>t&&(r=!0)}),r?e.update({filterFrom:t,filterTo:n,filter:(e,r)=>e>=n||r<=t}):e}function Y(e,t,n){var r;let i=null;return null===(r=e.field(Q,!1))||void 0===r||r.between(t,n,(e,t)=>{(!i||i.from>e)&&(i={from:e,to:t})}),i}function X(e,t){return e.field(Q,!1)?t:t.concat(s.Py.appendConfig.of(ei()))}function ee(e,t,n=!0){let r=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return o.EditorView.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${e.state.phrase("to")} ${i}.`)}let et=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of K(e)){let n=$(e.state,t.from,t.to);if(n)return e.dispatch({effects:X(e.state,[U.of(n),ee(e,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(Q,!1))return!1;let t=[];for(let n of K(e)){let r=Y(e.state,n.from,n.to);r&&t.push(H.of(r),ee(e,r,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,n=[];for(let r=0;r<t.doc.length;){let i=e.lineBlockAt(r),s=$(t,i.from,i.to);s&&n.push(U.of(s)),r=(s?e.lineBlockAt(s.to):i).to+1}return n.length&&e.dispatch({effects:X(e.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:e=>{let t=e.state.field(Q,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(e,t)=>{n.push(H.of({from:e,to:t}))}),e.dispatch({effects:n}),!0}}],en={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},er=s.r$.define({combine:e=>(0,s.BO)(e,en)});function ei(e){let t=[Q,eu];return e&&t.push(er.of(e)),t}function es(e,t){let{state:n}=e,r=n.facet(er),i=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=Y(e.state,n.from,n.to);r&&e.dispatch({effects:H.of(r)}),t.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(e,i,t);let s=document.createElement("span");return s.textContent=r.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=i,s}let eo=o.Decoration.replace({widget:new class extends o.WidgetType{toDOM(e){return es(e,null)}}});class el extends o.WidgetType{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return es(e,this.value)}}let ea={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class eh extends o.GutterMarker{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function ec(e={}){let t={...ea,...e},n=new eh(t,!0),r=new eh(t,!1),i=o.ViewPlugin.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(C)!=e.state.facet(C)||e.startState.field(Q,!1)!=e.state.field(Q,!1)||m(e.startState)!=m(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new s.f_;for(let i of e.viewportLineBlocks){let s=Y(e.state,i.from,i.to)?r:$(e.state,i.from,i.to)?n:null;s&&t.add(i.from,i.from,s)}return t.finish()}}),{domEventHandlers:l}=t;return[i,(0,o.gutter)({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(i))||void 0===t?void 0:t.markers)||s.Xs.empty},initialSpacer:()=>new eh(t,!1),domEventHandlers:{...l,click:(e,t,n)=>{if(l.click&&l.click(e,t,n))return!0;let r=Y(e.state,t.from,t.to);if(r)return e.dispatch({effects:H.of(r)}),!0;let i=$(e.state,t.from,t.to);return!!i&&(e.dispatch({effects:U.of(i)}),!0)}}}),ei()]}let eu=o.EditorView.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class ef{constructor(e,t){let n;function r(e){let t=a.V.newName();return(n||(n=Object.create(null)))["."+t]=e,t}this.specs=e;let i="string"==typeof t.all?t.all:t.all?r(t.all):void 0,s=t.scope;this.scope=s instanceof f?e=>e.prop(h)==s.data:s?e=>e==s:void 0,this.style=(0,l.QR)(e.map(e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))})),{all:i}).style,this.module=n?new a.V(n):null,this.themeType=t.themeType}static define(e,t){return new ef(e,t||{})}}let ed=s.r$.define(),ep=s.r$.define({combine:e=>e.length?[e[0]]:null});function em(e){let t=e.facet(ed);return t.length?t:e.facet(ep)}function eg(e,t){let n=[ev],r;return e instanceof ef&&(e.module&&n.push(o.EditorView.styleModule.of(e.module)),r=e.themeType),(null==t?void 0:t.fallback)?n.push(ep.of(e)):r?n.push(ed.computeN([o.EditorView.darkTheme],t=>t.facet(o.EditorView.darkTheme)==("dark"==r)?[e]:[])):n.push(ed.of(e)),n}class ey{constructor(e){this.markCache=Object.create(null),this.tree=m(e.state),this.decorations=this.buildDeco(e,em(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=m(e.state),n=em(e.state),r=n!=em(e.startState),{viewport:i}=e.view,s=e.changes.mapPos(this.decoratedTo,1);t.length<i.to&&!r&&t.type==this.tree.type&&s>=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=s):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=i.to)}buildDeco(e,t){if(!t||!this.tree.length)return o.Decoration.none;let n=new s.f_;for(let{from:r,to:i}of e.visibleRanges)(0,l.bW)(this.tree,t,(e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=o.Decoration.mark({class:r})))},r,i);return n.finish()}}let ev=s.Wl.high(o.ViewPlugin.fromClass(ey,{decorations:e=>e.decorations})),ex=ef.define([{tag:l.pJ.meta,color:"#404740"},{tag:l.pJ.link,textDecoration:"underline"},{tag:l.pJ.heading,textDecoration:"underline",fontWeight:"bold"},{tag:l.pJ.emphasis,fontStyle:"italic"},{tag:l.pJ.strong,fontWeight:"bold"},{tag:l.pJ.strikethrough,textDecoration:"line-through"},{tag:l.pJ.keyword,color:"#708"},{tag:[l.pJ.atom,l.pJ.bool,l.pJ.url,l.pJ.contentSeparator,l.pJ.labelName],color:"#219"},{tag:[l.pJ.literal,l.pJ.inserted],color:"#164"},{tag:[l.pJ.string,l.pJ.deleted],color:"#a11"},{tag:[l.pJ.regexp,l.pJ.escape,l.pJ.special(l.pJ.string)],color:"#e40"},{tag:l.pJ.definition(l.pJ.variableName),color:"#00f"},{tag:l.pJ.local(l.pJ.variableName),color:"#30a"},{tag:[l.pJ.typeName,l.pJ.namespace],color:"#085"},{tag:l.pJ.className,color:"#167"},{tag:[l.pJ.special(l.pJ.variableName),l.pJ.macroName],color:"#256"},{tag:l.pJ.definition(l.pJ.propertyName),color:"#00c"},{tag:l.pJ.comment,color:"#940"},{tag:l.pJ.invalid,color:"#f00"}]),ew=o.EditorView.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),eb="()[]{}",ek=s.r$.define({combine:e=>(0,s.BO)(e,{afterCursor:!0,brackets:eb,maxScanDistance:1e4,renderMatch:eA})}),eS=o.Decoration.mark({class:"cm-matchingBracket"}),eC=o.Decoration.mark({class:"cm-nonmatchingBracket"});function eA(e){let t=[],n=e.matched?eS:eC;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}function eM(e){let t=[],n=e.facet(ek);for(let r of e.selection.ranges){if(!r.empty)continue;let i=eP(e,r.head,-1,n)||r.head>0&&eP(e,r.head-1,1,n)||n.afterCursor&&(eP(e,r.head,1,n)||r.head<e.doc.length&&eP(e,r.head+1,-1,n));i&&(t=t.concat(n.renderMatch(i,e)))}return o.Decoration.set(t,!0)}let eT=[o.ViewPlugin.fromClass(class{constructor(e){this.paused=!1,this.decorations=eM(e.state)}update(e){(e.docChanged||e.selectionSet||this.paused)&&(e.view.composing?(this.decorations=this.decorations.map(e.changes),this.paused=!0):(this.decorations=eM(e.state),this.paused=!1))}},{decorations:e=>e.decorations}),ew];function eD(e={}){return[ek.of(e),eT]}let eI=new i.md;function eE(e,t,n){let r=e.prop(t<0?i.md.openedBy:i.md.closedBy);if(r)return r;if(1==e.name.length){let r=n.indexOf(e.name);if(r>-1&&r%2==(t<0?1:0))return[n[r+t]]}return null}function eO(e){let t=e.type.prop(eI);return t?t(e.node):e}function eP(e,t,n,r={}){let i=r.maxScanDistance||1e4,s=r.brackets||eb,o=m(e),l=o.resolveInner(t,n);for(let e=l;e;e=e.parent){let r=eE(e.type,n,s);if(r&&e.from<e.to){let i=eO(e);if(i&&(n>0?t>=i.from&&t<i.to:t>i.from&&t<=i.to))return function(e,t,n,r,i,s,o){let l=r.parent,a={from:i.from,to:i.to},h=0,c=null==l?void 0:l.cursor();if(c&&(n<0?c.childBefore(r.from):c.childAfter(r.to)))do if(n<0?c.to<=r.from:c.from>=r.to){if(0==h&&s.indexOf(c.type.name)>-1&&c.from<c.to){let e=eO(c);return{start:a,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}if(eE(c.type,n,o))h++;else if(eE(c.type,-n,o)){if(0==h){let e=eO(c);return{start:a,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}h--}}while(n<0?c.prevSibling():c.nextSibling());return{start:a,matched:!1}}(0,0,n,e,i,r,s)}}return function(e,t,n,r,i,s,o){let l=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),a=o.indexOf(l);if(a<0||a%2==0!=n>0)return null;let h={from:n<0?t-1:t,to:n>0?t+1:t},c=e.doc.iterRange(t,n>0?e.doc.length:0),u=0;for(let e=0;!c.next().done&&e<=s;){let s=c.value;n<0&&(e+=s.length);let l=t+e*n;for(let e=n>0?0:s.length-1,t=n>0?s.length:-1;e!=t;e+=n){let t=o.indexOf(s[e]);if(!(t<0)&&r.resolveInner(l+e,1).type==i){if(t%2==0==n>0)u++;else{if(1==u)return{start:h,end:{from:l+e,to:l+e+1},matched:t>>1==a>>1};u--}}}n>0&&(e+=s.length)}return c.done?{start:h,matched:!1}:null}(e,t,n,o,l.type,i,s)}let eR=Object.create(null),eB=[i.Jq.none],eN=[],eL=Object.create(null),ej=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])ej[e]=function(e,t){let n=[];for(let r of t.split(" ")){let t=[];for(let n of r.split(".")){let r=e[n]||l.pJ[n];r?"function"==typeof r?t.length?t=t.map(r):eJ(n,`Modifier ${n} used at start of tag`):t.length?eJ(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:eJ(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,"_"),s=r+" "+n.map(e=>e.id),o=eL[s];if(o)return o.id;let a=eL[s]=i.Jq.define({id:eB.length,name:r,props:[(0,l.Gv)({[r]:n})]});return eB.push(a),a.id}(eR,t);function eJ(e,t){eN.indexOf(e)>-1||(eN.push(e),console.warn(t))}o.Direction.RTL,o.Direction.LTR},78775:function(e,t,n){"use strict";let r;n.d(t,{q6:function(){return ec},n0:function(){return I},as:function(){return E},D0:function(){return ex},jT:function(){return J},yy:function(){return eb},r$:function(){return q},gc:function(){return D},Wl:function(){return Q},Xs:function(){return eD},f_:function(){return eI},uU:function(){return eS},Py:function(){return ed},QQ:function(){return U},xv:function(){return f},YW:function(){return ep},gm:function(){return k},nZ:function(){return C},BO:function(){return ek},IS:function(){return eF},cp:function(){return b},Gz:function(){return eq},bg:function(){return S}});let i=[],s=[];function o(e){return e>=127462&&e<=127487}function l(e,t,n){if(t==e.length)return t;t&&h(e.charCodeAt(t))&&c(e.charCodeAt(t-1))&&t--;let r=a(e,t);for(t+=u(r);t<e.length;){let l=a(e,t);if(8205==r||8205==l||n&&function(e){if(e<768)return!1;for(let t=0,n=i.length;;){let r=t+n>>1;if(e<i[r])n=r;else{if(!(e>=s[r]))return!0;t=r+1}if(t==n)return!1}}(l))t+=u(l),r=l;else if(o(l)){let n=0,r=t-2;for(;r>=0&&o(a(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function a(e,t){let n=e.charCodeAt(t);if(!c(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return h(r)?(n-55296<<10)+(r-56320)+65536:n}function h(e){return e>=56320&&e<57344}function c(e){return e>=55296&&e<56320}function u(e){return e<65536?1:2}(()=>{let e="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?s:i).push(n+=e[t])})();class f{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=w(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),p.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=w(this,e,t);let n=[];return this.decompose(e,t,n,0),p.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new g(this),i=new g(e);for(let e=t,s=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(s+=r.value.length,r.done||s>=n)return!0}}iter(e=1){return new g(this,e)}iterRange(e,t=this.length){return new y(this,e,t)}iterLines(e,t){let n;if(null==e)n=this.iter();else{null==t&&(t=this.lines+1);let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new v(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(0==e.length)throw RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new d(e):p.from(d.split(e,[])):f.empty}}class d extends f{constructor(e,t=function(e){let t=-1;for(let n of e)t+=n.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let s=this.text[i],o=r+s.length;if((t?n:o)>=e)return new x(r,o,n,s);r=o+1,n++}}decompose(e,t,n,r){let i=e<=0&&t>=this.length?this:new d(m(this.text,[""],e,t),Math.min(t,this.length)-Math.max(0,e));if(1&r){let e=n.pop(),t=m(i.text,e.text.slice(),0,i.length);if(t.length<=32)n.push(new d(t,e.length+i.length));else{let e=t.length>>1;n.push(new d(t.slice(0,e)),new d(t.slice(e)))}}else n.push(i)}replace(e,t,n){if(!(n instanceof d))return super.replace(e,t,n);[e,t]=w(this,e,t);let r=m(this.text,m(n.text,m(this.text,[""],0,e)),t),i=this.length+n.length-(t-e);return r.length<=32?new d(r,i):p.from(d.split(r,[]),i)}sliceString(e,t=this.length,n="\n"){[e,t]=w(this,e,t);let r="";for(let i=0,s=0;i<=t&&s<this.text.length;s++){let o=this.text[s],l=i+o.length;i>e&&s&&(r+=n),e<l&&t>i&&(r+=o.slice(Math.max(0,e-i),t-i)),i=l+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],r=-1;for(let i of e)n.push(i),r+=i.length+1,32==n.length&&(t.push(new d(n,r)),n=[],r=-1);return r>-1&&t.push(new d(n,r)),t}}class p extends f{constructor(e,t){for(let n of(super(),this.children=e,this.length=t,this.lines=0,e))this.lines+=n.lines}lineInner(e,t,n,r){for(let i=0;;i++){let s=this.children[i],o=r+s.length,l=n+s.lines-1;if((t?l:o)>=e)return s.lineInner(e,t,n,r);r=o+1,n=l+1}}decompose(e,t,n,r){for(let i=0,s=0;s<=t&&i<this.children.length;i++){let o=this.children[i],l=s+o.length;if(e<=l&&t>=s){let i=r&((s<=e?1:0)|(l>=t?2:0));s>=e&&l<=t&&!i?n.push(o):o.decompose(e-s,t-s,n,i)}s=l+1}}replace(e,t,n){if([e,t]=w(this,e,t),n.lines<this.lines)for(let r=0,i=0;r<this.children.length;r++){let s=this.children[r],o=i+s.length;if(e>=i&&t<=o){let l=s.replace(e-i,t-i,n),a=this.lines-s.lines+l.lines;if(l.lines<a>>4&&l.lines>a>>6){let i=this.children.slice();return i[r]=l,new p(i,this.length-(t-e)+n.length)}return super.replace(i,o,l)}i=o+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n="\n"){[e,t]=w(this,e,t);let r="";for(let i=0,s=0;i<this.children.length&&s<=t;i++){let o=this.children[i],l=s+o.length;s>e&&i&&(r+=n),e<l&&t>s&&(r+=o.sliceString(e-s,t-s,n)),s=l+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof p))return 0;let n=0,[r,i,s,o]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,i+=t){if(r==s||i==o)return n;let l=this.children[r],a=e.children[i];if(l!=a)return n+l.scanIdentical(a,t);n+=l.length+1}}static from(e,t=e.reduce((e,t)=>e+t.length+1,-1)){let n=0;for(let t of e)n+=t.lines;if(n<32){let n=[];for(let t of e)t.flatten(n);return new d(n,t)}let r=Math.max(32,n>>5),i=r<<1,s=r>>1,o=[],l=0,a=-1,h=[];function c(){0!=l&&(o.push(1==h.length?h[0]:p.from(h,a)),a=-1,l=h.length=0)}for(let t of e)!function e(t){let n;if(t.lines>i&&t instanceof p)for(let n of t.children)e(n);else t.lines>s&&(l>s||!l)?(c(),o.push(t)):t instanceof d&&l&&(n=h[h.length-1])instanceof d&&t.lines+n.lines<=32?(l+=t.lines,a+=t.length+1,h[h.length-1]=new d(n.text.concat(t.text),n.length+1+t.length)):(l+t.lines>r&&c(),l+=t.lines,a+=t.length+1,h.push(t))}(t);return c(),1==o.length?o[0]:new p(o,t)}}function m(e,t,n=0,r=1e9){for(let i=0,s=0,o=!0;s<e.length&&i<=r;s++){let l=e[s],a=i+l.length;a>=n&&(a>r&&(l=l.slice(0,r-i)),i<n&&(l=l.slice(n-i)),o?(t[t.length-1]+=l,o=!1):t.push(l)),i=a+1}return t}f.empty=new d([""],0);class g{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof d?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],s=i>>1,o=r instanceof d?r.text.length:r.children.length;if(s==(t>0?o:0)){if(0==n)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&i)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(r instanceof d){let i=r.text[s+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=0==e?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[s+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof d?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class y{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new g(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class v{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(f.prototype[Symbol.iterator]=function(){return this.iter()},g.prototype[Symbol.iterator]=y.prototype[Symbol.iterator]=v.prototype[Symbol.iterator]=function(){return this});class x{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}}function w(e,t,n){return[t=Math.max(0,Math.min(e.length,t)),Math.max(t,Math.min(e.length,n))]}function b(e,t,n=!0,r=!0){return function(e,t,n=!0,r=!0){return(n?l:function(e,t,n){for(;t>0;){let r=l(e,t-2,n);if(r<t)return r;t--}return 0})(e,t,r)}(e,t,n,r)}function k(e,t){let n=e.charCodeAt(t);if(!(n>=55296&&n<56320)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return r>=56320&&r<57344?(n-55296<<10)+(r-56320)+65536:n}function S(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(((e-=65536)>>10)+55296,(1023&e)+56320)}function C(e){return e<65536?1:2}let A=/\r\n?|\n/;var M,T,D=((M=D||(D={}))[M.Simple=0]="Simple",M[M.TrackDel=1]="TrackDel",M[M.TrackBefore=2]="TrackBefore",M[M.TrackAfter=3]="TrackAfter",M);class I{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];s<0?(e(n,r,i),r+=i):r+=s,n+=i}}iterChangedRanges(e,t=!1){R(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];r<0?e.push(n,r):e.push(r,n)}return new I(e)}composeDesc(e){return this.empty?e:e.empty?this:N(this,e)}mapDesc(e,t=!1){return e.empty?this:B(this,e,t)}mapPos(e,t=-1,n=D.Simple){let r=0,i=0;for(let s=0;s<this.sections.length;){let o=this.sections[s++],l=this.sections[s++],a=r+o;if(l<0){if(a>e)return i+(e-r);i+=o}else{if(n!=D.Simple&&a>=e&&(n==D.TrackDel&&r<e&&a>e||n==D.TrackBefore&&r<e||n==D.TrackAfter&&a>e))return null;if(a>e||a==e&&t<0&&!o)return e==r||t<0?i:i+l;i+=l}r=a}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=this.sections[n++],s=this.sections[n++],o=r+i;if(s>=0&&r<=t&&o>=e)return!(r<e)||!(o>t)||"cover";r=o}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+n+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(e=>"number"!=typeof e))throw RangeError("Invalid JSON representation of ChangeDesc");return new I(e)}static create(e){return new I(e)}}class E extends I{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError("Applying change set to a document with the wrong length");return R(this,(t,n,r,i,s)=>e=e.replace(r,r+(n-t),s),!1),e}mapDesc(e,t=!1){return B(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let r=0,i=0;r<t.length;r+=2){let s=t[r],o=t[r+1];if(o>=0){t[r]=o,t[r+1]=s;let l=r>>1;for(;n.length<l;)n.push(f.empty);n.push(s?e.slice(i,i+s):f.empty)}i+=s}return new E(t,n)}compose(e){return this.empty?e:e.empty?this:N(this,e,!0)}map(e,t=!1){return e.empty?this:B(this,e,t,!0)}iterChanges(e,t=!1){R(this,e,t)}get desc(){return I.create(this.sections)}filter(e){let t=[],n=[],r=[],i=new L(this);e:for(let s=0,o=0;;){let l=s==e.length?1e9:e[s++];for(;o<l||o==l&&0==i.len;){if(i.done)break e;let e=Math.min(i.len,l-o);O(r,e,-1);let s=-1==i.ins?-1:0==i.off?i.ins:0;O(t,e,s),s>0&&P(n,t,i.text),i.forward(e),o+=e}let a=e[s++];for(;o<a;){if(i.done)break e;let e=Math.min(i.len,a-o);O(t,e,-1),O(r,e,-1==i.ins?-1:0==i.off?i.ins:0),i.forward(e),o+=e}}return{changes:new E(t,n),filtered:I.create(r)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):0==r?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let r=[],i=[],s=0,o=null;function l(e=!1){if(!e&&!r.length)return;s<t&&O(r,t-s,-1);let n=new E(r,i);o=o?o.compose(n.map(o)):n,r=[],i=[],s=0}return!function e(a){if(Array.isArray(a))for(let t of a)e(t);else if(a instanceof E){if(a.length!=t)throw RangeError(`Mismatched change set length (got ${a.length}, expected ${t})`);l(),o=o?o.compose(a.map(o)):a}else{let{from:e,to:o=e,insert:h}=a;if(e>o||e<0||o>t)throw RangeError(`Invalid change range ${e} to ${o} (in doc of length ${t})`);let c=h?"string"==typeof h?f.of(h.split(n||A)):h:f.empty,u=c.length;if(e==o&&0==u)return;e<s&&l(),e>s&&O(r,e-s,-1),O(r,o-e,u),P(i,r,c),s=o}}(e),l(!o),o}static empty(e){return new E(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let r=0;r<e.length;r++){let i=e[r];if("number"==typeof i)t.push(i,-1);else if(!Array.isArray(i)||"number"!=typeof i[0]||i.some((e,t)=>t&&"string"!=typeof e))throw RangeError("Invalid JSON representation of ChangeSet");else if(1==i.length)t.push(i[0],0);else{for(;n.length<r;)n.push(f.empty);n[r]=f.of(i.slice(1)),t.push(i[0],n[r].length)}}return new E(t,n)}static createSet(e,t){return new E(e,t)}}function O(e,t,n,r=!1){if(0==t&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&0==t&&0==e[i]?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function P(e,t,n){if(0==n.length)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(f.empty);e.push(n)}}function R(e,t,n){let r=e.inserted;for(let i=0,s=0,o=0;o<e.sections.length;){let l=e.sections[o++],a=e.sections[o++];if(a<0)i+=l,s+=l;else{let h=i,c=s,u=f.empty;for(;h+=l,c+=a,a&&r&&(u=u.append(r[o-2>>1])),!n&&o!=e.sections.length&&!(e.sections[o+1]<0);)l=e.sections[o++],a=e.sections[o++];t(i,h,s,c,u),i=h,s=c}}}function B(e,t,n,r=!1){let i=[],s=r?[]:null,o=new L(e),l=new L(t);for(let e=-1;;){if(o.done&&l.len||l.done&&o.len)throw Error("Mismatched change set lengths");if(-1==o.ins&&-1==l.ins){let e=Math.min(o.len,l.len);O(i,e,-1),o.forward(e),l.forward(e)}else if(l.ins>=0&&(o.ins<0||e==o.i||0==o.off&&(l.len<o.len||l.len==o.len&&!n))){let t=l.len;for(O(i,l.ins,-1);t;){let n=Math.min(o.len,t);o.ins>=0&&e<o.i&&o.len<=n&&(O(i,0,o.ins),s&&P(s,i,o.text),e=o.i),o.forward(n),t-=n}l.next()}else if(o.ins>=0){let t=0,n=o.len;for(;n;)if(-1==l.ins){let e=Math.min(n,l.len);t+=e,n-=e,l.forward(e)}else if(0==l.ins&&l.len<n)n-=l.len,l.next();else break;O(i,t,e<o.i?o.ins:0),s&&e<o.i&&P(s,i,o.text),e=o.i,o.forward(o.len-n)}else if(o.done&&l.done)return s?E.createSet(i,s):I.create(i);else throw Error("Mismatched change set lengths")}}function N(e,t,n=!1){let r=[],i=n?[]:null,s=new L(e),o=new L(t);for(let e=!1;;){if(s.done&&o.done)return i?E.createSet(r,i):I.create(r);if(0==s.ins)O(r,s.len,0,e),s.next();else if(0!=o.len||o.done){if(s.done||o.done)throw Error("Mismatched change set lengths");{let t=Math.min(s.len2,o.len),n=r.length;if(-1==s.ins){let n=-1==o.ins?-1:o.off?0:o.ins;O(r,t,n,e),i&&n&&P(i,r,o.text)}else -1==o.ins?(O(r,s.off?0:s.len,t,e),i&&P(i,r,s.textBit(t))):(O(r,s.off?0:s.len,o.off?0:o.ins,e),i&&!o.off&&P(i,r,o.text));e=(s.ins>t||o.ins>=0&&o.len>t)&&(e||r.length>n),s.forward2(t),o.forward(t)}}else O(r,0,o.ins,e),i&&P(i,r,o.text),o.next()}}class L{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return -2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?f.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?f.empty:t[n].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class j{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let e=7&this.flags;return 7==e?null:e}get goalColumn(){let e=this.flags>>6;return 16777215==e?void 0:e}map(e,t=-1){let n,r;return this.empty?n=r=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),n==this.from&&r==this.to?this:new j(n,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return J.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return J.range(this.anchor,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw RangeError("Invalid JSON representation for SelectionRange");return J.range(e.anchor,e.head)}static create(e,t,n){return new j(e,t,n)}}class J{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:J.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new J([this.main],0)}addRange(e,t=!0){return J.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,J.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw RangeError("Invalid JSON representation for EditorSelection");return new J(e.ranges.map(e=>j.fromJSON(e)),e.main)}static single(e,t=e){return new J([J.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw RangeError("A selection needs at least one range");for(let n=0,r=0;r<e.length;r++){let i=e[r];if(i.empty?i.from<=n:i.from<n)return J.normalized(e.slice(),t);n=i.to}return new J(e,t)}static cursor(e,t=0,n,r){return j.create(e,e,(0==t?0:t<0?8:16)|(null==n?7:Math.min(6,n))|(null!=r?r:16777215)<<6)}static range(e,t,n,r){let i=(null!=n?n:16777215)<<6|(null==r?7:Math.min(6,r));return t<e?j.create(t,e,48|i):j.create(e,t,(t>e?8:0)|i)}static normalized(e,t=0){let n=e[t];e.sort((e,t)=>e.from-t.from),t=e.indexOf(n);for(let n=1;n<e.length;n++){let r=e[n],i=e[n-1];if(r.empty?r.from<=i.to:r.from<i.to){let s=i.from,o=Math.max(r.to,i.to);n<=t&&t--,e.splice(--n,2,r.anchor>r.head?J.range(o,s):J.range(s,o))}}return new J(e,t)}}function V(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError("Selection points outside of document")}let F=0;class q{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=F++,this.default=e([]),this.extensions="function"==typeof i?i(this):i}get reader(){return this}static define(e={}){return new q(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:z),!!e.static,e.enables)}of(e){return new W([],this,0,e)}compute(e,t){if(this.isStatic)throw Error("Can't compute a static facet");return new W(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error("Can't compute a static facet");return new W(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],n=>t(n.field(e)))}}function z(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}class W{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=F++}dynamicSlot(e){var t;let n=this.value,r=this.facet.compareInput,i=this.id,s=e[i]>>1,o=2==this.type,l=!1,a=!1,h=[];for(let n of this.dependencies)"doc"==n?l=!0:"selection"==n?a=!0:((null!==(t=e[n.id])&&void 0!==t?t:1)&1)==0&&h.push(e[n.id]);return{create:e=>(e.values[s]=n(e),1),update(e,t){if(l&&t.docChanged||a&&(t.docChanged||t.selection)||$(e,h)){let t=n(e);if(o?!_(t,e.values[s],r):!r(t,e.values[s]))return e.values[s]=t,1}return 0},reconfigure:(e,t)=>{let l,a=t.config.address[i];if(null!=a){let i=en(t,a);if(this.dependencies.every(n=>n instanceof q?t.facet(n)===e.facet(n):!(n instanceof U)||t.field(n,!1)==e.field(n,!1))||(o?_(l=n(e),i,r):r(l=n(e),i)))return e.values[s]=i,0}else l=n(e);return e.values[s]=l,1}}}}function _(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function $(e,t){let n=!1;for(let r of t)1&et(e,r)&&(n=!0);return n}let Z=q.define({static:!0});class U{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(e){let t=new U(F++,e.create,e.update,e.compare||((e,t)=>e===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Z).find(e=>e.field==this);return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>{let r=e.facet(Z),i=n.facet(Z),s;return(s=r.find(e=>e.field==this))&&s!=i.find(e=>e.field==this)?(e.values[t]=s.create(e),1):null!=n.config.address[this.id]?(e.values[t]=n.field(this),0):(e.values[t]=this.create(e),1)}}}init(e){return[this,Z.of({field:this,create:e})]}get extension(){return this}}let H={lowest:4,low:3,default:2,high:1,highest:0};function K(e){return t=>new G(t,e)}let Q={highest:K(H.highest),high:K(H.high),default:K(H.default),low:K(H.low),lowest:K(H.lowest)};class G{constructor(e,t){this.inner=e,this.prec=t}}class Y{of(e){return new X(this,e)}reconfigure(e){return Y.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class X{constructor(e,t){this.compartment=e,this.inner=t}}class ee{constructor(e,t,n,r,i,s){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return null==t?e.default:this.staticValues[t>>1]}static resolve(e,t,n){let r,i,s=[],o=Object.create(null),l=new Map;for(let n of(r=[[],[],[],[],[]],i=new Map,!function e(n,s){let o=i.get(n);if(null!=o){if(o<=s)return;let e=r[o].indexOf(n);e>-1&&r[o].splice(e,1),n instanceof X&&l.delete(n.compartment)}if(i.set(n,s),Array.isArray(n))for(let t of n)e(t,s);else if(n instanceof X){if(l.has(n.compartment))throw RangeError("Duplicate use of compartment in extensions");let r=t.get(n.compartment)||n.inner;l.set(n.compartment,r),e(r,s)}else if(n instanceof G)e(n.inner,n.prec);else if(n instanceof U)r[s].push(n),n.provides&&e(n.provides,s);else if(n instanceof W)r[s].push(n),n.facet.extensions&&e(n.facet.extensions,H.default);else{let t=n.extension;if(!t)throw Error(`Unrecognized extension value in extension set (${n}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);e(t,s)}}(e,H.default),r.reduce((e,t)=>e.concat(t))))n instanceof U?s.push(n):(o[n.facet.id]||(o[n.facet.id]=[])).push(n);let a=Object.create(null),h=[],c=[];for(let e of s)a[e.id]=c.length<<1,c.push(t=>e.slot(t));let u=null==n?void 0:n.config.facets;for(let e in o){let t=o[e],r=t[0].facet,i=u&&u[e]||[];if(t.every(e=>0==e.type)){if(a[r.id]=h.length<<1|1,z(i,t))h.push(n.facet(r));else{let e=r.combine(t.map(e=>e.value));h.push(n&&r.compare(e,n.facet(r))?n.facet(r):e)}}else{for(let e of t)0==e.type?(a[e.id]=h.length<<1|1,h.push(e.value)):(a[e.id]=c.length<<1,c.push(t=>e.dynamicSlot(t)));a[r.id]=c.length<<1,c.push(e=>(function(e,t,n){let r=n.map(t=>e[t.id]),i=n.map(e=>e.type),s=r.filter(e=>!(1&e)),o=e[t.id]>>1;function l(e){let n=[];for(let t=0;t<r.length;t++){let s=en(e,r[t]);if(2==i[t])for(let e of s)n.push(e);else n.push(s)}return t.combine(n)}return{create(e){for(let t of r)et(e,t);return e.values[o]=l(e),1},update(e,n){if(!$(e,s))return 0;let r=l(e);return t.compare(r,e.values[o])?0:(e.values[o]=r,1)},reconfigure(e,i){let s=$(e,r),a=i.config.facets[t.id],h=i.facet(t);if(a&&!s&&z(n,a))return e.values[o]=h,0;let c=l(e);return t.compare(c,h)?(e.values[o]=h,0):(e.values[o]=c,1)}}})(e,r,t))}}return new ee(e,l,c.map(e=>e(a)),a,h,o)}}function et(e,t){if(1&t)return 2;let n=t>>1,r=e.status[n];if(4==r)throw Error("Cyclic dependency between fields and/or facets");if(2&r)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function en(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}let er=q.define(),ei=q.define({combine:e=>e.some(e=>e),static:!0}),es=q.define({combine:e=>e.length?e[0]:void 0,static:!0}),eo=q.define(),el=q.define(),ea=q.define(),eh=q.define({combine:e=>!!e.length&&e[0]});class ec{constructor(e,t){this.type=e,this.value=t}static define(){return new eu}}class eu{of(e){return new ec(this,e)}}class ef{constructor(e){this.map=e}of(e){return new ed(this,e)}}class ed{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new ed(this.type,t)}is(e){return this.type==e}static define(e={}){return new ef(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}}ed.reconfigure=ed.define(),ed.appendConfig=ed.define();class ep{constructor(e,t,n,r,i,s){this.startState=e,this.changes=t,this.selection=n,this.effects=r,this.annotations=i,this.scrollIntoView=s,this._doc=null,this._state=null,n&&V(n,t.newLength),i.some(e=>e.type==ep.time)||(this.annotations=i.concat(ep.time.of(Date.now())))}static create(e,t,n,r,i,s){return new ep(e,t,n,r,i,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(ep.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function em(e,t,n){var r;let i,s,o;return n?(i=t.changes,s=E.empty(t.changes.length),o=e.changes.compose(t.changes)):(i=t.changes.map(e.changes),s=e.changes.mapDesc(t.changes,!0),o=e.changes.compose(i)),{changes:o,selection:t.selection?t.selection.map(s):null===(r=e.selection)||void 0===r?void 0:r.map(i),effects:ed.mapEffects(e.effects,i).concat(ed.mapEffects(t.effects,s)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function eg(e,t,n){let r=t.selection,i=ev(t.annotations);return t.userEvent&&(i=i.concat(ep.userEvent.of(t.userEvent))),{changes:t.changes instanceof E?t.changes:E.of(t.changes||[],n,e.facet(es)),selection:r&&(r instanceof J?r:J.single(r.anchor,r.head)),effects:ev(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}ep.time=ec.define(),ep.userEvent=ec.define(),ep.addToHistory=ec.define(),ep.remote=ec.define();let ey=[];function ev(e){return null==e?ey:Array.isArray(e)?e:[e]}var ex=((T=ex||(ex={}))[T.Word=0]="Word",T[T.Space=1]="Space",T[T.Other=2]="Other",T);let ew=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{r=RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}class eb{constructor(e,t,n,r,i,s){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,s&&(s._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)et(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(null==n){if(t)throw RangeError("Field is not present in this state");return}return et(this,n),en(this,n)}update(...e){return function e(t,n,r){let i=eg(t,n.length?n[0]:{},t.doc.length);n.length&&!1===n[0].filter&&(r=!1);for(let e=1;e<n.length;e++){!1===n[e].filter&&(r=!1);let s=!!n[e].sequential;i=em(i,eg(t,n[e],s?i.changes.newLength:t.doc.length),s)}let s=ep.create(t,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return function(e){let t=e.startState,n=t.facet(ea),r=e;for(let i=n.length-1;i>=0;i--){let s=n[i](e);s&&Object.keys(s).length&&(r=em(r,eg(t,s,e.changes.newLength),!0))}return r==e?e:ep.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}(r?function(t){let n=t.startState,r=!0;for(let e of n.facet(eo)){let n=e(t);if(!1===n){r=!1;break}Array.isArray(n)&&(r=!0===r?n:function(e,t){let n=[];for(let r=0,i=0;;){let s,o;if(r<e.length&&(i==t.length||t[i]>=e[r]))s=e[r++],o=e[r++];else{if(!(i<t.length))return n;s=t[i++],o=t[i++]}!n.length||n[n.length-1]<s?n.push(s,o):n[n.length-1]<o&&(n[n.length-1]=o)}}(r,n))}if(!0!==r){let e,i;if(!1===r)i=t.changes.invertedDesc,e=E.empty(n.doc.length);else{let n=t.changes.filter(r);e=n.changes,i=n.filtered.mapDesc(n.changes).invertedDesc}t=ep.create(n,e,t.selection&&t.selection.map(i),ed.mapEffects(t.effects,i),t.annotations,t.scrollIntoView)}let i=n.facet(el);for(let r=i.length-1;r>=0;r--){let s=i[r](t);t=s instanceof ep?s:Array.isArray(s)&&1==s.length&&s[0]instanceof ep?s[0]:e(n,ev(s),!1)}return t}(s):s)}(this,e,!0)}applyTransaction(e){let t,n=this.config,{base:r,compartments:i}=n;for(let t of e.effects)t.is(Y.reconfigure)?(n&&(i=new Map,n.compartments.forEach((e,t)=>i.set(t,e)),n=null),i.set(t.value.compartment,t.value.extension)):t.is(ed.reconfigure)?(n=null,r=t.value):t.is(ed.appendConfig)&&(n=null,r=ev(r).concat(t.value));t=n?e.startState.values.slice():new eb(n=ee.resolve(r,i,this),this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values;let s=e.startState.facet(ei)?e.newSelection:e.newSelection.asSingle();new eb(n,e.newDoc,s,t,(t,n)=>n.update(t,e),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:J.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],s=ev(n.effects);for(let n=1;n<t.ranges.length;n++){let o=e(t.ranges[n]),l=this.changes(o.changes),a=l.map(r);for(let e=0;e<n;e++)i[e]=i[e].map(a);let h=r.mapDesc(l,!0);i.push(o.range.map(h)),r=r.compose(a),s=ed.mapEffects(s,a).concat(ed.mapEffects(ev(o.effects),h))}return{changes:r,selection:J.create(i,t.mainIndex),effects:s}}changes(e=[]){return e instanceof E?e:E.of(e,this.doc.length,this.facet(eb.lineSeparator))}toText(e){return f.of(e.split(this.facet(eb.lineSeparator)||A))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return null==t?e.default:(et(this,t),en(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof U&&null!=this.config.address[r.id]&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e,t={},n){if(!e||"string"!=typeof e.doc)throw RangeError("Invalid JSON representation for EditorState");let r=[];if(n){for(let t in n)if(Object.prototype.hasOwnProperty.call(e,t)){let i=n[t],s=e[t];r.push(i.init(e=>i.spec.fromJSON(s,e)))}}return eb.create({doc:e.doc,selection:J.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=ee.resolve(e.extensions||[],new Map),n=e.doc instanceof f?e.doc:f.of((e.doc||"").split(t.staticFacet(eb.lineSeparator)||A)),r=e.selection?e.selection instanceof J?e.selection:J.single(e.selection.anchor,e.selection.head):J.single(0);return V(r,n.length),t.staticFacet(ei)||(r=r.asSingle()),new eb(t,n,r,t.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(eb.tabSize)}get lineBreak(){return this.facet(eb.lineSeparator)||"\n"}get readOnly(){return this.facet(eh)}phrase(e,...t){for(let t of this.facet(eb.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(e,n)=>{if("$"==n)return"$";let r=+(n||1);return!r||r>t.length?e:t[r-1]})),e}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(er))for(let s of i(this,t,n))Object.prototype.hasOwnProperty.call(s,e)&&r.push(s[e]);return r}charCategorizer(e){var t;let n=this.languageDataAt("wordChars",e);return t=n.length?n[0]:"",e=>{if(!/\S/.test(e))return ex.Space;if(function(e){if(r)return r.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>"\x80"&&(n.toUpperCase()!=n.toLowerCase()||ew.test(n)))return!0}return!1}(e))return ex.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return ex.Word;return ex.Other}}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),s=e-n,o=e-n;for(;s>0;){let e=b(t,s,!1);if(i(t.slice(e,s))!=ex.Word)break;s=e}for(;o<r;){let e=b(t,o);if(i(t.slice(o,e))!=ex.Word)break;o=e}return s==o?null:J.range(s+n,o+n)}}function ek(e,t,n={}){let r={};for(let t of e)for(let e of Object.keys(t)){let i=t[e],s=r[e];if(void 0===s)r[e]=i;else if(s===i||void 0===i);else if(Object.hasOwnProperty.call(n,e))r[e]=n[e](s,i);else throw Error("Config merge conflict for field "+e)}for(let e in t)void 0===r[e]&&(r[e]=t[e]);return r}eb.allowMultipleSelections=ei,eb.tabSize=q.define({combine:e=>e.length?e[0]:4}),eb.lineSeparator=es,eb.readOnly=eh,eb.phrases=q.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),eb.languageData=er,eb.changeFilter=eo,eb.transactionFilter=el,eb.transactionExtender=ea,Y.reconfigure=ed.define();class eS{eq(e){return this==e}range(e,t=e){return eA.create(e,t,this)}}function eC(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}eS.prototype.startSide=eS.prototype.endSide=0,eS.prototype.point=!1,eS.prototype.mapMode=D.TrackDel;class eA{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new eA(e,t,n)}}function eM(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class eT{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let s=r,o=i.length;;){if(s==o)return s;let r=s+o>>1,l=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==s)return l>=0?s:o;l>=0?o=r:s=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),s=this.findIndex(n,1e9,!1,i);i<s;i++)if(!1===r(this.from[i]+e,this.to[i]+e,this.value[i]))return!1}map(e,t){let n=[],r=[],i=[],s=-1,o=-1;for(let l=0;l<this.value.length;l++){let a=this.value[l],h=this.from[l]+e,c=this.to[l]+e,u,f;if(h==c){let e=t.mapPos(h,a.startSide,a.mapMode);if(null==e||(u=f=e,a.startSide!=a.endSide&&(f=t.mapPos(h,a.endSide))<u))continue}else if((u=t.mapPos(h,a.startSide))>(f=t.mapPos(c,a.endSide))||u==f&&a.startSide>0&&a.endSide<=0)continue;0>(f-u||a.endSide-a.startSide)||(s<0&&(s=u),a.point&&(o=Math.max(o,f-u)),n.push(a),r.push(u-s),i.push(f-s))}return{mapped:n.length?new eT(r,i,n,o):null,pos:s}}}class eD{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(e,t,n,r){return new eD(e,t,n,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:r=0,filterTo:i=this.length}=e,s=e.filter;if(0==t.length&&!s)return this;if(n&&(t=t.slice().sort(eM)),this.isEmpty)return t.length?eD.of(t):this;let o=new eO(this,null,-1).goto(0),l=0,a=[],h=new eI;for(;o.value||l<t.length;)if(l<t.length&&(o.from-t[l].from||o.startSide-t[l].value.startSide)>=0){let e=t[l++];h.addInner(e.from,e.to,e.value)||a.push(e)}else 1==o.rangeIndex&&o.chunkIndex<this.chunk.length&&(l==t.length||this.chunkEnd(o.chunkIndex)<t[l].from)&&(!s||r>this.chunkEnd(o.chunkIndex)||i<this.chunkPos[o.chunkIndex])&&h.addChunk(this.chunkPos[o.chunkIndex],this.chunk[o.chunkIndex])?o.nextChunk():((!s||r>o.to||i<o.from||s(o.from,o.to,o.value))&&!h.addInner(o.from,o.to,o.value)&&a.push(eA.create(o.from,o.to,o.value)),o.next());return h.finishInner(this.nextLayer.isEmpty&&!a.length?eD.empty:this.nextLayer.update({add:a,filter:s,filterFrom:r,filterTo:i}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],r=-1;for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],o=this.chunk[i],l=e.touchesRange(s,s+o.length);if(!1===l)r=Math.max(r,o.maxPoint),t.push(o),n.push(e.mapPos(s));else if(!0===l){let{mapped:i,pos:l}=o.map(s,e);i&&(r=Math.max(r,i.maxPoint),t.push(i),n.push(l))}}let i=this.nextLayer.map(e);return 0==t.length?i:new eD(n,t,i||eD.empty,r)}between(e,t,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],s=this.chunk[r];if(t>=i&&e<=i+s.length&&!1===s.between(i,e-i,t-i,n))return}this.nextLayer.between(e,t,n)}}iter(e=0){return eP.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return eP.from(e).goto(t)}static compare(e,t,n,r,i=-1){let s=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),o=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),l=eE(s,o,n),a=new eB(s,l,i),h=new eB(o,l,i);n.iterGaps((e,t,n)=>eN(a,e,h,t,n,r)),n.empty&&0==n.length&&eN(a,0,h,0,0,r)}static eq(e,t,n=0,r){null==r&&(r=999999999);let i=e.filter(e=>!e.isEmpty&&0>t.indexOf(e)),s=t.filter(t=>!t.isEmpty&&0>e.indexOf(t));if(i.length!=s.length)return!1;if(!i.length)return!0;let o=eE(i,s),l=new eB(i,o,0).goto(n),a=new eB(s,o,0).goto(n);for(;;){if(l.to!=a.to||!eL(l.active,a.active)||l.point&&(!a.point||!eC(l.point,a.point)))return!1;if(l.to>r)return!0;l.next(),a.next()}}static spans(e,t,n,r,i=-1){let s=new eB(e,null,i).goto(t),o=t,l=s.openStart;for(;;){let e=Math.min(s.to,n);if(s.point){let n=s.activeForPoint(s.to),i=s.pointFrom<t?n.length+1:s.point.startSide<0?n.length:Math.min(n.length,l);r.point(o,e,s.point,n,i,s.pointRank),l=Math.min(s.openEnd(e),n.length)}else e>o&&(r.span(o,e,s.active,l),l=s.openEnd(e));if(s.to>n)return l+(s.point&&s.to>n?1:0);o=s.to,s.next()}}static of(e,t=!1){let n=new eI;for(let r of e instanceof eA?[e]:t?function(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(eM(t,r)>0)return e.slice().sort(eM);t=r}return e}(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(e){if(!e.length)return eD.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let r=e[n];r!=eD.empty;r=r.nextLayer)t=new eD(r.chunkPos,r.chunk,t,Math.max(r.maxPoint,t.maxPoint));return t}}eD.empty=new eD([],[],null,-1),eD.empty.nextLayer=eD.empty;class eI{finishChunk(e){this.chunks.push(new eT(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new eI)).add(e,t,n)}addInner(e,t,n){let r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&0>(e-this.lastFrom||n.startSide-this.last.startSide))throw Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if(0>(e-this.lastTo||t.value[0].startSide-this.last.endSide))return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(eD.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=eD.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function eE(e,t,n){let r=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&r.set(t.chunk[e],t.chunkPos[e]);let i=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let s=r.get(e.chunk[t]);null==s||(n?n.mapPos(s):s)!=e.chunkPos[t]||(null==n?void 0:n.touchesRange(s,s+e.chunk[t].length))||i.add(e.chunk[t])}return i}class eO{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){0>(this.to-e||this.endSide-t)&&this.gotoInner(e,t,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class eP{constructor(e){this.heap=e}static from(e,t=null,n=-1){let r=[];for(let i=0;i<e.length;i++)for(let s=e[i];!s.isEmpty;s=s.nextLayer)s.maxPoint>=n&&r.push(new eO(s,t,n,i));return 1==r.length?r[0]:new eP(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)eR(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)eR(this.heap,e);0>(this.to-e||this.value.endSide-t)&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),eR(this.heap,0)}}}function eR(e,t){for(let n=e[t];;){let r=(t<<1)+1;if(r>=e.length)break;let i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),0>n.compare(i))break;e[r]=n,e[t]=i,t=r}}class eB{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=eP.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&0>(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t);)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){ej(this.active,e),ej(this.activeTo,e),ej(this.activeRank,e),this.minActive=eV(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t<this.activeRank.length&&(i-this.activeRank[t]||r-this.activeTo[t])>0;)t++;eJ(this.active,t,n),eJ(this.activeTo,t,r),eJ(this.activeRank,t,i),e&&eJ(e,t,this.cursor.from),this.minActive=eV(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&0>(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&ej(n,r)}else if(this.cursor.value){if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let e=this.cursor.value;if(e.point){if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else this.addActive(n),this.cursor.next()}}else{this.to=this.endSide=1e9;break}}if(n){this.openStart=0;for(let t=n.length-1;t>=0&&n[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function eN(e,t,n,r,i,s){e.goto(t),n.goto(r);let o=r+i,l=r,a=r-t,h=!!s.boundChange;for(let t=!1;;){let r=e.to+a-n.to,i=r||e.endSide-n.endSide,c=i<0?e.to+a:n.to,u=Math.min(c,o);if(e.point||n.point?(e.point&&n.point&&eC(e.point,n.point)&&eL(e.activeForPoint(e.to),n.activeForPoint(n.to))||s.comparePoint(l,u,e.point,n.point),t=!1):(t&&s.boundChange(l),u>l&&!eL(e.active,n.active)&&s.compareRange(l,u,e.active,n.active),h&&u<o&&(r||e.openEnd(c)!=n.openEnd(c))&&(t=!0)),c>o)break;l=c,i<=0&&e.next(),i>=0&&n.next()}}function eL(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!eC(e[n],t[n]))return!1;return!0}function ej(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function eJ(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function eV(e,t){let n=-1,r=1e9;for(let i=0;i<t.length;i++)0>(t[i]-r||e[i].endSide-e[n].endSide)&&(n=i,r=t[i]);return n}function eF(e,t,n=e.length){let r=0;for(let i=0;i<n&&i<e.length;)9==e.charCodeAt(i)?(r+=t-r%t,i++):(r++,i=b(e,i));return r}function eq(e,t,n,r){for(let r=0,i=0;;){if(i>=t)return r;if(r==e.length)break;i+=9==e.charCodeAt(r)?n-i%n:1,r=b(e,r)}return!0===r?-1:e.length}},64880:function(e,t,n){"use strict";n.r(t),n.d(t,{color:function(){return k},oneDark:function(){return A},oneDarkHighlightStyle:function(){return C},oneDarkTheme:function(){return S}});var r=n(47824),i=n(17781),s=n(21328);let o="#e5c07b",l="#e06c75",a="#56b6c2",h="#ffffff",c="#abb2bf",u="#7d8799",f="#61afef",d="#98c379",p="#d19a66",m="#c678dd",g="#21252b",y="#2c313a",v="#282c34",x="#353a42",w="#3E4451",b="#528bff",k={chalky:o,coral:l,cyan:a,invalid:h,ivory:c,stone:u,malibu:f,sage:d,whiskey:p,violet:m,darkBackground:g,highlightBackground:y,background:v,tooltipBackground:x,selection:w,cursor:b},S=r.EditorView.theme({"&":{color:c,backgroundColor:v},".cm-content":{caretColor:b},".cm-cursor, .cm-dropCursor":{borderLeftColor:b},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:w},".cm-panels":{backgroundColor:g,color:c},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:v,color:u,border:"none"},".cm-activeLineGutter":{backgroundColor:y},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:x},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:x,borderBottomColor:x},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:y,color:c}}},{dark:!0}),C=i.Qf.define([{tag:s.pJ.keyword,color:m},{tag:[s.pJ.name,s.pJ.deleted,s.pJ.character,s.pJ.propertyName,s.pJ.macroName],color:l},{tag:[s.pJ.function(s.pJ.variableName),s.pJ.labelName],color:f},{tag:[s.pJ.color,s.pJ.constant(s.pJ.name),s.pJ.standard(s.pJ.name)],color:p},{tag:[s.pJ.definition(s.pJ.name),s.pJ.separator],color:c},{tag:[s.pJ.typeName,s.pJ.className,s.pJ.number,s.pJ.changed,s.pJ.annotation,s.pJ.modifier,s.pJ.self,s.pJ.namespace],color:o},{tag:[s.pJ.operator,s.pJ.operatorKeyword,s.pJ.url,s.pJ.escape,s.pJ.regexp,s.pJ.link,s.pJ.special(s.pJ.string)],color:a},{tag:[s.pJ.meta,s.pJ.comment],color:u},{tag:s.pJ.strong,fontWeight:"bold"},{tag:s.pJ.emphasis,fontStyle:"italic"},{tag:s.pJ.strikethrough,textDecoration:"line-through"},{tag:s.pJ.link,color:u,textDecoration:"underline"},{tag:s.pJ.heading,fontWeight:"bold",color:l},{tag:[s.pJ.atom,s.pJ.bool,s.pJ.special(s.pJ.variableName)],color:p},{tag:[s.pJ.processingInstruction,s.pJ.string,s.pJ.inserted],color:d},{tag:s.pJ.invalid,color:h}]),A=[S,(0,i.nF)(C)]},26416:function(e,t,n){"use strict";var r,i;n.d(t,{FE:function(){return j},Jq:function(){return u},L3:function(){return s},Lj:function(){return f},_b:function(){return N},hr:function(){return R},i9:function(){return B},md:function(){return a},mp:function(){return m},vj:function(){return r}});let s=1024,o=0;class l{constructor(e,t){this.from=e,this.to=t}}class a{constructor(e={}){this.id=o++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=u.match(e)),t=>{let n=e(t);return void 0===n?null:[this,n]}}}a.closedBy=new a({deserialize:e=>e.split(" ")}),a.openedBy=new a({deserialize:e=>e.split(" ")}),a.group=new a({deserialize:e=>e.split(" ")}),a.isolate=new a({deserialize:e=>{if(e&&"rtl"!=e&&"ltr"!=e&&"auto"!=e)throw RangeError("Invalid value for isolate: "+e);return e||"auto"}}),a.contextHash=new a({perNode:!0}),a.lookAhead=new a({perNode:!0}),a.mounted=new a({perNode:!0});class h{constructor(e,t,n,r=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=r}static get(e){return e&&e.props&&e.props[a.mounted.id]}}let c=Object.create(null);class u{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):c,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),r=new u(e.name||"",t,e.id,n);if(e.props){for(let n of e.props)if(Array.isArray(n)||(n=n(r)),n){if(n[0].perNode)throw RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(a.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(" "))t[r]=e[n];return e=>{for(let n=e.prop(a.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}}u.none=new u("",Object.create(null),0,8);class f{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let n of this.types){let r=null;for(let t of e){let e=t(n);if(e){r||(r=Object.assign({},n.props));let t=e[1],i=e[0];i.combine&&i.id in r&&(t=i.combine(r[i.id],t)),r[i.id]=t}}t.push(r?new u(n.name,r,n.id,n.flags):n)}return new f(t)}}let d=new WeakMap,p=new WeakMap;(i=r||(r={}))[i.ExcludeBuffers=1]="ExcludeBuffers",i[i.IncludeAnonymous=2]="IncludeAnonymous",i[i.IgnoreMounts=4]="IgnoreMounts",i[i.IgnoreOverlays=8]="IgnoreOverlays",i[i.EnterBracketed=16]="EnterBracketed";class m{constructor(e,t,n,r,i){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,i&&i.length)for(let[e,t]of(this.props=Object.create(null),i))this.props["number"==typeof e?e:e.id]=t}toString(){let e=h.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let e of this.children){let n=e.toString();n&&(t&&(t+=","),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new D(this.topNode,e)}cursorAt(e,t=0,n=0){let r=new D(d.get(this)||this.topNode);return r.moveTo(e,t),d.set(this,r._tree),r}get topNode(){return new b(this,0,0,null)}resolve(e,t=0){let n=x(d.get(this)||this.topNode,e,t,!1);return d.set(this,n),n}resolveInner(e,t=0){let n=x(p.get(this)||this.topNode,e,t,!0);return p.set(this,n),n}resolveStack(e,t=0){return function(e,t,n){let r=e.resolveInner(t,n),i=null;for(let e=r instanceof b?r:r.context.parent;e;e=e.parent)if(e.index<0){let s=e.parent;(i||(i=[r])).push(s.resolve(t,n)),e=s}else{let s=h.get(e.tree);if(s&&s.overlay&&s.overlay[0].from<=t&&s.overlay[s.overlay.length-1].to>=t){let o=new b(s.tree,s.overlay[0].from+e.from,-1,e);(i||(i=[r])).push(x(o,t,n,!1))}}return i?M(i):r}(this,e,t)}iterate(e){let{enter:t,leave:n,from:i=0,to:s=this.length}=e,o=e.mode||0,l=(o&r.IncludeAnonymous)>0;for(let e=this.cursor(o|r.IncludeAnonymous);;){let r=!1;if(e.from<=s&&e.to>=i&&(!l&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;r=!0}for(;r&&n&&(l||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;r=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:P(u.none,this.children,this.positions,0,this.children.length,0,this.length,(e,t,n)=>new m(this.type,e,t,n,this.propValues),e.makeTree||((e,t,n)=>new m(u.none,e,t,n)))}static build(e){return function(e){var t;let{buffer:n,nodeSet:r,maxBufferLength:i=s,reused:o=[],minRepeatType:l=r.types.length}=e,h=Array.isArray(n)?new g(n,n.length):n,c=r.types,u=0,f=0;function d(e,t,n,i,s,o,l,a,h){let c=[],u=[];for(;e.length>i;)c.push(e.pop()),u.push(t.pop()+n-s);e.push(p(r.types[l],c,u,o-s,a-o,h)),t.push(s-n)}function p(e,t,n,r,i,s,o){if(s){let e=[a.contextHash,s];o=o?[e].concat(o):[e]}if(i>25){let e=[a.lookAhead,i];o=o?[e].concat(o):[e]}return new m(e,t,n,r,o)}let v=[],x=[];for(;h.pos>0;)!function e(t,n,s,g,v,x){let{id:w,start:b,end:k,size:S}=h,C=f,A=u;if(S<0){if(h.next(),-1==S){let e=o[w];s.push(e),g.push(b-t);return}if(-3==S){u=w;return}if(-4==S){f=w;return}throw RangeError(`Unrecognized record size: ${S}`)}let M=c[w],T,D,I=b-t;if(k-b<=i&&(D=function(e,t){let n=h.fork(),r=0,s=0,o=0,a=n.end-i,c={size:0,start:0,skip:0};t:for(let i=n.pos-e;n.pos>i;){let e=n.size;if(n.id==t&&e>=0){c.size=r,c.start=s,c.skip=o,o+=4,r+=4,n.next();continue}let h=n.pos-e;if(e<0||h<i||n.start<a)break;let u=n.id>=l?4:0,f=n.start;for(n.next();n.pos>h;){if(n.size<0){if(-3==n.size||-4==n.size)u+=4;else break t}else n.id>=l&&(u+=4);n.next()}s=f,r+=e,o+=u}return(t<0||r==e)&&(c.size=r,c.start=s,c.skip=o),c.size>4?c:void 0}(h.pos-n,v))){let e=new Uint16Array(D.size-D.skip),n=h.pos-D.size,i=e.length;for(;h.pos>n;)i=function e(t,n,r){let{id:i,start:s,end:o,size:a}=h;if(h.next(),a>=0&&i<l){let l=r;if(a>4){let i=h.pos-(a-4);for(;h.pos>i;)r=e(t,n,r)}n[--r]=l,n[--r]=o-t,n[--r]=s-t,n[--r]=i}else -3==a?u=i:-4==a&&(f=i);return r}(D.start,e,i);T=new y(e,k-D.start,r),I=D.start-t}else{let t=h.pos-S;h.next();let n=[],s=[],o=w>=l?w:-1,c=0,u=k;for(;h.pos>t;)o>=0&&h.id==o&&h.size>=0?(h.end<=u-i&&(d(n,s,b,c,h.end,u,o,C,A),c=n.length,u=h.end),h.next()):x>2500?function(e,t,n,s){let o=[],l=0,a=-1;for(;h.pos>t;){let{id:e,start:t,end:n,size:r}=h;if(r>4)h.next();else if(a>-1&&t<a)break;else a<0&&(a=n-i),o.push(e,t,n),l++,h.next()}if(l){let t=new Uint16Array(4*l),i=o[o.length-2];for(let e=o.length-3,n=0;e>=0;e-=3)t[n++]=o[e],t[n++]=o[e+1]-i,t[n++]=o[e+2]-i,t[n++]=n;n.push(new y(t,o[2]-i,r)),s.push(i-e)}}(b,t,n,s):e(b,t,n,s,o,x+1);if(o>=0&&c>0&&c<n.length&&d(n,s,b,c,b,u,o,C,A),n.reverse(),s.reverse(),o>-1&&c>0){let e=function(e,t){return(n,r,i)=>{let s=0,o=n.length-1,l,h;if(o>=0&&(l=n[o])instanceof m){if(!o&&l.type==e&&l.length==i)return l;(h=l.prop(a.lookAhead))&&(s=r[o]+l.length+h)}return p(e,n,r,i,s,t)}}(M,A);T=P(M,n,s,0,n.length,0,k-b,e,e)}else T=p(M,n,s,k-b,C-k,A)}s.push(T),g.push(I)}(e.start||0,e.bufferStart||0,v,x,-1,0);let w=null!==(t=e.length)&&void 0!==t?t:v.length?x[0]+v[0].length:0;return new m(c[e.topID],v.reverse(),x.reverse(),w)}(e)}}m.empty=new m(u.none,[],[],0);class g{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new g(this.buffer,this.index)}}class y{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return u.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),n==(e+=4))return i;let s=[];for(;e<n;)s.push(this.childString(e)),e=this.buffer[e+3];return i+"("+s.join(",")+")"}findChild(e,t,n,r,i){let{buffer:s}=this,o=-1;for(let l=e;l!=t&&(!v(i,r,s[l+1],s[l+2])||(o=l,!(n>0)));l=s[l+3]);return o}slice(e,t,n){let r=this.buffer,i=new Uint16Array(t-e),s=0;for(let o=e,l=0;o<t;){i[l++]=r[o++],i[l++]=r[o++]-n;let t=i[l++]=r[o++]-n;i[l++]=r[o++]-e,s=Math.max(s,t)}return new y(i,s,this.set)}}function v(e,t,n,r){switch(e){case -2:return n<t;case -1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function x(e,t,n,i){for(var s;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!i&&e instanceof b&&e.index<0?null:e.parent;if(!t)return e;e=t}let o=i?0:r.IgnoreOverlays;if(i)for(let r=e,i=r.parent;i;i=(r=i).parent)r instanceof b&&r.index<0&&(null===(s=i.enter(t,n,o))||void 0===s?void 0:s.from)!=r.from&&(e=i);for(;;){let r=e.enter(t,n,o);if(!r)return e;e=r}}class w{cursor(e=0){return new D(this,e)}getChild(e,t=null,n=null){let r=k(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return k(this,e,t,n)}resolve(e,t=0){return x(this,e,t,!1)}resolveInner(e,t=0){return x(this,e,t,!0)}matchContext(e){return S(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}}class b extends w{constructor(e,t,n,r){super(),this._tree=e,this.from=t,this.index=n,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,i,s=0){for(let o=this;;){for(let{children:l,positions:a}=o._tree,c=t>0?l.length:-1;e!=c;e+=t){let c=l[e],u=a[e]+o.from,f;if(s&r.EnterBracketed&&c instanceof m&&(f=h.get(c))&&!f.overlay&&f.bracketed&&n>=u&&n<=u+c.length||v(i,n,u,u+c.length)){if(c instanceof y){if(s&r.ExcludeBuffers)continue;let l=c.findChild(0,c.buffer.length,t,n-u,i);if(l>-1)return new A(new C(o,c,e,u),null,l)}else if(s&r.IncludeAnonymous||!c.type.isAnonymous||I(c)){let l;if(!(s&r.IgnoreMounts)&&(l=h.get(c))&&!l.overlay)return new b(l.tree,u,e,o);let a=new b(c,u,e,o);return s&r.IncludeAnonymous||!a.type.isAnonymous?a:a.nextChild(t<0?c.children.length-1:0,t,n,i,s)}}}if(s&r.IncludeAnonymous||!o.type.isAnonymous||(e=o.index>=0?o.index+t:t<0?-1:o._parent._tree.children.length,!(o=o._parent)))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,t,n=0){let i;if(!(n&r.IgnoreOverlays)&&(i=h.get(this._tree))&&i.overlay){let s=e-this.from,o=n&r.EnterBracketed&&i.bracketed;for(let{from:e,to:n}of i.overlay)if((t>0||o?e<=s:e<s)&&(t<0||o?n>=s:n>s))return new b(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function k(e,t,n,r){let i=e.cursor(),s=[];if(!i.firstChild())return s;if(null!=n){for(let e=!1;!e;)if(e=i.type.is(n),!i.nextSibling())return s}for(;;){if(null!=r&&i.type.is(r))return s;if(i.type.is(t)&&s.push(i.node),!i.nextSibling())return null==r?s:[]}}function S(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}class C{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}}class A extends w{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,n);return i<0?null:new A(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,t,n=0){if(n&r.ExcludeBuffers)return null;let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new A(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new A(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new A(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let s=n.buffer[this.index+1];e.push(n.slice(r,i,s)),t.push(0)}return new m(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function M(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;r<e.length;r++){let i=e[r];(i.from>n.from||i.to<n.to)&&(n=i,t=r)}let r=n instanceof b&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new T(i,n)}class T{constructor(e,t){this.heads=e,this.node=t}get next(){return M(this.heads)}}class D{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~r.EnterBracketed,e instanceof b)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return!!e&&(e instanceof b?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return!(i<0)&&(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?!(n&r.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&r.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&r.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(i.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=i)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let i=t+e,s=e<0?-1:n._tree.children.length;i!=s;i+=e){let e=n._tree.children[i];if(this.mode&r.IncludeAnonymous||e instanceof y||!e.type.isAnonymous||I(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)t:for(let r=this.index,i=this.stack.length;i>=0;){for(let s=e;s;s=s._parent)if(s.index==r){if(r==this.index)return s;t=s,n=i+1;break t}r=this.stack[--i]}for(let e=n;e<this.stack.length;e++)t=new A(this.buffer,t,this.stack[e]);return this.bufferNode=new A(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||!1!==e(this)){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return S(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return S(this._tree,e,r);let s=n[t.buffer[this.stack[i]]];if(!s.isAnonymous){if(e[r]&&e[r]!=s.name)return!1;r--}}return!0}}function I(e){return e.children.some(e=>e instanceof y||!e.type.isAnonymous||I(e))}let E=new WeakMap;function O(e,t){if(!e.isAnonymous||t instanceof y||t.type!=e)return 1;let n=E.get(t);if(null==n){for(let r of(n=1,t.children)){if(r.type!=e||!(r instanceof m)){n=1;break}n+=O(e,r)}E.set(t,n)}return n}function P(e,t,n,r,i,s,o,l,a){let h=0;for(let n=r;n<i;n++)h+=O(e,t[n]);let c=Math.ceil(1.5*h/8),u=[],f=[];return!function t(n,r,i,o,l){for(let h=i;h<o;){let i=h,d=r[h],p=O(e,n[h]);for(h++;h<o;h++){let t=O(e,n[h]);if(p+t>=c)break;p+=t}if(h==i+1){if(p>c){let e=n[i];t(e.children,e.positions,0,e.children.length,r[i]+l);continue}u.push(n[i])}else{let t=r[h-1]+n[h-1].length-d;u.push(P(e,n,r,i,h,d,t,null,a))}f.push(d+l-s)}}(t,n,r,i,0),(l||a)(u,f,o)}class R{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof A?this.setBuffer(e.context.buffer,e.index,t):e instanceof b&&this.map.set(e.tree,t)}get(e){return e instanceof A?this.getBuffer(e.context.buffer,e.index):e instanceof b?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class B{constructor(e,t,n,r,i=!1,s=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=(i?1:0)|(s?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],n=!1){let r=[new B(0,e.length,e,0,!1,n)];for(let n of t)n.to>e.length&&r.push(n);return r}static applyChanges(e,t,n=128){if(!t.length)return e;let r=[],i=1,s=e.length?e[0]:null;for(let o=0,l=0,a=0;;o++){let h=o<t.length?t[o]:null,c=h?h.fromA:1e9;if(c-l>=n)for(;s&&s.from<c;){let t=s;if(l>=t.from||c<=t.to||a){let e=Math.max(t.from,l)-a,n=Math.min(t.to,c)-a;t=e>=n?null:new B(e,n,t.tree,t.offset+a,o>0,!!h)}if(t&&r.push(t),s.to>c)break;s=i<e.length?e[i++]:null}if(!h)break;l=h.toA,a=h.toA-h.toB}return r}}class N{startParse(e,t,n){return"string"==typeof e&&(e=new L(e)),n=n?n.length?n.map(e=>new l(e.from,e.to)):[new l(0,0)]:[new l(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}}class L{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function j(e){return(t,n,r,i)=>new z(t,e,n,r,i)}class J{constructor(e,t,n,r,i,s){this.parser=e,this.parse=t,this.overlay=n,this.bracketed=r,this.target=i,this.from=s}}function V(e){if(!e.length||e.some(e=>e.from>=e.to))throw RangeError("Invalid inner parse ranges given: "+JSON.stringify(e))}class F{constructor(e,t,n,r,i,s,o,l){this.parser=e,this.predicate=t,this.mounts=n,this.index=r,this.start=i,this.bracketed=s,this.target=o,this.prev=l,this.depth=0,this.ranges=[]}}let q=new a({perNode:!0});class z{constructor(e,t,n,r,i){this.nest=t,this.input=n,this.fragments=r,this.ranges=i,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let e=this.baseParse.advance();if(!e)return null;if(this.baseParse=null,this.baseTree=e,this.startInner(),null!=this.stoppedAt)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let e=this.baseTree;return null!=this.stoppedAt&&(e=new m(e.type,e.children,e.positions,e.length,e.propValues.concat([[q,this.stoppedAt]]))),e}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[a.mounted.id]=new h(t,e.overlay,e.parser,e.bracketed),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new $(this.fragments),t=null,n=null,i=new D(new b(this.baseTree,this.ranges[0].from,0,null),r.IncludeAnonymous|r.IgnoreMounts);t:for(let r,s;;){let o=!0,a;if(null!=this.stoppedAt&&i.from>=this.stoppedAt)o=!1;else if(e.hasNode(i)){if(t){let e=t.mounts.find(e=>e.frag.from<=i.from&&e.frag.to>=i.to&&e.mount.overlay);if(e)for(let n of e.mount.overlay){let r=n.from+e.pos,s=n.to+e.pos;r>=i.from&&s<=i.to&&!t.ranges.some(e=>e.from<s&&e.to>r)&&t.ranges.push({from:r,to:s})}}o=!1}else if(n&&(s=function(e,t,n){for(let r of e){if(r.from>=n)break;if(r.to>t)return r.from<=t&&r.to>=n?2:1}return 0}(n.ranges,i.from,i.to)))o=2!=s;else if(!i.type.isAnonymous&&(r=this.nest(i,this.input))&&(i.from<i.to||!r.overlay)){!i.tree&&(function(e){let{node:t}=e,n=[],r=t.context.buffer;do n.push(e.index),e.parent();while(!e.tree);let i=e.tree,s=i.children.indexOf(r),o=i.children[s],l=o.buffer,a=[s];for(let r of(i.children[s]=function e(r,i,s,h,c,u){let f=n[u],d=[],p=[];W(o,r,f,d,p,h);let g=l[f+1],y=l[f+2];a.push(d.length);let v=u?e(f+4,l[f+3],o.set.types[l[f]],g,y-g,u-1):t.toTree();return d.push(v),p.push(g-h),W(o,l[f+3],i,d,p,h),new m(s,d,p,c)}(0,l.length,u.none,0,o.length,n.length-1),a)){let t=e.tree.children[r],n=e.tree.positions[r];e.yield(new b(t,n+e.from,r,e._tree))}}(i),t&&t.depth++,n&&n.depth++);let s=e.findMounts(i.from,r.parser);if("function"==typeof r.overlay)t=new F(r.parser,r.overlay,s,this.inner.length,i.from,!!r.bracketed,i.tree,t);else{let e=Z(this.ranges,r.overlay||(i.from<i.to?[new l(i.from,i.to)]:[]));e.length&&V(e),(e.length||!r.overlay)&&this.inner.push(new J(r.parser,e.length?r.parser.startParse(this.input,U(s,e),e):r.parser.startParse(""),r.overlay?r.overlay.map(e=>new l(e.from-i.from,e.to-i.from)):null,!!r.bracketed,i.tree,e.length?e[0].from:i.from)),r.overlay?e.length&&(n={ranges:e,depth:0,prev:n}):o=!1}}else if(t&&(a=t.predicate(i))&&(!0===a&&(a=new l(i.from,i.to)),a.from<a.to)){let e=t.ranges.length-1;e>=0&&t.ranges[e].to==a.from?t.ranges[e]={from:t.ranges[e].from,to:a.to}:t.ranges.push(a)}if(o&&i.firstChild())t&&t.depth++,n&&n.depth++;else for(;!i.nextSibling();){if(!i.parent())break t;if(t&&!--t.depth){let e=Z(this.ranges,t.ranges);e.length&&(V(e),this.inner.splice(t.index,0,new J(t.parser,t.parser.startParse(this.input,U(t.mounts,e),e),t.ranges.map(e=>new l(e.from-t.start,e.to-t.start)),t.bracketed,t.target,e[0].from))),t=t.prev}!n||--n.depth||(n=n.prev)}}}}function W(e,t,n,r,i,s){if(t<n){let o=e.buffer[t+1];r.push(e.slice(t,n,o)),i.push(o-s)}}class _{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(r.IncludeAnonymous|r.IgnoreMounts)}moveTo(e){let{cursor:t}=this,n=e-this.offset;for(;!this.done&&t.from<n;)t.to>=e&&t.enter(n,1,r.IgnoreOverlays|r.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&0==t.positions[0]&&t.children[0]instanceof m)t=t.children[0];else break}return!1}}class ${constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let n=this.curFrag=e[0];this.curTo=null!==(t=n.tree.prop(q))&&void 0!==t?t:n.to,this.inner=new _(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(e=t.tree.prop(q))&&void 0!==e?e:t.to,this.inner=new _(t.tree,-t.offset)}}findMounts(e,t){var n;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let e=this.inner.cursor.node;e;e=e.parent){let i=null===(n=e.tree)||void 0===n?void 0:n.prop(a.mounted);if(i&&i.parser==t)for(let t=this.fragI;t<this.fragments.length;t++){let n=this.fragments[t];if(n.from>=e.to)break;n.tree==this.curFrag.tree&&r.push({frag:n,pos:e.from-n.offset,mount:i})}}}return r}}function Z(e,t){let n=null,r=t;for(let i=1,s=0;i<e.length;i++){let o=e[i-1].to,a=e[i].from;for(;s<r.length;s++){let e=r[s];if(e.from>=a)break;!(e.to<=o)&&(n||(r=n=t.slice()),e.from<o?(n[s]=new l(e.from,o),e.to>a&&n.splice(s+1,0,new l(a,e.to))):e.to>a?n[s--]=new l(a,e.to):n.splice(s--,1))}}return r}function U(e,t){let n=[];for(let{pos:r,mount:i,frag:s}of e){let e=r+(i.overlay?i.overlay[0].from:0),o=e+i.tree.length,a=Math.max(s.from,e),h=Math.min(s.to,o);if(i.overlay){let o=function(e,t,n,r){let i=0,s=0,o=!1,a=!1,h=-1e9,c=[];for(;;){let u=i==e.length?1e9:o?e[i].to:e[i].from,f=s==t.length?1e9:a?t[s].to:t[s].from;if(o!=a){let e=Math.max(h,n),t=Math.min(u,f,r);e<t&&c.push(new l(e,t))}if(1e9==(h=Math.min(u,f)))break;u==h&&(o?(o=!1,i++):o=!0),f==h&&(a?(a=!1,s++):a=!0)}return c}(t,i.overlay.map(e=>new l(e.from+r,e.to+r)),a,h);for(let t=0,r=a;;t++){let l=t==o.length,a=l?h:o[t].from;if(a>r&&n.push(new B(r,a,i.tree,-e,s.from>=r||s.openStart,s.to<=a||s.openEnd)),l)break;r=o[t].to}}else n.push(new B(a,h,i.tree,-e,s.from>=e||s.openStart,s.to<=o||s.openEnd))}return n}},21328:function(e,t,n){"use strict";n.d(t,{Gv:function(){return a},QR:function(){return u},Vp:function(){return s},bW:function(){return f},pJ:function(){return I}});var r=n(26416);let i=0;class s{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=i++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){if(e instanceof s&&(t=e),null==t?void 0:t.base)throw Error("Can not derive from a modified tag");let n=new s("string"==typeof e?e:"?",[],null,[]);if(n.set.push(n),t)for(let e of t.set)n.set.push(e);return n}static defineModifier(e){let t=new l(e);return e=>e.modified.indexOf(t)>-1?e:l.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}}let o=0;class l{constructor(e){this.name=e,this.instances=[],this.id=o++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(n=>{var r;return n.base==e&&(r=n.modified,t.length==r.length&&t.every((e,t)=>e==r[t]))});if(n)return n;let r=[],i=new s(e.name,r,e,t);for(let e of t)e.instances.push(i);let o=function(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((e,t)=>t.length-e.length)}(t);for(let t of e.set)if(!t.modified.length)for(let e of o)r.push(l.get(t,e));return i}}function a(e){let t=Object.create(null);for(let n in e){let r=e[n];for(let e of(Array.isArray(r)||(r=[r]),n.split(" ")))if(e){let n=[],i=2,s=e;for(let t=0;;){if("..."==s&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!r)throw RangeError("Invalid path: "+e);if(n.push("*"==r[0]?"":'"'==r[0][0]?JSON.parse(r[0]):r[0]),(t+=r[0].length)==e.length)break;let o=e[t++];if(t==e.length&&"!"==o){i=0;break}if("/"!=o)throw RangeError("Invalid path: "+e);s=e.slice(t)}let o=n.length-1,l=n[o];if(!l)throw RangeError("Invalid path: "+e);let a=new c(r,i,o>0?n.slice(0,o):null);t[l]=a.sort(t[l])}}return h.add(t)}let h=new r.md({combine(e,t){let n,r,i;for(;e||t;){if(!e||t&&e.depth>=t.depth?(i=t,t=t.next):(i=e,e=e.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let s=new c(i.tags,i.mode,i.context);n?n.next=s:r=s,n=s}return r}});class c{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}function u(e,t){let n=Object.create(null);for(let t of e)if(Array.isArray(t.tag))for(let e of t.tag)n[e.id]=t.class;else n[t.tag.id]=t.class;let{scope:r,all:i=null}=t||{};return{style:e=>{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+" "+r:r;break}}return t},scope:r}}function f(e,t,n,r=0,i=e.length){let s=new d(r,Array.isArray(t)?t:[t],n);s.highlightRange(e.cursor(),r,i,"",s.highlighters),s.flush(i)}c.empty=new c([],2,null);class d{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,i,s){let{type:o,from:l,to:a}=e;if(l>=n||a<=t)return;o.isTop&&(s=this.highlighters.filter(e=>!e.scope||e.scope(o)));let u=i,f=function(e){let t=e.type.prop(h);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||c.empty,d=function(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+" "+e:e)}return n}(s,f.tags);if(d&&(u&&(u+=" "),u+=d,1==f.mode&&(i+=(i?" ":"")+d)),this.startSpan(Math.max(t,l),u),f.opaque)return;let p=e.tree&&e.tree.prop(r.md.mounted);if(p&&p.overlay){let r=e.node.enter(p.overlay[0].from+l,1),o=this.highlighters.filter(e=>!e.scope||e.scope(p.tree.type)),h=e.firstChild();for(let c=0,f=l;;c++){let d=c<p.overlay.length?p.overlay[c]:null,m=d?d.from+l:a,g=Math.max(t,f),y=Math.min(n,m);if(g<y&&h)for(;e.from<y&&(this.highlightRange(e,g,y,i,s),this.startSpan(Math.min(y,e.to),u),!(e.to>=m)&&e.nextSibling()););if(!d||m>n)break;(f=d.to+l)>t&&(this.highlightRange(r.cursor(),Math.max(t,d.from+l),Math.min(n,f),"",o),this.startSpan(Math.min(n,f),u))}h&&e.parent()}else if(e.firstChild()){p&&(i="");do{if(e.to<=t)continue;if(e.from>=n)break;this.highlightRange(e,t,n,i,s),this.startSpan(Math.min(n,e.to),u)}while(e.nextSibling());e.parent()}}}let p=s.define,m=p(),g=p(),y=p(g),v=p(g),x=p(),w=p(x),b=p(x),k=p(),S=p(k),C=p(),A=p(),M=p(),T=p(M),D=p(),I={comment:m,lineComment:p(m),blockComment:p(m),docComment:p(m),name:g,variableName:p(g),typeName:y,tagName:p(y),propertyName:v,attributeName:p(v),className:p(g),labelName:p(g),namespace:p(g),macroName:p(g),literal:x,string:w,docString:p(w),character:p(w),attributeValue:p(w),number:b,integer:p(b),float:p(b),bool:p(x),regexp:p(x),escape:p(x),color:p(x),url:p(x),keyword:C,self:p(C),null:p(C),atom:p(C),unit:p(C),modifier:p(C),operatorKeyword:p(C),controlKeyword:p(C),definitionKeyword:p(C),moduleKeyword:p(C),operator:A,derefOperator:p(A),arithmeticOperator:p(A),logicOperator:p(A),bitwiseOperator:p(A),compareOperator:p(A),updateOperator:p(A),definitionOperator:p(A),typeOperator:p(A),controlOperator:p(A),punctuation:M,separator:p(M),bracket:T,angleBracket:p(T),squareBracket:p(T),paren:p(T),brace:p(T),content:k,heading:S,heading1:p(S),heading2:p(S),heading3:p(S),heading4:p(S),heading5:p(S),heading6:p(S),contentSeparator:p(k),list:p(k),quote:p(k),emphasis:p(k),strong:p(k),link:p(k),monospace:p(k),strikethrough:p(k),inserted:p(),deleted:p(),changed:p(),invalid:p(),meta:D,documentMeta:p(D),annotation:p(D),processingInstruction:p(D),definition:s.defineModifier("definition"),constant:s.defineModifier("constant"),function:s.defineModifier("function"),standard:s.defineModifier("standard"),local:s.defineModifier("local"),special:s.defineModifier("special")};for(let e in I){let t=I[e];t instanceof s&&(t.name=e)}u([{tag:I.link,class:"tok-link"},{tag:I.heading,class:"tok-heading"},{tag:I.emphasis,class:"tok-emphasis"},{tag:I.strong,class:"tok-strong"},{tag:I.keyword,class:"tok-keyword"},{tag:I.atom,class:"tok-atom"},{tag:I.bool,class:"tok-bool"},{tag:I.url,class:"tok-url"},{tag:I.labelName,class:"tok-labelName"},{tag:I.inserted,class:"tok-inserted"},{tag:I.deleted,class:"tok-deleted"},{tag:I.literal,class:"tok-literal"},{tag:I.string,class:"tok-string"},{tag:I.number,class:"tok-number"},{tag:[I.regexp,I.escape,I.special(I.string)],class:"tok-string2"},{tag:I.variableName,class:"tok-variableName"},{tag:I.local(I.variableName),class:"tok-variableName tok-local"},{tag:I.definition(I.variableName),class:"tok-variableName tok-definition"},{tag:I.special(I.variableName),class:"tok-variableName2"},{tag:I.definition(I.propertyName),class:"tok-propertyName tok-definition"},{tag:I.typeName,class:"tok-typeName"},{tag:I.namespace,class:"tok-namespace"},{tag:I.className,class:"tok-className"},{tag:I.macroName,class:"tok-macroName"},{tag:I.propertyName,class:"tok-propertyName"},{tag:I.operator,class:"tok-operator"},{tag:I.comment,class:"tok-comment"},{tag:I.meta,class:"tok-meta"},{tag:I.invalid,class:"tok-invalid"},{tag:I.punctuation,class:"tok-punctuation"}])},1815:function(e,t,n){"use strict";n.d(t,{Fw:function(){return k},fC:function(){return A},wy:function(){return w}});var r=n(31229),i=n(94647),s=n(45169),o=n(98014),l=n(91371),a=n(36038),h=n(29313),c=n(21146),u=n(71306),f=n(59533),d="Collapsible",[p,m]=(0,s.b)(d),[g,y]=p(d),v=r.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:i,defaultOpen:s,disabled:l,onOpenChange:a,...c}=e,[p,m]=(0,o.T)({prop:i,defaultProp:null!=s&&s,onChange:a,caller:d});return(0,f.jsx)(g,{scope:n,disabled:l,contentId:(0,u.M)(),open:p,onOpenToggle:r.useCallback(()=>m(e=>!e),[m]),children:(0,f.jsx)(h.WV.div,{"data-state":C(p),"data-disabled":l?"":void 0,...c,ref:t})})});v.displayName=d;var x="CollapsibleTrigger",w=r.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,s=y(x,n);return(0,f.jsx)(h.WV.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":C(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:t,onClick:(0,i.Mj)(e.onClick,s.onOpenToggle)})});w.displayName=x;var b="CollapsibleContent",k=r.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=y(b,e.__scopeCollapsible);return(0,f.jsx)(c.z,{present:n||i.open,children:e=>{let{present:n}=e;return(0,f.jsx)(S,{...r,ref:t,present:n})}})});k.displayName=b;var S=r.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:i,children:s,...o}=e,c=y(b,n),[u,d]=r.useState(i),p=r.useRef(null),m=(0,a.e)(t,p),g=r.useRef(0),v=g.current,x=r.useRef(0),w=x.current,k=c.open||u,S=r.useRef(k),A=r.useRef(void 0);return r.useEffect(()=>{let e=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,l.b)(()=>{let e=p.current;if(e){A.current=A.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();g.current=t.height,x.current=t.width,S.current||(e.style.transitionDuration=A.current.transitionDuration,e.style.animationName=A.current.animationName),d(i)}},[c.open,i]),(0,f.jsx)(h.WV.div,{"data-state":C(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!k,...o,ref:m,style:{"--radix-collapsible-content-height":v?"".concat(v,"px"):void 0,"--radix-collapsible-content-width":w?"".concat(w,"px"):void 0,...e.style},children:k&&s})});function C(e){return e?"open":"closed"}var A=v},60893:function(e,t,n){"use strict";n.d(t,{VY:function(){return O},aV:function(){return I},fC:function(){return D},xz:function(){return E}});var r=n(31229),i=n(94647),s=n(45169),o=n(37733),l=n(21146),a=n(29313),h=n(23110),c=n(98014),u=n(71306),f=n(59533),d="Tabs",[p,m]=(0,s.b)(d,[o.Pc]),g=(0,o.Pc)(),[y,v]=p(d),x=r.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:s,orientation:o="horizontal",dir:l,activationMode:p="automatic",...m}=e,g=(0,h.gm)(l),[v,x]=(0,c.T)({prop:r,onChange:i,defaultProp:null!=s?s:"",caller:d});return(0,f.jsx)(y,{scope:n,baseId:(0,u.M)(),value:v,onValueChange:x,orientation:o,dir:g,activationMode:p,children:(0,f.jsx)(a.WV.div,{dir:g,"data-orientation":o,...m,ref:t})})});x.displayName=d;var w="TabsList",b=r.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,s=v(w,n),l=g(n);return(0,f.jsx)(o.fC,{asChild:!0,...l,orientation:s.orientation,dir:s.dir,loop:r,children:(0,f.jsx)(a.WV.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:t})})});b.displayName=w;var k="TabsTrigger",S=r.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:s=!1,...l}=e,h=v(k,n),c=g(n),u=M(h.baseId,r),d=T(h.baseId,r),p=r===h.value;return(0,f.jsx)(o.ck,{asChild:!0,...c,focusable:!s,active:p,children:(0,f.jsx)(a.WV.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":d,"data-state":p?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:u,...l,ref:t,onMouseDown:(0,i.Mj)(e.onMouseDown,e=>{s||0!==e.button||!1!==e.ctrlKey?e.preventDefault():h.onValueChange(r)}),onKeyDown:(0,i.Mj)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&h.onValueChange(r)}),onFocus:(0,i.Mj)(e.onFocus,()=>{let e="manual"!==h.activationMode;p||s||!e||h.onValueChange(r)})})})});S.displayName=k;var C="TabsContent",A=r.forwardRef((e,t)=>{let{__scopeTabs:n,value:i,forceMount:s,children:o,...h}=e,c=v(C,n),u=M(c.baseId,i),d=T(c.baseId,i),p=i===c.value,m=r.useRef(p);return r.useEffect(()=>{let e=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,f.jsx)(l.z,{present:s||p,children:n=>{let{present:r}=n;return(0,f.jsx)(a.WV.div,{"data-state":p?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":u,hidden:!r,id:d,tabIndex:0,...h,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:r&&o})}})});function M(e,t){return"".concat(e,"-trigger-").concat(t)}function T(e,t){return"".concat(e,"-content-").concat(t)}A.displayName=C;var D=x,I=b,E=S,O=A},89333:function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}n.d(t,{ZP:function(){return t9}});var i=n(31229),s=n(78775),o=n(47824),l=n(17781),a=n(26416);function h(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return!!i&&(r(n.update(i)),!0)}}let c=h(function(e,t,n=t.selection.ranges){let r=[],i=-1;n:for(let{from:e,to:s}of n){let n=r.length,o=1e9,l;for(let n=e;n<=s;){let a=t.doc.lineAt(n);if(void 0==l&&!(l=d(t,a.from).line))continue n;if(a.from>i&&(e==s||s>a.from)){i=a.from;let e=/^\s*/.exec(a.text)[0].length,t=e==a.length,n=a.text.slice(e,e+l.length)==l?e:-1;e<a.text.length&&e<o&&(o=e),r.push({line:a,comment:n,token:l,indent:e,empty:t,single:!1})}n=a.to+1}if(o<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=o);r.length==n+1&&(r[n].single=!0)}if(2!=e&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:s,single:o}of r)(o||!s)&&e.push({from:t.from+i,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,s=r+i.length;" "==t.text[s-t.from]&&s++,e.push({from:r,to:s})}return{changes:e}}return null},0),u=h(p,0),f=h((e,t)=>p(e,t,function(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let s=t.length-1;s>=0&&t[s].to>r.from?t[s].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}(t)),0);function d(e,t){let n=e.languageDataAt("commentTokens",t,1);return n.length?n[0]:{}}function p(e,t,n=t.selection.ranges){let r=n.map(e=>d(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>(function(e,{open:t,close:n},r,i){let s,o,l=e.sliceDoc(r-50,r),a=e.sliceDoc(i,i+50),h=/\s*$/.exec(l)[0].length,c=/^\s*/.exec(a)[0].length,u=l.length-h;if(l.slice(u-t.length,u)==t&&a.slice(c,c+n.length)==n)return{open:{pos:r-h,margin:h&&1},close:{pos:i+c,margin:c&&1}};i-r<=100?s=o=e.sliceDoc(r,i):(s=e.sliceDoc(r,r+50),o=e.sliceDoc(i-50,i));let f=/^\s*/.exec(s)[0].length,d=/\s*$/.exec(o)[0].length,p=o.length-d-n.length;return s.slice(f,f+t.length)==t&&o.slice(p,p+n.length)==n?{open:{pos:r+f+t.length,margin:/\s/.test(s.charAt(f+t.length))?1:0},close:{pos:i-d-n.length,margin:/\s/.test(o.charAt(p-1))?1:0}}:null})(t,r[n],e.from,e.to));if(2!=e&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}]))};if(1!=e&&i.some(e=>e)){let e=[];for(let t=0,n;t<i.length;t++)if(n=i[t]){let i=r[t],{open:s,close:o}=n;e.push({from:s.pos-i.open.length,to:s.pos+s.margin},{from:o.pos-o.margin,to:o.pos+i.close.length})}return{changes:e}}return null}let m=s.q6.define(),g=s.q6.define(),y=s.r$.define(),v=s.r$.define({combine:e=>(0,s.BO)(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}),x=s.QQ.define({create:()=>P.empty,update(e,t){let n=t.state.facet(v),r=t.annotation(m);if(r){let i=A.fromTransaction(t,r.selection),s=r.side,o=0==s?e.undone:e.done;return o=i?M(o,o.length,n.minDepth,i):I(o,t.startState.selection),new P(0==s?r.rest:o,0==s?o:r.rest)}let i=t.annotation(g);if(("full"==i||"before"==i)&&(e=e.isolate()),!1===t.annotation(s.YW.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let o=A.fromTransaction(t),l=t.annotation(s.YW.time),a=t.annotation(s.YW.userEvent);return o?e=e.addChanges(o,l,a,n,t):t.selection&&(e=e.addSelection(t.startState.selection,l,a,n.newGroupDelay)),("full"==i||"after"==i)&&(e=e.isolate()),e},toJSON:e=>({done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}),fromJSON:e=>new P(e.done.map(A.fromJSON),e.undone.map(A.fromJSON))});function w(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(x,!1);if(!i)return!1;let s=i.pop(e,n,t);return!!s&&(r(s),!0)}}let b=w(0,!1),k=w(1,!1),S=w(0,!0),C=w(1,!0);class A{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(e){return new A(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(e){return new A(e.changes&&s.as.fromJSON(e.changes),[],e.mapped&&s.n0.fromJSON(e.mapped),e.startSelection&&s.jT.fromJSON(e.startSelection),e.selectionsAfter.map(s.jT.fromJSON))}static fromTransaction(e,t){let n=D;for(let t of e.startState.facet(y)){let r=t(e);r.length&&(n=n.concat(r))}return!n.length&&e.changes.empty?null:new A(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,D)}static selection(e){return new A(void 0,D,void 0,void 0,e)}}function M(e,t,n,r){let i=e.slice(t+1>n+20?t-n-1:0,t);return i.push(r),i}function T(e,t){return e.length?t.length?e.concat(t):e:t}let D=[];function I(e,t){if(!e.length)return[A.selection([t])];{let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-200));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),M(e,e.length-1,1e9,n.setSelAfter(r)))}}function E(e,t){if(!e.length)return e;let n=e.length,r=D;for(;n;){let i=function(e,t,n){let r=T(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):D,n);if(!e.changes)return A.selection(r);let i=e.changes.map(t),o=t.mapDesc(e.changes,!0),l=e.mapped?e.mapped.composeDesc(o):o;return new A(i,s.Py.mapEffects(e.effects,t),l,e.startSelection.map(o),r)}(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[A.selection(r)]:D}let O=/^(input\.type|delete)($|\.)/;class P{constructor(e,t,n=0,r){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new P(this.done,this.undone):this}addChanges(e,t,n,r,i){var o,l;let a,h,c=this.done,u=c[c.length-1];return new P(c=u&&u.changes&&!u.changes.empty&&e.changes&&(!n||O.test(n))&&(!u.selectionsAfter.length&&t-this.prevTime<r.newGroupDelay&&r.joinToEvent(i,(o=u.changes,l=e.changes,a=[],h=!1,o.iterChangedRanges((e,t)=>a.push(e,t)),l.iterChangedRanges((e,t,n,r)=>{for(let e=0;e<a.length;){let t=a[e++],i=a[e++];r>=t&&n<=i&&(h=!0)}}),h))||"input.type.compose"==n)?M(c,c.length-1,r.minDepth,new A(e.changes.compose(u.changes),T(s.Py.mapEffects(e.effects,u.changes),u.effects),u.mapped,u.startSelection,D)):M(c,c.length,r.minDepth,e),D,t,n)}addSelection(e,t,n,r){var i;let s=this.done.length?this.done[this.done.length-1].selectionsAfter:D;return s.length>0&&t-this.prevTime<r&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&(i=s[s.length-1]).ranges.length==e.ranges.length&&0===i.ranges.filter((t,n)=>t.empty!=e.ranges[n].empty).length?this:new P(I(this.done,e),this.undone,t,n)}addMapping(e){return new P(E(this.done,e),E(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=0==e?this.done:this.undone;if(0==r.length)return null;let i=r[r.length-1],s=i.selectionsAfter[0]||(i.startSelection?i.startSelection.map(i.changes.invertedDesc,1):t.selection);if(n&&i.selectionsAfter.length){let n,o;return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:m.of({side:e,rest:(n=r[r.length-1],(o=r.slice())[r.length-1]=n.setSelAfter(n.selectionsAfter.slice(0,n.selectionsAfter.length-1)),o),selection:s}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0})}if(!i.changes)return null;{let n=1==r.length?D:r.slice(0,r.length-1);return i.mapped&&(n=E(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:m.of({side:e,rest:n,selection:s}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}}}P.empty=new P(D,D);let R=[{key:"Mod-z",run:b,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:k,preventDefault:!0},{linux:"Ctrl-Shift-z",run:k,preventDefault:!0},{key:"Mod-u",run:S,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:C,preventDefault:!0}];function B(e,t){return s.jT.create(e.ranges.map(t),e.mainIndex)}function N(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function L({state:e,dispatch:t},n){let r=B(e.selection,n);return!r.eq(e.selection,!0)&&(t(N(e,r)),!0)}function j(e,t){return s.jT.cursor(t?e.to:e.from)}function J(e,t){return L(e,n=>n.empty?e.moveByChar(n,t):j(n,t))}function V(e){return e.textDirectionAt(e.state.selection.main.head)==o.Direction.LTR}let F=e=>J(e,!V(e)),q=e=>J(e,V(e));function z(e,t){return L(e,n=>n.empty?e.moveByGroup(n,t):j(n,t))}function W(e,t,n){let r,i,o=(0,l.qz)(e).resolveInner(t.head),h=n?a.md.closedBy:a.md.openedBy;for(let r=t.head;;){let t=n?o.childAfter(r):o.childBefore(r);if(!t)break;!function(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}(e,t,h)?r=n?t.to:t.from:o=t}return i=o.type.prop(h)&&(r=n?(0,l.Um)(e,o.from,1):(0,l.Um)(e,o.to,-1))&&r.matched?n?r.end.to:r.end.from:n?o.to:o.from,s.jT.cursor(i,n?-1:1)}function _(e,t){return L(e,n=>{if(!n.empty)return j(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)})}"undefined"!=typeof Intl&&Intl.Segmenter;let $=e=>_(e,!1),Z=e=>_(e,!0);function U(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,r=0,i;if(t){for(let t of e.state.facet(o.EditorView.scrollMargins)){let i=t(e);(null==i?void 0:i.top)&&(n=Math.max(null==i?void 0:i.top,n)),(null==i?void 0:i.bottom)&&(r=Math.max(null==i?void 0:i.bottom,r))}i=e.scrollDOM.clientHeight-n-r}else i=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:t,height:Math.max(e.defaultLineHeight,i-5)}}function H(e,t){let n,r=U(e),{state:i}=e,s=B(i.selection,n=>n.empty?e.moveVertically(n,t,r.height):j(n,t));if(s.eq(i.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(i.selection.main.head),l=e.scrollDOM.getBoundingClientRect(),a=l.top+r.marginTop,h=l.bottom-r.marginBottom;t&&t.top>a&&t.bottom<h&&(n=o.EditorView.scrollIntoView(s.main.head,{y:"start",yMargin:t.top-a}))}return e.dispatch(N(i,s),{effects:n}),!0}let K=e=>H(e,!1),Q=e=>H(e,!0);function G(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=s.jT.cursor(r.from+n))}return i}function Y(e,t){let n=B(e.state.selection,e=>{let n=t(e);return s.jT.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)});return!n.eq(e.state.selection)&&(e.dispatch(N(e.state,n)),!0)}function X(e,t){return Y(e,n=>e.moveByChar(n,t))}let ee=e=>X(e,!V(e)),et=e=>X(e,V(e));function en(e,t){return Y(e,n=>e.moveByGroup(n,t))}function er(e,t){return Y(e,n=>e.moveVertically(n,t))}let ei=e=>er(e,!1),es=e=>er(e,!0);function eo(e,t){return Y(e,n=>e.moveVertically(n,t,U(e).height))}let el=e=>eo(e,!1),ea=e=>eo(e,!0),eh=({state:e,dispatch:t})=>(t(N(e,{anchor:0})),!0),ec=({state:e,dispatch:t})=>(t(N(e,{anchor:e.doc.length})),!0),eu=({state:e,dispatch:t})=>(t(N(e,{anchor:e.selection.main.anchor,head:0})),!0),ef=({state:e,dispatch:t})=>(t(N(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function ed(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let r of n.selection.ranges){let s=n.doc.lineAt(r.head);if(t?s.to<e.state.doc.length:s.from>0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.head<s.from||r.head>s.to){i.some(e=>e.head==r.head)||i.push(r);break}if(r.head==n.head)break;n=r}}return i.length!=r.ranges.length&&(e.dispatch(N(n,s.jT.create(i,i.length-1))),!0)}function ep(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:o}=r;if(i==o){let s=t(r);s<i?(n="delete.backward",s=em(e,s,!1)):s>i&&(n="delete.forward",s=em(e,s,!0)),i=Math.min(i,s),o=Math.max(o,s)}else i=em(e,i,!1),o=em(e,o,!0);return i==o?{range:r}:{changes:{from:i,to:o},range:s.jT.cursor(i,i<r.head?-1:1)}});return!i.changes.empty&&(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?o.EditorView.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function em(e,t,n){if(e instanceof o.EditorView)for(let r of e.state.facet(o.EditorView.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}let eg=(e,t,n)=>ep(e,r=>{let i=r.from,{state:o}=e,a=o.doc.lineAt(i),h,c;if(n&&!t&&i>a.from&&i<a.from+200&&!/[^ \t]/.test(h=a.text.slice(0,i-a.from))){if(" "==h[h.length-1])return i-1;let e=(0,s.IS)(h,o.tabSize)%(0,l.y1)(o)||(0,l.y1)(o);for(let t=0;t<e&&" "==h[h.length-1-t];t++)i--;c=i}else(c=(0,s.cp)(a.text,i-a.from,t,t)+a.from)==i&&a.number!=(t?o.doc.lines:1)?c+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(a.text.slice(c-a.from,i-a.from))&&(c=(0,s.cp)(a.text,c-a.from,!1,!1)+a.from);return c}),ey=e=>eg(e,!1,!0),ev=e=>eg(e,!0,!1),ex=(e,t)=>ep(e,n=>{let r=n.head,{state:i}=e,o=i.doc.lineAt(r),l=i.charCategorizer(r);for(let e=null;;){if(r==(t?o.to:o.from)){r==n.head&&o.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let a=(0,s.cp)(o.text,r-o.from,t)+o.from,h=o.text.slice(Math.min(r,a)-o.from,Math.max(r,a)-o.from),c=l(h);if(null!=e&&c!=e)break;(" "!=h||r!=n.head)&&(e=c),r=a}return r}),ew=e=>ex(e,!1);function eb(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),s=e.doc.lineAt(r.to);if(r.empty||r.to!=s.from||(s=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=s.to,e.ranges.push(r)}else t.push({from:i.from,to:s.to,ranges:[r]});n=s.number+1}return t}function ek(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of eb(e)){if(n?t.to==e.doc.length:0==t.from)continue;let o=e.doc.lineAt(n?t.to+1:t.from-1),l=o.length+1;if(n)for(let n of(r.push({from:t.to,to:o.to},{from:t.from,insert:o.text+e.lineBreak}),t.ranges))i.push(s.jT.range(Math.min(e.doc.length,n.anchor+l),Math.min(e.doc.length,n.head+l)));else for(let n of(r.push({from:o.from,to:t.from},{from:t.to,insert:e.lineBreak+o.text}),t.ranges))i.push(s.jT.range(n.anchor-l,n.head-l))}return!!r.length&&(t(e.update({changes:r,scrollIntoView:!0,selection:s.jT.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0)}function eS(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of eb(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}let eC=eM(!1),eA=eM(!0);function eM(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,o=t.doc.lineAt(r),h=!e&&r==i&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=(0,l.qz)(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),s;return r&&i&&r.to<=t&&i.from>=t&&(s=r.type.prop(a.md.closedBy))&&s.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}(t,r);e&&(r=i=(i<=o.to?o:t.doc.lineAt(i)).to);let c=new l.Gn(t,{simulateBreak:r,simulateDoubleBreak:!!h}),u=(0,l.K0)(c,r);for(null==u&&(u=(0,s.IS)(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize));i<o.to&&/\s/.test(o.text[i-o.from]);)i++;h?{from:r,to:i}=h:r>o.from&&r<o.from+100&&!/\S/.test(o.text.slice(0,r))&&(r=o.from);let f=["",(0,l.SS)(t,u)];return h&&f.push((0,l.SS)(t,c.lineIndent(o.from,-1))),{changes:{from:r,to:i,insert:s.xv.of(f)},range:s.jT.cursor(r+1+f[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function eT(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let s=r.from;s<=r.to;){let o=e.doc.lineAt(s);o.number>n&&(r.empty||r.to>o.from)&&(t(o,i,r),n=o.number),s=o.to+1}let o=e.changes(i);return{changes:i,range:s.jT.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}let eD=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(eT(e,(t,n)=>{n.push({from:t.from,insert:e.facet(l.c)})}),{userEvent:"input.indent"})),!0),eI=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(eT(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=(0,s.IS)(r,e.tabSize),o=0,a=(0,l.SS)(e,Math.max(0,i-(0,l.y1)(e)));for(;o<r.length&&o<a.length&&r.charCodeAt(o)==a.charCodeAt(o);)o++;n.push({from:t.from+o,to:t.from+r.length,insert:a.slice(o)})}),{userEvent:"delete.dedent"})),!0),eE=[{key:"Ctrl-b",run:F,shift:ee,preventDefault:!0},{key:"Ctrl-f",run:q,shift:et},{key:"Ctrl-p",run:$,shift:ei},{key:"Ctrl-n",run:Z,shift:es},{key:"Ctrl-a",run:e=>L(e,t=>s.jT.cursor(e.lineBlockAt(t.head).from,1)),shift:e=>Y(e,t=>s.jT.cursor(e.lineBlockAt(t.head).from))},{key:"Ctrl-e",run:e=>L(e,t=>s.jT.cursor(e.lineBlockAt(t.head).to,-1)),shift:e=>Y(e,t=>s.jT.cursor(e.lineBlockAt(t.head).to))},{key:"Ctrl-d",run:ev},{key:"Ctrl-h",run:ey},{key:"Ctrl-k",run:e=>ep(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)})},{key:"Ctrl-Alt-h",run:ew},{key:"Ctrl-o",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:s.xv.of(["",""])},range:s.jT.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),i=n==r.from?n-1:(0,s.cp)(r.text,n-r.from,!1)+r.from,o=n==r.to?n+1:(0,s.cp)(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:o,insert:e.doc.slice(n,o).append(e.doc.slice(i,n))},range:s.jT.cursor(o)}});return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:Q}],eO=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>L(e,t=>W(e.state,t,!V(e))),shift:e=>Y(e,t=>W(e.state,t,!V(e)))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>L(e,t=>W(e.state,t,V(e))),shift:e=>Y(e,t=>W(e.state,t,V(e)))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>ek(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>eS(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>ek(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>eS(e,t,!0)},{key:"Mod-Alt-ArrowUp",run:e=>ed(e,!1)},{key:"Mod-Alt-ArrowDown",run:e=>ed(e,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=s.jT.create([n.main]):n.main.empty||(r=s.jT.create([s.jT.cursor(n.main.head)])),!!r&&(t(N(e,r)),!0)}},{key:"Mod-Enter",run:eA},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let n=eb(e).map(({from:t,to:n})=>s.jT.range(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:s.jT.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let n=B(e.selection,t=>{let n=(0,l.qz)(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return s.jT.range(n.to,n.from)}return t});return!n.eq(e.selection)&&(t(N(e,n)),!0)},preventDefault:!0},{key:"Mod-[",run:eI},{key:"Mod-]",run:eD},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new l.Gn(e,{overrideIndentation:e=>{let t=n[e];return null==t?-1:t}}),i=eT(e,(t,i,s)=>{let o=(0,l.K0)(r,t.from);if(null==o)return;/\S/.test(t.text)||(o=0);let a=/^\s*/.exec(t.text)[0],h=(0,l.SS)(e,o);(a!=h||s.from<t.from+a.length)&&(n[t.from]=o,i.push({from:t.from,to:t.from+a.length,insert:h}))});return i.changes.empty||t(e.update(i,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(eb(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=B(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>{let n,r;return n=!1,r=B(e.selection,t=>{let r=(0,l.Um)(e,t.head,-1)||(0,l.Um)(e,t.head,1)||t.head>0&&(0,l.Um)(e,t.head-1,1)||t.head<e.doc.length&&(0,l.Um)(e,t.head+1,-1);if(!r||!r.end)return t;n=!0;let i=r.start.from==t.head?r.end.to:r.end.from;return s.jT.cursor(i)}),!!n&&(t(N(e,r)),!0)}},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=d(e.state,n.from);return r.line?c(e):!!r.block&&f(e)}},{key:"Alt-A",run:u},{key:"Ctrl-m",mac:"Shift-Alt-m",run:e=>(e.setTabFocusMode(),!0)}].concat([{key:"ArrowLeft",run:F,shift:ee,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>z(e,!V(e)),shift:e=>en(e,!V(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>L(e,t=>G(e,t,!V(e))),shift:e=>Y(e,t=>G(e,t,!V(e))),preventDefault:!0},{key:"ArrowRight",run:q,shift:et,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>z(e,V(e)),shift:e=>en(e,V(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>L(e,t=>G(e,t,V(e))),shift:e=>Y(e,t=>G(e,t,V(e))),preventDefault:!0},{key:"ArrowUp",run:$,shift:ei,preventDefault:!0},{mac:"Cmd-ArrowUp",run:eh,shift:eu},{mac:"Ctrl-ArrowUp",run:K,shift:el},{key:"ArrowDown",run:Z,shift:es,preventDefault:!0},{mac:"Cmd-ArrowDown",run:ec,shift:ef},{mac:"Ctrl-ArrowDown",run:Q,shift:ea},{key:"PageUp",run:K,shift:el},{key:"PageDown",run:Q,shift:ea},{key:"Home",run:e=>L(e,t=>G(e,t,!1)),shift:e=>Y(e,t=>G(e,t,!1)),preventDefault:!0},{key:"Mod-Home",run:eh,shift:eu},{key:"End",run:e=>L(e,t=>G(e,t,!0)),shift:e=>Y(e,t=>G(e,t,!0)),preventDefault:!0},{key:"Mod-End",run:ec,shift:ef},{key:"Enter",run:eC,shift:eC},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:ey,shift:ey,preventDefault:!0},{key:"Delete",run:ev,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:ew,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>ex(e,!0),preventDefault:!0},{mac:"Mod-Backspace",run:e=>ep(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),preventDefault:!0},{mac:"Mod-Delete",run:e=>ep(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),preventDefault:!0}].concat(eE.map(e=>({mac:e.key,run:e.run,shift:e.shift})))),eP={key:"Tab",run:eD,shift:eI};var eR=n(95643);let eB="function"==typeof String.prototype.normalize?e=>e.normalize("NFKD"):e=>e;class eN{constructor(e,t,n=0,r=e.length,i,s){this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(eB(e)):eB,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return -1;this.bufferPos=0,this.buffer=this.iter.value}return(0,s.gm)(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=(0,s.bg)(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=(0,s.nZ)(e);let r=this.normalize(t);if(r.length)for(let e=0,i=n;;e++){let s=r.charCodeAt(e),o=this.match(s,i,this.bufferPos+this.bufferStart);if(e==r.length-1){if(o)return this.value=o,this;break}i==n&&e<t.length&&t.charCodeAt(e)==s&&i++}}}match(e,t,n){let r=null;for(let t=0;t<this.matches.length;t+=2){let i=this.matches[t],s=!1;this.query.charCodeAt(i)==e&&(i==this.query.length-1?r={from:this.matches[t+1],to:n}:(this.matches[t]++,s=!0)),s||(this.matches.splice(t,2),t-=2)}return this.query.charCodeAt(0)==e&&(1==this.query.length?r={from:t,to:n}:this.matches.push(1,t)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}}"undefined"!=typeof Symbol&&(eN.prototype[Symbol.iterator]=function(){return this});let eL={from:-1,to:-1,match:/.*/.exec("")},ej="gm"+(null==/x/.unicode?"":"u");class eJ{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine="",this.done=!1,this.value=eL,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new eq(e,t,n,r,i);this.re=new RegExp(t,ej+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.iter=e.iter();let s=e.lineAt(r);this.curLineStart=s.from,this.matchPos=ez(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=ez(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),e=0}}}}let eV=new WeakMap;class eF{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,n){let r=eV.get(e);if(!r||r.from>=n||r.to<=t){let r=new eF(t,e.sliceString(t,n));return eV.set(e,r),r}if(r.from==t&&r.to==n)return r;let{text:i,from:s}=r;return s>t&&(i=e.sliceString(t,s)+i,s=t),r.to<n&&(i+=e.sliceString(r.to,n)),eV.set(e,new eF(s,i)),new eF(t,i.slice(t-s,n-s))}}class eq{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=eL,this.matchPos=ez(e,r),this.re=new RegExp(t,ej+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.flat=eF.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,match:t},this.matchPos=ez(this.text,n+(e==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=eF.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function ez(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}"undefined"!=typeof Symbol&&(eJ.prototype[Symbol.iterator]=eq.prototype[Symbol.iterator]=function(){return this});let eW={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},e_=s.r$.define({combine:e=>(0,s.BO)(e,eW,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}),e$=o.Decoration.mark({class:"cm-selectionMatch"}),eZ=o.Decoration.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function eU(e,t,n,r){return(0==n||e(t.sliceDoc(n-1,n))!=s.D0.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=s.D0.Word)}let eH=o.ViewPlugin.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(e_),{state:n}=e,r=n.selection;if(r.ranges.length>1)return o.Decoration.none;let i=r.main,l,a=null;if(i.empty){if(!t.highlightWordAroundCursor)return o.Decoration.none;let e=n.wordAt(i.head);if(!e)return o.Decoration.none;a=n.charCategorizer(i.head),l=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e<t.minSelectionLength||e>200)return o.Decoration.none;if(t.wholeWords){var h,c,u;if(l=n.sliceDoc(i.from,i.to),!(eU(a=n.charCategorizer(i.head),n,i.from,i.to)&&(h=a,c=i.from,u=i.to,h(n.sliceDoc(c,c+1))==s.D0.Word&&h(n.sliceDoc(u-1,u))==s.D0.Word)))return o.Decoration.none}else if(!(l=n.sliceDoc(i.from,i.to)))return o.Decoration.none}let f=[];for(let r of e.visibleRanges){let e=new eN(n.doc,l,r.from,r.to);for(;!e.next().done;){let{from:r,to:s}=e.value;if((!a||eU(a,n,r,s))&&(i.empty&&r<=i.from&&s>=i.to?f.push(eZ.range(r,s)):(r>=i.to||s<=i.from)&&f.push(e$.range(r,s)),f.length>t.maxMatches))return o.Decoration.none}}return o.Decoration.set(f)}},{decorations:e=>e.decorations}),eK=o.EditorView.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),eQ=({state:e,dispatch:t})=>{let{selection:n}=e,r=s.jT.create(n.ranges.map(t=>e.wordAt(t.head)||s.jT.cursor(t.head)),n.mainIndex);return!r.eq(n)&&(t(e.update({selection:r})),!0)},eG=s.r$.define({combine:e=>(0,s.BO)(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new tg(e),scrollToMatch:e=>o.EditorView.scrollIntoView(e)})});class eY{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,ej),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new e9(this):new e1(this)}getCursor(e,t=0,n){let r=e.doc?e:s.yy.create({doc:e});return null==n&&(n=r.doc.length),this.regexp?e2(this,r,t,n):e0(this,r,t,n)}}class eX{constructor(e){this.spec=e}}function e0(e,t,n,r){var i,o,l,a;let h;return e.wholeWord&&(i=t.doc,o=t.charCategorizer(t.selection.main.head),h=(e,t,n,r)=>((r>e||r+n.length<t)&&(r=Math.max(0,e-2),n=i.sliceString(r,Math.min(i.length,t+2))),(o(e4(n,e-r))!=s.D0.Word||o(e3(n,e-r))!=s.D0.Word)&&(o(e3(n,t-r))!=s.D0.Word||o(e4(n,t-r))!=s.D0.Word))),e.test&&(l=e.test,a=h,h=(e,n,r,i)=>(!a||!!a(e,n,r,i))&&l(e>=i&&n<=i+r.length?r.slice(e-i,n-i):t.doc.sliceString(e,n),t,e,n)),new eN(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),h)}class e1 extends eX{constructor(e){super(e)}nextMatch(e,t,n){let r=e0(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=e0(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=e0(this.spec,e,n,r),s=null;for(;!i.nextOverlapping().done;)s=i.value;if(s)return s;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||(r=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length)),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=e0(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=e0(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}function e2(e,t,n,r){var i,o,l;let a;return e.wholeWord&&(i=t.charCategorizer(t.selection.main.head),a=(e,t,n)=>!n[0].length||(i(e4(n.input,n.index))!=s.D0.Word||i(e3(n.input,n.index))!=s.D0.Word)&&(i(e3(n.input,n.index+n[0].length))!=s.D0.Word||i(e4(n.input,n.index+n[0].length))!=s.D0.Word)),e.test&&(o=e.test,l=a,a=(e,n,r)=>(!l||l(e,n,r))&&o(r[0],t,e,n)),new eJ(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:a},n,r)}function e4(e,t){return e.slice((0,s.cp)(e,t,!1),t)}function e3(e,t){return e.slice(t,(0,s.cp)(e,t))}class e9 extends eX{nextMatch(e,t,n){let r=e2(this.spec,e,n,e.doc.length).next();return r.done&&(r=e2(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-1e4*r),s=e2(this.spec,e,i,n),o=null;for(;!s.next().done;)o=s.value;if(o&&(i==t||o.from>i+10))return o;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if("&"==n)return e.match[0];if("$"==n)return"$";for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=e2(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=e2(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}let e5=s.Py.define(),e6=s.Py.define(),e8=s.QQ.define({create:e=>new e7(tc(e).create(),null),update(e,t){for(let n of t.effects)n.is(e5)?e=new e7(n.value.create(),e.panel):n.is(e6)&&(e=new e7(e.query,n.value?th:null));return e},provide:e=>o.showPanel.from(e,e=>e.panel)});class e7{constructor(e,t){this.query=e,this.panel=t}}let te=o.Decoration.mark({class:"cm-searchMatch"}),tt=o.Decoration.mark({class:"cm-searchMatch cm-searchMatch-selected"}),tn=o.ViewPlugin.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(e8))}update(e){let t=e.state.field(e8);(t!=e.startState.field(e8)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return o.Decoration.none;let{view:n}=this,r=new s.f_;for(let t=0,i=n.visibleRanges,s=i.length;t<s;t++){let{from:o,to:l}=i[t];for(;t<s-1&&l>i[t+1].from-500;)l=i[++t].to;e.highlight(n.state,o,l,(e,t)=>{let i=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,i?tt:te)})}return r.finish()}},{decorations:e=>e.decorations});function tr(e){return t=>{let n=t.state.field(e8,!1);return n&&n.query.spec.valid?e(t,n):td(t)}}let ti=tr((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=s.jT.single(r.from,r.to),o=e.state.facet(eG);return e.dispatch({selection:i,effects:[tx(e,r),o.scrollToMatch(i.main,e)],userEvent:"select.search"}),tf(e),!0}),ts=tr((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let o=s.jT.single(i.from,i.to),l=e.state.facet(eG);return e.dispatch({selection:o,effects:[tx(e,i),l.scrollToMatch(o.main,e)],userEvent:"select.search"}),tf(e),!0}),to=tr((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!!n&&!!n.length&&(e.dispatch({selection:s.jT.create(n.map(e=>s.jT.range(e.from,e.to))),userEvent:"select.search.matches"}),!0)}),tl=tr((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let l=t.nextMatch(n,r,r);if(!l)return!1;let a=l,h=[],c,u,f=[];a.from==r&&a.to==i&&(u=n.toText(t.getReplacement(a)),h.push({from:a.from,to:a.to,insert:u}),a=t.nextMatch(n,a.from,a.to),f.push(o.EditorView.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+".")));let d=e.state.changes(h);return a&&(c=s.jT.single(a.from,a.to).map(d),f.push(tx(e,a)),f.push(n.facet(eG).scrollToMatch(c.main,e))),e.dispatch({changes:d,selection:c,effects:f,userEvent:"input.replace"}),!0}),ta=tr((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map(e=>{let{from:n,to:r}=e;return{from:n,to:r,insert:t.getReplacement(e)}});if(!n.length)return!1;let r=e.state.phrase("replaced $ matches",n.length)+".";return e.dispatch({changes:n,effects:o.EditorView.announce.of(r),userEvent:"input.replace.all"}),!0});function th(e){return e.state.facet(eG).createPanel(e)}function tc(e,t){var n,r,i,s,o;let l=e.selection.main,a=l.empty||l.to>l.from+100?"":e.sliceDoc(l.from,l.to);if(t&&!a)return t;let h=e.facet(eG);return new eY({search:(null!==(n=null==t?void 0:t.literal)&&void 0!==n?n:h.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null==t?void 0:t.caseSensitive)&&void 0!==r?r:h.caseSensitive,literal:null!==(i=null==t?void 0:t.literal)&&void 0!==i?i:h.literal,regexp:null!==(s=null==t?void 0:t.regexp)&&void 0!==s?s:h.regexp,wholeWord:null!==(o=null==t?void 0:t.wholeWord)&&void 0!==o?o:h.wholeWord})}function tu(e){let t=(0,o.getPanel)(e,th);return t&&t.dom.querySelector("[main-field]")}function tf(e){let t=tu(e);t&&t==e.root.activeElement&&t.select()}let td=e=>{let t=e.state.field(e8,!1);if(t&&t.panel){let n=tu(e);if(n&&n!=e.root.activeElement){let r=tc(e.state,t.query.spec);r.valid&&e.dispatch({effects:e5.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[e6.of(!0),t?e5.of(tc(e.state,t.query.spec)):s.Py.appendConfig.of(tb)]});return!0},tp=e=>{let t=e.state.field(e8,!1);if(!t||!t.panel)return!1;let n=(0,o.getPanel)(e,th);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:e6.of(!1)}),!0},tm=[{key:"Mod-f",run:td,scope:"editor search-panel"},{key:"F3",run:ti,shift:ts,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:ti,shift:ts,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:tp,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],l=0;for(let t=new eN(e.doc,e.sliceDoc(r,i));!t.next().done;){if(o.length>1e3)return!1;t.value.from==r&&(l=o.length),o.push(s.jT.range(t.value.from,t.value.to))}return t(e.update({selection:s.jT.create(o,l),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:e=>{let{state:t}=e,n=String(t.doc.lineAt(e.state.selection.main.head).number),{close:r,result:i}=(0,o.showDialog)(e,{label:t.phrase("Go to line"),input:{type:"text",name:"line",value:n},focus:!0,submitLabel:t.phrase("go")});return i.then(n=>{let i=n&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.elements.line.value);if(!i){e.dispatch({effects:r});return}let l=t.doc.lineAt(t.selection.main.head),[,a,h,c,u]=i,f=c?+c.slice(1):0,d=h?+h:l.number;if(h&&u){let e=d/100;a&&(e=e*("-"==a?-1:1)+l.number/t.doc.lines),d=Math.round(t.doc.lines*e)}else h&&a&&(d=d*("-"==a?-1:1)+l.number);let p=t.doc.line(Math.max(1,Math.min(t.doc.lines,d))),m=s.jT.cursor(p.from+Math.max(0,Math.min(f,p.length)));e.dispatch({effects:[r,o.EditorView.scrollIntoView(m.from,{y:"center"})],selection:m})}),!0}},{key:"Mod-d",run:({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return eQ({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=function(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),s=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new eN(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new eN(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}else{if(n&&r.some(e=>e.from==i.value.from))continue;if(s){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}}(e,r);return!!i&&(t(e.update({selection:e.selection.addRange(s.jT.range(i.from,i.to),!1),effects:o.EditorView.scrollIntoView(i.to)})),!0)},preventDefault:!0}];class tg{constructor(e){this.view=e;let t=this.query=e.state.field(e8).query.spec;function n(e,t,n){return(0,eR.Z)("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=(0,eR.Z)("input",{value:t.search,placeholder:ty(e,"Find"),"aria-label":ty(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=(0,eR.Z)("input",{value:t.replace,placeholder:ty(e,"Replace"),"aria-label":ty(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=(0,eR.Z)("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=(0,eR.Z)("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=(0,eR.Z)("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=(0,eR.Z)("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,n("next",()=>ti(e),[ty(e,"next")]),n("prev",()=>ts(e),[ty(e,"previous")]),n("select",()=>to(e),[ty(e,"all")]),(0,eR.Z)("label",null,[this.caseField,ty(e,"match case")]),(0,eR.Z)("label",null,[this.reField,ty(e,"regexp")]),(0,eR.Z)("label",null,[this.wordField,ty(e,"by word")]),...e.state.readOnly?[]:[(0,eR.Z)("br"),this.replaceField,n("replace",()=>tl(e),[ty(e,"replace")]),n("replaceAll",()=>ta(e),[ty(e,"replace all")])],(0,eR.Z)("button",{name:"close",onclick:()=>tp(e),"aria-label":ty(e,"close"),type:"button"},["\xd7"])])}commit(){let e=new eY({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:e5.of(e)}))}keydown(e){(0,o.runScopeHandlers)(this.view,e,"search-panel")?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?ts:ti)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),tl(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(e5)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(eG).top}}function ty(e,t){return e.state.phrase(t)}let tv=/[\s\.,:;?!]/;function tx(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,s=Math.max(r.from,t-30),l=Math.min(i,n+30),a=e.state.sliceDoc(s,l);if(s!=r.from){for(let e=0;e<30;e++)if(!tv.test(a[e+1])&&tv.test(a[e])){a=a.slice(e);break}}if(l!=i){for(let e=a.length-1;e>a.length-30;e--)if(!tv.test(a[e-1])&&tv.test(a[e])){a=a.slice(0,e);break}}return o.EditorView.announce.of(`${e.state.phrase("current match")}. ${a} ${e.state.phrase("on line")} ${r.number}.`)}let tw=o.EditorView.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),tb=[e8,s.Wl.low(tn),tw];var tk=n(9553);class tS{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class tC{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let r=n.facet(tB).markerFilter;r&&(e=r(e,n));let i=e.slice().sort((e,t)=>e.from-t.from||e.to-t.to),l=new s.f_,a=[],h=0,c=n.doc.iter(),u=0,f=n.doc.length;for(let e=0;;){let t,n,r=e==i.length?null:i[e];if(!r&&!a.length)break;if(a.length)t=h,n=a.reduce((e,t)=>Math.min(e,t.to),r&&r.from>t?r.from:1e8);else{if((t=r.from)>f)break;n=r.to,a.push(r),e++}for(;e<i.length;){let r=i[e];if(r.from==t&&(r.to>r.from||r.to==t))a.push(r),e++,n=Math.min(r.to,n);else{n=Math.min(r.from,n);break}}n=Math.min(n,f);let s=!1;if(a.some(e=>e.from==t&&(e.to==n||n==f))&&!(s=t==n)&&n-t<10){let e=t-(u+c.value.length);e>0&&(c.next(e),u=t);for(let e=t;;){if(e>=n){s=!0;break}if(!c.lineBreak&&u+c.value.length>e)break;e=u+c.value.length,u+=c.value.length,c.next()}}let d=function(e){let t="hint",n=1;for(let i of e){var r;let e="error"==(r=i.severity)?4:"warning"==r?3:"info"==r?2:1;e>n&&(n=e,t=i.severity)}return t}(a);if(s)l.add(t,t,o.Decoration.widget({widget:new tJ(d),diagnostics:a.slice()}));else{let e=a.reduce((e,t)=>t.markClass?e+" "+t.markClass:e,"");l.add(t,n,o.Decoration.mark({class:"cm-lintRange cm-lintRange-"+d+e,diagnostics:a.slice(),inclusiveEnd:a.some(e=>e.to>n)}))}if((h=n)==f)break;for(let e=0;e<a.length;e++)a[e].to<=h&&a.splice(e--,1)}let d=l.finish();return new tC(d,t,tA(d))}}function tA(e,t=null,n=0){let r=null;return e.between(n,1e9,(e,n,{spec:i})=>{if(!(t&&0>i.diagnostics.indexOf(t))){if(r){if(0>i.diagnostics.indexOf(r.diagnostic))return!1;r=new tS(r.from,n,r.diagnostic)}else r=new tS(e,n,t||i.diagnostics[0])}}),r}function tM(e,t){let n=t.pos,r=t.end||n,i=e.state.facet(tB).hideOn(e,n,r);if(null!=i)return i;let s=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(e=>e.is(tT))||e.changes.touchesRange(s.from,Math.max(s.to,r)))}let tT=s.Py.define(),tD=s.Py.define(),tI=s.Py.define(),tE=s.QQ.define({create:()=>new tC(o.Decoration.none,null,null),update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,i=e.panel;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=tA(n,e.selected.diagnostic,i)||tA(n,null,i)}!n.size&&i&&t.state.facet(tB).autoPanel&&(i=null),e=new tC(n,i,r)}for(let n of t.effects)if(n.is(tT)){let r=t.state.facet(tB).autoPanel?n.value.length?tF.open:null:e.panel;e=tC.init(n.value,r,t.state)}else n.is(tD)?e=new tC(e.diagnostics,n.value?tF.open:null,e.selected):n.is(tI)&&(e=new tC(e.diagnostics,e.panel,n.value));return e},provide:e=>[o.showPanel.from(e,e=>e.panel),o.EditorView.decorations.from(e,e=>e.diagnostics)]}),tO=o.Decoration.mark({class:"cm-lintRange cm-lintRange-active"}),tP=e=>{let t=e.state.field(tE,!1);return!!t&&!!t.panel&&(e.dispatch({effects:tD.of(!1)}),!0)},tR=[{key:"Mod-Shift-m",run:e=>{var t,n;let r=e.state.field(tE,!1);r&&r.panel||e.dispatch({effects:(t=e.state,n=[tD.of(!0)],t.field(tE,!1)?n:n.concat(s.Py.appendConfig.of(t_)))});let i=(0,o.getPanel)(e,tF.open);return i&&i.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(tE,!1);if(!t)return!1;let n=e.state.selection.main,r=tA(t.diagnostics,null,n.to+1);return!!(r||(r=tA(t.diagnostics,null,0))&&(r.from!=n.from||r.to!=n.to))&&(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],tB=s.r$.define({combine:e=>({sources:e.map(e=>e.source).filter(e=>null!=e),...(0,s.BO)(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:tN,tooltipFilter:tN,needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t,hideOn:(e,t)=>e?t?(n,r,i)=>e(n,r,i)||t(n,r,i):e:t,autoPanel:(e,t)=>e||t})})});function tN(e,t){return e?t?(n,r)=>t(e(n,r),r):e:t}function tL(e){let t=[];if(e)r:for(let{name:n}of e){for(let e=0;e<n.length;e++){let r=n[e];if(/[a-zA-Z]/.test(r)&&!t.some(e=>e.toLowerCase()==r.toLowerCase())){t.push(r);continue r}}t.push("")}return t}function tj(e,t,n){var r;let i=n?tL(t.actions):[];return(0,eR.Z)("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},(0,eR.Z)("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),null===(r=t.actions)||void 0===r?void 0:r.map((n,r)=>{let s=!1,o=r=>{if(r.preventDefault(),s)return;s=!0;let i=tA(e.state.field(tE).diagnostics,t);i&&n.apply(e,i.from,i.to)},{name:l}=n,a=i[r]?l.indexOf(i[r]):-1,h=a<0?l:[l.slice(0,a),(0,eR.Z)("u",l.slice(a,a+1)),l.slice(a+1)],c=n.markClass?" "+n.markClass:"";return(0,eR.Z)("button",{type:"button",class:"cm-diagnosticAction"+c,onclick:o,onmousedown:o,"aria-label":` Action: ${l}${a<0?"":` (access key "${i[r]})"`}.`},h)}),t.source&&(0,eR.Z)("div",{class:"cm-diagnosticSource"},t.source))}class tJ extends o.WidgetType{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return(0,eR.Z)("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class tV{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=tj(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class tF{constructor(e){this.view=e,this.items=[],this.list=(0,eR.Z)("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(!t.ctrlKey&&!t.altKey&&!t.metaKey){if(27==t.keyCode)tP(this.view),this.view.focus();else if(38==t.keyCode||33==t.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==t.keyCode||34==t.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==t.keyCode)this.moveSelection(0);else if(35==t.keyCode)this.moveSelection(this.items.length-1);else if(13==t.keyCode)this.view.focus();else{if(!(t.keyCode>=65)||!(t.keyCode<=90)||!(this.selectedIndex>=0))return;let{diagnostic:n}=this.items[this.selectedIndex],r=tL(n.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==t.keyCode){let t=tA(this.view.state.field(tE).diagnostics,n);t&&n.actions[i].apply(e,t.from,t.to)}}t.preventDefault()}},onclick:e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)}}),this.dom=(0,eR.Z)("div",{class:"cm-panel-lint"},this.list,(0,eR.Z)("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>tP(this.view)},"\xd7")),this.update()}get selectedIndex(){let e=this.view.state.field(tE).selected;if(!e)return -1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return -1}update(){let{diagnostics:e,selected:t}=this.view.state.field(tE),n=0,r=!1,i=null,s=new Set;for(e.between(0,this.view.state.doc.length,(e,o,{spec:l})=>{for(let e of l.diagnostics){if(s.has(e))continue;s.add(e);let o=-1,l;for(let t=n;t<this.items.length;t++)if(this.items[t].diagnostic==e){o=t;break}o<0?(l=new tV(this.view,e),this.items.splice(n,0,l),r=!0):(l=this.items[o],o>n&&(this.items.splice(n,o-n),r=!0)),t&&l.diagnostic==t.diagnostic?l.dom.hasAttribute("aria-selected")||(l.dom.setAttribute("aria-selected","true"),i=l):l.dom.hasAttribute("aria-selected")&&l.dom.removeAttribute("aria-selected"),n++}});n<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();0==this.items.length&&(this.items.push(new tV(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),i?(this.list.setAttribute("aria-activedescendant",i.id),this.view.requestMeasure({key:this,read:()=>({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.top<t.top?this.list.scrollTop-=(t.top-e.top)/n:e.bottom>t.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=tA(this.view.state.field(tE).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:tI.of(t)})}static open(e){return new tF(e)}}function tq(e){return function(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}let tz=o.EditorView.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:tq("#d11")},".cm-lintRange-warning":{backgroundImage:tq("orange")},".cm-lintRange-info":{backgroundImage:tq("#999")},".cm-lintRange-hint":{backgroundImage:tq("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}},"&dark .cm-lintRange-active":{backgroundColor:"#86714a80"},"&dark .cm-panel.cm-panel-lint ul":{"& [aria-selected]":{backgroundColor:"#2e343e"}}});o.GutterMarker;let tW=s.Py.define(),t_=[tE,o.EditorView.decorations.compute([tE],e=>{let{selected:t,panel:n}=e.field(tE);return t&&n&&t.from!=t.to?o.Decoration.set([tO.range(t.from,t.to)]):o.Decoration.none}),(0,o.hoverTooltip)(function(e,t,n){let{diagnostics:r}=e.state.field(tE),i,s=-1,o=-1;r.between(t-(n<0?1:0),t+(n>0?1:0),(e,r,{spec:l})=>{if(t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t<r||n<0)))return i=l.diagnostics,s=e,o=r,!1});let l=e.state.facet(tB).tooltipFilter;return(i&&l&&(i=l(i,e.state)),i)?{pos:s,end:o,above:e.state.doc.lineAt(s).to<o,create:()=>{var t,n;return{dom:(t=e,n=i,(0,eR.Z)("ul",{class:"cm-tooltip-lint"},n.map(e=>tj(t,e,!1))))}}}:null},{hideOn:tM}),tz];var t$=function(e){void 0===e&&(e={});var{crosshairCursor:t=!1}=e,n=[];!1!==e.closeBracketsKeymap&&(n=n.concat(tk.GA)),!1!==e.defaultKeymap&&(n=n.concat(eO)),!1!==e.searchKeymap&&(n=n.concat(tm)),!1!==e.historyKeymap&&(n=n.concat(R)),!1!==e.foldKeymap&&(n=n.concat(l.e7)),!1!==e.completionKeymap&&(n=n.concat(tk.B1)),!1!==e.lintKeymap&&(n=n.concat(tR));var r=[];if(!1!==e.lineNumbers&&r.push((0,o.lineNumbers)()),!1!==e.highlightActiveLineGutter&&r.push((0,o.highlightActiveLineGutter)()),!1!==e.highlightSpecialChars&&r.push((0,o.highlightSpecialChars)()),!1!==e.history&&r.push(function(e={}){return[x,v.of(e),o.EditorView.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?b:"historyRedo"==e.inputType?k:null;return!!n&&(e.preventDefault(),n(t))}})]}()),!1!==e.foldGutter&&r.push((0,l.mi)()),!1!==e.drawSelection&&r.push((0,o.drawSelection)()),!1!==e.dropCursor&&r.push((0,o.dropCursor)()),!1!==e.allowMultipleSelections&&r.push(s.yy.allowMultipleSelections.of(!0)),!1!==e.indentOnInput&&r.push((0,l.nY)()),!1!==e.syntaxHighlighting&&r.push((0,l.nF)(l.R_,{fallback:!0})),!1!==e.bracketMatching&&r.push((0,l.n$)()),!1!==e.closeBrackets&&r.push((0,tk.vQ)()),!1!==e.autocompletion&&r.push((0,tk.ys)()),!1!==e.rectangularSelection&&r.push((0,o.rectangularSelection)()),!1!==t&&r.push((0,o.crosshairCursor)()),!1!==e.highlightActiveLine&&r.push((0,o.highlightActiveLine)()),!1!==e.highlightSelectionMatches)r.push([eK,eH]);return e.tabSize&&"number"==typeof e.tabSize&&r.push(l.c.of(" ".repeat(e.tabSize))),r.concat([o.keymap.of(n.flat())]).filter(Boolean)},tZ=n(64880),tU=o.EditorView.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),tH=function(e){void 0===e&&(e={});var{indentWithTab:t=!0,editable:n=!0,readOnly:r=!1,theme:i="light",placeholder:l="",basicSetup:a=!0}=e,h=[];switch(t&&h.unshift(o.keymap.of([eP])),a&&("boolean"==typeof a?h.unshift(t$()):h.unshift(t$(a))),l&&h.unshift((0,o.placeholder)(l)),i){case"light":h.push(tU);break;case"dark":h.push(tZ.oneDark);break;case"none":break;default:h.push(i)}return!1===n&&h.push(o.EditorView.editable.of(!1)),r&&h.push(s.yy.readOnly.of(!0)),[...h]},tK=e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(e=>!e.empty)});class tQ{constructor(e,t){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=t,this.timeoutMS=t,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(e=>{try{e()}catch(e){console.error("TimeoutLatch callback error:",e)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class tG{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),0===this.latches.size&&this.stop()}start(){null===this.interval&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){null!==this.interval&&(clearInterval(this.interval),this.interval=null)}}var tY=null,tX=()=>"undefined"==typeof window?new tG:(tY||(tY=new tG),tY),t0=s.q6.define(),t1=[],t2=n(59533),t4=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],t3=(0,i.forwardRef)((e,t)=>{var{className:n,value:l="",selection:a,extensions:h=[],onChange:c,onStatistics:u,onCreateEditor:f,onUpdate:d,autoFocus:p,theme:m="light",height:g,minHeight:y,maxHeight:v,width:x,minWidth:w,maxWidth:b,basicSetup:k,placeholder:S,indentWithTab:C,editable:A,readOnly:M,root:T,initialState:D}=e,I=function(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t4),E=(0,i.useRef)(null),{state:O,view:P,container:R,setContainer:B}=function(e){var{value:t,selection:n,onChange:r,onStatistics:l,onCreateEditor:a,onUpdate:h,extensions:c=t1,autoFocus:u,theme:f="light",height:d=null,minHeight:p=null,maxHeight:m=null,width:g=null,minWidth:y=null,maxWidth:v=null,placeholder:x="",editable:w=!0,readOnly:b=!1,indentWithTab:k=!0,basicSetup:S=!0,root:C,initialState:A}=e,[M,T]=(0,i.useState)(),[D,I]=(0,i.useState)(),[E,O]=(0,i.useState)(),P=(0,i.useState)(()=>({current:null}))[0],R=(0,i.useState)(()=>({current:null}))[0],B=o.EditorView.theme({"&":{height:d,minHeight:p,maxHeight:m,width:g,minWidth:y,maxWidth:v},"& .cm-scroller":{height:"100% !important"}}),N=[o.EditorView.updateListener.of(e=>{e.docChanged&&"function"==typeof r&&!e.transactions.some(e=>e.annotation(t0))&&(P.current?P.current.reset():(P.current=new tQ(()=>{if(R.current){var e=R.current;R.current=null,e()}P.current=null},200),tX().add(P.current)),r(e.state.doc.toString(),e)),l&&l(tK(e))}),B,...tH({theme:f,editable:w,readOnly:b,placeholder:x,indentWithTab:k,basicSetup:S})];return h&&"function"==typeof h&&N.push(o.EditorView.updateListener.of(h)),N=N.concat(c),(0,i.useLayoutEffect)(()=>{if(M&&!E){var e={doc:t,selection:n,extensions:N},r=A?s.yy.fromJSON(A.json,e,A.fields):s.yy.create(e);if(O(r),!D){var i=new o.EditorView({state:r,parent:M,root:C});I(i),a&&a(i,r)}}return()=>{D&&(O(void 0),I(void 0))}},[M,E]),(0,i.useEffect)(()=>{e.container&&T(e.container)},[e.container]),(0,i.useEffect)(()=>()=>{D&&(D.destroy(),I(void 0)),P.current&&(P.current.cancel(),P.current=null)},[D]),(0,i.useEffect)(()=>{u&&D&&D.focus()},[u,D]),(0,i.useEffect)(()=>{D&&D.dispatch({effects:s.Py.reconfigure.of(N)})},[f,c,d,p,m,g,y,v,x,w,b,k,S,r,h]),(0,i.useEffect)(()=>{if(void 0!==t){var e=D?D.state.doc.toString():"";if(D&&t!==e){var n=P.current&&!P.current.isDone,r=()=>{D&&t!==D.state.doc.toString()&&D.dispatch({changes:{from:0,to:D.state.doc.toString().length,insert:t||""},annotations:[t0.of(!0)]})};n?R.current=r:r()}}},[t,D]),{state:E,setState:O,view:D,setView:I,container:M,setContainer:T}}({root:T,value:l,autoFocus:p,theme:m,height:g,minHeight:y,maxHeight:v,width:x,minWidth:w,maxWidth:b,basicSetup:k,placeholder:S,indentWithTab:C,editable:A,readOnly:M,selection:a,onChange:c,onStatistics:u,onCreateEditor:f,onUpdate:d,extensions:h,initialState:D});(0,i.useImperativeHandle)(t,()=>({editor:E.current,state:O,view:P}),[E,R,O,P]);var N=(0,i.useCallback)(e=>{E.current=e,B(e)},[B]);if("string"!=typeof l)throw Error("value must be typeof string but got "+typeof l);var L="string"==typeof m?"cm-theme-"+m:"cm-theme";return(0,t2.jsx)("div",r({ref:N,className:""+L+(n?" "+n:"")},I))});t3.displayName="CodeMirror";var t9=t3},95643:function(e,t,n){"use strict";function r(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];"string"==typeof i?e.setAttribute(r,i):null!=i&&(e[r]=i)}t++}for(;t<arguments.length;t++)!function e(t,n){if("string"==typeof n)t.appendChild(document.createTextNode(n));else if(null==n);else if(null!=n.nodeType)t.appendChild(n);else if(Array.isArray(n))for(var r=0;r<n.length;r++)e(t,n[r]);else throw RangeError("Unsupported child node: "+n)}(e,arguments[t]);return e}n.d(t,{Z:function(){return r}})},69433:function(e,t,n){"use strict";n.d(t,{V:function(){return o}});let r="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),i="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class o{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}for(let t in e)!function e(t,i,s,o){let l=[],a=/^@(\w+)\b/.exec(t[0]),h=a&&"keyframes"==a[1];if(a&&null==i)return s.push(t[0]+";");for(let n in i){let o=i[n];if(/&/.test(n))e(n.split(/,\s*/).map(e=>t.map(t=>e.replace(/&/,t))).reduce((e,t)=>e.concat(t)),o,s);else if(o&&"object"==typeof o){if(!a)throw RangeError("The value of a property ("+n+") should be a primitive value.");e(r(n),o,l,h)}else null!=o&&l.push(n.replace(/_.*/,"").replace(/[A-Z]/g,e=>"-"+e.toLowerCase())+": "+o+";")}(l.length||h)&&s.push((!n||a||o?t:t.map(n)).join(", ")+" {"+l.join(" ")+"}")}(r(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=s[r]||1;return s[r]=e+1,"ͼ"+e.toString(36)}static mount(e,t,n){let r=e[i],s=n&&n.nonce;r?s&&r.setNonce(s):r=new a(e,s),r.mount(Array.isArray(t)?t:[t],e)}}let l=new Map;class a{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=l.get(n);if(t)return e[i]=t;this.sheet=new r.CSSStyleSheet,l.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[i]=this}mount(e,t){let n=this.sheet,r=0,i=0;for(let t=0;t<e.length;t++){let s=e[t],o=this.modules.indexOf(s);if(o<i&&o>-1&&(this.modules.splice(o,1),i--,o=-1),-1==o){if(this.modules.splice(i++,0,s),n)for(let e=0;e<s.rules.length;e++)n.insertRule(s.rules[e],r++)}else{for(;i<o;)r+=this.modules[i++].rules.length;r+=s.rules.length,i++}}if(n)0>t.adoptedStyleSheets.indexOf(this.sheet)&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let e="";for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+"\n";this.styleTag.textContent=e;let n=t.head||t;this.styleTag.parentNode!=n&&n.insertBefore(this.styleTag,n.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}},41262:function(e,t,n){"use strict";n.d(t,{YG:function(){return h},uY:function(){return i},ue:function(){return r}});for(var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},i={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},s="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),o="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),l=0;l<10;l++)r[48+l]=r[96+l]=String(l);for(var l=1;l<=24;l++)r[l+111]="F"+l;for(var l=65;l<=90;l++)r[l]=String.fromCharCode(l+32),i[l]=String.fromCharCode(l);for(var a in r)i.hasOwnProperty(a)||(i[a]=r[a]);function h(e){var t=!(s&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||o&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?i:r)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}}}]);
|